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

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

  ASSERT(s.is_in_range(x));
  ASSERT(!s.is_in_range(interval<>(0, 2)));
  ASSERT(!s.is_in_range(interval<>(8, 12)));
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0xb50, %rsp            # imm = 0xB50
leaq -0x18(%rbp), %rdi
movl $0x2, %esi
movl $0x5, %edx
movabsq $-0x8000000000000000, %rcx # imm = 0x8000000000000000
callq 0x10c60
leaq -0x30(%rbp), %rdi
leaq -0x18(%rbp), %rsi
callq 0x367c0
movl $0x2, -0x34(%rbp)
cmpl $0x7, -0x34(%rbp)
jge 0x18233f
movl -0x34(%rbp), %esi
leaq -0x30(%rbp), %rdi
callq 0x18af60
movb %al, -0xae1(%rbp)
leaq -0x1e9(%rbp), %rdi
movq %rdi, -0xae0(%rbp)
callq 0x33b0
movq -0xae0(%rbp), %rdx
leaq 0x79748(%rip), %rsi     # 0x1fb9e1
leaq -0x1e8(%rbp), %rdi
callq 0x10a90
jmp 0x1822a7
movb -0xae1(%rbp), %al
movzbl %al, %esi
andl $0x1, %esi
leaq -0x1c8(%rbp), %rdi
leaq -0x1e8(%rbp), %rdx
callq 0x10f80
jmp 0x1822c8
leaq -0x1c8(%rbp), %rdi
callq 0x10ff0
jmp 0x1822d6
leaq -0x1e8(%rbp), %rdi
callq 0x3100
leaq -0x1e9(%rbp), %rdi
callq 0x3290
movl -0x34(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x34(%rbp)
jmp 0x18225c
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x1f8(%rbp)
movl %eax, -0x1fc(%rbp)
jmp 0x18232e
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x1f8(%rbp)
movl %eax, -0x1fc(%rbp)
leaq -0x1e8(%rbp), %rdi
callq 0x3100
leaq -0x1e9(%rbp), %rdi
callq 0x3290
jmp 0x1827ac
leaq -0x30(%rbp), %rdi
movl $0x1, %esi
callq 0x18af60
xorb $0x1, %al
movb %al, -0xaf1(%rbp)
leaq -0x3b1(%rbp), %rdi
movq %rdi, -0xaf0(%rbp)
callq 0x33b0
movq -0xaf0(%rbp), %rdx
leaq 0x7967c(%rip), %rsi     # 0x1fb9f2
leaq -0x3b0(%rbp), %rdi
callq 0x10a90
jmp 0x182384
movb -0xaf1(%rbp), %al
movzbl %al, %esi
andl $0x1, %esi
leaq -0x390(%rbp), %rdi
leaq -0x3b0(%rbp), %rdx
callq 0x10f80
jmp 0x1823a5
leaq -0x390(%rbp), %rdi
callq 0x10ff0
jmp 0x1823b3
leaq -0x3b0(%rbp), %rdi
callq 0x3100
leaq -0x3b1(%rbp), %rdi
callq 0x3290
leaq -0x30(%rbp), %rdi
movl $0x8, %esi
callq 0x18af60
xorb $0x1, %al
movb %al, -0xb01(%rbp)
leaq -0x569(%rbp), %rdi
movq %rdi, -0xb00(%rbp)
callq 0x33b0
movq -0xb00(%rbp), %rdx
leaq 0x79602(%rip), %rsi     # 0x1fba04
leaq -0x568(%rbp), %rdi
callq 0x10a90
jmp 0x182410
movb -0xb01(%rbp), %al
movzbl %al, %esi
andl $0x1, %esi
leaq -0x548(%rbp), %rdi
leaq -0x568(%rbp), %rdx
callq 0x10f80
jmp 0x182431
leaq -0x548(%rbp), %rdi
callq 0x10ff0
jmp 0x18243f
leaq -0x568(%rbp), %rdi
callq 0x3100
leaq -0x569(%rbp), %rdi
callq 0x3290
movq -0x8(%rbp), %rax
movq %rax, -0x710(%rbp)
movups -0x18(%rbp), %xmm0
movaps %xmm0, -0x720(%rbp)
movq -0x710(%rbp), %rcx
movq %rsp, %rax
movq %rcx, 0x10(%rax)
movaps -0x720(%rbp), %xmm0
movups %xmm0, (%rax)
leaq -0x30(%rbp), %rdi
callq 0x18afa0
movb %al, -0xb11(%rbp)
leaq -0x741(%rbp), %rdi
movq %rdi, -0xb10(%rbp)
callq 0x33b0
movq -0xb10(%rbp), %rdx
leaq 0x79561(%rip), %rsi     # 0x1fba16
leaq -0x740(%rbp), %rdi
callq 0x10a90
jmp 0x1824c3
movb -0xb11(%rbp), %al
movzbl %al, %esi
andl $0x1, %esi
leaq -0x700(%rbp), %rdi
leaq -0x740(%rbp), %rdx
callq 0x10f80
jmp 0x1824e4
leaq -0x700(%rbp), %rdi
callq 0x10ff0
jmp 0x1824f2
leaq -0x740(%rbp), %rdi
callq 0x3100
leaq -0x741(%rbp), %rdi
callq 0x3290
xorl %eax, %eax
movl %eax, %esi
leaq -0x8e8(%rbp), %rdi
movl $0x2, %edx
callq 0x13e90
movq -0x8e8(%rbp), %rsi
movq -0x8e0(%rbp), %rdx
leaq -0x30(%rbp), %rdi
callq 0x18afe0
xorb $0x1, %al
movb %al, -0xb21(%rbp)
leaq -0x909(%rbp), %rdi
movq %rdi, -0xb20(%rbp)
callq 0x33b0
movq -0xb20(%rbp), %rdx
leaq 0x794c8(%rip), %rsi     # 0x1fba27
leaq -0x908(%rbp), %rdi
callq 0x10a90
jmp 0x18256d
movb -0xb21(%rbp), %al
movzbl %al, %esi
andl $0x1, %esi
leaq -0x8d8(%rbp), %rdi
leaq -0x908(%rbp), %rdx
callq 0x10f80
jmp 0x18258e
leaq -0x8d8(%rbp), %rdi
callq 0x10ff0
jmp 0x18259c
leaq -0x908(%rbp), %rdi
callq 0x3100
leaq -0x909(%rbp), %rdi
callq 0x3290
leaq -0xab0(%rbp), %rdi
movl $0x8, %esi
movl $0xc, %edx
callq 0x13e90
movq -0xab0(%rbp), %rsi
movq -0xaa8(%rbp), %rdx
leaq -0x30(%rbp), %rdi
callq 0x18afe0
xorb $0x1, %al
movb %al, -0xb31(%rbp)
leaq -0xad1(%rbp), %rdi
movq %rdi, -0xb30(%rbp)
callq 0x33b0
movq -0xb30(%rbp), %rdx
leaq 0x7943e(%rip), %rsi     # 0x1fba48
leaq -0xad0(%rbp), %rdi
callq 0x10a90
jmp 0x182618
movb -0xb31(%rbp), %al
movzbl %al, %esi
andl $0x1, %esi
leaq -0xaa0(%rbp), %rdi
leaq -0xad0(%rbp), %rdx
callq 0x10f80
jmp 0x182639
leaq -0xaa0(%rbp), %rdi
callq 0x10ff0
jmp 0x182647
leaq -0xad0(%rbp), %rdi
callq 0x3100
leaq -0xad1(%rbp), %rdi
callq 0x3290
addq $0xb50, %rsp            # imm = 0xB50
popq %rbp
retq
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x1f8(%rbp)
movl %eax, -0x1fc(%rbp)
jmp 0x18269a
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x1f8(%rbp)
movl %eax, -0x1fc(%rbp)
leaq -0x3b0(%rbp), %rdi
callq 0x3100
leaq -0x3b1(%rbp), %rdi
callq 0x3290
jmp 0x1827ac
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x1f8(%rbp)
movl %eax, -0x1fc(%rbp)
jmp 0x1826dd
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x1f8(%rbp)
movl %eax, -0x1fc(%rbp)
leaq -0x568(%rbp), %rdi
callq 0x3100
leaq -0x569(%rbp), %rdi
callq 0x3290
jmp 0x1827ac
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x1f8(%rbp)
movl %eax, -0x1fc(%rbp)
jmp 0x182720
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x1f8(%rbp)
movl %eax, -0x1fc(%rbp)
leaq -0x740(%rbp), %rdi
callq 0x3100
leaq -0x741(%rbp), %rdi
callq 0x3290
jmp 0x1827ac
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x1f8(%rbp)
movl %eax, -0x1fc(%rbp)
jmp 0x182760
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x1f8(%rbp)
movl %eax, -0x1fc(%rbp)
leaq -0x908(%rbp), %rdi
callq 0x3100
leaq -0x909(%rbp), %rdi
callq 0x3290
jmp 0x1827ac
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x1f8(%rbp)
movl %eax, -0x1fc(%rbp)
jmp 0x1827a0
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x1f8(%rbp)
movl %eax, -0x1fc(%rbp)
leaq -0xad0(%rbp), %rdi
callq 0x3100
leaq -0xad1(%rbp), %rdi
callq 0x3290
movq -0x1f8(%rbp), %rdi
callq 0x33a0
nopl (%rax,%rax)