LLM4Binary/decompile-bench-makefile huggingface dataset:
// File: /workspace/github_c_makefile_star2_O2/TurkeyMcMac[P]ts3d/src/ui-util.c
// Function: meter_draw
void meter_draw(const struct meter *meter)
{
	int full = meter->width * meter->fraction;
	int i;
	for (i = 0; meter->label[i] && i < full; ++i) {
		mvwaddch(meter->win, meter->y, meter->x + i,
			meter->full_style | meter->label[i]);
	}
	if (i < full) {
		do {
			mvwaddch(meter->win,meter->y, meter->x + i,
				meter->full_style | ' ');
		} while (++i < full);
	} else {
		for (; meter->label[i]; ++i) {
			mvwaddch(meter->win, meter->y, meter->x + i,
				meter->empty_style | meter->label[i]);
		}
	}
	for (; i < meter->width; ++i) {
		mvwaddch(meter->win, meter->y, meter->x + i,
			meter->empty_style | ' ');
	}
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %rbx
pushq %rax
movq %rdi, %rbx
cvtsi2sdl 0x20(%rdi), %xmm0
mulsd 0x8(%rdi), %xmm0
cvttsd2si %xmm0, %ebp
movslq %ebp, %r15
xorl %r14d, %r14d
movq (%rbx), %rax
movb (%rax,%r14), %al
testb %al, %al
je 0xa25d
cmpq %r15, %r14
jge 0xa25d
movq 0x28(%rbx), %rdi
movl 0x1c(%rbx), %esi
movl 0x18(%rbx), %edx
addl %r14d, %edx
callq 0x2320
cmpl $-0x1, %eax
je 0xa258
movq (%rbx), %rax
movq 0x28(%rbx), %rdi
movsbl (%rax,%r14), %esi
orl 0x10(%rbx), %esi
callq 0x2210
incq %r14
jmp 0xa21d
cmpq %r15, %r14
jge 0xa292
movq 0x28(%rbx), %rdi
movl 0x1c(%rbx), %esi
movl 0x18(%rbx), %edx
addl %r14d, %edx
callq 0x2320
cmpl $-0x1, %eax
je 0xa288
movq 0x28(%rbx), %rdi
movl 0x10(%rbx), %esi
orl $0x20, %esi
callq 0x2210
incl %r14d
cmpl %ebp, %r14d
jl 0xa262
jmp 0xa2f7
testb %al, %al
je 0xa2f7
movq 0x28(%rbx), %rdi
movl 0x1c(%rbx), %esi
movl 0x18(%rbx), %edx
addl %r14d, %edx
callq 0x2320
cmpl $-0x1, %eax
je 0xa2c1
movq (%rbx), %rax
movq 0x28(%rbx), %rdi
movsbl (%rax,%r14), %esi
orl 0x14(%rbx), %esi
callq 0x2210
movq (%rbx), %rax
movb 0x1(%rax,%r14), %al
incq %r14
jmp 0xa292
movq 0x28(%rbx), %rdi
movl 0x1c(%rbx), %esi
movl 0x18(%rbx), %edx
addl %r14d, %edx
callq 0x2320
cmpl $-0x1, %eax
je 0xa2f4
movq 0x28(%rbx), %rdi
movl 0x14(%rbx), %esi
orl $0x20, %esi
callq 0x2210
incl %r14d
cmpl 0x20(%rbx), %r14d
jl 0xa2ce
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O2/TurkeyMcMac[P]ts3d/src/ui-util.c
// Function: popup_window
WINDOW *popup_window(const char *text)
{
	int width = 0, height = 0;
	int line_width = 0;
	for (const char *chrp = text; *chrp != '\0'; ++chrp) {
		if (*chrp == '\n') {
			++height;
			line_width = 0;
		} else {
			++line_width;
			if (line_width > width) width = line_width;
		}
	}
	// Simulate a final newline if it's missing:
	if (line_width != 0) ++height;
	// Add one cell of padding to all sides:
	width += 2;
	height += 2;
	// No popups larger than the screen are allowed:
	if (height > LINES || width > COLS) return NULL;
	WINDOW *win = newwin(height, width,
		(LINES - height) / 2, (COLS - width) / 2);
	if (!win) return NULL;
	const char *line = text;
	for (int y = 1; y < height - 1; ++y) {
		const char *nl = strchr(line, '\n');
		// Line length is remaining text length if there's no newline:
		int len = nl ? nl - line : (int)strlen(line);
		// Draw centered line of text:
		mvwaddnstr(win, y, (width - len) / 2, line, len);
		line += len + 1;
	}
	return win;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movq %rdi, %rbx
xorl %ecx, %ecx
movq %rdi, %rax
xorl %r15d, %r15d
xorl %ebp, %ebp
movzbl (%rax), %edx
cmpl $0xa, %edx
je 0xa336
testl %edx, %edx
je 0xa340
cmpl %ebp, %ecx
leal 0x1(%rcx), %ecx
cmovgel %ecx, %ebp
jmp 0xa33b
incl %r15d
xorl %ecx, %ecx
incq %rax
jmp 0xa320
cmpl $0x1, %ecx
sbbl $-0x1, %r15d
leal 0x2(%r15), %edi
movq 0x6c4e(%rip), %rax      # 0x10fa0
movl (%rax), %eax
subl %edi, %eax
jl 0xa408
addl $0x2, %ebp
movq 0x6c62(%rip), %rcx      # 0x10fc8
movl (%rcx), %ecx
subl %ebp, %ecx
jl 0xa408
pushq $0x2
popq %rsi
cltd
idivl %esi
movl %eax, %r8d
movl %ecx, %eax
cltd
idivl %esi
movl %ebp, %esi
movl %r8d, %edx
movl %eax, %ecx
callq 0x2350
xorl %r12d, %r12d
testq %rax, %rax
je 0xa408
movq %rax, %r14
testl %r15d, %r15d
cmovgl %r15d, %r12d
negl %r12d
pushq $0x1
popq %r15
leal (%r12,%r15), %eax
cmpl $0x1, %eax
je 0xa40b
movq %rbx, %rdi
pushq $0xa
popq %rsi
callq 0x22d0
testq %rax, %rax
je 0xa3c4
movq %rax, %r13
subq %rbx, %r13
jmp 0xa3cf
movq %rbx, %rdi
callq 0x2200
movslq %eax, %r13
movl %ebp, %eax
subl %r13d, %eax
cltd
pushq $0x2
popq %rcx
idivl %ecx
movq %r14, %rdi
movl %r15d, %esi
movl %eax, %edx
callq 0x2320
cmpl $-0x1, %eax
je 0xa3fa
movq %r14, %rdi
movq %rbx, %rsi
movl %r13d, %edx
callq 0x2380
incl %r13d
movslq %r13d, %rax
addq %rax, %rbx
incl %r15d
jmp 0xa3a3
xorl %r14d, %r14d
movq %r14, %rax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O2/TurkeyMcMac[P]ts3d/src/ui-util.c
// Function: display_frame
void display_frame(d3d_camera *cam, struct screen_area *area,
	struct color_map *colors)
{
	size_t width = d3d_camera_width(cam);
	if (width > (size_t)area->width) width = (size_t)area->width;
	size_t height = d3d_camera_height(cam);
	if (height > (size_t)area->height) height = (size_t)area->height;
	for (size_t x = 0; x < width; ++x) {
		for (size_t y = 0; y < height; ++y) {
			d3d_pixel pix = *d3d_camera_get(cam, x, y);
			int pair = color_map_get_pair(colors, pix);
			mvaddch((int)y + area->y, (int)x + area->x,
				COLOR_PAIR(pair) | SCENE_FG_CHAR);
		}
	}
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x28, %rsp
movq %rdx, 0x10(%rsp)
movq %rsi, %r14
movq %rdi, %rbx
callq 0x3797
movslq 0x8(%r14), %rcx
cmpq %rcx, %rax
cmovbq %rax, %rcx
movq %rcx, 0x8(%rsp)
movq %rbx, 0x18(%rsp)
movq %rbx, %rdi
callq 0x379c
movslq 0xc(%r14), %rcx
cmpq %rcx, %rax
cmovbq %rax, %rcx
movq %rcx, 0x20(%rsp)
xorl %r12d, %r12d
movq 0x6b66(%rip), %rbx      # 0x10fd8
cmpq 0x8(%rsp), %r12
je 0xa4e3
xorl %r13d, %r13d
cmpq %r13, 0x20(%rsp)
je 0xa4de
movq 0x18(%rsp), %rdi
movq %r12, %rsi
movq %r13, %rdx
callq 0x37a1
movzbl (%rax), %eax
pushq $0x3a
popq %rbp
cmpq $0x3f, %rax
ja 0xa4b2
movq 0x10(%rsp), %rcx
movzbl 0x4(%rcx,%rax), %eax
shll $0x8, %eax
orl $0x3a, %eax
movzwl %ax, %ebp
movq %rbx, %r15
movq (%rbx), %rdi
movl 0x4(%r14), %esi
addl %r13d, %esi
movl (%r14), %edx
addl %r12d, %edx
callq 0x2320
cmpl $-0x1, %eax
je 0xa4d9
movq (%r15), %rdi
movl %ebp, %esi
callq 0x2210
incq %r13
jmp 0xa47c
incq %r12
jmp 0xa472
addq $0x28, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O2/TurkeyMcMac[P]ts3d/src/ui-util.c
// Function: camera_with_dims
d3d_camera *camera_with_dims(int width, int height)
{
	d3d_camera *cam;
	if (width <= 0) width = 1;
	if (height <= 0) height = 1;
	if (width >= height) {
		cam = assert_alloc(d3d_new_camera(CAM_FOV_X,
			CAM_FOV_X / PIXEL_ASPECT * height / width,
			width, height, pixel(PC_BLACK, PC_BLACK)));
	} else {
		cam = assert_alloc(d3d_new_camera(CAM_FOV_X * width / height,
			CAM_FOV_X / PIXEL_ASPECT, width, height,
			pixel(PC_BLACK, PC_BLACK)));
	}
	return cam;
}

// Assembly:
pushq %rax
movl %esi, %eax
cmpl $0x2, %edi
pushq $0x1
popq %rsi
cmovll %esi, %edi
cmpl $0x2, %eax
cmovgel %eax, %esi
cmpl %eax, %edi
jge 0xa526
cvtsi2sd %edi, %xmm0
mulsd 0x1c1c(%rip), %xmm0     # 0xc130
cvtsi2sd %esi, %xmm1
divsd %xmm1, %xmm0
movsd 0x1c04(%rip), %xmm1     # 0xc128
jmp 0xa542
cvtsi2sd %esi, %xmm1
mulsd 0x1bf6(%rip), %xmm1     # 0xc128
cvtsi2sd %edi, %xmm0
divsd %xmm0, %xmm1
movsd 0x1bee(%rip), %xmm0     # 0xc130
xorl %edx, %edx
callq 0x26e7
movq %rax, %rdi
popq %rax
jmp 0xa922
// File: /workspace/github_c_makefile_star2_O2/TurkeyMcMac[P]ts3d/src/util.c
// Function: mid_cat
char *mid_cat(const char *part1, int mid, const char *part2)
{
	char *cat;
	size_t len1, len2, len;
	len1 = strlen(part1);
	len2 = strlen(part2);
	len = len1 + 1 + len2;
	cat = xmalloc(len + 1);
	memcpy(cat, part1, len1);
	cat[len1] = mid;
	memcpy(cat + len1 + 1, part2, len2 + 1);
	return cat;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movq %rdx, %rbx
movl %esi, %ebp
movq %rdi, %r14
callq 0x2200
movq %rax, %r15
movq %rbx, %rdi
callq 0x2200
movq %rax, %r12
leaq (%r15,%rax), %rdi
addq $0x2, %rdi
callq 0xa7d0
movq %rax, %r13
movq %rax, %rdi
movq %r14, %rsi
movq %r15, %rdx
callq 0x2510
leaq (%r15,%r13), %rdi
incq %rdi
movb %bpl, -0x1(%rdi)
incq %r12
movq %rbx, %rsi
movq %r12, %rdx
callq 0x2510
movq %r13, %rax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O2/TurkeyMcMac[P]ts3d/src/util.c
// Function: ensure_file
int ensure_file(const char *path, bool dir)
{
#ifdef _WIN32
	if (dir) {
		if (_mkdir(path) && errno != EEXIST) return -1;
	} else {
		FILE *f = fopen(path, "a");
		if (!f) return -1;
		fclose(f);
	}
	return 0;
#else
	int fd;
	struct stat st;
	if (stat(path, &st)) {
		fd = dir ? mkdir(path, 0775)
			: open(path, O_RDONLY | O_CREAT, 0664);
	} else {
		if (dir) {
			if (!S_ISDIR(st.st_mode)) {
				errno = EEXIST;
				return -1;
			}
		} else if (!S_ISREG(st.st_mode)) {
			errno = S_ISDIR(st.st_mode) ? EISDIR : EEXIST;
			return -1;
		}
		fd = open(path, O_RDONLY);
	}
	if (fd < 0) return -1;
	close(fd);
	return 0;
#endif /* !defined(_WIN32) */
}

// Assembly:
pushq %rbp
pushq %rbx
subq $0x98, %rsp
movl %esi, %ebp
movq %rdi, %rbx
leaq 0x8(%rsp), %rsi
callq 0x24e0
testl %eax, %eax
je 0xa634
testb %bpl, %bpl
je 0xa656
movq %rbx, %rdi
movl $0x1fd, %esi            # imm = 0x1FD
callq 0x2540
jmp 0xa67d
movl $0xf000, %eax           # imm = 0xF000
andl 0x20(%rsp), %eax
testb %bpl, %bpl
je 0xa66a
cmpl $0x4000, %eax           # imm = 0x4000
je 0xa671
callq 0x2330
movl $0x11, (%rax)
jmp 0xa6a4
pushq $0x40
popq %rsi
movq %rbx, %rdi
movl $0x1b4, %edx            # imm = 0x1B4
xorl %eax, %eax
callq 0x2520
jmp 0xa67d
cmpl $0x8000, %eax           # imm = 0x8000
jne 0xa68c
movq %rbx, %rdi
xorl %esi, %esi
xorl %eax, %eax
callq 0x2520
testl %eax, %eax
js 0xa6a4
movl %eax, %edi
callq 0x2090
xorl %eax, %eax
jmp 0xa6a7
xorl %ecx, %ecx
cmpl $0x4000, %eax           # imm = 0x4000
sete %cl
leal 0x11(,%rcx,4), %ebx
callq 0x2330
movl %ebx, (%rax)
pushq $-0x1
popq %rax
addq $0x98, %rsp
popq %rbx
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O2/TurkeyMcMac[P]ts3d/src/util.c
// Function: default_file
char *default_file(const char *name, const char *env)
{
#ifdef _WIN32
	static const char env_storage_dir[] = "AppData", ts3d_dir[] = "ts3d";
#else
	static const char env_storage_dir[] = "HOME", ts3d_dir[] = ".ts3d";
#endif
	char *dot_dir = NULL, *path = NULL;
	char *env_root, *env_path = getenv(env);
	if (env_path) return str_dup(env_path);
	env_root = getenv("TS3D_ROOT");
	if (env_root) {
		dot_dir = str_dup(env_root);
	} else {
		char *storage_dir = getenv(env_storage_dir);
		if (storage_dir) {
			dot_dir = mid_cat(storage_dir, DIRSEP, ts3d_dir);
		} else {
			errno = ENOENT;
			return NULL;
		}
	}
	if (!ensure_file(dot_dir, true))
		path = mid_cat(dot_dir, DIRSEP, name);
	free(dot_dir);
	return path;
}

// Assembly:
pushq %r14
pushq %rbx
pushq %rax
movq %rdi, %rbx
movq %rsi, %rdi
callq 0x2310
testq %rax, %rax
je 0xa6d4
movq %rax, %rdi
addq $0x8, %rsp
popq %rbx
popq %r14
jmp 0xa554
leaq 0x1aa9(%rip), %rdi      # 0xc184
callq 0x2310
testq %rax, %rax
je 0xa6ef
movq %rax, %rdi
callq 0xa554
jmp 0xa712
leaq 0x1a6a(%rip), %rdi      # 0xc160
callq 0x2310
testq %rax, %rax
je 0xa74c
leaq 0x1a5e(%rip), %rdx      # 0xc165
pushq $0x2f
popq %rsi
movq %rax, %rdi
callq 0xa595
movq %rax, %r14
pushq $0x1
popq %rsi
movq %rax, %rdi
callq 0xa604
testl %eax, %eax
je 0xa728
xorl %ebx, %ebx
jmp 0xa739
pushq $0x2f
popq %rsi
movq %r14, %rdi
movq %rbx, %rdx
callq 0xa595
movq %rax, %rbx
movq %r14, %rdi
callq 0x2580
movq %rbx, %rax
addq $0x8, %rsp
popq %rbx
popq %r14
retq
callq 0x2330
movl $0x2, (%rax)
xorl %ebx, %ebx
jmp 0xa741
// File: /workspace/github_c_makefile_star2_O2/TurkeyMcMac[P]ts3d/src/xalloc.c
// Function: xmalloc
void *xmalloc(size_t size)
{
	void *ptr = malloc(size);
	if (!ptr && size != 0) {
		die("malloc(%lu) failed. Aborting.\n", (unsigned long)size);
	}
	return ptr;
}

// Assembly:
pushq %rbx
movq %rdi, %rbx
callq 0x2150
testq %rax, %rax
setne %cl
testq %rbx, %rbx
sete %dl
orb %cl, %dl
je 0xa7eb
popq %rbx
retq
leaq 0x199c(%rip), %rdi      # 0xc18e
movq %rbx, %rsi
xorl %eax, %eax
callq 0xa7fc
// File: /workspace/github_c_makefile_star2_O2/TurkeyMcMac[P]ts3d/src/xalloc.c
// Function: die
static void die(const char *fmt, ...)
{
	// Probably thread-unsafety is OK.
	static char msgbuf[128];
	va_list va;
	va_start(va, fmt);
	// Hopefully snprintf doesn't allocate.
	int l = vsnprintf(msgbuf, sizeof(msgbuf), fmt, va);
	va_end(va);
	if (l > 0) {
		ssize_t UNUSED_VAR(w) = write(STDERR_FILENO, msgbuf, (size_t)l);
	} else {
		print_default_oom_message();
	}
	abort();
}

// Assembly:
subq $0xd8, %rsp
movq %rdi, %r10
leaq 0x20(%rsp), %rdi
movq %rsi, 0x8(%rdi)
movq %rdx, 0x10(%rdi)
movq %rcx, 0x18(%rdi)
movq %r8, 0x20(%rdi)
movq %r9, 0x28(%rdi)
testb %al, %al
je 0xa85a
movaps %xmm0, 0x50(%rsp)
movaps %xmm1, 0x60(%rsp)
movaps %xmm2, 0x70(%rsp)
movaps %xmm3, 0x80(%rsp)
movaps %xmm4, 0x90(%rsp)
movaps %xmm5, 0xa0(%rsp)
movaps %xmm6, 0xb0(%rsp)
movaps %xmm7, 0xc0(%rsp)
movq %rsp, %rcx
movq %rdi, 0x10(%rcx)
leaq 0xe0(%rsp), %rax
movq %rax, 0x8(%rcx)
movabsq $0x3000000008, %rax     # imm = 0x3000000008
movq %rax, (%rcx)
leaq 0x6a5f(%rip), %rdi      # 0x112e0
movl $0x80, %esi
movq %r10, %rdx
callq 0x22e0
testl %eax, %eax
jle 0xa8a8
movl %eax, %edx
leaq 0x6a45(%rip), %rsi      # 0x112e0
pushq $0x2
popq %rdi
callq 0x24d0
callq 0x20c0
callq 0xa936
callq 0x20c0
// File: /workspace/github_c_makefile_star2_O2/TurkeyMcMac[P]ts3d/src/xalloc.c
// Function: xcalloc
void *xcalloc(size_t count, size_t size)
{
	void *ptr = calloc(count, size);
	if (!ptr && count * size != 0) {
		die("calloc(%lu, %lu) failed. Aborting.\n",
			(unsigned long)count, (unsigned long)size);
	}
	return ptr;
}

// Assembly:
pushq %r14
pushq %rbx
pushq %rax
movq %rsi, %rbx
movq %rdi, %r14
callq 0x23d0
testq %rax, %rax
setne %cl
movq %rbx, %rdx
imulq %r14, %rdx
testq %rdx, %rdx
sete %dl
orb %cl, %dl
je 0xa8e0
addq $0x8, %rsp
popq %rbx
popq %r14
retq
leaq 0x18c6(%rip), %rdi      # 0xc1ad
movq %r14, %rsi
movq %rbx, %rdx
xorl %eax, %eax
callq 0xa7fc
// File: /workspace/github_c_makefile_star2_O2/TurkeyMcMac[P]ts3d/src/xalloc.c
// Function: xrealloc
void *xrealloc(void *ptr, size_t size)
{
	ptr = realloc(ptr, size);
	if (!ptr && size != 0) {
		die("realloc(%p, %lu) failed. Aborting.\n",
			ptr, (unsigned long)size);
	}
	return ptr;
}

// Assembly:
pushq %rbx
movq %rsi, %rbx
callq 0x2480
testq %rax, %rax
setne %cl
testq %rbx, %rbx
sete %dl
orb %cl, %dl
je 0xa90f
popq %rbx
retq
leaq 0x18bb(%rip), %rdi      # 0xc1d1
xorl %esi, %esi
movq %rbx, %rdx
xorl %eax, %eax
callq 0xa7fc
// File: /workspace/github_c_makefile_star2_O2/TurkeyMcMac[P]ts3d/src/xalloc.c
// Function: assert_alloc
void *assert_alloc(void *ptr)
{
	if (!ptr) {
		print_default_oom_message();
		abort();
	}
	return ptr;
}

// Assembly:
testq %rdi, %rdi
je 0xa92b
movq %rdi, %rax
retq
pushq %rax
callq 0xa936
callq 0x20c0
// File: /workspace/github_c_makefile_star2_O2/kaiserschmarrn0[P]mywm/mywm.c
// Function: close_helper
void close_helper(xcb_window_t win) {
	xcb_icccm_get_wm_protocols_reply_t pro;
	xcb_get_property_cookie_t cookie;
	cookie = xcb_icccm_get_wm_protocols_unchecked(conn, win, ewmh->WM_PROTOCOLS);
	if (!xcb_icccm_get_wm_protocols_reply(conn, cookie, &pro, NULL)) {
		xcb_kill_client(conn, win);
		return;
	}

	for (int i = 0; i < pro.atoms_len; i++) {
		if (pro.atoms[i] == wm_atoms[WM_DELETE_WINDOW]) {
			xcb_icccm_get_wm_protocols_reply_wipe(&pro);
			goto a;
		}
	}
	xcb_icccm_get_wm_protocols_reply_wipe(&pro);
	xcb_kill_client(conn, win);
	return;

	a:;
	
	xcb_client_message_event_t ev;
	ev.response_type = XCB_CLIENT_MESSAGE;
	ev.format = 32;
	ev.sequence = 0;
	ev.window = win;
	ev.type = wm_atoms[WM_PROTOCOLS];
	ev.data.data32[0] = wm_atoms[WM_DELETE_WINDOW];
	ev.data.data32[1] = XCB_CURRENT_TIME;
	uint32_t mask = XCB_EVENT_MASK_NO_EVENT;
	xcb_send_event(conn, 0, win, mask, (char *)&ev);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %rbx
subq $0x38, %rsp
movl %edi, %ebx
movq 0x9ce0(%rip), %rdi      # 0xd448
movq 0x9ce9(%rip), %rax      # 0xd458
movl 0xc8(%rax), %edx
movl %ebx, %esi
callq 0x31c0
movq 0x9cc5(%rip), %rdi      # 0xd448
leaq -0x20(%rbp), %rdx
movl %eax, %esi
xorl %ecx, %ecx
callq 0x31a0
testb %al, %al
je 0x37f9
movl -0x20(%rbp), %eax
movq -0x18(%rbp), %rcx
movl 0x9cc3(%rip), %edx      # 0xd464
xorl %esi, %esi
cmpq %rsi, %rax
je 0x37f0
leaq 0x1(%rsi), %rdi
cmpl %edx, (%rcx,%rsi,4)
movq %rdi, %rsi
jne 0x37a3
leaq -0x20(%rbp), %rdi
callq 0x3410
leaq -0x40(%rbp), %r8
movl $0x2021, (%r8)          # imm = 0x2021
movl %ebx, 0x4(%r8)
movq 0x9c8d(%rip), %rax      # 0xd460
movq %rax, 0x8(%r8)
andl $0x0, 0x10(%r8)
movq 0x9c65(%rip), %rdi      # 0xd448
xorl %esi, %esi
movl %ebx, %edx
xorl %ecx, %ecx
callq 0x3340
jmp 0x3807
leaq -0x20(%rbp), %rdi
callq 0x3410
movq 0x9c48(%rip), %rdi      # 0xd448
movl %ebx, %esi
callq 0x3600
addq $0x38, %rsp
popq %rbx
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O2/kaiserschmarrn0[P]mywm/mywm.c
// Function: enter_notify
void enter_notify(xcb_generic_event_t *ev) {
	xcb_enter_notify_event_t *e = (xcb_enter_notify_event_t *)ev;

	window *found = search_ws(curws, TYPE_NORMAL, WIN_PARENT, e->event);
	if (state != RESIZE && found && found->normal && found != stack[curws].fwin && state != MOVE) {
		focus(found);
		return;
	}
	
	search_data data = search_range(curws, TYPE_NORMAL, WIN_COUNT, REGION_COUNT, e->event);
	if (data.win) {
		draw_region(data.win, data.index, PM_HOVER);
		return;
	}

	margin_enter_handler(ev);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r14
pushq %rbx
movq %rdi, %rbx
leaq 0xa251(%rip), %r14      # 0xda70
movl (%r14), %edi
movl 0xc(%rbx), %ecx
pushq $0x1
popq %rdx
movl %edx, %esi
callq 0x66f4
movl 0x9c0f(%rip), %ecx      # 0xd444
cmpl $0x2, %ecx
setne %dl
testq %rax, %rax
setne %sil
testb %sil, %dl
je 0x3879
cmpl $0x0, 0xc0(%rax)
movl (%r14), %edi
je 0x387c
cmpl $0x1, %ecx
je 0x387c
movslq %edi, %rcx
imulq $0x50, %rcx, %rcx
leaq 0xa0ca(%rip), %rdx      # 0xd930
cmpq 0x48(%rdx,%rcx), %rax
je 0x387c
movq %rax, %rdi
popq %rbx
popq %r14
popq %rbp
jmp 0x4f64
movl (%r14), %edi
movl 0xc(%rbx), %r8d
pushq $0x1
popq %rsi
pushq $0x2
popq %rdx
pushq $0x4
popq %rcx
callq 0x66a1
testq %rax, %rax
je 0x38a6
pushq $0x1
popq %rcx
movq %rax, %rdi
movl %edx, %esi
movl %ecx, %edx
popq %rbx
popq %r14
popq %rbp
jmp 0x561b
movq %rbx, %rdi
popq %rbx
popq %r14
popq %rbp
jmp 0x7f5e
// File: /workspace/github_c_makefile_star2_O2/kaiserschmarrn0[P]mywm/mywm.c
// Function: leave_notify
void leave_notify(xcb_generic_event_t *ev) {
	xcb_leave_notify_event_t *e = (xcb_leave_notify_event_t *)ev;

	//printf("left %d, mode: %d, detail: %d, state: %d\n", e->event, e->mode, e->detail, e->state);

	search_data data = search_range(curws, TYPE_NORMAL, WIN_COUNT, REGION_COUNT, e->event);
	if (data.win && e->mode == XCB_NOTIFY_MODE_NORMAL) {
		if (state == PRESS) {
			region_abort();
		}

		draw_region(data.win, data.index, PM_FOCUS);

		return;
	}

	margin_leave_handler(ev);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %rbx
pushq %rax
movq %rdi, %rbx
leaq 0xa1aa(%rip), %rax      # 0xda70
movl (%rax), %edi
movl 0xc(%rbx), %r8d
pushq $0x1
popq %rsi
pushq $0x2
popq %rdx
pushq $0x4
popq %rcx
callq 0x66a1
testq %rax, %rax
je 0x38e5
cmpb $0x0, 0x1e(%rbx)
je 0x38f7
movq %rbx, %rdi
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
jmp 0x7f8b
movq %rax, %r14
movl %edx, %r15d
cmpl $0x4, 0x9b40(%rip)      # 0xd444
jne 0x390d
xorl %eax, %eax
callq 0x6cdf
movq %r14, %rdi
movl %r15d, %esi
xorl %edx, %edx
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
jmp 0x561b
// File: /workspace/github_c_makefile_star2_O2/kaiserschmarrn0[P]mywm/mywm.c
// Function: die
void die() {
	//no need to preserve stack, could refactor forget_client
	for (int i = 0; i < NUM_WS; i++) {
		for (int j = 0; j < stack[i].lists[TYPE_ALL].count; j++) {
			forget_client(stack[i].lists[TYPE_ALL].last, i);
		}
	}

	xcb_ungrab_key(conn, XCB_GRAB_ANY, scr->root, XCB_MOD_MASK_ANY);
	xcb_key_symbols_free(keysyms);

	cursor_clean();

	for (int i = 0; i < LEN(controls); i++) {
		for (int j = 0; j < PM_COUNT; j++) {
			xcb_free_pixmap(conn, pixmaps[i][j]);
		}
	}
	
	for (int i = 0; i < LEN(fonts); i++) {
		XftFontClose(dpy, xfts[i]);
	}
	
	xcb_flush(conn);

	xcb_disconnect(conn);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
xorl %ebx, %ebx
leaq 0x9ff8(%rip), %r14      # 0xd930
cmpq $0x4, %rbx
je 0x3963
imulq $0x50, %rbx, %r15
addq %r14, %r15
xorl %r12d, %r12d
cmpl 0x10(%r15), %r12d
jge 0x395e
movq 0x8(%r15), %rdi
movl %ebx, %esi
callq 0x54d6
incl %r12d
jmp 0x3948
incq %rbx
jmp 0x3938
movq 0x9ade(%rip), %rdi      # 0xd448
movq 0x9adf(%rip), %rax      # 0xd450
movl (%rax), %edx
xorl %ebx, %ebx
xorl %esi, %esi
movl $0x8000, %ecx           # imm = 0x8000
callq 0x33d0
movq 0x9ae8(%rip), %rdi      # 0xd470
callq 0x33e0
callq 0x582c
leaq 0x9ae7(%rip), %r14      # 0xd480
cmpq $0x2, %rbx
je 0x39c6
xorl %r15d, %r15d
cmpq $0x4, %r15
je 0x39bd
movq 0x9a99(%rip), %rdi      # 0xd448
movl (%r14,%r15,4), %esi
callq 0x34d0
incq %r15
jmp 0x39a2
incq %rbx
addq $0x10, %r14
jmp 0x3999
movq 0x9ad3(%rip), %rdi      # 0xd4a0
movq 0x9ad4(%rip), %rsi      # 0xd4a8
callq 0x30d0
movq 0x9a68(%rip), %rdi      # 0xd448
callq 0x3350
movq 0x9a5c(%rip), %rdi      # 0xd448
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
jmp 0x3570
// File: /workspace/github_c_makefile_star2_O2/kaiserschmarrn0[P]mywm/mywm.c
// Function: get_atoms
static void get_atoms(const char **names, xcb_atom_t *atoms, unsigned int count) {
	xcb_intern_atom_cookie_t cookies[count];
	for (int i = 0; i < count; i++) {
		cookies[i] = xcb_intern_atom(conn, 0, strlen(names[i]), names[i]);
	}
	for (int i = 0; i < count; i++) {
		xcb_intern_atom_reply_t *reply = xcb_intern_atom_reply(conn, cookies[i], NULL);
		if (reply) {
			atoms[i] = reply->atom;
			free(reply);
		}
	}
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x18, %rsp
movq %rsi, -0x30(%rbp)
movq %rdi, -0x38(%rbp)
movl %edx, %r13d
movq %rsp, %rbx
leaq 0xf(,%r13,4), %rax
andq $-0x10, %rax
subq %rax, %rbx
movq %rbx, %rsp
xorl %r14d, %r14d
cmpq %r14, %r13
je 0x4211
movq 0x9260(%rip), %r15      # 0xd448
movq -0x38(%rbp), %rax
movq (%rax,%r14,8), %r12
movq %r12, %rdi
callq 0x3280
movzwl %ax, %edx
movq %r15, %rdi
xorl %esi, %esi
movq %r12, %rcx
callq 0x3120
movl %eax, (%rbx,%r14,4)
incq %r14
jmp 0x41dc
xorl %r14d, %r14d
cmpq %r14, %r13
je 0x4248
movq 0x9228(%rip), %rdi      # 0xd448
movl (%rbx,%r14,4), %esi
xorl %edx, %edx
callq 0x3360
testq %rax, %rax
je 0x4243
movl 0x8(%rax), %ecx
movq -0x30(%rbp), %rdx
movl %ecx, (%rdx,%r14,4)
movq %rax, %rdi
callq 0x3270
incq %r14
jmp 0x4214
leaq -0x28(%rbp), %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O2/kaiserschmarrn0[P]mywm/mywm.c
// Function: client_message
static void client_message(xcb_generic_event_t *ev) {
	xcb_client_message_event_t *e = (xcb_client_message_event_t *)ev;

	window *found = search_all(NULL, TYPE_ALL, WIN_CHILD, e->window);

	if (!found || !found->normal || e->type != ewmh->_NET_WM_STATE) {
		return;
	}	

	for (int i = 1; i < 3; i++) {
		if ((xcb_atom_t)e->data.data32[i] == ewmh->_NET_WM_STATE_FULLSCREEN) {
			switch (2 * e->data.data32[0] + found->is_e_full) {
				case 2 * XCB_EWMH_WM_STATE_ADD:
					ext_full(found);
					break;
				case 2 * XCB_EWMH_WM_STATE_REMOVE + 1:
					ext_full(found);
					break;
				case 2 * XCB_EWMH_WM_STATE_TOGGLE:
					/* fallthrough */
				case 2 * XCB_EWMH_WM_STATE_TOGGLE + 1:
					ext_full(found);
			}
		}
	}
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
movq %rdi, %rbx
movl 0x4(%rdi), %ecx
xorl %edi, %edi
xorl %esi, %esi
xorl %edx, %edx
callq 0x6736
testq %rax, %rax
je 0x4581
movq %rax, %r14
cmpl $0x0, 0xc0(%rax)
je 0x4581
movl 0x8(%rbx), %eax
movq 0x8f24(%rip), %rcx      # 0xd458
cmpl 0x84(%rcx), %eax
jne 0x4581
xorl %r15d, %r15d
pushq $0x36
popq %r12
cmpq $0x2, %r15
je 0x4581
movl 0x10(%rbx,%r15,4), %eax
movq 0x8f03(%rip), %rcx      # 0xd458
cmpl 0x128(%rcx), %eax
jne 0x457c
movl 0xc(%rbx), %eax
addl %eax, %eax
addl 0x190(%r14), %eax
cmpl $0x5, %eax
ja 0x457c
btl %eax, %r12d
jae 0x457c
movq %r14, %rdi
callq 0x5485
incq %r15
jmp 0x4543
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O2/kaiserschmarrn0[P]mywm/mywm.c
// Function: key_press
static void key_press(xcb_generic_event_t *ev) {
	xcb_key_press_event_t *e = (xcb_key_press_event_t *)ev;
	xcb_keysym_t keysym = xcb_key_symbols_get_keysym(keysyms, e->detail, 0);

	if (keysym != XK_Tab && state == SELECT_WINDOW) {
		select_window_terminate();
	}

	for (int i = 0; i < LEN(keys); i++) {
		if (keysym == keys[i].key && keys[i].mod == e->state) {
			keys[i].function(keys[i].arg);
			break;
		}
	}
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r14
pushq %rbx
movq %rdi, %rbx
movq 0x8d7b(%rip), %rdi      # 0xd470
movzbl 0x1(%rbx), %esi
xorl %edx, %edx
callq 0x31b0
movl %eax, %r14d
cmpl $0xff09, %eax           # imm = 0xFF09
je 0x4718
cmpl $0x3, 0x8d33(%rip)      # 0xd444
jne 0x4718
callq 0x6894
pushq $0x10
popq %rax
leaq 0x83be(%rip), %rcx      # 0xcae0
cmpq $0x190, %rax            # imm = 0x190
je 0x4742
cmpl -0xc(%rax,%rcx), %r14d
jne 0x473c
movzwl -0x10(%rax,%rcx), %edx
cmpw 0x1c(%rbx), %dx
je 0x4747
addq $0x18, %rax
jmp 0x4722
popq %rbx
popq %r14
popq %rbp
retq
movq (%rax,%rcx), %rdi
popq %rbx
popq %r14
popq %rbp
jmpq *-0x8(%rax,%rcx)
// File: /workspace/github_c_makefile_star2_O2/kaiserschmarrn0[P]mywm/mywm.c
// Function: key_release
static void key_release(xcb_generic_event_t *ev) {
	xcb_key_release_event_t *e = (xcb_key_release_event_t *)ev;
	xcb_keysym_t keysym = xcb_key_symbols_get_keysym(keysyms, e->detail, 0);
	
	if (keysym == XK_Super_L && state == SELECT_WINDOW) {
		select_window_terminate();
	}
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
movq 0x8d12(%rip), %rax      # 0xd470
movzbl 0x1(%rdi), %esi
movq %rax, %rdi
xorl %edx, %edx
callq 0x31b0
cmpl $0xffeb, %eax           # imm = 0xFFEB
jne 0x4782
cmpl $0x3, 0x8cca(%rip)      # 0xd444
jne 0x4782
popq %rbp
jmp 0x6894
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O2/kaiserschmarrn0[P]mywm/mywm.c
// Function: unmap_notify
static void unmap_notify(xcb_generic_event_t *ev) {
	xcb_unmap_notify_event_t *e = (xcb_unmap_notify_event_t *)ev;

	window *found = search_ws(curws, TYPE_ALL, WIN_CHILD, e->window);
	if (!found) {
		return;
	}
	
	if (found->ignore_unmap) {
		found->ignore_unmap = 0;
		return;
	}

	forget_client(found, curws);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %rbx
pushq %rax
leaq 0x92ae(%rip), %rbx      # 0xda70
movl (%rbx), %eax
movl 0x8(%rdi), %ecx
movl %eax, %edi
xorl %esi, %esi
xorl %edx, %edx
callq 0x66f4
testq %rax, %rax
je 0x47e7
cmpl $0x0, 0x194(%rax)
je 0x47ee
andl $0x0, 0x194(%rax)
addq $0x8, %rsp
popq %rbx
popq %rbp
retq
movl (%rbx), %esi
movq %rax, %rdi
addq $0x8, %rsp
popq %rbx
popq %rbp
jmp 0x54d6
// File: /workspace/github_c_makefile_star2_O2/kaiserschmarrn0[P]mywm/mywm.c
// Function: destroy_notify
static void destroy_notify(xcb_generic_event_t *ev) {
	xcb_destroy_notify_event_t *e = (xcb_destroy_notify_event_t *)ev;

	int ws;
	window *found = search_all(&ws, TYPE_ALL, WIN_CHILD, e->window);
	
	if (found) {
		forget_client(found, ws);
	}
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x10, %rsp
movl 0x8(%rdi), %ecx
leaq -0x4(%rbp), %rdi
xorl %esi, %esi
xorl %edx, %edx
callq 0x6736
testq %rax, %rax
je 0x4826
movl -0x4(%rbp), %esi
movq %rax, %rdi
callq 0x54d6
addq $0x10, %rsp
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O2/kaiserschmarrn0[P]mywm/mywm.c
// Function: expose
static void expose(xcb_generic_event_t *ev) {
	xcb_expose_event_t *e = (xcb_expose_event_t *)ev;

	search_data data = search_range(curws, TYPE_NORMAL, WIN_COUNT, REGION_COUNT, e->window);
	if (!data.win) {
		return;
	}

	draw_region(data.win, data.index, data.win->last_pm[data.index - WIN_COUNT]);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
leaq 0x920f(%rip), %rax      # 0xda70
movl (%rax), %eax
movl 0x4(%rdi), %r8d
pushq $0x1
popq %rsi
pushq $0x2
popq %rdx
pushq $0x4
popq %rcx
movl %eax, %edi
callq 0x66a1
testq %rax, %rax
je 0x4893
movslq %edx, %rcx
movl 0xd4(%rax,%rcx,4), %ecx
movq %rax, %rdi
movl %edx, %esi
movl %ecx, %edx
popq %rbp
jmp 0x561b
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O2/kaiserschmarrn0[P]mywm/mywm.c
// Function: grab_keys
static void grab_keys() {
	xcb_key_symbols_free(keysyms);

	keysyms = xcb_key_symbols_alloc(conn);

	for (int i = 0; i < LEN(keys); i++) {
		xcb_keycode_t *keycode = xcb_key_symbols_get_keycode(keysyms, keys[i].key);
		xcb_grab_key(conn, 0, scr->root, keys[i].mod, *keycode, XCB_GRAB_MODE_ASYNC,
				XCB_GRAB_MODE_ASYNC);
		free(keycode);
	}
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
subq $0x10, %rsp
movq 0x8bb4(%rip), %rdi      # 0xd470
callq 0x33e0
movq 0x8b80(%rip), %rdi      # 0xd448
callq 0x32f0
movq %rax, 0x8b9c(%rip)      # 0xd470
pushq $0x4
popq %r15
leaq 0x8201(%rip), %r12      # 0xcae0
pushq $0x1
popq %rbx
cmpq $0x184, %r15            # imm = 0x184
je 0x4937
movq 0x8b7e(%rip), %rdi      # 0xd470
movl (%r15,%r12), %esi
callq 0x3040
movq %rax, %r14
movq 0x8b43(%rip), %rdi      # 0xd448
movq 0x8b44(%rip), %rax      # 0xd450
movl (%rax), %edx
movzwl -0x4(%r15,%r12), %ecx
movzbl (%r14), %r8d
movl $0x1, (%rsp)
xorl %esi, %esi
movl %ebx, %r9d
callq 0x3460
movq %r14, %rdi
callq 0x3270
addq $0x18, %r15
jmp 0x48e2
addq $0x10, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O2/kaiserschmarrn0[P]mywm/mywm.c
// Function: button_press_helper
static int button_press_helper(xcb_button_press_event_t *e, int len, const button list[],
		xcb_window_t win, uint32_t x, uint32_t y) {

	for (int i = 0; i < len; i++) {
		if (e->detail == list[i].button && list[i].mod == e->state) {
			if (list[i].press) {
				list[i].press(&(press_arg){ win, x, y });
			}
			return 1;
		}
	}

	return 0;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r14
pushq %rbx
subq $0x10, %rsp
movl %esi, %ebx
xorl %r14d, %r14d
testl %esi, %esi
movl $0x0, %eax
cmovgl %esi, %eax
addq $0x8, %rdx
cmpq %r14, %rax
je 0x499b
movzbl 0x1(%rdi), %esi
cmpl %esi, -0x4(%rdx)
jne 0x497a
movzwl -0x8(%rdx), %esi
cmpw 0x1c(%rdi), %si
je 0x4983
incq %r14
addq $0x10, %rdx
jmp 0x4962
movq (%rdx), %rax
testq %rax, %rax
je 0x499b
leaq -0x1c(%rbp), %rdi
movl %ecx, (%rdi)
movl %r8d, 0x4(%rdi)
movl %r9d, 0x8(%rdi)
callq *%rax
movslq %ebx, %rcx
xorl %eax, %eax
cmpq %rcx, %r14
setl %al
addq $0x10, %rsp
popq %rbx
popq %r14
popq %rbp
retq
nop
// File: /workspace/github_c_makefile_star2_O2/kaiserschmarrn0[P]mywm/rounded.c
// Function: init_rounded_corners
void init_rounded_corners() {
	int last_res;
	int yoff = 0;
	int res = -1;
	for (float y = 0; y < 2 * RAD; y++) {
		last_res = res;
		float center_y = RAD - 1 - y + .5;
		res = round(sqrt(RAD * RAD - center_y * center_y));
	
		if (RAD - res == 0) {
			yoff = y + 1;
		}

		if (res == last_res) {
			rect_mask[rect_count].height++;
		} else {
			rect_count++;
			rect_mask[rect_count].height = 1;
			rect_mask[rect_count].x = RAD - res;
			rect_mask[rect_count].y = y - yoff;
		} 
	}

	rect_count++;

	corner_height = yoff - rect_mask[rect_count / 2].height;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
subq $0x10, %rsp
xorl %ebx, %ebx
xorps %xmm3, %xmm3
pushq $-0x1
popq %r12
movss 0x4754(%rip), %xmm1     # 0x9124
movss 0x4750(%rip), %xmm2     # 0x9128
leaq 0x8ef1(%rip), %r14      # 0xd8d0
pushq $0x2
popq %r15
ucomiss %xmm3, %xmm1
jbe 0x4a9c
movaps %xmm2, %xmm0
movss %xmm3, -0x24(%rbp)
subss %xmm3, %xmm0
addss 0x472c(%rip), %xmm0     # 0x912c
mulss %xmm0, %xmm0
subss %xmm0, %xmm1
cvtss2sd %xmm1, %xmm0
ucomisd 0x471c(%rip), %xmm0     # 0x9130
jb 0x4a1c
sqrtsd %xmm0, %xmm0
jmp 0x4a21
callq 0x35f0
callq 0x3580
cvttsd2si %xmm0, %eax
movss -0x24(%rbp), %xmm3
movaps %xmm3, %xmm0
movss 0x46ee(%rip), %xmm2     # 0x9128
addss %xmm2, %xmm0
cmpl $0x2, %eax
jne 0x4a47
cvttss2si %xmm0, %ebx
movslq 0x88fa(%rip), %rcx      # 0xd348
cmpl %eax, %r12d
jne 0x4a5b
incw 0x6(%r14,%rcx,8)
jmp 0x4a89
leal 0x1(%rcx), %edx
movl %edx, 0x88e4(%rip)      # 0xd348
movw $0x1, 0xe(%r14,%rcx,8)
movl %r15d, %edx
cvtsi2ss %ebx, %xmm1
subl %eax, %edx
subss %xmm1, %xmm3
cvttss2si %xmm3, %esi
movw %dx, 0x8(%r14,%rcx,8)
movw %si, 0xa(%r14,%rcx,8)
movl %eax, %r12d
movaps %xmm0, %xmm3
movss 0x468d(%rip), %xmm1     # 0x9124
jmp 0x49e3
movl 0x88a6(%rip), %eax      # 0xd348
incl %eax
movl %eax, 0x889e(%rip)      # 0xd348
cltd
idivl %r15d
cltq
movzwl 0x6(%r14,%rax,8), %eax
subl %eax, %ebx
movl %ebx, 0x8e32(%rip)      # 0xd8f0
addq $0x10, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O2/kaiserschmarrn0[P]mywm/rounded.c
// Function: rounded_corners
void rounded_corners(window *win) {
	int w = win->geom[GEOM_W];
	int h = win->geom[GEOM_H];

	xcb_rectangle_t win_rects[2 * RAD + 1];

	int half_rect_count = rect_count / 2;

	int i = 0;
	for (; i < half_rect_count; i++) {
		win_rects[i].x = rect_mask[i].x;
		win_rects[i].y = rect_mask[i].y;
		win_rects[i].width = w - 2 * rect_mask[i].x;
		win_rects[i].height = rect_mask[i].height;
	}

	win_rects[i].x = 0;
	win_rects[i].y = corner_height;
	win_rects[i].width = w;
	win_rects[i].height = h - 2 * corner_height;
	
	i++;

	for (; i < rect_count; i++) {
		win_rects[i].x = rect_mask[i].x;
		win_rects[i].y = h - corner_height + rect_mask[i].y;
		win_rects[i].width = w - 2 * rect_mask[i].x;
		win_rects[i].height = rect_mask[i].height;
	}

	xcb_shape_rectangles(conn, XCB_SHAPE_SO_SET, XCB_SHAPE_SK_BOUNDING,
			XCB_CLIP_ORDERING_Y_SORTED, win->windows[WIN_PARENT], 0, 0, rect_count,
			win_rects);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x50, %rsp
movl 0x110(%rdi), %esi
movl 0x114(%rdi), %r8d
movslq 0x8861(%rip), %rcx      # 0xd348
pushq $0x2
popq %r9
movl %ecx, %eax
cltd
idivl %r9d
xorl %r9d, %r9d
testl %eax, %eax
cmovlel %r9d, %eax
leaq 0x8dcf(%rip), %rdx      # 0xd8d0
cmpq %r9, %rax
je 0x4b3c
movl (%rdx,%r9,8), %r10d
movw %r10w, -0x30(%rbp,%r9,8)
movzwl 0x2(%rdx,%r9,8), %r11d
movw %r11w, -0x2e(%rbp,%r9,8)
addl %r10d, %r10d
movl %esi, %r11d
subl %r10d, %r11d
movw %r11w, -0x2c(%rbp,%r9,8)
movzwl 0x6(%rdx,%r9,8), %r10d
movw %r10w, -0x2a(%rbp,%r9,8)
incq %r9
jmp 0x4b01
andw $0x0, -0x30(%rbp,%rax,8)
movl 0x8da7(%rip), %r9d      # 0xd8f0
movw %r9w, -0x2e(%rbp,%rax,8)
movw %si, -0x2c(%rbp,%rax,8)
movl %r8d, %r11d
subl %r9d, %r11d
subl %r9d, %r11d
movw %r11w, -0x2a(%rbp,%rax,8)
subl %r9d, %r8d
incq %rax
cmpq %rcx, %rax
jge 0x4ba5
movl (%rdx,%rax,8), %r9d
movw %r9w, -0x30(%rbp,%rax,8)
movzwl 0x2(%rdx,%rax,8), %r10d
addw %r8w, %r10w
movw %r10w, -0x2e(%rbp,%rax,8)
addl %r9d, %r9d
movl %esi, %r10d
subl %r9d, %r10d
movw %r10w, -0x2c(%rbp,%rax,8)
movzwl 0x6(%rdx,%rax,8), %r9d
movw %r9w, -0x2a(%rbp,%rax,8)
jmp 0x4b66
leaq 0x889c(%rip), %rax      # 0xd448
movq (%rax), %rax
movl 0xd0(%rdi), %r8d
leaq -0x30(%rbp), %rdx
movq %rdx, 0x10(%rsp)
andl $0x0, (%rsp)
movl %ecx, 0x8(%rsp)
pushq $0x1
popq %rcx
movq %rax, %rdi
xorl %esi, %esi
xorl %edx, %edx
xorl %r9d, %r9d
callq 0x3250
addq $0x50, %rsp
popq %rbp
retq
nop
// File: /workspace/github_c_makefile_star2_O2/kaiserschmarrn0[P]mywm/window.c
// Function: unfocus
void unfocus(window *win) {
	uint32_t val = UNFOCUSCOL;
	xcb_change_window_attributes(conn, win->windows[WIN_PARENT], XCB_CW_BACK_PIXEL, &val);
	
	xcb_clear_area(conn, 0, win->windows[WIN_PARENT], 0, 0, win->geom[GEOM_W],
			win->geom[GEOM_H]);

	xcb_set_input_focus(conn, XCB_INPUT_FOCUS_NONE, win->windows[WIN_CHILD],
			XCB_CURRENT_TIME);

	draw_regions(win, PM_UNFOCUS);
	
	ewmh_state(win);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r14
pushq %rbx
subq $0x10, %rsp
movq %rdi, %rbx
leaq -0x14(%rbp), %rcx
movl $0xff302e2f, (%rcx)     # imm = 0xFF302E2F
leaq 0x864b(%rip), %r14      # 0xd448
movq (%r14), %rdi
movl 0xd0(%rbx), %esi
pushq $0x2
popq %rdx
callq 0x33a0
movq (%r14), %rdi
movl 0xd0(%rbx), %edx
movzwl 0x110(%rbx), %r9d
movzwl 0x114(%rbx), %eax
movl %eax, (%rsp)
xorl %esi, %esi
xorl %ecx, %ecx
xorl %r8d, %r8d
callq 0x3390
movq (%r14), %rdi
movl 0xcc(%rbx), %edx
xorl %esi, %esi
xorl %ecx, %ecx
callq 0x3140
pushq $0x3
popq %rsi
movq %rbx, %rdi
callq 0x4e63
movq %rbx, %rdi
callq 0x4e99
addq $0x10, %rsp
popq %rbx
popq %r14
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O2/kaiserschmarrn0[P]mywm/window.c
// Function: ewmh_state
void ewmh_state(window *win) {
	xcb_atom_t atoms[5];
	int i = 0;

	if (win == stack[curws].fwin) {
		atoms[i++] = ewmh__NET_WM_STATE_FOCUSED;
	}
	if (win->is_i_full || win->is_e_full) {
		atoms[i++] = ewmh->_NET_WM_STATE_FULLSCREEN;
	}
	if (win->ignore_unmap) {
		atoms[i++] = ewmh->_NET_WM_STATE_HIDDEN;
	}

	if (i) {
		xcb_ewmh_set_wm_state(ewmh, win->windows[WIN_CHILD], i, atoms);
	} else {
		xcb_delete_property(conn, win->windows[WIN_CHILD], ewmh->_NET_WM_STATE);
	}
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x20, %rsp
leaq 0x8bc8(%rip), %rax      # 0xda70
movslq (%rax), %rax
imulq $0x50, %rax, %rax
leaq 0x8a7a(%rip), %rcx      # 0xd930
xorl %edx, %edx
cmpq %rdi, 0x48(%rcx,%rax)
jne 0x4ece
leaq 0x85fe(%rip), %rax      # 0xd4c4
movl (%rax), %eax
movl %eax, -0x20(%rbp)
pushq $0x1
popq %rdx
cmpl $0x0, 0x18c(%rdi)
jne 0x4ee0
cmpl $0x0, 0x190(%rdi)
je 0x4ef8
leaq 0x8571(%rip), %rax      # 0xd458
movq (%rax), %rax
movl 0x128(%rax), %eax
movl %edx, %ecx
incl %edx
movl %eax, -0x20(%rbp,%rcx,4)
cmpl $0x0, 0x194(%rdi)
je 0x4f1b
leaq 0x8550(%rip), %rax      # 0xd458
movq (%rax), %rax
movl 0x124(%rax), %ecx
movl %edx, %esi
incl %edx
movl %ecx, -0x20(%rbp,%rsi,4)
jmp 0x4f29
leaq 0x8536(%rip), %rax      # 0xd458
movq (%rax), %rax
testl %edx, %edx
je 0x4f41
movl 0xcc(%rdi), %esi
leaq -0x20(%rbp), %rcx
movq %rax, %rdi
callq 0x34b0
addq $0x20, %rsp
popq %rbp
retq
leaq 0x8500(%rip), %rcx      # 0xd448
movq (%rcx), %rcx
movl 0xcc(%rdi), %esi
movl 0x84(%rax), %edx
movq %rcx, %rdi
addq $0x20, %rsp
popq %rbp
jmp 0x34f0
// File: /workspace/github_c_makefile_star2_O2/kaiserschmarrn0[P]mywm/window.c
// Function: focus
void focus(window *win) {
	if (stack[curws].fwin) {
		unfocus(stack[curws].fwin);
	}

	uint32_t mask = XCB_CW_BACK_PIXEL | XCB_CW_BORDER_PIXEL;
	uint32_t vals[2];
	vals[0] = FOCUSCOL;
	vals[1] = FOCUSCOL;
	xcb_change_window_attributes(conn, win->windows[WIN_PARENT], mask, vals);

	xcb_clear_area(conn, 0, win->windows[WIN_PARENT], 0, 0, win->geom[GEOM_W],
			win->geom[GEOM_H]);
		
	xcb_set_input_focus(conn, XCB_INPUT_FOCUS_POINTER_ROOT, win->windows[WIN_CHILD],
			XCB_CURRENT_TIME);
	
	draw_regions(win, PM_FOCUS);

	stack[curws].fwin = win;
	
	ewmh_state(win);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
subq $0x10, %rsp
movq %rdi, %rbx
leaq 0x8af3(%rip), %r14      # 0xda70
movslq (%r14), %rax
imulq $0x50, %rax, %rax
leaq 0x89a5(%rip), %r15      # 0xd930
movq 0x48(%r15,%rax), %rdi
testq %rdi, %rdi
je 0x4f9a
callq 0x4dde
movabsq $-0xc2c5c300c2c5c4, %rax # imm = 0xFF3D3A3CFF3D3A3C
leaq -0x28(%rbp), %rcx
movq %rax, (%rcx)
leaq 0x8496(%rip), %r12      # 0xd448
movq (%r12), %rdi
movl 0xd0(%rbx), %esi
pushq $0xa
popq %rdx
callq 0x33a0
movq (%r12), %rdi
movl 0xd0(%rbx), %edx
movzwl 0x110(%rbx), %r9d
movzwl 0x114(%rbx), %eax
movl %eax, (%rsp)
xorl %esi, %esi
xorl %ecx, %ecx
xorl %r8d, %r8d
callq 0x3390
movq (%r12), %rdi
movl 0xcc(%rbx), %edx
pushq $0x1
popq %rsi
xorl %ecx, %ecx
callq 0x3140
movq %rbx, %rdi
xorl %esi, %esi
callq 0x4e63
movslq (%r14), %rax
imulq $0x50, %rax, %rax
movq %rbx, 0x48(%r15,%rax)
movq %rbx, %rdi
callq 0x4e99
addq $0x10, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O2/kaiserschmarrn0[P]mywm/window.c
// Function: show_state
void show_state(window *win) {
	uint32_t vals[2];
	vals[0] = XCB_ICCCM_WM_STATE_NORMAL;
	vals[1] = XCB_NONE;
	
	xcb_change_property(conn, XCB_PROP_MODE_REPLACE, win->windows[WIN_CHILD], wm_atoms[WM_STATE], 
			wm_atoms[WM_STATE], 32, 2, vals);
	
	win->ignore_unmap = 0;

	ewmh_state(win);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %rbx
pushq %rax
movq %rdi, %rbx
leaq -0x10(%rbp), %rax
movq $0x1, (%rax)
leaq 0x8402(%rip), %rcx      # 0xd448
movq (%rcx), %rdi
movl 0xcc(%rbx), %edx
leaq 0x840a(%rip), %rcx      # 0xd460
movl 0x8(%rcx), %ecx
pushq $0x20
popq %r9
xorl %esi, %esi
movl %ecx, %r8d
pushq %rax
pushq $0x2
callq 0x3520
popq %rcx
popq %rdx
andl $0x0, 0x194(%rbx)
movq %rbx, %rdi
callq 0x4e99
addq $0x8, %rsp
popq %rbx
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O2/kaiserschmarrn0[P]mywm/window.c
// Function: show
void show(window *win) {
	if (win->sticky) {
		return;
	}

	xcb_map_window(conn, win->windows[WIN_CHILD]);	
	xcb_map_window(conn, win->windows[WIN_PARENT]);	

	show_state(win);
}

// Assembly:
cmpl $0x0, 0xc8(%rdi)
je 0x508c
retq
pushq %rbp
movq %rsp, %rbp
pushq %r14
pushq %rbx
movq %rdi, %rbx
leaq 0x83ab(%rip), %r14      # 0xd448
movq (%r14), %rdi
movl 0xcc(%rbx), %esi
callq 0x3230
movq (%r14), %rdi
movl 0xd0(%rbx), %esi
callq 0x3230
movq %rbx, %rdi
popq %rbx
popq %r14
popq %rbp
jmp 0x502b
// File: /workspace/github_c_makefile_star2_O2/kaiserschmarrn0[P]mywm/window.c
// Function: hide
void hide(window *win) {
	if (win->sticky) {
		return;
	}

	xcb_unmap_window(conn, win->windows[WIN_CHILD]);
	xcb_unmap_window(conn, win->windows[WIN_PARENT]);
	
	uint32_t vals[2];
	vals[0] = XCB_ICCCM_WM_STATE_ICONIC;
	vals[1] = XCB_NONE;
	
	xcb_change_property(conn, XCB_PROP_MODE_REPLACE, win->windows[WIN_CHILD], wm_atoms[WM_STATE], 
			wm_atoms[WM_STATE], 32, 2, vals);

	ewmh_state(win);
	
	win->ignore_unmap = 1;
}

// Assembly:
cmpl $0x0, 0xc8(%rdi)
je 0x50cf
retq
pushq %rbp
movq %rsp, %rbp
pushq %r14
pushq %rbx
subq $0x10, %rsp
movq %rdi, %rbx
leaq 0x8364(%rip), %r14      # 0xd448
movq (%r14), %rdi
movl 0xcc(%rbx), %esi
callq 0x3560
movq (%r14), %rdi
movl 0xd0(%rbx), %esi
callq 0x3560
leaq -0x18(%rbp), %rax
movq $0x3, (%rax)
movq (%r14), %rdi
movl 0xcc(%rbx), %edx
leaq 0x8345(%rip), %rcx      # 0xd460
movl 0x8(%rcx), %ecx
pushq $0x20
popq %r9
xorl %esi, %esi
movl %ecx, %r8d
pushq %rax
pushq $0x2
callq 0x3520
popq %rcx
popq %rdx
movq %rbx, %rdi
callq 0x4e99
movl $0x1, 0x194(%rbx)
addq $0x10, %rsp
popq %rbx
popq %r14
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O2/kaiserschmarrn0[P]mywm/window.c
// Function: stick_helper
void stick_helper(window *win) {
	if (win->sticky) {
		win->sticky = 0;
		excise_from_all_but(curws, win);
		return;
	}

	win->sticky = 1;
	insert_into_all_but(curws, win);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
movq %rdi, %rsi
cmpl $0x0, 0xc8(%rdi)
je 0x51be
andl $0x0, 0xc8(%rsi)
leaq 0x88ba(%rip), %rax      # 0xda70
movl (%rax), %edi
popq %rbp
jmp 0x662f
movl $0x1, 0xc8(%rsi)
leaq 0x88a1(%rip), %rax      # 0xda70
movl (%rax), %edi
popq %rbp
jmp 0x65d8
// File: /workspace/github_c_makefile_star2_O2/kaiserschmarrn0[P]mywm/window.c
// Function: full
void full(window *win) {
	uint32_t vals[4];
	vals[0] = - PAD;
	vals[1] = - PAD_N;
	vals[2] = scr->width_in_pixels + 2 * PAD;
	vals[3] = scr->height_in_pixels + PAD_N + PAD;
	update_geometry(win, MOVE_RESIZE_MASK, vals);

	ewmh_state(win);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %rbx
subq $0x18, %rsp
movq %rdi, %rbx
movabsq $-0x1f00000001, %rax    # imm = 0xFFFFFFE0FFFFFFFF
leaq -0x20(%rbp), %rdx
movq %rax, (%rdx)
leaq 0x7ff9(%rip), %rax      # 0xd450
movq (%rax), %rax
movzwl 0x14(%rax), %ecx
addl $0x2, %ecx
movl %ecx, 0x8(%rdx)
movzwl 0x16(%rax), %eax
addl $0x21, %eax
movl %eax, 0xc(%rdx)
pushq $0xf
popq %rsi
callq 0x5243
movq %rbx, %rdi
callq 0x4e99
addq $0x18, %rsp
popq %rbx
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O2/kaiserschmarrn0[P]mywm/window.c
// Function: ext_full
void ext_full(window *subj) {
	subj->is_e_full = !subj->is_e_full;

	if (!subj->is_e_full) {
		if (!subj->is_i_full) {
			full_restore_state(subj);
		}

		return;
	}
		
	if (!subj->is_i_full) {
		full_save_state(subj);
	}

	full(stack[curws].fwin);	
}

// Assembly:
xorl %eax, %eax
cmpl $0x0, 0x190(%rdi)
sete %al
movl %eax, 0x190(%rdi)
movl 0x18c(%rdi), %eax
je 0x54a4
testl %eax, %eax
je 0x54d1
retq
pushq %rbp
movq %rsp, %rbp
testl %eax, %eax
jne 0x54b1
callq 0x51f4
leaq 0x85b8(%rip), %rax      # 0xda70
movslq (%rax), %rax
imulq $0x50, %rax, %rax
leaq 0x846a(%rip), %rcx      # 0xd930
movq 0x48(%rcx,%rax), %rdi
popq %rbp
jmp 0x5433
jmp 0x5217
// File: /workspace/github_c_makefile_star2_O2/kaiserschmarrn0[P]mywm/window.c
// Function: forget_client
void forget_client(window *win, int ws) {
	if (win->windows[WIN_PARENT] != XCB_WINDOW_NONE) {
		xcb_generic_error_t *error = NULL;
		error = xcb_request_check(conn, xcb_reparent_window_checked(conn,
				win->windows[WIN_CHILD], scr->root, win->geom[GEOM_X] + PAD,
				win->geom[GEOM_Y] + PAD_N));

		if (!error) {
			xcb_change_save_set(conn, XCB_SET_MODE_DELETE, win->windows[WIN_CHILD]);
		} else {
			free(error);
		}

		xcb_destroy_window(conn, win->windows[WIN_PARENT]);
	
		xcb_free_gc(conn, win->gc);
	}

	if ((state == MOVE || state == RESIZE) && win == stack[curws].fwin) {
		button_release(NULL);
	}

	if (win->sticky) {
		excise_from_all_but(ws, win);
	}
	
	excise_from(ws, win);

	free(win);
	
	if (ws != curws || stack[curws].fwin != win) {
		return;
	}
	
	stack[ws].fwin = NULL;

	refocus(ws);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
movl %esi, %ebx
movq %rdi, %r14
cmpl $0x0, 0xd0(%rdi)
je 0x557f
leaq 0x7f4e(%rip), %r12      # 0xd448
movq (%r12), %r15
leaq 0x7f4b(%rip), %rax      # 0xd450
movq (%rax), %rax
movl (%rax), %edx
movl 0xcc(%r14), %esi
movl 0x108(%r14), %eax
incl %eax
movl 0x10c(%r14), %edi
addl $0x20, %edi
movswl %ax, %ecx
movswl %di, %r8d
movq %r15, %rdi
callq 0x30e0
movq %r15, %rdi
movl %eax, %esi
callq 0x3540
testq %rax, %rax
je 0x554c
movq %rax, %rdi
callq 0x3270
jmp 0x555f
movq (%r12), %rdi
movl 0xcc(%r14), %edx
pushq $0x1
popq %rsi
callq 0x3500
movq (%r12), %rdi
movl 0xd0(%r14), %esi
callq 0x30c0
movq (%r12), %rdi
movl 0x104(%r14), %esi
callq 0x3190
leaq 0x7ebe(%rip), %rax      # 0xd444
movl (%rax), %eax
decl %eax
cmpl $0x1, %eax
ja 0x55b2
leaq 0x84da(%rip), %rax      # 0xda70
movslq (%rax), %rax
imulq $0x50, %rax, %rax
leaq 0x838c(%rip), %rcx      # 0xd930
cmpq %r14, 0x48(%rcx,%rax)
jne 0x55b2
xorl %edi, %edi
callq 0x6e7c
cmpl $0x0, 0xc8(%r14)
je 0x55c6
movl %ebx, %edi
movq %r14, %rsi
callq 0x662f
movl %ebx, %edi
movq %r14, %rsi
callq 0x652f
movq %r14, %rdi
callq 0x3270
leaq 0x8491(%rip), %rax      # 0xda70
cmpl %ebx, (%rax)
jne 0x55f8
movslq %ebx, %rax
imulq $0x50, %rax, %rax
leaq 0x833f(%rip), %rcx      # 0xd930
cmpq %r14, 0x48(%rcx,%rax)
je 0x5601
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
addq %rcx, %rax
addq $0x48, %rax
andq $0x0, (%rax)
movl %ebx, %edi
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
jmp 0x678f
// File: /workspace/github_c_makefile_star2_O2/kaiserschmarrn0[P]mywm/window.c
// Function: draw_region
void draw_region(window *win, int window_index, int pm_index) {
	int region_index = window_index - WIN_COUNT;
	xcb_copy_area_checked(conn, pixmaps[region_index][pm_index], win->windows[window_index],
			win->gc, 0, 0, 0, 0, controls[region_index].geom.width,
			controls[region_index].geom.height);

	win->last_pm[region_index] = pm_index;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %rbx
subq $0x28, %rsp
movq %rdi, %rbx
movslq %esi, %r14
leaq -0x2(%r14), %rax
leaq 0x7e0f(%rip), %rcx      # 0xd448
movq (%rcx), %rdi
shlq $0x4, %rax
addq 0x79a1(%rip), %rax      # 0xcfe8
movslq %edx, %r15
movl (%rax,%r15,4), %esi
movl 0xcc(%rbx,%r14,4), %edx
movl 0x104(%rbx), %ecx
andl $0x0, 0x8(%rsp)
pushq $0x20
popq %rax
andl $0x0, (%rsp)
movl %eax, 0x18(%rsp)
movl %eax, 0x10(%rsp)
xorl %r8d, %r8d
xorl %r9d, %r9d
callq 0x32d0
movl %r15d, 0xd4(%rbx,%r14,4)
addq $0x28, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O2/kaiserschmarrn0[P]mywm/window.c
// Function: search_resize_regions
int search_resize_regions(window *win, xcb_window_t id) {
	for (unsigned int i = 0; i < 8; i++) {
		if (win->resize_regions[i] == id) {
			return i;
		}
	}

	return -1;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
xorl %ecx, %ecx
movl $0xffffffff, %eax       # imm = 0xFFFFFFFF
cmpq $0x8, %rcx
je 0x56af
cmpl %esi, 0xe4(%rdi,%rcx,4)
je 0x56ad
incq %rcx
jmp 0x5699
movl %ecx, %eax
popq %rbp
retq