// File: dsharlet[P]array/test/array_lifetime.cpp
// Function: nda::test_array_lifetime_leaks_body()
TEST(array_lifetime_leaks) {
  movable_custom_alloc::reset_lifetime_counters();
  immovable_custom_alloc::reset_lifetime_counters();
  test_lifetime_leaks<std_alloc>();
  test_lifetime_leaks<movable_custom_alloc>();
  test_lifetime_leaks<immovable_custom_alloc>();
  test_lifetime_leaks<auto_alloc_big>();
  test_lifetime_leaks<auto_alloc_small>();
  ASSERT_EQ(movable_custom_alloc::constructs, 13);
  ASSERT_EQ(immovable_custom_alloc::constructs, 13);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x420, %rsp            # imm = 0x420
callq 0x580d0
callq 0x580f0
callq 0x7cd30
callq 0x7d560
callq 0x7dd90
callq 0x7e5c0
callq 0x7ee00
movq 0x244493(%rip), %rax    # 0x2922c8
subq $0xd, %rax
sete %al
movb %al, -0x389(%rbp)
leaq -0x1b1(%rbp), %rdi
movq %rdi, -0x388(%rbp)
callq 0x33b0
movq -0x388(%rbp), %rdx
leaq 0x19397b(%rip), %rsi    # 0x1e17de
leaq -0x1b0(%rbp), %rdi
callq 0x10a90
jmp 0x4de71
movb -0x389(%rbp), %al
movzbl %al, %esi
andl $0x1, %esi
leaq -0x190(%rbp), %rdi
leaq -0x1b0(%rbp), %rdx
callq 0x10f80
jmp 0x4de92
leaq 0x18e94c(%rip), %rsi    # 0x1dc7e5
leaq -0x190(%rbp), %rdi
callq 0x34320
movq %rax, -0x398(%rbp)
jmp 0x4deae
movq -0x398(%rbp), %rdi
leaq 0x193752(%rip), %rsi    # 0x1e160e
callq 0x59840
movq %rax, -0x3a0(%rbp)
jmp 0x4deca
movq -0x3a0(%rbp), %rdi
leaq 0x1928d4(%rip), %rsi    # 0x1e07ac
callq 0x34320
movq %rax, -0x3a8(%rbp)
jmp 0x4dee6
movq -0x3a8(%rbp), %rdi
leaq 0x2443d4(%rip), %rsi    # 0x2922c8
callq 0x355c0
movq %rax, -0x3b0(%rbp)
jmp 0x4df02
movq -0x3b0(%rbp), %rdi
leaq 0x18e8d5(%rip), %rsi    # 0x1dc7e5
callq 0x34320
movq %rax, -0x3b8(%rbp)
jmp 0x4df1e
movq -0x3b8(%rbp), %rdi
leaq 0x19046b(%rip), %rsi    # 0x1de397
callq 0x34840
movq %rax, -0x3c0(%rbp)
jmp 0x4df3a
movq -0x3c0(%rbp), %rdi
leaq 0x192864(%rip), %rsi    # 0x1e07ac
callq 0x34320
movq %rax, -0x3c8(%rbp)
jmp 0x4df56
movq -0x3c8(%rbp), %rdi
movl $0xd, -0x1c8(%rbp)
leaq -0x1c8(%rbp), %rsi
callq 0x343a0
movq %rax, -0x3d0(%rbp)
jmp 0x4df7c
movq -0x3d0(%rbp), %rdi
leaq 0x1a84f1(%rip), %rsi    # 0x1f647b
callq 0x34320
jmp 0x4df91
leaq -0x190(%rbp), %rdi
callq 0x10ff0
jmp 0x4df9f
leaq -0x1b0(%rbp), %rdi
callq 0x3100
leaq -0x1b1(%rbp), %rdi
callq 0x3290
movq 0x244312(%rip), %rax    # 0x2922d0
subq $0xd, %rax
sete %al
movb %al, -0x3d9(%rbp)
leaq -0x379(%rbp), %rdi
movq %rdi, -0x3d8(%rbp)
callq 0x33b0
movq -0x3d8(%rbp), %rdx
leaq 0x1937f0(%rip), %rsi    # 0x1e17dc
leaq -0x378(%rbp), %rdi
callq 0x10a90
jmp 0x4dffa
movb -0x3d9(%rbp), %al
movzbl %al, %esi
andl $0x1, %esi
leaq -0x358(%rbp), %rdi
leaq -0x378(%rbp), %rdx
callq 0x10f80
jmp 0x4e01b
leaq 0x18e7c3(%rip), %rsi    # 0x1dc7e5
leaq -0x358(%rbp), %rdi
callq 0x34320
movq %rax, -0x3e8(%rbp)
jmp 0x4e037
movq -0x3e8(%rbp), %rdi
leaq 0x1935c7(%rip), %rsi    # 0x1e160c
callq 0x59880
movq %rax, -0x3f0(%rbp)
jmp 0x4e053
movq -0x3f0(%rbp), %rdi
leaq 0x19274b(%rip), %rsi    # 0x1e07ac
callq 0x34320
movq %rax, -0x3f8(%rbp)
jmp 0x4e06f
movq -0x3f8(%rbp), %rdi
leaq 0x244253(%rip), %rsi    # 0x2922d0
callq 0x355c0
movq %rax, -0x400(%rbp)
jmp 0x4e08b
movq -0x400(%rbp), %rdi
leaq 0x18e74c(%rip), %rsi    # 0x1dc7e5
callq 0x34320
movq %rax, -0x408(%rbp)
jmp 0x4e0a7
movq -0x408(%rbp), %rdi
leaq 0x1902e2(%rip), %rsi    # 0x1de397
callq 0x34840
movq %rax, -0x410(%rbp)
jmp 0x4e0c3
movq -0x410(%rbp), %rdi
leaq 0x1926db(%rip), %rsi    # 0x1e07ac
callq 0x34320
movq %rax, -0x418(%rbp)
jmp 0x4e0df
movq -0x418(%rbp), %rdi
movl $0xd, -0x380(%rbp)
leaq -0x380(%rbp), %rsi
callq 0x343a0
movq %rax, -0x420(%rbp)
jmp 0x4e105
movq -0x420(%rbp), %rdi
leaq 0x1a8368(%rip), %rsi    # 0x1f647b
callq 0x34320
jmp 0x4e11a
leaq -0x358(%rbp), %rdi
callq 0x10ff0
jmp 0x4e128
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 0x4e19f
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x1c0(%rbp)
movl %eax, -0x1c4(%rbp)
jmp 0x4e193
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x1c0(%rbp)
movl %eax, -0x1c4(%rbp)
leaq -0x190(%rbp), %rdi
callq 0x10ff0
jmp 0x4e191
jmp 0x4e193
leaq -0x1b0(%rbp), %rdi
callq 0x3100
leaq -0x1b1(%rbp), %rdi
callq 0x3290
jmp 0x4e20f
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x1c0(%rbp)
movl %eax, -0x1c4(%rbp)
jmp 0x4e203
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x1c0(%rbp)
movl %eax, -0x1c4(%rbp)
jmp 0x4e1f7
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x1c0(%rbp)
movl %eax, -0x1c4(%rbp)
leaq -0x358(%rbp), %rdi
callq 0x10ff0
jmp 0x4e1f5
jmp 0x4e1f7
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)