// File: /workspace/github_c_makefile_star2_O1/GangZhuo[P]dohclient/src/channel_doh.c
// Function: doh_http_query
static int doh_http_query(channel_req_t* rq, subnet_t* subnet)
{
	channel_doh_t* c = rq->ctx;
	http_request_t* req;
	int r;

	req = doh_build_post_request(rq, subnet);
	if (!req) {
		loge("doh_build_post_request() error\n");
		return -1;
	}

	req = c->post
		? doh_build_post_request(rq, subnet)
		: doh_build_get_request(rq, subnet);
	if (!req) {
		loge("%s error\n",
			c->post
			? "doh_build_post_request()"
			: "doh_build_get_request()");
		return -1;
	}

	r = http_send(c->http, &c->http_addr, c->use_proxy, req, c->timeout, http_cb, rq);
	if (r) {
		loge("http_send() error\n");
		free(http_request_get_data(req, NULL));
		http_request_destroy(req);
		return -1;
	}

	return r;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x58, %rsp
movq %rsi, %r14
movq %rdi, %rbx
movq 0x60(%rdi), %r13
callq 0xdc8a
testq %rax, %rax
je 0xd7d5
cmpl $0x0, 0x88(%r13)
je 0xd815
movq %rbx, %rdi
movq %r14, %rsi
callq 0xdc8a
movq %rax, %r14
jmp 0xdb70
xorl %eax, %eax
callq 0x17d59
movl $0xffffffff, %ebx       # imm = 0xFFFFFFFF
cmpl $0x3, (%rax)
jl 0xdc58
leaq 0x15810(%rip), %rsi     # 0x23001
leaq 0x15911(%rip), %rdx     # 0x23109
leaq 0x15919(%rip), %r8      # 0x23118
movl $0x3, %edi
movl $0x2f2, %ecx            # imm = 0x2F2
xorl %eax, %eax
callq 0x17d92
jmp 0xdc58
movq 0x60(%rbx), %rbp
xorps %xmm0, %xmm0
movaps %xmm0, 0x10(%rsp)
movq $0x0, 0x20(%rsp)
leaq 0x30(%rsp), %r12
movq %r12, %rdi
callq 0x19b12
movq %r12, %rdi
callq 0x19b12
movzwl (%rbx), %eax
movw %ax, (%r12)
movzwl 0x4(%rbx), %eax
movw %ax, 0x2(%r12)
movw $0x1, 0x4(%r12)
leaq 0x8(%rbx), %r15
movq %r15, %rdi
movl $0x1, %esi
callq 0x19b6a
movq %rax, 0x10(%r12)
testq %r14, %r14
je 0xd8f1
leaq 0x30(%rsp), %rdi
movl $0x29, %esi
callq 0x1b531
testq %rax, %rax
jne 0xd89b
leaq 0x30(%rsp), %rdi
callq 0x1b653
testq %rax, %rax
je 0xda5f
movw $0x400, 0xa(%rax)       # imm = 0x400
movl 0x90(%r14), %edx
addq $0x10, %r14
movq %rax, %rdi
movq %r14, %rsi
xorl %ecx, %ecx
callq 0x1bd22
testl %eax, %eax
je 0xd8f1
xorl %eax, %eax
callq 0x17d59
cmpl $0x3, (%rax)
jl 0xda91
leaq 0x1572d(%rip), %rsi     # 0x23001
leaq 0x1565d(%rip), %rdx     # 0x22f38
leaq 0x1556d(%rip), %r8      # 0x22e4f
movl $0x3, %edi
movl $0x2a9, %ecx            # imm = 0x2A9
jmp 0xda8a
leaq 0x10(%rsp), %rdi
leaq 0x30(%rsp), %rsi
xorl %edx, %edx
callq 0x1bdbb
testl %eax, %eax
jle 0xd9ed
leaq 0x30(%rsp), %rdi
callq 0x1a1dd
movq 0x10(%rsp), %rdi
movl 0x18(%rsp), %esi
leaq 0x54(%rsp), %rdx
xorl %ecx, %ecx
movl $0x1, %r8d
callq 0x81a4
testq %rax, %rax
je 0xda2b
movq %rax, %r14
leaq 0x10(%rsp), %rdi
movq $0x0, 0x8(%rdi)
movq 0x128(%rbp), %rdx
leaq 0x1560f(%rip), %rsi     # 0x22f65
movq %rax, %rcx
xorl %eax, %eax
callq 0x1dcf7
cmpl $-0x1, %eax
je 0xdaa0
movq %r14, %rdi
callq 0x3450
movq 0x10(%rsp), %rsi
movq 0x120(%rbp), %rdx
movl 0x130(%rbp), %ecx
leaq 0x1444f(%rip), %rdi     # 0x21dd9
callq 0x14344
testq %rax, %rax
je 0xdacd
movq %rax, %r14
leaq 0x15545(%rip), %rsi     # 0x22ee7
leaq 0x1554b(%rip), %rdx     # 0x22ef4
movq %rax, %rdi
callq 0x144e9
testl %eax, %eax
je 0xdb0b
xorl %eax, %eax
callq 0x17d59
cmpl $0x3, (%rax)
jl 0xdb5b
leaq 0x15631(%rip), %rsi     # 0x23001
leaq 0x15561(%rip), %rdx     # 0x22f38
leaq 0x1552e(%rip), %r8      # 0x22f0c
movl $0x3, %edi
movl $0x2d5, %ecx            # imm = 0x2D5
jmp 0xdb54
xorl %eax, %eax
callq 0x17d59
cmpl $0x3, (%rax)
jl 0xda1f
leaq 0x15601(%rip), %rsi     # 0x23001
leaq 0x15531(%rip), %rdx     # 0x22f38
leaq 0x14d7e(%rip), %r8      # 0x2278c
movl $0x3, %edi
movl $0x2b0, %ecx            # imm = 0x2B0
xorl %eax, %eax
callq 0x17d92
leaq 0x10(%rsp), %rdi
callq 0x1d5f9
jmp 0xda91
xorl %eax, %eax
callq 0x17d59
cmpl $0x3, (%rax)
jl 0xdaff
leaq 0x155bf(%rip), %rsi     # 0x23001
leaq 0x154ef(%rip), %rdx     # 0x22f38
leaq 0x154fe(%rip), %r8      # 0x22f4e
movl $0x3, %edi
movl $0x2ba, %ecx            # imm = 0x2BA
jmp 0xdaf8
xorl %eax, %eax
callq 0x17d59
cmpl $0x3, (%rax)
jl 0xda91
leaq 0x1558f(%rip), %rsi     # 0x23001
leaq 0x154bf(%rip), %rdx     # 0x22f38
leaq 0x153aa(%rip), %r8      # 0x22e2a
movl $0x3, %edi
movl $0x2a0, %ecx            # imm = 0x2A0
xorl %eax, %eax
callq 0x17d92
leaq 0x30(%rsp), %rdi
callq 0x1a1dd
jmp 0xdb6d
xorl %eax, %eax
callq 0x17d59
cmpl $0x3, (%rax)
jl 0xdaff
leaq 0x1554e(%rip), %rsi     # 0x23001
leaq 0x1547e(%rip), %rdx     # 0x22f38
leaq 0x154ae(%rip), %r8      # 0x22f6f
movl $0x3, %edi
movl $0x2c5, %ecx            # imm = 0x2C5
jmp 0xdaf8
xorl %eax, %eax
callq 0x17d59
cmpl $0x3, (%rax)
jl 0xdaff
leaq 0x15521(%rip), %rsi     # 0x23001
leaq 0x15451(%rip), %rdx     # 0x22f38
leaq 0x153dc(%rip), %r8      # 0x22eca
movl $0x3, %edi
movl $0x2ce, %ecx            # imm = 0x2CE
xorl %eax, %eax
callq 0x17d92
leaq 0x10(%rsp), %rdi
callq 0x1d5f9
jmp 0xdb6d
leaq 0x1541b(%rip), %rsi     # 0x22f2d
leaq 0x1541b(%rip), %rdx     # 0x22f34
movq %r14, %rdi
callq 0x144e9
testl %eax, %eax
je 0xdc69
xorl %eax, %eax
callq 0x17d59
cmpl $0x3, (%rax)
jl 0xdb5b
leaq 0x154c5(%rip), %rsi     # 0x23001
leaq 0x153f5(%rip), %rdx     # 0x22f38
leaq 0x153c2(%rip), %r8      # 0x22f0c
movl $0x3, %edi
movl $0x2dd, %ecx            # imm = 0x2DD
xorl %eax, %eax
callq 0x17d92
leaq 0x10(%rsp), %rdi
callq 0x1d5f9
movq %r14, %rdi
callq 0x143e9
xorl %r14d, %r14d
testq %r14, %r14
je 0xdc03
movq 0x80(%r13), %rdi
leaq 0x90(%r13), %rsi
movl 0x134(%r13), %edx
movl 0x13c(%r13), %r8d
movq %rbx, (%rsp)
leaq 0x451(%rip), %r9        # 0xdff1
movq %r14, %rcx
callq 0x155b2
testl %eax, %eax
je 0xdc56
xorl %eax, %eax
callq 0x17d59
cmpl $0x3, (%rax)
jl 0xdbe2
leaq 0x1543e(%rip), %rsi     # 0x23001
leaq 0x1553f(%rip), %rdx     # 0x23109
leaq 0x152cf(%rip), %r8      # 0x22ea0
movl $0x3, %edi
movl $0x303, %ecx            # imm = 0x303
xorl %eax, %eax
callq 0x17d92
movq %r14, %rdi
xorl %esi, %esi
callq 0x146b5
movq %rax, %rdi
callq 0x3450
movq %r14, %rdi
callq 0x143e9
movl $0xffffffff, %ebx       # imm = 0xFFFFFFFF
jmp 0xdc58
xorl %eax, %eax
callq 0x17d59
movl $0xffffffff, %ebx       # imm = 0xFFFFFFFF
cmpl $0x3, (%rax)
jl 0xdc58
cmpl $0x0, 0x88(%r13)
leaq 0x15265(%rip), %rax     # 0x22e88
leaq 0x15245(%rip), %r9      # 0x22e6f
cmoveq %rax, %r9
leaq 0x153cc(%rip), %rsi     # 0x23001
leaq 0x154cd(%rip), %rdx     # 0x23109
leaq 0x15222(%rip), %r8      # 0x22e65
movl $0x3, %edi
movl $0x2fd, %ecx            # imm = 0x2FD
xorl %eax, %eax
callq 0x17d92
jmp 0xdc58
xorl %ebx, %ebx
movl %ebx, %eax
addq $0x58, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movq 0x10(%rsp), %rsi
movl 0x18(%rsp), %edx
movq %r14, %rdi
callq 0x146c4
movq (%r15), %rsi
movq %r14, %rdi
callq 0x14628
jmp 0xdb70