// File: dsharlet[P]array/test/array_lifetime.cpp
// Function: void nda::test_copy_assign_lifetime<std::allocator<nda::lifetime_counter>>()
void test_copy_assign_lifetime() {
  lifetime_array<Alloc> source(lifetime_shape);
  lifetime_counter::reset();
  {
    lifetime_array<Alloc> assign;
    assign = source;
  }
  ASSERT_EQ(lifetime_counter::copy_constructs, lifetime_shape.size());
  ASSERT_EQ(lifetime_counter::destructs, lifetime_shape.size());
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x500, %rsp            # imm = 0x500
leaq 0x227c86(%rip), %rsi    # 0x292258
leaq -0x50(%rbp), %rdi
callq 0x7f7e0
callq 0x7f630
leaq -0xa0(%rbp), %rdi
callq 0x89f10
jmp 0x6a5ee
leaq -0xa0(%rbp), %rdi
leaq -0x50(%rbp), %rsi
callq 0x89f40
jmp 0x6a600
leaq -0xa0(%rbp), %rdi
callq 0x7f870
leaq 0x227d25(%rip), %rax    # 0x292338
movq (%rax), %rax
movq %rax, -0x440(%rbp)
leaq 0x227c34(%rip), %rdi    # 0x292258
callq 0x1a900
movq %rax, -0x438(%rbp)
jmp 0x6a632
movq -0x438(%rbp), %rcx
movq -0x440(%rbp), %rax
subq %rcx, %rax
sete %al
movb %al, -0x449(%rbp)
leaq -0x261(%rbp), %rdi
movq %rdi, -0x448(%rbp)
callq 0x33b0
movq -0x448(%rbp), %rdx
leaq 0x17996c(%rip), %rsi    # 0x1e3fd9
leaq -0x260(%rbp), %rdi
callq 0x10a90
jmp 0x6a67b
movb -0x449(%rbp), %al
movzbl %al, %esi
andl $0x1, %esi
leaq -0x240(%rbp), %rdi
leaq -0x260(%rbp), %rdx
callq 0x10f80
jmp 0x6a69c
leaq 0x172142(%rip), %rsi    # 0x1dc7e5
leaq -0x240(%rbp), %rdi
callq 0x34320
movq %rax, -0x458(%rbp)
jmp 0x6a6b8
movq -0x458(%rbp), %rdi
leaq 0x17994e(%rip), %rsi    # 0x1e4014
callq 0x85630
movq %rax, -0x460(%rbp)
jmp 0x6a6d4
movq -0x460(%rbp), %rdi
leaq 0x1760ca(%rip), %rsi    # 0x1e07ac
callq 0x34320
movq %rax, -0x468(%rbp)
jmp 0x6a6f0
movq -0x468(%rbp), %rdi
leaq 0x227c3a(%rip), %rsi    # 0x292338
callq 0x355c0
movq %rax, -0x470(%rbp)
jmp 0x6a70c
movq -0x470(%rbp), %rdi
leaq 0x1720cb(%rip), %rsi    # 0x1dc7e5
callq 0x34320
movq %rax, -0x478(%rbp)
jmp 0x6a728
movq -0x478(%rbp), %rdi
leaq 0x17af6e(%rip), %rsi    # 0x1e56a4
callq 0x34ba0
movq %rax, -0x480(%rbp)
jmp 0x6a744
movq -0x480(%rbp), %rdi
leaq 0x17605a(%rip), %rsi    # 0x1e07ac
callq 0x34320
movq %rax, -0x488(%rbp)
jmp 0x6a760
leaq 0x227af1(%rip), %rdi    # 0x292258
callq 0x1a900
movq %rax, -0x490(%rbp)
jmp 0x6a775
movq -0x488(%rbp), %rdi
movq -0x490(%rbp), %rax
movq %rax, -0x270(%rbp)
leaq -0x270(%rbp), %rsi
callq 0x355c0
movq %rax, -0x498(%rbp)
jmp 0x6a79f
movq -0x498(%rbp), %rdi
leaq 0x18bcce(%rip), %rsi    # 0x1f647b
callq 0x34320
jmp 0x6a7b4
leaq -0x240(%rbp), %rdi
callq 0x10ff0
jmp 0x6a7c2
leaq -0x260(%rbp), %rdi
callq 0x3100
leaq -0x261(%rbp), %rdi
callq 0x3290
leaq 0x227b77(%rip), %rax    # 0x292358
movq (%rax), %rax
movq %rax, -0x4a8(%rbp)
leaq 0x227a66(%rip), %rdi    # 0x292258
callq 0x1a900
movq %rax, -0x4a0(%rbp)
jmp 0x6a800
movq -0x4a0(%rbp), %rcx
movq -0x4a8(%rbp), %rax
subq %rcx, %rax
sete %al
movb %al, -0x4b1(%rbp)
leaq -0x421(%rbp), %rdi
movq %rdi, -0x4b0(%rbp)
callq 0x33b0
movq -0x4b0(%rbp), %rdx
leaq 0x17706e(%rip), %rsi    # 0x1e18a9
leaq -0x420(%rbp), %rdi
callq 0x10a90
jmp 0x6a849
movb -0x4b1(%rbp), %al
movzbl %al, %esi
andl $0x1, %esi
leaq -0x400(%rbp), %rdi
leaq -0x420(%rbp), %rdx
callq 0x10f80
jmp 0x6a86a
leaq 0x171f74(%rip), %rsi    # 0x1dc7e5
leaq -0x400(%rbp), %rdi
callq 0x34320
movq %rax, -0x4c0(%rbp)
jmp 0x6a886
movq -0x4c0(%rbp), %rdi
leaq 0x17704a(%rip), %rsi    # 0x1e18de
callq 0x7f8f0
movq %rax, -0x4c8(%rbp)
jmp 0x6a8a2
movq -0x4c8(%rbp), %rdi
leaq 0x175efc(%rip), %rsi    # 0x1e07ac
callq 0x34320
movq %rax, -0x4d0(%rbp)
jmp 0x6a8be
movq -0x4d0(%rbp), %rdi
leaq 0x227a8c(%rip), %rsi    # 0x292358
callq 0x355c0
movq %rax, -0x4d8(%rbp)
jmp 0x6a8da
movq -0x4d8(%rbp), %rdi
leaq 0x171efd(%rip), %rsi    # 0x1dc7e5
callq 0x34320
movq %rax, -0x4e0(%rbp)
jmp 0x6a8f6
movq -0x4e0(%rbp), %rdi
leaq 0x17ada0(%rip), %rsi    # 0x1e56a4
callq 0x34ba0
movq %rax, -0x4e8(%rbp)
jmp 0x6a912
movq -0x4e8(%rbp), %rdi
leaq 0x175e8c(%rip), %rsi    # 0x1e07ac
callq 0x34320
movq %rax, -0x4f0(%rbp)
jmp 0x6a92e
leaq 0x227923(%rip), %rdi    # 0x292258
callq 0x1a900
movq %rax, -0x4f8(%rbp)
jmp 0x6a943
movq -0x4f0(%rbp), %rdi
movq -0x4f8(%rbp), %rax
movq %rax, -0x430(%rbp)
leaq -0x430(%rbp), %rsi
callq 0x355c0
movq %rax, -0x500(%rbp)
jmp 0x6a96d
movq -0x500(%rbp), %rdi
leaq 0x18bb00(%rip), %rsi    # 0x1f647b
callq 0x34320
jmp 0x6a982
leaq -0x400(%rbp), %rdi
callq 0x10ff0
jmp 0x6a990
leaq -0x420(%rbp), %rdi
callq 0x3100
leaq -0x421(%rbp), %rdi
callq 0x3290
leaq -0x50(%rbp), %rdi
callq 0x7f870
addq $0x500, %rsp            # imm = 0x500
popq %rbp
retq
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0xa8(%rbp)
movl %eax, -0xac(%rbp)
jmp 0x6aaba
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0xa8(%rbp)
movl %eax, -0xac(%rbp)
leaq -0xa0(%rbp), %rdi
callq 0x7f870
jmp 0x6aaba
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0xa8(%rbp)
movl %eax, -0xac(%rbp)
jmp 0x6aa4a
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0xa8(%rbp)
movl %eax, -0xac(%rbp)
jmp 0x6aa3e
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0xa8(%rbp)
movl %eax, -0xac(%rbp)
leaq -0x240(%rbp), %rdi
callq 0x10ff0
jmp 0x6aa3c
jmp 0x6aa3e
leaq -0x260(%rbp), %rdi
callq 0x3100
leaq -0x261(%rbp), %rdi
callq 0x3290
jmp 0x6aaba
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0xa8(%rbp)
movl %eax, -0xac(%rbp)
jmp 0x6aaae
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0xa8(%rbp)
movl %eax, -0xac(%rbp)
jmp 0x6aaa2
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0xa8(%rbp)
movl %eax, -0xac(%rbp)
leaq -0x400(%rbp), %rdi
callq 0x10ff0
jmp 0x6aaa0
jmp 0x6aaa2
leaq -0x420(%rbp), %rdi
callq 0x3100
leaq -0x421(%rbp), %rdi
callq 0x3290
leaq -0x50(%rbp), %rdi
callq 0x7f870
movq -0xa8(%rbp), %rdi
callq 0x33a0
movq %rax, %rdi
callq 0x116d0
nopw (%rax,%rax)