// File: /workspace/github_c_makefile_star2_O0/niuyuling[P]CProxy/httpdns.c
// Function: create_outRequest
static int8_t create_outRequest(dns_t * dns)
{
    if (parse_dns_request(dns->dns_req, dns) != 0) {
        dns->out_request = NULL;
        return 1;
    }
    if (httpdns.tcpDNS_mode == 1) {
        memmove(dns->dns_req + 2, dns->dns_req, dns->dns_req_len);
        dns->dns_req[0] = *((char *)(&dns->dns_req_len) + 1);
        dns->dns_req[1] = *((char *)&dns->dns_req_len);
        dns->out_request = dns->dns_req;
        dns->out_request_len = dns->dns_req_len + 2;
        dns->host = NULL;
        /*
           //调试用
           int i;
           printf("(");
           for (i=0;i<dns->out_request_len;i++)
           printf("%u ", dns->out_request[i]);
           puts(")");
         */
    } else {
        if (httpdns.encodeCode)
            dataEncode(dns->host, dns->host_len, httpdns.encodeCode);
        dns->out_request_len = httpdns.http_req_len;
        copy_new_mem(httpdns.http_req, httpdns.http_req_len, &dns->out_request);
        dns->out_request = replace(dns->out_request, &dns->out_request_len, "[D]", 3, dns->host, dns->host_len);
        free(dns->host);
        if (dns->out_request == NULL)
            return 1;
    }
    if (httpdns.httpsProxy_encodeCode)
        dataEncode(dns->out_request, dns->out_request_len, httpdns.httpsProxy_encodeCode);
    dns->sent_CONNECT_len = 0;

    return 0;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x10, %rsp
movq %rdi, -0x10(%rbp)
movq -0x10(%rbp), %rdi
movq -0x10(%rbp), %rsi
callq 0x8700
movsbl %al, %eax
cmpl $0x0, %eax
je 0x8209
movq -0x10(%rbp), %rax
movq $0x0, 0x218(%rax)
movb $0x1, -0x1(%rbp)
jmp 0x839f
movb 0x14521(%rip), %al      # 0x1c730
andb $0x1, %al
movzbl %al, %eax
cmpl $0x1, %eax
jne 0x8293
movq -0x10(%rbp), %rdi
addq $0x2, %rdi
movq -0x10(%rbp), %rsi
movq -0x10(%rbp), %rax
movzwl 0x238(%rax), %eax
movl %eax, %edx
callq 0x2450
movq -0x10(%rbp), %rax
movb 0x239(%rax), %cl
movq -0x10(%rbp), %rax
movb %cl, (%rax)
movq -0x10(%rbp), %rax
movb 0x238(%rax), %cl
movq -0x10(%rbp), %rax
movb %cl, 0x1(%rax)
movq -0x10(%rbp), %rcx
movq -0x10(%rbp), %rax
movq %rcx, 0x218(%rax)
movq -0x10(%rbp), %rax
movzwl 0x238(%rax), %ecx
addl $0x2, %ecx
movq -0x10(%rbp), %rax
movl %ecx, 0x228(%rax)
movq -0x10(%rbp), %rax
movq $0x0, 0x220(%rax)
jmp 0x8364
cmpl $0x0, 0x1448e(%rip)     # 0x1c728
je 0x82c1
movq -0x10(%rbp), %rax
movq 0x220(%rax), %rdi
movq -0x10(%rbp), %rax
movb 0x23b(%rax), %al
andb $0x7f, %al
movzbl %al, %esi
movl 0x1446c(%rip), %edx     # 0x1c728
callq 0x3e20
movl 0x14449(%rip), %ecx     # 0x1c710
movq -0x10(%rbp), %rax
movl %ecx, 0x228(%rax)
movq 0x14408(%rip), %rdi     # 0x1c6e0
movl 0x14432(%rip), %esi     # 0x1c710
movq -0x10(%rbp), %rdx
addq $0x218, %rdx            # imm = 0x218
callq 0x4c90
movq -0x10(%rbp), %rax
movq 0x218(%rax), %rdi
movq -0x10(%rbp), %rsi
addq $0x228, %rsi            # imm = 0x228
movq -0x10(%rbp), %rax
movq 0x220(%rax), %r8
movq -0x10(%rbp), %rax
movb 0x23b(%rax), %al
andb $0x7f, %al
movzbl %al, %r9d
leaq 0x4199(%rip), %rdx      # 0xc4bf
movl $0x3, %ecx
callq 0x4d00
movq %rax, %rcx
movq -0x10(%rbp), %rax
movq %rcx, 0x218(%rax)
movq -0x10(%rbp), %rax
movq 0x220(%rax), %rdi
callq 0x2030
movq -0x10(%rbp), %rax
cmpq $0x0, 0x218(%rax)
jne 0x8362
movb $0x1, -0x1(%rbp)
jmp 0x839f
jmp 0x8364
cmpl $0x0, 0x143c1(%rip)     # 0x1c72c
je 0x838d
movq -0x10(%rbp), %rax
movq 0x218(%rax), %rdi
movq -0x10(%rbp), %rax
movl 0x228(%rax), %esi
movl 0x143a4(%rip), %edx     # 0x1c72c
callq 0x3e20
movq -0x10(%rbp), %rax
movl $0x0, 0x234(%rax)
movb $0x0, -0x1(%rbp)
movb -0x1(%rbp), %al
addq $0x10, %rsp
popq %rbp
retq
nopl (%rax,%rax)