// File: /workspace/github_cpp_makefile_star2_O1/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 0xbddce(%rip), %xmm0    # 0xe51e8
movups %xmm0, 0x120(%rbx)
movups 0xbddd0(%rip), %xmm0    # 0xe51f8
movups %xmm0, 0x130(%rbx)
movups 0xbddd2(%rip), %xmm0    # 0xe5208
movups %xmm0, 0x140(%rbx)
movq %rbx, %rdi
callq 0x3f6ba
movq %rbx, %rdi
callq 0x3f7be
leaq 0xbde6c(%rip), %rax     # 0xe52c0
movq %r14, (%rax)
leaq 0xbde6a(%rip), %rbp     # 0xe52c8
movq %r14, (%rbp)
leaq 0xbde67(%rip), %rax     # 0xe52d0
movq %r14, (%rax)
leaq 0xbde65(%rip), %rax     # 0xe52d8
movq %r14, (%rax)
leaq 0xbde63(%rip), %rax     # 0xe52e0
movq %r14, (%rax)
leaq 0xbde61(%rip), %r15     # 0xe52e8
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 0x42d1a
leaq 0x40(%rsp), %rdi
callq 0x3f8f6
movq (%rbp), %rbx
movq 0xbdd1e(%rip), %r12     # 0xe5208
movq 0xbdcff(%rip), %r13     # 0xe51f0
leaq 0x18(%rsp), %r14
movq %r14, -0x10(%r14)
leaq 0x813c7(%rip), %rsi     # 0xa88c8
leaq 0x813fa(%rip), %rdx     # 0xa8902
leaq 0x8(%rsp), %rdi
callq 0xd0b8
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 0xbf0a
leaq 0x7a116(%rip), %rsi     # 0xa1654
leaq 0x40(%rsp), %rdi
callq 0x18a16
leaq 0x813b4(%rip), %rsi     # 0xa8903
movq %rax, %rdi
callq 0x4174e
leaq 0x7ddcc(%rip), %rsi     # 0xa532a
movq %rax, %rdi
callq 0x18a16
movq %rax, %rbx
cmpb $0x1, 0x188(%rax)
jne 0x27582
movq %rbx, %rdi
addq $0x10, %rdi
movq (%rbp), %rsi
callq 0x2110
leaq 0x7a0cb(%rip), %rsi     # 0xa1654
movq %rbx, %rdi
callq 0x18a16
leaq 0x829fb(%rip), %rsi     # 0xa9f93
movq %rax, %rdi
callq 0x18c7e
leaq 0x7dd83(%rip), %rsi     # 0xa532a
movq %rax, %rdi
callq 0x18a16
movq %rax, %rbx
cmpb $0x1, 0x188(%rax)
jne 0x275df
movq 0xbdc46(%rip), %rax     # 0xe5208
imulq 0xbdc26(%rip), %rax     # 0xe51f0
xorl %esi, %esi
testq %rax, %rax
cmovgq %rax, %rsi
movq %rbx, %rdi
addq $0x10, %rdi
callq 0x2110
leaq 0x90d83(%rip), %rsi     # 0xb8369
movq %rbx, %rdi
callq 0x18a16
leaq 0x40(%rsp), %rdi
callq 0xbf62
movq 0x8(%rsp), %rdi
cmpq %r14, %rdi
je 0x2760f
movq 0x18(%rsp), %rsi
incq %rsi
callq 0x21f0
movq (%r15), %rbx
movq 0xbdbef(%rip), %r12     # 0xe5208
movq 0xbdbd0(%rip), %r13     # 0xe51f0
leaq 0x8(%rsp), %rdi
movq %r14, (%rdi)
leaq 0x7ec41(%rip), %rsi     # 0xa6270
leaq 0x7ec6e(%rip), %rdx     # 0xa62a4
callq 0xd0b8
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 0xbf0a
leaq 0x79fed(%rip), %rsi     # 0xa1654
leaq 0x40(%rsp), %rdi
callq 0x18a16
leaq 0x7ec2d(%rip), %rsi     # 0xa62a5
movq %rax, %rdi
callq 0x3ec6a
leaq 0x7dca3(%rip), %rsi     # 0xa532a
movq %rax, %rdi
callq 0x18a16
movq %rax, %rbx
cmpb $0x1, 0x188(%rax)
jne 0x276aa
movq %rbx, %rdi
addq $0x10, %rdi
movq (%r15), %rsi
callq 0x2110
leaq 0x79fa3(%rip), %rsi     # 0xa1654
movq %rbx, %rdi
callq 0x18a16
leaq 0x828d3(%rip), %rsi     # 0xa9f93
movq %rax, %rdi
callq 0x18c7e
leaq 0x7dc5b(%rip), %rsi     # 0xa532a
movq %rax, %rdi
callq 0x18a16
movq %rax, %rbx
cmpb $0x1, 0x188(%rax)
jne 0x27707
movq 0xbdb1e(%rip), %rax     # 0xe5208
imulq 0xbdafe(%rip), %rax     # 0xe51f0
xorl %esi, %esi
testq %rax, %rax
cmovgq %rax, %rsi
movq %rbx, %rdi
addq $0x10, %rdi
callq 0x2110
leaq 0x90c5b(%rip), %rsi     # 0xb8369
movq %rbx, %rdi
callq 0x18a16
leaq 0x40(%rsp), %rdi
callq 0xbf62
movq 0x8(%rsp), %rdi
cmpq %r14, %rdi
je 0x27737
movq 0x18(%rsp), %rsi
incq %rsi
callq 0x21f0
xorl %eax, %eax
leaq 0xbdb80(%rip), %rcx     # 0xe52c0
movq %rax, (%rcx)
movq %rax, (%rbp)
leaq 0xbdb82(%rip), %rcx     # 0xe52d0
movq %rax, (%rcx)
leaq 0xbdb80(%rip), %rbp     # 0xe52d8
movq %rax, (%rbp)
leaq 0xbdb7d(%rip), %rcx     # 0xe52e0
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 0xbda8b(%rip), %xmm0    # 0xe5218
movups %xmm0, 0x120(%rdi)
movups 0xbda8d(%rip), %xmm0    # 0xe5228
movups %xmm0, 0x130(%rdi)
movups 0xbda8f(%rip), %xmm0    # 0xe5238
movups %xmm0, 0x140(%rdi)
callq 0x3f6ba
leaq 0x40(%rsp), %rdi
callq 0x3f7be
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 0x424d3
leaq 0x40(%rsp), %rdi
callq 0x3f8f6
movq (%rbp), %rbx
movq 0xbda06(%rip), %r12     # 0xe5238
movq 0xbd9e7(%rip), %r13     # 0xe5220
leaq 0x8(%rsp), %rdi
movq %r14, (%rdi)
leaq 0x8170d(%rip), %rsi     # 0xa8f55
leaq 0x81740(%rip), %rdx     # 0xa8f8f
callq 0xd0b8
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 0xbf0a
leaq 0x79dd4(%rip), %rsi     # 0xa1654
leaq 0x40(%rsp), %rdi
callq 0x18a16
leaq 0x816ff(%rip), %rsi     # 0xa8f90
movq %rax, %rdi
callq 0x3ebfa
leaq 0x7da8a(%rip), %rsi     # 0xa532a
movq %rax, %rdi
callq 0x18a16
movq %rax, %rbx
cmpb $0x1, 0x188(%rax)
jne 0x278c4
movq %rbx, %rdi
addq $0x10, %rdi
movq (%rbp), %rsi
callq 0x2110
leaq 0x79d89(%rip), %rsi     # 0xa1654
movq %rbx, %rdi
callq 0x18a16
leaq 0x827d4(%rip), %rsi     # 0xaa0ae
movq %rax, %rdi
callq 0x421ec
leaq 0x7da41(%rip), %rsi     # 0xa532a
movq %rax, %rdi
callq 0x18a16
movq %rax, %rbx
cmpb $0x1, 0x188(%rax)
jne 0x27921
movq 0xbd934(%rip), %rax     # 0xe5238
imulq 0xbd914(%rip), %rax     # 0xe5220
xorl %esi, %esi
testq %rax, %rax
cmovgq %rax, %rsi
movq %rbx, %rdi
addq $0x10, %rdi
callq 0x2110
leaq 0x90a41(%rip), %rsi     # 0xb8369
movq %rbx, %rdi
callq 0x18a16
leaq 0x40(%rsp), %rdi
callq 0xbf62
movq 0x8(%rsp), %rdi
cmpq %r14, %rdi
je 0x27951
movq 0x18(%rsp), %rsi
incq %rsi
callq 0x21f0
movq (%r15), %rbx
movq 0xbd8dd(%rip), %r13     # 0xe5238
movq 0xbd8be(%rip), %r12     # 0xe5220
leaq 0x8(%rsp), %rdi
movq %r14, (%rdi)
leaq 0x8163e(%rip), %rsi     # 0xa8faf
leaq 0x8166e(%rip), %rdx     # 0xa8fe6
callq 0xd0b8
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 0xbf0a
leaq 0x79cab(%rip), %rsi     # 0xa1654
leaq 0x40(%rsp), %rdi
callq 0x18a16
leaq 0x7e8eb(%rip), %rsi     # 0xa62a5
movq %rax, %rdi
callq 0x3ec6a
leaq 0x7d961(%rip), %rsi     # 0xa532a
movq %rax, %rdi
callq 0x18a16
movq %rax, %rbx
cmpb $0x1, 0x188(%rax)
jne 0x279ec
movq %rbx, %rdi
addq $0x10, %rdi
movq (%r15), %rsi
callq 0x2110
leaq 0x79c61(%rip), %rsi     # 0xa1654
movq %rbx, %rdi
callq 0x18a16
leaq 0x826ac(%rip), %rsi     # 0xaa0ae
movq %rax, %rdi
callq 0x421ec
leaq 0x7d919(%rip), %rsi     # 0xa532a
movq %rax, %rdi
callq 0x18a16
movq %rax, %rbx
cmpb $0x1, 0x188(%rax)
jne 0x27a49
movq 0xbd80c(%rip), %rax     # 0xe5238
imulq 0xbd7ec(%rip), %rax     # 0xe5220
xorl %esi, %esi
testq %rax, %rax
cmovgq %rax, %rsi
movq %rbx, %rdi
addq $0x10, %rdi
callq 0x2110
leaq 0x90919(%rip), %rsi     # 0xb8369
movq %rbx, %rdi
callq 0x18a16
leaq 0x40(%rsp), %rdi
callq 0xbf62
movq 0x8(%rsp), %rdi
cmpq %r14, %rdi
je 0x27a79
movq 0x18(%rsp), %rsi
incq %rsi
callq 0x21f0
leaq 0x208(%rsp), %rdi
callq 0x3f8f6
addq $0x358, %rsp            # imm = 0x358
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
jmp 0x27b45
jmp 0x27ad1
jmp 0x27ad1
jmp 0x27b45
movq %rax, %rbx
leaq 0x40(%rsp), %rdi
callq 0x3f8f6
jmp 0x27b2e
jmp 0x27b45
jmp 0x27ad1
jmp 0x27ad1
jmp 0x27b45
jmp 0x27ad1
jmp 0x27add
jmp 0x27aec
jmp 0x27afb
jmp 0x27b0a
jmp 0x27ad8
jmp 0x27ad8
movq %rax, %rbx
jmp 0x27b2e
jmp 0x27ad8
movq %rax, %rbx
jmp 0x27b17
movq %rax, %rbx
leaq 0x40(%rsp), %rdi
callq 0xbf62
jmp 0x27b17
movq %rax, %rbx
leaq 0x40(%rsp), %rdi
callq 0xbf62
jmp 0x27b17
movq %rax, %rbx
leaq 0x40(%rsp), %rdi
callq 0xbf62
jmp 0x27b17
movq %rax, %rbx
leaq 0x40(%rsp), %rdi
callq 0xbf62
movq 0x8(%rsp), %rdi
cmpq %r14, %rdi
je 0x27b2e
movq 0x18(%rsp), %rsi
incq %rsi
callq 0x21f0
leaq 0x208(%rsp), %rdi
callq 0x3f8f6
movq %rbx, %rdi
callq 0x2300
jmp 0x27b45
movq %rax, %rdi
callq 0xc036