// File: dsharlet[P]array/test/array_lifetime.cpp
// Function: void nda::test_copy_init_lifetime<std::allocator<nda::lifetime_counter>>()
void test_copy_init_lifetime() {
  lifetime_counter::reset();
  { lifetime_array<Alloc> copy_init(lifetime_shape, lifetime_counter()); }
  ASSERT_EQ(lifetime_counter::copy_constructs, lifetime_shape.size());
  ASSERT_EQ(lifetime_counter::destructs, lifetime_shape.size() + 1);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x4b0, %rsp            # imm = 0x4B0
callq 0x7f630
leaq -0x51(%rbp), %rdi
movq %rdi, -0x3f0(%rbp)
callq 0x7fd00
movq -0x3f0(%rbp), %rdx
leaq 0x23722a(%rip), %rsi    # 0x292258
leaq -0x50(%rbp), %rdi
callq 0x855b0
jmp 0x5b039
leaq -0x51(%rbp), %rdi
callq 0x7ff40
leaq -0x50(%rbp), %rdi
callq 0x7f870
leaq 0x2372e6(%rip), %rax    # 0x292338
movq (%rax), %rax
movq %rax, -0x408(%rbp)
leaq 0x2371f5(%rip), %rdi    # 0x292258
callq 0x1a900
movq %rax, %rcx
movq -0x408(%rbp), %rax
subq %rcx, %rax
sete %al
movb %al, -0x3f9(%rbp)
leaq -0x219(%rbp), %rdi
movq %rdi, -0x3f8(%rbp)
callq 0x33b0
movq -0x3f8(%rbp), %rdx
leaq 0x188f3a(%rip), %rsi    # 0x1e3fd9
leaq -0x218(%rbp), %rdi
callq 0x10a90
jmp 0x5b0ad
movb -0x3f9(%rbp), %al
movzbl %al, %esi
andl $0x1, %esi
leaq -0x1f8(%rbp), %rdi
leaq -0x218(%rbp), %rdx
callq 0x10f80
jmp 0x5b0ce
leaq 0x181710(%rip), %rsi    # 0x1dc7e5
leaq -0x1f8(%rbp), %rdi
callq 0x34320
movq %rax, -0x410(%rbp)
jmp 0x5b0ea
movq -0x410(%rbp), %rdi
leaq 0x188f1c(%rip), %rsi    # 0x1e4014
callq 0x85630
movq %rax, -0x418(%rbp)
jmp 0x5b106
movq -0x418(%rbp), %rdi
leaq 0x185698(%rip), %rsi    # 0x1e07ac
callq 0x34320
movq %rax, -0x420(%rbp)
jmp 0x5b122
movq -0x420(%rbp), %rdi
leaq 0x237208(%rip), %rsi    # 0x292338
callq 0x355c0
movq %rax, -0x428(%rbp)
jmp 0x5b13e
movq -0x428(%rbp), %rdi
leaq 0x181699(%rip), %rsi    # 0x1dc7e5
callq 0x34320
movq %rax, -0x430(%rbp)
jmp 0x5b15a
movq -0x430(%rbp), %rdi
leaq 0x18a53c(%rip), %rsi    # 0x1e56a4
callq 0x34ba0
movq %rax, -0x438(%rbp)
jmp 0x5b176
movq -0x438(%rbp), %rdi
leaq 0x185628(%rip), %rsi    # 0x1e07ac
callq 0x34320
movq %rax, -0x440(%rbp)
jmp 0x5b192
leaq 0x2370bf(%rip), %rdi    # 0x292258
callq 0x1a900
movq %rax, -0x448(%rbp)
jmp 0x5b1a7
movq -0x440(%rbp), %rdi
movq -0x448(%rbp), %rax
movq %rax, -0x228(%rbp)
leaq -0x228(%rbp), %rsi
callq 0x355c0
movq %rax, -0x450(%rbp)
jmp 0x5b1d1
movq -0x450(%rbp), %rdi
leaq 0x19b29c(%rip), %rsi    # 0x1f647b
callq 0x34320
jmp 0x5b1e6
leaq -0x1f8(%rbp), %rdi
callq 0x10ff0
jmp 0x5b1f4
leaq -0x218(%rbp), %rdi
callq 0x3100
leaq -0x219(%rbp), %rdi
callq 0x3290
leaq 0x237145(%rip), %rax    # 0x292358
movq (%rax), %rax
movq %rax, -0x468(%rbp)
leaq 0x237034(%rip), %rdi    # 0x292258
callq 0x1a900
movq %rax, %rcx
movq -0x468(%rbp), %rax
incq %rcx
subq %rcx, %rax
sete %al
movb %al, -0x459(%rbp)
leaq -0x3d9(%rbp), %rdi
movq %rdi, -0x458(%rbp)
callq 0x33b0
movq -0x458(%rbp), %rdx
leaq 0x188dd3(%rip), %rsi    # 0x1e4036
leaq -0x3d8(%rbp), %rdi
callq 0x10a90
jmp 0x5b271
movb -0x459(%rbp), %al
movzbl %al, %esi
andl $0x1, %esi
leaq -0x3b8(%rbp), %rdi
leaq -0x3d8(%rbp), %rdx
callq 0x10f80
jmp 0x5b292
leaq 0x18154c(%rip), %rsi    # 0x1dc7e5
leaq -0x3b8(%rbp), %rdi
callq 0x34320
movq %rax, -0x470(%rbp)
jmp 0x5b2ae
movq -0x470(%rbp), %rdi
leaq 0x186622(%rip), %rsi    # 0x1e18de
callq 0x7f8f0
movq %rax, -0x478(%rbp)
jmp 0x5b2ca
movq -0x478(%rbp), %rdi
leaq 0x1854d4(%rip), %rsi    # 0x1e07ac
callq 0x34320
movq %rax, -0x480(%rbp)
jmp 0x5b2e6
movq -0x480(%rbp), %rdi
leaq 0x237064(%rip), %rsi    # 0x292358
callq 0x355c0
movq %rax, -0x488(%rbp)
jmp 0x5b302
movq -0x488(%rbp), %rdi
leaq 0x1814d5(%rip), %rsi    # 0x1dc7e5
callq 0x34320
movq %rax, -0x490(%rbp)
jmp 0x5b31e
movq -0x490(%rbp), %rdi
leaq 0x188d29(%rip), %rsi    # 0x1e4055
callq 0x85670
movq %rax, -0x498(%rbp)
jmp 0x5b33a
movq -0x498(%rbp), %rdi
leaq 0x185464(%rip), %rsi    # 0x1e07ac
callq 0x34320
movq %rax, -0x4a0(%rbp)
jmp 0x5b356
leaq 0x236efb(%rip), %rdi    # 0x292258
callq 0x1a900
movq %rax, -0x4a8(%rbp)
jmp 0x5b36b
movq -0x4a0(%rbp), %rdi
movq -0x4a8(%rbp), %rax
incq %rax
movq %rax, -0x3e8(%rbp)
leaq -0x3e8(%rbp), %rsi
callq 0x355c0
movq %rax, -0x4b0(%rbp)
jmp 0x5b398
movq -0x4b0(%rbp), %rdi
leaq 0x19b0d5(%rip), %rsi    # 0x1f647b
callq 0x34320
jmp 0x5b3ad
leaq -0x3b8(%rbp), %rdi
callq 0x10ff0
jmp 0x5b3bb
leaq -0x3d8(%rbp), %rdi
callq 0x3100
leaq -0x3d9(%rbp), %rdi
callq 0x3290
addq $0x4b0, %rsp            # imm = 0x4B0
popq %rbp
retq
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x60(%rbp)
movl %eax, -0x64(%rbp)
leaq -0x51(%rbp), %rdi
callq 0x7ff40
jmp 0x5b498
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x60(%rbp)
movl %eax, -0x64(%rbp)
jmp 0x5b43a
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x60(%rbp)
movl %eax, -0x64(%rbp)
jmp 0x5b42e
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x60(%rbp)
movl %eax, -0x64(%rbp)
leaq -0x1f8(%rbp), %rdi
callq 0x10ff0
jmp 0x5b42c
jmp 0x5b42e
leaq -0x218(%rbp), %rdi
callq 0x3100
leaq -0x219(%rbp), %rdi
callq 0x3290
jmp 0x5b498
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x60(%rbp)
movl %eax, -0x64(%rbp)
jmp 0x5b48c
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x60(%rbp)
movl %eax, -0x64(%rbp)
jmp 0x5b480
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x60(%rbp)
movl %eax, -0x64(%rbp)
leaq -0x3b8(%rbp), %rdi
callq 0x10ff0
jmp 0x5b47e
jmp 0x5b480
leaq -0x3d8(%rbp), %rdi
callq 0x3100
leaq -0x3d9(%rbp), %rdi
callq 0x3290
movq -0x60(%rbp), %rdi
callq 0x33a0
movq %rax, %rdi
callq 0x116d0
nopl (%rax)