// File: /workspace/github_cpp_makefile_star2_O3/onai[P]npio/npio_test_c.c
// Function: test2
void test2()
{
  int err;
  size_t i;
  float *data, total;
  npio_Array array;

  npio_init_array(&array);
  err = npio_load("test2.npy", &array);
  if (err)
  {
    fprintf(stderr, "npio_load: %s\n", strerror(err));
    exit(1);
  }

  printf("data type: ");
  if (array.floating_point)
    printf("%d-bit float\n", array.bit_width);
  else if (array.is_signed)
    printf("%d-bit signed integer\n", array.bit_width);
  else
    printf("%d-bit unsigned integer\n", array.bit_width);

  printf("shape: ");
  for (i = 0; i < array.dim; ++i)
    printf("%ld ", array.shape[i]);
  printf("\n");

  assert(array.bit_width == 32 && array.floating_point);

  data = (float*) array.data;
  total = 0;
  for (i = 0; i < array.size; ++i)
    total += data[i];
  assert(fabs(total / 5005.37f - 1.0f) < 1e-6f);

  npio_free_array(&array);
  printf("test2 passed\n");
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x88, %rsp
movw $0x1, (%rsp)
xorps %xmm0, %xmm0
movups %xmm0, 0x8(%rsp)
movups %xmm0, 0x18(%rsp)
movups %xmm0, 0x24(%rsp)
movaps 0x194c(%rip), %xmm1     # 0x3010
movups %xmm1, 0x34(%rsp)
xorl %eax, %eax
movq %rax, 0x48(%rsp)
movl $0x0, 0x50(%rsp)
movups %xmm0, 0x58(%rsp)
movups %xmm0, 0x68(%rsp)
movq %rax, 0x78(%rsp)
leaq 0x1a63(%rip), %rdi      # 0x3151
xorl %esi, %esi
xorl %eax, %eax
callq 0x1180
testl %eax, %eax
js 0x1725
movl %eax, %ebx
movq %rsp, %rsi
movl $0x10000, %edx          # imm = 0x10000
movl %eax, %edi
callq 0x2070
movl %eax, %ebp
testl %eax, %eax
jne 0x171c
movq %rsp, %rdi
callq 0x1aba
movl %eax, %ebp
movl %ebx, %edi
callq 0x10e0
jmp 0x172c
callq 0x1050
movl (%rax), %ebp
testl %ebp, %ebp
jne 0x18a7
leaq 0x1954(%rip), %rdi      # 0x308f
xorl %eax, %eax
callq 0x10b0
movl 0x38(%rsp), %ebp
testl %ebp, %ebp
je 0x1757
movl 0x40(%rsp), %ebx
leaq 0x1946(%rip), %rdi      # 0x309b
jmp 0x1772
cmpl $0x0, 0x3c(%rsp)
movl 0x40(%rsp), %ebx
je 0x176b
leaq 0x1940(%rip), %rdi      # 0x30a9
jmp 0x1772
leaq 0x194e(%rip), %rdi      # 0x30c0
movl %ebx, %esi
xorl %eax, %eax
callq 0x10b0
leaq 0x1957(%rip), %rdi      # 0x30d9
xorl %eax, %eax
callq 0x10b0
movq 0x18(%rsp), %r15
testq %r15, %r15
je 0x17b8
movq 0x20(%rsp), %r12
leaq 0x1942(%rip), %r14      # 0x30e1
xorl %r13d, %r13d
movq (%r12,%r13,8), %rsi
movq %r14, %rdi
xorl %eax, %eax
callq 0x10b0
incq %r13
cmpq %r13, %r15
jne 0x17a2
movl $0xa, %edi
callq 0x1040
testl %ebp, %ebp
je 0x18ae
cmpl $0x20, %ebx
jne 0x18ae
movq 0x28(%rsp), %rax
movq 0x48(%rsp), %rbx
xorps %xmm0, %xmm0
testq %rax, %rax
je 0x17f4
xorl %ecx, %ecx
addss (%rbx,%rcx,4), %xmm0
incq %rcx
cmpq %rcx, %rax
jne 0x17e7
divss 0x1854(%rip), %xmm0     # 0x3050
addss 0x1850(%rip), %xmm0     # 0x3054
andps 0x1815(%rip), %xmm0     # 0x3020
movss 0x1845(%rip), %xmm1     # 0x3058
ucomiss %xmm0, %xmm1
jbe 0x18cd
movq 0x10(%rsp), %rdi
testq %rdi, %rdi
je 0x182b
callq 0x1030
movq 0x20(%rsp), %rdi
testq %rdi, %rdi
je 0x183a
callq 0x1030
testq %rbx, %rbx
setne %al
movq 0x58(%rsp), %r14
testq %r14, %r14
sete %cl
andb %al, %cl
cmpb $0x1, %cl
jne 0x185a
movq %rbx, %rdi
callq 0x1030
cmpl $0x0, 0x78(%rsp)
je 0x186e
movq 0x60(%rsp), %rsi
movq %r14, %rdi
callq 0x1170
movl 0x50(%rsp), %edi
testl %edi, %edi
js 0x187b
callq 0x10e0
movq 0x68(%rsp), %rdi
testq %rdi, %rdi
je 0x188a
callq 0x1030
leaq 0x1a0e(%rip), %rdi      # 0x329f
addq $0x88, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
jmp 0x1060
movl %ebp, %edi
callq 0x123c
leaq 0x18a6(%rip), %rdi      # 0x315b
leaq 0x186c(%rip), %rsi      # 0x3128
leaq 0x18c6(%rip), %rcx      # 0x3189
movl $0x53, %edx
callq 0x10d0
leaq 0x18c2(%rip), %rdi      # 0x3196
leaq 0x184d(%rip), %rsi      # 0x3128
leaq 0x18a7(%rip), %rcx      # 0x3189
movl $0x59, %edx
callq 0x10d0