// File: dsharlet[P]array/test/shape.cpp
// Function: nda::test_dim_is_in_range_body()
TEST(dim_is_in_range) {
  dim<> x(2, 5);

  for (int i = 2; i < 7; i++) {
    ASSERT(x.is_in_range(i));
  }
  ASSERT(!x.is_in_range(1));
  ASSERT(!x.is_in_range(8));

  ASSERT(x.is_in_range(x));
  ASSERT(!x.is_in_range(interval<>(1, 2)));
  ASSERT(!x.is_in_range(interval<>(8, 2)));
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0xcd0, %rsp            # imm = 0xCD0
leaq -0x1b0(%rbp), %rdi
movl $0x2, %esi
movl $0x5, %edx
movabsq $-0x8000000000000000, %rcx # imm = 0x8000000000000000
callq 0x10c60
movl $0x2, -0x1b4(%rbp)
cmpl $0x7, -0x1b4(%rbp)
jge 0x181a37
movslq -0x1b4(%rbp), %rax
leaq -0x1b0(%rbp), %rcx
movq %rcx, -0x170(%rbp)
movq %rax, -0x178(%rbp)
movq -0x170(%rbp), %rax
movq %rax, -0xc40(%rbp)
movq %rax, -0xf0(%rbp)
movq -0xf0(%rbp), %rax
movq (%rax), %rcx
xorl %eax, %eax
cmpq -0x178(%rbp), %rcx
movb %al, -0xc32(%rbp)
jg 0x18195e
movq -0xc40(%rbp), %rcx
movq -0x178(%rbp), %rax
movq %rcx, -0x48(%rbp)
movq -0x48(%rbp), %rdx
movq %rdx, -0x38(%rbp)
movq -0x38(%rbp), %rcx
movq (%rcx), %rcx
addq $0x8, %rdx
movq %rdx, -0x40(%rbp)
movq -0x40(%rbp), %rdx
addq (%rdx), %rcx
subq $0x1, %rcx
cmpq %rcx, %rax
setle %al
movb %al, -0xc32(%rbp)
movb -0xc32(%rbp), %al
movb %al, -0xc49(%rbp)
leaq -0x369(%rbp), %rdi
movq %rdi, -0xc48(%rbp)
callq 0x33b0
movq -0xc48(%rbp), %rdx
leaq 0x79fb9(%rip), %rsi     # 0x1fb944
leaq -0x368(%rbp), %rdi
callq 0x10a90
jmp 0x181999
movb -0xc49(%rbp), %al
movzbl %al, %esi
andl $0x1, %esi
leaq -0x348(%rbp), %rdi
leaq -0x368(%rbp), %rdx
callq 0x10f80
jmp 0x1819ba
leaq -0x348(%rbp), %rdi
callq 0x10ff0
jmp 0x1819c8
leaq -0x368(%rbp), %rdi
callq 0x3100
leaq -0x369(%rbp), %rdi
callq 0x3290
movl -0x1b4(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x1b4(%rbp)
jmp 0x1818c5
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x378(%rbp)
movl %eax, -0x37c(%rbp)
jmp 0x181a26
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x378(%rbp)
movl %eax, -0x37c(%rbp)
leaq -0x368(%rbp), %rdi
callq 0x3100
leaq -0x369(%rbp), %rdi
callq 0x3290
jmp 0x182211
leaq -0x1b0(%rbp), %rax
movq %rax, -0x180(%rbp)
movq $0x1, -0x188(%rbp)
movq -0x180(%rbp), %rax
movq %rax, -0xc58(%rbp)
movq %rax, -0xe8(%rbp)
movq -0xe8(%rbp), %rax
movq (%rax), %rcx
xorl %eax, %eax
cmpq -0x188(%rbp), %rcx
movb %al, -0xc4a(%rbp)
jg 0x181ac0
movq -0xc58(%rbp), %rcx
movq -0x188(%rbp), %rax
movq %rcx, -0x30(%rbp)
movq -0x30(%rbp), %rdx
movq %rdx, -0x20(%rbp)
movq -0x20(%rbp), %rcx
movq (%rcx), %rcx
addq $0x8, %rdx
movq %rdx, -0x28(%rbp)
movq -0x28(%rbp), %rdx
addq (%rdx), %rcx
subq $0x1, %rcx
cmpq %rcx, %rax
setle %al
movb %al, -0xc4a(%rbp)
movb -0xc4a(%rbp), %al
xorb $0x1, %al
movb %al, -0xc61(%rbp)
leaq -0x531(%rbp), %rdi
movq %rdi, -0xc60(%rbp)
callq 0x33b0
movq -0xc60(%rbp), %rdx
leaq 0x79e66(%rip), %rsi     # 0x1fb955
leaq -0x530(%rbp), %rdi
callq 0x10a90
jmp 0x181afd
movb -0xc61(%rbp), %al
movzbl %al, %esi
andl $0x1, %esi
leaq -0x510(%rbp), %rdi
leaq -0x530(%rbp), %rdx
callq 0x10f80
jmp 0x181b1e
leaq -0x510(%rbp), %rdi
callq 0x10ff0
jmp 0x181b2c
leaq -0x530(%rbp), %rdi
callq 0x3100
leaq -0x531(%rbp), %rdi
callq 0x3290
leaq -0x1b0(%rbp), %rax
movq %rax, -0x190(%rbp)
movq $0x8, -0x198(%rbp)
movq -0x190(%rbp), %rax
movq %rax, -0xc70(%rbp)
movq %rax, -0xe0(%rbp)
movq -0xe0(%rbp), %rax
movq (%rax), %rcx
xorl %eax, %eax
cmpq -0x198(%rbp), %rcx
movb %al, -0xc62(%rbp)
jg 0x181bcd
movq -0xc70(%rbp), %rcx
movq -0x198(%rbp), %rax
movq %rcx, -0x18(%rbp)
movq -0x18(%rbp), %rdx
movq %rdx, -0x8(%rbp)
movq -0x8(%rbp), %rcx
movq (%rcx), %rcx
addq $0x8, %rdx
movq %rdx, -0x10(%rbp)
movq -0x10(%rbp), %rdx
addq (%rdx), %rcx
subq $0x1, %rcx
cmpq %rcx, %rax
setle %al
movb %al, -0xc62(%rbp)
movb -0xc62(%rbp), %al
xorb $0x1, %al
movb %al, -0xc79(%rbp)
leaq -0x6e9(%rbp), %rdi
movq %rdi, -0xc78(%rbp)
callq 0x33b0
movq -0xc78(%rbp), %rdx
leaq 0x79d6b(%rip), %rsi     # 0x1fb967
leaq -0x6e8(%rbp), %rdi
callq 0x10a90
jmp 0x181c0a
movb -0xc79(%rbp), %al
movzbl %al, %esi
andl $0x1, %esi
leaq -0x6c8(%rbp), %rdi
leaq -0x6e8(%rbp), %rdx
callq 0x10f80
jmp 0x181c2b
leaq -0x6c8(%rbp), %rdi
callq 0x10ff0
jmp 0x181c39
leaq -0x6e8(%rbp), %rdi
callq 0x3100
leaq -0x6e9(%rbp), %rdi
callq 0x3290
leaq -0x1b0(%rbp), %rax
movq %rax, -0x160(%rbp)
leaq -0x1b0(%rbp), %rax
movq %rax, -0x168(%rbp)
movq -0x160(%rbp), %rax
movq %rax, -0xc88(%rbp)
movq %rax, -0xf8(%rbp)
movq -0xf8(%rbp), %rax
movq (%rax), %rcx
movq -0x168(%rbp), %rax
movq %rax, -0x158(%rbp)
movq -0x158(%rbp), %rax
movq %rax, -0x100(%rbp)
movq -0x100(%rbp), %rdx
xorl %eax, %eax
cmpq (%rdx), %rcx
movb %al, -0xc7a(%rbp)
jg 0x181d22
movq -0xc88(%rbp), %rcx
movq -0x168(%rbp), %rax
movq %rax, -0x60(%rbp)
movq -0x60(%rbp), %rdx
movq %rdx, -0x50(%rbp)
movq -0x50(%rbp), %rax
movq (%rax), %rax
addq $0x8, %rdx
movq %rdx, -0x58(%rbp)
movq -0x58(%rbp), %rdx
addq (%rdx), %rax
subq $0x1, %rax
movq %rcx, -0x78(%rbp)
movq -0x78(%rbp), %rdx
movq %rdx, -0x68(%rbp)
movq -0x68(%rbp), %rcx
movq (%rcx), %rcx
addq $0x8, %rdx
movq %rdx, -0x70(%rbp)
movq -0x70(%rbp), %rdx
addq (%rdx), %rcx
subq $0x1, %rcx
cmpq %rcx, %rax
setle %al
movb %al, -0xc7a(%rbp)
movb -0xc7a(%rbp), %al
movb %al, -0xc91(%rbp)
leaq -0x8a1(%rbp), %rdi
movq %rdi, -0xc90(%rbp)
callq 0x33b0
movq -0xc90(%rbp), %rdx
leaq 0x79c2a(%rip), %rsi     # 0x1fb979
leaq -0x8a0(%rbp), %rdi
callq 0x10a90
jmp 0x181d5d
movb -0xc91(%rbp), %al
movzbl %al, %esi
andl $0x1, %esi
leaq -0x880(%rbp), %rdi
leaq -0x8a0(%rbp), %rdx
callq 0x10f80
jmp 0x181d7e
leaq -0x880(%rbp), %rdi
callq 0x10ff0
jmp 0x181d8c
leaq -0x8a0(%rbp), %rdi
callq 0x3100
leaq -0x8a1(%rbp), %rdi
callq 0x3290
leaq -0xa48(%rbp), %rdi
movl $0x1, %esi
movl $0x2, %edx
callq 0x13e90
leaq -0x1b0(%rbp), %rax
movq %rax, -0x130(%rbp)
leaq -0xa48(%rbp), %rax
movq %rax, -0x138(%rbp)
movq -0x130(%rbp), %rax
movq %rax, -0xca0(%rbp)
movq %rax, -0x118(%rbp)
movq -0x118(%rbp), %rax
movq (%rax), %rcx
movq -0x138(%rbp), %rax
movq %rax, -0x128(%rbp)
movq -0x128(%rbp), %rax
movq %rax, -0x120(%rbp)
movq -0x120(%rbp), %rdx
xorl %eax, %eax
cmpq (%rdx), %rcx
movb %al, -0xc92(%rbp)
jg 0x181eb3
movq -0xca0(%rbp), %rcx
movq -0x138(%rbp), %rax
movq %rax, -0xc0(%rbp)
movq -0xc0(%rbp), %rdx
movq %rdx, -0xb0(%rbp)
movq -0xb0(%rbp), %rax
movq (%rax), %rax
addq $0x8, %rdx
movq %rdx, -0xb8(%rbp)
movq -0xb8(%rbp), %rdx
addq (%rdx), %rax
subq $0x1, %rax
movq %rcx, -0xd8(%rbp)
movq -0xd8(%rbp), %rdx
movq %rdx, -0xc8(%rbp)
movq -0xc8(%rbp), %rcx
movq (%rcx), %rcx
addq $0x8, %rdx
movq %rdx, -0xd0(%rbp)
movq -0xd0(%rbp), %rdx
addq (%rdx), %rcx
subq $0x1, %rcx
cmpq %rcx, %rax
setle %al
movb %al, -0xc92(%rbp)
movb -0xc92(%rbp), %al
xorb $0x1, %al
movb %al, -0xca9(%rbp)
leaq -0xa69(%rbp), %rdi
movq %rdi, -0xca8(%rbp)
callq 0x33b0
movq -0xca8(%rbp), %rdx
leaq 0x79aa8(%rip), %rsi     # 0x1fb98a
leaq -0xa68(%rbp), %rdi
callq 0x10a90
jmp 0x181ef0
movb -0xca9(%rbp), %al
movzbl %al, %esi
andl $0x1, %esi
leaq -0xa38(%rbp), %rdi
leaq -0xa68(%rbp), %rdx
callq 0x10f80
jmp 0x181f11
leaq -0xa38(%rbp), %rdi
callq 0x10ff0
jmp 0x181f1f
leaq -0xa68(%rbp), %rdi
callq 0x3100
leaq -0xa69(%rbp), %rdi
callq 0x3290
leaq -0xc10(%rbp), %rdi
movl $0x8, %esi
movl $0x2, %edx
callq 0x13e90
leaq -0x1b0(%rbp), %rax
movq %rax, -0x148(%rbp)
leaq -0xc10(%rbp), %rax
movq %rax, -0x150(%rbp)
movq -0x148(%rbp), %rax
movq %rax, -0xcb8(%rbp)
movq %rax, -0x108(%rbp)
movq -0x108(%rbp), %rax
movq (%rax), %rcx
movq -0x150(%rbp), %rax
movq %rax, -0x140(%rbp)
movq -0x140(%rbp), %rax
movq %rax, -0x110(%rbp)
movq -0x110(%rbp), %rdx
xorl %eax, %eax
cmpq (%rdx), %rcx
movb %al, -0xcaa(%rbp)
jg 0x182040
movq -0xcb8(%rbp), %rcx
movq -0x150(%rbp), %rax
movq %rax, -0x90(%rbp)
movq -0x90(%rbp), %rdx
movq %rdx, -0x80(%rbp)
movq -0x80(%rbp), %rax
movq (%rax), %rax
addq $0x8, %rdx
movq %rdx, -0x88(%rbp)
movq -0x88(%rbp), %rdx
addq (%rdx), %rax
subq $0x1, %rax
movq %rcx, -0xa8(%rbp)
movq -0xa8(%rbp), %rdx
movq %rdx, -0x98(%rbp)
movq -0x98(%rbp), %rcx
movq (%rcx), %rcx
addq $0x8, %rdx
movq %rdx, -0xa0(%rbp)
movq -0xa0(%rbp), %rdx
addq (%rdx), %rcx
subq $0x1, %rcx
cmpq %rcx, %rax
setle %al
movb %al, -0xcaa(%rbp)
movb -0xcaa(%rbp), %al
xorb $0x1, %al
movb %al, -0xcc1(%rbp)
leaq -0xc31(%rbp), %rdi
movq %rdi, -0xcc0(%rbp)
callq 0x33b0
movq -0xcc0(%rbp), %rdx
leaq 0x7993c(%rip), %rsi     # 0x1fb9ab
leaq -0xc30(%rbp), %rdi
callq 0x10a90
jmp 0x18207d
movb -0xcc1(%rbp), %al
movzbl %al, %esi
andl $0x1, %esi
leaq -0xc00(%rbp), %rdi
leaq -0xc30(%rbp), %rdx
callq 0x10f80
jmp 0x18209e
leaq -0xc00(%rbp), %rdi
callq 0x10ff0
jmp 0x1820ac
leaq -0xc30(%rbp), %rdi
callq 0x3100
leaq -0xc31(%rbp), %rdi
callq 0x3290
addq $0xcd0, %rsp            # imm = 0xCD0
popq %rbp
retq
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x378(%rbp)
movl %eax, -0x37c(%rbp)
jmp 0x1820ff
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x378(%rbp)
movl %eax, -0x37c(%rbp)
leaq -0x530(%rbp), %rdi
callq 0x3100
leaq -0x531(%rbp), %rdi
callq 0x3290
jmp 0x182211
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x378(%rbp)
movl %eax, -0x37c(%rbp)
jmp 0x182142
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x378(%rbp)
movl %eax, -0x37c(%rbp)
leaq -0x6e8(%rbp), %rdi
callq 0x3100
leaq -0x6e9(%rbp), %rdi
callq 0x3290
jmp 0x182211
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x378(%rbp)
movl %eax, -0x37c(%rbp)
jmp 0x182185
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x378(%rbp)
movl %eax, -0x37c(%rbp)
leaq -0x8a0(%rbp), %rdi
callq 0x3100
leaq -0x8a1(%rbp), %rdi
callq 0x3290
jmp 0x182211
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x378(%rbp)
movl %eax, -0x37c(%rbp)
jmp 0x1821c5
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x378(%rbp)
movl %eax, -0x37c(%rbp)
leaq -0xa68(%rbp), %rdi
callq 0x3100
leaq -0xa69(%rbp), %rdi
callq 0x3290
jmp 0x182211
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x378(%rbp)
movl %eax, -0x37c(%rbp)
jmp 0x182205
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x378(%rbp)
movl %eax, -0x37c(%rbp)
leaq -0xc30(%rbp), %rdi
callq 0x3100
leaq -0xc31(%rbp), %rdi
callq 0x3290
movq -0x378(%rbp), %rdi
callq 0x33a0
nopl (%rax)