// File: dsharlet[P]array/test/shape.cpp
// Function: nda::test_broadcast_dim_body()
TEST(broadcast_dim) {
  dim<> x(0, 10, 1);
  broadcast_dim<> y;
  shape<dim<>, broadcast_dim<>> s(x, y);
  for (int i = 0; i < 10; i++) {
    for (int j : x) {
      ASSERT_EQ(s(j, i), j);
    }
  }
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x2d0, %rsp            # imm = 0x2D0
leaq -0x38(%rbp), %rdi
xorl %eax, %eax
movl %eax, %esi
movl $0xa, %edx
movl $0x1, %ecx
callq 0x10c60
leaq -0x50(%rbp), %rdi
callq 0x18ade0
leaq -0x80(%rbp), %rdi
leaq -0x38(%rbp), %rsi
leaq -0x50(%rbp), %rdx
callq 0x18ae00
movl $0x0, -0x84(%rbp)
cmpl $0xa, -0x84(%rbp)
jge 0x17f52c
leaq -0x38(%rbp), %rax
movq %rax, -0x90(%rbp)
movq -0x90(%rbp), %rdi
callq 0x366c0
movq %rax, -0x98(%rbp)
movq -0x90(%rbp), %rdi
callq 0x366f0
movq %rax, -0xa0(%rbp)
leaq -0x98(%rbp), %rax
movq %rax, -0x18(%rbp)
leaq -0xa0(%rbp), %rax
movq %rax, -0x20(%rbp)
movq -0x18(%rbp), %rax
movq (%rax), %rax
movq -0x20(%rbp), %rcx
cmpq (%rcx), %rax
je 0x17f516
leaq -0x98(%rbp), %rax
movq %rax, -0x10(%rbp)
movq -0x10(%rbp), %rax
movl (%rax), %eax
movl %eax, -0xa4(%rbp)
movl -0xa4(%rbp), %esi
movl -0x84(%rbp), %edx
leaq -0x80(%rbp), %rdi
callq 0x18ae50
movslq -0xa4(%rbp), %rcx
subq %rcx, %rax
sete %al
movb %al, -0x281(%rbp)
leaq -0x259(%rbp), %rdi
movq %rdi, -0x280(%rbp)
callq 0x33b0
movq -0x280(%rbp), %rdx
leaq 0x7c47e(%rip), %rsi     # 0x1fb79c
leaq -0x258(%rbp), %rdi
callq 0x10a90
jmp 0x17f32c
movb -0x281(%rbp), %al
movzbl %al, %esi
andl $0x1, %esi
leaq -0x238(%rbp), %rdi
leaq -0x258(%rbp), %rdx
callq 0x10f80
jmp 0x17f34d
leaq 0x5d491(%rip), %rsi     # 0x1dc7e5
leaq -0x238(%rbp), %rdi
callq 0x34320
movq %rax, -0x290(%rbp)
jmp 0x17f369
movq -0x290(%rbp), %rdi
leaq 0x7bf71(%rip), %rsi     # 0x1fb2e8
callq 0x34600
movq %rax, -0x298(%rbp)
jmp 0x17f385
movq -0x298(%rbp), %rdi
leaq 0x61419(%rip), %rsi     # 0x1e07ac
callq 0x34320
movq %rax, -0x2a0(%rbp)
jmp 0x17f3a1
movl -0xa4(%rbp), %esi
movl -0x84(%rbp), %edx
leaq -0x80(%rbp), %rdi
callq 0x18ae50
movq %rax, -0x2a8(%rbp)
jmp 0x17f3bf
movq -0x2a0(%rbp), %rdi
movq -0x2a8(%rbp), %rax
movq %rax, -0x278(%rbp)
leaq -0x278(%rbp), %rsi
callq 0x34510
movq %rax, -0x2b0(%rbp)
jmp 0x17f3e9
movq -0x2b0(%rbp), %rdi
leaq 0x5d3ee(%rip), %rsi     # 0x1dc7e5
callq 0x34320
movq %rax, -0x2b8(%rbp)
jmp 0x17f405
movq -0x2b8(%rbp), %rdi
leaq 0x7bed3(%rip), %rsi     # 0x1fb2e6
callq 0x34320
movq %rax, -0x2c0(%rbp)
jmp 0x17f421
movq -0x2c0(%rbp), %rdi
leaq 0x6137d(%rip), %rsi     # 0x1e07ac
callq 0x34320
movq %rax, -0x2c8(%rbp)
jmp 0x17f43d
movq -0x2c8(%rbp), %rdi
leaq -0xa4(%rbp), %rsi
callq 0x343a0
movq %rax, -0x2d0(%rbp)
jmp 0x17f459
movq -0x2d0(%rbp), %rdi
leaq 0x77014(%rip), %rsi     # 0x1f647b
callq 0x34320
jmp 0x17f46e
leaq -0x238(%rbp), %rdi
callq 0x10ff0
jmp 0x17f47c
leaq -0x258(%rbp), %rdi
callq 0x3100
leaq -0x259(%rbp), %rdi
callq 0x3290
leaq -0x98(%rbp), %rax
movq %rax, -0x8(%rbp)
movq -0x8(%rbp), %rax
movq (%rax), %rcx
addq $0x1, %rcx
movq %rcx, (%rax)
jmp 0x17f294
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x268(%rbp)
movl %eax, -0x26c(%rbp)
jmp 0x17f508
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x268(%rbp)
movl %eax, -0x26c(%rbp)
jmp 0x17f4fc
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x268(%rbp)
movl %eax, -0x26c(%rbp)
leaq -0x238(%rbp), %rdi
callq 0x10ff0
jmp 0x17f4fa
jmp 0x17f4fc
leaq -0x258(%rbp), %rdi
callq 0x3100
leaq -0x259(%rbp), %rdi
callq 0x3290
jmp 0x17f535
jmp 0x17f518
movl -0x84(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x84(%rbp)
jmp 0x17f256
addq $0x2d0, %rsp            # imm = 0x2D0
popq %rbp
retq
movq -0x268(%rbp), %rdi
callq 0x33a0
movq %rax, %rdi
callq 0x116d0
nopl (%rax)