// File: /workspace/github_cpp_makefile_star2_O1/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
movq %rdi, %r15
leaq 0x40(%rsp), %r14
movq %r14, -0x10(%r14)
xorl %eax, %eax
movq %rax, -0x8(%r14)
movb $0x0, (%r14)
movq %rax, 0x60(%rsp)
xorps %xmm4, %xmm4
movaps %xmm4, 0x50(%rsp)
movsd %xmm0, 0x90(%rsp)
movsd %xmm2, 0x88(%rsp)
subsd %xmm2, %xmm0
movsd %xmm1, 0x80(%rsp)
movsd %xmm3, 0x78(%rsp)
subsd %xmm3, %xmm1
mulsd %xmm1, %xmm1
mulsd %xmm0, %xmm0
addsd %xmm1, %xmm0
xorpd %xmm1, %xmm1
ucomisd %xmm1, %xmm0
jb 0x2f38
sqrtsd %xmm0, %xmm0
jmp 0x2f3d
callq 0x2210
callq 0x2220
movsd %xmm0, 0x8(%rsp)
movsd 0x90(%rsp), %xmm0
addsd 0x88(%rsp), %xmm0
movsd 0x30ce(%rip), %xmm2     # 0x6030
mulsd %xmm2, %xmm0
movsd 0x80(%rsp), %xmm1
addsd 0x78(%rsp), %xmm1
mulsd %xmm2, %xmm1
callq 0x4e78
movq %rax, %rbx
movsd 0x8(%rsp), %xmm0
divsd 0x3091(%rip), %xmm0     # 0x6020
callq 0x23d0
xorpd 0x30a4(%rip), %xmm0     # 0x6040
cvttsd2si %xmm0, %eax
movslq %eax, %rsi
leaq 0x10(%rsp), %rdi
movq %rbx, %rdx
callq 0x5003
movq 0x50(%rsp), %rdi
movapd 0x10(%rsp), %xmm0
movq 0x20(%rsp), %rax
movq %rdi, 0x10(%rsp)
movupd 0x58(%rsp), %xmm1
movapd %xmm0, 0x50(%rsp)
movq %rax, 0x60(%rsp)
movupd %xmm1, 0x18(%rsp)
xorpd %xmm0, %xmm0
movapd %xmm0, 0x10(%rsp)
movq $0x0, 0x20(%rsp)
testq %rdi, %rdi
je 0x2ff9
callq 0x2270
movq 0x10(%rsp), %rdi
testq %rdi, %rdi
je 0x3008
callq 0x2270
leaq 0x6289(%rip), %rsi      # 0x9298
leaq 0x10(%rsp), %rdi
leaq 0x50(%rsp), %rdx
callq 0x516d
movq %r15, 0x98(%rsp)
movq 0x10(%rsp), %r13
movq 0x18(%rsp), %rbx
subq %r13, %rbx
je 0x31b4
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, 0x68(%rsp)
movq %rbx, 0x70(%rsp)
movq (%r13,%r12,8), %rdi
callq 0x4f8a
ucomisd 0x90(%rsp), %xmm0
jb 0x31a6
movsd 0x88(%rsp), %xmm2
ucomisd %xmm0, %xmm2
jb 0x31a6
ucomisd 0x80(%rsp), %xmm1
jb 0x31a6
movsd 0x78(%rsp), %xmm0
ucomisd %xmm1, %xmm0
jb 0x31a6
movq (%r13,%r12,8), %rdx
leaq 0x10(%rsp), %rdi
leaq 0x6204(%rip), %rsi      # 0x92c8
callq 0x26dc
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 0x30f5
callq 0x2270
movq 0x10(%rsp), %rdi
testq %rdi, %rdi
je 0x3104
callq 0x2270
subq %r15, %rbx
je 0x319c
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 0x2f3c(%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 0x4892
movq 0x10(%rsp), %rsi
movq 0x18(%rsp), %rdx
leaq 0x30(%rsp), %rdi
callq 0x20e0
movq 0x10(%rsp), %rdi
cmpq %r14, %rdi
je 0x3188
callq 0x2270
incq %r13
cmpq %r13, %rbx
jne 0x311c
movq %r15, 0x8(%rsp)
movq 0x68(%rsp), %r13
jmp 0x31a1
movq %r15, 0x8(%rsp)
movq 0x70(%rsp), %rbx
incq %r12
cmpq %rbx, %r12
jne 0x3068
jmp 0x31bd
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
callq 0x429c
leaq 0x2e8a(%rip), %rsi      # 0x6072
movq %r15, %rdi
leaq 0x40(%rsp), %rbx
movq 0x8(%rsp), %r12
callq 0x2440
movq 0x50(%rsp), %rdi
testq %rdi, %rdi
je 0x3209
callq 0x2270
testq %r12, %r12
je 0x3216
movq %r12, %rdi
callq 0x2270
testq %r13, %r13
je 0x3223
movq %r13, %rdi
callq 0x2270
movq 0x30(%rsp), %rdi
cmpq %rbx, %rdi
je 0x3232
callq 0x2270
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 0x326f
callq 0x2270
jmp 0x326f
jmp 0x326c
jmp 0x325f
jmp 0x325f
movq %rax, %rbx
xorl %r15d, %r15d
xorl %r13d, %r13d
jmp 0x329c
jmp 0x326c
movq %rax, %rbx
movq 0x8(%rsp), %r15
leaq 0x40(%rsp), %r14
jmp 0x329c
movq %rax, %rbx
jmp 0x3292
movq %rax, %rbx
movq 0x10(%rsp), %rdi
cmpq %r14, %rdi
je 0x3292
callq 0x2270
leaq 0x40(%rsp), %r14
movq 0x68(%rsp), %r13
movq 0x50(%rsp), %rdi
testq %rdi, %rdi
je 0x32ab
callq 0x2270
testq %r15, %r15
je 0x32b8
movq %r15, %rdi
callq 0x2270
testq %r13, %r13
je 0x32c5
movq %r13, %rdi
callq 0x2270
movq 0x30(%rsp), %rdi
cmpq %r14, %rdi
je 0x32d4
callq 0x2270
movq %rbx, %rdi
callq 0x23f0