// File: /workspace/github_cpp_makefile_star2_O2/dsharlet[P]array/test/shape.cpp
// Function: nda::test_shape_is_in_range_2d_body()
TEST(shape_is_in_range_2d) {
  dim<> x(2, 5);
  dim<> y(-3, 6);
  shape<dim<>, dim<>> s(x, y);

  for (int i = -3; i < 3; i++) {
    for (int j = 2; j < 7; j++) {
      ASSERT(s.is_in_range(j, i));
    }
  }
  ASSERT(!s.is_in_range(1, 0));
  ASSERT(!s.is_in_range(2, -4));

  ASSERT(!s.is_in_range(8, 0));
  ASSERT(!s.is_in_range(2, 4));

  ASSERT(s.is_in_range(x, y));
  ASSERT(!s.is_in_range(1, y));
  ASSERT(!s.is_in_range(x, -4));
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0xce8, %rsp            # imm = 0xCE8
movabsq $-0x8000000000000000, %rax # imm = 0x8000000000000000
leaq 0x38(%rsp), %rcx
movq $-0x3, (%rcx)
movq $0x6, 0x8(%rcx)
movq %rax, 0x10(%rcx)
movq $0x2, 0x18(%rcx)
movq $0x5, 0x20(%rcx)
movq %rax, 0x28(%rcx)
pushq $-0x3
popq %rbp
leaq 0x8(%rsp), %r15
leaq 0x7(%rsp), %r12
leaq 0xb58(%rsp), %r13
cmpl $0x3, %ebp
je 0x74d5d
pushq $0x2
popq %rbx
cmpl $0x7, %ebx
je 0x74d59
leaq 0x38(%rsp), %rdi
movl %ebx, %esi
movl %ebp, %edx
callq 0x771aa
movl %eax, %r14d
movq %r15, %rdi
leaq 0x35b20(%rip), %rsi     # 0xaa84e
movq %r12, %rdx
callq 0x66a0
movzbl %r14b, %esi
movq %r13, %rdi
movq %r15, %rdx
callq 0x6894
movq %r13, %rdi
callq 0x68d4
movq %r15, %rdi
callq 0x2090
incl %ebx
jmp 0x74d0e
incl %ebp
jmp 0x74d06
leaq 0x38(%rsp), %rdi
pushq $0x1
popq %rsi
xorl %edx, %edx
callq 0x771aa
movl %eax, %ebx
leaq 0x35aed(%rip), %rsi     # 0xaa862
leaq 0x8(%rsp), %rdi
leaq 0x7(%rsp), %rdx
callq 0x66a0
xorb $0x1, %bl
movzbl %bl, %esi
leaq 0x9c8(%rsp), %rdi
leaq 0x8(%rsp), %rdx
callq 0x6894
movabsq $-0x8000000000000000, %r14 # imm = 0x8000000000000000
leaq 0x9c8(%rsp), %rdi
callq 0x68d4
leaq 0x8(%rsp), %rdi
callq 0x2090
leaq 0x38(%rsp), %rdi
pushq $0x2
popq %rsi
pushq $-0x4
popq %rdx
callq 0x771aa
movl %eax, %ebx
leaq 0x35aa1(%rip), %rsi     # 0xaa877
leaq 0x8(%rsp), %rdi
leaq 0x7(%rsp), %rdx
callq 0x66a0
xorb $0x1, %bl
movzbl %bl, %esi
leaq 0x838(%rsp), %rdi
leaq 0x8(%rsp), %rdx
callq 0x6894
leaq 0x838(%rsp), %rdi
callq 0x68d4
leaq 0x8(%rsp), %rdi
callq 0x2090
leaq 0x38(%rsp), %rdi
pushq $0x8
popq %rsi
xorl %edx, %edx
callq 0x771aa
movl %eax, %ebx
leaq 0x35a61(%rip), %rsi     # 0xaa88d
leaq 0x8(%rsp), %rdi
leaq 0x7(%rsp), %rdx
callq 0x66a0
xorb $0x1, %bl
movzbl %bl, %esi
leaq 0x6a8(%rsp), %rdi
leaq 0x8(%rsp), %rdx
callq 0x6894
leaq 0x6a8(%rsp), %rdi
callq 0x68d4
leaq 0x8(%rsp), %rdi
callq 0x2090
leaq 0x38(%rsp), %rdi
pushq $0x2
popq %rsi
pushq $0x4
popq %rdx
callq 0x771aa
movl %eax, %ebx
leaq 0x35a1f(%rip), %rsi     # 0xaa8a2
leaq 0x8(%rsp), %rdi
leaq 0x7(%rsp), %rdx
callq 0x66a0
xorb $0x1, %bl
movzbl %bl, %esi
leaq 0x518(%rsp), %rdi
leaq 0x8(%rsp), %rdx
callq 0x6894
leaq 0x518(%rsp), %rdi
callq 0x68d4
leaq 0x8(%rsp), %rbx
movq %rbx, %rdi
callq 0x2090
movq $-0x3, (%rbx)
movq $0x6, 0x8(%rbx)
movq %r14, 0x10(%rbx)
movq $0x2, 0x18(%rbx)
movq $0x5, 0x20(%rbx)
movq %r14, 0x28(%rbx)
leaq 0x38(%rsp), %rdi
leaq 0x8(%rsp), %rsi
callq 0x827f2
movl %eax, %ebx
leaq 0x359b4(%rip), %rsi     # 0xaa8b7
leaq 0x8(%rsp), %rdi
leaq 0x7(%rsp), %rdx
callq 0x66a0
movzbl %bl, %esi
leaq 0x388(%rsp), %rdi
leaq 0x8(%rsp), %rdx
callq 0x6894
leaq 0x388(%rsp), %rdi
callq 0x68d4
leaq 0x8(%rsp), %rbx
movq %rbx, %rdi
callq 0x2090
movq $-0x3, (%rbx)
movq $0x6, 0x8(%rbx)
movq %r14, 0x10(%rbx)
movl $0x1, 0x18(%rbx)
leaq 0x38(%rsp), %rdi
leaq 0x8(%rsp), %rsi
callq 0x82831
movl %eax, %ebx
leaq 0x35958(%rip), %rsi     # 0xaa8cb
leaq 0x8(%rsp), %rdi
leaq 0x7(%rsp), %rdx
callq 0x66a0
xorb $0x1, %bl
movzbl %bl, %esi
leaq 0x1f8(%rsp), %rdi
leaq 0x8(%rsp), %rdx
callq 0x6894
leaq 0x1f8(%rsp), %rdi
callq 0x68d4
leaq 0x8(%rsp), %rbx
movq %rbx, %rdi
callq 0x2090
movl $0xfffffffc, (%rbx)     # imm = 0xFFFFFFFC
movq $0x2, 0x8(%rbx)
movq $0x5, 0x10(%rbx)
movq %r14, 0x18(%rbx)
leaq 0x38(%rsp), %rdi
leaq 0x8(%rsp), %rsi
callq 0x82870
movl %eax, %ebx
leaq 0x358fa(%rip), %rsi     # 0xaa8e0
leaq 0x8(%rsp), %rdi
leaq 0x7(%rsp), %rdx
callq 0x66a0
xorb $0x1, %bl
movzbl %bl, %esi
leaq 0x68(%rsp), %rdi
leaq 0x8(%rsp), %rdx
callq 0x6894
leaq 0x68(%rsp), %rdi
callq 0x68d4
leaq 0x8(%rsp), %rdi
callq 0x2090
addq $0xce8, %rsp            # imm = 0xCE8
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
jmp 0x7504c
jmp 0x7504c
jmp 0x7504c
jmp 0x7504c
jmp 0x7504c
jmp 0x7504c
jmp 0x7504c
jmp 0x75051
jmp 0x75051
jmp 0x75051
jmp 0x75051
jmp 0x75051
jmp 0x75051
jmp 0x75051
movq %rax, %rbx
jmp 0x7505e
movq %rax, %rbx
leaq 0x8(%rsp), %rdi
callq 0x2090
movq %rbx, %rdi
callq 0x22f0