// File: /workspace/github_cpp_makefile_star2_O3/dsharlet[P]array/test/array_lifetime.cpp
// Function: void nda::test_copy_lifetime<nda::auto_allocator<nda::lifetime_counter, 256ul, 1ul, std::allocator<nda::lifetime_counter>>>()
void test_copy_lifetime() {
  lifetime_array<Alloc> source(lifetime_shape);
  lifetime_counter::reset();
  { lifetime_array<Alloc> copy(source); }
  ASSERT_EQ(lifetime_counter::copy_constructs, lifetime_shape.size());
  ASSERT_EQ(lifetime_counter::destructs, lifetime_shape.size());
  
  lifetime_counter::reset();
  {
    lifetime_array<Alloc> dest(lifetime_subshape);
    copy(source, dest);
  }
  ASSERT_EQ(lifetime_counter::copy_assigns, lifetime_subshape.size());
  ASSERT_EQ(lifetime_counter::destructs, lifetime_subshape.size());
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x358, %rsp            # imm = 0x358
xorl %r14d, %r14d
leaq 0x208(%rsp), %rbx
movb %r14b, 0x100(%rbx)
xorps %xmm0, %xmm0
movups %xmm0, 0x108(%rbx)
movq %r14, 0x118(%rbx)
movups 0xbf3cd(%rip), %xmm0    # 0xe71e8
movups %xmm0, 0x120(%rbx)
movups 0xbf3cf(%rip), %xmm0    # 0xe71f8
movups %xmm0, 0x130(%rbx)
movups 0xbf3d1(%rip), %xmm0    # 0xe7208
movups %xmm0, 0x140(%rbx)
movq %rbx, %rdi
callq 0x4008a
movq %rbx, %rdi
callq 0x401b0
leaq 0xbf46b(%rip), %rax     # 0xe72c0
movq %r14, (%rax)
leaq 0xbf469(%rip), %rbp     # 0xe72c8
movq %r14, (%rbp)
leaq 0xbf466(%rip), %rax     # 0xe72d0
movq %r14, (%rax)
leaq 0xbf464(%rip), %rax     # 0xe72d8
movq %r14, (%rax)
leaq 0xbf462(%rip), %rax     # 0xe72e0
movq %r14, (%rax)
leaq 0xbf460(%rip), %r15     # 0xe72e8
movq %r14, (%r15)
leaq 0x40(%rsp), %rdi
movb %r14b, 0x100(%rdi)
xorps %xmm0, %xmm0
movups %xmm0, 0x108(%rdi)
movups %xmm0, 0x118(%rdi)
movq %r14, 0x128(%rdi)
movabsq $-0x8000000000000000, %rax # imm = 0x8000000000000000
movq %rax, 0x130(%rdi)
movups %xmm0, 0x138(%rdi)
movq %rax, 0x148(%rdi)
movq %rbx, %rsi
callq 0x4378c
leaq 0x40(%rsp), %rdi
callq 0x402e8
movq (%rbp), %rbx
movq 0xbf31d(%rip), %r12     # 0xe7208
movq 0xbf2fe(%rip), %r13     # 0xe71f0
leaq 0x18(%rsp), %r14
movq %r14, -0x10(%r14)
leaq 0x827d6(%rip), %rsi     # 0xaa6d8
leaq 0x82809(%rip), %rdx     # 0xaa712
leaq 0x8(%rsp), %rdi
callq 0xd14c
imulq %r12, %r13
xorl %eax, %eax
testq %r13, %r13
cmovgq %r13, %rax
xorl %esi, %esi
cmpq %rax, %rbx
sete %sil
leaq 0x40(%rsp), %rdi
leaq 0x8(%rsp), %rdx
callq 0xbf80
leaq 0x7b745(%rip), %rsi     # 0xa3684
leaq 0x40(%rsp), %rdi
callq 0x18fba
leaq 0x827c3(%rip), %rsi     # 0xaa713
movq %rax, %rdi
callq 0x421c0
leaq 0x7f2f7(%rip), %rsi     # 0xa7256
movq %rax, %rdi
callq 0x18fba
movq %rax, %rbx
cmpb $0x1, 0x188(%rax)
jne 0x27f83
movq %rbx, %rdi
addq $0x10, %rdi
movq (%rbp), %rsi
callq 0x2110
leaq 0x7b6fa(%rip), %rsi     # 0xa3684
movq %rbx, %rdi
callq 0x18fba
leaq 0x83e0a(%rip), %rsi     # 0xabda3
movq %rax, %rdi
callq 0x19222
leaq 0x7f2ae(%rip), %rsi     # 0xa7256
movq %rax, %rdi
callq 0x18fba
movq %rax, %rbx
cmpb $0x1, 0x188(%rax)
jne 0x27fe0
movq 0xbf245(%rip), %rax     # 0xe7208
imulq 0xbf225(%rip), %rax     # 0xe71f0
xorl %esi, %esi
testq %rax, %rax
cmovgq %rax, %rsi
movq %rbx, %rdi
addq $0x10, %rdi
callq 0x2110
leaq 0x922b2(%rip), %rsi     # 0xba299
movq %rbx, %rdi
callq 0x18fba
leaq 0x40(%rsp), %rdi
callq 0xbfd8
movq 0x8(%rsp), %rdi
cmpq %r14, %rdi
je 0x28010
movq 0x18(%rsp), %rsi
incq %rsi
callq 0x21f0
movq (%r15), %rbx
movq 0xbf1ee(%rip), %r12     # 0xe7208
movq 0xbf1cf(%rip), %r13     # 0xe71f0
leaq 0x8(%rsp), %rdi
movq %r14, (%rdi)
leaq 0x80050(%rip), %rsi     # 0xa8080
leaq 0x8007d(%rip), %rdx     # 0xa80b4
callq 0xd14c
imulq %r12, %r13
xorl %eax, %eax
testq %r13, %r13
cmovgq %r13, %rax
xorl %esi, %esi
cmpq %rax, %rbx
sete %sil
leaq 0x40(%rsp), %rdi
leaq 0x8(%rsp), %rdx
callq 0xbf80
leaq 0x7b61c(%rip), %rsi     # 0xa3684
leaq 0x40(%rsp), %rdi
callq 0x18fba
leaq 0x8003c(%rip), %rsi     # 0xa80b5
movq %rax, %rdi
callq 0x3f614
leaq 0x7f1ce(%rip), %rsi     # 0xa7256
movq %rax, %rdi
callq 0x18fba
movq %rax, %rbx
cmpb $0x1, 0x188(%rax)
jne 0x280ab
movq %rbx, %rdi
addq $0x10, %rdi
movq (%r15), %rsi
callq 0x2110
leaq 0x7b5d2(%rip), %rsi     # 0xa3684
movq %rbx, %rdi
callq 0x18fba
leaq 0x83ce2(%rip), %rsi     # 0xabda3
movq %rax, %rdi
callq 0x19222
leaq 0x7f186(%rip), %rsi     # 0xa7256
movq %rax, %rdi
callq 0x18fba
movq %rax, %rbx
cmpb $0x1, 0x188(%rax)
jne 0x28108
movq 0xbf11d(%rip), %rax     # 0xe7208
imulq 0xbf0fd(%rip), %rax     # 0xe71f0
xorl %esi, %esi
testq %rax, %rax
cmovgq %rax, %rsi
movq %rbx, %rdi
addq $0x10, %rdi
callq 0x2110
leaq 0x9218a(%rip), %rsi     # 0xba299
movq %rbx, %rdi
callq 0x18fba
leaq 0x40(%rsp), %rdi
callq 0xbfd8
movq 0x8(%rsp), %rdi
cmpq %r14, %rdi
je 0x28138
movq 0x18(%rsp), %rsi
incq %rsi
callq 0x21f0
xorl %eax, %eax
leaq 0xbf17f(%rip), %rcx     # 0xe72c0
movq %rax, (%rcx)
movq %rax, (%rbp)
leaq 0xbf181(%rip), %rcx     # 0xe72d0
movq %rax, (%rcx)
leaq 0xbf17f(%rip), %rbp     # 0xe72d8
movq %rax, (%rbp)
leaq 0xbf17c(%rip), %rcx     # 0xe72e0
movq %rax, (%rcx)
movq %rax, (%r15)
leaq 0x40(%rsp), %rdi
movb $0x0, 0x100(%rdi)
xorps %xmm0, %xmm0
movups %xmm0, 0x108(%rdi)
movq %rax, 0x118(%rdi)
movups 0xbf08a(%rip), %xmm0    # 0xe7218
movups %xmm0, 0x120(%rdi)
movups 0xbf08c(%rip), %xmm0    # 0xe7228
movups %xmm0, 0x130(%rdi)
movups 0xbf08e(%rip), %xmm0    # 0xe7238
movups %xmm0, 0x140(%rdi)
callq 0x4008a
leaq 0x40(%rsp), %rdi
callq 0x401b0
leaq 0x328(%rsp), %rax
leaq 0x160(%rsp), %rcx
movq -0x8(%rax), %rdx
leaq 0x8(%rsp), %rdi
movq %rdx, (%rdi)
movups (%rax), %xmm0
movups 0x10(%rax), %xmm1
movups 0x20(%rax), %xmm2
movups %xmm0, 0x8(%rdi)
movups %xmm1, 0x18(%rdi)
movups %xmm2, 0x28(%rdi)
movq -0x8(%rcx), %rax
leaq 0x1d0(%rsp), %rsi
movq %rax, (%rsi)
movups (%rcx), %xmm0
movups 0x10(%rcx), %xmm1
movups 0x20(%rcx), %xmm2
movups %xmm0, 0x8(%rsi)
movups %xmm1, 0x18(%rsi)
movups %xmm2, 0x28(%rsi)
callq 0x42f45
leaq 0x40(%rsp), %rdi
callq 0x402e8
movq (%rbp), %rbx
movq 0xbf005(%rip), %r12     # 0xe7238
movq 0xbefe6(%rip), %r13     # 0xe7220
leaq 0x8(%rsp), %rdi
movq %r14, (%rdi)
leaq 0x82b1c(%rip), %rsi     # 0xaad65
leaq 0x82b4f(%rip), %rdx     # 0xaad9f
callq 0xd14c
imulq %r12, %r13
xorl %eax, %eax
testq %r13, %r13
cmovgq %r13, %rax
xorl %esi, %esi
cmpq %rax, %rbx
sete %sil
leaq 0x40(%rsp), %rdi
leaq 0x8(%rsp), %rdx
callq 0xbf80
leaq 0x7b403(%rip), %rsi     # 0xa3684
leaq 0x40(%rsp), %rdi
callq 0x18fba
leaq 0x82b0e(%rip), %rsi     # 0xaada0
movq %rax, %rdi
callq 0x3f5a4
leaq 0x7efb5(%rip), %rsi     # 0xa7256
movq %rax, %rdi
callq 0x18fba
movq %rax, %rbx
cmpb $0x1, 0x188(%rax)
jne 0x282c5
movq %rbx, %rdi
addq $0x10, %rdi
movq (%rbp), %rsi
callq 0x2110
leaq 0x7b3b8(%rip), %rsi     # 0xa3684
movq %rbx, %rdi
callq 0x18fba
leaq 0x83be3(%rip), %rsi     # 0xabebe
movq %rax, %rdi
callq 0x42c5e
leaq 0x7ef6c(%rip), %rsi     # 0xa7256
movq %rax, %rdi
callq 0x18fba
movq %rax, %rbx
cmpb $0x1, 0x188(%rax)
jne 0x28322
movq 0xbef33(%rip), %rax     # 0xe7238
imulq 0xbef13(%rip), %rax     # 0xe7220
xorl %esi, %esi
testq %rax, %rax
cmovgq %rax, %rsi
movq %rbx, %rdi
addq $0x10, %rdi
callq 0x2110
leaq 0x91f70(%rip), %rsi     # 0xba299
movq %rbx, %rdi
callq 0x18fba
leaq 0x40(%rsp), %rdi
callq 0xbfd8
movq 0x8(%rsp), %rdi
cmpq %r14, %rdi
je 0x28352
movq 0x18(%rsp), %rsi
incq %rsi
callq 0x21f0
movq (%r15), %rbx
movq 0xbeedc(%rip), %r13     # 0xe7238
movq 0xbeebd(%rip), %r12     # 0xe7220
leaq 0x8(%rsp), %rdi
movq %r14, (%rdi)
leaq 0x82a4d(%rip), %rsi     # 0xaadbf
leaq 0x82a7d(%rip), %rdx     # 0xaadf6
callq 0xd14c
imulq %r13, %r12
xorl %eax, %eax
testq %r12, %r12
cmovgq %r12, %rax
xorl %esi, %esi
cmpq %rax, %rbx
sete %sil
leaq 0x40(%rsp), %rdi
leaq 0x8(%rsp), %rdx
callq 0xbf80
leaq 0x7b2da(%rip), %rsi     # 0xa3684
leaq 0x40(%rsp), %rdi
callq 0x18fba
leaq 0x7fcfa(%rip), %rsi     # 0xa80b5
movq %rax, %rdi
callq 0x3f614
leaq 0x7ee8c(%rip), %rsi     # 0xa7256
movq %rax, %rdi
callq 0x18fba
movq %rax, %rbx
cmpb $0x1, 0x188(%rax)
jne 0x283ed
movq %rbx, %rdi
addq $0x10, %rdi
movq (%r15), %rsi
callq 0x2110
leaq 0x7b290(%rip), %rsi     # 0xa3684
movq %rbx, %rdi
callq 0x18fba
leaq 0x83abb(%rip), %rsi     # 0xabebe
movq %rax, %rdi
callq 0x42c5e
leaq 0x7ee44(%rip), %rsi     # 0xa7256
movq %rax, %rdi
callq 0x18fba
movq %rax, %rbx
cmpb $0x1, 0x188(%rax)
jne 0x2844a
movq 0xbee0b(%rip), %rax     # 0xe7238
imulq 0xbedeb(%rip), %rax     # 0xe7220
xorl %esi, %esi
testq %rax, %rax
cmovgq %rax, %rsi
movq %rbx, %rdi
addq $0x10, %rdi
callq 0x2110
leaq 0x91e48(%rip), %rsi     # 0xba299
movq %rbx, %rdi
callq 0x18fba
leaq 0x40(%rsp), %rdi
callq 0xbfd8
movq 0x8(%rsp), %rdi
cmpq %r14, %rdi
je 0x2847a
movq 0x18(%rsp), %rsi
incq %rsi
callq 0x21f0
leaq 0x208(%rsp), %rdi
callq 0x402e8
addq $0x358, %rsp            # imm = 0x358
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
jmp 0x28546
jmp 0x284d2
jmp 0x284d2
jmp 0x28546
movq %rax, %rbx
leaq 0x40(%rsp), %rdi
callq 0x402e8
jmp 0x2852f
jmp 0x28546
jmp 0x284d2
jmp 0x284d2
jmp 0x28546
jmp 0x284d2
jmp 0x284de
jmp 0x284ed
jmp 0x284fc
jmp 0x2850b
jmp 0x284d9
jmp 0x284d9
movq %rax, %rbx
jmp 0x2852f
jmp 0x284d9
movq %rax, %rbx
jmp 0x28518
movq %rax, %rbx
leaq 0x40(%rsp), %rdi
callq 0xbfd8
jmp 0x28518
movq %rax, %rbx
leaq 0x40(%rsp), %rdi
callq 0xbfd8
jmp 0x28518
movq %rax, %rbx
leaq 0x40(%rsp), %rdi
callq 0xbfd8
jmp 0x28518
movq %rax, %rbx
leaq 0x40(%rsp), %rdi
callq 0xbfd8
movq 0x8(%rsp), %rdi
cmpq %r14, %rdi
je 0x2852f
movq 0x18(%rsp), %rsi
incq %rsi
callq 0x21f0
leaq 0x208(%rsp), %rdi
callq 0x402e8
movq %rbx, %rdi
callq 0x2300
jmp 0x28546
movq %rax, %rdi
callq 0xc0a9