LLM4Binary/decompile-bench-makefile huggingface dataset:
// File: /workspace/github_c_makefile_star2_O2/jonof[P]jftekwar/jfbuild/src/engine.c
// Function: printext256
void printext256(int xpos, int ypos, short col, short backcol, const char *name, char fontsize)
{
	int stx, i, x, y;
	const unsigned char *letptr;
	unsigned char *ptr;
	const struct textfontspec *f;

#if USE_POLYMOST && USE_OPENGL
	if (!polymost_printext256(xpos,ypos,col,backcol,name,fontsize)) return;
#endif

	f = &textfonts[min((unsigned)fontsize, 2)];
	stx = xpos;

	for(i=0;name[i];i++)
	{
		letptr = &f->font[((int)(unsigned char)name[i])*f->cellh + f->cellyoff];
		ptr = (unsigned char *)(ylookup[ypos+f->charysiz-1]+stx+frameplace);
		for(y=f->charysiz-1;y>=0;y--)
		{
			for(x=f->charxsiz-1;x>=0;x--)
			{
				if (letptr[y]&pow2char[7-x-f->cellxoff])
					ptr[x] = (unsigned char)col;
				else if (backcol >= 0)
					ptr[x] = (unsigned char)backcol;
			}
			ptr -= bytesperline;
		}
		stx += f->charxsiz;
	}
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x28, %rsp
movl %r9d, %r13d
movl %ecx, %ebp
movl %edx, %r14d
movl %edi, 0xc(%rsp)
movq %rsi, 0x10(%rsp)
movq %r8, 0x18(%rsp)
callq 0x536be
testl %eax, %eax
je 0x39bd7
movzbl %r13b, %eax
cmpb $0x2, %al
pushq $0x2
popq %rcx
cmovbl %eax, %ecx
movzbl %cl, %ecx
shll $0x5, %ecx
leaq 0x51f2b(%rip), %rax     # 0x8ba20
addq %rcx, %rax
movq 0x10(%rsp), %rcx
decl %ecx
movq %rcx, 0x10(%rsp)
xorl %esi, %esi
leaq 0x63c93(%rip), %r8      # 0x9d7a0
leaq 0x13d770(%rip), %r9     # 0x177284
movq 0x18(%rsp), %rcx
movzbl (%rcx,%rsi), %edx
testq %rdx, %rdx
je 0x39bd7
movq %rsi, 0x20(%rsp)
movslq 0x10(%rax), %rsi
imulq %rdx, %rsi
movslq 0x18(%rax), %r11
addq %rsi, %r11
addq (%rax), %r11
movl 0x8(%rax), %ebx
movl 0xc(%rax), %r13d
movq 0x10(%rsp), %rcx
leal (%rcx,%r13), %edx
movslq %edx, %rdx
leaq 0x3d6149(%rip), %rcx    # 0x40fca0
movslq (%rcx,%rdx,4), %rsi
movslq 0xc(%rsp), %rdx
addq %rsi, %rdx
leaq 0x13d546(%rip), %rcx    # 0x1770b0
addq (%rcx), %rdx
pushq $0x8
popq %rsi
subl %ebx, %esi
testl %r13d, %r13d
jle 0x39bc2
decq %r13
movl %esi, %edi
movq %rbx, %r10
testl %r10d, %r10d
jle 0x39bba
testw %bp, %bp
setns %r12b
movl %edi, %r15d
subl 0x14(%rax), %r15d
movslq %r15d, %r15
movb (%r15,%r8), %r15b
andb (%r11,%r13), %r15b
setne %cl
orb %r12b, %cl
je 0x39bb3
testb %r15b, %r15b
movl %ebp, %ecx
cmovnel %r14d, %ecx
movb %cl, -0x1(%rdx,%r10)
incl %edi
decq %r10
jmp 0x39b7f
movslq (%r9), %rcx
subq %rcx, %rdx
jmp 0x39b72
addl 0xc(%rsp), %ebx
movq 0x20(%rsp), %rsi
incq %rsi
movl %ebx, 0xc(%rsp)
jmp 0x39b14
addq $0x28, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O2/jonof[P]jftekwar/jfbuild/src/engine.c
// Function: setrendermode
int setrendermode(int renderer)
{
	if (bpp == 8) {
		if (renderer < 0) renderer = 0;
		else if (renderer > 2) renderer = 2;
	} else {
		renderer = 3;
	}

	rendmode = renderer;

	return 0;
}

// Assembly:
leaq 0x13d4b7(%rip), %rax    # 0x1770a4
cmpl $0x8, (%rax)
jne 0x39c01
testl %edi, %edi
js 0x39c06
cmpl $0x2, %edi
pushq $0x2
popq %rax
cmovbl %edi, %eax
jmp 0x39c08
pushq $0x3
popq %rax
jmp 0x39c08
xorl %eax, %eax
leaq 0x5b9d41(%rip), %rcx    # 0x5f3950
movl %eax, (%rcx)
xorl %eax, %eax
retq
// File: /workspace/github_c_makefile_star2_O2/jonof[P]jftekwar/jfbuild/src/engine.c
// Function: setpolymost2dview
void setpolymost2dview(void)
{
	if (rendmode < 3) return;

	if (gloy1 != -1) {
		glfunc.glViewport(0,0,xres,yres);
	}

	gloy1 = -1;

	glfunc.glDisable(GL_DEPTH_TEST);
	glfunc.glDisable(GL_BLEND);
}

// Assembly:
pushq %rbx
leaq 0x5b9cff(%rip), %rax    # 0x5f3950
cmpl $0x3, (%rax)
jge 0x39c58
popq %rbx
retq
leaq 0x5b9df1(%rip), %rbx    # 0x5f3a50
movss (%rbx), %xmm0
ucomiss 0x316e6(%rip), %xmm0    # 0x6b350
jne 0x39c6e
jnp 0x39c91
leaq 0x5b9acb(%rip), %rax    # 0x5f3740
leaq 0x633b4(%rip), %rcx     # 0x9d030
movl (%rcx), %edx
leaq 0x633af(%rip), %rcx     # 0x9d034
movl (%rcx), %ecx
xorl %edi, %edi
xorl %esi, %esi
callq *0x80(%rax)
movl $0xbf800000, (%rbx)     # imm = 0xBF800000
leaq 0x5b9aa2(%rip), %rbx    # 0x5f3740
movl $0xb71, %edi            # imm = 0xB71
callq *0x48(%rbx)
movl $0xbe2, %edi            # imm = 0xBE2
movq %rbx, %rax
popq %rbx
jmpq *0x48(%rax)
// File: /workspace/github_c_makefile_star2_O2/jonof[P]jftekwar/jfbuild/src/engine.c
// Function: buildsetlogfile
void buildsetlogfile(const char *fn)
{
	if (logfile) Bfclose(logfile);
	logfile = NULL;
	if (fn) logfile = Bfopen(fn,"w");
	if (logfile) setvbuf(logfile, (char*)NULL, _IONBF, 0);
}

// Assembly:
pushq %rbx
movq %rdi, %rbx
movq 0x36b83b(%rip), %rdi    # 0x3a54f8
testq %rdi, %rdi
je 0x39cc7
callq 0x6480
andq $0x0, 0x36b829(%rip)    # 0x3a54f8
testq %rbx, %rbx
je 0x39cff
leaq 0x3610e(%rip), %rsi     # 0x6fde9
movq %rbx, %rdi
callq 0x6ce0
movq %rax, 0x36b80e(%rip)    # 0x3a54f8
testq %rax, %rax
je 0x39cff
pushq $0x2
popq %rdx
movq %rax, %rdi
xorl %esi, %esi
xorl %ecx, %ecx
popq %rbx
jmp 0x64a0
popq %rbx
retq
// File: /workspace/github_c_makefile_star2_O2/jonof[P]jftekwar/jfbuild/src/engine.c
// Function: hline
static void hline(int xr, int yp)
{
	int xl, r, s;

	xl = lastx[yp]; if (xl > xr) return;
	r = horizlookup2[yp-globalhoriz+horizycent];
	asm1 = globalx1*r;
	asm2 = globaly2*r;
	s = ((int)getpalookup((int)mulscale16(r,globvis),globalshade)<<8);

	hlineasm4(xr-xl,0L,s,globalx2*r+globalypanning,globaly1*r+globalxpanning,
		(void *)(ylookup[yp]+xr+frameoffset));
}

// Assembly:
movl %edi, %eax
movslq %esi, %rsi
leaq 0x411826(%rip), %rcx    # 0x44cd30
subl (%rcx,%rsi,4), %edi
jge 0x3b510
retq
movq 0x3d4771(%rip), %rcx    # 0x40fc88
movl 0x23957f(%rip), %edx    # 0x274a9c
movl %esi, %r8d
subl %edx, %r8d
movslq 0x3d4766(%rip), %rdx    # 0x40fc90
movslq %r8d, %r8
addq %rdx, %r8
movslq (%rcx,%r8,4), %r9
movl 0x3d22fe(%rip), %ecx    # 0x40d838
imull %r9d, %ecx
movl %ecx, 0x3d4710(%rip)    # 0x40fc54
movl 0x3d22fa(%rip), %ecx    # 0x40d844
imull %r9d, %ecx
movl %ecx, 0x3d4704(%rip)    # 0x40fc58
movslq 0x3d22d5(%rip), %rcx    # 0x40d830
imulq %r9, %rcx
shrq $0x10, %rcx
sarl $0x8, %ecx
addl 0x3d22c0(%rip), %ecx    # 0x40d82c
xorl %edx, %edx
testl %ecx, %ecx
cmovlel %edx, %ecx
movswl 0x3d22ae(%rip), %edx    # 0x40d828
decl %edx
cmpl %edx, %ecx
cmovll %ecx, %edx
shll $0x8, %edx
movl 0x3d22b6(%rip), %ecx    # 0x40d840
imull %r9d, %ecx
addl 0x411550(%rip), %ecx    # 0x44cae4
movl 0x3d22a1(%rip), %r8d    # 0x40d83c
imull %r9d, %r8d
addl 0x41153a(%rip), %r8d    # 0x44cae0
leaq 0x3d46f3(%rip), %r9     # 0x40fca0
movslq (%r9,%rsi,4), %rsi
movslq %eax, %r9
addq %rsi, %r9
addq 0x3951d2(%rip), %r9     # 0x3d0790
xorl %esi, %esi
jmp 0x641e0
// File: /workspace/github_c_makefile_star2_O2/jonof[P]jftekwar/jfbuild/src/engine.c
// Function: slowhline
static void slowhline(int xr, int yp)
{
	int xl, r;

	xl = lastx[yp]; if (xl > xr) return;
	r = horizlookup2[yp-globalhoriz+horizycent];
	asm1 = globalx1*r;
	asm2 = globaly2*r;

	asm3 = (intptr_t)globalpalwritten + ((int)getpalookup((int)mulscale16(r,globvis),globalshade)<<8);
	if (!(globalorientation&256))
	{
		mhline((void *)globalbufplc,globaly1*r+globalxpanning-asm1*(xr-xl),(xr-xl)<<16,0L,
			globalx2*r+globalypanning-asm2*(xr-xl),(void *)(ylookup[yp]+xl+frameoffset));
		return;
	}
	thline((void *)globalbufplc,globaly1*r+globalxpanning-asm1*(xr-xl),(xr-xl)<<16,0L,
		globalx2*r+globalypanning-asm2*(xr-xl),(void *)(ylookup[yp]+xl+frameoffset));
}

// Assembly:
movslq %esi, %rax
leaq 0x411761(%rip), %rcx    # 0x44cd30
movslq (%rcx,%rax,4), %rcx
cmpl %ecx, %edi
jge 0x3b5d8
retq
movl %edi, %edx
movq 0x3d46a7(%rip), %rsi    # 0x40fc88
movl 0x2394b5(%rip), %edi    # 0x274a9c
movl %eax, %r8d
subl %edi, %r8d
movslq 0x3d469c(%rip), %rdi    # 0x40fc90
movslq %r8d, %r8
addq %rdi, %r8
movslq (%rsi,%r8,4), %r8
movl 0x3d2233(%rip), %r10d   # 0x40d838
imull %r8d, %r10d
movl %r10d, 0x3d4644(%rip)   # 0x40fc54
movl 0x3d222d(%rip), %r9d    # 0x40d844
imull %r8d, %r9d
movslq 0x3d220e(%rip), %rsi    # 0x40d830
imulq %r8, %rsi
shrq $0x10, %rsi
sarl $0x8, %esi
addl 0x3d21f9(%rip), %esi    # 0x40d82c
xorl %edi, %edi
testl %esi, %esi
cmovgl %esi, %edi
movswl 0x3d21e7(%rip), %esi    # 0x40d828
decl %esi
cmpl %esi, %edi
cmovll %edi, %esi
shll $0x8, %esi
movslq %esi, %rsi
addq 0x3cd9b3(%rip), %rsi    # 0x409008
movl %r9d, 0x3d45fc(%rip)    # 0x40fc58
movq %rsi, 0x3d45fd(%rip)    # 0x40fc60
movq 0x3d21b6(%rip), %rdi    # 0x40d820
movl 0x3d21cb(%rip), %r11d   # 0x40d83c
imull %r8d, %r11d
movl 0x411465(%rip), %esi    # 0x44cae0
subl %ecx, %edx
imull %edx, %r10d
subl %r10d, %esi
addl %r11d, %esi
movl 0x3d21b2(%rip), %r10d   # 0x40d840
imull %r8d, %r10d
movl 0x41144b(%rip), %r8d    # 0x44cae4
imull %edx, %r9d
shll $0x10, %edx
subl %r9d, %r8d
addl %r10d, %r8d
leaq 0x3d45f3(%rip), %r9     # 0x40fca0
movslq (%r9,%rax,4), %r9
addq %rcx, %r9
addq 0x3950d5(%rip), %r9     # 0x3d0790
testb $0x1, 0x3cd93f(%rip)    # 0x409001
jne 0x3b6cb
xorl %ecx, %ecx
jmp 0x64497
xorl %ecx, %ecx
jmp 0x64533
// File: /workspace/github_c_makefile_star2_O2/jonof[P]jftekwar/jfbuild/src/engine.c
// Function: ceilspritehline
static void ceilspritehline(int x2, int y)
{
	int x1, v, bx, by;

	//x = x1 + (x2-x1)t + (y1-y2)u  ~  x = 160v
	//y = y1 + (y2-y1)t + (x2-x1)u  ~  y = (scrx-160)v
	//z = z1 = z2                   ~  z = posz + (scry-horiz)v

	x1 = lastx[y]; if (x2 < x1) return;

	v = mulscale20(globalzd,horizlookup[y-globalhoriz+horizycent]);
	bx = mulscale14(globalx2*x1+globalx1,v) + globalxpanning;
	by = mulscale14(globaly2*x1+globaly1,v) + globalypanning;
	asm1 = mulscale14(globalx2,v);
	asm2 = mulscale14(globaly2,v);

	asm3 = (intptr_t)palookup[globalpal] + (getpalookup((int)mulscale28(klabs(v),globvis),globalshade)<<8);

	if ((globalorientation&2) == 0)
		mhline((void *)globalbufplc,bx,(x2-x1)<<16,0L,by,(void *)(ylookup[y]+x1+frameoffset));
	else
	{
		thline((void *)globalbufplc,bx,(x2-x1)<<16,0L,by,(void *)(ylookup[y]+x1+frameoffset));
	}
}

// Assembly:
movslq %esi, %rax
leaq 0x411135(%rip), %rcx    # 0x44cd30
movslq (%rcx,%rax,4), %rcx
cmpl %ecx, %edi
jge 0x3bc04
retq
movl %edi, %edx
movslq 0x410edf(%rip), %rsi    # 0x44caec
movq 0x3d406c(%rip), %rdi    # 0x40fc80
movl 0x238e81(%rip), %r8d    # 0x274a9c
movl %eax, %r9d
subl %r8d, %r9d
movslq 0x3d4068(%rip), %r8     # 0x40fc90
movslq %r9d, %r9
addq %r8, %r9
movslq (%rdi,%r9,4), %rdi
imulq %rsi, %rdi
shrq $0x14, %rdi
movslq 0x3d1bff(%rip), %r10    # 0x40d840
movq %r10, %r8
imulq %rcx, %r8
movslq 0x3d1be9(%rip), %rsi    # 0x40d838
addq %r8, %rsi
movslq %edi, %r9
imulq %r9, %rsi
shrq $0xe, %rsi
addl 0x410e7d(%rip), %esi    # 0x44cae0
movslq 0x3d1bda(%rip), %rdi    # 0x40d844
movq %rdi, %r11
imulq %rcx, %r11
movslq 0x3d1bc4(%rip), %r8     # 0x40d83c
addq %r11, %r8
imulq %r9, %r8
shrq $0xe, %r8
addl 0x410e5a(%rip), %r8d    # 0x44cae4
imulq %r9, %r10
shrq $0xe, %r10
movl %r10d, 0x3d3fbb(%rip)   # 0x40fc54
imulq %r9, %rdi
shrq $0xe, %rdi
movslq 0x3cd35c(%rip), %r10    # 0x409004
movl %r9d, %r11d
negl %r11d
cmovsl %r9d, %r11d
movslq 0x3d1b77(%rip), %r9     # 0x40d830
imulq %r9, %r11
shrq $0x1c, %r11
sarl $0x8, %r11d
addl 0x3d1b60(%rip), %r11d   # 0x40d82c
xorl %r9d, %r9d
testl %r11d, %r11d
cmovgl %r11d, %r9d
movswl 0x3d1b4a(%rip), %r11d   # 0x40d828
decl %r11d
cmpl %r11d, %r9d
cmovll %r9d, %r11d
leaq 0x355df1(%rip), %r9     # 0x391ae0
shll $0x8, %r11d
movslq %r11d, %r11
addq (%r9,%r10,8), %r11
movl %edi, 0x3d3f58(%rip)    # 0x40fc58
movq %r11, 0x3d3f59(%rip)    # 0x40fc60
subl %ecx, %edx
shll $0x10, %edx
leaq 0x3d3f8d(%rip), %rdi    # 0x40fca0
movslq (%rdi,%rax,4), %r9
addq %rcx, %r9
movq 0x3d1aff(%rip), %rdi    # 0x40d820
addq 0x394a68(%rip), %r9     # 0x3d0790
testb $0x2, 0x3cd2d1(%rip)    # 0x409000
jne 0x3bd38
xorl %ecx, %ecx
jmp 0x64497
xorl %ecx, %ecx
jmp 0x64533
// File: /workspace/github_c_makefile_star2_O2/jonof[P]jftekwar/jfbuild/src/engine.c
// Function: screencapture_openfile
static BFILE *screencapture_openfile(const char *ext)
{
	char *seq;
	BFILE *fil;

	do {	// JBF 2004022: So we don't overwrite existing screenshots
		if (capturecount > 9999) {
			return NULL;
		}

		seq = strrchr(capturename, '.'); if (!seq) return NULL;
		seq -= 4;
		seq[0] = ((capturecount/1000)%10)+48;
		seq[1] = ((capturecount/100)%10)+48;
		seq[2] = ((capturecount/10)%10)+48;
		seq[3] = (capturecount%10)+48;
		seq[5] = ext[0];
		seq[6] = ext[1];
		seq[7] = ext[2];

		if ((fil = Bfopen(capturename, "rb")) == NULL) break;
		Bfclose(fil);
		capturecount++;
	} while (1);
	fil = Bfopen(capturename, "wb");
	if (fil) capturecount++;
	return fil;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movq %rdi, %r14
movzwl 0x573e2b(%rip), %r13d   # 0x5afb80
leaq 0x61f04(%rip), %r15     # 0x9dc60
pushq $0x2e
popq %rbp
movw $0xa, %bx
leaq 0x30900(%rip), %r12     # 0x6c66a
cmpw $0x270f, %r13w          # imm = 0x270F
jg 0x3be3f
movq %r15, %rdi
movl %ebp, %esi
callq 0x69e0
testq %rax, %rax
je 0x3be3f
movq %rax, %rcx
movl %r13d, %eax
cwtd
movw $0x3e8, %si             # imm = 0x3E8
idivw %si
cbtw
movb $0xa, %dl
idivb %dl
movsbl %ah, %eax
addb $0x30, %al
movb %al, -0x4(%rcx)
movl %r13d, %eax
cwtd
movw $0x64, %si
idivw %si
cwtd
idivw %bx
addb $0x30, %dl
movb %dl, -0x3(%rcx)
movl %r13d, %eax
cwtd
idivw %bx
movl %edx, %esi
cwtd
idivw %bx
addb $0x30, %dl
movb %dl, -0x2(%rcx)
addb $0x30, %sil
movb %sil, -0x1(%rcx)
movb (%r14), %al
movb %al, 0x1(%rcx)
movb 0x1(%r14), %al
movb %al, 0x2(%rcx)
movb 0x2(%r14), %al
movb %al, 0x3(%rcx)
movq %r15, %rdi
movq %r12, %rsi
callq 0x6ce0
testq %rax, %rax
je 0x3be1e
movq %rax, %rdi
callq 0x6480
movzwl 0x573d72(%rip), %r13d   # 0x5afb80
incl %r13d
movw %r13w, 0x573d67(%rip)   # 0x5afb80
jmp 0x3bd6a
leaq 0x61e3b(%rip), %rdi     # 0x9dc60
leaq 0x30841(%rip), %rsi     # 0x6c66d
callq 0x6ce0
testq %rax, %rax
je 0x3be3f
incw 0x573d43(%rip)          # 0x5afb80
jmp 0x3be41
xorl %eax, %eax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O2/jonof[P]jftekwar/jfbuild/src/engine.c
// Function: screencapture_writepcxline
static void screencapture_writepcxline(unsigned char *buf, int bytes, int elements, BFILE *fp, void *v)
{
	(void)v;
	if (elements == 3) {
		writepcxline(buf,   bytes, 3, fp);
		writepcxline(buf+1, bytes, 3, fp);
		writepcxline(buf+2, bytes, 3, fp);
		return;
	}
	writepcxline(buf, bytes, 1, fp);
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %rbx
pushq %rax
movq %rcx, %rbx
movl %esi, %ebp
movq %rdi, %r14
cmpl $0x3, %edx
jne 0x3c115
pushq $0x3
popq %r15
movq %r14, %rdi
movl %ebp, %esi
movl %r15d, %edx
movq %rbx, %rcx
callq 0x3c12c
leaq 0x1(%r14), %rdi
movl %ebp, %esi
movl %r15d, %edx
movq %rbx, %rcx
callq 0x3c12c
addq $0x2, %r14
movq %r14, %rdi
movl %ebp, %esi
movl %r15d, %edx
jmp 0x3c11d
pushq $0x1
popq %rdx
movq %r14, %rdi
movl %ebp, %esi
movq %rbx, %rcx
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
jmp 0x3c12c
// File: /workspace/github_c_makefile_star2_O2/jonof[P]jftekwar/jfbuild/src/engine.c
// Function: writepcxline
static void writepcxline(unsigned char *buf, int bytes, int step, BFILE *fp)
{
	unsigned char ths, last;
	int srcIndex;
	unsigned char runCount;

	runCount = 1;
	last = *buf;

	for (srcIndex=1; srcIndex<bytes; srcIndex++) {
		buf += step;
		ths = *buf;
		if (ths == last) {
			runCount++;
			if (runCount == 63) {
				writepcxbyte(last, runCount, fp);
				runCount = 0;
			}
		} else {
			if (runCount)
				writepcxbyte(last, runCount, fp);

			last = ths;
			runCount = 1;
		}
	}

	if (runCount) writepcxbyte(last, runCount, fp);
	if (bytes&1) writepcxbyte(0, 1, fp);
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movq %rcx, (%rsp)
movl %esi, %ebp
movq %rdi, %r14
movb (%rdi), %cl
movl %edx, %r15d
addq %r15, %r14
movb $0x1, %al
pushq $0x1
popq %r12
movzbl %cl, %edi
cmpl %ebp, %r12d
jge 0x3c193
movb (%r14), %r13b
cmpb %cl, %r13b
jne 0x3c16d
incb %al
cmpb $0x3f, %al
jne 0x3c181
movb $0x3f, %al
xorl %ebx, %ebx
movl %ecx, %r13d
jmp 0x3c173
movb $0x1, %bl
testb %al, %al
je 0x3c186
movzbl %al, %esi
movq (%rsp), %rdx
callq 0x3c1d1
jmp 0x3c186
movl %ecx, %r13d
movl %eax, %ebx
incl %r12d
addq %r15, %r14
movl %r13d, %ecx
movl %ebx, %eax
jmp 0x3c14e
testb %al, %al
je 0x3c1a3
movzbl %al, %esi
movq (%rsp), %rdx
callq 0x3c1d1
testb $0x1, %bpl
jne 0x3c1b8
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
xorl %edi, %edi
movq (%rsp), %rsi
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
jmp 0x6920
// File: /workspace/github_c_makefile_star2_O2/jonof[P]jftekwar/jfbuild/src/engine.c
// Function: writepcxbyte
static int writepcxbyte(unsigned char colour, unsigned char count, BFILE *fp)
{
	if (!count) return 0;
	if (count == 1 && (colour & 0xc0) != 0xc0) {
		Bfputc(colour, fp);
		return 1;
	} else {
		Bfputc(0xc0 | count, fp);
		Bfputc(colour, fp);
		return 2;
	}
}

// Assembly:
testl %esi, %esi
je 0x3c20c
pushq %rbp
pushq %rbx
pushq %rax
movq %rdx, %rbx
movzbl %dil, %ebp
cmpl $0x1, %esi
jne 0x3c1ec
movl %ebp, %eax
notl %eax
testb $-0x40, %al
jne 0x3c1fc
orb $-0x40, %sil
movzbl %sil, %edi
movq %rbx, %rsi
callq 0x6920
movl %ebp, %edi
movq %rbx, %rsi
addq $0x8, %rsp
popq %rbx
popq %rbp
jmp 0x6920
retq
// File: /workspace/github_c_makefile_star2_O2/jonof[P]jftekwar/jfbuild/src/engine.c
// Function: screencapture_writepngline
static void screencapture_writepngline(unsigned char *buf, int bytes, int elements, BFILE *fp, void *v)
{
	unsigned char header[6];
	unsigned short blklen;
	int i;
	struct pngsums *sums = (struct pngsums *)v;

	blklen = (unsigned short)B_LITTLE16(1 + bytes * elements);	// One extra for the filter type.
	header[0] = 0;	// BFINAL = 0, BTYPE = 00.
	memcpy(&header[1], &blklen, 2);
	blklen = ~blklen;
	memcpy(&header[3], &blklen, 2);

	header[5] = 0;	// No filter.
	sums->adlers2 = (sums->adlers2 + sums->adlers1) % 65521;
	crc32block(&sums->crc, header, sizeof(header));
	Bfwrite(header, sizeof(header), 1, fp);

	for (i=0; i < bytes * elements; i++) {
		sums->adlers1 = (sums->adlers1 + buf[i]) % 65521;
		sums->adlers2 = (sums->adlers2 + sums->adlers1) % 65521;
	}
	crc32block(&sums->crc, buf, bytes * elements);
	Bfwrite(buf, bytes, elements, fp);
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x18, %rsp
movq %r8, %r12
movq %rcx, 0x8(%rsp)
movq %rdi, %r14
movl %edx, 0x4(%rsp)
movl %edx, %r13d
movl %esi, (%rsp)
imull %esi, %r13d
leal 0x1(%r13), %eax
xorl %ebp, %ebp
leaq 0x12(%rsp), %rbx
movb %bpl, (%rbx)
movw %ax, 0x1(%rbx)
pushq $-0x2
popq %rax
subl %r13d, %eax
movw %ax, 0x3(%rbx)
movb %bpl, 0x5(%rbx)
movzwl 0x6(%r8), %ecx
movzwl 0x4(%r8), %eax
addl %ecx, %eax
movl $0xfff1, %r15d          # imm = 0xFFF1
xorl %edx, %edx
divl %r15d
movw %dx, 0x6(%r8)
pushq $0x6
popq %rdx
movq %r8, %rdi
movq %rbx, %rsi
callq 0x64945
pushq $0x6
popq %rsi
pushq $0x1
popq %rdx
movq %rbx, %rdi
movq 0x8(%rsp), %rbx
movq %rbx, %rcx
callq 0x6b90
testl %r13d, %r13d
movl $0x0, %ecx
cmovgl %r13d, %ecx
cmpq %rbp, %rcx
je 0x3c2d8
movzwl 0x4(%r12), %eax
movzbl (%r14,%rbp), %edx
addl %eax, %edx
movl %edx, %esi
subl %r15d, %esi
cmovbl %edx, %esi
movw %si, 0x4(%r12)
movzwl 0x6(%r12), %eax
addl %esi, %eax
xorl %edx, %edx
divl %r15d
movw %dx, 0x6(%r12)
incq %rbp
jmp 0x3c2a0
movq %r12, %rdi
movq %r14, %rsi
movl %r13d, %edx
callq 0x64945
movslq (%rsp), %rsi
movslq 0x4(%rsp), %rdx
movq %r14, %rdi
movq %rbx, %rcx
callq 0x6b90
addq $0x18, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
nopl (%rax)
// File: /workspace/github_c_makefile_star2_O2/jonof[P]jftekwar/jfbuild/src/kplib.c
// Function: kzcheckhashsiz
static int kzcheckhashsiz (int siz)
{
	int i;

	if (!kzhashbuf) //Initialize hash table on first call
	{
		memset(kzhashead,-1,sizeof(kzhashead));
		kzhashbuf = (char *)malloc(KZHASHINITSIZE); if (!kzhashbuf) return(0);
		kzhashpos = 0; kzlastfnam = -1; kzhashsiz = KZHASHINITSIZE;
	}
	if (kzhashpos+siz > kzhashsiz) //Make sure string fits in kzhashbuf
	{
		i = kzhashsiz; do { i <<= 1; } while (kzhashpos+siz > i);
		kzhashbuf = (char *)realloc(kzhashbuf,i); if (!kzhashbuf) return(0);
		kzhashsiz = i;
	}
	return(1);
}

// Assembly:
pushq %rbp
pushq %rbx
pushq %rax
movl %edi, %ebx
movq 0x56f680(%rip), %rdi    # 0x5afba8
testq %rdi, %rdi
je 0x4053b
movl 0x56f681(%rip), %eax    # 0x5afbb4
movl 0x56f677(%rip), %ebp    # 0x5afbb0
jmp 0x40589
leaq 0x56f67e(%rip), %rdi    # 0x5afbc0
movl $0x400, %edx            # imm = 0x400
movl $0xff, %esi
callq 0x62f0
movl $0x2000, %edi           # imm = 0x2000
callq 0x69a0
movq %rax, 0x56f646(%rip)    # 0x5afba8
testq %rax, %rax
je 0x405b4
movq %rax, %rdi
andl $0x0, 0x56f643(%rip)    # 0x5afbb4
orl $-0x1, 0x56fa48(%rip)   # 0x5affc0
movl $0x2000, 0x56f62e(%rip) # imm = 0x2000
xorl %eax, %eax
movl $0x2000, %ebp           # imm = 0x2000
addl %ebx, %eax
pushq $0x1
popq %rbx
cmpl %ebp, %eax
jle 0x405b6
addl %ebp, %ebp
cmpl %ebp, %eax
jg 0x40592
movslq %ebp, %rsi
callq 0x6120
movq %rax, 0x56f601(%rip)    # 0x5afba8
testq %rax, %rax
je 0x405b4
movl %ebp, 0x56f5fe(%rip)    # 0x5afbb0
jmp 0x405b6
xorl %ebx, %ebx
movl %ebx, %eax
addq $0x8, %rsp
popq %rbx
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O2/jonof[P]jftekwar/jfbuild/src/kplib.c
// Function: kzcalchash
static int kzcalchash (const char *st)
{
	int i, hashind;
	char ch;

	for(i=0,hashind=0;st[i];i++)
	{
		ch = st[i];
		if ((ch >= 'a') && (ch <= 'z')) ch -= 32;
		if (ch == '/') ch = '\\';
		hashind = (ch - hashind*3);
	}
	return(hashind%(sizeof(kzhashead)/sizeof(kzhashead[0])));
}

// Assembly:
xorl %eax, %eax
pushq $0x5c
popq %rcx
movb (%rdi), %dl
testb %dl, %dl
je 0x405f6
leal -0x61(%rdx), %esi
leal -0x20(%rdx), %r8d
cmpb $0x1a, %sil
movzbl %dl, %esi
movzbl %r8b, %edx
cmovael %esi, %edx
movl %ecx, %esi
cmpb $0x2f, %dl
je 0x405e8
movl %edx, %esi
movzbl %sil, %edx
imull $-0x3, %eax, %eax
addl %edx, %eax
incq %rdi
jmp 0x405c4
movzbl %al, %eax
retq
// File: /workspace/github_c_makefile_star2_O2/jonof[P]jftekwar/jfbuild/src/kplib.c
// Function: initpngtables
static void initpngtables(void)
{
	int i, j, k;

		//hxbit[0-58][0-1] is a combination of 4 different tables:
		//   1st parameter: [0-29] are distances, [30-58] are lengths
		//   2nd parameter: [0]: extra bits, [1]: base number

	j = 1; k = 0;
	for(i=0;i<30;i++)
	{
		hxbit[i][1] = j; j += (1<<k);
		hxbit[i][0] = k; k += ((i&1) && (i >= 2));
	}
	j = 3; k = 0;
	for(i=257;i<285;i++)
	{
		hxbit[i+30-257][1] = j; j += (1<<k);
		hxbit[i+30-257][0] = k; k += ((!(i&3)) && (i >= 264));
	}
	hxbit[285+30-257][1] = 258; hxbit[285+30-257][0] = 0;

	k = getcputype();
	if (k&(1<<15))
	{
		gotcmov = 4;
		for(i=0;i<512;i++) abstab10[512+i] = abstab10[512-i] = i;
	}
}

// Assembly:
xorl %edx, %edx
pushq $0x1
popq %rsi
leaq 0x588faa(%rip), %rax    # 0x5c9800
movl %esi, %edi
xorl %ecx, %ecx
cmpq $0x1e, %rdx
je 0x40887
movl %edi, 0x4(%rax,%rdx,8)
movl %esi, %r8d
shll %cl, %r8d
addl %r8d, %edi
movl %ecx, (%rax,%rdx,8)
cmpq $0x2, %rdx
setae %r8b
andb %dl, %r8b
movzbl %r8b, %r8d
addl %r8d, %ecx
incq %rdx
jmp 0x4085a
xorl %ecx, %ecx
pushq $0x3
popq %rdx
movl $0x101, %esi            # imm = 0x101
pushq $0x1
popq %rdi
cmpq $0x11d, %rsi            # imm = 0x11D
je 0x408d6
movl %edi, %r8d
shll %cl, %r8d
movl %edx, -0x714(%rax,%rsi,8)
addl %r8d, %edx
movl %ecx, -0x718(%rax,%rsi,8)
testb $0x3, %sil
sete %r8b
cmpq $0x108, %rsi            # imm = 0x108
setae %r9b
andb %r8b, %r9b
movzbl %r9b, %r8d
addl %r8d, %ecx
incq %rsi
jmp 0x40894
movabsq $0x10200000000, %rax    # imm = 0x10200000000
movq %rax, 0x5890e9(%rip)    # 0x5c99d0
retq
// File: /workspace/github_c_makefile_star2_O2/jonof[P]jftekwar/jfbuild/src/kplib.c
// Function: hufgencode
static void hufgencode (int *inbuf, int inum, int *hitab, int *hbmax)
{
	int i, tbuf[31];

	for(i=30;i;i--) tbuf[i] = 0;
	for(i=inum-1;i>=0;i--) tbuf[inbuf[i]]++;
	tbuf[0] = hbmax[0] = 0; //Hack to remove symbols of length 0?
	for(i=0;i<31;i++) hbmax[i+1] = hbmax[i]+tbuf[i];
	for(i=0;i<inum;i++) if (inbuf[i]) hitab[hbmax[inbuf[i]]++] = i;
}

// Assembly:
pushq %rax
movabsq $0x78, %rax
testq %rax, %rax
je 0x41557
andl $0x0, -0x80(%rsp,%rax)
addq $-0x4, %rax
jmp 0x41547
movl %esi, %eax
testl %eax, %eax
jle 0x4156c
movslq -0x4(%rdi,%rax,4), %r8
decq %rax
incl -0x80(%rsp,%r8,4)
jmp 0x41559
andl $0x0, (%rcx)
andl $0x0, -0x80(%rsp)
xorl %eax, %eax
xorl %r8d, %r8d
cmpq $0x1f, %r8
je 0x4158e
addl -0x80(%rsp,%r8,4), %eax
movl %eax, 0x4(%rcx,%r8,4)
incq %r8
jmp 0x41579
xorl %eax, %eax
testl %esi, %esi
cmovlel %eax, %esi
cmpq %rax, %rsi
je 0x415b8
movslq (%rdi,%rax,4), %r8
testq %r8, %r8
je 0x415b3
movslq (%rcx,%r8,4), %r9
leal 0x1(%r9), %r10d
movl %r10d, (%rcx,%r8,4)
movl %eax, (%rdx,%r9,4)
incq %rax
jmp 0x41595
popq %rax
retq
// File: /workspace/github_c_makefile_star2_O2/jonof[P]jftekwar/jfbuild/src/kplib.c
// Function: qhufgencode
static void qhufgencode (int *hitab, int *hbmax, int *qhval, unsigned char *qhbit, int numbits)
{
	int i, j, k, n, r;

		//r is the bit reverse of i. Ex: if: i = 1011100111, r = 1110011101
	i = r = 0;
	for(n=1;n<=numbits;n++)
		for(k=hbmax[n-1];k<hbmax[n];k++)
			for(j=i+pow2mask[numbits-n];i<=j;i++)
			{
				r = bitrev(i,numbits);
				qhval[r] = hitab[k];
				qhbit[r] = (unsigned char)n;
			}
	for(j=pow2mask[numbits];i<=j;i++)
	{
		r = bitrev(i,numbits);

		//k = 0;
		//for(n=0;n<numbits;n++)
		//   k = (k<<1) + ((r>>n)&1) + hbmax[n]-hbmax[n+1];
		//
		//n = numbits;
		//k = hbmax[n]-r;
		//
		//j = peekbits(LOGQHUFSIZ); i = qhufval[j]; j = qhufbit[j];
		//
		//i = j = 0;
		//do
		//{
		//   i = (i<<1)+getbits(1)+nbuf0[j]-nbuf0[j+1]; j++;
		//} while (i >= 0);
		//i = ibuf0[nbuf0[j]+i];
		//qhval[r] = k;

		qhbit[r] = 0; //n-32;
	}

	//   //hufgetsym_skipb related code:
	//for(k=n=0;n<numbits;n++) k = (k<<1)+hbmax[n]-hbmax[n+1];
	//return(k);
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x38, %rsp
movq %rcx, 0x18(%rsp)
movq %rdx, %r15
movq %rsi, 0x10(%rsp)
movslq %r8d, %rax
xorl %ebp, %ebp
movq %rax, 0x20(%rsp)
testl %eax, %eax
movl $0x0, %eax
movl %r8d, 0xc(%rsp)
cmovgl %r8d, %eax
movq %rdi, %r13
incl %eax
movq %rax, 0x28(%rsp)
pushq $0x1
popq %r12
cmpq 0x28(%rsp), %r12
je 0x416b6
movq 0x10(%rsp), %rax
movslq -0x4(%rax,%r12,4), %rbx
movq 0x20(%rsp), %rax
subq %r12, %rax
movq %rax, 0x30(%rsp)
movq 0x10(%rsp), %rax
movslq (%rax,%r12,4), %rax
cmpq %rax, %rbx
jge 0x416b1
leaq 0x2b1b8(%rip), %rax     # 0x6c830
movq 0x30(%rsp), %rcx
movl (%rax,%rcx,4), %r14d
addl %ebp, %r14d
cmpl %r14d, %ebp
jg 0x416ac
movl %ebp, %edi
movl 0xc(%rsp), %esi
callq 0x42b57
movl (%r13,%rbx,4), %ecx
cltq
movl %ecx, (%r15,%rax,4)
movq 0x18(%rsp), %rcx
movb %r12b, (%rcx,%rax)
incl %ebp
jmp 0x41684
incq %rbx
jmp 0x41663
incq %r12
jmp 0x41645
movl 0xc(%rsp), %eax
leaq 0x2b16f(%rip), %rcx     # 0x6c830
movl (%rcx,%rax,4), %ebx
cmpl %ebx, %ebp
jg 0x416e2
movl %ebp, %edi
movl 0xc(%rsp), %esi
callq 0x42b57
cltq
movq 0x18(%rsp), %rcx
movb $0x0, (%rcx,%rax)
incl %ebp
jmp 0x416c4
addq $0x38, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O2/jonof[P]jftekwar/jfbuild/src/kplib.c
// Function: kzseek
int kzseek (int offset, int whence)
{
	if (!kzfs.fil) return(-1);
	switch (whence)
	{
		case SEEK_CUR: kzfs.pos += offset; break;
		case SEEK_END: kzfs.pos = kzfs.leng+offset; break;
		case SEEK_SET: default: kzfs.pos = offset;
	}
	if (kzfs.pos < 0) kzfs.pos = 0;
	if (kzfs.pos > kzfs.leng) kzfs.pos = kzfs.leng;
	return(kzfs.pos);
}

// Assembly:
cmpq $0x0, 0x56e891(%rip)    # 0x5affc8
je 0x4174b
cmpl $0x2, %esi
je 0x4174f
cmpl $0x1, %esi
jne 0x41755
addl 0x56e8af(%rip), %edi    # 0x5afff8
jmp 0x41755
pushq $-0x1
popq %rax
retq
addl 0x56e89b(%rip), %edi    # 0x5afff0
xorl %eax, %eax
testl %edi, %edi
cmovgl %edi, %eax
movl 0x56e88e(%rip), %ecx    # 0x5afff0
cmpl %ecx, %eax
movl %eax, %edx
cmovgl %ecx, %edx
movl %edx, 0x56e889(%rip)    # 0x5afff8
cmovgel %ecx, %eax
retq
// File: /workspace/github_c_makefile_star2_O2/jonof[P]jftekwar/jfbuild/src/kplib.c
// Function: kpzload
void kpzload (const char *filnam, intptr_t *pic, int *bpl, int *xsiz, int *ysiz)
{
	char *buf;
	int leng;

	(*pic) = 0;
	if (!kzopen(filnam)) return;
	leng = kzfilelength();
	buf = (char *)malloc(leng); if (!buf) return;
	kzread(buf,leng);
	kzclose();

	kpgetdim(buf,leng,xsiz,ysiz);
	(*bpl) = ((*xsiz)<<2);
	(*pic) = (intptr_t)malloc((*ysiz)*(*bpl)); if (!(*pic)) { free(buf); return; }
	if (kprender(buf,leng,*pic,*bpl,*xsiz,*ysiz,0,0) < 0) { free(buf); free((void *)*pic); (*pic) = 0; return; }
	free(buf);
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movq %r8, %r14
movq %rcx, %r15
movq %rdx, %r12
movq %rsi, %rbx
andq $0x0, (%rsi)
callq 0x405fa
testl %eax, %eax
je 0x418af
xorl %ebp, %ebp
cmpq $0x1, 0x56e7a8(%rip)    # 0x5affc8
sbbl %ebp, %ebp
orl 0x56e7c8(%rip), %ebp    # 0x5afff0
movslq %ebp, %rdi
callq 0x69a0
testq %rax, %rax
je 0x418af
movq %rax, %r13
movq %rax, %rdi
movl %ebp, %esi
callq 0x40c51
callq 0x417cf
movq %r13, %rdi
movl %ebp, %esi
movq %r15, %rdx
movq %r14, %rcx
callq 0x3c30c
movl (%r15), %eax
shll $0x2, %eax
movl %eax, (%r12)
movslq (%r14), %rcx
movslq %eax, %rdi
imulq %rcx, %rdi
callq 0x69a0
movq %rax, (%rbx)
testq %rax, %rax
je 0x418be
movl (%r12), %ecx
movl (%r15), %r8d
movl (%r14), %r9d
movq %r13, %rdi
movl %ebp, %esi
movq %rax, %rdx
pushq $0x0
pushq $0x0
callq 0x3c560
popq %rcx
popq %rdx
movl %eax, %ebp
movq %r13, %rdi
callq 0x61c0
testl %ebp, %ebp
jns 0x418af
movq (%rbx), %rdi
callq 0x61c0
andq $0x0, (%rbx)
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movq %r13, %rdi
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
jmp 0x61c0
// File: /workspace/github_c_makefile_star2_O2/jonof[P]jftekwar/jfbuild/src/kplib.c
// Function: huffgetval
static void huffgetval (int index, int curbits, int num, int *daval, int *dabits)
{
	int b, v, pow2, *hmax;

	hmax = &hufmaxatbit[index][0];
	pow2 = pow2long[curbits-1];
	if (num&pow2) v = 1; else v = 0;
	for(b=1;b<=16;b++)
	{
		if (v < hmax[b])
		{
			*dabits = b;
			*daval = huftable[index][hufvalatbit[index][b]+v];
			return;
		}
		pow2 >>= 1; v <<= 1;
		if (num&pow2) v++;
	}
	*dabits = 16; *daval = 0;
}

// Assembly:
pushq %rbx
movslq %edi, %rax
imulq $0x50, %rax, %rdi
leaq 0x587e31(%rip), %r9     # 0x5c9fc0
addq %rdi, %r9
decl %esi
leaq 0x2a615(%rip), %r10     # 0x6c7b0
movl (%r10,%rsi,4), %r11d
xorl %esi, %esi
testl %edx, %r11d
setne %sil
movabsq $0x1, %r10
cmpq $0x11, %r10
je 0x421d1
cmpl (%r9,%r10,4), %esi
jl 0x421dc
sarl %r11d
xorl %ebx, %ebx
testl %edx, %r11d
setne %bl
leal (%rbx,%rsi,2), %esi
incq %r10
jmp 0x421b2
movl $0x10, (%r8)
xorl %eax, %eax
jmp 0x42205
movl %r10d, (%r8)
leaq 0x58805a(%rip), %rdx    # 0x5ca240
addq %rdi, %rdx
movslq (%rdx,%r10,4), %rdx
movslq %esi, %rsi
addq %rdx, %rsi
shlq $0x8, %rax
leaq 0x5882c2(%rip), %rdx    # 0x5ca4c0
addq %rax, %rdx
movzbl (%rdx,%rsi), %eax
movl %eax, (%rcx)
popq %rbx
retq
// File: /workspace/github_c_makefile_star2_O2/jonof[P]jftekwar/jfbuild/src/osd.c
// Function: OSD_Cleanup
void OSD_Cleanup(void)
{
	symbol_t *s;

	for (; symbols; symbols=s) {
		s=symbols->next;
		Bfree(symbols);
	}

	osdinited=0;
}

// Assembly:
pushq %rbx
movq 0x5aa740(%rip), %rdi    # 0x5ed2c0
testq %rdi, %rdi
je 0x42b9a
movq 0x8(%rdi), %rbx
callq 0x61c0
movq %rbx, 0x5aa72b(%rip)    # 0x5ed2c0
movq %rbx, %rdi
jmp 0x42b80
movb $0x0, 0x5aa727(%rip)    # 0x5ed2c8
popq %rbx
retq
// File: /workspace/github_c_makefile_star2_O2/jonof[P]jftekwar/jfbuild/src/osd.c
// Function: OSD_Init
void OSD_Init(void)
{
    if (osdinited) return;
	osdinited=1;

	Bmemset(osdtext, 0, TEXTSIZE);
	osdlines=1;

	atexit(OSD_Cleanup);

	OSD_RegisterFunction("listsymbols","listsymbols: lists all the recognized symbols",osdcmd_listsymbols);
	OSD_RegisterFunction("help","help: displays help on the named symbol",osdcmd_help);
	OSD_RegisterFunction("osdrows","osdrows: sets the number of visible lines of the OSD",osdcmd_osdvars);
	OSD_RegisterFunction("clear","clear: clear the OSD",osdcmd_clear);
	OSD_RegisterFunction("echo","echo: write text to the OSD",osdcmd_echo);
}

// Assembly:
cmpb $0x0, 0x5aa71e(%rip)    # 0x5ed2c8
je 0x42bad
retq
pushq %rax
movb $0x1, 0x5aa713(%rip)    # 0x5ed2c8
leaq 0x5aa714(%rip), %rdi    # 0x5ed2d0
movl $0x4000, %edx           # imm = 0x4000
xorl %esi, %esi
callq 0x62f0
movl $0x1, 0x5b0ae(%rip)     # 0x9dc80
leaq -0x61(%rip), %rdi       # 0x42b78
callq 0x67570
leaq 0x29dcb(%rip), %rdi     # 0x6c9b0
leaq 0x29dd0(%rip), %rsi     # 0x6c9bc
leaq 0x1f0(%rip), %rdx       # 0x42de3
callq 0x42c61
leaq 0x2671d(%rip), %rdi     # 0x6931c
leaq 0x29de4(%rip), %rsi     # 0x6c9ea
leaq 0x21b(%rip), %rdx       # 0x42e28
callq 0x42c61
leaq 0x29df9(%rip), %rdi     # 0x6ca12
leaq 0x29dfa(%rip), %rsi     # 0x6ca1a
leaq 0x24f(%rip), %rdx       # 0x42e76
callq 0x42c61
leaq 0x29e1c(%rip), %rdi     # 0x6ca4f
leaq 0x29e1b(%rip), %rsi     # 0x6ca55
leaq 0x2a9(%rip), %rdx       # 0x42eea
callq 0x42c61
leaq 0x28fc3(%rip), %rdi     # 0x6bc10
leaq 0x29e16(%rip), %rsi     # 0x6ca6a
leaq 0x2cb(%rip), %rdx       # 0x42f26
popq %rax
jmp 0x42c61
// File: /workspace/github_c_makefile_star2_O2/jonof[P]jftekwar/jfbuild/src/osd.c
// Function: osdcmd_listsymbols
static int osdcmd_listsymbols(const osdfuncparm_t *parm)
{
	symbol_t *i;

	(void)parm;

	OSD_Printf("Symbol listing:\n");
	for (i=symbols; i!=NULL; i=i->next)
		OSD_Printf("     %s\n", i->name);

	return OSDCMD_OK;
}

// Assembly:
pushq %r14
pushq %rbx
pushq %rax
leaq 0x29ec7(%rip), %rdi     # 0x6ccb5
xorl %eax, %eax
callq 0x43fe7
leaq 0x5aa4c4(%rip), %r14    # 0x5ed2c0
leaq 0x2c084(%rip), %rbx     # 0x6ee87
movq (%r14), %r14
testq %r14, %r14
je 0x42e1e
movq (%r14), %rsi
movq %rbx, %rdi
xorl %eax, %eax
callq 0x43fe7
addq $0x8, %r14
jmp 0x42e03
xorl %eax, %eax
addq $0x8, %rsp
popq %rbx
popq %r14
retq
// File: /workspace/github_c_makefile_star2_O2/jonof[P]jftekwar/jfbuild/src/osd.c
// Function: osdcmd_help
static int osdcmd_help(const osdfuncparm_t *parm)
{
	symbol_t *symb;

	if (parm->numparms != 1) return OSDCMD_SHOWHELP;
	symb = findexactsymbol(parm->parms[0]);
	if (!symb) {
		OSD_Printf("Help Error: \"%s\" is not a defined variable or function\n", parm->parms[0]);
	} else {
		OSD_Printf("%s\n", symb->help);
	}

	return OSDCMD_OK;
}

// Assembly:
pushq %r14
pushq %rbx
pushq %rax
cmpl $0x1, (%rdi)
jne 0x42e54
movq 0x10(%rdi), %rax
movq (%rax), %r14
movq %r14, %rdi
callq 0x443e1
testq %rax, %rax
je 0x42e59
movq 0x10(%rax), %rsi
leaq 0x2c03c(%rip), %rdi     # 0x6ee8c
xorl %ebx, %ebx
jmp 0x42e65
pushq $0x1
popq %rbx
jmp 0x42e6c
leaq 0x29e66(%rip), %rdi     # 0x6ccc6
xorl %ebx, %ebx
movq %r14, %rsi
xorl %eax, %eax
callq 0x43fe7
movl %ebx, %eax
addq $0x8, %rsp
popq %rbx
popq %r14
retq
// File: /workspace/github_c_makefile_star2_O2/jonof[P]jftekwar/jfbuild/src/osd.c
// Function: osdcmd_osdvars
static int osdcmd_osdvars(const osdfuncparm_t *parm)
{
	int showval = (parm->numparms < 1);

	if (!Bstrcasecmp(parm->name, "osdrows")) {
		if (showval) { OSD_Printf("osdrows is %d\n", osdrows); return OSDCMD_OK; }
		else {
			osdrows = atoi(parm->parms[0]);
			if (osdrows < 1) osdrows = 1;
			else if (osdrows > osdmaxrows) osdrows = osdmaxrows;
			return OSDCMD_OK;
		}
	}
	return OSDCMD_SHOWHELP;
}

// Assembly:
pushq %rbx
movq %rdi, %rbx
movq 0x8(%rdi), %rdi
leaq 0x29b8d(%rip), %rsi     # 0x6ca12
callq 0x6880
testl %eax, %eax
je 0x42e95
pushq $0x1
popq %rbx
movl %ebx, %eax
popq %rbx
retq
cmpl $0x0, (%rbx)
jle 0x42ec4
movq 0x10(%rbx), %rax
movq (%rax), %rdi
callq 0x6310
movl %eax, 0x5ae38(%rip)     # 0x9dce4
testl %eax, %eax
jle 0x42edc
movl 0x5ae2a(%rip), %ecx     # 0x9dce0
xorl %ebx, %ebx
cmpl %ecx, %eax
jle 0x42e91
movl %ecx, 0x5ae22(%rip)     # 0x9dce4
jmp 0x42e91
movl 0x5ae1a(%rip), %esi     # 0x9dce4
leaq 0x29e2d(%rip), %rdi     # 0x6ccfe
xorl %ebx, %ebx
xorl %eax, %eax
callq 0x43fe7
jmp 0x42e91
movl $0x1, 0x5adfe(%rip)     # 0x9dce4
xorl %ebx, %ebx
jmp 0x42e91
// File: /workspace/github_c_makefile_star2_O2/jonof[P]jftekwar/jfbuild/src/osd.c
// Function: osdcmd_clear
static int osdcmd_clear(const osdfuncparm_t *parm)
{
	if (parm->numparms != 0) return OSDCMD_SHOWHELP;
	Bmemset(osdtext, 0, TEXTSIZE);
	osdlines=1;
	osdhead=0;
	osdpos=0;

	return OSDCMD_OK;
}

// Assembly:
pushq %rbx
cmpl $0x0, (%rdi)
je 0x42ef5
pushq $0x1
popq %rbx
jmp 0x42f22
leaq 0x5aa3d4(%rip), %rdi    # 0x5ed2d0
xorl %ebx, %ebx
movl $0x4000, %edx           # imm = 0x4000
xorl %esi, %esi
callq 0x62f0
andl $0x0, 0x5ae3f3(%rip)    # 0x5f1304
movl $0x1, 0x5ad65(%rip)     # 0x9dc80
andl $0x0, 0x5ae3de(%rip)    # 0x5f1300
movl %ebx, %eax
popq %rbx
retq
// File: /workspace/github_c_makefile_star2_O2/jonof[P]jftekwar/jfbuild/src/osd.c
// Function: osdcmd_echo
static int osdcmd_echo(const osdfuncparm_t *parm)
{
	int i;

	if (parm->numparms == 0) return OSDCMD_SHOWHELP;
	for (i = 0; i < parm->numparms; i++) {
		if (i) OSD_Puts(" ");
		OSD_Puts(parm->parms[i]);
	}
	OSD_Puts("\n");

	return OSDCMD_OK;
}

// Assembly:
movl (%rdi), %eax
testl %eax, %eax
je 0x42f7a
pushq %r15
pushq %r14
pushq %rbx
movq %rdi, %rbx
xorl %r15d, %r15d
leaq 0x256c2(%rip), %r14     # 0x68600
cltq
cmpq %rax, %r15
jge 0x42f66
testq %r15, %r15
je 0x42f52
movq %r14, %rdi
callq 0x4409d
movq 0x10(%rbx), %rax
movq (%rax,%r15,8), %rdi
callq 0x4409d
incq %r15
movl (%rbx), %eax
jmp 0x42f3e
leaq 0x2915f(%rip), %rdi     # 0x6c0cc
callq 0x4409d
xorl %eax, %eax
popq %rbx
popq %r14
popq %r15
retq
pushq $0x1
popq %rax
retq
// File: /workspace/github_c_makefile_star2_O2/jonof[P]jftekwar/jfbuild/src/osd.c
// Function: OSD_SetFunctions
void OSD_SetFunctions(
		void (*drawchar)(int,int,char,int,int),
		void (*drawstr)(int,int,char*,int,int,int),
		void (*drawcursor)(int,int,int,int),
		int (*colwidth)(int),
		int (*rowheight)(int),
		void (*clearbg)(int,int),
		int (*gtime)(void),
		void (*showosd)(int)
	)
{
	drawosdchar = drawchar;
	drawosdstr = drawstr;
	drawosdcursor = drawcursor;
	getcolumnwidth = colwidth;
	getrowheight = rowheight;
	clearbackground = clearbg;
	gettime = gtime;
	onshowosd = showosd;

	if (!drawosdchar) drawosdchar = _internal_drawosdchar;
	if (!drawosdstr) drawosdstr = _internal_drawosdstr;
	if (!drawosdcursor) drawosdcursor = _internal_drawosdcursor;
	if (!getcolumnwidth) getcolumnwidth = _internal_getcolumnwidth;
	if (!getrowheight) getrowheight = _internal_getrowheight;
	if (!clearbackground) clearbackground = _internal_clearbackground;
	if (!gettime) gettime = _internal_gettime;
	if (!onshowosd) onshowosd = _internal_onshowosd;
}

// Assembly:
movq 0x10(%rsp), %rax
movq 0x8(%rsp), %r10
movq %rdi, 0x5acf9(%rip)     # 0x9dc88
movq %rsi, 0x5acfa(%rip)     # 0x9dc90
movq %rdx, 0x5acfb(%rip)     # 0x9dc98
movq %rcx, 0x5acfc(%rip)     # 0x9dca0
movq %r8, 0x5acfd(%rip)      # 0x9dca8
movq %r9, 0x5acfe(%rip)      # 0x9dcb0
movq %r10, 0x5acff(%rip)     # 0x9dcb8
movq %rax, 0x5ad00(%rip)     # 0x9dcc0
testq %rdi, %rdi
jne 0x42fd3
leaq 0x8e(%rip), %rdi        # 0x4305a
movq %rdi, 0x5acb5(%rip)     # 0x9dc88
testq %rsi, %rsi
jne 0x42fe6
leaq 0x126(%rip), %rsi       # 0x43105
movq %rsi, 0x5acaa(%rip)     # 0x9dc90
testq %rdx, %rdx
jne 0x42ff9
leaq 0x1e5(%rip), %rdx       # 0x431d7
movq %rdx, 0x5ac9f(%rip)     # 0x9dc98
testq %rcx, %rcx
jne 0x4300c
leaq 0x25e(%rip), %rcx       # 0x43263
movq %rcx, 0x5ac94(%rip)     # 0x9dca0
testq %r8, %r8
jne 0x4301f
leaq 0x256(%rip), %rcx       # 0x4326e
movq %rcx, 0x5ac89(%rip)     # 0x9dca8
testq %r9, %r9
jne 0x43032
leaq 0x24c(%rip), %rcx       # 0x43277
movq %rcx, 0x5ac7e(%rip)     # 0x9dcb0
testq %r10, %r10
jne 0x43045
leaq 0x23a(%rip), %rcx       # 0x43278
movq %rcx, 0x5ac73(%rip)     # 0x9dcb8
testq %rax, %rax
je 0x4304b
retq
leaq 0x22b(%rip), %rax       # 0x4327d
movq %rax, 0x5ac67(%rip)     # 0x9dcc0
retq
// File: /workspace/github_c_makefile_star2_O2/jonof[P]jftekwar/jfbuild/src/osd.c
// Function: internal_drawosdchar
static void _internal_drawosdchar(int x, int y, char ch, int shade, int pal)
{
	char st[2] = { 0,0 };
	int colour, shadow;

	(void)shade;

	st[0] = ch;

	if (qsetmode == 200) {
		colour = palmap256[pal%4];
		shadow = palmap256[0];
	} else {
		colour = palmap16[pal%4];
		shadow = palmap16[0];
		// printext256 happens to work in 2D mode.
	}
	printext256(4+(x*8)+1,4+(y*14)+1, shadow, -1, st, 2);
	printext256(4+(x*8),4+(y*14), colour, -1, st, 2);
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movl %r8d, %eax
leaq 0x6(%rsp), %rbx
andw $0x0, (%rbx)
movb %dl, (%rbx)
leaq 0x16e9ae(%rip), %rcx    # 0x1b1a28
movl (%rcx), %ecx
pushq $0x4
popq %r8
cltd
idivl %r8d
xorl %eax, %eax
cmpl $0xc8, %ecx
leaq 0x5ac5d(%rip), %rcx     # 0x9dcf0
leaq 0x29cc6(%rip), %r8      # 0x6cd60
cmoveq %rcx, %r8
cmovew 0x5ac4a(%rip), %ax      # 0x9dcf0
movslq %edx, %rcx
movswl (%r8,%rcx,4), %ebp
leal 0x4(,%rdi,8), %r14d
leal 0x5(,%rdi,8), %edi
imull $0xe, %esi, %esi
leal 0x4(%rsi), %r15d
addl $0x5, %esi
movswl %ax, %edx
pushq $-0x1
popq %r12
pushq $0x2
popq %r13
movl %r12d, %ecx
movq %rbx, %r8
movl %r13d, %r9d
callq 0x39aab
movl %r14d, %edi
movl %r15d, %esi
movl %ebp, %edx
movl %r12d, %ecx
movq %rbx, %r8
movl %r13d, %r9d
callq 0x39aab
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O2/jonof[P]jftekwar/jfbuild/src/osd.c
// Function: internal_drawosdstr
static void _internal_drawosdstr(int x, int y, char *ch, int len, int shade, int pal)
{
	char st[1024];
	int colour, shadow;

	(void)shade;

	if (len>1023) len=1023;
	memcpy(st,ch,len);
	st[len]=0;

	if (qsetmode == 200) {
		colour = palmap256[pal%4];
		shadow = palmap256[0];
	} else {
		colour = palmap16[pal%4];
		shadow = palmap16[0];
		// printext256 happens to work in 2D mode.
	}
	printext256(4+(x*8)+1,4+(y*14)+1, shadow, -1, st, 2);
	printext256(4+(x*8),4+(y*14), colour, -1, st, 2);
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x408, %rsp            # imm = 0x408
movl %r9d, %r15d
movl %esi, %ebp
movl %edi, %r14d
movl $0x3ff, %eax            # imm = 0x3FF
cmpl %eax, %ecx
cmovll %ecx, %eax
movslq %eax, %r12
movq %rsp, %rbx
movq %rbx, %rdi
movq %rdx, %rsi
movq %r12, %rdx
callq 0x60c0
movb $0x0, (%rsp,%r12)
leaq 0x16e8e0(%rip), %rax    # 0x1b1a28
movl (%rax), %ecx
pushq $0x4
popq %rsi
movl %r15d, %eax
cltd
idivl %esi
xorl %eax, %eax
cmpl $0xc8, %ecx
leaq 0x5ab8e(%rip), %rcx     # 0x9dcf0
leaq 0x29bf7(%rip), %rsi     # 0x6cd60
cmoveq %rcx, %rsi
cmovew 0x5ab7b(%rip), %ax      # 0x9dcf0
movslq %edx, %rcx
movswl (%rsi,%rcx,4), %r15d
leal 0x4(,%r14,8), %r12d
leal 0x5(,%r14,8), %edi
imull $0xe, %ebp, %esi
leal 0x4(%rsi), %ebp
addl $0x5, %esi
movswl %ax, %edx
pushq $-0x1
popq %r14
pushq $0x2
popq %r13
movl %r14d, %ecx
movq %rbx, %r8
movl %r13d, %r9d
callq 0x39aab
movl %r12d, %edi
movl %ebp, %esi
movl %r15d, %edx
movl %r14d, %ecx
movq %rbx, %r8
movl %r13d, %r9d
callq 0x39aab
addq $0x408, %rsp            # imm = 0x408
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O2/jonof[P]jftekwar/jfbuild/src/osd.c
// Function: internal_drawosdcursor
static void _internal_drawosdcursor(int x, int y, int type, int lastkeypress)
{
	char st[2] = { '\x16', 0 };  // solid lower third of character cell
	int colour, yoff = 2;

	unsigned blinkcycle = gettime() - (unsigned)lastkeypress;
	if (blinkcycle % 1000 > 500) return;  // blink each half-second.

	if (type) {
		st[0] = '\xdb';  // solid block
		yoff = 0;
	}

	if (qsetmode == 200) {
		colour = palmap256[2];
	} else {
		colour = palmap16[2];
		// printext256 happens to work in 2D mode.
	}
	printext256(4+(x*8),4+(y*14)+yoff, colour, -1, st, 2);
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %rbx
pushq %rax
movl %ecx, %r15d
movl %edx, %ebp
movl %esi, %ebx
movl %edi, %r14d
movw $0x16, 0x6(%rsp)
callq *0x5aac3(%rip)          # 0x9dcb8
subl %r15d, %eax
movl $0x3e8, %ecx            # imm = 0x3E8
xorl %edx, %edx
divl %ecx
cmpl $0x1f4, %edx            # imm = 0x1F4
ja 0x43258
testl %ebp, %ebp
je 0x43216
movb $-0x25, 0x6(%rsp)
xorl %eax, %eax
jmp 0x43219
pushq $0x2
popq %rax
leaq 0x16e808(%rip), %rcx    # 0x1b1a28
cmpl $0xc8, (%rcx)
movw $0x7, %cx
jne 0x43233
movzwl 0x5aac5(%rip), %ecx     # 0x9dcf8
leal 0x4(,%r14,8), %edi
imull $0xe, %ebx, %edx
leal (%rdx,%rax), %esi
addl $0x4, %esi
movswl %cx, %edx
pushq $-0x1
popq %rcx
leaq 0x6(%rsp), %r8
pushq $0x2
popq %r9
callq 0x39aab
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O2/jonof[P]jftekwar/jfbuild/src/osd.c
// Function: OSD_ShowDisplay
void OSD_ShowDisplay(int onf)
{
	if (onf < 0) {
		onf = !osdvisible;
	}
	osdvisible = (onf != 0);
	osdeditcontrol = 0;
	osdeditshift = 0;

	grabmouse(osdvisible == 0);
	onshowosd(osdvisible);
	releaseallbuttons();
	bflushchars();

	if (osdvisible) {
		findwhite();
	}
}

// Assembly:
pushq %rax
xorl %eax, %eax
cmpb $0x0, 0x5ad62f(%rip)    # 0x5f12dc
sete %al
xorl %ecx, %ecx
testl %edi, %edi
setne %cl
cmovsl %eax, %ecx
movb %cl, 0x5ad61c(%rip)     # 0x5f12dc
movb $0x0, 0x5ad619(%rip)    # 0x5f12e0
xorb $0x1, %cl
movzbl %cl, %edi
callq 0x62b55
movzbl 0x5ad603(%rip), %edi    # 0x5f12dc
callq *0x59fe1(%rip)          # 0x9dcc0
callq 0x62c1b
callq 0x1cac9
cmpb $0x0, 0x5ad5ec(%rip)    # 0x5f12dc
je 0x43cf8
popq %rax
jmp 0x43e2b
popq %rax
retq
// File: /workspace/github_c_makefile_star2_O2/jonof[P]jftekwar/jfbuild/src/osd.c
// Function: OSD_ResizeDisplay
void OSD_ResizeDisplay(int w, int h)
{
	int newcols;
	int newmaxlines;
	char newtext[TEXTSIZE];
	int i,j,k;

	newcols = getcolumnwidth(w);
	newmaxlines = TEXTSIZE / newcols;

	j = min(newmaxlines, osdmaxlines);
	k = min(newcols, osdcols);

	memset(newtext, 0, TEXTSIZE);
	for (i=0;i<j;i++) {
		memcpy(newtext+newcols*i, osdtext+osdcols*i, k);
	}

	memcpy(osdtext, newtext, TEXTSIZE);
	osdcols = newcols;
	osdmaxlines = newmaxlines;
	osdmaxrows = getrowheight(h)-2;

	if (osdrows > osdmaxrows) osdrows = osdmaxrows;

	osdpos = 0;
	osdhead = 0;
	osdeditwinstart = 0;
	osdeditwinend = editlinewidth;

	if (osdvisible) {
		findwhite();
	}
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x4018, %rsp           # imm = 0x4018
movl %esi, 0xc(%rsp)
callq *0x59f8b(%rip)          # 0x9dca0
movl %eax, %r13d
movl $0x4000, %eax           # imm = 0x4000
xorl %edx, %edx
idivl %r13d
movl 0x59fb0(%rip), %ebx     # 0x9dcd8
cmpl %ebx, %eax
movl %eax, 0x4(%rsp)
cmovll %eax, %ebx
movslq 0x59fa4(%rip), %r14     # 0x9dcdc
cmpl %r14d, %r13d
movl %r14d, %ebp
cmovll %r13d, %ebp
leaq 0x10(%rsp), %r15
movl $0x4000, %edx           # imm = 0x4000
movq %r15, %rdi
xorl %esi, %esi
callq 0x62f0
movslq %ebp, %r12
movl %r13d, 0x8(%rsp)
movslq %r13d, %rbp
testl %ebx, %ebx
movl $0x0, %eax
cmovlel %eax, %ebx
leaq 0x5a955e(%rip), %r13    # 0x5ed2d0
subq $0x1, %rbx
jb 0x43d8e
movq %r15, %rdi
movq %r13, %rsi
movq %r12, %rdx
callq 0x60c0
addq %rbp, %r15
addq %r14, %r13
jmp 0x43d72
leaq 0x5a953b(%rip), %rdi    # 0x5ed2d0
leaq 0x10(%rsp), %rsi
movl $0x4000, %edx           # imm = 0x4000
callq 0x60c0
movl 0x8(%rsp), %eax
movl %eax, 0x59f2e(%rip)     # 0x9dcdc
movl 0x4(%rsp), %eax
movl %eax, 0x59f20(%rip)     # 0x9dcd8
movl 0xc(%rsp), %edi
callq *0x59ee6(%rip)          # 0x9dca8
addl $-0x2, %eax
movl %eax, 0x59f15(%rip)     # 0x9dce0
cmpl %eax, 0x59f13(%rip)     # 0x9dce4
jle 0x43dd9
movl %eax, 0x59f0b(%rip)     # 0x9dce4
andl $0x0, 0x5ad520(%rip)    # 0x5f1300
andl $0x0, 0x5ad51d(%rip)    # 0x5f1304
andl $0x0, 0x5ad51a(%rip)    # 0x5f1308
movl 0x59ee8(%rip), %eax     # 0x9dcdc
addl $-0x4, %eax
movl %eax, 0x59eeb(%rip)     # 0x9dce8
cmpb $0x0, 0x5ad4d8(%rip)    # 0x5f12dc
je 0x43e19
addq $0x4018, %rsp           # imm = 0x4018
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
jmp 0x43e2b
addq $0x4018, %rsp           # imm = 0x4018
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O2/jonof[P]jftekwar/jfbuild/src/osd.c
// Function: findwhite
static void findwhite(void)
{
	if (qsetmode == 200) {
		palmap256[0] = getclosestcol(0,0,0);    // black
		palmap256[1] = getclosestcol(63,63,63);	// white
		palmap256[2] = getclosestcol(42,42,42);	// light grey
		palmap256[3] = getclosestcol(21,21,63);	// light blue
	}
}

// Assembly:
leaq 0x16dbf6(%rip), %rax    # 0x1b1a28
cmpl $0xc8, (%rax)
jne 0x43e85
pushq %rbx
xorl %edi, %edi
xorl %esi, %esi
xorl %edx, %edx
callq 0x221a2
movl %eax, 0x59ea4(%rip)     # 0x9dcf0
pushq $0x3f
popq %rbx
movl %ebx, %edi
movl %ebx, %esi
movl %ebx, %edx
callq 0x221a2
movl %eax, 0x59e94(%rip)     # 0x9dcf4
pushq $0x2a
popq %rdi
movl %edi, %esi
movl %edi, %edx
callq 0x221a2
movl %eax, 0x59e86(%rip)     # 0x9dcf8
pushq $0x15
popq %rdi
movl %edi, %esi
movl %ebx, %edx
callq 0x221a2
movl %eax, 0x59e78(%rip)     # 0x9dcfc
popq %rbx
retq