// File: /workspace/github_cpp_makefile_star2_O3/mgronhol[P]Ullur/ullur.cpp
// Function: handle_getr[abi:cxx11](double, double, double, double)
std::string handle_getr( double x0, double y0, double x1, double y1 ){
	std::string out;

        std::vector< uint64_t > results_inter, /*results_final,*/ values;
        std::vector< std::pair< uint64_t, uint64_t > > areas;

        double r = sqrt( (x0-x1)*(x0-x1) + (y0-y1)*(y0-y1) );

	int N = -floor( log(r) / log(2) );

	double x = (x0+x1) / 2.0;
	double y = (y0+y1) / 2.0;

        uint64_t test_point_H = compute_hash( x, y );
        std::pair< double, double > test_point( x, y );
        char buffer[256];


        areas = get_near_indices( N, test_point_H );
        results_inter = extract_points( hashes, areas );

        std::pair< double, double > point;
        for( size_t i = 0 ; i < results_inter.size() ; ++i ){
                point = compute_position( results_inter[i] );
		if( point.first >= x0 && point.first <= x1 ){
			if( point.second >= y0 && point.second <= y1 ){
	                        values = multiget( database, results_inter[i] );

                	        for( size_t j = 0 ; j < values.size() ; ++j ){
                        	        memset( buffer, 0, 256 );
                                	sprintf( buffer, "%lu\n", values[j] );
                                	out += std::string( buffer );
                                	}
				}
			}
		}


	return out + "\r\n";
	}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x1a8, %rsp            # imm = 0x1A8
movsd %xmm3, 0x60(%rsp)
movsd %xmm2, 0x70(%rsp)
movsd %xmm1, 0x68(%rsp)
movsd %xmm0, 0x78(%rsp)
movq %rdi, %r14
leaq 0x40(%rsp), %r12
movq %r12, -0x10(%r12)
xorl %eax, %eax
movq %rax, -0x8(%r12)
movb $0x0, (%r12)
movq %rax, 0x90(%rsp)
xorps %xmm4, %xmm4
movaps %xmm4, 0x80(%rsp)
movapd %xmm0, %xmm4
subsd %xmm2, %xmm4
movapd %xmm1, %xmm2
subsd %xmm3, %xmm2
mulsd %xmm2, %xmm2
mulsd %xmm4, %xmm4
addsd %xmm2, %xmm4
xorps %xmm0, %xmm0
sqrtsd %xmm4, %xmm0
callq 0x2210
movsd %xmm0, 0x8(%rsp)
movsd 0x78(%rsp), %xmm0
addsd 0x70(%rsp), %xmm0
movsd 0x3198(%rip), %xmm2     # 0x6030
mulsd %xmm2, %xmm0
movsd 0x68(%rsp), %xmm1
addsd 0x60(%rsp), %xmm1
mulsd %xmm2, %xmm1
callq 0x4d94
movq %rax, %rbx
movsd 0x8(%rsp), %xmm0
divsd 0x315e(%rip), %xmm0     # 0x6020
callq 0x23c0
xorpd 0x3171(%rip), %xmm0     # 0x6040
cvttsd2si %xmm0, %eax
movslq %eax, %rsi
leaq 0x10(%rsp), %rdi
movq %rbx, %rdx
callq 0x4f1e
movq 0x80(%rsp), %rdi
movapd 0x10(%rsp), %xmm0
movapd %xmm0, 0x80(%rsp)
movq 0x20(%rsp), %rax
movq %rax, 0x90(%rsp)
xorpd %xmm0, %xmm0
movapd %xmm0, 0x10(%rsp)
movq $0x0, 0x20(%rsp)
testq %rdi, %rdi
je 0x2f33
callq 0x2260
movq 0x10(%rsp), %rdi
testq %rdi, %rdi
je 0x2f33
callq 0x2260
leaq 0x634e(%rip), %rsi      # 0x9288
leaq 0x10(%rsp), %rdi
leaq 0x80(%rsp), %rdx
callq 0x5087
movq %r14, 0x98(%rsp)
movq 0x10(%rsp), %r13
movq 0x18(%rsp), %rbx
subq %r13, %rbx
je 0x30d9
sarq $0x3, %rbx
leaq 0x20(%rsp), %r14
cmpq $0x1, %rbx
adcq $0x0, %rbx
leaq 0xa0(%rsp), %rbp
xorl %r12d, %r12d
movq $0x0, 0x8(%rsp)
movq %r13, 0x50(%rsp)
movq %rbx, 0x58(%rsp)
movq (%r13,%r12,8), %rdi
callq 0x4ea5
ucomisd 0x78(%rsp), %xmm0
jb 0x30cb
movsd 0x70(%rsp), %xmm2
ucomisd %xmm0, %xmm2
jb 0x30cb
ucomisd 0x68(%rsp), %xmm1
jb 0x30cb
movsd 0x60(%rsp), %xmm0
ucomisd %xmm1, %xmm0
jb 0x30cb
movq (%r13,%r12,8), %rdx
leaq 0x10(%rsp), %rdi
leaq 0x62cf(%rip), %rsi      # 0x92b8
callq 0x26cc
movq 0x10(%rsp), %r15
movq 0x18(%rsp), %rbx
xorpd %xmm0, %xmm0
movapd %xmm0, 0x10(%rsp)
movq $0x0, 0x20(%rsp)
movq 0x8(%rsp), %rdi
testq %rdi, %rdi
je 0x3029
callq 0x2260
movq 0x10(%rsp), %rdi
testq %rdi, %rdi
je 0x3029
callq 0x2260
subq %r15, %rbx
je 0x30c1
sarq $0x3, %rbx
cmpq $0x1, %rbx
adcq $0x0, %rbx
xorl %r13d, %r13d
movl $0x100, %edx            # imm = 0x100
movq %rbp, %rdi
xorl %esi, %esi
callq 0x2190
movq (%r15,%r13,8), %rdx
movq %rbp, %rdi
leaq 0x3017(%rip), %rsi      # 0x6075
xorl %eax, %eax
callq 0x2070
movq %r14, 0x10(%rsp)
movq %rbp, %rdi
callq 0x2140
leaq (%rsp,%rax), %rdx
addq $0xa0, %rdx
leaq 0x10(%rsp), %rdi
movq %rbp, %rsi
callq 0x47b0
movq 0x10(%rsp), %rsi
movq 0x18(%rsp), %rdx
leaq 0x30(%rsp), %rdi
callq 0x20e0
movq 0x10(%rsp), %rdi
cmpq %r14, %rdi
je 0x30ad
callq 0x2260
incq %r13
cmpq %r13, %rbx
jne 0x3041
movq %r15, 0x8(%rsp)
movq 0x50(%rsp), %r13
jmp 0x30c6
movq %r15, 0x8(%rsp)
movq 0x58(%rsp), %rbx
incq %r12
cmpq %rbx, %r12
jne 0x2f96
jmp 0x30e2
movq $0x0, 0x8(%rsp)
movq 0x98(%rsp), %r15
leaq 0x10(%r15), %r14
movq %r14, (%r15)
movq 0x30(%rsp), %rsi
movq 0x38(%rsp), %rdx
addq %rsi, %rdx
movq %r15, %rdi
leaq 0x40(%rsp), %r12
callq 0x418c
leaq 0x2f60(%rip), %rsi      # 0x6072
movq %r15, %rdi
movq 0x8(%rsp), %rbx
callq 0x2430
movq 0x80(%rsp), %rdi
testq %rdi, %rdi
je 0x3131
callq 0x2260
testq %rbx, %rbx
je 0x313e
movq %rbx, %rdi
callq 0x2260
testq %r13, %r13
je 0x314b
movq %r13, %rdi
callq 0x2260
movq 0x30(%rsp), %rdi
cmpq %r12, %rdi
je 0x315a
callq 0x2260
movq %r15, %rax
addq $0x1a8, %rsp            # imm = 0x1A8
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movq %rax, %rbx
movq (%r15), %rdi
cmpq %r14, %rdi
je 0x31a2
callq 0x2260
jmp 0x31a2
movq %rax, %rbx
movq 0x8(%rsp), %r15
jmp 0x31cf
jmp 0x318d
movq %rax, %rbx
xorl %r15d, %r15d
xorl %r13d, %r13d
jmp 0x31cf
movq %rax, %rbx
jmp 0x31fb
jmp 0x319f
movq %rax, %rbx
movq 0x8(%rsp), %r15
leaq 0x40(%rsp), %r12
jmp 0x31cf
movq %rax, %rbx
jmp 0x31c5
movq %rax, %rbx
movq 0x10(%rsp), %rdi
cmpq %r14, %rdi
je 0x31c5
callq 0x2260
leaq 0x40(%rsp), %r12
movq 0x50(%rsp), %r13
movq 0x80(%rsp), %rdi
testq %rdi, %rdi
je 0x31e1
callq 0x2260
testq %r15, %r15
je 0x31ee
movq %r15, %rdi
callq 0x2260
testq %r13, %r13
je 0x31fb
movq %r13, %rdi
callq 0x2260
movq 0x30(%rsp), %rdi
cmpq %r12, %rdi
je 0x320a
callq 0x2260
movq %rbx, %rdi
callq 0x23e0