// File: /workspace/github_cpp_makefile_star2_O2/dsharlet[P]array/test/array_lifetime.cpp
// Function: void nda::test_swap_lifetime<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 $0x268, %rsp            # imm = 0x268
movl %edi, %ebx
leaq 0xb5723(%rip), %rsi     # 0xe21e0
leaq 0x218(%rsp), %rdi
callq 0x31636
movq 0xb5717(%rip), %rax     # 0xe21e8
imulq 0xb5727(%rip), %rax     # 0xe2200
xorl %ecx, %ecx
testq %rax, %rax
cmovgq %rax, %rcx
leaq 0x38(%rsp), %rsi
andq $0x0, (%rsi)
movq $0x1, 0x8(%rsi)
movabsq $-0x8000000000000000, %rax # imm = 0x8000000000000000
movq %rax, 0x10(%rsi)
andq $0x0, 0x18(%rsi)
movq %rcx, 0x20(%rsi)
movq %rax, 0x28(%rsi)
leaq 0x1c8(%rsp), %rdi
callq 0x31636
leaq 0xb5796(%rip), %rbp     # 0xe22b8
andq $0x0, (%rbp)
leaq 0xb5792(%rip), %r12     # 0xe22c0
andq $0x0, (%r12)
leaq 0xb578e(%rip), %r15     # 0xe22c8
andq $0x0, (%r15)
leaq 0xb578b(%rip), %rax     # 0xe22d0
andq $0x0, (%rax)
leaq 0xb5788(%rip), %r14     # 0xe22d8
andq $0x0, (%r14)
leaq 0xb5785(%rip), %rax     # 0xe22e0
andq $0x0, (%rax)
leaq 0x218(%rsp), %rdi
leaq 0x1c8(%rsp), %rsi
callq 0x388ec
testb %bl, %bl
je 0x2cf1d
movq %r15, %rax
movq (%rbp), %r15
movq %r12, %r13
movq (%r12), %rbx
movq %rax, %r12
movq (%rax), %r14
leaq 0x6591a(%rip), %rsi     # 0x924b1
leaq 0x18(%rsp), %rdi
leaq 0x7(%rsp), %rdx
callq 0x66a0
addq %r15, %rbx
xorl %esi, %esi
addq %r14, %rbx
sete %sil
leaq 0x38(%rsp), %rdi
leaq 0x18(%rsp), %rdx
callq 0x6894
movq %r12, %r15
leaq 0xb570d(%rip), %r12     # 0xe22d8
leaq 0x60a75(%rip), %rsi     # 0x8d647
leaq 0x38(%rsp), %rdi
callq 0x106fe
leaq 0x6b327(%rip), %rsi     # 0x97f0a
movq %rax, %rdi
callq 0x3160a
leaq 0x64a00(%rip), %rsi     # 0x915f2
movq %rax, %rdi
callq 0x106fe
movq (%r13), %rcx
addq (%rbp), %rcx
addq (%r15), %rcx
leaq 0x10(%rsp), %rsi
movq %rcx, (%rsi)
movq %rax, %rdi
callq 0x11052
leaq 0x60a2b(%rip), %rsi     # 0x8d647
movq %rax, %rdi
callq 0x106fe
leaq 0x625c5(%rip), %rsi     # 0x8f1f0
movq %rax, %rdi
callq 0x106fe
leaq 0x649b8(%rip), %rsi     # 0x915f2
movq %rax, %rdi
callq 0x106fe
leaq 0x8(%rsp), %rsi
andl $0x0, (%rsi)
movq %rax, %rdi
callq 0x10736
leaq 0x78649(%rip), %rsi     # 0xa52a2
movq %rax, %rdi
callq 0x106fe
leaq 0x38(%rsp), %rdi
callq 0x68d4
leaq 0x18(%rsp), %rdi
callq 0x2090
leaq 0xb5654(%rip), %rax     # 0xe22d0
movq (%rax), %rbx
movq (%r12), %r14
leaq 0x6b161(%rip), %rsi     # 0x97deb
leaq 0x18(%rsp), %rdi
leaq 0x7(%rsp), %rdx
callq 0x66a0
xorl %esi, %esi
addq %rbx, %r14
sete %sil
leaq 0x38(%rsp), %rdi
leaq 0x18(%rsp), %rdx
callq 0x6894
leaq 0x6098f(%rip), %rsi     # 0x8d647
leaq 0x38(%rsp), %rdi
callq 0x106fe
leaq 0x6b143(%rip), %rsi     # 0x97e0c
movq %rax, %rdi
callq 0x31698
leaq 0x6491a(%rip), %rsi     # 0x915f2
movq %rax, %rdi
callq 0x106fe
movq (%r12), %rcx
leaq 0xb55e5(%rip), %rdx     # 0xe22d0
addq (%rdx), %rcx
leaq 0x10(%rsp), %rsi
movq %rcx, (%rsi)
movq %rax, %rdi
callq 0x11052
leaq 0x60942(%rip), %rsi     # 0x8d647
movq %rax, %rdi
callq 0x106fe
leaq 0x624dc(%rip), %rsi     # 0x8f1f0
movq %rax, %rdi
callq 0x106fe
leaq 0x648cf(%rip), %rsi     # 0x915f2
movq %rax, %rdi
callq 0x106fe
leaq 0x8(%rsp), %rsi
andl $0x0, (%rsi)
movq %rax, %rdi
callq 0x10736
leaq 0x78560(%rip), %rsi     # 0xa52a2
movq %rax, %rdi
callq 0x106fe
leaq 0x38(%rsp), %rdi
callq 0x68d4
leaq 0x18(%rsp), %rdi
callq 0x2090
movq (%r13), %rbx
leaq 0xb5567(%rip), %rax     # 0xe22d0
movq (%rax), %r14
leaq 0x6b0b5(%rip), %rsi     # 0x97e28
leaq 0x18(%rsp), %rdi
leaq 0x7(%rsp), %rdx
callq 0x66a0
xorl %esi, %esi
addq %rbx, %r14
sete %sil
leaq 0x38(%rsp), %rdi
leaq 0x18(%rsp), %rdx
callq 0x6894
leaq 0x608a6(%rip), %rsi     # 0x8d647
leaq 0x38(%rsp), %rdi
callq 0x106fe
leaq 0x6b096(%rip), %rsi     # 0x97e48
movq %rax, %rdi
callq 0x11070
leaq 0x64831(%rip), %rsi     # 0x915f2
movq %rax, %rdi
callq 0x106fe
leaq 0xb5500(%rip), %rcx     # 0xe22d0
movq (%rcx), %rcx
addq (%r13), %rcx
leaq 0x10(%rsp), %rsi
movq %rcx, (%rsi)
movq %rax, %rdi
callq 0x11052
leaq 0x60859(%rip), %rsi     # 0x8d647
movq %rax, %rdi
callq 0x106fe
leaq 0x623f3(%rip), %rsi     # 0x8f1f0
movq %rax, %rdi
callq 0x106fe
leaq 0x647e6(%rip), %rsi     # 0x915f2
movq %rax, %rdi
callq 0x106fe
leaq 0x8(%rsp), %rsi
andl $0x0, (%rsi)
movq %rax, %rdi
callq 0x10736
leaq 0x78477(%rip), %rsi     # 0xa52a2
movq %rax, %rdi
callq 0x106fe
leaq 0x38(%rsp), %rdi
callq 0x68d4
leaq 0x18(%rsp), %rdi
callq 0x2090
movq (%r15), %rbx
movq (%r12), %r14
leaq 0x69450(%rip), %rsi     # 0x962a5
leaq 0x18(%rsp), %rdi
leaq 0x7(%rsp), %rdx
callq 0x66a0
xorl %esi, %esi
addq %rbx, %r14
sete %sil
leaq 0x38(%rsp), %rdi
leaq 0x18(%rsp), %rdx
callq 0x6894
leaq 0x607c4(%rip), %rsi     # 0x8d647
leaq 0x38(%rsp), %rdi
callq 0x106fe
leaq 0x69430(%rip), %rsi     # 0x962c4
movq %rax, %rdi
callq 0x3425c
leaq 0x6474f(%rip), %rsi     # 0x915f2
movq %rax, %rdi
callq 0x106fe
movq (%r12), %rcx
addq (%r15), %rcx
leaq 0x10(%rsp), %rsi
movq %rcx, (%rsi)
movq %rax, %rdi
callq 0x11052
leaq 0x6077e(%rip), %rsi     # 0x8d647
movq %rax, %rdi
callq 0x106fe
leaq 0x62318(%rip), %rsi     # 0x8f1f0
movq %rax, %rdi
callq 0x106fe
leaq 0x6470b(%rip), %rsi     # 0x915f2
movq %rax, %rdi
callq 0x106fe
leaq 0x8(%rsp), %rsi
andl $0x0, (%rsi)
movq %rax, %rdi
callq 0x10736
leaq 0x7839c(%rip), %rsi     # 0xa52a2
movq %rax, %rdi
callq 0x106fe
leaq 0x38(%rsp), %rdi
callq 0x68d4
jmp 0x2d1cf
movq (%rbp), %rbx
leaq 0x6af3b(%rip), %rsi     # 0x97e63
leaq 0x18(%rsp), %rdi
leaq 0x8(%rsp), %rdx
callq 0x66a0
xorl %esi, %esi
testq %rbx, %rbx
sete %sil
leaq 0x38(%rsp), %rdi
leaq 0x18(%rsp), %rdx
callq 0x6894
leaq 0x606f1(%rip), %rsi     # 0x8d647
leaq 0x38(%rsp), %rdi
callq 0x106fe
leaq 0x655ac(%rip), %rsi     # 0x92513
movq %rax, %rdi
callq 0x3167c
leaq 0x6467c(%rip), %rsi     # 0x915f2
movq %rax, %rdi
callq 0x106fe
leaq 0xb5333(%rip), %rsi     # 0xe22b8
movq %rax, %rdi
callq 0x11052
leaq 0x606b3(%rip), %rsi     # 0x8d647
movq %rax, %rdi
callq 0x106fe
leaq 0x6224d(%rip), %rsi     # 0x8f1f0
movq %rax, %rdi
callq 0x106fe
leaq 0x64640(%rip), %rsi     # 0x915f2
movq %rax, %rdi
callq 0x106fe
leaq 0x10(%rsp), %rsi
andl $0x0, (%rsi)
movq %rax, %rdi
callq 0x10736
leaq 0x782d1(%rip), %rsi     # 0xa52a2
movq %rax, %rdi
callq 0x106fe
leaq 0x38(%rsp), %rdi
callq 0x68d4
leaq 0x18(%rsp), %rdi
callq 0x2090
movq (%r12), %rbx
leaq 0x6ae95(%rip), %rsi     # 0x97e8d
leaq 0x18(%rsp), %rdi
leaq 0x8(%rsp), %rdx
callq 0x66a0
movq %r14, %rbp
xorl %esi, %esi
testq %rbx, %rbx
sete %sil
leaq 0x38(%rsp), %rdi
leaq 0x18(%rsp), %rdx
callq 0x6894
leaq 0x6061e(%rip), %rsi     # 0x8d647
leaq 0x38(%rsp), %rdi
callq 0x106fe
leaq 0x67c69(%rip), %rsi     # 0x94ca3
movq %rax, %rdi
callq 0x34240
leaq 0x645a9(%rip), %rsi     # 0x915f2
movq %rax, %rdi
callq 0x106fe
leaq 0xb5268(%rip), %rsi     # 0xe22c0
movq %rax, %rdi
callq 0x11052
leaq 0x605e0(%rip), %rsi     # 0x8d647
movq %rax, %rdi
callq 0x106fe
leaq 0x6217a(%rip), %rsi     # 0x8f1f0
movq %rax, %rdi
callq 0x106fe
leaq 0x6456d(%rip), %rsi     # 0x915f2
movq %rax, %rdi
callq 0x106fe
leaq 0x10(%rsp), %rsi
andl $0x0, (%rsi)
movq %rax, %rdi
callq 0x10736
leaq 0x781fe(%rip), %rsi     # 0xa52a2
movq %rax, %rdi
callq 0x106fe
leaq 0x38(%rsp), %rdi
callq 0x68d4
leaq 0x18(%rsp), %rdi
callq 0x2090
movq (%r15), %r12
movq (%rbp), %rbx
movq 0xb5132(%rip), %r14     # 0xe2200
movq 0xb5113(%rip), %r13     # 0xe21e8
leaq 0x6add8(%rip), %rsi     # 0x97eb4
leaq 0x18(%rsp), %rdi
leaq 0x7(%rsp), %rdx
callq 0x66a0
imulq %r14, %r13
xorl %eax, %eax
testq %r13, %r13
cmovgq %r13, %rax
addq %r12, %rbx
leaq (%rax,%rax,2), %rax
xorl %esi, %esi
cmpq %rax, %rbx
sete %sil
leaq 0x38(%rsp), %rdi
leaq 0x18(%rsp), %rdx
callq 0x6894
leaq 0x60529(%rip), %rsi     # 0x8d647
leaq 0x38(%rsp), %rdi
callq 0x106fe
leaq 0x69195(%rip), %rsi     # 0x962c4
movq %rax, %rdi
callq 0x3425c
leaq 0x644b4(%rip), %rsi     # 0x915f2
movq %rax, %rdi
callq 0x106fe
movq (%rbp), %rcx
addq (%r15), %rcx
leaq 0x10(%rsp), %rsi
movq %rcx, (%rsi)
movq %rax, %rdi
callq 0x11052
leaq 0x604e3(%rip), %rsi     # 0x8d647
movq %rax, %rdi
callq 0x106fe
leaq 0x6ad5e(%rip), %rsi     # 0x97ed1
movq %rax, %rdi
callq 0x3425c
leaq 0x64470(%rip), %rsi     # 0x915f2
movq %rax, %rdi
callq 0x106fe
movq 0xb5057(%rip), %rcx     # 0xe21e8
imulq 0xb5067(%rip), %rcx     # 0xe2200
xorl %edx, %edx
testq %rcx, %rcx
cmovgq %rcx, %rdx
leaq (%rdx,%rdx,2), %rcx
leaq 0x8(%rsp), %rsi
movq %rcx, (%rsi)
movq %rax, %rdi
callq 0x11052
leaq 0x780e5(%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
leaq 0x218(%rsp), %rdi
callq 0x3166c
addq $0x268, %rsp            # imm = 0x268
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
jmp 0x2d238
jmp 0x2d238
jmp 0x2d238
jmp 0x2d238
jmp 0x2d238
jmp 0x2d238
jmp 0x2d238
jmp 0x2d252
jmp 0x2d230
jmp 0x2d261
jmp 0x2d270
jmp 0x2d230
jmp 0x2d230
jmp 0x2d29d
jmp 0x2d27f
jmp 0x2d230
jmp 0x2d230
jmp 0x2d2ac
jmp 0x2d28e
jmp 0x2d230
movq %rax, %rbx
jmp 0x2d2b9
movq %rax, %rbx
jmp 0x2d2c3
movq %rax, %rbx
jmp 0x2d2d0
jmp 0x2d252
jmp 0x2d261
jmp 0x2d270
jmp 0x2d27f
jmp 0x2d28e
movq %rax, %rbx
leaq 0x38(%rsp), %rdi
callq 0x68d4
jmp 0x2d2b9
movq %rax, %rbx
leaq 0x38(%rsp), %rdi
callq 0x68d4
jmp 0x2d2b9
movq %rax, %rbx
leaq 0x38(%rsp), %rdi
callq 0x68d4
jmp 0x2d2b9
movq %rax, %rbx
leaq 0x38(%rsp), %rdi
callq 0x68d4
jmp 0x2d2b9
movq %rax, %rbx
leaq 0x38(%rsp), %rdi
callq 0x68d4
jmp 0x2d2b9
movq %rax, %rbx
leaq 0x38(%rsp), %rdi
callq 0x68d4
jmp 0x2d2b9
movq %rax, %rbx
leaq 0x38(%rsp), %rdi
callq 0x68d4
leaq 0x18(%rsp), %rdi
callq 0x2090
leaq 0x1c8(%rsp), %rdi
callq 0x3166c
leaq 0x218(%rsp), %rdi
callq 0x3166c
movq %rbx, %rdi
callq 0x22f0
movq %rax, %rdi
callq 0x6bba