// File: /workspace/github_cpp_makefile_star2_O1/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 %r12
pushq %rbx
subq $0x90, %rsp
movw $0x1, 0x8(%rsp)
xorps %xmm0, %xmm0
movups %xmm0, 0x10(%rsp)
movups %xmm0, 0x20(%rsp)
movups %xmm0, 0x2c(%rsp)
movaps 0x1908(%rip), %xmm1     # 0x3010
movups %xmm1, 0x3c(%rsp)
xorl %eax, %eax
movq %rax, 0x50(%rsp)
movl $0x0, 0x58(%rsp)
movups %xmm0, 0x60(%rsp)
movups %xmm0, 0x70(%rsp)
movq %rax, 0x80(%rsp)
leaq 0x19fc(%rip), %rdi      # 0x3131
xorl %esi, %esi
xorl %eax, %eax
callq 0x1180
testl %eax, %eax
js 0x1770
movl %eax, %ebx
leaq 0x8(%rsp), %rsi
movl $0x10000, %edx          # imm = 0x10000
movl %eax, %edi
callq 0x21bb
movl %eax, %ebp
testl %eax, %eax
jne 0x1767
leaq 0x8(%rsp), %rdi
callq 0x1b5e
movl %eax, %ebp
movl %ebx, %edi
callq 0x10e0
jmp 0x1777
callq 0x1050
movl (%rax), %ebp
testl %ebp, %ebp
jne 0x191f
leaq 0x18e9(%rip), %rdi      # 0x306f
xorl %eax, %eax
callq 0x10b0
movl 0x40(%rsp), %ebp
testl %ebp, %ebp
je 0x17a2
movl 0x48(%rsp), %esi
leaq 0x18db(%rip), %rdi      # 0x307b
jmp 0x17bd
cmpl $0x0, 0x44(%rsp)
movl 0x48(%rsp), %esi
je 0x17b6
leaq 0x18d5(%rip), %rdi      # 0x3089
jmp 0x17bd
leaq 0x18e3(%rip), %rdi      # 0x30a0
xorl %eax, %eax
callq 0x10b0
leaq 0x18ee(%rip), %rdi      # 0x30b9
xorl %eax, %eax
callq 0x10b0
movq 0x20(%rsp), %r14
testq %r14, %r14
je 0x1801
movq 0x28(%rsp), %r15
leaq 0x18d9(%rip), %rbx      # 0x30c1
xorl %r12d, %r12d
movq (%r15,%r12,8), %rsi
movq %rbx, %rdi
xorl %eax, %eax
callq 0x10b0
incq %r12
cmpq %r12, %r14
jne 0x17eb
movl $0xa, %edi
callq 0x1040
testl %ebp, %ebp
je 0x1926
cmpl $0x20, 0x48(%rsp)
jne 0x1926
movq 0x30(%rsp), %rax
movq 0x50(%rsp), %rbx
xorps %xmm0, %xmm0
testq %rax, %rax
je 0x183f
xorl %ecx, %ecx
addss (%rbx,%rcx,4), %xmm0
incq %rcx
cmpq %rcx, %rax
jne 0x1832
divss 0x17e9(%rip), %xmm0     # 0x3030
addss 0x17e5(%rip), %xmm0     # 0x3034
andps 0x17ca(%rip), %xmm0     # 0x3020
movss 0x17da(%rip), %xmm1     # 0x3038
ucomiss %xmm0, %xmm1
jbe 0x1945
movq 0x18(%rsp), %rdi
testq %rdi, %rdi
je 0x187f
callq 0x1030
movq $0x0, 0x18(%rsp)
movq 0x28(%rsp), %rdi
testq %rdi, %rdi
je 0x1897
callq 0x1030
movq $0x0, 0x28(%rsp)
testq %rbx, %rbx
je 0x18b5
cmpq $0x0, 0x60(%rsp)
jne 0x18b5
movq %rbx, %rdi
callq 0x1030
movq $0x0, 0x50(%rsp)
cmpl $0x0, 0x80(%rsp)
je 0x18d7
movq 0x60(%rsp), %rdi
movq 0x68(%rsp), %rsi
callq 0x1170
movq $0x0, 0x60(%rsp)
movl 0x58(%rsp), %edi
testl %edi, %edi
js 0x18ec
callq 0x10e0
movl $0xffffffff, 0x58(%rsp) # imm = 0xFFFFFFFF
movq 0x70(%rsp), %rdi
testq %rdi, %rdi
je 0x1904
callq 0x1030
movq $0x0, 0x70(%rsp)
leaq 0x1974(%rip), %rdi      # 0x327f
addq $0x90, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
jmp 0x1060
movl %ebp, %edi
callq 0x123c
leaq 0x180e(%rip), %rdi      # 0x313b
leaq 0x17d4(%rip), %rsi      # 0x3108
leaq 0x182e(%rip), %rcx      # 0x3169
movl $0x53, %edx
callq 0x10d0
leaq 0x182a(%rip), %rdi      # 0x3176
leaq 0x17b5(%rip), %rsi      # 0x3108
leaq 0x180f(%rip), %rcx      # 0x3169
movl $0x59, %edx
callq 0x10d0