LLM4Binary/decompile-bench-makefile huggingface dataset:
// File: /workspace/github_c_makefile_star2_O1/jonof[P]jftekwar/jfbuild/src/polymost.c
// Function: polymost_nextpage
static void polymost_palfade(void)
{
	struct polymostdrawauxcall draw;
	struct polymostvboitem vboitem[4];

	if ((rendmode != 3) || (qsetmode != 200)) return;
	if (palfadedelta == 0) return;

	draw.mode = 2;	// Solid colour.

	draw.colour.r = palfadergb.r / 255.f;
	draw.colour.g = palfadergb.g / 255.f;
	draw.colour.b = palfadergb.b / 255.f;
	draw.colour.a = palfadedelta / 255.f;

	vboitem[0].v.x = 0.f;
	vboitem[0].v.y = 0.f;
	vboitem[0].v.z = 0.f;

	vboitem[1].v.x = (float)xdim;
	vboitem[1].v.y = 0.f;
	vboitem[1].v.z = 0.f;

	vboitem[2].v.x = (float)xdim;
	vboitem[2].v.y = (float)ydim;
	vboitem[2].v.z = 0.f;

	vboitem[3].v.x = 0.f;
	vboitem[3].v.y = (float)ydim;
	vboitem[3].v.z = 0.f;

	draw.indexcount = 4;
	draw.indexes = NULL;
	draw.elementcount = 4;
	draw.elementvbo = vboitem;

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

	polymost_drawaux_glcall(GL_TRIANGLE_FAN, &draw);
}

// Assembly:
movl 0x5ab095(%rip), %eax    # 0x5f9950
xorl $0x3, %eax
leaq 0x169163(%rip), %rcx    # 0x1b7a28
movl (%rcx), %ecx
xorl $0xc8, %ecx
orl %eax, %ecx
setne %cl
leaq 0x16916a(%rip), %rax    # 0x1b7a43
movb (%rax), %al
testb %al, %al
sete %dl
orb %cl, %dl
jne 0x4e9e2
pushq %r14
pushq %rbx
subq $0xa8, %rsp
leaq 0x8(%rsp), %rbx
leaq 0x169141(%rip), %rcx    # 0x1b7a3f
movzbl (%rcx), %edx
cvtsi2ss %edx, %xmm0
movl $0x2, 0x24(%rbx)
movss 0x2a9a0(%rip), %xmm1    # 0x792b4
divss %xmm1, %xmm0
movss %xmm0, 0x4(%rbx)
movzbl 0x1(%rcx), %edx
xorps %xmm0, %xmm0
cvtsi2ss %edx, %xmm0
movzbl 0x2(%rcx), %ecx
cvtsi2ss %ecx, %xmm2
divss %xmm1, %xmm0
movss %xmm0, 0x8(%rbx)
divss %xmm1, %xmm2
movss %xmm2, 0xc(%rbx)
movzbl %al, %eax
xorps %xmm0, %xmm0
cvtsi2ss %eax, %xmm0
divss %xmm1, %xmm0
movss %xmm0, 0x10(%rbx)
xorl %eax, %eax
leaq 0x50(%rsp), %rcx
leaq 0x3b8689(%rip), %rdx    # 0x406fec
xorps %xmm0, %xmm0
cvtsi2ssl (%rdx), %xmm0
movq %rax, (%rcx)
movl %eax, 0x8(%rcx)
movss %xmm0, 0x14(%rcx)
movq %rax, 0x18(%rcx)
leaq 0x3b8670(%rip), %rdx    # 0x406ff0
xorps %xmm1, %xmm1
cvtsi2ssl (%rdx), %xmm1
movss %xmm0, 0x28(%rcx)
movss %xmm1, 0x2c(%rcx)
movl %eax, 0x30(%rcx)
movl %eax, 0x3c(%rcx)
movss %xmm1, 0x40(%rcx)
movl %eax, 0x44(%rcx)
movl $0x4, %edx
movl %edx, 0x28(%rbx)
movq %rax, 0x30(%rbx)
movl %edx, 0x38(%rbx)
movq %rcx, 0x40(%rbx)
leaq 0x5aad87(%rip), %r14    # 0x5f9740
movl $0xb71, %edi            # imm = 0xB71
callq *0x48(%r14)
movl $0xbe2, %edi            # imm = 0xBE2
callq *0x40(%r14)
movl $0x6, %edi
movq %rbx, %rsi
callq 0x5b735
addq $0xa8, %rsp
popq %rbx
popq %r14
retq
// File: /workspace/github_c_makefile_star2_O1/jonof[P]jftekwar/jfbuild/src/polymost.c
// Function: polymost_bunchfront
static int polymost_bunchfront (int b1, int b2)
{
	double x1b1, x1b2, x2b1, x2b2;
	int b1f, b2f, i;

	b1f = bunchfirst[b1]; x1b1 = dxb1[b1f]; x2b2 = dxb2[bunchlast[b2]]; if (x1b1 >= x2b2) return(-1);
	b2f = bunchfirst[b2]; x1b2 = dxb1[b2f]; x2b1 = dxb2[bunchlast[b1]]; if (x1b2 >= x2b1) return(-1);

	if (x1b1 >= x1b2)
	{
		for(i=b2f;dxb2[i]<=x1b1;i=p2[i]);
		return(wallfront(b1f,i));
	}
	for(i=b1f;dxb2[i]<=x1b2;i=p2[i]);
	return(wallfront(i,b2f));
}

// Assembly:
movslq %edi, %rcx
leaq 0x37f1ba(%rip), %rdx    # 0x3d67c0
movswq (%rdx,%rcx,2), %rdi
leaq 0x5a65ce(%rip), %r8     # 0x5fdbe0
movsd (%r8,%rdi,8), %xmm0
movslq %esi, %rsi
leaq 0x38119e(%rip), %r9     # 0x3d87c0
movswq (%r9,%rsi,2), %r10
leaq 0x5ae5b2(%rip), %rax    # 0x605be0
ucomisd (%rax,%r10,8), %xmm0
jae 0x57677
movswq (%rdx,%rsi,2), %rsi
movsd (%r8,%rsi,8), %xmm1
movswq (%r9,%rcx,2), %rcx
ucomisd (%rax,%rcx,8), %xmm1
jae 0x57677
ucomisd %xmm1, %xmm0
jae 0x5767d
movslq %edi, %rcx
ucomisd (%rax,%rcx,8), %xmm1
jb 0x57672
leaq 0x38716c(%rip), %rdx    # 0x3de7d0
movswq (%rdx,%rcx,2), %rcx
ucomisd (%rax,%rcx,8), %xmm1
jae 0x57664
movl %ecx, %edi
jmp 0x23bbf
movl $0xffffffff, %eax       # imm = 0xFFFFFFFF
retq
movslq %esi, %rcx
ucomisd (%rax,%rcx,8), %xmm0
jb 0x57672
leaq 0x387142(%rip), %rdx    # 0x3de7d0
movswq (%rdx,%rcx,2), %rcx
ucomisd (%rax,%rcx,8), %xmm0
jae 0x5768e
movl %ecx, %esi
jmp 0x23bbf
// File: /workspace/github_c_makefile_star2_O1/jonof[P]jftekwar/jfbuild/src/polymost.c
// Function: polymost_plotpixel
int polymost_plotpixel(int x, int y, unsigned char col)
{
	palette_t colour;
	struct polymostdrawauxcall draw;
	struct polymostvboitem vboitem[1];

	if ((rendmode != 3) || (qsetmode != 200)) return(-1);

	setpolymost2dview();	// disables blending, texturing, and depth testing
	glfunc.glDepthMask(GL_FALSE);	// disable writing to the z-buffer
	glfunc.glEnable(GL_BLEND);

	draw.mode = 2;	// Solid colour.

	colour = curpalette[col];
	if (!usegammabrightness) {
		colour.r = britable[curbrightness][ colour.r ];
		colour.g = britable[curbrightness][ colour.g ];
		colour.b = britable[curbrightness][ colour.b ];
	}
	draw.colour.r = colour.r / 255.f;
	draw.colour.g = colour.g / 255.f;
	draw.colour.b = colour.b / 255.f;
	draw.colour.a = 1.f;

	vboitem[0].v.x = (GLfloat)x;
	vboitem[0].v.y = (GLfloat)y;
	vboitem[0].v.z = 0.f;

	draw.indexcount = 1;
	draw.indexes = NULL;
	draw.elementcount = 1;
	draw.elementvbo = vboitem;

	polymost_drawaux_glcall(GL_POINTS, &draw);

	glfunc.glDepthMask(GL_TRUE);	// re-enable writing to the z-buffer

	return 0;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
subq $0x60, %rsp
cmpl $0x3, 0x59d813(%rip)    # 0x5f9950
movl $0xffffffff, %ebx       # imm = 0xFFFFFFFF
jne 0x5c26a
leaq 0x15b8d9(%rip), %rax    # 0x1b7a28
cmpl $0xc8, (%rax)
jne 0x5c26a
movl %edx, %r15d
movl %esi, %ebp
movl %edi, %r14d
callq 0x3c626
leaq 0x59d5d1(%rip), %r12    # 0x5f9740
xorl %ebx, %ebx
xorl %edi, %edi
callq *0xa0(%r12)
movl $0xbe2, %edi            # imm = 0xBE2
callq *0x40(%r12)
movl $0x2, 0x3c(%rsp)
movzbl %r15b, %eax
leaq 0x3d9818(%rip), %rsi    # 0x4359b0
movb (%rsi,%rax,4), %dl
movb 0x1(%rsi,%rax,4), %cl
movb 0x2(%rsi,%rax,4), %al
leaq 0x475e2(%rip), %rsi     # 0xa378c
cmpl $0x0, (%rsi)
jne 0x5c1d6
movzbl %dl, %edx
movzbl %cl, %ecx
leaq 0x15b848(%rip), %rsi    # 0x1b7a04
movslq (%rsi), %rsi
shlq $0x8, %rsi
addq 0x35e0e(%rip), %rsi     # 0x91fd8
movzbl %al, %eax
movb (%rdx,%rsi), %dl
movb (%rcx,%rsi), %cl
movb (%rax,%rsi), %al
movzbl %dl, %edx
cvtsi2ss %edx, %xmm0
movss 0x1d0cf(%rip), %xmm1    # 0x792b4
divss %xmm1, %xmm0
leaq 0x18(%rsp), %rsi
movss %xmm0, 0x4(%rsi)
movzbl %cl, %ecx
xorps %xmm0, %xmm0
cvtsi2ss %ecx, %xmm0
movzbl %al, %eax
cvtsi2ss %eax, %xmm2
divss %xmm1, %xmm0
movss %xmm0, 0x8(%rsi)
divss %xmm1, %xmm2
movss %xmm2, 0xc(%rsi)
movl $0x3f800000, 0x10(%rsi) # imm = 0x3F800000
xorps %xmm0, %xmm0
cvtsi2ss %r14d, %xmm0
movq %rsp, %rax
xorps %xmm1, %xmm1
cvtsi2ss %ebp, %xmm1
movss %xmm0, (%rax)
movss %xmm1, 0x4(%rax)
movl $0x0, 0x8(%rax)
movl $0x1, %ecx
movl %ecx, 0x28(%rsi)
movq $0x0, 0x30(%rsi)
movl %ecx, 0x38(%rsi)
movq %rax, 0x40(%rsi)
xorl %edi, %edi
callq 0x5b735
movl $0x1, %edi
callq *0xa0(%r12)
movl %ebx, %eax
addq $0x60, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O1/jonof[P]jftekwar/jfbuild/src/polymost.c
// Function: polymost_precache
void polymost_precache(int dapicnum, int dapalnum, int datype)
{
	// dapicnum and dapalnum are like you'd expect
	// datype is 0 for a wall/floor/ceiling and 1 for a sprite
	//    basically this just means walls are repeating
	//    while sprites are clamped
	int mid;
	unsigned short flags;

	if (rendmode < 3) return;

	if (!palookup[dapalnum]) return;//dapalnum = 0;

		//FIXME
	//buildprintf("precached %d %d type %d\n", dapicnum, dapalnum, datype);
	flags = (datype & 1) ? PTH_CLAMPED :0;
	if (usehightile) flags |= PTH_HIGHTILE;
	PTMarkPrime(dapicnum, dapalnum, flags);

	if (datype == 0) return;

	mid = md_tilehasmodel(dapicnum);
	if (mid < 0 || models[mid]->mdnum < 2) return;

	{
		int i,j=0;

		if (models[mid]->mdnum == 3)
			j = ((md3model *)models[mid])->head.numsurfs;

		for (i=0;i<=j;i++)
			mdloadskin((md2model*)models[mid], 0, dapalnum, i);
	}
}

// Assembly:
cmpl $0x3, 0x59d6cb(%rip)    # 0x5f9950
jl 0x5c326
pushq %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
movl %esi, %ebx
movslq %esi, %rax
leaq 0x33b841(%rip), %rcx    # 0x397ae0
cmpq $0x0, (%rcx,%rax,8)
je 0x5c31e
movl %edx, %r14d
movl %edi, %ebp
movl %edx, %eax
andl $0x1, %eax
leal 0x2(%rax), %edx
cmpl $0x0, 0x4825a(%rip)     # 0xa4514
cmovel %eax, %edx
movl %ebx, %esi
callq 0x653bd
testl %r14d, %r14d
je 0x5c31e
movl %ebp, %edi
callq 0x5e8dc
testl %eax, %eax
js 0x5c31e
leaq 0x5ebd5d(%rip), %r14    # 0x648038
movq (%r14), %rcx
movl %eax, %r15d
movq (%rcx,%r15,8), %rax
movl (%rax), %ecx
cmpl $0x2, %ecx
jl 0x5c31e
xorl %r12d, %r12d
cmpl $0x3, %ecx
jne 0x5c2fb
movl 0xac(%rax), %r12d
testl %r12d, %r12d
js 0x5c31e
incl %r12d
xorl %ebp, %ebp
movq (%r14), %rax
movq (%rax,%r15,8), %rdi
xorl %esi, %esi
movl %ebx, %edx
movl %ebp, %ecx
callq 0x5ee07
incl %ebp
cmpl %ebp, %r12d
jne 0x5c305
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O1/jonof[P]jftekwar/jfbuild/src/polymost.c
// Function: osdcmd_gltexturemode
static int osdcmd_gltexturemode(const osdfuncparm_t *parm)
{
	int m;
	const char *p;

	if (parm->numparms != 1) {
		buildprintf("Current texturing mode is %s\n", glfiltermodes[gltexfiltermode].name);
		buildprintf("  Vaild modes are:\n");
		for (m = 0; m < (int)numglfiltermodes; m++)
			buildprintf("     %d - %s\n",m,glfiltermodes[m].name);

		return OSDCMD_OK;
	}

	m = (int)strtol(parm->parms[0], (char **)&p, 10);
	if (p == parm->parms[0]) {
		// string
		for (m = 0; m < (int)numglfiltermodes; m++) {
			if (!Bstrcasecmp(parm->parms[0], glfiltermodes[m].name)) break;
		}
		if (m == numglfiltermodes) m = gltexfiltermode;   // no change
	} else {
		if (m < 0) m = 0;
		else if (m >= (int)numglfiltermodes) m = numglfiltermodes - 1;
	}

	if (m != gltexfiltermode) {
		gltexfiltermode = m;
		gltexapplyprops();
	}

	buildprintf("Texture filtering mode changed to %s\n", glfiltermodes[gltexfiltermode].name );

	return OSDCMD_OK;
}

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
subq $0x10, %rsp
cmpl $0x1, (%rdi)
jne 0x5c8f4
movq %rdi, %rbx
movq 0x10(%rdi), %rax
movq (%rax), %rdi
leaq 0x8(%rsp), %r14
movq %r14, %rsi
movl $0xa, %edx
callq 0x6940
movq 0x10(%rbx), %rcx
movq (%rcx), %rbx
cmpq %rbx, (%r14)
je 0x5c94f
testl %eax, %eax
js 0x5c98a
cmpl $0x5, %eax
movl $0x5, %r14d
cmovll %eax, %r14d
jmp 0x5c98d
movslq 0x47c89(%rip), %rax     # 0xa4584
shlq $0x4, %rax
leaq 0x47c1a(%rip), %r15     # 0xa4520
movq (%rax,%r15), %rsi
leaq 0x1d5aa(%rip), %rdi     # 0x79ebb
xorl %eax, %eax
callq 0x24cb4
leaq 0x1d5ba(%rip), %rdi     # 0x79ed9
xorl %eax, %eax
callq 0x24cb4
leaq 0x1d5c0(%rip), %rbx     # 0x79eed
xorl %r14d, %r14d
movq (%r15), %rdx
movq %rbx, %rdi
movl %r14d, %esi
xorl %eax, %eax
callq 0x24cb4
incq %r14
addq $0x10, %r15
cmpq $0x6, %r14
jne 0x5c930
jmp 0x5c9c6
leaq 0x47bca(%rip), %r15     # 0xa4520
xorl %r14d, %r14d
movq (%r15), %rsi
movq %rbx, %rdi
callq 0x6880
testl %eax, %eax
je 0x5c97b
incq %r14
addq $0x10, %r15
cmpq $0x6, %r14
jne 0x5c959
movl $0x6, %r14d
cmpl $0x6, %r14d
jne 0x5c98d
movl 0x47bfc(%rip), %r14d    # 0xa4584
jmp 0x5c98d
xorl %r14d, %r14d
cmpl 0x47bf0(%rip), %r14d    # 0xa4584
je 0x5c9a2
movl %r14d, 0x47be7(%rip)    # 0xa4584
callq 0x4d6f6
movslq 0x47bdb(%rip), %rax     # 0xa4584
shlq $0x4, %rax
leaq 0x47b6c(%rip), %rcx     # 0xa4520
movq (%rax,%rcx), %rsi
leaq 0x1d53c(%rip), %rdi     # 0x79efb
xorl %eax, %eax
callq 0x24cb4
xorl %eax, %eax
addq $0x10, %rsp
popq %rbx
popq %r14
popq %r15
retq
// File: /workspace/github_c_makefile_star2_O1/jonof[P]jftekwar/jfbuild/src/polymost.c
// Function: osdcmd_gltextureanisotropy
static int osdcmd_gltextureanisotropy(const osdfuncparm_t *parm)
{
	int l;
	const char *p;

	if (parm->numparms != 1) {
		buildprintf("Current texture anisotropy is %d\n", glanisotropy);
		buildprintf("  Maximum is %f\n", glinfo.maxanisotropy);

		return OSDCMD_OK;
	}

	l = (int)strtol(parm->parms[0], (char **)&p, 10);
	if (l < 0 || l > glinfo.maxanisotropy) l = 0;

	if (l != gltexfiltermode) {
		glanisotropy = l;
		gltexapplyprops();
	}

	buildprintf("Texture anisotropy changed to %d\n", glanisotropy );

	return OSDCMD_OK;
}

// Assembly:
pushq %rax
cmpl $0x1, (%rdi)
jne 0x5ca2c
movq 0x10(%rdi), %rax
movq (%rax), %rdi
movq %rsp, %rsi
movl $0xa, %edx
callq 0x6940
testl %eax, %eax
js 0x5ca01
cvtsi2ss %eax, %xmm0
leaq 0x120855(%rip), %rcx    # 0x17d250
ucomiss 0x14(%rcx), %xmm0
jbe 0x5ca03
xorl %eax, %eax
cmpl 0x47b7b(%rip), %eax     # 0xa4584
je 0x5ca16
movl %eax, 0x59cf73(%rip)    # 0x5f9984
callq 0x4d6f6
movl 0x59cf68(%rip), %esi    # 0x5f9984
leaq 0x1d531(%rip), %rdi     # 0x79f54
xorl %eax, %eax
callq 0x24cb4
jmp 0x5ca5a
movl 0x59cf52(%rip), %esi    # 0x5f9984
leaq 0x1d4e8(%rip), %rdi     # 0x79f21
xorl %eax, %eax
callq 0x24cb4
leaq 0x120809(%rip), %rax    # 0x17d250
cvtss2sd 0x14(%rax), %xmm0
leaq 0x1d4f0(%rip), %rdi     # 0x79f43
movb $0x1, %al
callq 0x24cb4
xorl %eax, %eax
popq %rcx
retq
// File: /workspace/github_c_makefile_star2_O1/jonof[P]jftekwar/jfbuild/src/polymost.c
// Function: polymost_load_shader
static GLuint polymost_load_shader(GLuint shadertype, const char *defaultsrc, const char *filename)
{
	const GLchar *shadersrc = defaultsrc;
	GLuint shader = 0;

#ifdef SHADERDEV
	GLchar *fileshadersrc = NULL;
	long shadersrclen = 0;
	BFILE *shaderfh = NULL;

	shaderfh = fopen(filename, "rb");
	if (shaderfh) {
		fseek(shaderfh, 0, SEEK_END);
		shadersrclen = ftell(shaderfh);
		fseek(shaderfh, 0, SEEK_SET);

		fileshadersrc = (GLchar *)malloc(shadersrclen + 1);
		shadersrclen = fread(fileshadersrc, 1, shadersrclen, shaderfh);
		fileshadersrc[shadersrclen] = 0;

		fclose(shaderfh);
		shaderfh = NULL;

		buildprintf("polymost_load_shader: loaded %s (%ld bytes)\n", filename, shadersrclen);
		shadersrc = fileshadersrc;
	}
#endif

	shader = glbuild_compile_shader(shadertype, shadersrc);

#ifdef SHADERDEV
	if (fileshadersrc) {
		free(fileshadersrc);
		fileshadersrc = NULL;
	}
#endif

	return shader;
}

// Assembly:
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
movq %rdx, %r14
movq %rsi, %r15
movl %edi, %ebx
leaq 0x19ba7(%rip), %rsi     # 0x7663f
movq %rdx, %rdi
callq 0x6ce0
testq %rax, %rax
je 0x5cb16
movq %rax, %r12
movq %rax, %rdi
xorl %esi, %esi
movl $0x2, %edx
callq 0x6c70
movq %r12, %rdi
callq 0x6280
movq %rax, %r13
movq %r12, %rdi
xorl %esi, %esi
xorl %edx, %edx
callq 0x6c70
leaq 0x1(%r13), %rdi
callq 0x69a0
movq %rax, %r15
movl $0x1, %esi
movq %rax, %rdi
movq %r13, %rdx
movq %r12, %rcx
callq 0x6550
movq %rax, %r13
movb $0x0, (%r15,%rax)
movq %r12, %rdi
callq 0x6480
leaq 0x1d1b3(%rip), %rdi     # 0x79cb7
movq %r14, %rsi
movq %r13, %rdx
xorl %eax, %eax
callq 0x24cb4
movq %r15, %r14
jmp 0x5cb19
xorl %r14d, %r14d
movl %ebx, %edi
movq %r15, %rsi
callq 0x4cc97
movl %eax, %ebx
testq %r14, %r14
je 0x5cb32
movq %r14, %rdi
callq 0x61c0
movl %ebx, %eax
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
retq
// File: /workspace/github_c_makefile_star2_O1/jonof[P]jftekwar/jfbuild/src/polymost.c
// Function: drawtrap
static void drawtrap (float x0, float x1, float y0, float x2, float x3, float y1,
	struct polymostdrawpolycall *draw)
{
	float px[4], py[4];
	int i, n;
	struct polymostvboitem vboitem[4];

	if (y0 == y1) return;
	px[0] = x0; py[0] = y0;  py[2] = y1;
		  if (x0 == x1) { px[1] = x3; py[1] = y1; px[2] = x2; n = 3; }
	else if (x2 == x3) { px[1] = x1; py[1] = y0; px[2] = x3; n = 3; }
	else               { px[1] = x1; py[1] = y0; px[2] = x3; px[3] = x2; py[3] = y1; n = 4; }

	for(i=0;i<n;i++)
	{
		px[i] = min(max(px[i],trapextx[0]),trapextx[1]);
		vboitem[i].t.s = px[i]*gux + py[i]*guy + guo;
		vboitem[i].t.t = px[i]*gvx + py[i]*gvy + gvo;
		vboitem[i].v.x = px[i];
		vboitem[i].v.y = py[i];
		vboitem[i].v.z = 0.f;
	}
	draw->indexcount = n;
	draw->elementcount = n;
	draw->elementvbo = vboitem;
	polymost_drawpoly_glcall(GL_TRIANGLE_FAN, draw);
	draw->elementvbo = NULL;
}

// Assembly:
ucomiss %xmm5, %xmm2
jne 0x5d753
jp 0x5d753
retq
pushq %rbx
subq $0x70, %rsp
movq %rdi, %rbx
movss %xmm0, (%rsp)
movss %xmm2, 0x10(%rsp)
movss %xmm5, 0x18(%rsp)
ucomiss %xmm1, %xmm0
jne 0x5d78c
jp 0x5d78c
movss %xmm4, 0x4(%rsp)
movss %xmm5, 0x14(%rsp)
movss %xmm3, 0x8(%rsp)
movl $0x3, %eax
jmp 0x5d7bb
ucomiss %xmm4, %xmm3
movss %xmm1, 0x4(%rsp)
movss %xmm2, 0x14(%rsp)
movss %xmm4, 0x8(%rsp)
movl $0x3, %eax
jne 0x5d7aa
jnp 0x5d7bb
movss %xmm3, 0xc(%rsp)
movss %xmm5, 0x1c(%rsp)
movl $0x4, %eax
movss 0x5d8455(%rip), %xmm0   # 0x635c18
movss 0x5d8451(%rip), %xmm1   # 0x635c1c
movsd 0x59c395(%rip), %xmm2   # 0x5f9b68
movsd 0x59c395(%rip), %xmm3   # 0x5f9b70
movsd 0x59c395(%rip), %xmm4   # 0x5f9b78
movsd 0x59c395(%rip), %xmm5   # 0x5f9b80
movsd 0x59c395(%rip), %xmm6   # 0x5f9b88
movsd 0x59c395(%rip), %xmm7   # 0x5f9b90
movl %eax, %ecx
leaq 0x30(%rsp), %rdx
xorl %esi, %esi
movss (%rsp,%rsi,4), %xmm8
maxss %xmm0, %xmm8
minss %xmm1, %xmm8
movss %xmm8, (%rsp,%rsi,4)
xorps %xmm9, %xmm9
cvtss2sd %xmm8, %xmm9
movss 0x10(%rsp,%rsi,4), %xmm10
xorps %xmm11, %xmm11
cvtss2sd %xmm10, %xmm11
movapd %xmm3, %xmm12
mulsd %xmm11, %xmm12
movaps %xmm9, %xmm13
mulsd %xmm2, %xmm13
addsd %xmm12, %xmm13
addsd %xmm4, %xmm13
xorps %xmm12, %xmm12
cvtsd2ss %xmm13, %xmm12
mulsd %xmm6, %xmm11
mulsd %xmm5, %xmm9
addsd %xmm11, %xmm9
addsd %xmm7, %xmm9
cvtsd2ss %xmm9, %xmm9
movss %xmm12, -0x4(%rdx)
movss %xmm9, (%rdx)
movss %xmm8, -0x10(%rdx)
movss %xmm10, -0xc(%rdx)
movl $0x0, -0x8(%rdx)
incq %rsi
addq $0x14, %rdx
cmpq %rsi, %rcx
jne 0x5d804
movl %eax, 0x44(%rbx)
movl %eax, 0x4c(%rbx)
leaq 0x20(%rsp), %rax
movq %rax, 0x50(%rbx)
movl $0x6, %edi
movq %rbx, %rsi
callq 0x4e5ea
movq $0x0, 0x50(%rbx)
addq $0x70, %rsp
popq %rbx
retq
nop
// File: /workspace/github_c_makefile_star2_O1/jonof[P]jftekwar/jfbuild/src/hightile.c
// Function: hicfindsubst
hicreplctyp * hicfindsubst(int picnum, int palnum, int skybox)
{
	hicreplctyp *hr;

	if (!hicfirstinit) return NULL;
	if ((unsigned int)picnum >= (unsigned int)MAXTILES) return NULL;

	do {
		for (hr = hicreplc[picnum]; hr; hr = hr->next) {
			if (hr->palnum == palnum) {
				if (skybox) {
					if (hr->skybox && !hr->skybox->ignore) return hr;
				} else {
					if (!hr->ignore) return hr;
				}
			}
		}

		if (palnum == 0) break;
		palnum = 0;
	} while (1);

	return NULL;	// no replacement found
}

// Assembly:
xorl %eax, %eax
cmpl $0x23ff, %edi           # imm = 0x23FF
ja 0x5d92a
cmpl $0x0, 0x5d8343(%rip)    # 0x635c20
je 0x5d92a
movl %edi, %eax
leaq 0x5d8348(%rip), %rcx    # 0x635c30
movq (%rcx,%rax,8), %rcx
testq %rcx, %rcx
je 0x5d91f
movq %rcx, %rax
movzbl 0x8(%rax), %edi
cmpl %edi, %esi
jne 0x5d917
testl %edx, %edx
je 0x5d911
movq 0x20(%rax), %rdi
testq %rdi, %rdi
je 0x5d917
cmpq $0x0, (%rdi)
jne 0x5d917
jmp 0x5d92a
cmpb $0x0, 0x9(%rax)
je 0x5d92a
movq (%rax), %rax
testq %rax, %rax
jne 0x5d8f4
xorl %eax, %eax
testl %esi, %esi
movl $0x0, %esi
jne 0x5d8ec
retq
// File: /workspace/github_c_makefile_star2_O1/jonof[P]jftekwar/jfbuild/src/hightile.c
// Function: hicinit
void hicinit(void)
{
	int i,j;
	hicreplctyp *hr, *next;

	for (i=0;i<MAXPALOOKUPS;i++) {	// all tints should be 100%
		hictinting[i].r = hictinting[i].g = hictinting[i].b = 0xff;
		hictinting[i].f = 0;
	}

	if (hicfirstinit) {
		for (i=MAXTILES-1;i>=0;i--) {
			for (hr=hicreplc[i]; hr; ) {
				next = hr->next;

				if (hr->skybox) {
					for (j=5;j>=0;j--) {
						if (hr->skybox->face[j]) {
							free(hr->skybox->face[j]);
						}
					}
					free(hr->skybox);
				}
				if (hr->filename) free(hr->filename);
				free(hr);

				hr = next;
			}
		}
	}
	memset(hicreplc,0,sizeof(hicreplc));

	hicfirstinit = 1;
}

// Assembly:
xorl %eax, %eax
leaq 0x5ea2fc(%rip), %rcx    # 0x647c30
movl $0xffffff, (%rcx,%rax,4) # imm = 0xFFFFFF
incq %rax
cmpq $0x100, %rax            # imm = 0x100
jne 0x5d934
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
cmpl $0x0, 0x5d82ca(%rip)    # 0x635c20
je 0x5d9c3
movl $0x23ff, %r14d          # imm = 0x23FF
leaq 0x5d82cb(%rip), %r15    # 0x635c30
movq (%r15,%r14,8), %rbx
testq %rbx, %rbx
je 0x5d9bd
movq (%rbx), %r12
cmpq $0x0, 0x20(%rbx)
je 0x5d99f
movl $0x30, %r13d
movq 0x20(%rbx), %rax
movq (%rax,%r13), %rdi
testq %rdi, %rdi
je 0x5d990
callq 0x61c0
addq $-0x8, %r13
jne 0x5d97e
movq 0x20(%rbx), %rdi
callq 0x61c0
movq 0x10(%rbx), %rdi
testq %rdi, %rdi
je 0x5d9ad
callq 0x61c0
movq %rbx, %rdi
callq 0x61c0
movq %r12, %rbx
testq %r12, %r12
jne 0x5d96e
subq $0x1, %r14
jae 0x5d965
leaq 0x5d8266(%rip), %rdi    # 0x635c30
movl $0x12000, %edx          # imm = 0x12000
xorl %esi, %esi
callq 0x62f0
movl $0x1, 0x5d8240(%rip)    # 0x635c20
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
retq
// File: /workspace/github_c_makefile_star2_O1/jonof[P]jftekwar/jfbuild/src/hightile.c
// Function: hicsetpalettetint
void hicsetpalettetint(int palnum, unsigned char r, unsigned char g, unsigned char b, unsigned char effect)
{
	if ((unsigned int)palnum >= (unsigned int)MAXPALOOKUPS) return;
	if (!hicfirstinit) hicinit();

	hictinting[palnum].r = r;
	hictinting[palnum].g = g;
	hictinting[palnum].b = b;
	hictinting[palnum].f = effect & HICEFFECTMASK;
}

// Assembly:
cmpl $0xff, %edi
ja 0x5da3d
pushq %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
movl %r8d, %ebx
movl %ecx, %ebp
movl %edx, %r14d
movl %esi, %r15d
movl %edi, %r12d
cmpl $0x0, 0x5d8211(%rip)    # 0x635c20
jne 0x5da16
callq 0x5d92b
movl %r12d, %eax
leaq 0x5ea210(%rip), %rcx    # 0x647c30
movb %r15b, (%rcx,%rax,4)
movb %r14b, 0x1(%rcx,%rax,4)
movb %bpl, 0x2(%rcx,%rax,4)
andb $0x3, %bl
movb %bl, 0x3(%rcx,%rax,4)
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O1/jonof[P]jftekwar/jfbuild/src/hightile.c
// Function: hicsetsubsttex
int hicsetsubsttex(int picnum, int palnum, char *filen, float alphacut, unsigned char flags)
{
	hicreplctyp *hr, *hrn;

	if ((unsigned int)picnum >= (unsigned int)MAXTILES) return -1;
	if ((unsigned int)palnum >= (unsigned int)MAXPALOOKUPS) return -1;
	if (!hicfirstinit) hicinit();

	for (hr = hicreplc[picnum]; hr; hr = hr->next) {
		if (hr->palnum == palnum)
			break;
	}

	if (!hr) {
		// no replacement yet defined
		hrn = (hicreplctyp *)calloc(1,sizeof(hicreplctyp));
		if (!hrn) return -1;
		hrn->palnum = palnum;
	} else hrn = hr;

	// store into hicreplc the details for this replacement
	if (hrn->filename) free(hrn->filename);

	hrn->filename = strdup(filen);
	if (!hrn->filename) {
		if (hrn->skybox) return -1;	// don't free the base structure if there's a skybox defined
		if (hr == NULL) free(hrn);	// not yet a link in the chain
		return -1;
	}
	hrn->ignore = 0;
	hrn->alphacut = min(alphacut,1.0);
	hrn->flags = flags;
	if (hr == NULL) {
		hrn->next = hicreplc[picnum];
		hicreplc[picnum] = hrn;
	}

	//printf("Replacement [%d,%d]: %s\n", picnum, palnum, hicreplc[i]->filename);

	return 0;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movss %xmm0, 0x4(%rsp)
movq %rdx, %r14
cmpl $0x2400, %edi           # imm = 0x2400
setae %al
cmpl $0x100, %esi            # imm = 0x100
setae %dl
orb %al, %dl
movl $0xffffffff, %ebx       # imm = 0xFFFFFFFF
jne 0x5db2d
movl %esi, %r12d
movl %edi, %r15d
movl %ecx, (%rsp)
cmpl $0x0, 0x5d819f(%rip)    # 0x635c20
jne 0x5da88
callq 0x5d92b
movl %r15d, %eax
leaq 0x5d819e(%rip), %rcx    # 0x635c30
leaq (%rcx,%rax,8), %rbp
movq %rbp, %r13
movq (%r13), %r13
testq %r13, %r13
je 0x5dab1
movzbl 0x8(%r13), %eax
cmpl %r12d, %eax
jne 0x5da99
movq %r13, %r15
jmp 0x5dacc
movl $0x1, %edi
movl $0x28, %esi
callq 0x6930
testq %rax, %rax
je 0x5db2d
movq %rax, %r15
movb %r12b, 0x8(%rax)
movq 0x10(%r15), %rdi
testq %rdi, %rdi
je 0x5dada
callq 0x61c0
movq %r14, %rdi
callq 0x6060
movq %rax, 0x10(%r15)
testq %rax, %rax
je 0x5db1f
xorl %ebx, %ebx
movss 0x4(%rsp), %xmm0
minss 0x18499(%rip), %xmm0    # 0x75f94
movb $0x0, 0x9(%r15)
movss %xmm0, 0x18(%r15)
movl (%rsp), %eax
movb %al, 0xa(%r15)
testq %r13, %r13
jne 0x5db2d
movq (%rbp), %rax
movq %rax, (%r15)
movq %r15, (%rbp)
jmp 0x5db2d
orq 0x20(%r15), %r13
jne 0x5db2d
movq %r15, %rdi
callq 0x61c0
movl %ebx, %eax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O1/jonof[P]jftekwar/jfbuild/src/hightile.c
// Function: hicclearsubst
int hicclearsubst(int picnum, int palnum)
{
	hicreplctyp *hr, *hrn = NULL;

	if ((unsigned int)picnum >= (unsigned int)MAXTILES) return -1;
	if ((unsigned int)palnum >= (unsigned int)MAXPALOOKUPS) return -1;
	if (!hicfirstinit) return 0;

	for (hr = hicreplc[picnum]; hr; hrn = hr, hr = hr->next) {
		if (hr->palnum == palnum)
			break;
	}

	if (!hr) return 0;

	if (hr->filename) free(hr->filename);
	if (hr->skybox) {
		int i;
		for (i=5;i>=0;i--)
			if (hr->skybox->face[i])
				free(hr->skybox->face[i]);
		free(hr->skybox);
	}

	if (hrn) hrn->next = hr->next;
	else hicreplc[picnum] = hr->next;
	free(hr);

	return 0;
}

// Assembly:
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
cmpl $0x2400, %edi           # imm = 0x2400
setae %al
cmpl $0x100, %esi            # imm = 0x100
setae %cl
orb %al, %cl
movl $0xffffffff, %ebx       # imm = 0xFFFFFFFF
jne 0x5dd6d
cmpl $0x0, 0x5d7f35(%rip)    # 0x635c20
je 0x5dd6b
movl %edi, %eax
leaq 0x5d7f3a(%rip), %rcx    # 0x635c30
leaq (%rcx,%rax,8), %r15
xorl %ebx, %ebx
movq %r15, %r14
xorl %eax, %eax
movq (%r14), %r14
testq %r14, %r14
je 0x5dd6d
movq %rax, %r12
movzbl 0x8(%r14), %ecx
movq %r14, %rax
cmpl %esi, %ecx
jne 0x5dd01
movq 0x10(%r14), %rdi
testq %rdi, %rdi
je 0x5dd26
callq 0x61c0
cmpq $0x0, 0x20(%r14)
je 0x5dd54
movl $0x30, %r13d
movq 0x20(%r14), %rax
movq (%rax,%r13), %rdi
testq %rdi, %rdi
je 0x5dd45
callq 0x61c0
addq $-0x8, %r13
jne 0x5dd33
movq 0x20(%r14), %rdi
callq 0x61c0
testq %r12, %r12
movq (%r14), %rax
cmovneq %r12, %r15
movq %rax, (%r15)
movq %r14, %rdi
callq 0x61c0
jmp 0x5dd6d
xorl %ebx, %ebx
movl %ebx, %eax
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
retq
nopl (%rax)
// File: /workspace/github_c_makefile_star2_O1/jonof[P]jftekwar/jfbuild/src/mdsprite.c
// Function: freeallmodels
void freeallmodels (void)
{
	int i;

	if (models)
	{
		for(i=0;i<nextmodelid;i++) mdfree(models[i]);
		free(models); models = NULL;
		nummodelsalloced = 0;
		nextmodelid = 0;
	}

	memset(tile2model,-1,sizeof(tile2model));

	if (vertlist)
	{
		free(vertlist);
		vertlist = NULL;
		allocmodelverts = maxmodelverts = 0;
	}
	if (elementvbo) {
		free(elementvbo);
		elementvbo = NULL;
		allocelementvbo = maxelementvbo = 0;
	}

}

// Assembly:
pushq %rbx
cmpq $0x0, 0x5ea2b3(%rip)    # 0x648038
je 0x5ddd6
cmpl $0x0, 0x5ea2a6(%rip)    # 0x648034
jle 0x5ddb1
xorl %ebx, %ebx
movq 0x5ea29f(%rip), %rax    # 0x648038
movq (%rax,%rbx,8), %rdi
callq 0x5de42
incq %rbx
movslq 0x5ea288(%rip), %rax    # 0x648034
cmpq %rax, %rbx
jl 0x5dd92
movq 0x5ea280(%rip), %rdi    # 0x648038
callq 0x61c0
movq $0x0, 0x5ea270(%rip) # 0x648038
xorl %eax, %eax
movl %eax, 0x5ea270(%rip)    # 0x648040
movl %eax, 0x5ea25e(%rip)    # 0x648034
leaq 0x5ea273(%rip), %rdi    # 0x648050
movl $0x1b000, %edx          # imm = 0x1B000
movl $0xff, %esi
callq 0x62f0
movq 0x60525d(%rip), %rdi    # 0x663050
testq %rdi, %rdi
je 0x5de16
callq 0x61c0
movq $0x0, 0x605248(%rip) # 0x663050
xorl %eax, %eax
movl %eax, 0x605248(%rip)    # 0x663058
movl %eax, 0x605246(%rip)    # 0x66305c
movq 0x605243(%rip), %rdi    # 0x663060
testq %rdi, %rdi
je 0x5de40
callq 0x61c0
movq $0x0, 0x60522e(%rip) # 0x663060
xorl %eax, %eax
movl %eax, 0x60522e(%rip)    # 0x663068
movl %eax, 0x60522c(%rip)    # 0x66306c
popq %rbx
retq
// File: /workspace/github_c_makefile_star2_O1/jonof[P]jftekwar/jfbuild/src/mdsprite.c
// Function: md_loadmodel
int md_loadmodel (const char *fn)
{
	mdmodel *vm, **ml;

	if (!mdinited) mdinit();

	if (nextmodelid >= nummodelsalloced)
	{
		ml = (mdmodel **)realloc(models,(nummodelsalloced+MODELALLOCGROUP)*sizeof(mdmodel*)); if (!ml) return(-1);
		models = ml; nummodelsalloced += MODELALLOCGROUP;
	}

	vm = mdload(fn); if (!vm) return(-1);
	models[nextmodelid++] = vm;
	return(nextmodelid-1);
}

// Assembly:
pushq %r14
pushq %rbx
pushq %rax
movq %rdi, %rbx
cmpb $0x0, 0x5e9fa2(%rip)    # 0x648030
jne 0x5e0af
leaq 0x60cfd9(%rip), %rdi    # 0x66b070
movl $0x48000, %edx          # imm = 0x48000
xorl %esi, %esi
callq 0x62f0
callq 0x5dd7c
movb $0x1, 0x5e9f81(%rip)    # 0x648030
movslq 0x5e9f8a(%rip), %r14    # 0x648040
cmpl %r14d, 0x5e9f77(%rip)   # 0x648034
jl 0x5e0ed
movq 0x5e9f72(%rip), %rdi    # 0x648038
leaq 0x800(,%r14,8), %rsi
callq 0x6120
testq %rax, %rax
je 0x5e11a
addq $0x100, %r14            # imm = 0x100
movq %rax, 0x5e9f52(%rip)    # 0x648038
movl %r14d, 0x5e9f53(%rip)   # 0x648040
movq %rbx, %rdi
callq 0x5e127
testq %rax, %rax
je 0x5e11a
movq %rax, %rcx
movq 0x5e9f34(%rip), %rdx    # 0x648038
movslq 0x5e9f29(%rip), %rax    # 0x648034
leal 0x1(%rax), %esi
movl %esi, 0x5e9f20(%rip)    # 0x648034
movq %rcx, (%rdx,%rax,8)
jmp 0x5e11f
movl $0xffffffff, %eax       # imm = 0xFFFFFFFF
addq $0x8, %rsp
popq %rbx
popq %r14
retq
// File: /workspace/github_c_makefile_star2_O1/jonof[P]jftekwar/jfbuild/src/mdsprite.c
// Function: md_setmisc
int md_setmisc (int modelid, float scale, int shadeoff, float zadd)
{
	mdmodel *m;

	if (!mdinited) mdinit();

	if ((unsigned int)modelid >= (unsigned int)nextmodelid) return -1;
	m = models[modelid];
	m->bscale = scale;
	m->shadeoff = shadeoff;
	m->zadd = zadd;

	return 0;
}

// Assembly:
pushq %rbp
pushq %rbx
pushq %rax
movl %esi, %ebx
movl %edi, %ebp
cmpb $0x0, 0x5e97bc(%rip)    # 0x648030
jne 0x5e8ab
leaq 0x60c7f3(%rip), %rdi    # 0x66b070
movl $0x48000, %edx          # imm = 0x48000
xorl %esi, %esi
movss %xmm1, 0x4(%rsp)
movss %xmm0, (%rsp)
callq 0x62f0
callq 0x5dd7c
movss (%rsp), %xmm0
movss 0x4(%rsp), %xmm1
movb $0x1, 0x5e9785(%rip)    # 0x648030
movl $0xffffffff, %eax       # imm = 0xFFFFFFFF
cmpl %ebp, 0x5e977e(%rip)    # 0x648034
jbe 0x5e8d5
movq 0x5e9779(%rip), %rax    # 0x648038
movslq %ebp, %rcx
movq (%rax,%rcx,8), %rax
movss %xmm0, 0xc(%rax)
movl %ebx, 0x4(%rax)
movss %xmm1, 0x10(%rax)
xorl %eax, %eax
addq $0x8, %rsp
popq %rbx
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O1/jonof[P]jftekwar/jfbuild/src/mdsprite.c
// Function: md_defineframe
int md_defineframe (int modelid, const char *framename, int tilenume, int skinnum)
{
	md2model *m;
	int i;

	if (!mdinited) mdinit();

	if ((unsigned int)modelid >= (unsigned int)nextmodelid) return(-1);
	if ((unsigned int)tilenume >= (unsigned int)MAXTILES) return(-2);
	if (!framename) return(-3);

	m = (md2model *)models[modelid];
	if (m->mdnum == 1) {
		tile2model[tilenume].modelid = modelid;
		tile2model[tilenume].framenum = tile2model[tilenume].skinnum = 0;
		return 0;
	}

	i = framename2index((mdmodel*)m,framename);
	if (i == m->numframes) return(-3);   // frame name invalid

	tile2model[tilenume].modelid = modelid;
	tile2model[tilenume].framenum = i;
	tile2model[tilenume].skinnum = skinnum;

	return 0;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movl %ecx, %ebp
movl %edx, %r14d
movq %rsi, %r15
movl %edi, %ebx
cmpb $0x0, 0x5e9717(%rip)    # 0x648030
jne 0x5e93a
leaq 0x60c74e(%rip), %rdi    # 0x66b070
movl $0x48000, %edx          # imm = 0x48000
xorl %esi, %esi
callq 0x62f0
callq 0x5dd7c
movb $0x1, 0x5e96f6(%rip)    # 0x648030
movl $0xffffffff, %r12d      # imm = 0xFFFFFFFF
cmpl %ebx, 0x5e96ee(%rip)    # 0x648034
jbe 0x5e9c2
movl $0xfffffffe, %r12d      # imm = 0xFFFFFFFE
cmpl $0x23ff, %r14d          # imm = 0x23FF
ja 0x5e9c2
movl $0xfffffffd, %r12d      # imm = 0xFFFFFFFD
testq %r15, %r15
je 0x5e9c2
movq 0x5e96cf(%rip), %rax    # 0x648038
movslq %ebx, %rcx
movq (%rax,%rcx,8), %r13
xorl %eax, %eax
cmpl $0x1, (%r13)
jne 0x5e987
movl $0x8, %ecx
movl $0x4, %edx
xorl %ebp, %ebp
jmp 0x5e9a2
movq %r13, %rdi
movq %r15, %rsi
callq 0x5e9d4
cmpl 0x20(%r13), %eax
je 0x5e9c2
movl $0x4, %ecx
movl $0x8, %edx
movl %r14d, %esi
leaq (%rsi,%rsi,2), %rsi
leaq 0x5e96a0(%rip), %rdi    # 0x648050
leaq (%rdi,%rsi,4), %r8
movl %ebx, (%rdi,%rsi,4)
movl %eax, (%rdx,%r8)
movl %ebp, (%rcx,%r8)
xorl %r12d, %r12d
movl %r12d, %eax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O1/jonof[P]jftekwar/jfbuild/src/mdsprite.c
// Function: framename2index
static int framename2index (mdmodel *vm, const char *nam)
{
	int i = 0;

	switch(vm->mdnum)
	{
		case 2:
			{
			md2model *m = (md2model *)vm;
			md2frame_t *fr;
			for(i=0;i<m->numframes;i++)
			{
				fr = (md2frame_t *)&m->frames[i*m->framebytes];
				if (!Bstrcmp(fr->name, nam)) break;
			}
			}
			break;
		case 3:
			{
			md3model *m = (md3model *)vm;
			for(i=0;i<m->numframes;i++)
				if (!Bstrcmp(m->head.frames[i].nam,nam)) break;
			}
			break;
	}
	return(i);
}

// Assembly:
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
movq %rsi, %r14
movl (%rdi), %eax
xorl %ebx, %ebx
cmpl $0x2, %eax
je 0x5ea21
cmpl $0x3, %eax
jne 0x5ea55
movl 0x20(%rdi), %r12d
testl %r12d, %r12d
jle 0x5ea55
movq 0xb8(%rdi), %r15
addq $0x28, %r15
xorl %ebx, %ebx
movq %r15, %rdi
movq %r14, %rsi
callq 0x68d0
testl %eax, %eax
je 0x5ea55
incq %rbx
addq $0x38, %r15
cmpq %rbx, %r12
jne 0x5ea04
jmp 0x5ea52
movl 0x20(%rdi), %r12d
testl %r12d, %r12d
jle 0x5ea55
movq 0x70(%rdi), %r15
movslq 0x64(%rdi), %r13
addq $0x18, %r15
xorl %ebx, %ebx
movq %r15, %rdi
movq %r14, %rsi
callq 0x68d0
testl %eax, %eax
je 0x5ea55
incq %rbx
addq %r13, %r15
cmpq %rbx, %r12
jne 0x5ea38
movl %r12d, %ebx
movl %ebx, %eax
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
retq
// File: /workspace/github_c_makefile_star2_O1/jonof[P]jftekwar/jfbuild/src/mdsprite.c
// Function: md_defineanimation
int md_defineanimation (int modelid, const char *framestart, const char *frameend, int fpssc, int flags)
{
	md2model *m;
	mdanim_t ma, *map;
	int i;

	if (!mdinited) mdinit();

	if ((unsigned int)modelid >= (unsigned int)nextmodelid) return(-1);

	memset(&ma, 0, sizeof(ma));
	m = (md2model *)models[modelid];
	if (m->mdnum < 2) return 0;

		//find index of start frame
	i = framename2index((mdmodel*)m,framestart);
	if (i == m->numframes) return -2;
	ma.startframe = i;

		//find index of finish frame which must trail start frame
	i = framename2index((mdmodel*)m,frameend);
	if (i == m->numframes) return -3;
	ma.endframe = i;

	ma.fpssc = fpssc;
	ma.flags = flags;

	map = (mdanim_t*)calloc(1,sizeof(mdanim_t));
	if (!map) return(-4);
	memcpy(map, &ma, sizeof(ma));

	map->next = m->animations;
	m->animations = map;

	return(0);
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movl %r8d, %ebx
movl %ecx, %ebp
movq %rdx, %r15
movq %rsi, %r12
movl %edi, %r14d
cmpb $0x0, 0x5e95af(%rip)    # 0x648030
jne 0x5eaa2
leaq 0x60c5e6(%rip), %rdi    # 0x66b070
movl $0x48000, %edx          # imm = 0x48000
xorl %esi, %esi
callq 0x62f0
callq 0x5dd7c
movb $0x1, 0x5e958e(%rip)    # 0x648030
movl $0xffffffff, %eax       # imm = 0xFFFFFFFF
cmpl %r14d, 0x5e9586(%rip)   # 0x648034
jbe 0x5eb3c
movq 0x5e957d(%rip), %rax    # 0x648038
movslq %r14d, %rcx
movq (%rax,%rcx,8), %r14
xorl %eax, %eax
cmpl $0x2, (%r14)
jl 0x5eb3c
movq %r14, %rdi
movq %r12, %rsi
callq 0x5e9d4
movl %eax, %r12d
movl 0x20(%r14), %r13d
movl $0xfffffffe, %eax       # imm = 0xFFFFFFFE
cmpl %r13d, %r12d
je 0x5eb3c
movq %r14, %rdi
movq %r15, %rsi
callq 0x5e9d4
movl %eax, %r15d
movl $0xfffffffd, %eax       # imm = 0xFFFFFFFD
cmpl %r13d, %r15d
je 0x5eb3c
movl $0x1, %edi
movl $0x18, %esi
callq 0x6930
testq %rax, %rax
je 0x5eb37
movl %r12d, (%rax)
movl %r15d, 0x4(%rax)
movl %ebp, 0x8(%rax)
movl %ebx, 0xc(%rax)
movq $0x0, 0x10(%rax)
movq 0x40(%r14), %rcx
movq %rcx, 0x10(%rax)
movq %rax, 0x40(%r14)
xorl %eax, %eax
jmp 0x5eb3c
movl $0xfffffffc, %eax       # imm = 0xFFFFFFFC
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O1/jonof[P]jftekwar/jfbuild/src/mdsprite.c
// Function: md_defineskin
int md_defineskin (int modelid, const char *skinfn, int palnum, int skinnum, int surfnum)
{
	mdskinmap_t *sk, *skl;
	md2model *m;

	if (!mdinited) mdinit();

	if ((unsigned int)modelid >= (unsigned int)nextmodelid) return -1;
	if (!skinfn) return -2;
	if ((unsigned)palnum >= (unsigned)MAXPALOOKUPS) return -3;

	m = (md2model *)models[modelid];
	if (m->mdnum < 2) return 0;
	if (m->mdnum == 2) surfnum = 0;

	skl = NULL;
	for (sk = m->skinmap; sk; skl = sk, sk = sk->next)
		if (sk->palette == (unsigned char)palnum && skinnum == sk->skinnum && surfnum == sk->surfnum) break;
	if (!sk) {
		sk = (mdskinmap_t *)calloc(1,sizeof(mdskinmap_t));
		if (!sk) return -4;

		if (!skl) m->skinmap = sk;
		else skl->next = sk;
	} else if (sk->fn) free(sk->fn);

	sk->palette = (unsigned char)palnum;
	sk->skinnum = skinnum;
	sk->surfnum = surfnum;
	sk->fn = (char *)malloc(strlen(skinfn)+1);
	if (!sk->fn) return(-4);
	strcpy(sk->fn, skinfn);

	return 0;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movl %r8d, %ebp
movl %ecx, %r14d
movl %edx, %r15d
movq %rsi, %rbx
movl %edi, %r12d
cmpb $0x0, 0x5e94c4(%rip)    # 0x648030
jne 0x5eb8d
leaq 0x60c4fb(%rip), %rdi    # 0x66b070
movl $0x48000, %edx          # imm = 0x48000
xorl %esi, %esi
callq 0x62f0
callq 0x5dd7c
movb $0x1, 0x5e94a3(%rip)    # 0x648030
movl $0xffffffff, %eax       # imm = 0xFFFFFFFF
cmpl %r12d, 0x5e949b(%rip)   # 0x648034
jbe 0x5ebfd
testq %rbx, %rbx
je 0x5ebf8
movl $0xfffffffd, %eax       # imm = 0xFFFFFFFD
cmpl $0xff, %r15d
ja 0x5ebfd
movq 0x5e9483(%rip), %rax    # 0x648038
movslq %r12d, %rcx
movq (%rax,%rcx,8), %rdx
movl (%rdx), %ecx
xorl %eax, %eax
cmpl $0x2, %ecx
jl 0x5ebfd
xorl %r12d, %r12d
cmpl $0x2, %ecx
cmovel %r12d, %ebp
movq 0x48(%rdx), %rax
testq %rax, %rax
je 0x5ec0c
movq %rax, %r12
movzbl (%rax), %eax
cmpl %r15d, %eax
jne 0x5ebf1
cmpl %r14d, 0x4(%r12)
jne 0x5ebf1
cmpl 0x8(%r12), %ebp
je 0x5ec3d
movq 0x38(%r12), %rax
jmp 0x5ebd3
movl $0xfffffffe, %eax       # imm = 0xFFFFFFFE
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movq %rdx, (%rsp)
movl $0x1, %edi
movl $0x40, %esi
callq 0x6930
testq %rax, %rax
je 0x5ec87
movq %rax, %r13
testq %r12, %r12
je 0x5ec33
movq %r13, 0x38(%r12)
jmp 0x5ec4f
movq (%rsp), %rax
movq %r13, 0x48(%rax)
jmp 0x5ec4f
movq 0x10(%r12), %rdi
testq %rdi, %rdi
je 0x5ec4c
callq 0x61c0
movq %r12, %r13
movb %r15b, (%r13)
movl %r14d, 0x4(%r13)
movl %ebp, 0x8(%r13)
movq %rbx, %rdi
callq 0x6420
leaq 0x1(%rax), %rdi
callq 0x69a0
movq %rax, 0x10(%r13)
testq %rax, %rax
je 0x5ec87
movq %rax, %rdi
movq %rbx, %rsi
callq 0x6430
xorl %eax, %eax
jmp 0x5ebfd
movl $0xfffffffc, %eax       # imm = 0xFFFFFFFC
jmp 0x5ebfd
// File: /workspace/github_c_makefile_star2_O1/jonof[P]jftekwar/jfbuild/src/mdsprite.c
// Function: md_definehud
int md_definehud (int modelid, int tilex, double xadd, double yadd, double zadd, double angadd, int flags)
{
	if (!mdinited) mdinit();

	if ((unsigned int)modelid >= (unsigned int)nextmodelid) return -1;
	if ((unsigned int)tilex >= (unsigned int)MAXTILES) return -2;

	hudmem[(flags>>2)&1][tilex].xadd = xadd;
	hudmem[(flags>>2)&1][tilex].yadd = yadd;
	hudmem[(flags>>2)&1][tilex].zadd = zadd;
	hudmem[(flags>>2)&1][tilex].angadd = ((short)angadd)|2048;
	hudmem[(flags>>2)&1][tilex].flags = (short)flags;

	return 0;
}

// Assembly:
pushq %rbp
pushq %r14
pushq %rbx
subq $0x20, %rsp
movl %edx, %ebx
movl %esi, %ebp
movl %edi, %r14d
cmpb $0x0, 0x5e9389(%rip)    # 0x648030
jne 0x5ecf6
leaq 0x60c3c0(%rip), %rdi    # 0x66b070
movl $0x48000, %edx          # imm = 0x48000
xorl %esi, %esi
movsd %xmm3, 0x18(%rsp)
movsd %xmm2, 0x10(%rsp)
movsd %xmm1, 0x8(%rsp)
movsd %xmm0, (%rsp)
callq 0x62f0
callq 0x5dd7c
movsd (%rsp), %xmm0
movsd 0x8(%rsp), %xmm1
movsd 0x10(%rsp), %xmm2
movsd 0x18(%rsp), %xmm3
movb $0x1, 0x5e933a(%rip)    # 0x648030
movl $0xffffffff, %eax       # imm = 0xFFFFFFFF
cmpl %r14d, 0x5e9332(%rip)   # 0x648034
jbe 0x5ed68
movl $0xfffffffe, %eax       # imm = 0xFFFFFFFE
cmpl $0x23ff, %ebp           # imm = 0x23FF
ja 0x5ed68
cvtsd2ss %xmm0, %xmm0
movl %ebx, %eax
shrl $0x2, %eax
andl $0x1, %eax
movl %ebp, %ecx
leaq (%rax,%rax,8), %rax
shll $0xe, %eax
leaq 0x60c343(%rip), %rdx    # 0x66b070
addq %rax, %rdx
shlq $0x4, %rcx
movss %xmm0, (%rcx,%rdx)
xorps %xmm0, %xmm0
cvtsd2ss %xmm1, %xmm0
xorps %xmm1, %xmm1
cvtsd2ss %xmm2, %xmm1
movss %xmm0, 0x4(%rcx,%rdx)
movss %xmm1, 0x8(%rcx,%rdx)
cvttsd2si %xmm3, %eax
orl $0x800, %eax            # imm = 0x800
movw %ax, 0xc(%rcx,%rdx)
movw %bx, 0xe(%rcx,%rdx)
xorl %eax, %eax
addq $0x20, %rsp
popq %rbx
popq %r14
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O1/jonof[P]jftekwar/jfbuild/src/mdsprite.c
// Function: md_undefinemodel
int md_undefinemodel(int modelid)
{
	int i;
	if (!mdinited) return 0;
	if ((unsigned int)modelid >= (unsigned int)nextmodelid) return -1;

	for (i=MAXTILES-1; i>=0; i--)
		if (tile2model[i].modelid == modelid)
			tile2model[i].modelid = -1;

	if (models) {
		mdfree(models[modelid]);
		models[modelid] = NULL;
	}

	return 0;
}

// Assembly:
cmpb $0x0, 0x5e9289(%rip)    # 0x648030
je 0x5ee04
movl $0xffffffff, %eax       # imm = 0xFFFFFFFF
cmpl %edi, 0x5e9280(%rip)    # 0x648034
jbe 0x5ee03
movl $0x1aff4, %eax          # imm = 0x1AFF4
leaq 0x5e928e(%rip), %rcx    # 0x648050
cmpl %edi, (%rax,%rcx)
jne 0x5edce
movl $0xffffffff, (%rax,%rcx) # imm = 0xFFFFFFFF
addq $-0xc, %rax
cmpq $-0xc, %rax
jne 0x5edc2
movq 0x5e9259(%rip), %rax    # 0x648038
testq %rax, %rax
je 0x5ee04
pushq %rbx
movslq %edi, %rbx
movq (%rax,%rbx,8), %rdi
callq 0x5de42
movq 0x5e9240(%rip), %rax    # 0x648038
movq $0x0, (%rax,%rbx,8)
xorl %eax, %eax
popq %rbx
retq
xorl %eax, %eax
retq
// File: /workspace/github_c_makefile_star2_O1/jonof[P]jftekwar/jfbuild/src/mdsprite.c
// Function: voxfree
void voxfree (voxmodel *m)
{
	if (!m) return;
	if (m->mytex) free(m->mytex);
	if (m->quad) free(m->quad);
	if (m->texid) free(m->texid);
	free(m);
}

// Assembly:
testq %rdi, %rdi
je 0x5f482
pushq %rbx
movq %rdi, %rbx
movq 0x48(%rdi), %rdi
testq %rdi, %rdi
je 0x5f45d
callq 0x61c0
movq 0x20(%rbx), %rdi
testq %rdi, %rdi
je 0x5f46b
callq 0x61c0
movq 0x18(%rbx), %rdi
testq %rdi, %rdi
je 0x5f479
callq 0x61c0
movq %rbx, %rdi
popq %rbx
jmp 0x61c0
retq
// File: /workspace/github_c_makefile_star2_O1/jonof[P]jftekwar/jfbuild/src/mdsprite.c
// Function: md2free
static void md2free (md2model *m)
{
	mdanim_t *anim, *nanim = NULL;
	mdskinmap_t *sk, *nsk = NULL;

	if (!m) return;

	for(anim=m->animations; anim; anim=nanim)
	{
		nanim = anim->next;
		free(anim);
	}
	for(sk=m->skinmap; sk; sk=nsk)
	{
		nsk = sk->next;
		free(sk->fn);
		free(sk);
	}

	if (m->frames) free(m->frames);
	if (m->uvs) free(m->uvs);
	if (m->tris) free(m->tris);
	if (m->basepath) free(m->basepath);
	if (m->skinfn) free(m->skinfn);

	if (m->tex) free(m->tex);

	free(m);
}

// Assembly:
testq %rdi, %rdi
je 0x6379c
pushq %r15
pushq %r14
pushq %rbx
movq %rdi, %rbx
movq 0x40(%rdi), %rdi
testq %rdi, %rdi
je 0x6370c
movq 0x10(%rdi), %r14
callq 0x61c0
movq %r14, %rdi
testq %r14, %r14
jne 0x636fb
movq 0x48(%rbx), %r14
testq %r14, %r14
je 0x63732
movq 0x10(%r14), %rdi
movq 0x38(%r14), %r15
callq 0x61c0
movq %r14, %rdi
callq 0x61c0
movq %r15, %r14
testq %r15, %r15
jne 0x63715
movq 0x70(%rbx), %rdi
testq %rdi, %rdi
je 0x63740
callq 0x61c0
movq 0x78(%rbx), %rdi
testq %rdi, %rdi
je 0x6374e
callq 0x61c0
movq 0x80(%rbx), %rdi
testq %rdi, %rdi
je 0x6375f
callq 0x61c0
movq 0x88(%rbx), %rdi
testq %rdi, %rdi
je 0x63770
callq 0x61c0
movq 0x90(%rbx), %rdi
testq %rdi, %rdi
je 0x63781
callq 0x61c0
movq 0x18(%rbx), %rdi
testq %rdi, %rdi
je 0x6378f
callq 0x61c0
movq %rbx, %rdi
popq %rbx
popq %r14
popq %r15
jmp 0x61c0
retq
// File: /workspace/github_c_makefile_star2_O1/jonof[P]jftekwar/jfbuild/src/mdsprite.c
// Function: md3free
static void md3free (md3model *m)
{
	mdanim_t *anim, *nanim = NULL;
	mdskinmap_t *sk, *nsk = NULL;
	md3surf_t *s;
	int surfi;

	if (!m) return;

	for(anim=m->animations; anim; anim=nanim)
	{
		nanim = anim->next;
		free(anim);
	}
	for(sk=m->skinmap; sk; sk=nsk)
	{
		nsk = sk->next;
		free(sk->fn);
		free(sk);
	}

	if (m->head.surfs)
	{
		for(surfi=m->head.numsurfs-1;surfi>=0;surfi--)
		{
			s = &m->head.surfs[surfi];
			if (s->tris) free(s->tris);
		}
		free(m->head.surfs);
	}
	if (m->head.tags) free(m->head.tags);
	if (m->head.frames) free(m->head.frames);

	if (m->tex) free(m->tex);

	free(m);
}

// Assembly:
testq %rdi, %rdi
je 0x6387b
pushq %r15
pushq %r14
pushq %rbx
movq %rdi, %rbx
movq 0x40(%rdi), %rdi
testq %rdi, %rdi
je 0x637c8
movq 0x10(%rdi), %r14
callq 0x61c0
movq %r14, %rdi
testq %r14, %r14
jne 0x637b7
movq 0x48(%rbx), %r14
testq %r14, %r14
je 0x637ee
movq 0x10(%r14), %rdi
movq 0x38(%r14), %r15
callq 0x61c0
movq %r14, %rdi
callq 0x61c0
movq %r15, %r14
testq %r15, %r15
jne 0x637d1
cmpq $0x0, 0xc8(%rbx)
je 0x6383e
movslq 0xac(%rbx), %r14
testq %r14, %r14
jle 0x63832
leaq 0x1(%r14), %r15
shlq $0x7, %r14
addq $-0x28, %r14
movq 0xc8(%rbx), %rax
movq (%rax,%r14), %rdi
testq %rdi, %rdi
je 0x63825
callq 0x61c0
decq %r15
addq $-0x80, %r14
cmpq $0x1, %r15
jg 0x63810
movq 0xc8(%rbx), %rdi
callq 0x61c0
movq 0xc0(%rbx), %rdi
testq %rdi, %rdi
je 0x6384f
callq 0x61c0
movq 0xb8(%rbx), %rdi
testq %rdi, %rdi
je 0x63860
callq 0x61c0
movq 0x18(%rbx), %rdi
testq %rdi, %rdi
je 0x6386e
callq 0x61c0
movq %rbx, %rdi
popq %rbx
popq %r14
popq %r15
jmp 0x61c0
retq
// File: /workspace/github_c_makefile_star2_O1/jonof[P]jftekwar/jfbuild/src/mdsprite.c
// Function: putvox
static void putvox (int x, int y, int z, int col)
{
	if (vnum >= vmax) { vmax = max(vmax<<1,4096); vcol = (voxcol_t *)realloc(vcol,vmax*sizeof(voxcol_t)); }

	z += x*yzsiz + y*zsiz;
	vcol[vnum].p = z; z = ((z*214013)&vcolhashsizm1);
	vcol[vnum].c = col;
	vcol[vnum].n = vcolhashead[z]; vcolhashead[z] = vnum++;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %rbx
pushq %rax
movl %ecx, %ebx
movl %edx, %r15d
movl %esi, %r14d
movl %edi, %ebp
movl 0x64f7e1(%rip), %eax    # 0x6b3074
cmpl %eax, 0x64f7d7(%rip)    # 0x6b3070
jl 0x638cb
addl %eax, %eax
cmpl $0x1001, %eax           # imm = 0x1001
movl $0x1000, %ecx           # imm = 0x1000
cmovgel %eax, %ecx
movl %ecx, 0x64f7c4(%rip)    # 0x6b3074
movq 0x64f7e9(%rip), %rdi    # 0x6b30a0
shlq $0x2, %rcx
leaq (%rcx,%rcx,2), %rsi
callq 0x6120
movq %rax, 0x64f7d5(%rip)    # 0x6b30a0
imull 0x64f7ea(%rip), %ebp    # 0x6b30bc
imull 0x64f7a6(%rip), %r14d   # 0x6b3080
addl %r15d, %ebp
addl %r14d, %ebp
movq 0x64f7b9(%rip), %rax    # 0x6b30a0
movslq 0x64f782(%rip), %rcx    # 0x6b3070
leaq (%rcx,%rcx,2), %rcx
movl %ebp, (%rax,%rcx,4)
movslq %ebp, %rcx
imulq $0x343fd, %rcx, %rcx    # imm = 0x343FD
movslq 0x64f7b2(%rip), %rdx    # 0x6b30b8
andq %rcx, %rdx
movslq 0x64f760(%rip), %rcx    # 0x6b3070
leaq (%rcx,%rcx,2), %rcx
movl %ebx, 0x4(%rax,%rcx,4)
movq 0x64f789(%rip), %rcx    # 0x6b30a8
movl (%rcx,%rdx,4), %esi
movslq 0x64f747(%rip), %rdi    # 0x6b3070
leaq (%rdi,%rdi,2), %rdi
movl %esi, 0x8(%rax,%rdi,4)
movl 0x64f739(%rip), %eax    # 0x6b3070
leal 0x1(%rax), %esi
movl %esi, 0x64f730(%rip)    # 0x6b3070
movl %eax, (%rcx,%rdx,4)
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O1/jonof[P]jftekwar/jfbuild/src/mdsprite.c
// Function: setzrange1
static void setzrange1 (int *lptr, int z0, int z1)
{
	int z, ze;
	if (!((z0^z1)&~31)) { lptr[z0>>5] |= (~(-(1<<SHIFTMOD32(z1))))&(-(1<<SHIFTMOD32(z0))); return; }
	z = (z0>>5); ze = (z1>>5);
	lptr[z] |= (-(1<<SHIFTMOD32(z0))); for(z++;z<ze;z++) lptr[z] = -1;
	lptr[z] |=~(-(1<<SHIFTMOD32(z1)));
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %rbx
pushq %rax
movl %edx, %ebp
movq %rdi, %rbx
movl %edx, %edi
xorl %esi, %edi
movl $0xffffffff, %edx       # imm = 0xFFFFFFFF
movl $0xffffffff, %eax       # imm = 0xFFFFFFFF
movl %esi, %ecx
shll %cl, %eax
cmpl $0x1f, %edi
ja 0x6397e
movl %ebp, %ecx
shll %cl, %edx
notl %edx
andl %edx, %eax
sarl $0x5, %esi
jmp 0x639d7
sarl $0x5, %esi
movslq %esi, %r14
orl %eax, (%rbx,%r14,4)
movl %ebp, %r15d
sarl $0x5, %r15d
leal 0x1(%r14), %esi
cmpl %r15d, %esi
jge 0x639cc
leaq (%rbx,%r14,4), %rdi
addq $0x4, %rdi
movl %r15d, %eax
subl %r14d, %eax
addl $-0x2, %eax
leaq 0x4(,%rax,4), %rdx
movl $0xff, %esi
callq 0x62f0
incl %r14d
movslq %r14d, %rsi
movslq %r15d, %rax
incq %rsi
cmpq %rsi, %rax
jne 0x639c4
movl $0xffffffff, %eax       # imm = 0xFFFFFFFF
movl %ebp, %ecx
shll %cl, %eax
notl %eax
movslq %esi, %rcx
orl %eax, (%rbx,%rcx,4)
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq