LLM4Binary/decompile-bench-makefile huggingface dataset:
// File: /workspace/github_c_makefile_star2_O2/cglindkamp[P]dfm/src/application.c
// Function: command_navigate_up
static void command_navigate_up(struct commandexecutor *commandexecutor, char *unused)
{
	struct application *app = container_of(commandexecutor, struct application, commandexecutor);
	(void)unused;
	listview_up(&app->view);
	listview_refresh(&app->view);
	refresh_statusbar(app);
}

// Assembly:
pushq %rbx
movq %rdi, %rbx
addq $-0x178, %rbx           # imm = 0xFE88
movq %rbx, %rdi
callq 0x7ac1
movq %rbx, %rdi
callq 0x7974
movq %rbx, %rdi
popq %rbx
jmp 0x4cc1
// File: /workspace/github_c_makefile_star2_O2/cglindkamp[P]dfm/src/application.c
// Function: command_navigate_down
static void command_navigate_down(struct commandexecutor *commandexecutor, char *unused)
{
	struct application *app = container_of(commandexecutor, struct application, commandexecutor);
	(void)unused;
	listview_down(&app->view);
	listview_refresh(&app->view);
	refresh_statusbar(app);
}

// Assembly:
pushq %rbx
movq %rdi, %rbx
addq $-0x178, %rbx           # imm = 0xFE88
movq %rbx, %rdi
callq 0x7b92
movq %rbx, %rdi
callq 0x7974
movq %rbx, %rdi
popq %rbx
jmp 0x4cc1
// File: /workspace/github_c_makefile_star2_O2/cglindkamp[P]dfm/src/application.c
// Function: command_navigate_pageup
static void command_navigate_pageup(struct commandexecutor *commandexecutor, char *unused)
{
	struct application *app = container_of(commandexecutor, struct application, commandexecutor);
	(void)unused;
	listview_pageup(&app->view);
	listview_refresh(&app->view);
	refresh_statusbar(app);
}

// Assembly:
pushq %rbx
movq %rdi, %rbx
addq $-0x178, %rbx           # imm = 0xFE88
movq %rbx, %rdi
callq 0x7ba3
movq %rbx, %rdi
callq 0x7974
movq %rbx, %rdi
popq %rbx
jmp 0x4cc1
// File: /workspace/github_c_makefile_star2_O2/cglindkamp[P]dfm/src/application.c
// Function: command_navigate_pagedown
static void command_navigate_pagedown(struct commandexecutor *commandexecutor, char *unused)
{
	struct application *app = container_of(commandexecutor, struct application, commandexecutor);
	(void)unused;
	listview_pagedown(&app->view);
	listview_refresh(&app->view);
	refresh_statusbar(app);
}

// Assembly:
pushq %rbx
movq %rdi, %rbx
addq $-0x178, %rbx           # imm = 0xFE88
movq %rbx, %rdi
callq 0x7bd7
movq %rbx, %rdi
callq 0x7974
movq %rbx, %rdi
popq %rbx
jmp 0x4cc1
// File: /workspace/github_c_makefile_star2_O2/cglindkamp[P]dfm/src/application.c
// Function: command_navigate_left
static void command_navigate_left(struct commandexecutor *commandexecutor, char *unused)
{
	struct application *app = container_of(commandexecutor, struct application, commandexecutor);
	(void)unused;
	const char *oldpathname = NULL;

	save_current_position(app);

	if(path_remove_component(&app->cwd, &oldpathname))
		enter_directory(app, oldpathname);
}

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
subq $0x10, %rsp
movq %rdi, %r14
leaq -0x178(%rdi), %rbx
leaq 0x8(%rsp), %r15
andq $0x0, (%r15)
movq %rbx, %rdi
callq 0x4f0d
addq $-0x38, %r14
movq %r14, %rdi
movq %r15, %rsi
callq 0x7e8a
testb %al, %al
je 0x3910
movq 0x8(%rsp), %rsi
movq %rbx, %rdi
callq 0x4aab
addq $0x10, %rsp
popq %rbx
popq %r14
popq %r15
retq
// File: /workspace/github_c_makefile_star2_O2/cglindkamp[P]dfm/src/application.c
// Function: command_navigate_right
static void command_navigate_right(struct commandexecutor *commandexecutor, char *unused)
{
	struct application *app = container_of(commandexecutor, struct application, commandexecutor);
	(void)unused;

	if(listmodel_count(&app->model.listmodel) == 0)
		return;

	save_current_position(app);

	size_t index = listview_getindex(&app->view);
	if(dirmodel_isdir(&app->model, index)) {
		const char *filename = dirmodel_getfilename(&app->model, index);
		if(!path_add_component(&app->cwd, filename))
			return;
		enter_directory(app, NULL);
	} else {
		command_invoke_handler(commandexecutor, "open");
	}
}

// Assembly:
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
pushq %rax
movq %rdi, %rbx
leaq -0x150(%rdi), %r15
movq %r15, %rdi
callq 0x780c
testq %rax, %rax
je 0x3995
leaq -0x178(%rbx), %r14
movq %r14, %rdi
callq 0x4f0d
movq %r14, %rdi
callq 0x7c20
movq %rax, %r12
movq %r15, %rdi
movq %rax, %rsi
callq 0x66d1
testb %al, %al
je 0x39a1
movq %r15, %rdi
movq %r12, %rsi
callq 0x66b1
addq $-0x38, %rbx
movq %rbx, %rdi
movq %rax, %rsi
callq 0x7dda
testb %al, %al
je 0x3995
movq %r14, %rdi
xorl %esi, %esi
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
jmp 0x4aab
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
retq
leaq 0x57a3(%rip), %rsi      # 0x914b
movq %rbx, %rdi
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
jmp 0x3b87
// File: /workspace/github_c_makefile_star2_O2/cglindkamp[P]dfm/src/application.c
// Function: command_navigate_first
static void command_navigate_first(struct commandexecutor *commandexecutor, char *unused)
{
	struct application *app = container_of(commandexecutor, struct application, commandexecutor);
	(void)unused;
	listview_setindex(&app->view, 0);
	listview_refresh(&app->view);
	refresh_statusbar(app);
}

// Assembly:
pushq %rbx
movq %rdi, %rbx
addq $-0x178, %rbx           # imm = 0xFE88
movq %rbx, %rdi
xorl %esi, %esi
callq 0x7c17
movq %rbx, %rdi
callq 0x7974
movq %rbx, %rdi
popq %rbx
jmp 0x4cc1
// File: /workspace/github_c_makefile_star2_O2/cglindkamp[P]dfm/src/application.c
// Function: command_navigate_last
static void command_navigate_last(struct commandexecutor *commandexecutor, char *unused)
{
	struct application *app = container_of(commandexecutor, struct application, commandexecutor);
	(void)unused;
	size_t count = listmodel_count(&app->model.listmodel);

	if(count > 0) {
		listview_setindex(&app->view, count - 1);
		listview_refresh(&app->view);
		refresh_statusbar(app);
	}
}

// Assembly:
pushq %rbx
movq %rdi, %rbx
addq $-0x150, %rdi           # imm = 0xFEB0
callq 0x780c
testq %rax, %rax
je 0x3a1c
addq $-0x178, %rbx           # imm = 0xFE88
decq %rax
movq %rbx, %rdi
movq %rax, %rsi
callq 0x7c17
movq %rbx, %rdi
callq 0x7974
movq %rbx, %rdi
popq %rbx
jmp 0x4cc1
popq %rbx
retq
// File: /workspace/github_c_makefile_star2_O2/cglindkamp[P]dfm/src/application.c
// Function: command_togglemark
static void command_togglemark(struct commandexecutor *commandexecutor, char *unused)
{
	struct application *app = container_of(commandexecutor, struct application, commandexecutor);
	(void)unused;
	if(listmodel_count(&app->model.listmodel) == 0)
		return;

	size_t index = listview_getindex(&app->view);
	listmodel_setmark(&app->model.listmodel, index, !listmodel_ismarked(&app->model.listmodel, index));
	listview_down(&app->view);
	listview_refresh(&app->view);
	refresh_statusbar(app);
}

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
movq %rdi, %rbx
leaq -0x150(%rdi), %r14
movq %r14, %rdi
callq 0x780c
testq %rax, %rax
je 0x3a84
addq $-0x178, %rbx           # imm = 0xFE88
movq %rbx, %rdi
callq 0x7c20
movq %rax, %r15
movq %r14, %rdi
movq %rax, %rsi
callq 0x7823
xorb $0x1, %al
movzbl %al, %edx
movq %r14, %rdi
movq %r15, %rsi
callq 0x7814
movq %rbx, %rdi
callq 0x7b92
movq %rbx, %rdi
callq 0x7974
movq %rbx, %rdi
popq %rbx
popq %r14
popq %r15
jmp 0x4cc1
popq %rbx
popq %r14
popq %r15
retq
// File: /workspace/github_c_makefile_star2_O2/cglindkamp[P]dfm/src/application.c
// Function: command_invert_marks
static void command_invert_marks(struct commandexecutor *commandexecutor, char *unused)
{
	struct application *app = container_of(commandexecutor, struct application, commandexecutor);
	(void)unused;
	size_t count = listmodel_count(&app->model.listmodel);

	if(count > 0) {
		for(size_t i = 0; i < count; i++)
			listmodel_setmark(&app->model.listmodel, i, !listmodel_ismarked(&app->model.listmodel, i));
	}
	listview_refresh(&app->view);
	refresh_statusbar(app);
}

// Assembly:
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
pushq %rax
movq %rdi, %rbx
leaq -0x150(%rdi), %r14
movq %r14, %rdi
callq 0x780c
testq %rax, %rax
je 0x3ad4
movq %rax, %r15
xorl %r12d, %r12d
cmpq %r12, %r15
je 0x3ad4
movq %r14, %rdi
movq %r12, %rsi
callq 0x7823
xorb $0x1, %al
movzbl %al, %edx
movq %r14, %rdi
movq %r12, %rsi
callq 0x7814
incq %r12
jmp 0x3aaf
addq $-0x178, %rbx           # imm = 0xFE88
movq %rbx, %rdi
callq 0x7974
movq %rbx, %rdi
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
jmp 0x4cc1
// File: /workspace/github_c_makefile_star2_O2/cglindkamp[P]dfm/src/application.c
// Function: command_mark
static void command_mark(struct commandexecutor *commandexecutor, char *regex)
{
	struct application *app = container_of(commandexecutor, struct application, commandexecutor);
	dirmodel_regex_setmark(&app->model, regex, true);
	listview_refresh(&app->view);
	refresh_statusbar(app);
}

// Assembly:
pushq %rbx
leaq -0x178(%rdi), %rbx
addq $-0x150, %rdi           # imm = 0xFEB0
pushq $0x1
popq %rdx
callq 0x6102
movq %rbx, %rdi
callq 0x7974
movq %rbx, %rdi
popq %rbx
jmp 0x4cc1
// File: /workspace/github_c_makefile_star2_O2/cglindkamp[P]dfm/src/application.c
// Function: command_unmark
static void command_unmark(struct commandexecutor *commandexecutor, char *regex)
{
	struct application *app = container_of(commandexecutor, struct application, commandexecutor);
	dirmodel_regex_setmark(&app->model, regex, false);
	listview_refresh(&app->view);
	refresh_statusbar(app);
}

// Assembly:
pushq %rbx
leaq -0x178(%rdi), %rbx
addq $-0x150, %rdi           # imm = 0xFEB0
xorl %edx, %edx
callq 0x6102
movq %rbx, %rdi
callq 0x7974
movq %rbx, %rdi
popq %rbx
jmp 0x4cc1
// File: /workspace/github_c_makefile_star2_O2/cglindkamp[P]dfm/src/application.c
// Function: command_change_directory
static void command_change_directory(struct commandexecutor *commandexecutor, char *path)
{
	struct application *app = container_of(commandexecutor, struct application, commandexecutor);
	save_current_position(app);

	if(path_set_from_string(&app->cwd, path) == 0)
		enter_directory(app, NULL);
}

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
movq %rsi, %r14
movq %rdi, %r15
leaq -0x178(%rdi), %rbx
movq %rbx, %rdi
callq 0x4f0d
addq $-0x38, %r15
movq %r15, %rdi
movq %r14, %rsi
callq 0x7eff
testl %eax, %eax
je 0x3b78
popq %rbx
popq %r14
popq %r15
retq
movq %rbx, %rdi
xorl %esi, %esi
popq %rbx
popq %r14
popq %r15
jmp 0x4aab
// File: /workspace/github_c_makefile_star2_O2/cglindkamp[P]dfm/src/application.c
// Function: command_yank
static void command_yank(struct commandexecutor *commandexecutor, char *unused)
{
	struct application *app = container_of(commandexecutor, struct application, commandexecutor);
	(void)unused;
	const struct list *list = NULL;

	int ret = dirmodel_getmarkedfilenames(&app->model, &list);
	char *cwd_copy = strdup(path_tocstr(&app->cwd));

	if(ret == ENOMEM)
		goto err;

	if(ret == 0) {
		if(cwd_copy == NULL)
			goto err;
	} else if(ret == ENOENT) {
		if(listmodel_count(&app->model.listmodel) == 0)
			goto err;

		struct list *selectedlist = list_new(1);
		if(selectedlist == NULL)
			goto err;
		list = selectedlist;

		size_t index = listview_getindex(&app->view);
		char *filename = strdup(dirmodel_getfilename(&app->model, index));
		if(filename == NULL)
			goto err;

		if(!list_append(selectedlist, filename)) {
			free(filename);
			goto err;
		}
	}
	clipboard_set_contents(&app->clipboard, cwd_copy, list);
	return;
err:
	free(cwd_copy);
	list_delete(list, free);
	clipboard_set_contents(&app->clipboard, NULL, NULL);
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
subq $0x10, %rsp
movq %rdi, %rbx
leaq 0x8(%rsp), %rsi
andq $0x0, (%rsi)
leaq -0x150(%rdi), %r15
movq %r15, %rdi
callq 0x5ed8
movl %eax, %ebp
leaq -0x38(%rbx), %rdi
callq 0x7dc8
movq %rax, %rdi
callq 0x36a0
movq %rax, %r14
cmpl $0xc, %ebp
je 0x3e44
cmpl $0x2, %ebp
je 0x3de4
testl %ebp, %ebp
jne 0x3dd0
testq %r14, %r14
je 0x3e44
addq $-0x28, %rbx
movq 0x8(%rsp), %rdx
movq %rbx, %rdi
movq %r14, %rsi
jmp 0x3e68
movq %r15, %rdi
callq 0x780c
testq %rax, %rax
je 0x3e44
pushq $0x1
popq %rdi
callq 0x7480
testq %rax, %rax
je 0x3e44
movq %rax, %r12
leaq -0x178(%rbx), %rdi
movq %rax, 0x8(%rsp)
callq 0x7c20
movq %r15, %rdi
movq %rax, %rsi
callq 0x66b1
movq %rax, %rdi
callq 0x36a0
testq %rax, %rax
je 0x3e44
movq %rax, %r15
movq %r12, %rdi
movq %rax, %rsi
callq 0x7519
testb %al, %al
jne 0x3dd0
movq %r15, %rdi
callq 0x3740
movq %r14, %rdi
callq 0x3740
movq 0x915d(%rip), %rsi      # 0xcfb0
movq 0x8(%rsp), %rdi
callq 0x74d1
addq $-0x28, %rbx
movq %rbx, %rdi
xorl %esi, %esi
xorl %edx, %edx
callq 0x51f4
addq $0x10, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O2/cglindkamp[P]dfm/src/application.c
// Function: command_mkdir
static void command_mkdir(struct commandexecutor *commandexecutor, char *dirname)
{
	struct application *app = container_of(commandexecutor, struct application, commandexecutor);
	if(mkdir(dirname, 0777) == 0) {
		dirmodel_notify_file_added_or_changed(&app->model, dirname);
		dirmodel_notify_flush(&app->model);
		select_filename(app, dirname);
	}
}

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
movq %rsi, %rbx
movq %rdi, %r14
movq %rsi, %rdi
movl $0x1ff, %esi            # imm = 0x1FF
callq 0x3130
testl %eax, %eax
je 0x3ea1
popq %rbx
popq %r14
popq %r15
retq
leaq -0x178(%r14), %r15
addq $-0x150, %r14           # imm = 0xFEB0
movq %r14, %rdi
movq %rbx, %rsi
callq 0x639c
movq %r14, %rdi
callq 0x640e
movq %r15, %rdi
movq %rbx, %rsi
popq %rbx
popq %r14
popq %r15
jmp 0x503e
// File: /workspace/github_c_makefile_star2_O2/cglindkamp[P]dfm/src/application.c
// Function: command_cmdline
static void command_cmdline(struct commandexecutor *commandexecutor, char *command)
{
	struct application *app = container_of(commandexecutor, struct application, commandexecutor);
	app->mode = MODE_COMMAND;
	curs_set(1);
	commandline_start(&app->commandline, L':');

	if(command != NULL) {
		size_t length = mbstowcs(NULL, command, 0);
		if(length != (size_t)-1) {
			wchar_t buffer[length + 1];
			mbstowcs(buffer, command, length);

			for(size_t i = 0; i < length; i++)
				commandline_handlekey(&app->commandline, buffer[i], false);
		}
	}
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movq %rsi, %r14
movq %rdi, %rbx
movl $0x1, 0x44(%rdi)
pushq $0x1
popq %rdi
callq 0x3140
addq $-0x80, %rbx
pushq $0x3a
popq %rsi
movq %rbx, %rdi
callq 0x556e
testq %r14, %r14
je 0x3f62
xorl %edi, %edi
movq %r14, %rsi
xorl %edx, %edx
callq 0x31a0
cmpq $-0x1, %rax
je 0x3f62
movq %rax, %r15
movq %rsp, %r13
movq %rsp, %r12
leaq 0x13(,%rax,4), %rax
andq $-0x10, %rax
subq %rax, %r12
movq %r12, %rsp
movq %r12, %rdi
movq %r14, %rsi
movq %r15, %rdx
callq 0x31a0
xorl %r14d, %r14d
cmpq %r14, %r15
je 0x3f5f
movl (%r12,%r14,4), %esi
movq %rbx, %rdi
xorl %edx, %edx
callq 0x5796
incq %r14
jmp 0x3f47
movq %r13, %rsp
leaq -0x28(%rbp), %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O2/cglindkamp[P]dfm/src/application.c
// Function: command_rename
static void command_rename(struct commandexecutor *commandexecutor, char *newfilename)
{
	struct application *app = container_of(commandexecutor, struct application, commandexecutor);
	if(listmodel_count(&app->model.listmodel) == 0)
		return;

	size_t index = listview_getindex(&app->view);
	const char *filename = dirmodel_getfilename(&app->model, index);

	if(rename(filename, newfilename) == 0) {
		dirmodel_notify_file_deleted(&app->model, filename);
		dirmodel_notify_file_added_or_changed(&app->model, newfilename);
		dirmodel_notify_flush(&app->model);
		select_filename(app, newfilename);
		if(app->mode == MODE_NORMAL)
			refresh_statusbar(app);
	}
}

// Assembly:
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
movq %rsi, %r14
movq %rdi, %rbx
leaq -0x150(%rdi), %r12
movq %r12, %rdi
callq 0x780c
testq %rax, %rax
je 0x3fef
leaq -0x178(%rbx), %r15
movq %r15, %rdi
callq 0x7c20
movq %r12, %rdi
movq %rax, %rsi
callq 0x66b1
movq %rax, %r13
movq %rax, %rdi
movq %r14, %rsi
callq 0x3630
testl %eax, %eax
jne 0x3fef
movq %r12, %rdi
movq %r13, %rsi
callq 0x62b2
movq %r12, %rdi
movq %r14, %rsi
callq 0x639c
movq %r12, %rdi
callq 0x640e
movq %r15, %rdi
movq %r14, %rsi
callq 0x503e
cmpl $0x0, 0x44(%rbx)
je 0x3ff9
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
retq
movq %r15, %rdi
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
jmp 0x4cc1
// File: /workspace/github_c_makefile_star2_O2/cglindkamp[P]dfm/src/application.c
// Function: command_search_next
static void command_search_next(struct commandexecutor *commandexecutor, char *unused)
{
	struct application *app = container_of(commandexecutor, struct application, commandexecutor);
	(void)unused;
	if(!app->lastsearch_regex)
		return;

	size_t index = listview_getindex(&app->view);

	index = dirmodel_regex_getnext(&app->model, app->lastsearch_regex, index, app->lastsearch_direction);

	listview_setindex(&app->view, index);
	listview_refresh(&app->view);
	refresh_statusbar(app);
}

// Assembly:
cmpq $0x0, 0x50(%rdi)
je 0x406e
pushq %r14
pushq %rbx
pushq %rax
movq %rdi, %rbx
leaq -0x178(%rdi), %r14
movq %r14, %rdi
callq 0x7c20
leaq -0x150(%rbx), %rdi
movq 0x50(%rbx), %rsi
movl 0x58(%rbx), %ecx
movq %rax, %rdx
callq 0x601f
movq %r14, %rdi
movq %rax, %rsi
callq 0x7c17
movq %r14, %rdi
callq 0x7974
movq %r14, %rdi
addq $0x8, %rsp
popq %rbx
popq %r14
jmp 0x4cc1
retq
// File: /workspace/github_c_makefile_star2_O2/cglindkamp[P]dfm/src/application.c
// Function: command_sort
static void command_sort(struct commandexecutor *commandexecutor, char *mode_string)
{
	struct application *app = container_of(commandexecutor, struct application, commandexecutor);
	enum dirmodel_sort_mode mode;
	if(strcmp(mode_string, "name+") == 0)
		mode = DIRMODEL_FILENAME;
	else if(strcmp(mode_string, "name-") == 0)
		mode = DIRMODEL_FILENAME_DESCENDING;
	else if(strcmp(mode_string, "size+") == 0)
		mode = DIRMODEL_SIZE;
	else if(strcmp(mode_string, "size-") == 0)
		mode = DIRMODEL_SIZE_DESCENDING;
	else if(strcmp(mode_string, "mtime+") == 0)
		mode = DIRMODEL_MTIME;
	else if(strcmp(mode_string, "mtime-") == 0)
		mode = DIRMODEL_MTIME_DESCENDING;
	else
		return;
	dirmodel_set_sort_mode(&app->model, mode);
	enter_directory(app, NULL);
}

// Assembly:
pushq %r14
pushq %rbx
pushq %rax
movq %rsi, %r14
movq %rdi, %rbx
leaq 0x50c4(%rip), %rsi      # 0x917b
movq %r14, %rdi
callq 0x33d0
testl %eax, %eax
je 0x412a
leaq 0x50b7(%rip), %rsi      # 0x9181
movq %r14, %rdi
callq 0x33d0
testl %eax, %eax
je 0x412e
leaq 0x50aa(%rip), %rsi      # 0x9187
movq %r14, %rdi
callq 0x33d0
testl %eax, %eax
je 0x4132
leaq 0x509d(%rip), %rsi      # 0x918d
movq %r14, %rdi
callq 0x33d0
testl %eax, %eax
je 0x4136
leaq 0x5090(%rip), %rsi      # 0x9193
movq %r14, %rdi
callq 0x33d0
testl %eax, %eax
je 0x413a
leaq 0x5084(%rip), %rsi      # 0x919a
movq %r14, %rdi
callq 0x33d0
testl %eax, %eax
je 0x413e
addq $0x8, %rsp
popq %rbx
popq %r14
retq
xorl %esi, %esi
jmp 0x4141
pushq $0x1
jmp 0x4140
pushq $0x2
jmp 0x4140
pushq $0x3
jmp 0x4140
pushq $0x4
jmp 0x4140
pushq $0x5
popq %rsi
leaq -0x178(%rbx), %r14
addq $-0x150, %rbx           # imm = 0xFEB0
movq %rbx, %rdi
callq 0x629d
movq %r14, %rdi
xorl %esi, %esi
addq $0x8, %rsp
popq %rbx
popq %r14
jmp 0x4aab
// File: /workspace/github_c_makefile_star2_O2/cglindkamp[P]dfm/src/application.c
// Function: handle_stdin
static void handle_stdin(struct application *app)
{
	wint_t key;
	int ret;

	ret = wget_wch(app->status, &key);
	if(ret == ERR)
		return;

	if(app->mode == MODE_COMMAND) {
		if(ret != KEY_CODE_YES && key == L'\n') {
			app->mode = MODE_NORMAL;
			curs_set(0);
			refresh_statusbar(app);

			const wchar_t *wcommand = commandline_getcommand(&app->commandline);
			char command[wcstombs(NULL, wcommand, 0) + 1];
			wcstombs(command, wcommand, sizeof(command));
			commandexecutor_execute(&app->commandexecutor, command);
			commandline_history_add(&app->commandline, wcommand);
		} else if(ret != KEY_CODE_YES && key == L'\t') {
		} else if(ret != KEY_CODE_YES && key == 27) {
			ret = wget_wch(app->status, &key);
			if(ret == ERR) {
				app->mode = MODE_NORMAL;
				curs_set(0);
				werase(app->status);
				wrefresh(app->status);
				return;
			}
			if(ret != KEY_CODE_YES && key == L'\n')
				insert_current_file_into_commandline(app);
		} else
			commandline_handlekey(&app->commandline, key, ret == KEY_CODE_YES ? true : false);

	} else
		keymap_handlekey(&app->keymap, key, ret == KEY_CODE_YES ? true : false);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movq %rdi, %rbx
movq 0xf0(%rdi), %rdi
leaq -0x2c(%rbp), %rsi
callq 0x3720
cmpl $-0x1, %eax
je 0x46a9
cmpl $0x1, 0x1bc(%rbx)
movl -0x2c(%rbp), %esi
jne 0x4690
cmpl $0x100, %eax            # imm = 0x100
setne %cl
cmpl $0xa, %esi
sete %dl
andb %cl, %dl
cmpb $0x1, %dl
jne 0x46b8
andl $0x0, 0x1bc(%rbx)
xorl %edi, %edi
callq 0x3140
movq %rbx, %rdi
callq 0x4cc1
leaq 0xf8(%rbx), %r14
movq %r14, %rdi
callq 0x5bd8
movq %rax, %r15
xorl %edi, %edi
movq %rax, %rsi
xorl %edx, %edx
callq 0x3660
movq %rsp, %r13
leaq 0x1(%rax), %rdx
addq $0x10, %rax
andq $-0x10, %rax
movq %rsp, %r12
subq %rax, %r12
movq %r12, %rsp
movq %r12, %rdi
movq %r15, %rsi
callq 0x3660
addq $0x178, %rbx            # imm = 0x178
movq %rbx, %rdi
movq %r12, %rsi
callq 0x54f8
movq %r14, %rdi
movq %r15, %rsi
callq 0x5c1c
movq %r13, %rsp
jmp 0x46a9
addq $0x168, %rbx            # imm = 0x168
xorl %edx, %edx
cmpl $0x100, %eax            # imm = 0x100
sete %dl
movq %rbx, %rdi
callq 0x6a38
leaq -0x28(%rbp), %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
cmpl $0x100, %eax            # imm = 0x100
setne %cl
cmpl $0x9, %esi
sete %dl
testb %dl, %cl
jne 0x46a9
cmpl $0x100, %eax            # imm = 0x100
setne %cl
cmpl $0x1b, %esi
sete %dl
andb %cl, %dl
cmpb $0x1, %dl
jne 0x470b
movq 0xf0(%rbx), %rdi
leaq -0x2c(%rbp), %rsi
callq 0x3720
cmpl $-0x1, %eax
je 0x4726
cmpl $0x100, %eax            # imm = 0x100
je 0x46a9
cmpl $0xa, -0x2c(%rbp)
jne 0x46a9
movq %rbx, %rdi
callq 0x50ef
jmp 0x46a9
addq $0xf8, %rbx
xorl %edx, %edx
cmpl $0x100, %eax            # imm = 0x100
sete %dl
movq %rbx, %rdi
callq 0x5796
jmp 0x46a9
andl $0x0, 0x1bc(%rbx)
xorl %edi, %edi
callq 0x3140
movq 0xf0(%rbx), %rdi
callq 0x30e0
movq 0xf0(%rbx), %rdi
callq 0x3390
jmp 0x46a9
// File: /workspace/github_c_makefile_star2_O2/cglindkamp[P]dfm/src/application.c
// Function: enter_directory
static bool enter_directory(struct application *app, const char *oldpathname)
{
	while(1) {
		const char *cwd = path_tocstr(&app->cwd);

		if(app->inotify_fd != -1) {
			if(app->inotify_watch != -1)
				inotify_rm_watch(app->inotify_fd, app->inotify_watch);

			app->inotify_watch = inotify_add_watch(app->inotify_fd, cwd,
				IN_CREATE |
				IN_ATTRIB |
				IN_DELETE |
				IN_MOVED_FROM |
				IN_MOVED_TO |
				IN_MODIFY |
				IN_EXCL_UNLINK
				);
		}

		if(chdir(cwd) == 0 && dirmodel_change_directory(&app->model, cwd))
			break;

		if(strcmp(cwd, "/") == 0) {
			puts("Cannot even open \"/\", exiting");
			app->running = false;
			return false;
		}
		path_remove_component(&app->cwd, &oldpathname);
	}

	update_terminal_title(app);
	select_stored_position(app, oldpathname);
	display_current_path(app);
	refresh_statusbar(app);
	listview_refresh(&app->view);

	app->inotify_cookie = 0;

	return true;
}

// Assembly:
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x10, %rsp
movq %rdi, %rbx
leaq 0x8(%rsp), %r15
movq %rsi, (%r15)
leaq 0x140(%rdi), %r14
leaq 0x28(%rdi), %r12
movq %r14, %rdi
callq 0x7dc8
movq %rax, %r13
movl 0x1b0(%rbx), %edi
cmpl $-0x1, %edi
je 0x4b0d
movl 0x1b4(%rbx), %esi
cmpl $-0x1, %esi
je 0x4afa
callq 0x36b0
movl 0x1b0(%rbx), %edi
movq %r13, %rsi
movl $0x40003c6, %edx        # imm = 0x40003C6
callq 0x34b0
movl %eax, 0x1b4(%rbx)
movq %r13, %rdi
callq 0x3250
testl %eax, %eax
jne 0x4b28
movq %r12, %rdi
movq %r13, %rsi
callq 0x66ee
testb %al, %al
jne 0x4b5d
cmpb $0x2f, (%r13)
jne 0x4b36
cmpb $0x0, 0x1(%r13)
je 0x4b43
movq %r14, %rdi
movq %r15, %rsi
callq 0x7e8a
jmp 0x4ace
leaq 0x4657(%rip), %rdi      # 0x91a1
callq 0x3160
movb $0x0, 0x1c0(%rbx)
xorl %eax, %eax
jmp 0x4c21
leaq 0x465b(%rip), %rdi      # 0x91bf
callq 0x31f0
testl %eax, %eax
je 0x4bcc
leaq 0x464e(%rip), %rdi      # 0x91c2
callq 0x35f0
movq %rax, %rdi
callq 0x3510
leaq 0x463e(%rip), %rdi      # 0x91c6
callq 0x3510
movq %r14, %rdi
callq 0x7dc8
movq %rax, %rdi
callq 0x3510
leaq 0x4628(%rip), %rdi      # 0x91cc
callq 0x3510
leaq 0x461e(%rip), %rdi      # 0x91ce
callq 0x35f0
movq %rax, %rdi
callq 0x3510
movq 0x8404(%rip), %rax      # 0xcfc8
movq (%rax), %rdi
callq 0x34a0
movq 0x8(%rsp), %rsi
testq %rsi, %rsi
jne 0x4bf8
movq 0xe0(%rbx), %r15
movq %r14, %rdi
callq 0x7dc8
movq %r15, %rdi
movq %rax, %rsi
callq 0x5e87
movq %rax, %rsi
testq %rax, %rax
je 0x4c00
movq %rbx, %rdi
callq 0x503e
movq %rbx, %rdi
callq 0x5196
movq %rbx, %rdi
callq 0x4cc1
movq %rbx, %rdi
callq 0x7974
andl $0x0, 0x1b8(%rbx)
movb $0x1, %al
addq $0x10, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
retq
// File: /workspace/github_c_makefile_star2_O2/cglindkamp[P]dfm/src/application.c
// Function: application_destroy
void application_destroy(struct application *app)
{
	free((void*)app->lastsearch_regex);
	listview_destroy(&app->view);
	path_destroy(&app->cwd);
	commandline_destroy(&app->commandline);
	if(app->status)
		delwin(app->status);
	if(app->pathbar)
		delwin(app->pathbar);
	dict_delete(app->stored_positions, true);
	dirmodel_destroy(&app->model);
	keymap_destroy(&app->keymap);
	clipboard_destroy(&app->clipboard);
	processmanager_destroy(&app->pm);
}

// Assembly:
pushq %rbx
movq %rdi, %rbx
movq 0x1c8(%rdi), %rdi
callq 0x3740
movq %rbx, %rdi
callq 0x7d9f
leaq 0x140(%rbx), %rdi
callq 0x808a
leaq 0xf8(%rbx), %rdi
callq 0x5d39
movq 0xf0(%rbx), %rdi
testq %rdi, %rdi
je 0x4c70
callq 0x31e0
movq 0xe8(%rbx), %rdi
testq %rdi, %rdi
je 0x4c81
callq 0x31e0
movq 0xe0(%rbx), %rdi
pushq $0x1
popq %rsi
callq 0x5d77
leaq 0x28(%rbx), %rdi
callq 0x6a0e
leaq 0x168(%rbx), %rdi
callq 0x6cd8
leaq 0x150(%rbx), %rdi
callq 0x52f4
addq $0x180, %rbx            # imm = 0x180
movq %rbx, %rdi
popq %rbx
jmp 0x8218
// File: /workspace/github_c_makefile_star2_O2/cglindkamp[P]dfm/src/application.c
// Function: save_current_position
static void save_current_position(struct application *app)
{
	if(listmodel_count(&app->model.listmodel) != 0) {
		free(dict_get(app->stored_positions, path_tocstr(&app->cwd)));

		size_t index = listview_getindex(&app->view);
		const char *filename = dirmodel_getfilename(&app->model, index);

		char *filename_copy = strdup(filename);
		if(filename_copy == NULL)
			return;
		if(!dict_set(app->stored_positions, path_tocstr(&app->cwd), filename_copy))
			free(filename_copy);
	}
}

// Assembly:
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
pushq %rax
movq %rdi, %rbx
leaq 0x28(%rdi), %r15
movq %r15, %rdi
callq 0x780c
testq %rax, %rax
je 0x4f96
movq 0xe0(%rbx), %r12
leaq 0x140(%rbx), %r14
movq %r14, %rdi
callq 0x7dc8
movq %r12, %rdi
movq %rax, %rsi
callq 0x5e87
movq %rax, %rdi
callq 0x3740
movq %rbx, %rdi
callq 0x7c20
movq %r15, %rdi
movq %rax, %rsi
callq 0x66b1
movq %rax, %rdi
callq 0x36a0
testq %rax, %rax
je 0x4f96
movq %rax, %r15
movq 0xe0(%rbx), %rbx
movq %r14, %rdi
callq 0x7dc8
movq %rbx, %rdi
movq %rax, %rsi
movq %r15, %rdx
callq 0x5ddf
testb %al, %al
je 0x4fa2
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
retq
movq %r15, %rdi
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
jmp 0x3740
// File: /workspace/github_c_makefile_star2_O2/cglindkamp[P]dfm/src/application.c
// Function: unblock_signals
static void unblock_signals(void)
{
	sigset_t sigset;

	sigemptyset(&sigset);
	sigaddset(&sigset, SIGWINCH);
	sigaddset(&sigset, SIGCHLD);
	sigaddset(&sigset, SIGALRM);
	sigprocmask(SIG_UNBLOCK, &sigset, NULL);
}

// Assembly:
pushq %rbx
subq $0x80, %rsp
movq %rsp, %rbx
movq %rbx, %rdi
callq 0x3400
pushq $0x1c
popq %rsi
movq %rbx, %rdi
callq 0x36e0
pushq $0x11
popq %rsi
movq %rbx, %rdi
callq 0x36e0
pushq $0xe
popq %rsi
movq %rbx, %rdi
callq 0x36e0
pushq $0x1
popq %rdi
movq %rbx, %rsi
xorl %edx, %edx
callq 0x30a0
addq $0x80, %rsp
popq %rbx
retq
// File: /workspace/github_c_makefile_star2_O2/cglindkamp[P]dfm/src/application.c
// Function: background_process_and_unblock_signals
static void background_process_and_unblock_signals(void)
{
	int fd = open("/dev/null", O_RDWR);
	dup2(fd, 0);
	dup2(fd, 1);
	dup2(fd, 2);

	unblock_signals();
}

// Assembly:
pushq %rbp
pushq %rbx
pushq %rax
leaq 0x4168(%rip), %rdi      # 0x9171
pushq $0x2
popq %rbx
movl %ebx, %esi
xorl %eax, %eax
callq 0x3600
movl %eax, %ebp
movl %eax, %edi
xorl %esi, %esi
callq 0x3270
pushq $0x1
popq %rsi
movl %ebp, %edi
callq 0x3270
movl %ebp, %edi
movl %ebx, %esi
callq 0x3270
addq $0x8, %rsp
popq %rbx
popq %rbp
jmp 0x4fb5
// File: /workspace/github_c_makefile_star2_O2/cglindkamp[P]dfm/src/application.c
// Function: select_filename
static void select_filename(struct application *app, const char *filename)
{
	size_t index;

	if(!dirmodel_get_index(&app->model, filename, &index))
		return;
	if(index == listmodel_count(&app->model.listmodel))
		index--;
	listview_setindex(&app->view, index);
	listview_refresh(&app->view);
}

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
subq $0x10, %rsp
movq %rdi, %rbx
leaq 0x28(%rdi), %r14
leaq 0x8(%rsp), %rdx
movq %r14, %rdi
callq 0x6011
testb %al, %al
je 0x508e
movq 0x8(%rsp), %r15
movq %r14, %rdi
callq 0x780c
movq 0x8(%rsp), %rsi
cmpq %rax, %r15
jne 0x507e
decq %rsi
movq %rsi, 0x8(%rsp)
movq %rbx, %rdi
callq 0x7c17
movq %rbx, %rdi
callq 0x7974
addq $0x10, %rsp
popq %rbx
popq %r14
popq %r15
retq
// File: /workspace/github_c_makefile_star2_O2/cglindkamp[P]dfm/src/application.c
// Function: insert_current_file_into_commandline
static void insert_current_file_into_commandline(struct application *app)
{
	if(listmodel_count(&app->model.listmodel) == 0)
		return;

	size_t index = listview_getindex(&app->view);
	const char *filename = dirmodel_getfilename(&app->model, index);
	size_t length = mbstowcs(NULL, filename, 0);

	if(length != (size_t)-1) {
		wchar_t buffer[length + 1];
		mbstowcs(buffer, filename, length);

		for(size_t i = 0; i < length; i++)
			commandline_handlekey(&app->commandline, buffer[i], false);
	}
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movq %rdi, %rbx
leaq 0x28(%rdi), %r14
movq %r14, %rdi
callq 0x780c
testq %rax, %rax
je 0x5187
movq %rbx, %rdi
callq 0x7c20
movq %r14, %rdi
movq %rax, %rsi
callq 0x66b1
movq %rax, %r12
xorl %edi, %edi
movq %rax, %rsi
xorl %edx, %edx
callq 0x31a0
cmpq $-0x1, %rax
je 0x5187
movq %rax, %r14
movq %rsp, %r13
movq %rsp, %r15
leaq 0x13(,%rax,4), %rax
andq $-0x10, %rax
subq %rax, %r15
movq %r15, %rsp
movq %r15, %rdi
movq %r12, %rsi
movq %r14, %rdx
callq 0x31a0
addq $0xf8, %rbx
xorl %r12d, %r12d
cmpq %r12, %r14
je 0x5184
movl (%r15,%r12,4), %esi
movq %rbx, %rdi
xorl %edx, %edx
callq 0x5796
incq %r12
jmp 0x516c
movq %r13, %rsp
leaq -0x28(%rbp), %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O2/cglindkamp[P]dfm/src/application.c
// Function: display_current_path
static void display_current_path(struct application *app)
{
	wmove(app->pathbar, 0, 0);
	werase(app->pathbar);
	wprintw(app->pathbar, "%s", path_tocstr(&app->cwd));
	wrefresh(app->pathbar);
}

// Assembly:
pushq %r14
pushq %rbx
pushq %rax
movq %rdi, %rbx
movq 0xe8(%rdi), %rdi
xorl %esi, %esi
xorl %edx, %edx
callq 0x3090
movq 0xe8(%rbx), %rdi
callq 0x30e0
movq 0xe8(%rbx), %r14
leaq 0x140(%rbx), %rdi
callq 0x7dc8
leaq 0x3f75(%rip), %rsi      # 0x9148
movq %r14, %rdi
movq %rax, %rdx
xorl %eax, %eax
callq 0x3730
movq 0xe8(%rbx), %rdi
addq $0x8, %rsp
popq %rbx
popq %r14
jmp 0x3390
nop
// File: /workspace/github_c_makefile_star2_O2/cglindkamp[P]dfm/src/clipboard.c
// Function: clipboard_set_contents
bool clipboard_set_contents(struct clipboard *clipboard, const char *path, const struct list *filelist)
{
	if(clipboard->shared_clipboard_path) {
		int clipboard_dir_fd = open(clipboard->shared_clipboard_path, O_RDONLY);
		if(clipboard_dir_fd == -1) {
			free((void *)path);
			list_delete(filelist, free);
			return false;
		}

		unlinkat(clipboard_dir_fd, CLIPBOARD_PATH, 0);
		unlinkat(clipboard_dir_fd, CLIPBOARD_LIST, 0);
		bool ret = dump_contents_to_directory(clipboard_dir_fd, path, filelist);

		free((void *)path);
		list_delete(filelist, free);
		close(clipboard_dir_fd);

		return ret;
	} else {
		clipboard_destroy(clipboard);
		clipboard->path = path;
		clipboard->filelist = filelist;
	}

	return true;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %rbx
pushq %rax
movq %rdx, %rbx
movq %rsi, %r14
movq %rdi, %r15
movq 0x10(%rdi), %rdi
testq %rdi, %rdi
je 0x5270
xorl %esi, %esi
xorl %eax, %eax
callq 0x3600
cmpl $-0x1, %eax
je 0x5283
movl %eax, %ebp
leaq 0x3fcc(%rip), %rsi      # 0x91f0
movl %eax, %edi
xorl %edx, %edx
callq 0x3150
leaq 0x3fcb(%rip), %rsi      # 0x91ff
movl %ebp, %edi
xorl %edx, %edx
callq 0x3150
movl %ebp, %edi
movq %r14, %rsi
movq %rbx, %rdx
callq 0x52a7
movl %eax, %r15d
movq %r14, %rdi
callq 0x3740
movq 0x7d54(%rip), %rsi      # 0xcfb0
movq %rbx, %rdi
callq 0x74d1
movl %ebp, %edi
callq 0x3320
movl %r15d, %eax
jmp 0x529c
movq %r15, %rdi
callq 0x52f4
movq %r14, (%r15)
movq %rbx, 0x8(%r15)
movb $0x1, %al
jmp 0x529c
movq %r14, %rdi
callq 0x3740
movq 0x7d1e(%rip), %rsi      # 0xcfb0
movq %rbx, %rdi
callq 0x74d1
xorl %eax, %eax
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O2/cglindkamp[P]dfm/src/clipboard.c
// Function: dump_contents_to_directory
static bool dump_contents_to_directory(int dir_fd, const char *path, const struct list *filelist) {
	if(path && filelist) {
		if(!dump_string_to_file(dir_fd, CLIPBOARD_PATH, path))
			return false;

		if(!dump_filelist_to_file(dir_fd, CLIPBOARD_LIST, filelist))
			return false;
	}
	return true;
}

// Assembly:
pushq %rbp
pushq %rbx
pushq %rax
movq %rdx, %rbx
testq %rsi, %rsi
sete %al
testq %rdx, %rdx
sete %cl
orb %al, %cl
jne 0x52e7
movq %rsi, %rdx
movl %edi, %ebp
leaq 0x3f27(%rip), %rsi      # 0x91f0
callq 0x8535
testb %al, %al
je 0x52eb
leaq 0x3f26(%rip), %rsi      # 0x91ff
movl %ebp, %edi
movq %rbx, %rdx
callq 0x8581
testb %al, %al
je 0x52eb
movb $0x1, %al
jmp 0x52ed
xorl %eax, %eax
addq $0x8, %rsp
popq %rbx
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O2/cglindkamp[P]dfm/src/clipboard.c
// Function: clipboard_dump_contents_to_directory
bool clipboard_dump_contents_to_directory(struct clipboard *clipboard, int dir_fd)
{
	if(clipboard->shared_clipboard_path) {
		int clipboard_dir_fd = open(clipboard->shared_clipboard_path, O_RDONLY);
		if(clipboard_dir_fd == -1)
			return false;

		if((faccessat(clipboard_dir_fd, CLIPBOARD_PATH, F_OK, 0) != 0 &&
		    faccessat(clipboard_dir_fd, CLIPBOARD_LIST, F_OK, 0) != 0) ||
		   (linkat(clipboard_dir_fd, CLIPBOARD_PATH, dir_fd, CLIPBOARD_PATH, 0) == 0 &&
		    linkat(clipboard_dir_fd, CLIPBOARD_LIST, dir_fd, CLIPBOARD_LIST, 0) == 0)) {
			close(clipboard_dir_fd);
			return true;
		}
		close(clipboard_dir_fd);
		return false;
	} else {
		return dump_contents_to_directory(dir_fd, clipboard->path, clipboard->filelist);
	}
}

// Assembly:
pushq %rbp
pushq %r14
pushq %rbx
movl %esi, %ebx
movq %rdi, %rax
movq 0x10(%rdi), %rdi
testq %rdi, %rdi
je 0x5372
xorl %r14d, %r14d
xorl %esi, %esi
xorl %eax, %eax
callq 0x3600
cmpl $-0x1, %eax
je 0x53c2
movl %eax, %ebp
leaq 0x3eaf(%rip), %rsi      # 0x91f0
movl %eax, %edi
xorl %edx, %edx
xorl %ecx, %ecx
callq 0x3190
testl %eax, %eax
je 0x5384
leaq 0x3ea8(%rip), %rsi      # 0x91ff
movl %ebp, %edi
xorl %edx, %edx
xorl %ecx, %ecx
callq 0x3190
testl %eax, %eax
je 0x5384
movl %ebp, %edi
callq 0x3320
movb $0x1, %r14b
jmp 0x53c2
movq (%rax), %rsi
movq 0x8(%rax), %rdx
movl %ebx, %edi
popq %rbx
popq %r14
popq %rbp
jmp 0x52a7
leaq 0x3e65(%rip), %rcx      # 0x91f0
movl %ebp, %edi
movq %rcx, %rsi
movl %ebx, %edx
xorl %r8d, %r8d
callq 0x3550
testl %eax, %eax
jne 0x53b8
leaq 0x3e5a(%rip), %rcx      # 0x91ff
movl %ebp, %edi
movq %rcx, %rsi
movl %ebx, %edx
xorl %r8d, %r8d
callq 0x3550
testl %eax, %eax
je 0x5366
movl %ebp, %edi
callq 0x3320
xorl %r14d, %r14d
movl %r14d, %eax
popq %rbx
popq %r14
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O2/cglindkamp[P]dfm/src/commandexecutor.c
// Function: command_parse
static int command_parse(char *command, command_ptr *commandptr, char **param, struct command_map *commandmap)
{
	bool param_mandatory;
	bool characters_after_command = false;

	char *token = command;
	size_t length = strcspn(token, " \t");

	if(length > 0) {
		if(token[length] != '\0')
			characters_after_command = true;
		token[length] = '\0';
		map_command(commandmap, token, commandptr, &param_mandatory);
		if(*commandptr == NULL)
			return EINVAL;
	} else
		return EINVAL;

	if(characters_after_command) {
		token = token + length + 1 + strspn(token + length + 1, " \t");
		if(token[0] != '\0') {
			*param = token;
			return 0;
		}
	}

	*param = NULL;
	if(param_mandatory)
		return EINVAL;
	return 0;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movq %rcx, %r15
movq %rdx, %rbx
movq %rsi, %r12
movq %rdi, %r13
leaq 0x3db9(%rip), %rsi      # 0x920e
callq 0x33a0
pushq $0x16
popq %rbp
testq %rax, %rax
je 0x54e7
movq %rax, %r14
movq %rbx, (%rsp)
addq %r13, %r14
movb (%r13,%rax), %bl
movb $0x0, (%r13,%rax)
andq $0x0, (%r12)
movq (%r15), %rdi
testq %rdi, %rdi
je 0x54e7
movq %r13, %rsi
callq 0x33d0
addq $0x18, %r15
testl %eax, %eax
jne 0x5480
movq -0x10(%r15), %rax
movq %rax, (%r12)
xorl %r12d, %r12d
cmpb $0x0, -0x8(%r15)
pushq $0x16
popq %rbp
cmovnel %ebp, %r12d
testq %rax, %rax
je 0x54e7
testb %bl, %bl
je 0x54db
leaq 0x1(%r14), %rdi
leaq 0x3d4b(%rip), %rsi      # 0x920e
callq 0x3340
cmpb $0x0, 0x1(%r14,%rax)
je 0x54db
addq %r14, %rax
incq %rax
xorl %r12d, %r12d
jmp 0x54dd
xorl %eax, %eax
movq (%rsp), %rcx
movq %rax, (%rcx)
movl %r12d, %ebp
movl %ebp, %eax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O2/cglindkamp[P]dfm/src/commandexecutor.c
// Function: commandexecutor_execute
int commandexecutor_execute(struct commandexecutor *commandexecutor, char *command) {
	command_ptr commandptr;
	char *param;

	int ret = command_parse(command, &commandptr, &param, commandexecutor->commandmap);
	if(ret == 0)
		commandptr(commandexecutor, param);
	else
		return ret;
	return 0;
}

// Assembly:
pushq %rbp
pushq %rbx
subq $0x18, %rsp
movq %rsi, %rax
movq %rdi, %rbx
movq (%rdi), %rcx
leaq 0x10(%rsp), %rsi
leaq 0x8(%rsp), %rdx
movq %rax, %rdi
callq 0x5437
movl %eax, %ebp
testl %eax, %eax
jne 0x552b
movq 0x8(%rsp), %rsi
movq %rbx, %rdi
callq *0x10(%rsp)
movl %ebp, %eax
addq $0x18, %rsp
popq %rbx
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O2/cglindkamp[P]dfm/src/commandline.c
// Function: commandline_start
int commandline_start(struct commandline *commandline, wchar_t prompt)
{
	commandline->prompt[0] = prompt;
	commandline->cursor_pos = 0;
	commandline->first = 0;
	commandline->history_position = 0;

	if(commandline->backup_buffer) {
		commandline->buffer = commandline->backup_buffer;
		commandline->backup_buffer = NULL;
	}
	if(commandline->buffer == NULL)
		commandline->buffer = malloc(commandline->allocated_size * sizeof(wchar_t));
	if(commandline->buffer == NULL)
		return ENOMEM;

	commandline->buffer[0] = L'\0';

	commandline_updateview(commandline);

	return 0;
}

// Assembly:
pushq %rbx
movq %rdi, %rbx
movl %esi, 0x30(%rdi)
andq $0x0, 0x10(%rdi)
xorps %xmm0, %xmm0
movups %xmm0, 0x38(%rdi)
movq 0x20(%rdi), %rax
testq %rax, %rax
je 0x5595
movq %rax, 0x18(%rbx)
andq $0x0, 0x20(%rbx)
jmp 0x55b4
movq 0x18(%rbx), %rax
testq %rax, %rax
jne 0x55b4
movq 0x28(%rbx), %rdi
shlq $0x2, %rdi
callq 0x3490
movq %rax, 0x18(%rbx)
testq %rax, %rax
je 0x55c3
andl $0x0, (%rax)
movq %rbx, %rdi
callq 0x55c8
xorl %eax, %eax
popq %rbx
retq
pushq $0xc
popq %rax
jmp 0x55c1
// File: /workspace/github_c_makefile_star2_O2/cglindkamp[P]dfm/src/commandline.c
// Function: commandline_copy_history_buffer
static int commandline_copy_history_buffer(struct commandline *commandline)
{
	if(commandline->history_position == 0)
		return 0;

	wchar_t *history_buffer = commandline->buffer;
	commandline->buffer = commandline->backup_buffer;
	commandline->backup_buffer = NULL;

	while(commandline->allocated_size < wcslen(history_buffer) + 1) {
		if(commandline_makeroom(commandline) != 0)
			return ENOMEM;
	}

	wcscpy(commandline->buffer, history_buffer);
	commandline->history_position = 0;
	return 0;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
xorl %ebx, %ebx
cmpq $0x0, 0x10(%rdi)
je 0x5b19
movq %rdi, %r14
movq 0x18(%rdi), %r15
movq 0x20(%rdi), %rax
movq %rax, 0x18(%rdi)
andq $0x0, 0x20(%rdi)
pushq $0xc
popq %rbp
movq 0x28(%r14), %r12
movq %r15, %rdi
callq 0x3280
incq %rax
cmpq %rax, %r12
jae 0x5b08
movq %r14, %rdi
callq 0x5b9d
testl %eax, %eax
je 0x5ae4
movl %ebp, %ebx
jmp 0x5b19
movq 0x18(%r14), %rdi
movq %r15, %rsi
callq 0x33e0
andq $0x0, 0x10(%r14)
movl %ebx, %eax
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O2/cglindkamp[P]dfm/src/commandline.c
// Function: commandline_delete_character_before_cursor
static void commandline_delete_character_before_cursor(struct commandline *commandline)
{
	size_t oldcursorpos = commandline->cursor_pos;
	size_t length = wcslen(commandline->buffer);

	if(commandline->cursor_pos > 0) {
		size_t distance = 0;
		int width;
		do {
			width = wcwidth(commandline->buffer[commandline->cursor_pos - 1]);
			distance++;
			commandline->cursor_pos--;
		} while(commandline->cursor_pos > 0 && width < 1);

		wmemmove(commandline->buffer + commandline->cursor_pos, commandline->buffer + oldcursorpos, length - commandline->cursor_pos);
		commandline->buffer[length - distance] = L'\0';
	}
}

// Assembly:
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
pushq %rax
movq %rdi, %rbx
movq 0x18(%rdi), %rdi
movq 0x38(%rbx), %r15
callq 0x3280
testq %r15, %r15
je 0x5b91
movq %rax, %r14
leaq (,%rax,4), %r12
movq %r15, %rcx
movq 0x18(%rbx), %rax
movl -0x4(%rax,%rcx,4), %edi
callq 0x3480
movq 0x38(%rbx), %rcx
addq $-0x4, %r12
decq %rcx
movq %rcx, 0x38(%rbx)
je 0x5b71
testl %eax, %eax
jle 0x5b4f
movq 0x18(%rbx), %rax
leaq (%rax,%rcx,4), %rdi
leaq (%rax,%r15,4), %rsi
subq %rcx, %r14
movq %r14, %rdx
callq 0x35d0
movq 0x18(%rbx), %rax
andl $0x0, (%rax,%r12)
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
retq
// File: /workspace/github_c_makefile_star2_O2/cglindkamp[P]dfm/src/commandline.c
// Function: commandline_makeroom
static int commandline_makeroom(struct commandline *commandline)
{
	size_t newsize = commandline->allocated_size * 2;
	wchar_t *newbuffer = realloc(commandline->buffer, newsize * sizeof(wchar_t));

	if(newbuffer == NULL)
		return ENOMEM;

	commandline->buffer = newbuffer;
	commandline->allocated_size = newsize;
	return 0;
}

// Assembly:
pushq %r14
pushq %rbx
pushq %rax
movq %rdi, %rbx
movq 0x18(%rdi), %rdi
movq 0x28(%rbx), %r14
leaq (,%r14,8), %rsi
callq 0x3520
testq %rax, %rax
je 0x5bcd
addq %r14, %r14
movq %rax, 0x18(%rbx)
movq %r14, 0x28(%rbx)
xorl %eax, %eax
jmp 0x5bd0
pushq $0xc
popq %rax
addq $0x8, %rsp
popq %rbx
popq %r14
retq
// File: /workspace/github_c_makefile_star2_O2/cglindkamp[P]dfm/src/commandline.c
// Function: commandline_resize
void commandline_resize(struct commandline *commandline, unsigned int x, unsigned int y, unsigned int width)
{
	mvwin(commandline->window, y, x);
	wresize(commandline->window, 1, width);
	if(commandline->buffer)
		commandline_updateview(commandline);
}

// Assembly:
pushq %rbp
pushq %rbx
pushq %rax
movl %ecx, %ebp
movl %esi, %eax
movq %rdi, %rbx
movq (%rdi), %rdi
movl %edx, %esi
movl %eax, %edx
callq 0x35c0
movq (%rbx), %rdi
pushq $0x1
popq %rsi
movl %ebp, %edx
callq 0x3650
cmpq $0x0, 0x18(%rbx)
je 0x5c15
movq %rbx, %rdi
addq $0x8, %rsp
popq %rbx
popq %rbp
jmp 0x55c8
addq $0x8, %rsp
popq %rbx
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O2/cglindkamp[P]dfm/src/commandline.c
// Function: commandline_history_add
int commandline_history_add(struct commandline *commandline, const wchar_t *command)
{
	if(command == NULL)
		return EINVAL;

	/* filter out commands only consisting of whitespace */
	for(size_t i = 0; ; i++) {
		if(i == wcslen(command))
			return EINVAL;
		if(!iswspace(command[i]))
			break;
	}

	/* make old entry with same content the newest entry and ignore the new addition */
	for(size_t i = 0; i < list_length(commandline->history); i++) {
		if(wcscmp(command, list_get_item(commandline->history, i)) == 0) {
			list_move_item(commandline->history, i, list_length(commandline->history) - 1);
			return 0;
		}
	}

	wchar_t *commanddup = wcsdup(command);
	if(commanddup == NULL) {
		return ENOMEM;
	}

	if(list_append(commandline->history, commanddup))
		return 0;
	else {
		free(commanddup);
		return ENOMEM;
	}
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %rbx
pushq %rax
pushq $0x16
popq %rbp
testq %rsi, %rsi
je 0x5cda
movq %rsi, %r14
movq %rdi, %rbx
xorl %r15d, %r15d
movq %r14, %rdi
callq 0x3280
cmpq %rax, %r15
je 0x5cda
movl (%r14,%r15,4), %edi
callq 0x3590
incq %r15
testl %eax, %eax
jne 0x5c38
xorl %r15d, %r15d
movq 0x8(%rbx), %rdi
callq 0x7515
cmpq %rax, %r15
jae 0x5c8a
movq 0x8(%rbx), %rdi
movq %r15, %rsi
callq 0x76e4
movq %r14, %rdi
movq %rax, %rsi
callq 0x30b0
testl %eax, %eax
je 0x5cbd
incq %r15
jmp 0x5c5c
movq %r14, %rdi
callq 0x34f0
pushq $0xc
popq %r15
testq %rax, %rax
je 0x5cb8
movq %rax, %r14
movq 0x8(%rbx), %rdi
movq %rax, %rsi
callq 0x7519
xorl %ebp, %ebp
testb %al, %al
jne 0x5cda
movq %r14, %rdi
callq 0x3740
movl %r15d, %ebp
jmp 0x5cda
movq 0x8(%rbx), %rbx
movq %rbx, %rdi
callq 0x7515
leaq -0x1(%rax), %rdx
movq %rbx, %rdi
movq %r15, %rsi
callq 0x75fc
xorl %ebp, %ebp
movl %ebp, %eax
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O2/cglindkamp[P]dfm/src/commandline.c
// Function: commandline_init
bool commandline_init(struct commandline *commandline, unsigned int x, unsigned int y, unsigned int width)
{
	commandline->allocated_size = 1;
	commandline->buffer = NULL;
	commandline->backup_buffer = NULL;
	commandline->prompt[1] = L'\0';
	commandline->window = newwin(1, width, y, x);
	if(commandline->window == NULL)
		return false;
	commandline->history = list_new(0);
	if(commandline->history == NULL) {
		delwin(commandline->window);
		commandline->window = NULL;
		return false;
	}
	return true;
}

// Assembly:
pushq %rbx
movq %rdi, %rbx
movq $0x1, 0x28(%rdi)
andl $0x0, 0x34(%rdi)
movl %esi, %eax
xorps %xmm0, %xmm0
movups %xmm0, 0x18(%rdi)
pushq $0x1
popq %rdi
movl %ecx, %esi
movl %eax, %ecx
callq 0x3030
movq %rax, (%rbx)
testq %rax, %rax
je 0x5d35
xorl %edi, %edi
callq 0x7480
movq %rax, %rcx
movq %rax, 0x8(%rbx)
movb $0x1, %al
testq %rcx, %rcx
jne 0x5d37
movq (%rbx), %rdi
callq 0x31e0
andq $0x0, (%rbx)
xorl %eax, %eax
popq %rbx
retq
// File: /workspace/github_c_makefile_star2_O2/cglindkamp[P]dfm/src/commandline.c
// Function: commandline_destroy
void commandline_destroy(struct commandline *commandline)
{
	if(commandline->window != NULL)
		delwin(commandline->window);
	if(commandline->backup_buffer)
		free(commandline->backup_buffer);
	else
		free(commandline->buffer);
	list_delete(commandline->history, free);
}

// Assembly:
pushq %rbx
movq %rdi, %rbx
movq (%rdi), %rdi
testq %rdi, %rdi
je 0x5d4a
callq 0x31e0
movq 0x20(%rbx), %rdi
testq %rdi, %rdi
jne 0x5d57
movq 0x18(%rbx), %rdi
callq 0x3740
movq 0x8(%rbx), %rdi
movq 0x7249(%rip), %rsi      # 0xcfb0
popq %rbx
jmp 0x74d1
nopl (%rax)
// File: /workspace/github_c_makefile_star2_O2/cglindkamp[P]dfm/src/dict.c
// Function: dict_delete
void dict_delete(struct list *list, bool free_value)
{
	struct dict_item *item;

	if(list == NULL)
		return;

	size_t length = list_length(list);;
	for(size_t i = 0; i < length; i++) {
		item = list_get_item(list, i);
		if(free_value)
			free(item->value);
		free((void*)item->key);
		free(item);
	}
	list_delete(list, NULL);
}

// Assembly:
testq %rdi, %rdi
je 0x5dde
pushq %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
movl %esi, %ebp
movq %rdi, %rbx
callq 0x7515
movq %rax, %r14
xorl %r15d, %r15d
cmpq %r15, %r14
je 0x5dcc
movq %rbx, %rdi
movq %r15, %rsi
callq 0x76e4
movq %rax, %r12
testb %bpl, %bpl
je 0x5db6
movq 0x8(%r12), %rdi
callq 0x3740
movq (%r12), %rdi
callq 0x3740
movq %r12, %rdi
callq 0x3740
incq %r15
jmp 0x5d94
movq %rbx, %rdi
xorl %esi, %esi
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
jmp 0x74d1
retq