// File: /workspace/github_cpp_makefile_star2_O2/dsharlet[P]array/test/array.cpp
// Function: nda::test_array_fill_constructor_body()
TEST(array_fill_constructor) {
  dense_array<int, 1> a({10}, 3);
  for (int x = 0; x < 10; x++) {
    ASSERT_EQ(a(x), 3);
  }

  dense_array<int, 2> b({7, 3}, 5);
  for (int y = 0; y < 3; y++) {
    for (int x = 0; x < 7; x++) {
      ASSERT_EQ(b(x, y), 5);
    }
  }

  dense_array<int, 3> c({5, 9, 3}, 7);
  for (int z = 0; z < 3; z++) {
    for (int y = 0; y < 9; y++) {
      for (int x = 0; x < 5; x++) {
        ASSERT_EQ(c(x, y, z), 7);
      }
    }
  }

  array<int, shape<dim<>, dim<>>> sparse({{-2, 5, 2}, {4, 10, 20}}, 13);
  for (int y = 4; y < 14; y++) {
    for (int x = -2; x < 3; x++) {
      ASSERT_EQ(sparse(x, y), 13);
    }
  }
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x308, %rsp            # imm = 0x308
leaq 0x178(%rsp), %rbx
pushq $0xa
popq %rsi
movq %rbx, %rdi
callq 0x106be
leaq 0x110(%rsp), %r14
movl $0x3, (%r14)
leaq 0xd8(%rsp), %rdi
movq %rbx, %rsi
movq %r14, %rdx
callq 0x10a16
xorl %ebp, %ebp
leaq 0x82031(%rip), %r13     # 0x8d647
leaq 0x85fd5(%rip), %r15     # 0x915f2
cmpq $0x28, %rbp
je 0xb718
movq 0xf0(%rsp), %rax
movq 0xf8(%rsp), %rcx
shlq $0x2, %rcx
subq %rcx, %rax
movl (%rbp,%rax), %r12d
movq %r14, %rdi
leaq 0x83acf(%rip), %rsi     # 0x8f11c
leaq 0x88(%rsp), %rdx
callq 0x66a0
xorl %esi, %esi
cmpl $0x3, %r12d
sete %sil
movq %rbx, %rdi
movq %r14, %rdx
callq 0x6894
movq %rbx, %rdi
movq %r13, %rsi
callq 0x106fe
movq %rax, %rdi
leaq 0x837f1(%rip), %rsi     # 0x8ee75
callq 0x1071a
movq %rax, %rdi
movq %r15, %rsi
callq 0x106fe
movq 0xf0(%rsp), %rsi
movq 0xf8(%rsp), %rcx
shlq $0x2, %rcx
subq %rcx, %rsi
addq %rbp, %rsi
movq %rax, %rdi
callq 0x10736
movq %rax, %rdi
movq %r13, %rsi
callq 0x106fe
movq %rax, %rdi
leaq 0x8c81e(%rip), %rsi     # 0x97ee9
callq 0x106fe
movq %rax, %rdi
movq %r15, %rsi
callq 0x106fe
movl $0x3, 0x38(%rsp)
movq %rax, %rdi
leaq 0x38(%rsp), %rsi
callq 0x10736
movq %rax, %rdi
leaq 0x99ba8(%rip), %rsi     # 0xa52a2
callq 0x106fe
movq %rbx, %rdi
callq 0x68d4
movq %r14, %rdi
callq 0x2090
addq $0x4, %rbp
jmp 0xb61d
leaq 0x178(%rsp), %rdi
pushq $0x7
popq %rsi
pushq $0x3
popq %rdx
callq 0x10754
leaq 0x110(%rsp), %rdx
movl $0x5, (%rdx)
leaq 0x38(%rsp), %rdi
leaq 0x178(%rsp), %rsi
callq 0x10a68
xorl %r15d, %r15d
leaq 0x110(%rsp), %r12
leaq 0x81eea(%rip), %r13     # 0x8d647
leaq 0x85e8e(%rip), %rbp     # 0x915f2
cmpq $0x3, %r15
je 0xb8b0
xorl %r14d, %r14d
cmpq $0x1c, %r14
je 0xb8a8
movq %r13, %rbx
movq 0x70(%rsp), %rax
movq %r15, %rcx
subq 0x58(%rsp), %rcx
imulq 0x68(%rsp), %rcx
shlq $0x2, %rcx
shlq $0x2, %rax
subq %rax, %rcx
addq 0x50(%rsp), %rcx
movl (%r14,%rcx), %r13d
movq %r12, %rdi
leaq 0x83977(%rip), %rsi     # 0x8f126
leaq 0x18(%rsp), %rdx
callq 0x66a0
movq %r14, 0x10(%rsp)
xorl %esi, %esi
cmpl $0x5, %r13d
sete %sil
leaq 0x178(%rsp), %r14
movq %r14, %rdi
movq %r12, %rdx
callq 0x6894
movq %rbx, %r13
movq %r14, %rdi
movq %rbx, %rsi
callq 0x106fe
movq %rax, %rdi
leaq 0x836c8(%rip), %rsi     # 0x8eebb
callq 0x107f4
movq %rax, %rdi
movq %rbp, %rsi
callq 0x106fe
movq 0x70(%rsp), %rcx
movq %r15, %rsi
subq 0x58(%rsp), %rsi
imulq 0x68(%rsp), %rsi
shlq $0x2, %rsi
shlq $0x2, %rcx
subq %rcx, %rsi
addq 0x50(%rsp), %rsi
addq 0x10(%rsp), %rsi
movq %rax, %rdi
callq 0x10736
movq %rax, %rdi
movq %r13, %rsi
callq 0x106fe
movq %rax, %rdi
leaq 0x83cd1(%rip), %rsi     # 0x8f519
callq 0x106fe
movq %rax, %rdi
movq %rbp, %rsi
callq 0x106fe
movl $0x5, 0x88(%rsp)
movq %rax, %rdi
leaq 0x88(%rsp), %rsi
callq 0x10736
movq %rax, %rdi
leaq 0x99a25(%rip), %rsi     # 0xa52a2
callq 0x106fe
movq %r14, %rdi
callq 0x68d4
leaq 0x110(%rsp), %r12
movq %r12, %rdi
callq 0x2090
movq 0x10(%rsp), %r14
addq $0x4, %r14
jmp 0xb771
incq %r15
jmp 0xb764
leaq 0x178(%rsp), %rdi
pushq $0x5
popq %rsi
pushq $0x9
popq %rdx
pushq $0x3
popq %rcx
callq 0x10810
leaq 0x88(%rsp), %rdx
movl $0x7, (%rdx)
leaq 0x110(%rsp), %rdi
leaq 0x178(%rsp), %rsi
callq 0x10ac4
xorl %ebx, %ebx
leaq 0x88(%rsp), %r12
leaq 0x178(%rsp), %rbp
cmpl $0x3, %ebx
je 0xba27
xorl %r14d, %r14d
cmpl $0x9, %r14d
je 0xba20
xorl %r15d, %r15d
cmpl $0x5, %r15d
je 0xba18
leaq 0x110(%rsp), %rdi
movl %r15d, %esi
movl %r14d, %edx
movl %ebx, %ecx
callq 0x1084a
movl (%rax), %r13d
movq %r12, %rdi
leaq 0x837f3(%rip), %rsi     # 0x8f133
leaq 0xc(%rsp), %rdx
callq 0x66a0
xorl %esi, %esi
cmpl $0x7, %r13d
sete %sil
movq %rbp, %rdi
movq %r12, %rdx
callq 0x6894
movq %rbp, %rdi
leaq 0x81cde(%rip), %rsi     # 0x8d647
callq 0x106fe
movq %rax, %rdi
leaq 0x835ae(%rip), %rsi     # 0x8ef26
callq 0x107d8
movq %rax, %rdi
leaq 0x85c6b(%rip), %rsi     # 0x915f2
callq 0x106fe
movq %rax, %r13
leaq 0x110(%rsp), %rdi
movl %r15d, %esi
movl %r14d, %edx
movl %ebx, %ecx
callq 0x1084a
movq %r13, %rdi
movq %rax, %rsi
callq 0x10736
movq %rax, %rdi
leaq 0x81c8e(%rip), %rsi     # 0x8d647
callq 0x106fe
movq %rax, %rdi
leaq 0x834bf(%rip), %rsi     # 0x8ee87
callq 0x106fe
movq %rax, %rdi
leaq 0x85c1b(%rip), %rsi     # 0x915f2
callq 0x106fe
movl $0x7, 0x18(%rsp)
movq %rax, %rdi
leaq 0x18(%rsp), %rsi
callq 0x10736
movq %rax, %rdi
leaq 0x998a7(%rip), %rsi     # 0xa52a2
callq 0x106fe
movq %rbp, %rdi
callq 0x68d4
movq %r12, %rdi
callq 0x2090
incl %r15d
jmp 0xb914
incl %r14d
jmp 0xb907
incl %ebx
jmp 0xb8fb
leaq 0x178(%rsp), %rsi
movq $0x4, (%rsi)
movq $0xa, 0x8(%rsi)
movq $0x14, 0x10(%rsi)
movq $-0x2, 0x18(%rsi)
movq $0x5, 0x20(%rsi)
movq $0x2, 0x28(%rsi)
leaq 0x18(%rsp), %rdx
movl $0xd, (%rdx)
leaq 0x88(%rsp), %rdi
callq 0x10b18
pushq $0x4
popq %rbx
leaq 0x18(%rsp), %r12
leaq 0x178(%rsp), %rbp
leaq 0x85b65(%rip), %r13     # 0x915f2
cmpl $0xe, %ebx
je 0xbb97
pushq $-0x2
popq %r14
cmpl $0x3, %r14d
je 0xbb90
leaq 0x88(%rsp), %rdi
movl %r14d, %esi
movl %ebx, %edx
callq 0x108b2
movl (%rax), %r15d
movq %r12, %rdi
leaq 0x83680(%rip), %rsi     # 0x8f143
leaq 0xb(%rsp), %rdx
callq 0x66a0
xorl %esi, %esi
cmpl $0xd, %r15d
sete %sil
movq %rbp, %rdi
movq %r12, %rdx
callq 0x6894
movq %rbp, %rdi
leaq 0x81b5b(%rip), %rsi     # 0x8d647
callq 0x106fe
movq %rax, %rdi
leaq 0x83491(%rip), %rsi     # 0x8ef8c
callq 0x1082e
movq %rax, %rdi
movq %r13, %rsi
callq 0x106fe
movq %rax, %r15
leaq 0x88(%rsp), %rdi
movl %r14d, %esi
movl %ebx, %edx
callq 0x108b2
movq %r15, %rdi
movq %rax, %rsi
callq 0x10736
movq %rax, %rdi
leaq 0x81b12(%rip), %rsi     # 0x8d647
callq 0x106fe
movq %rax, %rdi
leaq 0x8360f(%rip), %rsi     # 0x8f153
callq 0x10896
movq %rax, %rdi
movq %r13, %rsi
callq 0x106fe
movl $0xd, 0xc(%rsp)
movq %rax, %rdi
leaq 0xc(%rsp), %rsi
callq 0x10736
movq %rax, %rdi
leaq 0x9972f(%rip), %rsi     # 0xa52a2
callq 0x106fe
movq %rbp, %rdi
callq 0x68d4
movq %r12, %rdi
callq 0x2090
incl %r14d
jmp 0xba9a
incl %ebx
jmp 0xba8d
leaq 0x88(%rsp), %rdi
callq 0x6aca
leaq 0x110(%rsp), %rdi
callq 0x69c2
leaq 0x38(%rsp), %rdi
callq 0x108fe
leaq 0xd8(%rsp), %rdi
callq 0x1090e
addq $0x308, %rsp            # imm = 0x308
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
jmp 0xbc7f
jmp 0xbc1f
jmp 0xbc1f
jmp 0xbbe7
jmp 0xbbe7
movq %rax, %rbx
jmp 0xbcbf
jmp 0xbbf6
movq %rax, %rbx
jmp 0xbc06
movq %rax, %rbx
leaq 0x178(%rsp), %rdi
callq 0x68d4
leaq 0x110(%rsp), %rdi
callq 0x2090
jmp 0xbcbf
jmp 0xbc1a
movq %rax, %rbx
jmp 0xbc4f
movq %rax, %rbx
jmp 0xbcb5
jmp 0xbc35
movq %rax, %rbx
jmp 0xbc45
jmp 0xbc5e
movq %rax, %rbx
jmp 0xbc6e
movq %rax, %rbx
leaq 0x178(%rsp), %rdi
callq 0x68d4
leaq 0x18(%rsp), %rdi
callq 0x2090
leaq 0x88(%rsp), %rdi
callq 0x6aca
jmp 0xbca8
movq %rax, %rbx
leaq 0x178(%rsp), %rdi
callq 0x68d4
leaq 0x110(%rsp), %rdi
callq 0x2090
jmp 0xbcb5
jmp 0xbc7f
movq %rax, %rbx
jmp 0xbca8
jmp 0xbc8b
movq %rax, %rbx
jmp 0xbc9b
movq %rax, %rbx
leaq 0x178(%rsp), %rdi
callq 0x68d4
leaq 0x88(%rsp), %rdi
callq 0x2090
leaq 0x110(%rsp), %rdi
callq 0x69c2
leaq 0x38(%rsp), %rdi
callq 0x108fe
leaq 0xd8(%rsp), %rdi
callq 0x1090e
movq %rbx, %rdi
callq 0x22f0
movq %rax, %rdi
callq 0x6bba