// File: dsharlet[P]array/test/shape.cpp
// Function: nda::test_make_dense_shape_3d_body()
TEST(make_dense_shape_3d) {
  dense_shape<3> s(10, 5, 20);
  s.resolve();
  auto x = s.x();
  auto y = s.y();
  auto z = s.z();
  assert_dim_eq(x, dense_dim<>(0, 10));
  assert_dim_eq(y, dim<>(0, 5, 10));
  assert_dim_eq(z, dim<>(0, 20, 50));

  ASSERT_EQ(s.width(), x.extent());
  ASSERT_EQ(s.height(), y.extent());
  ASSERT_EQ(s.channels(), z.extent());
  ASSERT_EQ(s.rows(), x.extent());
  ASSERT_EQ(s.columns(), y.extent());
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0xca0, %rsp            # imm = 0xCA0
leaq -0xe8(%rbp), %rdi
movq %rdi, -0xaa0(%rbp)
movl $0xa, %esi
movl $0x5, %edx
movl $0x14, %ecx
callq 0x34640
movq -0xaa0(%rbp), %rdi
callq 0x11be0
movq -0xaa0(%rbp), %rdi
callq 0x10c510
movq -0xaa0(%rbp), %rdi
movq 0x10(%rax), %rcx
movq %rcx, -0xf0(%rbp)
movups (%rax), %xmm0
movaps %xmm0, -0x100(%rbp)
callq 0x10c550
movq -0xaa0(%rbp), %rdi
movq 0x10(%rax), %rcx
movq %rcx, -0x110(%rbp)
movups (%rax), %xmm0
movaps %xmm0, -0x120(%rbp)
callq 0x18a210
movq 0x10(%rax), %rcx
movq %rcx, -0x130(%rbp)
movups (%rax), %xmm0
movaps %xmm0, -0x140(%rbp)
xorl %eax, %eax
movl %eax, %esi
movq %rsi, -0xab0(%rbp)
leaq -0x158(%rbp), %rdi
movq %rdi, -0xac8(%rbp)
movl $0xa, %edx
movq %rdx, -0xac0(%rbp)
movl $0x1, %ecx
callq 0x16d70
movq -0xac8(%rbp), %rsi
leaq -0x100(%rbp), %rdi
movq %rdi, -0xa98(%rbp)
callq 0x98380
movq -0xac0(%rbp), %rcx
movq -0xab0(%rbp), %rsi
leaq -0x170(%rbp), %rdi
movq %rdi, -0xab8(%rbp)
movl $0x5, %edx
callq 0x10c60
movq -0xab8(%rbp), %rsi
leaq -0x120(%rbp), %rdi
callq 0x97810
movq -0xab0(%rbp), %rsi
leaq -0x188(%rbp), %rdi
movq %rdi, -0xaa8(%rbp)
movl $0x14, %edx
movl $0x32, %ecx
callq 0x10c60
movq -0xaa8(%rbp), %rsi
leaq -0x140(%rbp), %rdi
callq 0x97810
movq -0xaa0(%rbp), %rdi
callq 0x40ad0
movq -0xa98(%rbp), %rcx
movq %rcx, -0x58(%rbp)
movq -0x58(%rbp), %rcx
addq $0x8, %rcx
movq %rcx, -0x50(%rbp)
movq -0x50(%rbp), %rcx
movq (%rcx), %rcx
subq %rcx, %rax
sete %al
movb %al, -0xa89(%rbp)
leaq -0x339(%rbp), %rdi
movq %rdi, -0xa88(%rbp)
callq 0x33b0
movq -0xa88(%rbp), %rdx
leaq 0x7f470(%rip), %rsi     # 0x1fb40c
leaq -0x338(%rbp), %rdi
callq 0x10a90
jmp 0x17bfaa
movb -0xa89(%rbp), %al
movzbl %al, %esi
andl $0x1, %esi
leaq -0x318(%rbp), %rdi
leaq -0x338(%rbp), %rdx
callq 0x10f80
jmp 0x17bfcb
leaq 0x60813(%rip), %rsi     # 0x1dc7e5
leaq -0x318(%rbp), %rdi
callq 0x34320
movq %rax, -0xad0(%rbp)
jmp 0x17bfe7
movq -0xad0(%rbp), %rdi
leaq 0x7f42f(%rip), %rsi     # 0x1fb424
callq 0x344d0
movq %rax, -0xad8(%rbp)
jmp 0x17c003
movq -0xad8(%rbp), %rdi
leaq 0x6479b(%rip), %rsi     # 0x1e07ac
callq 0x34320
movq %rax, -0xae0(%rbp)
jmp 0x17c01f
leaq -0xe8(%rbp), %rdi
callq 0x40ad0
movq %rax, -0xae8(%rbp)
jmp 0x17c034
movq -0xae0(%rbp), %rdi
movq -0xae8(%rbp), %rax
movq %rax, -0x358(%rbp)
leaq -0x358(%rbp), %rsi
callq 0x34510
movq %rax, -0xaf0(%rbp)
jmp 0x17c05e
movq -0xaf0(%rbp), %rdi
leaq 0x60779(%rip), %rsi     # 0x1dc7e5
callq 0x34320
movq %rax, -0xaf8(%rbp)
jmp 0x17c07a
movq -0xaf8(%rbp), %rdi
leaq 0x7f391(%rip), %rsi     # 0x1fb419
callq 0x34570
movq %rax, -0xb00(%rbp)
jmp 0x17c096
movq -0xb00(%rbp), %rdi
leaq 0x64708(%rip), %rsi     # 0x1e07ac
callq 0x34320
movq %rax, -0xb08(%rbp)
jmp 0x17c0b2
leaq -0x100(%rbp), %rax
movq %rax, -0x60(%rbp)
movq -0x60(%rbp), %rax
addq $0x8, %rax
movq %rax, -0x48(%rbp)
movq -0x48(%rbp), %rax
movq (%rax), %rax
movq %rax, -0xb10(%rbp)
movq -0xb08(%rbp), %rdi
movq -0xb10(%rbp), %rax
movq %rax, -0x360(%rbp)
leaq -0x360(%rbp), %rsi
callq 0x34510
movq %rax, -0xb18(%rbp)
jmp 0x17c101
movq -0xb18(%rbp), %rdi
leaq 0x7a36c(%rip), %rsi     # 0x1f647b
callq 0x34320
jmp 0x17c116
leaq -0x318(%rbp), %rdi
callq 0x10ff0
jmp 0x17c124
leaq -0x338(%rbp), %rdi
callq 0x3100
leaq -0x339(%rbp), %rdi
callq 0x3290
leaq -0xe8(%rbp), %rdi
callq 0x40b50
leaq -0x120(%rbp), %rcx
movq %rcx, -0x68(%rbp)
movq -0x68(%rbp), %rcx
addq $0x8, %rcx
movq %rcx, -0x40(%rbp)
movq -0x40(%rbp), %rcx
movq (%rcx), %rcx
subq %rcx, %rax
sete %al
movb %al, -0xb21(%rbp)
leaq -0x511(%rbp), %rdi
movq %rdi, -0xb20(%rbp)
callq 0x33b0
movq -0xb20(%rbp), %rdx
leaq 0x7f29b(%rip), %rsi     # 0x1fb42e
leaq -0x510(%rbp), %rdi
callq 0x10a90
jmp 0x17c1a1
movb -0xb21(%rbp), %al
movzbl %al, %esi
andl $0x1, %esi
leaq -0x4f0(%rbp), %rdi
leaq -0x510(%rbp), %rdx
callq 0x10f80
jmp 0x17c1c2
leaq 0x6061c(%rip), %rsi     # 0x1dc7e5
leaq -0x4f0(%rbp), %rdi
callq 0x34320
movq %rax, -0xb30(%rbp)
jmp 0x17c1de
movq -0xb30(%rbp), %rdi
leaq 0x7f25b(%rip), %rsi     # 0x1fb447
callq 0x34570
movq %rax, -0xb38(%rbp)
jmp 0x17c1fa
movq -0xb38(%rbp), %rdi
leaq 0x645a4(%rip), %rsi     # 0x1e07ac
callq 0x34320
movq %rax, -0xb40(%rbp)
jmp 0x17c216
leaq -0xe8(%rbp), %rdi
callq 0x40b50
movq %rax, -0xb48(%rbp)
jmp 0x17c22b
movq -0xb40(%rbp), %rdi
movq -0xb48(%rbp), %rax
movq %rax, -0x520(%rbp)
leaq -0x520(%rbp), %rsi
callq 0x34510
movq %rax, -0xb50(%rbp)
jmp 0x17c255
movq -0xb50(%rbp), %rdi
leaq 0x60582(%rip), %rsi     # 0x1dc7e5
callq 0x34320
movq %rax, -0xb58(%rbp)
jmp 0x17c271
movq -0xb58(%rbp), %rdi
leaq 0x7f1f9(%rip), %rsi     # 0x1fb478
callq 0x34570
movq %rax, -0xb60(%rbp)
jmp 0x17c28d
movq -0xb60(%rbp), %rdi
leaq 0x64511(%rip), %rsi     # 0x1e07ac
callq 0x34320
movq %rax, -0xb68(%rbp)
jmp 0x17c2a9
leaq -0x120(%rbp), %rax
movq %rax, -0x70(%rbp)
movq -0x70(%rbp), %rax
addq $0x8, %rax
movq %rax, -0x38(%rbp)
movq -0x38(%rbp), %rax
movq (%rax), %rax
movq %rax, -0xb70(%rbp)
movq -0xb68(%rbp), %rdi
movq -0xb70(%rbp), %rax
movq %rax, -0x528(%rbp)
leaq -0x528(%rbp), %rsi
callq 0x34510
movq %rax, -0xb78(%rbp)
jmp 0x17c2f8
movq -0xb78(%rbp), %rdi
leaq 0x7a175(%rip), %rsi     # 0x1f647b
callq 0x34320
jmp 0x17c30d
leaq -0x4f0(%rbp), %rdi
callq 0x10ff0
jmp 0x17c31b
leaq -0x510(%rbp), %rdi
callq 0x3100
leaq -0x511(%rbp), %rdi
callq 0x3290
leaq -0xe8(%rbp), %rdi
callq 0x40bd0
leaq -0x140(%rbp), %rcx
movq %rcx, -0x78(%rbp)
movq -0x78(%rbp), %rcx
addq $0x8, %rcx
movq %rcx, -0x30(%rbp)
movq -0x30(%rbp), %rcx
movq (%rcx), %rcx
subq %rcx, %rax
sete %al
movb %al, -0xb81(%rbp)
leaq -0x6d9(%rbp), %rdi
movq %rdi, -0xb80(%rbp)
callq 0x33b0
movq -0xb80(%rbp), %rdx
leaq 0x7f10d(%rip), %rsi     # 0x1fb497
leaq -0x6d8(%rbp), %rdi
callq 0x10a90
jmp 0x17c398
movb -0xb81(%rbp), %al
movzbl %al, %esi
andl $0x1, %esi
leaq -0x6b8(%rbp), %rdi
leaq -0x6d8(%rbp), %rdx
callq 0x10f80
jmp 0x17c3b9
leaq 0x60425(%rip), %rsi     # 0x1dc7e5
leaq -0x6b8(%rbp), %rdi
callq 0x34320
movq %rax, -0xb90(%rbp)
jmp 0x17c3d5
movq -0xb90(%rbp), %rdi
leaq 0x7f0cf(%rip), %rsi     # 0x1fb4b2
callq 0x346f0
movq %rax, -0xb98(%rbp)
jmp 0x17c3f1
movq -0xb98(%rbp), %rdi
leaq 0x643ad(%rip), %rsi     # 0x1e07ac
callq 0x34320
movq %rax, -0xba0(%rbp)
jmp 0x17c40d
leaq -0xe8(%rbp), %rdi
callq 0x40bd0
movq %rax, -0xba8(%rbp)
jmp 0x17c422
movq -0xba0(%rbp), %rdi
movq -0xba8(%rbp), %rax
movq %rax, -0x6e8(%rbp)
leaq -0x6e8(%rbp), %rsi
callq 0x34510
movq %rax, -0xbb0(%rbp)
jmp 0x17c44c
movq -0xbb0(%rbp), %rdi
leaq 0x6038b(%rip), %rsi     # 0x1dc7e5
callq 0x34320
movq %rax, -0xbb8(%rbp)
jmp 0x17c468
movq -0xbb8(%rbp), %rdi
leaq 0x7f031(%rip), %rsi     # 0x1fb4a7
callq 0x34570
movq %rax, -0xbc0(%rbp)
jmp 0x17c484
movq -0xbc0(%rbp), %rdi
leaq 0x6431a(%rip), %rsi     # 0x1e07ac
callq 0x34320
movq %rax, -0xbc8(%rbp)
jmp 0x17c4a0
leaq -0x140(%rbp), %rax
movq %rax, -0x80(%rbp)
movq -0x80(%rbp), %rax
addq $0x8, %rax
movq %rax, -0x28(%rbp)
movq -0x28(%rbp), %rax
movq (%rax), %rax
movq %rax, -0xbd0(%rbp)
movq -0xbc8(%rbp), %rdi
movq -0xbd0(%rbp), %rax
movq %rax, -0x6f0(%rbp)
leaq -0x6f0(%rbp), %rsi
callq 0x34510
movq %rax, -0xbd8(%rbp)
jmp 0x17c4ef
movq -0xbd8(%rbp), %rdi
leaq 0x79f7e(%rip), %rsi     # 0x1f647b
callq 0x34320
jmp 0x17c504
leaq -0x6b8(%rbp), %rdi
callq 0x10ff0
jmp 0x17c512
leaq -0x6d8(%rbp), %rdi
callq 0x3100
leaq -0x6d9(%rbp), %rdi
callq 0x3290
leaq -0xe8(%rbp), %rdi
callq 0x9fad0
leaq -0x100(%rbp), %rcx
movq %rcx, -0x88(%rbp)
movq -0x88(%rbp), %rcx
addq $0x8, %rcx
movq %rcx, -0x20(%rbp)
movq -0x20(%rbp), %rcx
movq (%rcx), %rcx
subq %rcx, %rax
sete %al
movb %al, -0xbe1(%rbp)
leaq -0x8a1(%rbp), %rdi
movq %rdi, -0xbe0(%rbp)
callq 0x33b0
movq -0xbe0(%rbp), %rdx
leaq 0x7eecb(%rip), %rsi     # 0x1fb452
leaq -0x8a0(%rbp), %rdi
callq 0x10a90
jmp 0x17c595
movb -0xbe1(%rbp), %al
movzbl %al, %esi
andl $0x1, %esi
leaq -0x880(%rbp), %rdi
leaq -0x8a0(%rbp), %rdx
callq 0x10f80
jmp 0x17c5b6
leaq 0x60228(%rip), %rsi     # 0x1dc7e5
leaq -0x880(%rbp), %rdi
callq 0x34320
movq %rax, -0xbf0(%rbp)
jmp 0x17c5d2
movq -0xbf0(%rbp), %rdi
leaq 0x6d4b2(%rip), %rsi     # 0x1e9a92
callq 0x36600
movq %rax, -0xbf8(%rbp)
jmp 0x17c5ee
movq -0xbf8(%rbp), %rdi
leaq 0x641b0(%rip), %rsi     # 0x1e07ac
callq 0x34320
movq %rax, -0xc00(%rbp)
jmp 0x17c60a
leaq -0xe8(%rbp), %rdi
callq 0x9fad0
movq %rax, -0xc08(%rbp)
jmp 0x17c61f
movq -0xc00(%rbp), %rdi
movq -0xc08(%rbp), %rax
movq %rax, -0x8b0(%rbp)
leaq -0x8b0(%rbp), %rsi
callq 0x34510
movq %rax, -0xc10(%rbp)
jmp 0x17c649
movq -0xc10(%rbp), %rdi
leaq 0x6018e(%rip), %rsi     # 0x1dc7e5
callq 0x34320
movq %rax, -0xc18(%rbp)
jmp 0x17c665
movq -0xc18(%rbp), %rdi
leaq 0x7eda6(%rip), %rsi     # 0x1fb419
callq 0x34570
movq %rax, -0xc20(%rbp)
jmp 0x17c681
movq -0xc20(%rbp), %rdi
leaq 0x6411d(%rip), %rsi     # 0x1e07ac
callq 0x34320
movq %rax, -0xc28(%rbp)
jmp 0x17c69d
leaq -0x100(%rbp), %rax
movq %rax, -0x90(%rbp)
movq -0x90(%rbp), %rax
addq $0x8, %rax
movq %rax, -0x18(%rbp)
movq -0x18(%rbp), %rax
movq (%rax), %rax
movq %rax, -0xc30(%rbp)
movq -0xc28(%rbp), %rdi
movq -0xc30(%rbp), %rax
movq %rax, -0x8b8(%rbp)
leaq -0x8b8(%rbp), %rsi
callq 0x34510
movq %rax, -0xc38(%rbp)
jmp 0x17c6f2
movq -0xc38(%rbp), %rdi
leaq 0x79d7b(%rip), %rsi     # 0x1f647b
callq 0x34320
jmp 0x17c707
leaq -0x880(%rbp), %rdi
callq 0x10ff0
jmp 0x17c715
leaq -0x8a0(%rbp), %rdi
callq 0x3100
leaq -0x8a1(%rbp), %rdi
callq 0x3290
leaq -0xe8(%rbp), %rdi
callq 0x9fb30
leaq -0x120(%rbp), %rcx
movq %rcx, -0x98(%rbp)
movq -0x98(%rbp), %rcx
addq $0x8, %rcx
movq %rcx, -0x10(%rbp)
movq -0x10(%rbp), %rcx
movq (%rcx), %rcx
subq %rcx, %rax
sete %al
movb %al, -0xc41(%rbp)
leaq -0xa69(%rbp), %rdi
movq %rdi, -0xc40(%rbp)
callq 0x33b0
movq -0xc40(%rbp), %rdx
leaq 0x7ecdf(%rip), %rsi     # 0x1fb469
leaq -0xa68(%rbp), %rdi
callq 0x10a90
jmp 0x17c798
movb -0xc41(%rbp), %al
movzbl %al, %esi
andl $0x1, %esi
leaq -0xa48(%rbp), %rdi
leaq -0xa68(%rbp), %rdx
callq 0x10f80
jmp 0x17c7b9
leaq 0x60025(%rip), %rsi     # 0x1dc7e5
leaq -0xa48(%rbp), %rdi
callq 0x34320
movq %rax, -0xc50(%rbp)
jmp 0x17c7d5
movq -0xc50(%rbp), %rdi
leaq 0x6d2d5(%rip), %rsi     # 0x1e9ab8
callq 0xc7360
movq %rax, -0xc58(%rbp)
jmp 0x17c7f1
movq -0xc58(%rbp), %rdi
leaq 0x63fad(%rip), %rsi     # 0x1e07ac
callq 0x34320
movq %rax, -0xc60(%rbp)
jmp 0x17c80d
leaq -0xe8(%rbp), %rdi
callq 0x9fb30
movq %rax, -0xc68(%rbp)
jmp 0x17c822
movq -0xc60(%rbp), %rdi
movq -0xc68(%rbp), %rax
movq %rax, -0xa78(%rbp)
leaq -0xa78(%rbp), %rsi
callq 0x34510
movq %rax, -0xc70(%rbp)
jmp 0x17c84c
movq -0xc70(%rbp), %rdi
leaq 0x5ff8b(%rip), %rsi     # 0x1dc7e5
callq 0x34320
movq %rax, -0xc78(%rbp)
jmp 0x17c868
movq -0xc78(%rbp), %rdi
leaq 0x7ec02(%rip), %rsi     # 0x1fb478
callq 0x34570
movq %rax, -0xc80(%rbp)
jmp 0x17c884
movq -0xc80(%rbp), %rdi
leaq 0x63f1a(%rip), %rsi     # 0x1e07ac
callq 0x34320
movq %rax, -0xc88(%rbp)
jmp 0x17c8a0
leaq -0x120(%rbp), %rax
movq %rax, -0xa0(%rbp)
movq -0xa0(%rbp), %rax
addq $0x8, %rax
movq %rax, -0x8(%rbp)
movq -0x8(%rbp), %rax
movq (%rax), %rax
movq %rax, -0xc90(%rbp)
movq -0xc88(%rbp), %rdi
movq -0xc90(%rbp), %rax
movq %rax, -0xa80(%rbp)
leaq -0xa80(%rbp), %rsi
callq 0x34510
movq %rax, -0xc98(%rbp)
jmp 0x17c8f5
movq -0xc98(%rbp), %rdi
leaq 0x79b78(%rip), %rsi     # 0x1f647b
callq 0x34320
jmp 0x17c90a
leaq -0xa48(%rbp), %rdi
callq 0x10ff0
jmp 0x17c918
leaq -0xa68(%rbp), %rdi
callq 0x3100
leaq -0xa69(%rbp), %rdi
callq 0x3290
addq $0xca0, %rsp            # imm = 0xCA0
popq %rbp
retq
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x348(%rbp)
movl %eax, -0x34c(%rbp)
jmp 0x17c98f
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x348(%rbp)
movl %eax, -0x34c(%rbp)
jmp 0x17c983
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x348(%rbp)
movl %eax, -0x34c(%rbp)
leaq -0x318(%rbp), %rdi
callq 0x10ff0
jmp 0x17c981
jmp 0x17c983
leaq -0x338(%rbp), %rdi
callq 0x3100
leaq -0x339(%rbp), %rdi
callq 0x3290
jmp 0x17cb34
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x348(%rbp)
movl %eax, -0x34c(%rbp)
jmp 0x17c9f6
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x348(%rbp)
movl %eax, -0x34c(%rbp)
jmp 0x17c9ea
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x348(%rbp)
movl %eax, -0x34c(%rbp)
leaq -0x4f0(%rbp), %rdi
callq 0x10ff0
jmp 0x17c9e8
jmp 0x17c9ea
leaq -0x510(%rbp), %rdi
callq 0x3100
leaq -0x511(%rbp), %rdi
callq 0x3290
jmp 0x17cb34
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x348(%rbp)
movl %eax, -0x34c(%rbp)
jmp 0x17ca5d
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x348(%rbp)
movl %eax, -0x34c(%rbp)
jmp 0x17ca51
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x348(%rbp)
movl %eax, -0x34c(%rbp)
leaq -0x6b8(%rbp), %rdi
callq 0x10ff0
jmp 0x17ca4f
jmp 0x17ca51
leaq -0x6d8(%rbp), %rdi
callq 0x3100
leaq -0x6d9(%rbp), %rdi
callq 0x3290
jmp 0x17cb34
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x348(%rbp)
movl %eax, -0x34c(%rbp)
jmp 0x17cac4
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x348(%rbp)
movl %eax, -0x34c(%rbp)
jmp 0x17cab8
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x348(%rbp)
movl %eax, -0x34c(%rbp)
leaq -0x880(%rbp), %rdi
callq 0x10ff0
jmp 0x17cab6
jmp 0x17cab8
leaq -0x8a0(%rbp), %rdi
callq 0x3100
leaq -0x8a1(%rbp), %rdi
callq 0x3290
jmp 0x17cb34
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x348(%rbp)
movl %eax, -0x34c(%rbp)
jmp 0x17cb28
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x348(%rbp)
movl %eax, -0x34c(%rbp)
jmp 0x17cb1c
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x348(%rbp)
movl %eax, -0x34c(%rbp)
leaq -0xa48(%rbp), %rdi
callq 0x10ff0
jmp 0x17cb1a
jmp 0x17cb1c
leaq -0xa68(%rbp), %rdi
callq 0x3100
leaq -0xa69(%rbp), %rdi
callq 0x3290
movq -0x348(%rbp), %rdi
callq 0x33a0
movq %rax, %rdi
callq 0x116d0
nopl (%rax,%rax)