LLM4Binary/decompile-bench-makefile huggingface dataset:
// File: /workspace/github_c_makefile_star2_O3/ebiggers[P]mysh/mysh_builtin.c
// Function: builtin_set
static int builtin_set(unsigned argc, const char **argv)
{
	const char *pos_params[argc];
	unsigned pos_params_idx;
	unsigned i;
	int ret;

	if (argc == 0) {
		ret = print_all_shell_variables();
		goto out;
	}
	pos_params_idx = 0;
	for (i = 0; i < argc; i++) {
		switch (argv[i][0]) {
		case '-':
			if (argv[i][1] == '-' && argv[i][2] == '\0') {
				i++;
				goto remaining_params;
			}
			/* Fall through */
		case '+':
			ret = set_or_unset_options_in_string(argv[i] + 1, (argv[i][0] == '-'));
			if (ret)
				goto out;
			break;
		default:
			pos_params[pos_params_idx++] = argv[i];
			break;
		}
	}
remaining_params:
	for (; i < argc; i++)
		pos_params[pos_params_idx++] = argv[i];
	if (pos_params_idx != 0) {
		set_positional_params(pos_params_idx,
				      positional_parameters[0],
				      pos_params);
	}
	ret = 0;
out:
	return ret;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x28, %rsp
movq %rsi, -0x50(%rbp)
movl %edi, %eax
movq %rsp, %rcx
movq %rax, -0x48(%rbp)
leaq 0xf(,%rax,8), %rax
andq $-0x10, %rax
subq %rax, %rcx
movq %rcx, -0x38(%rbp)
movq %rcx, %rsp
testl %edi, %edi
je 0x2e45
movl %edi, -0x3c(%rbp)
leaq 0x45a8(%rip), %r13      # 0x7302
xorl %r14d, %r14d
movl $0x0, -0x2c(%rbp)
movq -0x50(%rbp), %rax
movq (%rax,%r14,8), %r15
movzbl (%r15), %ecx
cmpl $0x2d, %ecx
je 0x2d80
cmpl $0x2b, %ecx
jne 0x2df4
movb 0x1(%r15), %al
jmp 0x2d9c
movb 0x1(%r15), %al
cmpb $0x2d, %al
jne 0x2d9c
cmpb $0x0, 0x2(%r15)
je 0x2e5a
movb $0x2d, %al
movl $0x1, %ebx
jmp 0x2daa
xorl %ebx, %ebx
cmpb $0x2d, %cl
sete %cl
testb %al, %al
je 0x2e06
movb %cl, %bl
addq $0x2, %r15
xorl %r12d, %r12d
cmpb $0x7e, %al
ja 0x2dce
movzbl %al, %ecx
leaq 0x7bf1(%rip), %rdx      # 0xa9b0
movq (%rdx,%rcx,8), %rcx
testq %rcx, %rcx
je 0x2dce
movl %ebx, (%rcx)
xorl %eax, %eax
jmp 0x2de0
movsbl %al, %esi
movq %r13, %rdi
xorl %eax, %eax
callq 0x23e0
movl $0xffffffff, %eax       # imm = 0xFFFFFFFF
orl %eax, %r12d
movb (%r15), %al
incq %r15
testb %al, %al
jne 0x2db1
testl %r12d, %r12d
je 0x2e06
jmp 0x2e33
movl -0x2c(%rbp), %ecx
movl %ecx, %eax
incl %ecx
movl %ecx, -0x2c(%rbp)
movq -0x38(%rbp), %rcx
movq %r15, (%rcx,%rax,8)
incq %r14
cmpq -0x48(%rbp), %r14
jne 0x2d64
xorl %r12d, %r12d
movl -0x2c(%rbp), %edi
testl %edi, %edi
je 0x2e33
leaq 0x86d4(%rip), %rax      # 0xb4f8
movq (%rax), %rax
movq (%rax), %rsi
movq -0x38(%rbp), %rdx
callq 0x52d7
movl %r12d, %eax
leaq -0x28(%rbp), %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
xorl %eax, %eax
leaq -0x28(%rbp), %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
jmp 0x4f96
incl %r14d
cmpl -0x3c(%rbp), %r14d
jae 0x2e13
movl %r14d, %eax
movq -0x50(%rbp), %rcx
movq (%rcx,%rax,8), %rcx
movl -0x2c(%rbp), %esi
movl %esi, %edx
incl %esi
movl %esi, -0x2c(%rbp)
movq -0x38(%rbp), %rsi
movq %rcx, (%rsi,%rdx,8)
incq %rax
cmpq %rax, -0x48(%rbp)
jne 0x2e66
jmp 0x2e13
// File: /workspace/github_c_makefile_star2_O3/ebiggers[P]mysh/mysh_builtin.c
// Function: builtin_shift
static int builtin_shift(unsigned argc, const char **argv)
{
	unsigned amount;
	unsigned i;
	if (argc) {
		int iamount = atoi(argv[0]);
		if (iamount < 0) {
			mysh_error("shift: shift count cannot be negative");
			return 1;
		}
		amount = iamount;
		if (amount > num_positional_parameters) {
			mysh_error("shift: shift count greater than "
				   "number of positional parameters");
			return 1;
		}
	} else {
		if (num_positional_parameters == 0)
			return 0;
		amount = 1;
	}

	for (i = 1; i <= amount; i++)
		free(positional_parameters[i]);
	for (; i <= num_positional_parameters; i++)
		positional_parameters[i - amount] = positional_parameters[i];
	num_positional_parameters -= amount;
	return 0;
}

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
testl %edi, %edi
je 0x2eb8
movq (%rsi), %rdi
callq 0x2310
testl %eax, %eax
js 0x2ecb
movl %eax, %ebx
leaq 0x864b(%rip), %rax      # 0xb4f4
movl (%rax), %eax
cmpl %eax, %ebx
jbe 0x2ee0
leaq 0x448b(%rip), %rdi      # 0x7341
jmp 0x2ed2
leaq 0x8635(%rip), %rax      # 0xb4f4
movl $0x1, %ebx
cmpl $0x0, (%rax)
jne 0x2ee4
jmp 0x2f46
leaq 0x4449(%rip), %rdi      # 0x731b
xorl %eax, %eax
callq 0x23e0
movl $0x1, %eax
jmp 0x2f48
testl %ebx, %ebx
je 0x2f4e
movl $0x1, %r14d
leaq 0x8607(%rip), %r15      # 0xb4f8
movq (%r15), %rax
movl %r14d, %ecx
movq (%rax,%rcx,8), %rdi
callq 0x2050
incl %r14d
cmpl %ebx, %r14d
jbe 0x2ef1
leaq 0x85e5(%rip), %rax      # 0xb4f4
movl (%rax), %eax
cmpl %eax, %r14d
ja 0x2f3b
movl %ebx, %ecx
negl %ecx
leaq 0x85d7(%rip), %rdx      # 0xb4f8
movq (%rdx), %rsi
movl %r14d, %edi
movq (%rsi,%rdi,8), %rdi
leal (%rcx,%r14), %r8d
movq %rdi, (%rsi,%r8,8)
incl %r14d
cmpl %eax, %r14d
jbe 0x2f21
subl %ebx, %eax
leaq 0x85b0(%rip), %rcx      # 0xb4f4
movl %eax, (%rcx)
xorl %eax, %eax
popq %rbx
popq %r14
popq %r15
retq
movl $0x1, %r14d
xorl %ebx, %ebx
jmp 0x2f11
// File: /workspace/github_c_makefile_star2_O3/ebiggers[P]mysh/mysh_lex.c
// Function: free_tok_list
void free_tok_list(struct list_head *tok_list)
{
	struct token *tok, *tmp;
	list_for_each_entry_safe(tok, tmp, tok_list, list) {
		list_del(&tok->list);
		free_token(tok);
	}
}

// Assembly:
movq (%rdi), %rax
cmpq %rdi, %rax
je 0x3010
pushq %r15
pushq %r14
pushq %rbx
movq %rdi, %rbx
leaq -0x10(%rax), %r14
movq (%rax), %r15
movq 0x8(%rax), %rcx
movq %rcx, 0x8(%r15)
movq %r15, (%rcx)
movq -0x8(%rax), %rdi
callq 0x2050
movq %r14, %rdi
callq 0x2050
movq %r15, %rax
cmpq %rbx, %r15
jne 0x2fe0
popq %rbx
popq %r14
popq %r15
retq
// File: /workspace/github_c_makefile_star2_O3/ebiggers[P]mysh/mysh_lex.c
// Function: lex_string
static int lex_string(const char *p, scan_string_t scan_string,
		      size_t *bytes_remaining_p, char **string_ret)
{
	ssize_t len;
	char *buf;
	size_t bytes_remaining = *bytes_remaining_p;

	/* get string length */
	len = scan_string(p, &bytes_remaining, NULL);
	if (len < 0)
		return len; /* parse error or not enough input */
	buf = xmalloc(len + 1);
	/* get the string */
	scan_string(p, bytes_remaining_p, buf);
	buf[len] = '\0';
	*string_ret = buf;
	return 0;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x18, %rsp
movq %rcx, %rbx
movq %rdx, %r12
movq %rsi, %r15
movq %rdi, %r13
movq (%rdx), %rax
leaq 0x10(%rsp), %rsi
movq %rax, (%rsi)
xorl %r14d, %r14d
xorl %edx, %edx
callq *%r15
movq %rax, %rbp
testq %rax, %rax
js 0x3250
movq %rbp, %rdi
incq %rdi
callq 0x6540
movq %rbx, 0x8(%rsp)
movq %rax, %rbx
movq %r13, %rdi
movq %r12, %rsi
movq %rax, %rdx
callq *%r15
movb $0x0, (%rbx,%rbp)
movq 0x8(%rsp), %rax
movq %rbx, (%rax)
jmp 0x3253
movl %ebp, %r14d
movl %r14d, %eax
addq $0x18, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O3/ebiggers[P]mysh/mysh_lex.c
// Function: scan_single_quoted_string
static ssize_t
scan_single_quoted_string(const char *p, size_t *bytes_remaining_p, char *out_buf)
{
	const char *term_quote;
	ssize_t len;

 	term_quote = memchr(p, '\'', *bytes_remaining_p);
	if (!term_quote)
		return LEX_NOT_ENOUGH_INPUT;

	len = term_quote - p;
	if (memchr(p, '\0', len)) {
		mysh_error("illegal null byte in single-quoted string");
		return LEX_ERROR;
	}
	if (out_buf)
		memcpy(out_buf, p, len);
	*bytes_remaining_p -= (len + 1);
	return len;
}

// Assembly:
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
movq %rdx, %r12
movq %rsi, %r14
movq %rdi, %r13
movq (%rsi), %r15
movl $0x27, %esi
movq %r15, %rdx
callq 0x2200
testq %rax, %rax
je 0x32bb
movq %rax, %rbx
subq %r13, %rbx
movq %r13, %rdi
xorl %esi, %esi
movq %rbx, %rdx
callq 0x2200
testq %rax, %rax
je 0x32c4
leaq 0x4135(%rip), %rdi      # 0x73e0
xorl %eax, %eax
callq 0x23e0
movq $-0x3e8, %rbx           # imm = 0xFC18
jmp 0x32e6
movq $-0x7d0, %rbx           # imm = 0xF830
jmp 0x32e6
testq %r12, %r12
je 0x32da
movq %r12, %rdi
movq %r13, %rsi
movq %rbx, %rdx
callq 0x2260
movq (%r14), %r15
movq %rbx, %rax
notq %rax
addq %r15, %rax
movq %rax, (%r14)
movq %rbx, %rax
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
retq
// File: /workspace/github_c_makefile_star2_O3/ebiggers[P]mysh/mysh_lex.c
// Function: scan_double_quoted_string
static ssize_t
scan_double_quoted_string(const char *p, size_t *bytes_remaining_p, char *out_buf)
{
	bool escape = false;
	ssize_t len = 0;
	size_t bytes_remaining = *bytes_remaining_p;
	char c;

	for (;;) {
		if (!bytes_remaining)
			return LEX_NOT_ENOUGH_INPUT;
		bytes_remaining--;
		c = *p++;
		if (c == '\0') {
			mysh_error("illegal null byte in double-quoted string");
			return LEX_ERROR;
		} else if (c == '\\' && !escape) {
			/* backslash: try to escape the next character */
			escape = true;
		} else if (c == '"' && !escape) {
			/* found terminating double-quote */
			break;
		} else if (c == '\n' && escape) {
			/* Remove escaped newline */
			escape = false;
		} else {
			if (escape && !(shell_char_type(c) & SHELL_DOUBLE_QUOTE_SPECIAL)) {
				/* backslash followed by a character that does
				 * not give backslash a special meaning means
				 * that the backslash has to be output
				 * literally. */
				if (out_buf)
					*out_buf++ = '\\';
				len++;
			}
			/* literal character in the string */
			if (out_buf)
				*out_buf++ = c;
			len++;
			/* clear the escape flag */
			escape = false;
		}
	}
	*bytes_remaining_p = bytes_remaining;
	return len;
}

// Assembly:
movq (%rsi), %rcx
testq %rcx, %rcx
je 0x3393
pushq %rbp
pushq %rbx
pushq %rax
xorl %r8d, %r8d
leaq 0x4804(%rip), %r9       # 0x7b10
xorl %eax, %eax
xorl %r11d, %r11d
movb (%rdi,%r8), %r10b
movzbl %r10b, %ebx
cmpl $0x21, %ebx
jle 0x3333
cmpl $0x22, %ebx
je 0x3340
cmpl $0x5c, %ebx
jne 0x334c
movb $0x1, %bpl
testb $0x1, %r11b
jne 0x3352
jmp 0x337f
cmpl $0xa, %ebx
jne 0x3348
testb $0x1, %r11b
je 0x336b
jmp 0x337d
testb $0x1, %r11b
jne 0x3352
jmp 0x33b2
testl %ebx, %ebx
je 0x339b
testb $0x1, %r11b
je 0x336b
testb $0x20, (%r9,%rbx)
jne 0x336b
testq %rdx, %rdx
je 0x3366
movb $0x5c, (%rdx)
incq %rdx
jmp 0x3368
xorl %edx, %edx
incq %rax
testq %rdx, %rdx
je 0x3378
movb %r10b, (%rdx)
incq %rdx
jmp 0x337a
xorl %edx, %edx
incq %rax
xorl %ebp, %ebp
incq %r8
movl %ebp, %r11d
cmpq %r8, %rcx
jne 0x3311
movq $-0x7d0, %rax           # imm = 0xF830
jmp 0x33bb
movq $-0x7d0, %rax           # imm = 0xF830
retq
leaq 0x4068(%rip), %rdi      # 0x740a
xorl %eax, %eax
callq 0x23e0
movq $-0x3e8, %rax           # imm = 0xFC18
jmp 0x33bb
notq %r8
addq %rcx, %r8
movq %r8, (%rsi)
addq $0x8, %rsp
popq %rbx
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O3/ebiggers[P]mysh/mysh_lex.c
// Function: scan_unquoted_string
static ssize_t
scan_unquoted_string(const char *p, size_t *bytes_remaining_p, char *out_buf)
{
	const char *orig_p = p;
	ssize_t len = 0;
	bool escape = false;
	size_t bytes_remaining = *bytes_remaining_p;
	for (;; p++, bytes_remaining--) {
		if (!bytes_remaining)
			return LEX_NOT_ENOUGH_INPUT;
		if (shell_char_type(*p) & SHELL_UNQUOTED_SPECIAL) {
			if (*p == '\0') {
				mysh_error("illegal null byte in unquoted string");
				return LEX_ERROR;
			}
			if (!escape) {
				if (*p == '\\') {
					escape = true;
					continue;
					/* special case to not start a comment
					 * at the # of $# */
				} else if (!(*p == '#' && p != orig_p && *(p - 1) == '$'))
					break;
			} else if (escape && *p == '\n') {
				/* Remove escaped newline */
				escape = false;
				continue;
			}
		}
		if (out_buf)
			*out_buf++ = *p;
		len++;
		escape = false;
	}
	*bytes_remaining_p = bytes_remaining;
	return len;
}

// Assembly:
movq (%rsi), %rcx
testq %rcx, %rcx
je 0x343c
pushq %rax
xorl %r8d, %r8d
leaq 0x473b(%rip), %r9       # 0x7b10
xorl %r10d, %r10d
xorl %eax, %eax
movzbl (%rdi,%r8), %r11d
testb $0x40, (%r9,%r11)
jne 0x33f3
testq %rdx, %rdx
je 0x3406
movb %r11b, (%rdx)
incq %rdx
jmp 0x3408
testb %r11b, %r11b
je 0x344d
testb $0x1, %r10b
je 0x3418
cmpb $0xa, %r11b
jne 0x33e6
jmp 0x340b
xorl %edx, %edx
incq %rax
xorl %r10d, %r10d
incq %r8
cmpq %r8, %rcx
jne 0x33da
jmp 0x3444
movb $0x1, %r10b
cmpl $0x5c, %r11d
je 0x340e
cmpl $0x23, %r11d
jne 0x3434
testq %r8, %r8
je 0x3434
cmpb $0x24, -0x1(%rdi,%r8)
je 0x33e6
subq %r8, %rcx
movq %rcx, (%rsi)
jmp 0x3462
movq $-0x7d0, %rax           # imm = 0xF830
retq
movq $-0x7d0, %rax           # imm = 0xF830
jmp 0x3462
leaq 0x3fe0(%rip), %rdi      # 0x7434
xorl %eax, %eax
callq 0x23e0
movq $-0x3e8, %rax           # imm = 0xFC18
addq $0x8, %rsp
retq
nop
// File: /workspace/github_c_makefile_star2_O3/ebiggers[P]mysh/mysh_main.c
// Function: execute_full_shell_input
int execute_full_shell_input(const char *input, size_t len)
{
	int ret;
	LIST_HEAD(tok_list);

	/* hack: overwrite null terminator with a newline so that the end of
	 * input is seen as the end of a shell statement */
	((char*)input)[len++] = '\n';
	ret = execute_shell_input(&tok_list, input, &len);
	switch (ret) {
	case LEX_ERROR:
		mysh_last_exit_status = -1;
		break;
	case LEX_NOT_ENOUGH_INPUT:
		mysh_error("unexpected end of input");
		mysh_last_exit_status = -1;
		break;
	default:
		mysh_last_exit_status = ret;
		break;
	}
	return mysh_last_exit_status;
}

// Assembly:
pushq %rbx
subq $0x20, %rsp
movq %rdi, %rax
leaq 0x10(%rsp), %rdi
movq %rdi, (%rdi)
movq %rdi, 0x8(%rdi)
leaq 0x1(%rsi), %rcx
leaq 0x8(%rsp), %rdx
movq %rcx, (%rdx)
movb $0xa, (%rax,%rsi)
movq %rax, %rsi
callq 0x34c7
movl $0xffffffff, %ebx       # imm = 0xFFFFFFFF
cmpl $0xfffffc18, %eax       # imm = 0xFFFFFC18
je 0x34b9
cmpl $0xfffff830, %eax       # imm = 0xFFFFF830
jne 0x34b7
leaq 0x3fc2(%rip), %rdi      # 0x7470
xorl %eax, %eax
callq 0x23e0
jmp 0x34b9
movl %eax, %ebx
movl %ebx, 0x7d61(%rip)      # 0xb220
movl %ebx, %eax
addq $0x20, %rsp
popq %rbx
retq
// File: /workspace/github_c_makefile_star2_O3/ebiggers[P]mysh/mysh_main.c
// Function: execute_shell_input
static int execute_shell_input(struct list_head *cur_tok_list,
			       const char *input,
			       size_t *bytes_remaining_p)
{
	int ret = 0;
	size_t bytes_remaining = *bytes_remaining_p;
	while (bytes_remaining) {
		struct token *tok;
		do {
			size_t bytes_lexed;

			ret = lex_next_token(input, bytes_remaining_p, &tok);
			if (ret)
				return ret;
			bytes_lexed = bytes_remaining - *bytes_remaining_p;
			if (mysh_write_input_to_stderr)
				fwrite(input, 1, bytes_lexed, stderr);
			input += bytes_lexed;
			bytes_remaining -= bytes_lexed;
			list_add_tail(&tok->list, cur_tok_list);
		} while (tok->type != TOK_END_OF_SHELL_STATEMENT);
		ret = execute_tok_list(cur_tok_list);
		if (ret && mysh_exit_on_error)
			return ret;
	}
	return ret;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movq (%rdx), %rbp
testq %rbp, %rbp
je 0x3584
movq %rdx, %rbx
movq %rsi, %r14
movq %rdi, %r15
movq %rsp, %r12
movq %rbp, %r13
movq %r14, %rdi
movq %rbx, %rsi
movq %r12, %rdx
callq 0x3011
testl %eax, %eax
jne 0x3586
movq (%rbx), %rbp
subq %rbp, %r13
cmpl $0x0, 0x7d24(%rip)      # 0xb234
jne 0x3542
addq %r13, %r14
movq (%rsp), %rax
leaq 0x10(%rax), %rcx
movq 0x8(%r15), %rdx
movq %rcx, 0x8(%r15)
movq %r15, 0x10(%rax)
movq %rdx, 0x18(%rax)
movq %rcx, (%rdx)
movq (%rsp), %rax
cmpl $0x400, 0x4(%rax)       # imm = 0x400
movq %rbp, %r13
jne 0x34ed
jmp 0x355e
movq 0x7aa7(%rip), %rax      # 0xaff0
movq (%rax), %rcx
movl $0x1, %esi
movq %r14, %rdi
movq %r13, %rdx
callq 0x2360
jmp 0x3512
movq %r15, %rdi
callq 0x3c81
testl %eax, %eax
setne %cl
cmpl $0x0, 0x7cba(%rip)      # 0xb22c
setne %dl
testb %dl, %cl
jne 0x3586
testq %rbp, %rbp
jne 0x34ea
jmp 0x3586
xorl %eax, %eax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O3/ebiggers[P]mysh/mysh_main.c
// Function: do_source
int do_source(const char *filename, unsigned nargs, const char * const *args)
{
	int in_fd;
	char **pos_params_save;
	unsigned num_pos_params_save;
	int ret;

	in_fd = open(filename, O_RDONLY);
	if (in_fd < 0) {
		mysh_error_with_errno("can't open %s", filename);
		return 1;
	}

	pos_params_save = positional_parameters;
	num_pos_params_save = num_positional_parameters;
	positional_parameters = NULL;
	set_positional_params(nargs, filename, args);
	ret = read_loop(in_fd, false);
	destroy_positional_params();
	positional_parameters = pos_params_save;
	num_positional_parameters = num_pos_params_save;
	return ret;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movq %rdx, %r14
movl %esi, %ebp
movq %rdi, %rbx
xorl %esi, %esi
xorl %eax, %eax
callq 0x22c0
testl %eax, %eax
js 0x3a6b
movl %eax, %r15d
leaq 0x7ad9(%rip), %rax      # 0xb4f8
movq (%rax), %r13
leaq 0x7acb(%rip), %rcx      # 0xb4f4
movl (%rcx), %r12d
movq $0x0, (%rax)
movl %ebp, %edi
movq %rbx, %rsi
movq %r14, %rdx
callq 0x52d7
movl %r15d, %edi
xorl %esi, %esi
callq 0x3595
movl %eax, %ebx
xorl %eax, %eax
callq 0x534e
leaq 0x7a9e(%rip), %rax      # 0xb4f8
movq %r13, (%rax)
leaq 0x7a90(%rip), %rax      # 0xb4f4
movl %r12d, (%rax)
movl %ebx, %eax
jmp 0x3a81
leaq 0x3a2d(%rip), %rdi      # 0x749f
movq %rbx, %rsi
xorl %eax, %eax
callq 0x249f
movl $0x1, %eax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O3/ebiggers[P]mysh/mysh_main.c
// Function: execute_tok_list
static int execute_tok_list(struct list_head *tok_list)
{
	struct token *tok, *tmp;
	unsigned ncommands;
	unsigned i;
	int ret;
	struct list_head *cur_list;

	mysh_assert(!list_empty(tok_list) &&
		    (list_entry(tok_list->prev, struct token, list)->type ==
		    TOK_END_OF_SHELL_STATEMENT));
	BUILD_BUG_ON((TOK_CLASS_CMD_BOUNDARY & TOK_END_OF_SHELL_STATEMENT) == 0);

	/* Count the number of commands in the pipeline */
	ncommands = 0;
	list_for_each_entry(tok, tok_list, list)
		if (tok->type & TOK_CLASS_CMD_BOUNDARY)
			ncommands++;

	struct list_head command_tokens[ncommands];

	for (i = 0; i < ncommands; i++)
		INIT_LIST_HEAD(&command_tokens[i]);

	/* Return 0 if the pipeline is empty (e.g. a line of only whitespace, or
	 * only a comment) */
	if (list_is_singular(tok_list)) {
		ret = 0;
		goto out;
	}

	/* Split the tokens into individual lists (pipeline components), around
	 * the '|' signs. */
	cur_list = &command_tokens[0];
	list_for_each_entry_safe(tok, tmp, tok_list, list) {
		if (tok->type & TOK_CLASS_CMD_BOUNDARY) {
			if (list_empty(cur_list)) {
				mysh_error("empty command in pipeline");
				ret = -1;
				goto out;
			}
			cur_list++;
		} else {
			list_move_tail(&tok->list, cur_list);
		}
	}
	/* Execute the pipeline */
	ret = execute_pipeline(command_tokens, ncommands);
out:
	free_tok_list(tok_list);
	for (i = 0; i < ncommands; i++)
		free_tok_list(&command_tokens[i]);
	return ret;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movq (%rdi), %rax
cmpq %rdi, %rax
je 0x3d95
movq %rdi, %rbx
movq 0x8(%rdi), %rcx
cmpl $0x400, -0xc(%rcx)      # imm = 0x400
jne 0x3d95
xorl %r14d, %r14d
movq %rax, %rdx
movb -0xb(%rdx), %sil
andb $0x5, %sil
cmpb $0x1, %sil
sbbl $-0x1, %r14d
movq (%rdx), %rdx
cmpq %rbx, %rdx
jne 0x3cb5
movl %r14d, %r13d
movq %rsp, %r15
movq %r13, %rdx
shlq $0x4, %rdx
subq %rdx, %r15
movq %r15, %rsp
testl %r14d, %r14d
je 0x3cfb
movq %r13, %rdx
movq %r15, %rsi
movq %rsi, (%rsi)
movq %rsi, 0x8(%rsi)
addq $0x10, %rsi
decq %rdx
jne 0x3ceb
cmpq %rcx, %rax
je 0x3d4c
movq %r15, %rcx
movq (%rax), %rdx
testb $0x5, -0xb(%rax)
je 0x3d17
cmpq %rcx, (%rcx)
je 0x3d51
addq $0x10, %rcx
jmp 0x3d34
movq 0x8(%rax), %rsi
movq %rsi, 0x8(%rdx)
movq %rdx, (%rsi)
movq 0x8(%rcx), %rsi
movq %rax, 0x8(%rcx)
movq %rcx, (%rax)
movq %rsi, 0x8(%rax)
movq %rax, (%rsi)
movq %rdx, %rax
cmpq %rbx, %rdx
jne 0x3d03
movq %r15, %rdi
movl %r14d, %esi
callq 0x3db4
movl %eax, %r12d
jmp 0x3d65
xorl %r12d, %r12d
jmp 0x3d65
leaq 0x380c(%rip), %rdi      # 0x7564
xorl %eax, %eax
callq 0x23e0
movl $0xffffffff, %r12d      # imm = 0xFFFFFFFF
movq %rbx, %rdi
callq 0x2fd0
testl %r14d, %r14d
je 0x3d83
movq %r15, %rdi
callq 0x2fd0
addq $0x10, %r15
decq %r13
jne 0x3d72
movl %r12d, %eax
leaq -0x28(%rbp), %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
leaq 0x3725(%rip), %rdi      # 0x74c1
leaq 0x378c(%rip), %rsi      # 0x752f
leaq 0x3791(%rip), %rcx      # 0x753b
movl $0x1ee, %edx            # imm = 0x1EE
callq 0x2160
// File: /workspace/github_c_makefile_star2_O3/ebiggers[P]mysh/mysh_main.c
// Function: add_background_pipeline
static int add_background_pipeline(const pid_t child_pids[], unsigned npids)
{
	struct background_pipeline *p;

	mysh_assert(npids != 0);
	p = xmalloc(sizeof(*p) + npids * sizeof(pid_t));

	p->num = get_next_job_number();
	p->npids = npids;
	p->last_pid = mysh_last_background_pid = child_pids[npids - 1];
	memcpy(p->pids, child_pids, npids * sizeof(pid_t));
	list_add_tail(&p->list, &background_pipelines);

	printf("[%u] %d\n", p->num, p->last_pid);
	return 0;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movl %esi, %r12d
movq %rdi, %r14
movl %esi, %ebx
leaq 0x20(,%rbx,4), %rdi
shlq $0x2, %rbx
callq 0x6540
movq %rax, %r15
movq 0x6e92(%rip), %rax      # 0xb1f8
leaq 0x6e8b(%rip), %r13      # 0xb1f8
movl $0x1, %ebp
cmpq %r13, %rax
je 0x4387
movl 0x10(%rax), %ecx
leal 0x1(%rcx), %edx
cmpl %ecx, %ebp
cmovbel %edx, %ebp
movq (%rax), %rax
jmp 0x4372
movl %ebp, 0x10(%r15)
movl %r12d, 0x14(%r15)
decl %r12d
movl (%r14,%r12,4), %r12d
movl %r12d, 0x6e9f(%rip)     # 0xb23c
movl %r12d, 0x18(%r15)
movq %r15, %rdi
addq $0x1c, %rdi
movq %r14, %rsi
movq %rbx, %rdx
callq 0x2260
movq 0x6e46(%rip), %rax      # 0xb200
movq %r15, 0x6e3f(%rip)      # 0xb200
movq %r13, (%r15)
movq %rax, 0x8(%r15)
movq %r15, (%rax)
leaq 0x33aa(%rip), %rdi      # 0x777c
movl %ebp, %esi
movl %r12d, %edx
xorl %eax, %eax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
jmp 0x2140
// File: /workspace/github_c_makefile_star2_O3/ebiggers[P]mysh/mysh_main.c
// Function: wait_for_children
static int wait_for_children(const pid_t child_pids[], unsigned npids)
{
	int ret;
	unsigned i = 0;
	int status;
	set_up_onetime_sigint_handler();
	do {
	again:
		if (waitpid(child_pids[i], &status, 0) == -1) {
			if (errno == EINTR && sigint_occurred) {
				interrupt_children(&child_pids[i], npids - i);
				goto again;
			} else {
				ret = -1;
				mysh_error_with_errno("failed to wait for child "
						      "process (pid %d) to terminate ",
						      child_pids[i]);
			}
		} else {
			if (WIFEXITED(status))
				ret = WEXITSTATUS(status);
			else
				ret = -1;
		}
	} while (++i != npids);
	if (!sigint_occurred)
		remove_sigint_handler();
	return ret;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0xb8, %rsp
movl %esi, %ebx
movq %rdi, %r14
movb $0x0, 0x6e1f(%rip)      # 0xb228
leaq 0x28(%rsp), %r15
movl $0x90, %edx
movq %r15, %rdi
xorl %esi, %esi
callq 0x2180
leaq 0x149(%rip), %rax       # 0x456d
movq %rax, -0x8(%r15)
movq %r15, %rdi
movl $0x2, %esi
callq 0x23a0
leaq 0x20(%rsp), %rsi
movl $0x2, %edi
xorl %edx, %edx
callq 0x20a0
movl %ebx, 0x1c(%rsp)
movl %ebx, %r13d
leaq 0x3369(%rip), %r12      # 0x77bd
movq %r14, 0x10(%rsp)
xorl %r15d, %r15d
movq 0x10(%rsp), %rax
movl (%rax,%r15,4), %edi
leaq 0xc(%rsp), %rsi
xorl %edx, %edx
callq 0x22b0
cmpl $-0x1, %eax
je 0x4488
movl 0xc(%rsp), %eax
movl $0xffffffff, %ebp       # imm = 0xFFFFFFFF
testb $0x7f, %al
jne 0x4501
movzbl %ah, %ebp
jmp 0x4501
callq 0x2060
movq %rax, %rbp
cmpl $0x4, (%rbp)
jne 0x44e5
cmpb $0x1, 0x6d8b(%rip)      # 0xb228
jne 0x44e5
xorl %ebx, %ebx
movl (%r14,%rbx,4), %edi
movl $0x2, %esi
callq 0x2270
testl %eax, %eax
je 0x44c1
movl (%r14,%rbx,4), %esi
movq %r12, %rdi
xorl %eax, %eax
callq 0x249f
incq %rbx
cmpl %ebx, %r13d
jne 0x44a1
movq 0x10(%rsp), %rax
movl (%rax,%r15,4), %edi
leaq 0xc(%rsp), %rsi
xorl %edx, %edx
callq 0x22b0
cmpl $-0x1, %eax
je 0x4490
jmp 0x4476
movq 0x10(%rsp), %rax
movl (%rax,%r15,4), %esi
leaq 0x3290(%rip), %rdi      # 0x7785
xorl %eax, %eax
callq 0x249f
movl $0xffffffff, %ebp       # imm = 0xFFFFFFFF
incq %r15
decq %r13
addq $0x4, %r14
cmpl 0x1c(%rsp), %r15d
jne 0x445c
cmpb $0x0, 0x6d0b(%rip)      # 0xb228
jne 0x4559
leaq 0x28(%rsp), %rbx
movl $0x90, %edx
movq %rbx, %rdi
xorl %esi, %esi
callq 0x2180
movq $0x1, -0x8(%rbx)
movq %rbx, %rdi
movl $0x2, %esi
callq 0x23a0
leaq 0x20(%rsp), %rsi
movl $0x2, %edi
xorl %edx, %edx
callq 0x20a0
movl %ebp, %eax
addq $0xb8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O3/ebiggers[P]mysh/mysh_main.c
// Function: source_myshrc
static void source_myshrc()
{
	/* source $HOME/.myshrc */
	char *home = getenv("HOME");
	if (home) {
		size_t len = strlen(home);
		char filename[len + sizeof("/.myshrc")];
		stpcpy(filename, home);
		strcat(filename, "/.myshrc");
		do_source(filename, 0, NULL);
	}
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %rbx
pushq %rax
leaq 0x2abe(%rip), %rdi      # 0x7277
callq 0x2030
testq %rax, %rax
je 0x4818
movq %rax, %rbx
movq %rax, %rdi
callq 0x2100
movq %rsp, %r15
movq %rsp, %r14
addq $0x18, %rax
andq $-0x10, %rax
subq %rax, %r14
movq %r14, %rsp
movq %r14, %rdi
movq %rbx, %rsi
callq 0x2070
movq %r14, %rdi
callq 0x2100
movabsq $0x63726873796d2e2f, %rcx # imm = 0x63726873796D2E2F
movq %rcx, (%rax,%r14)
movb $0x0, 0x8(%rax,%r14)
movq %r14, %rdi
xorl %esi, %esi
xorl %edx, %edx
callq 0x39f5
movq %r15, %rsp
leaq -0x18(%rbp), %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
nop
// File: /workspace/github_c_makefile_star2_O3/ebiggers[P]mysh/mysh_param.c
// Function: export_variable
int export_variable(const char *name)
{
	const char *value = lookup_shell_param(name);
	int ret;
	if (value)
		ret = setenv(name, value, 1);
	else
		ret = unsetenv(name);
	if (ret)
		mysh_error_with_errno("can't export variable %s", name);
	return ret;
}

// Assembly:
pushq %rbp
pushq %rbx
pushq %rax
movq %rdi, %rbx
callq 0x2100
movq %rbx, %rdi
movq %rax, %rsi
xorl %edx, %edx
callq 0x4d1b
movq %rbx, %rdi
testq %rax, %rax
je 0x4b35
movq %rax, %rsi
movl $0x1, %edx
callq 0x20d0
jmp 0x4b3a
callq 0x22f0
movl %eax, %ebp
testl %eax, %eax
je 0x4b51
leaq 0x2d31(%rip), %rdi      # 0x7878
movq %rbx, %rsi
xorl %eax, %eax
callq 0x249f
movl %ebp, %eax
addq $0x8, %rsp
popq %rbx
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O3/ebiggers[P]mysh/mysh_param.c
// Function: init_param_map
static void init_trie_slot_tabs()
{
	unsigned i, n;
	for (i = 0; i < 256; i++)
		trie_char_to_slot_tab[i] = -1;
	n = 0;
	for (i = 0; i < ARRAY_SIZE(trie_slot_ranges); i++) {
		unsigned char range_begin = trie_slot_ranges[i][0];
		unsigned char range_end = trie_slot_ranges[i][1];
		unsigned char c;
		for (c = range_begin; c <= range_end; c++) {
			trie_char_to_slot_tab[c] = n;
			trie_slot_to_char_tab[n] = c;
			n++;
		}
	}
	mysh_assert(n == NUM_SHELL_PARAM_VALID_CHARS);
}

// Assembly:
pushq %rbx
leaq 0x6997(%rip), %rbx      # 0xb510
movl $0x100, %edx            # imm = 0x100
movq %rbx, %rdi
movl $0xff, %esi
callq 0x2180
xorl %eax, %eax
leaq 0x2f6d(%rip), %rcx      # 0x7b01
leaq 0x6a75(%rip), %rdx      # 0xb610
xorl %esi, %esi
movb (%rcx,%rax,2), %dil
movb 0x1(%rcx,%rax,2), %r8b
cmpb %r8b, %dil
ja 0x4bc1
movzbl %dil, %edi
movb %sil, (%rdi,%rbx)
movl %esi, %r9d
movb %dil, (%r9,%rdx)
incl %esi
incb %dil
jmp 0x4ba6
incq %rax
cmpq $0x4, %rax
jne 0x4b9d
cmpl $0x3f, %esi
jne 0x4bf8
movq 0x63fa(%rip), %rax      # 0xafd0
movq (%rax), %rbx
movq (%rbx), %rdi
testq %rdi, %rdi
je 0x4bf6
addq $0x8, %rbx
callq 0x4ac0
movq (%rbx), %rdi
addq $0x8, %rbx
testq %rdi, %rdi
jne 0x4be5
popq %rbx
retq
leaq 0x2e28(%rip), %rdi      # 0x7a27
leaq 0x2cd0(%rip), %rsi      # 0x78d6
leaq 0x2e3b(%rip), %rcx      # 0x7a48
movl $0x40, %edx
callq 0x2160
// File: /workspace/github_c_makefile_star2_O3/ebiggers[P]mysh/mysh_param.c
// Function: free_param_trie
static void free_param_trie(struct param_trie_node *node)
{
	size_t i, j;
	for (i = 0; i < ARRAY_SIZE(node->children); i++) {
		if (node->children[i]) {
			free_param_trie(node->children[i]);


			for (j = 0; j < NUM_VALUES; j++)
				free(node->children[i]->values[j]);
			free(node->children[i]);
			node->children[i] = NULL;
			mysh_assert(node->num_children > 0);
			node->num_children--;
		}
	}
	mysh_assert(node->num_children == 0);

}

// Assembly:
pushq %r14
pushq %rbx
pushq %rax
movq %rdi, %rbx
xorl %r14d, %r14d
movq (%rbx,%r14,8), %rdi
testq %rdi, %rdi
je 0x4c7f
callq 0x4c20
movq (%rbx,%r14,8), %rax
movq 0x208(%rax), %rdi
callq 0x2050
movq (%rbx,%r14,8), %rax
movq 0x210(%rax), %rdi
callq 0x2050
movq (%rbx,%r14,8), %rdi
callq 0x2050
movq $0x0, (%rbx,%r14,8)
movq 0x218(%rbx), %rax
testq %rax, %rax
je 0x4c9a
decq %rax
movq %rax, 0x218(%rbx)
incq %r14
cmpq $0x3f, %r14
jne 0x4c2a
cmpq $0x0, 0x218(%rbx)
jne 0x4cb9
addq $0x8, %rsp
popq %rbx
popq %r14
retq
leaq 0x2dc2(%rip), %rdi      # 0x7a63
leaq 0x2c2e(%rip), %rsi      # 0x78d6
leaq 0x2dcb(%rip), %rcx      # 0x7a7a
movl $0xcc, %edx
callq 0x2160
leaq 0x2de9(%rip), %rdi      # 0x7aa9
leaq 0x2c0f(%rip), %rsi      # 0x78d6
leaq 0x2dac(%rip), %rcx      # 0x7a7a
movl $0xd0, %edx
callq 0x2160
// File: /workspace/github_c_makefile_star2_O3/ebiggers[P]mysh/mysh_param.c
// Function: string_matches_param_assignment
bool string_matches_param_assignment(const struct string *s)
{
	size_t i;
	if (!(shell_char_type(s->chars[0]) & SHELL_NORMAL_PARAM_FIRST_CHAR))
		return false;
	for (i = 1; i < s->len; i++)
		if (!(shell_char_type(s->chars[i]) & SHELL_NORMAL_PARAM_CHAR))
			return (s->chars[i] == '=');
	return false;
}

// Assembly:
movq (%rdi), %rax
movzbl (%rax), %edx
leaq 0x2e2b(%rip), %rcx      # 0x7b10
testb $0x5, (%rcx,%rdx)
je 0x4d0c
movq 0x8(%rdi), %rdx
cmpq $0x2, %rdx
jb 0x4d0c
movl $0x1, %esi
movzbl (%rax,%rsi), %edi
testb $0x7, (%rcx,%rdi)
je 0x4d0f
incq %rsi
cmpq %rsi, %rdx
jne 0x4cfa
xorl %eax, %eax
retq
cmpb $0x3d, %dil
sete %al
retq
// File: /workspace/github_c_makefile_star2_O3/ebiggers[P]mysh/mysh_param.c
// Function: do_lookup_shell_variable
static const char *
do_lookup_shell_variable(const char *name, size_t len, int value_idx)
{
	struct param_trie_node *node = &param_trie_root;
	while (len--) {
		int slot = trie_get_slot(*name++);
		if (slot < 0)
			return NULL;
		mysh_assert(slot < ARRAY_SIZE(node->children));
		node = node->children[slot];
		if (!node)
			return NULL;
	}
	return node->values[value_idx];
}

// Assembly:
pushq %rax
leaq 0x659d(%rip), %rcx      # 0xb2c0
movb 0x6860(%rip), %r8b      # 0xb58a
xorl %eax, %eax
leaq 0x67dd(%rip), %r9       # 0xb510
xorl %r10d, %r10d
cmpq %r10, %rsi
je 0x4d63
testb %r8b, %r8b
je 0x4d6f
movzbl (%rdi,%r10), %r11d
movsbq (%r11,%r9), %r11
testq %r11, %r11
js 0x4d6d
cmpb $0x3f, %r11b
jae 0x4d8e
movq (%rcx,%r11,8), %rcx
incq %r10
testq %rcx, %rcx
jne 0x4d36
jmp 0x4d6d
movl %edx, %eax
movq 0x208(%rcx,%rax,8), %rax
popq %rcx
retq
leaq 0x2c79(%rip), %rdi      # 0x79ef
leaq 0x2b59(%rip), %rsi      # 0x78d6
leaq 0x2c8b(%rip), %rcx      # 0x7a0f
movl $0x45, %edx
callq 0x2160
leaq 0x2b93(%rip), %rdi      # 0x7928
leaq 0x2b3a(%rip), %rsi      # 0x78d6
leaq 0x2d1e(%rip), %rcx      # 0x7ac1
movl $0x100, %edx            # imm = 0x100
callq 0x2160
// File: /workspace/github_c_makefile_star2_O3/ebiggers[P]mysh/mysh_param.c
// Function: do_print_all_shell_variables
static int do_print_all_shell_variables(struct param_trie_node *node,
					int value_idx, const char *format)
{
	size_t i;
	int ret = 0;

	if (node->values[value_idx]) {
		ret = node_print_variable(node, value_idx, format);
		if (ret)
			goto out;
	}
	for (i = 0; i < ARRAY_SIZE(node->children); i++) {
		if (node->children[i]) {
			ret = do_print_all_shell_variables(node->children[i],
							   value_idx, format);
			if (ret)
				goto out;
		}
	}
out:
	return ret;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %rbx
pushq %rax
movq %rdx, %rbx
movl %esi, %ebp
movq %rdi, %r14
movl %esi, %eax
cmpq $0x0, 0x208(%rdi,%rax,8)
je 0x4fd5
movq %r14, %rdi
movl %ebp, %esi
movq %rbx, %rdx
callq 0x53ac
testl %eax, %eax
jne 0x4ffa
xorl %r15d, %r15d
movq (%r14,%r15,8), %rdi
testq %rdi, %rdi
je 0x4fef
movl %ebp, %esi
movq %rbx, %rdx
callq 0x4fa8
testl %eax, %eax
jne 0x4ffa
incq %r15
cmpq $0x3f, %r15
jne 0x4fd8
xorl %eax, %eax
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O3/ebiggers[P]mysh/mysh_param.c
// Function: set_positional_params
void set_positional_params(int num_params, const char *param0,
			   const char * const *params)
{
	unsigned i;
	destroy_positional_params();
	num_positional_parameters = num_params;
	positional_parameters = xmalloc((num_positional_parameters + 1) * sizeof(char *));
	positional_parameters[0] = xstrdup(param0);
	for (i = 0; i < num_positional_parameters; i++)
		positional_parameters[i + 1] = xstrdup(params[i]);
}

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
movq %rdx, %rbx
movq %rsi, %r14
movl %edi, %r15d
callq 0x534e
movl %r15d, 0x6203(%rip)     # 0xb4f4
incl %r15d
shlq $0x3, %r15
movq %r15, %rdi
callq 0x6540
movq %rax, 0x61f1(%rip)      # 0xb4f8
movq %r14, %rdi
callq 0x657b
movq 0x61e2(%rip), %rcx      # 0xb4f8
movq %rax, (%rcx)
cmpl $0x0, 0x61d4(%rip)      # 0xb4f4
je 0x5348
xorl %r14d, %r14d
movq (%rbx,%r14,8), %rdi
callq 0x657b
movq 0x61c3(%rip), %rcx      # 0xb4f8
movq %rax, 0x8(%rcx,%r14,8)
incq %r14
movl 0x61b1(%rip), %eax      # 0xb4f4
cmpq %rax, %r14
jb 0x5325
popq %rbx
popq %r14
popq %r15
retq
// File: /workspace/github_c_makefile_star2_O3/ebiggers[P]mysh/mysh_param.c
// Function: destroy_positional_params
void destroy_positional_params()
{
	unsigned i;
	if (positional_parameters) {
		for (i = 0; i <= num_positional_parameters; i++)
			free(positional_parameters[i]);
		free(positional_parameters);
		positional_parameters = NULL;
		if (all_positional_params) {
			free(all_positional_params);
			all_positional_params = NULL;
		}
	}
}

// Assembly:
cmpq $0x0, 0x61a2(%rip)      # 0xb4f8
je 0x53ab
pushq %rbx
xorl %ebx, %ebx
movq 0x6196(%rip), %rax      # 0xb4f8
movl %ebx, %ecx
movq (%rax,%rcx,8), %rdi
callq 0x2050
incl %ebx
cmpl 0x617f(%rip), %ebx      # 0xb4f4
jbe 0x535b
movq 0x617a(%rip), %rdi      # 0xb4f8
callq 0x2050
movq $0x0, 0x616a(%rip) # 0xb4f8
movq 0x616b(%rip), %rdi      # 0xb500
testq %rdi, %rdi
je 0x53aa
callq 0x2050
movq $0x0, 0x6156(%rip) # 0xb500
popq %rbx
retq
// File: /workspace/github_c_makefile_star2_O3/ebiggers[P]mysh/mysh_param.c
// Function: node_print_variable
static int node_print_variable(struct param_trie_node *node,
			       int value_idx, const char *format)
{
	size_t len;
	size_t i;
	struct param_trie_node *p;
	int ret;

	p = node;
	len = 0;
	while (p != &param_trie_root) {
		p = p->parent;
		len++;
	}
	char name[len + 1];
	name[len] = '\0';

	p = node;
	i = len - 1;
	do {
		name[i] = trie_slot_to_char_tab[p->parent_child_ptr - p->parent->children];
		p = p->parent;
	} while (i-- != 0);

	ret = printf(format, name, node->values[value_idx]);
	if (ret >= 0)
		ret = 0;
	else
		mysh_error_with_errno("write error");
	return ret;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r14
pushq %rbx
movq %rdx, %rcx
leaq 0x5f03(%rip), %rax      # 0xb2c0
xorl %edx, %edx
cmpq %rax, %rdi
je 0x53d6
movq %rdi, %r8
movq 0x1f8(%r8), %r8
incq %rdx
cmpq %rax, %r8
jne 0x53c7
movq %rsp, %rax
leaq 0x10(%rdx), %r8
andq $-0x10, %r8
subq %r8, %rax
movq %rax, %rsp
movb $0x0, (%rdx,%rax)
leaq 0x621e(%rip), %r8       # 0xb610
movq %rdi, %r9
movq 0x200(%r9), %r10
movq 0x1f8(%r9), %r9
subq %r9, %r10
sarq $0x3, %r10
movb (%r10,%r8), %r10b
movb %r10b, -0x1(%rax,%rdx)
decq %rdx
jne 0x53f5
movl %esi, %edx
movq 0x208(%rdi,%rdx,8), %rdx
xorl %ebx, %ebx
movq %rcx, %rdi
movq %rax, %rsi
xorl %eax, %eax
callq 0x2140
testl %eax, %eax
jns 0x5449
movl %eax, %r14d
leaq 0x1eb7(%rip), %rdi      # 0x72f6
xorl %eax, %eax
callq 0x249f
movl %r14d, %ebx
movl %ebx, %eax
leaq -0x10(%rbp), %rsp
popq %rbx
popq %r14
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O3/ebiggers[P]mysh/mysh_parse.c
// Function: glue_strings
static int glue_strings(struct list_head *string_list)
{
	struct string *s, *tmp;
	LIST_HEAD(new_list);
	while (!list_empty(string_list)) {
		struct list_head *first = string_list->next;
		int flags;
		/* Glue one string */
		LIST_HEAD(glue_list);
		list_move_tail(first, &glue_list);
		list_for_each_entry_safe(s, tmp, string_list, list) {
			if (s->flags & STRING_FLAG_PRECEDING_WHITESPACE)
				break;
			else
				list_move_tail(&s->list, &glue_list);
		}
		/* Detect variable assignments
		 * TODO: Somehow make it so that unquoted strings where
		 * parameter expansion has occurred on the left side of the
		 * equals sign are not considered variable assignments. */
		s = list_entry(first, struct string, list);
		if (s->flags & STRING_FLAG_UNQUOTED &&
		    string_matches_param_assignment(s))
			flags = STRING_FLAG_VAR_ASSIGNMENT;
		else
			flags = 0;
		s = join_strings(&glue_list);
		s->flags = flags;
		list_add_tail(&s->list, &new_list);
	}
	/* Replace @string_list with the list of glued strings */
	list_splice_tail(&new_list, string_list);
	return 0;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %rbx
subq $0x28, %rsp
movq %rdi, %rbx
leaq 0x18(%rsp), %r15
movq %r15, (%r15)
movq %r15, 0x8(%r15)
movq (%rdi), %rdi
cmpq %rbx, %rdi
je 0x5fee
leaq 0x8(%rsp), %r14
movq %r14, 0x8(%rsp)
movq %r14, 0x10(%rsp)
movq (%rdi), %rax
movq 0x8(%rdi), %rcx
movq %rcx, 0x8(%rax)
movq %rax, (%rcx)
movq 0x10(%rsp), %rax
movq %rdi, 0x10(%rsp)
movq %r14, (%rdi)
movq %rax, 0x8(%rdi)
movq %rdi, (%rax)
movq (%rbx), %rax
cmpq %rbx, %rax
je 0x5f87
testb $0x10, -0x8(%rax)
jne 0x5f87
movq (%rax), %rcx
movq 0x8(%rax), %rdx
movq %rdx, 0x8(%rcx)
movq %rcx, (%rdx)
movq 0x10(%rsp), %rdx
movq %rax, 0x10(%rsp)
movq %r14, (%rax)
movq %rdx, 0x8(%rax)
movq %rax, (%rdx)
movq %rcx, %rax
cmpq %rbx, %rcx
jne 0x5f57
testb $0x1, -0x8(%rdi)
je 0x5f9f
addq $-0x18, %rdi
callq 0x4cd8
movl $0x200, %ebp            # imm = 0x200
testb %al, %al
jne 0x5fa1
xorl %ebp, %ebp
movq %r14, %rdi
callq 0x66b8
movl %ebp, 0x10(%rax)
leaq 0x18(%rax), %rcx
movq 0x20(%rsp), %rdx
movq %rcx, 0x20(%rsp)
movq %r15, 0x18(%rax)
movq %rdx, 0x20(%rax)
movq %rcx, (%rdx)
movq (%rbx), %rdi
cmpq %rbx, %rdi
jne 0x5f23
movq 0x18(%rsp), %rdx
cmpq %r15, %rdx
je 0x5fee
movq 0x8(%rbx), %rsi
movq %rsi, 0x8(%rdx)
movq %rdx, (%rsi)
movq %rbx, 0x18(%rax)
movq %rcx, 0x8(%rbx)
addq $0x28, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O3/ebiggers[P]mysh/mysh_parse.c
// Function: do_filename_expansion
static int do_filename_expansion(struct list_head *string_list)
{
	struct string *s, *tmp;
	int ret = 0;

	LIST_HEAD(new_list);
	list_for_each_entry_safe(s, tmp, string_list, list)
		ret |= string_do_filename_expansion(s, &new_list);
	INIT_LIST_HEAD(string_list);
	if (ret)
		free_string_list(&new_list);
	else
		list_splice_tail(&new_list, string_list);
	return ret;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x68, %rsp
movq %rdi, %rbx
leaq 0x8(%rsp), %r13
movq %r13, (%r13)
movq %r13, 0x8(%r13)
movq (%rdi), %r15
cmpq %rdi, %r15
je 0x6145
leaq 0x20(%rsp), %r14
xorl %ebp, %ebp
movq %rbx, 0x18(%rsp)
movq %r15, %r12
movq (%r15), %r15
movq -0x18(%r12), %rdi
movl $0x1440, %esi           # imm = 0x1440
xorl %edx, %edx
movq %r14, %rcx
callq 0x2330
testl %eax, %eax
je 0x6090
cmpl $0x3, %eax
je 0x6073
cmpl $0x1, %eax
je 0x6179
leaq 0x1d74(%rip), %rdi      # 0x7dd6
xorl %eax, %eax
callq 0x249f
movl $0xffffffff, %eax       # imm = 0xFFFFFFFF
jmp 0x6123
movq 0x10(%rsp), %rax
movq %r12, 0x10(%rsp)
movq %r13, (%r12)
movq %rax, 0x8(%r12)
movq %r12, (%rax)
xorl %eax, %eax
jmp 0x6123
movl -0x8(%r12), %r14d
addq $-0x18, %r12
cmpq $0x1, 0x20(%rsp)
ja 0x60b6
movq 0x28(%rsp), %rax
movq (%rax), %rdi
movq (%r12), %rsi
callq 0x2230
testl %eax, %eax
je 0x60ba
orl $0x40, %r14d
movq %r12, %rdi
callq 0x665c
cmpq $0x0, 0x20(%rsp)
je 0x610f
xorl %ebx, %ebx
movq 0x28(%rsp), %rax
movq (%rax,%rbx,8), %r12
movq %r12, %rdi
callq 0x2100
movq %r12, %rdi
movq %rax, %rsi
callq 0x65e6
movl %r14d, 0x10(%rax)
leaq 0x18(%rax), %rcx
movq 0x10(%rsp), %rdx
movq %rcx, 0x10(%rsp)
movq %r13, 0x18(%rax)
movq %rdx, 0x20(%rax)
movq %rcx, (%rdx)
incq %rbx
cmpq 0x20(%rsp), %rbx
jb 0x60cc
leaq 0x20(%rsp), %r14
movq %r14, %rdi
callq 0x2040
xorl %eax, %eax
movq 0x18(%rsp), %rbx
orl %eax, %ebp
cmpq %rbx, %r15
jne 0x602f
movq %rbx, (%rbx)
movq %rbx, 0x8(%rbx)
testl %ebp, %ebp
je 0x6149
leaq 0x8(%rsp), %rdi
callq 0x6677
jmp 0x6168
movq %rbx, 0x8(%rbx)
movq 0x8(%rsp), %rax
xorl %ebp, %ebp
cmpq %r13, %rax
je 0x6168
movq 0x10(%rsp), %rcx
movq %rbx, 0x8(%rax)
movq %rax, (%rbx)
movq %rbx, (%rcx)
movq %rcx, 0x8(%rbx)
movl %ebp, %eax
addq $0x68, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
leaq 0x1c48(%rip), %rdi      # 0x7dc8
xorl %eax, %eax
callq 0x249f
movl $0x1, %edi
callq 0x2350
// File: /workspace/github_c_makefile_star2_O3/ebiggers[P]mysh/mysh_parse.c
// Function: expand_single_string
static int expand_single_string(struct token *tok, struct token *next,
				struct string **string_ret)
{
	int ret;
	LIST_HEAD(string_list);
	ret = expand_params_and_word_split(tok, next, &string_list);
	if (ret)
		goto out_free_string_list;
	ret = glue_strings(&string_list);
	if (ret)
		goto out_free_string_list;
	if (!mysh_filename_expansion_disabled) {
		ret = do_filename_expansion(&string_list);
		if (ret)
			goto out_free_string_list;
	}
	if (list_empty(&string_list))
		*string_ret = NULL;
	else if (list_is_singular(&string_list))
		*string_ret = list_entry(string_list.next, struct string, list);
	else {
		ret = -1;
		goto out_free_string_list;
	}
out:
	return ret;
out_free_string_list:
	free_string_list(&string_list);
	goto out;
}

// Assembly:
pushq %rbp
pushq %r14
pushq %rbx
subq $0x10, %rsp
movq %rdx, %rbx
movq %rsp, %r14
movq %r14, (%r14)
movq %r14, 0x8(%r14)
movq %r14, %rdx
callq 0x5ca4
movq %r14, %rdi
callq 0x5ef9
leaq 0x5073(%rip), %rax      # 0xb230
cmpl $0x0, (%rax)
je 0x61e0
movq (%rsp), %rax
cmpq %r14, %rax
je 0x61f8
movl $0xffffffff, %ebp       # imm = 0xFFFFFFFF
cmpq 0x8(%rsp), %rax
jne 0x61ee
addq $-0x18, %rax
movq %rax, (%rbx)
jmp 0x61ff
movq %rsp, %rdi
callq 0x5ff9
movl %eax, %ebp
testl %eax, %eax
je 0x61c2
movq %rsp, %rdi
callq 0x6677
jmp 0x6201
movq $0x0, (%rbx)
xorl %ebp, %ebp
movl %ebp, %eax
addq $0x10, %rsp
popq %rbx
popq %r14
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O3/ebiggers[P]mysh/mysh_redir.c
// Function: undo_redirections
int undo_redirections(const struct orig_fds *orig)
{
	int ret = 0;
	int i;
	for (i = 0; i < ARRAY_SIZE(orig->fds); i++) {
		if (orig->fds[i] >= 0) {
			if (dup2(orig->fds[i], i) < 0)
				ret = -1;
			if (close(orig->fds[i]) < 0)
				ret = -1;
		}
	}
	return ret;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
movq %rdi, %rbx
xorl %r14d, %r14d
movl $0xffffffff, %r12d      # imm = 0xFFFFFFFF
xorl %ebp, %ebp
movl (%rbx,%r14,4), %edi
testl %edi, %edi
js 0x6405
movl %r14d, %esi
callq 0x2120
movl %eax, %r15d
movl (%rbx,%r14,4), %edi
callq 0x21c0
orl %r15d, %eax
cmovsl %r12d, %ebp
incq %r14
cmpq $0x3, %r14
jne 0x63e2
movl %ebp, %eax
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O3/ebiggers[P]mysh/mysh_redir.c
// Function: do_redirections
int do_redirections(const struct list_head *redirs, struct orig_fds *orig)
{
	int i;
	int ret;
	struct redirection *redir;

	if (orig)
		for (i = 0; i < ARRAY_SIZE(orig->fds); i++)
			orig->fds[i] = -1;
	list_for_each_entry(redir, redirs, list) {
		int src_fd;
		if (redir->is_file) {
			src_fd = open(redir->src_filename, redir->open_flags, 0666);
			if (src_fd < 0) {
				mysh_error_with_errno("can't open %s for %s",
						      redir->src_filename,
						      (redir->open_flags & O_WRONLY)
						      ? "writing" : "reading");
				ret = -1;
				goto out_undo_redirections;
			}
		} else {
			src_fd = redir->src_fd;
		}

		if (orig &&
		    redir->dest_fd < ARRAY_SIZE(orig->fds) &&
		    orig->fds[redir->dest_fd] < 0)
		{
			ret = dup(redir->dest_fd);
			if (ret < 0) {
				mysh_error_with_errno("failed to duplicate "
						      "file descriptor");
				goto out_undo_redirections;
			}
			orig->fds[redir->dest_fd] = ret;
		}
		ret = dup2(src_fd, redir->dest_fd);
		if (redir->is_file)
			close(src_fd);
		if (ret < 0) {
			mysh_error_with_errno("can't perform redirection");
			goto out_undo_redirections;
		}
	}
	ret = 0;
	goto out;
out_undo_redirections:
	if (orig)
		(void)undo_redirections(orig);
out:
	return ret;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movq %rsi, %rbx
movq %rdi, %r14
testq %rsi, %rsi
je 0x643d
movl $0xffffffff, 0x8(%rbx)  # imm = 0xFFFFFFFF
movq $-0x1, (%rbx)
xorl %ebp, %ebp
movq %r14, %r13
movq (%r13), %r13
cmpq %r14, %r13
je 0x651d
cmpb $0x1, -0x20(%r13)
jne 0x6473
movq -0x18(%r13), %rdi
movl -0x10(%r13), %esi
movl $0x1b6, %edx            # imm = 0x1B6
xorl %eax, %eax
callq 0x22c0
movl %eax, %r12d
testl %eax, %eax
jns 0x6477
jmp 0x64db
movl -0x18(%r13), %r12d
testq %rbx, %rbx
je 0x64a4
movl -0x8(%r13), %edi
cmpq $0x2, %rdi
ja 0x64a4
cmpl $0x0, (%rbx,%rdi,4)
jns 0x64a4
callq 0x2150
movl %eax, %r15d
testl %eax, %eax
js 0x652e
movslq -0x8(%r13), %rax
movl %r15d, (%rbx,%rax,4)
movl -0x8(%r13), %esi
movl %r12d, %edi
callq 0x2120
movl %eax, %r15d
cmpb $0x1, -0x20(%r13)
jne 0x64c2
movl %r12d, %edi
callq 0x21c0
testl %r15d, %r15d
jns 0x6442
leaq 0x1a38(%rip), %rdi      # 0x7f0a
xorl %eax, %eax
callq 0x249f
jmp 0x650a
movq -0x18(%r13), %rsi
testb $0x1, -0x10(%r13)
leaq 0x19f3(%rip), %rax      # 0x7ede
leaq 0x19e4(%rip), %rdx      # 0x7ed6
cmoveq %rax, %rdx
leaq 0x19c4(%rip), %rdi      # 0x7ec1
xorl %eax, %eax
callq 0x249f
movl $0xffffffff, %r15d      # imm = 0xFFFFFFFF
movl %r15d, %ebp
testq %rbx, %rbx
je 0x651d
movq %rbx, %rdi
callq 0x63cc
movl %r15d, %ebp
movl %ebp, %eax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
leaq 0x19b1(%rip), %rdi      # 0x7ee6
xorl %eax, %eax
callq 0x249f
jmp 0x6512
nop
// File: /workspace/github_c_makefile_star2_O3/ebiggers[P]mysh/mysh_util.c
// Function: xstrdup
char *xstrdup(const char *s)
{
	if (!s)
		return NULL;
	char *p = strdup(s);
	if (!p) {
		mysh_error("out of memory");
		exit(-1);
	}
	return p;
}

// Assembly:
pushq %rax
testq %rdi, %rdi
je 0x6590
callq 0x2370
testq %rax, %rax
jne 0x6592
callq 0x25af
xorl %eax, %eax
popq %rcx
retq
// File: /workspace/github_c_makefile_star2_O3/ebiggers[P]mysh/mysh_util.c
// Function: free_string_list
void
free_string_list(struct list_head *string_list)
{
	struct string *s, *tmp;
	list_for_each_entry_safe(s, tmp, string_list, list) {
		list_del(&s->list);
		free_string(s);
	}
}

// Assembly:
movq (%rdi), %rax
cmpq %rdi, %rax
je 0x66b7
pushq %r15
pushq %r14
pushq %rbx
movq %rdi, %rbx
leaq -0x18(%rax), %r14
movq (%rax), %r15
movq 0x8(%rax), %rcx
movq %rcx, 0x8(%r15)
movq %r15, (%rcx)
movq -0x18(%rax), %rdi
callq 0x2050
movq %r14, %rdi
callq 0x2050
movq %r15, %rax
cmpq %rbx, %r15
jne 0x6687
popq %rbx
popq %r14
popq %r15
retq
// File: /workspace/github_c_makefile_star2_O3/ebiggers[P]mysh/mysh_util.c
// Function: join_strings
struct string *
join_strings(struct list_head *strings)
{
	struct string *s, *new, *tmp;
	size_t len = 0;
	char *p;

	mysh_assert(!list_empty(strings));
	if (list_is_singular(strings)) /* no-op */
		return list_entry(strings->next, struct string, list);
	list_for_each_entry(s, strings, list)
		len += s->len;
	new = new_string(len);
	p = new->chars;
	list_for_each_entry_safe(s, tmp, strings, list) {
		p = mempcpy(p, s->chars, s->len);
		free_string(s);
	}
	return new;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movq (%rdi), %rbx
cmpq %rdi, %rbx
je 0x6784
movq %rdi, %r14
cmpq 0x8(%rdi), %rbx
je 0x676e
xorl %r13d, %r13d
addq -0x10(%rbx), %r13
movq (%rbx), %rbx
cmpq %r14, %rbx
jne 0x66df
movl $0x28, %edi
callq 0x6540
movq %rax, %rbx
leaq 0x1(%r13), %r12
movq %r12, %rdi
callq 0x6540
movq %rax, %r15
movq %rax, %rdi
xorl %esi, %esi
movq %r12, %rdx
callq 0x2180
movq %r15, (%rbx)
movq %r13, 0x8(%rbx)
movl $0x0, 0x10(%rbx)
movq (%r14), %rbp
cmpq %r14, %rbp
je 0x6772
leaq -0x18(%rbp), %rax
movq %rax, (%rsp)
movq %r14, %r12
movq (%rbp), %r14
movq -0x18(%rbp), %rsi
movq -0x10(%rbp), %r13
movq %r15, %rdi
movq %r13, %rdx
callq 0x2260
addq %r13, %r15
movq -0x18(%rbp), %rdi
callq 0x2050
movq (%rsp), %rdi
callq 0x2050
movq %r14, %rbp
cmpq %r12, %r14
movq %r12, %r14
jne 0x672a
jmp 0x6772
addq $-0x18, %rbx
movq %rbx, %rax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
leaq 0x17a7(%rip), %rdi      # 0x7f32
leaq 0x17b5(%rip), %rsi      # 0x7f47
leaq 0x17ba(%rip), %rcx      # 0x7f53
movl $0x86, %edx
callq 0x2160