LLM4Binary/decompile-bench-makefile huggingface dataset:
// File: /workspace/github_c_makefile_star2_O2/uhlin[P]enhanced-duc/source/network.c
// Function: net_send_plain
int
net_send_plain(const char *fmt, ...)
{
	bool		 ok = true;
	char		*buf = NULL;
	size_t		 newSize = 0;
	static const char
			 message_terminate[] = "\r\n\r\n";
	va_list		 ap;

	log_assert_arg_nonnull("net_send_plain", "fmt", fmt);

	va_start(ap, fmt);
	if (errno = 0, my_vasprintf(&buf, fmt, ap) < 0)
		fatal(errno, "net_send_plain: my_vasprintf");
	va_end(ap);

	newSize = strlen(buf) + nitems(message_terminate);
	buf = xrealloc(buf, newSize);

	if (strlcat(buf, message_terminate, newSize) >= newSize)
		fatal(EOVERFLOW, "net_send_plain: strlcat");
	if (errno = 0, send(g_socket, buf, strlen(buf), 0) == -1)
		ok = false;
	if (!ok)
		log_warn(errno, "net_send_plain: send");
	free(buf);
	return (ok ? 0 : -1);
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
subq $0xe0, %rsp
movq %rdi, %r14
leaq 0x30(%rsp), %rbx
movq %rsi, 0x8(%rbx)
movq %rdx, 0x10(%rbx)
movq %rcx, 0x18(%rbx)
movq %r8, 0x20(%rbx)
movq %r9, 0x28(%rbx)
testb %al, %al
je 0x6d45
movaps %xmm0, 0x60(%rsp)
movaps %xmm1, 0x70(%rsp)
movaps %xmm2, 0x80(%rsp)
movaps %xmm3, 0x90(%rsp)
movaps %xmm4, 0xa0(%rsp)
movaps %xmm5, 0xb0(%rsp)
movaps %xmm6, 0xc0(%rsp)
movaps %xmm7, 0xd0(%rsp)
leaq 0x8(%rsp), %r15
andq $0x0, (%r15)
leaq 0x3708(%rip), %rdi      # 0xa45d
leaq 0x3233(%rip), %rsi      # 0x9f8f
movq %r14, %rdx
callq 0x7128
leaq 0x10(%rsp), %r12
movq %rbx, 0x10(%r12)
leaq 0x110(%rsp), %rax
movq %rax, 0x8(%r12)
movabsq $0x3000000008, %rax     # imm = 0x3000000008
movq %rax, (%r12)
callq 0x4050
movq %rax, %rbx
andl $0x0, (%rax)
movq %r15, %rdi
movq %r14, %rsi
movq %r12, %rdx
callq 0x63b0
testl %eax, %eax
js 0x6e4a
movq 0x8(%rsp), %r14
movq %r14, %rdi
callq 0x41c0
movq %rax, %r15
addq $0x5, %r15
movq %r14, %rdi
movq %r15, %rsi
callq 0x8652
movq %rax, 0x8(%rsp)
leaq 0x38b3(%rip), %rsi      # 0xa688
movq %rax, %rdi
movq %r15, %rdx
callq 0x80a0
cmpq %r15, %rax
jae 0x6e55
andl $0x0, (%rbx)
movl 0x7662(%rip), %ebp      # 0xe450
movq 0x8(%rsp), %r14
movq %r14, %rdi
callq 0x41c0
movl %ebp, %edi
movq %r14, %rsi
movq %rax, %rdx
xorl %ecx, %ecx
callq 0x4200
movq %rax, %r14
cmpq $-0x1, %rax
jne 0x6e23
movl (%rbx), %edi
leaq 0x3685(%rip), %rsi      # 0xa4a1
xorl %eax, %eax
callq 0x57ea
xorl %ebx, %ebx
cmpq $-0x1, %r14
sete %bl
movq 0x8(%rsp), %rdi
callq 0x4530
negl %ebx
movl %ebx, %eax
addq $0xe0, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
movl (%rbx), %edi
leaq 0x3619(%rip), %rsi      # 0xa46c
jmp 0x6e5f
leaq 0x362d(%rip), %rsi      # 0xa489
pushq $0x4b
popq %rdi
xorl %eax, %eax
callq 0x5513
// File: /workspace/github_c_makefile_star2_O2/uhlin[P]enhanced-duc/source/network.c
// Function: net_recv_plain
int
net_recv_plain(char *recvbuf, size_t recvbuf_size)
{
#if IO_MULTIPLEXING
	const int	 maxfdp1 = g_socket + 1;
	fd_set		 readset;
	struct timeval	 tv;

	tv.tv_sec	= 10;
	tv.tv_usec	= 333;

	FD_ZERO(&readset);
	FD_SET(g_socket, &readset);

	if (select(maxfdp1, &readset, NULL, NULL, &tv) == -1) {
		log_warn(errno, "net_recv_plain: select");
		return -1;
	} else if (!FD_ISSET(g_socket, &readset)) {
		log_warn(0, "net_recv_plain: no data to receive  --  "
		    "timed out!");
		return -1;
	}
#endif /* IO_MULTIPLEXING */

	log_assert_arg_nonnull("net_recv_plain", "recvbuf", recvbuf);

	switch (recv(g_socket, recvbuf, recvbuf_size, 0)) {
	case -1:
		log_warn(errno, "net_recv_plain: recv");
		return -1;
	case 0:
		log_warn(0, "net_recv_plain: fatal: connection lost");
		return -1;
	default:
		break;
	}
	return 0;
}

// Assembly:
pushq %rbp
pushq %r14
pushq %rbx
subq $0x90, %rsp
movq %rsi, %rbx
movq %rdi, %r14
movl 0x75d3(%rip), %ecx      # 0xe450
movq $0xa, (%rsp)
movq $0x14d, 0x8(%rsp)       # imm = 0x14D
xorl %eax, %eax
cmpq $0x10, %rax
je 0x6ea1
andq $0x0, 0x10(%rsp,%rax,8)
incq %rax
jmp 0x6e90
leal 0x1(%rcx), %edi
pushq $0x40
popq %rbp
movl %ecx, %eax
cltd
idivl %ebp
movslq %eax, %rdx
shll $0x6, %eax
subl %eax, %ecx
pushq $0x1
popq %rax
shlq %cl, %rax
orq %rax, 0x10(%rsp,%rdx,8)
leaq 0x10(%rsp), %rsi
movq %rsp, %r8
xorl %edx, %edx
xorl %ecx, %ecx
callq 0x43d0
cmpl $-0x1, %eax
je 0x6f31
movl 0x7575(%rip), %eax      # 0xe450
cltd
idivl %ebp
cltq
movq 0x10(%rsp,%rax,8), %rax
btq %rdx, %rax
jae 0x6f41
leaq 0x360e(%rip), %rdi      # 0xa500
leaq 0x3126(%rip), %rsi      # 0xa01f
movq %r14, %rdx
callq 0x7128
movl 0x7549(%rip), %edi      # 0xe450
xorl %ebp, %ebp
movq %r14, %rsi
movq %rbx, %rdx
xorl %ecx, %ecx
callq 0x4150
testq %rax, %rax
je 0x6f4a
cmpq $-0x1, %rax
jne 0x6f5d
callq 0x4050
movl (%rax), %edi
leaq 0x35e0(%rip), %rsi      # 0xa50f
jmp 0x6f53
callq 0x4050
movl (%rax), %edi
leaq 0x3577(%rip), %rsi      # 0xa4b6
jmp 0x6f53
leaq 0x3585(%rip), %rsi      # 0xa4cd
jmp 0x6f51
leaq 0x35d3(%rip), %rsi      # 0xa524
xorl %edi, %edi
xorl %eax, %eax
callq 0x57ea
pushq $-0x1
popq %rbp
movl %ebp, %eax
addq $0x90, %rsp
popq %rbx
popq %r14
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O2/uhlin[P]enhanced-duc/source/network.c
// Function: net_connect
int
net_connect(void)
{
	bool			 connected = false;
	const char		*host = setting("sp_hostname");
	const char		*port = setting("port");
	struct addrinfo		*res, *rp;

	log_debug("connecting to %s (%s)...", host, port);

	if ((res = net_addr_resolve(host, port)) == NULL) {
		log_warn(0, "unable to get a list of ip addresses. "
		    "bogus hostname?");
		return -1;
	} else {
		log_debug("get a list of ip addresses complete");
	}

	for (rp = res; rp; rp = rp->ai_next) {
		g_socket =
		    socket(rp->ai_family, rp->ai_socktype, rp->ai_protocol);

		if (g_socket == SOCKET_CREATION_FAILED) {
			continue;
		} else if (connect(g_socket, rp->ai_addr, rp->ai_addrlen) == 0) {
			log_debug("connected!");
			connected = true;
			break;
		} else {
			(void) close(g_socket);
		}
	}

	freeaddrinfo(res);

	if (!connected || (ssl_is_enabled() && net_ssl_begin() == -1)) {
		log_warn(0, "failed to establish a connection");
		return -1;
	}
	if (ssl_is_enabled() &&
	    net_ssl_check_hostname(host, 0) == HOSTNAME_MISMATCH) {
		log_warn(0, "net_ssl_check_hostname: warning: "
		    "hostname checking failed: "
		    "hostname specified by 'sp_hostname' mismatch: "
		    "failed to establish a connection");
		return -1;
	}
	return 0;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %rbx
pushq %rax
leaq 0x2e5c(%rip), %rdi      # 0x9dd5
callq 0x776a
movq %rax, %rbx
leaq 0x33c8(%rip), %rdi      # 0xa350
callq 0x776a
movq %rax, %r14
leaq 0x33be(%rip), %rdi      # 0xa355
movq %rbx, %rsi
movq %rax, %rdx
xorl %eax, %eax
callq 0x5684
movq %rbx, %rdi
movq %r14, %rsi
callq 0x708c
testq %rax, %rax
je 0x701e
movq %rax, %r14
leaq 0x33e6(%rip), %rdi      # 0xa3a4
xorl %eax, %eax
callq 0x5684
movq %r14, %r15
testq %r15, %r15
je 0x700d
movl 0x4(%r15), %edi
movl 0x8(%r15), %esi
movl 0xc(%r15), %edx
callq 0x40f0
movl %eax, 0x746c(%rip)      # 0xe450
cmpl $-0x1, %eax
je 0x7007
movq 0x18(%r15), %rsi
movl 0x10(%r15), %edx
movl %eax, %edi
callq 0x4360
testl %eax, %eax
je 0x703e
movl 0x744e(%rip), %edi      # 0xe450
callq 0x47f0
movq 0x28(%r15), %r15
jmp 0x6fc8
movq %r14, %rdi
callq 0x45b0
leaq 0x3420(%rip), %rsi      # 0xa43c
jmp 0x7025
leaq 0x3349(%rip), %rsi      # 0xa36e
xorl %edi, %edi
xorl %eax, %eax
callq 0x57ea
pushq $-0x1
popq %rbp
movl %ebp, %eax
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
leaq 0x3383(%rip), %rdi      # 0xa3c8
xorl %ebp, %ebp
xorl %eax, %eax
callq 0x5684
movq %r14, %rdi
callq 0x45b0
callq 0x70dd
testb %al, %al
je 0x7069
callq 0x68ad
cmpl $-0x1, %eax
je 0x7015
callq 0x70dd
testb %al, %al
je 0x7031
xorl %ebp, %ebp
movq %rbx, %rdi
xorl %esi, %esi
callq 0x6458
cmpl $0x1, %eax
jne 0x7031
leaq 0x3349(%rip), %rsi      # 0xa3d3
jmp 0x7025
// File: /workspace/github_c_makefile_star2_O2/uhlin[P]enhanced-duc/source/network.c
// Function: net_addr_resolve
static struct addrinfo *
net_addr_resolve(const char *host, const char *port)
{
	struct addrinfo		*res;
	struct addrinfo		 hints = { 0 };

	if (host == NULL || port == NULL)
		return NULL;

	hints.ai_flags     = AI_CANONNAME;
	hints.ai_family    = AF_UNSPEC;
	hints.ai_socktype  = SOCK_STREAM;
	hints.ai_protocol  = 0;
	hints.ai_addrlen   = 0;
	hints.ai_addr      = NULL;
	hints.ai_canonname = NULL;
	hints.ai_next      = NULL;

	if (getaddrinfo(host, port, &hints, &res) != 0)
		return NULL;
	return res;
}

// Assembly:
subq $0x48, %rsp
andq $0x0, 0x20(%rsp)
testq %rdi, %rdi
sete %al
testq %rsi, %rsi
sete %cl
orb %al, %cl
jne 0x70d6
movaps 0x3293(%rip), %xmm0     # 0xa340
leaq 0x10(%rsp), %rdx
movaps %xmm0, (%rdx)
xorps %xmm0, %xmm0
movups %xmm0, 0x18(%rdx)
andq $0x0, 0x28(%rdx)
leaq 0x8(%rsp), %rcx
callq 0x4580
testl %eax, %eax
jne 0x70d6
movq 0x8(%rsp), %rax
jmp 0x70d8
xorl %eax, %eax
addq $0x48, %rsp
retq
// File: /workspace/github_c_makefile_star2_O2/uhlin[P]enhanced-duc/source/network.c
// Function: net_disconnect
void
net_disconnect(void)
{
	if (ssl_is_enabled())
		net_ssl_end();
	if (g_socket != -1) {
		(void) close(g_socket);
		g_socket = -1;
	}
}

// Assembly:
pushq %rax
callq 0x70dd
testb %al, %al
je 0x710f
callq 0x6953
movl 0x733b(%rip), %edi      # 0xe450
cmpl $-0x1, %edi
je 0x7126
callq 0x47f0
orl $-0x1, 0x732a(%rip)     # 0xe450
popq %rax
retq
// File: /workspace/github_c_makefile_star2_O2/uhlin[P]enhanced-duc/source/network.c
// Function: net_deinit
void
net_deinit(void)
{
	if (ssl_is_enabled())
		net_ssl_deinit();
	if (g_socket != -1) {
		(void) close(g_socket);
		g_socket = -1;
	}
}

// Assembly:
pushq %rax
callq 0x70dd
testb %al, %al
je 0x739e
callq 0x6cb9
movl 0x70ac(%rip), %edi      # 0xe450
cmpl $-0x1, %edi
je 0x73b5
callq 0x47f0
orl $-0x1, 0x709b(%rip)     # 0xe450
popq %rax
retq
nop
// File: /workspace/github_c_makefile_star2_O2/uhlin[P]enhanced-duc/source/settings.c
// Function: setting_bool
bool
setting_bool(const char *setting_name, const bool fallback_val)
{
	if (setting_name == NULL)
		return fallback_val;
	FOREACH_CDV() {
		if (strings_match(setting_name, cdv->setting_name)) {
			const char *value =
			    (cdv->custom_val ? cdv->custom_val : cdv->value);

			if (cdv->type != TYPE_BOOLEAN) {
				log_warn(0, "setting_bool: %s: "
				    "setting not a boolean!", setting_name);
				break;
			} else if (strings_match(value, "yes") ||
				   strings_match(value, "YES")) {
				return true;
			} else if (strings_match(value, "no") ||
				   strings_match(value, "NO")) {
				return false;
			} else {
				log_warn(0, "setting_bool: %s: "
				    "setting has an invalid value!",
				    setting_name);
				break;
			}
		}
	}
	return fallback_val;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movl %esi, %ebx
testq %rdi, %rdi
je 0x741e
movq %rdi, %r14
xorl %r12d, %r12d
leaq 0x7089(%rip), %r13      # 0xe460
cmpq $0x18f, %r12            # imm = 0x18F
ja 0x741e
movq (%r12,%r13), %rsi
movq %r14, %rdi
callq 0x748d
addq $0x28, %r12
testb %al, %al
je 0x73d7
movq -0x10(%r12,%r13), %r15
testq %r15, %r15
jne 0x7403
movq -0x18(%r12,%r13), %r15
cmpl $0x0, -0x20(%r12,%r13)
je 0x7431
leaq 0x327b(%rip), %rsi      # 0xa68d
xorl %edi, %edi
movq %r14, %rdx
xorl %eax, %eax
callq 0x57ea
movl %ebx, %ebp
movl %ebp, %eax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
leaq 0x327e(%rip), %rsi      # 0xa6b6
movq %r15, %rdi
callq 0x748d
movb $0x1, %bpl
testb %al, %al
jne 0x7420
leaq 0x326c(%rip), %rsi      # 0xa6ba
movq %r15, %rdi
callq 0x748d
testb %al, %al
jne 0x7420
leaq 0x325d(%rip), %rsi      # 0xa6be
movq %r15, %rdi
callq 0x748d
testb %al, %al
jne 0x7480
leaq 0x3625(%rip), %rsi      # 0xaa99
movq %r15, %rdi
callq 0x748d
testb %al, %al
je 0x7484
xorl %ebp, %ebp
jmp 0x7420
leaq 0x3236(%rip), %rsi      # 0xa6c1
jmp 0x7412
// File: /workspace/github_c_makefile_star2_O2/uhlin[P]enhanced-duc/source/settings.c
// Function: is_setting_ok
static bool
is_setting_ok(const char *value, enum setting_type type)
{
	if (value == NULL)
		return false;

	switch (type) {
	case TYPE_BOOLEAN: {
		if (!strings_match(value, "yes") &&
		    !strings_match(value, "YES") &&
		    !strings_match(value, "no") &&
		    !strings_match(value, "NO")) {
			log_warn(0, "%s is_setting_ok: "
			    "booleans must be either: yes, YES, no or NO",
			    GfxFailure);
			return false;
		}
		break;
	}
	case TYPE_INTEGER: {
		if (!is_numeric(value)) {
			log_warn(0, "%s is_setting_ok: integer not all numeric",
			    GfxFailure);
			return false;
		}
		break;
	}
	case TYPE_STRING: {
		if (strpbrk(value, " \f\n\r\t\v\"") != NULL) {
			log_warn(0, "%s is_setting_ok: "
			    "illegal characters in string", GfxFailure);
			return false;
		}
		break;
	}
	default:
		fatal(0, "is_setting_ok: statement reached unexpectedly");
		break;
	}

	return true;
}

// Assembly:
pushq %r14
pushq %rbx
pushq %rax
testq %rdi, %rdi
je 0x7704
movq %rdi, %r14
cmpl $0x2, %esi
je 0x771f
cmpl $0x1, %esi
je 0x7708
testl %esi, %esi
jne 0x775a
leaq 0x3006(%rip), %rsi      # 0xa6b6
movq %r14, %rdi
callq 0x748d
movb $0x1, %bl
testb %al, %al
jne 0x7750
leaq 0x2ff1(%rip), %rsi      # 0xa6ba
movq %r14, %rdi
callq 0x748d
testb %al, %al
jne 0x7750
leaq 0x2fe2(%rip), %rsi      # 0xa6be
movq %r14, %rdi
callq 0x748d
testb %al, %al
jne 0x7750
leaq 0x33aa(%rip), %rsi      # 0xaa99
movq %r14, %rdi
callq 0x748d
testb %al, %al
jne 0x7750
leaq 0x335c(%rip), %rsi      # 0xaa5e
jmp 0x773a
xorl %ebx, %ebx
jmp 0x7750
movq %r14, %rdi
callq 0x821e
movb $0x1, %bl
testb %al, %al
jne 0x7750
leaq 0x337f(%rip), %rsi      # 0xaa9c
jmp 0x773a
leaq 0x33a0(%rip), %rsi      # 0xaac6
movq %r14, %rdi
callq 0x4770
testq %rax, %rax
je 0x774e
leaq 0x3394(%rip), %rsi      # 0xaace
leaq 0x342f(%rip), %rdx      # 0xab70
xorl %ebx, %ebx
xorl %edi, %edi
xorl %eax, %eax
callq 0x57ea
jmp 0x7750
movb $0x1, %bl
movl %ebx, %eax
addq $0x8, %rsp
popq %rbx
popq %r14
retq
leaq 0x339c(%rip), %rsi      # 0xaafd
xorl %edi, %edi
xorl %eax, %eax
callq 0x5513
// File: /workspace/github_c_makefile_star2_O2/uhlin[P]enhanced-duc/source/settings.c
// Function: setting
const char *
setting(const char *setting_name)
{
	if (setting_name == NULL) {
		return ("");
	}

	FOREACH_CDV() {
		if (strings_match(setting_name, cdv->setting_name))
			return (cdv->custom_val ? cdv->custom_val : cdv->value);
	}

	return ("");
}

// Assembly:
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
pushq %rax
leaq 0x2752(%rip), %rbx      # 0x9ecb
testq %rdi, %rdi
je 0x77b7
movq %rdi, %r14
xorl %r15d, %r15d
leaq 0x6cd5(%rip), %r12      # 0xe460
cmpq $0x18f, %r15            # imm = 0x18F
ja 0x77b7
movq (%r15,%r12), %rsi
movq %r14, %rdi
callq 0x748d
addq $0x28, %r15
testb %al, %al
je 0x778b
movq -0x10(%r15,%r12), %rbx
testq %rbx, %rbx
jne 0x77b7
movq -0x18(%r15,%r12), %rbx
movq %rbx, %rax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
retq
// File: /workspace/github_c_makefile_star2_O2/uhlin[P]enhanced-duc/source/settings.c
// Function: setting_integer
long int
setting_integer(const struct integer_context *ctx)
{
	long int val = 0;

	log_assert_arg_nonnull("setting_integer", "ctx", ctx);

	FOREACH_CDV() {
		if (strings_match(ctx->setting_name, cdv->setting_name)) {
			const char *str =
			    (cdv->custom_val ? cdv->custom_val : cdv->value);
			errno = 0;
			val = strtol(str, NULL, 10);

			if (errno != 0 ||
			    (val < ctx->lo_limit || val > ctx->hi_limit)) {
				log_warn(ERANGE, "warning: setting %s "
				    "out of range %ld-%ld: "
				    "fallback value is %ld", ctx->setting_name,
				    ctx->lo_limit, ctx->hi_limit,
				    ctx->fallback_val);
				break;
			} else {
				return val;
			}
		}
	}

	return (ctx->fallback_val);
}

// Assembly:
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
pushq %rax
movq %rdi, %rbx
leaq 0x2f8e(%rip), %rdi      # 0xa766
leaq 0x2f97(%rip), %rsi      # 0xa776
movq %rbx, %rdx
callq 0x7653
movq (%rbx), %r14
xorl %r15d, %r15d
leaq 0x6c6c(%rip), %r12      # 0xe460
cmpq $0x18f, %r15            # imm = 0x18F
ja 0x7869
movq (%r15,%r12), %rsi
movq %r14, %rdi
callq 0x748d
addq $0x28, %r15
testb %al, %al
je 0x77f4
movq -0x10(%r15,%r12), %r14
testq %r14, %r14
jne 0x7820
movq -0x18(%r15,%r12), %r14
callq 0x4050
movq %rax, %r15
andl $0x0, (%rax)
pushq $0xa
popq %rdx
movq %r14, %rdi
xorl %esi, %esi
callq 0x4640
cmpl $0x0, (%r15)
movq 0x8(%rbx), %rcx
jne 0x784d
cmpq %rcx, %rax
jl 0x784d
cmpq 0x10(%rbx), %rax
jle 0x786d
movq (%rbx), %rdx
movq 0x10(%rbx), %r8
movq 0x18(%rbx), %r9
leaq 0x2f1b(%rip), %rsi      # 0xa77a
pushq $0x22
popq %rdi
xorl %eax, %eax
callq 0x57ea
movq 0x18(%rbx), %rax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
retq
// File: /workspace/github_c_makefile_star2_O2/uhlin[P]enhanced-duc/source/settings.c
// Function: is_hostname_ok
static bool
is_hostname_ok(const char *host, const char **reason)
{
	const char host_chars[] =
	    "ABCDEFGHIJKLMNOPQRSTUVWXYZ"
	    "abcdefghijklmnopqrstuvwxyz"
	    "0123456789-.:";
	const size_t host_maxlen = 255;

	if (strings_match(host, "")) {
		*reason = "empty setting";
		return false;
	} else if (strlen(host) > host_maxlen) {
		*reason = "name too long";
		return false;
	} else {
		for (const char *cp = host; *cp; cp++) {
			if (strchr(host_chars, *cp) == NULL) {
				*reason = "invalid chars found!";
				return false;
			}
		}
	}

	*reason = "";
	return true;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x48, %rsp
movq %rsi, %rbx
movq %rdi, %r15
leaq 0x349a(%rip), %rsi      # 0xaf30
pushq $0x42
popq %rcx
movq %rsp, %rdi
rep  movsb (%rsi), %es:(%rdi)
leaq 0x2426(%rip), %r14      # 0x9ecb
movq %r15, %rdi
movq %r14, %rsi
callq 0x748d
testb %al, %al
je 0x7abd
leaq 0x3070(%rip), %r14      # 0xab2b
jmp 0x7ad4
movq %r15, %rdi
callq 0x41c0
cmpq $0xff, %rax
jbe 0x7aea
leaq 0x3065(%rip), %r14      # 0xab39
xorl %ebp, %ebp
movq %r14, (%rbx)
movl %ebp, %eax
addq $0x48, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movq %rsp, %r12
leaq 0x3053(%rip), %r13      # 0xab47
movsbl (%r15), %esi
testl %esi, %esi
sete %bpl
je 0x7ad6
movq %r12, %rdi
callq 0x4180
incq %r15
testq %rax, %rax
jne 0x7af4
movq %r13, %r14
jmp 0x7ad6
// File: /workspace/github_c_makefile_star2_O2/uhlin[P]enhanced-duc/source/settings.c
// Function: create_config_file
void
create_config_file(const char *path)
{
	const mode_t	 mode = (S_IRUSR | S_IWUSR);
	int		 fd;

	log_assert_arg_nonnull("create_config_file", "path", path);

	if (file_exists(path)) {
		fatal(EEXIST, "%s %s: can't create config file  --  "
		    "it's already existent", GfxFailure, __func__);
	} else if ((fd = creat(path, mode)) < 0) {
		fatal(errno, "%s %s: creat", GfxFailure, __func__);
	}

	FOREACH_CDV() {
		char	*ans = NULL;
		int	 ret = -1;

		while ((ans = get_answer(cdv->description, cdv->type,
		    cdv->value)) == NULL)
			/* continue */;
		ret = dprintf(fd, "%s = \"%s\";\n", cdv->setting_name, ans);
		if (ret < 0) {
			fatal(0, "%s %s: failed to write to the file stream",
			    GfxFailure, __func__);
		}
		free(ans);
	}

	if (!(fd < 0) && close(fd) != 0)
		fatal(errno, "%s %s: close", GfxFailure, __func__);
	printf("%s %s successfully written!\n", GfxSuccess, path);
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movq %rdi, %rbx
leaq 0x2d9c(%rip), %rdi      # 0xa8c6
leaq 0x2da8(%rip), %rsi      # 0xa8d9
movq %rbx, %rdx
callq 0x7653
movq %rbx, %rdi
callq 0x8170
testb %al, %al
jne 0x7c0b
movq %rbx, %rdi
movl $0x180, %esi            # imm = 0x180
callq 0x42d0
testl %eax, %eax
js 0x7c25
movl %eax, %ebp
leaq 0x68f9(%rip), %r12      # 0xe460
leaq 0x2db8(%rip), %r14      # 0xa926
xorl %r13d, %r13d
cmpq $0x18f, %r13            # imm = 0x18F
ja 0x7bbc
movq 0x20(%r13,%r12), %rdi
movl 0x8(%r13,%r12), %esi
movq 0x10(%r13,%r12), %rdx
callq 0x749a
testq %rax, %rax
je 0x7b7a
movq %rax, %r15
movq (%r13,%r12), %rdx
movl %ebp, %edi
movq %r14, %rsi
movq %rax, %rcx
xorl %eax, %eax
callq 0x4240
testl %eax, %eax
js 0x7bed
movq %r15, %rdi
callq 0x4530
addq $0x28, %r13
jmp 0x7b71
movl %ebp, %edi
callq 0x47f0
testl %eax, %eax
jne 0x7c35
leaq 0x2d9b(%rip), %rdi      # 0xa969
leaq 0x2faa(%rip), %rsi      # 0xab7f
movq %rbx, %rdx
xorl %eax, %eax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
jmp 0x4060
leaq 0x2d3e(%rip), %rsi      # 0xa932
leaq 0x2f75(%rip), %rdx      # 0xab70
leaq 0x2cc4(%rip), %rcx      # 0xa8c6
xorl %edi, %edi
xorl %eax, %eax
callq 0x5513
leaq 0x2ccc(%rip), %rsi      # 0xa8de
leaq 0x2f57(%rip), %rdx      # 0xab70
leaq 0x2ca6(%rip), %rcx      # 0xa8c6
pushq $0x11
popq %rdi
jmp 0x7c04
callq 0x4050
movl (%rax), %edi
leaq 0x2ce6(%rip), %rsi      # 0xa919
jmp 0x7c43
callq 0x4050
movl (%rax), %edi
leaq 0x2d19(%rip), %rsi      # 0xa95c
leaq 0x2f26(%rip), %rdx      # 0xab70
leaq 0x2c75(%rip), %rcx      # 0xa8c6
jmp 0x7c04
// File: /workspace/github_c_makefile_star2_O2/uhlin[P]enhanced-duc/source/settings.c
// Function: destroy_config_custom_values
void
destroy_config_custom_values(void)
{
	FOREACH_CDV() {
		if (cdv->custom_val) {
			free(cdv->custom_val);
			cdv->custom_val = NULL;
		}
	}
}

// Assembly:
pushq %r14
pushq %rbx
pushq %rax
xorl %ebx, %ebx
leaq 0x6800(%rip), %r14      # 0xe460
cmpq $0x190, %rbx            # imm = 0x190
jae 0x7c84
movq 0x18(%rbx,%r14), %rdi
testq %rdi, %rdi
je 0x7c7e
callq 0x4530
andq $0x0, 0x18(%rbx,%r14)
addq $0x28, %rbx
jmp 0x7c60
addq $0x8, %rsp
popq %rbx
popq %r14
retq
// File: /workspace/github_c_makefile_star2_O2/uhlin[P]enhanced-duc/source/settings.c
// Function: read_config_file
void
read_config_file(const char *path)
{
	FILE *fp = NULL;

	log_assert_arg_nonnull("read_config_file", "path", path);

	if (g_conf_read) {
		return;
	} else if (!is_regularFile(path)) {
		fatal(0, "%s: either the config file is nonexistent"
		    "  --  or it isn't a regular file", __func__);
	} else if ((fp = fopen(path, "r")) == NULL) {
		fatal(errno, "%s: fopen", __func__);
	}

	Interpreter_processAllLines(fp, path, is_recognized_setting,
	    install_setting);

	if (feof(fp))
		fclose(fp);
	else if (ferror(fp))
		fatal(0, "%s: %s", __func__, g_fgets_nullret_err1);
	else
		fatal(0, "%s: %s", __func__, g_fgets_nullret_err2);

	g_conf_read = true;
}

// Assembly:
pushq %r14
pushq %rbx
pushq %rax
movq %rdi, %rbx
leaq 0x2cec(%rip), %rdi      # 0xa986
leaq 0x2c38(%rip), %rsi      # 0xa8d9
movq %rbx, %rdx
callq 0x7653
cmpb $0x0, 0x6b40(%rip)      # 0xe7f0
jne 0x7d09
movq %rbx, %rdi
callq 0x825f
testb %al, %al
je 0x7d11
leaq 0x1db2(%rip), %rsi      # 0x9a77
movq %rbx, %rdi
callq 0x4520
testq %rax, %rax
je 0x7d23
movq %rax, %r14
leaq 0x93(%rip), %rdx        # 0x7d6f
leaq 0xd7(%rip), %rcx        # 0x7dba
movq %rax, %rdi
movq %rbx, %rsi
callq 0x538a
movq %r14, %rdi
callq 0x46d0
movq %r14, %rdi
testl %eax, %eax
je 0x7d3f
callq 0x4410
movb $0x1, 0x6ae7(%rip)      # 0xe7f0
addq $0x8, %rsp
popq %rbx
popq %r14
retq
leaq 0x2c7f(%rip), %rsi      # 0xa997
leaq 0x2c67(%rip), %rdx      # 0xa986
xorl %edi, %edi
jmp 0x7d38
callq 0x4050
movl (%rax), %edi
leaq 0x2cb0(%rip), %rsi      # 0xa9e1
leaq 0x2c4e(%rip), %rdx      # 0xa986
xorl %eax, %eax
callq 0x5513
callq 0x47a0
leaq 0x23d3(%rip), %rsi      # 0xa11e
leaq 0x2c34(%rip), %rdx      # 0xa986
testl %eax, %eax
jne 0x7d5f
leaq 0x1523(%rip), %rcx      # 0x9280
jmp 0x7d66
leaq 0x14ca(%rip), %rcx      # 0x9230
xorl %edi, %edi
xorl %eax, %eax
callq 0x5513
// File: /workspace/github_c_makefile_star2_O2/uhlin[P]enhanced-duc/source/settings.c
// Function: is_recognized_setting
static bool
is_recognized_setting(const char *setting_name)
{
	if (setting_name == NULL)
		return false;
	FOREACH_CDV() {
		if (strings_match(setting_name, cdv->setting_name))
			return true;
	}
	return false;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %rbx
pushq %rax
testq %rdi, %rdi
je 0x7dab
movq %rdi, %rbx
xorl %r14d, %r14d
leaq 0x66d8(%rip), %r15      # 0xe460
cmpq $0x190, %r14            # imm = 0x190
setb %bpl
jae 0x7dad
movq (%r14,%r15), %rsi
movq %rbx, %rdi
callq 0x748d
addq $0x28, %r14
testb %al, %al
je 0x7d88
jmp 0x7dad
xorl %ebp, %ebp
movl %ebp, %eax
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O2/uhlin[P]enhanced-duc/source/settings.c
// Function: install_setting
static int
install_setting(const char *setting_name, const char *value)
{
	if (setting_name == NULL || value == NULL)
		return EINVAL;
	FOREACH_CDV() {
		if (strings_match(setting_name, cdv->setting_name)) {
			if (cdv->custom_val) {
				return EBUSY;
			} else if (!is_setting_ok(value, cdv->type)) {
				return EINVAL;
			} else {
				cdv->custom_val = xstrdup(value);
				return 0;
			}
		}
	}
	return ENOENT;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
testq %rdi, %rdi
sete %al
testq %rsi, %rsi
sete %cl
orb %al, %cl
pushq $0x16
popq %rbx
jne 0x7e17
movq %rsi, %r14
movq %rdi, %r15
xorl %r12d, %r12d
pushq $0x2
popq %rbp
leaq 0x6675(%rip), %r13      # 0xe460
cmpq $0x18f, %r12            # imm = 0x18F
ja 0x7e15
movq (%r12,%r13), %rsi
movq %r15, %rdi
callq 0x748d
addq $0x28, %r12
testb %al, %al
je 0x7deb
cmpq $0x0, -0x10(%r12,%r13)
je 0x7e28
pushq $0x10
popq %rbx
jmp 0x7e17
movl %ebp, %ebx
movl %ebx, %eax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movl -0x20(%r12,%r13), %esi
movq %r14, %rdi
callq 0x7687
testb %al, %al
je 0x7e17
movq %r14, %rdi
callq 0x851e
movq %rax, -0x10(%r12,%r13)
xorl %ebx, %ebx
jmp 0x7e17
nop
// File: /workspace/github_c_makefile_star2_O2/uhlin[P]enhanced-duc/source/sig.c
// Function: block_signals
void
block_signals(void)
{
	sigset_t set;

	(void) sigemptyset(&set);

	for (struct sig_message_tag *ssp = &sig_message[0];
	    ssp < &sig_message[nitems(sig_message)];
	    ssp++) {
		if (ssp->ignore)
			(void) sigaddset(&set, ssp->num);
	}
	if (sigprocmask(SIG_BLOCK, &set, NULL) != 0)
		fatal(errno, "%s: pthread_sigmask", __func__);
}

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
subq $0x80, %rsp
movq %rsp, %rbx
movq %rbx, %rdi
callq 0x4560
xorl %r14d, %r14d
leaq 0x5d23(%rip), %r15      # 0xdb90
cmpq $0x1c0, %r14            # imm = 0x1C0
jae 0x7e90
cmpb $0x1, 0x10(%r14,%r15)
jne 0x7e8a
movl (%r14,%r15), %esi
movq %rbx, %rdi
callq 0x46a0
addq $0x20, %r14
jmp 0x7e6d
movq %rsp, %rsi
xorl %edi, %edi
xorl %edx, %edx
callq 0x41e0
testl %eax, %eax
jne 0x7ead
addq $0x80, %rsp
popq %rbx
popq %r14
popq %r15
retq
callq 0x4050
movl (%rax), %edi
leaq 0x30b7(%rip), %rsi      # 0xaf72
leaq 0x30c4(%rip), %rdx      # 0xaf86
xorl %eax, %eax
callq 0x5513
// File: /workspace/github_c_makefile_star2_O2/uhlin[P]enhanced-duc/source/sig.c
// Function: program_clean_up
void
program_clean_up(void)
{
	net_deinit();
	destroy_config_custom_values();

	if (g_conf_read)
		log_msg("%s %s has exited", g_programName, g_programVersion);
	if (g_lockfile_fd != -1)
		close(g_lockfile_fd);
	if (g_log_to_syslog)
		closelog();
}

// Assembly:
pushq %rax
callq 0x738f
callq 0x7c53
leaq 0x6915(%rip), %rax      # 0xe7f0
cmpb $0x1, (%rax)
jne 0x7efc
leaq 0x30ad(%rip), %rdi      # 0xaf94
leaq 0x1572(%rip), %rsi      # 0x9460
leaq 0x1578(%rip), %rdx      # 0x946d
xorl %eax, %eax
callq 0x5757
leaq 0x651d(%rip), %rax      # 0xe420
movl (%rax), %edi
cmpl $-0x1, %edi
je 0x7f0f
callq 0x47f0
leaq 0x67fb(%rip), %rax      # 0xe711
cmpb $0x1, (%rax)
jne 0x7f21
popq %rax
jmp 0x43f0
popq %rax
retq
// File: /workspace/github_c_makefile_star2_O2/uhlin[P]enhanced-duc/source/sig.c
// Function: sighand_init
int
sighand_init(void)
{
	sigset_t		 set;
	struct sigaction	 act = { 0 };

	(void) sigfillset(&set);
	(void) sigfillset(&act.sa_mask);
	act.sa_flags = 0;

	if (sigprocmask(SIG_SETMASK, &set, NULL) != 0) {
		log_warn(errno, "%s: SIG_SETMASK", __func__);
		return -1;
	}

	for (struct sig_message_tag *ssp = &sig_message[0];
	    ssp < &sig_message[nitems(sig_message)];
	    ssp++) {
		if (ssp->ignore) {
			act.sa_handler = SIG_IGN;
		} else {
			act.sa_handler = handle_signals;
		}
		if (sigaction(ssp->num, &act, NULL) != 0) {
			log_warn(errno, "%s: sigaction failed on signal %d "
			    "(%s)", __func__, ssp->num, ssp->num_str);
			return -1;
		}
	}

	(void) sigemptyset(&set);

	if (sigprocmask(SIG_SETMASK, &set, NULL) != 0) {
		log_warn(errno, "%s: SIG_SETMASK", __func__);
		return -1;
	}

	return 0;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x118, %rsp            # imm = 0x118
movq %rsp, %rdi
movl $0x98, %edx
xorl %esi, %esi
callq 0x4220
leaq 0x98(%rsp), %rbx
movq %rbx, %rdi
callq 0x4140
leaq 0x8(%rsp), %r14
movq %r14, %rdi
callq 0x4140
andl $0x0, 0x80(%r14)
pushq $0x2
popq %rdi
movq %rbx, %rsi
xorl %edx, %edx
callq 0x41e0
testl %eax, %eax
je 0x7fac
callq 0x4050
movl (%rax), %edi
leaq 0x301e(%rip), %rsi      # 0xafa5
leaq 0x3027(%rip), %rdx      # 0xafb5
xorl %eax, %eax
callq 0x57ea
pushq $-0x1
popq %rbx
movl %ebx, %eax
addq $0x118, %rsp            # imm = 0x118
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
xorl %r15d, %r15d
leaq 0x5bda(%rip), %r12      # 0xdb90
leaq 0x8c(%rip), %r13        # 0x8049
pushq $0x1
popq %rbp
movq %rsp, %r14
cmpq $0x1bf, %r15            # imm = 0x1BF
ja 0x801d
cmpb $0x0, 0x10(%r15,%r12)
movq %r13, %rax
cmovneq %rbp, %rax
movq %rax, (%rsp)
movl (%r15,%r12), %ebx
movl %ebx, %edi
movq %r14, %rsi
xorl %edx, %edx
callq 0x4570
addq $0x20, %r15
testl %eax, %eax
je 0x7fc3
callq 0x4050
movl (%rax), %edi
movq -0x18(%r15,%r12), %r8
leaq 0x2fba(%rip), %rsi      # 0xafc2
leaq 0x2fa6(%rip), %rdx      # 0xafb5
movl %ebx, %ecx
xorl %eax, %eax
callq 0x57ea
jmp 0x7f95
leaq 0x98(%rsp), %r14
movq %r14, %rdi
callq 0x4560
xorl %ebx, %ebx
pushq $0x2
popq %rdi
movq %r14, %rsi
xorl %edx, %edx
callq 0x41e0
testl %eax, %eax
jne 0x7f79
jmp 0x7f98
// File: /workspace/github_c_makefile_star2_O2/uhlin[P]enhanced-duc/source/sig.c
// Function: handle_signals
static void
handle_signals(int signum)
{
	program_clean_up();

	for (struct sig_message_tag *ssp = &sig_message[0];
	    ssp < &sig_message[nitems(sig_message)];
	    ssp++) {
		if (ssp->num == signum) {
			log_warn(0, "Received signal %d (%s): %s", ssp->num,
			    ssp->num_str, ssp->msg);
		}
	}

	_exit(1);
}

// Assembly:
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
pushq %rax
movl %edi, %ebx
callq 0x7ec9
leaq 0x5b31(%rip), %r15      # 0xdb90
leaq 0x312b(%rip), %r14      # 0xb191
xorl %r12d, %r12d
cmpq $0x1c0, %r12            # imm = 0x1C0
jae 0x8096
cmpl %ebx, (%r12,%r15)
jne 0x8090
movq 0x8(%r12,%r15), %rcx
movq 0x18(%r12,%r15), %r8
xorl %edi, %edi
movq %r14, %rsi
movl %ebx, %edx
xorl %eax, %eax
callq 0x57ea
addq $0x20, %r12
jmp 0x8069
pushq $0x1
popq %rdi
callq 0x4710
nop
// File: /workspace/github_c_makefile_star2_O2/uhlin[P]enhanced-duc/source/various.c
// Function: is_numeric
bool
is_numeric(const char *string)
{
	if (string == NULL || *string == '\0') {
		return false;
	}
	for (const char *p = &string[0]; *p != '\0'; p++) {
		if (!isdigit(*p))
			return false;
	}
	return true;
}

// Assembly:
pushq %rbp
pushq %r14
pushq %rbx
testq %rdi, %rdi
je 0x8256
movq %rdi, %rbx
movb (%rdi), %r14b
testb %r14b, %r14b
je 0x8256
incq %rbx
testb %r14b, %r14b
sete %bpl
je 0x8258
callq 0x4470
movq (%rax), %rax
movsbq %r14b, %rcx
testb $0x8, 0x1(%rax,%rcx,2)
je 0x8258
movb (%rbx), %r14b
jmp 0x8232
xorl %ebp, %ebp
movl %ebp, %eax
popq %rbx
popq %r14
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O2/uhlin[P]enhanced-duc/source/various.c
// Function: strToLower
char *
strToLower(char *s)
{
	size_t len = 0;

	if (s == NULL) {
		fatal(EINVAL, "strToLower");
	} else if (*s == '\0') {
		return s;
	} else {
		len = strlen(s);
	}
	for (char *p = &s[0]; p < &s[len]; p++) {
		if (isupper(*p))
			*p = tolower(*p);
	}
	return s;
}

// Assembly:
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
pushq %rax
testq %rdi, %rdi
je 0x8321
movq %rdi, %rbx
cmpb $0x0, (%rdi)
je 0x8312
movq %rbx, %rdi
callq 0x41c0
movq %rax, %r14
addq %rbx, %r14
movq %rbx, %r15
cmpq %r14, %r15
jae 0x8312
callq 0x4470
movq (%rax), %rax
movsbq (%r15), %r12
testb $0x1, 0x1(%rax,%r12,2)
je 0x830d
callq 0x40c0
movq (%rax), %rax
movb (%rax,%r12,4), %al
movb %al, (%r15)
incq %r15
jmp 0x82e5
movq %rbx, %rax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
retq
leaq 0x2e9a(%rip), %rsi      # 0xb1c2
pushq $0x16
popq %rdi
xorl %eax, %eax
callq 0x5513
// File: /workspace/github_c_makefile_star2_O2/uhlin[P]enhanced-duc/source/various.c
// Function: trim
char *
trim(char *string)
{
	if (string == NULL) {
		fatal(EINVAL, "trim");
	} else if (*string == '\0') {
		return string;
	} else {
		char *p;

		for (p = &string[strlen(string) - 1]; p >= &string[0]; p--) {
			if (!isspace(*p))
				break;
		}

		*(p + 1) = '\0';
	}
	return string;
}

// Assembly:
pushq %r14
pushq %rbx
pushq %rax
testq %rdi, %rdi
je 0x8380
movq %rdi, %rbx
cmpb $0x0, (%rdi)
je 0x8375
movq %rbx, %rdi
callq 0x41c0
addq %rbx, %rax
decq %rax
movq %rax, %r14
cmpq %rbx, %rax
jb 0x8370
callq 0x4470
movq (%rax), %rcx
movsbq (%r14), %rdx
leaq -0x1(%r14), %rax
testb $0x20, 0x1(%rcx,%rdx,2)
jne 0x8351
movb $0x0, 0x1(%r14)
movq %rbx, %rax
addq $0x8, %rsp
popq %rbx
popq %r14
retq
leaq 0x2e46(%rip), %rsi      # 0xb1cd
pushq $0x16
popq %rdi
xorl %eax, %eax
callq 0x5513
// File: /workspace/github_c_makefile_star2_O2/uhlin[P]enhanced-duc/source/various.c
// Function: size_product
size_t
size_product(const size_t elt_count, const size_t elt_size)
{
	if (elt_count > 0 && SIZE_MAX / elt_count < elt_size) {
		fatal(ERANGE, "size_product: fatal: numerical result "
		    "out of range");
	}
	return (elt_count * elt_size);
}

// Assembly:
testq %rdi, %rdi
je 0x839e
movq %rdi, %rax
mulq %rsi
jo 0x83a6
imulq %rdi, %rsi
movq %rsi, %rax
retq
pushq %rax
leaq 0x2e24(%rip), %rsi      # 0xb1d2
pushq $0x22
popq %rdi
xorl %eax, %eax
callq 0x5513
// File: /workspace/github_c_makefile_star2_O2/uhlin[P]enhanced-duc/source/various.c
// Function: toggle_echo
void
toggle_echo(on_off_t state)
{
	struct termios term_attrs = { 0 };

	errno = 0;

	if (tcgetattr(STDIN_FILENO, &term_attrs) != 0)
		fatal(errno, "%s: tcgetattr", __func__);

	switch (state) {
	case ON:
		if (!(term_attrs.c_lflag & ECHO)) {
			term_attrs.c_lflag |= ECHO;
			if (tcsetattr(STDIN_FILENO, TCSANOW, &term_attrs) != 0)
				fatal(errno, "%s: tcsetattr", __func__);
		}
		break;
	case OFF:
		if (term_attrs.c_lflag & ECHO) {
			term_attrs.c_lflag &= ~ECHO;
			if (tcsetattr(STDIN_FILENO, TCSANOW, &term_attrs) != 0)
				fatal(errno, "%s: tcsetattr", __func__);
		}
		break;
	default:
		fatal(0, "%s: statement reached unexpectedly", __func__);
		break;
	}
}

// Assembly:
pushq %rbp
pushq %r14
pushq %rbx
subq $0x40, %rsp
movl %edi, %ebp
xorps %xmm0, %xmm0
movq %rsp, %r14
movups %xmm0, 0x2c(%r14)
movaps %xmm0, 0x20(%r14)
movaps %xmm0, 0x10(%r14)
movaps %xmm0, (%r14)
callq 0x4050
movq %rax, %rbx
andl $0x0, (%rax)
xorl %edi, %edi
movq %r14, %rsi
callq 0x44d0
testl %eax, %eax
jne 0x8431
cmpl $0x1, %ebp
je 0x840a
testl %ebp, %ebp
jne 0x843c
movl 0xc(%rsp), %eax
testb $0x8, %al
jne 0x8428
orl $0x8, %eax
jmp 0x8415
movl 0xc(%rsp), %eax
testb $0x8, %al
je 0x8428
andl $-0x9, %eax
movq %rsp, %rdx
movl %eax, 0xc(%rdx)
xorl %edi, %edi
xorl %esi, %esi
callq 0x4590
testl %eax, %eax
jne 0x844e
addq $0x40, %rsp
popq %rbx
popq %r14
popq %rbp
retq
movl (%rbx), %edi
leaq 0x2dcb(%rip), %rsi      # 0xb205
jmp 0x8457
leaq 0x2dea(%rip), %rsi      # 0xb22d
leaq 0x2dc9(%rip), %rdx      # 0xb213
xorl %edi, %edi
jmp 0x845e
movl (%rbx), %edi
leaq 0x2dc8(%rip), %rsi      # 0xb21f
leaq 0x2db5(%rip), %rdx      # 0xb213
xorl %eax, %eax
callq 0x5513
nopl (%rax)
// File: /workspace/github_c_makefile_star2_O2/uhlin[P]enhanced-duc/source/wrapper.c
// Function: strdup_printf
char *
strdup_printf(const char *format, ...)
{
	char		*ret;
	int		 chars_printed;
	va_list		 ap;

	va_start(ap, format);
	chars_printed = my_vasprintf(&ret, format, ap);
	va_end(ap);

	if (chars_printed < 0)
		fatal(errno, "strdup_printf");

	return ret;
}

// Assembly:
subq $0xe8, %rsp
movq %rdi, %r10
leaq 0x30(%rsp), %rdi
movq %rsi, 0x8(%rdi)
movq %rdx, 0x10(%rdi)
movq %rcx, 0x18(%rdi)
movq %r8, 0x20(%rdi)
movq %r9, 0x28(%rdi)
testb %al, %al
je 0x84c9
movaps %xmm0, 0x60(%rsp)
movaps %xmm1, 0x70(%rsp)
movaps %xmm2, 0x80(%rsp)
movaps %xmm3, 0x90(%rsp)
movaps %xmm4, 0xa0(%rsp)
movaps %xmm5, 0xb0(%rsp)
movaps %xmm6, 0xc0(%rsp)
movaps %xmm7, 0xd0(%rsp)
leaq 0x10(%rsp), %rdx
movq %rdi, 0x10(%rdx)
leaq 0xf0(%rsp), %rax
movq %rax, 0x8(%rdx)
movabsq $0x3000000008, %rax     # imm = 0x3000000008
movq %rax, (%rdx)
leaq 0x8(%rsp), %rdi
movq %r10, %rsi
callq 0x63b0
testl %eax, %eax
js 0x8509
movq 0x8(%rsp), %rax
addq $0xe8, %rsp
retq
callq 0x4050
movl (%rax), %edi
leaq 0x2d39(%rip), %rsi      # 0xb250
xorl %eax, %eax
callq 0x5513
// File: /workspace/github_c_makefile_star2_O2/uhlin[P]enhanced-duc/source/wrapper.c
// Function: xstrdup
char *
xstrdup(const char *s)
{
	char	*newstr = NULL;
	size_t	 sz = 0;

	if (s == NULL) {
		fatal(EINVAL, "%s: invalid argument", __func__);
	} else {
		sz = strlen(s) + 1;
	}

	if ((newstr = malloc(sz)) == NULL)
		fatal(ENOMEM, "%s: error allocating %zu bytes", __func__, sz);
	if (strlcpy(newstr, s, sz) >= sz)
		fatal(EOVERFLOW, "%s: truncated", __func__);
	return (newstr);
}

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
testq %rdi, %rdi
je 0x8562
movq %rdi, %r14
callq 0x41c0
movq %rax, %rbx
incq %rbx
movq %rbx, %rdi
callq 0x45d0
testq %rax, %rax
je 0x8574
movq %rax, %r15
movq %rax, %rdi
movq %r14, %rsi
movq %rbx, %rdx
callq 0x8104
cmpq %rbx, %rax
jae 0x858f
movq %r15, %rax
popq %rbx
popq %r14
popq %r15
retq
leaq 0x2cf5(%rip), %rsi      # 0xb25e
leaq 0x2d03(%rip), %rdx      # 0xb273
pushq $0x16
jmp 0x859f
leaq 0x2d00(%rip), %rsi      # 0xb27b
leaq 0x2cf1(%rip), %rdx      # 0xb273
pushq $0xc
popq %rdi
movq %rbx, %rcx
xorl %eax, %eax
callq 0x5513
leaq 0x2d04(%rip), %rsi      # 0xb29a
leaq 0x2cd6(%rip), %rdx      # 0xb273
pushq $0x4b
popq %rdi
xorl %eax, %eax
callq 0x5513
// File: /workspace/github_c_makefile_star2_O2/uhlin[P]enhanced-duc/source/wrapper.c
// Function: xcalloc
void *
xcalloc(size_t elt_count, size_t elt_size)
{
	void *vp = NULL;

	if (elt_count == 0) {
		fatal(EINVAL, "xcalloc: invalid argument: "
		    "element count is zero");
	} else if (elt_size == 0) {
		fatal(EINVAL, "xcalloc: invalid argument: "
		    "element size is zero");
	} else if (SIZE_MAX / elt_count < elt_size) {
		fatal(0, "xcalloc: integer overflow");
	} else {
		if ((vp = calloc(elt_count, elt_size)) == NULL) {
			fatal(ENOMEM, "xcalloc: out of memory "
			    "(allocating %zu bytes)", (elt_count * elt_size));
		}
	}

	return (vp);
}

// Assembly:
pushq %r14
pushq %rbx
pushq %rax
testq %rdi, %rdi
je 0x85db
movq %rsi, %rbx
testq %rsi, %rsi
je 0x85e4
movq %rdi, %r14
movq %rdi, %rax
mulq %rbx
jo 0x85f0
movq %r14, %rdi
movq %rbx, %rsi
callq 0x42b0
testq %rax, %rax
je 0x8600
addq $0x8, %rsp
popq %rbx
popq %r14
retq
leaq 0x2cc6(%rip), %rsi      # 0xb2a8
jmp 0x85eb
leaq 0x2cee(%rip), %rsi      # 0xb2d9
pushq $0x16
popq %rdi
jmp 0x85f9
leaq 0x2d12(%rip), %rsi      # 0xb309
xorl %edi, %edi
xorl %eax, %eax
callq 0x5513
imulq %r14, %rbx
leaq 0x2d18(%rip), %rsi      # 0xb323
pushq $0xc
popq %rdi
movq %rbx, %rdx
xorl %eax, %eax
callq 0x5513
// File: /workspace/github_c_makefile_star2_O2/uhlin[P]enhanced-duc/source/wrapper.c
// Function: xmalloc
void *
xmalloc(size_t size)
{
	void *vp = NULL;

	if (size == 0) {
		fatal(EINVAL, "xmalloc: invalid argument -- zero size");
	}

	if ((vp = malloc(size)) == NULL) {
		fatal(ENOMEM, "xmalloc: error allocating %zu bytes", size);
	}

	return (vp);
}

// Assembly:
pushq %rbx
testq %rdi, %rdi
je 0x862d
movq %rdi, %rbx
callq 0x45d0
testq %rax, %rax
je 0x863e
popq %rbx
retq
leaq 0x2d1d(%rip), %rsi      # 0xb351
pushq $0x16
popq %rdi
xorl %eax, %eax
callq 0x5513
leaq 0x2d33(%rip), %rsi      # 0xb378
pushq $0xc
popq %rdi
movq %rbx, %rdx
xorl %eax, %eax
callq 0x5513
// File: /workspace/github_c_makefile_star2_O2/uhlin[P]enhanced-duc/source/wrapper.c
// Function: xrealloc
void *
xrealloc(void *ptr, size_t newSize)
{
	void *newPtr = NULL;

	if (ptr == NULL) {
		fatal(EINVAL, "xrealloc: invalid argument: "
		    "a null pointer was passed");
	} else if (newSize == 0) {
		fatal(EINVAL, "xrealloc: invalid argument: "
		    "zero size  --  use free");
	} else {
		if ((newPtr = realloc(ptr, newSize)) == NULL) {
			fatal(errno, "xrealloc: error changing memory block "
			    "to %zu bytes", newSize);
		}
	}

	return (newPtr);
}

// Assembly:
pushq %rbx
testq %rdi, %rdi
je 0x866f
movq %rsi, %rbx
testq %rsi, %rsi
je 0x8678
movq %rbx, %rsi
callq 0x4730
testq %rax, %rax
je 0x8689
popq %rbx
retq
leaq 0x2d26(%rip), %rsi      # 0xb39c
jmp 0x867f
leaq 0x2d53(%rip), %rsi      # 0xb3d2
pushq $0x16
popq %rdi
xorl %eax, %eax
callq 0x5513
callq 0x4050
movl (%rax), %edi
leaq 0x2d6f(%rip), %rsi      # 0xb406
movq %rbx, %rdx
xorl %eax, %eax
callq 0x5513
nopw %cs:(%rax,%rax)
nopl (%rax,%rax)
// File: /workspace/github_c_makefile_star2_O2/yutopp[P]cc/lexer.c
// Function: lexer_new
Lexer* lexer_new(const char *buffer, const char* filepath) {
    Lexer* lex = (Lexer*)malloc(sizeof(Lexer));
    lex->buffer = buffer;
    lex->current_pos = 0;
    lex->begin_pos = -1;
    lex->filepath = filepath;

    return lex;
}

// Assembly:
pushq %r14
pushq %rbx
pushq %rax
movq %rsi, %rbx
movq %rdi, %r14
pushq $0x20
popq %rdi
callq 0x1160
movq %r14, (%rax)
andq $0x0, 0x8(%rax)
orq $-0x1, 0x10(%rax)
movq %rbx, 0x18(%rax)
addq $0x8, %rsp
popq %rbx
popq %r14
retq
// File: /workspace/github_c_makefile_star2_O2/yutopp[P]cc/token.c
// Function: token_to_string
char* token_to_string(Token *tok) {
    size_t range_size = tok->pos_end - tok->pos_begin;
    char* range = malloc(sizeof(char) * (range_size + 1));
    memcpy(range, tok->buf_ref + tok->pos_begin, range_size);
    range[range_size] = '\0';

    return range;
}

// Assembly:
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
pushq %rax
movq %rdi, %rbx
movq 0x10(%rdi), %r14
movq 0x18(%rdi), %r15
subq %r14, %r15
leaq 0x1(%r15), %rdi
callq 0x1160
movq %rax, %r12
addq 0x8(%rbx), %r14
movq %rax, %rdi
movq %r14, %rsi
movq %r15, %rdx
callq 0x1150
movb $0x0, (%r12,%r15)
movq %r12, %rax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
retq
// File: /workspace/github_c_makefile_star2_O2/yutopp[P]cc/token.c
// Function: token_fprint
void token_fprint(FILE *fp, Token *tok) {
    switch(tok->kind) {
    case TOK_KIND_SHARP:
        fprintf(fp, "#");
        break;
    case TOK_KIND_LT:
        fprintf(fp, "<");
        break;
    case TOK_KIND_GT:
        fprintf(fp, ">");
        break;
    case TOK_KIND_DOT:
        fprintf(fp, ".");
        break;
    case TOK_KIND_ID:
        fprintf(fp, "ID");
        break;
    case TOK_KIND_EOF:
        fprintf(fp, "EOF");
        break;
    default:
        fprintf(fp, "Kind(%d)", tok->kind);
        break;
    }

    fprintf(fp, " ");
    token_fprint_buf(fp, tok);
    fprintf(fp, " (%ld, %ld)", tok->pos_begin, tok->pos_end);
}

// Assembly:
pushq %r14
pushq %rbx
pushq %rax
movq %rsi, %r14
movq %rdi, %rbx
movl (%rsi), %edx
cmpl $0x1f, %edx
je 0x1899
cmpl $0x2, %edx
je 0x188c
cmpl $0x3, %edx
je 0x1866
cmpl $0xc, %edx
je 0x1875
cmpl $0x18, %edx
je 0x186a
cmpl $0x1, %edx
jne 0x1879
pushq $0x23
jmp 0x188e
pushq $0x3e
jmp 0x188e
leaq 0x4a25(%rip), %rdi      # 0x6296
pushq $0x2
jmp 0x18a2
pushq $0x2e
jmp 0x188e
leaq 0x4a19(%rip), %rsi      # 0x6299
movq %rbx, %rdi
xorl %eax, %eax
callq 0x1120
jmp 0x18ae
pushq $0x3c
popq %rdi
movq %rbx, %rsi
callq 0x10f0
jmp 0x18ae
leaq 0x4a2b(%rip), %rdi      # 0x62cb
pushq $0x3
popq %rsi
pushq $0x1
popq %rdx
movq %rbx, %rcx
callq 0x11c0
pushq $0x20
popq %rdi
movq %rbx, %rsi
callq 0x10f0
movq %rbx, %rdi
movq %r14, %rsi
callq 0x18e4
movq 0x10(%r14), %rdx
movq 0x18(%r14), %rcx
leaq 0x49cf(%rip), %rsi      # 0x62a2
movq %rbx, %rdi
xorl %eax, %eax
addq $0x8, %rsp
popq %rbx
popq %r14
jmp 0x1120
// File: /workspace/github_c_makefile_star2_O2/yutopp[P]cc/parser.c
// Function: parser_new
Parser* parser_new(Vector* tokens, NodeArena* arena) {
    Parser* p = (Parser*)malloc(sizeof(Parser));
    if (!p) {
        return 0;
    }
    p->tokens = tokens;
    p->arena = arena;
    p->position = 0;
    p->position_stack = vector_new(sizeof(size_t));

    return p;
}

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
movq %rsi, %r14
movq %rdi, %r15
pushq $0x20
popq %rdi
callq 0x1160
movq %rax, %rbx
testq %rax, %rax
je 0x1943
movq %r15, (%rbx)
movq %r14, 0x8(%rbx)
andq $0x0, 0x10(%rbx)
pushq $0x8
popq %rdi
callq 0x2898
movq %rax, 0x18(%rbx)
movq %rbx, %rax
popq %rbx
popq %r14
popq %r15
retq
// File: /workspace/github_c_makefile_star2_O2/yutopp[P]cc/parser.c
// Function: parser_parse
ParserResult parser_parse(Parser *parser) {
    ParserResult res;
    state_t _parser_state = save_state(parser);

    res = parse_transition_unit(parser); ErrProp;

    return res;
}

// Assembly:
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
subq $0x28, %rsp
movq %rsi, %r14
movq %rdi, %rbx
movq 0x10(%rsi), %r12
leaq 0xe4(%rip), %rdx        # 0x1a68
leaq 0x8(%rsp), %r15
movq %r15, %rdi
callq 0x1a5a
cmpl $0x1, (%r15)
jne 0x199d
movq %r12, 0x10(%r14)
jmp 0x19b7
movq 0x20(%rsp), %r15
movq 0x8(%r14), %rdi
callq 0x2f4c
andl $0x0, (%rax)
movq %r15, 0x8(%rax)
movq %rax, 0x20(%rsp)
movups 0x8(%rsp), %xmm0
movq 0x18(%rsp), %rax
movq %rax, 0x10(%rbx)
movq 0x20(%rsp), %rax
movq %rax, 0x18(%rbx)
movups %xmm0, (%rbx)
cmpl $0x1, (%rbx)
jne 0x19da
movq %r12, 0x10(%r14)
movq %rbx, %rax
addq $0x28, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
retq
// File: /workspace/github_c_makefile_star2_O2/yutopp[P]cc/parser.c
// Function: parser_fprint_error
void parser_fprint_error(FILE *fp, ParseError *err) {
    switch (err->kind) {
    case PARSER_ERROR_KIND_EOF:
        fprintf(fp, "Unexpected EOF");
        break;

    case PARSER_ERROR_KIND_UNEXPECTED:
        fprintf(fp, "Unexpected token: ");
        token_fprint(fp, err->value.unexpected.token);
        break;

    case PARSER_ERROR_KIND_MORE1:
        fprintf(fp, "Eexpected more than 0 tokens");
        break;
    }
}

// Assembly:
pushq %r14
pushq %rbx
pushq %rax
movq %rdi, %rbx
movl (%rsi), %eax
cmpl $0x2, %eax
je 0x1a36
cmpl $0x1, %eax
je 0x1a0b
testl %eax, %eax
jne 0x1a52
leaq 0x48b9(%rip), %rdi      # 0x62c0
pushq $0xe
jmp 0x1a3f
movq %rsi, %r14
leaq 0x48ba(%rip), %rdi      # 0x62cf
pushq $0x12
popq %rsi
pushq $0x1
popq %rdx
movq %rbx, %rcx
callq 0x11c0
movq 0x8(%r14), %rsi
movq %rbx, %rdi
addq $0x8, %rsp
popq %rbx
popq %r14
jmp 0x1838
leaq 0x48a5(%rip), %rdi      # 0x62e2
pushq $0x1c
popq %rsi
pushq $0x1
popq %rdx
movq %rbx, %rcx
addq $0x8, %rsp
popq %rbx
popq %r14
jmp 0x11c0
addq $0x8, %rsp
popq %rbx
popq %r14
retq
// File: /workspace/github_c_makefile_star2_O2/yutopp[P]cc/parser.c
// Function: combinator_more1_sep
ParserResult combinator_more1_sep(Parser *parser, TokenKind sep, ParserResult (*f)(Parser *parser)) {
    ParserResult res;
    state_t _parser_state = save_state(parser);

    Vector* elems = vector_new(sizeof(Node*));

    for(;;) {
        res = f(parser);
        if (res.result == PARSER_ERROR) {
            break;
        }

        Node** np = (Node**)vector_append(elems);
        *np = res.value.node;
    }

    if (vector_len(elems) == 0) {
        vector_drop(elems);

        res.result = PARSER_ERROR;
        res.error.kind = PARSER_ERROR_KIND_MORE1;

        rewind_state(parser, _parser_state);
        return res;
    }

    res.result = PARSER_OK;
    res.value.nodes = elems;

    return res;
}

// Assembly:
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
movq %rdx, %r12
movq %rsi, %r14
movq %rdi, %rbx
movq 0x10(%rsi), %r13
pushq $0x8
popq %rdi
callq 0x2898
movq %rax, %r15
movq %rbx, %rdi
movq %r14, %rsi
callq *%r12
cmpl $0x1, (%rbx)
je 0x1b26
movq %r15, %rdi
callq 0x2982
movq 0x18(%rbx), %rcx
movq %rcx, (%rax)
jmp 0x1b07
movq %r15, %rdi
callq 0x29db
testq %rax, %rax
je 0x1b3b
movq %r15, 0x18(%rbx)
xorl %eax, %eax
jmp 0x1b51
movq %r15, %rdi
callq 0x2966
movl $0x2, 0x8(%rbx)
movq %r13, 0x10(%r14)
pushq $0x1
popq %rax
movl %eax, (%rbx)
movq %rbx, %rax
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
retq