// File: /workspace/github_cpp_makefile_star2_O3/mgronhol[P]Ullur/ullur.cpp
// Function: handle_message(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>&, int)
std::string handle_message( std::string& message, int sock ){
	std::string out = message.substr( message.find_first_of( '\r' ) + 1 );
	char command[32], dummy[32];
	float x, y, r, x0, y0, x1, y1;
	uint64_t id;
	sscanf( message.c_str(), "%s ", command );
	std::string cmd = std::string( command );
	std::string response;
	

	
	if( cmd == "PUT" ){
		sscanf( message.c_str(), "%s %f %f %lu", dummy, &x, &y, &id );

		response = handle_put( x, y, id );
		if( sock > 0 ){ fprintf( append_log, "PUT %f %f %lu\r\n", x, y, id ); }

		}
	if( cmd == "GEO-PUT" ){
		sscanf( message.c_str(), "%s %f %f %lu", dummy, &x, &y, &id );
		response = handle_geo_put( x, y, id );
		}
	
	if( cmd == "GET" ){
		sscanf( message.c_str(), "%s %f %f %f", dummy, &x, &y, &r );
		response = handle_get( x, y, r );
		}

	if( cmd == "GEO-GET" ){
		sscanf( message.c_str(), "%s %f %f %f", dummy, &x, &y, &r );
		response = handle_geo_get( x, y, r);
		}

	if( cmd == "GETR" ){
		sscanf( message.c_str(), "%s %f %f %f %f", dummy, &x0, &y0, &x1, &y1 );
		response = handle_getr( x0, y0, x1, y1 );
		}

	if( cmd == "GEO-GETR" ){
		sscanf( message.c_str(), "%s %f %f %f %f", dummy, &x0, &y0, &x1, &y1 );
		response = handle_geo_getr( x0, y0, x1, y1 );
		}

	if( cmd == "DEL" ){
		sscanf( message.c_str(), "%s %lu", dummy, &id );
		response = handle_del( id );
		if( sock > 0 ){ fprintf( append_log, "DEL %lu\r\n", id ); }
		}

//	std::cerr << "Response: '"<<response<<"'" << std::endl;
//	response = "response\r\n";
//	sleep( 1 );
	if( sock > 0 ){
		send_string( sock, response );
		}
	//return out;
	return std::string();
	}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x128, %rsp            # imm = 0x128
movl %edx, 0x14(%rsp)
movq %rsi, %r14
movq %rdi, %rbx
movq %rsi, %rdi
movl $0xd, %esi
xorl %edx, %edx
callq 0x2330
leaq 0x1(%rax), %rdx
leaq 0xe0(%rsp), %rdi
movq %r14, %rsi
movq $-0x1, %rcx
callq 0x22a0
movq (%r14), %rdi
leaq 0x2d4e(%rip), %rsi      # 0x607a
leaq 0x100(%rsp), %r15
movq %r15, %rdx
xorl %eax, %eax
callq 0x2280
leaq 0x90(%rsp), %rbp
movq %rbp, -0x10(%rbp)
movq %r15, %rdi
callq 0x2140
leaq (%rsp,%rax), %rdx
addq $0x100, %rdx            # imm = 0x100
leaq 0x80(%rsp), %rdi
movq %r15, %rsi
callq 0x47b0
leaq 0x70(%rsp), %rax
movq %rax, -0x10(%rax)
movq $0x0, -0x8(%rax)
movb $0x0, (%rax)
leaq 0x2d17(%rip), %rsi      # 0x609f
leaq 0x80(%rsp), %rdi
callq 0x20d0
testl %eax, %eax
jne 0x343e
movq (%r14), %rdi
leaq 0x2cd7(%rip), %rsi      # 0x607e
leaq 0xa0(%rsp), %rdx
leaq 0x1c(%rsp), %r15
leaq 0x18(%rsp), %r12
leaq 0x40(%rsp), %r13
movq %r15, %rcx
movq %r12, %r8
movq %r13, %r9
xorl %eax, %eax
callq 0x2280
cvtss2sd (%r15), %xmm0
cvtss2sd (%r12), %xmm1
movq (%r13), %rsi
leaq 0x20(%rsp), %rdi
callq 0x2899
leaq 0x60(%rsp), %rdi
leaq 0x20(%rsp), %r15
movq %r15, %rsi
callq 0x2320
movq (%r15), %rdi
leaq 0x30(%rsp), %rax
cmpq %rax, %rdi
je 0x340b
callq 0x2260
cmpl $0x0, 0x14(%rsp)
jle 0x343e
xorps %xmm0, %xmm0
cvtss2sd 0x1c(%rsp), %xmm0
movq 0x5ece(%rip), %rdi      # 0x92f0
xorps %xmm1, %xmm1
cvtss2sd 0x18(%rsp), %xmm1
movq 0x40(%rsp), %rdx
leaq 0x2c54(%rip), %rsi      # 0x608b
movb $0x2, %al
callq 0x2360
leaq 0x2c56(%rip), %rsi      # 0x609b
leaq 0x80(%rsp), %rdi
callq 0x20d0
testl %eax, %eax
jne 0x34ee
movq (%r14), %rdi
leaq 0x2c1a(%rip), %rsi      # 0x607e
leaq 0xa0(%rsp), %rdx
leaq 0x1c(%rsp), %r15
leaq 0x18(%rsp), %r12
leaq 0x40(%rsp), %r13
movq %r15, %rcx
movq %r12, %r8
movq %r13, %r9
xorl %eax, %eax
callq 0x2280
xorps %xmm0, %xmm0
cvtss2sd (%r15), %xmm0
xorps %xmm1, %xmm1
cvtss2sd (%r12), %xmm1
movq (%r13), %rsi
addsd 0x2b60(%rip), %xmm0     # 0x6008
movsd 0x2b60(%rip), %xmm2     # 0x6010
divsd %xmm2, %xmm0
addsd %xmm2, %xmm1
divsd 0x2b58(%rip), %xmm1     # 0x6018
leaq 0x20(%rsp), %rdi
callq 0x2899
leaq 0x60(%rsp), %rdi
leaq 0x20(%rsp), %r15
movq %r15, %rsi
callq 0x2320
movq (%r15), %rdi
leaq 0x30(%rsp), %rax
cmpq %rax, %rdi
je 0x34ee
callq 0x2260
leaq 0x2bbe(%rip), %rsi      # 0x60b3
leaq 0x80(%rsp), %rdi
callq 0x20d0
testl %eax, %eax
jne 0x357f
movq (%r14), %rdi
leaq 0x2b93(%rip), %rsi      # 0x60a3
leaq 0xa0(%rsp), %rdx
leaq 0x1c(%rsp), %r15
leaq 0x18(%rsp), %r12
leaq 0x5c(%rsp), %r13
movq %r15, %rcx
movq %r12, %r8
movq %r13, %r9
xorl %eax, %eax
callq 0x2280
xorps %xmm0, %xmm0
cvtss2sd (%r15), %xmm0
xorps %xmm1, %xmm1
cvtss2sd (%r12), %xmm1
xorps %xmm2, %xmm2
cvtss2sd (%r13), %xmm2
leaq 0x20(%rsp), %rdi
callq 0x29d0
leaq 0x60(%rsp), %rdi
leaq 0x20(%rsp), %r15
movq %r15, %rsi
callq 0x2320
movq (%r15), %rdi
leaq 0x30(%rsp), %rax
cmpq %rax, %rdi
je 0x357f
callq 0x2260
leaq 0x2b29(%rip), %rsi      # 0x60af
leaq 0x80(%rsp), %rdi
callq 0x20d0
testl %eax, %eax
jne 0x363c
movq (%r14), %rdi
leaq 0x2afe(%rip), %rsi      # 0x60a3
leaq 0xa0(%rsp), %rdx
leaq 0x1c(%rsp), %r15
leaq 0x18(%rsp), %r12
leaq 0x5c(%rsp), %r13
movq %r15, %rcx
movq %r12, %r8
movq %r13, %r9
xorl %eax, %eax
callq 0x2280
xorps %xmm0, %xmm0
cvtss2sd (%r15), %xmm0
xorps %xmm1, %xmm1
cvtss2sd (%r12), %xmm1
xorps %xmm2, %xmm2
cvtss2sd (%r13), %xmm2
addsd 0x2a1a(%rip), %xmm0     # 0x6008
movsd 0x2a1a(%rip), %xmm3     # 0x6010
divsd %xmm3, %xmm0
addsd %xmm3, %xmm1
divsd 0x2a12(%rip), %xmm1     # 0x6018
divsd 0x2a1a(%rip), %xmm2     # 0x6028
leaq 0x20(%rsp), %rdi
callq 0x29d0
leaq 0x60(%rsp), %rdi
leaq 0x20(%rsp), %r15
movq %r15, %rsi
callq 0x2320
movq (%r15), %rdi
leaq 0x30(%rsp), %rax
cmpq %rax, %rdi
je 0x363c
callq 0x2260
leaq 0x2a87(%rip), %rsi      # 0x60ca
leaq 0x80(%rsp), %rdi
callq 0x20d0
testl %eax, %eax
jne 0x36ea
movq (%r14), %rdi
leaq 0x4c(%rsp), %rbp
movq %rbp, (%rsp)
leaq 0x2a4c(%rip), %rsi      # 0x60b7
leaq 0xa0(%rsp), %rdx
leaq 0x58(%rsp), %r15
leaq 0x54(%rsp), %r12
leaq 0x50(%rsp), %r13
movq %r15, %rcx
movq %r12, %r8
movq %r13, %r9
xorl %eax, %eax
callq 0x2280
xorps %xmm0, %xmm0
cvtss2sd (%r15), %xmm0
xorps %xmm1, %xmm1
cvtss2sd (%r12), %xmm1
xorps %xmm2, %xmm2
cvtss2sd (%r13), %xmm2
xorps %xmm3, %xmm3
cvtss2sd (%rbp), %xmm3
leaq 0x20(%rsp), %rdi
callq 0x2e01
leaq 0x60(%rsp), %rdi
leaq 0x20(%rsp), %r15
movq %r15, %rsi
callq 0x2320
movq (%r15), %rdi
leaq 0x30(%rsp), %rax
cmpq %rax, %rdi
je 0x36e2
callq 0x2260
leaq 0x90(%rsp), %rbp
leaq 0x29d5(%rip), %rsi      # 0x60c6
leaq 0x80(%rsp), %rdi
callq 0x20d0
testl %eax, %eax
jne 0x37d0
movq (%r14), %rdi
leaq 0x4c(%rsp), %rbp
movq %rbp, (%rsp)
leaq 0x299e(%rip), %rsi      # 0x60b7
leaq 0xa0(%rsp), %rdx
leaq 0x58(%rsp), %r15
leaq 0x54(%rsp), %r12
leaq 0x50(%rsp), %r13
movq %r15, %rcx
movq %r12, %r8
movq %r13, %r9
xorl %eax, %eax
callq 0x2280
xorps %xmm0, %xmm0
cvtss2sd (%r15), %xmm0
xorps %xmm1, %xmm1
cvtss2sd (%r12), %xmm1
xorps %xmm2, %xmm2
cvtss2sd (%r13), %xmm2
xorps %xmm3, %xmm3
cvtss2sd (%rbp), %xmm3
movsd 0x289e(%rip), %xmm4     # 0x6008
addsd %xmm4, %xmm0
movsd 0x289a(%rip), %xmm5     # 0x6010
divsd %xmm5, %xmm0
addsd %xmm5, %xmm1
movsd 0x2892(%rip), %xmm6     # 0x6018
divsd %xmm6, %xmm1
addsd %xmm4, %xmm2
divsd %xmm5, %xmm2
addsd %xmm5, %xmm3
divsd %xmm6, %xmm3
leaq 0x20(%rsp), %rdi
callq 0x2e01
leaq 0x60(%rsp), %rdi
leaq 0x20(%rsp), %r15
movq %r15, %rsi
callq 0x2320
movq (%r15), %rdi
leaq 0x30(%rsp), %rax
cmpq %rax, %rdi
je 0x37c8
callq 0x2260
leaq 0x90(%rsp), %rbp
leaq 0x28f8(%rip), %rsi      # 0x60cf
leaq 0x80(%rsp), %rdi
callq 0x20d0
testl %eax, %eax
je 0x37f4
cmpl $0x0, 0x14(%rsp)
jg 0x3867
jmp 0x38b0
movq (%r14), %rdi
leaq 0x28d5(%rip), %rsi      # 0x60d3
leaq 0xa0(%rsp), %rdx
leaq 0x40(%rsp), %r14
movq %r14, %rcx
xorl %eax, %eax
callq 0x2280
movq (%r14), %rsi
leaq 0x20(%rsp), %rdi
callq 0x3258
leaq 0x60(%rsp), %rdi
leaq 0x20(%rsp), %r14
movq %r14, %rsi
callq 0x2320
movq (%r14), %rdi
leaq 0x30(%rsp), %rax
cmpq %rax, %rdi
je 0x3846
callq 0x2260
cmpl $0x0, 0x14(%rsp)
jle 0x38b0
movq 0x5a9c(%rip), %rdi      # 0x92f0
movq 0x40(%rsp), %rdx
leaq 0x287a(%rip), %rsi      # 0x60da
xorl %eax, %eax
callq 0x2360
leaq 0xd0(%rsp), %r14
movq %r14, -0x10(%r14)
movq 0x60(%rsp), %rsi
movq 0x68(%rsp), %rdx
addq %rsi, %rdx
leaq 0xc0(%rsp), %rdi
callq 0x418c
leaq 0xc0(%rsp), %rsi
movl 0x14(%rsp), %edi
callq 0x277c
movq 0xc0(%rsp), %rdi
cmpq %r14, %rdi
je 0x38b0
callq 0x2260
leaq 0x10(%rbx), %rax
movq %rax, (%rbx)
movq $0x0, 0x8(%rbx)
movb $0x0, 0x10(%rbx)
movq 0x60(%rsp), %rdi
leaq 0x70(%rsp), %rax
cmpq %rax, %rdi
je 0x38d7
callq 0x2260
movq 0x80(%rsp), %rdi
cmpq %rbp, %rdi
je 0x38e9
callq 0x2260
leaq 0xf0(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x38ff
callq 0x2260
movq %rbx, %rax
addq $0x128, %rsp            # imm = 0x128
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
jmp 0x3939
jmp 0x3939
jmp 0x3939
jmp 0x3939
jmp 0x3939
jmp 0x3939
jmp 0x3939
movq %rax, %rbx
movq 0xc0(%rsp), %rdi
cmpq %r14, %rdi
je 0x393c
callq 0x2260
jmp 0x393c
movq %rax, %rbx
movq 0x60(%rsp), %rdi
leaq 0x70(%rsp), %rax
cmpq %rax, %rdi
je 0x3950
callq 0x2260
movq 0x80(%rsp), %rdi
leaq 0x90(%rsp), %rax
cmpq %rax, %rdi
je 0x396f
callq 0x2260
jmp 0x396f
movq %rax, %rbx
leaq 0xf0(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x3985
callq 0x2260
movq %rbx, %rdi
callq 0x23e0