LLM4Binary/decompile-bench-makefile huggingface dataset:
// File: /workspace/github_c_makefile_star2_O3/seanpringle[P]xoat/./spot.c
// Function: spot_try_focus_top_window
Window spot_try_focus_top_window(int spot, int mon, Window except)
{
	Window w = spot_focus_top_window(spot, mon, except);
	if (w == None)
	{
		current      = None;
		current_mon  = mon;
		current_spot = spot;
		update_bars();

		XSetInputFocus(display, PointerRoot, RevertToPointerRoot, CurrentTime);
	}
	return w;
}

// Assembly:
pushq %rbp
pushq %r14
pushq %rbx
movl %esi, %r14d
movl %edi, %ebp
callq 0x7c3a
movq %rax, %rbx
testq %rax, %rax
jne 0x7d09
movq $0x0, 0x6edb(%rip) # 0xebb8
movw %r14w, 0x7565(%rip)     # 0xf24a
movw %bp, 0x755c(%rip)       # 0xf248
callq 0x7aca
movq 0x6eb8(%rip), %rdi      # 0xebb0
movl $0x1, %esi
movl $0x1, %edx
xorl %ecx, %ecx
callq 0x33f0
movq %rbx, %rax
popq %rbx
popq %r14
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O3/seanpringle[P]xoat/./spot.c
// Function: spot_choose_by_direction
int spot_choose_by_direction(int spot, int mon, int dir)
{
	Monitor *m = &monitors[mon];
	int spot1_align = have_layout(mon) ? settings.layouts[mon].spot1_align : LEFT ;

	if (m->w < m->h) // rotated?
	{
		if (dir == LEFT)  return SPOT3;
		if (dir == RIGHT) return SPOT2;
		if (dir == UP)    return spot1_align == LEFT ? SPOT1: SPOT2;
		if (dir == DOWN)  return spot1_align == LEFT ? SPOT2: SPOT1;
		return spot;
	}
	if (dir == UP)    return SPOT2;
	if (dir == DOWN)  return SPOT3;
	if (dir == LEFT)  return spot1_align == LEFT ? SPOT1: SPOT2;
	if (dir == RIGHT) return spot1_align == LEFT ? SPOT2: SPOT1;
	return spot;
}

// Assembly:
movl %edi, %eax
movslq %esi, %rdi
leaq (%rdi,%rdi,8), %rcx
leaq 0x6e9f(%rip), %rsi      # 0xebc0
leaq (%rsi,%rcx,8), %rsi
movb $0x1, %cl
cmpl %edi, 0x74e3(%rip)      # 0xf210
jbe 0x7d3f
movq 0x74e2(%rip), %rcx      # 0xf218
cmpw $0x1, 0x2(%rcx,%rdi,8)
sete %cl
movzwl 0x4(%rsi), %edi
cmpw 0x6(%rsi), %di
jge 0x7d60
decl %edx
cmpl $0x3, %edx
ja 0x7d87
leaq 0x22ed(%rip), %rax      # 0xa044
movslq (%rax,%rdx,4), %rdx
addq %rax, %rdx
jmpq *%rdx
decl %edx
cmpl $0x3, %edx
ja 0x7d87
leaq 0x22c6(%rip), %rax      # 0xa034
movslq (%rax,%rdx,4), %rdx
addq %rax, %rdx
jmpq *%rdx
movzbl %cl, %ecx
movl $0x2, %eax
subl %ecx, %eax
retq
movzbl %cl, %eax
incl %eax
retq
movl $0x2, %eax
retq
movl $0x3, %eax
retq
// File: /workspace/github_c_makefile_star2_O3/seanpringle[P]xoat/./spot.c
// Function: spot_stack_clients
int spot_stack_clients(int spot, int mon, Stack *stk)
{
	int i; Client *c;
	for_windows(i, c) if (c->manage && c->spot == spot && c->monitor == mon)
		client_stack_family(c, stk);
	return stk->depth;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
movq %rdx, %rbx
movl %esi, %ebp
movl %edi, %r14d
callq 0x604f
movzwl 0x6f83(%rip), %eax      # 0xeda0
testw %ax, %ax
jle 0x7e72
movslq %r14d, %r14
xorl %r15d, %r15d
leaq 0x6f71(%rip), %r12      # 0xeda0
movq 0x8(%r12,%r15,8), %rdi
testq %rdi, %rdi
je 0x7e66
cmpw $0x0, 0x104(%rdi)
je 0x7e66
cmpq %r14, 0x118(%rdi)
jne 0x7e66
movswl 0x100(%rdi), %ecx
cmpl %ebp, %ecx
jne 0x7e66
movq %rbx, %rsi
callq 0x7042
movzwl 0x6f3a(%rip), %eax      # 0xeda0
incq %r15
movswq %ax, %rcx
cmpq %rcx, %r15
jl 0x7e2f
movswl (%rbx), %eax
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O3/seanpringle[P]xoat/./event.c
// Function: create_notify
void create_notify(XEvent *e)
{
	Client *c = window_build_client(e->xcreatewindow.window);
	if (c && c->manage)
		window_listen(c->window);
	client_free(c);
}

// Assembly:
pushq %rbx
movq 0x28(%rdi), %rdi
callq 0x6145
movq %rax, %rbx
testq %rax, %rax
je 0x7eae
cmpw $0x0, 0x104(%rbx)
je 0x7eae
movq (%rbx), %rsi
movq 0x6d0c(%rip), %rdi      # 0xebb0
movl $0x600030, %edx         # imm = 0x600030
callq 0x33e0
movq %rbx, %rdi
popq %rbx
jmp 0x6901
// File: /workspace/github_c_makefile_star2_O3/seanpringle[P]xoat/./event.c
// Function: configure_request
void configure_request(XEvent *ev)
{
	XConfigureRequestEvent *e = &ev->xconfigurerequest;
	Client *c = window_build_client(e->window);
	if (c && c->manage && c->visible && !c->transient)
	{
		client_update_border(c);
		client_place_spot(c, c->spot, c->monitor, 0);
	}
	else
	if (c)
	{
		XWindowChanges wc;
		if (e->value_mask & CWX) wc.x = e->x;
		if (e->value_mask & CWY) wc.y = e->y;
		if (e->value_mask & CWWidth)  wc.width  = e->width;
		if (e->value_mask & CWHeight) wc.height = e->height;
		if (e->value_mask & CWStackMode)   wc.stack_mode   = e->detail;
		if (e->value_mask & CWBorderWidth) wc.border_width = settings.border;
		XConfigureWindow(display, c->window, e->value_mask, &wc);
	}
	client_free(c);
}

// Assembly:
pushq %r14
pushq %rbx
subq $0x28, %rsp
movq %rdi, %r14
movq 0x28(%rdi), %rdi
callq 0x6145
movq %rax, %rbx
testq %rax, %rax
je 0x7f59
cmpw $0x0, 0x104(%rbx)
je 0x7ef4
cmpw $0x0, 0x102(%rbx)
je 0x7ef4
cmpq $0x0, 0x90(%rbx)
je 0x7f69
movq 0x58(%r14), %rdx
testb $0x1, %dl
je 0x7f04
movl 0x30(%r14), %eax
movl %eax, (%rsp)
testb $0x2, %dl
je 0x7f11
movl 0x34(%r14), %eax
movl %eax, 0x4(%rsp)
testb $0x4, %dl
je 0x7f1e
movl 0x38(%r14), %eax
movl %eax, 0x8(%rsp)
testb $0x8, %dl
je 0x7f2b
movl 0x3c(%r14), %eax
movl %eax, 0xc(%rsp)
testb $0x40, %dl
je 0x7f38
movl 0x50(%r14), %eax
movl %eax, 0x20(%rsp)
testb $0x10, %dl
je 0x7f47
movl 0x727d(%rip), %eax      # 0xf1c0
movl %eax, 0x10(%rsp)
movq 0x6c62(%rip), %rdi      # 0xebb0
movq (%rbx), %rsi
movq %rsp, %rcx
callq 0x30c0
movq %rbx, %rdi
callq 0x6901
addq $0x28, %rsp
popq %rbx
popq %r14
retq
movq %rbx, %rdi
callq 0x6afa
movl 0x118(%rbx), %esi
movswl 0x100(%rbx), %edx
movq %rbx, %rdi
xorl %ecx, %ecx
callq 0x6c47
jmp 0x7f59
// File: /workspace/github_c_makefile_star2_O3/seanpringle[P]xoat/./event.c
// Function: configure_notify
void configure_notify(XEvent *e)
{
	Client *c = window_build_client(e->xconfigure.window);
	if (c && c->manage)
	{
		while (XCheckTypedEvent(display, ConfigureNotify, e));
		ewmh_client_list();
		update_bars();
		menu_update();
	}
	client_free(c);
}

// Assembly:
pushq %r14
pushq %rbx
pushq %rax
movq %rdi, %r14
movq 0x28(%rdi), %rdi
callq 0x6145
movq %rax, %rbx
testq %rax, %rax
je 0x7fe6
cmpw $0x0, 0x104(%rbx)
je 0x7fe6
movq 0x6bfd(%rip), %rdi      # 0xebb0
movl $0x16, %esi
movq %r14, %rdx
callq 0x31b0
testl %eax, %eax
jne 0x7fac
callq 0x6920
callq 0x7aca
movq 0x726b(%rip), %rax      # 0xf240
movq 0x648(%rax), %rdi
testq %rdi, %rdi
je 0x7fe6
callq 0x5113
movq %rbx, %rdi
addq $0x8, %rsp
popq %rbx
popq %r14
jmp 0x6901
// File: /workspace/github_c_makefile_star2_O3/seanpringle[P]xoat/./event.c
// Function: map_request
void map_request(XEvent *e)
{
	Client *c = window_build_client(e->xmaprequest.window);
	if (c && c->manage)
	{
		c->monitor = current_mon;
		Monitor *m = &monitors[c->monitor];
		int spot = have_layout(c->monitor) ? settings.layouts[c->monitor].spot_start: SMART;

		if (spot == CURRENT)
		{
			spot = current_spot;
		}
		if (spot == SMART) // find spot of best fit
		{
			int i; spot = SPOT1; for_spots_rev(i)
				if (c->attr.width <= m->spots[i].w && c->attr.height <= m->spots[i].h)
					{ spot = i; break; }
		}
		client_place_spot(c, spot, c->monitor, 0);
		client_update_border(c);
	}
	if (c) XMapWindow(display, c->window);
	client_free(c);
}

// Assembly:
pushq %rbx
movq 0x28(%rdi), %rdi
callq 0x6145
testq %rax, %rax
je 0x808a
movq %rax, %rbx
cmpw $0x0, 0x104(%rax)
je 0x80a5
movswl 0x722a(%rip), %edx      # 0xf24a
movw %dx, 0x100(%rbx)
movslq %edx, %rcx
cmpl %ecx, 0x71e0(%rip)      # 0xf210
jbe 0x8050
movq 0x71df(%rip), %rax      # 0xf218
movzwl (%rax,%rcx,8), %eax
cmpw $0x4, %ax
jne 0x804a
movzwl 0x71fe(%rip), %eax      # 0xf248
cmpw $0x5, %ax
jne 0x8090
movl 0x10(%rbx), %eax
leaq (%rcx,%rcx,8), %rcx
leaq 0x6b62(%rip), %rsi      # 0xebc0
leaq (%rsi,%rcx,8), %rcx
movl $0x4, %esi
movswl 0x4(%rcx,%rsi,8), %edi
cmpl %edi, %eax
jg 0x807a
movswl 0x6(%rcx,%rsi,8), %edi
cmpl %edi, 0x14(%rbx)
jle 0x808c
decq %rsi
cmpq $0x1, %rsi
ja 0x8067
movl $0x1, %esi
jmp 0x8093
popq %rbx
retq
decl %esi
jmp 0x8093
movswl %ax, %esi
movq %rbx, %rdi
xorl %ecx, %ecx
callq 0x6c47
movq %rbx, %rdi
callq 0x6afa
movq 0x6b04(%rip), %rdi      # 0xebb0
movq (%rbx), %rsi
callq 0x3350
movq 0x128(%rbx), %rdi
callq 0x3220
movq %rbx, %rdi
popq %rbx
jmp 0x3220
// File: /workspace/github_c_makefile_star2_O3/seanpringle[P]xoat/./event.c
// Function: map_notify
void map_notify(XEvent *e)
{
	Client *a = NULL, *c = window_build_client(e->xmap.window);
	if (c && c->manage)
	{
		client_raise_family(c);
		client_update_border(c);
		client_set_focus(c);
		client_free(a);
		ewmh_client_list();
		update_bars();
		menu_update();
	}
	client_free(c);
}

// Assembly:
pushq %rbx
movq 0x28(%rdi), %rdi
callq 0x6145
movq %rax, %rbx
testq %rax, %rax
je 0x811f
cmpw $0x0, 0x104(%rbx)
je 0x811f
movq %rbx, %rdi
callq 0x70f4
movq %rbx, %rdi
callq 0x6afa
movq %rbx, %rdi
callq 0x72e5
callq 0x6920
callq 0x7aca
movq 0x7132(%rip), %rax      # 0xf240
movq 0x648(%rax), %rdi
testq %rdi, %rdi
je 0x811f
callq 0x5113
movq %rbx, %rdi
popq %rbx
jmp 0x6901
// File: /workspace/github_c_makefile_star2_O3/seanpringle[P]xoat/./event.c
// Function: unmap_notify
void unmap_notify(XEvent *e)
{
	// if this window was focused, find something else
	if (e->xunmap.window == current && !spot_focus_top_window(current_spot, current_mon, current))
	{
		int i; for_spots(i)
			if (spot_focus_top_window(i, current_mon, current)) break;
	}
	ewmh_client_list();
	update_bars();
	menu_update();
}

// Assembly:
pushq %rbx
movq 0x28(%rdi), %rdx
cmpq 0x6a84(%rip), %rdx      # 0xebb8
jne 0x8177
movswl 0x710b(%rip), %edi      # 0xf248
movswl 0x7106(%rip), %esi      # 0xf24a
callq 0x7c3a
testq %rax, %rax
jne 0x8177
movl $0x1, %ebx
movswl 0x70f0(%rip), %esi      # 0xf24a
movq 0x6a57(%rip), %rdx      # 0xebb8
movl %ebx, %edi
callq 0x7c3a
testq %rax, %rax
jne 0x8177
leal 0x1(%rbx), %eax
cmpl $0x3, %ebx
movl %eax, %ebx
jne 0x8153
callq 0x6920
callq 0x7aca
movq 0x70b8(%rip), %rax      # 0xf240
movq 0x648(%rax), %rdi
testq %rdi, %rdi
je 0x819a
popq %rbx
jmp 0x5113
popq %rbx
retq
// File: /workspace/github_c_makefile_star2_O3/seanpringle[P]xoat/./event.c
// Function: key_press
void key_press(XEvent *ev)
{
	XKeyEvent *e = &ev->xkey;
	latest_action = e->time;
	KeySym key = XkbKeycodeToKeysym(display, e->keycode, 0, 0);
	unsigned int state = e->state & ~(LockMask|NumlockMask);
	while (XCheckTypedEvent(display, KeyPress, ev));

	if (menu && menu->mb && menu->mb->window == e->window)
	{
		int rc = menubox_keypress(menu->mb, ev);
		menu_update();

		if (rc == -2)
			menu_close();

		if (rc == -1)
			menu_select();

		return;
	}

	Binding *bind = NULL;
	for (int i = 0; i < settings.binding_count && !bind; i++)
		if (settings.bindings[i].key == key && (settings.bindings[i].mod == AnyModifier || settings.bindings[i].mod == state))
			bind = &settings.bindings[i];

	if (bind && bind->act)
	{
		Client *cli = window_build_client(current);
		bind->act(bind->data, bind->num, cli);
		client_free(cli);
		update_bars();
		menu_update();
	}
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %rbx
pushq %rax
movq %rdi, %r14
movq 0x38(%rdi), %rax
movq %rax, 0x6be7(%rip)      # 0xed98
movq 0x69f8(%rip), %rdi      # 0xebb0
movzbl 0x54(%r14), %esi
xorl %edx, %edx
xorl %ecx, %ecx
callq 0x31d0
movq %rax, %rbx
movl 0x50(%r14), %r15d
movl 0x7079(%rip), %ebp      # 0xf24c
notl %ebp
andl $-0x3, %ebp
movq 0x69d1(%rip), %rdi      # 0xebb0
movl $0x2, %esi
movq %r14, %rdx
callq 0x31b0
testl %eax, %eax
jne 0x81d8
movq 0x7049(%rip), %rax      # 0xf240
testq %rax, %rax
je 0x8255
movq 0x648(%rax), %rdi
testq %rdi, %rdi
je 0x8255
movq 0x8(%rdi), %rax
cmpq 0x20(%r14), %rax
jne 0x8255
movq %r14, %rsi
callq 0x53fe
movl %eax, %ebx
movq 0x701d(%rip), %rax      # 0xf240
movq 0x648(%rax), %rdi
testq %rdi, %rdi
je 0x8234
callq 0x5113
cmpl $-0x1, %ebx
je 0x8309
cmpl $-0x2, %ebx
jne 0x82fe
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
jmp 0x7401
movl 0x6fc5(%rip), %eax      # 0xf220
testq %rax, %rax
je 0x82fe
andl %r15d, %ebp
movl $0x1, %ecx
movq 0x6fb5(%rip), %rdx      # 0xf228
cmpq %rbx, 0x8(%rdx)
jne 0x8291
movl (%rdx), %esi
movq %rdx, %r14
cmpl %ebp, %esi
je 0x8285
xorl %r14d, %r14d
cmpl $0x8000, %esi           # imm = 0x8000
cmoveq %rdx, %r14
jmp 0x8294
xorl %r14d, %r14d
cmpq %rax, %rcx
jae 0x82a5
addq $0x28, %rdx
incq %rcx
testq %r14, %r14
je 0x8273
testq %r14, %r14
je 0x82fe
cmpq $0x0, 0x10(%r14)
je 0x82fe
movq 0x6900(%rip), %rdi      # 0xebb8
callq 0x6145
movq %rax, %rbx
movq 0x18(%r14), %rdi
movl 0x20(%r14), %esi
movq %rax, %rdx
callq *0x10(%r14)
movq %rbx, %rdi
callq 0x6901
callq 0x7aca
movq 0x6f5d(%rip), %rax      # 0xf240
movq 0x648(%rax), %rdi
testq %rdi, %rdi
je 0x82fe
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
jmp 0x5113
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
jmp 0x745f
// File: /workspace/github_c_makefile_star2_O3/seanpringle[P]xoat/./event.c
// Function: button_press
void button_press(XEvent *ev)
{
	int i, j; Monitor *m;
	XButtonEvent *e = &ev->xbutton;
	latest_action = e->time;
	Client *c = window_build_client(e->subwindow);
	if (c && c->manage)
		client_activate(c);
	else
	if (settings.title)
		for_monitors(i, m) for_spots(j)
			if (m->bars[i] && m->bars[j]->window == e->subwindow)
				spot_focus_top_window(j, i, None);
	client_free(c);
	XAllowEvents(display, ReplayPointer, latest_action);
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movq %rdi, %r14
movq 0x38(%rdi), %rax
movq %rax, 0x6a67(%rip)      # 0xed98
movq 0x30(%rdi), %rdi
callq 0x6145
testq %rax, %rax
movq %rax, (%rsp)
je 0x8362
movq %rax, %rbx
cmpw $0x0, 0x104(%rax)
je 0x8362
movq %rbx, %rdi
callq 0x70f4
movq %rbx, %rdi
callq 0x72e5
jmp 0x83dd
cmpq $0x0, 0x6e7e(%rip)      # 0xf1e8
je 0x83dd
cmpl $0x0, 0x63fd(%rip)      # 0xe770
jle 0x83dd
leaq 0x6874(%rip), %r12      # 0xebf0
xorl %r15d, %r15d
leaq 0x683a(%rip), %r13      # 0xebc0
leaq (%r15,%r15,8), %rax
leaq (,%rax,8), %rax
addq %r13, %rax
leaq (%rax,%r15,8), %rbp
addq $0x28, %rbp
xorl %ebx, %ebx
cmpq $0x0, (%rbp)
je 0x83c1
movq (%r12,%rbx,8), %rax
movq 0x8(%rax), %rax
cmpq 0x30(%r14), %rax
jne 0x83c1
leal 0x1(%rbx), %edi
movl %r15d, %esi
xorl %edx, %edx
callq 0x7c3a
incq %rbx
cmpq $0x3, %rbx
jne 0x839f
incq %r15
movslq 0x639c(%rip), %rax      # 0xe770
addq $0x48, %r12
cmpq %rax, %r15
jl 0x8386
movq (%rsp), %rdi
callq 0x6901
movq 0x67c3(%rip), %rdi      # 0xebb0
movq 0x69a4(%rip), %rdx      # 0xed98
movl $0x2, %esi
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
jmp 0x3340
// File: /workspace/github_c_makefile_star2_O3/seanpringle[P]xoat/./event.c
// Function: client_message
void client_message(XEvent *ev)
{
	XClientMessageEvent *e = &ev->xclient;
	if (e->message_type == atoms[XOAT_EXIT])
	{
		warnx("exit!");
		exit(EXIT_SUCCESS);
	}
	if (e->message_type == atoms[XOAT_RESTART])
	{
		warnx("restart!");
		EXECSH(self);
	}
	Client *c = window_build_client(e->window);
	if (c && c->manage)
	{
		if (e->message_type == atoms[_NET_ACTIVE_WINDOW])
		{
			client_activate(c);
		}
		else
		if (e->message_type == atoms[_NET_CLOSE_WINDOW])
		{
			action_close(NULL, 0, c);
		}
	}
	client_free(c);
}

// Assembly:
pushq %r14
pushq %rbx
pushq %rax
movq 0x28(%rdi), %rax
cmpq 0x688d(%rip), %rax      # 0xeca8
je 0x84bc
movq %rdi, %rbx
cmpq 0x6885(%rip), %rax      # 0xecb0
jne 0x8461
leaq 0x1fa4(%rip), %rdi      # 0xa3d8
xorl %eax, %eax
callq 0x30f0
movq 0x6e0e(%rip), %rcx      # 0xf250
leaq 0x1f73(%rip), %rdi      # 0xa3bc
leaq 0x1f71(%rip), %rsi      # 0xa3c1
leaq 0x1f6d(%rip), %rdx      # 0xa3c4
xorl %r8d, %r8d
xorl %eax, %eax
callq 0x3190
movq 0x20(%rbx), %rdi
callq 0x6145
movq %rax, %r14
testq %rax, %rax
je 0x84ad
cmpw $0x0, 0x104(%r14)
je 0x84ad
movq 0x28(%rbx), %rax
cmpq 0x6840(%rip), %rax      # 0xecc8
jne 0x849c
movq %r14, %rdi
callq 0x70f4
movq %r14, %rdi
callq 0x72e5
jmp 0x84ad
cmpq 0x682d(%rip), %rax      # 0xecd0
jne 0x84ad
movq %r14, %rdx
callq 0x5680
movq %r14, %rdi
addq $0x8, %rsp
popq %rbx
popq %r14
jmp 0x6901
leaq 0x1f0f(%rip), %rdi      # 0xa3d2
xorl %eax, %eax
callq 0x30f0
xorl %edi, %edi
callq 0x3100
// File: /workspace/github_c_makefile_star2_O3/seanpringle[P]xoat/./event.c
// Function: property_notify
void property_notify(XEvent *ev)
{
	XPropertyEvent *e = &ev->xproperty;

	Client *c = window_build_client(e->window);
	if (e->window == root && e->atom == atoms[WM_NAME])
	{
		// root name appears in SPOT1 bar, for status etc
		update_bars();
		menu_update();
	}
	else
	if (c && c->visible && c->manage)
	{
		client_update_border(c);
		if (e->atom == atoms[WM_NAME] || e->atom == atoms[_NET_WM_NAME])
			spot_update_bar(c->spot, c->monitor);
	}
	client_free(c);

	// prevent spam
	while (XCheckTypedWindowEvent(display, ev->xproperty.window, PropertyNotify, ev));
}

// Assembly:
pushq %r14
pushq %rbx
pushq %rax
movq %rdi, %rbx
movq 0x20(%rdi), %rdi
callq 0x6145
movq %rax, %r14
movq 0x20(%rbx), %rax
cmpq 0x6cb9(%rip), %rax      # 0xf1a8
jne 0x851d
movq 0x28(%rbx), %rax
cmpq 0x6874(%rip), %rax      # 0xed70
jne 0x851d
callq 0x7aca
movq 0x6d36(%rip), %rax      # 0xf240
movq 0x648(%rax), %rdi
testq %rdi, %rdi
je 0x856a
callq 0x5113
jmp 0x856a
testq %r14, %r14
je 0x856a
cmpw $0x0, 0x102(%r14)
je 0x856a
cmpw $0x0, 0x104(%r14)
je 0x856a
movq %r14, %rdi
callq 0x6afa
movq 0x28(%rbx), %rax
cmpq 0x6825(%rip), %rax      # 0xed70
je 0x8556
cmpq 0x679c(%rip), %rax      # 0xecf0
jne 0x856a
movl 0x118(%r14), %edi
movswl 0x100(%r14), %esi
callq 0x782b
movq %r14, %rdi
callq 0x6901
movq 0x6637(%rip), %rdi      # 0xebb0
movq 0x20(%rbx), %rsi
movl $0x1c, %edx
movq %rbx, %rcx
callq 0x30d0
testl %eax, %eax
jne 0x8572
addq $0x8, %rsp
popq %rbx
popq %r14
retq
// File: /workspace/github_c_makefile_star2_O3/seanpringle[P]xoat/./event.c
// Function: any_event
void any_event(XEvent *e)
{
	Client *c = window_build_client(e->xany.window);
	if (c && c->visible && c->manage)
		client_update_border(c);
	client_free(c);
}

// Assembly:
pushq %rbx
movq 0x20(%rdi), %rdi
callq 0x6145
movq %rax, %rbx
testq %rax, %rax
je 0x8600
cmpw $0x0, 0x102(%rbx)
je 0x8600
cmpw $0x0, 0x104(%rbx)
je 0x8600
movq %rbx, %rdi
callq 0x6afa
movq %rbx, %rdi
popq %rbx
jmp 0x6901
// File: /workspace/github_c_makefile_star2_O3/seanpringle[P]xoat/./action.c
// Function: action_move
void action_move(void *data, int num, Client *cli)
{
	if (!cli) return;
	client_place_spot(cli, num, cli->monitor, 1);
	client_raise_family(cli);
	current_spot = cli->spot; current_mon = cli->monitor;
	spot_warp_pointer(cli->spot, cli->monitor);
}

// Assembly:
testq %rdx, %rdx
je 0x8650
pushq %rbx
movq %rdx, %rbx
movswl 0x100(%rdx), %edx
movq %rbx, %rdi
movl $0x1, %ecx
callq 0x6c47
movq %rbx, %rdi
callq 0x70f4
movq 0x118(%rbx), %rdi
movw %di, 0x6c0c(%rip)       # 0xf248
movswl 0x100(%rbx), %esi
movw %si, 0x6c00(%rip)       # 0xf24a
popq %rbx
jmp 0x7b08
retq
// File: /workspace/github_c_makefile_star2_O3/seanpringle[P]xoat/./action.c
// Function: action_find_or_start
void action_find_or_start(void *data, int num, Client *cli)
{
	int i; Client *c; char *class = data;
	for_windows(i, c)
		if (c->visible && c->manage && c->class && strcasestr(c->class, class))
			{ client_activate(c); spot_warp_pointer(c->spot, c->monitor); return; }
	exec_cmd(class);
}

// Assembly:
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
movq %rdi, %rbx
callq 0x604f
movswq 0x6711(%rip), %r15      # 0xeda0
testq %r15, %r15
jle 0x86df
xorl %r12d, %r12d
leaq 0x6702(%rip), %r13      # 0xeda0
movq 0x8(%r13,%r12,8), %r14
testq %r14, %r14
je 0x86d7
cmpw $0x0, 0x102(%r14)
je 0x86d7
cmpw $0x0, 0x104(%r14)
je 0x86d7
movq 0x128(%r14), %rdi
testq %rdi, %rdi
je 0x86d7
movq %rbx, %rsi
callq 0x3060
testq %rax, %rax
jne 0x86f0
incq %r12
cmpq %r12, %r15
jne 0x869e
movq %rbx, %rdi
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
jmp 0x58dc
movq %r14, %rdi
callq 0x70f4
movq %r14, %rdi
callq 0x72e5
movl 0x118(%r14), %edi
movswl 0x100(%r14), %esi
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
jmp 0x7b08
// File: /workspace/github_c_makefile_star2_O3/seanpringle[P]xoat/./action.c
// Function: action_move_monitor
void action_move_monitor(void *data, int num, Client *cli)
{
	if (!cli) return;
	cli->monitor = monitor_choose_by_direction(current_mon, num);
	client_place_spot(cli, cli->spot, cli->monitor, 1);
	client_raise_family(cli);
	current_mon = cli->monitor;
	spot_warp_pointer(cli->spot, cli->monitor);
}

// Assembly:
testq %rdx, %rdx
je 0x8771
pushq %rbx
movq %rdx, %rbx
movswl 0x6b1d(%rip), %edi      # 0xf24a
callq 0x5937
movw %ax, 0x100(%rbx)
movl 0x118(%rbx), %esi
movswl %ax, %edx
movq %rbx, %rdi
movl $0x1, %ecx
callq 0x6c47
movq %rbx, %rdi
callq 0x70f4
movswl 0x100(%rbx), %esi
movw %si, 0x6ae5(%rip)       # 0xf24a
movl 0x118(%rbx), %edi
popq %rbx
jmp 0x7b08
retq
// File: /workspace/github_c_makefile_star2_O3/seanpringle[P]xoat/./action.c
// Function: action_focus_monitor
void action_focus_monitor(void *data, int num, Client *cli)
{
	int i, mon = monitor_choose_by_direction(current_mon, num);
	if (!spot_focus_top_window(current_spot, mon, None))
		for_spots(i) if (spot_focus_top_window(i, mon, None)) break;
	spot_warp_pointer(current_spot, current_mon);
}

// Assembly:
pushq %r14
pushq %rbx
pushq %rax
movswl 0x6acd(%rip), %edi      # 0xf24a
callq 0x5937
movl %eax, %ebx
movswl 0x6abd(%rip), %edi      # 0xf248
movl %eax, %esi
xorl %edx, %edx
callq 0x7c3a
testq %rax, %rax
jne 0x87bd
movl $0x1, %r14d
movl %r14d, %edi
movl %ebx, %esi
xorl %edx, %edx
callq 0x7c3a
testq %rax, %rax
jne 0x87bd
leal 0x1(%r14), %eax
cmpl $0x3, %r14d
movl %eax, %r14d
jne 0x879f
movswl 0x6a84(%rip), %edi      # 0xf248
movswl 0x6a7f(%rip), %esi      # 0xf24a
addq $0x8, %rsp
popq %rbx
popq %r14
jmp 0x7b08
// File: /workspace/github_c_makefile_star2_O3/seanpringle[P]xoat/xoat.c
// Function: oops
int oops(Display *d, XErrorEvent *ee)
{
	if (ee->error_code == BadWindow
		|| (ee->request_code == X_SetInputFocus   && ee->error_code == BadMatch)
		|| (ee->request_code == X_ConfigureWindow && ee->error_code == BadMatch)
		|| (ee->request_code == X_ConfigureWindow && ee->error_code == BadValue)
		|| (ee->request_code == X_GrabButton      && ee->error_code == BadAccess)
		|| (ee->request_code == X_GrabKey         && ee->error_code == BadAccess)
		) return 0;
	fprintf(stderr, "error: request code=%d, error code=%d\n", ee->request_code, ee->error_code);
	return xerror(display, ee);
}

// Assembly:
pushq %rbx
movzbl 0x20(%rsi), %ecx
cmpl $0x3, %ecx
je 0x9aa4
movq %rsi, %rbx
movzbl 0x21(%rsi), %edx
movl %edx, %eax
xorb $0x2a, %al
movl %ecx, %esi
xorb $0x8, %sil
orb %al, %sil
je 0x9aa4
cmpl $0x21, %edx
je 0x9a9f
cmpl $0x1c, %edx
je 0x9a9f
cmpl $0xc, %edx
jne 0x9a73
cmpl $0x2, %ecx
je 0x9aa4
cmpl $0x8, %ecx
je 0x9aa4
movq 0x456e(%rip), %rax      # 0xdfe8
movq (%rax), %rdi
leaq 0x10b1(%rip), %rsi      # 0xab35
xorl %eax, %eax
callq 0x3660
movq 0x57ce(%rip), %rax      # 0xf260
movq 0x5117(%rip), %rdi      # 0xebb0
movq %rbx, %rsi
popq %rbx
jmpq *%rax
cmpl $0xa, %ecx
jne 0x9a73
xorl %eax, %eax
popq %rbx
retq
// File: /workspace/github_c_makefile_star2_O3/mjosaarinen[P]brutus/crypto_aead/aes256otrpv3/ni_p8m1/encrypt.c
// Function: crypto_aead_decrypt
int crypto_aead_decrypt(
	unsigned char *m, unsigned long long *mlen,
	unsigned char *nsec,
	const unsigned char *c, unsigned long long clen,
	const unsigned char *ad, unsigned long long adlen,
	const unsigned char *npub,
	const unsigned char *k
	)
{
	uint8 loctag[BLOCK];
	block TA = _mm_setzero_si128(), TE;

	*mlen = clen - CRYPTO_ABYTES;
	Setup(k);
#if (ADP==Para)
	if ((uint32)adlen > 0){
		TA = AFunc(ad, (uint32)adlen);
	}
	TE = DFunc(npub, CRYPTO_NPUBBYTES, c,
		(uint32)clen - CRYPTO_ABYTES, CRYPTO_ABYTES, m);
	TE = _mm_xor_si128(TE, TA);
#else 
	if ((uint32)adlen > 0){
		TA = AFuncS(ad, (uint32)adlen);
	}
	TE = DFunc(npub, CRYPTO_NPUBBYTES, TA, c,
		(uint32)clen - CRYPTO_ABYTES, CRYPTO_ABYTES, m);
#endif
	memcpy(loctag, (uint8*)&TE, CRYPTO_ABYTES);
	if (memcmp(loctag, c + (uint32)*mlen, CRYPTO_ABYTES) != 0){//non-constant-time compare
		return TAG_UNMATCH; //-1
	}
	return TAG_MATCH; //0
}

// Assembly:
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x20, %rsp
movq %r8, %r15
movq %rcx, %rbx
movq %rsi, %r14
movq %rdi, %r12
movq 0x58(%rsp), %r13
movl 0x50(%rsp), %esi
leaq -0x10(%r8), %rax
movq %rax, (%r14)
movq 0x5023(%rip), %rax      # 0x7ff0
vmovdqa (%rax), %xmm0
vaesenc 0x10(%rax), %xmm0, %xmm0
vaesenc 0x20(%rax), %xmm0, %xmm0
vaesenc 0x30(%rax), %xmm0, %xmm0
vaesenc 0x40(%rax), %xmm0, %xmm0
vaesenc 0x50(%rax), %xmm0, %xmm0
vaesenc 0x60(%rax), %xmm0, %xmm0
vaesenc 0x70(%rax), %xmm0, %xmm0
vaesenc 0x80(%rax), %xmm0, %xmm0
vaesenc 0x90(%rax), %xmm0, %xmm0
vaesenc 0xa0(%rax), %xmm0, %xmm0
vaesenc 0xb0(%rax), %xmm0, %xmm0
vaesenc 0xc0(%rax), %xmm0, %xmm0
vaesenc 0xd0(%rax), %xmm0, %xmm0
vaesenclast 0xe0(%rax), %xmm0, %xmm0
movq 0x4f9f(%rip), %rax      # 0x7fe0
vmovdqa %xmm0, (%rax)
testl %esi, %esi
je 0x3053
movq %r9, %rdi
callq 0x1080
jmp 0x3057
vpxor %xmm0, %xmm0, %xmm0
vmovdqa %xmm0, (%rsp)
addl $-0x10, %r15d
movq %r13, %rdi
movl $0xc, %esi
movq %rbx, %rdx
movl %r15d, %ecx
movl $0x10, %r8d
movq %r12, %r9
callq 0x1060
vpxor (%rsp), %xmm0, %xmm0
vmovdqa %xmm0, 0x10(%rsp)
movl (%r14), %eax
vmovdqa 0x10(%rsp), %xmm0
vpxor (%rbx,%rax), %xmm0, %xmm0
xorl %eax, %eax
vptest %xmm0, %xmm0
setne %al
negl %eax
addq $0x20, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
retq
nop
// File: /workspace/github_c_makefile_star2_O3/ls4154[P]hash-c/sha1.c
// Function: sha1_iterate
static void _sha1_iterate(struct sha1_ctx *ctx, byte_t *chunk)
{
	word_t w[80];

	for (int i = 0; i < 16; ++i) {
		w[i] = 0;
		for (int j = 0; j < 4; ++j)
			w[i] |= (word_t)*(chunk + 4 * i + j) << 8 * (3 - j);
	}

#ifdef SHA0
	for (int i = 16; i < 80; ++i)
		w[i] = w[i - 3] ^ w[i - 8] ^ w[i - 14] ^ w[i - 16];
#else
	for (int i = 16; i < 80; ++i)
		w[i] = ROL(w[i - 3] ^ w[i - 8] ^ w[i - 14] ^ w[i - 16], 1);
#endif

	word_t a = ctx->h[0];
	word_t b = ctx->h[1];
	word_t c = ctx->h[2];
	word_t d = ctx->h[3];
	word_t e = ctx->h[4];

	for (int i = 0; i < 80; ++i) {
		word_t tmp;
		word_t k;

		switch (i / 20) {
		case 0:
			tmp = (b & c) | ((~b) & d);
			k = 0x5a827999;
			break;
		case 1:
			tmp = b ^ c ^ d;
			k = 0x6ed9eba1;
			break;
		case 2:
			tmp = (b & c) | (b & d) | (c & d);
			k = 0x8f1bbcdc;
			break;
		default :
			tmp = b ^ c ^ d;
			k = 0xca62c1d6;
		}
		tmp += ROL(a, 5) + e + k + w[i];
		e = d;
		d = c;
		c = ROL(b, 30);
		b = a;
		a = tmp;
	}

	ctx->h[0] += a;
	ctx->h[1] += b;
	ctx->h[2] += c;
	ctx->h[3] += d;
	ctx->h[4] += e;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0xd8, %rsp
xorl %eax, %eax
movl (%rsi,%rax,4), %ecx
bswapl %ecx
movl %ecx, -0x70(%rsp,%rax,4)
incq %rax
cmpq $0x10, %rax
jne 0x12f1
movl $0x10, %eax
movl -0x90(%rsp,%rax,4), %ecx
xorl -0x7c(%rsp,%rax,4), %ecx
xorl -0xa8(%rsp,%rax,4), %ecx
xorl -0xb0(%rsp,%rax,4), %ecx
roll %ecx
movl %ecx, -0x70(%rsp,%rax,4)
incq %rax
cmpq $0x50, %rax
jne 0x1308
movl (%rdi), %r8d
movl 0x4(%rdi), %esi
movl 0x8(%rdi), %edx
movl 0xc(%rdi), %ecx
movl 0x10(%rdi), %r14d
xorl %r11d, %r11d
movl %r14d, -0x74(%rsp)
movl %ecx, %r12d
movl %edx, %r13d
movl %esi, %ebp
movl %r8d, %r15d
movl %r15d, %eax
movl %ebp, %ebx
movl %r13d, %r10d
movl %r12d, %r9d
movzbl %r11b, %ebp
imull $0xcd, %ebp, %r15d
shrl $0xc, %r15d
cmpb $0x2, %r15b
je 0x13a3
cmpl $0x1, %r15d
je 0x1392
testl %r15d, %r15d
jne 0x13bc
movl %r10d, %r15d
xorl %r9d, %r15d
andl %ebx, %r15d
xorl %r9d, %r15d
movl $0x5a827999, %r12d      # imm = 0x5A827999
jmp 0x13cb
movl %r10d, %r15d
xorl %ebx, %r15d
xorl %r9d, %r15d
movl $0x6ed9eba1, %r12d      # imm = 0x6ED9EBA1
jmp 0x13cb
movl %r9d, %ebp
orl %r10d, %ebp
andl %ebx, %ebp
movl %r9d, %r15d
andl %r10d, %r15d
orl %ebp, %r15d
movl $0x8f1bbcdc, %r12d      # imm = 0x8F1BBCDC
jmp 0x13cb
movl %r10d, %r15d
xorl %ebx, %r15d
xorl %r9d, %r15d
movl $0xca62c1d6, %r12d      # imm = 0xCA62C1D6
movl %eax, %ebp
roll $0x5, %ebp
addl %ebp, %r14d
addl %r15d, %r14d
addl %r12d, %r14d
movl %r14d, %r15d
addl -0x70(%rsp,%r11,4), %r15d
roll $0x1e, %ebx
incq %r11
movl %r9d, %r14d
movl %r10d, %r12d
movl %ebx, %r13d
movl %eax, %ebp
cmpq $0x50, %r11
jne 0x1353
addl %r8d, %r15d
movl %r15d, (%rdi)
addl %esi, %eax
movl %eax, 0x4(%rdi)
addl %edx, %ebx
movl %ebx, 0x8(%rdi)
addl %ecx, %r10d
movl %r10d, 0xc(%rdi)
addl -0x74(%rsp), %r9d
movl %r9d, 0x10(%rdi)
addq $0xd8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O3/ls4154[P]hash-c/sha1.c
// Function: sha1_update_last
void sha1_update_last(struct sha1_ctx *ctx, byte_t *chunk, len_t len)
{
	ctx->len += len;
	len_t bit_len = ctx->len * 8;

	byte_t padding[64];
	memset(padding, 0, sizeof(padding));

	memcpy(padding, chunk, len);
	*(padding + len) = 0x80;

	if (len >= 56) {
		_sha1_iterate(ctx, padding);
		memset(padding, 0, sizeof(padding));
	}

	byte_t *ptr = padding + 56;
	for (int i = 7; i >= 0; --i) {
		*ptr = (bit_len >> 8 * i) & 0xFF;
		++ptr;
	}
	_sha1_iterate(ctx, padding);
}

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
subq $0x40, %rsp
movq %rdx, %r14
movq %rdi, %rbx
movq 0x18(%rdi), %r15
addq %rdx, %r15
movq %r15, 0x18(%rdi)
xorps %xmm0, %xmm0
movq %rsp, %rdi
movaps %xmm0, 0x30(%rdi)
movaps %xmm0, 0x20(%rdi)
movaps %xmm0, 0x10(%rdi)
movaps %xmm0, (%rdi)
callq 0x1070
movb $-0x80, (%rsp,%r14)
cmpq $0x38, %r14
jb 0x1491
movq %rsp, %r14
movq %rbx, %rdi
movq %r14, %rsi
callq 0x12de
xorps %xmm0, %xmm0
movaps %xmm0, 0x30(%r14)
movaps %xmm0, 0x20(%r14)
movaps %xmm0, 0x10(%r14)
movaps %xmm0, (%r14)
movq %r15, %xmm0
pshufd $0x44, %xmm0, %xmm2     # xmm2 = xmm0[0,1,0,1]
psllq $0x3, %xmm2
movdqa %xmm2, %xmm0
movdqa %xmm2, %xmm3
movdqa %xmm2, %xmm1
movdqa %xmm2, %xmm4
movdqa %xmm2, %xmm5
movdqa %xmm2, %xmm6
psrlq $0x8, %xmm6
punpcklqdq %xmm2, %xmm6    # xmm6 = xmm6[0],xmm2[0]
psrlq $0x38, %xmm2
psrlq $0x30, %xmm0
movsd %xmm2, %xmm0            # xmm0 = xmm2[0],xmm0[1]
psrlq $0x28, %xmm3
psrlq $0x20, %xmm1
movsd %xmm3, %xmm1            # xmm1 = xmm3[0],xmm1[1]
psrlq $0x18, %xmm4
psrlq $0x10, %xmm5
movsd %xmm4, %xmm5            # xmm5 = xmm4[0],xmm5[1]
movdqa 0xb4d(%rip), %xmm2      # 0x2040
pand %xmm2, %xmm6
andpd %xmm2, %xmm5
packuswb %xmm6, %xmm5
andpd %xmm2, %xmm1
andpd %xmm2, %xmm0
packuswb %xmm1, %xmm0
packuswb %xmm5, %xmm0
packuswb %xmm0, %xmm0
movq %rsp, %rsi
movq %xmm0, 0x38(%rsi)
movq %rbx, %rdi
callq 0x12de
addq $0x40, %rsp
popq %rbx
popq %r14
popq %r15
retq
// File: /workspace/github_c_makefile_star2_O3/ls4154[P]hash-c/sha1.c
// Function: sha1_offline
void sha1_offline(struct sha1_ctx *ctx, byte_t *msg, len_t len)
{
	sha1_init(ctx);

	while (len >= 64) {
		sha1_update(ctx, msg);

		msg += 64;
		len -= 64;
	}

	sha1_update_last(ctx, msg, len);
}

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
movq %rdx, %rbx
movq %rsi, %r14
movq %rdi, %r15
movaps 0xaee(%rip), %xmm0      # 0x2030
movups %xmm0, (%rdi)
movl $0xc3d2e1f0, 0x10(%rdi) # imm = 0xC3D2E1F0
movq $0x0, 0x18(%rdi)
cmpq $0x40, %rdx
jb 0x1578
movq %r15, %rdi
movq %r14, %rsi
callq 0x12de
addq $0x40, 0x18(%r15)
addq $0x40, %r14
addq $-0x40, %rbx
cmpq $0x3f, %rbx
ja 0x155a
movq %r15, %rdi
movq %r14, %rsi
movq %rbx, %rdx
popq %rbx
popq %r14
popq %r15
jmp 0x142e
// File: /workspace/github_c_makefile_star2_O3/tylerneylon[P]APIsWithLua/lua/ldblib.c
// Function: db_debug
static int db_debug (lua_State *L) {
  for (;;) {
    char buffer[250];
    lua_writestringerror("%s", "lua_debug> ");
    if (fgets(buffer, sizeof(buffer), stdin) == 0 ||
        strcmp(buffer, "cont\n") == 0)
      return 0;
    if (luaL_loadbuffer(L, buffer, strlen(buffer), "=(debug command)") ||
        lua_pcall(L, 0, 0, 0))
      lua_writestringerror("%s\n", lua_tostring(L, -1));
    lua_settop(L, 0);  /* remove eventual returns */
  }
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x108, %rsp            # imm = 0x108
movq %rdi, %rbx
movq 0x2aa47(%rip), %rbp     # 0x2fff0
movq (%rbp), %rsi
leaq 0x1e7ed(%rip), %rdi     # 0x23da1
callq 0x51b0
movq (%rbp), %rdi
callq 0x5350
movq 0x2aa07(%rip), %r14     # 0x2ffd0
movq (%r14), %rdx
movq %rsp, %rdi
movl $0xfa, %esi
callq 0x5250
testq %rax, %rax
je 0x56c1
leaq 0x1e7c4(%rip), %r13     # 0x23dad
movq %rsp, %r15
pushq $0x6
popq %r12
movq %r15, %rdi
movq %r13, %rsi
movq %r12, %rdx
callq 0x5380
testl %eax, %eax
je 0x56c1
movq %r15, %rdi
callq 0x5140
movq %rbx, %rdi
movq %r15, %rsi
movq %rax, %rdx
leaq 0x1e795(%rip), %rcx     # 0x23db3
xorl %r8d, %r8d
callq 0x1591e
testl %eax, %eax
jne 0x5642
movq %rbx, %rdi
xorl %esi, %esi
xorl %edx, %edx
xorl %ecx, %ecx
xorl %r8d, %r8d
xorl %r9d, %r9d
callq 0x6fcf
testl %eax, %eax
je 0x5685
movq %r14, %r15
movq %r12, %r14
movq %r13, %r12
movq (%rbp), %r13
movq %rbx, %rdi
pushq $-0x1
popq %rsi
xorl %edx, %edx
callq 0x6359
movq %r13, %rdi
movq %r12, %r13
movq %r14, %r12
movq %r15, %r14
movq %rsp, %r15
leaq 0x1dbe2(%rip), %rsi     # 0x23254
movq %rax, %rdx
xorl %eax, %eax
callq 0x52b0
movq (%rbp), %rdi
callq 0x5350
movq %rbx, %rdi
xorl %esi, %esi
callq 0x5d4d
movq (%rbp), %rsi
leaq 0x1e707(%rip), %rdi     # 0x23da1
callq 0x51b0
movq (%rbp), %rdi
callq 0x5350
movq (%r14), %rdx
movq %r15, %rdi
movl $0xfa, %esi
callq 0x5250
testq %rax, %rax
jne 0x55f0
xorl %eax, %eax
addq $0x108, %rsp            # imm = 0x108
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
nopw %cs:(%rax,%rax)
nop
// File: /workspace/github_c_makefile_star2_O3/tylerneylon[P]APIsWithLua/ch4/eatyguy8.c
// Function: getkey
int getkey(int *is_end_of_seq) {

  // Make reading from stdin non-blocking.
  int flags = fcntl(STDIN_FILENO, F_GETFL);
  fcntl(STDIN_FILENO, F_SETFL, flags | O_NONBLOCK);

  // We care about two cases:
  // Case 1: A sequence of the form 27, 91, X; return X.
  // Case 2: For any other sequence, return each int separately.

  *is_end_of_seq = 0;
  int ch = getchar();
  if (ch == 27) {
    int next = getchar();
    if (next == 91) {
      *is_end_of_seq = 1;
      ch = getchar();
      goto end;
    }
    // If we get here, then we're not in a 27, 91, X sequence.
    ungetc(next, stdin);
  }

end:

  // Turn off non-blocking I/O. On some systems, leaving stdin
  // non-blocking will also leave stdout non-blocking, which can
  // cause printing errors.
  fcntl(STDIN_FILENO, F_SETFL, flags);
  return ch;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %rbx
pushq %rax
movq %rdi, %r14
xorl %edi, %edi
movl $0x3, %esi
xorl %eax, %eax
callq 0x5100
movl %eax, %ebx
movl %eax, %edx
orl $0x800, %edx            # imm = 0x800
xorl %edi, %edi
movl $0x4, %esi
xorl %eax, %eax
callq 0x5100
movl $0x0, (%r14)
callq 0x5290
movl %eax, %r15d
cmpl $0x1b, %eax
jne 0x587a
callq 0x5290
cmpl $0x5b, %eax
jne 0x5863
movl $0x1, (%r14)
callq 0x5290
movl %eax, %r15d
jmp 0x587a
movq 0x2a766(%rip), %rcx     # 0x2ffd0
movq (%rcx), %rsi
movl %eax, %edi
callq 0x5370
movl $0x1b, %r15d
xorl %edi, %edi
movl $0x4, %esi
movl %ebx, %edx
xorl %eax, %eax
callq 0x5100
movl %r15d, %eax
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O3/tylerneylon[P]APIsWithLua/ch4/eatyguy8.c
// Function: sleephires
void sleephires(double sec) {
  long s = (long)floor(sec);
  long n = (long)floor((sec - s) * 1e9);
  struct timespec delay = { .tv_sec = s, .tv_nsec = n };
  nanosleep(&delay, NULL);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %rbx
subq $0x18, %rsp
movsd %xmm0, -0x10(%rbp)
callq 0x5460
cvttsd2si %xmm0, %rbx
xorps %xmm0, %xmm0
cvtsi2sd %rbx, %xmm0
movsd -0x10(%rbp), %xmm1
subsd %xmm0, %xmm1
mulsd 0x1c747(%rip), %xmm1    # 0x22010
movapd %xmm1, %xmm0
callq 0x5460
cvttsd2si %xmm0, %rax
leaq -0x20(%rbp), %rdi
movq %rbx, (%rdi)
movq %rax, 0x8(%rdi)
xorl %esi, %esi
callq 0x5190
addq $0x18, %rsp
popq %rbx
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O3/tylerneylon[P]APIsWithLua/ch4/eatyguy8.c
// Function: start
void start() {
  // Terminal setup.
  system("tput setab 0");    // Use a black background.
  system("tput clear");      // Clear the screen.
  system("tput civis");      // Hide the cursor.
  system("stty raw -echo");  // Improve access to keypresses.
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
leaq 0x1c71d(%rip), %rdi     # 0x22018
callq 0x5150
leaq 0x1c71e(%rip), %rdi     # 0x22025
callq 0x5150
leaq 0x1c71d(%rip), %rdi     # 0x22030
callq 0x5150
leaq 0x1c71c(%rip), %rdi     # 0x2203b
popq %rbp
jmp 0x5150
// File: /workspace/github_c_makefile_star2_O3/tylerneylon[P]APIsWithLua/ch4/eatyguy8.c
// Function: done
void done() {

  // Put the terminal back into a decent state.
  system("stty cooked echo");  // Undo init call to "stty raw".
  system("tput reset");        // Reset colors and clear screen.

  exit(0);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
leaq 0x1c71a(%rip), %rdi     # 0x2204a
callq 0x5150
leaq 0x1c71f(%rip), %rdi     # 0x2205b
callq 0x5150
xorl %edi, %edi
callq 0x5480
// File: /workspace/github_c_makefile_star2_O3/tylerneylon[P]APIsWithLua/ch4/eatyguy8.c
// Function: push_keypress
void push_keypress(lua_State *L, int key, int is_end_of_seq) {
  if (is_end_of_seq && 65 <= key && key <= 68) {
    // up, down, right, left = 65, 66, 67, 68
    static const char *arrow_names[] = {"up", "down",
                                        "right", "left"};
    lua_pushstring(L, arrow_names[key - 65]);
  } else {
    lua_pushnumber(L, key);
  }
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
testl %edx, %edx
sete %cl
leal -0x41(%rsi), %eax
cmpl $0x4, %eax
setae %dl
orb %cl, %dl
jne 0x5974
movl %eax, %eax
leaq 0x1c769(%rip), %rcx     # 0x220d0
movslq (%rcx,%rax,4), %rsi
addq %rcx, %rsi
popq %rbp
jmp 0x656b
cvtsi2sd %esi, %xmm0
popq %rbp
jmp 0x64e1
// File: /workspace/github_c_makefile_star2_O3/tylerneylon[P]APIsWithLua/ch4/eatyguy8.c
// Function: push_state_table
void push_state_table(lua_State *L,
                      int key,
                      int is_end_of_seq) {

  lua_newtable(L);

    // stack = [.., {}]

  push_keypress(L, key, is_end_of_seq);

    // stack = [.., {}, key]

  lua_setfield(L, -2, "key");

    // stack = [.., {key = key}]

  lua_pushnumber(L, gettime());

    // stack = [.., {key = key}, clock]

  lua_setfield(L, -2, "clock");

    // stack = [.., {key = key, clock = clock}]
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %rbx
subq $0x18, %rsp
movl %edx, %r14d
movl %esi, %r15d
movq %rdi, %rbx
xorl %esi, %esi
xorl %edx, %edx
callq 0x69fb
movq %rbx, %rdi
movl %r15d, %esi
movl %r14d, %edx
callq 0x5948
leaq 0x1c6c7(%rip), %rdx     # 0x22079
movq %rbx, %rdi
movl $0xfffffffe, %esi       # imm = 0xFFFFFFFE
callq 0x6c66
leaq -0x28(%rbp), %r14
movq %r14, %rdi
xorl %esi, %esi
callq 0x51a0
cvtsi2sdq (%r14), %xmm1
cvtsi2sdq 0x8(%r14), %xmm0
mulsd 0x1c628(%rip), %xmm0    # 0x22008
addsd %xmm1, %xmm0
movq %rbx, %rdi
callq 0x64e1
leaq 0x1c68a(%rip), %rdx     # 0x2207d
movq %rbx, %rdi
movl $0xfffffffe, %esi       # imm = 0xFFFFFFFE
addq $0x18, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
jmp 0x6c66
// File: /workspace/github_c_makefile_star2_O3/tylerneylon[P]APIsWithLua/lua/lapi.c
// Function: lua_checkstack
LUA_API int lua_checkstack (lua_State *L, int n) {
  int res;
  CallInfo *ci = L->ci;
  lua_lock(L);
  api_check(L, n >= 0, "negative 'n'");
  if (L->stack_last - L->top > n)  /* stack large enough? */
    res = 1;  /* yes; check is OK */
  else {  /* no; need to grow stack */
    int inuse = cast_int(L->top - L->stack) + EXTRA_STACK;
    if (inuse > LUAI_MAXSTACK - n)  /* can grow without overflow? */
      res = 0;  /* no */
    else  /* try to grow stack */
      res = (luaD_rawrunprotected(L, &growstack, &n) == LUA_OK);
  }
  if (res && ci->top < L->top + n)
    ci->top = L->top + n;  /* adjust frame top */
  lua_unlock(L);
  return res;
}

// Assembly:
pushq %rbp
pushq %r14
pushq %rbx
subq $0x10, %rsp
movl %esi, 0xc(%rsp)
movq 0x10(%rdi), %rax
movq 0x20(%rdi), %r14
movq 0x30(%rdi), %rdx
subq %rax, %rdx
sarq $0x4, %rdx
movslq %esi, %rcx
cmpq %rcx, %rdx
jle 0x5c57
shlq $0x4, %rcx
addq %rax, %rcx
movl $0x1, %ebp
cmpq %rcx, 0x8(%r14)
jae 0x5c8a
movq %rcx, 0x8(%r14)
jmp 0x5c8a
movq %rdi, %rbx
subq 0x38(%rdi), %rax
shrq $0x4, %rax
addl $0x5, %eax
movl $0xf4240, %ecx          # imm = 0xF4240
subl %esi, %ecx
xorl %ebp, %ebp
cmpl %ecx, %eax
jg 0x5c8a
leaq 0x27(%rip), %rsi        # 0x5ca0
leaq 0xc(%rsp), %rdx
movq %rbx, %rdi
callq 0x866b
testl %eax, %eax
je 0x5c95
movl %ebp, %eax
addq $0x10, %rsp
popq %rbx
popq %r14
popq %rbp
retq
movq 0x10(%rbx), %rax
movslq 0xc(%rsp), %rcx
jmp 0x5c3f
// File: /workspace/github_c_makefile_star2_O3/tylerneylon[P]APIsWithLua/lua/lapi.c
// Function: lua_xmove
LUA_API void lua_xmove (lua_State *from, lua_State *to, int n) {
  int i;
  if (from == to) return;
  lua_lock(to);
  api_checknelems(from, n);
  api_check(from, G(from) == G(to), "moving among independent states");
  api_check(from, to->ci->top - to->top >= n, "stack overflow");
  from->top -= n;
  for (i = 0; i < n; i++) {
    setobj2s(to, to->top, from->top + i);
    to->top++;  /* stack already checked by previous 'api_check' */
  }
  lua_unlock(to);
}

// Assembly:
cmpq %rsi, %rdi
je 0x5ceb
movslq %edx, %rax
movq %rax, %rcx
shlq $0x4, %rcx
subq %rcx, 0x10(%rdi)
testl %eax, %eax
jle 0x5ceb
movl %edx, %eax
movq 0x10(%rsi), %rcx
shlq $0x4, %rax
xorl %edx, %edx
movq 0x10(%rdi), %r8
movups (%r8,%rdx), %xmm0
movups %xmm0, (%rcx)
movq 0x10(%rsi), %rcx
addq $0x10, %rcx
movq %rcx, 0x10(%rsi)
addq $0x10, %rdx
cmpq %rdx, %rax
jne 0x5cca
retq
// File: /workspace/github_c_makefile_star2_O3/tylerneylon[P]APIsWithLua/lua/lapi.c
// Function: lua_settop
LUA_API void lua_settop (lua_State *L, int idx) {
  StkId func = L->ci->func;
  lua_lock(L);
  if (idx >= 0) {
    api_check(L, idx <= L->stack_last - (func + 1), "new top too large");
    while (L->top < (func + 1) + idx)
      setnilvalue(L->top++);
    L->top = (func + 1) + idx;
  }
  else {
    api_check(L, -(idx+1) <= (L->top - (func + 1)), "invalid new top");
    L->top += idx+1;  /* 'subtract' index (index is negative) */
  }
  lua_unlock(L);
}

// Assembly:
testl %esi, %esi
js 0x5e9b
movq 0x10(%rdi), %rax
movq 0x20(%rdi), %rcx
movq (%rcx), %rdx
movl %esi, %esi
shlq $0x4, %rsi
leaq (%rdx,%rsi), %rcx
addq $0x10, %rcx
cmpq %rcx, %rax
jae 0x5e96
addq %rsi, %rdx
addq $0x10, %rdx
leaq 0x10(%rax), %rsi
cmpq %rsi, %rdx
cmovaq %rdx, %rsi
movq %rax, %rdx
notq %rdx
addq %rsi, %rdx
movq %rdx, %xmm0
shrq $0x4, %rdx
addq $0x4, %rdx
andq $-0x4, %rdx
pshufd $0x44, %xmm0, %xmm0     # xmm0 = xmm0[0,1,0,1]
psrlq $0x4, %xmm0
addq $0x38, %rax
xorl %esi, %esi
movdqa 0x1c325(%rip), %xmm1    # 0x220e0
movdqa 0x1c32d(%rip), %xmm2    # 0x220f0
movdqa 0x1c335(%rip), %xmm3    # 0x22100
pxor %xmm3, %xmm0
pcmpeqd %xmm4, %xmm4
movq %rsi, %xmm5
pshufd $0x44, %xmm5, %xmm5     # xmm5 = xmm5[0,1,0,1]
movdqa %xmm5, %xmm6
por %xmm2, %xmm6
pxor %xmm3, %xmm6
movdqa %xmm6, %xmm7
pcmpgtd %xmm0, %xmm7
pcmpeqd %xmm0, %xmm6
pshufd $0xf5, %xmm6, %xmm8     # xmm8 = xmm6[1,1,3,3]
pand %xmm7, %xmm8
pshufd $0xf5, %xmm7, %xmm6     # xmm6 = xmm7[1,1,3,3]
por %xmm8, %xmm6
movd %xmm6, %r8d
notl %r8d
testb $0x1, %r8b
je 0x5e1f
movl $0x0, -0x30(%rax)
pxor %xmm4, %xmm6
pextrw $0x4, %xmm6, %r8d
testb $0x1, %r8b
je 0x5e36
movl $0x0, -0x20(%rax)
por %xmm1, %xmm5
pxor %xmm3, %xmm5
movdqa %xmm5, %xmm6
pcmpgtd %xmm0, %xmm6
pcmpeqd %xmm0, %xmm5
pshufd $0xf5, %xmm5, %xmm7     # xmm7 = xmm5[1,1,3,3]
pand %xmm6, %xmm7
pshufd $0xf5, %xmm6, %xmm5     # xmm5 = xmm6[1,1,3,3]
por %xmm7, %xmm5
pxor %xmm4, %xmm5
pextrw $0x0, %xmm5, %r8d
testb $0x1, %r8b
je 0x5e73
movl $0x0, -0x10(%rax)
pextrw $0x4, %xmm5, %r8d
testb $0x1, %r8b
je 0x5e85
movl $0x0, (%rax)
addq $0x4, %rsi
addq $0x40, %rax
cmpq %rsi, %rdx
jne 0x5dd3
movq %rcx, 0x10(%rdi)
retq
movq 0x10(%rdi), %rax
movslq %esi, %rcx
shlq $0x4, %rcx
addq %rcx, %rax
addq $0x10, %rax
movq %rax, 0x10(%rdi)
retq
// File: /workspace/github_c_makefile_star2_O3/tylerneylon[P]APIsWithLua/lua/lapi.c
// Function: lua_rotate
LUA_API void lua_rotate (lua_State *L, int idx, int n) {
  StkId p, t, m;
  lua_lock(L);
  t = L->top - 1;  /* end of stack segment being rotated */
  p = index2addr(L, idx);  /* start of segment */
  api_checkstackindex(L, idx, p);
  api_check(L, (n >= 0 ? n : -n) <= (t - p + 1), "invalid 'n'");
  m = (n >= 0 ? t - n : p - n - 1);  /* end of prefix */
  reverse(L, p, m);  /* reverse the prefix with length 'n' */
  reverse(L, m + 1, t);  /* reverse the suffix */
  reverse(L, p, t);  /* reverse the entire segment */
  lua_unlock(L);
}

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
subq $0x10, %rsp
movl %edx, %ebx
movq 0x10(%rdi), %r14
leaq -0x10(%r14), %r15
callq 0x5f8d
testl %ebx, %ebx
js 0x5edc
movl %ebx, %edx
shlq $0x4, %rdx
movq %r15, %rcx
subq %rdx, %rcx
jmp 0x5eed
movslq %ebx, %rdx
shlq $0x4, %rdx
movq %rax, %rcx
subq %rdx, %rcx
addq $-0x10, %rcx
cmpq %rcx, %rax
jae 0x5f1f
leaq -0x10(%rcx), %rdx
movq %rax, %rsi
movups (%rsi), %xmm0
movaps %xmm0, (%rsp)
movups 0x10(%rdx), %xmm0
movups %xmm0, (%rsi)
movaps (%rsp), %xmm0
movups %xmm0, 0x10(%rdx)
addq $0x10, %rsi
leaq -0x10(%rdx), %rdi
cmpq %rdx, %rsi
movq %rdi, %rdx
jb 0x5ef9
addq $0x10, %rcx
cmpq %r15, %rcx
jae 0x5f52
leaq -0x20(%r14), %rdx
movups (%rcx), %xmm0
movaps %xmm0, (%rsp)
movups 0x10(%rdx), %xmm0
movups %xmm0, (%rcx)
movaps (%rsp), %xmm0
movups %xmm0, 0x10(%rdx)
addq $0x10, %rcx
leaq -0x10(%rdx), %rsi
cmpq %rdx, %rcx
movq %rsi, %rdx
jb 0x5f2c
cmpq %r15, %rax
jae 0x5f83
addq $-0x20, %r14
movups (%rax), %xmm0
movaps %xmm0, (%rsp)
movups 0x10(%r14), %xmm0
movups %xmm0, (%rax)
movaps (%rsp), %xmm0
movups %xmm0, 0x10(%r14)
addq $0x10, %rax
leaq -0x10(%r14), %rcx
cmpq %r14, %rax
movq %rcx, %r14
jb 0x5f5b
addq $0x10, %rsp
popq %rbx
popq %r14
popq %r15
retq
// File: /workspace/github_c_makefile_star2_O3/tylerneylon[P]APIsWithLua/lua/lapi.c
// Function: index2addr
static TValue *index2addr (lua_State *L, int idx) {
  CallInfo *ci = L->ci;
  if (idx > 0) {
    TValue *o = ci->func + idx;
    api_check(L, idx <= ci->top - (ci->func + 1), "unacceptable index");
    if (o >= L->top) return NONVALIDVALUE;
    else return o;
  }
  else if (!ispseudo(idx)) {  /* negative index */
    api_check(L, idx != 0 && -idx <= L->top - (ci->func + 1), "invalid index");
    return L->top + idx;
  }
  else if (idx == LUA_REGISTRYINDEX)
    return &G(L)->l_registry;
  else {  /* upvalues */
    idx = LUA_REGISTRYINDEX - idx;
    api_check(L, idx <= MAXUPVAL + 1, "upvalue index too large");
    if (ttislcf(ci->func))  /* light C function? */
      return NONVALIDVALUE;  /* it has no upvalues */
    else {
      CClosure *func = clCvalue(ci->func);
      return (idx <= func->nupvalues) ? &func->upvalue[idx-1] : NONVALIDVALUE;
    }
  }
}

// Assembly:
movq 0x20(%rdi), %rax
testl %esi, %esi
jle 0x5fae
movl %esi, %ecx
shlq $0x4, %rcx
addq (%rax), %rcx
cmpq 0x10(%rdi), %rcx
leaq 0x1c6a7(%rip), %rax     # 0x22650
cmovbq %rcx, %rax
retq
cmpl $0xfff0b9d9, %esi       # imm = 0xFFF0B9D9
jge 0x5fc7
cmpl $0xfff0b9d8, %esi       # imm = 0xFFF0B9D8
jne 0x5fd3
movq 0x18(%rdi), %rax
addq $0x40, %rax
retq
movslq %esi, %rax
shlq $0x4, %rax
addq 0x10(%rdi), %rax
retq
movq (%rax), %rax
cmpl $0x16, 0x8(%rax)
jne 0x5fe4
leaq 0x1c66d(%rip), %rax     # 0x22650
retq
movl $0xfff0b9d8, %ecx       # imm = 0xFFF0B9D8
subl %esi, %ecx
movq (%rax), %rax
movzbl 0xa(%rax), %edx
movl $0xfff0b9d7, %edi       # imm = 0xFFF0B9D7
subl %esi, %edi
shlq $0x4, %rdi
cmpl %edx, %ecx
leaq 0x20(%rax,%rdi), %rcx
leaq 0x1c645(%rip), %rax     # 0x22650
cmovbeq %rcx, %rax
retq
// File: /workspace/github_c_makefile_star2_O3/tylerneylon[P]APIsWithLua/lua/lapi.c
// Function: lua_copy
LUA_API void lua_copy (lua_State *L, int fromidx, int toidx) {
  TValue *fr, *to;
  lua_lock(L);
  fr = index2addr(L, fromidx);
  to = index2addr(L, toidx);
  api_checkvalidindex(L, to);
  setobj(L, to, fr);
  if (isupvalue(toidx))  /* function upvalue? */
    luaC_barrier(L, clCvalue(L->ci->func), fr);
  /* LUA_REGISTRYINDEX does not need gc barrier
     (collector revisits it before finishing collection) */
  lua_unlock(L);
}

// Assembly:
pushq %rbp
pushq %r14
pushq %rbx
movl %edx, %ebp
movq %rdi, %rbx
callq 0x5f8d
movq %rax, %r14
movq %rbx, %rdi
movl %ebp, %esi
callq 0x5f8d
movups (%r14), %xmm0
movups %xmm0, (%rax)
cmpl $0xfff0b9d7, %ebp       # imm = 0xFFF0B9D7
jg 0x6066
testb $0x40, 0x8(%r14)
je 0x6066
movq 0x20(%rbx), %rax
movq (%rax), %rax
movq (%rax), %rsi
testb $0x4, 0x9(%rsi)
je 0x6066
movq (%r14), %rdx
testb $0x3, 0x9(%rdx)
je 0x6066
movq %rbx, %rdi
popq %rbx
popq %r14
popq %rbp
jmp 0xa140
popq %rbx
popq %r14
popq %rbp
retq