// File: /workspace/github_cpp_makefile_star2_O1/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 %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 0x1b85(%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 0x1d5f(%rip), %rdi      # 0x3217
xorl %esi, %esi
xorl %eax, %eax
callq 0x1180
testl %eax, %eax
js 0x14f3
movl %eax, %ebx
leaq 0x8(%rsp), %rsi
movl $0x10000, %edx          # imm = 0x10000
movl %eax, %edi
callq 0x21bb
movl %eax, %ebp
testl %eax, %eax
jne 0x14ea
leaq 0x8(%rsp), %rdi
callq 0x1b5e
movl %eax, %ebp
movl %ebx, %edi
callq 0x10e0
jmp 0x14fa
callq 0x1050
movl (%rax), %ebp
testl %ebp, %ebp
jne 0x16b3
leaq 0x1b66(%rip), %rdi      # 0x306f
xorl %eax, %eax
callq 0x10b0
movl 0x40(%rsp), %ebp
testl %ebp, %ebp
je 0x1525
movl 0x48(%rsp), %esi
leaq 0x1b58(%rip), %rdi      # 0x307b
jmp 0x1540
cmpl $0x0, 0x44(%rsp)
movl 0x48(%rsp), %esi
je 0x1539
leaq 0x1b52(%rip), %rdi      # 0x3089
jmp 0x1540
leaq 0x1b60(%rip), %rdi      # 0x30a0
xorl %eax, %eax
callq 0x10b0
leaq 0x1b6b(%rip), %rdi      # 0x30b9
xorl %eax, %eax
callq 0x10b0
movq 0x20(%rsp), %r14
testq %r14, %r14
je 0x1584
movq 0x28(%rsp), %r15
leaq 0x1b56(%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 0x156e
movl $0xa, %edi
callq 0x1040
testl %ebp, %ebp
jne 0x16ba
cmpl $0x40, 0x48(%rsp)
jne 0x16ba
cmpl $0x0, 0x44(%rsp)
je 0x16ba
movq 0x30(%rsp), %rax
testq %rax, %rax
je 0x1694
movq 0x50(%rsp), %rbx
xorl %ecx, %ecx
xorl %edx, %edx
addq (%rbx,%rdx,8), %rcx
incq %rdx
cmpq %rdx, %rax
jne 0x15c3
cmpq $0x1356, %rcx           # imm = 0x1356
jne 0x1694
movq 0x18(%rsp), %rdi
testq %rdi, %rdi
je 0x15f4
callq 0x1030
movq $0x0, 0x18(%rsp)
movq 0x28(%rsp), %rdi
testq %rdi, %rdi
je 0x160c
callq 0x1030
movq $0x0, 0x28(%rsp)
testq %rbx, %rbx
je 0x162a
cmpq $0x0, 0x60(%rsp)
jne 0x162a
movq %rbx, %rdi
callq 0x1030
movq $0x0, 0x50(%rsp)
cmpl $0x0, 0x80(%rsp)
je 0x164c
movq 0x60(%rsp), %rdi
movq 0x68(%rsp), %rsi
callq 0x1170
movq $0x0, 0x60(%rsp)
movl 0x58(%rsp), %edi
testl %edi, %edi
js 0x1661
callq 0x10e0
movl $0xffffffff, 0x58(%rsp) # imm = 0xFFFFFFFF
movq 0x70(%rsp), %rdi
testq %rdi, %rdi
je 0x1679
callq 0x1030
movq $0x0, 0x70(%rsp)
leaq 0x1bf2(%rip), %rdi      # 0x3272
addq $0x90, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
jmp 0x1060
leaq 0x1a88(%rip), %rdi      # 0x3123
leaq 0x1a66(%rip), %rsi      # 0x3108
leaq 0x1a6d(%rip), %rcx      # 0x3116
movl $0x2f, %edx
callq 0x10d0
movl %ebp, %edi
callq 0x1210
leaq 0x1a05(%rip), %rdi      # 0x30c6
leaq 0x1a40(%rip), %rsi      # 0x3108
leaq 0x1a47(%rip), %rcx      # 0x3116
movl $0x28, %edx
callq 0x10d0