// File: /workspace/github_c_makefile_star2_O3/GangZhuo[P]dohclient/src/main.c
// Function: server_recv_msg
static int server_recv_msg(const char *data, int datalen,
	int listen,
	void *from, int fromlen, int fromtcp)
{
	req_t* req;

#if DOHCLIENT_CACHE_API
	if (conf.cache_api) {
		int r;

		r = cache_api_try_parse(cache, data, datalen, &listens[listen],
				from, fromlen, fromtcp);
		if (r == 0) {
			return 0;
		}
		else if (r == -1) {
			return -1;
		}
	}
#endif

	req = req_add_new(data, datalen, listen, from, fromlen, fromtcp);
	if (!req) {
		return -1;
	}

	if (hosts) {
		return hosts->query(hosts, req->msg, hosts_cb, req);
	}
	else {
		return cache->query(cache, req->msg, cache_cb, req);
	}
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movl %r9d, %ebp
movq %rcx, %r14
callq 0x13c08
testq %rax, %rax
je 0x1fcd9
movq %rax, %rbx
xorl %eax, %eax
callq 0x176e5
cmpl $0x8, (%rax)
jl 0x1fbeb
xorl %eax, %eax
callq 0x176e5
cmpl $0x7, (%rax)
jl 0x1fbeb
movq %rbx, %rdi
callq 0x13e56
movq 0x8(%rbx), %r15
testq %r15, %r15
je 0x1fc9f
movzwl 0x4(%r15), %eax
testw %ax, %ax
je 0x1fc9f
movq 0x10(%r15), %rcx
movq (%rcx), %rcx
testq %rcx, %rcx
je 0x1fc9f
cmpb $0x0, (%rcx)
je 0x1fc9f
cmpw $0x1, %ax
je 0x1fc57
xorl %eax, %eax
callq 0x176e5
cmpl $0x4, (%rax)
jl 0x1fc57
leaq 0x579c(%rip), %rsi      # 0x253d4
leaq 0x6636(%rip), %rdx      # 0x26275
leaq 0x6639(%rip), %r8       # 0x2627f
movl $0x4, %edi
movl $0xc1, %ecx
xorl %eax, %eax
callq 0x1771e
movq %r15, %rdi
callq 0x193ec
testb $0x5f, %al
jne 0x1fcd1
movq 0x10(%r15), %rax
movzwl 0x8(%rax), %ecx
cmpl $0x1c, %ecx
je 0x1fc75
cmpl $0x1, %ecx
jne 0x1fcd1
cmpw $0x1, 0xa(%rax)
jne 0x1fcd1
movq 0x8(%rbx), %rax
testq %rax, %rax
je 0x1fced
cmpw $0x0, 0x4(%rax)
je 0x1fced
movq 0x10(%rax), %rdi
testq %rdi, %rdi
je 0x1fced
callq 0x19ba4
movq %rax, %r15
jmp 0x1fcf0
xorl %eax, %eax
callq 0x176e5
cmpl $0x3, (%rax)
jl 0x1fcd1
leaq 0x5722(%rip), %rsi      # 0x253d4
leaq 0x65bc(%rip), %rdx      # 0x26275
leaq 0x3513(%rip), %r8       # 0x231d3
movl $0x3, %edi
movl $0xbd, %ecx
xorl %eax, %eax
callq 0x1771e
movq %rbx, %rdi
callq 0x13e1d
movl $0xffffffff, %eax       # imm = 0xFFFFFFFF
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
xorl %r15d, %r15d
xorl %eax, %eax
callq 0x176e5
cmpl $0x6, (%rax)
jl 0x1fd6a
xorl %eax, %eax
callq 0x176e5
cmpl $0x6, (%rax)
jl 0x1fd6a
cmpl $0x0, 0x24(%rbx)
movq 0x18(%rbx), %rdi
je 0x1fd1b
movl (%rdi), %edi
callq 0x17f1b
jmp 0x1fd20
callq 0x17e75
movq %rax, %r10
cmpl $0x0, 0x24(%rbx)
leaq 0x28b9(%rip), %rax      # 0x225e7
leaq 0x28b6(%rip), %r11      # 0x225eb
cmoveq %rax, %r11
leaq 0x5694(%rip), %rsi      # 0x253d4
leaq 0x64ee(%rip), %rdx      # 0x26235
leaq 0x64f3(%rip), %r8       # 0x26241
movl $0x6, %edi
movl $0x130, %ecx            # imm = 0x130
movq %r15, %r9
xorl %eax, %eax
pushq %r11
pushq %r10
callq 0x1771e
addq $0x10, %rsp
leaq 0xd97f(%rip), %rdi      # 0x2d6f0
movq %r15, %rsi
callq 0x39f8
testq %rax, %rax
je 0x1fe61
movq %rax, %rcx
addq $0x28, %rcx
leaq 0x78(%rbx), %rdx
movq %rcx, 0x78(%rbx)
movq 0x30(%rax), %rcx
movq %rcx, 0x80(%rbx)
movq %rdx, (%rcx)
movq %rdx, 0x30(%rax)
testl %ebp, %ebp
je 0x1fdc2
leaq 0x70(%r14), %rax
leaq 0x68(%rbx), %rcx
movq %rax, 0x68(%rbx)
movq 0x78(%r14), %rax
movq %rax, 0x70(%rbx)
movq %rcx, (%rax)
movq %rcx, 0x78(%r14)
movq %rbx, %rax
addq $0x58, %rax
leaq 0xd910(%rip), %rcx      # 0x2d6e0
movq %rcx, 0x58(%rbx)
movq 0xd90d(%rip), %rcx      # 0x2d6e8
movq %rcx, 0x60(%rbx)
movq %rax, (%rcx)
movq %rax, 0xd8ff(%rip)      # 0x2d6e8
xorl %edi, %edi
callq 0x3310
movslq 0xd8c1(%rip), %rcx      # 0x2d6b8
addq %rax, %rcx
movq %rcx, 0x28(%rbx)
xorl %eax, %eax
callq 0x176e5
cmpl $0x7, (%rax)
jl 0x1fe3d
movl (%rbx), %r9d
subq $0x8, %rsp
leaq 0x55bc(%rip), %rsi      # 0x253d4
leaq 0x6416(%rip), %rdx      # 0x26235
leaq 0x6433(%rip), %r8       # 0x26259
movl $0x7, %edi
movl $0x146, %ecx            # imm = 0x146
xorl %eax, %eax
pushq %r15
callq 0x1771e
addq $0x10, %rsp
movq 0xe734(%rip), %rdi      # 0x2e578
testq %rdi, %rdi
je 0x1ff17
movq 0x40(%rdi), %rax
movq 0x8(%rbx), %rsi
leaq 0x118(%rip), %rdx       # 0x1ff74
jmp 0x1ff2d
movl $0x1, %edi
movl $0x48, %esi
callq 0x3240
testq %rax, %rax
je 0x1ff40
movq %rax, %r12
leaq 0x38(%rax), %r13
movq %r13, 0x38(%rax)
movq %r13, 0x40(%rax)
movq %r15, %rdi
callq 0x3610
movq %rax, (%r12)
xorl %eax, %eax
callq 0x193ab
movq %rax, 0x8(%r12)
movq (%r12), %rax
movq %r12, %rsi
addq $0x10, %rsi
movq %rax, 0x10(%r12)
leaq 0xd839(%rip), %rdi      # 0x2d6f0
callq 0x379c
leaq 0x78(%rbx), %rax
movq %r13, 0x78(%rbx)
movq 0x40(%r12), %rcx
movq %rcx, 0x80(%rbx)
movq %rax, (%rcx)
movq %rax, 0x40(%r12)
xorl %eax, %eax
callq 0x176e5
cmpl $0x7, (%rax)
jl 0x1fda3
movq (%r12), %r9
leaq 0x54e1(%rip), %rsi      # 0x253d4
leaq 0x6396(%rip), %rdx      # 0x26290
leaq 0x639a(%rip), %r8       # 0x2629b
movl $0x7, %edi
movl $0xee, %ecx
xorl %eax, %eax
callq 0x1771e
jmp 0x1fda3
movq 0xe662(%rip), %rdi      # 0x2e580
movq 0x40(%rdi), %rax
movq 0x8(%rbx), %rsi
leaq 0x86(%rip), %rdx        # 0x1ffb3
movq %rbx, %rcx
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
jmpq *%rax
xorl %eax, %eax
callq 0x176e5
cmpl $0x3, (%rax)
jl 0x1fcd1
leaq 0x547d(%rip), %rsi      # 0x253d4
leaq 0x6332(%rip), %rdx      # 0x26290
leaq 0x394e(%rip), %r8       # 0x238b3
movl $0x3, %edi
movl $0xe4, %ecx
jmp 0x1fcca