// File: meghanamreddy[P]Range-trees-and-Interval-Trees/binaryRangeTree.cpp
// Function: BinaryRangeTree::isPointInRange(BinaryRangeNode*, int, int, int, int)
void BinaryRangeTree::isPointInRange(BinaryRangeNode* r, int x1, int x2, int y1, int y2) {
	int i;
	if ((r->data >= x1) & (r->data <= x2)) { // in x range
		for (i=0; i< r->data2.size(); i++) {
			if  ((r->data2[i] >= y1) & (r->data2[i] <= y2) ) {
				if (r->lines[i]->reported != 1) {
					r->lines[i]->reported = 1;
					cout << " OP5 { (" << r->lines[i]->x1 << " " << r->lines[i]->y1 << ") -- (" << r->lines[i]->x2 << " " << r->lines[i]->y2 << ") } " << endl;
				}
			}
		}
	}
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x60, %rsp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movl %edx, -0x14(%rbp)
movl %ecx, -0x18(%rbp)
movl %r8d, -0x1c(%rbp)
movl %r9d, -0x20(%rbp)
movq -0x10(%rbp), %rax
movl 0x4(%rax), %eax
cmpl -0x14(%rbp), %eax
setge %al
andb $0x1, %al
movzbl %al, %eax
movq -0x10(%rbp), %rcx
movl 0x4(%rcx), %ecx
cmpl -0x18(%rbp), %ecx
setle %cl
andb $0x1, %cl
movzbl %cl, %ecx
andl %ecx, %eax
cmpl $0x0, %eax
je 0x82c9
movl $0x0, -0x24(%rbp)
movslq -0x24(%rbp), %rax
movq %rax, -0x30(%rbp)
movq -0x10(%rbp), %rdi
addq $0x8, %rdi
callq 0x37c0
movq %rax, %rcx
movq -0x30(%rbp), %rax
cmpq %rcx, %rax
jae 0x82c7
movq -0x10(%rbp), %rdi
addq $0x8, %rdi
movslq -0x24(%rbp), %rsi
callq 0x37a0
movl (%rax), %eax
cmpl -0x1c(%rbp), %eax
setge %al
andb $0x1, %al
movzbl %al, %eax
movl %eax, -0x34(%rbp)
movq -0x10(%rbp), %rdi
addq $0x8, %rdi
movslq -0x24(%rbp), %rsi
callq 0x37a0
movq %rax, %rcx
movl -0x34(%rbp), %eax
movl (%rcx), %ecx
cmpl -0x20(%rbp), %ecx
setle %cl
andb $0x1, %cl
movzbl %cl, %ecx
andl %ecx, %eax
cmpl $0x0, %eax
je 0x82b7
movq -0x10(%rbp), %rdi
addq $0x38, %rdi
movslq -0x24(%rbp), %rsi
callq 0x34d0
movq (%rax), %rax
movb 0x10(%rax), %al
andb $0x1, %al
movzbl %al, %eax
cmpl $0x1, %eax
je 0x82b5
movq -0x10(%rbp), %rdi
addq $0x38, %rdi
movslq -0x24(%rbp), %rsi
callq 0x34d0
movq (%rax), %rax
movb $0x1, 0x10(%rax)
movq 0x5e09(%rip), %rdi      # 0xdfd8
leaq 0x1e94(%rip), %rsi      # 0xa06a
callq 0x2100
movq %rax, -0x58(%rbp)
movq -0x10(%rbp), %rdi
addq $0x38, %rdi
movslq -0x24(%rbp), %rsi
callq 0x34d0
movq -0x58(%rbp), %rdi
movq (%rax), %rax
movl (%rax), %esi
callq 0x21a0
movq %rax, %rdi
leaq 0x1e06(%rip), %rsi      # 0xa00e
callq 0x2100
movq %rax, -0x50(%rbp)
movq -0x10(%rbp), %rdi
addq $0x38, %rdi
movslq -0x24(%rbp), %rsi
callq 0x34d0
movq -0x50(%rbp), %rdi
movq (%rax), %rax
movl 0x8(%rax), %esi
callq 0x21a0
movq %rax, %rdi
leaq 0x1e11(%rip), %rsi      # 0xa04c
callq 0x2100
movq %rax, -0x48(%rbp)
movq -0x10(%rbp), %rdi
addq $0x38, %rdi
movslq -0x24(%rbp), %rsi
callq 0x34d0
movq -0x48(%rbp), %rdi
movq (%rax), %rax
movl 0x4(%rax), %esi
callq 0x21a0
movq %rax, %rdi
leaq 0x1da0(%rip), %rsi      # 0xa00e
callq 0x2100
movq %rax, -0x40(%rbp)
movq -0x10(%rbp), %rdi
addq $0x38, %rdi
movslq -0x24(%rbp), %rsi
callq 0x34d0
movq -0x40(%rbp), %rdi
movq (%rax), %rax
movl 0xc(%rax), %esi
callq 0x21a0
movq %rax, %rdi
leaq 0x1db2(%rip), %rsi      # 0xa053
callq 0x2100
movq %rax, %rdi
movq 0x5d18(%rip), %rsi      # 0xdfc8
callq 0x2120
jmp 0x82b7
jmp 0x82b9
movl -0x24(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x24(%rbp)
jmp 0x8115
jmp 0x82c9
addq $0x60, %rsp
popq %rbp
retq
nop