// File: /workspace/github_cpp_makefile_star2_O3/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
movabsq $-0x8000000000000000, %rax # imm = 0x8000000000000000
xorl %ebp, %ebp
leaq 0x178(%rsp), %rbx
movq %rbp, (%rbx)
movl $0xa, %r14d
movq %r14, 0x8(%rbx)
movq %rax, 0x10(%rbx)
xorl %edi, %edi
movq %rbx, %rsi
callq 0xd133
movq %rbp, (%rbx)
movq %r14, 0x8(%rbx)
leaq 0x18(%rsp), %r14
movl $0x3, (%r14)
leaq 0xf0(%rsp), %rdi
leaq 0x178(%rsp), %rsi
movq %r14, %rdx
callq 0x1925a
leaq 0x92616(%rip), %r13     # 0xa3684
leaq 0x961e1(%rip), %r15     # 0xa7256
movq 0x108(%rsp), %rax
movq 0x110(%rsp), %rcx
shlq $0x2, %rcx
subq %rcx, %rax
movl (%rax,%rbp,4), %r12d
leaq 0x28(%rsp), %rax
movq %rax, 0x18(%rsp)
movq %r14, %rdi
leaq 0x93da7(%rip), %rsi     # 0xa4e4b
leaq 0x93da9(%rip), %rdx     # 0xa4e54
callq 0xd14c
xorl %esi, %esi
cmpl $0x3, %r12d
sete %sil
movq %rbx, %rdi
movq %r14, %rdx
callq 0xbf80
movq %rbx, %rdi
movq %r13, %rsi
callq 0x18fba
movq %rax, %rdi
leaq 0x93aca(%rip), %rsi     # 0xa4ba4
callq 0x18ff2
movq %rax, %rdi
movq %r15, %rsi
callq 0x18fba
movq %rax, %r12
cmpb $0x1, 0x188(%rax)
jne 0x1111c
movq 0x108(%rsp), %rax
movq 0x110(%rsp), %rcx
shlq $0x2, %rcx
subq %rcx, %rax
movq %r12, %rdi
addq $0x10, %rdi
movl (%rax,%rbp,4), %esi
callq 0x22f0
movq %r12, %rdi
movq %r13, %rsi
callq 0x18fba
movq %rax, %rdi
leaq 0x9c828(%rip), %rsi     # 0xad959
callq 0x18fba
movq %rax, %rdi
movq %r15, %rsi
callq 0x18fba
movq %rax, %r12
cmpb $0x1, 0x188(%rax)
jne 0x1115e
movq %r12, %rdi
addq $0x10, %rdi
movl $0x3, %esi
callq 0x22f0
movq %r12, %rdi
leaq 0xa9131(%rip), %rsi     # 0xba299
callq 0x18fba
movq %rbx, %rdi
callq 0xbfd8
movq 0x18(%rsp), %rdi
leaq 0x28(%rsp), %rax
cmpq %rax, %rdi
je 0x11191
movq 0x28(%rsp), %rsi
incq %rsi
callq 0x21f0
incq %rbp
cmpq $0xa, %rbp
jne 0x11075
leaq 0x18(%rsp), %rsi
movq $0x0, (%rsi)
movq $0x7, 0x8(%rsi)
movabsq $-0x8000000000000000, %rbx # imm = 0x8000000000000000
movq %rbx, 0x10(%rsi)
xorl %edi, %edi
callq 0xd133
xorl %eax, %eax
leaq 0x178(%rsp), %rsi
movq %rax, (%rsi)
movq $0x3, 0x8(%rsi)
movq %rbx, 0x10(%rsi)
movq %rax, 0x18(%rsi)
movq $0x7, 0x20(%rsi)
leaq 0x18(%rsp), %rdx
movl $0x5, (%rdx)
leaq 0x128(%rsp), %rdi
callq 0x192ce
movq $0x0, (%rsp)
leaq 0x18(%rsp), %rbx
leaq 0x178(%rsp), %r12
leaq 0x92464(%rip), %r13     # 0xa3684
leaq 0x9602f(%rip), %r15     # 0xa7256
xorl %edx, %edx
movq %r13, %rbp
movq (%rsp), %rax
subq 0x148(%rsp), %rax
imulq 0x158(%rsp), %rax
movq 0x160(%rsp), %rcx
shlq $0x2, %rax
shlq $0x2, %rcx
subq %rcx, %rax
addq 0x140(%rsp), %rax
movq %rdx, 0x8(%rsp)
movl (%rax,%rdx,4), %r14d
leaq 0x28(%rsp), %rax
movq %rax, 0x18(%rsp)
movq %rbx, %r13
movq %rbx, %rdi
leaq 0x93bd9(%rip), %rsi     # 0xa4e55
leaq 0x93bde(%rip), %rdx     # 0xa4e61
callq 0xd14c
xorl %esi, %esi
cmpl $0x5, %r14d
sete %sil
movq %r12, %rdi
movq %r13, %rbx
movq %r13, %rdx
callq 0xbf80
movq %rbp, %r13
movq %r12, %rdi
movq %rbp, %rsi
callq 0x18fba
movq %rax, %rdi
leaq 0x93932(%rip), %rsi     # 0xa4bea
callq 0x1909a
movq %rax, %rdi
movq %r15, %rsi
callq 0x18fba
movq %rax, %r14
cmpb $0x1, 0x188(%rax)
jne 0x11318
movq (%rsp), %rax
subq 0x148(%rsp), %rax
movq 0x160(%rsp), %rcx
imulq 0x158(%rsp), %rax
shlq $0x2, %rax
shlq $0x2, %rcx
subq %rcx, %rax
addq 0x140(%rsp), %rax
movq %r14, %rdi
addq $0x10, %rdi
movq 0x8(%rsp), %rcx
movl (%rax,%rcx,4), %esi
callq 0x22f0
movq %r14, %rdi
movq %r13, %rsi
callq 0x18fba
movq %rax, %rdi
leaq 0x93f1b(%rip), %rsi     # 0xa5248
callq 0x18fba
movq %rax, %rdi
movq %r15, %rsi
callq 0x18fba
movq %rax, %r14
cmpb $0x1, 0x188(%rax)
jne 0x1135a
movq %r14, %rdi
addq $0x10, %rdi
movl $0x5, %esi
callq 0x22f0
movq %r14, %rdi
leaq 0xa8f35(%rip), %rsi     # 0xba299
callq 0x18fba
movq %r12, %rdi
callq 0xbfd8
movq 0x18(%rsp), %rdi
leaq 0x28(%rsp), %rax
cmpq %rax, %rdi
je 0x1138d
movq 0x28(%rsp), %rsi
incq %rsi
callq 0x21f0
movq 0x8(%rsp), %rdx
incq %rdx
cmpq $0x7, %rdx
jne 0x11229
movq (%rsp), %rcx
incq %rcx
movq %rcx, (%rsp)
cmpq $0x3, %rcx
jne 0x11227
leaq 0xa0(%rsp), %rsi
movq $0x0, (%rsi)
movq $0x5, 0x8(%rsi)
movabsq $-0x8000000000000000, %rbx # imm = 0x8000000000000000
movq %rbx, 0x10(%rsi)
xorl %edi, %edi
callq 0xd133
xorl %eax, %eax
leaq 0x178(%rsp), %rsi
movq %rax, (%rsi)
movq $0x3, 0x8(%rsi)
movq %rbx, 0x10(%rsi)
movq %rax, 0x18(%rsi)
movq $0x9, 0x20(%rsi)
movq %rbx, 0x28(%rsi)
movq %rax, 0x30(%rsi)
movq $0x5, 0x38(%rsi)
leaq 0xa0(%rsp), %rdx
movl $0x7, (%rdx)
leaq 0x18(%rsp), %rdi
callq 0x1935e
movq $0x0, 0x10(%rsp)
leaq 0xa0(%rsp), %rbx
leaq 0x178(%rsp), %r13
leaq 0x92237(%rip), %r14     # 0xa3684
leaq 0x95e02(%rip), %rbp     # 0xa7256
movq $0x0, (%rsp)
xorl %esi, %esi
movq %r14, %r12
movq 0x10(%rsp), %rax
subq 0x38(%rsp), %rax
movq 0x68(%rsp), %rcx
imulq 0x48(%rsp), %rax
movq (%rsp), %rdx
subq 0x50(%rsp), %rdx
imulq 0x60(%rsp), %rdx
shlq $0x2, %rdx
leaq (%rdx,%rax,4), %rax
shlq $0x2, %rcx
subq %rcx, %rax
addq 0x30(%rsp), %rax
movq %rsi, 0x8(%rsp)
movl (%rax,%rsi,4), %r15d
leaq 0xb0(%rsp), %rax
movq %rax, 0xa0(%rsp)
movq %rbx, %r14
movq %rbx, %rdi
leaq 0x939a3(%rip), %rsi     # 0xa4e62
leaq 0x939ab(%rip), %rdx     # 0xa4e71
callq 0xd14c
xorl %esi, %esi
cmpl $0x7, %r15d
sete %sil
movq %r13, %rdi
movq %r14, %rbx
movq %r14, %rdx
callq 0xbf80
movq %r12, %r14
movq %r13, %rdi
movq %r12, %rsi
callq 0x18fba
movq %rax, %rdi
leaq 0x9375a(%rip), %rsi     # 0xa4c55
callq 0x19062
movq %rax, %rdi
movq %rbp, %rsi
callq 0x18fba
movq %rax, %r15
cmpb $0x1, 0x188(%rax)
jne 0x11563
movq 0x10(%rsp), %rax
subq 0x38(%rsp), %rax
imulq 0x48(%rsp), %rax
movq 0x68(%rsp), %rcx
movq (%rsp), %rdx
subq 0x50(%rsp), %rdx
imulq 0x60(%rsp), %rdx
shlq $0x2, %rdx
leaq (%rdx,%rax,4), %rax
shlq $0x2, %rcx
subq %rcx, %rax
addq 0x30(%rsp), %rax
movq %r15, %rdi
addq $0x10, %rdi
movq 0x8(%rsp), %rcx
movl (%rax,%rcx,4), %esi
callq 0x22f0
movq %r15, %rdi
movq %r14, %rsi
callq 0x18fba
movq %rax, %rdi
leaq 0x9363e(%rip), %rsi     # 0xa4bb6
callq 0x18fba
movq %rax, %rdi
movq %rbp, %rsi
callq 0x18fba
movq %rax, %r15
cmpb $0x1, 0x188(%rax)
jne 0x115a5
movq %r15, %rdi
addq $0x10, %rdi
movl $0x7, %esi
callq 0x22f0
movq %r15, %rdi
leaq 0xa8cea(%rip), %rsi     # 0xba299
callq 0x18fba
movq %r13, %rdi
callq 0xbfd8
movq 0xa0(%rsp), %rdi
leaq 0xb0(%rsp), %rax
cmpq %rax, %rdi
je 0x115e1
movq 0xb0(%rsp), %rsi
incq %rsi
callq 0x21f0
movq 0x8(%rsp), %rsi
incq %rsi
cmpq $0x5, %rsi
jne 0x1145e
movq (%rsp), %rcx
incq %rcx
movq %rcx, (%rsp)
cmpq $0x9, %rcx
jne 0x1145c
movq 0x10(%rsp), %rcx
incq %rcx
movq %rcx, 0x10(%rsp)
cmpq $0x3, %rcx
jne 0x11454
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 0x80(%rsp), %rdx
movl $0xd, (%rdx)
leaq 0xa0(%rsp), %rdi
callq 0x193f0
movl $0x4, %eax
movq %rax, (%rsp)
leaq 0x80(%rsp), %rbx
leaq 0x178(%rsp), %r12
leaq 0x91ff3(%rip), %r13     # 0xa3684
leaq 0x95bbe(%rip), %r15     # 0xa7256
movq $-0x2, %rax
movq %r13, %rbp
movq %rax, 0x8(%rsp)
subq 0xd8(%rsp), %rax
imulq 0xe8(%rsp), %rax
movq (%rsp), %rcx
subq 0xc0(%rsp), %rcx
imulq 0xd0(%rsp), %rcx
shlq $0x2, %rcx
addq 0xb8(%rsp), %rcx
movl (%rcx,%rax,4), %r14d
leaq 0x90(%rsp), %rax
movq %rax, 0x80(%rsp)
movq %rbx, %r13
movq %rbx, %rdi
leaq 0x93778(%rip), %rsi     # 0xa4e72
leaq 0x93783(%rip), %rdx     # 0xa4e84
callq 0xd14c
xorl %esi, %esi
cmpl $0xd, %r14d
sete %sil
movq %r12, %rdi
movq %r13, %rbx
movq %r13, %rdx
callq 0xbf80
movq %rbp, %r13
movq %r12, %rdi
movq %rbp, %rsi
callq 0x18fba
movq %rax, %rdi
leaq 0x93585(%rip), %rsi     # 0xa4cbb
callq 0x190d2
movq %rax, %rdi
movq %r15, %rsi
callq 0x18fba
movq %rax, %r14
cmpb $0x1, 0x188(%rax)
jne 0x11798
movq (%rsp), %rax
subq 0xc0(%rsp), %rax
imulq 0xd0(%rsp), %rax
shlq $0x2, %rax
addq 0xb8(%rsp), %rax
movq 0x8(%rsp), %rcx
subq 0xd8(%rsp), %rcx
imulq 0xe8(%rsp), %rcx
movq %r14, %rdi
addq $0x10, %rdi
movl (%rax,%rcx,4), %esi
callq 0x22f0
movq %r14, %rdi
movq %r13, %rsi
callq 0x18fba
movq %rax, %rdi
leaq 0x936d5(%rip), %rsi     # 0xa4e82
callq 0x1917a
movq %rax, %rdi
movq %r15, %rsi
callq 0x18fba
movq %rax, %r14
cmpb $0x1, 0x188(%rax)
jne 0x117da
movq %r14, %rdi
addq $0x10, %rdi
movl $0xd, %esi
callq 0x22f0
movq %r14, %rdi
leaq 0xa8ab5(%rip), %rsi     # 0xba299
callq 0x18fba
movq %r12, %rdi
callq 0xbfd8
movq 0x80(%rsp), %rdi
leaq 0x90(%rsp), %rax
cmpq %rax, %rdi
je 0x11816
movq 0x90(%rsp), %rsi
incq %rsi
callq 0x21f0
movq 0x8(%rsp), %rax
incq %rax
cmpq $0x3, %rax
jne 0x1169f
movq (%rsp), %rax
incq %rax
movq %rax, (%rsp)
cmpq $0xe, %rax
jne 0x11698
leaq 0xa0(%rsp), %rdi
callq 0xe84a
leaq 0x18(%rsp), %rdi
callq 0xd206
leaq 0x128(%rsp), %rdi
callq 0x1d1c4
cmpq $0x0, 0x108(%rsp)
je 0x1189c
xorps %xmm0, %xmm0
leaq 0xf0(%rsp), %rax
movups %xmm0, 0x18(%rax)
movq $0x0, 0x28(%rax)
movq 0xf8(%rsp), %rdi
movq 0x100(%rsp), %rsi
shlq $0x2, %rsi
callq 0x21f0
addq $0x308, %rsp            # imm = 0x308
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
jmp 0x11a3f
jmp 0x11a3f
jmp 0x11a3f
jmp 0x119a0
jmp 0x11913
jmp 0x11913
jmp 0x118ca
jmp 0x118ca
movq %rax, %r14
jmp 0x119f8
jmp 0x118d9
movq %rax, %r14
jmp 0x118e9
movq %rax, %r14
leaq 0x178(%rsp), %rdi
callq 0xbfd8
movq 0x18(%rsp), %rdi
leaq 0x28(%rsp), %rax
cmpq %rax, %rdi
je 0x119f8
movq 0x28(%rsp), %rsi
incq %rsi
callq 0x21f0
jmp 0x119f8
movq %rax, %r14
jmp 0x1195e
movq %rax, %r14
jmp 0x119eb
jmp 0x11929
movq %rax, %r14
jmp 0x11939
jmp 0x11972
movq %rax, %r14
jmp 0x11982
movq %rax, %r14
leaq 0x178(%rsp), %rdi
callq 0xbfd8
movq 0x80(%rsp), %rdi
leaq 0x90(%rsp), %rax
cmpq %rax, %rdi
je 0x1195e
movq 0x90(%rsp), %rsi
incq %rsi
callq 0x21f0
leaq 0xa0(%rsp), %rdi
callq 0xe84a
jmp 0x119e1
jmp 0x11a3f
movq %rax, %r14
leaq 0x178(%rsp), %rdi
callq 0xbfd8
movq 0x18(%rsp), %rdi
leaq 0x28(%rsp), %rax
cmpq %rax, %rdi
je 0x119eb
movq 0x28(%rsp), %rsi
incq %rsi
callq 0x21f0
jmp 0x119eb
movq %rax, %r14
jmp 0x119e1
jmp 0x119ac
movq %rax, %r14
jmp 0x119bc
movq %rax, %r14
leaq 0x178(%rsp), %rdi
callq 0xbfd8
movq 0xa0(%rsp), %rdi
leaq 0xb0(%rsp), %rax
cmpq %rax, %rdi
je 0x119e1
movq 0xb0(%rsp), %rsi
incq %rsi
callq 0x21f0
leaq 0x18(%rsp), %rdi
callq 0xd206
leaq 0x128(%rsp), %rdi
callq 0x1d1c4
cmpq $0x0, 0x108(%rsp)
je 0x11a33
xorps %xmm0, %xmm0
leaq 0xf0(%rsp), %rax
movups %xmm0, 0x18(%rax)
movq $0x0, 0x28(%rax)
movq 0xf8(%rsp), %rdi
movq 0x100(%rsp), %rsi
shlq $0x2, %rsi
callq 0x21f0
movq %r14, %rdi
callq 0x2300
jmp 0x11a3f
jmp 0x11a3f
movq %rax, %rdi
callq 0xc0a9