// File: /workspace/github_cpp_makefile_star2_O1/dsharlet[P]array/test/array.cpp
// Function: nda::test_array_move_body()
TEST(array_move) {
  array_of_rank<int, 3> a({4, 5, 6});
  fill_pattern(a);

  dense_array<int, 3> b({4, 5, 6});
  move(a, b);
  check_pattern(b);

  array_of_rank<int, 3> c({dim<>(0, 4, 2), 5, 6});
  move(b, c);
  check_pattern(c);

  array_of_rank<int, 3> d = make_move(a, c.shape());
  ASSERT_EQ(c.shape(), d.shape());
  check_pattern(d);

  dense_array<int, 3> e = make_move(a, b.shape());
  ASSERT_EQ(b.shape(), e.shape());
  check_pattern(e);

  dense_array<int, 3> g({4, {1, 2}, 5});
  move(a, g);
  check_pattern(g);
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x468, %rsp            # imm = 0x468
movabsq $-0x8000000000000000, %r13 # imm = 0x8000000000000000
leaq 0x228(%rsp), %rbx
xorps %xmm0, %xmm0
movups %xmm0, -0x8(%rbx)
movups %xmm0, -0x18(%rbx)
movq $0x6, 0x8(%rbx)
movq %r13, 0x10(%rbx)
xorl %eax, %eax
movq %rax, 0x18(%rbx)
movq $0x5, 0x20(%rbx)
movq %r13, 0x28(%rbx)
movq %rax, 0x30(%rbx)
movq $0x4, 0x38(%rbx)
movq %r13, 0x40(%rbx)
leaq 0x208(%rsp), %r14
movq %r14, %rdi
callq 0x1a362
movq %r14, %rdi
callq 0x1a43a
movq 0x18(%r14), %rcx
leaq 0x278(%rsp), %rax
movq %rcx, -0x8(%rax)
movl $0x9, %ecx
movq %rax, %rdi
movq %rbx, %rsi
rep  movsq (%rsi), %es:(%rdi)
leaq 0x130(%rsp), %rcx
movl $0x0, (%rcx)
leaq 0xc8(%rsp), %rsi
movq %rcx, (%rsi)
leaq 0x270(%rsp), %rcx
movq %rcx, 0x8(%rsi)
movq %rax, %rdi
callq 0x1d4b4
leaq 0x270(%rsp), %rsi
movq $0x0, (%rsi)
movq $0x4, 0x8(%rsi)
movq %r13, 0x10(%rsi)
xorl %edi, %edi
callq 0xd09f
xorps %xmm0, %xmm0
leaq 0xc8(%rsp), %rdi
movups %xmm0, 0x8(%rdi)
movups %xmm0, 0x18(%rdi)
movq $0x6, 0x28(%rdi)
movq %r13, 0x30(%rdi)
xorl %eax, %eax
movq %rax, 0x38(%rdi)
movq $0x5, 0x40(%rdi)
movq %r13, 0x48(%rdi)
movq %rax, 0x50(%rdi)
movq $0x4, 0x58(%rdi)
callq 0xc2a2
leaq 0xc8(%rsp), %rdi
callq 0xc38a
leaq 0xe8(%rsp), %r14
movq 0x220(%rsp), %rax
leaq 0x278(%rsp), %rdi
movq %rax, -0x8(%rdi)
movl $0x9, %ecx
movq %rbx, %rsi
rep  movsq (%rsi), %es:(%rdi)
movq -0x8(%r14), %rax
leaq 0x138(%rsp), %rdi
movq %rax, -0x8(%rdi)
movl $0x9, %ecx
movq %r14, %rsi
rep  movsq (%rsi), %es:(%rdi)
leaq 0x270(%rsp), %r15
leaq 0x130(%rsp), %r12
movq %r15, %rdi
movq %r12, %rsi
callq 0x1bdc3
xorps %xmm0, %xmm0
movaps %xmm0, 0x130(%rsp)
movq $0x0, 0x140(%rsp)
movq 0xe0(%rsp), %rcx
leaq 0x278(%rsp), %rax
movq %rcx, -0x8(%rax)
movl $0x9, %ecx
movq %rax, %rdi
movq %r14, %rsi
rep  movsq (%rsi), %es:(%rdi)
leaq 0x1a0(%rsp), %rsi
movq %r15, (%rsi)
movq %r12, 0x8(%rsi)
movq %rax, %rdi
callq 0x1e56e
leaq 0x130(%rsp), %rdi
xorps %xmm0, %xmm0
movups %xmm0, 0x18(%rdi)
movups %xmm0, 0x8(%rdi)
movq $0x6, 0x28(%rdi)
movq %r13, 0x30(%rdi)
xorl %eax, %eax
movq %rax, 0x38(%rdi)
movq $0x5, 0x40(%rdi)
movq %r13, 0x48(%rdi)
movq %rax, 0x50(%rdi)
movq $0x4, 0x58(%rdi)
movq $0x2, 0x60(%rdi)
callq 0x1a362
leaq 0x130(%rsp), %rdi
callq 0x1a43a
leaq 0x150(%rsp), %r13
movq 0xe0(%rsp), %rax
leaq 0x278(%rsp), %rdi
movq %rax, -0x8(%rdi)
movl $0x9, %ecx
movq %r14, %rsi
rep  movsq (%rsi), %es:(%rdi)
movq -0x8(%r13), %rax
leaq 0x1a8(%rsp), %rdi
movq %rax, -0x8(%rdi)
movl $0x9, %ecx
movq %r13, %rsi
rep  movsq (%rsi), %es:(%rdi)
leaq 0x270(%rsp), %r15
leaq 0x1a0(%rsp), %r12
movq %r15, %rdi
movq %r12, %rsi
callq 0x1f4a9
xorps %xmm0, %xmm0
movaps %xmm0, 0x1a0(%rsp)
movq $0x0, 0x1b0(%rsp)
movq 0x148(%rsp), %rcx
leaq 0x278(%rsp), %rax
movq %rcx, -0x8(%rax)
movl $0x9, %ecx
movq %rax, %rdi
movq %r13, %rsi
rep  movsq (%rsi), %es:(%rdi)
movq %rsp, %rsi
movq %r15, (%rsi)
movq %r12, 0x8(%rsi)
movq %rax, %rdi
callq 0x1eda4
movq 0x220(%rsp), %rax
leaq 0x278(%rsp), %rdi
movq %rax, -0x8(%rdi)
movl $0x9, %ecx
movq %rbx, %rsi
rep  movsq (%rsi), %es:(%rdi)
leaq 0x1a0(%rsp), %rdi
leaq 0x270(%rsp), %rsi
movq %rsp, %rcx
movq %r13, %rdx
callq 0x1b97f
leaq 0x1c0(%rsp), %r15
movq %r13, %rdi
movq %r15, %rsi
callq 0x1d87a
movl %eax, %ebp
leaq 0x10(%rsp), %r14
movq %r14, -0x10(%r14)
leaq 0x8d886(%rip), %rsi     # 0xa2fca
leaq 0x8d895(%rip), %rdx     # 0xa2fe0
movq %rsp, %rdi
callq 0xd0b8
movzbl %bpl, %esi
leaq 0x270(%rsp), %rdi
movq %rsp, %r12
movq %r12, %rdx
callq 0xbf0a
leaq 0x8bee3(%rip), %rsi     # 0xa1654
leaq 0x270(%rsp), %rdi
callq 0x18a16
leaq 0x8d85c(%rip), %rsi     # 0xa2fe1
movq %rax, %rdi
callq 0x18a86
leaq 0x8fb96(%rip), %rsi     # 0xa532a
movq %rax, %rdi
callq 0x18a16
movq %rax, %rbp
cmpb $0x1, 0x188(%rax)
jne 0x157b7
movq %rbp, %rdi
addq $0x10, %rdi
movq %r13, %rsi
callq 0x1f0cd
leaq 0x8be96(%rip), %rsi     # 0xa1654
movq %rbp, %rdi
callq 0x18a16
leaq 0x8d80a(%rip), %rsi     # 0xa2fd7
movq %rax, %rdi
callq 0x18a86
leaq 0x8fb4e(%rip), %rsi     # 0xa532a
movq %rax, %rdi
callq 0x18a16
movq %rax, %r13
cmpb $0x1, 0x188(%rax)
jne 0x157ff
movq %r13, %rdi
addq $0x10, %rdi
movq %r15, %rsi
callq 0x1f0cd
leaq 0xa2b63(%rip), %rsi     # 0xb8369
movq %r13, %rdi
callq 0x18a16
leaq 0x270(%rsp), %r13
movq %r13, %rdi
callq 0xbf62
movq (%rsp), %rdi
cmpq %r14, %rdi
je 0x15834
movq 0x10(%rsp), %rsi
incq %rsi
callq 0x21f0
xorps %xmm0, %xmm0
movaps %xmm0, (%rsp)
movq $0x0, 0x10(%rsp)
movq 0x1b8(%rsp), %rcx
leaq 0x278(%rsp), %rax
movq %rcx, -0x8(%rax)
movl $0x9, %ecx
movq %rax, %rdi
movq %r15, %rsi
rep  movsq (%rsi), %es:(%rdi)
leaq 0x70(%rsp), %rsi
movq %r13, (%rsi)
movq %r12, 0x8(%rsi)
movq %rax, %rdi
callq 0x1eda4
leaq 0xe8(%rsp), %r14
movq 0x220(%rsp), %rax
leaq 0x278(%rsp), %rdi
movq %rax, -0x8(%rdi)
movl $0x9, %ecx
movq %rbx, %rsi
rep  movsq (%rsi), %es:(%rdi)
movq %rsp, %rdi
leaq 0x270(%rsp), %rsi
leaq 0x70(%rsp), %rcx
movq %r14, %rdx
callq 0x1bc26
movq 0x118(%rsp), %rax
xorl %ebp, %ebp
cmpq 0x50(%rsp), %rax
jne 0x15939
movq 0x58(%rsp), %rax
cmpq %rax, 0x120(%rsp)
jne 0x15939
movq 0x100(%rsp), %rax
cmpq 0x38(%rsp), %rax
jne 0x15937
movq 0x108(%rsp), %rax
cmpq 0x40(%rsp), %rax
jne 0x15937
movq 0x110(%rsp), %rax
cmpq 0x48(%rsp), %rax
jne 0x15937
movq 0xe8(%rsp), %rax
cmpq 0x20(%rsp), %rax
jne 0x15937
movq 0xf0(%rsp), %rax
cmpq 0x28(%rsp), %rax
jne 0x15937
movq 0xf8(%rsp), %rax
cmpq 0x30(%rsp), %rax
sete %bpl
jmp 0x15939
xorl %ebp, %ebp
leaq 0x80(%rsp), %r13
movq %r13, -0x10(%r13)
leaq 0x8d69f(%rip), %rsi     # 0xa2feb
leaq 0x8d6ae(%rip), %rdx     # 0xa3001
leaq 0x70(%rsp), %rdi
callq 0xd0b8
movzbl %bpl, %esi
leaq 0x270(%rsp), %rdi
leaq 0x70(%rsp), %r15
movq %r15, %rdx
callq 0xbf0a
leaq 0x8bcd7(%rip), %rsi     # 0xa1654
leaq 0x270(%rsp), %rdi
callq 0x18a16
leaq 0x8d671(%rip), %rsi     # 0xa3002
movq %rax, %rdi
callq 0x18a86
leaq 0x8f98a(%rip), %rsi     # 0xa532a
movq %rax, %rdi
callq 0x18a16
movq %rax, %r12
cmpb $0x1, 0x188(%rax)
jne 0x159c3
movq %r12, %rdi
addq $0x10, %rdi
movq %r14, %rsi
callq 0x1f22d
leaq 0x8bc8a(%rip), %rsi     # 0xa1654
movq %r12, %rdi
callq 0x18a16
leaq 0x8d61f(%rip), %rsi     # 0xa2ff8
movq %rax, %rdi
callq 0x18a86
leaq 0x8f942(%rip), %rsi     # 0xa532a
movq %rax, %rdi
callq 0x18a16
movq %rax, %r12
leaq 0x20(%rsp), %r14
cmpb $0x1, 0x188(%rax)
jne 0x15a10
movq %r12, %rdi
addq $0x10, %rdi
movq %r14, %rsi
callq 0x1f22d
leaq 0xa2952(%rip), %rsi     # 0xb8369
movq %r12, %rdi
callq 0x18a16
leaq 0x270(%rsp), %r12
movq %r12, %rdi
callq 0xbf62
movq 0x70(%rsp), %rdi
cmpq %r13, %rdi
je 0x15a49
movq 0x80(%rsp), %rsi
incq %rsi
callq 0x21f0
xorps %xmm0, %xmm0
movaps %xmm0, 0x70(%rsp)
movq $0x0, 0x80(%rsp)
movq 0x18(%rsp), %rcx
leaq 0x278(%rsp), %rax
movq %rcx, -0x8(%rax)
movl $0x9, %ecx
movq %rax, %rdi
movq %r14, %rsi
rep  movsq (%rsi), %es:(%rdi)
leaq 0x400(%rsp), %rsi
movq %r12, (%rsi)
movq %r15, 0x8(%rsi)
movq %rax, %rdi
callq 0x1e56e
movabsq $-0x8000000000000000, %r14 # imm = 0x8000000000000000
leaq 0x70(%rsp), %rsi
movq $0x0, (%rsi)
movq $0x4, 0x8(%rsi)
movq $0x1, 0x10(%rsi)
xorl %edi, %edi
callq 0xd09f
xorps %xmm0, %xmm0
leaq 0x270(%rsp), %rdi
movups %xmm0, 0x8(%rdi)
movups %xmm0, 0x18(%rdi)
movq $0x5, 0x28(%rdi)
movq %r14, 0x30(%rdi)
movq $0x1, 0x38(%rdi)
movq $0x2, 0x40(%rdi)
movq %r14, 0x48(%rdi)
movq $0x0, 0x50(%rdi)
movq $0x4, 0x58(%rdi)
callq 0xc2a2
leaq 0x270(%rsp), %rdi
callq 0xc38a
leaq 0x290(%rsp), %r14
movq 0x220(%rsp), %rax
leaq 0x78(%rsp), %rdi
movq %rax, -0x8(%rdi)
movl $0x9, %ecx
movq %rbx, %rsi
rep  movsq (%rsi), %es:(%rdi)
movq -0x8(%r14), %rax
leaq 0x408(%rsp), %rdi
movq %rax, -0x8(%rdi)
movl $0x9, %ecx
movq %r14, %rsi
rep  movsq (%rsi), %es:(%rdi)
leaq 0x70(%rsp), %rbx
leaq 0x400(%rsp), %r15
movq %rbx, %rdi
movq %r15, %rsi
callq 0x1bdc3
xorps %xmm0, %xmm0
movaps %xmm0, 0x400(%rsp)
movq $0x0, 0x410(%rsp)
movq 0x288(%rsp), %rcx
leaq 0x78(%rsp), %rax
movq %rcx, -0x8(%rax)
movl $0x9, %ecx
movq %rax, %rdi
movq %r14, %rsi
rep  movsq (%rsi), %es:(%rdi)
leaq 0x458(%rsp), %rsi
movq %rbx, (%rsi)
movq %r15, 0x8(%rsi)
movq %rax, %rdi
callq 0x1e56e
leaq 0x270(%rsp), %rdi
callq 0xd16c
movq %rsp, %rdi
callq 0xd16c
leaq 0x1a0(%rsp), %rdi
callq 0x1d3b4
leaq 0x130(%rsp), %rdi
callq 0x1d3b4
leaq 0xc8(%rsp), %rdi
callq 0xd16c
leaq 0x208(%rsp), %rdi
callq 0x1d3b4
addq $0x468, %rsp            # imm = 0x468
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
jmp 0x15d2e
jmp 0x15d2e
jmp 0x15d2e
jmp 0x15d2e
jmp 0x15d2e
jmp 0x15d2e
jmp 0x15c34
movq %rax, %rbx
leaq 0x270(%rsp), %rdi
callq 0xd16c
jmp 0x15cb8
jmp 0x15d2e
jmp 0x15c81
jmp 0x15c81
jmp 0x15c55
jmp 0x15c55
jmp 0x15c55
movq %rax, %rbx
jmp 0x15cea
jmp 0x15c61
jmp 0x15c61
movq %rax, %rbx
jmp 0x15cf7
jmp 0x15c79
jmp 0x15c79
jmp 0x15c86
movq %rax, %rbx
jmp 0x15c9e
movq %rax, %rbx
jmp 0x15cd4
movq %rax, %rbx
jmp 0x15d04
movq %rax, %rbx
jmp 0x15cb8
movq %rax, %rbx
jmp 0x15d11
movq %rax, %rbx
leaq 0x270(%rsp), %rdi
callq 0xbf62
movq 0x70(%rsp), %rdi
cmpq %r13, %rdi
je 0x15cb8
movq 0x80(%rsp), %rsi
incq %rsi
callq 0x21f0
movq %rsp, %rdi
callq 0xd16c
jmp 0x15cea
jmp 0x15d2e
movq %rax, %rbx
leaq 0x270(%rsp), %rdi
callq 0xbf62
movq (%rsp), %rdi
cmpq %r14, %rdi
je 0x15cea
movq 0x10(%rsp), %rsi
incq %rsi
callq 0x21f0
leaq 0x1a0(%rsp), %rdi
callq 0x1d3b4
leaq 0x130(%rsp), %rdi
callq 0x1d3b4
leaq 0xc8(%rsp), %rdi
callq 0xd16c
leaq 0x208(%rsp), %rdi
callq 0x1d3b4
movq %rbx, %rdi
callq 0x2300
jmp 0x15d2e
jmp 0x15d2e
jmp 0x15d2e
jmp 0x15d2e
movq %rax, %rdi
callq 0xc036