// File: /workspace/github_c_makefile_star2_O3/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 0xd852
testq %rax, %rax
je 0xd39d
cmpl $0x0, 0x88(%r13)
je 0xd3dd
movq %rbx, %rdi
movq %r14, %rsi
callq 0xd852
movq %rax, %r14
jmp 0xd738
xorl %eax, %eax
callq 0x176e5
movl $0xffffffff, %ebx       # imm = 0xFFFFFFFF
cmpl $0x3, (%rax)
jl 0xd820
leaq 0x15c50(%rip), %rsi     # 0x23009
leaq 0x15d51(%rip), %rdx     # 0x23111
leaq 0x15d59(%rip), %r8      # 0x23120
movl $0x3, %edi
movl $0x2f2, %ecx            # imm = 0x2F2
xorl %eax, %eax
callq 0x1771e
jmp 0xd820
movq 0x60(%rbx), %rbp
xorps %xmm0, %xmm0
movaps %xmm0, 0x10(%rsp)
movq $0x0, 0x20(%rsp)
leaq 0x30(%rsp), %r12
movq %r12, %rdi
callq 0x19496
movq %r12, %rdi
callq 0x19496
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 0x194ee
movq %rax, 0x10(%r12)
testq %r14, %r14
je 0xd4b9
leaq 0x30(%rsp), %rdi
movl $0x29, %esi
callq 0x1ad6f
testq %rax, %rax
jne 0xd463
leaq 0x30(%rsp), %rdi
callq 0x1ae8f
testq %rax, %rax
je 0xd627
movw $0x400, 0xa(%rax)       # imm = 0x400
movl 0x90(%r14), %edx
addq $0x10, %r14
movq %rax, %rdi
movq %r14, %rsi
xorl %ecx, %ecx
callq 0x1b504
testl %eax, %eax
je 0xd4b9
xorl %eax, %eax
callq 0x176e5
cmpl $0x3, (%rax)
jl 0xd659
leaq 0x15b6d(%rip), %rsi     # 0x23009
leaq 0x15a9d(%rip), %rdx     # 0x22f40
leaq 0x159ad(%rip), %r8      # 0x22e57
movl $0x3, %edi
movl $0x2a9, %ecx            # imm = 0x2A9
jmp 0xd652
leaq 0x10(%rsp), %rdi
leaq 0x30(%rsp), %rsi
xorl %edx, %edx
callq 0x1b58c
testl %eax, %eax
jle 0xd5b5
leaq 0x30(%rsp), %rdi
callq 0x19ae0
movq 0x10(%rsp), %rdi
movl 0x18(%rsp), %esi
leaq 0x54(%rsp), %rdx
xorl %ecx, %ecx
movl $0x1, %r8d
callq 0x7eac
testq %rax, %rax
je 0xd5f3
movq %rax, %r14
leaq 0x10(%rsp), %rdi
movq $0x0, 0x8(%rdi)
movq 0x128(%rbp), %rdx
leaq 0x15a4f(%rip), %rsi     # 0x22f6d
movq %rax, %rcx
xorl %eax, %eax
callq 0x1d504
cmpl $-0x1, %eax
je 0xd668
movq %r14, %rdi
callq 0x3450
movq 0x10(%rsp), %rsi
movq 0x120(%rbp), %rdx
movl 0x130(%rbp), %ecx
leaq 0x14867(%rip), %rdi     # 0x21db9
callq 0x13e60
testq %rax, %rax
je 0xd695
movq %rax, %r14
leaq 0x15985(%rip), %rsi     # 0x22eef
leaq 0x1598b(%rip), %rdx     # 0x22efc
movq %rax, %rdi
callq 0x13fd7
testl %eax, %eax
je 0xd6d3
xorl %eax, %eax
callq 0x176e5
cmpl $0x3, (%rax)
jl 0xd723
leaq 0x15a71(%rip), %rsi     # 0x23009
leaq 0x159a1(%rip), %rdx     # 0x22f40
leaq 0x1596e(%rip), %r8      # 0x22f14
movl $0x3, %edi
movl $0x2d5, %ecx            # imm = 0x2D5
jmp 0xd71c
xorl %eax, %eax
callq 0x176e5
cmpl $0x3, (%rax)
jl 0xd5e7
leaq 0x15a41(%rip), %rsi     # 0x23009
leaq 0x15971(%rip), %rdx     # 0x22f40
leaq 0x15196(%rip), %r8      # 0x2276c
movl $0x3, %edi
movl $0x2b0, %ecx            # imm = 0x2B0
xorl %eax, %eax
callq 0x1771e
leaq 0x10(%rsp), %rdi
callq 0x1cdc9
jmp 0xd659
xorl %eax, %eax
callq 0x176e5
cmpl $0x3, (%rax)
jl 0xd6c7
leaq 0x159ff(%rip), %rsi     # 0x23009
leaq 0x1592f(%rip), %rdx     # 0x22f40
leaq 0x1593e(%rip), %r8      # 0x22f56
movl $0x3, %edi
movl $0x2ba, %ecx            # imm = 0x2BA
jmp 0xd6c0
xorl %eax, %eax
callq 0x176e5
cmpl $0x3, (%rax)
jl 0xd659
leaq 0x159cf(%rip), %rsi     # 0x23009
leaq 0x158ff(%rip), %rdx     # 0x22f40
leaq 0x157ea(%rip), %r8      # 0x22e32
movl $0x3, %edi
movl $0x2a0, %ecx            # imm = 0x2A0
xorl %eax, %eax
callq 0x1771e
leaq 0x30(%rsp), %rdi
callq 0x19ae0
jmp 0xd735
xorl %eax, %eax
callq 0x176e5
cmpl $0x3, (%rax)
jl 0xd6c7
leaq 0x1598e(%rip), %rsi     # 0x23009
leaq 0x158be(%rip), %rdx     # 0x22f40
leaq 0x158ee(%rip), %r8      # 0x22f77
movl $0x3, %edi
movl $0x2c5, %ecx            # imm = 0x2C5
jmp 0xd6c0
xorl %eax, %eax
callq 0x176e5
cmpl $0x3, (%rax)
jl 0xd6c7
leaq 0x15961(%rip), %rsi     # 0x23009
leaq 0x15891(%rip), %rdx     # 0x22f40
leaq 0x1581c(%rip), %r8      # 0x22ed2
movl $0x3, %edi
movl $0x2ce, %ecx            # imm = 0x2CE
xorl %eax, %eax
callq 0x1771e
leaq 0x10(%rsp), %rdi
callq 0x1cdc9
jmp 0xd735
leaq 0x1585b(%rip), %rsi     # 0x22f35
leaq 0x1585b(%rip), %rdx     # 0x22f3c
movq %r14, %rdi
callq 0x13fd7
testl %eax, %eax
je 0xd831
xorl %eax, %eax
callq 0x176e5
cmpl $0x3, (%rax)
jl 0xd723
leaq 0x15905(%rip), %rsi     # 0x23009
leaq 0x15835(%rip), %rdx     # 0x22f40
leaq 0x15802(%rip), %r8      # 0x22f14
movl $0x3, %edi
movl $0x2dd, %ecx            # imm = 0x2DD
xorl %eax, %eax
callq 0x1771e
leaq 0x10(%rsp), %rdi
callq 0x1cdc9
movq %r14, %rdi
callq 0x13ee7
xorl %r14d, %r14d
testq %r14, %r14
je 0xd7cb
movq 0x80(%r13), %rdi
leaq 0x90(%r13), %rsi
movl 0x134(%r13), %edx
movl 0x13c(%r13), %r8d
movq %rbx, (%rsp)
leaq 0x451(%rip), %r9        # 0xdbb9
movq %r14, %rcx
callq 0x15081
testl %eax, %eax
je 0xd81e
xorl %eax, %eax
callq 0x176e5
cmpl $0x3, (%rax)
jl 0xd7aa
leaq 0x1587e(%rip), %rsi     # 0x23009
leaq 0x1597f(%rip), %rdx     # 0x23111
leaq 0x1570f(%rip), %r8      # 0x22ea8
movl $0x3, %edi
movl $0x303, %ecx            # imm = 0x303
xorl %eax, %eax
callq 0x1771e
movq %r14, %rdi
xorl %esi, %esi
callq 0x1417e
movq %rax, %rdi
callq 0x3450
movq %r14, %rdi
callq 0x13ee7
movl $0xffffffff, %ebx       # imm = 0xFFFFFFFF
jmp 0xd820
xorl %eax, %eax
callq 0x176e5
movl $0xffffffff, %ebx       # imm = 0xFFFFFFFF
cmpl $0x3, (%rax)
jl 0xd820
cmpl $0x0, 0x88(%r13)
leaq 0x156a5(%rip), %rax     # 0x22e90
leaq 0x15685(%rip), %r9      # 0x22e77
cmoveq %rax, %r9
leaq 0x1580c(%rip), %rsi     # 0x23009
leaq 0x1590d(%rip), %rdx     # 0x23111
leaq 0x15662(%rip), %r8      # 0x22e6d
movl $0x3, %edi
movl $0x2fd, %ecx            # imm = 0x2FD
xorl %eax, %eax
callq 0x1771e
jmp 0xd820
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 0x1418d
movq (%r15), %rsi
movq %r14, %rdi
callq 0x140fe
jmp 0xd738