// File: /workspace/github_cpp_makefile_star2_O1/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 $0xca8, %rsp            # imm = 0xCA8
movl $0xfffffffd, %ebp       # imm = 0xFFFFFFFD
leaq 0x361d7(%rip), %rbx     # 0xbd5c3
leaq 0x361e3(%rip), %r14     # 0xbd5d6
leaq 0x8(%rsp), %r15
leaq 0xb18(%rsp), %r12
movl $0x5, %r13d
leaq 0x18(%rsp), %rax
movq %rax, 0x8(%rsp)
movq %r15, %rdi
movq %rbx, %rsi
movq %r14, %rdx
callq 0xd0b8
movq %r12, %rdi
movl $0x1, %esi
movq %r15, %rdx
callq 0xbf0a
movq %r12, %rdi
callq 0xbf62
movq 0x8(%rsp), %rdi
leaq 0x18(%rsp), %rax
cmpq %rax, %rdi
je 0x87452
movq 0x18(%rsp), %rsi
incq %rsi
callq 0x21f0
decl %r13d
jne 0x87406
incl %ebp
cmpl $0x3, %ebp
jne 0x87400
leaq 0x8(%rsp), %rdi
leaq 0x18(%rsp), %rax
movq %rax, (%rdi)
leaq 0x36165(%rip), %rsi     # 0xbd5d7
leaq 0x36172(%rip), %rdx     # 0xbd5eb
callq 0xd0b8
leaq 0x988(%rsp), %rdi
leaq 0x8(%rsp), %rdx
movl $0x1, %esi
callq 0xbf0a
leaq 0x988(%rsp), %rdi
callq 0xbf62
movq 0x8(%rsp), %rdi
leaq 0x18(%rsp), %rax
cmpq %rax, %rdi
je 0x874be
movq 0x18(%rsp), %rsi
incq %rsi
callq 0x21f0
leaq 0x8(%rsp), %rdi
leaq 0x18(%rsp), %rax
movq %rax, (%rdi)
leaq 0x3611a(%rip), %rsi     # 0xbd5ec
leaq 0x36128(%rip), %rdx     # 0xbd601
callq 0xd0b8
leaq 0x7f8(%rsp), %rdi
leaq 0x8(%rsp), %rdx
movl $0x1, %esi
callq 0xbf0a
leaq 0x7f8(%rsp), %rdi
callq 0xbf62
movq 0x8(%rsp), %rdi
leaq 0x18(%rsp), %rax
cmpq %rax, %rdi
je 0x8751e
movq 0x18(%rsp), %rsi
incq %rsi
callq 0x21f0
leaq 0x8(%rsp), %rdi
leaq 0x18(%rsp), %rax
movq %rax, (%rdi)
leaq 0x360d0(%rip), %rsi     # 0xbd602
leaq 0x360dd(%rip), %rdx     # 0xbd616
callq 0xd0b8
leaq 0x668(%rsp), %rdi
leaq 0x8(%rsp), %rdx
movl $0x1, %esi
callq 0xbf0a
leaq 0x668(%rsp), %rdi
callq 0xbf62
movq 0x8(%rsp), %rdi
leaq 0x18(%rsp), %rax
cmpq %rax, %rdi
je 0x8757e
movq 0x18(%rsp), %rsi
incq %rsi
callq 0x21f0
leaq 0x8(%rsp), %rdi
leaq 0x18(%rsp), %rax
movq %rax, (%rdi)
leaq 0x36085(%rip), %rsi     # 0xbd617
leaq 0x36092(%rip), %rdx     # 0xbd62b
callq 0xd0b8
leaq 0x4d8(%rsp), %rdi
leaq 0x8(%rsp), %rdx
movl $0x1, %esi
callq 0xbf0a
leaq 0x4d8(%rsp), %rdi
callq 0xbf62
movq 0x8(%rsp), %rdi
leaq 0x18(%rsp), %rax
cmpq %rax, %rdi
je 0x875de
movq 0x18(%rsp), %rsi
incq %rsi
callq 0x21f0
leaq 0x8(%rsp), %rdi
leaq 0x18(%rsp), %rax
movq %rax, (%rdi)
leaq 0x3603a(%rip), %rsi     # 0xbd62c
leaq 0x36046(%rip), %rdx     # 0xbd63f
callq 0xd0b8
leaq 0x348(%rsp), %rdi
leaq 0x8(%rsp), %rdx
movl $0x1, %esi
callq 0xbf0a
leaq 0x348(%rsp), %rdi
callq 0xbf62
movq 0x8(%rsp), %rdi
leaq 0x18(%rsp), %rax
cmpq %rax, %rdi
je 0x8763e
movq 0x18(%rsp), %rsi
incq %rsi
callq 0x21f0
leaq 0x8(%rsp), %rdi
leaq 0x18(%rsp), %rax
movq %rax, (%rdi)
leaq 0x35fee(%rip), %rsi     # 0xbd640
leaq 0x35ffb(%rip), %rdx     # 0xbd654
callq 0xd0b8
leaq 0x1b8(%rsp), %rdi
leaq 0x8(%rsp), %rdx
movl $0x1, %esi
callq 0xbf0a
leaq 0x1b8(%rsp), %rdi
callq 0xbf62
movq 0x8(%rsp), %rdi
leaq 0x18(%rsp), %rax
cmpq %rax, %rdi
je 0x8769e
movq 0x18(%rsp), %rsi
incq %rsi
callq 0x21f0
leaq 0x8(%rsp), %rdi
leaq 0x18(%rsp), %rax
movq %rax, (%rdi)
leaq 0x35fa3(%rip), %rsi     # 0xbd655
leaq 0x35fb1(%rip), %rdx     # 0xbd66a
callq 0xd0b8
leaq 0x28(%rsp), %rdi
leaq 0x8(%rsp), %rdx
movl $0x1, %esi
callq 0xbf0a
leaq 0x28(%rsp), %rdi
callq 0xbf62
movq 0x8(%rsp), %rdi
leaq 0x18(%rsp), %rax
cmpq %rax, %rdi
je 0x876f8
movq 0x18(%rsp), %rsi
incq %rsi
callq 0x21f0
addq $0xca8, %rsp            # imm = 0xCA8
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
jmp 0x87726
jmp 0x87726
jmp 0x87726
jmp 0x87726
jmp 0x87726
jmp 0x87726
jmp 0x87726
jmp 0x8772b
jmp 0x8772b
jmp 0x8772b
jmp 0x8772b
jmp 0x8772b
jmp 0x8772b
jmp 0x8772b
movq %rax, %rbx
jmp 0x8774a
movq %rax, %rbx
movq 0x8(%rsp), %rdi
leaq 0x18(%rsp), %rax
cmpq %rax, %rdi
je 0x8774a
movq 0x18(%rsp), %rsi
incq %rsi
callq 0x21f0
movq %rbx, %rdi
callq 0x2300