LLM4Binary/decompile-bench-makefile huggingface dataset:
// File: /workspace/github_c_makefile_star2_O1/bobrippling[P]tim/pos.c
// Function: point_sort_yx
void point_sort_yx(point_t *const a, point_t *const b)
{
	if(b->y < a->y){
		point_t tmp = *b;
		*b = *a;
		*a = tmp;
	}else if(b->y == a->y && b->x < a->x){
		int tmp = b->x;
		b->x = a->x;
		a->x = tmp;
	}
}

// Assembly:
movl 0x4(%rdi), %eax
cmpl %eax, 0x4(%rsi)
jge 0xcdaf
movq (%rsi), %rax
movq (%rdi), %rcx
movq %rcx, (%rsi)
movq %rax, (%rdi)
retq
jne 0xcdbd
movl (%rsi), %eax
movl (%rdi), %ecx
cmpl %ecx, %eax
jge 0xcdbd
movl %ecx, (%rsi)
movl %eax, (%rdi)
retq
nop
// File: /workspace/github_c_makefile_star2_O1/bobrippling[P]tim/region.c
// Function: region_contains
bool region_contains(const region_t *re, int x, int y)
{
	region_t sorted = *re;
	point_sort_full(&sorted.begin, &sorted.end);

	const struct
	{
		bool x, y;
	} in = {
		sorted.begin.x <= x && x <= sorted.end.x,
		sorted.begin.y <= y && y <= sorted.end.y
	};

	switch(re->type){
		case REGION_LINE:
			return in.y;

		case REGION_COL:
			return in.y && in.x;

		case REGION_CHAR:
			if(!in.y)
				return false;

			if(re->begin.y == re->end.y)
				return in.x;

			sorted = *re;
			point_sort_y(&sorted.begin, &sorted.end);

			if(y == sorted.begin.y)
				return x >= sorted.begin.x;
			if(y == sorted.end.y)
				return x <= sorted.end.x;

			return true;
	}

	return false;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
subq $0x20, %rsp
movl %edx, %ebp
movl %esi, %ebx
movq %rdi, %r15
movl 0x10(%rdi), %eax
leaq 0x8(%rsp), %r14
movl %eax, 0x8(%r14)
movups (%rdi), %xmm0
movaps %xmm0, -0x8(%r14)
movq %rsp, %r12
movq %r12, %rdi
movq %r14, %rsi
callq 0xcd79
cmpl %ebx, (%r12)
setle %cl
cmpl %ebx, 0x8(%r12)
setge %al
andb %cl, %al
cmpl %ebp, 0x4(%r12)
setle %dl
cmpl %ebp, 0xc(%r12)
setge %cl
andb %dl, %cl
movl 0x10(%r15), %edx
testl %edx, %edx
je 0xce32
cmpl $0x2, %edx
je 0xce2e
cmpl $0x1, %edx
jne 0xce6f
andb %cl, %al
jmp 0xce71
movl %ecx, %eax
jmp 0xce71
testb %cl, %cl
je 0xce6f
movl 0x4(%r15), %ecx
cmpl 0xc(%r15), %ecx
je 0xce71
movl 0x10(%r15), %eax
movq %rsp, %r12
movl %eax, 0x10(%r12)
movups (%r15), %xmm0
movaps %xmm0, (%r12)
movq %r12, %rdi
movq %r14, %rsi
callq 0xcd64
cmpl %ebp, 0x4(%r12)
jne 0xce7e
cmpl %ebx, (%rsp)
setle %al
jmp 0xce71
xorl %eax, %eax
addq $0x20, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
movb $0x1, %al
cmpl %ebp, 0xc(%rsp)
jne 0xce71
cmpl %ebx, 0x8(%rsp)
setge %al
jmp 0xce71
nop
// File: /workspace/github_c_makefile_star2_O1/bobrippling[P]tim/range.c
// Function: parse_range_1
bool parse_range_1(
		char *range, char **end,
		int *out)
{
	bool handled = true;

	switch(*range){
		case '0' ... '9':
			/* go into 0-based */
			*out = strtol(range, &range, 10) - 1;
			break;

		case '.':
			*out = windows_cur()->ui_pos->y;
			range++;
			break;
		case '$':
			*out = buffer_nlines(buffers_cur());
			range++;
			break;
		/*case '\'': */

		default:
			/* don't touch range */
			handled = false;
			*out = windows_cur()->ui_pos->y;
			break;
	}

	for(;;){
		switch(*range){
			case '+':
			case '-':
			{
				const int dir = (*range == '+' ? 1 : -1);

				range++;
				int amt = isdigit(*range)
					? strtol(range, &range, 10)
					: 1;

				*out += dir * amt;

				handled = true;
				/* read more +/- */
				break;
			}
			default:
				*end = range;
				return handled;
		}
	}
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movq %rdx, %r14
movq %rsi, %rbx
movq %rdi, %r15
movq %rdi, (%rsp)
movzbl (%rdi), %eax
leal -0x30(%rax), %ecx
cmpl $0xa, %ecx
jae 0xcf4f
movq %rsp, %rsi
movq %r15, %rdi
movl $0xa, %edx
callq 0x4340
decl %eax
movl %eax, (%r14)
movb $0x1, %al
movq %rsp, %r15
movq (%rsp), %r13
movzbl (%r13), %ebp
cmpl $0x2d, %ebp
je 0xcef8
cmpl $0x2b, %ebp
jne 0xcf3b
leaq 0x1(%r13), %r12
movq %r12, (%rsp)
callq 0x4540
movq (%rax), %rcx
movsbq 0x1(%r13), %rdx
movl $0x1, %eax
testb $0x8, 0x1(%rcx,%rdx,2)
je 0xcf29
movq %r12, %rdi
movq %r15, %rsi
movl $0xa, %edx
callq 0x4340
movl %eax, %ecx
negl %ecx
cmpb $0x2b, %bpl
cmovel %eax, %ecx
addl %ecx, (%r14)
movb $0x1, %al
jmp 0xcee5
movq %r13, (%rbx)
andb $0x1, %al
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
cmpl $0x24, %eax
je 0xcf67
cmpl $0x2e, %eax
jne 0xcf83
callq 0xde6c
movq 0x30(%rax), %rax
movl 0x4(%rax), %eax
jmp 0xcf74
callq 0xde6c
movq (%rax), %rdi
callq 0x977e
movl %eax, (%r14)
incq %r15
movq %r15, (%rsp)
jmp 0xcee0
callq 0xde6c
movq 0x30(%rax), %rax
movl 0x4(%rax), %eax
movl %eax, (%r14)
xorl %eax, %eax
jmp 0xcee2
// File: /workspace/github_c_makefile_star2_O1/bobrippling[P]tim/range.c
// Function: parse_range
enum range_parse parse_range(
		char *cmd, char **end,
		struct range *r)
{
	if(*cmd == '%'){
		r->start = 0;
		r->end = buffer_nlines(buffers_cur());
		*end = cmd + 1;
		return RANGE_PARSE_PASS;
	}

	if(!parse_range_1(cmd, end, &r->start))
		return RANGE_PARSE_NONE; /* no range */

	cmd = *end;
	if(*cmd == ','){
		cmd++;
		if(!parse_range_1(cmd, end, &r->end))
			return RANGE_PARSE_FAIL;
	}else{
		r->end = r->start;
	}

	return RANGE_PARSE_PASS;
}

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
movq %rdx, %rbx
movq %rsi, %r14
movq %rdi, %r15
cmpb $0x25, (%rdi)
jne 0xcfcf
movl $0x0, (%rbx)
callq 0xde6c
movq (%rax), %rdi
callq 0x977e
movl %eax, 0x4(%rbx)
incq %r15
movq %r15, (%r14)
movl $0x2, %eax
jmp 0xd00a
movq %r15, %rdi
movq %r14, %rsi
movq %rbx, %rdx
callq 0xcea4
movl %eax, %ecx
xorl %eax, %eax
testb %cl, %cl
je 0xd00a
movq (%r14), %rdi
cmpb $0x2c, (%rdi)
jne 0xd010
addq $0x4, %rbx
incq %rdi
movq %r14, %rsi
movq %rbx, %rdx
callq 0xcea4
movl %eax, %ecx
movl $0x1, %eax
testb %cl, %cl
jne 0xcfc8
popq %rbx
popq %r14
popq %r15
retq
movl (%rbx), %eax
movl %eax, 0x4(%rbx)
jmp 0xcfc8
// File: /workspace/github_c_makefile_star2_O1/bobrippling[P]tim/parse_cmd.c
// Function: parse_cmd
void parse_cmd(char *cmd, int *pargc, char ***pargv, bool shellglob)
{
	int argc = *pargc;
	char **argv = *pargv;

	char *anchor, *p;
	p = anchor = cmd;
	while(*p){
		if(*p == '\\'){
			p++;
			continue;
		}
		if(!isspace(*p)){
			p++;
			continue;
		}

		*p++ = '\0';

		add_argv(&argv, &argc, &anchor, p, shellglob);
	}

	if(anchor != p)
		add_argv(&argv, &argc, &anchor, p, shellglob);

	*pargv = argv;
	*pargc = argc;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x28, %rsp
movq %rdi, %r14
movq %rsi, 0x20(%rsp)
movl (%rsi), %eax
leaq 0x4(%rsp), %rsi
movl %eax, (%rsi)
movq %rdx, 0x18(%rsp)
movq (%rdx), %rax
leaq 0x10(%rsp), %r12
movq %rax, (%r12)
leaq 0x8(%rsp), %r13
movq %rdi, (%r13)
movzbl %cl, %ebp
movq %r14, %rbx
movzbl (%r14), %eax
cmpl $0x5c, %eax
je 0xd0a7
testl %eax, %eax
je 0xd0af
movsbq %al, %r15
callq 0x4540
movq (%rax), %rax
leaq 0x1(%rbx), %r14
testb $0x20, 0x1(%rax,%r15,2)
je 0xd064
movb $0x0, (%rbx)
movq %r12, %rdi
leaq 0x4(%rsp), %rsi
movq %r13, %rdx
movq %r14, %rcx
movl %ebp, %r8d
callq 0xd0f7
jmp 0xd064
incq %rbx
movq %rbx, %r14
jmp 0xd064
cmpq %rbx, 0x8(%rsp)
je 0xd0d0
leaq 0x10(%rsp), %rdi
leaq 0x4(%rsp), %rsi
leaq 0x8(%rsp), %rdx
movq %rbx, %rcx
movl %ebp, %r8d
callq 0xd0f7
movq 0x10(%rsp), %rax
movq 0x18(%rsp), %rcx
movq %rax, (%rcx)
movl 0x4(%rsp), %eax
movq 0x20(%rsp), %rcx
movl %eax, (%rcx)
addq $0x28, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O1/bobrippling[P]tim/parse_cmd.c
// Function: add_argv
static void add_argv(
		char ***pargv, int *pargc,
		char **panchor, char *current,
		bool shellglob)
{
#define argv (*pargv)
#define argc (*pargc)
#define anchor (*panchor)
	char *failbuf;

	glob_t globbed = { 0 };
	int argc_inc;
	char **argv_add;

	int flags = GLOB_MARK | GLOB_BRACE | GLOB_TILDE;

	if(shellglob && 0 == glob(anchor, flags, /*errfunc*/NULL, &globbed)){
		argc_inc = globbed.gl_pathc;
		argv_add = globbed.gl_pathv;
	}else{
		argc_inc = 1;
		argv_add = &failbuf;
		failbuf = anchor;
	}

	argv = urealloc(argv, (argc + argc_inc + 1) * sizeof *argv);
	for(int i = 0; i < argc_inc; i++)
		argv[argc + i] = ustrdup(argv_add[i]);

	argc += argc_inc;

	globfree(&globbed);

	anchor = current;
#undef argv
#undef argc
#undef anchor
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x68, %rsp
movq %rdx, %r14
movq %rsi, %r15
movq %rdi, %r12
xorps %xmm0, %xmm0
movaps %xmm0, 0x40(%rsp)
movaps %xmm0, 0x30(%rsp)
movaps %xmm0, 0x20(%rsp)
movaps %xmm0, 0x10(%rsp)
movq $0x0, 0x50(%rsp)
testl %r8d, %r8d
movq %rcx, 0x8(%rsp)
movq %rdx, (%rsp)
je 0xd158
movq (%r14), %rdi
leaq 0x10(%rsp), %rcx
movl $0x1402, %esi           # imm = 0x1402
xorl %edx, %edx
callq 0x4490
testl %eax, %eax
je 0xd1d9
movq (%r14), %rax
leaq 0x60(%rsp), %rbp
movq %rax, (%rbp)
movl $0x1, %r13d
movq (%r12), %rdi
movl (%r15), %eax
addl %r13d, %eax
incl %eax
movslq %eax, %rsi
shlq $0x3, %rsi
callq 0x5851
movq %rax, (%r12)
testl %r13d, %r13d
jle 0xd1b1
movl %r13d, %ebx
xorl %r14d, %r14d
movq (%rbp,%r14,8), %rdi
callq 0x5863
movq (%r12), %rcx
movslq (%r15), %rdx
addq %r14, %rdx
movq %rax, (%rcx,%rdx,8)
incq %r14
cmpq %r14, %rbx
jne 0xd191
addl %r13d, (%r15)
leaq 0x10(%rsp), %rdi
callq 0x4050
movq 0x8(%rsp), %rax
movq (%rsp), %rcx
movq %rax, (%rcx)
addq $0x68, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movl 0x10(%rsp), %r13d
movq 0x18(%rsp), %rbp
jmp 0xd16a
// File: /workspace/github_c_makefile_star2_O1/bobrippling[P]tim/word.c
// Function: word_state
enum word_state word_state(
		const list_t *l, int x, bool big_words)
{
	if(l && 0 <= x && (unsigned)x < l->len_line){
		const char ch = l->line[x];

		if(isspace(ch))
			return W_SPACE;
		else if(big_words)
			return W_KEYWORD;
		else if(isalnum(ch) || ch == '_')
			return W_KEYWORD;
		return W_NON_KWORD;
	}

	return W_NONE;
}

// Assembly:
pushq %r14
pushq %rbx
pushq %rax
movl %edx, %ebx
testq %rdi, %rdi
sete %cl
testl %esi, %esi
sets %dl
xorl %eax, %eax
orb %cl, %dl
jne 0xd534
movl %esi, %ecx
cmpq %rcx, 0x8(%rdi)
jbe 0xd534
movq (%rdi), %rax
movsbq (%rax,%rcx), %r14
callq 0x4540
movq (%rax), %rax
movzwl (%rax,%r14,2), %ecx
movl %ecx, %edx
shrl $0xd, %edx
andl $0x1, %edx
orb %dl, %bl
movl $0x2, %eax
je 0xd521
subl %edx, %eax
jmp 0xd534
xorl %edx, %edx
testb $0x8, %cl
sete %dl
cmpb $0x5f, %r14b
leal 0x2(%rdx,%rdx), %ecx
cmovnel %ecx, %eax
addq $0x8, %rsp
popq %rbx
popq %r14
retq
// File: /workspace/github_c_makefile_star2_O1/bobrippling[P]tim/word.c
// Function: word_seek
list_t *word_seek(
		list_t *l, int dir, point_t *to,
		enum word_state target, bool big_words)
{
	while((word_state(l, to->x, big_words) & target) == 0){
		const int y = to->y;

		l = list_advance_x(l, dir, &to->y, &to->x);

		if(!l)
			break;
		if(y != to->y)
			break; /* newlines are a fresh start */
	}
	return l;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movl %ecx, 0x4(%rsp)
movq %rdx, %r15
movl %esi, %ebp
movq %rdi, %r14
leaq 0x4(%rdx), %r12
movzbl %r8b, %r13d
movl (%r15), %esi
movq %r14, %rdi
movl %r13d, %edx
callq 0xd4d8
testl %eax, 0x4(%rsp)
jne 0xd591
movl 0x4(%r15), %ebx
movq %r14, %rdi
movl %ebp, %esi
movq %r12, %rdx
movq %r15, %rcx
callq 0xae3c
movq %rax, %r14
testq %rax, %rax
je 0xd591
cmpl (%r12), %ebx
je 0xd55b
movq %r14, %rax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O1/bobrippling[P]tim/word.c
// Function: word_seek_to_end
void word_seek_to_end(list_t *l, int dir, point_t *to, bool big_words)
{
	/* put us on the start/end of the word */
	const enum word_state st = word_state(l, to->x, big_words);

	if(st != W_NONE)
		while(word_state(l, to->x + dir, big_words) == st)
			to->x += dir;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x18, %rsp
movl %ecx, %ebx
movl %esi, %r14d
movq %rdi, %r15
movq %rdx, 0x8(%rsp)
movl (%rdx), %esi
movl %ecx, %edx
callq 0xd4d8
testl %eax, %eax
je 0xd61b
movl %eax, %ebp
movq 0x8(%rsp), %rax
movl (%rax), %eax
movq %rax, 0x10(%rsp)
leal (%rax,%r14), %r12d
movzbl %bl, %r13d
movq %r15, %rdi
movl %r12d, %esi
movl %r13d, %edx
callq 0xd4d8
cmpl %ebp, %eax
jne 0xd61b
movq 0x10(%rsp), %rax
leal (%rax,%r14,2), %ebx
movq 0x8(%rsp), %rax
movl %r12d, (%rax)
addl %r14d, %r12d
movq %r15, %rdi
movl %ebx, %esi
movl %r13d, %edx
callq 0xd4d8
addl %r14d, %ebx
cmpl %ebp, %eax
je 0xd5fc
addq $0x18, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
nop
// File: /workspace/github_c_makefile_star2_O1/bobrippling[P]tim/buffers.c
// Function: buffers_find
buffer_t *buffers_find(const char *fname)
{
	if(!windows_cur()) /* called on startup */
		return NULL;

	for(tab *tab = tabs_first(); tab; tab = tab->next){
		window *win;
		ITER_WINDOWS_FROM(win, tab->win){
			buffer_t *buf = win->buf;
			const char *thisfname = buffer_fname(buf);

			if(thisfname && !strcmp(thisfname, fname))
				return buf;
		}
	}

	return NULL;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movq %rdi, %rbx
callq 0xde6c
testq %rax, %rax
je 0xd6bc
callq 0xdf6c
testq %rax, %rax
je 0xd6bc
movq %rax, %r15
movq (%r15), %rdi
callq 0xd869
movq %rax, %r14
testq %rax, %rax
sete %al
je 0xd6af
movb %al, 0x7(%rsp)
movq %r14, %r12
movq (%r12), %r13
movq %r13, %rdi
callq 0x9348
testq %rax, %rax
je 0xd68b
movq %rax, %rdi
movq %rbx, %rsi
callq 0x42d0
testl %eax, %eax
je 0xd68f
movb $0x1, %al
jmp 0xd694
xorl %eax, %eax
movq %r13, %rbp
testb %al, %al
je 0xd6ab
movq 0x58(%r12), %r12
testq %r12, %r12
jne 0xd66b
movq 0x50(%r14), %r14
testq %r14, %r14
jmp 0xd65f
movb 0x7(%rsp), %al
testb $0x1, %al
je 0xd6cd
movq 0x8(%r15), %r15
testq %r15, %r15
jne 0xd651
xorl %eax, %eax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movq %rbp, %rax
jmp 0xd6be
// File: /workspace/github_c_makefile_star2_O1/bobrippling[P]tim/buffers.c
// Function: buffers_modified_excluding
window *buffers_modified_excluding(buffer_t *excluding, tab **const ptab)
{
	if(ptab)
		*ptab = NULL;

	for(tab *tab = tabs_first(); tab; tab = tab->next){
		window *win;
		ITER_WINDOWS_FROM(win, tab->win){
			buffer_t *buf = win->buf;
			if(buf != excluding && buf->modified){
				if(ptab)
					*ptab = tab;
				return win;
			}
		}
	}

	return NULL;
}

// Assembly:
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
pushq %rax
movq %rsi, %rbx
movq %rdi, %r14
testq %rsi, %rsi
je 0xd706
movq $0x0, (%rbx)
callq 0xdf6c
testq %rax, %rax
je 0xd778
movq %rax, %r15
movq (%r15), %rdi
callq 0xd869
testq %rax, %rax
sete %cl
je 0xd76a
movq %rax, %rdx
movq (%rdx), %rsi
cmpq %r14, %rsi
je 0xd753
movb 0x39(%rsi), %dil
movl %edi, %esi
xorb $0x1, %sil
testb %dil, %dil
cmovneq %rdx, %r12
testq %rbx, %rbx
je 0xd756
testb %dil, %dil
je 0xd756
movq %r15, (%rbx)
xorl %esi, %esi
movq %rdx, %r12
jmp 0xd756
movb $0x1, %sil
testb %sil, %sil
je 0xd76a
movq 0x58(%rdx), %rdx
testq %rdx, %rdx
jne 0xd726
movq 0x50(%rax), %rax
jmp 0xd71b
testb $0x1, %cl
je 0xd77b
movq 0x8(%r15), %r15
testq %r15, %r15
jne 0xd713
xorl %r12d, %r12d
movq %r12, %rax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
retq
nop
// File: /workspace/github_c_makefile_star2_O1/bobrippling[P]tim/window.c
// Function: window_calc_rects
void window_calc_rects(
		window *topleft,
		const unsigned screentop,
		const unsigned screenwidth,
		const unsigned screenheight)
{
	unsigned nwins_h = 0;
	window *win_h;
	for(win_h = topleft; win_h; win_h = win_h->neighbours.right, nwins_h++);

	const unsigned nvlines = nwins_h + 1;
	const unsigned winspace_v = screenwidth - nvlines;
	unsigned winwidth = winspace_v / nwins_h;

	unsigned i_h;
	for(i_h = 0, win_h = topleft; win_h; win_h = win_h->neighbours.right, i_h++){
		unsigned nwins_v = 0;
		window *win_v;
		for(win_v = win_h; win_v; win_v = win_v->neighbours.below)
			nwins_v++;

		/* final win gets any left over cols */
		if(!win_h->neighbours.right)
			winwidth += winspace_v % nwins_h;

		const unsigned nhlines = nwins_v - 1;
		const unsigned winspace_h = screenheight - nhlines;
		const unsigned winheight = winspace_h / nwins_v;

		unsigned i_v;
		for(i_v = 0, win_v = win_h; win_v; win_v = win_v->neighbours.below, i_v++){
			rect_t r = {
				.x = i_h * (winwidth + 1),
				.y = i_v * (winheight + 1) + screentop,
				.w = winwidth,
				.h = winheight,
			};

			/* final win gets any left over lines */
			if(!win_v->neighbours.below)
				r.h += winspace_h % nwins_v;

			win_v->screen_coord = r;
		}
	}
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
xorl %r8d, %r8d
testq %rdi, %rdi
je 0xd7ad
movq %rdi, %rax
movq 0x50(%rax), %rax
incl %r8d
testq %rax, %rax
jne 0xd7a1
testq %rdi, %rdi
je 0xd83d
movl %r8d, %eax
notl %eax
addl %edx, %eax
xorl %edx, %edx
divl %r8d
movl %eax, %r8d
movl %edx, %r9d
xorl %r10d, %r10d
incl %ecx
xorl %ebx, %ebx
movq %rdi, %rax
incl %ebx
movq 0x58(%rax), %rax
testq %rax, %rax
jne 0xd7d2
movq 0x50(%rdi), %r11
leal (%r9,%r8), %eax
testq %r11, %r11
cmovel %eax, %r8d
movl %ecx, %eax
subl %ebx, %eax
xorl %edx, %edx
divl %ebx
xorl %ebx, %ebx
leal 0x1(%r8), %ebp
imull %r10d, %ebp
leal 0x1(%rax), %r14d
addl %eax, %edx
movl %ebx, %r15d
imull %r14d, %r15d
addl %esi, %r15d
movq 0x58(%rdi), %r12
incl %ebx
movl %eax, %r13d
testq %r12, %r12
cmovel %edx, %r13d
movl %ebp, 0x10(%rdi)
movl %r15d, 0x14(%rdi)
movl %r8d, 0x18(%rdi)
movl %r13d, 0x1c(%rdi)
movq %r12, %rdi
jne 0xd804
incl %r10d
movq %r11, %rdi
testq %r11, %r11
jne 0xd7cd
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O1/bobrippling[P]tim/window.c
// Function: window_next
window *window_next(window *cur)
{
#define RET_IF(x) if(x) return x
	RET_IF(cur->neighbours.below);
	RET_IF(cur->neighbours.above);
	RET_IF(cur->neighbours.right);
	RET_IF(cur->neighbours.left);
#undef RET_IF
	return NULL;
}

// Assembly:
movq 0x58(%rdi), %rax
testq %rax, %rax
je 0xd852
retq
movq 0x60(%rdi), %rax
testq %rax, %rax
jne 0xd851
movq 0x50(%rdi), %rax
testq %rax, %rax
jne 0xd851
movq 0x48(%rdi), %rax
retq
// File: /workspace/github_c_makefile_star2_O1/bobrippling[P]tim/window.c
// Function: window_evict
void window_evict(window *const evictee)
{
	if(evictee->neighbours.above){
		/* we are just a child in the chain */
		assert(!evictee->neighbours.left);
		assert(!evictee->neighbours.right);

		window *above = evictee->neighbours.above;

		assert(above->neighbours.below == evictee);
		above->neighbours.below = evictee->neighbours.below;

		if(evictee->neighbours.below)
			evictee->neighbours.below->neighbours.above = above;

		evictee->neighbours.above = evictee->neighbours.below = NULL;
		return;
	}

	/* we are a top-most chain.
	 * remove ourselves from the left-right hierarchy
	 * if we have a child below, it takes our place.
	 */
	window *const child = evictee->neighbours.below;

	if(evictee->neighbours.left){
		window *left = evictee->neighbours.left;

		assert(left->neighbours.right == evictee);

		window *target = child ? child : evictee->neighbours.right;
		left->neighbours.right = target;
		if(target)
			target->neighbours.left = left;
	}

	if(evictee->neighbours.right){
		window *right = evictee->neighbours.right;

		window *target = child ? child : evictee->neighbours.left;
		right->neighbours.left = target;
		if(target)
			target->neighbours.right = right;
	}

	evictee->neighbours.left = evictee->neighbours.right = NULL;
	evictee->neighbours.above = evictee->neighbours.below = NULL;
	if(child){
		assert(child->neighbours.above == evictee);
		child->neighbours.above = NULL;
	}
}

// Assembly:
pushq %rax
leaq 0x48(%rdi), %rcx
movq 0x60(%rdi), %rax
testq %rax, %rax
je 0xd911
cmpq $0x0, (%rcx)
jne 0xd985
cmpq $0x0, 0x50(%rdi)
jne 0xd9a4
cmpq %rdi, 0x58(%rax)
jne 0xd9c3
leaq 0x58(%rdi), %rcx
movq 0x58(%rdi), %rdx
movq %rdx, 0x58(%rax)
movq 0x58(%rdi), %rdx
testq %rdx, %rdx
je 0xd909
movq %rax, 0x60(%rdx)
xorps %xmm0, %xmm0
movups %xmm0, (%rcx)
jmp 0xd983
movq 0x48(%rdi), %rdx
movq 0x58(%rdi), %rax
testq %rdx, %rdx
je 0xd941
cmpq %rdi, 0x50(%rdx)
jne 0xd9e2
movq %rax, %rsi
testq %rax, %rax
jne 0xd934
movq 0x50(%rdi), %rsi
movq %rsi, 0x50(%rdx)
testq %rsi, %rsi
je 0xd941
movq %rdx, 0x48(%rsi)
movq 0x50(%rdi), %rdx
testq %rdx, %rdx
je 0xd962
movq %rax, %rsi
testq %rax, %rax
jne 0xd955
movq (%rcx), %rsi
movq %rsi, 0x48(%rdx)
testq %rsi, %rsi
je 0xd962
movq %rdx, 0x50(%rsi)
xorps %xmm0, %xmm0
movups %xmm0, 0x10(%rcx)
movups %xmm0, (%rcx)
testq %rax, %rax
je 0xd983
cmpq %rdi, 0x60(%rax)
jne 0xda01
movq $0x0, 0x60(%rax)
popq %rax
retq
leaq 0x202d(%rip), %rdi      # 0xf9b9
leaq 0x2040(%rip), %rsi      # 0xf9d3
leaq 0x2042(%rip), %rcx      # 0xf9dc
movl $0x64, %edx
callq 0x4210
leaq 0x2052(%rip), %rdi      # 0xf9fd
leaq 0x2021(%rip), %rsi      # 0xf9d3
leaq 0x2023(%rip), %rcx      # 0xf9dc
movl $0x65, %edx
callq 0x4210
leaq 0x204e(%rip), %rdi      # 0xfa18
leaq 0x2002(%rip), %rsi      # 0xf9d3
leaq 0x2004(%rip), %rcx      # 0xf9dc
movl $0x69, %edx
callq 0x4210
leaq 0x2052(%rip), %rdi      # 0xfa3b
leaq 0x1fe3(%rip), %rsi      # 0xf9d3
leaq 0x1fe5(%rip), %rcx      # 0xf9dc
movl $0x7c, %edx
callq 0x4210
leaq 0x2055(%rip), %rdi      # 0xfa5d
leaq 0x1fc4(%rip), %rsi      # 0xf9d3
leaq 0x1fc6(%rip), %rcx      # 0xf9dc
movl $0x90, %edx
callq 0x4210
// File: /workspace/github_c_makefile_star2_O1/bobrippling[P]tim/window.c
// Function: window_new
window *window_new(buffer_t *b)
{
	window *win = umalloc(sizeof *win);

	win->buf = retain(b);

	win->ui_pos = &win->ui_npos;
	win->ui_mode = UI_NORMAL;
	win->ui_paren = (point_t){ -1, -1 };

	return win;
}

// Assembly:
pushq %r14
pushq %rbx
pushq %rax
movq %rdi, %rbx
movl $0x68, %edi
callq 0x5830
movq %rax, %r14
movq %rbx, %rdi
callq 0xce90
movq %rax, (%r14)
leaq 0x20(%r14), %rax
movq %rax, 0x30(%r14)
movl $0x1, 0x40(%r14)
movq $-0x1, 0x38(%r14)
movq %r14, %rax
addq $0x8, %rsp
popq %rbx
popq %r14
retq
// File: /workspace/github_c_makefile_star2_O1/bobrippling[P]tim/window.c
// Function: window_togglev
void window_togglev(window *win, bool corner_toggle)
{
	if(corner_toggle){
		point_t *alt = window_uipos_alt(win);

		int tmp = win->ui_pos->x;
		win->ui_pos->x = alt->x;
		alt->x = tmp;
	}else{
		win->ui_pos = (win->ui_pos == &win->ui_npos)
			? &win->ui_vpos
			: &win->ui_npos;
	}
}

// Assembly:
movq 0x30(%rdi), %rax
testl %esi, %esi
je 0xdbc4
leaq 0x28(%rdi), %rcx
xorl %edx, %edx
cmpq %rcx, %rax
setne %dl
movl (%rax), %ecx
movl 0x20(%rdi,%rdx,8), %esi
movl %esi, (%rax)
movl %ecx, 0x20(%rdi,%rdx,8)
retq
leaq 0x20(%rdi), %rcx
leaq 0x28(%rdi), %rdx
cmpq %rcx, %rax
cmovneq %rcx, %rdx
movq %rdx, 0x30(%rdi)
retq
// File: /workspace/github_c_makefile_star2_O1/bobrippling[P]tim/window.c
// Function: window_toscreen
point_t window_toscreen(const window *win, point_t const *pt)
{
	list_t *l = list_seek(win->buf->head, win->ui_pos->y, 0);
	int xoff = 0;

	if(l && l->len_line > 0)
		for(int x = MIN((unsigned)win->ui_pos->x, l->len_line - 1);
				x >= 0;
				x--)
			xoff += nc_charlen(l->line[x]) - 1;

	return (point_t){
		win->screen_coord.x + pt->x - win->ui_start.x + xoff,
		win->screen_coord.y + pt->y - win->ui_start.y
	};
}

// Assembly:
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
movq %rsi, %r14
movq %rdi, %rbx
movq (%rdi), %rax
movq 0x30(%rdi), %rcx
movq 0x8(%rax), %rdi
movl 0x4(%rcx), %esi
xorl %r15d, %r15d
xorl %edx, %edx
callq 0x9ede
testq %rax, %rax
je 0xdc8c
movq %rax, %r12
movq 0x8(%rax), %rax
testq %rax, %rax
je 0xdc8c
movq 0x30(%rbx), %rcx
movl (%rcx), %ecx
decq %rax
cmpq %rcx, %rax
cmoval %ecx, %eax
testl %eax, %eax
js 0xdc8c
movl %eax, %r13d
incq %r13
xorl %r15d, %r15d
movq (%r12), %rax
movsbl -0x1(%rax,%r13), %edi
callq 0x4b94
addl %eax, %r15d
decl %r15d
decq %r13
jg 0xdc72
addl 0x10(%rbx), %r15d
addl (%r14), %r15d
subl 0x8(%rbx), %r15d
movl 0x4(%r14), %eax
addl 0x14(%rbx), %eax
subl 0xc(%rbx), %eax
shlq $0x20, %rax
orq %rax, %r15
movq %r15, %rax
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
retq
// File: /workspace/github_c_makefile_star2_O1/bobrippling[P]tim/window.c
// Function: window_setmode
int window_setmode(window *win, enum buf_mode m)
{
	if(!m || (m & (m - 1))){
		return -1;
	}else{
		if(win->ui_mode & UI_INSERT_ANY)
			win->buf->prev_insert = *win->ui_pos;

		if(m & UI_VISUAL_ANY){
			if((win->ui_mode & UI_VISUAL_ANY) == 0){
				/* from non-visual to visual */
				*window_uipos_alt(win) = *win->ui_pos;
			}
		}else{
			/* from a visual, save state */
			win->buf->prev_visual.mode = win->ui_mode;

			win->buf->prev_visual.npos = *win->ui_pos;
			win->buf->prev_visual.vpos = *window_uipos_alt(win);
		}

		win->ui_mode = m;
		return 0;
	}
}

// Assembly:
leal -0x1(%rsi), %ecx
movl %esi, %edx
xorl %ecx, %edx
movl $0xffffffff, %eax       # imm = 0xFFFFFFFF
cmpl %ecx, %edx
jbe 0xdd2f
testb $0x6, 0x40(%rdi)
je 0xdcd9
movq (%rdi), %rax
movq 0x30(%rdi), %rcx
movq (%rcx), %rcx
movq %rcx, 0x24(%rax)
movl 0x40(%rdi), %eax
testb $0x38, %sil
je 0xdd00
testb $0x38, %al
jne 0xdd2a
movq 0x30(%rdi), %rax
leaq 0x28(%rdi), %rcx
xorl %edx, %edx
cmpq %rcx, %rax
setne %dl
movq (%rax), %rax
movq %rax, 0x20(%rdi,%rdx,8)
jmp 0xdd2a
movq (%rdi), %rcx
movl %eax, 0x20(%rcx)
movq 0x30(%rdi), %rax
movq (%rax), %rax
movq %rax, 0x10(%rcx)
leaq 0x28(%rdi), %rax
xorl %ecx, %ecx
cmpq %rax, 0x30(%rdi)
movq (%rdi), %rax
setne %cl
movq 0x20(%rdi,%rcx,8), %rcx
movq %rcx, 0x18(%rax)
movl %esi, 0x40(%rdi)
xorl %eax, %eax
retq
// File: /workspace/github_c_makefile_star2_O1/bobrippling[P]tim/window.c
// Function: window_inschar
void window_inschar(window *win, char ch)
{
	if(win->ui_mode != UI_INSERT_COL || isnewline(ch)){
		/* can't col-insert a newline, revert */
		if(win->ui_mode == UI_INSERT_COL)
			window_setmode(win, UI_INSERT);

		buffer_inscolchar(win->buf, ch, 1, win->ui_pos);
	}else{
		buffer_inscolchar(win->buf, ch, win->buf->col_insert_height, win->ui_pos);
	}
}

// Assembly:
pushq %r14
pushq %rbx
pushq %rax
movq %rdi, %r14
cmpl $0x4, 0x40(%rdi)
movsbl %sil, %ebx
jne 0xdd58
cmpl $0xd, %ebx
je 0xdd4b
cmpl $0xa, %ebx
jne 0xdd72
movq %r14, %rdi
movl $0x2, %esi
callq 0xdcb5
movq (%r14), %rdi
movq 0x30(%r14), %rcx
movl %ebx, %esi
movl $0x1, %edx
addq $0x8, %rsp
popq %rbx
popq %r14
jmp 0x9502
movq (%r14), %rdi
movq 0x30(%r14), %rcx
movl 0x48(%rdi), %edx
movl %ebx, %esi
jmp 0xdd66
// File: /workspace/github_c_makefile_star2_O1/bobrippling[P]tim/window.c
// Function: window_replace_fname
bool window_replace_fname(window *win, const char *fname, const char **const err)
{
	buffer_t *buf = NULL;
	buffer_new_fname(&buf, fname, err);

	if(!*err){
		window_replace_buffer(win, buf);
		buffer_release(buf);
	}

	return !*err;
}

// Assembly:
pushq %r14
pushq %rbx
pushq %rax
movq %rdx, %rbx
movq %rdi, %r14
movq %rsp, %rdi
movq $0x0, (%rdi)
callq 0x91f5
cmpq $0x0, (%rbx)
jne 0xde11
movq (%rsp), %rsi
movq %r14, %rdi
callq 0xdd80
movq (%rsp), %rdi
leaq -0x4db0(%rip), %rsi     # 0x905c
callq 0xce9b
cmpq $0x0, (%rbx)
sete %al
addq $0x8, %rsp
popq %rbx
popq %r14
retq
// File: /workspace/github_c_makefile_star2_O1/bobrippling[P]tim/window.c
// Function: window_reload_buffer
bool window_reload_buffer(window *win, const char **const err)
{
	const char *fname = buffer_fname(win->buf);
	if(!fname)
		return false;

	/* need to update the buffer's list, not the window,
	 * since there may be multiple windows with the old buffer */
	buffer_replace_fname(win->buf, fname, err);

	return !*err;
}

// Assembly:
pushq %r14
pushq %rbx
pushq %rax
movq %rsi, %rbx
movq %rdi, %r14
movq (%rdi), %rdi
callq 0x9348
testq %rax, %rax
je 0xde4e
movq (%r14), %rdi
movq %rax, %rsi
movq %rbx, %rdx
callq 0x90c2
cmpq $0x0, (%rbx)
sete %al
jmp 0xde50
xorl %eax, %eax
addq $0x8, %rsp
popq %rbx
popq %r14
retq
// File: /workspace/github_c_makefile_star2_O1/bobrippling[P]tim/tab.c
// Function: tab_new
tab *tab_new(window *win)
{
	tab *t = umalloc(sizeof *t);
	t->win = win;
	t->next = NULL;
	return t;
}

// Assembly:
pushq %rbx
movq %rdi, %rbx
movl $0x10, %edi
callq 0x5830
movq %rbx, (%rax)
movq $0x0, 0x8(%rax)
popq %rbx
retq
// File: /workspace/github_c_makefile_star2_O1/bobrippling[P]tim/tab.c
// Function: tab_free
void tab_free(tab *t)
{
	if(t->win){
		window_free(t->win);
		t->win = NULL;
	}

	if(t == tabs_first())
		tabs_set_first(t->next);

	free(t);
}

// Assembly:
pushq %rbx
movq %rdi, %rbx
movq (%rdi), %rdi
testq %rdi, %rdi
je 0xdecb
callq 0xdb87
movq $0x0, (%rbx)
callq 0xdf6c
cmpq %rbx, %rax
jne 0xdede
movq 0x8(%rbx), %rdi
callq 0xdf74
movq %rbx, %rdi
popq %rbx
jmp 0x4080
// File: /workspace/github_c_makefile_star2_O1/bobrippling[P]tim/tab.c
// Function: tab_evict
void tab_evict(tab *t)
{
	tab *i;

	for(i = tabs_first(); i; i = i->next){
		if(i->next == t){
			i->next = t->next;
			break;
		}
	}

	t->next = NULL;
}

// Assembly:
pushq %rbx
movq %rdi, %rbx
callq 0xdf6c
testq %rax, %rax
je 0xdf0d
movq %rax, %rcx
movq 0x8(%rax), %rax
cmpq %rbx, %rax
jne 0xdef4
movq 0x8(%rbx), %rax
movq %rax, 0x8(%rcx)
movq $0x0, 0x8(%rbx)
popq %rbx
retq
// File: /workspace/github_c_makefile_star2_O1/bobrippling[P]tim/tabs.c
// Function: tabs_init
void tabs_init(enum init_args init_args, unsigned off)
{
	char *next = args_next_fname(true);

	if(next){
		const char *err = NULL;
		buffer_t *buf;

		if(!strcmp(next, "-")){
			buf = buffer_new_file_nofind(stdin);
			buf->modified = true; /* editing a stream */
			/* no filename */

			if(ferror(stdin))
				err = strerror(errno);

			freopen("/dev/tty", "r", stdin);
			/* if we can't open it we'll exit soon anyway */

		}else{
			buffer_new_fname(&buf, next, &err);
		}

		if(err)
			ui_err("\"%s\": %s", next, err);

		tab *tab = tab_new(window_new(buf));
		buffer_release(buf);

		tabs_set_cur(tab);

		switch(init_args){
			case INIT_NONE:
				break;

			case INIT_VALL:
				load_argv(win_add_splitright);
				break;

			case INIT_HALL:
				load_argv(win_add_splittop);
				break;
		}

	}else{
		buffer_t *empty = buffer_new();

		window *win = window_new(empty);
		buffer_release(empty);

		tab *tab = tab_new(win);

		tabs_set_cur(tab);
	}

	tabs_set_first(tabs_cur());

	windows_cur()->ui_pos->y = off;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %rbx
subq $0x18, %rsp
movl %esi, %ebx
movl %edi, %ebp
movl $0x1, %edi
callq 0x47bc
testq %rax, %rax
je 0xe00b
movq %rax, %r14
movq $0x0, 0x10(%rsp)
leaq 0x1a98(%rip), %rsi      # 0xfa80
movq %rax, %rdi
callq 0x42d0
testl %eax, %eax
je 0xe041
leaq 0x8(%rsp), %rdi
leaq 0x10(%rsp), %rdx
movq %r14, %rsi
callq 0x91f5
jmp 0xe08c
callq 0x907b
movq %rax, %r14
movq %rax, %rdi
callq 0xdb45
movq %rax, %r15
leaq -0x4fc9(%rip), %rsi     # 0x905c
movq %r14, %rdi
callq 0xce9b
movq %r15, %rdi
callq 0xde98
movq %rax, 0x93dc(%rip)      # 0x17418
jmp 0xe0f3
movq 0x8f58(%rip), %r15      # 0x16fa0
movq (%r15), %rdi
callq 0x91a8
movq %rax, 0x8(%rsp)
movb $0x1, 0x39(%rax)
movq (%r15), %rdi
callq 0x40f0
testl %eax, %eax
je 0xe076
callq 0x40a0
movl (%rax), %edi
callq 0x44e0
movq %rax, 0x10(%rsp)
movq (%r15), %rdx
leaq 0x1a02(%rip), %rdi      # 0xfa82
leaq 0x1372(%rip), %rsi      # 0xf3f9
callq 0x4250
movq 0x10(%rsp), %rdx
testq %rdx, %rdx
je 0xe0a7
leaq 0x19ee(%rip), %rdi      # 0xfa8b
movq %r14, %rsi
xorl %eax, %eax
callq 0x4de2
movq 0x8(%rsp), %rdi
callq 0xdb45
movq %rax, %rdi
callq 0xde98
movq %rax, %r14
movq 0x8(%rsp), %rdi
leaq -0x506c(%rip), %rsi     # 0x905c
callq 0xce9b
movq %r14, 0x9344(%rip)      # 0x17418
cmpl $0x1, %ebp
je 0xe0e7
cmpl $0x2, %ebp
jne 0xe0f3
leaq 0xca(%rip), %rdi        # 0xe1af
jmp 0xe0ee
leaq 0xb4(%rip), %rdi        # 0xe1a2
callq 0xe118
movq 0x931e(%rip), %rax      # 0x17418
movq %rax, 0x931f(%rip)      # 0x17420
callq 0xde6c
movq 0x30(%rax), %rax
movl %ebx, 0x4(%rax)
addq $0x18, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O1/bobrippling[P]tim/tabs.c
// Function: load_argv
static void load_argv(void onload(window *cur, window *new))
{
	window *prev_win = windows_cur();
	char *next;

	while((next = args_next_fname(true))){
		buffer_t *buf;
		const char *err;

		buffer_new_fname(&buf, next, &err);

		window *w = window_new(buf);

		buffer_release(buf);

		onload(prev_win, w);

		prev_win = w;
	}
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x18, %rsp
movq %rdi, %rbx
callq 0xde6c
movq %rax, %r15
movl $0x1, %edi
callq 0x47bc
testq %rax, %rax
je 0xe193
leaq 0x8(%rsp), %r14
leaq 0x10(%rsp), %r12
leaq -0x50f5(%rip), %r13     # 0x905c
movq %r14, %rdi
movq %rax, %rsi
movq %r12, %rdx
callq 0x91f5
movq 0x8(%rsp), %rdi
callq 0xdb45
movq %rax, %rbp
movq 0x8(%rsp), %rdi
movq %r13, %rsi
callq 0xce9b
movq %r15, %rdi
movq %rbp, %rsi
callq *%rbx
movl $0x1, %edi
callq 0x47bc
movq %rbp, %r15
testq %rax, %rax
jne 0xe151
addq $0x18, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O1/bobrippling[P]tim/ctags.c
// Function: ctag_search
bool ctag_search(const char *ident, struct ctag_result *tag)
{
	FILE *f = fopen("tags", "r");
	if(!f)
		return false;

	bool found = false;

	char buf[256];
	while(fgets(buf, sizeof buf, f)){
		char *end = strchr(buf, '\t');
		if(!end || !end[1])
			continue;
		*end = '\0';
		if(!strcmp(buf, ident)){
			char *fname = end + 1;
			end = strchr(end + 1, '\t');
			if(!end || !end[1])
				continue;
			*end = '\0';

			char *nl = strchr(end + 1, '\n');
			if(nl)
				*nl = '\0';

			tag->fname = ustrdup(fname);
			tag->line = ustrdup(end + 1);
			found = true;
			break;
		}
	}

	fclose(f);
	return found;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x108, %rsp            # imm = 0x108
movq %rsi, %rbx
movq %rdi, %r14
leaq 0x1896(%rip), %rdi      # 0xfa94
leaq 0x11f4(%rip), %rsi      # 0xf3f9
callq 0x4440
testq %rax, %rax
je 0xe2cc
movq %rax, %r15
xorl %ebp, %ebp
movq %rsp, %r12
movq %r12, %rdi
movl $0x100, %esi            # imm = 0x100
movq %r15, %rdx
callq 0x42c0
testq %rax, %rax
je 0xe2c2
movq %r12, %rdi
movl $0x9, %esi
callq 0x41c0
testq %rax, %rax
je 0xe263
movq %rax, %r13
cmpb $0x0, 0x1(%rax)
je 0xe263
movb $0x0, (%r13)
movq %r12, %rdi
movq %r14, %rsi
callq 0x42d0
testl %eax, %eax
je 0xe26b
xorl %eax, %eax
testb %al, %al
je 0xe21b
jmp 0xe2c2
incq %r13
movq %r13, %rdi
movl $0x9, %esi
callq 0x41c0
testq %rax, %rax
je 0xe263
cmpb $0x0, 0x1(%rax)
je 0xe263
movq %rax, %rbp
incq %rbp
movb $0x0, (%rax)
movq %rbp, %rdi
movl $0xa, %esi
callq 0x41c0
testq %rax, %rax
je 0xe2a4
movb $0x0, (%rax)
movq %r13, %rdi
callq 0x5863
movq %rax, (%rbx)
movq %rbp, %rdi
callq 0x5863
movq %rax, 0x8(%rbx)
movb $0x1, %bpl
movb $0x1, %al
jmp 0xe265
movq %r15, %rdi
callq 0x4150
jmp 0xe2ce
xorl %ebp, %ebp
andb $0x1, %bpl
movl %ebp, %eax
addq $0x108, %rsp            # imm = 0x108
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O1/codeniko[P]CS214-Malloc-Free/Test11.c
// Function: main
void main()
{
    void* p;
    int i;
    for(i = 1; (p = malloc(i)) != NULL; i++){
        printf("%d bytes allocated\n", i);
        free(p);
    }
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
leaq 0xea6(%rip), %rsi       # 0x2004
movl $0x1, %ebx
movl $0x1, %edi
movl $0x8, %edx
callq 0x11c8
testq %rax, %rax
je 0x11bd
movq %rax, %r12
leaq 0xe8c(%rip), %r14       # 0x200d
leaq 0xe7c(%rip), %r15       # 0x2004
movq %r14, %rdi
movl %ebx, %esi
xorl %eax, %eax
callq 0x1030
movq %r12, %rdi
movq %r15, %rsi
movl $0xa, %edx
callq 0x1328
incl %ebx
movl %ebx, %edi
movq %r15, %rsi
movl $0x8, %edx
callq 0x11c8
movq %rax, %r12
testq %rax, %rax
jne 0x1188
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
nop
// File: /workspace/github_c_makefile_star2_O1/darwin-on-arm[P]darwin-sdk/xcode_tools/xcrun/ini.c
// Function: rstrip
static char* rstrip(char* s)
{
    char* p = s + strlen(s);
    while (p > s && isspace((unsigned char)(*--p)))
        *p = '\0';
    return s;
}

// Assembly:
pushq %r14
pushq %rbx
pushq %rax
movq %rdi, %rbx
callq 0x20a0
testq %rax, %rax
jle 0x2993
movq %rax, %r14
addq %rbx, %r14
callq 0x2220
movq (%rax), %rcx
movzbl -0x1(%r14), %edx
testb $0x20, 0x1(%rcx,%rdx,2)
je 0x2993
decq %r14
movb $0x0, (%r14)
cmpq %rbx, %r14
ja 0x2978
movq %rbx, %rax
addq $0x8, %rsp
popq %rbx
popq %r14
retq
// File: /workspace/github_c_makefile_star2_O1/darwin-on-arm[P]darwin-sdk/xcode_tools/xcrun/ini.c
// Function: find_char_or_comment
static char* find_char_or_comment(const char* s, char c)
{
    int was_whitespace = 0;
    while (*s && *s != c && !(was_whitespace && *s == ';')) {
        was_whitespace = isspace((unsigned char)(*s));
        s++;
    }
    return (char*)s;
}

// Assembly:
pushq %rbp
pushq %r14
pushq %rbx
movl %esi, %ebp
movq %rdi, %rbx
movb (%rdi), %r14b
testb %r14b, %r14b
sete %al
cmpb %bpl, %r14b
sete %cl
orb %al, %cl
je 0x29c2
movq %rbx, %rax
popq %rbx
popq %r14
popq %rbp
retq
xorl %eax, %eax
testl %eax, %eax
setne %al
cmpb $0x3b, %r14b
sete %cl
testb %cl, %al
jne 0x29ba
callq 0x2220
movb 0x1(%rbx), %cl
incq %rbx
testb %cl, %cl
je 0x29ba
movq (%rax), %rax
movzbl %r14b, %edx
movzwl (%rax,%rdx,2), %eax
andl $0x2000, %eax           # imm = 0x2000
movl %ecx, %r14d
cmpb %bpl, %cl
jne 0x29c4
jmp 0x29ba
// File: /workspace/github_c_makefile_star2_O1/darwin-on-arm[P]darwin-sdk/xcode_tools/xcrun/ini.c
// Function: ini_parse
int ini_parse(const char* filename,
              int (*handler)(void*, const char*, const char*, const char*),
              void* user)
{
    FILE* file;
    int error;

    file = fopen(filename, "r");
    if (!file)
        return -1;
    error = ini_parse_file(file, handler, user);
    fclose(file);
    return error;
}

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
movq %rdx, %rbx
movq %rsi, %r14
leaq 0x25f5(%rip), %rsi      # 0x5004
callq 0x2190
testq %rax, %rax
je 0x2a38
movq %rax, %r15
movq %rax, %rdi
movq %r14, %rsi
movq %rbx, %rdx
callq 0x26fc
movl %eax, %ebx
movq %r15, %rdi
callq 0x2090
movl %ebx, %eax
jmp 0x2a3d
movl $0xffffffff, %eax       # imm = 0xFFFFFFFF
popq %rbx
popq %r14
popq %r15
retq
nop
// File: /workspace/github_c_makefile_star2_O1/darwin-on-arm[P]darwin-sdk/xcode_tools/xcrun/xcrun.c
// Function: validate_directory_path
static int validate_directory_path(const char *dir)
{
	struct stat fstat;

	if (stat(dir, &fstat) != 0) {
		fprintf(stderr, "xcrun: error: unable to validate path \'%s\' (%s)\n", dir, strerror(errno));
		return -1;
	}

	if (S_ISDIR(fstat.st_mode) == 0) {
		fprintf(stderr, "xcrun: error: \'%s\' is not a valid path\n", dir);
		return -1;
	}

	return 0;
}

// Assembly:
pushq %rbx
subq $0x90, %rsp
movq %rdi, %rbx
movq %rsp, %rsi
callq 0x2150
testl %eax, %eax
jne 0x3a6d
movl $0xf000, %ecx           # imm = 0xF000
andl 0x18(%rsp), %ecx
xorl %eax, %eax
cmpl $0x4000, %ecx           # imm = 0x4000
jne 0x3a77
addq $0x90, %rsp
popq %rbx
retq
movq %rbx, %rdi
callq 0x24b6
jmp 0x3a92
movq 0x4572(%rip), %rax      # 0x7ff0
movq (%rax), %rdi
leaq 0x1eb3(%rip), %rsi      # 0x593b
movq %rbx, %rdx
xorl %eax, %eax
callq 0x2130
movl $0xffffffff, %eax       # imm = 0xFFFFFFFF
jmp 0x3a64
// File: /workspace/github_c_makefile_star2_O1/darwin-on-arm[P]darwin-sdk/xcode_tools/xcrun/xcrun.c
// Function: stripext
static void stripext(char *dst, const char *src)
{
	int len;
	char *s;

	if ((s = strchr(src, '.')) != NULL)
		len = (s - src);
	else
		len = strlen(src);

	strncpy(dst, src, len);
}

// Assembly:
pushq %r14
pushq %rbx
pushq %rax
movq %rsi, %rbx
movq %rdi, %r14
movq %rsi, %rdi
movl $0x2e, %esi
callq 0x20b0
testq %rax, %rax
je 0x3aba
subq %rbx, %rax
jmp 0x3ac2
movq %rbx, %rdi
callq 0x20a0
movslq %eax, %rdx
movq %r14, %rdi
movq %rbx, %rsi
addq $0x8, %rsp
popq %rbx
popq %r14
jmp 0x2060
// File: /workspace/github_c_makefile_star2_O1/darwin-on-arm[P]darwin-sdk/xcode_tools/xcrun/xcrun.c
// Function: get_sdk_info
static sdk_config get_sdk_info(const char *path)
{
	sdk_config config;
	char info_path[PATH_MAX] = { 0 };

	sprintf(info_path, "%s/info.ini", path);

	if (ini_parse(info_path, sdk_cfg_handler, &config) != (-1))
		return config;

	fprintf(stderr, "xcrun: error: failed to retrieve sdk info from '\%s\'. (%s)\n", info_path, strerror(errno));

	exit(1);
}

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
subq $0x1000, %rsp           # imm = 0x1000
movq %rsi, %r14
movq %rdi, %rbx
movq %rsp, %r15
movl $0x1000, %edx           # imm = 0x1000
movq %r15, %rdi
xorl %esi, %esi
callq 0x20d0
leaq 0x1e86(%rip), %rsi      # 0x5a09
movq %r15, %rdi
movq %r14, %rdx
xorl %eax, %eax
callq 0x21d0
leaq 0x2f0(%rip), %rsi       # 0x3e87
movq %r15, %rdi
movq %rbx, %rdx
callq 0x29fd
cmpl $-0x1, %eax
je 0x3bb7
movq %rbx, %rax
addq $0x1000, %rsp           # imm = 0x1000
popq %rbx
popq %r14
popq %r15
retq
movq %rsp, %rdi
callq 0x255a
// File: /workspace/github_c_makefile_star2_O1/darwin-on-arm[P]darwin-sdk/xcode_tools/xcrun/xcrun.c
// Function: get_toolchain_path
static char *get_toolchain_path(const char *name)
{
	char *devpath, *path;

	devpath = developer_dir;
	path = (char *)calloc(PATH_MAX, sizeof(char));

	if (devpath == NULL) {
		fprintf(stderr, "xcrun: error: failed to retrieve developer path, do you have it set?\n");
		goto failure;
	}

	sprintf(path, "%s/Toolchains/%s.toolchain", devpath, name);
	if (validate_directory_path(path) != (-1))
		return path;

	fprintf(stderr, "xcrun: error: \'%s\' is not a valid toolchain path.\n", path);

failure:
	free(path);
	exit(1);
}

// Assembly:
pushq %r14
pushq %rbx
pushq %rax
movq %rdi, %r14
movl $0x1000, %edi           # imm = 0x1000
movl $0x1, %esi
callq 0x2110
movq %rax, %rbx
leaq 0x1eb2(%rip), %rsi      # 0x5a91
leaq 0x476a(%rip), %rdx      # 0x8350
movq %rax, %rdi
movq %r14, %rcx
xorl %eax, %eax
callq 0x21d0
movq %rbx, %rdi
callq 0x3a3a
cmpl $-0x1, %eax
je 0x3c0b
movq %rbx, %rax
addq $0x8, %rsp
popq %rbx
popq %r14
retq
movq %rbx, %rdi
callq 0x2596
// File: /workspace/github_c_makefile_star2_O1/darwin-on-arm[P]darwin-sdk/xcode_tools/xcrun/xcrun.c
// Function: get_toolchain_info
static toolchain_config get_toolchain_info(const char *path)
{
	toolchain_config config;
	char info_path[PATH_MAX] = { 0 };

	sprintf(info_path, "%s/info.ini", path);

	if (ini_parse(info_path, toolchain_cfg_handler, &config) != (-1))
		return config;

	fprintf(stderr, "xcrun: error: failed to retrieve toolchain info from '\%s\'. (%s)\n", info_path, strerror(errno));

	exit(1);
}

// Assembly:
pushq %r14
pushq %rbx
subq $0x1018, %rsp           # imm = 0x1018
movq %rdi, %rbx
leaq 0x10(%rsp), %r14
movl $0x1000, %edx           # imm = 0x1000
movq %r14, %rdi
xorl %esi, %esi
callq 0x20d0
leaq 0x1dce(%rip), %rsi      # 0x5a09
movq %r14, %rdi
movq %rbx, %rdx
xorl %eax, %eax
callq 0x21d0
leaq 0x374(%rip), %rsi       # 0x3fc3
movq %rsp, %rdx
movq %r14, %rdi
callq 0x29fd
cmpl $-0x1, %eax
je 0x3c73
movq (%rsp), %rax
movq 0x8(%rsp), %rdx
addq $0x1018, %rsp           # imm = 0x1018
popq %rbx
popq %r14
retq
leaq 0x10(%rsp), %rdi
callq 0x25c5
// File: /workspace/github_c_makefile_star2_O1/darwin-on-arm[P]darwin-sdk/xcode_tools/xcrun/xcrun.c
// Function: get_target_triple
static char *get_target_triple(const char *current_sdk)
{
	char *triple, *default_arch, *deployment_target;

	if ((triple = getenv("TARGET_TRIPLE")) != NULL)
		return triple;

	triple = (char *)calloc(NAME_MAX, sizeof(char));

	if ((default_arch = strdup(get_sdk_info(get_sdk_path(current_sdk)).default_arch)) == NULL)
		return NULL;

	if ((deployment_target = strdup(get_sdk_info(get_sdk_path(current_sdk)).deployment_target)) == NULL)
		return NULL;

	parse_target_triple(triple, deployment_target, default_arch);

	return triple;
}

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
subq $0x50, %rsp
leaq 0x1e93(%rip), %rdi      # 0x5b20
callq 0x2030
movq %rax, %rbx
testq %rax, %rax
jne 0x3def
movl $0xff, %edi
movl $0x1, %esi
callq 0x2110
movq %rax, %rbx
callq 0x3b0c
leaq 0x28(%rsp), %r14
movq %r14, %rdi
movq %rax, %rsi
callq 0x3b58
movq 0x18(%r14), %rdi
callq 0x2200
testq %rax, %rax
je 0x3d24
movq %rax, %r14
callq 0x3b0c
movq %rsp, %r15
movq %r15, %rdi
movq %rax, %rsi
callq 0x3b58
movq 0x20(%r15), %rdi
callq 0x2200
testq %rax, %rax
je 0x3d24
movq %rax, %r15
leaq 0x1e2d(%rip), %rsi      # 0x5b2e
movq %r14, %rdi
callq 0x2120
testl %eax, %eax
je 0x3d2b
leaq 0x1e21(%rip), %rsi      # 0x5b35
movq %r14, %rdi
callq 0x2120
testl %eax, %eax
je 0x3d2b
xorl %eax, %eax
jmp 0x3d2d
xorl %ebx, %ebx
jmp 0x3def
movb $0x1, %al
xorl %ecx, %ecx
movl $0x1, %esi
xorl %edx, %edx
movsbl (%r15), %edi
leal -0x30(%rdi), %r8d
cmpb $0x9, %r8b
ja 0x3d5e
cmpl $0x2, %esi
je 0x3d62
cmpl $0x1, %esi
jne 0x3d70
leal (%rcx,%rcx,4), %ecx
leal (%rdi,%rcx,2), %ecx
addl $-0x30, %ecx
movl $0x1, %esi
jmp 0x3d70
incl %esi
jmp 0x3d70
leal (%rdx,%rdx,4), %edx
leal (%rdi,%rdx,2), %edx
addl $-0x30, %edx
movl $0x2, %esi
incq %r15
testb %dil, %dil
jne 0x3d36
addl $-0x2, %ecx
cmpl $0x9, %ecx
ja 0x3d97
leaq 0x12d5(%rip), %rsi      # 0x505c
movslq (%rsi,%rcx,4), %rcx
addq %rsi, %rcx
jmpq *%rcx
movl $0xe, %ecx
jmp 0x3ddb
movl $0x9, %ecx
jmp 0x3ddb
movl $0x11, %ecx
jmp 0x3ddb
movl $0xd, %ecx
jmp 0x3ddb
movl $0xf, %ecx
jmp 0x3ddb
xorl %ecx, %ecx
cmpl $0x3, %edx
setl %cl
xorl $0xb, %ecx
jmp 0x3ddb
movl $0xb, %ecx
jmp 0x3ddb
movl $0xa, %ecx
jmp 0x3ddb
addl $0x4, %edx
testb %al, %al
movl $0x10, %ecx
cmovnel %edx, %ecx
leaq 0x1d58(%rip), %rsi      # 0x5b3a
movq %rbx, %rdi
movq %r14, %rdx
xorl %eax, %eax
callq 0x21d0
movq %rbx, %rax
addq $0x50, %rsp
popq %rbx
popq %r14
popq %r15
retq
// File: /workspace/github_c_makefile_star2_O1/darwin-on-arm[P]darwin-sdk/xcode_tools/xcrun/xcrun.c
// Function: default_cfg_handler
static int default_cfg_handler(void *user, const char *section, const char *name, const char *value)
{
	default_config *config = (default_config *)user;

	if (MATCH_INI_STON("SDK", "name"))
		config->sdk = strdup(value);
	else if (MATCH_INI_STON("TOOLCHAIN", "name"))
		config->toolchain = strdup(value);
	else
		return 0;

	return 1;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
movq %rcx, %r14
movq %rdx, %r15
movq %rsi, %r12
movq %rdi, %rbx
leaq 0x1ba3(%rip), %rsi      # 0x59ba
movq %r12, %rdi
callq 0x2120
testl %eax, %eax
jne 0x3e36
leaq 0x1b94(%rip), %rsi      # 0x59be
movq %r15, %rdi
callq 0x2120
testl %eax, %eax
je 0x3e6c
leaq 0x1b86(%rip), %rsi      # 0x59c3
movq %r12, %rdi
callq 0x2120
xorl %ebp, %ebp
testl %eax, %eax
jne 0x3e7c
leaq 0x1b6c(%rip), %rsi      # 0x59be
movq %r15, %rdi
callq 0x2120
testl %eax, %eax
jne 0x3e7c
movq %r14, %rdi
callq 0x2200
movq %rax, 0x8(%rbx)
jmp 0x3e77
movq %r14, %rdi
callq 0x2200
movq %rax, (%rbx)
movl $0x1, %ebp
movl %ebp, %eax
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O1/darwin-on-arm[P]darwin-sdk/xcode_tools/xcrun/xcrun.c
// Function: sdk_cfg_handler
static int sdk_cfg_handler(void *user, const char *section, const char *name, const char *value)
{
	sdk_config *config = (sdk_config *)user;

	if (MATCH_INI_STON("SDK", "name"))
		config->name = strdup(value);
	else if (MATCH_INI_STON("SDK", "version"))
		config->version = strdup(value);
	else if (MATCH_INI_STON("SDK", "toolchain"))
		config->toolchain = strdup(value);
	else if (MATCH_INI_STON("SDK", "default_arch"))
		config->default_arch = strdup(value);
	else if (MATCH_INI_STON("SDK", "iphoneos_deployment_target")) {
		ios_deployment_target_set = 1;
		macosx_deployment_target_set = 0;
		config->deployment_target = strdup(value);
	} else if (MATCH_INI_STON("SDK", "macosx_deployment_target")) {
		ios_deployment_target_set = 0;
		macosx_deployment_target_set = 1;
		config->deployment_target = strdup(value);
	} else
		return 0;

	return 1;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
movq %rcx, %r14
movq %rdx, %r15
movq %rsi, %rax
movq %rdi, %rbx
leaq 0x1b18(%rip), %rsi      # 0x59ba
movq %rax, %rdi
callq 0x2120
xorl %ebp, %ebp
testl %eax, %eax
jne 0x3f72
movl %eax, %r12d
leaq 0x1b00(%rip), %rsi      # 0x59be
movq %r15, %rdi
callq 0x2120
testl %eax, %eax
je 0x3f62
testl %r12d, %r12d
jne 0x3f72
leaq 0x13db(%rip), %rsi      # 0x52b9
movq %r15, %rdi
callq 0x2120
testl %eax, %eax
je 0x3f7d
testl %r12d, %r12d
jne 0x3f72
leaq 0x1ba8(%rip), %rsi      # 0x5aa2
movq %r15, %rdi
callq 0x2120
testl %eax, %eax
je 0x3f8b
testl %r12d, %r12d
jne 0x3f72
leaq 0x1b3a(%rip), %rsi      # 0x5a50
movq %r15, %rdi
callq 0x2120
testl %eax, %eax
je 0x3f99
testl %r12d, %r12d
jne 0x3f72
leaq 0x1b2f(%rip), %rsi      # 0x5a5d
movq %r15, %rdi
callq 0x2120
testl %eax, %eax
je 0x3fa7
testl %r12d, %r12d
jne 0x3f72
leaq 0x1b32(%rip), %rsi      # 0x5a78
movq %r15, %rdi
callq 0x2120
testl %eax, %eax
jne 0x3f72
movb $0x0, 0x746b(%rip)      # 0xb3c4
movb $0x1, 0x7468(%rip)      # 0xb3c8
jmp 0x3fb5
movq %r14, %rdi
callq 0x2200
movq %rax, (%rbx)
movl $0x1, %ebp
movl %ebp, %eax
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
movq %r14, %rdi
callq 0x2200
movq %rax, 0x8(%rbx)
jmp 0x3f6d
movq %r14, %rdi
callq 0x2200
movq %rax, 0x10(%rbx)
jmp 0x3f6d
movq %r14, %rdi
callq 0x2200
movq %rax, 0x18(%rbx)
jmp 0x3f6d
movb $0x1, 0x7416(%rip)      # 0xb3c4
movb $0x0, 0x7413(%rip)      # 0xb3c8
movq %r14, %rdi
callq 0x2200
movq %rax, 0x20(%rbx)
jmp 0x3f6d