// File: /workspace/github_c_makefile_star2_O0/GangZhuo[P]dohclient/src/channel_chndoh.c
// Function: check_doh_server
static int check_doh_server(doh_server_t *doh)
{
	if (is_empty_sockaddr(doh->addr)) {
		loge("no \"addr\"\n");
		return -1;
	}
	if (doh->channel == CH_DOH) {
		if (!doh->host || !*doh->host) {
			loge("no \"host\"\n");
			return -1;
		}
		if (!doh->path || !*doh->path) {
			loge("no \"path\"\n");
			return -1;
		}
	}
	if (doh->timeout <= 0) {
		loge("invalid \"timeout\"\n");
		return -1;
	}
	if (doh->keep_alive < 0) {
		loge("invalid \"keep-alive\"\n");
		return -1;
	}

	/* Compatible with old configuration */
	if (doh->keep_alive == 1)
		doh->keep_alive = DEFAULT_HTTP_TIMEOUT;

	return 0;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x10, %rsp
movq %rdi, -0x10(%rbp)
movq -0x10(%rbp), %rdi
addq $0x8, %rdi
callq 0xfc20
cmpl $0x0, %eax
je 0xfa80
jmp 0xfa40
movb $0x0, %al
callq 0x242d0
cmpl $0x3, (%rax)
jl 0xfa72
movl $0x3, %edi
leaq 0x26526(%rip), %rsi     # 0x35f7e
leaq 0x26797(%rip), %rdx     # 0x361f6
movl $0x4d1, %ecx            # imm = 0x4D1
leaq 0x2679c(%rip), %r8      # 0x36207
movb $0x0, %al
callq 0x243b0
jmp 0xfa74
movl $0xffffffff, -0x4(%rbp) # imm = 0xFFFFFFFF
jmp 0xfc0d
movq -0x10(%rbp), %rax
cmpl $0x1, 0x5b0(%rax)
jne 0xfb53
movq -0x10(%rbp), %rax
cmpq $0x0, 0x460(%rax)
je 0xfaaf
movq -0x10(%rbp), %rax
movq 0x460(%rax), %rax
cmpb $0x0, (%rax)
jne 0xfaf1
jmp 0xfab1
movb $0x0, %al
callq 0x242d0
cmpl $0x3, (%rax)
jl 0xfae3
movl $0x3, %edi
leaq 0x264b5(%rip), %rsi     # 0x35f7e
leaq 0x26726(%rip), %rdx     # 0x361f6
movl $0x4d6, %ecx            # imm = 0x4D6
leaq 0x26736(%rip), %r8      # 0x36212
movb $0x0, %al
callq 0x243b0
jmp 0xfae5
movl $0xffffffff, -0x4(%rbp) # imm = 0xFFFFFFFF
jmp 0xfc0d
movq -0x10(%rbp), %rax
cmpq $0x0, 0x468(%rax)
je 0xfb0f
movq -0x10(%rbp), %rax
movq 0x468(%rax), %rax
cmpb $0x0, (%rax)
jne 0xfb51
jmp 0xfb11
movb $0x0, %al
callq 0x242d0
cmpl $0x3, (%rax)
jl 0xfb43
movl $0x3, %edi
leaq 0x26455(%rip), %rsi     # 0x35f7e
leaq 0x266c6(%rip), %rdx     # 0x361f6
movl $0x4da, %ecx            # imm = 0x4DA
leaq 0x266e1(%rip), %r8      # 0x3621d
movb $0x0, %al
callq 0x243b0
jmp 0xfb45
movl $0xffffffff, -0x4(%rbp) # imm = 0xFFFFFFFF
jmp 0xfc0d
jmp 0xfb53
movq -0x10(%rbp), %rax
cmpl $0x0, 0x47c(%rax)
jg 0xfb9f
jmp 0xfb62
movb $0x0, %al
callq 0x242d0
cmpl $0x3, (%rax)
jl 0xfb94
movl $0x3, %edi
leaq 0x26404(%rip), %rsi     # 0x35f7e
leaq 0x26675(%rip), %rdx     # 0x361f6
movl $0x4df, %ecx            # imm = 0x4DF
leaq 0x2669b(%rip), %r8      # 0x36228
movb $0x0, %al
callq 0x243b0
jmp 0xfb96
movl $0xffffffff, -0x4(%rbp) # imm = 0xFFFFFFFF
jmp 0xfc0d
movq -0x10(%rbp), %rax
cmpl $0x0, 0x470(%rax)
jge 0xfbeb
jmp 0xfbae
movb $0x0, %al
callq 0x242d0
cmpl $0x3, (%rax)
jl 0xfbe0
movl $0x3, %edi
leaq 0x263b8(%rip), %rsi     # 0x35f7e
leaq 0x26629(%rip), %rdx     # 0x361f6
movl $0x4e3, %ecx            # imm = 0x4E3
leaq 0x26662(%rip), %r8      # 0x3623b
movb $0x0, %al
callq 0x243b0
jmp 0xfbe2
movl $0xffffffff, -0x4(%rbp) # imm = 0xFFFFFFFF
jmp 0xfc0d
movq -0x10(%rbp), %rax
cmpl $0x1, 0x470(%rax)
jne 0xfc06
movq -0x10(%rbp), %rax
movl $0x4b0, 0x470(%rax)     # imm = 0x4B0
movl $0x0, -0x4(%rbp)
movl -0x4(%rbp), %eax
addq $0x10, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)