// File: /workspace/github_c_makefile_star2_O0/uhlin[P]enhanced-duc/source/main.c
// Function: update_host
static bool
update_host(const char *which_host, const char *to_ip,
	    bool *updateRequestAfter30Min)
{
	bool	 ok = true;
	char	*buf = NULL;

	if (which_host == NULL || to_ip == NULL ||
	    updateRequestAfter30Min == NULL)
		fatal(EINVAL, "update_host");

	if (net_connect() == -1 ||
	    send_update_request(which_host, to_ip) == -1 ||
	    store_server_resp_in_buffer(&buf) == -1) {
		ok = false;
		goto err;
	}

	switch (server_response(buf)) {
	case CODE_GOOD:
		log_msg("dns hostname update successful");
		break;
	case CODE_NOCHG:
		log_msg("ip address is current");
		break;
	case CODE_NOHOST:
		fatal(0, "Hostname supplied does not exist under specified "
		    "account.");
		break;
	case CODE_BADAUTH:
		fatal(0, "Invalid username password combination.");
		break;
	case CODE_BADAGENT:
		fatal(0, "Bad agent? I don't think so! But the server is "
		    "always right. Exiting...");
		break;
	case CODE_NOTDONATOR:
		fatal(0, "Bad update request. Feature not available.");
		break;
	case CODE_ABUSE:
		fatal(0, "Username blocked due to abuse.");
		break;
	case CODE_EMERG: {
		if (Cycle)
			log_warn(0, "fatal error on the server side "
			    "(will retry update after 30 minutes)");
		else
			log_warn(0, "fatal error on the server side");
		*updateRequestAfter30Min = true;
		break;
	}
	default:
	case CODE_UNKNOWN:
		flag_err_and_output_warning(&ok, "Unknown server response!");
		break;
	}

  err:
	net_disconnect();
	free_not_null(buf);
	return (ok);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x30, %rsp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq %rdx, -0x18(%rbp)
movb $0x1, -0x19(%rbp)
movq $0x0, -0x28(%rbp)
cmpq $0x0, -0x8(%rbp)
je 0x6c15
cmpq $0x0, -0x10(%rbp)
je 0x6c15
cmpq $0x0, -0x18(%rbp)
jne 0x6c28
movl $0x16, %edi
leaq 0x5103(%rip), %rsi      # 0xbd24
movb $0x0, %al
callq 0x5fa0
callq 0x83b0
cmpl $-0x1, %eax
je 0x6c52
movq -0x8(%rbp), %rdi
movq -0x10(%rbp), %rsi
callq 0x6de0
cmpl $-0x1, %eax
je 0x6c52
leaq -0x28(%rbp), %rdi
callq 0x7000
cmpl $-0x1, %eax
jne 0x6c5b
movb $0x0, -0x19(%rbp)
jmp 0x6d45
movq -0x28(%rbp), %rdi
callq 0x7110
movl %eax, %ecx
movq %rcx, -0x30(%rbp)
subl $0x8, %eax
ja 0x6d31
movq -0x30(%rbp), %rax
leaq 0x491e(%rip), %rcx      # 0xb59c
movslq (%rcx,%rax,4), %rax
addq %rcx, %rax
jmpq *%rax
leaq 0x50a2(%rip), %rdi      # 0xbd30
movb $0x0, %al
callq 0x6260
jmp 0x6d43
leaq 0x50ae(%rip), %rdi      # 0xbd4f
movb $0x0, %al
callq 0x6260
jmp 0x6d43
xorl %edi, %edi
leaq 0x50af(%rip), %rsi      # 0xbd65
movb $0x0, %al
callq 0x5fa0
xorl %edi, %edi
leaq 0x50d9(%rip), %rsi      # 0xbd9f
movb $0x0, %al
callq 0x5fa0
xorl %edi, %edi
leaq 0x50f0(%rip), %rsi      # 0xbdc6
movb $0x0, %al
callq 0x5fa0
xorl %edi, %edi
leaq 0x5128(%rip), %rsi      # 0xbe0e
movb $0x0, %al
callq 0x5fa0
xorl %edi, %edi
leaq 0x5143(%rip), %rsi      # 0xbe39
movb $0x0, %al
callq 0x5fa0
testb $0x1, 0x978c(%rip)      # 0x10490
je 0x6d18
xorl %edi, %edi
leaq 0x5149(%rip), %rsi      # 0xbe58
movb $0x0, %al
callq 0x6300
jmp 0x6d28
xorl %edi, %edi
leaq 0x517b(%rip), %rsi      # 0xbe9c
movb $0x0, %al
callq 0x6300
movq -0x18(%rbp), %rax
movb $0x1, (%rax)
jmp 0x6d43
jmp 0x6d33
leaq -0x19(%rbp), %rdi
leaq 0x517d(%rip), %rsi      # 0xbebb
callq 0x7310
jmp 0x6d45
callq 0x8630
movq -0x28(%rbp), %rdi
callq 0x7350
movb -0x19(%rbp), %al
andb $0x1, %al
addq $0x30, %rsp
popq %rbp
retq
nop