// File: /workspace/github_cpp_makefile_star2_O1/dsharlet[P]array/test/array_lifetime.cpp
// Function: nda::test_array_reshape_lifetime_body()
TEST(array_reshape_lifetime) {
  movable_custom_alloc::reset_lifetime_counters();
  immovable_custom_alloc::reset_lifetime_counters();
  test_reshape_lifetime<std_alloc>();
  test_reshape_lifetime<movable_custom_alloc>();
  test_reshape_lifetime<immovable_custom_alloc>();
  test_reshape_lifetime<auto_alloc_big>(false);
  test_reshape_lifetime<auto_alloc_small>();
  ASSERT_EQ(movable_custom_alloc::constructs, 2);
  ASSERT_EQ(immovable_custom_alloc::constructs, 2);
}

// Assembly:
pushq %r14
pushq %rbx
subq $0x1b8, %rsp            # imm = 0x1B8
xorl %eax, %eax
movq %rax, 0xc2d86(%rip)     # 0xe5258
movq %rax, 0xc2d8f(%rip)     # 0xe5268
movq %rax, 0xc2d80(%rip)     # 0xe5260
movq %rax, 0xc2d89(%rip)     # 0xe5270
movl $0x1, %edi
callq 0x34d02
movl $0x1, %edi
callq 0x35a4f
movl $0x1, %edi
callq 0x3675b
xorl %edi, %edi
callq 0x37467
movl $0x1, %edi
callq 0x381cb
movq 0xc2d3b(%rip), %rbx     # 0xe5258
leaq 0x18(%rsp), %r14
movq %r14, -0x10(%r14)
leaq 0x83be0(%rip), %rsi     # 0xa610d
leaq 0x83bfe(%rip), %rdx     # 0xa6132
leaq 0x8(%rsp), %rdi
callq 0xd0b8
xorl %esi, %esi
cmpq $0x2, %rbx
sete %sil
leaq 0x28(%rsp), %rdi
leaq 0x8(%rsp), %rdx
callq 0xbf0a
leaq 0x7f0f6(%rip), %rsi     # 0xa1654
leaq 0x28(%rsp), %rdi
callq 0x18a16
leaq 0x83a66(%rip), %rsi     # 0xa5fd5
movq %rax, %rdi
callq 0x23f9c
leaq 0x82dac(%rip), %rsi     # 0xa532a
movq %rax, %rdi
callq 0x18a16
movq %rax, %rbx
cmpb $0x1, 0x188(%rax)
jne 0x225a5
movq %rbx, %rdi
addq $0x10, %rdi
movq 0xc2cb8(%rip), %rsi     # 0xe5258
callq 0x2110
leaq 0x7f0a8(%rip), %rsi     # 0xa1654
movq %rbx, %rdi
callq 0x18a16
leaq 0x87a25(%rip), %rsi     # 0xa9fe0
movq %rax, %rdi
callq 0x18a16
leaq 0x82d60(%rip), %rsi     # 0xa532a
movq %rax, %rdi
callq 0x18a16
movq %rax, %rbx
cmpb $0x1, 0x188(%rax)
jne 0x225ef
movq %rbx, %rdi
addq $0x10, %rdi
movl $0x2, %esi
callq 0x22f0
leaq 0x95d73(%rip), %rsi     # 0xb8369
movq %rbx, %rdi
callq 0x18a16
leaq 0x28(%rsp), %rdi
callq 0xbf62
movq 0x8(%rsp), %rdi
cmpq %r14, %rdi
je 0x2261f
movq 0x18(%rsp), %rsi
incq %rsi
callq 0x21f0
movq 0xc2c3a(%rip), %rbx     # 0xe5260
leaq 0x8(%rsp), %rdi
movq %r14, (%rdi)
leaq 0x83ad6(%rip), %rsi     # 0xa610b
leaq 0x83af6(%rip), %rdx     # 0xa6132
callq 0xd0b8
xorl %esi, %esi
cmpq $0x2, %rbx
sete %sil
leaq 0x28(%rsp), %rdi
leaq 0x8(%rsp), %rdx
callq 0xbf0a
leaq 0x7eff3(%rip), %rsi     # 0xa1654
leaq 0x28(%rsp), %rdi
callq 0x18a16
leaq 0x83961(%rip), %rsi     # 0xa5fd3
movq %rax, %rdi
callq 0x23fd4
leaq 0x82ca9(%rip), %rsi     # 0xa532a
movq %rax, %rdi
callq 0x18a16
movq %rax, %rbx
cmpb $0x1, 0x188(%rax)
jne 0x226a8
movq %rbx, %rdi
addq $0x10, %rdi
movq 0xc2bbd(%rip), %rsi     # 0xe5260
callq 0x2110
leaq 0x7efa5(%rip), %rsi     # 0xa1654
movq %rbx, %rdi
callq 0x18a16
leaq 0x87922(%rip), %rsi     # 0xa9fe0
movq %rax, %rdi
callq 0x18a16
leaq 0x82c5d(%rip), %rsi     # 0xa532a
movq %rax, %rdi
callq 0x18a16
movq %rax, %rbx
cmpb $0x1, 0x188(%rax)
jne 0x226f2
movq %rbx, %rdi
addq $0x10, %rdi
movl $0x2, %esi
callq 0x22f0
leaq 0x95c70(%rip), %rsi     # 0xb8369
movq %rbx, %rdi
callq 0x18a16
leaq 0x28(%rsp), %rdi
callq 0xbf62
movq 0x8(%rsp), %rdi
cmpq %r14, %rdi
je 0x22722
movq 0x18(%rsp), %rsi
incq %rsi
callq 0x21f0
addq $0x1b8, %rsp            # imm = 0x1B8
popq %rbx
popq %r14
retq
jmp 0x2272f
movq %rax, %rbx
jmp 0x22772
jmp 0x2273f
jmp 0x2274e
jmp 0x2273a
movq %rax, %rbx
jmp 0x2275b
movq %rax, %rbx
leaq 0x28(%rsp), %rdi
callq 0xbf62
jmp 0x2275b
movq %rax, %rbx
leaq 0x28(%rsp), %rdi
callq 0xbf62
movq 0x8(%rsp), %rdi
cmpq %r14, %rdi
je 0x22772
movq 0x18(%rsp), %rsi
incq %rsi
callq 0x21f0
movq %rbx, %rdi
callq 0x2300
movq %rax, %rdi
callq 0xc036