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

  npio_init_array(&array);
  err = npio_load("test1.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 == 64 && !array.floating_point && array.is_signed);

  data = (int64_t*) array.data;
  total = 0;
  for (i = 0; i < array.size; ++i)
    total += data[i];

  assert(total == 4950);

  npio_free_array(&array);
  printf("test1 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 0x1b84(%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 0x1d81(%rip), %rdi      # 0x3237
xorl %esi, %esi
xorl %eax, %eax
callq 0x1180
testl %eax, %eax
js 0x14ed
movl %eax, %ebx
movq %rsp, %rsi
movl $0x10000, %edx          # imm = 0x10000
movl %eax, %edi
callq 0x2070
movl %eax, %ebp
testl %eax, %eax
jne 0x14e4
movq %rsp, %rdi
callq 0x1aba
movl %eax, %ebp
movl %ebx, %edi
callq 0x10e0
jmp 0x14f4
callq 0x1050
movl (%rax), %ebp
testl %ebp, %ebp
jne 0x166e
leaq 0x1b8c(%rip), %rdi      # 0x308f
xorl %eax, %eax
callq 0x10b0
movl 0x38(%rsp), %ebp
testl %ebp, %ebp
je 0x151f
movl 0x40(%rsp), %ebx
leaq 0x1b7e(%rip), %rdi      # 0x309b
jmp 0x153a
cmpl $0x0, 0x3c(%rsp)
movl 0x40(%rsp), %ebx
je 0x1533
leaq 0x1b78(%rip), %rdi      # 0x30a9
jmp 0x153a
leaq 0x1b86(%rip), %rdi      # 0x30c0
movl %ebx, %esi
xorl %eax, %eax
callq 0x10b0
leaq 0x1b8f(%rip), %rdi      # 0x30d9
xorl %eax, %eax
callq 0x10b0
movq 0x18(%rsp), %r15
testq %r15, %r15
je 0x1580
movq 0x20(%rsp), %r12
leaq 0x1b7a(%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 0x156a
movl $0xa, %edi
callq 0x1040
testl %ebp, %ebp
jne 0x1675
cmpl $0x40, %ebx
jne 0x1675
cmpl $0x0, 0x3c(%rsp)
je 0x1675
movq 0x28(%rsp), %rax
testq %rax, %rax
je 0x164f
movq 0x48(%rsp), %rbx
xorl %ecx, %ecx
xorl %edx, %edx
addq (%rbx,%rdx,8), %rcx
incq %rdx
cmpq %rdx, %rax
jne 0x15bd
cmpq $0x1356, %rcx           # imm = 0x1356
jne 0x164f
movq 0x10(%rsp), %rdi
testq %rdi, %rdi
je 0x15e1
callq 0x1030
movq 0x20(%rsp), %rdi
testq %rdi, %rdi
je 0x15f0
callq 0x1030
movq 0x58(%rsp), %r14
testq %r14, %r14
jne 0x1602
movq %rbx, %rdi
callq 0x1030
cmpl $0x0, 0x78(%rsp)
je 0x1616
movq 0x60(%rsp), %rsi
movq %r14, %rdi
callq 0x1170
movl 0x50(%rsp), %edi
testl %edi, %edi
js 0x1623
callq 0x10e0
movq 0x68(%rsp), %rdi
testq %rdi, %rdi
je 0x1632
callq 0x1030
leaq 0x1c59(%rip), %rdi      # 0x3292
addq $0x88, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
jmp 0x1060
leaq 0x1aed(%rip), %rdi      # 0x3143
leaq 0x1acb(%rip), %rsi      # 0x3128
leaq 0x1ad2(%rip), %rcx      # 0x3136
movl $0x2f, %edx
callq 0x10d0
movl %ebp, %edi
callq 0x1210
leaq 0x1a6a(%rip), %rdi      # 0x30e6
leaq 0x1aa5(%rip), %rsi      # 0x3128
leaq 0x1aac(%rip), %rcx      # 0x3136
movl $0x28, %edx
callq 0x10d0