LLM4Binary/decompile-bench-makefile huggingface dataset:
// File: /workspace/github_c_makefile_star2_O3/zenlinux[P]cwm/mousefunc.c
// Function: mousefunc_sweep_draw
static void
mousefunc_sweep_draw(struct client_ctx *cc)
{
	struct screen_ctx	*sc = cc->sc;
	char			 asize[10]; /* fits "nnnnxnnnn\0" */
	int			 width, width_size, width_name;

	(void)snprintf(asize, sizeof(asize), "%dx%d",
	    (cc->geom.w - cc->hint.basew) / cc->hint.incw,
	    (cc->geom.h - cc->hint.baseh) / cc->hint.inch);
	width_size = font_width(sc, asize, strlen(asize)) + 4;
	width_name = font_width(sc, cc->name, strlen(cc->name)) + 4;
	width = MAX(width_size, width_name);

	XReparentWindow(X_Dpy, sc->menuwin, cc->win, 0, 0);
	XMoveResizeWindow(X_Dpy, sc->menuwin, 0, 0, width, font_height(sc) * 2);
	XMapWindow(X_Dpy, sc->menuwin);
	XClearWindow(X_Dpy, sc->menuwin);
	font_draw(sc, cc->name, strlen(cc->name), sc->menuwin,
	    2, font_ascent(sc) + 1);
	font_draw(sc, asize, strlen(asize), sc->menuwin,
	    width / 2 - width_size / 2, font_height(sc) + font_ascent(sc) + 1);
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x18, %rsp
movq %rdi, %r15
movq 0x30(%rdi), %rbx
movl 0x5c(%rdi), %eax
movl 0x60(%rdi), %ecx
subl 0x74(%rdi), %eax
cltd
idivl 0x8c(%rdi)
movl %eax, %r8d
subl 0x78(%rdi), %ecx
movl %ecx, %eax
cltd
idivl 0x90(%rdi)
leaq 0x2fed(%rip), %rdx      # 0xea2b
leaq 0x6(%rsp), %r14
movl $0xa, %esi
movq %r14, %rdi
movl %r8d, %ecx
movl %eax, %r8d
xorl %eax, %eax
callq 0x50b0
movq %r14, %rdi
callq 0x5320
movq %rbx, %rdi
movq %r14, %rsi
movl %eax, %edx
callq 0xbff9
movq %rax, 0x10(%rsp)
leal 0x4(%rax), %r12d
movq 0xd8(%r15), %r14
movq %r14, %rdi
callq 0x5320
movq %rbx, %rdi
movq %r14, %rsi
movl %eax, %edx
callq 0xbff9
leal 0x4(%rax), %r14d
cmpl %r14d, %r12d
cmovgl %r12d, %r14d
leaq 0xada4(%rip), %rax      # 0x16848
movq (%rax), %rdi
movq %rax, %r13
movq 0x20(%rbx), %rsi
movq 0x38(%r15), %rdx
xorl %ecx, %ecx
xorl %r8d, %r8d
callq 0x57f0
movq (%r13), %r13
movq 0x20(%rbx), %rbp
movq %rbx, %rdi
callq 0xbf55
leal (%rax,%rax), %r9d
movq %r13, %rdi
movq %rbp, %rsi
xorl %edx, %edx
xorl %ecx, %ecx
movl %r14d, %r8d
callq 0x5440
leaq 0xad5f(%rip), %rax      # 0x16848
movq (%rax), %rdi
movq 0x20(%rbx), %rsi
callq 0x54c0
leaq 0xad4c(%rip), %rax      # 0x16848
movq (%rax), %rdi
movq 0x20(%rbx), %rsi
callq 0x50a0
movq 0xd8(%r15), %r15
movq %r15, %rdi
callq 0x5320
movq %rax, %r13
movq 0x20(%rbx), %rbp
movq %rbx, %rdi
callq 0xbf40
leal 0x1(%rax), %r9d
movq %rbx, %rdi
movq %r15, %rsi
movl %r13d, %edx
movq %rbp, %rcx
movl $0x2, %r8d
callq 0xc02e
leaq 0x6(%rsp), %rdi
callq 0x5320
movq %rax, %r15
movq 0x20(%rbx), %r13
movl %r14d, %ebp
shrl $0x1f, %ebp
addl %r14d, %ebp
sarl %ebp
shrl $0x1f, %r12d
movq 0x10(%rsp), %rax
addl %r12d, %eax
addl $0x4, %eax
sarl %eax
subl %eax, %ebp
movq %rbx, %rdi
callq 0xbf55
movl %eax, %r14d
movq %rbx, %rdi
callq 0xbf40
leal (%r14,%rax), %r9d
incl %r9d
movq %rbx, %rdi
leaq 0x6(%rsp), %rsi
movl %r15d, %edx
movq %r13, %rcx
movl %ebp, %r8d
callq 0xc02e
addq $0x18, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O3/zenlinux[P]cwm/mousefunc.c
// Function: mousefunc_window_move
void
mousefunc_window_move(struct client_ctx *cc, void *arg)
{
	XEvent			 ev;
	Time			 ltime = 0;
	struct screen_ctx	*sc = cc->sc;
	int			 px, py;

	client_raise(cc);

	if (cc->flags & CLIENT_FREEZE)
		return;

	if (xu_ptr_grab(cc->win, MOUSEMASK, Cursor_move) < 0)
		return;

	xu_ptr_getpos(cc->win, &px, &py);

	for (;;) {
		XMaskEvent(X_Dpy, MOUSEMASK|ExposureMask, &ev);

		switch (ev.type) {
		case Expose:
			client_draw_border(cc);
			break;
		case MotionNotify:
			cc->geom.x = ev.xmotion.x_root - px - cc->bwidth;
			cc->geom.y = ev.xmotion.y_root - py - cc->bwidth;

			cc->geom.x += client_snapcalc(cc->geom.x,
			    cc->geom.w, sc->view.w,
			    cc->bwidth, Conf.snapdist);
			cc->geom.y += client_snapcalc(cc->geom.y,
			    cc->geom.h, sc->view.h,
			    cc->bwidth, Conf.snapdist);

			/* don't move more than 60 times / second */
			if ((ev.xmotion.time - ltime) > (1000 / 60)) {
				ltime = ev.xmotion.time;
				client_move(cc);
			}
			break;
		case ButtonRelease:
			if (ltime)
				client_move(cc);
			xu_ptr_ungrab();
			return;
		}
	}
	/* NOTREACHED */
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0xc8, %rsp
movq %rdi, %rbx
movq 0x30(%rdi), %r15
callq 0x7072
testb $0x10, 0xa8(%rbx)
jne 0xbcdb
movq 0x38(%rbx), %rdi
leaq 0xac74(%rip), %rax      # 0x16858
movq (%rax), %rdx
movl $0x4c, %esi
callq 0x8724
testl %eax, %eax
js 0xbcdb
movq 0x38(%rbx), %rdi
leaq 0x4(%rsp), %rsi
movq %rsp, %rdx
callq 0x8854
xorl %ebp, %ebp
leaq 0xac35(%rip), %r12      # 0x16848
leaq 0x8(%rsp), %r14
movq (%r12), %rdi
movl $0x804c, %esi           # imm = 0x804C
movq %r14, %rdx
callq 0x55c0
movl 0x8(%rsp), %eax
cmpl $0x6, %eax
je 0xbc4b
cmpl $0xc, %eax
je 0xbc41
cmpl $0x5, %eax
jne 0xbc18
jmp 0xbcc9
movq %rbx, %rdi
callq 0x6936
jmp 0xbc18
movl 0x50(%rsp), %edi
movl 0x50(%rbx), %ecx
movl 0x5c(%rbx), %esi
movl 0x4(%rsp), %eax
addl %ecx, %eax
subl %eax, %edi
movl %edi, 0x54(%rbx)
movl 0x54(%rsp), %eax
movl (%rsp), %edx
addl %ecx, %edx
subl %edx, %eax
movl %eax, 0x58(%rbx)
movl 0xac(%r15), %edx
leaq 0x8ae4(%rip), %r13      # 0x14760
movl 0x5c(%r13), %r8d
callq 0x7391
addl %eax, 0x54(%rbx)
movl 0x50(%rbx), %ecx
movl 0x58(%rbx), %edi
movl 0x60(%rbx), %esi
movl 0xb0(%r15), %edx
movl 0x5c(%r13), %r8d
callq 0x7391
addl %eax, 0x58(%rbx)
movq 0x40(%rsp), %r13
movq %r13, %rax
subq %rbp, %rax
cmpq $0x11, %rax
jb 0xbc18
movq %rbx, %rdi
callq 0x6910
movq %r13, %rbp
jmp 0xbc18
testq %rbp, %rbp
je 0xbcd6
movq %rbx, %rdi
callq 0x6910
callq 0x8780
addq $0xc8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O3/zenlinux[P]cwm/mousefunc.c
// Function: mousefunc_menu_unhide
void
mousefunc_menu_unhide(struct client_ctx *cc, void *arg)
{
	struct screen_ctx	*sc = cc->sc;
	struct client_ctx	*old_cc;
	struct menu		*mi;
	struct menu_q		 menuq;
	char			*wname;

	old_cc = client_current();

	TAILQ_INIT(&menuq);
	TAILQ_FOREACH(cc, &Clientq, entry)
		if (cc->flags & CLIENT_HIDDEN) {
			wname = (cc->label) ? cc->label : cc->name;
			if (wname == NULL)
				continue;

			mi = xcalloc(1, sizeof(*mi));
			(void)strlcpy(mi->text, wname, sizeof(mi->text));
			mi->ctx = cc;
			TAILQ_INSERT_TAIL(&menuq, mi, entry);
		}

	if (TAILQ_EMPTY(&menuq))
		return;

	mi = menu_filter(sc, &menuq, NULL, NULL, 0, NULL, NULL);
	if (mi != NULL) {
		cc = (struct client_ctx *)mi->ctx;
		client_unhide(cc);

		if (old_cc != NULL)
			client_ptrsave(old_cc);
		client_ptrwarp(cc);
	} else {
		while ((mi = TAILQ_FIRST(&menuq)) != NULL) {
			TAILQ_REMOVE(&menuq, mi, entry);
			xfree(mi);
		}
	}
}

// Assembly:
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x20, %rsp
movq 0x30(%rdi), %r14
callq 0x6d39
movq %rax, %rbx
leaq 0x10(%rsp), %rax
movq $0x0, (%rax)
movq %rax, 0x8(%rax)
leaq 0x873a(%rip), %rax      # 0x14480
movq (%rax), %r13
testq %r13, %r13
je 0xbe3e
testb $0x1, 0xa8(%r13)
je 0xbdb9
movq 0xe0(%r13), %r15
testq %r15, %r15
jne 0xbd74
movq 0xd8(%r13), %r15
testq %r15, %r15
je 0xbdb9
movl $0x1, %edi
movl $0x98, %esi
callq 0x6198
movq %rax, %r12
leaq 0x20(%rax), %rdi
movl $0x33, %edx
movq %r15, %rsi
callq 0xd220
movq %r13, 0x88(%r12)
movq $0x0, (%r12)
movq 0x18(%rsp), %rax
movq %rax, 0x8(%r12)
movq %r12, (%rax)
movq %r12, 0x18(%rsp)
movq (%r13), %r13
testq %r13, %r13
jne 0xbd52
cmpq $0x0, 0x10(%rsp)
je 0xbe3e
movq $0x0, (%rsp)
leaq 0x10(%rsp), %r15
movq %r14, %rdi
movq %r15, %rsi
xorl %edx, %edx
xorl %ecx, %ecx
xorl %r8d, %r8d
xorl %r9d, %r9d
callq 0x7473
testq %rax, %rax
je 0xbe34
movq 0x88(%rax), %r14
movq %r14, %rdi
callq 0x6a65
testq %rbx, %rbx
je 0xbe0d
movq %rbx, %rdi
callq 0x7104
movq %r14, %rdi
callq 0x7088
jmp 0xbe3e
movq (%rdi), %rax
movq 0x8(%rdi), %rcx
testq %rax, %rax
movq %rax, %rdx
cmoveq %r15, %rdx
movq %rcx, 0x8(%rdx)
movq %rax, (%rcx)
callq 0x61b8
movq 0x10(%rsp), %rdi
testq %rdi, %rdi
jne 0xbe17
addq $0x20, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
retq
// File: /workspace/github_c_makefile_star2_O3/zenlinux[P]cwm/mousefunc.c
// Function: mousefunc_menu_cmd
void
mousefunc_menu_cmd(struct client_ctx *cc, void *arg)
{
	struct screen_ctx	*sc = cc->sc;
	struct menu		*mi;
	struct menu_q		 menuq;
	struct cmd		*cmd;

	TAILQ_INIT(&menuq);
	TAILQ_FOREACH(cmd, &Conf.cmdq, entry) {
		mi = xcalloc(1, sizeof(*mi));
		(void)strlcpy(mi->text, cmd->label, sizeof(mi->text));
		mi->ctx = cmd;
		TAILQ_INSERT_TAIL(&menuq, mi, entry);
	}
	if (TAILQ_EMPTY(&menuq))
		return;

	mi = menu_filter(sc, &menuq, NULL, NULL, 0, NULL, NULL);
	if (mi != NULL)
		u_spawn(((struct cmd *)mi->ctx)->image);
	else
		while ((mi = TAILQ_FIRST(&menuq)) != NULL) {
			TAILQ_REMOVE(&menuq, mi, entry);
			xfree(mi);
		}
}

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
subq $0x20, %rsp
movq 0x30(%rdi), %rbx
leaq 0x10(%rsp), %rax
movq $0x0, (%rax)
movq %rax, 0x8(%rax)
leaq 0x88f0(%rip), %rax      # 0x14760
movq 0x30(%rax), %r15
testq %r15, %r15
je 0xbf33
movl $0x1, %edi
movl $0x98, %esi
callq 0x6198
movq %rax, %r14
leaq 0x20(%rax), %rdi
leaq 0x1014(%r15), %rsi
movl $0x33, %edx
callq 0xd220
movq %r15, 0x88(%r14)
movq $0x0, (%r14)
movq 0x18(%rsp), %rax
movq %rax, 0x8(%r14)
movq %r14, (%rax)
movq %r14, 0x18(%rsp)
movq (%r15), %r15
testq %r15, %r15
jne 0xbe7d
cmpq $0x0, 0x10(%rsp)
je 0xbf33
movq $0x0, (%rsp)
leaq 0x10(%rsp), %r14
movq %rbx, %rdi
movq %r14, %rsi
xorl %edx, %edx
xorl %ecx, %ecx
xorl %r8d, %r8d
xorl %r9d, %r9d
callq 0x7473
testq %rax, %rax
je 0xbf29
movq 0x88(%rax), %rdi
addq $0x14, %rdi
callq 0x8618
jmp 0xbf33
movq (%rdi), %rax
movq 0x8(%rdi), %rcx
testq %rax, %rax
movq %rax, %rdx
cmoveq %r14, %rdx
movq %rcx, 0x8(%rdx)
movq %rax, (%rcx)
callq 0x61b8
movq 0x10(%rsp), %rdi
testq %rdi, %rdi
jne 0xbf0c
addq $0x20, %rsp
popq %rbx
popq %r14
popq %r15
retq
nopl (%rax)
// File: /workspace/github_c_makefile_star2_O3/zenlinux[P]cwm/font.c
// Function: font_init
void
font_init(struct screen_ctx *sc, const char *color)
{
	sc->xftdraw = XftDrawCreate(X_Dpy, sc->rootwin,
	    DefaultVisual(X_Dpy, sc->which), DefaultColormap(X_Dpy, sc->which));
	if (sc->xftdraw == NULL)
		errx(1, "XftDrawCreate");

	if (!XftColorAllocName(X_Dpy, DefaultVisual(X_Dpy, sc->which),
	    DefaultColormap(X_Dpy, sc->which), color, &sc->xftcolor))
		errx(1, "XftColorAllocName");
}

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
movq %rsi, %rbx
movq %rdi, %r14
leaq 0xa8d4(%rip), %r15      # 0x16848
movq (%r15), %rdi
movq 0x18(%r14), %rsi
movq 0xe8(%rdi), %rax
movl 0x10(%r14), %ecx
shlq $0x7, %rcx
movq 0x40(%rax,%rcx), %rdx
movq 0x50(%rax,%rcx), %rcx
callq 0x5830
movq %rax, 0xf8(%r14)
testq %rax, %rax
je 0xbfdd
movq (%r15), %rdi
movq 0xe8(%rdi), %rax
movl 0x10(%r14), %ecx
shlq $0x7, %rcx
movq 0x40(%rax,%rcx), %rsi
movq 0x50(%rax,%rcx), %rdx
addq $0xe8, %r14
movq %rbx, %rcx
movq %r14, %r8
callq 0x5510
testl %eax, %eax
je 0xbfe6
popq %rbx
popq %r14
popq %r15
retq
leaq 0x2a4d(%rip), %rsi      # 0xea31
jmp 0xbfed
leaq 0x2a52(%rip), %rsi      # 0xea3f
movl $0x1, %edi
xorl %eax, %eax
callq 0x56f0
// File: /workspace/github_c_makefile_star2_O3/zenlinux[P]cwm/font.c
// Function: font_make
XftFont *
font_make(struct screen_ctx *sc, const char *name)
{
	XftFont		*fn = NULL;
	FcPattern	*pat, *patx;
	XftResult	 res;

	if ((pat = FcNameParse((const FcChar8*)name)) == NULL)
		return (NULL);

	if ((patx = XftFontMatch(X_Dpy, sc->which, pat, &res)) != NULL)
		fn = XftFontOpenPattern(X_Dpy, patx);

	FcPatternDestroy(pat);

	return (fn);
}

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
subq $0x10, %rsp
movq %rdi, %r14
movq %rsi, %rdi
callq 0x5880
testq %rax, %rax
je 0xc0da
movq %rax, %rbx
leaq 0xa797(%rip), %r15      # 0x16848
movq (%r15), %rdi
movl 0x10(%r14), %esi
leaq 0xc(%rsp), %rcx
movq %rax, %rdx
callq 0x5460
testq %rax, %rax
je 0xc0df
movq (%r15), %rdi
movq %rax, %rsi
callq 0x56d0
movq %rax, %r14
jmp 0xc0e2
xorl %r14d, %r14d
jmp 0xc0ea
xorl %r14d, %r14d
movq %rbx, %rdi
callq 0x5030
movq %r14, %rax
addq $0x10, %rsp
popq %rbx
popq %r14
popq %r15
retq
nop
// File: /workspace/github_c_makefile_star2_O3/zenlinux[P]cwm/linux.c
// Function: strlcat
size_t
strlcat(char *dst, const char *src, size_t siz)
{
	char *d = dst;
	const char *s = src;
	size_t n = siz;
	size_t dlen;

	/* Find the end of dst and adjust bytes left but don't go past end */
	while (n-- != 0 && *d != '\0')
		d++;
	dlen = d - dst;
	n = siz - dlen;

	if (n == 0)
		return(dlen + strlen(s));
	while (*s != '\0') {
		if (n != 1) {
			*d++ = *s;
			n--;
		}
		s++;
	}
	*d = '\0';

	return(dlen + (s - src));	/* count does not include NUL */
}

// Assembly:
pushq %rbx
movq %rdi, %rcx
testq %rdx, %rdx
je 0xd28e
leaq (%rdi,%rdx), %rax
movq %rdx, %r8
movq %rdi, %rcx
cmpb $0x0, (%rcx)
je 0xd28e
incq %rcx
decq %r8
jne 0xd27e
movq %rax, %rcx
movq %rcx, %rbx
subq %rdi, %rbx
subq %rbx, %rdx
je 0xd2d2
movb (%rsi), %dil
movq %rsi, %rax
testb %dil, %dil
je 0xd2ca
movl $0x1, %r8d
cmpq $0x1, %rdx
jne 0xd2b5
movq %r8, %rdx
jmp 0xd2be
movb %dil, (%rcx)
incq %rcx
decq %rdx
movb 0x1(%rax), %dil
incq %rax
testb %dil, %dil
jne 0xd2aa
movb $0x0, (%rcx)
subq %rsi, %rax
jmp 0xd2da
movq %rsi, %rdi
callq 0x5320
addq %rbx, %rax
popq %rbx
retq
// File: /workspace/github_c_makefile_star2_O3/zenlinux[P]cwm/linux.c
// Function: strtonum
long long
strtonum(const char *numstr, long long minval, long long maxval,
    const char **errstrp)
{
	long long ll = 0;
	char *ep;
	int error = 0;
	struct errval {
		const char *errstr;
		int err;
	} ev[4] = {
		{ NULL,		0 },
		{ "invalid",	EINVAL },
		{ "too small",	ERANGE },
		{ "too large",	ERANGE },
	};

	ev[0].err = errno;
	errno = 0;
	if (minval > maxval)
		error = INVALID;
	else {
		ll = strtoll(numstr, &ep, 10);
		if (numstr == ep || *ep != '\0')
			error = INVALID;
		else if ((ll == LLONG_MIN && errno == ERANGE) || ll < minval)
			error = TOOSMALL;
		else if ((ll == LLONG_MAX && errno == ERANGE) || ll > maxval)
			error = TOOLARGE;
	}
	if (errstrp != NULL)
		*errstrp = ev[error].errstr;
	errno = ev[error].err;
	if (error)
		ll = 0;

	return (ll);
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x78, %rsp
movq %rcx, %rbp
movq %rdx, %r15
movq %rsi, %r12
movq %rdi, %r13
movq $0x0, 0x40(%rsp)
leaq 0x1715(%rip), %rax      # 0xee7a
leaq 0x60(%rsp), %rcx
movq %rcx, 0x8(%rsp)
movq %rax, (%rcx)
leaq 0x58(%rsp), %rbx
movl $0x16, (%rbx)
leaq 0x16fe(%rip), %rax      # 0xee82
movq %rax, 0x30(%rsp)
movl $0x22, %eax
movl %eax, 0x10(%rsp)
leaq 0x16f3(%rip), %rcx      # 0xee8c
movq %rcx, 0x50(%rsp)
movl %eax, 0x28(%rsp)
callq 0x5580
movq %rax, %r14
movl (%rax), %eax
movl %eax, 0x18(%rsp)
movl $0x0, (%r14)
movq %r15, 0x48(%rsp)
cmpq %r15, %r12
jle 0xd7c5
xorl %eax, %eax
jmp 0xd7f7
movq %rbp, 0x20(%rsp)
leaq 0x70(%rsp), %rbp
movq %r13, %rdi
movq %rbp, %rsi
movl $0xa, %edx
callq 0x57c0
movq %rax, %rcx
movq (%rbp), %rax
cmpq %r13, %rax
je 0xd7f0
cmpb $0x0, (%rax)
je 0xd81c
xorl %eax, %eax
movq 0x20(%rsp), %rbp
testq %rbp, %rbp
je 0xd808
movq 0x8(%rsp), %rcx
movq (%rcx), %rcx
movq %rcx, (%rbp)
movl (%rbx), %ecx
movl %ecx, (%r14)
addq $0x78, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movabsq $0x7fffffffffffffff, %rax # imm = 0x7FFFFFFFFFFFFFFF
leaq 0x1(%rax), %rdx
cmpq %rdx, %rcx
jne 0xd847
cmpl $0x22, (%r14)
sete %al
cmpq %rdx, %r12
setne %dl
orb %al, %dl
movq 0x20(%rsp), %rbp
jne 0xd851
jmp 0xd889
cmpq %r12, %rcx
movq 0x20(%rsp), %rbp
jge 0xd85d
leaq 0x10(%rsp), %rbx
leaq 0x30(%rsp), %rax
jmp 0xd89a
cmpq %rax, %rcx
jne 0xd889
cmpl $0x22, (%r14)
sete %cl
cmpq %rax, 0x48(%rsp)
setne %dl
orb %cl, %dl
jne 0xd890
leaq 0x18(%rsp), %rbx
leaq 0x40(%rsp), %rcx
movq %rcx, 0x8(%rsp)
jmp 0xd7f7
cmpq 0x48(%rsp), %rcx
jle 0xd8a4
leaq 0x28(%rsp), %rbx
leaq 0x50(%rsp), %rax
movq %rax, 0x8(%rsp)
jmp 0xd7c1
leaq 0x18(%rsp), %rbx
leaq 0x40(%rsp), %rax
movq %rax, 0x8(%rsp)
movq %rcx, %rax
jmp 0xd7f7
// File: /workspace/github_c_makefile_star2_O3/nkanaev[P]tipsy/src/tigr.c
// Function: tigrResize
void tigrResize(Tigr* bmp, int w, int h) {
    if (bmp->w == w && bmp->h == h) {
        return;
    }

    int y, cw, ch;
    TPixel* newpix = (TPixel*)calloc(w * h, sizeof(TPixel));
    cw = (w < bmp->w) ? w : bmp->w;
    ch = (h < bmp->h) ? h : bmp->h;

    // Copy any old data across.
    for (y = 0; y < ch; y++)
        memcpy(newpix + y * w, bmp->pix + y * bmp->w, cw * sizeof(TPixel));

    free(bmp->pix);
    bmp->pix = newpix;
    bmp->w = w;
    bmp->h = h;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x28, %rsp
movslq (%rdi), %rbx
movl %ebx, %eax
xorl %esi, %eax
movl 0x4(%rdi), %r15d
movl %r15d, %ecx
xorl %edx, %ecx
orl %eax, %ecx
je 0x3a03
movl %edx, %ebp
movl %esi, %r12d
movq %rdi, %r14
movl %edx, %eax
imull %esi, %eax
movslq %eax, %rdi
movl $0x4, %esi
callq 0x3270
cmpl %ebp, %r15d
cmovgel %ebp, %r15d
testl %r15d, %r15d
movq %rax, 0x20(%rsp)
jle 0x39ea
movl %ebp, 0xc(%rsp)
cmpl %r12d, %ebx
movl %r12d, %ecx
cmovll %ebx, %ecx
movq %r14, 0x18(%rsp)
movq 0x18(%r14), %rdx
movslq %ecx, %r13
shlq $0x2, %r13
movl %r12d, 0x8(%rsp)
movslq %r12d, %rbp
movl %r15d, %r14d
shlq $0x2, %rbx
shlq $0x2, %rbp
movq %rax, %r15
movq %rdx, 0x10(%rsp)
movq %rdx, %r12
movq %r15, %rdi
movq %r12, %rsi
movq %r13, %rdx
callq 0x32d0
addq %rbx, %r12
addq %rbp, %r15
decq %r14
jne 0x39bc
movl 0xc(%rsp), %ebp
movq 0x18(%rsp), %r14
movl 0x8(%rsp), %r12d
movq 0x10(%rsp), %rdi
jmp 0x39ee
movq 0x18(%r14), %rdi
callq 0x3410
movq 0x20(%rsp), %rax
movq %rax, 0x18(%r14)
movl %r12d, (%r14)
movl %ebp, 0x4(%r14)
addq $0x28, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O3/nkanaev[P]tipsy/src/tigr.c
// Function: tigrClear
void tigrClear(Tigr* bmp, TPixel color) {
    int count = bmp->w * bmp->h;
    int n;
    for (n = 0; n < count; n++)
        bmp->pix[n] = color;
}

// Assembly:
movl 0x4(%rdi), %eax
imull (%rdi), %eax
testl %eax, %eax
jle 0x3acc
movl %eax, %eax
xorl %ecx, %ecx
movq 0x18(%rdi), %rdx
movl %esi, (%rdx,%rcx,4)
incq %rcx
cmpq %rcx, %rax
jne 0x3abd
retq
// File: /workspace/github_c_makefile_star2_O3/nkanaev[P]tipsy/src/tigr.c
// Function: tigrFill
void tigrFill(Tigr* bmp, int x, int y, int w, int h, TPixel color) {
    TPixel* td;
    int dt, i;

    if (x < 0) {
        w += x;
        x = 0;
    }
    if (y < 0) {
        h += y;
        y = 0;
    }
    if (x + w > bmp->w) {
        w = bmp->w - x;
    }
    if (y + h > bmp->h) {
        h = bmp->h - y;
    }
    if (w <= 0 || h <= 0)
        return;

    td = &bmp->pix[y * bmp->w + x];
    dt = bmp->w;
    do {
        for (i = 0; i < w; i++)
            td[i] = color;
        td += dt;
    } while (--h);
}

// Assembly:
pushq %rbx
movl %esi, %r11d
sarl $0x1f, %r11d
andl %esi, %r11d
addl %ecx, %r11d
xorl %ebx, %ebx
testl %esi, %esi
cmovlel %ebx, %esi
testl %edx, %edx
movl $0x0, %r10d
cmovgl %edx, %r10d
cmovsl %edx, %ebx
addl %r8d, %ebx
leal (%r11,%rsi), %edx
movslq (%rdi), %rax
movl %eax, %ecx
subl %esi, %ecx
cmpl %eax, %edx
cmovlel %r11d, %ecx
leal (%rbx,%r10), %r8d
movl 0x4(%rdi), %r11d
movl %r11d, %edx
subl %r10d, %edx
cmpl %r11d, %r8d
cmovlel %ebx, %edx
testl %ecx, %ecx
jle 0x3c53
testl %edx, %edx
jle 0x3c53
imull %eax, %r10d
addl %esi, %r10d
movslq %r10d, %rsi
shlq $0x2, %rsi
addq 0x18(%rdi), %rsi
movl %ecx, %edi
addl $0x3, %ecx
andl $-0x4, %ecx
decq %rdi
movq %rdi, %xmm0
pshufd $0x44, %xmm0, %xmm0     # xmm0 = xmm0[0,1,0,1]
shlq $0x2, %rax
movdqa 0x74b4(%rip), %xmm1     # 0xb010
movdqa 0x74bc(%rip), %xmm2     # 0xb020
movdqa 0x74c4(%rip), %xmm3     # 0xb030
pxor %xmm3, %xmm0
pcmpeqd %xmm4, %xmm4
movdqa 0x74c4(%rip), %xmm5     # 0xb040
xorl %edi, %edi
movdqa %xmm2, %xmm6
movdqa %xmm1, %xmm7
movdqa %xmm6, %xmm8
pxor %xmm3, %xmm8
movdqa %xmm8, %xmm9
pcmpgtd %xmm0, %xmm9
pcmpeqd %xmm0, %xmm8
pshufd $0xf5, %xmm8, %xmm10    # xmm10 = xmm8[1,1,3,3]
pand %xmm9, %xmm10
pshufd $0xf5, %xmm9, %xmm8     # xmm8 = xmm9[1,1,3,3]
por %xmm10, %xmm8
movd %xmm8, %r8d
notl %r8d
testb $0x1, %r8b
je 0x3bc7
movl %r9d, (%rsi,%rdi,4)
pxor %xmm4, %xmm8
pextrw $0x4, %xmm8, %r8d
testb $0x1, %r8b
je 0x3bdd
movl %r9d, 0x4(%rsi,%rdi,4)
movdqa %xmm7, %xmm8
pxor %xmm3, %xmm8
movdqa %xmm8, %xmm9
pcmpgtd %xmm0, %xmm9
pcmpeqd %xmm0, %xmm8
pshufd $0xf5, %xmm8, %xmm10    # xmm10 = xmm8[1,1,3,3]
pand %xmm9, %xmm10
pshufd $0xf5, %xmm9, %xmm8     # xmm8 = xmm9[1,1,3,3]
por %xmm10, %xmm8
pxor %xmm4, %xmm8
pextrw $0x0, %xmm8, %r8d
testb $0x1, %r8b
je 0x3c22
movl %r9d, 0x8(%rsi,%rdi,4)
pextrw $0x4, %xmm8, %r8d
testb $0x1, %r8b
je 0x3c33
movl %r9d, 0xc(%rsi,%rdi,4)
addq $0x4, %rdi
paddq %xmm5, %xmm6
paddq %xmm5, %xmm7
cmpq %rdi, %rcx
jne 0x3b86
addq %rax, %rsi
decl %edx
jne 0x3b7c
popq %rbx
retq
// File: /workspace/github_c_makefile_star2_O3/nkanaev[P]tipsy/src/tigr.c
// Function: tigrLine
void tigrLine(Tigr* bmp, int x0, int y0, int x1, int y1, TPixel color) {
    int sx, sy, dx, dy, err, e2;
    dx = abs(x1 - x0);
    dy = abs(y1 - y0);
    if (x0 < x1)
        sx = 1;
    else
        sx = -1;
    if (y0 < y1)
        sy = 1;
    else
        sy = -1;
    err = dx - dy;

    do {
        tigrPlot(bmp, x0, y0, color);
        e2 = 2 * err;
        if (e2 > -dy) {
            err -= dy;
            x0 += sx;
        }
        if (e2 < dx) {
            err += dx;
            y0 += sy;
        }
    } while (x0 != x1 || y0 != y1);
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x28, %rsp
movl %r9d, 0x1c(%rsp)
movq %rdi, 0x20(%rsp)
xorl %eax, %eax
movl %r8d, 0xc(%rsp)
movl %r8d, %r9d
subl %edx, %r9d
setg %al
xorl %edi, %edi
movl %ecx, 0x18(%rsp)
movl %ecx, %r8d
subl %esi, %r8d
setg %dil
movl %r8d, %ebp
negl %ebp
cmovsl %r8d, %ebp
movl %r9d, %r15d
negl %r15d
cmovsl %r9d, %r15d
leal -0x1(,%rdi,2), %ecx
movl %ecx, 0x14(%rsp)
leal -0x1(,%rax,2), %eax
movl %eax, 0x10(%rsp)
movl %ebp, %r14d
subl %r15d, %r14d
movl %r15d, %ebx
negl %ebx
movl %esi, %r12d
movl %edx, %r13d
movq 0x20(%rsp), %rdi
movl 0x1c(%rsp), %ecx
callq 0x3d2d
leal (%r14,%r14), %eax
cmpl %ebx, %eax
movl $0x0, %ecx
cmovgl %r15d, %ecx
movl $0x0, %esi
cmovgl 0x14(%rsp), %esi
movl %r14d, %edi
subl %ecx, %edi
addl %r12d, %esi
cmpl %ebp, %eax
movl $0x0, %edx
cmovll 0x10(%rsp), %edx
movl $0x0, %r14d
cmovll %ebp, %r14d
addl %r13d, %edx
addl %edi, %r14d
cmpl 0x18(%rsp), %esi
jne 0x3cc1
cmpl 0xc(%rsp), %edx
jne 0x3cc1
addq $0x28, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O3/nkanaev[P]tipsy/src/tigr.c
// Function: tigrFillRect
void tigrFillRect(Tigr* bmp, int x, int y, int w, int h, TPixel color) {
    x += 1;
    y += 1;
    w -= 2;
    h -= 2;

    int cx = bmp->cx;
    int cy = bmp->cy;
    int cw = bmp->cw >= 0 ? bmp->cw : bmp->w;
    int ch = bmp->ch >= 0 ? bmp->ch : bmp->h;

    if (x < cx) {
        w += (x - cx);
        x = cx;
    }
    if (y < cy) {
        h += (y - cy);
        y = cy;
    }
    if (x + w > cx + cw) {
        w -= (x + w) - (cx + cw);
    }
    if (y + h > cy + ch) {
        h -= (y + h) - (cy + ch);
    }
    if (w <= 0 || h <= 0)
        return;

    TPixel* td = &bmp->pix[y * bmp->w + x];
    int dt = bmp->w;
    int xa = EXPAND(color.a);
    int a = xa * xa;

    do {
        for (int i = 0; i < w; i++) {
            td[i].r += (unsigned char)((color.r - td[i].r) * a >> 16);
            td[i].g += (unsigned char)((color.g - td[i].g) * a >> 16);
            td[i].b += (unsigned char)((color.b - td[i].b) * a >> 16);
            td[i].a += (bmp->blitMode) * (unsigned char)((color.a - td[i].a) * a >> 16);
        }
        td += dt;
    } while (--h);
}

// Assembly:
movl 0x10(%rdi), %r11d
testl %r11d, %r11d
jns 0x3e1c
movl (%rdi), %r11d
pushq %rbp
pushq %r15
pushq %r14
pushq %rbx
incl %esi
incl %edx
addl $-0x2, %ecx
addl $-0x2, %r8d
movl 0x8(%rdi), %ebp
movl 0xc(%rdi), %r10d
movl 0x14(%rdi), %eax
testl %eax, %eax
jns 0x3e3e
movl 0x4(%rdi), %eax
xorl %ebx, %ebx
movl %esi, %r14d
subl %ebp, %r14d
cmovgel %ebx, %r14d
cmovlel %ebp, %esi
addl %r14d, %ecx
movl %edx, %r14d
subl %r10d, %r14d
cmovgel %ebx, %r14d
cmovlel %r10d, %edx
addl %r14d, %r8d
leal (%rcx,%rsi), %r14d
addl %ebp, %r11d
subl %r14d, %r11d
cmovgel %ebx, %r11d
addl %ecx, %r11d
leal (%r8,%rdx), %ecx
addl %r10d, %eax
subl %ecx, %eax
cmovgel %ebx, %eax
testl %r11d, %r11d
jle 0x3f68
addl %r8d, %eax
testl %eax, %eax
jle 0x3f68
movl %r9d, %ecx
shrl $0x8, %ecx
movl %r9d, %r8d
shrl $0x10, %r8d
movl %r9d, %r10d
shrl $0x18, %r10d
movslq (%rdi), %rbx
imull %ebx, %edx
addl %esi, %edx
movslq %edx, %rdx
shlq $0x2, %rdx
addq 0x18(%rdi), %rdx
cmpl $0x1000000, %r9d        # imm = 0x1000000
movl %r10d, %esi
sbbl $-0x1, %esi
imull %esi, %esi
movl $0xff, %ebp
andl %ebp, %r9d
andl %ebp, %ecx
andl %ebp, %r8d
movl %r11d, %r11d
movl 0x28(%rdi), %edi
shlq $0x2, %rbx
xorl %r14d, %r14d
movzbl (%rdx,%r14,4), %ebp
movl %r9d, %r15d
subl %ebp, %r15d
imull %esi, %r15d
shrl $0x10, %r15d
addb %bpl, %r15b
movb %r15b, (%rdx,%r14,4)
movzbl 0x1(%rdx,%r14,4), %ebp
movl %ecx, %r15d
subl %ebp, %r15d
imull %esi, %r15d
shrl $0x10, %r15d
addb %bpl, %r15b
movb %r15b, 0x1(%rdx,%r14,4)
movzbl 0x2(%rdx,%r14,4), %ebp
movl %r8d, %r15d
subl %ebp, %r15d
imull %esi, %r15d
shrl $0x10, %r15d
addb %bpl, %r15b
movb %r15b, 0x2(%rdx,%r14,4)
movzbl 0x3(%rdx,%r14,4), %ebp
movl %r10d, %r15d
subl %ebp, %r15d
imull %esi, %r15d
shrl $0x10, %r15d
imull %edi, %r15d
addb %bpl, %r15b
movb %r15b, 0x3(%rdx,%r14,4)
incq %r14
cmpq %r11, %r14
jb 0x3ee3
addq %rbx, %rdx
decl %eax
jne 0x3ee0
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O3/nkanaev[P]tipsy/src/tigr.c
// Function: tigrFillCircle
void tigrFillCircle(Tigr* bmp, int x0, int y0, int r, TPixel color) {
    if (r <= 0) {
        return;
    }

    int E = 1 - r;
    int dx = 0;
    int dy = -2 * r;
    int x = 0;
    int y = r;

    tigrLine(bmp, x0 - r + 1, y0, x0 + r, y0, color);

    while (x < y - 1) {
        x++;

        if (E >= 0) {
            y--;
            dy += 2;
            E += dy;
            tigrLine(bmp, x0 - x + 1, y0 + y, x0 + x, y0 + y, color);
            tigrLine(bmp, x0 - x + 1, y0 - y, x0 + x, y0 - y, color);
        }

        dx += 2;
        E += dx + 1;

        if (x != y) {
            tigrLine(bmp, x0 - y + 1, y0 + x, x0 + y, y0 + x, color);
            tigrLine(bmp, x0 - y + 1, y0 - x, x0 + y, y0 - x, color);
        }
    }
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x48, %rsp
movl %r8d, 0x10(%rsp)
movq %rdx, 0x38(%rsp)
movq %rsi, 0x30(%rsp)
movq %rdi, 0x28(%rsp)
testl %ecx, %ecx
jle 0x4196
movl %ecx, %r14d
movq 0x30(%rsp), %rax
movl %eax, %esi
subl %ecx, %esi
incl %esi
leal (%r14,%rax), %ecx
movq 0x28(%rsp), %rdi
movq 0x38(%rsp), %rdx
movl %edx, %r8d
movl 0x10(%rsp), %r9d
callq 0x3c55
cmpl $0x1, %r14d
je 0x4196
leal -0x1(%r14), %ebp
leal (%r14,%r14), %esi
negl %esi
movl $0x1, %r15d
movl $0x1, %r12d
subl %r14d, %r12d
xorl %ecx, %ecx
movl $0x3, %edx
testl %r12d, %r12d
movq %rcx, 0x40(%rsp)
movl %edx, 0x14(%rsp)
js 0x4103
movl %esi, %eax
addl $0x2, %eax
movl %eax, 0x20(%rsp)
addl %esi, %r12d
addl $0x2, %r12d
movq 0x30(%rsp), %rax
leal (%rax,%rcx), %esi
movl %esi, 0x18(%rsp)
movq 0x38(%rsp), %rbx
leal (%rbp,%rbx), %edx
leal (%rax,%r15), %ecx
movl %ecx, 0xc(%rsp)
movq 0x28(%rsp), %r14
movq %r14, %rdi
movl %edx, %r8d
movl 0x10(%rsp), %r13d
movl %r13d, %r9d
callq 0x3c55
movl %ebx, %edx
subl %ebp, %edx
movq %r14, %rdi
movl 0x18(%rsp), %esi
movl 0xc(%rsp), %ecx
movl %edx, %r8d
movl %r13d, %r9d
callq 0x3c55
movl 0x14(%rsp), %edx
movl 0x20(%rsp), %eax
movl %eax, %esi
movl %ebp, %r14d
cmpl %r14d, %r15d
je 0x4175
movq 0x30(%rsp), %rax
movl %eax, %ebp
subl %r14d, %ebp
incl %ebp
movq 0x38(%rsp), %rbx
leal (%rbx,%r15), %edx
leal (%r14,%rax), %ecx
movl %ecx, 0xc(%rsp)
movq %r14, 0x20(%rsp)
movq 0x28(%rsp), %r14
movq %r14, %rdi
movq %rsi, 0x18(%rsp)
movl %ebp, %esi
movl %edx, %r8d
movl 0x10(%rsp), %r13d
movl %r13d, %r9d
callq 0x3c55
movq 0x40(%rsp), %rax
leal (%rbx,%rax), %edx
decl %edx
movq %r14, %rdi
movq 0x20(%rsp), %r14
movl %ebp, %esi
movl 0xc(%rsp), %ecx
movl %edx, %r8d
movl %r13d, %r9d
callq 0x3c55
movq 0x18(%rsp), %rsi
movl 0x14(%rsp), %edx
addl %edx, %r12d
leal -0x1(%r14), %ebp
leal 0x1(%r15), %eax
movq 0x40(%rsp), %rcx
decl %ecx
addl $0x2, %edx
cmpl %ebp, %r15d
movl %eax, %r15d
jl 0x4089
addq $0x48, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O3/nkanaev[P]tipsy/src/tigr.c
// Function: tigrLoadImage
Tigr* tigrLoadImage(const char* fileName) {
    int len;
    void* data;
    Tigr* bmp;

    data = tigrReadFile(fileName, &len);
    if (!data)
        return NULL;

    bmp = tigrLoadImageMem(data, len);
    free(data);
    return bmp;
}

// Assembly:
pushq %r14
pushq %rbx
pushq %rax
leaq 0x4(%rsp), %rsi
callq 0x4b83
testq %rax, %rax
je 0x4b75
movq %rax, %rbx
movl 0x4(%rsp), %esi
movq %rax, %rdi
callq 0x481e
movq %rax, %r14
movq %rbx, %rdi
callq 0x3410
jmp 0x4b78
xorl %r14d, %r14d
movq %r14, %rax
addq $0x8, %rsp
popq %rbx
popq %r14
retq
// File: /workspace/github_c_makefile_star2_O3/nkanaev[P]tipsy/src/tigr.c
// Function: tigrReadFile
void* tigrReadFile(const char* fileName, int* length) {
#endif
    // TODO - unicode?
    FILE* file;
    char* data;
    size_t len;

    if (length)
        *length = 0;

    file = fopen(fileName, "rb");
    if (!file)
        return NULL;

    fseek(file, 0, SEEK_END);
    len = ftell(file);
    fseek(file, 0, SEEK_SET);

    data = (char*)malloc(len + 1);
    if (!data) {
        fclose(file);
        return NULL;
    }

    if (fread(data, 1, len, file) != len) {
        free(data);
        fclose(file);
        return NULL;
    }
    data[len] = '\0';
    fclose(file);

    if (length)
        *length = len;

    return data;
}

// Assembly:
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
pushq %rax
movq %rsi, %rbx
testq %rsi, %rsi
je 0x4b99
movl $0x0, (%rbx)
leaq 0x8042(%rip), %rsi      # 0xcbe2
callq 0x3400
testq %rax, %rax
je 0x4c24
movq %rax, %r14
movq %rax, %rdi
xorl %esi, %esi
movl $0x2, %edx
callq 0x33a0
movq %r14, %rdi
callq 0x3030
movq %rax, %r12
movq %r14, %rdi
xorl %esi, %esi
xorl %edx, %edx
callq 0x33a0
leaq 0x1(%r12), %rdi
callq 0x34f0
testq %rax, %rax
je 0x4c1c
movq %rax, %r15
movl $0x1, %esi
movq %rax, %rdi
movq %r12, %rdx
movq %r14, %rcx
callq 0x3600
cmpq %r12, %rax
jne 0x4c14
movb $0x0, (%r15,%r12)
movq %r14, %rdi
callq 0x3350
testq %rbx, %rbx
je 0x4c27
movl %r12d, (%rbx)
jmp 0x4c27
movq %r15, %rdi
callq 0x3410
movq %r14, %rdi
callq 0x3350
xorl %r15d, %r15d
movq %r15, %rax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
retq
// File: /workspace/github_c_makefile_star2_O3/nkanaev[P]tipsy/src/tigr.c
// Function: putbits
void putbits(Save* s, unsigned data, unsigned bitcount) {
    while (bitcount--) {
        unsigned prev = s->bits;
        s->bits = (s->bits >> 1) | ((data & 1) << 7);
        data >>= 1;
        if (prev & 1) {
            put(s, s->bits);
            s->bits = 0x80;
        }
    }
}

// Assembly:
testl %edx, %edx
je 0x4c81
pushq %rbp
pushq %r14
pushq %rbx
movl %edx, %ebx
movl %esi, %ebp
movq %rdi, %r14
movl 0x8(%rdi), %eax
movl %eax, %ecx
shrl %ecx
movl %ebp, %edx
shll $0x7, %edx
movzbl %dl, %esi
orl %ecx, %esi
movl %esi, 0x8(%r14)
testb $0x1, %al
je 0x4c73
movq %r14, %rdi
callq 0x4c82
movl $0x80, 0x8(%r14)
movl $0x80, %esi
decl %ebx
shrl %ebp
movl %esi, %eax
testl %ebx, %ebx
jne 0x4c48
popq %rbx
popq %r14
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O3/nkanaev[P]tipsy/src/tigr.c
// Function: begin
static void begin(Save* s, const char* id, unsigned len) {
    put32(s, len);
    s->crc = 0xffffffff;
    put(s, id[0]);
    put(s, id[1]);
    put(s, id[2]);
    put(s, id[3]);
}

// Assembly:
pushq %r14
pushq %rbx
pushq %rax
movq %rsi, %rbx
movq %rdi, %r14
movl %edx, %esi
callq 0x5111
movl $0xffffffff, (%r14)     # imm = 0xFFFFFFFF
movsbl (%rbx), %esi
movq %r14, %rdi
callq 0x4c82
movsbl 0x1(%rbx), %esi
movq %r14, %rdi
callq 0x4c82
movsbl 0x2(%rbx), %esi
movq %r14, %rdi
callq 0x4c82
movsbl 0x3(%rbx), %esi
movq %r14, %rdi
addq $0x8, %rsp
popq %rbx
popq %r14
jmp 0x4c82
// File: /workspace/github_c_makefile_star2_O3/nkanaev[P]tipsy/src/tigr.c
// Function: put32
static void put32(Save* s, unsigned v) {
    put(s, (v >> 24) & 0xff);
    put(s, (v >> 16) & 0xff);
    put(s, (v >> 8) & 0xff);
    put(s, v & 0xff);
}

// Assembly:
pushq %rbp
pushq %r14
pushq %rbx
movl %esi, %ebx
movq %rdi, %r14
shrl $0x18, %esi
callq 0x4c82
movl %ebx, %esi
shrl $0x10, %esi
movl $0xff, %ebp
andl %ebp, %esi
movq %r14, %rdi
callq 0x4c82
movl %ebx, %esi
shrl $0x8, %esi
andl %ebp, %esi
movq %r14, %rdi
callq 0x4c82
andl %ebp, %ebx
movq %r14, %rdi
movl %ebx, %esi
popq %rbx
popq %r14
popq %rbp
jmp 0x4c82
// File: /workspace/github_c_makefile_star2_O3/nkanaev[P]tipsy/src/tigr.c
// Function: bits
static int bits(State* s, int n) {
    int v = s->bits & ((1 << n) - 1);
    s->bits >>= n;
    s->count -= n;
    while (s->count < 16) {
        CHECK(s->in != s->inend);
        s->bits |= (*s->in++) << s->count;
        s->count += 8;
    }
    return v;
}

// Assembly:
pushq %rax
movl (%rdi), %eax
movl 0x4(%rdi), %edx
movl %eax, %r8d
movl %esi, %ecx
shrl %cl, %r8d
movl %r8d, (%rdi)
subl %esi, %edx
movl %edx, 0x4(%rdi)
cmpl $0xf, %edx
ja 0x5614
movq 0x8(%rdi), %rcx
movq 0x10(%rdi), %r9
cmpq %r9, %rcx
je 0x5623
leaq 0x1(%rcx), %r10
movq %r10, 0x8(%rdi)
movzbl (%rcx), %r11d
movl %edx, %ecx
shll %cl, %r11d
orl %r11d, %r8d
movl %r8d, (%rdi)
leal 0x8(%rdx), %r11d
movl %r11d, 0x4(%rdi)
movq %r10, %rcx
cmpl $0x8, %edx
movl %r11d, %edx
jb 0x55e5
movl $0xffffffff, %edx       # imm = 0xFFFFFFFF
movl %esi, %ecx
shll %cl, %edx
notl %edx
andl %edx, %eax
popq %rcx
retq
addq $0x28, %rdi
movl $0x1, %esi
callq 0x3100
// File: /workspace/github_c_makefile_star2_O3/nkanaev[P]tipsy/src/tigr.c
// Function: block
static void block(State* s) {
    for (;;) {
        int sym = decode(s, s->litcodes, s->tlit);
        if (sym < 256)
            *emit(s, 1) = (unsigned char)sym;
        else if (sym > 256)
            run(s, sym - 257);
        else
            break;
    }
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movq %rdi, %rbx
leaq 0xf0(%rdi), %r14
leaq 0x570(%rdi), %r15
leaq 0x733c(%rip), %r13      # 0xc990
movl 0x63c(%rbx), %edx
movq %rbx, %rdi
movq %r14, %rsi
callq 0x81a3
movl %eax, %r12d
cmpl $0xff, %eax
ja 0x568a
movq 0x18(%rbx), %rax
leaq 0x1(%rax), %rcx
movq %rcx, 0x18(%rbx)
cmpq 0x20(%rbx), %rcx
ja 0x5712
movb %r12b, (%rax)
jmp 0x5654
cmpl $0x100, %r12d           # imm = 0x100
je 0x5703
addl $0xfffffeff, %r12d      # imm = 0xFFFFFEFF
leaq 0x724f(%rip), %rax      # 0xc8f0
movsbl (%r12,%rax), %esi
movq %rbx, %rdi
callq 0x55c2
movl %eax, %ebp
leaq 0x7259(%rip), %rax      # 0xc910
addl (%rax,%r12,4), %ebp
movl 0x640(%rbx), %edx
movq %rbx, %rdi
movq %r15, %rsi
callq 0x81a3
movl %eax, %r12d
leaq 0x769a(%rip), %rax      # 0xcd70
movsbl (%r12,%rax), %esi
movq %rbx, %rdi
callq 0x55c2
movslq (%r13,%r12,4), %rcx
cltq
addq %rcx, %rax
movq 0x18(%rbx), %rsi
subq %rax, %rsi
movq %rbx, %rdi
movl %ebp, %edx
callq 0x8076
jmp 0x5654
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
addq $0x28, %rbx
movq %rbx, %rdi
movl $0x1, %esi
callq 0x3100
// File: /workspace/github_c_makefile_star2_O3/nkanaev[P]tipsy/src/tigr.c
// Function: border
TPixel tigrGet(Tigr* bmp, int x, int y) {
    TPixel empty = { 0, 0, 0, 0 };
    if (x >= 0 && y >= 0 && x < bmp->w && y < bmp->h)
        return bmp->pix[y * bmp->w + x];
    return empty;
}

// Assembly:
movl (%rdi), %ecx
xorl %r8d, %r8d
movl $0x0, %r9d
testl %ecx, %ecx
jle 0x59ba
cmpl $0x0, 0x4(%rdi)
jle 0x59ba
movq 0x18(%rdi), %rax
movl (%rax), %r9d
movl %edx, %eax
orl %esi, %eax
sets %al
cmpl %esi, %ecx
setle %r10b
orb %al, %r10b
jne 0x59e3
cmpl %edx, 0x4(%rdi)
jle 0x59e3
movq 0x18(%rdi), %rax
movl %ecx, %r8d
imull %edx, %r8d
addl %esi, %r8d
movl (%rax,%r8,4), %r8d
movl $0x1, %eax
cmpl %esi, %ecx
jle 0x5a00
xorl %r9d, %r8d
andl $0xffffff, %r8d         # imm = 0xFFFFFF
je 0x5a00
xorl %eax, %eax
cmpl %edx, 0x4(%rdi)
setle %al
retq
// File: /workspace/github_c_makefile_star2_O3/nkanaev[P]tipsy/src/tigr.c
// Function: tigrLoadFont
TigrFont* tigrLoadFont(Tigr* bitmap, int codepage) {
    TigrFont* font = (TigrFont*)calloc(1, sizeof(TigrFont));
    font->bitmap = bitmap;
    if (!tigrLoadGlyphs(font, codepage)) {
        tigrFreeFont(font);
        return NULL;
    }
    return font;
}

// Assembly:
pushq %rbp
pushq %r14
pushq %rbx
movl %esi, %ebp
movq %rdi, %r14
movl $0x1, %edi
movl $0x18, %esi
callq 0x3270
movq %rax, %rbx
movq %r14, (%rax)
movq %rax, %rdi
movl %ebp, %esi
callq 0x5723
testl %eax, %eax
jne 0x5a37
movq %rbx, %rdi
callq 0x5a3f
xorl %ebx, %ebx
movq %rbx, %rax
popq %rbx
popq %r14
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O3/nkanaev[P]tipsy/src/tigr.c
// Function: tigrFree
void tigrFree(Tigr* bmp) {
    if (bmp->handle) {
        TigrInternal* win = tigrInternal(bmp);
        if (win->win) {
            glXMakeCurrent(win->dpy, None, NULL);
            glXDestroyContext(win->dpy, win->glc);
            XDestroyWindow(win->dpy, win->win);
            win->win = 0;
        }
    }
    free(bmp->pix);
    free(bmp);
}

// Assembly:
pushq %rbx
movq %rdi, %rbx
cmpq $0x0, 0x20(%rdi)
je 0x5a9e
cmpq $0x0, 0x68(%rbx)
je 0x5a9e
movq 0x60(%rbx), %rdi
xorl %esi, %esi
xorl %edx, %edx
callq 0x32c0
movq 0x60(%rbx), %rdi
movq 0x70(%rbx), %rsi
callq 0x3250
movq 0x60(%rbx), %rdi
movq 0x68(%rbx), %rsi
callq 0x3660
movq $0x0, 0x68(%rbx)
movq 0x18(%rbx), %rdi
callq 0x3410
movq %rbx, %rdi
popq %rbx
jmp 0x3410
// File: /workspace/github_c_makefile_star2_O3/nkanaev[P]tipsy/src/tigr.c
// Function: tigrPrint
void tigrPrint(Tigr* dest, TigrFont* font, int x, int y, TPixel color, const char* text, ...) {
    char tmp[1024];
    TigrGlyph* g;
    va_list args;
    const char* p;
    int start = x, c;

    tigrSetupFont(font);

    // Expand the formatting string.
    va_start(args, text);
    vsnprintf(tmp, sizeof(tmp), text, args);
    tmp[sizeof(tmp) - 1] = 0;
    va_end(args);

    // Print each glyph.
    p = tmp;
    while (*p) {
        p = tigrDecodeUTF8(p, &c);
        if (c == '\r')
            continue;
        if (c == '\n') {
            x = start;
            y += tigrTextHeight(font, "");
            continue;
        }
        g = get(font, c);
        tigrBlitTint(dest, font->bitmap, x, y, g->x, g->y, g->w, g->h, color);
        x += g->w;
    }
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x4f8, %rsp            # imm = 0x4F8
movq %r9, %rbx
movq %r8, 0x18(%rsp)
movl %ecx, %ebp
movl %edx, %r12d
movq %rsi, %r15
movq %rdi, 0x10(%rsp)
testb %al, %al
je 0x5b59
movaps %xmm0, 0x70(%rsp)
movaps %xmm1, 0x80(%rsp)
movaps %xmm2, 0x90(%rsp)
movaps %xmm3, 0xa0(%rsp)
movaps %xmm4, 0xb0(%rsp)
movaps %xmm5, 0xc0(%rsp)
movaps %xmm6, 0xd0(%rsp)
movaps %xmm7, 0xe0(%rsp)
movq %rsi, %rdi
callq 0x5ab0
leaq 0x40(%rsp), %rax
leaq 0x20(%rsp), %rcx
movq %rax, 0x10(%rcx)
leaq 0x530(%rsp), %rax
movq %rax, 0x8(%rcx)
movabsq $0x3000000030, %rax     # imm = 0x3000000030
movq %rax, (%rcx)
leaq 0xf0(%rsp), %r13
movl $0x400, %esi            # imm = 0x400
movq %r13, %rdi
movq %rbx, %rdx
callq 0x3230
movb $0x0, 0x3ff(%r13)
leaq 0xc(%rsp), %rbx
movl %r12d, %r14d
cmpb $0x0, (%r13)
je 0x5c33
movq %r13, %rdi
movq %rbx, %rsi
callq 0x5c45
movq %rax, %r13
movl 0xc(%rsp), %esi
cmpl $0xd, %esi
je 0x5bb0
movq %r15, %rdi
cmpl $0xa, %esi
je 0x5c20
callq 0x5d56
movl %r12d, 0x8(%rsp)
movq %rax, %r12
movq (%r15), %rsi
movl 0x4(%rax), %r8d
movl 0x8(%rax), %r9d
movl 0xc(%rax), %eax
movl 0x10(%r12), %r10d
subq $0x8, %rsp
movq 0x18(%rsp), %rdi
movl %r14d, %edx
movl %ebp, %ecx
pushq 0x20(%rsp)
pushq %r10
pushq %rax
callq 0x4579
addq $0x20, %rsp
addl 0xc(%r12), %r14d
movl 0x8(%rsp), %r12d
jmp 0x5bb0
leaq 0x6fc6(%rip), %rsi      # 0xcbed
callq 0x5ceb
addl %eax, %ebp
jmp 0x5bad
addq $0x4f8, %rsp            # imm = 0x4F8
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O3/nkanaev[P]tipsy/src/tigr.c
// Function: tigrDecodeUTF8
const char* tigrDecodeUTF8(const char* text, int* cp) {
    unsigned char c = *text++;
    int extra = 0, min = 0;
    *cp = 0;
    if (c >= 0xf0) {
        *cp = c & 0x07;
        extra = 3;
        min = 0x10000;
    } else if (c >= 0xe0) {
        *cp = c & 0x0f;
        extra = 2;
        min = 0x800;
    } else if (c >= 0xc0) {
        *cp = c & 0x1f;
        extra = 1;
        min = 0x80;
    } else if (c >= 0x80) {
        *cp = 0xfffd;
    } else {
        *cp = c;
    }
    while (extra--) {
        c = *text++;
        if ((c & 0xc0) != 0x80) {
            *cp = 0xfffd;
            break;
        }
        (*cp) = ((*cp) << 6) | (c & 0x3f);
    }
    if (*cp < min) {
        *cp = 0xfffd;
    }
    return text;
}

// Assembly:
movzbl (%rdi), %eax
cmpl $0xef, %eax
jbe 0x5c61
movl $0x10000, %ecx          # imm = 0x10000
movl $0x2, %r8d
movl $0x7, %edx
jmp 0x5c88
cmpb $-0x21, %al
jbe 0x5c77
movl $0x800, %ecx            # imm = 0x800
movl $0x1, %r8d
movl $0xf, %edx
jmp 0x5c88
cmpb $-0x41, %al
jbe 0x5cd5
movl $0x80, %ecx
xorl %r8d, %r8d
movl $0x1f, %edx
andl %eax, %edx
movl %edx, (%rsi)
incl %r8d
addq $0x2, %rdi
movq %rdi, %rax
movzbl -0x1(%rdi), %edi
movl %edi, %r9d
andl $-0x40, %r9d
cmpl $0x80, %r9d
jne 0x5cbf
shll $0x6, %edx
andl $0x3f, %edi
orl %edi, %edx
movl %edx, (%rsi)
leaq 0x1(%rax), %rdi
decl %r8d
jne 0x5c93
jmp 0x5cca
movl $0xfffd, (%rsi)         # imm = 0xFFFD
movl $0xfffd, %edx           # imm = 0xFFFD
movl $0xfffd, %r8d           # imm = 0xFFFD
cmpl %ecx, %edx
jl 0x5ce7
retq
incq %rdi
testb %al, %al
movl $0xfffd, %r8d           # imm = 0xFFFD
cmovnsl %eax, %r8d
movq %rdi, %rax
movl %r8d, (%rsi)
retq
// File: /workspace/github_c_makefile_star2_O3/nkanaev[P]tipsy/src/tigr.c
// Function: tigrTextHeight
int tigrTextHeight(TigrFont* font, const char* text) {
    int rowh, h, c;
    tigrSetupFont(font);

    h = rowh = get(font, 0)->h;
    while (*text) {
        text = tigrDecodeUTF8(text, &c);
        if (c == '\n' && *text)
            h += rowh;
    }
    return h;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %rbx
pushq %rax
movq %rsi, %rbx
movq %rdi, %r14
callq 0x5ab0
movq %r14, %rdi
xorl %esi, %esi
callq 0x5d56
movl 0x10(%rax), %r15d
cmpb $0x0, (%rbx)
je 0x5d46
leaq 0x4(%rsp), %r14
movl %r15d, %ebp
movq %rbx, %rdi
movq %r14, %rsi
callq 0x5c45
movq %rax, %rbx
movb (%rax), %al
xorl %ecx, %ecx
movl $0x0, %edx
testb %al, %al
je 0x5d36
movl %r15d, %edx
cmpl $0xa, 0x4(%rsp)
cmovel %edx, %ecx
addl %ecx, %ebp
testb %al, %al
jne 0x5d18
jmp 0x5d49
movl %r15d, %ebp
movl %ebp, %eax
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O3/nkanaev[P]tipsy/src/tigr.c
// Function: get
static TigrGlyph* get(TigrFont* font, int code) {
    unsigned lo = 0, hi = font->numGlyphs;
    while (lo < hi) {
        unsigned guess = (lo + hi) / 2;
        if (code < font->glyphs[guess].code)
            hi = guess;
        else
            lo = guess + 1;
    }

    if (lo == 0 || font->glyphs[lo - 1].code != code)
        return &font->glyphs['?' - 32];
    else
        return &font->glyphs[lo - 1];
}

// Assembly:
movl 0x8(%rdi), %eax
testl %eax, %eax
je 0x5d9b
movq 0x10(%rdi), %rdx
xorl %ecx, %ecx
leal (%rax,%rcx), %r8d
shrl %r8d
leaq (%r8,%r8,4), %r9
cmpl %esi, (%rdx,%r9,4)
jg 0x5d7c
incl %r8d
movl %r8d, %ecx
jmp 0x5d7f
movl %r8d, %eax
cmpl %eax, %ecx
jb 0x5d63
testl %ecx, %ecx
je 0x5d9b
movq 0x10(%rdi), %rax
decl %ecx
leaq (%rcx,%rcx,4), %rcx
cmpl %esi, (%rax,%rcx,4)
jne 0x5d9f
leaq (%rax,%rcx,4), %rax
retq
movq 0x10(%rdi), %rax
addq $0x26c, %rax            # imm = 0x26C
retq
// File: /workspace/github_c_makefile_star2_O3/nkanaev[P]tipsy/src/tigr.c
// Function: tigrTextWidth
int tigrTextWidth(TigrFont* font, const char* text) {
    int x = 0, w = 0, c;
    tigrSetupFont(font);

    while (*text) {
        text = tigrDecodeUTF8(text, &c);
        if (c == '\n' || c == '\r') {
            x = 0;
        } else {
            x += get(font, c)->w;
            w = (x > w) ? x : w;
        }
    }
    return w;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
subq $0x10, %rsp
movq %rsi, %r14
movq %rdi, %rbx
callq 0x5ab0
cmpb $0x0, (%r14)
je 0x5e09
xorl %ebp, %ebp
leaq 0xc(%rsp), %r15
xorl %r12d, %r12d
movq %r14, %rdi
movq %r15, %rsi
callq 0x5c45
movq %rax, %r14
movl 0xc(%rsp), %esi
cmpl $0xa, %esi
je 0x5de9
cmpl $0xd, %esi
jne 0x5dee
xorl %r12d, %r12d
jmp 0x5e01
movq %rbx, %rdi
callq 0x5d56
addl 0xc(%rax), %r12d
cmpl %ebp, %r12d
cmovgl %r12d, %ebp
cmpb $0x0, (%r14)
jne 0x5dcd
jmp 0x5e0b
xorl %ebp, %ebp
movl %ebp, %eax
addq $0x10, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O3/nkanaev[P]tipsy/src/tigr.c
// Function: tigrKeyDown
int tigrKeyDown(Tigr* bmp, int key) {
    TigrInternal* win;
    assert(key < 256);
    win = tigrInternal(bmp);
    return win->keys[key] && !win->prev[key];
}

// Assembly:
pushq %rax
cmpl $0x100, %esi            # imm = 0x100
jge 0x682a
cmpq $0x0, 0x20(%rdi)
je 0x6849
movslq %esi, %rcx
cmpb $0x0, 0xc0(%rdi,%rcx)
je 0x6826
xorl %eax, %eax
cmpb $0x0, 0x1c0(%rdi,%rcx)
sete %al
jmp 0x6828
xorl %eax, %eax
popq %rcx
retq
leaq 0x6286(%rip), %rdi      # 0xcab7
leaq 0x621c(%rip), %rsi      # 0xca54
leaq 0x6282(%rip), %rcx      # 0xcac1
movl $0x1203, %edx           # imm = 0x1203
callq 0x3260
leaq 0x61f8(%rip), %rdi      # 0xca48
leaq 0x61fd(%rip), %rsi      # 0xca54
leaq 0x6201(%rip), %rcx      # 0xca5f
movl $0x741, %edx            # imm = 0x741
callq 0x3260
// File: /workspace/github_c_makefile_star2_O3/nkanaev[P]tipsy/src/tigr.c
// Function: tigrReadChar
int tigrReadChar(Tigr* bmp) {
    TigrInternal* win = tigrInternal(bmp);
    int c = win->lastChar;
    win->lastChar = 0;
    return c;
}

// Assembly:
cmpq $0x0, 0x20(%rdi)
je 0x68db
movl 0xbc(%rdi), %eax
movl $0x0, 0xbc(%rdi)
retq
pushq %rax
leaq 0x6165(%rip), %rdi      # 0xca48
leaq 0x616a(%rip), %rsi      # 0xca54
leaq 0x616e(%rip), %rcx      # 0xca5f
movl $0x741, %edx            # imm = 0x741
callq 0x3260
// File: /workspace/github_c_makefile_star2_O3/nkanaev[P]tipsy/src/tigr.c
// Function: tigrError
void tigrError(Tigr* bmp, const char* message, ...) {
    char tmp[1024];

    va_list args;
    va_start(args, message);
    vsnprintf(tmp, sizeof(tmp), message, args);
    tmp[sizeof(tmp) - 1] = 0;
    va_end(args);

    printf("tigr fatal error: %s\n", tmp);

    exit(1);
}

// Assembly:
pushq %rbx
subq $0x4d0, %rsp            # imm = 0x4D0
movq %rsi, %r10
leaq 0x20(%rsp), %rsi
movq %rdx, 0x10(%rsi)
movq %rcx, 0x18(%rsi)
movq %r8, 0x20(%rsi)
movq %r9, 0x28(%rsi)
testb %al, %al
je 0x72d1
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 %rsi, 0x10(%rcx)
leaq 0x4e0(%rsp), %rax
movq %rax, 0x8(%rcx)
movabsq $0x3000000010, %rax     # imm = 0x3000000010
movq %rax, (%rcx)
leaq 0xd0(%rsp), %rbx
movl $0x400, %esi            # imm = 0x400
movq %rbx, %rdi
movq %r10, %rdx
callq 0x3230
movb $0x0, 0x3ff(%rbx)
leaq 0x57e4(%rip), %rdi      # 0xcafb
movq %rbx, %rsi
xorl %eax, %eax
callq 0x3060
movl $0x1, %edi
callq 0x3420
// File: /workspace/github_c_makefile_star2_O3/nkanaev[P]tipsy/src/tigr.c
// Function: tigrTime
float tigrTime() {
    static double lastTime = 0;

    struct timeval tv;
    gettimeofday(&tv, NULL);

    double now = (double)tv.tv_sec + (tv.tv_usec / 1000000.0);
    double elapsed = lastTime == 0 ? 0 : now - lastTime;
    lastTime = now;

    return (float)elapsed;
}

// Assembly:
pushq %rbx
subq $0x10, %rsp
movq %rsp, %rbx
movq %rbx, %rdi
xorl %esi, %esi
callq 0x3670
cvtsi2sdq (%rbx), %xmm0
cvtsi2sdq 0x8(%rbx), %xmm1
divsd 0x56e8(%rip), %xmm1     # 0xca38
addsd %xmm0, %xmm1
movsd 0x9154(%rip), %xmm0     # 0x104b0
movsd %xmm1, 0x914c(%rip)     # 0x104b0
subsd %xmm0, %xmm1
xorpd %xmm2, %xmm2
cmpeqsd %xmm0, %xmm2
andnpd %xmm1, %xmm2
xorps %xmm0, %xmm0
cvtsd2ss %xmm2, %xmm0
addq $0x10, %rsp
popq %rbx
retq