// File: /workspace/github_cpp_makefile_star2_O2/dsharlet[P]array/test/array_lifetime.cpp
// Function: void nda::test_move_assign_lifetime<std::allocator<nda::lifetime_counter>>(bool)
void test_move_assign_lifetime(bool alloc_movable = true) {
  {
    lifetime_array<Alloc> source(lifetime_shape);
    lifetime_counter::reset();
    lifetime_array<Alloc> assign;
    assign = std::move(source);
  }
  // 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 0xbc735(%rip), %rsi     # 0xe21e0
leaq 0x68(%rsp), %rdi
callq 0x31636
leaq 0xbc7fc(%rip), %r14     # 0xe22b8
andq $0x0, (%r14)
leaq 0xbc7f9(%rip), %rbp     # 0xe22c0
andq $0x0, (%rbp)
leaq 0xbc7f5(%rip), %r13     # 0xe22c8
andq $0x0, (%r13)
leaq 0xbc7f1(%rip), %rax     # 0xe22d0
andq $0x0, (%rax)
leaq 0xbc7ee(%rip), %rax     # 0xe22d8
andq $0x0, (%rax)
leaq 0xbc7eb(%rip), %r12     # 0xe22e0
andq $0x0, (%r12)
leaq 0x18(%rsp), %rdi
callq 0x375e6
leaq 0x18(%rsp), %rdi
leaq 0x68(%rsp), %rsi
callq 0x37a3e
leaq 0x18(%rsp), %rdi
callq 0x3166c
leaq 0x68(%rsp), %rdi
callq 0x3166c
testb %bl, %bl
je 0x25e06
movq (%r14), %r15
movq (%rbp), %rbx
movq (%r13), %r14
leaq 0x6c970(%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 0x68(%rsp), %rdi
leaq 0x18(%rsp), %rdx
callq 0x6894
movq %r12, %r15
leaq 0x67ad2(%rip), %rsi     # 0x8d647
leaq 0x68(%rsp), %rdi
callq 0x106fe
leaq 0xbc732(%rip), %r12     # 0xe22b8
leaq 0x7237d(%rip), %rsi     # 0x97f0a
movq %rax, %rdi
callq 0x3160a
leaq 0x6ba56(%rip), %rsi     # 0x915f2
movq %rax, %rdi
callq 0x106fe
movq (%rbp), %rcx
addq (%r12), %rcx
addq (%r13), %rcx
leaq 0x10(%rsp), %rsi
movq %rcx, (%rsi)
movq %rax, %rdi
callq 0x11052
leaq 0x67a80(%rip), %rsi     # 0x8d647
movq %rax, %rdi
callq 0x106fe
leaq 0x6961a(%rip), %rsi     # 0x8f1f0
movq %rax, %rdi
callq 0x106fe
leaq 0x6ba0d(%rip), %rsi     # 0x915f2
movq %rax, %rdi
callq 0x106fe
leaq 0x8(%rsp), %rsi
andl $0x0, (%rsi)
movq %rax, %rdi
callq 0x10736
leaq 0x7f69e(%rip), %rsi     # 0xa52a2
movq %rax, %rdi
callq 0x106fe
leaq 0x68(%rsp), %rdi
callq 0x68d4
leaq 0x18(%rsp), %rdi
callq 0x2090
movq (%r13), %rbx
leaq 0xbc6ad(%rip), %rax     # 0xe22d8
movq (%rax), %r14
leaq 0x70670(%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 0x679e4(%rip), %rsi     # 0x8d647
leaq 0x68(%rsp), %rdi
callq 0x106fe
leaq 0x70650(%rip), %rsi     # 0x962c4
movq %rax, %rdi
callq 0x3425c
leaq 0x6b96f(%rip), %rsi     # 0x915f2
movq %rax, %rdi
callq 0x106fe
leaq 0xbc646(%rip), %rcx     # 0xe22d8
movq (%rcx), %rcx
addq (%r13), %rcx
leaq 0x10(%rsp), %rsi
movq %rcx, (%rsi)
movq %rax, %rdi
callq 0x11052
leaq 0x67997(%rip), %rsi     # 0x8d647
movq %rax, %rdi
callq 0x106fe
leaq 0x69531(%rip), %rsi     # 0x8f1f0
movq %rax, %rdi
callq 0x106fe
leaq 0x6b924(%rip), %rsi     # 0x915f2
movq %rax, %rdi
callq 0x106fe
leaq 0x8(%rsp), %rsi
andl $0x0, (%rsi)
movq %rax, %rdi
callq 0x10736
leaq 0x7f5b5(%rip), %rsi     # 0xa52a2
movq %rax, %rdi
callq 0x106fe
leaq 0x68(%rsp), %rdi
callq 0x68d4
leaq 0x18(%rsp), %rdi
callq 0x2090
movq (%r15), %rbx
movq 0xbc4ed(%rip), %r15     # 0xe2200
movq 0xbc4ce(%rip), %r14     # 0xe21e8
leaq 0x6c817(%rip), %rsi     # 0x92538
leaq 0x18(%rsp), %rdi
leaq 0x8(%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 0x678eb(%rip), %rsi     # 0x8d647
leaq 0x68(%rsp), %rdi
callq 0x106fe
leaq 0x6c800(%rip), %rsi     # 0x9256d
movq %rax, %rdi
callq 0x31698
leaq 0x6b876(%rip), %rsi     # 0x915f2
movq %rax, %rdi
callq 0x106fe
leaq 0xbc555(%rip), %rsi     # 0xe22e0
movq %rax, %rdi
callq 0x11052
leaq 0x678ad(%rip), %rsi     # 0x8d647
movq %rax, %rdi
callq 0x106fe
leaq 0x7058a(%rip), %rsi     # 0x96333
movq %rax, %rdi
callq 0x109ea
leaq 0x6b83a(%rip), %rsi     # 0x915f2
movq %rax, %rdi
callq 0x106fe
movq 0xbc421(%rip), %rcx     # 0xe21e8
imulq 0xbc431(%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 0x7f4b3(%rip), %rsi     # 0xa52a2
movq %rax, %rdi
callq 0x106fe
leaq 0x68(%rsp), %rdi
callq 0x68d4
jmp 0x26154
movq (%r14), %r14
movq (%rbp), %rbx
movq (%r13), %r12
movq 0xbc3e8(%rip), %r13     # 0xe2200
movq 0xbc3c9(%rip), %r15     # 0xe21e8
leaq 0x704b8(%rip), %rsi     # 0x962de
leaq 0x18(%rsp), %rdi
leaq 0x7(%rsp), %rdx
callq 0x66a0
imulq %r13, %r15
xorl %eax, %eax
testq %r15, %r15
cmovgq %r15, %rax
addq %r14, %rbx
addq %r12, %rbx
xorl %esi, %esi
cmpq %rax, %rbx
sete %sil
leaq 0x68(%rsp), %rdi
leaq 0x18(%rsp), %rdx
callq 0x6894
leaq 0xbc461(%rip), %r13     # 0xe22c8
leaq 0x677d9(%rip), %rsi     # 0x8d647
leaq 0x68(%rsp), %rdi
callq 0x106fe
leaq 0xbc439(%rip), %rbx     # 0xe22b8
leaq 0x72084(%rip), %rsi     # 0x97f0a
movq %rax, %rdi
callq 0x3160a
leaq 0x6b75d(%rip), %rsi     # 0x915f2
movq %rax, %rdi
callq 0x106fe
movq (%rbp), %rcx
addq (%rbx), %rcx
addq (%r13), %rcx
leaq 0x10(%rsp), %rsi
movq %rcx, (%rsi)
movq %rax, %rdi
callq 0x11052
leaq 0x67788(%rip), %rsi     # 0x8d647
movq %rax, %rdi
callq 0x106fe
leaq 0x70465(%rip), %rsi     # 0x96333
movq %rax, %rdi
callq 0x109ea
leaq 0x6b715(%rip), %rsi     # 0x915f2
movq %rax, %rdi
callq 0x106fe
movq 0xbc2fc(%rip), %rcx     # 0xe21e8
imulq 0xbc30c(%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 0x7f38e(%rip), %rsi     # 0xa52a2
movq %rax, %rdi
callq 0x106fe
leaq 0x68(%rsp), %rdi
callq 0x68d4
leaq 0x18(%rsp), %rdi
callq 0x2090
movq (%r13), %r14
leaq 0xbc39d(%rip), %rax     # 0xe22d8
movq (%rax), %rbx
movq 0xbc2bb(%rip), %r12     # 0xe2200
movq 0xbc29c(%rip), %r15     # 0xe21e8
leaq 0x703c3(%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 0xbc34f(%rip), %rbx     # 0xe22e0
leaq 0x676af(%rip), %rsi     # 0x8d647
leaq 0x68(%rsp), %rdi
callq 0x106fe
leaq 0x7031b(%rip), %rsi     # 0x962c4
movq %rax, %rdi
callq 0x3425c
leaq 0x6b63a(%rip), %rsi     # 0x915f2
movq %rax, %rdi
callq 0x106fe
leaq 0xbc311(%rip), %rcx     # 0xe22d8
movq (%rcx), %rcx
addq (%r13), %rcx
leaq 0x10(%rsp), %rsi
movq %rcx, (%rsi)
movq %rax, %rdi
callq 0x11052
leaq 0x67662(%rip), %rsi     # 0x8d647
movq %rax, %rdi
callq 0x106fe
leaq 0x7033f(%rip), %rsi     # 0x96333
movq %rax, %rdi
callq 0x109ea
leaq 0x6b5ef(%rip), %rsi     # 0x915f2
movq %rax, %rdi
callq 0x106fe
movq 0xbc1d6(%rip), %rcx     # 0xe21e8
imulq 0xbc1e6(%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 0x7f268(%rip), %rsi     # 0xa52a2
movq %rax, %rdi
callq 0x106fe
leaq 0x68(%rsp), %rdi
callq 0x68d4
leaq 0x18(%rsp), %rdi
callq 0x2090
movq (%rbx), %rbx
movq 0xbc1a0(%rip), %r15     # 0xe2200
movq 0xbc181(%rip), %r14     # 0xe21e8
leaq 0x702db(%rip), %rsi     # 0x96349
leaq 0x18(%rsp), %rdi
leaq 0x8(%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 0x6759b(%rip), %rsi     # 0x8d647
leaq 0x68(%rsp), %rdi
callq 0x106fe
leaq 0x6c4b0(%rip), %rsi     # 0x9256d
movq %rax, %rdi
callq 0x31698
leaq 0x6b526(%rip), %rsi     # 0x915f2
movq %rax, %rdi
callq 0x106fe
leaq 0xbc205(%rip), %rsi     # 0xe22e0
movq %rax, %rdi
callq 0x11052
leaq 0x6755d(%rip), %rsi     # 0x8d647
movq %rax, %rdi
callq 0x106fe
leaq 0x7026f(%rip), %rsi     # 0x96368
movq %rax, %rdi
callq 0x3425c
leaq 0x6b4ea(%rip), %rsi     # 0x915f2
movq %rax, %rdi
callq 0x106fe
movq 0xbc0d1(%rip), %rcx     # 0xe21e8
imulq 0xbc0e1(%rip), %rcx     # 0xe2200
xorl %edx, %edx
testq %rcx, %rcx
cmovgq %rcx, %rdx
addq %rdx, %rdx
leaq 0x10(%rsp), %rsi
movq %rdx, (%rsi)
movq %rax, %rdi
callq 0x11052
leaq 0x7f160(%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 0x2617a
jmp 0x2617a
jmp 0x2617a
jmp 0x2617a
jmp 0x2617a
movq %rax, %rbx
jmp 0x26228
jmp 0x26202
jmp 0x26211
jmp 0x2619b
jmp 0x2619b
jmp 0x261c6
jmp 0x261d5
jmp 0x2619b
jmp 0x2619b
jmp 0x261e4
jmp 0x261f3
jmp 0x2619b
movq %rax, %rbx
jmp 0x2621e
movq %rax, %rbx
leaq 0x18(%rsp), %rdi
callq 0x3166c
jmp 0x261b2
movq %rax, %rbx
leaq 0x68(%rsp), %rdi
callq 0x3166c
jmp 0x26228
jmp 0x261c6
jmp 0x261d5
jmp 0x261e4
jmp 0x261f3
movq %rax, %rbx
leaq 0x68(%rsp), %rdi
callq 0x68d4
jmp 0x2621e
movq %rax, %rbx
leaq 0x68(%rsp), %rdi
callq 0x68d4
jmp 0x2621e
movq %rax, %rbx
leaq 0x68(%rsp), %rdi
callq 0x68d4
jmp 0x2621e
movq %rax, %rbx
leaq 0x68(%rsp), %rdi
callq 0x68d4
jmp 0x2621e
movq %rax, %rbx
leaq 0x68(%rsp), %rdi
callq 0x68d4
jmp 0x2621e
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