// File: /workspace/github_cpp_makefile_star2_O1/dsharlet[P]array/test/array_lifetime.cpp
// Function: void nda::test_swap_lifetime<nda::auto_allocator<nda::lifetime_counter, 256ul, 1ul, std::allocator<nda::lifetime_counter>>>(bool)
void test_swap_lifetime(bool alloc_movable = true) {
  lifetime_array<Alloc> a(lifetime_shape);
  lifetime_array<Alloc> b({static_cast<index_t>(lifetime_shape.size()), 1});
  lifetime_counter::reset();
  swap(a, b);
  if (alloc_movable) {
    ASSERT_EQ(lifetime_counter::constructs(), 0);
    ASSERT_EQ(lifetime_counter::assigns(), 0);
    ASSERT_EQ(lifetime_counter::copies(), 0);
    ASSERT_EQ(lifetime_counter::moves(), 0);
  } else {
    ASSERT_EQ(lifetime_counter::default_constructs, 0);
    ASSERT_EQ(lifetime_counter::copy_constructs, 0);
    ASSERT_EQ(lifetime_counter::moves(), lifetime_shape.size() * 3);
  }
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x458, %rsp            # imm = 0x458
movl %edi, %ebx
xorl %r15d, %r15d
leaq 0x308(%rsp), %r14
movb %r15b, 0x100(%r14)
xorps %xmm0, %xmm0
movups %xmm0, 0x108(%r14)
movq %r15, 0x118(%r14)
movups 0xaa4d8(%rip), %xmm0    # 0xe51e8
movups %xmm0, 0x120(%r14)
movups 0xaa4d9(%rip), %xmm0    # 0xe51f8
movups %xmm0, 0x130(%r14)
movups 0xaa4da(%rip), %xmm0    # 0xe5208
movups %xmm0, 0x140(%r14)
movq %r14, %rdi
callq 0x3f6ba
movq %r14, %rdi
callq 0x3f7be
movq 0xaa4a3(%rip), %rax     # 0xe51f0
imulq 0xaa4b3(%rip), %rax     # 0xe5208
testq %rax, %rax
cmovleq %r15, %rax
leaq 0x1b8(%rsp), %rdi
movb %r15b, 0x100(%rdi)
xorps %xmm0, %xmm0
movups %xmm0, 0x108(%rdi)
movups %xmm0, 0x118(%rdi)
movq $0x1, 0x128(%rdi)
movabsq $-0x8000000000000000, %rcx # imm = 0x8000000000000000
movq %rcx, 0x130(%rdi)
movq %r15, 0x138(%rdi)
movq %rax, 0x140(%rdi)
movq %rcx, 0x148(%rdi)
callq 0x3f6ba
leaq 0x1b8(%rsp), %rdi
callq 0x3f7be
leaq 0xaa4fa(%rip), %r15     # 0xe52c0
xorl %eax, %eax
movq %rax, (%r15)
leaq 0xaa4f6(%rip), %r13     # 0xe52c8
movq %rax, (%r13)
leaq 0xaa4f3(%rip), %rcx     # 0xe52d0
movq %rax, (%rcx)
leaq 0xaa4f1(%rip), %rbp     # 0xe52d8
movq %rax, (%rbp)
leaq 0xaa4ee(%rip), %rcx     # 0xe52e0
movq %rax, (%rcx)
leaq 0xaa4ec(%rip), %rcx     # 0xe52e8
movq %rax, (%rcx)
leaq 0x308(%rsp), %rdi
leaq 0x1b8(%rsp), %rsi
callq 0x45ee0
testb %bl, %bl
je 0x3b26d
movq (%r15), %r12
movq (%r13), %rbx
leaq 0xaa4a6(%rip), %rax     # 0xe52d0
movq (%rax), %r14
leaq 0x18(%rsp), %rax
movq %rax, -0x10(%rax)
leaq 0x6b3ac(%rip), %rsi     # 0xa61e9
leaq 0x6b3c8(%rip), %rdx     # 0xa620c
leaq 0x8(%rsp), %rdi
callq 0xd0b8
addq %r12, %rbx
xorl %esi, %esi
addq %r14, %rbx
sete %sil
leaq 0x28(%rsp), %rdi
leaq 0x8(%rsp), %rdx
callq 0xbf0a
leaq 0xaa470(%rip), %r12     # 0xe52e0
leaq 0x667dd(%rip), %rsi     # 0xa1654
leaq 0x28(%rsp), %rdi
callq 0x18a16
leaq 0x70ce2(%rip), %rsi     # 0xabb6a
movq %rax, %rdi
callq 0x3ebfa
leaq 0x6a493(%rip), %rsi     # 0xa532a
movq %rax, %rdi
callq 0x18a16
movq %rax, %rbx
cmpb $0x1, 0x188(%rax)
jne 0x3aec8
movq (%r15), %rsi
addq (%r13), %rsi
leaq 0xaa417(%rip), %rax     # 0xe52d0
addq (%rax), %rsi
movq %rbx, %rdi
addq $0x10, %rdi
callq 0x2110
leaq 0x66785(%rip), %rsi     # 0xa1654
movq %rbx, %rdi
callq 0x18a16
leaq 0x67ff9(%rip), %rsi     # 0xa2ed7
movq %rax, %rdi
callq 0x18a16
leaq 0x6a43d(%rip), %rsi     # 0xa532a
movq %rax, %rdi
callq 0x18a16
movq %rax, %rbx
cmpb $0x1, 0x188(%rax)
jne 0x3af0f
movq %rbx, %rdi
addq $0x10, %rdi
xorl %esi, %esi
callq 0x22f0
leaq 0x7d453(%rip), %rsi     # 0xb8369
movq %rbx, %rdi
callq 0x18a16
leaq 0x28(%rsp), %rdi
callq 0xbf62
movq 0x8(%rsp), %rdi
leaq 0x18(%rsp), %rax
cmpq %rax, %rdi
je 0x3af44
movq 0x18(%rsp), %rsi
incq %rsi
callq 0x21f0
movq (%rbp), %rbx
movq (%r12), %r14
leaq 0x8(%rsp), %rdi
leaq 0x18(%rsp), %rax
movq %rax, (%rdi)
leaq 0x70aeb(%rip), %rsi     # 0xaba4b
leaq 0x70b04(%rip), %rdx     # 0xaba6b
callq 0xd0b8
xorl %esi, %esi
addq %rbx, %r14
sete %sil
leaq 0x28(%rsp), %rdi
leaq 0x8(%rsp), %rdx
callq 0xbf0a
leaq 0x666c9(%rip), %rsi     # 0xa1654
leaq 0x28(%rsp), %rdi
callq 0x18a16
leaq 0x70ad0(%rip), %rsi     # 0xaba6c
movq %rax, %rdi
callq 0x3ec6a
leaq 0x6a37f(%rip), %rsi     # 0xa532a
movq %rax, %rdi
callq 0x18a16
movq %rax, %rbx
cmpb $0x1, 0x188(%rax)
jne 0x3afd3
movq (%rbp), %rsi
addq (%r12), %rsi
movq %rbx, %rdi
addq $0x10, %rdi
callq 0x2110
leaq 0x6667a(%rip), %rsi     # 0xa1654
movq %rbx, %rdi
callq 0x18a16
leaq 0x67eee(%rip), %rsi     # 0xa2ed7
movq %rax, %rdi
callq 0x18a16
leaq 0x6a332(%rip), %rsi     # 0xa532a
movq %rax, %rdi
callq 0x18a16
movq %rax, %rbx
cmpb $0x1, 0x188(%rax)
jne 0x3b01a
movq %rbx, %rdi
addq $0x10, %rdi
xorl %esi, %esi
callq 0x22f0
leaq 0x7d348(%rip), %rsi     # 0xb8369
movq %rbx, %rdi
callq 0x18a16
leaq 0x28(%rsp), %rdi
callq 0xbf62
movq 0x8(%rsp), %rdi
leaq 0x18(%rsp), %rax
cmpq %rax, %rdi
je 0x3b04f
movq 0x18(%rsp), %rsi
incq %rsi
callq 0x21f0
movq (%r13), %rbx
movq (%rbp), %r14
leaq 0x8(%rsp), %rdi
leaq 0x18(%rsp), %rax
movq %rax, (%rdi)
leaq 0x70a1d(%rip), %rsi     # 0xaba88
leaq 0x70a35(%rip), %rdx     # 0xabaa7
callq 0xd0b8
xorl %esi, %esi
addq %rbx, %r14
sete %sil
leaq 0x28(%rsp), %rdi
leaq 0x8(%rsp), %rdx
callq 0xbf0a
leaq 0x665be(%rip), %rsi     # 0xa1654
leaq 0x28(%rsp), %rdi
callq 0x18a16
leaq 0x70a01(%rip), %rsi     # 0xabaa8
movq %rax, %rdi
callq 0x19378
leaq 0x6a274(%rip), %rsi     # 0xa532a
movq %rax, %rdi
callq 0x18a16
movq %rax, %rbx
cmpb $0x1, 0x188(%rax)
jne 0x3b0de
movq (%r13), %rsi
addq (%rbp), %rsi
movq %rbx, %rdi
addq $0x10, %rdi
callq 0x2110
leaq 0x6656f(%rip), %rsi     # 0xa1654
movq %rbx, %rdi
callq 0x18a16
leaq 0x67de3(%rip), %rsi     # 0xa2ed7
movq %rax, %rdi
callq 0x18a16
leaq 0x6a227(%rip), %rsi     # 0xa532a
movq %rax, %rdi
callq 0x18a16
movq %rax, %rbx
cmpb $0x1, 0x188(%rax)
jne 0x3b125
movq %rbx, %rdi
addq $0x10, %rdi
xorl %esi, %esi
callq 0x22f0
leaq 0x7d23d(%rip), %rsi     # 0xb8369
movq %rbx, %rdi
callq 0x18a16
leaq 0x28(%rsp), %rdi
callq 0xbf62
movq 0x8(%rsp), %rdi
leaq 0x18(%rsp), %rax
cmpq %rax, %rdi
je 0x3b15a
movq 0x18(%rsp), %rsi
incq %rsi
callq 0x21f0
leaq 0xaa16f(%rip), %rax     # 0xe52d0
movq (%rax), %rbx
movq (%r12), %r14
leaq 0x8(%rsp), %rdi
leaq 0x18(%rsp), %rax
movq %rax, (%rdi)
leaq 0x6ed89(%rip), %rsi     # 0xa9f05
leaq 0x6eda0(%rip), %rdx     # 0xa9f23
callq 0xd0b8
xorl %esi, %esi
addq %rbx, %r14
sete %sil
leaq 0x28(%rsp), %rdi
leaq 0x8(%rsp), %rdx
callq 0xbf0a
leaq 0x664ad(%rip), %rsi     # 0xa1654
leaq 0x28(%rsp), %rdi
callq 0x18a16
leaq 0x6ed6c(%rip), %rsi     # 0xa9f24
movq %rax, %rdi
callq 0x41786
leaq 0x6a163(%rip), %rsi     # 0xa532a
movq %rax, %rdi
callq 0x18a16
movq %rax, %rbx
cmpb $0x1, 0x188(%rax)
jne 0x3b1f5
leaq 0xaa0ee(%rip), %rax     # 0xe52d0
movq (%rax), %rsi
addq (%r12), %rsi
movq %rbx, %rdi
addq $0x10, %rdi
callq 0x2110
leaq 0x66458(%rip), %rsi     # 0xa1654
movq %rbx, %rdi
callq 0x18a16
leaq 0x67ccc(%rip), %rsi     # 0xa2ed7
movq %rax, %rdi
callq 0x18a16
leaq 0x6a110(%rip), %rsi     # 0xa532a
movq %rax, %rdi
callq 0x18a16
movq %rax, %rbx
cmpb $0x1, 0x188(%rax)
jne 0x3b23c
movq %rbx, %rdi
addq $0x10, %rdi
xorl %esi, %esi
callq 0x22f0
leaq 0x7d126(%rip), %rsi     # 0xb8369
movq %rbx, %rdi
callq 0x18a16
leaq 0x28(%rsp), %rdi
callq 0xbf62
movq 0x8(%rsp), %rdi
leaq 0x18(%rsp), %rax
cmpq %rax, %rdi
jne 0x3b5ac
jmp 0x3b5b9
movq (%r15), %rbx
leaq 0x18(%rsp), %r12
movq %r12, -0x10(%r12)
leaq 0x70842(%rip), %rsi     # 0xabac3
leaq 0x70864(%rip), %rdx     # 0xabaec
leaq 0x8(%rsp), %rdi
callq 0xd0b8
xorl %esi, %esi
testq %rbx, %rbx
sete %sil
leaq 0x28(%rsp), %rdi
leaq 0x8(%rsp), %rdx
callq 0xbf0a
leaq 0x663a3(%rip), %rsi     # 0xa1654
leaq 0x28(%rsp), %rdi
callq 0x18a16
leaq 0x6af89(%rip), %rsi     # 0xa624b
movq %rax, %rdi
callq 0x3ec32
leaq 0x6a059(%rip), %rsi     # 0xa532a
movq %rax, %rdi
callq 0x18a16
movq %rax, %rbx
cmpb $0x1, 0x188(%rax)
jne 0x3b2f4
movq %rbx, %rdi
addq $0x10, %rdi
movq (%r15), %rsi
callq 0x2110
leaq 0x66359(%rip), %rsi     # 0xa1654
movq %rbx, %rdi
callq 0x18a16
leaq 0x67bcd(%rip), %rsi     # 0xa2ed7
movq %rax, %rdi
callq 0x18a16
leaq 0x6a011(%rip), %rsi     # 0xa532a
movq %rax, %rdi
callq 0x18a16
movq %rax, %rbx
cmpb $0x1, 0x188(%rax)
jne 0x3b33b
movq %rbx, %rdi
addq $0x10, %rdi
xorl %esi, %esi
callq 0x22f0
leaq 0x7d027(%rip), %rsi     # 0xb8369
movq %rbx, %rdi
callq 0x18a16
leaq 0x28(%rsp), %rdi
callq 0xbf62
movq 0x8(%rsp), %rdi
cmpq %r12, %rdi
je 0x3b36b
movq 0x18(%rsp), %rsi
incq %rsi
callq 0x21f0
movq (%r13), %rbx
leaq 0x8(%rsp), %rdi
movq %r12, (%rdi)
leaq 0x7076f(%rip), %rsi     # 0xabaed
leaq 0x7078e(%rip), %rdx     # 0xabb13
callq 0xd0b8
xorl %esi, %esi
testq %rbx, %rbx
sete %sil
leaq 0x28(%rsp), %rdi
leaq 0x8(%rsp), %rdx
callq 0xbf0a
leaq 0x662ab(%rip), %rsi     # 0xa1654
leaq 0x28(%rsp), %rdi
callq 0x18a16
leaq 0x6d549(%rip), %rsi     # 0xa8903
movq %rax, %rdi
callq 0x4174e
leaq 0x69f61(%rip), %rsi     # 0xa532a
movq %rax, %rdi
callq 0x18a16
movq %rax, %rbx
cmpb $0x1, 0x188(%rax)
jne 0x3b3ed
movq %rbx, %rdi
addq $0x10, %rdi
movq (%r13), %rsi
callq 0x2110
leaq 0x66260(%rip), %rsi     # 0xa1654
movq %rbx, %rdi
callq 0x18a16
leaq 0x67ad4(%rip), %rsi     # 0xa2ed7
movq %rax, %rdi
callq 0x18a16
leaq 0x69f18(%rip), %rsi     # 0xa532a
movq %rax, %rdi
callq 0x18a16
movq %rax, %rbx
cmpb $0x1, 0x188(%rax)
jne 0x3b434
movq %rbx, %rdi
addq $0x10, %rdi
xorl %esi, %esi
callq 0x22f0
leaq 0x7cf2e(%rip), %rsi     # 0xb8369
movq %rbx, %rdi
callq 0x18a16
leaq 0x28(%rsp), %rdi
callq 0xbf62
movq 0x8(%rsp), %rdi
cmpq %r12, %rdi
je 0x3b464
movq 0x18(%rsp), %rsi
incq %rsi
callq 0x21f0
leaq 0xa9e65(%rip), %rax     # 0xe52d0
movq (%rax), %r15
leaq 0xa9e6b(%rip), %rax     # 0xe52e0
movq (%rax), %rbx
movq 0xa9d89(%rip), %r14     # 0xe5208
movq 0xa9d6a(%rip), %r13     # 0xe51f0
leaq 0x8(%rsp), %rdi
movq %r12, (%rdi)
leaq 0x7067f(%rip), %rsi     # 0xabb14
leaq 0x706ae(%rip), %rdx     # 0xabb4a
callq 0xd0b8
imulq %r14, %r13
xorl %eax, %eax
testq %r13, %r13
cmovgq %r13, %rax
addq %r15, %rbx
leaq (%rax,%rax,2), %rax
xorl %esi, %esi
cmpq %rax, %rbx
sete %sil
leaq 0x28(%rsp), %rdi
leaq 0x8(%rsp), %rdx
callq 0xbf0a
leaq 0x66180(%rip), %rsi     # 0xa1654
leaq 0x28(%rsp), %rdi
callq 0x18a16
leaq 0x6ea3f(%rip), %rsi     # 0xa9f24
movq %rax, %rdi
callq 0x41786
leaq 0x69e36(%rip), %rsi     # 0xa532a
movq %rax, %rdi
callq 0x18a16
movq %rax, %rbx
cmpb $0x1, 0x188(%rax)
jne 0x3b528
leaq 0xa9dc1(%rip), %rax     # 0xe52d0
movq (%rax), %rsi
leaq 0xa9dc7(%rip), %rax     # 0xe52e0
addq (%rax), %rsi
movq %rbx, %rdi
addq $0x10, %rdi
callq 0x2110
leaq 0x66125(%rip), %rsi     # 0xa1654
movq %rbx, %rdi
callq 0x18a16
leaq 0x705f3(%rip), %rsi     # 0xabb31
movq %rax, %rdi
callq 0x41786
leaq 0x69ddd(%rip), %rsi     # 0xa532a
movq %rax, %rdi
callq 0x18a16
movq %rax, %rbx
cmpb $0x1, 0x188(%rax)
jne 0x3b589
movq 0xa9ca0(%rip), %rax     # 0xe5208
imulq 0xa9c80(%rip), %rax     # 0xe51f0
xorl %ecx, %ecx
testq %rax, %rax
cmovgq %rax, %rcx
leaq (%rcx,%rcx,2), %rsi
movq %rbx, %rdi
addq $0x10, %rdi
callq 0x2110
leaq 0x7cdd9(%rip), %rsi     # 0xb8369
movq %rbx, %rdi
callq 0x18a16
leaq 0x28(%rsp), %rdi
callq 0xbf62
movq 0x8(%rsp), %rdi
cmpq %r12, %rdi
je 0x3b5b9
movq 0x18(%rsp), %rsi
incq %rsi
callq 0x21f0
leaq 0x1b8(%rsp), %rdi
callq 0x3f8f6
leaq 0x308(%rsp), %rdi
callq 0x3f8f6
addq $0x458, %rsp            # imm = 0x458
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
jmp 0x3b628
jmp 0x3b628
jmp 0x3b628
jmp 0x3b628
jmp 0x3b628
jmp 0x3b628
jmp 0x3b628
jmp 0x3b637
jmp 0x3b646
jmp 0x3b658
jmp 0x3b6c6
jmp 0x3b667
jmp 0x3b6d5
jmp 0x3b676
jmp 0x3b6f2
jmp 0x3b6f2
jmp 0x3b623
jmp 0x3b61b
jmp 0x3b623
jmp 0x3b61b
jmp 0x3b623
movq %rax, %rbx
jmp 0x3b6e2
movq %rax, %rbx
jmp 0x3b683
movq %rax, %rbx
jmp 0x3b69f
jmp 0x3b637
jmp 0x3b646
jmp 0x3b658
jmp 0x3b667
jmp 0x3b676
movq %rax, %rbx
leaq 0x28(%rsp), %rdi
callq 0xbf62
jmp 0x3b683
movq %rax, %rbx
leaq 0x28(%rsp), %rdi
callq 0xbf62
jmp 0x3b6e2
movq %rax, %rbx
leaq 0x28(%rsp), %rdi
callq 0xbf62
jmp 0x3b683
movq %rax, %rbx
leaq 0x28(%rsp), %rdi
callq 0xbf62
jmp 0x3b683
movq %rax, %rbx
leaq 0x28(%rsp), %rdi
callq 0xbf62
movq 0x8(%rsp), %rdi
leaq 0x18(%rsp), %rax
cmpq %rax, %rdi
je 0x3b69f
movq 0x18(%rsp), %rsi
incq %rsi
callq 0x21f0
leaq 0x1b8(%rsp), %rdi
callq 0x3f8f6
leaq 0x308(%rsp), %rdi
callq 0x3f8f6
movq %rbx, %rdi
callq 0x2300
movq %rax, %rbx
jmp 0x3b6ac
movq %rax, %rbx
leaq 0x28(%rsp), %rdi
callq 0xbf62
jmp 0x3b6e2
movq %rax, %rbx
leaq 0x28(%rsp), %rdi
callq 0xbf62
movq 0x8(%rsp), %rdi
cmpq %r12, %rdi
jne 0x3b692
jmp 0x3b69f
jmp 0x3b6f2
jmp 0x3b6f2
movq %rax, %rdi
callq 0xc036