LLM4Binary/decompile-bench-makefile huggingface dataset:
// File: /workspace/github_c_makefile_star2_O1/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)
movq $0x0, 0x10(%rdi)
xorps %xmm0, %xmm0
movups %xmm0, 0x38(%rdi)
movq 0x20(%rdi), %rax
testq %rax, %rax
je 0x5685
movq %rax, 0x18(%rbx)
movq $0x0, 0x20(%rbx)
cmpq $0x0, 0x18(%rbx)
jne 0x569d
movq 0x28(%rbx), %rdi
shlq $0x2, %rdi
callq 0x3490
movq %rax, 0x18(%rbx)
movq 0x18(%rbx), %rax
testq %rax, %rax
je 0x56b8
movl $0x0, (%rax)
movq %rbx, %rdi
callq 0x56bf
xorl %eax, %eax
jmp 0x56bd
movl $0xc, %eax
popq %rbx
retq
// File: /workspace/github_c_makefile_star2_O1/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 %r15
pushq %r14
pushq %r12
pushq %rbx
pushq %rax
xorl %ebx, %ebx
cmpq $0x0, 0x10(%rdi)
je 0x5c2e
movq %rdi, %r14
movq 0x18(%rdi), %r15
movq 0x20(%rdi), %rax
movq %rax, 0x18(%rdi)
movq $0x0, 0x20(%rdi)
movq 0x28(%rdi), %r12
movq %r15, %rdi
callq 0x3280
incq %rax
cmpq %rax, %r12
jae 0x5c13
movq 0x18(%r14), %rdi
leaq (,%r12,8), %rsi
callq 0x3520
testq %rax, %rax
je 0x5c29
addq %r12, %r12
movq %rax, 0x18(%r14)
movq %r12, 0x28(%r14)
jmp 0x5be0
movq 0x18(%r14), %rdi
movq %r15, %rsi
callq 0x33e0
movq $0x0, 0x10(%r14)
jmp 0x5c2e
movl $0xc, %ebx
movl %ebx, %eax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
retq
// File: /workspace/github_c_makefile_star2_O1/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 0x5cad
movq %rax, %r14
leaq (,%rax,4), %r12
movq 0x18(%rbx), %rax
movq 0x38(%rbx), %rcx
movl -0x4(%rax,%rcx,4), %edi
callq 0x3480
movq 0x38(%rbx), %rcx
addq $-0x4, %r12
decq %rcx
movq %rcx, 0x38(%rbx)
je 0x5c8a
testl %eax, %eax
jle 0x5c64
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
movl $0x0, (%rax,%r12)
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
retq
// File: /workspace/github_c_makefile_star2_O1/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 0x5ce9
addq %r14, %r14
movq %rax, 0x18(%rbx)
movq %r14, 0x28(%rbx)
xorl %eax, %eax
jmp 0x5cee
movl $0xc, %eax
addq $0x8, %rsp
popq %rbx
popq %r14
retq
// File: /workspace/github_c_makefile_star2_O1/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
movl $0x1, %esi
movl %ebp, %edx
callq 0x3650
cmpq $0x0, 0x18(%rbx)
je 0x5d35
movq %rbx, %rdi
addq $0x8, %rsp
popq %rbx
popq %rbp
jmp 0x56bf
addq $0x8, %rsp
popq %rbx
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O1/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 %r13
pushq %r12
pushq %rbx
pushq %rax
movl $0x16, %r14d
testq %rsi, %rsi
je 0x5e70
movq %rsi, %r15
cmpl $0x0, (%rsi)
sete %bpl
je 0x5e70
movq %rdi, %rbx
movl (%r15), %edi
callq 0x3590
testl %eax, %eax
je 0x5da0
movl $0x1, %r12d
movq %r15, %rdi
callq 0x3280
cmpq %rax, %r12
sete %bpl
je 0x5e70
movl (%r15,%r12,4), %edi
callq 0x3590
incq %r12
testl %eax, %eax
jne 0x5d7b
testb %bpl, %bpl
jne 0x5e70
movq 0x8(%rbx), %rdi
callq 0x78de
testq %rax, %rax
setne %bpl
je 0x5e2e
movq 0x8(%rbx), %rdi
xorl %r14d, %r14d
xorl %esi, %esi
callq 0x7ab9
movq %r15, %rdi
movq %rax, %rsi
callq 0x30b0
movl $0x0, %r12d
testl %eax, %eax
je 0x5e11
xorl %r12d, %r12d
incq %r12
movq 0x8(%rbx), %rdi
callq 0x78de
cmpq %rax, %r12
setb %bpl
jae 0x5e2e
movq 0x8(%rbx), %rdi
movq %r12, %rsi
callq 0x7ab9
movq %r15, %rdi
movq %rax, %rsi
callq 0x30b0
testl %eax, %eax
jne 0x5de1
movq 0x8(%rbx), %r13
movq %r13, %rdi
callq 0x78de
leaq -0x1(%rax), %rdx
movq %r13, %rdi
movq %r12, %rsi
callq 0x79c7
jmp 0x5e34
movl $0x16, %r14d
testb %bpl, %bpl
jne 0x5e70
movq %r15, %rdi
callq 0x34f0
movl $0xc, %r14d
testq %rax, %rax
je 0x5e70
movq %rax, %r15
movq 0x8(%rbx), %rdi
movq %rax, %rsi
callq 0x78e2
xorl %r14d, %r14d
testb %al, %al
jne 0x5e70
movq %r15, %rdi
callq 0x3740
movl $0xc, %r14d
movl %r14d, %eax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O1/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
movl %esi, %eax
movq %rdi, %rbx
movq $0x1, 0x28(%rdi)
movl $0x0, 0x34(%rdi)
xorps %xmm0, %xmm0
movups %xmm0, 0x18(%rdi)
movl $0x1, %edi
movl %ecx, %esi
movl %eax, %ecx
callq 0x3030
movq %rax, (%rbx)
testq %rax, %rax
je 0x5ed8
xorl %edi, %edi
callq 0x7840
movq %rax, %rcx
movq %rax, 0x8(%rbx)
movb $0x1, %al
testq %rcx, %rcx
jne 0x5eda
movq (%rbx), %rdi
callq 0x31e0
movq $0x0, (%rbx)
xorl %eax, %eax
popq %rbx
retq
// File: /workspace/github_c_makefile_star2_O1/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 0x5eed
callq 0x31e0
movq 0x20(%rbx), %rdi
testq %rdi, %rdi
jne 0x5efa
movq 0x18(%rbx), %rdi
callq 0x3740
movq 0x70aa(%rip), %rsi      # 0xcfb0
movq 0x8(%rbx), %rdi
popq %rbx
jmp 0x7896
// File: /workspace/github_c_makefile_star2_O1/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 0x5f81
pushq %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
movl %esi, %ebp
movq %rdi, %rbx
callq 0x78de
testq %rax, %rax
je 0x5f6f
movq %rax, %r14
xorl %r15d, %r15d
movq %rbx, %rdi
movq %r15, %rsi
callq 0x7ab9
movq %rax, %r12
testb %bpl, %bpl
je 0x5f56
movq 0x8(%r12), %rdi
callq 0x3740
movq (%r12), %rdi
callq 0x3740
movq %r12, %rdi
callq 0x3740
incq %r15
cmpq %r15, %r14
jne 0x5f39
movq %rbx, %rdi
xorl %esi, %esi
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
jmp 0x7896
retq
// File: /workspace/github_c_makefile_star2_O1/cglindkamp[P]dfm/src/dict.c
// Function: dict_set
bool dict_set(struct list *list, const char *key, void *value)
{
	struct dict_item *item, needle;

	size_t index;
	bool found;

	needle.key = key;

	found = list_find_item_or_insertpoint(list, compare_key, &needle, &index);
	if(found) {
		item = list_get_item(list, index);
	} else {
		item = malloc(sizeof(*item));
		if(item == NULL)
			return false;

		item->key = strdup(key);
		if(item->key == NULL) {
			free(item);
			return false;
		}
		if(!list_insert(list, index, item)) {
			free((void*)item->key);
			free(item);
			return false;
		}
	}
	item->value = value;

	return true;
}

// Assembly:
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
subq $0x18, %rsp
movq %rdx, %rbx
movq %rsi, %r12
movq %rdi, %r15
leaq 0x8(%rsp), %rdx
movq %rsi, (%rdx)
leaq 0x76(%rip), %rsi        # 0x601b
movq %rsp, %rcx
callq 0x7b29
testb %al, %al
je 0x5fc8
movq (%rsp), %rsi
movq %r15, %rdi
callq 0x7ab9
movq %rax, %r14
movq %rbx, 0x8(%r14)
movb $0x1, %al
jmp 0x600f
movl $0x10, %edi
callq 0x3490
testq %rax, %rax
je 0x600d
movq %rax, %r14
movq %r12, %rdi
callq 0x36a0
movq %rax, (%r14)
testq %rax, %rax
je 0x6005
movq (%rsp), %rsi
movq %r15, %rdi
movq %r14, %rdx
callq 0x794a
testb %al, %al
jne 0x5fc0
movq (%r14), %rdi
callq 0x3740
movq %r14, %rdi
callq 0x3740
xorl %eax, %eax
addq $0x18, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
retq
// File: /workspace/github_c_makefile_star2_O1/cglindkamp[P]dfm/src/dict.c
// Function: dict_get
void *dict_get(struct list *list, const char *key)
{
	struct dict_item item;
	size_t index;
	bool found;

	item.key = key;

	found = list_find_item_or_insertpoint(list, compare_key, &item, &index);
	if(found) {
		struct dict_item *item = list_get_item(list, index);
		return item->value;
	}
	return NULL;
}

// Assembly:
pushq %rbx
subq $0x20, %rsp
movq %rdi, %rbx
leaq 0x10(%rsp), %rdx
movq %rsi, (%rdx)
leaq -0x28(%rip), %rsi       # 0x601b
leaq 0x8(%rsp), %rcx
callq 0x7b29
testb %al, %al
je 0x6064
movq 0x8(%rsp), %rsi
movq %rbx, %rdi
callq 0x7ab9
movq 0x8(%rax), %rax
jmp 0x6066
xorl %eax, %eax
addq $0x20, %rsp
popq %rbx
retq
// File: /workspace/github_c_makefile_star2_O1/cglindkamp[P]dfm/src/dirmodel.c
// Function: dirmodel_getmarkedfilenames
int dirmodel_getmarkedfilenames(struct dirmodel *model, const struct list **markedlist_out)
{
	struct list *list = model->sortedlist;
	struct list *markedlist = list_new(0);

	if(markedlist == NULL)
		return ENOMEM;

	size_t length = list_length(list);

	for(size_t i = 0; i < length; i++)
	{
		struct filedata *filedata = list_get_item(list, i);
		if(filedata->is_marked) {
			char *filename = strdup(filedata->filename);
			if(filename == NULL) {
				list_delete(markedlist, free);
				return ENOMEM;
			}
			if(!list_append(markedlist, filename)) {
				free(filename);
				list_delete(markedlist, free);
				return ENOMEM;
			}
		}
	}
	if(list_length(markedlist) == 0) {
		list_delete(markedlist, NULL);
		return ENOENT;
	}

	*markedlist_out = markedlist;
	return 0;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movq %rsi, %r15
movq 0x30(%rdi), %r12
xorl %edi, %edi
callq 0x7840
movl $0xc, %ebx
testq %rax, %rax
je 0x6137
movq %rax, %r14
movq %r15, (%rsp)
movq %r12, %rdi
callq 0x78de
testq %rax, %rax
je 0x60f7
movq %rax, %r13
xorl %ebp, %ebp
movq %r12, %rdi
movq %rbp, %rsi
callq 0x7ab9
cmpb $0x1, 0xa8(%rax)
jne 0x60ef
movq (%rax), %rdi
callq 0x36a0
testq %rax, %rax
je 0x6128
movq %rax, %r15
movq %r14, %rdi
movq %rax, %rsi
callq 0x78e2
testb %al, %al
je 0x6120
incq %rbp
cmpq %rbp, %r13
jne 0x60bc
movq %r14, %rdi
callq 0x78de
testq %rax, %rax
je 0x610f
movq (%rsp), %rax
movq %r14, (%rax)
xorl %ebx, %ebx
jmp 0x6137
movq %r14, %rdi
xorl %esi, %esi
callq 0x7896
movl $0x2, %ebx
jmp 0x6137
movq %r15, %rdi
callq 0x3740
movq 0x6e81(%rip), %rsi      # 0xcfb0
movq %r14, %rdi
callq 0x7896
movl %ebx, %eax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O1/cglindkamp[P]dfm/src/dirmodel.c
// Function: dirmodel_get_internal_index
bool dirmodel_get_internal_index(struct dirmodel *model, const char *filename, size_t *internal_index, size_t *index)
{
	struct filedata filedata;

	filedata.filename = filename;

	if(!list_find_item_or_insertpoint(model->list, filedata_listcompare_filename, &filedata, internal_index))
		return false;

	struct filedata *internal_filedata = list_get_item(model->list, *internal_index);
	if(!list_find_item_or_insertpoint(model->sortedlist, model->sort_compare, internal_filedata, index))
		return false;
	return true;
}

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
subq $0xb0, %rsp
movq %rcx, %rbx
movq %rdx, %r15
movq %rdi, %r14
movq %rsp, %rdx
movq %rsi, (%rdx)
movq 0x28(%rdi), %rdi
leaq 0xe67(%rip), %rsi       # 0x6fe4
movq %r15, %rcx
callq 0x7b29
testb %al, %al
je 0x61ad
movq 0x28(%r14), %rdi
movq (%r15), %rsi
callq 0x7ab9
movq 0x30(%r14), %rdi
movq 0x90(%r14), %rsi
movq %rax, %rdx
movq %rbx, %rcx
callq 0x7b29
jmp 0x61af
xorl %eax, %eax
addq $0xb0, %rsp
popq %rbx
popq %r14
popq %r15
retq
// File: /workspace/github_c_makefile_star2_O1/cglindkamp[P]dfm/src/dirmodel.c
// Function: dirmodel_regex_getnext
size_t dirmodel_regex_getnext(struct dirmodel *model, const char *regex, size_t start_index, int direction)
{
	struct list *list = model->sortedlist;
	regex_t cregex;
	size_t result = start_index;

	int ret = regcomp(&cregex, regex, REG_EXTENDED | REG_ICASE | REG_NOSUB);
	if(ret != 0)
		return start_index;

	if(direction > 0 && start_index < SIZE_MAX) {
		size_t length = list_length(list);
		for(size_t i = start_index + 1; i < length; i++) {
			struct filedata *filedata = list_get_item(list, i);
			if(regexec(&cregex, filedata->filename, 0, NULL, 0) == 0) {
				result = i;
				break;
			}
		}
	} else if(direction < 0 && start_index > 0) {
		for(size_t i = start_index - 1; i > 0; i--) {
			struct filedata *filedata = list_get_item(list, i);
			if(regexec(&cregex, filedata->filename, 0, NULL, 0) == 0) {
				result = i;
				break;
			}
		}
	}

	regfree(&cregex);
	return result;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x48, %rsp
movl %ecx, %ebp
movq %rdx, %rbx
movq 0x30(%rdi), %r14
leaq 0x8(%rsp), %rdi
movl $0xb, %edx
callq 0x3370
testl %eax, %eax
jne 0x62a0
testl %ebp, %ebp
setle %al
cmpq $-0x1, %rbx
sete %cl
orb %al, %cl
jne 0x624d
movq %r14, %rdi
callq 0x78de
movq %rax, %r15
leaq 0x1(%rbx), %r12
leaq 0x8(%rsp), %r13
cmpq %r15, %r12
jae 0x6296
movq %r14, %rdi
movq %r12, %rsi
callq 0x7ab9
movq (%rax), %rsi
movq %r13, %rdi
xorl %edx, %edx
xorl %ecx, %ecx
xorl %r8d, %r8d
callq 0x34d0
testl %eax, %eax
cmoveq %r12, %rbx
leaq 0x1(%r12), %r12
jne 0x621c
jmp 0x6296
testl %ebp, %ebp
setns %al
testq %rbx, %rbx
sete %cl
orb %al, %cl
jne 0x6296
leaq -0x1(%rbx), %r15
leaq 0x8(%rsp), %r12
movq %r15, %r13
subq $0x1, %r13
jb 0x6296
movq %r14, %rdi
movq %r15, %rsi
callq 0x7ab9
movq (%rax), %rsi
movq %r12, %rdi
xorl %edx, %edx
xorl %ecx, %ecx
xorl %r8d, %r8d
callq 0x34d0
testl %eax, %eax
cmoveq %r15, %rbx
movq %r13, %r15
jne 0x6268
leaq 0x8(%rsp), %rdi
callq 0x3220
movq %rbx, %rax
addq $0x48, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O1/cglindkamp[P]dfm/src/dirmodel.c
// Function: dirmodel_regex_setmark
void dirmodel_regex_setmark(struct dirmodel *model, const char *regex, bool mark)
{
	struct list *list = model->sortedlist;
	regex_t cregex;

	int ret = regcomp(&cregex, regex, REG_EXTENDED | REG_ICASE | REG_NOSUB);
	if(ret != 0)
		return;

	size_t length = list_length(list);

	for(size_t i = 0; i < length; i++) {
		struct filedata *filedata = list_get_item(list, i);
		if(regexec(&cregex, filedata->filename, 0, NULL, 0) == 0 &&
		   filedata->is_marked != mark) {
			if(mark) {
				dirmodel_update_marked_stats(model, NULL, filedata);
			} else {
				dirmodel_update_marked_stats(model, filedata, NULL);
			}
			filedata->is_marked = mark;
			listmodel_notify_change(&model->listmodel, MODEL_CHANGE, i, i);
		}
	}

	regfree(&cregex);
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x48, %rsp
movl %edx, %ebx
movq %rdi, %r14
movq 0x30(%rdi), %r15
leaq 0x8(%rsp), %rdi
movl $0xb, %edx
callq 0x3370
testl %eax, %eax
jne 0x6394
movq %r15, %rdi
callq 0x78de
testq %rax, %rax
je 0x638a
movq %rax, %r12
xorl %r13d, %r13d
movq %r15, %rdi
movq %r13, %rsi
callq 0x7ab9
movq %rax, %rbp
movq (%rax), %rsi
leaq 0x8(%rsp), %rdi
xorl %edx, %edx
xorl %ecx, %ecx
xorl %r8d, %r8d
callq 0x34d0
testl %eax, %eax
jne 0x637e
cmpb %bl, 0xa8(%rbp)
je 0x637e
leaq 0x40(%rbp), %rax
movq %rbp, %rcx
addq $0xa0, %rcx
cmpb $0x0, 0x8(%rbp)
cmoveq %rax, %rcx
movq (%rcx), %rax
testb %bl, %bl
je 0x6350
addq %rax, 0xa8(%r14)
movl $0x1, %eax
jmp 0x635e
subq %rax, 0xa8(%r14)
movq $-0x1, %rax
addq %rax, 0xa0(%r14)
movb %bl, 0xa8(%rbp)
movq %r14, %rdi
movl $0x2, %esi
movq %r13, %rdx
movq %r13, %rcx
callq 0x7d00
incq %r13
cmpq %r13, %r12
jne 0x62f7
leaq 0x8(%rsp), %rdi
callq 0x3220
addq $0x48, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O1/cglindkamp[P]dfm/src/dirmodel.c
// Function: dirmodel_update_marked_stats
static void dirmodel_update_marked_stats(struct dirmodel *model, struct filedata *oldfiledata, struct filedata *newfiledata)
{
	if(oldfiledata) {
		if(oldfiledata->is_link) {
			model->marked_stats.size -= oldfiledata->link_size;
		} else {
			model->marked_stats.size -= oldfiledata->stat.st_size;
		}
		model->marked_stats.count--;
	}
	if(newfiledata) {
		if(newfiledata->is_link) {
			model->marked_stats.size += newfiledata->link_size;
		} else {
			model->marked_stats.size += newfiledata->stat.st_size;
		}
		model->marked_stats.count++;
	}
}

// Assembly:
testq %rsi, %rsi
je 0x63cc
leaq 0x40(%rsi), %rax
leaq 0xa0(%rsi), %rcx
cmpb $0x0, 0x8(%rsi)
cmovneq %rcx, %rax
movq (%rax), %rax
subq %rax, 0xa8(%rdi)
decq 0xa0(%rdi)
testq %rdx, %rdx
je 0x63f5
leaq 0x40(%rdx), %rax
leaq 0xa0(%rdx), %rcx
cmpb $0x0, 0x8(%rdx)
cmovneq %rcx, %rax
movq (%rax), %rax
addq %rax, 0xa8(%rdi)
incq 0xa0(%rdi)
retq
// File: /workspace/github_c_makefile_star2_O1/cglindkamp[P]dfm/src/dirmodel.c
// Function: dirmodel_setfilter
bool dirmodel_setfilter(struct dirmodel *model, const char *regex)
{
	if(model->filter_active)
		regfree(&model->filter);

	if(regex == NULL) {
		model->filter_active = false;
	} else {
		int ret = regcomp(&model->filter, regex, REG_EXTENDED | REG_ICASE | REG_NOSUB);
		model->filter_active = (ret == 0);
	}

	return model->filter_active;
}

// Assembly:
pushq %r14
pushq %rbx
pushq %rax
movq %rsi, %r14
movq %rdi, %rbx
cmpb $0x1, 0x88(%rdi)
jne 0x6412
leaq 0x48(%rbx), %rdi
callq 0x3220
testq %r14, %r14
je 0x642f
leaq 0x48(%rbx), %rdi
movq %r14, %rsi
movl $0xb, %edx
callq 0x3370
testl %eax, %eax
sete %al
jmp 0x6431
xorl %eax, %eax
movb %al, 0x88(%rbx)
addq $0x8, %rsp
popq %rbx
popq %r14
retq
// File: /workspace/github_c_makefile_star2_O1/cglindkamp[P]dfm/src/dirmodel.c
// Function: dirmodel_notify_file_deleted
void dirmodel_notify_file_deleted(struct dirmodel *model, const char *filename)
{
	struct list *list = model->list;
	size_t index, internal_index;

	bool found = dirmodel_get_internal_index(model, filename, &internal_index, &index);
	if(found) {
		struct filedata *filedata = list_get_item(list, internal_index);
		if(filedata->is_marked) {
			dirmodel_update_marked_stats(model, filedata, NULL);
		}
		dirmodel_update_dirsize(model, filedata, NULL);
		filedata_delete(filedata);
		list_remove(list, internal_index);
		list_remove(model->sortedlist, index);
		listmodel_notify_change(&model->listmodel, MODEL_REMOVE, 0, index);
	}
}

// Assembly:
pushq %r14
pushq %rbx
subq $0x18, %rsp
movq %rdi, %rbx
movq 0x28(%rdi), %r14
leaq 0x8(%rsp), %rdx
leaq 0x10(%rsp), %rcx
callq 0x6157
testb %al, %al
je 0x6514
movq 0x8(%rsp), %rsi
movq %r14, %rdi
callq 0x7ab9
cmpb $0x1, 0xa8(%rax)
jne 0x64b8
testq %rax, %rax
je 0x64dd
leaq 0x40(%rax), %rcx
leaq 0xa0(%rax), %rdx
cmpb $0x0, 0x8(%rax)
cmovneq %rdx, %rcx
movq (%rcx), %rcx
subq %rcx, 0xa8(%rbx)
decq 0xa0(%rbx)
testq %rax, %rax
je 0x64dd
leaq 0x40(%rax), %rcx
movq %rax, %rdx
addq $0xa0, %rdx
cmpb $0x0, 0x8(%rax)
cmoveq %rcx, %rdx
movq (%rdx), %rcx
subq %rcx, 0xb0(%rbx)
movq %rax, %rdi
callq 0x7822
movq 0x8(%rsp), %rsi
movq %r14, %rdi
callq 0x7a67
movq 0x30(%rbx), %rdi
movq 0x10(%rsp), %rsi
callq 0x7a67
movq 0x10(%rsp), %rcx
movq %rbx, %rdi
movl $0x1, %esi
xorl %edx, %edx
callq 0x7d00
addq $0x18, %rsp
popq %rbx
popq %r14
retq
// File: /workspace/github_c_makefile_star2_O1/cglindkamp[P]dfm/src/dirmodel.c
// Function: dirmodel_notify_file_added_or_changed
int dirmodel_notify_file_added_or_changed(struct dirmodel *model, const char *filename)
{
	size_t index;
	bool found = list_find_item_or_insertpoint(model->addchange_queue, listcompare_strcmp, filename, &index);
	if(!found) {
		char *filename_copy = strdup(filename);
		if(filename_copy == NULL)
			return ENOMEM;
		if(!list_insert(model->addchange_queue, index, filename_copy)) {
			free(filename_copy);
			return ENOMEM;
		}
	}
	return 0;
}

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
subq $0x10, %rsp
movq %rsi, %r15
movq %rdi, %r14
movq 0x38(%rdi), %rdi
leaq 0x51(%rip), %rsi        # 0x65cc
leaq 0x8(%rsp), %rcx
movq %r15, %rdx
callq 0x7b29
xorl %ebx, %ebx
testb %al, %al
jne 0x65c0
movq %r15, %rdi
callq 0x36a0
testq %rax, %rax
je 0x65bb
movq %rax, %r15
movq 0x38(%r14), %rdi
movq 0x8(%rsp), %rsi
movq %rax, %rdx
callq 0x794a
testb %al, %al
jne 0x65c0
movq %r15, %rdi
callq 0x3740
movl $0xc, %ebx
movl %ebx, %eax
addq $0x10, %rsp
popq %rbx
popq %r14
popq %r15
retq
// File: /workspace/github_c_makefile_star2_O1/cglindkamp[P]dfm/src/dirmodel.c
// Function: dirmodel_change_directory
bool dirmodel_change_directory(struct dirmodel *model, const char *path)
{
	internal_destroy(model);
	if(!internal_init(model, path))
		return false;
	listmodel_notify_change(&model->listmodel, MODEL_RELOAD, 0, 0);
	return true;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x18, %rsp
movq %rsi, %r14
movq %rdi, %rbx
callq 0x6b0e
movq %r14, %rdi
callq 0x3200
testq %rax, %rax
je 0x6ae0
movq %rax, %r14
xorl %edi, %edi
callq 0x7840
movq %rax, 0x38(%rbx)
testq %rax, %rax
je 0x6ad8
xorl %edi, %edi
callq 0x7840
testq %rax, %rax
je 0x6acd
movq %rax, %r15
xorl %edi, %edi
callq 0x7840
movq %rax, 0x8(%rsp)
testq %rax, %rax
je 0x6abe
movq $0x0, 0xb0(%rbx)
movq %r14, %rdi
callq 0x3470
testq %rax, %rax
je 0x6a59
movq %rax, %r12
leaq 0x48(%rbx), %rax
movq %rax, 0x10(%rsp)
leaq 0x28cf(%rip), %rbp      # 0x923d
leaq 0x28c7(%rip), %r13      # 0x923c
addq $0x13, %r12
movq %r12, %rdi
movq %rbp, %rsi
callq 0x33d0
testl %eax, %eax
je 0x6a45
movq %r12, %rdi
movq %r13, %rsi
callq 0x33d0
testl %eax, %eax
je 0x6a45
cmpb $0x1, 0x88(%rbx)
jne 0x69c4
movq 0x10(%rsp), %rdi
movq %r12, %rsi
xorl %edx, %edx
xorl %ecx, %ecx
xorl %r8d, %r8d
callq 0x34d0
testl %eax, %eax
jne 0x6a45
movq %r14, %rdi
callq 0x33f0
movq %rsp, %rdi
movl %eax, %esi
movq %r12, %rdx
callq 0x76d2
movl $0x9, %r12d
testl %eax, %eax
je 0x69f0
cmpl $0xc, %eax
je 0x6a3f
movl $0x8, %r12d
jmp 0x6a3f
movq (%rsp), %rsi
movq 0x8(%rsp), %rdi
callq 0x78e2
testb %al, %al
je 0x6a3f
movq (%rsp), %rsi
movq %r15, %rdi
callq 0x78e2
testb %al, %al
je 0x6a3f
movq (%rsp), %rax
xorl %r12d, %r12d
testq %rax, %rax
je 0x6a3f
movq 0xb0(%rbx), %rcx
cmpb $0x1, 0x8(%rax)
jne 0x6a34
addq 0xa0(%rax), %rcx
jmp 0x6a38
addq 0x40(%rax), %rcx
movq %rcx, 0xb0(%rbx)
testb $0x7, %r12b
jne 0x6a5f
movq %r14, %rdi
callq 0x3470
movq %rax, %r12
testq %rax, %rax
jne 0x6975
movl $0x6, %r12d
cmpl $0x9, %r12d
je 0x6aa9
cmpl $0x6, %r12d
jne 0x6ae2
movq %r14, 0x40(%rbx)
movq %r15, 0x28(%rbx)
movq 0x8(%rsp), %r14
movq %r14, 0x30(%rbx)
leaq 0x561(%rip), %rsi       # 0x6fe4
movq %r15, %rdi
callq 0x7b15
movq 0x90(%rbx), %rsi
movq %r14, %rdi
callq 0x7b15
xorps %xmm0, %xmm0
movups %xmm0, 0xa0(%rbx)
movb $0x1, %bpl
jmp 0x6ae2
movq (%rsp), %rdi
callq 0x7822
movq 0x8(%rsp), %rdi
xorl %esi, %esi
callq 0x7896
leaq 0xd5d(%rip), %rsi       # 0x7822
movq %r15, %rdi
callq 0x7896
movq 0x38(%rbx), %rdi
xorl %esi, %esi
callq 0x7896
movq %r14, %rdi
callq 0x3350
xorl %ebp, %ebp
testb $0x1, %bpl
je 0x6af9
movq %rbx, %rdi
movl $0x3, %esi
xorl %edx, %edx
xorl %ecx, %ecx
callq 0x7d00
andb $0x1, %bpl
movl %ebp, %eax
addq $0x18, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O1/cglindkamp[P]dfm/src/dirmodel.c
// Function: internal_destroy
static void internal_destroy(struct dirmodel *model)
{
	struct list *list = model->list;
	if(list == NULL)
		return;

	closedir(model->dir);

	list_delete(list, (list_item_deallocator)filedata_delete);
	list_delete(model->sortedlist, NULL);
	list_delete(model->addchange_queue, free);
	model->list = NULL;
}

// Assembly:
pushq %r14
pushq %rbx
pushq %rax
movq 0x28(%rdi), %r14
testq %r14, %r14
je 0x6b59
movq %rdi, %rbx
movq 0x40(%rdi), %rdi
callq 0x3350
leaq 0xcf4(%rip), %rsi       # 0x7822
movq %r14, %rdi
callq 0x7896
movq 0x30(%rbx), %rdi
xorl %esi, %esi
callq 0x7896
movq 0x38(%rbx), %rdi
movq 0x6464(%rip), %rsi      # 0xcfb0
callq 0x7896
movq $0x0, 0x28(%rbx)
addq $0x8, %rsp
popq %rbx
popq %r14
retq
// File: /workspace/github_c_makefile_star2_O1/cglindkamp[P]dfm/src/dirmodel.c
// Function: dirmodel_init
void dirmodel_init(struct dirmodel *model)
{
	listmodel_init(&model->listmodel);

	model->list = NULL;
	model->sortedlist = NULL;
	model->listmodel.count = dirmodel_count;
	model->listmodel.render = dirmodel_render;
	model->listmodel.setmark = dirmodel_setmark;
	model->listmodel.ismarked = dirmodel_ismarked;
	model->filter_active = false;
	model->sort_compare = filedata_listcompare_directory_filename;
}

// Assembly:
pushq %rbx
movq %rdi, %rbx
callq 0x7d5f
xorps %xmm0, %xmm0
movups %xmm0, 0x28(%rbx)
leaq -0xb0c(%rip), %rax      # 0x606c
movq %rax, (%rbx)
leaq 0x31(%rip), %rax        # 0x6bb3
movq %rax, 0x8(%rbx)
leaq 0x56(%rip), %rax        # 0x6be3
movq %rax, 0x10(%rbx)
leaq 0xf0(%rip), %rax        # 0x6c88
movq %rax, 0x18(%rbx)
movb $0x0, 0x88(%rbx)
leaq 0x44b(%rip), %rax       # 0x6ff5
movq %rax, 0x90(%rbx)
popq %rbx
retq
// File: /workspace/github_c_makefile_star2_O1/cglindkamp[P]dfm/src/dirmodel.c
// Function: dirmodel_setmark
static void dirmodel_setmark(struct listmodel *listmodel, size_t index, bool mark)
{
	struct dirmodel *model = container_of(listmodel, struct dirmodel, listmodel);;
	struct list *list = model->sortedlist;
	struct filedata *filedata = list_get_item(list, index);

	if(filedata->is_marked == mark)
		return;

	if(mark) {
		dirmodel_update_marked_stats(model, NULL, filedata);
	} else {
		dirmodel_update_marked_stats(model, filedata, NULL);
	}
	filedata->is_marked = mark;
	listmodel_notify_change(listmodel, MODEL_CHANGE, index, index);
}

// Assembly:
pushq %rbp
pushq %r14
pushq %rbx
movl %edx, %ebp
movq %rsi, %rbx
movq %rdi, %r14
movq 0x30(%rdi), %rdi
callq 0x7ab9
cmpb %bpl, 0xa8(%rax)
jne 0x6c06
popq %rbx
popq %r14
popq %rbp
retq
testb %bpl, %bpl
je 0x6c37
testq %rax, %rax
je 0x6c6a
movq %rax, %rcx
addq $0xa0, %rcx
cmpb $0x0, 0x8(%rax)
leaq 0x40(%rax), %rdx
cmoveq %rdx, %rcx
movq (%rcx), %rcx
addq %rcx, 0xa8(%r14)
movl $0x1, %ecx
jmp 0x6c63
testq %rax, %rax
je 0x6c6a
movq %rax, %rcx
addq $0xa0, %rcx
cmpb $0x0, 0x8(%rax)
leaq 0x40(%rax), %rdx
cmoveq %rdx, %rcx
movq (%rcx), %rcx
subq %rcx, 0xa8(%r14)
movq $-0x1, %rcx
addq %rcx, 0xa0(%r14)
movb %bpl, 0xa8(%rax)
movq %r14, %rdi
movl $0x2, %esi
movq %rbx, %rdx
movq %rbx, %rcx
popq %rbx
popq %r14
popq %rbp
jmp 0x7d00
// File: /workspace/github_c_makefile_star2_O1/cglindkamp[P]dfm/src/dirmodel.c
// Function: dirmodel_destroy
void dirmodel_destroy(struct dirmodel *model)
{
	internal_destroy(model);
	listmodel_destroy(&model->listmodel);
	if(model->filter_active)
		regfree(&model->filter);
}

// Assembly:
pushq %rbx
movq %rdi, %rbx
callq 0x6b0e
movq %rbx, %rdi
callq 0x7d68
cmpb $0x1, 0x88(%rbx)
jne 0x6cc1
addq $0x48, %rbx
movq %rbx, %rdi
popq %rbx
jmp 0x3220
popq %rbx
retq
nop
// File: /workspace/github_c_makefile_star2_O1/cglindkamp[P]dfm/src/keymap.c
// Function: keymap_handlekey
int keymap_handlekey(struct keymap *keymap, wint_t key, bool iskeycode)
{
	if(keymap->entries == NULL)
		return EINVAL;

	size_t length = list_length(keymap->entries);

	for(size_t i = 0; i < length; i++) {
		struct keymap_entry *curitem = list_get_item(keymap->entries, i);
		if(curitem->keyspec.key == key && curitem->keyspec.iskeycode == iskeycode) {
			char buffer[strlen(curitem->command) + 1];
			strcpy(buffer, curitem->command);

			return commandexecutor_execute(keymap->commandexecutor, buffer);
		}
	}
	return 0;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x18, %rsp
movq %rdi, %r15
movq 0x8(%rdi), %rdi
testq %rdi, %rdi
je 0x6d75
movl %edx, %r14d
movl %esi, %r12d
callq 0x78de
movq %rax, -0x40(%rbp)
testq %rax, %rax
je 0x6d71
xorl %r13d, %r13d
movl %r12d, -0x30(%rbp)
movq 0x8(%r15), %rdi
movq %r13, %rsi
callq 0x7ab9
movq %rax, %rbx
movb $0x1, %al
cmpl %r12d, 0x4(%rbx)
jne 0x6d64
cmpb %r14b, (%rbx)
jne 0x6d64
movq 0x8(%rbx), %rdi
callq 0x3230
movq %rsp, -0x38(%rbp)
movl %r14d, %r12d
movq %rsp, %r14
addq $0x10, %rax
andq $-0x10, %rax
subq %rax, %r14
movq %r14, %rsp
movq 0x8(%rbx), %rsi
movq %r14, %rdi
callq 0x3110
movq (%r15), %rdi
movq %r14, %rsi
movl %r12d, %r14d
movl -0x30(%rbp), %r12d
callq 0x55ea
movl %eax, -0x2c(%rbp)
xorl %eax, %eax
movq -0x38(%rbp), %rsp
testb %al, %al
je 0x6d7c
incq %r13
cmpq %r13, -0x40(%rbp)
jne 0x6d00
xorl %eax, %eax
jmp 0x6d7f
movl $0x16, %eax
jmp 0x6d7f
movl -0x2c(%rbp), %eax
leaq -0x28(%rbp), %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O1/cglindkamp[P]dfm/src/filedata.c
// Function: filedata_listcompare_directory_filename
int filedata_listcompare_directory_filename(const void *a, const void *b)
{
	struct filedata *filedata1 = *(struct filedata **)a;
	struct filedata *filedata2 = *(struct filedata **)b;

	if(!(S_ISDIR(filedata1->stat.st_mode) ^ S_ISDIR(filedata2->stat.st_mode)))
		return strcoll(filedata1->filename, filedata2->filename);
	if(S_ISDIR(filedata1->stat.st_mode))
		return -1;
	return 1;
}

// Assembly:
movq (%rdi), %rax
movq (%rsi), %rcx
movl $0xf000, %esi           # imm = 0xF000
movl 0x28(%rax), %edx
andl %esi, %edx
movl $0x4000, %edi           # imm = 0x4000
cmpl %edi, %edx
sete %r8b
andl 0x28(%rcx), %esi
cmpl %edi, %esi
sete %sil
xorb %r8b, %sil
je 0x7031
xorl %eax, %eax
cmpl $0x4000, %edx           # imm = 0x4000
setne %al
leal -0x1(,%rax,2), %eax
retq
movq (%rax), %rdi
movq (%rcx), %rsi
jmp 0x34e0
// File: /workspace/github_c_makefile_star2_O1/cglindkamp[P]dfm/src/filedata.c
// Function: filedata_listcompare_directory_filename_descending
int filedata_listcompare_directory_filename_descending(const void *a, const void *b)
{
	struct filedata *filedata1 = *(struct filedata **)a;
	struct filedata *filedata2 = *(struct filedata **)b;

	if(!(S_ISDIR(filedata1->stat.st_mode) ^ S_ISDIR(filedata2->stat.st_mode)))
		return -strcoll(filedata1->filename, filedata2->filename);
	if(S_ISDIR(filedata1->stat.st_mode))
		return -1;
	return 1;
}

// Assembly:
movq (%rdi), %rax
movq (%rsi), %rcx
movl $0xf000, %esi           # imm = 0xF000
movl 0x28(%rax), %edx
andl %esi, %edx
movl $0x4000, %edi           # imm = 0x4000
cmpl %edi, %edx
sete %r8b
andl 0x28(%rcx), %esi
cmpl %edi, %esi
sete %sil
xorb %r8b, %sil
je 0x7078
xorl %eax, %eax
cmpl $0x4000, %edx           # imm = 0x4000
setne %al
leal -0x1(,%rax,2), %eax
retq
pushq %rax
movq (%rax), %rdi
movq (%rcx), %rsi
callq 0x34e0
negl %eax
addq $0x8, %rsp
retq
// File: /workspace/github_c_makefile_star2_O1/cglindkamp[P]dfm/src/filedata.c
// Function: filedata_listcompare_directory_size_filename
int filedata_listcompare_directory_size_filename(const void *a, const void *b)
{
	struct filedata *filedata1 = *(struct filedata **)a;
	struct filedata *filedata2 = *(struct filedata **)b;

	if(!S_ISDIR(filedata1->stat.st_mode) && !S_ISDIR(filedata2->stat.st_mode)) {
		if(filedata1->stat.st_size < filedata2->stat.st_size)
			return -1;
		else if(filedata1->stat.st_size > filedata2->stat.st_size)
			return 1;
		return strcoll(filedata1->filename, filedata2->filename);
	}
	if(S_ISDIR(filedata1->stat.st_mode) && S_ISDIR(filedata2->stat.st_mode))
		return strcoll(filedata1->filename, filedata2->filename);
	if(S_ISDIR(filedata1->stat.st_mode))
		return -1;
	return 1;
}

// Assembly:
movq (%rdi), %rdx
movq (%rsi), %rcx
movl $0xf000, %esi           # imm = 0xF000
movl 0x28(%rdx), %eax
andl %esi, %eax
cmpl $0x4000, %eax           # imm = 0x4000
jne 0x70b8
andl 0x28(%rcx), %esi
cmpl $0x4000, %esi           # imm = 0x4000
jne 0x70cc
movq (%rdx), %rdi
movq (%rcx), %rsi
jmp 0x34e0
movl 0x28(%rcx), %edi
andl %esi, %edi
cmpl $0x4000, %edi           # imm = 0x4000
jne 0x70de
cmpl $0x4000, %eax           # imm = 0x4000
je 0x70a2
xorl %ecx, %ecx
cmpl $0x4000, %eax           # imm = 0x4000
setne %cl
leal -0x1(,%rcx,2), %eax
retq
movq 0x40(%rcx), %rsi
movl $0xffffffff, %eax       # imm = 0xFFFFFFFF
cmpq %rsi, 0x40(%rdx)
jl 0x70f4
movl $0x1, %eax
jle 0x70ad
retq
// File: /workspace/github_c_makefile_star2_O1/cglindkamp[P]dfm/src/filedata.c
// Function: filedata_listcompare_directory_mtime_filename
int filedata_listcompare_directory_mtime_filename(const void *a, const void *b)
{
	struct filedata *filedata1 = *(struct filedata **)a;
	struct filedata *filedata2 = *(struct filedata **)b;

	if(!(S_ISDIR(filedata1->stat.st_mode) ^ S_ISDIR(filedata2->stat.st_mode))) {
		if(filedata1->stat.st_mtime < filedata2->stat.st_mtime)
			return -1;
		else if(filedata1->stat.st_mtime > filedata2->stat.st_mtime)
			return 1;
		return strcoll(filedata1->filename, filedata2->filename);
	}
	if(S_ISDIR(filedata1->stat.st_mode))
		return -1;
	return 1;
}

// Assembly:
movq (%rdi), %rcx
movq (%rsi), %rdx
movl $0xf000, %esi           # imm = 0xF000
movl 0x28(%rcx), %eax
andl %esi, %eax
movl $0x4000, %edi           # imm = 0x4000
cmpl %edi, %eax
sete %r8b
andl 0x28(%rdx), %esi
cmpl %edi, %esi
sete %sil
xorb %r8b, %sil
je 0x719a
xorl %ecx, %ecx
cmpl $0x4000, %eax           # imm = 0x4000
setne %cl
leal -0x1(,%rcx,2), %eax
retq
movq 0x68(%rdx), %rsi
movl $0xffffffff, %eax       # imm = 0xFFFFFFFF
cmpq %rsi, 0x68(%rcx)
jl 0x71b0
movl $0x1, %eax
jle 0x71b1
retq
movq (%rcx), %rdi
movq (%rdx), %rsi
jmp 0x34e0
// File: /workspace/github_c_makefile_star2_O1/cglindkamp[P]dfm/src/filedata.c
// Function: filesize_to_string
void filesize_to_string(wchar_t *buf, off_t filesize)
{
	char suffix[] = {' ', 'K', 'M', 'G', 'T', 'P', 'E'};
	size_t cs = 0;
	off_t cv = filesize;

	while(cv > 1024 && cs < sizeof(suffix) - 1) {
		filesize = cv;
		cv /= 1024;
		cs++;
	}

	if(cv >= 10000)
		wcscpy(buf, INFO_SIZE_OVERFLOW);
	else if(cv < 100 && cs > 0)
		swprintf(buf, 6, L"%lu.%1lu%c", cv, (filesize - cv * 1024) * 10 / 1024, suffix[cs]);
	else
		swprintf(buf, 6, L"%lu%c", cv, suffix[cs]);
}

// Assembly:
cmpq $0x401, %rsi            # imm = 0x401
jl 0x73fa
xorl %edx, %edx
movq %rsi, %rcx
movq %rcx, %rsi
shrq $0xa, %rcx
leaq 0x1(%rdx), %rax
cmpq $0x100400, %rsi         # imm = 0x100400
jb 0x73ff
cmpq $0x5, %rdx
movq %rax, %rdx
jb 0x73db
jmp 0x73ff
xorl %eax, %eax
movq %rsi, %rcx
cmpq $0x2710, %rcx           # imm = 0x2710
jl 0x7414
leaq 0x1ed5(%rip), %rsi      # 0x92e4
jmp 0x33e0
cmpq $0x64, %rcx
setl %dl
testq %rax, %rax
setne %r8b
andb %dl, %r8b
cmpb $0x1, %r8b
jne 0x7471
movq %rcx, %rdx
shlq $0xa, %rdx
subq %rdx, %rsi
addq %rsi, %rsi
leaq (%rsi,%rsi,4), %rdx
leaq (%rsi,%rsi,4), %r8
addq $0x3ff, %r8             # imm = 0x3FF
testq %rdx, %rdx
cmovnsq %rdx, %r8
sarq $0xa, %r8
leaq 0x1e57(%rip), %rdx      # 0x92b0
movsbl (%rax,%rdx), %r9d
leaq 0x1e97(%rip), %rdx      # 0x92fc
movl $0x6, %esi
xorl %eax, %eax
jmp 0x3410
leaq 0x1e38(%rip), %rdx      # 0x92b0
movsbl (%rax,%rdx), %r8d
leaq 0x1ea4(%rip), %rdx      # 0x9328
movl $0x6, %esi
xorl %eax, %eax
jmp 0x3410
// File: /workspace/github_c_makefile_star2_O1/cglindkamp[P]dfm/src/filedata.c
// Function: filedata_new_from_file
int filedata_new_from_file(struct filedata **filedata, int dirfd, const char *filename)
{
	struct stat stat;
	bool valid = true;

	if(fstatat(dirfd, filename, &stat, AT_SYMLINK_NOFOLLOW) != 0) {
		if(errno == ENOENT)
			return ENOENT;
		valid = false;
		memset(&stat, 0, sizeof(stat));
	}

	*filedata = malloc(sizeof(**filedata));
	if(*filedata == NULL)
		return ENOMEM;

	(*filedata)->filename = strdup(filename);
	if((*filedata)->filename == NULL) {
		free(*filedata);
		*filedata = NULL;
		return ENOMEM;
	}

	(*filedata)->is_marked = false;
	(*filedata)->is_stat_valid = valid;

	if(S_ISLNK(stat.st_mode)) {
		(*filedata)->is_link = true;
		(*filedata)->link_size = stat.st_size;
		if(fstatat(dirfd, (*filedata)->filename, &(*filedata)->stat, 0) != 0) {
			(*filedata)->is_link_broken = true;
			memcpy(&(*filedata)->stat, &stat, sizeof(stat));
		} else
			(*filedata)->is_link_broken = false;
	} else {
		(*filedata)->is_link = false;
		memcpy(&(*filedata)->stat, &stat, sizeof(stat));
	}

	/* st_size field is not used for directories, so zero it out to get
	 * better file size count statistics in dirmodel */
	if(S_ISDIR((*filedata)->stat.st_mode))
		(*filedata)->stat.st_size = 0;
	return 0;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x98, %rsp
movq %rdx, %r14
movl %esi, %ebp
movq %rdi, %rbx
leaq 0x8(%rsp), %rdx
movl %esi, %edi
movq %r14, %rsi
movl $0x100, %ecx            # imm = 0x100
callq 0x3710
movl %eax, %r12d
testl %eax, %eax
je 0x772b
callq 0x30d0
movl $0x2, %r13d
cmpl $0x2, (%rax)
je 0x7807
leaq 0x8(%rsp), %rdi
movl $0x90, %edx
xorl %esi, %esi
callq 0x32e0
movl $0xb0, %edi
callq 0x3490
movq %rax, (%rbx)
movl $0xc, %r13d
testq %rax, %rax
je 0x7807
movq %rax, %r15
movq %r14, %rdi
callq 0x36a0
movq %rax, (%r15)
testq %rax, %rax
je 0x77bd
testl %r12d, %r12d
movb $0x0, 0xa8(%r15)
sete 0xa9(%r15)
movl $0xf000, %ecx           # imm = 0xF000
andl 0x20(%rsp), %ecx
cmpl $0xa000, %ecx           # imm = 0xA000
jne 0x77ce
movb $0x1, 0x8(%r15)
movq 0x38(%rsp), %rcx
movq %rcx, 0xa0(%r15)
addq $0x10, %r15
movl %ebp, %edi
movq %rax, %rsi
movq %r15, %rdx
xorl %ecx, %ecx
callq 0x3710
movq (%rbx), %rdi
testl %eax, %eax
je 0x781c
movb $0x1, 0x9(%rdi)
addq $0x10, %rdi
leaq 0x8(%rsp), %rsi
movl $0x90, %edx
jmp 0x77e4
movq %r15, %rdi
callq 0x3740
movq $0x0, (%rbx)
jmp 0x7807
movb $0x0, 0x8(%r15)
addq $0x10, %r15
leaq 0x8(%rsp), %rsi
movl $0x90, %edx
movq %r15, %rdi
callq 0x3450
movq (%rbx), %rax
movl $0xf000, %ecx           # imm = 0xF000
andl 0x28(%rax), %ecx
xorl %r13d, %r13d
cmpl $0x4000, %ecx           # imm = 0x4000
jne 0x7807
movq $0x0, 0x40(%rax)
movl %r13d, %eax
addq $0x98, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movb $0x0, 0x9(%rdi)
jmp 0x77e9
// File: /workspace/github_c_makefile_star2_O1/cglindkamp[P]dfm/src/list.c
// Function: list_new
struct list *list_new(size_t initial_size)
{
	struct list *list;

	list = malloc(sizeof(*list));
	if(list == NULL)
		return NULL;

	list->length = 0;
	list->allocated_items = initial_size;
	if(list->allocated_items == 0)
		list->allocated_items = 1;

	list->items = malloc(list->allocated_items * sizeof(void *));
	if(list->items == NULL) {
		free(list);
		return NULL;
	}

	return list;
}

// Assembly:
pushq %r14
pushq %rbx
pushq %rax
movq %rdi, %r14
movl $0x18, %edi
callq 0x3490
testq %rax, %rax
je 0x7889
movq %rax, %rbx
movq $0x0, (%rax)
cmpq $0x1, %r14
adcq $0x0, %r14
movq %r14, 0x8(%rax)
shlq $0x3, %r14
movq %r14, %rdi
callq 0x3490
movq %rax, 0x10(%rbx)
testq %rax, %rax
jne 0x788b
movq %rbx, %rdi
callq 0x3740
xorl %ebx, %ebx
movq %rbx, %rax
addq $0x8, %rsp
popq %rbx
popq %r14
retq
// File: /workspace/github_c_makefile_star2_O1/cglindkamp[P]dfm/src/list.c
// Function: list_delete
void list_delete(const struct list *list, list_item_deallocator deallocator)
{
	if(list == NULL)
		return;
	if(deallocator)
		for(size_t i = 0; i < list->length; i++)
			deallocator(list->items[i]);
	free(list->items);
	free((void *)list);
}

// Assembly:
testq %rdi, %rdi
je 0x78dd
pushq %r15
pushq %r14
pushq %rbx
movq %rsi, %r14
movq %rdi, %rbx
testq %rsi, %rsi
je 0x78c7
cmpq $0x0, (%rbx)
je 0x78c7
xorl %r15d, %r15d
movq 0x10(%rbx), %rax
movq (%rax,%r15,8), %rdi
callq *%r14
incq %r15
cmpq (%rbx), %r15
jb 0x78b4
movq 0x10(%rbx), %rdi
callq 0x3740
movq %rbx, %rdi
popq %rbx
popq %r14
popq %r15
jmp 0x3740
retq
// File: /workspace/github_c_makefile_star2_O1/cglindkamp[P]dfm/src/list.c
// Function: list_append
bool list_append(struct list *list, void *item)
{
	if(list->length == list->allocated_items)
		if(!list_make_room(list))
			return false;

	list->items[list->length] = item;
	list->length++;

	return true;
}

// Assembly:
pushq %r14
pushq %rbx
pushq %rax
movq %rsi, %r14
movq %rdi, %rbx
movq (%rdi), %rax
cmpq 0x8(%rdi), %rax
jne 0x7901
movq %rbx, %rdi
callq 0x7920
testb %al, %al
je 0x7916
movq (%rbx), %rax
movq 0x10(%rbx), %rcx
movq %r14, (%rcx,%rax,8)
incq %rax
movq %rax, (%rbx)
movb $0x1, %al
jmp 0x7918
xorl %eax, %eax
addq $0x8, %rsp
popq %rbx
popq %r14
retq
// File: /workspace/github_c_makefile_star2_O1/cglindkamp[P]dfm/src/list.c
// Function: list_make_room
static bool list_make_room(struct list *list)
{
	void *newitems = realloc(list->items, 2 * list->allocated_items * sizeof(void *));
	if(newitems == NULL)
		return false;

	list->allocated_items *= 2;
	list->items = newitems;

	return true;
}

// Assembly:
pushq %rbx
movq %rdi, %rbx
movq 0x8(%rdi), %rsi
movq 0x10(%rdi), %rdi
shlq $0x4, %rsi
callq 0x3520
testq %rax, %rax
je 0x7942
shlq 0x8(%rbx)
movq %rax, 0x10(%rbx)
testq %rax, %rax
setne %al
popq %rbx
retq
// File: /workspace/github_c_makefile_star2_O1/cglindkamp[P]dfm/src/list.c
// Function: list_insert
bool list_insert(struct list *list, size_t index, void *item)
{
	assert(index <= list->length);

	if(list->length == list->allocated_items)
		if(!list_make_room(list))
			return false;

	memmove(&list->items[index + 1], &list->items[index], (list->length - index) * sizeof(list->items[0]));
	list->items[index] = item;
	list->length++;

	return true;
}

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
movq (%rdi), %rax
cmpq %rsi, %rax
jb 0x79a8
movq %rdx, %rbx
movq %rsi, %r15
movq %rdi, %r14
cmpq 0x8(%rdi), %rax
jne 0x7972
movq %r14, %rdi
callq 0x7920
testb %al, %al
je 0x79a0
movq (%r14), %rdx
movq 0x10(%r14), %rax
leaq (%rax,%r15,8), %rsi
leaq (%rax,%r15,8), %rdi
addq $0x8, %rdi
subq %r15, %rdx
shlq $0x3, %rdx
callq 0x35b0
movq 0x10(%r14), %rax
movq %rbx, (%rax,%r15,8)
incq (%r14)
movb $0x1, %al
jmp 0x79a2
xorl %eax, %eax
popq %rbx
popq %r14
popq %r15
retq
leaq 0x19dd(%rip), %rdi      # 0x938c
leaq 0x19ec(%rip), %rsi      # 0x93a2
leaq 0x19f0(%rip), %rcx      # 0x93ad
movl $0x4e, %edx
callq 0x32c0
// File: /workspace/github_c_makefile_star2_O1/cglindkamp[P]dfm/src/list.c
// Function: list_move_item
void list_move_item(struct list *list, size_t oldindex, size_t newindex)
{
	assert(oldindex < list->length);
	assert(newindex < list->length);

	void *item = list->items[oldindex];

	if(oldindex < newindex)
		memmove(&list->items[oldindex], &list->items[oldindex + 1], (newindex - oldindex) * sizeof(list->items[0]));
	else
		memmove(&list->items[newindex + 1], &list->items[newindex], (oldindex - newindex) * sizeof(list->items[0]));

	list->items[newindex] = item;
}

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
movq (%rdi), %rax
cmpq %rsi, %rax
jbe 0x7a29
movq %rdx, %rbx
cmpq %rdx, %rax
jbe 0x7a48
movq %rdi, %r14
movq 0x10(%rdi), %rax
movq (%rax,%rsi,8), %r15
movq %rsi, %rdx
subq %rbx, %rdx
jae 0x7a06
leaq (%rax,%rsi,8), %rdi
leaq 0x8(%rdi), %rax
movq %rbx, %rdx
subq %rsi, %rdx
shlq $0x3, %rdx
movq %rax, %rsi
jmp 0x7a16
leaq (%rax,%rbx,8), %rsi
leaq (%rax,%rbx,8), %rdi
addq $0x8, %rdi
shlq $0x3, %rdx
callq 0x35b0
movq 0x10(%r14), %rax
movq %r15, (%rax,%rbx,8)
popq %rbx
popq %r14
popq %r15
retq
leaq 0x19ae(%rip), %rdi      # 0x93de
leaq 0x196b(%rip), %rsi      # 0x93a2
leaq 0x19b8(%rip), %rcx      # 0x93f6
movl $0x5d, %edx
callq 0x32c0
leaq 0x19da(%rip), %rdi      # 0x9429
leaq 0x194c(%rip), %rsi      # 0x93a2
leaq 0x1999(%rip), %rcx      # 0x93f6
movl $0x5e, %edx
callq 0x32c0
// File: /workspace/github_c_makefile_star2_O1/cglindkamp[P]dfm/src/list.c
// Function: list_find_item_or_insertpoint
bool list_find_item_or_insertpoint(const struct list *list, int (*compare)(const void *, const void *), const void *item, size_t *index)
{
	void *currentitem;
	size_t min, middle, max;
	int ret;

	if(list_length(list) == 0) {
		*index = 0;
		return false;
	}

	min = 0;
	max = list_length(list) - 1;

	while(min < max) {
		middle = (min + max) / 2;
		currentitem = list_get_item(list, middle);
		ret = compare(&item, &currentitem);
		if(ret <= 0)
			max = middle;
		else
			min = middle + 1;
	}

	*index = min;
	currentitem = list_get_item(list, *index);
	ret = compare(&item, &currentitem);

	if(ret > 0 && *index == list_length(list) - 1)
		*index = list_length(list);
	return ret == 0;

}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x18, %rsp
movq %rdx, 0x8(%rsp)
movq (%rdi), %rbx
testq %rbx, %rbx
je 0x7bd5
movq %rsi, %r15
movq %rdi, %r14
movq %rcx, 0x10(%rsp)
xorl %ebp, %ebp
decq %rbx
je 0x7b98
movq %rsp, %r13
leaq (%rbx,%rbp), %r12
shrq %r12
cmpq %r12, (%r14)
jbe 0x7bed
movq 0x10(%r14), %rax
movq (%rax,%r12,8), %rax
movq %rax, (%rsp)
leaq 0x8(%rsp), %rdi
movq %r13, %rsi
callq *%r15
leaq 0x1(%r12), %rcx
testl %eax, %eax
cmovgq %rcx, %rbp
cmovleq %r12, %rbx
cmpq %rbx, %rbp
jb 0x7b5d
movq 0x10(%rsp), %rbx
movq %rbp, (%rbx)
cmpq %rbp, (%r14)
jbe 0x7bed
movq 0x10(%r14), %rax
movq (%rax,%rbp,8), %rax
movq %rsp, %rsi
movq %rax, (%rsi)
leaq 0x8(%rsp), %rdi
callq *%r15
testl %eax, %eax
jle 0x7bce
movq (%r14), %rcx
leaq -0x1(%rcx), %rdx
cmpq %rdx, (%rbx)
jne 0x7bce
movq %rcx, (%rbx)
testl %eax, %eax
sete %al
jmp 0x7bde
movq $0x0, (%rcx)
xorl %eax, %eax
addq $0x18, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
leaq 0x17ed(%rip), %rdi      # 0x93e1
leaq 0x17a7(%rip), %rsi      # 0x93a2
leaq 0x1867(%rip), %rcx      # 0x9469
movl $0x74, %edx
callq 0x32c0