LLM4Binary/decompile-bench-makefile huggingface dataset:
// File: /workspace/github_c_makefile_star2_O1/bobrippling[P]tim/keys.c
// Function: k_winsel
void k_winsel(const keyarg_u *a, unsigned repeat, const int from_ch)
{
	enum neighbour dir = pos2dir(&a->pos);

	window *const curwin = windows_cur();
	window *found = NULL;

	switch(dir){
		case neighbour_up:
			found = curwin->neighbours.above;
			break;

		case neighbour_down:
			found = curwin->neighbours.below;
			break;

		case neighbour_left:
		case neighbour_right:
			for(found = curwin; found->neighbours.above; found = found->neighbours.above);
			found = (dir == neighbour_left ? found->neighbours.left : found->neighbours.right);
			if(!found)
				break;

			const int to_match = curwin->screen_coord.y + curwin->ui_pos->y - curwin->ui_start.y;

			while(found->neighbours.below)
			{
				if(found->screen_coord.y <= to_match
				&& to_match <= found->screen_coord.y + found->screen_coord.h)
				{
					break;
				}
				found = found->neighbours.below;
			}
	}

	if(found && found != curwin){
		windows_set_cur(found);
		ui_redraw();
		ui_cur_changed();
	}else{
		ui_err("no buffers in that direction");
	}
}

// Assembly:
pushq %rbx
movl $0x3, %ebx
cmpl $0x0, (%rdi)
jg 0x6722
js 0x671d
xorl %ebx, %ebx
cmpl $0x0, 0x4(%rdi)
setg %bl
jmp 0x6722
movl $0x2, %ebx
callq 0xde6c
leal -0x2(%rbx), %ecx
cmpl $0x2, %ecx
jae 0x6785
movq %rax, %rdx
movq %rdx, %rcx
movq 0x60(%rdx), %rdx
testq %rdx, %rdx
jne 0x6732
xorl %edx, %edx
cmpl $0x2, %ebx
setne %dl
movq 0x48(%rcx,%rdx,8), %rdi
testq %rdi, %rdi
je 0x6799
movq 0x58(%rdi), %rdx
testq %rdx, %rdx
je 0x679b
movq 0x30(%rax), %rcx
movl 0x4(%rcx), %ecx
addl 0x14(%rax), %ecx
subl 0xc(%rax), %ecx
movq %rdx, %rsi
movl 0x14(%rdi), %edx
cmpl %ecx, %edx
jg 0x6777
addl 0x1c(%rdi), %edx
cmpl %edx, %ecx
jle 0x679b
movq 0x58(%rsi), %rdx
movq %rsi, %rdi
testq %rdx, %rdx
jne 0x6766
jmp 0x679b
movl $0x60, %ecx
testl %ebx, %ebx
je 0x6793
movl $0x58, %ecx
movq (%rax,%rcx), %rdi
jmp 0x679b
xorl %edi, %edi
testq %rdi, %rdi
sete %cl
cmpq %rax, %rdi
sete %al
orb %cl, %al
je 0x67ba
leaq 0x89d7(%rip), %rdi      # 0xf189
xorl %eax, %eax
popq %rbx
jmp 0x4de2
callq 0xde80
callq 0x4e77
popq %rbx
jmp 0x51d8
// File: /workspace/github_c_makefile_star2_O1/bobrippling[P]tim/keys.c
// Function: k_winmove
void k_winmove(const keyarg_u *a, unsigned repeat, const int from_ch)
{
	enum neighbour dir = pos2dir(&a->pos);
	int count = 0;

	window *w;
	ITER_WINDOWS(w){
		count++;
		if(count == 2){
			/* now have >1 */
			break;
		}
	}
	if(count < 2)
		return;

	w = windows_cur();
	window *target = window_next(w);

	window_evict(w);

	switch(dir){
		case neighbour_up:
			for(; target->neighbours.above;
					target = target->neighbours.above);
			break;

		case neighbour_down:
			for(; target->neighbours.below;
					target = target->neighbours.below);
			break;

		case neighbour_right:
			for(; target->neighbours.above;
					target = target->neighbours.above);
			for(; target->neighbours.right;
					target = target->neighbours.right);
			break;

		case neighbour_left:
			for(; target->neighbours.above;
					target = target->neighbours.above);
			for(; target->neighbours.left;
					target = target->neighbours.left);
			break;
	}

	window_add_neighbour(target, dir, w);

	ui_redraw();
	ui_cur_changed();
}

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
movl $0x3, %ebx
cmpl $0x0, (%rdi)
jg 0x67eb
js 0x67e6
xorl %ebx, %ebx
cmpl $0x0, 0x4(%rdi)
setg %bl
jmp 0x67eb
movl $0x2, %ebx
callq 0xde6c
movq %rax, %rdi
callq 0xd869
testq %rax, %rax
je 0x6827
xorl %ecx, %ecx
movq %rax, %rdx
cmpl $0x1, %ecx
je 0x6814
movq 0x58(%rdx), %rdx
incl %ecx
testq %rdx, %rdx
jne 0x6802
jmp 0x6819
movl $0x2, %ecx
movq 0x50(%rax), %rax
testq %rax, %rax
jne 0x67ff
cmpl $0x2, %ecx
jge 0x682d
popq %rbx
popq %r14
popq %r15
retq
callq 0xde6c
movq %rax, %r14
movq %rax, %rdi
callq 0xd848
movq %rax, %r15
movq %r14, %rdi
callq 0xd8c3
movl %ebx, %eax
leaq 0x8867(%rip), %rcx      # 0xf0b8
movslq (%rcx,%rax,4), %rax
addq %rcx, %rax
jmpq *%rax
movq %r15, %rdi
movq 0x60(%r15), %r15
testq %r15, %r15
jne 0x685a
jmp 0x68a8
movq %r15, %rax
movq 0x60(%r15), %r15
testq %r15, %r15
jne 0x6868
movq %rax, %rdi
movq 0x48(%rax), %rax
testq %rax, %rax
jne 0x6874
jmp 0x68a8
movq %r15, %rax
movq 0x60(%r15), %r15
testq %r15, %r15
jne 0x6882
movq %rax, %rdi
movq 0x50(%rax), %rax
testq %rax, %rax
jne 0x688e
jmp 0x68a8
movq %r15, %rdi
movq 0x58(%r15), %r15
testq %r15, %r15
jne 0x689c
movl %ebx, %esi
movq %r14, %rdx
callq 0xda27
callq 0x4e77
popq %rbx
popq %r14
popq %r15
jmp 0x51d8
// File: /workspace/github_c_makefile_star2_O1/bobrippling[P]tim/keys.c
// Function: k_show
void k_show(const keyarg_u *a, unsigned repeat, const int from_ch)
{
	window *win = windows_cur();
	buffer_t *buf = win->buf;
	(void)a;
	ui_status("%s%s%s, %sx=%d y=%d eol=%c",
			buf->fname ? "\"" : "",
			buf->fname ? buf->fname : "<no name>",
			buf->fname ? "\"" : "",
			buf->modified ? "[+] " : "",
			win->ui_pos->x, win->ui_pos->y,
			"ny"[buf->eol]);
}

// Assembly:
pushq %rax
callq 0xde6c
movq (%rax), %rsi
movq 0x30(%rax), %rax
movq 0x30(%rsi), %rdi
testq %rdi, %rdi
leaq 0x8e4e(%rip), %r9       # 0xf758
leaq 0x8c9b(%rip), %rcx      # 0xf5ac
cmoveq %r9, %rcx
leaq 0x88a5(%rip), %rdx      # 0xf1c1
cmovneq %rdi, %rdx
cmpb $0x0, 0x39(%rsi)
leaq 0x88a0(%rip), %r8       # 0xf1cb
cmoveq %r9, %r8
movl (%rax), %r9d
movl 0x4(%rax), %r10d
movzbl 0x38(%rsi), %eax
leaq 0x888f(%rip), %rsi      # 0xf1d0
movsbl (%rax,%rsi), %r11d
leaq 0x8859(%rip), %rdi      # 0xf1a6
movq %rcx, %rsi
xorl %eax, %eax
pushq %r11
pushq %r10
callq 0x527a
addq $0x10, %rsp
popq %rax
retq
// File: /workspace/github_c_makefile_star2_O1/bobrippling[P]tim/keys.c
// Function: k_ins_colcopy
void k_ins_colcopy(const keyarg_u *a, unsigned repeat, const int from_ch)
{
	window *win = windows_cur();

	list_t *line = window_current_line(win, false);
	if(!line)
		return;
	line = a->i > 0 ? line->next : line->prev;
	if(!line)
		return;

	if((unsigned)win->ui_pos->x >= line->len_line)
		return;

	window_inschar(win, line->line[win->ui_pos->x]);

	ui_redraw();
	ui_cur_changed();
}

// Assembly:
pushq %r14
pushq %rbx
pushq %rax
movq %rdi, %r14
callq 0xde6c
movq %rax, %rbx
movq %rax, %rdi
xorl %esi, %esi
callq 0xdbe9
testq %rax, %rax
je 0x69c1
xorl %ecx, %ecx
cmpl $0x0, (%r14)
setle %cl
movq 0x18(%rax,%rcx,8), %rax
testq %rax, %rax
je 0x69c1
movq 0x30(%rbx), %rcx
movl (%rcx), %ecx
cmpq %rcx, 0x8(%rax)
jbe 0x69c1
movslq %ecx, %rcx
movq (%rax), %rax
movsbl (%rax,%rcx), %esi
movq %rbx, %rdi
callq 0xdd30
callq 0x4e77
addq $0x8, %rsp
popq %rbx
popq %r14
jmp 0x51d8
addq $0x8, %rsp
popq %rbx
popq %r14
retq
// File: /workspace/github_c_makefile_star2_O1/bobrippling[P]tim/keys.c
// Function: k_normal1
void k_normal1(const keyarg_u *a, unsigned repeat, const int from_ch)
{
	window *win = windows_cur();

	const enum buf_mode save = win->ui_mode;
	win->ui_mode = UI_NORMAL;

	ui_normal_1(&repeat, IO_MAPRAW | bufmode_to_iomap(win->ui_mode));

	win->ui_mode = save;
}

// Assembly:
pushq %rbp
pushq %r14
pushq %rbx
subq $0x10, %rsp
leaq 0xc(%rsp), %rbx
movl %esi, (%rbx)
callq 0xde6c
movq %rax, %r14
movl 0x40(%rax), %ebp
movl $0x1, 0x40(%rax)
movl $0x1, %edi
callq 0xc758
orl $0x10, %eax
movq %rbx, %rdi
movl %eax, %esi
callq 0x5409
movl %ebp, 0x40(%r14)
addq $0x10, %rsp
popq %rbx
popq %r14
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O1/bobrippling[P]tim/keys.c
// Function: k_docmd
void k_docmd(const keyarg_u *arg, unsigned repeat, const int from_ch)
{
	const char **i;
	char **argv;
	size_t l;

	for(l = 0, i = arg->cmd.argv; i && *i; i++, l++);

	argv = umalloc((l + 1) * sizeof *argv);

	for(l = 0, i = arg->cmd.argv; i && *i; i++, l++)
		argv[l] = ustrdup(*i);

	cmd_dispatch(&arg->cmd.fn, 1, argv, arg->cmd.force, /*range:*/NULL);

	if(arg->cmd.argv[0])
		for(l = 0; argv[l]; l++)
			free(argv[l]);
	free(argv);
}

// Assembly:
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
pushq %rax
movq %rdi, %r14
movq 0x18(%rdi), %rax
movl $0x8, %edi
testq %rax, %rax
je 0x6a40
cmpq $0x0, (%rax)
je 0x6a40
movl $0x8, %ecx
leaq 0x8(%rcx), %rdi
cmpq $0x0, (%rax,%rcx)
movq %rdi, %rcx
jne 0x6a32
callq 0x5830
movq %rax, %rbx
movq 0x18(%r14), %r15
testq %r15, %r15
je 0x6a73
movq (%r15), %rdi
testq %rdi, %rdi
je 0x6a73
xorl %r12d, %r12d
callq 0x5863
movq %rax, (%rbx,%r12)
movq 0x8(%r15,%r12), %rdi
addq $0x8, %r12
testq %rdi, %rdi
jne 0x6a5c
movzbl 0x20(%r14), %ecx
movq %r14, %rdi
movl $0x1, %esi
movq %rbx, %rdx
xorl %r8d, %r8d
callq 0x9020
movq 0x18(%r14), %rax
cmpq $0x0, (%rax)
je 0x6ab5
movq (%rbx), %rdi
testq %rdi, %rdi
je 0x6ab5
movq %rbx, %r14
addq $0x8, %r14
callq 0x4080
movq (%r14), %rdi
addq $0x8, %r14
testq %rdi, %rdi
jne 0x6aa4
movq %rbx, %rdi
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
jmp 0x4080
// File: /workspace/github_c_makefile_star2_O1/bobrippling[P]tim/keys.c
// Function: k_showch
void k_showch(const keyarg_u *a, unsigned repeat, const int from_ch)
{
	window *win = windows_cur();
	list_t *l = window_current_line(win, false);
	if(l){
		if((unsigned)win->ui_pos->x < l->len_line){
			const int ch = l->line[win->ui_pos->x];

			ui_status("<%s> %d Hex %x Octal %o",
					ch ? (char[]){ ch, 0 } : "^@",
					ch, ch, ch);
			return;
		}
	}

	ui_status("NUL");
}

// Assembly:
pushq %rbx
subq $0x10, %rsp
callq 0xde6c
movq %rax, %rbx
movq %rax, %rdi
xorl %esi, %esi
callq 0xdbe9
testq %rax, %rax
je 0x6cbd
movq 0x30(%rbx), %rcx
movl (%rcx), %ecx
cmpq %rcx, 0x8(%rax)
jbe 0x6cbd
movslq %ecx, %rcx
movq (%rax), %rax
movsbl (%rax,%rcx), %ecx
testl %ecx, %ecx
je 0x6cd0
leaq 0xe(%rsp), %rsi
movb %cl, (%rsi)
movb $0x0, 0x1(%rsi)
jmp 0x6cd7
leaq 0x852a(%rip), %rdi      # 0xf1ee
xorl %eax, %eax
addq $0x10, %rsp
popq %rbx
jmp 0x527a
leaq 0x8514(%rip), %rsi      # 0xf1eb
leaq 0x84f5(%rip), %rdi      # 0xf1d3
movl %ecx, %edx
movl %ecx, %r8d
xorl %eax, %eax
callq 0x527a
addq $0x10, %rsp
popq %rbx
retq
// File: /workspace/github_c_makefile_star2_O1/bobrippling[P]tim/keys.c
// Function: motion_read
const motion *motion_read(unsigned *repeat, bool apply_maps)
{
	const enum io io_m =
		apply_maps ? bufmode_to_iomap(windows_cur()->ui_mode) : IO_NOMAP;

	*repeat = io_read_repeat(io_m);

	int i = keys_filter(
			io_m,
			(char *)motion_keys, motion_keys_cnt,
			offsetof(motionkey_t, keys), sizeof(motionkey_t),
			-1);

	if(i == -1)
		return NULL;
	return &motion_keys[i].motion;
}

// Assembly:
pushq %rbp
pushq %r14
pushq %rbx
movq %rdi, %rbx
movl $0x1, %ebp
testl %esi, %esi
je 0x6f36
callq 0xde6c
movl 0x40(%rax), %edi
callq 0xc758
movl %eax, %ebp
movl %ebp, %edi
callq 0xc92e
movl %eax, (%rbx)
leaq 0xe2ba(%rip), %rbx      # 0x15200
xorl %r14d, %r14d
movl %ebp, %edi
movq %rbx, %rsi
movl $0x2b, %edx
xorl %ecx, %ecx
movl $0x20, %r8d
movl $0xffffffff, %r9d       # imm = 0xFFFFFFFF
callq 0x6cf0
cltq
movq %rax, %rcx
shlq $0x5, %rcx
cmpl $-0x1, %eax
leaq 0x8(%rcx,%rbx), %rax
cmovneq %rax, %r14
movq %r14, %rax
popq %rbx
popq %r14
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O1/bobrippling[P]tim/keys.c
// Function: prompt_finish
static void prompt_finish(char *cmd)
{
	const cmd_t *cmd_f;
	char **argv;
	int argc;
	bool force;
	struct range rstore, *range = &rstore;

	if(parse_ranged_cmd(
			cmd,
			&cmd_f,
			&argv, &argc,
			&force, &range))
	{
		cmd_dispatch(cmd_f, argc, argv, force, range);
	}
	else
	{
		ui_err("unknown command %s", cmd);
	}

	free_argv(argv, argc);
}

// Assembly:
pushq %rbx
subq $0x30, %rsp
movq %rdi, %rbx
leaq 0x28(%rsp), %rax
leaq 0x18(%rsp), %r9
movq %rax, (%r9)
leaq 0x20(%rsp), %rsi
leaq 0x10(%rsp), %rdx
leaq 0xc(%rsp), %rcx
leaq 0xb(%rsp), %r8
callq 0xd1e5
testb %al, %al
je 0x6fd4
movq 0x20(%rsp), %rdi
movl 0xc(%rsp), %esi
movq 0x10(%rsp), %rdx
movzbl 0xb(%rsp), %ecx
movq 0x18(%rsp), %r8
callq 0x9020
jmp 0x6fe5
leaq 0x8286(%rip), %rdi      # 0xf261
movq %rbx, %rsi
xorl %eax, %eax
callq 0x4de2
movq 0x10(%rsp), %rdi
movl 0xc(%rsp), %esi
callq 0xd4a5
addq $0x30, %rsp
popq %rbx
retq
// File: /workspace/github_c_makefile_star2_O1/bobrippling[P]tim/keys.c
// Function: around_motion
static bool around_motion(
		unsigned repeat, const int from_ch,
		bool always_linewise,
		struct around_motion *action,
		region_t *used_region)
{
	motion m_doubletap = {
		.func = m_move,
		.how = M_LINEWISE,
	};

	unsigned repeat_motion;
	const motion *m = motion_read_or_visual(
			&repeat_motion, /* operator pending - no maps: */ false);

	if(!m){
		/* check for dd, etc */
		bool raw;
		int ch = io_getch(IO_NOMAP, &raw, true);
		(void)raw;

		if(ch == from_ch){
			/* dd - stay where we are, +the repeat */
			m_doubletap.arg.pos.y = DEFAULT_REPEAT(repeat) - 1;
			repeat = 0;
			m = &m_doubletap;
		}else{
			if(ch != K_ESC)
				ui_err("no motion '%c'", ch);
			/*io_ungetch(ch);*/
		}
	}

	if(m){
		if(!repeat && !repeat_motion){
			/* leave repeat as zero
			 * e.g. dG will not set any repeats, telling 'G' / m_eof
			 * to go to the default, end of file.
			 */
		}else{
			repeat = DEFAULT_REPEAT(repeat) * DEFAULT_REPEAT(repeat_motion);
		}

		window *win = windows_cur();

		region_t r;
		if(!motion_to_region(m, repeat, win, &r))
			return false;

		if(used_region)
			*used_region = r;

		/* reset cursor to beginning, then allow adjustments */
		*win->ui_pos = r.begin;
		if(action)
			action->fn(win->buf, &r, win->ui_pos, action);

		ui_set_bufmode(UI_NORMAL);

		ui_redraw();
		ui_cur_changed();

		return true;
	}

	return false;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x38, %rsp
movq %rcx, %r14
movq %rdx, %rbx
movl %esi, %r15d
movl %edi, %ebp
movq 0xfa16(%rip), %rax      # 0x16a80
movq %rax, 0x30(%rsp)
movups 0xf9fa(%rip), %xmm0     # 0x16a70
movaps %xmm0, 0x20(%rsp)
leaq 0x4(%rsp), %rdi
callq 0x6ff9
testq %rax, %rax
je 0x708f
movq %rax, %r12
jmp 0x70d9
leaq 0x8(%rsp), %rsi
movl $0x1, %edi
movl $0x1, %edx
callq 0xc772
cmpl %r15d, %eax
jne 0x70bc
cmpl $0x1, %ebp
adcl $-0x1, %ebp
leaq 0x20(%rsp), %r12
movl %ebp, 0xc(%r12)
xorl %ebp, %ebp
jmp 0x70d9
cmpl $0x1b, %eax
jne 0x70c6
xorl %r12d, %r12d
jmp 0x70d9
leaq 0x81a7(%rip), %rdi      # 0xf274
xorl %r12d, %r12d
movl %eax, %esi
xorl %eax, %eax
callq 0x4de2
xorl %r15d, %r15d
testq %r12, %r12
je 0x7181
testl %ebp, %ebp
movl 0x4(%rsp), %eax
movl $0x1, %ecx
movl $0x1, %edx
cmovnel %ebp, %edx
testl %eax, %eax
setne %sil
cmovnel %eax, %ecx
imull %edx, %ecx
testb $0x1, %sil
cmovnel %ecx, %r15d
testl %ebp, %ebp
cmovnel %ecx, %r15d
callq 0xde6c
movq %rax, %r13
leaq 0x8(%rsp), %rcx
movq %r12, %rdi
movl %r15d, %esi
movq %rax, %rdx
callq 0xbf0c
movl %eax, %r15d
testb %al, %al
je 0x7181
testq %r14, %r14
je 0x714a
movl 0x18(%rsp), %eax
movl %eax, 0x10(%r14)
movups 0x8(%rsp), %xmm0
movups %xmm0, (%r14)
movq 0x30(%r13), %rax
movq 0x8(%rsp), %rcx
movq %rcx, (%rax)
testq %rbx, %rbx
je 0x716d
movq (%r13), %rdi
movq 0x30(%r13), %rdx
leaq 0x8(%rsp), %rsi
movq %rbx, %rcx
callq *(%rbx)
movl $0x1, %edi
callq 0x4d20
callq 0x4e77
callq 0x51d8
movl %r15d, %eax
addq $0x38, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O1/bobrippling[P]tim/keys.c
// Function: filter
static void filter(
		buffer_t *buf,
		const region_t *region,
		point_t *out,
		struct around_motion *around)
{
	const struct filter_input *pf = around->filter;
	bool free_cmd = false;
	char *cmd;

	switch(pf->type){
		case FILTER_CMD:
			cmd = pf->s;
			if(!cmd){
				char initial[32];

				snprintf(initial, sizeof initial, "%d,%d!",
						region->begin.y,
						region->end.y);

				cmd = prompt(':', initial);
				if(!cmd)
					return;

				prompt_finish(cmd);

				free(cmd);
				return;
			}else{
				break;
			}

		case FILTER_SELF:
			cmd = "sh";
	}

	if(buffer_filter(buf, region, cmd))
		ui_err("filter: %s", strerror(errno));

	if(free_cmd)
		free(cmd);
}

// Assembly:
pushq %rbx
subq $0x20, %rsp
movq 0x8(%rcx), %rax
cmpl $0x1, (%rax)
jne 0x71f1
movq 0x8(%rax), %rdx
testq %rdx, %rdx
jne 0x71f8
movl 0x4(%rsi), %ecx
movl 0xc(%rsi), %r8d
leaq 0x80cb(%rip), %rdx      # 0xf283
movq %rsp, %rbx
movl $0x20, %esi
movq %rbx, %rdi
xorl %eax, %eax
callq 0x41e0
movl $0x3a, %edi
movq %rbx, %rsi
callq 0xc364
testq %rax, %rax
je 0x7223
movq %rax, %rbx
movq %rax, %rdi
callq 0x6f83
movq %rbx, %rdi
callq 0x4080
jmp 0x7223
leaq 0x84d4(%rip), %rdx      # 0xf6cc
callq 0x966e
testl %eax, %eax
je 0x7223
callq 0x40a0
movl (%rax), %edi
callq 0x44e0
leaq 0x8076(%rip), %rdi      # 0xf28a
movq %rax, %rsi
xorl %eax, %eax
addq $0x20, %rsp
popq %rbx
jmp 0x4de2
addq $0x20, %rsp
popq %rbx
retq
// File: /workspace/github_c_makefile_star2_O1/bobrippling[P]tim/cmds.c
// Function: quit_common
static bool quit_common(
		bool qall,
		int argc, char **argv,
		bool force, struct range *range)
{
	RANGE_NO();
	ARGV_NO();

	if(!force){
		bool modified = false;

		if(qall){
			tab *modtab;
			window *modwin = buffers_modified_excluding(NULL, &modtab);

			if(modwin){
				modified = true;

				tabs_set_cur(modtab);
				tab_set_focus(modtab, modwin);
				ui_redraw();
				ui_cur_changed();
			}
		}else{
			modified = buffers_modified_single(buffers_cur());
		}

		if(modified){
			ui_err("buffer modified");
			return false;
		}
	}

	if(qall){
		ui_run = UI_EXIT_0;
	}else{
		window *win = windows_cur();
		window *focus = window_next(win);

		/* check remaining buffers */
		if(!force && !focus && args_next_fname(false)){
			ui_err("more files to edit");
			return false;
		}

		window_evict(win);
		window_free(win);
		windows_set_cur(focus);

		if(!focus){
			/* fallback to another tab? */
			tab *current = tabs_cur();
			tab *tabfocus = tab_next(current);

			if(tabfocus == current){
				/* no more tabs */
				ui_run = UI_EXIT_0;
				tabfocus = NULL;
			}

			tabs_set_cur(tabfocus);
			tab_evict(current);
			tab_free(current);
		}

		switch(ui_run){
			case UI_EXIT_0:
			case UI_EXIT_1:
				break;
			case UI_RUNNING:
				ui_redraw();
				ui_cur_changed();
				break;
		}
	}

	return true;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %rbx
pushq %rax
testq %r8, %r8
je 0x7262
movq (%rdx), %rsi
leaq 0x8048(%rip), %rdi      # 0xf2a8
jmp 0x72b5
cmpl $0x1, %esi
jne 0x72ab
movl %ecx, %ebx
movl %edi, %ebp
testb %bl, %bl
jne 0x72e9
testb %bpl, %bpl
je 0x72cb
movq %rsp, %rsi
xorl %edi, %edi
callq 0xd6ec
testq %rax, %rax
setne %r14b
je 0x72db
movq %rax, %r15
movq (%rsp), %rdi
callq 0xdf64
movq (%rsp), %rdi
movq %r15, %rsi
callq 0xdee7
callq 0x4e77
callq 0x51d8
jmp 0x72db
movq (%rdx), %rsi
leaq 0x800e(%rip), %rdi      # 0xf2c3
xorl %ebx, %ebx
xorl %eax, %eax
callq 0x4de2
movl %ebx, %eax
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
callq 0xde6c
movq (%rax), %rdi
callq 0xd6d2
movl %eax, %r14d
testb %r14b, %r14b
je 0x72e9
leaq 0x7f2e(%rip), %rdi      # 0xf215
jmp 0x732f
testb %bpl, %bpl
je 0x72ff
leaq 0x100df(%rip), %rax     # 0x173d4
movl $0x1, (%rax)
movb $0x1, %bl
jmp 0x72be
callq 0xde6c
movq %rax, %r15
movq %rax, %rdi
callq 0xd848
movq %rax, %r14
testq %rax, %rax
setne %al
orb %al, %bl
jne 0x733a
xorl %edi, %edi
callq 0x47bc
testq %rax, %rax
je 0x733a
leaq 0x81a1(%rip), %rdi      # 0xf4d0
xorl %ebx, %ebx
xorl %eax, %eax
callq 0x4de2
jmp 0x72be
movq %r15, %rdi
callq 0xd8c3
movq %r15, %rdi
callq 0xdb87
movq %r14, %rdi
callq 0xde80
testq %r14, %r14
jne 0x7393
callq 0xdf5c
movq %rax, %rbx
movq %rax, %rdi
callq 0xdf17
cmpq %rbx, %rax
jne 0x737b
leaq 0x10061(%rip), %rax     # 0x173d4
movl $0x1, (%rax)
xorl %eax, %eax
movq %rax, %rdi
callq 0xdf64
movq %rbx, %rdi
callq 0xdeeb
movq %rbx, %rdi
callq 0xdeb3
leaq 0x1003a(%rip), %rax     # 0x173d4
movb $0x1, %bl
cmpl $0x0, (%rax)
jne 0x72be
callq 0x4e77
callq 0x51d8
jmp 0x72be
// File: /workspace/github_c_makefile_star2_O1/bobrippling[P]tim/cmds.c
// Function: c_cq
bool c_cq(int argc, char **argv, bool force, struct range *range)
{
	RANGE_NO();
	ARGV_NO();

	/* no buffer checks */
	ui_run = UI_EXIT_1;

	return true;
}

// Assembly:
pushq %rbx
testq %rcx, %rcx
je 0x73da
movq (%rsi), %rsi
leaq 0x7ed0(%rip), %rdi      # 0xf2a8
jmp 0x73fa
cmpl $0x1, %edi
jne 0x73f0
leaq 0xffee(%rip), %rax      # 0x173d4
movl $0x2, (%rax)
movb $0x1, %bl
jmp 0x7403
movq (%rsi), %rsi
leaq 0x7ec9(%rip), %rdi      # 0xf2c3
xorl %ebx, %ebx
xorl %eax, %eax
callq 0x4de2
movl %ebx, %eax
popq %rbx
retq
// File: /workspace/github_c_makefile_star2_O1/bobrippling[P]tim/cmds.c
// Function: edit_common
bool edit_common(const char *fname, bool const force)
{
	window *win = windows_cur();

	const bool reload = !fname;
	if(reload)
		fname = buffer_fname(win->buf);

	if(!fname){ /* shouldn't be the case */
		ui_err("no filename");
		return false;
	}

	/* if it's a reload, we care about whether the buffer is modified, no matter
	 * how many times it's open. otherwise we are loading another file, which is
	 * fine as long as it's not the only instance of the modified-buffer
	 */
	if(!force && (reload ? win->buf->modified : buffers_modified_single(win->buf))){
		ui_err("buffer modified");
		return false;
	}

	bool ret = false;

	const char *err;
	bool loaded = reload
		? window_reload_buffer(win, &err)
		: window_replace_fname(win, fname, &err);

	if(loaded){
		ui_status("%s: loaded", fname);
		buffers_cur()->modified = false;
		ret = true;
	}else{
		ui_err("%s: %s", fname, err);
		if(!reload){
			/* wipe the buffer, e.g. :e /root/hi */
			buffer_t *empty = buffer_new();
			window_replace_buffer(win, empty);
			buffer_release(empty);
		}
	}

	buffer_set_fname(buffers_cur(), fname);

	ui_redraw();
	ui_cur_changed();

	return ret;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %rbx
pushq %rax
movl %esi, %ebp
movq %rdi, %r15
callq 0xde6c
movq %rax, %r14
movq %r15, %rbx
testq %r15, %r15
jne 0x742e
movq (%r14), %rdi
callq 0x9348
movq %rax, %rbx
testq %rbx, %rbx
je 0x7452
testb %bpl, %bpl
jne 0x746d
movq (%r14), %rdi
testq %r15, %r15
je 0x7467
callq 0xd6d2
testb %al, %al
je 0x746d
leaq 0x7dc5(%rip), %rdi      # 0xf215
jmp 0x7459
leaq 0x7e74(%rip), %rdi      # 0xf2cd
xorl %ebp, %ebp
xorl %eax, %eax
callq 0x4de2
jmp 0x7508
cmpb $0x0, 0x39(%rdi)
jne 0x7449
testq %r15, %r15
je 0x7482
movq %rsp, %rdx
movq %r14, %rdi
movq %rbx, %rsi
callq 0xddd6
jmp 0x748d
movq %rsp, %rsi
movq %r14, %rdi
callq 0xde20
movl %eax, %ebp
testb %al, %al
je 0x74b2
leaq 0x7e3f(%rip), %rdi      # 0xf2d9
movq %rbx, %rsi
xorl %eax, %eax
callq 0x527a
callq 0xde6c
movq (%rax), %rax
movb $0x0, 0x39(%rax)
jmp 0x74ee
movq (%rsp), %rdx
leaq 0x8077(%rip), %rdi      # 0xf534
movq %rbx, %rsi
xorl %eax, %eax
callq 0x4de2
testq %r15, %r15
je 0x74ee
callq 0x907b
movq %rax, %r15
movq %r14, %rdi
movq %rax, %rsi
callq 0xdd80
leaq 0x1b76(%rip), %rsi      # 0x905c
movq %r15, %rdi
callq 0xce9b
callq 0xde6c
movq (%rax), %rdi
movq %rbx, %rsi
callq 0x917c
callq 0x4e77
callq 0x51d8
movl %ebp, %eax
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O1/bobrippling[P]tim/cmds.c
// Function: c_n
bool c_n(int argc, char **argv, bool force, struct range *range)
{
	RANGE_NO();
	ARGV_NO();

	if(buffers_modified_single(buffers_cur()) && !force){
		ui_err("buffer modified");
		return false;
	}

	char *fname = args_next_fname(true);
	if(!fname){
		ui_err("no more files");
		return false;
	}

	return edit_common(fname, force);
}

// Assembly:
pushq %rbx
testq %rcx, %rcx
je 0x7527
movq (%rsi), %rsi
leaq 0x7d83(%rip), %rdi      # 0xf2a8
jmp 0x7566
cmpl $0x1, %edi
jne 0x755c
movl %edx, %ebx
callq 0xde6c
movq (%rax), %rdi
callq 0xd6d2
xorb $0x1, %al
orb %bl, %al
je 0x7571
movl $0x1, %edi
callq 0x47bc
testq %rax, %rax
je 0x757a
movzbl %bl, %esi
movq %rax, %rdi
popq %rbx
jmp 0x7407
movq (%rsi), %rsi
leaq 0x7d5d(%rip), %rdi      # 0xf2c3
xorl %eax, %eax
callq 0x4de2
xorl %eax, %eax
popq %rbx
retq
leaq 0x7c9d(%rip), %rdi      # 0xf215
jmp 0x7581
leaq 0x7d63(%rip), %rdi      # 0xf2e4
xorl %eax, %eax
callq 0x4de2
jmp 0x756d
// File: /workspace/github_c_makefile_star2_O1/bobrippling[P]tim/cmds.c
// Function: c_w
bool c_w(char *cmd, char *arg, bool force, struct range *range)
{
	arg = skipspace(arg);

	if(range)
		return write_range(arg, force, range);

	buffer_t *const buf = buffers_cur();

	bool newfname = false;
	if(*arg){
		const char *old = buffer_fname(buf);

		newfname = !old || strcmp(old, arg);

		buffer_set_fname(buf, arg);
	}

	if(!write_buf(buf, force, newfname))
		return false;

	ui_status("written to \"%s\"", buffer_fname(buf));
	return true;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movq %rcx, %r12
movl %edx, %ebp
movq %rsi, %rdi
callq 0xc1ac
movq %rax, %r14
testq %r12, %r12
je 0x7609
movq %r14, %rdi
callq 0xc1ac
movq %rax, %rbx
callq 0xde6c
movq (%rax), %r13
movq 0x8(%r13), %rdi
movl (%r12), %esi
xorl %edx, %edx
callq 0x9ede
testq %rax, %rax
je 0x763e
movq %rax, %r14
movl 0x4(%r12), %r15d
subl (%r12), %r15d
incl %r15d
movzbl (%rbx), %eax
cmpl $0x21, %eax
je 0x7652
testl %eax, %eax
jne 0x7671
testb %bpl, %bpl
je 0x7750
movq %r13, %rdi
callq 0x9348
movq %rax, %rbx
jmp 0x76a5
callq 0xde6c
movq (%rax), %rbx
cmpb $0x0, (%r14)
je 0x764a
movq %rbx, %rdi
callq 0x9348
testq %rax, %rax
je 0x76ed
movq %rax, %rdi
movq %r14, %rsi
callq 0x42d0
testl %eax, %eax
setne %r15b
jmp 0x76f0
leaq 0x7e9e(%rip), %rdi      # 0xf4e3
jmp 0x7757
xorl %r15d, %r15d
jmp 0x76fb
incq %rbx
movq %rbx, %rdi
movq %r14, %rsi
movl %r15d, %edx
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
jmp 0xbfe4
leaq 0x7ea7(%rip), %rsi      # 0xf51f
movl $0x2, %edx
movq %rbx, %rdi
callq 0x40c0
testl %eax, %eax
jne 0x76a5
movq %rbx, %r12
incq %r12
movq %rbx, %rdi
callq 0x4170
movq %rbx, %rdi
movq %r12, %rsi
movq %rax, %rdx
callq 0x4400
leaq 0x82f2(%rip), %rsi      # 0xf99e
movq %rbx, %rdi
callq 0x4440
testq %rax, %rax
je 0x772c
movq %r14, %rdi
movl %r15d, %esi
movq %rax, %rdx
movl $0x1, %ecx
callq 0x9dab
testl %eax, %eax
sete %bpl
je 0x7760
callq 0x40a0
movl (%rax), %edi
callq 0x44e0
leaq 0x7e43(%rip), %rdi      # 0xf52e
jmp 0x773f
movb $0x1, %r15b
movq %rbx, %rdi
movq %r14, %rsi
callq 0x917c
movzbl %bpl, %esi
movzbl %r15b, %edx
movq %rbx, %rdi
callq 0x7771
movl %eax, %ebp
testb %al, %al
je 0x7760
movq %rbx, %rdi
callq 0x9348
leaq 0x7bd2(%rip), %rdi      # 0xf2f2
movq %rax, %rsi
xorl %eax, %eax
callq 0x527a
jmp 0x7760
callq 0x40a0
movl (%rax), %edi
callq 0x44e0
leaq 0x7de3(%rip), %rdi      # 0xf522
xorl %ebp, %ebp
movq %rbx, %rsi
movq %rax, %rdx
xorl %eax, %eax
callq 0x4de2
jmp 0x7760
leaq 0x7d99(%rip), %rdi      # 0xf4f0
xorl %ebp, %ebp
xorl %eax, %eax
callq 0x4de2
movl %ebp, %eax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O1/bobrippling[P]tim/cmds.c
// Function: write_buf
static bool write_buf(
		buffer_t *buf, bool const force, bool const newfname)
{
	const char *fname = buffer_fname(buf);
	if(!fname){
		ui_err("no filename");
		return false;
	}

	struct stat st;
	if(!force){
		if(stat(fname, &st) == 0){
			if(newfname && access(fname, F_OK) == 0){
				ui_err("file already exists");
				return false;
			}

			if(st.st_mtime > buf->mtime){
				ui_err("file modified externally");
				return false;
			}
		}else if(errno != ENOENT){
			ui_err("stat(%s): %s", fname, strerror(errno));
			return false;
		}
	}

	FILE *f = fopen(fname, "w");

	if(!f){
got_err:
		ui_err("%s: %s", fname, strerror(errno));
		if(f)
			fclose(f);
		return false;
	}

	if(buffer_write_file(buf, -1, f, buf->eol) != 0)
		goto got_err; /* file cleanup handled */

	if(fclose(f)){
		f = NULL;
		goto got_err;
	}

	return true;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %rbx
subq $0x98, %rsp
movl %edx, %ebp
movl %esi, %r15d
movq %rdi, %r14
callq 0x9348
testq %rax, %rax
je 0x77d5
movq %rax, %rbx
testb %r15b, %r15b
jne 0x7815
leaq 0x8(%rsp), %rsi
movq %rbx, %rdi
callq 0x4330
testl %eax, %eax
je 0x77ea
callq 0x40a0
movl (%rax), %edi
cmpl $0x2, %edi
je 0x7815
callq 0x44e0
leaq 0x7da7(%rip), %rdi      # 0xf568
xorl %ebp, %ebp
movq %rbx, %rsi
movq %rax, %rdx
xorl %eax, %eax
callq 0x4de2
jmp 0x7885
leaq 0x7af1(%rip), %rdi      # 0xf2cd
xorl %ebp, %ebp
xorl %eax, %eax
callq 0x4de2
jmp 0x7885
testb %bpl, %bpl
je 0x7801
movq %rbx, %rdi
xorl %esi, %esi
callq 0x4420
testl %eax, %eax
je 0x789a
movq 0x60(%rsp), %rax
cmpq 0x40(%r14), %rax
jle 0x7815
leaq 0x7d3c(%rip), %rdi      # 0xf54f
jmp 0x77dc
leaq 0x8182(%rip), %rsi      # 0xf99e
movq %rbx, %rdi
callq 0x4440
testq %rax, %rax
je 0x7851
movq %rax, %r15
movzbl 0x38(%r14), %ecx
movq %r14, %rdi
movl $0xffffffff, %esi       # imm = 0xFFFFFFFF
movq %rax, %rdx
callq 0x931f
testl %eax, %eax
jne 0x7854
movq %r15, %rdi
callq 0x4150
testl %eax, %eax
je 0x7895
xorl %r15d, %r15d
callq 0x40a0
movl (%rax), %edi
callq 0x44e0
leaq 0x7ccd(%rip), %rdi      # 0xf534
xorl %ebp, %ebp
movq %rbx, %rsi
movq %rax, %rdx
xorl %eax, %eax
callq 0x4de2
testq %r15, %r15
je 0x7885
movq %r15, %rdi
callq 0x4150
xorl %ebp, %ebp
movl %ebp, %eax
addq $0x98, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
movb $0x1, %bpl
jmp 0x7885
leaq 0x7c9a(%rip), %rdi      # 0xf53b
jmp 0x77dc
// File: /workspace/github_c_makefile_star2_O1/bobrippling[P]tim/cmds.c
// Function: c_wa
bool c_wa(int argc, char **argv, bool force, struct range *range)
{
	RANGE_NO();
	ARGV_NO();

	bool success = true;
	bool done_write = false;

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

			if(!force && !buf->modified)
				continue;

			bool subforce = false;
			if(!write_buf(buf, subforce, /*newfname:*/false)){
				tabs_set_cur(tab);
				tab_set_focus(tab, win);
				success = false;
			}else{
				done_write = true;
			}
		}
	}

	if(success){
		if(done_write)
			ui_status("saved all%s buffers", force ? "" : " modified");
		else
			ui_status("no modified buffers");

	}else{
		/* leave the error message emitted by write_buf() */
	}

	return success;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
testq %rcx, %rcx
je 0x78c5
movq (%rsi), %rsi
leaq 0x79e8(%rip), %rdi      # 0xf2a8
jmp 0x7962
cmpl $0x1, %edi
jne 0x7958
movl %edx, %ebx
callq 0xdf6c
testq %rax, %rax
je 0x7982
movq %rax, %r14
movb $0x1, %r15b
xorl %r13d, %r13d
movq (%r14), %rdi
callq 0xd869
testq %rax, %rax
je 0x794d
movq %rax, %r12
movq %r12, (%rsp)
movl %r13d, %ebp
movq (%r12), %rdi
testb %bl, %bl
jne 0x790c
cmpb $0x1, 0x39(%rdi)
jne 0x7932
xorl %esi, %esi
xorl %edx, %edx
callq 0x7771
movb $0x1, %r13b
testb %al, %al
jne 0x7935
movq %r14, %rdi
callq 0xdf64
movq %r14, %rdi
movq %r12, %rsi
callq 0xdee7
xorl %r15d, %r15d
movl %ebp, %r13d
movq 0x58(%r12), %r12
testq %r12, %r12
jne 0x78fb
movq (%rsp), %r12
movq 0x50(%r12), %r12
testq %r12, %r12
jne 0x78f7
movq 0x8(%r14), %r14
testq %r14, %r14
jne 0x78e7
jmp 0x7988
movq (%rsi), %rsi
leaq 0x7961(%rip), %rdi      # 0xf2c3
xorl %r15d, %r15d
xorl %eax, %eax
callq 0x4de2
andb $0x1, %r15b
movl %r15d, %eax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movb $0x1, %r15b
xorl %r13d, %r13d
testb $0x1, %r15b
je 0x796c
testb $0x1, %r13b
je 0x79b8
leaq 0x7dbd(%rip), %rax      # 0xf758
leaq 0x7879(%rip), %rsi      # 0xf21b
testb %bl, %bl
cmovneq %rax, %rsi
leaq 0x7953(%rip), %rdi      # 0xf302
xorl %eax, %eax
callq 0x527a
jmp 0x79c6
leaq 0x7957(%rip), %rdi      # 0xf316
xorl %eax, %eax
callq 0x527a
movb $0x1, %r15b
jmp 0x796c
// File: /workspace/github_c_makefile_star2_O1/bobrippling[P]tim/cmds.c
// Function: c_x
bool c_x(int argc, char **argv, bool force, struct range *range)
{
	RANGE_NO();

	if(argc > 2){
		ui_err("usage: %s [filename]", *argv);
		return false;
	}

	buffer_t *buf = buffers_cur();

	/* if no modifications, don't try to write
	 * this is done in vi and helps ZZ */
	if(argc == 1 && buf->fname && !buf->modified)
		return c_q(argc, argv, false, range);

	return c_w("w", argc > 1 ? argv[1] : "", false, range)
		&& c_q(1, (char *[]){ "" }, false, NULL);
}

// Assembly:
pushq %rbp
pushq %rbx
pushq %rax
movq %rsi, %rbx
testq %rcx, %rcx
je 0x79e2
movq (%rbx), %rsi
leaq 0x78c8(%rip), %rdi      # 0xf2a8
jmp 0x79f3
movl %edi, %ebp
cmpl $0x3, %edi
jl 0x7a05
movq (%rbx), %rsi
leaq 0x7937(%rip), %rdi      # 0xf32a
xorl %ebx, %ebx
xorl %eax, %eax
callq 0x4de2
movl %ebx, %eax
addq $0x8, %rsp
popq %rbx
popq %rbp
retq
callq 0xde6c
cmpl $0x2, %ebp
je 0x7a30
leaq 0x7d42(%rip), %rsi      # 0xf758
cmpl $0x1, %ebp
jne 0x7a34
movq (%rax), %rax
cmpq $0x0, 0x30(%rax)
je 0x7a2b
cmpb $0x0, 0x39(%rax)
je 0x7a65
cmpl $0x2, %ebp
jne 0x7a34
movq 0x8(%rbx), %rsi
xorl %ebx, %ebx
xorl %edx, %edx
xorl %ecx, %ecx
callq 0x758a
testb %al, %al
je 0x79fc
leaq 0x7d0e(%rip), %rax      # 0xf758
movq %rsp, %rdx
movq %rax, (%rdx)
xorl %edi, %edi
movl $0x1, %esi
xorl %ecx, %ecx
xorl %r8d, %r8d
callq 0x724a
movl %eax, %ebx
jmp 0x79fc
xorl %edi, %edi
movl $0x1, %esi
movq %rbx, %rdx
xorl %ecx, %ecx
xorl %r8d, %r8d
addq $0x8, %rsp
popq %rbx
popq %rbp
jmp 0x724a
// File: /workspace/github_c_makefile_star2_O1/bobrippling[P]tim/cmds.c
// Function: c_xa
bool c_xa(int argc, char **argv, bool force, struct range *range)
{
	RANGE_NO();
	ARGV_NO();

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

			if(!buf->modified)
				continue;

			if(!write_buf(buf, force, false)){
				tabs_set_cur(tab);
				tab_set_focus(tab, win);
				return false;
			}
		}
	}

	ui_run = UI_EXIT_0;

	return true;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
testq %rcx, %rcx
je 0x7a9e
movq (%rsi), %rsi
leaq 0x780f(%rip), %rdi      # 0xf2a8
jmp 0x7b58
cmpl $0x1, %edi
jne 0x7b4e
movl %edx, %ebp
callq 0xdf6c
testq %rax, %rax
sete %r12b
je 0x7b78
movq %rax, %rbx
movzbl %bpl, %ebp
movq (%rbx), %rdi
callq 0xd869
testq %rax, %rax
je 0x7b2a
movq %rax, %r14
movq %r14, %r15
movq (%r15), %rdi
movl $0xa, %r13d
cmpb $0x1, 0x39(%rdi)
jne 0x7b0d
xorl %r13d, %r13d
movl %ebp, %esi
xorl %edx, %edx
callq 0x7771
testb %al, %al
jne 0x7b0d
movq %rbx, %rdi
callq 0xdf64
movq %rbx, %rdi
movq %r15, %rsi
callq 0xdee7
movl $0x1, %r13d
cmpl $0xa, %r13d
je 0x7b18
testl %r13d, %r13d
jne 0x7b30
movq 0x58(%r15), %r15
testq %r15, %r15
jne 0x7ad5
movq 0x50(%r14), %r14
testq %r14, %r14
jne 0x7ad2
movl $0x5, %r13d
cmpl $0x5, %r13d
je 0x7b3b
testl %r13d, %r13d
jne 0x7b72
movq 0x8(%rbx), %rbx
testq %rbx, %rbx
sete %r12b
jne 0x7ac2
jmp 0x7b78
movq (%rsi), %rsi
leaq 0x776b(%rip), %rdi      # 0xf2c3
xorl %ebx, %ebx
xorl %eax, %eax
callq 0x4de2
movl %ebx, %eax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
testb $0x1, %r12b
je 0x7b89
leaq 0xf855(%rip), %rax      # 0x173d4
movl $0x1, (%rax)
movb $0x1, %bl
jmp 0x7b61
xorl %ebx, %ebx
jmp 0x7b61
// File: /workspace/github_c_makefile_star2_O1/bobrippling[P]tim/cmds.c
// Function: c_e
bool c_e(int argc, char **argv, bool force, struct range *range)
{
	RANGE_NO();

	const char *fname;

	if(argc == 1){
		fname = NULL;
		if(!buffer_fname(buffers_cur())){
			ui_err("no filename");
			return false;
		}
	}else if(argc == 2){
		fname = argv[1];
	}else{
		if(buffers_modified_single(buffers_cur())){
			ui_err("buffer modified");
			return false;
		}

		if(!yesno("%d files given - open in vertical split? (y/N) ", argc - 1))
			return false;

		window *current = windows_cur();

		bool ret = c_split(
				neighbour_down,
				/*use current:*/true,
				argc,
				argv,
				/*force*/false,
				/*range*/NULL,
				/*allow_many:*/true);

		/* close current window */
		windows_set_cur(current);
		quit_common(false, 1, (char *[]){ "", NULL }, false, NULL);

		return ret;
	}

	return edit_common(fname, force);
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %rbx
subq $0x18, %rsp
movq %rsi, %rbx
testq %rcx, %rcx
je 0x7bbd
movq (%rbx), %rsi
leaq 0x76ff(%rip), %rdi      # 0xf2a8
xorl %eax, %eax
callq 0x4de2
xorl %eax, %eax
addq $0x18, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
movl %edx, %ebp
movl %edi, %r14d
cmpl $0x2, %edi
je 0x7be7
cmpl $0x1, %r14d
jne 0x7bfe
callq 0xde6c
movq (%rax), %rdi
callq 0x9348
testq %rax, %rax
je 0x7c8d
xorl %edi, %edi
jmp 0x7beb
movq 0x8(%rbx), %rdi
movzbl %bpl, %esi
addq $0x18, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
jmp 0x7407
callq 0xde6c
movq (%rax), %rdi
callq 0xd6d2
testb %al, %al
je 0x7c18
leaq 0x75ff(%rip), %rdi      # 0xf215
jmp 0x7c94
leal -0x1(%r14), %esi
leaq 0x771c(%rip), %rdi      # 0xf33f
xorl %eax, %eax
callq 0xc656
testb %al, %al
je 0x7bb0
callq 0xde6c
movq %rax, %r15
movl $0x1, %edi
movl $0x1, %esi
movl %r14d, %edx
movq %rbx, %rcx
xorl %r8d, %r8d
movl $0x1, %r9d
callq 0x7ca0
movl %eax, %ebx
movq %r15, %rdi
callq 0xde80
leaq 0x7af3(%rip), %rax      # 0xf758
leaq 0x8(%rsp), %rdx
movq %rax, (%rdx)
movq $0x0, 0x8(%rdx)
xorl %edi, %edi
movl $0x1, %esi
xorl %ecx, %ecx
xorl %r8d, %r8d
callq 0x724a
movl %ebx, %eax
jmp 0x7bb2
leaq 0x7639(%rip), %rdi      # 0xf2cd
xorl %eax, %eax
callq 0x4de2
jmp 0x7bb0
// File: /workspace/github_c_makefile_star2_O1/bobrippling[P]tim/cmds.c
// Function: c_split
static
bool c_split(
		const enum neighbour dir,
		bool const withcurrent,
		int argc, char **argv,
		bool force, struct range *range,
		const bool allow_many)
{
	RANGE_NO();

	if(!allow_many && argc > 2){
		ui_err("usage: %s [filename]", *argv);
		return false;
	}

	buffer_t *b;

	if(argc > 1){
		for(int i = 1; i < argc; i++){
			const char *err;
			buffer_new_fname(&b, argv[i], &err);

			if(err){
				ui_err("%s: %s", argv[i], err);

				/* edit new file */
				b = buffer_new();
				buffer_set_fname(b, argv[i]);
			}

			attach_buffer(b, dir, NULL);
		}

	}else if(withcurrent){
		window *cur = windows_cur();
		b = retain(cur->buf);
		attach_buffer(b, dir, /*copy pos from:*/cur);

	}else{
		b = buffer_new();
		attach_buffer(b, dir, NULL);
	}

	ui_redraw();
	ui_cur_changed();

	return true;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x18, %rsp
movq %rcx, %r14
testq %r8, %r8
je 0x7cc5
movq (%r14), %rsi
leaq 0x75e8(%rip), %rdi      # 0xf2a8
jmp 0x7d50
cmpl $0x3, %edx
setl %al
orb %r9b, %al
je 0x7d46
movl %edi, %ebx
cmpl $0x2, %edx
jl 0x7d6a
movl %edx, %ebp
movl $0x1, %r13d
leaq 0x8(%rsp), %r15
leaq 0x10(%rsp), %r12
movq (%r14,%r13,8), %rsi
movq %r15, %rdi
movq %r12, %rdx
callq 0x91f5
movq 0x10(%rsp), %rdx
testq %rdx, %rdx
je 0x7d2e
movq (%r14,%r13,8), %rsi
leaq 0x7823(%rip), %rdi      # 0xf534
xorl %eax, %eax
callq 0x4de2
callq 0x907b
movq %rax, 0x8(%rsp)
movq (%r14,%r13,8), %rsi
movq %rax, %rdi
callq 0x917c
movq 0x8(%rsp), %rdi
movl %ebx, %esi
xorl %edx, %edx
callq 0x86d4
incq %r13
cmpq %r13, %rbp
jne 0x7ced
jmp 0x7da4
movq (%r14), %rsi
leaq 0x75da(%rip), %rdi      # 0xf32a
xorl %ebx, %ebx
xorl %eax, %eax
callq 0x4de2
movl %ebx, %eax
addq $0x18, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
testb %sil, %sil
je 0x7d8e
callq 0xde6c
movq %rax, %r14
movq (%rax), %rdi
callq 0xce90
movq %rax, 0x8(%rsp)
movq %rax, %rdi
movl %ebx, %esi
movq %r14, %rdx
jmp 0x7d9f
callq 0x907b
movq %rax, 0x8(%rsp)
movq %rax, %rdi
movl %ebx, %esi
xorl %edx, %edx
callq 0x86d4
callq 0x4e77
callq 0x51d8
movb $0x1, %bl
jmp 0x7d59
// File: /workspace/github_c_makefile_star2_O1/bobrippling[P]tim/cmds.c
// Function: c_ene
bool c_ene(int argc, char **argv, bool force, struct range *range)
{
	RANGE_NO();
	ARGV_NO();

	if(!force && buffers_modified_single(buffers_cur())){
		ui_err("buffer modified");
		return false;
	}

	buffer_t *new = buffer_new();
	window_replace_buffer(windows_cur(), new);
	buffer_release(new);

	ui_cur_changed();
	ui_redraw();

	return true;
}

// Assembly:
pushq %rbx
testq %rcx, %rcx
je 0x7dc4
movq (%rsi), %rsi
leaq 0x74e6(%rip), %rdi      # 0xf2a8
jmp 0x7dfa
cmpl $0x1, %edi
jne 0x7df0
testb %dl, %dl
jne 0x7e07
callq 0xde6c
movq (%rax), %rdi
callq 0xd6d2
testb %al, %al
je 0x7e07
leaq 0x7430(%rip), %rdi      # 0xf215
xorl %ebx, %ebx
xorl %eax, %eax
callq 0x4de2
jmp 0x7e03
movq (%rsi), %rsi
leaq 0x74c9(%rip), %rdi      # 0xf2c3
xorl %ebx, %ebx
xorl %eax, %eax
callq 0x4de2
movl %ebx, %eax
popq %rbx
retq
callq 0x907b
movq %rax, %rbx
callq 0xde6c
movq %rax, %rdi
movq %rbx, %rsi
callq 0xdd80
leaq 0x1236(%rip), %rsi      # 0x905c
movq %rbx, %rdi
callq 0xce9b
callq 0x51d8
callq 0x4e77
movb $0x1, %bl
jmp 0x7e03
// File: /workspace/github_c_makefile_star2_O1/bobrippling[P]tim/cmds.c
// Function: c_only
bool c_only(int argc, char **argv, bool force, struct range *range)
{
	RANGE_NO();
	ARGV_NO();

	if(!force && buffers_modified_excluding(buffers_cur(), NULL)){
		ui_err("another buffer has changes");
		return false;
	}

	window *iter;
	size_t count = 0;
	ITER_WINDOWS(iter)
		count++;

	if(count == 1)
		return true;

	window *const anchor = windows_cur();
	windows_set_cur(window_next(anchor));
	window_evict(anchor);

	/* must iterate manually to avoid accessing free'd memory */
	iter = window_topleftmost(windows_cur());
	window *next_right;
	for(window *h = iter; h; h = next_right){
		next_right = h->neighbours.right;

		window *next_below;
		for(iter = h; iter; iter = next_below){
			next_below = iter->neighbours.below;
			window_free(iter);
		}
	}

	windows_set_cur(anchor);

	ui_cur_changed();
	ui_redraw();

	return true;
}

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
testq %rcx, %rcx
je 0x7e52
movq (%rsi), %rsi
leaq 0x7458(%rip), %rdi      # 0xf2a8
jmp 0x7e8b
cmpl $0x1, %edi
jne 0x7e81
testb %dl, %dl
jne 0x7e9c
callq 0xde6c
movq (%rax), %rdi
xorl %esi, %esi
callq 0xd6ec
testq %rax, %rax
je 0x7e9c
leaq 0x74f9(%rip), %rdi      # 0xf36f
xorl %ebx, %ebx
xorl %eax, %eax
callq 0x4de2
jmp 0x7e94
movq (%rsi), %rsi
leaq 0x7438(%rip), %rdi      # 0xf2c3
xorl %ebx, %ebx
xorl %eax, %eax
callq 0x4de2
movl %ebx, %eax
popq %rbx
popq %r14
popq %r15
retq
callq 0xde6c
movq %rax, %rdi
callq 0xd869
testq %rax, %rax
je 0x7ed0
xorl %ecx, %ecx
movq %rax, %rdx
incq %rcx
movq 0x58(%rdx), %rdx
testq %rdx, %rdx
jne 0x7eb3
movq 0x50(%rax), %rax
testq %rax, %rax
jne 0x7eb0
movb $0x1, %bl
cmpq $0x1, %rcx
je 0x7e94
callq 0xde6c
movq %rax, %rbx
movq %rax, %rdi
callq 0xd848
movq %rax, %rdi
callq 0xde80
movq %rbx, %rdi
callq 0xd8c3
callq 0xde6c
movq %rax, %rdi
callq 0xd869
testq %rax, %rax
je 0x7f22
movq %rax, %r14
movq %r14, %rdi
movq 0x50(%r14), %r14
movq 0x58(%rdi), %r15
callq 0xdb87
movq %r15, %rdi
testq %r15, %r15
jne 0x7f0c
testq %r14, %r14
jne 0x7f05
movq %rbx, %rdi
callq 0xde80
callq 0x51d8
callq 0x4e77
movb $0x1, %bl
jmp 0x7e94
// File: /workspace/github_c_makefile_star2_O1/bobrippling[P]tim/cmds.c
// Function: c_all
bool c_all(int argc, char **argv, bool force, struct range *range)
{
	ARGV_NO();
	if(force){
		ui_err("usage: %s", *argv);
		return false;
	}

	if(!args_next_fname(false))
		ui_status("no remaining buffers");

	window *cur = windows_cur();
	for(;;){
		const char *fname = args_next_fname(true);
		if(!fname)
			break;

		buffer_t *buf;
		const char *err;
		buffer_new_fname(&buf, fname, &err);

		window *w = window_new(buf);
		buffer_release(buf);

		window_add_neighbour(cur, neighbour_down, w);

		cur = w;
	}

	ui_redraw();

	return true;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x18, %rsp
cmpl $0x1, %edi
jne 0x824e
testb %dl, %dl
je 0x8266
movq (%rsi), %rsi
leaq 0x706b(%rip), %rdi      # 0xf2c3
xorl %ebx, %ebx
xorl %eax, %eax
callq 0x4de2
jmp 0x82f2
xorl %edi, %edi
callq 0x47bc
testq %rax, %rax
jne 0x8280
leaq 0x7139(%rip), %rdi      # 0xf3b2
xorl %eax, %eax
callq 0x527a
callq 0xde6c
movq %rax, %r12
leaq 0x8(%rsp), %rbx
leaq 0x10(%rsp), %r14
leaq 0xdc3(%rip), %r15       # 0x905c
movl $0x1, %edi
callq 0x47bc
movq %rax, %r13
testq %rax, %rax
je 0x82e6
movq %rbx, %rdi
movq %r13, %rsi
movq %r14, %rdx
callq 0x91f5
movq 0x8(%rsp), %rdi
callq 0xdb45
movq %rax, %rbp
movq 0x8(%rsp), %rdi
movq %r15, %rsi
callq 0xce9b
movq %r12, %rdi
movl $0x1, %esi
movq %rbp, %rdx
callq 0xda27
movq %rbp, %r12
testq %r13, %r13
jne 0x8299
callq 0x4e77
movb $0x1, %bl
movl %ebx, %eax
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/cmds.c
// Function: c_tabe
bool c_tabe(int argc, char **argv, bool force, struct range *range)
{
	if(argc > 2){
		ui_err("usage: %s [path]", *argv);
		return false;
	}

	buffer_t *buf = buffer_new();

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

	tab->next = tabs_cur()->next;
	tabs_cur()->next = tab;

	tabs_set_cur(tab);

	if(argc == 1){
		/* empty tab - fine */
	}else if(argc == 2){
		return edit_common(argv[1], force);
	}

	ui_redraw();
	ui_cur_changed();

	return true;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
movq %rsi, %r14
cmpl $0x3, %edi
jl 0x8328
movq (%r14), %rsi
leaq 0x70aa(%rip), %rdi      # 0xf3c7
xorl %ebx, %ebx
xorl %eax, %eax
callq 0x4de2
jmp 0x839a
movl %edx, %ebx
movl %edi, %ebp
callq 0x907b
movq %rax, %r15
movq %rax, %rdi
callq 0xdb45
movq %rax, %rdi
callq 0xde98
movq %rax, %r12
leaq 0xd0e(%rip), %rsi       # 0x905c
movq %r15, %rdi
callq 0xce9b
callq 0xdf5c
movq 0x8(%rax), %rax
movq %rax, 0x8(%r12)
callq 0xdf5c
movq %r12, 0x8(%rax)
movq %r12, %rdi
callq 0xdf64
cmpl $0x2, %ebp
jne 0x838e
movq 0x8(%r14), %rdi
movzbl %bl, %esi
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
jmp 0x7407
callq 0x4e77
callq 0x51d8
movb $0x1, %bl
movl %ebx, %eax
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O1/bobrippling[P]tim/cmds.c
// Function: c_tabo
bool c_tabo(int argc, char **argv, bool force, struct range *range)
{
	RANGE_NO();
	ARGV_NO();

	tab *const tab_current = tabs_cur();

	if(!force){
		for(tab *tab = tabs_first(); tab; tab = tab->next){
			if(tab == tab_current)
				continue;

			window *win;
			ITER_WINDOWS_FROM(win, tab->win){
				buffer_t *buf = win->buf;

				/* if we contain this buffer, then it's fine */
				if(tab_contains_buffer(tab_current, buf))
					continue;

				if(buf->modified){
					ui_err("other tab contains modified buffer");
					return false;
				}
			}
		}
	}

	tab_evict(tab_current);

	tab *t = tabs_first();
	while(t){
		tab *next = t->next;

		assert(t != tab_current);
		tab_free(t);

		t = next;
	}

	tabs_set_cur(tab_current);
	tabs_set_first(tab_current);

	ui_redraw();
	ui_cur_changed();

	return false;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
testq %rcx, %rcx
je 0x83c4
movq (%rsi), %rsi
leaq 0x6ee9(%rip), %rdi      # 0xf2a8
jmp 0x84c4
cmpl $0x1, %edi
jne 0x84ba
movl %edx, %ebp
callq 0xdf5c
movq %rax, %rbx
testb %bpl, %bpl
jne 0x8473
callq 0xdf6c
testq %rax, %rax
je 0x8473
movq %rax, %r14
leaq 0x6fe0(%rip), %r15      # 0xf3d8
cmpq %rbx, %r14
je 0x846a
movq (%r14), %rdi
callq 0xd869
testq %rax, %rax
je 0x845c
movq %rax, %r12
movq %r12, %rbp
movq (%rbp), %r13
movq %rbx, %rdi
movq %r13, %rsi
callq 0xdf25
movl $0xa, %ecx
testb %al, %al
jne 0x8440
xorl %ecx, %ecx
cmpb $0x1, 0x39(%r13)
jne 0x8440
movq %r15, %rdi
xorl %eax, %eax
callq 0x4de2
movl $0x1, %ecx
cmpl $0xa, %ecx
je 0x8449
testl %ecx, %ecx
jne 0x8461
movq 0x58(%rbp), %rbp
testq %rbp, %rbp
jne 0x8410
movq 0x50(%r12), %r12
testq %r12, %r12
jne 0x840d
movl $0x5, %ecx
cmpl $0x5, %ecx
je 0x846a
testl %ecx, %ecx
jne 0x84cb
movq 0x8(%r14), %r14
testq %r14, %r14
jne 0x83f8
movq %rbx, %rdi
callq 0xdeeb
callq 0xdf6c
testq %rax, %rax
je 0x849e
movq %rax, %rdi
cmpq %rbx, %rdi
je 0x84dc
movq 0x8(%rdi), %r14
callq 0xdeb3
movq %r14, %rdi
testq %r14, %r14
jne 0x8488
movq %rbx, %rdi
callq 0xdf64
movq %rbx, %rdi
callq 0xdf74
callq 0x4e77
callq 0x51d8
jmp 0x84cb
movq (%rsi), %rsi
leaq 0x6dff(%rip), %rdi      # 0xf2c3
xorl %eax, %eax
callq 0x4de2
xorl %eax, %eax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
leaq 0x6f18(%rip), %rdi      # 0xf3fb
leaq 0x6f22(%rip), %rsi      # 0xf40c
leaq 0x6f22(%rip), %rcx      # 0xf413
movl $0x332, %edx            # imm = 0x332
callq 0x4210
// File: /workspace/github_c_makefile_star2_O1/bobrippling[P]tim/cmds.c
// Function: c_run
bool c_run(char *cmd, char *rest, bool force, struct range *range)
{
	if(range){
		/* filter */
		buffer_t *buf = buffers_cur();

		int err = list_filter(
				&buf->head,
				&(region_t){
					.type = REGION_LINE,
					.begin.y = range->start,
					.end.y = range->end,
				},
				rest);

		const int eno = errno;

		ui_redraw();

		if(err){
			ui_err("filter: %s", strerror(eno));
			return false;
		}

		return true;
	}

	int r = shellout(rest);

	if(r){
		ui_err("command returned %d", r);
		return false;
	}

	return true;
}

// Assembly:
pushq %rbp
pushq %r14
pushq %rbx
subq $0x20, %rsp
movq %rsi, %rbx
testq %rcx, %rcx
je 0x8573
movq %rcx, %r14
callq 0xde6c
movq (%rax), %rdi
addq $0x8, %rdi
xorl %eax, %eax
leaq 0xc(%rsp), %rsi
movl %eax, (%rsi)
movl (%r14), %ecx
movl %ecx, 0x4(%rsi)
movl %eax, 0x8(%rsi)
movl 0x4(%r14), %eax
movl %eax, 0xc(%rsi)
movl $0x2, 0x10(%rsi)
movq %rbx, %rdx
callq 0xa9b3
movl %eax, %ebx
callq 0x40a0
movl (%rax), %ebp
callq 0x4e77
testl %ebx, %ebx
sete %bl
je 0x8594
movl %ebp, %edi
callq 0x44e0
leaq 0x6d25(%rip), %rdi      # 0xf28a
xorl %ebx, %ebx
movq %rax, %rsi
xorl %eax, %eax
callq 0x4de2
jmp 0x8594
movq %rbx, %rdi
callq 0x459e
testl %eax, %eax
sete %bl
je 0x8594
leaq 0x6ebc(%rip), %rdi      # 0xf445
xorl %ebx, %ebx
movl %eax, %esi
xorl %eax, %eax
callq 0x4de2
movl %ebx, %eax
addq $0x20, %rsp
popq %rbx
popq %r14
popq %rbp
retq