LLM4Binary/decompile-bench-makefile huggingface dataset:
// File: /workspace/github_c_makefile_star2_O3/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:
pushq %rbx
subq $0x40, %rsp
movq $0x0, 0x20(%rsp)
testq %rdi, %rdi
sete %al
testq %rsi, %rsi
sete %cl
orb %al, %cl
je 0x71f0
xorl %ebx, %ebx
jmp 0x721f
movaps 0x3109(%rip), %xmm0     # 0xa300
leaq 0x10(%rsp), %rdx
movaps %xmm0, (%rdx)
xorps %xmm0, %xmm0
movups %xmm0, 0x18(%rdx)
xorl %ebx, %ebx
movq %rbx, 0x28(%rdx)
leaq 0x8(%rsp), %rcx
callq 0x4590
testl %eax, %eax
jne 0x721f
movq 0x8(%rsp), %rbx
movq %rbx, %rax
addq $0x40, %rsp
popq %rbx
retq
// File: /workspace/github_c_makefile_star2_O3/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
leaq 0x30e0(%rip), %rdi      # 0xa310
callq 0x7889
leaq 0x3408(%rip), %rsi      # 0xa644
movq %rax, %rdi
callq 0x4640
testl %eax, %eax
jne 0x724d
callq 0x69fc
movl 0x71fd(%rip), %edi      # 0xe450
cmpl $-0x1, %edi
je 0x7267
callq 0x4800
movl $0xffffffff, 0x71e9(%rip) # imm = 0xFFFFFFFF
popq %rax
retq
// File: /workspace/github_c_makefile_star2_O3/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
leaq 0x2e4b(%rip), %rdi      # 0xa310
callq 0x7889
leaq 0x3173(%rip), %rsi      # 0xa644
movq %rax, %rdi
callq 0x4640
testl %eax, %eax
jne 0x74e2
callq 0x6d84
movl 0x6f68(%rip), %edi      # 0xe450
cmpl $-0x1, %edi
je 0x74fc
callq 0x4800
movl $0xffffffff, 0x6f54(%rip) # imm = 0xFFFFFFFF
popq %rax
retq
nop
// File: /workspace/github_c_makefile_star2_O3/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 0x756d
movq %rdi, %r14
movq $-0x28, %r12
leaq 0x6f3d(%rip), %r13      # 0xe460
movq 0x28(%r12,%r13), %rsi
movq %r14, %rdi
callq 0x4640
testl %eax, %eax
je 0x7543
addq $0x28, %r12
cmpq $0x167, %r12            # imm = 0x167
jbe 0x7523
jmp 0x756d
movq 0x40(%r12,%r13), %r15
testq %r15, %r15
jne 0x7552
movq 0x38(%r12,%r13), %r15
cmpl $0x0, 0x30(%r12,%r13)
je 0x7580
leaq 0x30ec(%rip), %rsi      # 0xa64d
xorl %edi, %edi
movq %r14, %rdx
xorl %eax, %eax
callq 0x588f
movl %ebx, %ebp
movl %ebp, %eax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
leaq 0x30ef(%rip), %rsi      # 0xa676
movq %r15, %rdi
callq 0x4640
movb $0x1, %bpl
testl %eax, %eax
je 0x756f
leaq 0x30dd(%rip), %rsi      # 0xa67a
movq %r15, %rdi
callq 0x4640
testl %eax, %eax
je 0x756f
movzbl (%r15), %eax
leaq 0x30ca(%rip), %rsi      # 0xa67e
cmpl $0x4e, %eax
je 0x75c7
cmpl $0x6e, %eax
jne 0x7561
cmpb $0x6f, 0x1(%r15)
jne 0x7561
jmp 0x75ce
cmpb $0x4f, 0x1(%r15)
jne 0x7561
cmpb $0x0, 0x2(%r15)
jne 0x7561
xorl %ebp, %ebp
jmp 0x756f
// File: /workspace/github_c_makefile_star2_O3/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 0x7813
movq %rdi, %r14
cmpl $0x2, %esi
je 0x782e
cmpl $0x1, %esi
je 0x7817
testl %esi, %esi
jne 0x7879
leaq 0x2ea2(%rip), %rsi      # 0xa676
movq %r14, %rdi
callq 0x4640
movb $0x1, %bl
testl %eax, %eax
je 0x785f
leaq 0x2e91(%rip), %rsi      # 0xa67a
movq %r14, %rdi
callq 0x4640
testl %eax, %eax
je 0x785f
movzbl (%r14), %eax
leaq 0x321b(%rip), %rsi      # 0xaa1b
cmpl $0x4e, %eax
je 0x7869
cmpl $0x6e, %eax
jne 0x7849
cmpb $0x6f, 0x1(%r14)
jne 0x7849
jmp 0x7870
xorl %ebx, %ebx
jmp 0x785f
movq %r14, %rdi
callq 0x8392
movb $0x1, %bl
testb %al, %al
jne 0x785f
leaq 0x322d(%rip), %rsi      # 0xaa59
jmp 0x7849
leaq 0x324e(%rip), %rsi      # 0xaa83
movq %r14, %rdi
callq 0x4780
testq %rax, %rax
je 0x785d
leaq 0x3242(%rip), %rsi      # 0xaa8b
leaq 0x32d0(%rip), %rdx      # 0xab20
xorl %ebx, %ebx
xorl %edi, %edi
xorl %eax, %eax
callq 0x588f
jmp 0x785f
movb $0x1, %bl
movl %ebx, %eax
addq $0x8, %rsp
popq %rbx
popq %r14
retq
cmpb $0x4f, 0x1(%r14)
jne 0x7849
cmpb $0x0, 0x2(%r14)
jne 0x7849
jmp 0x785f
leaq 0x323a(%rip), %rsi      # 0xaaba
xorl %edi, %edi
xorl %eax, %eax
callq 0x55ac
// File: /workspace/github_c_makefile_star2_O3/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 0x2613(%rip), %rbx      # 0x9eab
testq %rdi, %rdi
je 0x78dd
movq %rdi, %r14
movq $-0x28, %r15
leaq 0x6bb2(%rip), %r12      # 0xe460
movq 0x28(%r15,%r12), %rsi
movq %r14, %rdi
callq 0x4640
testl %eax, %eax
je 0x78ce
addq $0x28, %r15
cmpq $0x167, %r15            # imm = 0x167
jbe 0x78ae
jmp 0x78dd
movq 0x40(%r15,%r12), %rbx
testq %rbx, %rbx
jne 0x78dd
movq 0x38(%r15,%r12), %rbx
movq %rbx, %rax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
retq
// File: /workspace/github_c_makefile_star2_O3/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
testq %rdi, %rdi
je 0x79a0
movq %rdi, %rbx
movq (%rdi), %r14
movq $-0x28, %r15
leaq 0x6b4f(%rip), %r12      # 0xe460
movq 0x28(%r15,%r12), %rsi
movq %r14, %rdi
callq 0x4640
testl %eax, %eax
je 0x7931
addq $0x28, %r15
cmpq $0x167, %r15            # imm = 0x167
jbe 0x7911
jmp 0x7990
movq 0x40(%r15,%r12), %r14
testq %r14, %r14
jne 0x7940
movq 0x38(%r15,%r12), %r14
callq 0x4050
movq %rax, %r15
movl $0x0, (%rax)
movq %r14, %rdi
xorl %esi, %esi
movl $0xa, %edx
callq 0x4650
cmpl $0x0, (%r15)
movq 0x8(%rbx), %rcx
jne 0x7972
cmpq %rcx, %rax
jl 0x7972
cmpq 0x10(%rbx), %rax
jle 0x7994
movq (%rbx), %rdx
movq 0x10(%rbx), %r8
movq 0x18(%rbx), %r9
leaq 0x2db3(%rip), %rsi      # 0xa737
movl $0x22, %edi
xorl %eax, %eax
callq 0x588f
movq 0x18(%rbx), %rax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
retq
leaq 0x2834(%rip), %rsi      # 0xa1db
leaq 0x2d75(%rip), %rdx      # 0xa723
leaq 0x2d7e(%rip), %rcx      # 0xa733
movl $0x16, %edi
xorl %eax, %eax
callq 0x55ac
// File: /workspace/github_c_makefile_star2_O3/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, %r14
leaq 0x332f(%rip), %rsi      # 0xaee0
movq %rsp, %rax
movl $0x8, %ecx
movq %rax, %rdi
rep  movsq (%rsi), %es:(%rdi)
movw $0x3a, 0x40(%rax)
movb (%r14), %bpl
testb %bpl, %bpl
je 0x7be6
movq %r14, %rdi
callq 0x41c0
cmpq $0xff, %rax
jbe 0x7c01
leaq 0x2f12(%rip), %r12      # 0xaaf6
jmp 0x7bed
leaq 0x2efb(%rip), %r12      # 0xaae8
xorl %eax, %eax
movq %r12, (%rbx)
addq $0x48, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
incq %r14
movq %rsp, %r15
leaq 0x2ef6(%rip), %r12      # 0xab04
leaq 0x2296(%rip), %r13      # 0x9eab
movsbl %bpl, %esi
movq %r15, %rdi
callq 0x4180
testq %rax, %rax
setne %al
je 0x7bef
movb (%r14), %bpl
incq %r14
testb %bpl, %bpl
jne 0x7c15
movq %r13, %r12
jmp 0x7bef
// File: /workspace/github_c_makefile_star2_O3/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
testq %rdi, %rdi
je 0x7d24
movq %rdi, %rbx
callq 0x82e4
testb %al, %al
jne 0x7d40
movq %rbx, %rdi
movl $0x180, %esi            # imm = 0x180
callq 0x42d0
testl %eax, %eax
js 0x7d5c
movl %eax, %ebp
leaq 0x67e5(%rip), %r12      # 0xe460
leaq 0x2c61(%rip), %r14      # 0xa8e3
xorl %r13d, %r13d
movq 0x20(%r13,%r12), %rdi
movl 0x8(%r13,%r12), %esi
movq 0x10(%r13,%r12), %rdx
callq 0x75d9
testq %rax, %rax
je 0x7c85
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 0x7d06
movq %r15, %rdi
callq 0x4540
leaq 0x28(%r13), %rax
cmpq $0x168, %r13            # imm = 0x168
movq %rax, %r13
jb 0x7c85
movl %ebp, %edi
callq 0x4800
testl %eax, %eax
jne 0x7d6c
leaq 0x2c3f(%rip), %rdi      # 0xa926
leaq 0x2e41(%rip), %rsi      # 0xab2f
movq %rbx, %rdx
xorl %eax, %eax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
jmp 0x4060
leaq 0x2be2(%rip), %rsi      # 0xa8ef
leaq 0x2e0c(%rip), %rdx      # 0xab20
leaq 0x2b68(%rip), %rcx      # 0xa883
xorl %edi, %edi
xorl %eax, %eax
callq 0x55ac
leaq 0x24b0(%rip), %rsi      # 0xa1db
leaq 0x2b51(%rip), %rdx      # 0xa883
leaq 0x2b5d(%rip), %rcx      # 0xa896
movl $0x16, %edi
jmp 0x7d1d
leaq 0x2b54(%rip), %rsi      # 0xa89b
leaq 0x2dd2(%rip), %rdx      # 0xab20
leaq 0x2b2e(%rip), %rcx      # 0xa883
movl $0x11, %edi
jmp 0x7d1d
callq 0x4050
movl (%rax), %edi
leaq 0x2b6c(%rip), %rsi      # 0xa8d6
jmp 0x7d7a
callq 0x4050
movl (%rax), %edi
leaq 0x2b9f(%rip), %rsi      # 0xa919
leaq 0x2d9f(%rip), %rdx      # 0xab20
leaq 0x2afb(%rip), %rcx      # 0xa883
jmp 0x7d1d
// File: /workspace/github_c_makefile_star2_O3/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
movq $-0x28, %rbx
leaq 0x66c4(%rip), %r14      # 0xe460
movq 0x40(%rbx,%r14), %rdi
testq %rdi, %rdi
je 0x7db4
callq 0x4540
movq $0x0, 0x40(%rbx,%r14)
addq $0x28, %rbx
cmpq $0x168, %rbx            # imm = 0x168
jb 0x7d9c
addq $0x8, %rsp
popq %rbx
popq %r14
retq
// File: /workspace/github_c_makefile_star2_O3/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
testq %rdi, %rdi
je 0x7e3a
cmpb $0x0, 0x6a17(%rip)      # 0xe7f0
jne 0x7e32
movq %rdi, %rbx
callq 0x83e0
testb %al, %al
je 0x7e56
leaq 0x1c69(%rip), %rsi      # 0x9a57
movq %rbx, %rdi
callq 0x4530
testq %rax, %rax
je 0x7e68
movq %rax, %r14
leaq 0xaf(%rip), %rdx        # 0x7eb4
leaq 0xec(%rip), %rcx        # 0x7ef8
movq %rax, %rdi
movq %rbx, %rsi
callq 0x540a
movq %r14, %rdi
callq 0x46e0
movq %r14, %rdi
testl %eax, %eax
je 0x7e84
callq 0x4410
movb $0x1, 0x69be(%rip)      # 0xe7f0
addq $0x8, %rsp
popq %rbx
popq %r14
retq
leaq 0x239a(%rip), %rsi      # 0xa1db
leaq 0x2afb(%rip), %rdx      # 0xa943
leaq 0x2a47(%rip), %rcx      # 0xa896
movl $0x16, %edi
jmp 0x7ead
leaq 0x2af7(%rip), %rsi      # 0xa954
leaq 0x2adf(%rip), %rdx      # 0xa943
xorl %edi, %edi
jmp 0x7e7d
callq 0x4050
movl (%rax), %edi
leaq 0x2b28(%rip), %rsi      # 0xa99e
leaq 0x2ac6(%rip), %rdx      # 0xa943
xorl %eax, %eax
callq 0x55ac
callq 0x47b0
leaq 0x226e(%rip), %rsi      # 0xa0fe
leaq 0x2aac(%rip), %rdx      # 0xa943
testl %eax, %eax
jne 0x7ea4
leaq 0x13be(%rip), %rcx      # 0x9260
jmp 0x7eab
leaq 0x1365(%rip), %rcx      # 0x9210
xorl %edi, %edi
xorl %eax, %eax
callq 0x55ac
// File: /workspace/github_c_makefile_star2_O3/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:
testq %rdi, %rdi
sete %al
testq %rsi, %rsi
sete %cl
orb %al, %cl
movl $0x16, %eax
jne 0x7f91
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
pushq %rax
movq %rsi, %rbx
movq %rdi, %r14
movq $-0x28, %r15
leaq 0x6533(%rip), %r12      # 0xe460
movq 0x28(%r15,%r12), %rsi
movq %r14, %rdi
callq 0x4640
testl %eax, %eax
je 0x7f52
addq $0x28, %r15
cmpq $0x167, %r15            # imm = 0x167
jbe 0x7f2d
movl $0x2, %eax
jmp 0x7f86
movl $0x10, %eax
cmpq $0x0, 0x40(%r15,%r12)
jne 0x7f86
movl 0x30(%r15,%r12), %esi
movq %rbx, %rdi
callq 0x77af
movl %eax, %ecx
movl $0x16, %eax
testb %cl, %cl
je 0x7f86
movq %rbx, %rdi
callq 0x86ae
movq %rax, 0x40(%r15,%r12)
xorl %eax, %eax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
retq
nop
// File: /workspace/github_c_makefile_star2_O3/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 0x4570
movq $-0x20, %r14
leaq 0x5bd7(%rip), %r15      # 0xdb90
cmpb $0x1, 0x30(%r14,%r15)
jne 0x7fce
movl 0x20(%r14,%r15), %esi
movq %rbx, %rdi
callq 0x46b0
addq $0x20, %r14
cmpq $0x1a0, %r14            # imm = 0x1A0
jb 0x7fb9
movq %rsp, %rsi
xorl %edi, %edi
xorl %edx, %edx
callq 0x41e0
testl %eax, %eax
jne 0x7ff8
addq $0x80, %rsp
popq %rbx
popq %r14
popq %r15
retq
callq 0x4050
movl (%rax), %edi
leaq 0x2f1c(%rip), %rsi      # 0xaf22
leaq 0x2f29(%rip), %rdx      # 0xaf36
xorl %eax, %eax
callq 0x55ac
// File: /workspace/github_c_makefile_star2_O3/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 0x74bd
callq 0x7d8a
leaq 0x67ca(%rip), %rax      # 0xe7f0
cmpb $0x1, (%rax)
jne 0x8047
leaq 0x2f12(%rip), %rdi      # 0xaf44
leaq 0x1407(%rip), %rsi      # 0x9440
leaq 0x140d(%rip), %rdx      # 0x944d
xorl %eax, %eax
callq 0x57fa
leaq 0x63d2(%rip), %rax      # 0xe420
movl (%rax), %edi
cmpl $-0x1, %edi
je 0x805a
callq 0x4800
leaq 0x66b0(%rip), %rax      # 0xe711
cmpb $0x1, (%rax)
jne 0x806c
popq %rax
jmp 0x43f0
popq %rax
retq
// File: /workspace/github_c_makefile_star2_O3/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
movl $0x0, 0x80(%r14)
movl $0x2, %edi
movq %rbx, %rsi
xorl %edx, %edx
callq 0x41e0
testl %eax, %eax
je 0x80ea
callq 0x4050
movl (%rax), %edi
leaq 0x2e7e(%rip), %rsi      # 0xaf55
leaq 0x2e87(%rip), %rdx      # 0xaf65
xorl %eax, %eax
callq 0x588f
jmp 0x8189
movq $-0x20, %r14
leaq 0x5a98(%rip), %r15      # 0xdb90
leaq 0xa3(%rip), %r12        # 0x81a2
movl $0x1, %r13d
movq %rsp, %rbx
cmpb $0x0, 0x30(%r14,%r15)
movq %r12, %rax
cmovneq %r13, %rax
movq %rax, (%rsp)
movl 0x20(%r14,%r15), %ebp
movl %ebp, %edi
movq %rbx, %rsi
xorl %edx, %edx
callq 0x4580
testl %eax, %eax
jne 0x8166
addq $0x20, %r14
cmpq $0x19f, %r14            # imm = 0x19F
jbe 0x8108
leaq 0x98(%rsp), %r14
movq %r14, %rdi
callq 0x4570
xorl %ebx, %ebx
movl $0x2, %edi
movq %r14, %rsi
xorl %edx, %edx
callq 0x41e0
testl %eax, %eax
jne 0x80c9
jmp 0x818e
callq 0x4050
movl (%rax), %edi
movq 0x28(%r14,%r15), %r8
leaq 0x2df9(%rip), %rsi      # 0xaf72
leaq 0x2de5(%rip), %rdx      # 0xaf65
movl %ebp, %ecx
xorl %eax, %eax
callq 0x588f
movl $0xffffffff, %ebx       # imm = 0xFFFFFFFF
movl %ebx, %eax
addq $0x118, %rsp            # imm = 0x118
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O3/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 0x8014
movq $-0x20, %r15
leaq 0x59d1(%rip), %r12      # 0xdb90
leaq 0x2f7b(%rip), %r14      # 0xb141
cmpl %ebx, 0x20(%r15,%r12)
jne 0x81e5
movq 0x28(%r15,%r12), %rcx
movq 0x38(%r15,%r12), %r8
xorl %edi, %edi
movq %r14, %rsi
movl %ebx, %edx
xorl %eax, %eax
callq 0x588f
addq $0x20, %r15
cmpq $0x1a0, %r15            # imm = 0x1A0
jb 0x81c6
movl $0x1, %edi
callq 0x4720
// File: /workspace/github_c_makefile_star2_O3/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:
testq %rdi, %rdi
je 0x83d4
pushq %rbp
pushq %rbx
pushq %rax
movq %rdi, %rbx
movb (%rdi), %bpl
testb %bpl, %bpl
je 0x83d7
callq 0x4470
movq (%rax), %rcx
incq %rbx
movsbq %bpl, %rax
movzwl (%rcx,%rax,2), %edx
andl $0x800, %edx            # imm = 0x800
movl %edx, %eax
shrl $0xb, %eax
testl %edx, %edx
je 0x83d9
movb (%rbx), %bpl
incq %rbx
testb %bpl, %bpl
jne 0x83b0
jmp 0x83d9
xorl %eax, %eax
retq
xorl %eax, %eax
addq $0x8, %rsp
popq %rbx
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O3/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 %r13
pushq %r12
pushq %rbx
testq %rdi, %rdi
je 0x84a9
movq %rdi, %rbx
cmpb $0x0, (%rdi)
je 0x849c
movq %rbx, %rdi
callq 0x41c0
testq %rax, %rax
jle 0x849c
movq %rax, %r14
addq %rbx, %r14
callq 0x4470
movq %rax, %r15
movq %rbx, %r12
movq (%r15), %rax
movsbq (%r12), %r13
testb $0x1, 0x1(%rax,%r13,2)
je 0x8494
callq 0x40c0
movq (%rax), %rax
movb (%rax,%r13,4), %al
movb %al, (%r12)
incq %r12
cmpq %r14, %r12
jb 0x8474
movq %rbx, %rax
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
retq
leaq 0x2cc2(%rip), %rsi      # 0xb172
movl $0x16, %edi
xorl %eax, %eax
callq 0x55ac
// File: /workspace/github_c_makefile_star2_O3/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 0x850a
movq %rdi, %rbx
cmpb $0x0, (%rdi)
je 0x84ff
movq %rbx, %rdi
callq 0x41c0
addq %rbx, %rax
decq %rax
movq %rax, %r14
cmpq %rbx, %rax
jb 0x84fa
callq 0x4470
movq (%rax), %rcx
movsbq (%r14), %rdx
leaq -0x1(%r14), %rax
testb $0x20, 0x1(%rcx,%rdx,2)
jne 0x84db
movb $0x0, 0x1(%r14)
movq %rbx, %rax
addq $0x8, %rsp
popq %rbx
popq %r14
retq
leaq 0x2c6c(%rip), %rsi      # 0xb17d
movl $0x16, %edi
xorl %eax, %eax
callq 0x55ac
// File: /workspace/github_c_makefile_star2_O3/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
movl $0x0, (%rax)
xorl %edi, %edi
movq %r14, %rsi
callq 0x44d0
testl %eax, %eax
jne 0x85c2
cmpl $0x1, %ebp
je 0x859b
testl %ebp, %ebp
jne 0x85cd
movl 0xc(%rsp), %eax
testb $0x8, %al
jne 0x85b9
orl $0x8, %eax
jmp 0x85a6
movl 0xc(%rsp), %eax
testb $0x8, %al
je 0x85b9
andl $-0x9, %eax
movq %rsp, %rdx
movl %eax, 0xc(%rdx)
xorl %edi, %edi
xorl %esi, %esi
callq 0x45a0
testl %eax, %eax
jne 0x85df
addq $0x40, %rsp
popq %rbx
popq %r14
popq %rbp
retq
movl (%rbx), %edi
leaq 0x2bea(%rip), %rsi      # 0xb1b5
jmp 0x85e8
leaq 0x2c09(%rip), %rsi      # 0xb1dd
leaq 0x2be8(%rip), %rdx      # 0xb1c3
xorl %edi, %edi
jmp 0x85ef
movl (%rbx), %edi
leaq 0x2be7(%rip), %rsi      # 0xb1cf
leaq 0x2bd4(%rip), %rdx      # 0xb1c3
xorl %eax, %eax
callq 0x55ac
nop
// File: /workspace/github_c_makefile_star2_O3/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 0x8659
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 0x641c
testl %eax, %eax
js 0x8699
movq 0x8(%rsp), %rax
addq $0xe8, %rsp
retq
callq 0x4050
movl (%rax), %edi
leaq 0x2b59(%rip), %rsi      # 0xb200
xorl %eax, %eax
callq 0x55ac
// File: /workspace/github_c_makefile_star2_O3/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 0x86f2
movq %rdi, %r14
callq 0x41c0
movq %rax, %rbx
incq %rbx
movq %rbx, %rdi
callq 0x45e0
testq %rax, %rax
je 0x8707
movq %rax, %r15
movq %rax, %rdi
movq %r14, %rsi
movq %rbx, %rdx
callq 0x8278
cmpq %rbx, %rax
jae 0x8724
movq %r15, %rax
popq %rbx
popq %r14
popq %r15
retq
leaq 0x2b15(%rip), %rsi      # 0xb20e
leaq 0x2b23(%rip), %rdx      # 0xb223
movl $0x16, %edi
jmp 0x8737
leaq 0x2b1d(%rip), %rsi      # 0xb22b
leaq 0x2b0e(%rip), %rdx      # 0xb223
movl $0xc, %edi
movq %rbx, %rcx
xorl %eax, %eax
callq 0x55ac
leaq 0x2b1f(%rip), %rsi      # 0xb24a
leaq 0x2af1(%rip), %rdx      # 0xb223
movl $0x4b, %edi
xorl %eax, %eax
callq 0x55ac
// File: /workspace/github_c_makefile_star2_O3/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 0x8772
movq %rsi, %rbx
testq %rsi, %rsi
je 0x877b
movq %rdi, %r14
movq %rdi, %rax
mulq %rbx
jo 0x8789
movq %r14, %rdi
movq %rbx, %rsi
callq 0x42b0
testq %rax, %rax
je 0x8799
addq $0x8, %rsp
popq %rbx
popq %r14
retq
leaq 0x2adf(%rip), %rsi      # 0xb258
jmp 0x8782
leaq 0x2b07(%rip), %rsi      # 0xb289
movl $0x16, %edi
jmp 0x8792
leaq 0x2b29(%rip), %rsi      # 0xb2b9
xorl %edi, %edi
xorl %eax, %eax
callq 0x55ac
imulq %r14, %rbx
leaq 0x2b2f(%rip), %rsi      # 0xb2d3
movl $0xc, %edi
movq %rbx, %rdx
xorl %eax, %eax
callq 0x55ac
// File: /workspace/github_c_makefile_star2_O3/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 0x87c8
movq %rdi, %rbx
callq 0x45e0
testq %rax, %rax
je 0x87db
popq %rbx
retq
leaq 0x2b32(%rip), %rsi      # 0xb301
movl $0x16, %edi
xorl %eax, %eax
callq 0x55ac
leaq 0x2b46(%rip), %rsi      # 0xb328
movl $0xc, %edi
movq %rbx, %rdx
xorl %eax, %eax
callq 0x55ac
// File: /workspace/github_c_makefile_star2_O3/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 0x880e
movq %rsi, %rbx
testq %rsi, %rsi
je 0x8817
movq %rbx, %rsi
callq 0x4740
testq %rax, %rax
je 0x882a
popq %rbx
retq
leaq 0x2b37(%rip), %rsi      # 0xb34c
jmp 0x881e
leaq 0x2b64(%rip), %rsi      # 0xb382
movl $0x16, %edi
xorl %eax, %eax
callq 0x55ac
callq 0x4050
movl (%rax), %edi
leaq 0x2b7e(%rip), %rsi      # 0xb3b6
movq %rbx, %rdx
xorl %eax, %eax
callq 0x55ac
nopw %cs:(%rax,%rax)
nopl (%rax)
// File: /workspace/github_c_makefile_star2_O3/yutopp[P]cc/main.c
// Function: main
int main(int argc, char *argv[]) {
    if (argc != 2) {
        fprintf(stderr, "argc: %d shoule be 2", argc);
        return 1;
    }

    int exit_code = 1;
    char *fpath = argv[1];

    printf("C => %s\n", fpath);
    FILE *fp = fopen(fpath, "rb");
    if (fp == NULL) {
        fprintf(stderr, "Failed to open file: ");
        goto exit_0;
    }

    char *fcontent = read_all(fp);
    fclose(fp);

    printf("%s\n", fcontent);

    CC* cc = cc_new(fcontent, fpath);

    ParserResult res = cc_parse(cc);
    if (res.result == PARSER_ERROR) {
        fprintf(stderr, "ERROR: ");
        parser_fprint_error(stderr, &res.error);
        fprintf(stderr, "\n");
        goto exit;
    }
    assert(res.value.node);

    printf("= AST =\n");
    node_fprint(stdout, res.value.node);
    printf("\n");

    /*AnalyzerResult res = */cc_analyze(cc, res.value.node);
    /* TODO: error check */

    int err =
    /*CompileResult res = */cc_compile(cc, res.value.node);
    if (err) {
        goto exit;
    }

    exit_code = 0; // Success

exit:
    cc_drop(cc);

exit_0:
    free(fcontent);

    return exit_code;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
subq $0x20, %rsp
cmpl $0x2, %edi
jne 0x1749
movq 0x8(%rsi), %r14
leaq 0x59ed(%rip), %rdi      # 0x7019
movq %r14, %rsi
xorl %eax, %eax
callq 0x10b0
leaq 0x59e5(%rip), %rsi      # 0x7022
movq %r14, %rdi
callq 0x11a0
testq %rax, %rax
je 0x1779
movq %rax, %r15
movq %rax, %rdi
xorl %esi, %esi
movl $0x2, %edx
callq 0x1180
movq %r15, %rdi
callq 0x1130
movq %rax, %r12
movq %r15, %rdi
xorl %esi, %esi
xorl %edx, %edx
callq 0x1180
leaq 0x1(%r12), %rdi
callq 0x1160
movq %rax, %rbx
movl $0x1, %esi
movq %rax, %rdi
movq %r12, %rdx
movq %r15, %rcx
callq 0x1080
movb $0x0, (%rbx,%r12)
movq %r15, %rdi
callq 0x1090
movq %rbx, %rdi
callq 0x1070
movq %rbx, %rdi
movq %r14, %rsi
callq 0x5fd0
movq %rax, %r14
movq %rsp, %r15
movq %r15, %rdi
movq %rax, %rsi
callq 0x60b3
cmpl $0x1, (%r15)
je 0x176a
cmpq $0x0, 0x18(%rsp)
je 0x177e
leaq 0x598b(%rip), %rdi      # 0x7070
callq 0x1070
movq 0x98e7(%rip), %rax      # 0xafd8
movq (%rax), %rdi
movq 0x18(%rsp), %rsi
callq 0x2f4c
movl $0xa, %edi
callq 0x1050
movq 0x18(%rsp), %rsi
movq %r14, %rdi
callq 0x6192
movq 0x18(%rsp), %rsi
movq %r14, %rdi
callq 0x61c5
xorl %ebp, %ebp
testl %eax, %eax
setne %bpl
movq %r14, %rdi
callq 0x6006
movq %rbx, %rdi
callq 0x1040
movl %ebp, %eax
addq $0x20, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
movl %edi, %edx
movq 0x98a6(%rip), %rax      # 0xaff8
movq (%rax), %rdi
leaq 0x58a8(%rip), %rsi      # 0x7004
xorl %eax, %eax
callq 0x1120
movl $0x1, %ebp
jmp 0x173a
movq %rsp, %rdi
callq 0x11e0
movl $0x1, %ebp
jmp 0x172a
callq 0x1225
leaq 0x58be(%rip), %rdi      # 0x7043
leaq 0x58c6(%rip), %rsi      # 0x7052
leaq 0x58c6(%rip), %rcx      # 0x7059
movl $0x36, %edx
callq 0x10d0
nopl (%rax)
// File: /workspace/github_c_makefile_star2_O3/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
movl $0x20, %edi
callq 0x1160
movq %r14, (%rax)
movq $0x0, 0x8(%rax)
movq $-0x1, 0x10(%rax)
movq %rbx, 0x18(%rax)
addq $0x8, %rsp
popq %rbx
popq %r14
retq
// File: /workspace/github_c_makefile_star2_O3/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 $0xb, %edx
jg 0x1bc3
cmpl $0x1, %edx
je 0x1be0
cmpl $0x2, %edx
je 0x1c01
cmpl $0x3, %edx
jne 0x1bee
movl $0x3e, %edi
jmp 0x1c06
cmpl $0xc, %edx
je 0x1be7
cmpl $0x18, %edx
je 0x1c10
cmpl $0x1f, %edx
jne 0x1bee
leaq 0x56f2(%rip), %rdi      # 0x72cb
movl $0x3, %esi
jmp 0x1c1c
movl $0x23, %edi
jmp 0x1c06
movl $0x2e, %edi
jmp 0x1c06
leaq 0x56a4(%rip), %rsi      # 0x7299
movq %rbx, %rdi
xorl %eax, %eax
callq 0x1120
jmp 0x1c29
movl $0x3c, %edi
movq %rbx, %rsi
callq 0x10f0
jmp 0x1c29
leaq 0x567f(%rip), %rdi      # 0x7296
movl $0x2, %esi
movl $0x1, %edx
movq %rbx, %rcx
callq 0x11c0
movl $0x20, %edi
movq %rbx, %rsi
callq 0x10f0
movq %rbx, %rdi
movq %r14, %rsi
callq 0x1c61
movq 0x10(%r14), %rdx
movq 0x18(%r14), %rcx
leaq 0x5652(%rip), %rsi      # 0x72a2
movq %rbx, %rdi
xorl %eax, %eax
addq $0x8, %rsp
popq %rbx
popq %r14
jmp 0x1120
// File: /workspace/github_c_makefile_star2_O3/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
movl $0x20, %edi
callq 0x1160
movq %rax, %rbx
testq %rax, %rax
je 0x1cf6
movq %r15, (%rbx)
movq %r14, 0x8(%rbx)
movq $0x0, 0x10(%rbx)
movl $0x8, %edi
callq 0x2d9c
movq %rax, 0x18(%rbx)
movq %rbx, %rax
popq %rbx
popq %r14
popq %r15
retq
// File: /workspace/github_c_makefile_star2_O3/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 %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
subq $0x40, %rsp
movq %rsi, %r14
movq %rdi, %rbx
movq 0x10(%rsi), %r12
leaq 0xf6(%rip), %rdx        # 0x1e2e
leaq 0x20(%rsp), %r15
movq %r15, %rdi
callq 0x1eaf
movl (%r15), %ebp
movups 0x4(%r15), %xmm0
movaps %xmm0, (%rsp)
movl 0x14(%r15), %eax
movl %eax, 0x10(%rsp)
movq 0x18(%r15), %r15
cmpl $0x1, %ebp
jne 0x1d77
movl 0x10(%rsp), %eax
movl %eax, 0x14(%rbx)
movaps (%rsp), %xmm0
movups %xmm0, 0x4(%rbx)
movq %r12, 0x10(%r14)
jmp 0x1d9c
movq 0x8(%r14), %rdi
callq 0x354a
movl $0x0, (%rax)
movq %r15, 0x8(%rax)
movaps (%rsp), %xmm0
movups %xmm0, 0x4(%rbx)
movl 0x10(%rsp), %ecx
movl %ecx, 0x14(%rbx)
movq %rax, %r15
movl %ebp, (%rbx)
movq %r15, 0x18(%rbx)
movq %rbx, %rax
addq $0x40, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O3/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 0x1e06
cmpl $0x1, %eax
je 0x1dd7
testl %eax, %eax
jne 0x1e26
leaq 0x54f0(%rip), %rdi      # 0x72c0
movl $0xe, %esi
jmp 0x1e12
movq %rsi, %r14
leaq 0x54ee(%rip), %rdi      # 0x72cf
movl $0x12, %esi
movl $0x1, %edx
movq %rbx, %rcx
callq 0x11c0
movq 0x8(%r14), %rsi
movq %rbx, %rdi
addq $0x8, %rsp
popq %rbx
popq %r14
jmp 0x1b9c
leaq 0x54d5(%rip), %rdi      # 0x72e2
movl $0x1c, %esi
movl $0x1, %edx
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_O3/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 %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x28, %rsp
movq %rdx, %r12
movq %rsi, %r14
movq %rdi, %rbx
movq 0x10(%rsi), %rbp
movl $0x8, %edi
callq 0x2d9c
movq %rax, %r15
leaq 0x8(%rsp), %r13
movq %r13, %rdi
movq %r14, %rsi
callq *%r12
movups (%r13), %xmm0
movups 0x10(%r13), %xmm1
movups %xmm1, 0x10(%rbx)
movups %xmm0, (%rbx)
cmpl $0x1, (%rbx)
je 0x1f2e
leaq 0x8(%rsp), %r13
movq %r15, %rdi
callq 0x2eb0
movq 0x18(%rbx), %rcx
movq %rcx, (%rax)
movq %r13, %rdi
movq %r14, %rsi
callq *%r12
movups 0x8(%rsp), %xmm0
movups 0x18(%rsp), %xmm1
movups %xmm1, 0x10(%rbx)
movups %xmm0, (%rbx)
cmpl $0x1, (%rbx)
jne 0x1f00
movq %r15, %rdi
callq 0x2f0b
testq %rax, %rax
je 0x1f43
movq %r15, 0x18(%rbx)
xorl %eax, %eax
jmp 0x1f5b
movq %r15, %rdi
callq 0x2e8f
movl $0x2, 0x8(%rbx)
movq %rbp, 0x10(%r14)
movl $0x1, %eax
movl %eax, (%rbx)
addq $0x28, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O3/yutopp[P]cc/parser.c
// Function: parse_id
ParserResult parse_id(Parser *parser) {
    ParserResult res;
    state_t _parser_state = save_state(parser);

    res = current_token(parser); ErrProp;
    forward_token(parser);

    debug_print_current_token(parser);

    Token* t = res.value.token;
    switch (t->kind) {
    case TOK_KIND_ID:
    {
        Node* node = node_arena_malloc(parser->arena);
        node->kind = NODE_ID;
        node->value.id.tok = t;

        res.result = PARSER_OK;
        res.value.node = node;

        return res;
    }

    default:
        res.result = PARSER_ERROR;
        res.error.kind = PARSER_ERROR_KIND_UNEXPECTED;
        res.error.value.unexpected.token = t;

        rewind_state(parser, _parser_state);
        return res;
    }
}

// Assembly:
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
pushq %rax
movq %rsi, %r14
movq %rdi, %rbx
movq (%rsi), %rdi
movq 0x10(%rsi), %r15
movq %r15, %rsi
callq 0x2ef6
movq %rax, %r12
xorl %eax, %eax
testq %r12, %r12
sete %al
movl %eax, (%rbx)
movl $0x0, 0x8(%rbx)
movq %r12, 0x18(%rbx)
je 0x1fe3
incq 0x10(%r14)
movq %r14, %rdi
callq 0x2319
cmpl $0x18, (%r12)
jne 0x1fd5
movq 0x8(%r14), %rdi
callq 0x354a
movl $0xa, (%rax)
movq %r12, 0x8(%rax)
movl $0x0, (%rbx)
movq %rax, 0x18(%rbx)
jmp 0x1fe7
movl $0x1, %eax
movl %eax, (%rbx)
movl %eax, 0x8(%rbx)
movq %r12, 0x10(%rbx)
movq %r15, 0x10(%r14)
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
retq
// File: /workspace/github_c_makefile_star2_O3/yutopp[P]cc/parser.c
// Function: parse_declarator
ParserResult parse_declarator(Parser *parser) {
    ParserResult res;
    state_t _parser_state = save_state(parser);

    res = parse_direct_declarator(parser); ErrProp;

    Node* node = node_arena_malloc(parser->arena);
    node->kind = NODE_DECLARATOR;
    node->value.declarator.node = res.value.node;

    res.result = PARSER_OK;
    res.value.node = node;

    return res;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x28, %rsp
movq %rsi, %r14
movq %rdi, %rbx
movq 0x10(%rsi), %r12
leaq 0x8(%rsp), %r15
movq %r15, %rdi
callq 0x1f6c
cmpl $0x1, (%r15)
jne 0x207c
movq (%r14), %rdi
movq 0x10(%r14), %rsi
callq 0x2ef6
testq %rax, %rax
je 0x21bc
movaps 0x5276(%rip), %xmm0     # 0x72b0
cmpl $0x4, (%rax)
jne 0x2185
incq 0x10(%r14)
leaq 0x8(%rsp), %r15
movq %r15, %rdi
movq %r14, %rsi
callq 0x1ff3
movq 0x18(%r15), %r13
cmpl $0x1, (%r15)
jne 0x2193
movsd 0xc(%rsp), %xmm0
movl 0x14(%rsp), %ecx
movq 0x18(%rsp), %rax
movq %r13, %rdx
jmp 0x21c2
movq 0x20(%rsp), %r13
movq 0x8(%r14), %rdi
callq 0x354a
movq %rax, %rbp
movl $0xd, (%rax)
movq %r13, 0x10(%rax)
movl $0x0, 0x8(%rax)
movq (%r14), %rdi
movq 0x10(%r14), %r12
movq %r12, %rsi
callq 0x2ef6
xorps %xmm0, %xmm0
testq %rax, %rax
je 0x2183
movq 0x10(%r14), %rsi
incq %rsi
movq %rsi, 0x10(%r14)
movl (%rax), %eax
cmpl $0x6, %eax
je 0x2126
cmpl $0x4, %eax
jne 0x217e
leaq 0x8(%rsp), %rdi
movq %r14, %rsi
leaq 0x2c6(%rip), %rdx       # 0x23a9
callq 0x1eaf
cmpl $0x1, 0x8(%rsp)
je 0x21dd
movq 0x20(%rsp), %r15
movq 0x8(%r14), %rdi
callq 0x354a
movq %rax, %r13
movl $0xf, (%rax)
movq %r15, 0x8(%rax)
movq (%r14), %rdi
movq 0x10(%r14), %rsi
callq 0x2ef6
testq %rax, %rax
je 0x217e
cmpl $0x5, (%rax)
je 0x213b
jmp 0x218a
movq (%r14), %rdi
callq 0x2ef6
testq %rax, %rax
je 0x217e
cmpl $0x7, (%rax)
jne 0x218a
xorl %r13d, %r13d
incq 0x10(%r14)
movq 0x8(%r14), %rdi
callq 0x354a
movq %rax, %r15
movl $0xd, (%rax)
movl $0x1, 0x8(%rax)
movq %rbp, 0x10(%rax)
movq %r13, 0x18(%rax)
movq (%r14), %rdi
movq 0x10(%r14), %r12
movq %r12, %rsi
callq 0x2ef6
movq %r15, %rbp
testq %rax, %rax
jne 0x20b9
movq %r15, %rbp
xorps %xmm0, %xmm0
jmp 0x21ec
jmp 0x21ec
movq %rax, %rdx
jmp 0x21c2
movaps 0x511f(%rip), %xmm0     # 0x72b0
jmp 0x21ec
movq (%r14), %rdi
movq 0x10(%r14), %rsi
callq 0x2ef6
testq %rax, %rax
je 0x21bc
cmpl $0x5, (%rax)
movq %rax, %rdx
movaps 0x50ff(%rip), %xmm0     # 0x72b0
jne 0x21c2
incq 0x10(%r14)
jmp 0x2081
movq %rax, %rdx
xorps %xmm0, %xmm0
movl $0x1, (%rbx)
movlps %xmm0, 0x4(%rbx)
movl %ecx, 0xc(%rbx)
movq %rax, 0x10(%rbx)
movq %rdx, 0x18(%rbx)
movq %r12, 0x10(%r14)
jmp 0x2218
movsd 0xc(%rsp), %xmm0
movl 0x14(%rsp), %ecx
movq 0x18(%rsp), %rax
movq %r12, 0x10(%r14)
movlps %xmm0, 0x4(%rbx)
movl %ecx, 0xc(%rbx)
movq %rax, 0x10(%rbx)
movq 0x8(%r14), %rdi
callq 0x354a
movl $0xc, (%rax)
movq %rbp, 0x8(%rax)
movl $0x0, (%rbx)
movq %rax, 0x18(%rbx)
addq $0x28, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O3/yutopp[P]cc/parser.c
// Function: parse_stmt_compound
ParserResult parse_stmt_compound(Parser *parser) {
    ParserResult res;
    state_t _parser_state = save_state(parser);

    res = assume_token(parser, TOK_KIND_LBRACE); ErrProp;
    forward_token(parser);

    res = combinator_more1(parser, parse_block_item); ErrProp;
    Vector* nodes = res.value.nodes;

    res = assume_token(parser, TOK_KIND_RBRACE); ErrProp;
    forward_token(parser);

    Node* node = node_arena_malloc(parser->arena);
    node->kind = NODE_STMT_COMPOUND;
    node->value.stmt_compound.stmts = nodes;

    res.result = PARSER_OK;
    res.value.node = node;

    return res;
}

// Assembly:
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
subq $0x28, %rsp
movq %rsi, %r14
movq %rdi, %rbx
movq (%rsi), %rdi
movq 0x10(%rsi), %r15
movq %r15, %rsi
callq 0x2ef6
testq %rax, %rax
je 0x22f4
xorl %ecx, %ecx
cmpl $0x8, (%rax)
setne %cl
movl %ecx, (%rbx)
movl $0x1, 0x8(%rbx)
movq %rax, 0x10(%rbx)
movq %rax, 0x18(%rbx)
jne 0x2309
incq 0x10(%r14)
leaq 0x1a0(%rip), %rdx       # 0x241a
leaq 0x8(%rsp), %r12
movq %r12, %rdi
movq %r14, %rsi
callq 0x1eaf
movups (%r12), %xmm0
movups 0x10(%r12), %xmm1
movups %xmm1, 0x10(%rbx)
movups %xmm0, (%rbx)
cmpl $0x1, (%rbx)
je 0x2309
movq 0x18(%rbx), %r12
movq (%r14), %rdi
movq 0x10(%r14), %rsi
callq 0x2ef6
testq %rax, %rax
je 0x22f4
xorl %ecx, %ecx
cmpl $0x9, (%rax)
setne %cl
movl %ecx, (%rbx)
movl $0x1, 0x8(%rbx)
movq %rax, 0x10(%rbx)
movq %rax, 0x18(%rbx)
jne 0x2309
incq 0x10(%r14)
movq 0x8(%r14), %rdi
callq 0x354a
movl $0x2, (%rax)
movq %r12, 0x8(%rax)
movl $0x0, (%rbx)
movq %rax, 0x18(%rbx)
jmp 0x230d
movl $0x1, (%rbx)
movl $0x0, 0x8(%rbx)
movq %rax, 0x10(%rbx)
movq %rax, 0x18(%rbx)
movq %r15, 0x10(%r14)
addq $0x28, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
retq