// File: /workspace/github_c_makefile_star2_O1/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 0x140e0
testq %rax, %rax
je 0x2048e
movq %rax, %rbx
xorl %eax, %eax
callq 0x17d59
cmpl $0x8, (%rax)
jl 0x20391
xorl %eax, %eax
callq 0x17d59
cmpl $0x7, (%rax)
jl 0x20391
movq %rbx, %rdi
callq 0x14338
movq 0x8(%rbx), %r15
testq %r15, %r15
je 0x20454
movzwl 0x4(%r15), %eax
testw %ax, %ax
je 0x20454
movq 0x10(%r15), %rcx
movq (%rcx), %rcx
testq %rcx, %rcx
je 0x20454
cmpb $0x0, (%rcx)
je 0x20454
cmpw $0x1, %ax
je 0x203fd
xorl %eax, %eax
callq 0x17d59
cmpl $0x4, (%rax)
jl 0x203fd
leaq 0x4fb4(%rip), %rsi      # 0x25392
leaq 0x5e4e(%rip), %rdx      # 0x26233
leaq 0x5e51(%rip), %r8       # 0x2623d
movl $0x4, %edi
movl $0xc1, %ecx
xorl %eax, %eax
callq 0x17d92
movq %r15, %rdi
callq 0x19a68
testb $0x5f, %al
jne 0x20486
movq 0x10(%r15), %rax
movzwl 0x8(%rax), %ecx
cmpl $0x1c, %ecx
je 0x2041b
cmpl $0x1, %ecx
jne 0x20486
cmpw $0x1, 0xa(%rax)
jne 0x20486
movq 0x8(%rbx), %rax
testq %rax, %rax
je 0x204ef
cmpw $0x0, 0x4(%rax)
je 0x204ef
movq 0x10(%rax), %rdi
testq %rdi, %rdi
je 0x204ef
callq 0x1a29d
movq %rax, %r15
jmp 0x204f2
xorl %eax, %eax
callq 0x17d59
cmpl $0x3, (%rax)
jl 0x20486
leaq 0x4f2b(%rip), %rsi      # 0x25392
leaq 0x5dc5(%rip), %rdx      # 0x26233
leaq 0x2d56(%rip), %r8       # 0x231cb
movl $0x3, %edi
movl $0xbd, %ecx
xorl %eax, %eax
callq 0x17d92
movq %rbx, %rdi
callq 0x142ff
xorl %ebx, %ebx
testq %rbx, %rbx
je 0x204b2
movq 0xe0dc(%rip), %rdi      # 0x2e578
testq %rdi, %rdi
je 0x204c6
movq 0x40(%rdi), %rax
movq 0x8(%rbx), %rsi
leaq 0x299(%rip), %rdx       # 0x20749
jmp 0x204dc
movl $0xffffffff, %eax       # imm = 0xFFFFFFFF
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movq 0xe0b3(%rip), %rdi      # 0x2e580
movq 0x40(%rdi), %rax
movq 0x8(%rbx), %rsi
leaq 0x2ac(%rip), %rdx       # 0x20788
movq %rbx, %rcx
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
jmpq *%rax
xorl %r15d, %r15d
xorl %eax, %eax
callq 0x17d59
cmpl $0x6, (%rax)
jl 0x2056c
xorl %eax, %eax
callq 0x17d59
cmpl $0x6, (%rax)
jl 0x2056c
cmpl $0x0, 0x24(%rbx)
movq 0x18(%rbx), %rdi
je 0x2051d
movl (%rdi), %edi
callq 0x1857f
jmp 0x20522
callq 0x184d9
movq %rax, %r10
cmpl $0x0, 0x24(%rbx)
leaq 0x20d7(%rip), %rax      # 0x22607
leaq 0x20d4(%rip), %r11      # 0x2260b
cmoveq %rax, %r11
leaq 0x4e50(%rip), %rsi      # 0x25392
leaq 0x5caa(%rip), %rdx      # 0x261f3
leaq 0x5caf(%rip), %r8       # 0x261ff
movl $0x6, %edi
movl $0x130, %ecx            # imm = 0x130
movq %r15, %r9
xorl %eax, %eax
pushq %r11
pushq %r10
callq 0x17d92
addq $0x10, %rsp
leaq 0xd17d(%rip), %rdi      # 0x2d6f0
movq %r15, %rsi
callq 0x390c
testq %rax, %rax
je 0x20648
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 0x205c4
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 0xd10e(%rip), %rcx      # 0x2d6e0
movq %rcx, 0x58(%rbx)
movq 0xd10b(%rip), %rcx      # 0x2d6e8
movq %rcx, 0x60(%rbx)
movq %rax, (%rcx)
movq %rax, 0xd0fd(%rip)      # 0x2d6e8
xorl %edi, %edi
callq 0x3310
movslq 0xd0bf(%rip), %rcx      # 0x2d6b8
addq %rax, %rcx
movq %rcx, 0x28(%rbx)
xorl %eax, %eax
callq 0x17d59
cmpl $0x7, (%rax)
jl 0x20490
movl (%rbx), %r9d
subq $0x8, %rsp
leaq 0x4d74(%rip), %rsi      # 0x25392
leaq 0x5bce(%rip), %rdx      # 0x261f3
leaq 0x5beb(%rip), %r8       # 0x26217
movl $0x7, %edi
movl $0x146, %ecx            # imm = 0x146
xorl %eax, %eax
pushq %r15
callq 0x17d92
addq $0x10, %rsp
jmp 0x20490
movl $0x48, %edi
callq 0x34b0
testq %rax, %rax
je 0x20715
movq %rax, %r12
xorps %xmm0, %xmm0
movups %xmm0, 0x30(%rax)
movups %xmm0, 0x20(%rax)
movups %xmm0, 0x10(%rax)
movups %xmm0, (%rax)
addq $0x10, %rax
movq %rax, (%rsp)
movq %r12, %r13
addq $0x38, %r13
movq %r13, 0x38(%r12)
movq %r13, 0x40(%r12)
movq %r15, %rdi
callq 0x3610
movq %rax, (%r12)
xorl %eax, %eax
callq 0x19a24
movq %rax, 0x8(%r12)
movq (%r12), %rax
movq %rax, 0x10(%r12)
leaq 0xd03f(%rip), %rdi      # 0x2d6f0
movq (%rsp), %rsi
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 0x17d59
cmpl $0x7, (%rax)
jl 0x205a5
movq (%r12), %r9
leaq 0x4ca1(%rip), %rsi      # 0x25392
leaq 0x5b56(%rip), %rdx      # 0x2624e
leaq 0x5b5a(%rip), %r8       # 0x26259
movl $0x7, %edi
movl $0xee, %ecx
xorl %eax, %eax
callq 0x17d92
jmp 0x205a5
xorl %eax, %eax
callq 0x17d59
cmpl $0x3, (%rax)
jl 0x20486
leaq 0x4c66(%rip), %rsi      # 0x25392
leaq 0x5b1b(%rip), %rdx      # 0x2624e
leaq 0x3169(%rip), %r8       # 0x238a3
movl $0x3, %edi
movl $0xe4, %ecx
jmp 0x2047f