// File: /workspace/github_cpp_makefile_star2_O2/dsharlet[P]array/test/array_lifetime.cpp
// Function: void nda::test_move_alloc_lifetime<nda::custom_alloc<std::integral_constant<bool, true>>>(bool)
void test_move_alloc_lifetime(bool alloc_movable = true) {
  {
    lifetime_array<Alloc> source(lifetime_shape);
    lifetime_counter::reset();
    lifetime_array<Alloc> move(std::move(source), Alloc());
  }
  // This should have moved the whole array if the allocator is movable.
  if (alloc_movable) {
    ASSERT_EQ(lifetime_counter::constructs(), 0);
    ASSERT_EQ(lifetime_counter::moves(), 0);
    ASSERT_EQ(lifetime_counter::destructs, lifetime_shape.size());
  } else {
    ASSERT_EQ(lifetime_counter::constructs(), lifetime_shape.size());
    ASSERT_EQ(lifetime_counter::moves(), lifetime_shape.size());
    ASSERT_EQ(lifetime_counter::destructs, lifetime_shape.size() * 2);
  }
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x1f8, %rsp            # imm = 0x1F8
movl %edi, %ebx
leaq 0xbf640(%rip), %rsi     # 0xe21e0
leaq 0x68(%rsp), %r14
movq %r14, %rdi
callq 0x319b6
leaq 0xbf704(%rip), %r12     # 0xe22b8
andq $0x0, (%r12)
leaq 0xbf700(%rip), %r15     # 0xe22c0
andq $0x0, (%r15)
leaq 0xbf6fd(%rip), %rbp     # 0xe22c8
andq $0x0, (%rbp)
leaq 0xbf6f9(%rip), %rax     # 0xe22d0
andq $0x0, (%rax)
leaq 0xbf6f6(%rip), %rax     # 0xe22d8
andq $0x0, (%rax)
leaq 0xbf6f3(%rip), %rax     # 0xe22e0
andq $0x0, (%rax)
leaq 0x8(%rsp), %rdx
andl $0x0, (%rdx)
incq 0xbf650(%rip)           # 0xe2250
leaq 0x18(%rsp), %rdi
movq %r14, %rsi
callq 0x371b4
incq 0xbf64c(%rip)           # 0xe2260
leaq 0x18(%rsp), %rdi
callq 0x31a06
leaq 0x68(%rsp), %rdi
callq 0x31a06
testb %bl, %bl
je 0x22f06
movq %r12, %r13
movq (%r12), %r12
movq (%r15), %rbx
movq (%rbp), %r14
leaq 0x6f86c(%rip), %rsi     # 0x924b1
leaq 0x18(%rsp), %rdi
leaq 0x7(%rsp), %rdx
callq 0x66a0
addq %r12, %rbx
xorl %esi, %esi
addq %r14, %rbx
sete %sil
leaq 0x68(%rsp), %rdi
leaq 0x18(%rsp), %rdx
callq 0x6894
leaq 0x6a9d1(%rip), %rsi     # 0x8d647
leaq 0x68(%rsp), %rdi
callq 0x106fe
leaq 0x75283(%rip), %rsi     # 0x97f0a
movq %rax, %rdi
callq 0x3160a
leaq 0x6e95c(%rip), %rsi     # 0x915f2
movq %rax, %rdi
callq 0x106fe
movq (%r15), %rcx
addq (%r13), %rcx
addq (%rbp), %rcx
leaq 0x8(%rsp), %rsi
movq %rcx, (%rsi)
movq %rax, %rdi
callq 0x11052
leaq 0x6a987(%rip), %rsi     # 0x8d647
movq %rax, %rdi
callq 0x106fe
leaq 0x6c521(%rip), %rsi     # 0x8f1f0
movq %rax, %rdi
callq 0x106fe
leaq 0x6e914(%rip), %rsi     # 0x915f2
movq %rax, %rdi
callq 0x106fe
leaq 0x10(%rsp), %rsi
andl $0x0, (%rsi)
movq %rax, %rdi
callq 0x10736
leaq 0x825a5(%rip), %rsi     # 0xa52a2
movq %rax, %rdi
callq 0x106fe
leaq 0x68(%rsp), %rdi
callq 0x68d4
leaq 0x18(%rsp), %rdi
callq 0x2090
movq (%rbp), %rbx
leaq 0xbf5b4(%rip), %rax     # 0xe22d8
movq (%rax), %r14
leaq 0x73577(%rip), %rsi     # 0x962a5
leaq 0x18(%rsp), %rdi
leaq 0x7(%rsp), %rdx
callq 0x66a0
xorl %esi, %esi
addq %rbx, %r14
sete %sil
leaq 0x68(%rsp), %rdi
leaq 0x18(%rsp), %rdx
callq 0x6894
leaq 0x6a8eb(%rip), %rsi     # 0x8d647
leaq 0x68(%rsp), %rdi
callq 0x106fe
leaq 0x73557(%rip), %rsi     # 0x962c4
movq %rax, %rdi
callq 0x3425c
leaq 0x6e876(%rip), %rsi     # 0x915f2
movq %rax, %rdi
callq 0x106fe
leaq 0xbf54d(%rip), %rcx     # 0xe22d8
movq (%rcx), %rcx
addq (%rbp), %rcx
leaq 0x8(%rsp), %rsi
movq %rcx, (%rsi)
movq %rax, %rdi
callq 0x11052
leaq 0x6a89e(%rip), %rsi     # 0x8d647
movq %rax, %rdi
callq 0x106fe
leaq 0x6c438(%rip), %rsi     # 0x8f1f0
movq %rax, %rdi
callq 0x106fe
leaq 0x6e82b(%rip), %rsi     # 0x915f2
movq %rax, %rdi
callq 0x106fe
leaq 0x10(%rsp), %rsi
andl $0x0, (%rsi)
movq %rax, %rdi
callq 0x10736
leaq 0x824bc(%rip), %rsi     # 0xa52a2
movq %rax, %rdi
callq 0x106fe
leaq 0x68(%rsp), %rdi
callq 0x68d4
leaq 0x18(%rsp), %rdi
callq 0x2090
leaq 0xbf4d7(%rip), %rax     # 0xe22e0
movq (%rax), %rbx
movq 0xbf3ed(%rip), %r15     # 0xe2200
movq 0xbf3ce(%rip), %r14     # 0xe21e8
leaq 0x6f717(%rip), %rsi     # 0x92538
leaq 0x18(%rsp), %rdi
leaq 0x10(%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 0x68(%rsp), %rdi
leaq 0x18(%rsp), %rdx
callq 0x6894
leaq 0x6a7eb(%rip), %rsi     # 0x8d647
leaq 0x68(%rsp), %rdi
callq 0x106fe
leaq 0x6f700(%rip), %rsi     # 0x9256d
movq %rax, %rdi
callq 0x31698
leaq 0x6e776(%rip), %rsi     # 0x915f2
movq %rax, %rdi
callq 0x106fe
leaq 0xbf455(%rip), %rsi     # 0xe22e0
movq %rax, %rdi
callq 0x11052
leaq 0x6a7ad(%rip), %rsi     # 0x8d647
movq %rax, %rdi
callq 0x106fe
leaq 0x7348a(%rip), %rsi     # 0x96333
movq %rax, %rdi
callq 0x109ea
leaq 0x6e73a(%rip), %rsi     # 0x915f2
movq %rax, %rdi
callq 0x106fe
movq 0xbf321(%rip), %rcx     # 0xe21e8
imulq 0xbf331(%rip), %rcx     # 0xe2200
xorl %edx, %edx
testq %rcx, %rcx
cmovgq %rcx, %rdx
leaq 0x8(%rsp), %rsi
movq %rdx, (%rsi)
movq %rax, %rdi
callq 0x11052
leaq 0x823b3(%rip), %rsi     # 0xa52a2
movq %rax, %rdi
callq 0x106fe
leaq 0x68(%rsp), %rdi
callq 0x68d4
jmp 0x23254
movq (%r12), %r14
movq (%r15), %rbx
movq (%rbp), %r13
movq 0xbf2e8(%rip), %rbp     # 0xe2200
movq 0xbf2c9(%rip), %r12     # 0xe21e8
leaq 0x733b8(%rip), %rsi     # 0x962de
leaq 0x18(%rsp), %rdi
leaq 0x7(%rsp), %rdx
callq 0x66a0
imulq %rbp, %r12
xorl %eax, %eax
testq %r12, %r12
cmovgq %r12, %rax
addq %r14, %rbx
addq %r13, %rbx
xorl %esi, %esi
cmpq %rax, %rbx
sete %sil
leaq 0x68(%rsp), %rdi
leaq 0x18(%rsp), %rdx
callq 0x6894
leaq 0xbf379(%rip), %r13     # 0xe22e0
leaq 0xbf35a(%rip), %rbp     # 0xe22c8
leaq 0x6a6d2(%rip), %rsi     # 0x8d647
leaq 0x68(%rsp), %rdi
callq 0x106fe
leaq 0xbf332(%rip), %rbx     # 0xe22b8
leaq 0x74f7d(%rip), %rsi     # 0x97f0a
movq %rax, %rdi
callq 0x3160a
leaq 0x6e656(%rip), %rsi     # 0x915f2
movq %rax, %rdi
callq 0x106fe
movq (%r15), %rcx
addq (%rbx), %rcx
addq (%rbp), %rcx
leaq 0x8(%rsp), %rsi
movq %rcx, (%rsi)
movq %rax, %rdi
callq 0x11052
leaq 0x6a682(%rip), %rsi     # 0x8d647
movq %rax, %rdi
callq 0x106fe
leaq 0x7335f(%rip), %rsi     # 0x96333
movq %rax, %rdi
callq 0x109ea
leaq 0x6e60f(%rip), %rsi     # 0x915f2
movq %rax, %rdi
callq 0x106fe
movq 0xbf1f6(%rip), %rcx     # 0xe21e8
imulq 0xbf206(%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 0x82288(%rip), %rsi     # 0xa52a2
movq %rax, %rdi
callq 0x106fe
leaq 0x68(%rsp), %rdi
callq 0x68d4
leaq 0x18(%rsp), %rdi
callq 0x2090
movq (%rbp), %r14
leaq 0xbf297(%rip), %rax     # 0xe22d8
movq (%rax), %rbx
movq 0xbf1b5(%rip), %r12     # 0xe2200
movq 0xbf196(%rip), %r15     # 0xe21e8
leaq 0x732bd(%rip), %rsi     # 0x96316
leaq 0x18(%rsp), %rdi
leaq 0x7(%rsp), %rdx
callq 0x66a0
imulq %r12, %r15
xorl %eax, %eax
testq %r15, %r15
cmovgq %r15, %rax
addq %r14, %rbx
xorl %esi, %esi
cmpq %rax, %rbx
sete %sil
leaq 0x68(%rsp), %rdi
leaq 0x18(%rsp), %rdx
callq 0x6894
leaq 0x6a5b0(%rip), %rsi     # 0x8d647
leaq 0x68(%rsp), %rdi
callq 0x106fe
leaq 0x7321c(%rip), %rsi     # 0x962c4
movq %rax, %rdi
callq 0x3425c
leaq 0x6e53b(%rip), %rsi     # 0x915f2
movq %rax, %rdi
callq 0x106fe
leaq 0xbf212(%rip), %rcx     # 0xe22d8
movq (%rcx), %rcx
addq (%rbp), %rcx
leaq 0x8(%rsp), %rsi
movq %rcx, (%rsi)
movq %rax, %rdi
callq 0x11052
leaq 0x6a563(%rip), %rsi     # 0x8d647
movq %rax, %rdi
callq 0x106fe
leaq 0x73240(%rip), %rsi     # 0x96333
movq %rax, %rdi
callq 0x109ea
leaq 0x6e4f0(%rip), %rsi     # 0x915f2
movq %rax, %rdi
callq 0x106fe
movq 0xbf0d7(%rip), %rcx     # 0xe21e8
imulq 0xbf0e7(%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 0x82169(%rip), %rsi     # 0xa52a2
movq %rax, %rdi
callq 0x106fe
leaq 0x68(%rsp), %rdi
callq 0x68d4
leaq 0x18(%rsp), %rdi
callq 0x2090
movq (%r13), %rbx
movq 0xbf0a0(%rip), %r15     # 0xe2200
movq 0xbf081(%rip), %r14     # 0xe21e8
leaq 0x731db(%rip), %rsi     # 0x96349
leaq 0x18(%rsp), %rdi
leaq 0x10(%rsp), %rdx
callq 0x66a0
imulq %r15, %r14
xorl %eax, %eax
testq %r14, %r14
cmovgq %r14, %rax
addq %rax, %rax
xorl %esi, %esi
cmpq %rax, %rbx
sete %sil
leaq 0x68(%rsp), %rdi
leaq 0x18(%rsp), %rdx
callq 0x6894
leaq 0x6a49b(%rip), %rsi     # 0x8d647
leaq 0x68(%rsp), %rdi
callq 0x106fe
leaq 0x6f3b0(%rip), %rsi     # 0x9256d
movq %rax, %rdi
callq 0x31698
leaq 0x6e426(%rip), %rsi     # 0x915f2
movq %rax, %rdi
callq 0x106fe
leaq 0xbf105(%rip), %rsi     # 0xe22e0
movq %rax, %rdi
callq 0x11052
leaq 0x6a45d(%rip), %rsi     # 0x8d647
movq %rax, %rdi
callq 0x106fe
leaq 0x7316f(%rip), %rsi     # 0x96368
movq %rax, %rdi
callq 0x3425c
leaq 0x6e3ea(%rip), %rsi     # 0x915f2
movq %rax, %rdi
callq 0x106fe
movq 0xbefd1(%rip), %rcx     # 0xe21e8
imulq 0xbefe1(%rip), %rcx     # 0xe2200
xorl %edx, %edx
testq %rcx, %rcx
cmovgq %rcx, %rdx
addq %rdx, %rdx
leaq 0x8(%rsp), %rsi
movq %rdx, (%rsi)
movq %rax, %rdi
callq 0x11052
leaq 0x82060(%rip), %rsi     # 0xa52a2
movq %rax, %rdi
callq 0x106fe
leaq 0x68(%rsp), %rdi
callq 0x68d4
leaq 0x18(%rsp), %rdi
callq 0x2090
addq $0x1f8, %rsp            # imm = 0x1F8
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
jmp 0x2327a
jmp 0x2327a
jmp 0x2327a
jmp 0x2327a
jmp 0x2327a
movq %rax, %rbx
jmp 0x23320
jmp 0x232fa
jmp 0x23309
jmp 0x2329b
jmp 0x2329b
jmp 0x232be
jmp 0x232cd
jmp 0x2329b
jmp 0x2329b
jmp 0x232dc
jmp 0x232eb
jmp 0x2329b
movq %rax, %rbx
jmp 0x23316
movq %rax, %rbx
incq 0xbefb6(%rip)           # 0xe2260
leaq 0x68(%rsp), %rdi
callq 0x31a06
jmp 0x23320
jmp 0x232be
jmp 0x232cd
jmp 0x232dc
jmp 0x232eb
movq %rax, %rbx
leaq 0x68(%rsp), %rdi
callq 0x68d4
jmp 0x23316
movq %rax, %rbx
leaq 0x68(%rsp), %rdi
callq 0x68d4
jmp 0x23316
movq %rax, %rbx
leaq 0x68(%rsp), %rdi
callq 0x68d4
jmp 0x23316
movq %rax, %rbx
leaq 0x68(%rsp), %rdi
callq 0x68d4
jmp 0x23316
movq %rax, %rbx
leaq 0x68(%rsp), %rdi
callq 0x68d4
jmp 0x23316
movq %rax, %rbx
leaq 0x68(%rsp), %rdi
callq 0x68d4
leaq 0x18(%rsp), %rdi
callq 0x2090
movq %rbx, %rdi
callq 0x22f0
movq %rax, %rdi
callq 0x6bba