// File: dsharlet[P]array/test/array_lifetime.cpp
// Function: nda::test_array_copy_init_lifetime_body()
TEST(array_copy_init_lifetime) {
  movable_custom_alloc::reset_lifetime_counters();
  immovable_custom_alloc::reset_lifetime_counters();
  test_copy_init_lifetime<std_alloc>();
  test_copy_init_lifetime<movable_custom_alloc>();
  test_copy_init_lifetime<immovable_custom_alloc>();
  test_copy_init_lifetime<auto_alloc_big>();
  test_copy_init_lifetime<auto_alloc_small>();
  ASSERT_EQ(movable_custom_alloc::constructs, 1);
  ASSERT_EQ(immovable_custom_alloc::constructs, 1);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x420, %rsp            # imm = 0x420
callq 0x580d0
callq 0x580f0
callq 0x5b000
callq 0x5b4b0
callq 0x5b960
callq 0x5be10
callq 0x5c300
movq 0x246c43(%rip), %rax    # 0x2922c8
subq $0x1, %rax
sete %al
movb %al, -0x389(%rbp)
leaq -0x1b1(%rbp), %rdi
movq %rdi, -0x388(%rbp)
callq 0x33b0
movq -0x388(%rbp), %rdx
leaq 0x195f33(%rip), %rsi    # 0x1e15e6
leaq -0x1b0(%rbp), %rdi
callq 0x10a90
jmp 0x4b6c1
movb -0x389(%rbp), %al
movzbl %al, %esi
andl $0x1, %esi
leaq -0x190(%rbp), %rdi
leaq -0x1b0(%rbp), %rdx
callq 0x10f80
jmp 0x4b6e2
leaq 0x1910fc(%rip), %rsi    # 0x1dc7e5
leaq -0x190(%rbp), %rdi
callq 0x34320
movq %rax, -0x398(%rbp)
jmp 0x4b6fe
movq -0x398(%rbp), %rdi
leaq 0x195f02(%rip), %rsi    # 0x1e160e
callq 0x59840
movq %rax, -0x3a0(%rbp)
jmp 0x4b71a
movq -0x3a0(%rbp), %rdi
leaq 0x195084(%rip), %rsi    # 0x1e07ac
callq 0x34320
movq %rax, -0x3a8(%rbp)
jmp 0x4b736
movq -0x3a8(%rbp), %rdi
leaq 0x246b84(%rip), %rsi    # 0x2922c8
callq 0x355c0
movq %rax, -0x3b0(%rbp)
jmp 0x4b752
movq -0x3b0(%rbp), %rdi
leaq 0x191085(%rip), %rsi    # 0x1dc7e5
callq 0x34320
movq %rax, -0x3b8(%rbp)
jmp 0x4b76e
movq -0x3b8(%rbp), %rdi
leaq 0x1988f1(%rip), %rsi    # 0x1e406d
callq 0x34320
movq %rax, -0x3c0(%rbp)
jmp 0x4b78a
movq -0x3c0(%rbp), %rdi
leaq 0x195014(%rip), %rsi    # 0x1e07ac
callq 0x34320
movq %rax, -0x3c8(%rbp)
jmp 0x4b7a6
movq -0x3c8(%rbp), %rdi
movl $0x1, -0x1c8(%rbp)
leaq -0x1c8(%rbp), %rsi
callq 0x343a0
movq %rax, -0x3d0(%rbp)
jmp 0x4b7cc
movq -0x3d0(%rbp), %rdi
leaq 0x1aaca1(%rip), %rsi    # 0x1f647b
callq 0x34320
jmp 0x4b7e1
leaq -0x190(%rbp), %rdi
callq 0x10ff0
jmp 0x4b7ef
leaq -0x1b0(%rbp), %rdi
callq 0x3100
leaq -0x1b1(%rbp), %rdi
callq 0x3290
movq 0x246ac2(%rip), %rax    # 0x2922d0
subq $0x1, %rax
sete %al
movb %al, -0x3d9(%rbp)
leaq -0x379(%rbp), %rdi
movq %rdi, -0x3d8(%rbp)
callq 0x33b0
movq -0x3d8(%rbp), %rdx
leaq 0x195da8(%rip), %rsi    # 0x1e15e4
leaq -0x378(%rbp), %rdi
callq 0x10a90
jmp 0x4b84a
movb -0x3d9(%rbp), %al
movzbl %al, %esi
andl $0x1, %esi
leaq -0x358(%rbp), %rdi
leaq -0x378(%rbp), %rdx
callq 0x10f80
jmp 0x4b86b
leaq 0x190f73(%rip), %rsi    # 0x1dc7e5
leaq -0x358(%rbp), %rdi
callq 0x34320
movq %rax, -0x3e8(%rbp)
jmp 0x4b887
movq -0x3e8(%rbp), %rdi
leaq 0x195d77(%rip), %rsi    # 0x1e160c
callq 0x59880
movq %rax, -0x3f0(%rbp)
jmp 0x4b8a3
movq -0x3f0(%rbp), %rdi
leaq 0x194efb(%rip), %rsi    # 0x1e07ac
callq 0x34320
movq %rax, -0x3f8(%rbp)
jmp 0x4b8bf
movq -0x3f8(%rbp), %rdi
leaq 0x246a03(%rip), %rsi    # 0x2922d0
callq 0x355c0
movq %rax, -0x400(%rbp)
jmp 0x4b8db
movq -0x400(%rbp), %rdi
leaq 0x190efc(%rip), %rsi    # 0x1dc7e5
callq 0x34320
movq %rax, -0x408(%rbp)
jmp 0x4b8f7
movq -0x408(%rbp), %rdi
leaq 0x198768(%rip), %rsi    # 0x1e406d
callq 0x34320
movq %rax, -0x410(%rbp)
jmp 0x4b913
movq -0x410(%rbp), %rdi
leaq 0x194e8b(%rip), %rsi    # 0x1e07ac
callq 0x34320
movq %rax, -0x418(%rbp)
jmp 0x4b92f
movq -0x418(%rbp), %rdi
movl $0x1, -0x380(%rbp)
leaq -0x380(%rbp), %rsi
callq 0x343a0
movq %rax, -0x420(%rbp)
jmp 0x4b955
movq -0x420(%rbp), %rdi
leaq 0x1aab18(%rip), %rsi    # 0x1f647b
callq 0x34320
jmp 0x4b96a
leaq -0x358(%rbp), %rdi
callq 0x10ff0
jmp 0x4b978
leaq -0x378(%rbp), %rdi
callq 0x3100
leaq -0x379(%rbp), %rdi
callq 0x3290
addq $0x420, %rsp            # imm = 0x420
popq %rbp
retq
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x1c0(%rbp)
movl %eax, -0x1c4(%rbp)
jmp 0x4b9ef
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x1c0(%rbp)
movl %eax, -0x1c4(%rbp)
jmp 0x4b9e3
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x1c0(%rbp)
movl %eax, -0x1c4(%rbp)
leaq -0x190(%rbp), %rdi
callq 0x10ff0
jmp 0x4b9e1
jmp 0x4b9e3
leaq -0x1b0(%rbp), %rdi
callq 0x3100
leaq -0x1b1(%rbp), %rdi
callq 0x3290
jmp 0x4ba5f
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x1c0(%rbp)
movl %eax, -0x1c4(%rbp)
jmp 0x4ba53
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x1c0(%rbp)
movl %eax, -0x1c4(%rbp)
jmp 0x4ba47
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x1c0(%rbp)
movl %eax, -0x1c4(%rbp)
leaq -0x358(%rbp), %rdi
callq 0x10ff0
jmp 0x4ba45
jmp 0x4ba47
leaq -0x378(%rbp), %rdi
callq 0x3100
leaq -0x379(%rbp), %rdi
callq 0x3290
movq -0x1c0(%rbp), %rdi
callq 0x33a0
movq %rax, %rdi
callq 0x116d0
nopw %cs:(%rax,%rax)