LLM4Binary/decompile-bench-makefile huggingface dataset:
// File: /workspace/github_c_makefile_star2_O0/ebiggers[P]mysh/mysh_builtin.c
// Function: maybe_execute_builtin
bool maybe_execute_builtin(const struct list_head *cmd_args,
			   const struct list_head *redirs,
			   unsigned cmd_nargs, int *status_ret)
{
	const char *name;
	size_t i;

	mysh_assert(!list_empty(cmd_args));
	mysh_assert(cmd_nargs == list_size(cmd_args));
	name = list_entry(cmd_args->next, struct string, list)->chars;
	for (i = 0; i < NUM_BUILTINS; i++) {
		if (strcmp(builtins[i].name, name) == 0) {
			/* The command matched a builtin.  Execute it. */
			*status_ret = execute_builtin(&builtins[i],
						      cmd_args->next,
						      redirs, cmd_nargs - 1);
			return true;
		}
	}
	/* Not a builtin command */
	return false;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x50, %rsp
movq %rdi, -0x10(%rbp)
movq %rsi, -0x18(%rbp)
movl %edx, -0x1c(%rbp)
movq %rcx, -0x28(%rbp)
movq -0x10(%rbp), %rdi
callq 0x2610
cmpl $0x0, %eax
jne 0x2507
jmp 0x2526
leaq 0x7af6(%rip), %rdi      # 0xa004
leaq 0x7b05(%rip), %rsi      # 0xa01a
movl $0x1da, %edx            # imm = 0x1DA
leaq 0x7b08(%rip), %rcx      # 0xa029
callq 0x2160
movl -0x1c(%rbp), %eax
movq %rax, -0x50(%rbp)
movq -0x10(%rbp), %rdi
callq 0x2630
movq %rax, %rcx
movq -0x50(%rbp), %rax
cmpq %rcx, %rax
jne 0x2544
jmp 0x2563
leaq 0x7b43(%rip), %rdi      # 0xa08e
leaq 0x7ac8(%rip), %rsi      # 0xa01a
movl $0x1db, %edx            # imm = 0x1DB
leaq 0x7acb(%rip), %rcx      # 0xa029
callq 0x2160
movq -0x10(%rbp), %rax
movq (%rax), %rax
movq %rax, -0x40(%rbp)
movq -0x40(%rbp), %rax
addq $-0x18, %rax
movq %rax, -0x48(%rbp)
movq -0x48(%rbp), %rax
movq (%rax), %rax
movq %rax, -0x30(%rbp)
movq $0x0, -0x38(%rbp)
cmpq $0x11, -0x38(%rbp)
jae 0x25f7
leaq 0xb675(%rip), %rax      # 0xdc10
imulq $0x18, -0x38(%rbp), %rcx
addq %rcx, %rax
movq (%rax), %rdi
movq -0x30(%rbp), %rsi
callq 0x2230
cmpl $0x0, %eax
jne 0x25e7
leaq 0xb655(%rip), %rdi      # 0xdc10
imulq $0x18, -0x38(%rbp), %rax
addq %rax, %rdi
movq -0x10(%rbp), %rax
movq (%rax), %rsi
movq -0x18(%rbp), %rdx
movl -0x1c(%rbp), %ecx
subl $0x1, %ecx
callq 0x2680
movl %eax, %ecx
movq -0x28(%rbp), %rax
movl %ecx, (%rax)
movb $0x1, -0x1(%rbp)
jmp 0x25fb
jmp 0x25e9
movq -0x38(%rbp), %rax
addq $0x1, %rax
movq %rax, -0x38(%rbp)
jmp 0x258d
movb $0x0, -0x1(%rbp)
movb -0x1(%rbp), %al
andb $0x1, %al
addq $0x50, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/ebiggers[P]mysh/./list.h
// Function: list_size
static inline size_t list_size(const struct list_head *list)
{
	struct list_head *cur;
	size_t size = 0;
	list_for_each(cur, list)
		size++;
	return size;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
movq %rdi, -0x8(%rbp)
movq $0x0, -0x18(%rbp)
movq -0x8(%rbp), %rax
movq (%rax), %rax
movq %rax, -0x10(%rbp)
movq -0x10(%rbp), %rax
cmpq -0x8(%rbp), %rax
je 0x266e
movq -0x18(%rbp), %rax
addq $0x1, %rax
movq %rax, -0x18(%rbp)
movq -0x10(%rbp), %rax
movq (%rax), %rax
movq %rax, -0x10(%rbp)
jmp 0x264b
movq -0x18(%rbp), %rax
popq %rbp
retq
nopw %cs:(%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/ebiggers[P]mysh/mysh_builtin.c
// Function: execute_builtin
static int execute_builtin(const struct builtin *builtin,
			   const struct list_head *cmd_args,
			   const struct list_head *redirs,
			   unsigned cmd_nargs)
{
	struct orig_fds orig;
	const char *argv[cmd_nargs + 1];
	struct string *s;
	unsigned i;
	int status;
	int ret;

	/* Do redirections for the builtin */
	status = do_redirections(redirs, &orig);
	if (status)
		return status;

	/* Prepare argv for the builtin */
	for (i = 0, s = list_entry(cmd_args->next, struct string, list);
	     i < cmd_nargs;
	     i++, s = list_entry(s->list.next, struct string, list))
	{
		argv[i] = s->chars;
	}
	argv[i] = NULL;

	/* Call the built-in function */
	status = builtin->func(cmd_nargs, argv);

	/* Undo redirections for the builtin, unless this was the 'exec' builtin */
	if (builtin->func != builtin_exec) {
		ret = undo_redirections(&orig);
		if (ret) {
			if (status == 0)
				status = ret;
			mysh_error_with_errno("Failed to restore redirections");
		}
	}
	return status;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x80, %rsp
movq %rdi, -0x10(%rbp)
movq %rsi, -0x18(%rbp)
movq %rdx, -0x20(%rbp)
movl %ecx, -0x24(%rbp)
movl -0x24(%rbp), %eax
incl %eax
movq %rsp, %rcx
movq %rcx, -0x38(%rbp)
leaq 0xf(,%rax,8), %rdx
andq $-0x10, %rdx
movq %rsp, %rcx
subq %rdx, %rcx
movq %rcx, -0x80(%rbp)
movq %rcx, %rsp
movq %rax, -0x40(%rbp)
movq -0x20(%rbp), %rdi
leaq -0x30(%rbp), %rsi
callq 0x8a40
movl %eax, -0x50(%rbp)
cmpl $0x0, -0x50(%rbp)
je 0x26eb
movl -0x50(%rbp), %eax
movl %eax, -0x4(%rbp)
movl $0x1, -0x58(%rbp)
jmp 0x27c1
movl $0x0, -0x4c(%rbp)
movq -0x18(%rbp), %rax
movq (%rax), %rax
movq %rax, -0x60(%rbp)
movq -0x60(%rbp), %rax
addq $-0x18, %rax
movq %rax, -0x68(%rbp)
movq -0x68(%rbp), %rax
movq %rax, -0x48(%rbp)
movl -0x4c(%rbp), %eax
cmpl -0x24(%rbp), %eax
jae 0x2756
movq -0x80(%rbp), %rax
movq -0x48(%rbp), %rcx
movq (%rcx), %rdx
movl -0x4c(%rbp), %ecx
movq %rdx, (%rax,%rcx,8)
movl -0x4c(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x4c(%rbp)
movq -0x48(%rbp), %rax
movq 0x18(%rax), %rax
movq %rax, -0x70(%rbp)
movq -0x70(%rbp), %rax
addq $-0x18, %rax
movq %rax, -0x78(%rbp)
movq -0x78(%rbp), %rax
movq %rax, -0x48(%rbp)
jmp 0x2711
movq -0x80(%rbp), %rsi
movl -0x4c(%rbp), %eax
movq $0x0, (%rsi,%rax,8)
movq -0x10(%rbp), %rax
movq 0x8(%rax), %rax
movl -0x24(%rbp), %edi
callq *%rax
movl %eax, -0x50(%rbp)
movq -0x10(%rbp), %rax
leaq 0x3d0(%rip), %rcx       # 0x2b50
cmpq %rcx, 0x8(%rax)
je 0x27b4
leaq -0x30(%rbp), %rdi
callq 0x89b0
movl %eax, -0x54(%rbp)
cmpl $0x0, -0x54(%rbp)
je 0x27b2
cmpl $0x0, -0x50(%rbp)
jne 0x27a4
movl -0x54(%rbp), %eax
movl %eax, -0x50(%rbp)
leaq 0x7bd6(%rip), %rdi      # 0xa381
movb $0x0, %al
callq 0x8cf0
jmp 0x27b4
movl -0x50(%rbp), %eax
movl %eax, -0x4(%rbp)
movl $0x1, -0x58(%rbp)
movq -0x38(%rbp), %rax
movq %rax, %rsp
movl -0x4(%rbp), %eax
movq %rbp, %rsp
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O0/ebiggers[P]mysh/mysh_builtin.c
// Function: set_pwd
int set_pwd()
{
	char *wd = getcwd(NULL, 0);
	int ret;
	if (wd) {
		const char *setenv_argv[] = {"PWD", wd, NULL};
		ret = builtin_setenv(ARRAY_SIZE(setenv_argv) - 1, setenv_argv);
		free(wd);
	} else {
		mysh_error("getcwd()");
		ret = 1;
	}
	return ret;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x30, %rsp
xorl %eax, %eax
movl %eax, %esi
movq %rsi, %rdi
callq 0x21a0
movq %rax, -0x8(%rbp)
cmpq $0x0, -0x8(%rbp)
je 0x2826
leaq 0x78b9(%rip), %rax      # 0xa0af
movq %rax, -0x30(%rbp)
movq -0x8(%rbp), %rax
movq %rax, -0x28(%rbp)
movq $0x0, -0x20(%rbp)
leaq -0x30(%rbp), %rsi
movl $0x2, %edi
callq 0x2850
movl %eax, -0xc(%rbp)
movq -0x8(%rbp), %rdi
callq 0x2050
jmp 0x283b
leaq 0x7886(%rip), %rdi      # 0xa0b3
movb $0x0, %al
callq 0x8c20
movl $0x1, -0xc(%rbp)
movl -0xc(%rbp), %eax
addq $0x30, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/ebiggers[P]mysh/mysh_builtin.c
// Function: builtin_setenv
static int builtin_setenv(unsigned argc, const char **argv)
{
	int ret;
	if (argc < 2) {
		mysh_error("usage: setenv VARIABLE VALUE");
		ret = 2;
	} else {
		if (setenv(argv[0], argv[1], 1)) {
			mysh_error_with_errno("setenv %s", argv[0]);
			ret = 1;
		} else {
			insert_shell_param(argv[0], argv[1]);
			ret = 0;
		}
	}
	return ret;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x20, %rsp
movl %edi, -0x4(%rbp)
movq %rsi, -0x10(%rbp)
cmpl $0x2, -0x4(%rbp)
jae 0x287c
leaq 0x7b34(%rip), %rdi      # 0xa3a0
movb $0x0, %al
callq 0x8c20
movl $0x2, -0x14(%rbp)
jmp 0x28d5
movq -0x10(%rbp), %rax
movq (%rax), %rdi
movq -0x10(%rbp), %rax
movq 0x8(%rax), %rsi
movl $0x1, %edx
callq 0x20d0
cmpl $0x0, %eax
je 0x28b8
movq -0x10(%rbp), %rax
movq (%rax), %rsi
leaq 0x7b15(%rip), %rdi      # 0xa3bd
movb $0x0, %al
callq 0x8cf0
movl $0x1, -0x14(%rbp)
jmp 0x28d3
movq -0x10(%rbp), %rax
movq (%rax), %rdi
movq -0x10(%rbp), %rax
movq 0x8(%rax), %rsi
callq 0x5ce0
movl $0x0, -0x14(%rbp)
jmp 0x28d5
movl -0x14(%rbp), %eax
addq $0x20, %rsp
popq %rbp
retq
nop
// File: /workspace/github_c_makefile_star2_O0/ebiggers[P]mysh/mysh_builtin.c
// Function: builtin_source
static int builtin_source(unsigned argc, const char **argv)
{
	if (argc == 0) {
		mysh_error("source: requires filename");
		return 2;
	}
	return do_source(argv[0], argc - 1, &argv[1]);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x10, %rsp
movl %edi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
cmpl $0x0, -0x8(%rbp)
jne 0x290c
leaq 0x7944(%rip), %rdi      # 0xa240
movb $0x0, %al
callq 0x8c20
movl $0x2, -0x4(%rbp)
jmp 0x2929
movq -0x10(%rbp), %rax
movq (%rax), %rdi
movl -0x8(%rbp), %esi
subl $0x1, %esi
movq -0x10(%rbp), %rdx
addq $0x8, %rdx
callq 0x4170
movl %eax, -0x4(%rbp)
movl -0x4(%rbp), %eax
addq $0x10, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/ebiggers[P]mysh/mysh_builtin.c
// Function: builtin_alias
static int builtin_alias(unsigned argc, const char **argv)
{
	int ret;
	if (argc == 0) {
		ret = print_all_shell_aliases();
	} else {
		ret = 0;
		do {
			ret |= do_alias(*argv++);
		} while (--argc);
	}
	return ret;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x20, %rsp
movl %edi, -0x4(%rbp)
movq %rsi, -0x10(%rbp)
cmpl $0x0, -0x4(%rbp)
jne 0x2971
movb $0x0, %al
callq 0x6500
movl %eax, -0x14(%rbp)
jmp 0x29a5
movl $0x0, -0x14(%rbp)
movq -0x10(%rbp), %rax
movq %rax, %rcx
addq $0x8, %rcx
movq %rcx, -0x10(%rbp)
movq (%rax), %rdi
callq 0x31c0
orl -0x14(%rbp), %eax
movl %eax, -0x14(%rbp)
movl -0x4(%rbp), %eax
addl $-0x1, %eax
movl %eax, -0x4(%rbp)
cmpl $0x0, %eax
jne 0x2978
jmp 0x29a5
movl -0x14(%rbp), %eax
addq $0x20, %rsp
popq %rbp
retq
nop
// File: /workspace/github_c_makefile_star2_O0/ebiggers[P]mysh/mysh_builtin.c
// Function: builtin_cd
static int builtin_cd(unsigned argc, const char **argv)
{
	int ret = 1;
	const char *dest_dir;

	if (argc) {
		dest_dir = argv[0];
	} else {
		dest_dir = lookup_shell_param("HOME");
		if (!dest_dir) {
			mysh_error("cd: HOME not set");
			goto out;
		}
	}
	if (chdir(dest_dir) != 0)
		mysh_error_with_errno("cd: %s", dest_dir);
	else
		ret = set_pwd();
out:
	return ret;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x20, %rsp
movl %edi, -0x4(%rbp)
movq %rsi, -0x10(%rbp)
movl $0x1, -0x14(%rbp)
cmpl $0x0, -0x4(%rbp)
je 0x29d9
movq -0x10(%rbp), %rax
movq (%rax), %rax
movq %rax, -0x20(%rbp)
jmp 0x2a02
leaq 0x7897(%rip), %rdi      # 0xa277
callq 0x5e80
movq %rax, -0x20(%rbp)
cmpq $0x0, -0x20(%rbp)
jne 0x2a00
leaq 0x7885(%rip), %rdi      # 0xa27c
movb $0x0, %al
callq 0x8c20
jmp 0x2a2e
jmp 0x2a02
movq -0x20(%rbp), %rdi
callq 0x2110
cmpl $0x0, %eax
je 0x2a24
movq -0x20(%rbp), %rsi
leaq 0x7872(%rip), %rdi      # 0xa28d
movb $0x0, %al
callq 0x8cf0
jmp 0x2a2c
callq 0x27d0
movl %eax, -0x14(%rbp)
jmp 0x2a2e
movl -0x14(%rbp), %eax
addq $0x20, %rsp
popq %rbp
retq
nopw (%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/ebiggers[P]mysh/mysh_builtin.c
// Function: builtin_eval
static int builtin_eval(unsigned argc, const char **argv)
{
	size_t total_len = 0;
	unsigned i;
	char *p;

	if (argc == 0)
		return 0;
	i = 0;
	do {
		total_len += strlen(argv[i]);
	} while (++i != argc);
	total_len += argc - 1;

	char input[total_len + 1];
	p = input;
	i = 0;
	do {
		p = stpcpy(p, argv[i]);
		if (i != argc - 1)
			p = stpcpy(p, " ");
	} while (++i != argc);
	return execute_full_shell_input(input, total_len);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x40, %rsp
movl %edi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq $0x0, -0x18(%rbp)
cmpl $0x0, -0x8(%rbp)
jne 0x2a69
movl $0x0, -0x4(%rbp)
jmp 0x2b3d
movl $0x0, -0x1c(%rbp)
movq -0x10(%rbp), %rax
movl -0x1c(%rbp), %ecx
movq (%rax,%rcx,8), %rdi
callq 0x2100
addq -0x18(%rbp), %rax
movq %rax, -0x18(%rbp)
movl -0x1c(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x1c(%rbp)
cmpl -0x8(%rbp), %eax
jne 0x2a70
movl -0x8(%rbp), %eax
decl %eax
movl %eax, %ecx
movq -0x18(%rbp), %rax
addq %rcx, %rax
movq %rax, -0x18(%rbp)
movq -0x18(%rbp), %rdx
movq %rdx, %rcx
incq %rcx
movq %rsp, %rax
movq %rax, -0x30(%rbp)
addq $0x10, %rdx
andq $-0x10, %rdx
movq %rsp, %rax
subq %rdx, %rax
movq %rax, -0x40(%rbp)
movq %rax, %rsp
movq %rcx, -0x38(%rbp)
movq %rax, -0x28(%rbp)
movl $0x0, -0x1c(%rbp)
movq -0x28(%rbp), %rdi
movq -0x10(%rbp), %rax
movl -0x1c(%rbp), %ecx
movq (%rax,%rcx,8), %rsi
callq 0x20f0
movq %rax, -0x28(%rbp)
movl -0x1c(%rbp), %eax
movl -0x8(%rbp), %ecx
subl $0x1, %ecx
cmpl %ecx, %eax
je 0x2b16
movq -0x28(%rbp), %rdi
leaq 0x7e75(%rip), %rsi      # 0xa982
callq 0x20f0
movq %rax, -0x28(%rbp)
jmp 0x2b18
movl -0x1c(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x1c(%rbp)
cmpl -0x8(%rbp), %eax
jne 0x2add
movq -0x40(%rbp), %rdi
movq -0x18(%rbp), %rsi
callq 0x3bc0
movl %eax, -0x4(%rbp)
movq -0x30(%rbp), %rax
movq %rax, %rsp
movl -0x4(%rbp), %eax
movq %rbp, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/ebiggers[P]mysh/mysh_builtin.c
// Function: builtin_exec
static int builtin_exec(unsigned argc, const char **argv)
{
	if (argc == 0)
		return 0;
	execvp(argv[0], (char**)argv);
	mysh_error_with_errno("failed to execute %s", argv[0]);
	return -1;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x10, %rsp
movl %edi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
cmpl $0x0, -0x8(%rbp)
jne 0x2b6e
movl $0x0, -0x4(%rbp)
jmp 0x2b9a
movq -0x10(%rbp), %rax
movq (%rax), %rdi
movq -0x10(%rbp), %rsi
callq 0x2300
movq -0x10(%rbp), %rax
movq (%rax), %rsi
leaq 0x7708(%rip), %rdi      # 0xa294
movb $0x0, %al
callq 0x8cf0
movl $0xffffffff, -0x4(%rbp) # imm = 0xFFFFFFFF
movl -0x4(%rbp), %eax
addq $0x10, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/ebiggers[P]mysh/mysh_builtin.c
// Function: builtin_export
static int builtin_export(unsigned argc, const char **argv)
{
	int ret = 0;
	unsigned i;
	for (i = 0; i < argc; i++) {
		ret = do_export(argv[i]);
		if (ret)
			break;
	}
	return ret;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x20, %rsp
movl %edi, -0x4(%rbp)
movq %rsi, -0x10(%rbp)
movl $0x0, -0x14(%rbp)
movl $0x0, -0x18(%rbp)
movl -0x18(%rbp), %eax
cmpl -0x4(%rbp), %eax
jae 0x2c3d
movq -0x10(%rbp), %rax
movl -0x18(%rbp), %ecx
movq (%rax,%rcx,8), %rdi
callq 0x3230
movl %eax, -0x14(%rbp)
cmpl $0x0, -0x14(%rbp)
je 0x2c30
jmp 0x2c3d
jmp 0x2c32
movl -0x18(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x18(%rbp)
jmp 0x2c0d
movl -0x14(%rbp), %eax
addq $0x20, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/ebiggers[P]mysh/mysh_builtin.c
// Function: builtin_getenv
static int builtin_getenv(unsigned argc, const char **argv)
{
	int ret = 0;
	if (argc) {
		const char *value = getenv(argv[0]);
		if (value) {
			if (puts(value) == EOF) {
				mysh_error_with_errno("getenv: write error");
				ret = 1;
			}
		} else
			ret = 2;
	} else {
		const char **env_p;
		for (env_p = environ; *env_p; env_p++) {
			if (puts(*env_p) == EOF) {
				mysh_error_with_errno("getenv: write error");
				ret = 1;
				break;
			}
		}
	}
	return ret;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x30, %rsp
movl %edi, -0x4(%rbp)
movq %rsi, -0x10(%rbp)
movl $0x0, -0x14(%rbp)
cmpl $0x0, -0x4(%rbp)
je 0x2cb1
movq -0x10(%rbp), %rax
movq (%rax), %rdi
callq 0x2030
movq %rax, -0x20(%rbp)
cmpq $0x0, -0x20(%rbp)
je 0x2ca8
movq -0x20(%rbp), %rdi
callq 0x2080
cmpl $-0x1, %eax
jne 0x2ca6
leaq 0x7611(%rip), %rdi      # 0xa2a9
movb $0x0, %al
callq 0x8cf0
movl $0x1, -0x14(%rbp)
jmp 0x2caf
movl $0x2, -0x14(%rbp)
jmp 0x2d03
movq 0xb318(%rip), %rax      # 0xdfd0
movq (%rax), %rax
movq %rax, -0x28(%rbp)
movq -0x28(%rbp), %rax
cmpq $0x0, (%rax)
je 0x2d01
movq -0x28(%rbp), %rax
movq (%rax), %rdi
callq 0x2080
cmpl $-0x1, %eax
jne 0x2cf1
leaq 0x75c8(%rip), %rdi      # 0xa2a9
movb $0x0, %al
callq 0x8cf0
movl $0x1, -0x14(%rbp)
jmp 0x2d01
jmp 0x2cf3
movq -0x28(%rbp), %rax
addq $0x8, %rax
movq %rax, -0x28(%rbp)
jmp 0x2cbf
jmp 0x2d03
movl -0x14(%rbp), %eax
addq $0x30, %rsp
popq %rbp
retq
nopl (%rax)
// File: /workspace/github_c_makefile_star2_O0/ebiggers[P]mysh/mysh_builtin.c
// Function: builtin_help
static int builtin_help(unsigned argc, const char **argv)
{
	size_t i;
	if (argc) {
		for (i = 0; i < NUM_BUILTINS; i++) {
			if (strcmp(builtins[i].name, argv[0]) == 0) {
				print_help(&builtins[i]);
				return 0;
			}
		}
	}
	for (i = 0; i < NUM_BUILTINS; i++)
		print_help(&builtins[i]);
	return 0;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x20, %rsp
movl %edi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
cmpl $0x0, -0x8(%rbp)
je 0x2d86
movq $0x0, -0x18(%rbp)
cmpq $0x11, -0x18(%rbp)
jae 0x2d84
leaq 0xaed5(%rip), %rax      # 0xdc10
imulq $0x18, -0x18(%rbp), %rcx
addq %rcx, %rax
movq (%rax), %rdi
movq -0x10(%rbp), %rax
movq (%rax), %rsi
callq 0x2230
cmpl $0x0, %eax
jne 0x2d74
leaq 0xaeb2(%rip), %rdi      # 0xdc10
imulq $0x18, -0x18(%rbp), %rax
addq %rax, %rdi
callq 0x3290
movl $0x0, -0x4(%rbp)
jmp 0x2dbe
jmp 0x2d76
movq -0x18(%rbp), %rax
addq $0x1, %rax
movq %rax, -0x18(%rbp)
jmp 0x2d2d
jmp 0x2d86
movq $0x0, -0x18(%rbp)
cmpq $0x11, -0x18(%rbp)
jae 0x2db7
leaq 0xae74(%rip), %rdi      # 0xdc10
imulq $0x18, -0x18(%rbp), %rax
addq %rax, %rdi
callq 0x3290
movq -0x18(%rbp), %rax
addq $0x1, %rax
movq %rax, -0x18(%rbp)
jmp 0x2d8e
movl $0x0, -0x4(%rbp)
movl -0x4(%rbp), %eax
addq $0x20, %rsp
popq %rbp
retq
nopw (%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/ebiggers[P]mysh/mysh_builtin.c
// Function: builtin_pwd
static int builtin_pwd(unsigned argc, const char **argv)
{
	char *buf;
	int ret = 1;

	buf = getcwd(NULL, 0);
	if (!buf) {
		mysh_error_with_errno("pwd: can't get current working directory");
		goto out;
	}
	if (puts(buf) == EOF)
		mysh_error_with_errno("pwd: write error");
	else
		ret = 0;
	free(buf);
out:
	return ret;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x20, %rsp
movl %edi, -0x4(%rbp)
movq %rsi, -0x10(%rbp)
movl $0x1, -0x1c(%rbp)
xorl %eax, %eax
movl %eax, %esi
movq %rsi, %rdi
callq 0x21a0
movq %rax, -0x18(%rbp)
cmpq $0x0, -0x18(%rbp)
jne 0x2e0d
leaq 0x74c4(%rip), %rdi      # 0xa2c8
movb $0x0, %al
callq 0x8cf0
jmp 0x2e3b
movq -0x18(%rbp), %rdi
callq 0x2080
cmpl $-0x1, %eax
jne 0x2e2b
leaq 0x74cf(%rip), %rdi      # 0xa2f1
movb $0x0, %al
callq 0x8cf0
jmp 0x2e32
movl $0x0, -0x1c(%rbp)
movq -0x18(%rbp), %rdi
callq 0x2050
movl -0x1c(%rbp), %eax
addq $0x20, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/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 %rbp
movq %rsp, %rbp
subq $0x20, %rsp
movl %edi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
cmpl $0x0, -0x8(%rbp)
je 0x3064
movq -0x10(%rbp), %rax
movq (%rax), %rdi
callq 0x2310
movl %eax, -0x1c(%rbp)
cmpl $0x0, -0x1c(%rbp)
jge 0x3034
leaq 0x72fa(%rip), %rdi      # 0xa31b
movb $0x0, %al
callq 0x8c20
movl $0x1, -0x4(%rbp)
jmp 0x3113
movl -0x1c(%rbp), %eax
movl %eax, -0x14(%rbp)
movl -0x14(%rbp), %eax
leaq 0xb8b0(%rip), %rcx      # 0xe8f4
cmpl (%rcx), %eax
jbe 0x3062
leaq 0x72f2(%rip), %rdi      # 0xa341
movb $0x0, %al
callq 0x8c20
movl $0x1, -0x4(%rbp)
jmp 0x3113
jmp 0x3083
leaq 0xb889(%rip), %rax      # 0xe8f4
cmpl $0x0, (%rax)
jne 0x307c
movl $0x0, -0x4(%rbp)
jmp 0x3113
movl $0x1, -0x14(%rbp)
movl $0x1, -0x18(%rbp)
movl -0x18(%rbp), %eax
cmpl -0x14(%rbp), %eax
ja 0x30b3
leaq 0xb85f(%rip), %rax      # 0xe8f8
movq (%rax), %rax
movl -0x18(%rbp), %ecx
movq (%rax,%rcx,8), %rdi
callq 0x2050
movl -0x18(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x18(%rbp)
jmp 0x308a
jmp 0x30b5
movl -0x18(%rbp), %eax
leaq 0xb835(%rip), %rcx      # 0xe8f4
cmpl (%rcx), %eax
ja 0x30f5
leaq 0xb82e(%rip), %rax      # 0xe8f8
movq (%rax), %rax
movl -0x18(%rbp), %ecx
movq (%rax,%rcx,8), %rdx
leaq 0xb81d(%rip), %rax      # 0xe8f8
movq (%rax), %rax
movl -0x18(%rbp), %ecx
subl -0x14(%rbp), %ecx
movl %ecx, %ecx
movq %rdx, (%rax,%rcx,8)
movl -0x18(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x18(%rbp)
jmp 0x30b5
movl -0x14(%rbp), %eax
leaq 0xb7f5(%rip), %rcx      # 0xe8f4
movl (%rcx), %ecx
subl %eax, %ecx
leaq 0xb7ea(%rip), %rax      # 0xe8f4
movl %ecx, (%rax)
movl $0x0, -0x4(%rbp)
movl -0x4(%rbp), %eax
addq $0x20, %rsp
popq %rbp
retq
nopl (%rax)
// File: /workspace/github_c_makefile_star2_O0/ebiggers[P]mysh/mysh_builtin.c
// Function: do_alias
static int do_alias(const char *alias)
{
	const char *equals;
	equals = strchr(alias, '=');
	if (!equals || !insert_alias_len(alias, equals - alias, equals + 1)) {
		mysh_error("alias: invalid argument \"%s\"", alias);
		return 1;
	}
	return 0;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x20, %rsp
movq %rdi, -0x10(%rbp)
movq -0x10(%rbp), %rdi
movl $0x3d, %esi
callq 0x2130
movq %rax, -0x18(%rbp)
cmpq $0x0, -0x18(%rbp)
je 0x3205
movq -0x10(%rbp), %rdi
movq -0x18(%rbp), %rsi
movq -0x10(%rbp), %rax
subq %rax, %rsi
movq -0x18(%rbp), %rdx
addq $0x1, %rdx
callq 0x5d20
testb $0x1, %al
jne 0x3220
movq -0x10(%rbp), %rsi
leaq 0x704a(%rip), %rdi      # 0xa25a
movb $0x0, %al
callq 0x8c20
movl $0x1, -0x4(%rbp)
jmp 0x3227
movl $0x0, -0x4(%rbp)
movl -0x4(%rbp), %eax
addq $0x20, %rsp
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O0/ebiggers[P]mysh/mysh_builtin.c
// Function: do_export
static int do_export(const char *var)
{
	const char *equals;
	int ret;

	equals = strchr(var, '=');
	if (equals) {
		make_param_assignment(var);
		*(char*)equals = '\0';
	}
	ret = export_variable(var);
	if (equals)
		*(char*)equals = '=';
	return ret;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x20, %rsp
movq %rdi, -0x8(%rbp)
movq -0x8(%rbp), %rdi
movl $0x3d, %esi
callq 0x2130
movq %rax, -0x10(%rbp)
cmpq $0x0, -0x10(%rbp)
je 0x3265
movq -0x8(%rbp), %rdi
callq 0x5dc0
movq -0x10(%rbp), %rax
movb $0x0, (%rax)
movq -0x8(%rbp), %rdi
callq 0x5e10
movl %eax, -0x14(%rbp)
cmpq $0x0, -0x10(%rbp)
je 0x327f
movq -0x10(%rbp), %rax
movb $0x3d, (%rax)
movl -0x14(%rbp), %eax
addq $0x20, %rsp
popq %rbp
retq
nopl (%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/ebiggers[P]mysh/mysh_builtin.c
// Function: set_or_unset_options_in_string
static int set_or_unset_options_in_string(const char *string, int value)
{
	int ret = 0;
	while (*string) {
		ret |= set_or_unset_shell_option(*string, value);
		string++;
	}
	return ret;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x10, %rsp
movq %rdi, -0x8(%rbp)
movl %esi, -0xc(%rbp)
movl $0x0, -0x10(%rbp)
movq -0x8(%rbp), %rax
cmpb $0x0, (%rax)
je 0x3304
movq -0x8(%rbp), %rax
movb (%rax), %al
movl -0xc(%rbp), %esi
movsbl %al, %edi
callq 0x3310
orl -0x10(%rbp), %eax
movl %eax, -0x10(%rbp)
movq -0x8(%rbp), %rax
addq $0x1, %rax
movq %rax, -0x8(%rbp)
jmp 0x32d6
movl -0x10(%rbp), %eax
addq $0x10, %rsp
popq %rbp
retq
nopl (%rax)
// File: /workspace/github_c_makefile_star2_O0/ebiggers[P]mysh/mysh_builtin.c
// Function: set_or_unset_shell_option
static int set_or_unset_shell_option(char option, int value)
{
	if ((unsigned char)option >= ARRAY_SIZE(shell_options) ||
	    shell_options[(unsigned char)option] == NULL)
	{
		mysh_error("set: unknown option '%c'", option);
		return -1;
	} else {
		*shell_options[(unsigned char)option] = value;
		return 0;
	}
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x10, %rsp
movb %dil, %al
movb %al, -0x5(%rbp)
movl %esi, -0xc(%rbp)
movzbl -0x5(%rbp), %eax
cmpq $0x7f, %rax
jae 0x333f
movzbl -0x5(%rbp), %eax
movl %eax, %ecx
leaq 0xaec8(%rip), %rax      # 0xe200
cmpq $0x0, (%rax,%rcx,8)
jne 0x335a
movsbl -0x5(%rbp), %esi
leaq 0x6fb8(%rip), %rdi      # 0xa302
movb $0x0, %al
callq 0x8c20
movl $0xffffffff, -0x4(%rbp) # imm = 0xFFFFFFFF
jmp 0x3377
movl -0xc(%rbp), %ecx
movzbl -0x5(%rbp), %eax
movl %eax, %edx
leaq 0xae96(%rip), %rax      # 0xe200
movq (%rax,%rdx,8), %rax
movl %ecx, (%rax)
movl $0x0, -0x4(%rbp)
movl -0x4(%rbp), %eax
addq $0x10, %rsp
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O0/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:
pushq %rbp
movq %rsp, %rbp
subq $0x50, %rsp
movq %rdi, -0x8(%rbp)
movq -0x8(%rbp), %rax
movq (%rax), %rax
movq %rax, -0x20(%rbp)
movq -0x20(%rbp), %rax
addq $-0x10, %rax
movq %rax, -0x28(%rbp)
movq -0x28(%rbp), %rax
movq %rax, -0x10(%rbp)
movq -0x10(%rbp), %rax
movq 0x10(%rax), %rax
movq %rax, -0x30(%rbp)
movq -0x30(%rbp), %rax
addq $-0x10, %rax
movq %rax, -0x38(%rbp)
movq -0x38(%rbp), %rax
movq %rax, -0x18(%rbp)
movq -0x10(%rbp), %rax
addq $0x10, %rax
cmpq -0x8(%rbp), %rax
je 0x3449
movq -0x10(%rbp), %rdi
addq $0x10, %rdi
callq 0x3450
movq -0x10(%rbp), %rdi
callq 0x3380
movq -0x18(%rbp), %rax
movq %rax, -0x10(%rbp)
movq -0x18(%rbp), %rax
movq 0x10(%rax), %rax
movq %rax, -0x40(%rbp)
movq -0x40(%rbp), %rax
addq $-0x10, %rax
movq %rax, -0x48(%rbp)
movq -0x48(%rbp), %rax
movq %rax, -0x18(%rbp)
jmp 0x33fb
addq $0x50, %rsp
popq %rbp
retq
nop
// File: /workspace/github_c_makefile_star2_O0/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
movq %rsp, %rbp
subq $0x40, %rsp
movq %rdi, -0x10(%rbp)
movq %rsi, -0x18(%rbp)
movq %rdx, -0x20(%rbp)
movq %rcx, -0x28(%rbp)
movq -0x20(%rbp), %rax
movq (%rax), %rax
movq %rax, -0x40(%rbp)
movq -0x18(%rbp), %rax
movq -0x10(%rbp), %rdi
leaq -0x40(%rbp), %rsi
xorl %ecx, %ecx
movl %ecx, %edx
callq *%rax
movq %rax, -0x30(%rbp)
cmpq $0x0, -0x30(%rbp)
jge 0x37c9
movq -0x30(%rbp), %rax
movl %eax, -0x4(%rbp)
jmp 0x380a
movq -0x30(%rbp), %rdi
addq $0x1, %rdi
callq 0x8e00
movq %rax, -0x38(%rbp)
movq -0x18(%rbp), %rax
movq -0x10(%rbp), %rdi
movq -0x20(%rbp), %rsi
movq -0x38(%rbp), %rdx
callq *%rax
movq -0x38(%rbp), %rax
movq -0x30(%rbp), %rcx
movb $0x0, (%rax,%rcx)
movq -0x38(%rbp), %rcx
movq -0x28(%rbp), %rax
movq %rcx, (%rax)
movl $0x0, -0x4(%rbp)
movl -0x4(%rbp), %eax
addq $0x40, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/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 %rbp
movq %rsp, %rbp
subq $0x30, %rsp
movq %rdi, -0x10(%rbp)
movq %rsi, -0x18(%rbp)
movq %rdx, -0x20(%rbp)
movq -0x10(%rbp), %rdi
movq -0x18(%rbp), %rax
movq (%rax), %rdx
movl $0x27, %esi
callq 0x2200
movq %rax, -0x28(%rbp)
cmpq $0x0, -0x28(%rbp)
jne 0x385e
movq $-0x7d0, -0x8(%rbp)     # imm = 0xF830
jmp 0x38cf
movq -0x28(%rbp), %rax
movq -0x10(%rbp), %rcx
subq %rcx, %rax
movq %rax, -0x30(%rbp)
movq -0x10(%rbp), %rdi
movq -0x30(%rbp), %rdx
xorl %esi, %esi
callq 0x2200
cmpq $0x0, %rax
je 0x389a
leaq 0x6b3e(%rip), %rdi      # 0xa3c7
movb $0x0, %al
callq 0x8c20
movq $-0x3e8, -0x8(%rbp)     # imm = 0xFC18
jmp 0x38cf
cmpq $0x0, -0x20(%rbp)
je 0x38b2
movq -0x20(%rbp), %rdi
movq -0x10(%rbp), %rsi
movq -0x30(%rbp), %rdx
callq 0x2260
movq -0x30(%rbp), %rdx
addq $0x1, %rdx
movq -0x18(%rbp), %rax
movq (%rax), %rcx
subq %rdx, %rcx
movq %rcx, (%rax)
movq -0x30(%rbp), %rax
movq %rax, -0x8(%rbp)
movq -0x8(%rbp), %rax
addq $0x30, %rsp
popq %rbp
retq
nopl (%rax)
// File: /workspace/github_c_makefile_star2_O0/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:
pushq %rbp
movq %rsp, %rbp
subq $0x40, %rsp
movq %rdi, -0x10(%rbp)
movq %rsi, -0x18(%rbp)
movq %rdx, -0x20(%rbp)
movb $0x0, -0x21(%rbp)
movq $0x0, -0x30(%rbp)
movq -0x18(%rbp), %rax
movq (%rax), %rax
movq %rax, -0x38(%rbp)
cmpq $0x0, -0x38(%rbp)
jne 0x391f
movq $-0x7d0, -0x8(%rbp)     # imm = 0xF830
jmp 0x3a29
movq -0x38(%rbp), %rax
addq $-0x1, %rax
movq %rax, -0x38(%rbp)
movq -0x10(%rbp), %rax
movq %rax, %rcx
addq $0x1, %rcx
movq %rcx, -0x10(%rbp)
movb (%rax), %al
movb %al, -0x39(%rbp)
movsbl -0x39(%rbp), %eax
cmpl $0x0, %eax
jne 0x3963
leaq 0x6aa2(%rip), %rdi      # 0xa3f1
movb $0x0, %al
callq 0x8c20
movq $-0x3e8, -0x8(%rbp)     # imm = 0xFC18
jmp 0x3a29
movsbl -0x39(%rbp), %eax
cmpl $0x5c, %eax
jne 0x397b
testb $0x1, -0x21(%rbp)
jne 0x397b
movb $0x1, -0x21(%rbp)
jmp 0x3a0f
movsbl -0x39(%rbp), %eax
cmpl $0x22, %eax
jne 0x398f
testb $0x1, -0x21(%rbp)
jne 0x398f
jmp 0x3a16
movsbl -0x39(%rbp), %eax
cmpl $0xa, %eax
jne 0x39a4
testb $0x1, -0x21(%rbp)
je 0x39a4
movb $0x0, -0x21(%rbp)
jmp 0x3a0b
testb $0x1, -0x21(%rbp)
je 0x39e0
movsbl -0x39(%rbp), %edi
callq 0x3760
andl $0x20, %eax
cmpl $0x0, %eax
jne 0x39e0
cmpq $0x0, -0x20(%rbp)
je 0x39d4
movq -0x20(%rbp), %rax
movq %rax, %rcx
addq $0x1, %rcx
movq %rcx, -0x20(%rbp)
movb $0x5c, (%rax)
movq -0x30(%rbp), %rax
addq $0x1, %rax
movq %rax, -0x30(%rbp)
cmpq $0x0, -0x20(%rbp)
je 0x39fb
movb -0x39(%rbp), %cl
movq -0x20(%rbp), %rax
movq %rax, %rdx
addq $0x1, %rdx
movq %rdx, -0x20(%rbp)
movb %cl, (%rax)
movq -0x30(%rbp), %rax
addq $0x1, %rax
movq %rax, -0x30(%rbp)
movb $0x0, -0x21(%rbp)
jmp 0x3a0d
jmp 0x3a0f
jmp 0x3a11
jmp 0x390b
movq -0x38(%rbp), %rcx
movq -0x18(%rbp), %rax
movq %rcx, (%rax)
movq -0x30(%rbp), %rax
movq %rax, -0x8(%rbp)
movq -0x8(%rbp), %rax
addq $0x40, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/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:
pushq %rbp
movq %rsp, %rbp
subq $0x40, %rsp
movq %rdi, -0x10(%rbp)
movq %rsi, -0x18(%rbp)
movq %rdx, -0x20(%rbp)
movq -0x10(%rbp), %rax
movq %rax, -0x28(%rbp)
movq $0x0, -0x30(%rbp)
movb $0x0, -0x31(%rbp)
movq -0x18(%rbp), %rax
movq (%rax), %rax
movq %rax, -0x40(%rbp)
cmpq $0x0, -0x40(%rbp)
jne 0x3a87
movq $-0x7d0, -0x8(%rbp)     # imm = 0xF830
jmp 0x3b81
movq -0x10(%rbp), %rax
movsbl (%rax), %edi
callq 0x3760
andl $0x40, %eax
cmpl $0x0, %eax
je 0x3b23
movq -0x10(%rbp), %rax
movsbl (%rax), %eax
cmpl $0x0, %eax
jne 0x3ac6
leaq 0x6969(%rip), %rdi      # 0xa41b
movb $0x0, %al
callq 0x8c20
movq $-0x3e8, -0x8(%rbp)     # imm = 0xFC18
jmp 0x3b81
testb $0x1, -0x31(%rbp)
jne 0x3b07
movq -0x10(%rbp), %rax
movsbl (%rax), %eax
cmpl $0x5c, %eax
jne 0x3ade
movb $0x1, -0x31(%rbp)
jmp 0x3b51
movq -0x10(%rbp), %rax
movsbl (%rax), %eax
cmpl $0x23, %eax
jne 0x3b01
movq -0x10(%rbp), %rax
cmpq -0x28(%rbp), %rax
je 0x3b01
movq -0x10(%rbp), %rax
movsbl -0x1(%rax), %eax
cmpl $0x24, %eax
je 0x3b03
jmp 0x3b6e
jmp 0x3b05
jmp 0x3b21
testb $0x1, -0x31(%rbp)
je 0x3b1f
movq -0x10(%rbp), %rax
movsbl (%rax), %eax
cmpl $0xa, %eax
jne 0x3b1f
movb $0x0, -0x31(%rbp)
jmp 0x3b51
jmp 0x3b21
jmp 0x3b23
cmpq $0x0, -0x20(%rbp)
je 0x3b41
movq -0x10(%rbp), %rax
movb (%rax), %cl
movq -0x20(%rbp), %rax
movq %rax, %rdx
addq $0x1, %rdx
movq %rdx, -0x20(%rbp)
movb %cl, (%rax)
movq -0x30(%rbp), %rax
addq $0x1, %rax
movq %rax, -0x30(%rbp)
movb $0x0, -0x31(%rbp)
movq -0x10(%rbp), %rax
addq $0x1, %rax
movq %rax, -0x10(%rbp)
movq -0x40(%rbp), %rax
addq $-0x1, %rax
movq %rax, -0x40(%rbp)
jmp 0x3a73
movq -0x40(%rbp), %rcx
movq -0x18(%rbp), %rax
movq %rcx, (%rax)
movq -0x30(%rbp), %rax
movq %rax, -0x8(%rbp)
movq -0x8(%rbp), %rax
addq $0x40, %rsp
popq %rbp
retq
nopl (%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/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 %rbp
movq %rsp, %rbp
subq $0x30, %rsp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
leaq -0x28(%rbp), %rdi
movq %rdi, -0x28(%rbp)
movq %rdi, -0x20(%rbp)
movq -0x8(%rbp), %rax
movq -0x10(%rbp), %rcx
movq %rcx, %rdx
incq %rdx
movq %rdx, -0x10(%rbp)
movb $0xa, (%rax,%rcx)
movq -0x8(%rbp), %rsi
leaq -0x10(%rbp), %rdx
callq 0x3c60
movl %eax, -0x14(%rbp)
movl -0x14(%rbp), %eax
movl %eax, -0x2c(%rbp)
subl $0xfffff830, %eax       # imm = 0xFFFFF830
je 0x3c29
jmp 0x3c11
movl -0x2c(%rbp), %eax
subl $0xfffffc18, %eax       # imm = 0xFFFFFC18
jne 0x3c43
jmp 0x3c1d
movl $0xffffffff, 0xa9f9(%rip) # imm = 0xFFFFFFFF
jmp 0x3c4c
leaq 0x6960(%rip), %rdi      # 0xa590
movb $0x0, %al
callq 0x8c20
movl $0xffffffff, 0xa9df(%rip) # imm = 0xFFFFFFFF
jmp 0x3c4c
movl -0x14(%rbp), %eax
movl %eax, 0xa9d4(%rip)      # 0xe620
movl 0xa9ce(%rip), %eax      # 0xe620
addq $0x30, %rsp
popq %rbp
retq
nopl (%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/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
movq %rsp, %rbp
subq $0x40, %rsp
movq %rdi, -0x10(%rbp)
movq %rsi, -0x18(%rbp)
movq %rdx, -0x20(%rbp)
movl $0x0, -0x24(%rbp)
movq -0x20(%rbp), %rax
movq (%rax), %rax
movq %rax, -0x30(%rbp)
cmpq $0x0, -0x30(%rbp)
je 0x3d51
jmp 0x3c93
movq -0x18(%rbp), %rdi
movq -0x20(%rbp), %rsi
leaq -0x38(%rbp), %rdx
callq 0x3480
movl %eax, -0x24(%rbp)
cmpl $0x0, -0x24(%rbp)
je 0x3cb8
movl -0x24(%rbp), %eax
movl %eax, -0x4(%rbp)
jmp 0x3d57
movq -0x30(%rbp), %rax
movq -0x20(%rbp), %rcx
subq (%rcx), %rax
movq %rax, -0x40(%rbp)
cmpl $0x0, 0xa966(%rip)      # 0xe634
je 0x3cec
movq -0x18(%rbp), %rdi
movq -0x40(%rbp), %rdx
movq 0xa311(%rip), %rax      # 0xdff0
movq (%rax), %rcx
movl $0x1, %esi
callq 0x2370
movq -0x40(%rbp), %rax
addq -0x18(%rbp), %rax
movq %rax, -0x18(%rbp)
movq -0x40(%rbp), %rcx
movq -0x30(%rbp), %rax
subq %rcx, %rax
movq %rax, -0x30(%rbp)
movq -0x38(%rbp), %rdi
addq $0x10, %rdi
movq -0x10(%rbp), %rsi
callq 0x44b0
movq -0x38(%rbp), %rax
cmpl $0x400, 0x4(%rax)       # imm = 0x400
jne 0x3c93
movq -0x10(%rbp), %rdi
callq 0x44e0
movl %eax, -0x24(%rbp)
cmpl $0x0, -0x24(%rbp)
je 0x3d4c
cmpl $0x0, 0xa8ea(%rip)      # 0xe62c
je 0x3d4c
movl -0x24(%rbp), %eax
movl %eax, -0x4(%rbp)
jmp 0x3d57
jmp 0x3c86
movl -0x24(%rbp), %eax
movl %eax, -0x4(%rbp)
movl -0x4(%rbp), %eax
addq $0x40, %rsp
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O0/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
movq %rsp, %rbp
subq $0x40, %rsp
movq %rdi, -0x10(%rbp)
movl %esi, -0x14(%rbp)
movq %rdx, -0x20(%rbp)
movq -0x10(%rbp), %rdi
xorl %esi, %esi
movb $0x0, %al
callq 0x22c0
movl %eax, -0x24(%rbp)
cmpl $0x0, -0x24(%rbp)
jge 0x41b4
movq -0x10(%rbp), %rsi
leaq 0x641b(%rip), %rdi      # 0xa5bf
movb $0x0, %al
callq 0x8cf0
movl $0x1, -0x4(%rbp)
jmp 0x4220
leaq 0xa73d(%rip), %rax      # 0xe8f8
movq (%rax), %rax
movq %rax, -0x30(%rbp)
leaq 0xa72b(%rip), %rax      # 0xe8f4
movl (%rax), %eax
movl %eax, -0x34(%rbp)
leaq 0xa723(%rip), %rax      # 0xe8f8
movq $0x0, (%rax)
movl -0x14(%rbp), %edi
movq -0x10(%rbp), %rsi
movq -0x20(%rbp), %rdx
callq 0x6a50
movl -0x24(%rbp), %edi
xorl %esi, %esi
callq 0x3d60
movl %eax, -0x38(%rbp)
movb $0x0, %al
callq 0x6af0
movq -0x30(%rbp), %rcx
leaq 0xa6ed(%rip), %rax      # 0xe8f8
movq %rcx, (%rax)
movl -0x34(%rbp), %ecx
leaq 0xa6dc(%rip), %rax      # 0xe8f4
movl %ecx, (%rax)
movl -0x38(%rbp), %eax
movl %eax, -0x4(%rbp)
movl -0x4(%rbp), %eax
addq $0x40, %rsp
popq %rbp
retq
nopl (%rax)
// File: /workspace/github_c_makefile_star2_O0/ebiggers[P]mysh/mysh_main.c
// Function: mysh_getc
static int mysh_getc(FILE *in)
{
	int c;
	errno = 0;
	/* Ignore interrupts other than sigint */
	while ((c = getc(in)) == EOF && errno == EINTR && !sigint_occurred)
		;
	return c;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x10, %rsp
movq %rdi, -0x8(%rbp)
callq 0x2060
movl $0x0, (%rax)
movq -0x8(%rbp), %rdi
callq 0x23a0
movl %eax, %ecx
movl %ecx, -0xc(%rbp)
xorl %eax, %eax
cmpl $-0x1, %ecx
movb %al, -0xd(%rbp)
jne 0x449c
callq 0x2060
movq %rax, %rcx
xorl %eax, %eax
cmpl $0x4, (%rcx)
movb %al, -0xd(%rbp)
jne 0x449c
movb 0xa191(%rip), %al       # 0xe628
xorb $-0x1, %al
movb %al, -0xd(%rbp)
movb -0xd(%rbp), %al
testb $0x1, %al
jne 0x44a5
jmp 0x44a7
jmp 0x4467
movl -0xc(%rbp), %eax
addq $0x10, %rsp
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O0/ebiggers[P]mysh/mysh_main.c
// Function: process_var_assignments
static int process_var_assignments(const struct list_head *assignments)
{
	struct string *s;
	list_for_each_entry(s, assignments, list)
		make_param_assignment(s->chars);
	return 0;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x30, %rsp
movq %rdi, -0x8(%rbp)
movq -0x8(%rbp), %rax
movq (%rax), %rax
movq %rax, -0x18(%rbp)
movq -0x18(%rbp), %rax
addq $-0x18, %rax
movq %rax, -0x20(%rbp)
movq -0x20(%rbp), %rax
movq %rax, -0x10(%rbp)
movq -0x10(%rbp), %rax
addq $0x18, %rax
cmpq -0x8(%rbp), %rax
je 0x4e37
movq -0x10(%rbp), %rax
movq (%rax), %rdi
callq 0x5dc0
movq -0x10(%rbp), %rax
movq 0x18(%rax), %rax
movq %rax, -0x28(%rbp)
movq -0x28(%rbp), %rax
addq $-0x18, %rax
movq %rax, -0x30(%rbp)
movq -0x30(%rbp), %rax
movq %rax, -0x10(%rbp)
jmp 0x4dfb
xorl %eax, %eax
addq $0x30, %rsp
popq %rbp
retq
nop
// File: /workspace/github_c_makefile_star2_O0/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
movq %rsp, %rbp
subq $0x20, %rsp
movq %rdi, -0x8(%rbp)
movl %esi, -0xc(%rbp)
cmpl $0x0, -0xc(%rbp)
je 0x50c7
jmp 0x50e6
leaq 0x57ce(%rip), %rdi      # 0xa89c
leaq 0x557a(%rip), %rsi      # 0xa64f
movl $0x3b, %edx
leaq 0x57c6(%rip), %rcx      # 0xa8a7
callq 0x2160
movl -0xc(%rbp), %eax
movl %eax, %edi
shlq $0x2, %rdi
addq $0x20, %rdi
callq 0x8e00
movq %rax, -0x18(%rbp)
callq 0x5380
movl %eax, %ecx
movq -0x18(%rbp), %rax
movl %ecx, 0x10(%rax)
movl -0xc(%rbp), %ecx
movq -0x18(%rbp), %rax
movl %ecx, 0x14(%rax)
movq -0x8(%rbp), %rax
movl -0xc(%rbp), %ecx
subl $0x1, %ecx
movl %ecx, %ecx
movl (%rax,%rcx,4), %ecx
movl %ecx, 0x9513(%rip)      # 0xe63c
movq -0x18(%rbp), %rax
movl %ecx, 0x18(%rax)
movq -0x18(%rbp), %rdi
addq $0x1c, %rdi
movq -0x8(%rbp), %rsi
movl -0xc(%rbp), %eax
movl %eax, %edx
shlq $0x2, %rdx
callq 0x2260
movq -0x18(%rbp), %rdi
leaq 0x94a3(%rip), %rsi      # 0xe5f8
callq 0x44b0
movq -0x18(%rbp), %rax
movl 0x10(%rax), %esi
movq -0x18(%rbp), %rax
movl 0x18(%rax), %edx
leaq 0x5771(%rip), %rdi      # 0xa8e0
movb $0x0, %al
callq 0x2140
xorl %eax, %eax
addq $0x20, %rsp
popq %rbp
retq
nop
// File: /workspace/github_c_makefile_star2_O0/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
movq %rsp, %rbp
subq $0x20, %rsp
movq %rdi, -0x8(%rbp)
movl %esi, -0xc(%rbp)
movl $0x0, -0x14(%rbp)
callq 0x5460
jmp 0x519d
movq -0x8(%rbp), %rax
movl -0x14(%rbp), %ecx
movl (%rax,%rcx,4), %edi
leaq -0x18(%rbp), %rsi
xorl %edx, %edx
callq 0x22b0
cmpl $-0x1, %eax
jne 0x5206
callq 0x2060
cmpl $0x4, (%rax)
jne 0x51e5
testb $0x1, 0x9460(%rip)      # 0xe628
je 0x51e5
movq -0x8(%rbp), %rdi
movl -0x14(%rbp), %eax
shlq $0x2, %rax
addq %rax, %rdi
movl -0xc(%rbp), %esi
subl -0x14(%rbp), %esi
callq 0x5400
jmp 0x519d
movl $0xffffffff, -0x10(%rbp) # imm = 0xFFFFFFFF
movq -0x8(%rbp), %rax
movl -0x14(%rbp), %ecx
movl (%rax,%rcx,4), %esi
leaq 0x56ec(%rip), %rdi      # 0xa8e9
movb $0x0, %al
callq 0x8cf0
jmp 0x522a
movl -0x18(%rbp), %eax
andl $0x7f, %eax
cmpl $0x0, %eax
jne 0x5221
movl -0x18(%rbp), %eax
andl $0xff00, %eax           # imm = 0xFF00
sarl $0x8, %eax
movl %eax, -0x10(%rbp)
jmp 0x5228
movl $0xffffffff, -0x10(%rbp) # imm = 0xFFFFFFFF
jmp 0x522a
jmp 0x522c
movl -0x14(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x14(%rbp)
cmpl -0xc(%rbp), %eax
jne 0x519b
testb $0x1, 0x93e3(%rip)      # 0xe628
jne 0x524c
callq 0x5990
movl -0x10(%rbp), %eax
addq $0x20, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/ebiggers[P]mysh/mysh_main.c
// Function: free_redir_list
static void free_redir_list(struct list_head *redir_list)
{
	struct redirection *redir, *tmp;
	list_for_each_entry_safe(redir, tmp, redir_list, list) {
		list_del(&redir->list);
		if (redir->is_file)
			free(redir->src_filename);
		free(redir);
	}
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x50, %rsp
movq %rdi, -0x8(%rbp)
movq -0x8(%rbp), %rax
movq (%rax), %rax
movq %rax, -0x20(%rbp)
movq -0x20(%rbp), %rax
addq $-0x20, %rax
movq %rax, -0x28(%rbp)
movq -0x28(%rbp), %rax
movq %rax, -0x10(%rbp)
movq -0x10(%rbp), %rax
movq 0x20(%rax), %rax
movq %rax, -0x30(%rbp)
movq -0x30(%rbp), %rax
addq $-0x20, %rax
movq %rax, -0x38(%rbp)
movq -0x38(%rbp), %rax
movq %rax, -0x18(%rbp)
movq -0x10(%rbp), %rax
addq $0x20, %rax
cmpq -0x8(%rbp), %rax
je 0x530f
movq -0x10(%rbp), %rdi
addq $0x20, %rdi
callq 0x54a0
movq -0x10(%rbp), %rax
testb $0x1, (%rax)
je 0x52dc
movq -0x10(%rbp), %rax
movq 0x8(%rax), %rdi
callq 0x2050
movq -0x10(%rbp), %rdi
callq 0x2050
movq -0x18(%rbp), %rax
movq %rax, -0x10(%rbp)
movq -0x18(%rbp), %rax
movq 0x20(%rax), %rax
movq %rax, -0x40(%rbp)
movq -0x40(%rbp), %rax
addq $-0x20, %rax
movq %rax, -0x48(%rbp)
movq -0x48(%rbp), %rax
movq %rax, -0x18(%rbp)
jmp 0x52ab
addq $0x50, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/ebiggers[P]mysh/mysh_main.c
// Function: install_handler
static void install_handler(int sig, void (*handler)(int))
{
	struct sigaction act;
	memset(&act, 0, sizeof(act));
	act.sa_handler = handler;
	sigaddset(&act.sa_mask, sig);
	sigaction(sig, &act, NULL);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0xb0, %rsp
movl %edi, -0x4(%rbp)
movq %rsi, -0x10(%rbp)
leaq -0xa8(%rbp), %rdi
xorl %esi, %esi
movl $0x98, %edx
callq 0x2180
movq -0x10(%rbp), %rax
movq %rax, -0xa8(%rbp)
leaq -0xa8(%rbp), %rdi
addq $0x8, %rdi
movl -0x4(%rbp), %esi
callq 0x23b0
movl -0x4(%rbp), %edi
leaq -0xa8(%rbp), %rsi
xorl %eax, %eax
movl %eax, %edx
callq 0x20a0
addq $0xb0, %rsp
popq %rbp
retq
nop
// File: /workspace/github_c_makefile_star2_O0/ebiggers[P]mysh/mysh_main.c
// Function: get_next_job_number
static unsigned get_next_job_number()
{
	unsigned n = 1;
	const struct background_pipeline *p;
	list_for_each_entry(p, &background_pipelines, list)
		if (n <= p->num)
			n = p->num + 1;
	return n;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
movl $0x1, -0x4(%rbp)
movq 0x9266(%rip), %rax      # 0xe5f8
movq %rax, -0x18(%rbp)
movq -0x18(%rbp), %rax
movq %rax, -0x20(%rbp)
movq -0x20(%rbp), %rax
movq %rax, -0x10(%rbp)
movq -0x10(%rbp), %rax
leaq 0x9247(%rip), %rcx      # 0xe5f8
cmpq %rcx, %rax
je 0x53ee
movl -0x4(%rbp), %eax
movq -0x10(%rbp), %rcx
cmpl 0x10(%rcx), %eax
ja 0x53cf
movq -0x10(%rbp), %rax
movl 0x10(%rax), %eax
addl $0x1, %eax
movl %eax, -0x4(%rbp)
jmp 0x53d1
movq -0x10(%rbp), %rax
movq (%rax), %rax
movq %rax, -0x28(%rbp)
movq -0x28(%rbp), %rax
movq %rax, -0x30(%rbp)
movq -0x30(%rbp), %rax
movq %rax, -0x10(%rbp)
jmp 0x53a6
movl -0x4(%rbp), %eax
popq %rbp
retq
nopw %cs:(%rax,%rax)