LLM4Binary/decompile-bench-makefile huggingface dataset:
// File: /workspace/github_c_makefile_star2_O1/cglindkamp[P]dfm/src/listmodel.c
// Function: listmodel_register_change_callback
bool listmodel_register_change_callback(struct listmodel *model, model_change_callback callback, void *data)
{
	if(model->change_callbacks == NULL)
		model->change_callbacks = list_new(0);

	if(model->change_callbacks == NULL)
		return false;

	struct callback *cb = malloc(sizeof(*cb));
	if(cb == NULL)
		return false;

	cb->cb = callback;
	cb->data = data;

	if(!list_append(model->change_callbacks, cb)) {
		free(cb);
		return false;
	}

	return true;
}

// Assembly:
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
pushq %rax
movq %rdx, %rbx
movq %rsi, %r14
movq %rdi, %r15
cmpq $0x0, 0x20(%rdi)
jne 0x7c54
xorl %edi, %edi
callq 0x7840
movq %rax, 0x20(%r15)
movq 0x20(%r15), %r12
testq %r12, %r12
je 0x7c91
movl $0x10, %edi
callq 0x3490
testq %rax, %rax
je 0x7c91
movq %rax, %r15
movq %r14, (%rax)
movq %rbx, 0x8(%rax)
movq %r12, %rdi
movq %rax, %rsi
callq 0x78e2
movl %eax, %ecx
movb $0x1, %al
testb %cl, %cl
jne 0x7c93
movq %r15, %rdi
callq 0x3740
xorl %eax, %eax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
retq
// File: /workspace/github_c_makefile_star2_O1/cglindkamp[P]dfm/src/listmodel.c
// Function: listmodel_unregister_change_callback
void listmodel_unregister_change_callback(struct listmodel *model, model_change_callback callback, void *data)
{
	struct list *list = model->change_callbacks;
	struct callback *cb;
	size_t length = list_length(list);;

	for(size_t i = 0; i < length; i++) {
		cb = list_get_item(list, i);
		if(cb->cb == callback && cb->data == data) {
			free(cb);
			list_remove(list, i);
		}
	}
}

// Assembly:
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
movq %rdx, %rbx
movq %rsi, %r14
movq 0x20(%rdi), %r15
movq %r15, %rdi
callq 0x78de
testq %rax, %rax
je 0x7cf6
movq %rax, %r12
xorl %r13d, %r13d
movq %r15, %rdi
movq %r13, %rsi
callq 0x7ab9
cmpq %r14, (%rax)
jne 0x7cee
cmpq %rbx, 0x8(%rax)
jne 0x7cee
movq %rax, %rdi
callq 0x3740
movq %r15, %rdi
movq %r13, %rsi
callq 0x7a67
incq %r13
cmpq %r13, %r12
jne 0x7cc5
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
retq
// File: /workspace/github_c_makefile_star2_O1/cglindkamp[P]dfm/src/listmodel.c
// Function: listmodel_notify_change
void listmodel_notify_change(struct listmodel *model, enum model_change change, size_t newindex, size_t oldindex)
{
	struct list *list = model->change_callbacks;
	if(list == NULL)
		return;

	struct callback *cb;
	size_t length = list_length(list);;

	for(size_t i = 0; i < length; i++) {
		cb = list_get_item(list, i);
		cb->cb(change, newindex, oldindex, cb->data);
	}
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movq 0x20(%rdi), %r15
testq %r15, %r15
je 0x7d50
movq %rcx, %rbx
movq %rdx, %r14
movl %esi, %ebp
movq %r15, %rdi
callq 0x78de
testq %rax, %rax
je 0x7d50
movq %rax, %r12
xorl %r13d, %r13d
movq %r15, %rdi
movq %r13, %rsi
callq 0x7ab9
movq 0x8(%rax), %rcx
movl %ebp, %edi
movq %r14, %rsi
movq %rbx, %rdx
callq *(%rax)
incq %r13
cmpq %r13, %r12
jne 0x7d2f
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/listview.c
// Function: listview_refresh
void listview_refresh(struct listview *view)
{
	if(!view->needs_refresh)
		return;

	unsigned int height, width;
	size_t i = 0;
	height = getmaxy(view->window);
	width = getmaxx(view->window);

	size_t buflen = width;

	werase(view->window);
	while(i < height) {
		if(i + view->first >= listmodel_count(view->model))
			break;

		wchar_t buffer[buflen + 1];
		size_t reallen = listmodel_render(view->model, buffer, buflen, width, i + view->first);

		if(reallen > buflen) {
			buflen = reallen;
			continue;
		}

		int attrs = attrs_for_index(view->model, view->first + i, view->index);

		wmove(view->window, i, 0);
		wattron(view->window, attrs);
		waddwstr(view->window, buffer);
		wattroff(view->window, attrs);

		i++;
	}
	wrefresh(view->window);
	view->needs_refresh = false;
}

// Assembly:
cmpb $0x1, 0x20(%rdi)
jne 0x7ecf
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x28, %rsp
movq %rdi, %rbx
movl $0xffffffff, %r12d      # imm = 0xFFFFFFFF
movq (%rdi), %rdi
movl $0xffffffff, %eax       # imm = 0xFFFFFFFF
movq %rax, -0x30(%rbp)
testq %rdi, %rdi
je 0x7db7
movswl 0x4(%rdi), %eax
incl %eax
movq %rax, -0x30(%rbp)
testq %rdi, %rdi
je 0x7dc4
movswl 0x6(%rdi), %r12d
incl %r12d
callq 0x30e0
cmpq $0x0, -0x30(%rbp)
je 0x7eb5
xorl %r15d, %r15d
movq %r12, -0x38(%rbp)
movq %r12, -0x40(%rbp)
movq 0x10(%rbx), %r14
addq %r15, %r14
movq 0x8(%rbx), %rdi
callq 0x7c0c
cmpq %rax, %r14
jae 0x7eb5
movq %rsp, -0x50(%rbp)
movq %rsp, %r13
movq -0x38(%rbp), %r14
leaq 0x13(,%r14,4), %rax
andq $-0x10, %rax
subq %rax, %r13
movq %r13, %rsp
movq 0x8(%rbx), %rdi
movq 0x10(%rbx), %r8
addq %r15, %r8
movq %r13, %rsi
movq %r14, %rdx
movq %r12, %rcx
callq 0x7c0e
cmpq %r14, %rax
jbe 0x7e39
movq %rax, -0x38(%rbp)
jmp 0x7ea7
movq 0x8(%rbx), %rdi
movq 0x10(%rbx), %r12
addq %r15, %r12
movq 0x18(%rbx), %rax
movq %rax, -0x48(%rbp)
movq %r12, %rsi
callq 0x7c23
movzbl %al, %eax
shll $0x9, %eax
leal 0x200100(%rax), %r14d
cmpq -0x48(%rbp), %r12
movq -0x40(%rbp), %r12
cmovnel %eax, %r14d
movq (%rbx), %rdi
movl %r15d, %esi
xorl %edx, %edx
callq 0x3090
movq (%rbx), %rdi
movl %r14d, %esi
xorl %edx, %edx
callq 0x3120
movq (%rbx), %rdi
movq %r13, %rsi
movl $0xffffffff, %edx       # imm = 0xFFFFFFFF
callq 0x32d0
movq (%rbx), %rdi
movl %r14d, %esi
xorl %edx, %edx
callq 0x3620
incq %r15
movq -0x50(%rbp), %rsp
cmpq -0x30(%rbp), %r15
jb 0x7ddf
movq (%rbx), %rdi
callq 0x3390
movb $0x0, 0x20(%rbx)
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/listview.c
// Function: listview_setindex_internal
static void listview_setindex_internal(struct listview *view, size_t index, int direction, bool keep_distance)
{
	size_t listcount = listmodel_count(view->model);
	unsigned int rowcount = getmaxy(view->window);
	size_t distance = view->index - view->first;

	/* check index for over- and underflow */
	if(direction == 0 && index > listcount - 1)
		view->index = listcount - 1;
	else if(direction < 0 && index > view->index)
		view->index = 0;
	else if(direction > 0 && (index < view->index || index > listcount - 1))
		view->index = listcount - 1;
	else
		view->index = index;

	/* try to restore distance between first and index
	 * may underflow, but this is checked later */
	if(keep_distance)
		view->first = view->index - distance;

	/* make sure, first has a sane value relative to index */
	if(view->index < view->first)
		view->first = view->index;
	else if(view->index - view->first >= rowcount)
		view->first = view->index - rowcount + 1;

	/* make sure, view is always filled to the bottom with entries,
	 * or in case there aren't enough, scrolled to the first entry */
	if(listcount <= rowcount)
		view->first = 0;
	else if(listcount - view->first <= rowcount)
		view->first = listcount - rowcount;

	view->needs_refresh = true;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %rbx
pushq %rax
movl %ecx, %ebp
movl %edx, %r15d
movq %rsi, %r14
movq %rdi, %rbx
movq 0x8(%rdi), %rdi
callq 0x7c0c
movq (%rbx), %rcx
testq %rcx, %rcx
je 0x7f0b
movswl 0x4(%rcx), %ecx
incl %ecx
jmp 0x7f10
movl $0xffffffff, %ecx       # imm = 0xFFFFFFFF
movq 0x18(%rbx), %rdx
testl %r15d, %r15d
sete %dil
leaq -0x1(%rax), %rsi
cmpq %r14, %rsi
setb %r8b
testb %r8b, %dil
jne 0x7f61
testl %r15d, %r15d
sets %sil
cmpq %r14, %rdx
setb %dil
testb %dil, %sil
je 0x7f42
xorl %esi, %esi
jmp 0x7f61
testl %r15d, %r15d
jle 0x7f5e
cmpq %r14, %rdx
seta %dil
leaq -0x1(%rax), %rsi
cmpq %r14, %rsi
setb %r8b
orb %dil, %r8b
jne 0x7f61
movq %r14, %rsi
movq 0x10(%rbx), %rdi
movq %rsi, 0x18(%rbx)
testb %bpl, %bpl
je 0x7f79
subq %rdx, %rdi
addq 0x18(%rbx), %rdi
movq %rdi, 0x10(%rbx)
movq 0x18(%rbx), %rdx
movq %rdx, %rsi
subq 0x10(%rbx), %rsi
jb 0x7f91
cmpq %rcx, %rsi
jb 0x7f95
subq %rcx, %rdx
incq %rdx
movq %rdx, 0x10(%rbx)
movq %rax, %rdx
subq %rcx, %rdx
jbe 0x7fa8
subq 0x10(%rbx), %rax
cmpq %rcx, %rax
jbe 0x7faa
jmp 0x7fae
xorl %edx, %edx
movq %rdx, 0x10(%rbx)
movb $0x1, 0x20(%rbx)
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O1/cglindkamp[P]dfm/src/listview.c
// Function: listview_init
bool listview_init(struct listview *view, struct listmodel *model, unsigned int x, unsigned int y, unsigned int width, unsigned int height)
{
	view->window = newwin(height, width, y, x);
	if(view->window == NULL)
		return false;

	view->index = 0;
	view->first = 0;
	view->model = model;
	view->needs_refresh = true;

	if(!listmodel_register_change_callback(view->model, change_cb, view)) {
		delwin(view->window);
		view->window = NULL;
		return false;
	}

	listview_refresh(view);

	return true;
}

// Assembly:
pushq %r14
pushq %rbx
pushq %rax
movl %edx, %eax
movq %rsi, %r14
movq %rdi, %rbx
movl %r9d, %edi
movl %r8d, %esi
movl %ecx, %edx
movl %eax, %ecx
callq 0x3030
movq %rax, (%rbx)
testq %rax, %rax
je 0x80e3
xorps %xmm0, %xmm0
movups %xmm0, 0x10(%rbx)
movq %r14, 0x8(%rbx)
movb $0x1, 0x20(%rbx)
leaq 0x34(%rip), %rsi        # 0x80ed
movq %r14, %rdi
movq %rbx, %rdx
callq 0x7c31
testb %al, %al
je 0x80d4
movq %rbx, %rdi
callq 0x7d78
movb $0x1, %al
jmp 0x80e5
movq (%rbx), %rdi
callq 0x31e0
movq $0x0, (%rbx)
xorl %eax, %eax
addq $0x8, %rsp
popq %rbx
popq %r14
retq
// File: /workspace/github_c_makefile_star2_O1/cglindkamp[P]dfm/src/listview.c
// Function: change_cb
static void change_cb(enum model_change change, size_t newindex, size_t oldindex, void *data)
{
	struct listview *view = data;
	unsigned int rowcount = getmaxy(view->window);

	switch(change) {
	case MODEL_ADD:
		if(newindex <= view->index)
			listview_setindex_internal(view, view->index + 1, 1, true);
		else if(newindex < view->first + rowcount)
			view->needs_refresh = true;
		break;
	case MODEL_REMOVE:
		if(oldindex < view->index)
			listview_setindex_internal(view, view->index - 1, -1, true);
		else if(oldindex < view->first + rowcount)
			listview_setindex_internal(view, view->index, 0, true);
		break;
	case MODEL_CHANGE:
		if(newindex == oldindex) {
			if(newindex >= view->first && newindex < view->first + rowcount)
				view->needs_refresh = true;
		} else if(oldindex == view->index) {
			listview_setindex_internal(view, newindex, 0, false);
		} else {
			change_cb(MODEL_ADD, newindex, oldindex, data);
			change_cb(MODEL_REMOVE, newindex, oldindex, data);
		}
		break;
	case MODEL_RELOAD:
		view->first = 0;
		view->index = 0;
		view->needs_refresh = true;
	}
}

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
movq %rcx, %rbx
movq %rdx, %r15
movq %rsi, %r14
movq (%rbx), %rax
testq %rax, %rax
je 0x810b
movswl 0x4(%rax), %eax
incl %eax
jmp 0x8110
movl $0xffffffff, %eax       # imm = 0xFFFFFFFF
cmpl $0x2, %edi
jne 0x8137
cmpq %r15, %r14
je 0x8178
cmpq %r15, 0x18(%rbx)
je 0x8193
xorl %edi, %edi
movq %r14, %rsi
movq %r15, %rdx
movq %rbx, %rcx
callq 0x80ed
movl $0x1, %edi
jmp 0x80fb
cmpl $0x3, %edi
je 0x8159
cmpl $0x1, %edi
je 0x8162
testl %edi, %edi
jne 0x818d
movq 0x18(%rbx), %rsi
cmpq %r14, %rsi
jae 0x819f
addq 0x10(%rbx), %rax
cmpq %r14, %rax
ja 0x8189
jmp 0x818d
xorps %xmm0, %xmm0
movups %xmm0, 0x10(%rbx)
jmp 0x8189
movq 0x18(%rbx), %rsi
cmpq %r15, %rsi
jbe 0x81ac
decq %rsi
movq %rbx, %rdi
movl $0xffffffff, %edx       # imm = 0xFFFFFFFF
jmp 0x81ba
movq 0x10(%rbx), %rcx
cmpq %r14, %rcx
ja 0x818d
addq %rax, %rcx
cmpq %r14, %rcx
jbe 0x818d
movb $0x1, 0x20(%rbx)
popq %rbx
popq %r14
popq %r15
retq
movq %rbx, %rdi
movq %r14, %rsi
xorl %edx, %edx
xorl %ecx, %ecx
jmp 0x81bf
incq %rsi
movq %rbx, %rdi
movl $0x1, %edx
jmp 0x81ba
addq 0x10(%rbx), %rax
cmpq %r15, %rax
jbe 0x818d
movq %rbx, %rdi
xorl %edx, %edx
movl $0x1, %ecx
popq %rbx
popq %r14
popq %r15
jmp 0x7ee0
// File: /workspace/github_c_makefile_star2_O1/cglindkamp[P]dfm/src/path.c
// Function: path_add_component
bool path_add_component(struct path *path, const char *component)
{
	while(strlen(path->path) + strlen(component) + 2 > path->allocated_size)
		if(!path_make_room(path, 0))
			return false;

	strcat(path->path, "/");
	strcat(path->path, component);

	return true;
}

// Assembly:
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
movq %rsi, %rbx
movq %rdi, %r14
movq (%r14), %r15
movq %r15, %rdi
callq 0x3230
movq %rax, %r12
movq %rbx, %rdi
callq 0x3230
addq %rax, %r12
addq $0x2, %r12
movq 0x8(%r14), %r13
cmpq %r13, %r12
jbe 0x8247
movq %r14, %rdi
xorl %esi, %esi
callq 0x8271
testb %al, %al
jne 0x8211
jmp 0x8261
movq %r15, %rdi
callq 0x3230
movw $0x2f, (%r15,%rax)
movq (%r14), %rdi
movq %rbx, %rsi
callq 0x3670
cmpq %r13, %r12
setbe %al
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
retq
// File: /workspace/github_c_makefile_star2_O1/cglindkamp[P]dfm/src/path.c
// Function: path_make_room
static bool path_make_room(struct path *path, size_t size)
{
	size_t target_size = size ? size : path->allocated_size * 2;

	if(target_size > path->allocated_size) {
		char *newpath = realloc(path->path, target_size);
		if(newpath == NULL)
			return false;

		path->allocated_size = target_size;
		path->path = newpath;
	}
	return true;
}

// Assembly:
pushq %rbp
pushq %r14
pushq %rbx
movq %rsi, %r14
movq %rdi, %rbx
testq %rsi, %rsi
jne 0x8287
movq 0x8(%rbx), %r14
addq %r14, %r14
movb $0x1, %bpl
cmpq 0x8(%rbx), %r14
jbe 0x82ab
movq (%rbx), %rdi
movq %r14, %rsi
callq 0x3520
testq %rax, %rax
je 0x82a9
movq %r14, 0x8(%rbx)
movq %rax, (%rbx)
jmp 0x82ab
xorl %ebp, %ebp
movl %ebp, %eax
popq %rbx
popq %r14
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O1/cglindkamp[P]dfm/src/path.c
// Function: path_remove_component
bool path_remove_component(struct path *path, const char **component)
{
	if(path->path[0] == '\0')
		return false;

	char *slash = strrchr(path->path, '/');
	*slash = '\0';

	if(component)
		*component = slash + 1;

	return true;
}

// Assembly:
pushq %rbp
pushq %rbx
pushq %rax
movq (%rdi), %rdi
movb (%rdi), %bpl
testb %bpl, %bpl
je 0x82db
movq %rsi, %rbx
movl $0x2f, %esi
callq 0x32b0
movb $0x0, (%rax)
testq %rbx, %rbx
je 0x82db
incq %rax
movq %rax, (%rbx)
testb %bpl, %bpl
setne %al
addq $0x8, %rsp
popq %rbx
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O1/cglindkamp[P]dfm/src/path.c
// Function: path_set_to_current_working_directory
bool path_set_to_current_working_directory(struct path *path)
{
	while(getcwd(path->path, path->allocated_size) == NULL)
	{
		if(errno == ERANGE) {
			if(!path_make_room(path, 0))
				return false;
		} else
			return false;
	}
	return true;
}

// Assembly:
pushq %r14
pushq %rbx
pushq %rax
movq %rdi, %rbx
movq (%rbx), %rdi
movq 0x8(%rbx), %rsi
callq 0x3310
movq %rax, %r14
testq %rax, %rax
jne 0x831b
callq 0x30d0
cmpl $0x22, (%rax)
jne 0x831b
movq %rbx, %rdi
xorl %esi, %esi
callq 0x8271
testb %al, %al
jne 0x82ef
testq %r14, %r14
setne %al
addq $0x8, %rsp
popq %rbx
popq %r14
retq
// File: /workspace/github_c_makefile_star2_O1/cglindkamp[P]dfm/src/path.c
// Function: path_set_from_string
int path_set_from_string(struct path *path, const char *cstr)
{
	if(strcmp(cstr, "~") == 0) {
		const char *home = getenv("HOME");
		if(home == NULL || strcmp(home, "~") == 0)
			return EINVAL;
		return path_set_from_string(path, home);
	}

	if(!(path_cstr_is_valid(cstr)))
		return EINVAL;

	if(!path_make_room(path, strlen(cstr) + 1))
		return ENOMEM;
	strcpy(path->path, cstr);

	/* reduce multiple consecutive slashes to a single one */
	size_t s = 0, d = 0;
	do {
		s++;
		if(path->path[s] == '/' && path->path[d] == '/')
			continue;
		d++;
		path->path[d] = path->path[s];
	} while(path->path[s] != '\0');

	/* remove trailing slash, this also ensures that the string will be
	 * empty for the root directory */
	if(path->path[d - 1] == '/')
		path->path[d - 1] = '\0';

	return 0;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
movq %rsi, %r14
movq %rdi, %rbx
leaq 0x118e(%rip), %r15      # 0x94cc
leaq 0x11ae(%rip), %r12      # 0x94f3
movl $0x16, %ebp
movq %r14, %rdi
movq %r15, %rsi
callq 0x33d0
testl %eax, %eax
jne 0x837e
movq %r12, %rdi
callq 0x3070
testq %rax, %rax
je 0x83ee
movq %rax, %r14
movq %rax, %rdi
movq %r15, %rsi
callq 0x33d0
testl %eax, %eax
jne 0x834a
jmp 0x83ee
movl $0x16, %ebp
cmpb $0x2f, (%r14)
jne 0x83ee
movq %r14, %rdi
callq 0x3230
leaq 0x1(%rax), %rsi
movq %rbx, %rdi
callq 0x8271
movl $0xc, %ebp
testb %al, %al
je 0x83ee
movq (%rbx), %rdi
movq %r14, %rsi
callq 0x3110
movl $0x1, %ecx
xorl %eax, %eax
movq (%rbx), %rdx
movb (%rdx,%rcx), %sil
cmpb $0x2f, %sil
jne 0x83cb
cmpb $0x2f, (%rdx,%rax)
je 0x83d3
movb %sil, 0x1(%rdx,%rax)
incq %rax
movq (%rbx), %rdx
cmpb $0x0, (%rdx,%rcx)
leaq 0x1(%rcx), %rcx
jne 0x83b8
xorl %ebp, %ebp
cmpb $0x2f, -0x1(%rdx,%rax)
jne 0x83ee
movb $0x0, -0x1(%rdx,%rax)
movl %ebp, %eax
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O1/cglindkamp[P]dfm/src/path.c
// Function: path_new_from_string
int path_new_from_string(struct path **path, const char *cstr)
{
	/* this check is done again in path_set_from_string,
	 * but the the allocations can be saved, if cstr is invalid */
	if(!(path_cstr_is_valid(cstr)))
		return EINVAL;

	*path = path_new();
	if(*path == NULL)
		return ENOMEM;

	int ret = path_set_from_string(*path, cstr);
	if(ret != 0) {
		path_delete(*path);
		*path = NULL;
	}
	return ret;
}

// Assembly:
pushq %rbp
pushq %r14
pushq %rbx
movl $0x16, %ebp
cmpb $0x2f, (%rsi)
jne 0x8441
movq %rsi, %r14
movq %rdi, %rbx
callq 0x8448
movq %rax, (%rbx)
testq %rax, %rax
je 0x843c
movq %rax, %rdi
movq %r14, %rsi
callq 0x8329
movl %eax, %ebp
testl %eax, %eax
je 0x8441
movq (%rbx), %rdi
callq 0x8489
movq $0x0, (%rbx)
jmp 0x8441
movl $0xc, %ebp
movl %ebp, %eax
popq %rbx
popq %r14
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O1/cglindkamp[P]dfm/src/path.c
// Function: path_new
struct path *path_new(void)
{
	struct path *path = malloc(sizeof(*path));
	if(path == NULL)
		return NULL;

	if(!path_init(path, 0)) {
		free(path);
		return NULL;
	}
	return path;
}

// Assembly:
pushq %rbx
movl $0x10, %edi
callq 0x3490
testq %rax, %rax
je 0x8482
movq %rax, %rbx
movq $0x1, 0x8(%rax)
movl $0x1, %edi
callq 0x3490
movq %rax, (%rbx)
testq %rax, %rax
je 0x847a
movb $0x0, (%rax)
jmp 0x8484
movq %rbx, %rdi
callq 0x3740
xorl %ebx, %ebx
movq %rbx, %rax
popq %rbx
retq
// File: /workspace/github_c_makefile_star2_O1/cglindkamp[P]dfm/src/path.c
// Function: path_init
bool path_init(struct path *path, size_t size)
{
	path->allocated_size = size;
	if(path->allocated_size < 1)
		path->allocated_size = 1;

	path->path = malloc(path->allocated_size);
	if(path->path == NULL)
		return false;

	path->path[0] = '\0';

	return true;
}

// Assembly:
pushq %rbx
movq %rdi, %rbx
cmpq $0x1, %rsi
adcq $0x0, %rsi
movq %rsi, 0x8(%rdi)
movq %rsi, %rdi
callq 0x3490
movq %rax, (%rbx)
testq %rax, %rax
je 0x84c7
movb $0x0, (%rax)
testq %rax, %rax
setne %al
popq %rbx
retq
// File: /workspace/github_c_makefile_star2_O1/cglindkamp[P]dfm/src/processmanager.c
// Function: processmanager_spawn
int processmanager_spawn(struct processmanager *pm, const char *program, char * const argv[], const char *tmpdir, pre_exec_callback cb, pid_t *pid)
{
	struct process *process = NULL;

	if(tmpdir) {
		if(!pm->processlist) {
			pm->processlist = list_new(0);
			if(!pm->processlist)
				return ENOMEM;
		}

		process = malloc(sizeof(*process));
		if(!process)
			return ENOMEM;

		process->tmpdir = strdup(tmpdir);
		if(!process->tmpdir) {
			free(process);
			return ENOMEM;
		}

		if(!list_append(pm->processlist, process)) {
			process_delete(process);
			return ENOMEM;
		}
	}

	*pid = fork();

	if(*pid < 0)
		return errno;
	if(*pid > 0) {
		if(process)
			process->pid = *pid;
		return 0;
	}

	if(cb)
		cb();

	execvp(program, argv);
	exit(EXIT_FAILURE);
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x18, %rsp
movq %r9, %r12
movq %rdx, %rbp
movq %rsi, %r15
testq %rcx, %rcx
movq %r8, 0x8(%rsp)
je 0x8577
movq %rcx, %r14
movq %rdi, %rbx
cmpq $0x0, (%rdi)
jne 0x852e
xorl %edi, %edi
callq 0x7840
movq %rax, (%rbx)
testq %rax, %rax
je 0x85b2
movq %r15, 0x10(%rsp)
movq %rbp, %r15
movl $0x10, %edi
callq 0x3490
movl $0xc, %ebp
testq %rax, %rax
je 0x85b7
movq %rax, %r13
movq %r14, %rdi
callq 0x36a0
movq %rax, 0x8(%r13)
testq %rax, %rax
je 0x85a8
movq (%rbx), %rdi
movq %r13, %rsi
callq 0x78e2
testb %al, %al
je 0x859f
movq %r15, %rbp
movq 0x10(%rsp), %r15
jmp 0x857a
xorl %r13d, %r13d
callq 0x3700
movl %eax, (%r12)
testl %eax, %eax
js 0x8596
je 0x85c8
xorl %ebp, %ebp
testq %r13, %r13
je 0x85b7
movl %eax, (%r13)
jmp 0x85b7
callq 0x30d0
movl (%rax), %ebp
jmp 0x85b7
movq 0x8(%r13), %rdi
callq 0x3740
movq %r13, %rdi
callq 0x3740
jmp 0x85b7
movl $0xc, %ebp
movl %ebp, %eax
addq $0x18, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
cmpq $0x0, 0x8(%rsp)
je 0x85d4
callq *0x8(%rsp)
movq %r15, %rdi
movq %rbp, %rsi
callq 0x3640
movl $0x1, %edi
callq 0x3690
// File: /workspace/github_c_makefile_star2_O1/cglindkamp[P]dfm/src/processmanager.c
// Function: processmanager_waitpid
pid_t processmanager_waitpid(struct processmanager *pm, pid_t pid, int *wstatus)
{
	pid = waitpid(pid, wstatus, 0);
	if(pid <= 0)
		return pid;

	if(!pm->processlist)
		return pid;

	size_t length = list_length(pm->processlist);

	for(size_t i = 0; i < length; i++) {
		struct process *process = list_get_item(pm->processlist, i);

		if(process->pid == pid) {
			remove_directory_recursively(process->tmpdir);
			process_delete(process);
			list_remove(pm->processlist, i);
			break;
		}
	}

	return pid;
}

// Assembly:
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
movq %rdi, %r14
movl %esi, %edi
movq %rdx, %rsi
xorl %edx, %edx
callq 0x35e0
movl %eax, %ebx
testl %eax, %eax
jle 0x8660
movq (%r14), %rdi
testq %rdi, %rdi
je 0x8660
callq 0x78de
testq %rax, %rax
je 0x8660
movq %rax, %r12
xorl %r15d, %r15d
movq (%r14), %rdi
movq %r15, %rsi
callq 0x7ab9
cmpl %ebx, (%rax)
je 0x8638
incq %r15
cmpq %r15, %r12
jne 0x861f
jmp 0x8660
movq %rax, %r13
movq 0x8(%rax), %rdi
callq 0x88c8
movq 0x8(%r13), %rdi
callq 0x3740
movq %r13, %rdi
callq 0x3740
movq (%r14), %rdi
movq %r15, %rsi
callq 0x7a67
movl %ebx, %eax
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
retq
// File: /workspace/github_c_makefile_star2_O1/cglindkamp[P]dfm/src/xdg.c
// Function: xdg_get_config_home
int xdg_get_config_home(struct path **path)
{
	int ret = 0;
	*path = NULL;

	const char *config_home = getenv("XDG_CONFIG_HOME");
	if(config_home)
		ret = path_new_from_string(path, config_home);

	if(ret == ENOMEM)
		return ENOMEM;

	if(*path == NULL) {
		const char *home = getenv("HOME");
		if(home) {
			ret = path_new_from_string(path, home);

			if(ret == ENOMEM)
				return ENOMEM;

			if(*path == NULL)
				return ENOENT;

			if(!path_add_component(*path, ".config")) {
				path_delete(*path);
				*path = NULL;
				return ENOMEM;
			}
		} else
			return ENOENT;
	}
	return 0;
}

// Assembly:
pushq %rbp
pushq %rbx
pushq %rax
movq %rdi, %rbx
movq $0x0, (%rdi)
leaq 0xe48(%rip), %rdi       # 0x94e8
callq 0x3070
testq %rax, %rax
je 0x86bf
movq %rbx, %rdi
movq %rax, %rsi
callq 0x83f9
movl $0xc, %ebp
cmpl $0xc, %eax
je 0x8727
cmpq $0x0, (%rbx)
jne 0x8725
leaq 0xe27(%rip), %rdi       # 0x94f3
callq 0x3070
movl $0x2, %ebp
testq %rax, %rax
je 0x8707
movq %rbx, %rdi
movq %rax, %rsi
callq 0x83f9
cmpl $0xc, %eax
je 0x871a
movq (%rbx), %rdi
testq %rdi, %rdi
je 0x8707
leaq 0xdfe(%rip), %rsi       # 0x94f8
callq 0x8202
testb %al, %al
je 0x870b
movb $0x1, %al
jmp 0x8721
xorl %eax, %eax
jmp 0x8721
movq (%rbx), %rdi
callq 0x8489
movq $0x0, (%rbx)
xorl %eax, %eax
movl $0xc, %ebp
testb %al, %al
je 0x8727
xorl %ebp, %ebp
movl %ebp, %eax
addq $0x8, %rsp
popq %rbx
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O1/cglindkamp[P]dfm/src/util.c
// Function: determine_usable_config_file
struct path *determine_usable_config_file(const char *project, const char *subdir, const char *config, int flags)
{
	struct path *path = NULL;
	struct list *list = xdg_get_config_dirs(true);

	if(list == NULL)
		return NULL;

	size_t length = list_length(list);;

	for(size_t i = 0; i < length; i++) {
		struct path *curpath = list_get_item(list, i);
		if(!path_add_component(curpath, project))
			goto err;
		if(subdir) {
			if(!path_add_component(curpath, subdir))
				goto err;
		}
		if(!path_add_component(curpath, config))
			goto err;
		if(path == NULL && access(path_tocstr(curpath), flags) == 0) {
			path = curpath;
			list_set_item(list, i, NULL);
		}
	}
err:
	list_delete(list, (list_item_deallocator)path_delete);
	return path;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x28, %rsp
movl %ecx, %ebp
movq %rdx, 0x10(%rsp)
movq %rsi, %r14
movq %rdi, 0x20(%rsp)
movl $0x1, %edi
callq 0x8730
testq %rax, %rax
je 0x89f0
movq %rax, %rbx
movq %rax, %rdi
callq 0x78de
movq %rax, %r13
movl $0x2, %eax
testq %r13, %r13
je 0x89f5
movq %r14, 0x18(%rsp)
movl %ebp, 0xc(%rsp)
xorl %r14d, %r14d
movq $0x0, (%rsp)
movq %rbx, %rdi
movq %r14, %rsi
callq 0x7ab9
movq %rax, %rbp
movq %rax, %rdi
movq 0x20(%rsp), %rsi
callq 0x8202
movl $0x5, %r15d
testb %al, %al
je 0x89a6
movq 0x18(%rsp), %rsi
testq %rsi, %rsi
je 0x8983
movq %rbp, %rdi
callq 0x8202
testb %al, %al
je 0x89a6
movq %rbp, %rdi
movq 0x10(%rsp), %rsi
callq 0x8202
xorl %r12d, %r12d
testb %al, %al
je 0x89a9
movb $0x1, %r12b
cmpq $0x0, (%rsp)
je 0x89b8
xorl %r15d, %r15d
jmp 0x89a9
xorl %r12d, %r12d
testb %r12b, %r12b
je 0x89fa
incq %r14
cmpq %r14, %r13
jne 0x8948
jmp 0x89ff
movq %rbp, %rdi
callq 0x81f0
movq %rax, %rdi
movl 0xc(%rsp), %esi
callq 0x3610
xorl %r15d, %r15d
testl %eax, %eax
je 0x89dd
movq $0x0, (%rsp)
jmp 0x89a9
movq %rbx, %rdi
movq %r14, %rsi
xorl %edx, %edx
callq 0x7ae7
movq %rbp, (%rsp)
jmp 0x89a9
xorl %r14d, %r14d
jmp 0x8a21
xorl %r14d, %r14d
jmp 0x8a08
movl %r15d, %eax
jmp 0x8a04
movl $0x2, %eax
movq (%rsp), %r14
cmpl $0x5, %eax
je 0x8a12
cmpl $0x2, %eax
jne 0x8a21
leaq -0x590(%rip), %rsi      # 0x8489
movq %rbx, %rdi
callq 0x7896
movq %r14, %rax
addq $0x28, %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/util.c
// Function: dump_string_to_file
bool dump_string_to_file(int dir_fd, const char *filename, const char *value)
{
	int fd = openat(dir_fd, filename, O_CREAT|O_WRONLY, 0700);
	if(fd < 0)
		return false;

	int ret = write(fd, value, strlen(value));

	close(fd);

	return ret < 0 ? false : true;
}

// Assembly:
pushq %rbp
pushq %r14
pushq %rbx
movq %rdx, %rbx
xorl %r14d, %r14d
movl $0x41, %edx
movl $0x1c0, %ecx            # imm = 0x1C0
xorl %eax, %eax
callq 0x3240
testl %eax, %eax
js 0x8a79
movl %eax, %ebp
movq %rbx, %rdi
callq 0x3230
movl %ebp, %edi
movq %rbx, %rsi
movq %rax, %rdx
callq 0x31c0
movq %rax, %rbx
movl %ebp, %edi
callq 0x3320
testl %ebx, %ebx
setns %r14b
movl %r14d, %eax
popq %rbx
popq %r14
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O1/cglindkamp[P]dfm/src/util.c
// Function: dump_filelist_to_file
bool dump_filelist_to_file(int dir_fd, const char *filename, const struct list *list)
{
	int ret = 0;

	int fd = openat(dir_fd, filename, O_CREAT|O_WRONLY, 0700);
	if(fd < 0)
		return false;

	size_t length = list_length(list);;

	for(size_t i = 0; i < length; i++) {
		const char *file = list_get_item(list, i);
		if((ret = write(fd, file, strlen(file))) < 0)
			break;
		if((ret = write(fd, "\0", 1)) < 0)
			break;
	}
	close(fd);

	return ret < 0 ? false : true;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movq %rdx, %rbx
xorl %r13d, %r13d
movl $0x41, %edx
movl $0x1c0, %ecx            # imm = 0x1C0
xorl %eax, %eax
callq 0x3240
testl %eax, %eax
js 0x8b2e
movl %eax, %ebp
movq %rbx, %rdi
callq 0x78de
testq %rax, %rax
je 0x8b24
movq %rax, %r14
decq %r14
xorl %r15d, %r15d
leaq 0xa51(%rip), %r12       # 0x951b
movq %rbx, %rdi
movq %r15, %rsi
callq 0x7ab9
movq %rax, %r13
movq %rax, %rdi
callq 0x3230
movl %ebp, %edi
movq %r13, %rsi
movq %rax, %rdx
callq 0x31c0
testl %eax, %eax
js 0x8b0d
movl $0x1, %edx
movl %ebp, %edi
movq %r12, %rsi
callq 0x31c0
movl %eax, %ecx
shrl $0x1f, %ecx
testl %eax, %eax
setns %r13b
jmp 0x8b12
movb $0x1, %cl
xorl %r13d, %r13d
testb %cl, %cl
jne 0x8b27
leaq 0x1(%r15), %rax
cmpq %r15, %r14
movq %rax, %r15
jne 0x8aca
jmp 0x8b27
movb $0x1, %r13b
movl %ebp, %edi
callq 0x3320
movl %r13d, %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/util.c
// Function: run_in_foreground
bool run_in_foreground()
{
	const char *display = getenv("DISPLAY");

	if(display == NULL || strlen(display) == 0)
		return true;

	const char *foreground = getenv("DFM_FOREGROUND");

	if(foreground != NULL && strcmp(foreground, "yes") == 0)
		return true;

	return false;
}

// Assembly:
pushq %rbx
leaq 0x9d5(%rip), %rdi       # 0x951d
callq 0x3070
movb $0x1, %bl
testq %rax, %rax
je 0x8b7f
cmpb $0x0, (%rax)
je 0x8b7f
leaq 0x9c5(%rip), %rdi       # 0x9525
callq 0x3070
testq %rax, %rax
je 0x8b7d
leaq 0x9c3(%rip), %rsi       # 0x9534
movq %rax, %rdi
callq 0x33d0
testl %eax, %eax
je 0x8b7f
xorl %ebx, %ebx
movl %ebx, %eax
popq %rbx
retq
nop
// File: /workspace/github_c_makefile_star2_O1/cglindkamp[P]dfm/src/main.c
// Function: init_ncurses
void init_ncurses()
{
	initscr();
	noecho();
	raw();

	start_color();
	init_pair(1, COLOR_WHITE, COLOR_BLUE);
	init_pair(2, COLOR_YELLOW, COLOR_BLACK);
	init_pair(3, COLOR_YELLOW, COLOR_BLUE);
}

// Assembly:
pushq %rax
callq 0x3530
callq 0x3080
callq 0x3420
callq 0x3040
movl $0x1, %edi
movl $0x7, %esi
movl $0x4, %edx
callq 0x34c0
movl $0x2, %edi
movl $0x3, %esi
xorl %edx, %edx
callq 0x34c0
movl $0x3, %edi
movl $0x3, %esi
movl $0x4, %edx
popq %rax
jmp 0x34c0
// File: /workspace/github_c_makefile_star2_O1/cglindkamp[P]dfm/src/main.c
// Function: main
int main(void)
{
	struct application app;
	int ret = 0;

	setlocale(LC_ALL, "");
	tzset();
	init_ncurses();

	if(application_init(&app)) {
		application_run(&app);
	} else {
		endwin();
		puts("Failed to initialize the application, exiting");
	}
	application_destroy(&app);

	endwin();
	_nc_freeall();

	return ret;
}

// Assembly:
subq $0x1d8, %rsp            # imm = 0x1D8
leaq 0x63f(%rip), %rsi       # 0x9220
movl $0x6, %edi
callq 0x3570
callq 0x3460
callq 0x8b84
movq %rsp, %rdi
callq 0x47ba
testb %al, %al
je 0x8c0b
movq %rsp, %rdi
callq 0x41ac
jmp 0x8c1c
callq 0x36c0
leaq 0x921(%rip), %rdi       # 0x9538
callq 0x3160
movq %rsp, %rdi
callq 0x4cf2
callq 0x36c0
xorl %eax, %eax
callq 0x32f0
xorl %eax, %eax
addq $0x1d8, %rsp            # imm = 0x1D8
retq
// File: /workspace/github_c_makefile_star2_O1/dlbeer[P]dhara/ecc/crc32.c
// Function: crc32_nand
uint32_t crc32_nand(const uint8_t *block, size_t len,
		    uint32_t c)
{
	size_t i;

	for (i = 0; i < len; i++)
		c = (c >> 8) ^ reduce[(c ^ block[i]) & 0xff] ^ 0xff000000;

	return c;
}

// Assembly:
testq %rsi, %rsi
je 0x11b9
xorl %ecx, %ecx
leaq 0xe76(%rip), %r8        # 0x2010
movl %edx, %eax
shrl $0x8, %eax
xorb (%rdi,%rcx), %dl
movzbl %dl, %edx
orl $0xff000000, %eax       # imm = 0xFF000000
xorl (%r8,%rdx,4), %eax
incq %rcx
movl %eax, %edx
cmpq %rcx, %rsi
jne 0x119c
retq
movl %edx, %eax
retq
// File: /workspace/github_c_makefile_star2_O1/dlbeer[P]dhara/tests/crc32.c
// Function: main
int main(void)
{
	uint8_t block[BLOCK_SIZE];
	int i;

	memset(block, 0xff, sizeof(block));
	assert(crc32_nand(block, BLOCK_SIZE, CRC32_INIT) == 0xffffffff);

	srandom(0);
	for (i = 0; i < 10; i++)
		test_random_block();

	return 0;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x608, %rsp            # imm = 0x608
leaq 0x400(%rsp), %rbx
movl $0x200, %edx            # imm = 0x200
movq %rbx, %rdi
movl $0xff, %esi
callq 0x1050
movl $0x200, %esi            # imm = 0x200
movq %rbx, %rdi
movl $0xffffffff, %edx       # imm = 0xFFFFFFFF
callq 0x118c
cmpl $-0x1, %eax
jne 0x1314
xorl %r12d, %r12d
xorl %edi, %edi
callq 0x1030
movq %rsp, %rbx
leaq 0x200(%rsp), %r14
xorl %r15d, %r15d
callq 0x1070
movb %al, (%rsp,%r15)
incq %r15
cmpq $0x200, %r15            # imm = 0x200
jne 0x121a
movl $0x200, %esi            # imm = 0x200
movq %rbx, %rdi
movl $0xffffffff, %edx       # imm = 0xFFFFFFFF
callq 0x118c
movl %eax, %ebp
xorl %r13d, %r13d
movl $0x200, %edx            # imm = 0x200
movq %r14, %rdi
movq %rbx, %rsi
callq 0x1060
movl $0x4, %r15d
callq 0x1070
leaq 0xfff(%rax), %rcx
testq %rax, %rax
cmovnsq %rax, %rcx
andq $-0x1000, %rcx          # imm = 0xF000
subq %rcx, %rax
movl %eax, %edx
sarl $0x3, %edx
andb $0x7, %al
movl $0x1, %esi
movl %eax, %ecx
shll %cl, %esi
movslq %edx, %rax
xorb %sil, 0x200(%rsp,%rax)
decl %r15d
jne 0x125c
movl $0x200, %esi            # imm = 0x200
movq %r14, %rdi
movl $0xffffffff, %edx       # imm = 0xFFFFFFFF
callq 0x118c
movl %eax, %r15d
movl $0x200, %edx            # imm = 0x200
movq %r14, %rdi
movq %rbx, %rsi
callq 0x1080
testl %eax, %eax
je 0x12c7
cmpl %ebp, %r15d
je 0x12f5
incl %r13d
cmpl $0x14, %r13d
jne 0x1246
incl %r12d
cmpl $0xa, %r12d
jne 0x1217
xorl %eax, %eax
addq $0x608, %rsp            # imm = 0x608
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
leaq 0x1169(%rip), %rdi      # 0x2465
leaq 0x1145(%rip), %rsi      # 0x2448
leaq 0x1193(%rip), %rcx      # 0x249d
movl $0x2d, %edx
callq 0x1040
leaq 0x10f5(%rip), %rdi      # 0x2410
leaq 0x1126(%rip), %rsi      # 0x2448
leaq 0x112d(%rip), %rcx      # 0x2456
movl $0x45, %edx
callq 0x1040
// File: /workspace/github_c_makefile_star2_O1/franko[P]luajit/src/host/minilua.c
// Function: countint
static int arrayindex(const TValue*key){
if(ttisnumber(key)){
lua_Number n=nvalue(key);
int k;
lua_number2int(k,n);
if(luai_numeq(cast_num(k),n))
return k;
}
return-1;
}

// Assembly:
cmpl $0x3, 0x8(%rdi)
jne 0x7be9
movsd (%rdi), %xmm0
cvttpd2dq %xmm0, %xmm1
cvtdq2pd %xmm1, %xmm1
ucomisd %xmm1, %xmm0
jne 0x7be9
jnp 0x7c39
movl $0xffffffff, %ecx       # imm = 0xFFFFFFFF
decl %ecx
xorl %eax, %eax
cmpl $0x3fffffff, %ecx       # imm = 0x3FFFFFFF
ja 0x7c38
movl $0xffffffff, %eax       # imm = 0xFFFFFFFF
cmpl $0x100, %ecx            # imm = 0x100
jb 0x7c1b
movl %ecx, %edx
addl $0x8, %eax
shrl $0x8, %edx
cmpl $0xffff, %ecx           # imm = 0xFFFF
movl %edx, %ecx
ja 0x7c09
jmp 0x7c1d
movl %ecx, %edx
movl %edx, %ecx
leaq 0xc83a(%rip), %rdx      # 0x14460
movzbl (%rcx,%rdx), %ecx
cltq
addq %rcx, %rax
incl 0x4(%rsi,%rax,4)
movl $0x1, %eax
retq
cvttsd2si %xmm0, %ecx
jmp 0x7bee
// File: /workspace/github_c_makefile_star2_O1/robertdavidgraham[P]wc2/wctool.c
// Function: gen_utf8
void gen_utf8(void)
{
    size_t i;
    unsigned seed = 0;
    static const char *list[] = { 
        "\xe7\x9a\x84",     /* U+7684 的 */
        "\xe4\xb8\x80",     /* U+4e00 一 */
        "\xe6\x98\xaf",     /* U+662f 是 */
        "\xe6\x96\x87",     /* U+6587 文 */
        "\xe3\x81\xaa",     /* U+306a な */
        "\xf0\x9f\x98\x82", /* U+1f602 😂 */
        "\xe2\x9d\xa4\xef\xb8\x8f", /* U+2764 ❤️ */
        "\xf0\x9f\x92\xa9", /* U+1f4a9 💩 */
        "\xe2\x80\x83",     /* U+2003   */
        "\xe1\xa0\x8e",     /* U+180e ᠎ */
        "\xe3\x80\x80",     /* U+3000 　 */
        "\n",               /* U+000a */
        " ",                /* U+0020   */
        "\xef\xbb\xbf",     /* U+feff ﻿ */
        "\xe1\x9a\x80",     /* U+1680   */
        "\t",               /* U+0009   */
        0};

        
    fprintf(stderr, "[+] generating utf8 rabndom file\n");
    for (i=0; i<FILESIZE; ) {
        const char *out = list[r_rand(&seed)%16];
        printf("%s", out);
        i += strlen(out);
    }
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
movq 0x2f29(%rip), %rax      # 0x3ff8
movq (%rax), %rcx
leaq 0xf68(%rip), %rdi       # 0x2041
pushq $0x21
popq %rsi
pushq $0x1
popq %rdx
callq 0x1090
leaq 0x2c75(%rip), %r15      # 0x3d60
leaq 0xf71(%rip), %rbx       # 0x2063
xorl %r12d, %r12d
xorl %ebp, %ebp
imull $0x343fd, %ebp, %ebp    # imm = 0x343FD
addl $0x269ec3, %ebp         # imm = 0x269EC3
movl %ebp, %eax
shrl $0xd, %eax
andl $0x78, %eax
movq (%rax,%r15), %r14
movq %rbx, %rdi
movq %r14, %rsi
xorl %eax, %eax
callq 0x1050
movq %r14, %rdi
callq 0x1040
addq %rax, %r12
cmpq $0x5805559, %r12        # imm = 0x5805559
jb 0x10f7
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O1/robertdavidgraham[P]wc2/wctool.c
// Function: gen_allword
void gen_allword(void)
{
    size_t i;
    char buf[1024];
    memset(buf, 'x', sizeof(buf));
    
    fprintf(stderr, "[+] generating all-word file\n");
    for (i=0; i<FILESIZE-1024; i += sizeof(buf)) {
        fwrite(buf, 1, sizeof(buf), stdout);
    }
    for (; i<FILESIZE; i++) {
        putchar('x');
    }
}

// Assembly:
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
subq $0x408, %rsp            # imm = 0x408
movq %rsp, %rbx
pushq $0x78
popq %rsi
movl $0x400, %edx            # imm = 0x400
movq %rbx, %rdi
callq 0x1060
movq 0x2e97(%rip), %rax      # 0x3ff8
movq (%rax), %rcx
leaq 0xefb(%rip), %rdi       # 0x2066
pushq $0x1d
popq %rsi
pushq $0x1
popq %r14
movq %r14, %rdx
callq 0x1090
movq $-0x400, %r15           # imm = 0xFC00
movq 0x2e50(%rip), %r12      # 0x3fd8
movq (%r12), %rcx
movl $0x400, %edx            # imm = 0x400
movq %rbx, %rdi
movq %r14, %rsi
callq 0x1090
addq $0x400, %r15            # imm = 0x400
cmpq $0x5804d59, %r15        # imm = 0x5804D59
jb 0x1188
movl $0x159, %r14d           # imm = 0x159
pushq $0x78
popq %rbx
movl %ebx, %edi
callq 0x1030
decq %r14
jne 0x11b5
addq $0x408, %rsp            # imm = 0x408
popq %rbx
popq %r12
popq %r14
popq %r15
retq
// File: /workspace/github_c_makefile_star2_O1/robertdavidgraham[P]wc2/wctool.c
// Function: gen_allspace
void gen_allspace(void)
{
    size_t i;
    char buf[1024];
    memset(buf, ' ', sizeof(buf));
    
    fprintf(stderr, "[+] generating all-space file\n");
    for (i=0; i<FILESIZE-1024; i += sizeof(buf)) {
        fwrite(buf, 1, sizeof(buf), stdout);
    }
    for (; i<FILESIZE; i++) {
        putchar(' ');
    }
}

// Assembly:
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
subq $0x408, %rsp            # imm = 0x408
movq %rsp, %rbx
pushq $0x20
popq %rsi
movl $0x400, %edx            # imm = 0x400
movq %rbx, %rdi
callq 0x1060
movq 0x2e00(%rip), %rax      # 0x3ff8
movq (%rax), %rcx
leaq 0xe82(%rip), %rdi       # 0x2084
pushq $0x1e
popq %rsi
pushq $0x1
popq %r14
movq %r14, %rdx
callq 0x1090
movq $-0x400, %r15           # imm = 0xFC00
movq 0x2db9(%rip), %r12      # 0x3fd8
movq (%r12), %rcx
movl $0x400, %edx            # imm = 0x400
movq %rbx, %rdi
movq %r14, %rsi
callq 0x1090
addq $0x400, %r15            # imm = 0x400
cmpq $0x5804d59, %r15        # imm = 0x5804D59
jb 0x121f
movl $0x159, %r14d           # imm = 0x159
pushq $0x20
popq %rbx
movl %ebx, %edi
callq 0x1030
decq %r14
jne 0x124c
addq $0x408, %rsp            # imm = 0x408
popq %rbx
popq %r12
popq %r14
popq %r15
retq
// File: /workspace/github_c_makefile_star2_O1/robertdavidgraham[P]wc2/wctool.c
// Function: gen_ascii
void gen_ascii(void)
{
    size_t i;
    unsigned seed = 0;

    fprintf(stderr, "[+] generating ascii random file\n");
    for (i=0; i<FILESIZE; i++) {
        putchar(" x\ty\rz\na"[r_rand(&seed)%8]);
    }
}

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
movq 0x2d85(%rip), %rax      # 0x3ff8
movq (%rax), %rcx
leaq 0xe26(%rip), %rdi       # 0x20a3
pushq $0x21
popq %rsi
pushq $0x1
popq %rdx
callq 0x1090
xorl %ebx, %ebx
movl $0x5805559, %r14d       # imm = 0x5805559
leaq 0xe2e(%rip), %r15       # 0x20c5
imull $0x343fd, %ebx, %ebx    # imm = 0x343FD
addl $0x269ec3, %ebx         # imm = 0x269EC3
movl %ebx, %eax
shrl $0x10, %eax
andl $0x7, %eax
movsbl (%rax,%r15), %edi
callq 0x1030
decq %r14
jne 0x1297
popq %rbx
popq %r14
popq %r15
retq
// File: /workspace/github_c_makefile_star2_O1/robertdavidgraham[P]wc2/wctool.c
// Function: utf8_to_ucs4
unsigned 
utf8_to_ucs4(unsigned char *buf, size_t sizeof_buf)
{
    if (sizeof_buf >= 1 && buf[0] < 0x80) {
        return buf[0];
    } else if (sizeof_buf >= 2 && (buf[0]&0xE0) == 0xC0) {
        return  (buf[0]&0x1F)<<6 
                | (buf[1] & 0x3F) << 0;
    } else if (sizeof_buf >= 3 && (buf[0]&0xF0) == 0xE0) {
        return (buf[0]&0x0F)<<12 
                | (buf[1] & 0x3F) << 6
                | (buf[2] & 0x3F) << 0;
    } else if (sizeof_buf >= 4 && (buf[0]&0xF1) == 0xF0) {
        return (buf[0]&0x07)<<18 
                | (buf[1] & 0x3F) << 12
                | (buf[2] & 0x3F) << 6
                | (buf[3] & 0x3F) << 0;
    } else
        return 0xFFFFFFFF;
}

// Assembly:
testq %rsi, %rsi
je 0x13b9
movsbl (%rdi), %eax
testl %eax, %eax
js 0x13b9
retq
cmpq $0x2, %rsi
jb 0x13da
movzbl (%rdi), %ecx
movl %ecx, %eax
andl $-0x20, %eax
cmpl $0xc0, %eax
jne 0x13da
andl $0x1f, %ecx
shll $0x6, %ecx
movzbl 0x1(%rdi), %eax
jmp 0x1445
cmpq $0x3, %rsi
jb 0x1408
movzbl (%rdi), %eax
movl %eax, %ecx
andl $-0x10, %ecx
cmpl $0xe0, %ecx
jne 0x1408
shll $0xc, %eax
movzwl %ax, %eax
movzbl 0x1(%rdi), %ecx
andl $0x3f, %ecx
shll $0x6, %ecx
orl %eax, %ecx
movzbl 0x2(%rdi), %eax
jmp 0x1445
movl $0xffffffff, %eax       # imm = 0xFFFFFFFF
cmpq $0x4, %rsi
jb 0x13b8
movzbl (%rdi), %ecx
movl %ecx, %edx
andl $-0xf, %edx
cmpl $0xf0, %edx
jne 0x13b8
andl $0x6, %ecx
shll $0x12, %ecx
movzbl 0x1(%rdi), %eax
andl $0x3f, %eax
shll $0xc, %eax
orl %ecx, %eax
movzbl 0x2(%rdi), %ecx
andl $0x3f, %ecx
shll $0x6, %ecx
orl %eax, %ecx
movzbl 0x3(%rdi), %eax
andl $0x3f, %eax
orl %ecx, %eax
retq
// File: /workspace/github_c_makefile_star2_O1/robertdavidgraham[P]wc2/wctool.c
// Function: ucs4_to_utf8
size_t ucs4_to_utf8(unsigned char *buf, size_t sizeof_buf, unsigned wchar)
{
	#if 0
    if (0xD800 <= wchar && wchar <= 0xDFFF) {
        /* surrogates must not be encoded */
        return 0;
    }
	#endif

    if (0x10000 <= wchar && wchar <= 0x10FFFF && sizeof_buf >= 4) {
        buf[0] = 0xF0 | ((wchar >> 18) & 0x07);
        buf[1] = 0x80 | ((wchar >> 12) & 0x3F);
        buf[2] = 0x80 | ((wchar >>  6) & 0x3F);
        buf[3] = 0x80 | ((wchar >>  0) & 0x3F);
        return 4;
    } else if (0x0800 <= wchar && wchar <= 0xFFFF && sizeof_buf >= 3) {
        buf[0] = 0xE0 | ((wchar >> 12) & 0x0F);
        buf[1] = 0x80 | ((wchar >>  6) & 0x3F);
        buf[2] = 0x80 | ((wchar >>  0) & 0x3F);
        return 3;
    } else if (0x0080 <= wchar && wchar <= 0x7FF && sizeof_buf >= 2) {
        buf[0] = 0xC0 | ((wchar >>  6) & 0x1F);
        buf[1] = 0x80 | ((wchar >>  0) & 0x3F);
        return 2;
    } else if (wchar <= 0x7F && sizeof_buf >= 1) {
        buf[0] = wchar;
        return 1;
    } else
        return 0;
}

// Assembly:
leal -0x10000(%rdx), %eax
cmpl $0x100000, %eax         # imm = 0x100000
setae %al
cmpq $0x4, %rsi
setb %cl
orb %al, %cl
jne 0x1494
movl %edx, %eax
shrl $0x12, %eax
orb $-0x10, %al
movb %al, (%rdi)
movl %edx, %eax
shrl $0xc, %eax
andb $0x3f, %al
orb $-0x80, %al
movb %al, 0x1(%rdi)
movl %edx, %eax
shrl $0x6, %eax
andb $0x3f, %al
orb $-0x80, %al
movb %al, 0x2(%rdi)
andb $0x3f, %dl
orb $-0x80, %dl
movb %dl, 0x3(%rdi)
movl $0x4, %eax
retq
leal -0x800(%rdx), %eax
cmpl $0xf800, %eax           # imm = 0xF800
setae %al
cmpq $0x3, %rsi
setb %cl
orb %al, %cl
jne 0x14d1
movl %edx, %eax
shrl $0xc, %eax
orb $-0x20, %al
movb %al, (%rdi)
movl %edx, %eax
shrl $0x6, %eax
andb $0x3f, %al
orb $-0x80, %al
movb %al, 0x1(%rdi)
andb $0x3f, %dl
orb $-0x80, %dl
movb %dl, 0x2(%rdi)
movl $0x3, %eax
retq
leal -0x80(%rdx), %eax
cmpl $0x780, %eax            # imm = 0x780
setae %al
cmpq $0x2, %rsi
setb %cl
orb %al, %cl
jne 0x14ff
movl %edx, %eax
shrl $0x6, %eax
orb $-0x40, %al
movb %al, (%rdi)
andb $0x3f, %dl
orb $-0x80, %dl
movb %dl, 0x1(%rdi)
movl $0x2, %eax
retq
cmpl $0x7f, %edx
seta %al
testq %rsi, %rsi
sete %cl
orb %al, %cl
jne 0x1517
movb %dl, (%rdi)
movl $0x1, %eax
retq
xorl %eax, %eax
retq
// File: /workspace/github_c_makefile_star2_O1/robertdavidgraham[P]wc2/wctool.c
// Function: main
int main(int argc, char *argv[])
{
    if (argc > 1 && (tolower(argv[1][0]) == 'u' || strcmp(argv[1], "-u") == 0 || strcmp(argv[1], "--utf8") == 0))
        gen_utf8();
    else if (argc > 1 && (tolower(argv[1][0]) == 'w' || strcmp(argv[1], "-w") == 0 || strcmp(argv[1], "--allword") == 0))
        gen_allword();
    else if (argc > 1 && (tolower(argv[1][0]) == 's' || strcmp(argv[1], "-s") == 0 || strcmp(argv[1], "--allspace") == 0))
        gen_allspace();
    else if (argc > 1 && (tolower(argv[1][0]) == 'a' || strcmp(argv[1], "-a") == 0 || strcmp(argv[1], "--ascii") == 0))
        gen_ascii();
    else {
        setlocale(LC_CTYPE, "");
        printf("LC_CTYPE=%s\n", setlocale(LC_CTYPE, NULL));
    }

    return 0;
}

// Assembly:
pushq %rbp
pushq %rbx
pushq %rax
cmpl $0x2, %edi
jl 0x1604
movq %rsi, %rbx
callq 0x10a0
movq (%rax), %rax
movq 0x8(%rbx), %rbx
movsbq (%rbx), %rcx
movl (%rax,%rcx,4), %ebp
cmpl $0x75, %ebp
je 0x1635
leaq 0xb82(%rip), %rsi       # 0x20ce
movq %rbx, %rdi
callq 0x1070
testl %eax, %eax
je 0x1635
leaq 0xb6e(%rip), %rsi       # 0x20d1
movq %rbx, %rdi
callq 0x1070
testl %eax, %eax
je 0x1635
cmpl $0x77, %ebp
je 0x163c
leaq 0xb55(%rip), %rsi       # 0x20d8
movq %rbx, %rdi
callq 0x1070
testl %eax, %eax
je 0x163c
leaq 0xb41(%rip), %rsi       # 0x20db
movq %rbx, %rdi
callq 0x1070
testl %eax, %eax
je 0x163c
cmpl $0x73, %ebp
je 0x1643
leaq 0xb2b(%rip), %rsi       # 0x20e5
movq %rbx, %rdi
callq 0x1070
testl %eax, %eax
je 0x1643
leaq 0xb1b(%rip), %rsi       # 0x20e8
movq %rbx, %rdi
callq 0x1070
testl %eax, %eax
je 0x1643
cmpl $0x61, %ebp
je 0x164a
leaq 0xb0e(%rip), %rsi       # 0x20f3
movq %rbx, %rdi
callq 0x1070
testl %eax, %eax
je 0x164a
leaq 0xafe(%rip), %rsi       # 0x20f6
movq %rbx, %rdi
callq 0x1070
testl %eax, %eax
je 0x164a
leaq 0xa35(%rip), %rsi       # 0x2040
xorl %edi, %edi
callq 0x1080
xorl %edi, %edi
xorl %esi, %esi
callq 0x1080
leaq 0xadc(%rip), %rdi       # 0x20fe
movq %rax, %rsi
xorl %eax, %eax
callq 0x1050
xorl %eax, %eax
addq $0x8, %rsp
popq %rbx
popq %rbp
retq
callq 0x10c0
jmp 0x162c
callq 0x1139
jmp 0x162c
callq 0x11d0
jmp 0x162c
callq 0x1267
jmp 0x162c
// File: /workspace/github_c_makefile_star2_O1/vidarr[P]ringbuffer/test/../src/buffercache.c
// Function: buffercache_get_buffer
Buffer* buffercache_get_buffer(Ringbuffer* cache, size_t min_length_bytes) {

    Buffer* db =  0;

    if(0 != cache) {
        db = cache->pop(cache);
    }

    if(0 == db) {
        db = calloc(1, sizeof(Buffer));
    }

    if(db->capacity_bytes < min_length_bytes) {
        if(0 != db->data) {
            free(db->data);
            db->data = 0;
        }
    }

    if(0 == db->data) {
        db->data = calloc(1, sizeof(min_length_bytes) * sizeof(uint8_t));
        db->capacity_bytes = min_length_bytes;
    }

    db->bytes_used = 0;

    return db;

}

// Assembly:
pushq %r14
pushq %rbx
pushq %rax
movq %rsi, %rbx
testq %rdi, %rdi
je 0x1370
callq *0x10(%rdi)
movq %rax, %r14
jmp 0x1373
xorl %r14d, %r14d
testq %r14, %r14
jne 0x138a
movl $0x1, %edi
movl $0x18, %esi
callq 0x1060
movq %rax, %r14
cmpq %rbx, (%r14)
jae 0x13a5
movq 0x10(%r14), %rdi
testq %rdi, %rdi
je 0x13a5
callq 0x1030
movq $0x0, 0x10(%r14)
cmpq $0x0, 0x10(%r14)
jne 0x13c2
movl $0x1, %edi
movl $0x8, %esi
callq 0x1060
movq %rax, 0x10(%r14)
movq %rbx, (%r14)
movq $0x0, 0x8(%r14)
movq %r14, %rax
addq $0x8, %rsp
popq %rbx
popq %r14
retq
// File: /workspace/github_c_makefile_star2_O1/giometti[P]mastering_UNIX_programming/chapter_08/memalign.c
// Function: main
int main(int argc, char *argv[])
{
	size_t alignment, size;
	void *ptr;
	int ret;

	/* Parse the command line */
	if (argc < 3) {
		fprintf(stderr,
			"usage: %s <align-size> <size>\n", argv[0]);
		return -1;
	}
	alignment = atoi(argv[1]);
	size = atoi(argv[2]);

	/* Try memory allocation */
	ret = posix_memalign(&ptr, alignment, size);
	if (ret) {
		/* Set errno is such a way perror() may work correctly */
		errno = ret;
		perror("posix_memalign");
		return -1;
	}
	printf("posix_memalign(%ld, %ld) returned %p\n",
		alignment, size, ptr);
	free(ptr);

	return 0;
}

// Assembly:
pushq %rbp
pushq %r14
pushq %rbx
subq $0x10, %rsp
movq %rsi, %r14
cmpl $0x2, %edi
jle 0x1228
movq 0x8(%r14), %rdi
callq 0x1080
movslq %eax, %rbx
movq 0x10(%r14), %rdi
callq 0x1080
movslq %eax, %r14
leaq 0x8(%rsp), %rdi
movq %rbx, %rsi
movq %r14, %rdx
callq 0x1090
testl %eax, %eax
jne 0x1232
movq 0x8(%rsp), %rcx
leaq 0xe2e(%rip), %rdi       # 0x2032
xorl %ebp, %ebp
movq %rbx, %rsi
movq %r14, %rdx
xorl %eax, %eax
callq 0x1050
movq 0x8(%rsp), %rdi
callq 0x1030
movl %ebp, %eax
addq $0x10, %rsp
popq %rbx
popq %r14
popq %rbp
retq
movq %r14, %rdi
callq 0x10b0
jmp 0x1247
movl %eax, %ebp
callq 0x1040
movl %ebp, (%rax)
leaq 0xde1(%rip), %rdi       # 0x2023
callq 0x1070
movl $0xffffffff, %ebp       # imm = 0xFFFFFFFF
jmp 0x121d