// File: /workspace/github_cpp_makefile_star2_O2/dsharlet[P]array/test/array.cpp
// Function: nda::test_array_reshape_1d_body()
TEST(array_reshape_1d) {
  shape_of_rank<1> s({{-1, 9}});
  array_of_rank<int, 1> a(s);
  fill_pattern(a);

  a.reshape({{-3, 12}});
  check_pattern(a(s.x()));
  ASSERT_EQ(a.shape().flat_extent(), 12);

  a.reshape({5});
  check_pattern(a);
  ASSERT_EQ(a.shape().flat_extent(), 5);
}

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
subq $0x250, %rsp            # imm = 0x250
leaq 0x70(%rsp), %rsi
orq $-0x1, (%rsi)
movabsq $-0x8000000000000000, %r14 # imm = 0x8000000000000000
movq $0x9, 0x8(%rsi)
movq %r14, 0x10(%rsi)
leaq 0x10(%rsp), %rbx
movq %rbx, %rdi
callq 0x118e4
movq %rbx, %rdi
xorl %esi, %esi
callq 0x11911
leaq 0xa8(%rsp), %rsi
movq $-0x3, (%rsi)
movq $0xc, 0x8(%rsi)
movq %r14, 0x10(%rsi)
leaq 0x10(%rsp), %rdi
callq 0x1193e
movq 0x28(%rsp), %rax
movq 0x40(%rsp), %rcx
movq 0x70(%rsp), %rdx
subq 0x30(%rsp), %rdx
imulq %rcx, %rdx
testq %rax, %rax
movaps 0x70(%rsp), %xmm0
leaq (%rax,%rdx,4), %rdx
cmoveq %rax, %rdx
leaq 0xc0(%rsp), %rdi
movq %rdx, (%rdi)
movups %xmm0, 0x8(%rdi)
movq %rcx, 0x18(%rdi)
leaq 0x48(%rsp), %rsi
andq $0x0, (%rsi)
callq 0x119e8
movq 0x38(%rsp), %rbx
movq 0x40(%rsp), %r15
leaq 0x80096(%rip), %rsi     # 0x8f46a
leaq 0x48(%rsp), %rdi
leaq 0xb(%rsp), %rdx
callq 0x66a0
movq %r15, %rax
negq %rax
cmovsq %r15, %rax
decq %rbx
imulq %rax, %rbx
xorl %esi, %esi
cmpq $0xb, %rbx
sete %sil
leaq 0xc0(%rsp), %rdi
leaq 0x48(%rsp), %rdx
callq 0x6894
leaq 0x7e230(%rip), %rsi     # 0x8d647
leaq 0xc0(%rsp), %rdi
callq 0x106fe
leaq 0x8005d(%rip), %rsi     # 0x8f488
movq %rax, %rdi
callq 0x11a32
leaq 0x821b8(%rip), %rsi     # 0x915f2
movq %rax, %rdi
callq 0x106fe
movq 0x38(%rsp), %rcx
movq 0x40(%rsp), %rdx
decq %rcx
movq %rdx, %rdi
negq %rdi
cmovsq %rdx, %rdi
imulq %rcx, %rdi
testq %rdi, %rdi
pushq $-0x1
popq %rbx
cmovsq %rbx, %rdi
incq %rdi
leaq 0x68(%rsp), %rsi
movq %rdi, (%rsi)
movq %rax, %rdi
callq 0x11052
leaq 0x7e1c6(%rip), %rsi     # 0x8d647
movq %rax, %rdi
callq 0x106fe
leaq 0x7fff5(%rip), %rsi     # 0x8f485
movq %rax, %rdi
callq 0x10896
leaq 0x82153(%rip), %rsi     # 0x915f2
movq %rax, %rdi
callq 0x106fe
leaq 0xc(%rsp), %rsi
movl $0xc, (%rsi)
movq %rax, %rdi
callq 0x10736
leaq 0x95de1(%rip), %rsi     # 0xa52a2
movq %rax, %rdi
callq 0x106fe
leaq 0xc0(%rsp), %rdi
callq 0x68d4
leaq 0x48(%rsp), %rdi
callq 0x2090
leaq 0x90(%rsp), %rsi
andq $0x0, (%rsi)
movq $0x5, 0x8(%rsi)
movq %r14, 0x10(%rsi)
leaq 0x10(%rsp), %rdi
callq 0x1193e
leaq 0xc0(%rsp), %rsi
andq $0x0, (%rsi)
leaq 0x10(%rsp), %rdi
callq 0x11a4d
movq 0x38(%rsp), %r14
movq 0x40(%rsp), %r15
leaq 0x7ff77(%rip), %rsi     # 0x8f4a0
leaq 0x48(%rsp), %rdi
leaq 0xb(%rsp), %rdx
callq 0x66a0
movq %r15, %rax
negq %rax
cmovsq %r15, %rax
decq %r14
imulq %rax, %r14
xorl %esi, %esi
cmpq $0x4, %r14
sete %sil
leaq 0xc0(%rsp), %rdi
leaq 0x48(%rsp), %rdx
callq 0x6894
leaq 0x7e0db(%rip), %rsi     # 0x8d647
leaq 0xc0(%rsp), %rdi
callq 0x106fe
leaq 0x7ff08(%rip), %rsi     # 0x8f488
movq %rax, %rdi
callq 0x11a32
leaq 0x82063(%rip), %rsi     # 0x915f2
movq %rax, %rdi
callq 0x106fe
movq 0x38(%rsp), %rcx
movq 0x40(%rsp), %rdx
decq %rcx
movq %rdx, %rsi
negq %rsi
cmovsq %rdx, %rsi
imulq %rcx, %rsi
testq %rsi, %rsi
cmovnsq %rsi, %rbx
incq %rbx
leaq 0x68(%rsp), %rsi
movq %rbx, (%rsi)
movq %rax, %rdi
callq 0x11052
leaq 0x7e074(%rip), %rsi     # 0x8d647
movq %rax, %rdi
callq 0x106fe
leaq 0x7ff37(%rip), %rsi     # 0x8f519
movq %rax, %rdi
callq 0x106fe
leaq 0x82001(%rip), %rsi     # 0x915f2
movq %rax, %rdi
callq 0x106fe
leaq 0xc(%rsp), %rsi
movl $0x5, (%rsi)
movq %rax, %rdi
callq 0x10736
leaq 0x95c8f(%rip), %rsi     # 0xa52a2
movq %rax, %rdi
callq 0x106fe
leaq 0xc0(%rsp), %rdi
callq 0x68d4
leaq 0x48(%rsp), %rdi
callq 0x2090
leaq 0x10(%rsp), %rdi
callq 0x11a7a
addq $0x250, %rsp            # imm = 0x250
popq %rbx
popq %r14
popq %r15
retq
jmp 0xf65e
jmp 0xf65e
jmp 0xf65e
jmp 0xf65e
jmp 0xf65e
jmp 0xf667
jmp 0xf659
jmp 0xf679
movq %rax, %rbx
jmp 0xf689
movq %rax, %rbx
jmp 0xf693
jmp 0xf667
jmp 0xf679
movq %rax, %rbx
leaq 0xc0(%rsp), %rdi
callq 0x68d4
jmp 0xf689
movq %rax, %rbx
leaq 0xc0(%rsp), %rdi
callq 0x68d4
leaq 0x48(%rsp), %rdi
callq 0x2090
leaq 0x10(%rsp), %rdi
callq 0x11a7a
movq %rbx, %rdi
callq 0x22f0
movq %rax, %rdi
callq 0x6bba