// File: dsharlet[P]array/test/array.cpp
// Function: nda::test_array_dense_move_body()
TEST(array_dense_move) {
  array_of_rank<int, 3> source({dim<>(-3, 4, 2), 5, 6});
  fill_pattern(source);
  ASSERT(!source.is_compact());

  dense_array<int, 3> dense_move = make_compact_move(source);
  ASSERT(dense_move.is_compact());
  check_pattern(dense_move);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x530, %rsp            # imm = 0x530
leaq -0xc8(%rbp), %rdi
movq $-0x3, %rsi
movl $0x4, %edx
movl $0x2, %ecx
callq 0x10c60
movq -0xb8(%rbp), %rcx
movq %rsp, %rax
movq %rcx, 0x10(%rax)
movups -0xc8(%rbp), %xmm0
movups %xmm0, (%rax)
leaq -0xb0(%rbp), %rdi
movq %rdi, -0x4e0(%rbp)
movl $0x5, %esi
movl $0x6, %edx
callq 0x35aa0
movq -0x4e0(%rbp), %rsi
leaq -0x68(%rbp), %rdi
movq %rdi, -0x4d8(%rbp)
callq 0x34f10
movq -0x4d8(%rbp), %rdi
xorl %esi, %esi
callq 0x34fb0
jmp 0x279f4
leaq -0x68(%rbp), %rdi
callq 0x36470
movb %al, -0x4e1(%rbp)
jmp 0x27a05
movb -0x4e1(%rbp), %al
xorb $0x1, %al
movb %al, -0x4f1(%rbp)
leaq -0x289(%rbp), %rdi
movq %rdi, -0x4f0(%rbp)
callq 0x33b0
movq -0x4f0(%rbp), %rdx
leaq 0x1b6b51(%rip), %rsi    # 0x1de585
leaq -0x288(%rbp), %rdi
callq 0x10a90
jmp 0x27a42
movb -0x4f1(%rbp), %al
movzbl %al, %esi
andl $0x1, %esi
leaq -0x268(%rbp), %rdi
leaq -0x288(%rbp), %rdx
callq 0x10f80
jmp 0x27a63
leaq -0x268(%rbp), %rdi
callq 0x10ff0
jmp 0x27a71
leaq -0x288(%rbp), %rdi
callq 0x3100
leaq -0x289(%rbp), %rdi
callq 0x3290
leaq -0x2f9(%rbp), %rdi
movq %rdi, -0x500(%rbp)
callq 0x10e30
movq -0x500(%rbp), %rdx
leaq -0x2f8(%rbp), %rdi
leaq -0x68(%rbp), %rsi
callq 0x36520
jmp 0x27ab5
leaq -0x2f9(%rbp), %rdi
callq 0x10e50
leaq -0x2f8(%rbp), %rdi
callq 0x364f0
movb %al, -0x501(%rbp)
jmp 0x27ad5
leaq -0x4b1(%rbp), %rdi
movq %rdi, -0x510(%rbp)
callq 0x33b0
movq -0x510(%rbp), %rdx
leaq 0x1b6acd(%rip), %rsi    # 0x1de5c3
leaq -0x4b0(%rbp), %rdi
callq 0x10a90
jmp 0x27b04
movb -0x501(%rbp), %al
movzbl %al, %esi
andl $0x1, %esi
leaq -0x490(%rbp), %rdi
leaq -0x4b0(%rbp), %rdx
callq 0x10f80
jmp 0x27b25
leaq -0x490(%rbp), %rdi
callq 0x10ff0
jmp 0x27b33
leaq -0x4b0(%rbp), %rdi
callq 0x3100
leaq -0x4b1(%rbp), %rdi
callq 0x3290
leaq -0x4d0(%rbp), %rdi
movq %rdi, -0x518(%rbp)
callq 0x35c10
movq -0x518(%rbp), %rsi
leaq -0x2f8(%rbp), %rdi
callq 0x35be0
jmp 0x27b73
leaq -0x2f8(%rbp), %rdi
callq 0x11110
leaq -0x68(%rbp), %rdi
callq 0x35160
addq $0x530, %rsp            # imm = 0x530
popq %rbp
retq
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0xd0(%rbp)
movl %eax, -0xd4(%rbp)
jmp 0x27c66
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0xd0(%rbp)
movl %eax, -0xd4(%rbp)
jmp 0x27bda
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0xd0(%rbp)
movl %eax, -0xd4(%rbp)
leaq -0x288(%rbp), %rdi
callq 0x3100
leaq -0x289(%rbp), %rdi
callq 0x3290
jmp 0x27c66
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0xd0(%rbp)
movl %eax, -0xd4(%rbp)
leaq -0x2f9(%rbp), %rdi
callq 0x10e50
jmp 0x27c66
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0xd0(%rbp)
movl %eax, -0xd4(%rbp)
jmp 0x27c5a
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0xd0(%rbp)
movl %eax, -0xd4(%rbp)
jmp 0x27c4e
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0xd0(%rbp)
movl %eax, -0xd4(%rbp)
leaq -0x4b0(%rbp), %rdi
callq 0x3100
leaq -0x4b1(%rbp), %rdi
callq 0x3290
leaq -0x2f8(%rbp), %rdi
callq 0x11110
leaq -0x68(%rbp), %rdi
callq 0x35160
movq -0xd0(%rbp), %rdi
callq 0x33a0
nopl (%rax,%rax)