// File: /workspace/github_cpp_makefile_star2_O2/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 $0x1d8, %rsp            # imm = 0x1D8
movsd %xmm3, 0x10(%rsp)
movsd %xmm2, 0x20(%rsp)
movsd %xmm1, 0x18(%rsp)
leaq 0xc0(%rsp), %rax
movq %rax, -0x10(%rax)
andq $0x0, -0x8(%rax)
movsd %xmm0, 0x28(%rsp)
movq %rdi, %r14
movb $0x0, (%rax)
xorps %xmm4, %xmm4
movaps %xmm4, 0x30(%rsp)
andq $0x0, 0x40(%rsp)
movaps %xmm4, 0x50(%rsp)
andq $0x0, 0x60(%rsp)
movaps %xmm4, 0x70(%rsp)
andq $0x0, 0x80(%rsp)
movapd %xmm0, %xmm4
subsd %xmm2, %xmm4
movapd %xmm1, %xmm2
subsd %xmm3, %xmm2
mulsd %xmm2, %xmm2
mulsd %xmm4, %xmm4
addsd %xmm2, %xmm4
sqrtsd %xmm4, %xmm0
callq 0x2200
movsd %xmm0, 0x8(%rsp)
movsd 0x28(%rsp), %xmm0
addsd 0x20(%rsp), %xmm0
movsd 0x33d2(%rip), %xmm2     # 0x6030
mulsd %xmm2, %xmm0
movsd 0x18(%rsp), %xmm1
addsd 0x10(%rsp), %xmm1
mulsd %xmm2, %xmm1
callq 0x48ec
movq %rax, %rbx
movsd 0x8(%rsp), %xmm0
divsd 0x3398(%rip), %xmm0     # 0x6020
callq 0x2390
xorpd 0x33ab(%rip), %xmm0     # 0x6040
cvttsd2si %xmm0, %eax
movslq %eax, %rsi
leaq 0x90(%rsp), %rdi
movq %rbx, %rdx
callq 0x4a78
movq %r14, 0x8(%rsp)
leaq 0x70(%rsp), %rbx
leaq 0x90(%rsp), %r14
movq %rbx, %rdi
movq %r14, %rsi
callq 0x41f2
movq %r14, %rdi
callq 0x41e4
leaq 0x6590(%rip), %rsi      # 0x9268
leaq 0x90(%rsp), %rdi
movq %rbx, %rdx
callq 0x4b84
leaq 0x30(%rsp), %rdi
leaq 0x90(%rsp), %r14
movq %r14, %rsi
callq 0x4192
movq %r14, %rdi
callq 0x3b42
leaq 0xd0(%rsp), %r13
leaq 0xb0(%rsp), %r15
xorl %r12d, %r12d
movq 0x30(%rsp), %rax
movq 0x38(%rsp), %rcx
subq %rax, %rcx
sarq $0x3, %rcx
cmpq %rcx, %r12
jae 0x2e0c
movq (%rax,%r12,8), %rdi
callq 0x4a05
ucomisd 0x28(%rsp), %xmm0
jb 0x2e04
movsd 0x20(%rsp), %xmm2
ucomisd %xmm0, %xmm2
jb 0x2e04
ucomisd 0x18(%rsp), %xmm1
jb 0x2e04
movsd 0x10(%rsp), %xmm0
ucomisd %xmm1, %xmm0
jb 0x2e04
movq 0x30(%rsp), %rax
movq (%rax,%r12,8), %rdx
movq %r14, %rdi
leaq 0x6512(%rip), %rsi      # 0x9298
callq 0x263c
leaq 0x50(%rsp), %rdi
movq %r14, %rsi
callq 0x4192
movq %r14, %rdi
callq 0x3b42
xorl %ebp, %ebp
movq 0x50(%rsp), %rbx
movq 0x58(%rsp), %rax
subq %rbx, %rax
sarq $0x3, %rax
cmpq %rax, %rbp
jae 0x2e04
movl $0x100, %edx            # imm = 0x100
movq %r13, %rdi
xorl %esi, %esi
callq 0x21a0
movq (%rbx,%rbp,8), %rdx
movq %r13, %rdi
leaq 0x3290(%rip), %rsi      # 0x6065
xorl %eax, %eax
callq 0x2060
movq %r14, %rdi
movq %r13, %rsi
leaq 0x7(%rsp), %rdx
callq 0x2120
movq %r15, %rdi
movq %r14, %rsi
callq 0x23f0
movq %r14, %rdi
callq 0x2140
incq %rbp
jmp 0x2da2
incq %r12
jmp 0x2d18
leaq 0x324f(%rip), %rdx      # 0x6062
leaq 0xb0(%rsp), %rsi
movq 0x8(%rsp), %rbx
movq %rbx, %rdi
callq 0x3952
leaq 0x70(%rsp), %rdi
callq 0x41e4
leaq 0x50(%rsp), %rdi
callq 0x3b42
leaq 0x30(%rsp), %rdi
callq 0x3b42
leaq 0xb0(%rsp), %rdi
callq 0x2140
movq %rbx, %rax
addq $0x1d8, %rsp            # imm = 0x1D8
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
jmp 0x2e74
jmp 0x2e74
jmp 0x2e74
jmp 0x2e74
jmp 0x2e74
jmp 0x2e74
movq %rax, %rbx
jmp 0x2e89
movq %rax, %rbx
leaq 0x90(%rsp), %rdi
callq 0x2140
leaq 0x70(%rsp), %rdi
callq 0x41e4
leaq 0x50(%rsp), %rdi
callq 0x3b42
leaq 0x30(%rsp), %rdi
callq 0x3b42
leaq 0xb0(%rsp), %rdi
callq 0x2140
movq %rbx, %rdi
callq 0x23a0