// File: /workspace/github_cpp_makefile_star2_O1/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 0x2340
leaq 0x1(%rax), %rdx
leaq 0xe0(%rsp), %rdi
movq %r14, %rsi
movq $-0x1, %rcx
callq 0x22b0
movq (%r14), %rdi
leaq 0x2c3c(%rip), %rsi      # 0x607a
leaq 0x100(%rsp), %r15
movq %r15, %rdx
xorl %eax, %eax
callq 0x2290
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 0x4892
leaq 0x70(%rsp), %rax
movq %rax, -0x10(%rax)
movq $0x0, -0x8(%rax)
movb $0x0, (%rax)
leaq 0x2c05(%rip), %rsi      # 0x609f
leaq 0x80(%rsp), %rdi
callq 0x20d0
testl %eax, %eax
jne 0x3550
movq (%r14), %rdi
leaq 0x2bc5(%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 0x2290
cvtss2sd (%r15), %xmm0
cvtss2sd (%r12), %xmm1
movq (%r13), %rsi
leaq 0x20(%rsp), %rdi
callq 0x28f7
leaq 0x60(%rsp), %rdi
leaq 0x20(%rsp), %r15
movq %r15, %rsi
callq 0x2330
movq (%r15), %rdi
leaq 0x30(%rsp), %rax
cmpq %rax, %rdi
je 0x351d
callq 0x2270
cmpl $0x0, 0x14(%rsp)
jle 0x3550
xorps %xmm0, %xmm0
cvtss2sd 0x1c(%rsp), %xmm0
movq 0x5dcc(%rip), %rdi      # 0x9300
xorps %xmm1, %xmm1
cvtss2sd 0x18(%rsp), %xmm1
movq 0x40(%rsp), %rdx
leaq 0x2b42(%rip), %rsi      # 0x608b
movb $0x2, %al
callq 0x2370
leaq 0x2b44(%rip), %rsi      # 0x609b
leaq 0x80(%rsp), %rdi
callq 0x20d0
testl %eax, %eax
jne 0x3600
movq (%r14), %rdi
leaq 0x2b08(%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 0x2290
xorps %xmm0, %xmm0
cvtss2sd (%r15), %xmm0
xorps %xmm1, %xmm1
cvtss2sd (%r12), %xmm1
movq (%r13), %rsi
addsd 0x2a4e(%rip), %xmm0     # 0x6008
movsd 0x2a4e(%rip), %xmm2     # 0x6010
divsd %xmm2, %xmm0
addsd %xmm2, %xmm1
divsd 0x2a46(%rip), %xmm1     # 0x6018
leaq 0x20(%rsp), %rdi
callq 0x28f7
leaq 0x60(%rsp), %rdi
leaq 0x20(%rsp), %r15
movq %r15, %rsi
callq 0x2330
movq (%r15), %rdi
leaq 0x30(%rsp), %rax
cmpq %rax, %rdi
je 0x3600
callq 0x2270
leaq 0x2aac(%rip), %rsi      # 0x60b3
leaq 0x80(%rsp), %rdi
callq 0x20d0
testl %eax, %eax
jne 0x3691
movq (%r14), %rdi
leaq 0x2a81(%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 0x2290
xorps %xmm0, %xmm0
cvtss2sd (%r15), %xmm0
xorps %xmm1, %xmm1
cvtss2sd (%r12), %xmm1
xorps %xmm2, %xmm2
cvtss2sd (%r13), %xmm2
leaq 0x20(%rsp), %rdi
callq 0x2a87
leaq 0x60(%rsp), %rdi
leaq 0x20(%rsp), %r15
movq %r15, %rsi
callq 0x2330
movq (%r15), %rdi
leaq 0x30(%rsp), %rax
cmpq %rax, %rdi
je 0x3691
callq 0x2270
leaq 0x2a17(%rip), %rsi      # 0x60af
leaq 0x80(%rsp), %rdi
callq 0x20d0
testl %eax, %eax
jne 0x374e
movq (%r14), %rdi
leaq 0x29ec(%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 0x2290
xorps %xmm0, %xmm0
cvtss2sd (%r15), %xmm0
xorps %xmm1, %xmm1
cvtss2sd (%r12), %xmm1
xorps %xmm2, %xmm2
cvtss2sd (%r13), %xmm2
addsd 0x2908(%rip), %xmm0     # 0x6008
movsd 0x2908(%rip), %xmm3     # 0x6010
divsd %xmm3, %xmm0
addsd %xmm3, %xmm1
divsd 0x2900(%rip), %xmm1     # 0x6018
divsd 0x2908(%rip), %xmm2     # 0x6028
leaq 0x20(%rsp), %rdi
callq 0x2a87
leaq 0x60(%rsp), %rdi
leaq 0x20(%rsp), %r15
movq %r15, %rsi
callq 0x2330
movq (%r15), %rdi
leaq 0x30(%rsp), %rax
cmpq %rax, %rdi
je 0x374e
callq 0x2270
leaq 0x2975(%rip), %rsi      # 0x60ca
leaq 0x80(%rsp), %rdi
callq 0x20d0
testl %eax, %eax
jne 0x37fc
movq (%r14), %rdi
leaq 0x4c(%rsp), %rbp
movq %rbp, (%rsp)
leaq 0x293a(%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 0x2290
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 0x2ebf
leaq 0x60(%rsp), %rdi
leaq 0x20(%rsp), %r15
movq %r15, %rsi
callq 0x2330
movq (%r15), %rdi
leaq 0x30(%rsp), %rax
cmpq %rax, %rdi
je 0x37f4
callq 0x2270
leaq 0x90(%rsp), %rbp
leaq 0x28c3(%rip), %rsi      # 0x60c6
leaq 0x80(%rsp), %rdi
callq 0x20d0
testl %eax, %eax
jne 0x38e2
movq (%r14), %rdi
leaq 0x4c(%rsp), %rbp
movq %rbp, (%rsp)
leaq 0x288c(%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 0x2290
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 0x278c(%rip), %xmm4     # 0x6008
addsd %xmm4, %xmm0
movsd 0x2788(%rip), %xmm5     # 0x6010
divsd %xmm5, %xmm0
addsd %xmm5, %xmm1
movsd 0x2780(%rip), %xmm6     # 0x6018
divsd %xmm6, %xmm1
addsd %xmm4, %xmm2
divsd %xmm5, %xmm2
addsd %xmm5, %xmm3
divsd %xmm6, %xmm3
leaq 0x20(%rsp), %rdi
callq 0x2ebf
leaq 0x60(%rsp), %rdi
leaq 0x20(%rsp), %r15
movq %r15, %rsi
callq 0x2330
movq (%r15), %rdi
leaq 0x30(%rsp), %rax
cmpq %rax, %rdi
je 0x38da
callq 0x2270
leaq 0x90(%rsp), %rbp
leaq 0x27e6(%rip), %rsi      # 0x60cf
leaq 0x80(%rsp), %rdi
callq 0x20d0
testl %eax, %eax
jne 0x396d
movq (%r14), %rdi
leaq 0x27cf(%rip), %rsi      # 0x60d3
leaq 0xa0(%rsp), %rdx
leaq 0x40(%rsp), %r14
movq %r14, %rcx
xorl %eax, %eax
callq 0x2290
movq (%r14), %rsi
leaq 0x20(%rsp), %rdi
callq 0x3322
leaq 0x60(%rsp), %rdi
leaq 0x20(%rsp), %r14
movq %r14, %rsi
callq 0x2330
movq (%r14), %rdi
leaq 0x30(%rsp), %rax
cmpq %rax, %rdi
je 0x394c
callq 0x2270
cmpl $0x0, 0x14(%rsp)
jle 0x396d
movq 0x59a6(%rip), %rdi      # 0x9300
movq 0x40(%rsp), %rdx
leaq 0x2774(%rip), %rsi      # 0x60da
xorl %eax, %eax
callq 0x2370
cmpl $0x0, 0x14(%rsp)
jle 0x39bd
leaq 0xd0(%rsp), %r14
movq %r14, -0x10(%r14)
movq 0x60(%rsp), %rsi
movq 0x68(%rsp), %rdx
addq %rsi, %rdx
leaq 0xc0(%rsp), %rdi
callq 0x429c
leaq 0xc0(%rsp), %rsi
movl 0x14(%rsp), %edi
callq 0x27da
movq 0xc0(%rsp), %rdi
cmpq %r14, %rdi
je 0x39bd
callq 0x2270
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 0x39e4
callq 0x2270
movq 0x80(%rsp), %rdi
cmpq %rbp, %rdi
je 0x39f6
callq 0x2270
leaq 0xf0(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x3a0c
callq 0x2270
movq %rbx, %rax
addq $0x128, %rsp            # imm = 0x128
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
jmp 0x3a46
jmp 0x3a46
jmp 0x3a46
jmp 0x3a46
jmp 0x3a46
jmp 0x3a46
jmp 0x3a46
movq %rax, %rbx
movq 0xc0(%rsp), %rdi
cmpq %r14, %rdi
je 0x3a49
callq 0x2270
jmp 0x3a49
movq %rax, %rbx
movq 0x60(%rsp), %rdi
leaq 0x70(%rsp), %rax
cmpq %rax, %rdi
je 0x3a5d
callq 0x2270
movq 0x80(%rsp), %rdi
leaq 0x90(%rsp), %rax
cmpq %rax, %rdi
je 0x3a7c
callq 0x2270
jmp 0x3a7c
movq %rax, %rbx
leaq 0xf0(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x3a92
callq 0x2270
movq %rbx, %rdi
callq 0x23f0