// File: /workspace/github_cpp_makefile_star2_O3/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 0x35d5c(%rip), %rbx     # 0xbf123
leaq 0x35d68(%rip), %r14     # 0xbf136
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 0xd14c
movq %r12, %rdi
movl $0x1, %esi
movq %r15, %rdx
callq 0xbf80
movq %r12, %rdi
callq 0xbfd8
movq 0x8(%rsp), %rdi
leaq 0x18(%rsp), %rax
cmpq %rax, %rdi
je 0x8942d
movq 0x18(%rsp), %rsi
incq %rsi
callq 0x21f0
decl %r13d
jne 0x893e1
incl %ebp
cmpl $0x3, %ebp
jne 0x893db
leaq 0x8(%rsp), %rdi
leaq 0x18(%rsp), %rax
movq %rax, (%rdi)
leaq 0x35cea(%rip), %rsi     # 0xbf137
leaq 0x35cf7(%rip), %rdx     # 0xbf14b
callq 0xd14c
leaq 0x988(%rsp), %rdi
leaq 0x8(%rsp), %rdx
movl $0x1, %esi
callq 0xbf80
leaq 0x988(%rsp), %rdi
callq 0xbfd8
movq 0x8(%rsp), %rdi
leaq 0x18(%rsp), %rax
cmpq %rax, %rdi
je 0x89499
movq 0x18(%rsp), %rsi
incq %rsi
callq 0x21f0
leaq 0x8(%rsp), %rdi
leaq 0x18(%rsp), %rax
movq %rax, (%rdi)
leaq 0x35c9f(%rip), %rsi     # 0xbf14c
leaq 0x35cad(%rip), %rdx     # 0xbf161
callq 0xd14c
leaq 0x7f8(%rsp), %rdi
leaq 0x8(%rsp), %rdx
movl $0x1, %esi
callq 0xbf80
leaq 0x7f8(%rsp), %rdi
callq 0xbfd8
movq 0x8(%rsp), %rdi
leaq 0x18(%rsp), %rax
cmpq %rax, %rdi
je 0x894f9
movq 0x18(%rsp), %rsi
incq %rsi
callq 0x21f0
leaq 0x8(%rsp), %rdi
leaq 0x18(%rsp), %rax
movq %rax, (%rdi)
leaq 0x35c55(%rip), %rsi     # 0xbf162
leaq 0x35c62(%rip), %rdx     # 0xbf176
callq 0xd14c
leaq 0x668(%rsp), %rdi
leaq 0x8(%rsp), %rdx
movl $0x1, %esi
callq 0xbf80
leaq 0x668(%rsp), %rdi
callq 0xbfd8
movq 0x8(%rsp), %rdi
leaq 0x18(%rsp), %rax
cmpq %rax, %rdi
je 0x89559
movq 0x18(%rsp), %rsi
incq %rsi
callq 0x21f0
leaq 0x8(%rsp), %rdi
leaq 0x18(%rsp), %rax
movq %rax, (%rdi)
leaq 0x35c0a(%rip), %rsi     # 0xbf177
leaq 0x35c17(%rip), %rdx     # 0xbf18b
callq 0xd14c
leaq 0x4d8(%rsp), %rdi
leaq 0x8(%rsp), %rdx
movl $0x1, %esi
callq 0xbf80
leaq 0x4d8(%rsp), %rdi
callq 0xbfd8
movq 0x8(%rsp), %rdi
leaq 0x18(%rsp), %rax
cmpq %rax, %rdi
je 0x895b9
movq 0x18(%rsp), %rsi
incq %rsi
callq 0x21f0
leaq 0x8(%rsp), %rdi
leaq 0x18(%rsp), %rax
movq %rax, (%rdi)
leaq 0x35bbf(%rip), %rsi     # 0xbf18c
leaq 0x35bcb(%rip), %rdx     # 0xbf19f
callq 0xd14c
leaq 0x348(%rsp), %rdi
leaq 0x8(%rsp), %rdx
movl $0x1, %esi
callq 0xbf80
leaq 0x348(%rsp), %rdi
callq 0xbfd8
movq 0x8(%rsp), %rdi
leaq 0x18(%rsp), %rax
cmpq %rax, %rdi
je 0x89619
movq 0x18(%rsp), %rsi
incq %rsi
callq 0x21f0
leaq 0x8(%rsp), %rdi
leaq 0x18(%rsp), %rax
movq %rax, (%rdi)
leaq 0x35b73(%rip), %rsi     # 0xbf1a0
leaq 0x35b80(%rip), %rdx     # 0xbf1b4
callq 0xd14c
leaq 0x1b8(%rsp), %rdi
leaq 0x8(%rsp), %rdx
movl $0x1, %esi
callq 0xbf80
leaq 0x1b8(%rsp), %rdi
callq 0xbfd8
movq 0x8(%rsp), %rdi
leaq 0x18(%rsp), %rax
cmpq %rax, %rdi
je 0x89679
movq 0x18(%rsp), %rsi
incq %rsi
callq 0x21f0
leaq 0x8(%rsp), %rdi
leaq 0x18(%rsp), %rax
movq %rax, (%rdi)
leaq 0x35b28(%rip), %rsi     # 0xbf1b5
leaq 0x35b36(%rip), %rdx     # 0xbf1ca
callq 0xd14c
leaq 0x28(%rsp), %rdi
leaq 0x8(%rsp), %rdx
movl $0x1, %esi
callq 0xbf80
leaq 0x28(%rsp), %rdi
callq 0xbfd8
movq 0x8(%rsp), %rdi
leaq 0x18(%rsp), %rax
cmpq %rax, %rdi
je 0x896d3
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 0x89701
jmp 0x89701
jmp 0x89701
jmp 0x89701
jmp 0x89701
jmp 0x89701
jmp 0x89701
jmp 0x89706
jmp 0x89706
jmp 0x89706
jmp 0x89706
jmp 0x89706
jmp 0x89706
jmp 0x89706
movq %rax, %rbx
jmp 0x89725
movq %rax, %rbx
movq 0x8(%rsp), %rdi
leaq 0x18(%rsp), %rax
cmpq %rax, %rdi
je 0x89725
movq 0x18(%rsp), %rsi
incq %rsi
callq 0x21f0
movq %rbx, %rdi
callq 0x2300