// File: /workspace/github_cpp_makefile_star2_O2/dsharlet[P]array/test/array_lifetime.cpp
// Function: void nda::test_copy_lifetime<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 $0x218, %rsp            # imm = 0x218
leaq 0xc570f(%rip), %rsi     # 0xe21e0
leaq 0x1c8(%rsp), %rbx
movq %rbx, %rdi
callq 0x31636
leaq 0xc57d0(%rip), %rax     # 0xe22b8
andq $0x0, (%rax)
leaq 0xc57cd(%rip), %r14     # 0xe22c0
andq $0x0, (%r14)
leaq 0xc57ca(%rip), %rax     # 0xe22c8
andq $0x0, (%rax)
leaq 0xc57c7(%rip), %r15     # 0xe22d0
andq $0x0, (%r15)
leaq 0xc57c4(%rip), %rbp     # 0xe22d8
andq $0x0, (%rbp)
leaq 0xc57c0(%rip), %r12     # 0xe22e0
andq $0x0, (%r12)
leaq 0x38(%rsp), %rdi
movq %rbx, %rsi
callq 0x34c28
leaq 0x38(%rsp), %rdi
callq 0x3166c
movq (%r14), %rbx
movq 0xc56ba(%rip), %r13     # 0xe2200
movq 0xc569b(%rip), %r14     # 0xe21e8
leaq 0x78114(%rip), %rsi     # 0x94c68
leaq 0x18(%rsp), %rdi
leaq 0xf(%rsp), %rdx
callq 0x66a0
imulq %r13, %r14
xorl %eax, %eax
testq %r14, %r14
cmovgq %r14, %rax
xorl %esi, %esi
cmpq %rax, %rbx
sete %sil
leaq 0x38(%rsp), %rdi
leaq 0x18(%rsp), %rdx
callq 0x6894
leaq 0x70ab8(%rip), %rsi     # 0x8d647
leaq 0x38(%rsp), %rdi
callq 0x106fe
leaq 0x78103(%rip), %rsi     # 0x94ca3
movq %rax, %rdi
callq 0x34240
leaq 0x74a43(%rip), %rsi     # 0x915f2
movq %rax, %rdi
callq 0x106fe
leaq 0xc5702(%rip), %r14     # 0xe22c0
movq %rax, %rdi
movq %r14, %rsi
callq 0x11052
leaq 0x70a77(%rip), %rsi     # 0x8d647
movq %rax, %rdi
callq 0x106fe
leaq 0x79754(%rip), %rsi     # 0x96333
movq %rax, %rdi
callq 0x109ea
leaq 0x74a04(%rip), %rsi     # 0x915f2
movq %rax, %rdi
callq 0x106fe
movq 0xc55eb(%rip), %rcx     # 0xe21e8
imulq 0xc55fb(%rip), %rcx     # 0xe2200
xorl %edx, %edx
testq %rcx, %rcx
cmovgq %rcx, %rdx
leaq 0x10(%rsp), %rsi
movq %rdx, (%rsi)
movq %rax, %rdi
callq 0x11052
leaq 0x8867d(%rip), %rsi     # 0xa52a2
movq %rax, %rdi
callq 0x106fe
leaq 0x38(%rsp), %rdi
callq 0x68d4
leaq 0x18(%rsp), %rdi
callq 0x2090
movq (%r12), %rbx
movq 0xc55b4(%rip), %r13     # 0xe2200
movq 0xc5595(%rip), %r12     # 0xe21e8
leaq 0x758de(%rip), %rsi     # 0x92538
leaq 0x18(%rsp), %rdi
leaq 0xf(%rsp), %rdx
callq 0x66a0
imulq %r13, %r12
xorl %eax, %eax
testq %r12, %r12
cmovgq %r12, %rax
xorl %esi, %esi
cmpq %rax, %rbx
sete %sil
leaq 0x38(%rsp), %rdi
leaq 0x18(%rsp), %rdx
callq 0x6894
leaq 0x709b2(%rip), %rsi     # 0x8d647
leaq 0x38(%rsp), %rdi
callq 0x106fe
leaq 0x758c7(%rip), %rsi     # 0x9256d
movq %rax, %rdi
callq 0x31698
leaq 0x7493d(%rip), %rsi     # 0x915f2
movq %rax, %rdi
callq 0x106fe
leaq 0xc561c(%rip), %rbx     # 0xe22e0
movq %rax, %rdi
movq %rbx, %rsi
callq 0x11052
leaq 0x70971(%rip), %rsi     # 0x8d647
movq %rax, %rdi
callq 0x106fe
leaq 0x7964e(%rip), %rsi     # 0x96333
movq %rax, %rdi
callq 0x109ea
leaq 0x748fe(%rip), %rsi     # 0x915f2
movq %rax, %rdi
callq 0x106fe
movq 0xc54e5(%rip), %rcx     # 0xe21e8
imulq 0xc54f5(%rip), %rcx     # 0xe2200
xorl %edx, %edx
testq %rcx, %rcx
cmovgq %rcx, %rdx
leaq 0x10(%rsp), %rsi
movq %rdx, (%rsi)
movq %rax, %rdi
callq 0x11052
leaq 0x88577(%rip), %rsi     # 0xa52a2
movq %rax, %rdi
callq 0x106fe
leaq 0x38(%rsp), %rdi
callq 0x68d4
leaq 0x18(%rsp), %rdi
callq 0x2090
leaq 0xc556a(%rip), %rax     # 0xe22b8
andq $0x0, (%rax)
andq $0x0, (%r14)
leaq 0xc556b(%rip), %rax     # 0xe22c8
andq $0x0, (%rax)
andq $0x0, (%r15)
andq $0x0, (%rbp)
andq $0x0, (%rbx)
leaq 0xc549b(%rip), %rsi     # 0xe2210
leaq 0x38(%rsp), %rdi
callq 0x31636
leaq 0x1c8(%rsp), %rdi
leaq 0x38(%rsp), %rsi
callq 0x34c53
leaq 0x38(%rsp), %rdi
callq 0x3166c
movq (%r15), %r14
movq 0xc548b(%rip), %r12     # 0xe2230
movq 0xc546c(%rip), %r15     # 0xe2218
leaq 0x78542(%rip), %rsi     # 0x952f5
leaq 0x18(%rsp), %rdi
leaq 0xf(%rsp), %rdx
callq 0x66a0
imulq %r12, %r15
xorl %eax, %eax
testq %r15, %r15
cmovgq %r15, %rax
xorl %esi, %esi
cmpq %rax, %r14
sete %sil
leaq 0x38(%rsp), %rdi
leaq 0x18(%rsp), %rdx
callq 0x6894
leaq 0x70859(%rip), %rsi     # 0x8d647
leaq 0x38(%rsp), %rdi
callq 0x106fe
leaq 0x78531(%rip), %rsi     # 0x95330
movq %rax, %rdi
callq 0x3160a
leaq 0x747e4(%rip), %rsi     # 0x915f2
movq %rax, %rdi
callq 0x106fe
leaq 0xc54b3(%rip), %rsi     # 0xe22d0
movq %rax, %rdi
callq 0x11052
leaq 0x7081b(%rip), %rsi     # 0x8d647
movq %rax, %rdi
callq 0x106fe
leaq 0x79613(%rip), %rsi     # 0x9644e
movq %rax, %rdi
callq 0x34cb0
leaq 0x747a8(%rip), %rsi     # 0x915f2
movq %rax, %rdi
callq 0x106fe
movq 0xc53bf(%rip), %rcx     # 0xe2218
imulq 0xc53cf(%rip), %rcx     # 0xe2230
xorl %edx, %edx
testq %rcx, %rcx
cmovgq %rcx, %rdx
leaq 0x10(%rsp), %rsi
movq %rdx, (%rsi)
movq %rax, %rdi
callq 0x11052
leaq 0x88421(%rip), %rsi     # 0xa52a2
movq %rax, %rdi
callq 0x106fe
leaq 0x38(%rsp), %rdi
callq 0x68d4
leaq 0x18(%rsp), %rdi
callq 0x2090
movq (%rbx), %rbx
movq 0xc5389(%rip), %r15     # 0xe2230
movq 0xc536a(%rip), %r14     # 0xe2218
leaq 0x7849a(%rip), %rsi     # 0x9534f
leaq 0x18(%rsp), %rdi
leaq 0xf(%rsp), %rdx
callq 0x66a0
imulq %r15, %r14
xorl %eax, %eax
testq %r14, %r14
cmovgq %r14, %rax
xorl %esi, %esi
cmpq %rax, %rbx
sete %sil
leaq 0x38(%rsp), %rdi
leaq 0x18(%rsp), %rdx
callq 0x6894
leaq 0x70757(%rip), %rsi     # 0x8d647
leaq 0x38(%rsp), %rdi
callq 0x106fe
leaq 0x7566c(%rip), %rsi     # 0x9256d
movq %rax, %rdi
callq 0x31698
leaq 0x746e2(%rip), %rsi     # 0x915f2
movq %rax, %rdi
callq 0x106fe
leaq 0xc53c1(%rip), %rsi     # 0xe22e0
movq %rax, %rdi
callq 0x11052
leaq 0x70719(%rip), %rsi     # 0x8d647
movq %rax, %rdi
callq 0x106fe
leaq 0x79511(%rip), %rsi     # 0x9644e
movq %rax, %rdi
callq 0x34cb0
leaq 0x746a6(%rip), %rsi     # 0x915f2
movq %rax, %rdi
callq 0x106fe
movq 0xc52bd(%rip), %rcx     # 0xe2218
imulq 0xc52cd(%rip), %rcx     # 0xe2230
xorl %edx, %edx
testq %rcx, %rcx
cmovgq %rcx, %rdx
leaq 0x10(%rsp), %rsi
movq %rdx, (%rsi)
movq %rax, %rdi
callq 0x11052
leaq 0x8831f(%rip), %rsi     # 0xa52a2
movq %rax, %rdi
callq 0x106fe
leaq 0x38(%rsp), %rdi
callq 0x68d4
leaq 0x18(%rsp), %rdi
callq 0x2090
leaq 0x1c8(%rsp), %rdi
callq 0x3166c
addq $0x218, %rsp            # imm = 0x218
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
jmp 0x1cfd7
jmp 0x1cfd7
movq %rax, %rbx
leaq 0x38(%rsp), %rdi
callq 0x3166c
jmp 0x1d033
jmp 0x1cfd7
jmp 0x1cfd7
jmp 0x1cfd7
movq %rax, %rbx
jmp 0x1d033
jmp 0x1cfef
jmp 0x1cfea
jmp 0x1cffe
jmp 0x1cfea
jmp 0x1d00d
jmp 0x1cfea
jmp 0x1d01c
movq %rax, %rbx
jmp 0x1d029
movq %rax, %rbx
leaq 0x38(%rsp), %rdi
callq 0x68d4
jmp 0x1d029
movq %rax, %rbx
leaq 0x38(%rsp), %rdi
callq 0x68d4
jmp 0x1d029
movq %rax, %rbx
leaq 0x38(%rsp), %rdi
callq 0x68d4
jmp 0x1d029
movq %rax, %rbx
leaq 0x38(%rsp), %rdi
callq 0x68d4
leaq 0x18(%rsp), %rdi
callq 0x2090
leaq 0x1c8(%rsp), %rdi
callq 0x3166c
movq %rbx, %rdi
callq 0x22f0
movq %rax, %rdi
callq 0x6bba