LLM4Binary/decompile-bench-makefile huggingface dataset:
// File: /workspace/github_c_makefile_star2_O0/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:
pushq %rbp
movq %rsp, %rbp
subq $0x20, %rsp
movl %edi, -0x4(%rbp)
movl %esi, -0x8(%rbp)
movl %edx, -0xc(%rbp)
cmpl $0x3, 0x562298(%rip)    # 0x5ed920
jge 0x8b68f
jmp 0x8b787
movslq -0x8(%rbp), %rcx
leaq 0x349fa6(%rip), %rax    # 0x3d5640
cmpq $0x0, (%rax,%rcx,8)
jne 0x8b6a6
jmp 0x8b787
movl -0xc(%rbp), %edx
andl $0x1, %edx
xorl %eax, %eax
movl $0x1, %ecx
cmpl $0x0, %edx
cmovnel %ecx, %eax
movw %ax, -0x12(%rbp)
cmpl $0x0, 0x56490(%rip)     # 0xe1b54
je 0x8b6d1
movzwl -0x12(%rbp), %eax
orl $0x2, %eax
movw %ax, -0x12(%rbp)
movl -0x4(%rbp), %edi
movl -0x8(%rbp), %esi
movzwl -0x12(%rbp), %edx
callq 0x9a0e0
cmpl $0x0, -0xc(%rbp)
jne 0x8b6eb
jmp 0x8b787
movl -0x4(%rbp), %edi
callq 0x8ef60
movl %eax, -0x10(%rbp)
cmpl $0x0, -0x10(%rbp)
jl 0x8b713
leaq 0x5b0905(%rip), %rax    # 0x63c008
movq (%rax), %rax
movslq -0x10(%rbp), %rcx
movq (%rax,%rcx,8), %rax
cmpl $0x2, (%rax)
jge 0x8b715
jmp 0x8b787
movl $0x0, -0x1c(%rbp)
leaq 0x5b08e5(%rip), %rax    # 0x63c008
movq (%rax), %rax
movslq -0x10(%rbp), %rcx
movq (%rax,%rcx,8), %rax
cmpl $0x3, (%rax)
jne 0x8b74e
leaq 0x5b08ce(%rip), %rax    # 0x63c008
movq (%rax), %rax
movslq -0x10(%rbp), %rcx
movq (%rax,%rcx,8), %rax
movl 0xac(%rax), %eax
movl %eax, -0x1c(%rbp)
movl $0x0, -0x18(%rbp)
movl -0x18(%rbp), %eax
cmpl -0x1c(%rbp), %eax
jg 0x8b787
leaq 0x5b08a4(%rip), %rax    # 0x63c008
movq (%rax), %rax
movslq -0x10(%rbp), %rcx
movq (%rax,%rcx,8), %rdi
movl -0x8(%rbp), %edx
movl -0x18(%rbp), %ecx
xorl %esi, %esi
callq 0x8f7a0
movl -0x18(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x18(%rbp)
jmp 0x8b755
addq $0x20, %rsp
popq %rbp
retq
nopl (%rax)
// File: /workspace/github_c_makefile_star2_O0/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 %rbp
movq %rsp, %rbp
subq $0x20, %rsp
movq %rdi, -0x10(%rbp)
movq -0x10(%rbp), %rax
cmpl $0x1, (%rax)
je 0x8bf93
movslq 0x55ca8(%rip), %rcx     # 0xe1bc4
leaq 0x55c3d(%rip), %rax     # 0xe1b60
shlq $0x4, %rcx
addq %rcx, %rax
movq (%rax), %rsi
leaq 0x2b107(%rip), %rdi     # 0xb703b
movb $0x0, %al
callq 0x37c90
leaq 0x2b117(%rip), %rdi     # 0xb7059
movb $0x0, %al
callq 0x37c90
movl $0x0, -0x14(%rbp)
cmpl $0x6, -0x14(%rbp)
jge 0x8bf87
movl -0x14(%rbp), %esi
movslq -0x14(%rbp), %rcx
leaq 0x55bfc(%rip), %rax     # 0xe1b60
shlq $0x4, %rcx
addq %rcx, %rax
movq (%rax), %rdx
leaq 0x2b0f8(%rip), %rdi     # 0xb706d
movb $0x0, %al
callq 0x37c90
movl -0x14(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x14(%rbp)
jmp 0x8bf50
movl $0x0, -0x4(%rbp)
jmp 0x8c07d
movq -0x10(%rbp), %rax
movq 0x10(%rax), %rax
movq (%rax), %rdi
leaq -0x20(%rbp), %rsi
movl $0xa, %edx
callq 0x68a0
movl %eax, -0x14(%rbp)
movq -0x20(%rbp), %rax
movq -0x10(%rbp), %rcx
movq 0x10(%rcx), %rcx
cmpq (%rcx), %rax
jne 0x8c017
movl $0x0, -0x14(%rbp)
cmpl $0x6, -0x14(%rbp)
jge 0x8c006
movq -0x10(%rbp), %rax
movq 0x10(%rax), %rax
movq (%rax), %rdi
movslq -0x14(%rbp), %rcx
leaq 0x55b7d(%rip), %rax     # 0xe1b60
shlq $0x4, %rcx
addq %rcx, %rax
movq (%rax), %rsi
callq 0x67c0
cmpl $0x0, %eax
jne 0x8bff9
jmp 0x8c006
jmp 0x8bffb
movl -0x14(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x14(%rbp)
jmp 0x8bfc7
cmpl $0x6, -0x14(%rbp)
jne 0x8c015
movl 0x55bb2(%rip), %eax     # 0xe1bc4
movl %eax, -0x14(%rbp)
jmp 0x8c037
cmpl $0x0, -0x14(%rbp)
jge 0x8c026
movl $0x0, -0x14(%rbp)
jmp 0x8c035
cmpl $0x6, -0x14(%rbp)
jl 0x8c033
movl $0x5, -0x14(%rbp)
jmp 0x8c035
jmp 0x8c037
movl -0x14(%rbp), %eax
cmpl 0x55b84(%rip), %eax     # 0xe1bc4
je 0x8c050
movl -0x14(%rbp), %eax
movl %eax, 0x55b79(%rip)     # 0xe1bc4
callq 0x724c0
movslq 0x55b6d(%rip), %rcx     # 0xe1bc4
leaq 0x55b02(%rip), %rax     # 0xe1b60
shlq $0x4, %rcx
addq %rcx, %rax
movq (%rax), %rsi
leaq 0x2b00c(%rip), %rdi     # 0xb707b
movb $0x0, %al
callq 0x37c90
movl $0x0, -0x4(%rbp)
movl -0x4(%rbp), %eax
addq $0x20, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/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 %rbp
movq %rsp, %rbp
subq $0x20, %rsp
movq %rdi, -0x10(%rbp)
movq -0x10(%rbp), %rax
cmpl $0x1, (%rax)
je 0x8c0e0
movl 0x5618a9(%rip), %esi    # 0x5ed954
leaq 0x2afef(%rip), %rdi     # 0xb70a1
movb $0x0, %al
callq 0x37c90
leaq 0x12ecf0(%rip), %rax    # 0x1badb0
movss 0x14(%rax), %xmm0
cvtss2sd %xmm0, %xmm0
leaq 0x2aff3(%rip), %rdi     # 0xb70c3
movb $0x1, %al
callq 0x37c90
movl $0x0, -0x4(%rbp)
jmp 0x8c14f
movq -0x10(%rbp), %rax
movq 0x10(%rax), %rax
movq (%rax), %rdi
leaq -0x20(%rbp), %rsi
movl $0xa, %edx
callq 0x68a0
movl %eax, -0x14(%rbp)
cmpl $0x0, -0x14(%rbp)
jl 0x8c114
cvtsi2ssl -0x14(%rbp), %xmm0
leaq 0x12eca2(%rip), %rax    # 0x1badb0
ucomiss 0x14(%rax), %xmm0
jbe 0x8c11b
movl $0x0, -0x14(%rbp)
movl -0x14(%rbp), %eax
cmpl 0x55aa0(%rip), %eax     # 0xe1bc4
je 0x8c134
movl -0x14(%rbp), %eax
movl %eax, 0x561825(%rip)    # 0x5ed954
callq 0x724c0
movl 0x56181a(%rip), %esi    # 0x5ed954
leaq 0x2af93(%rip), %rdi     # 0xb70d4
movb $0x0, %al
callq 0x37c90
movl $0x0, -0x4(%rbp)
movl -0x4(%rbp), %eax
addq $0x20, %rsp
popq %rbp
retq
nopl (%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/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 %rbp
movq %rsp, %rbp
subq $0x40, %rsp
movl %edi, -0x4(%rbp)
movq %rsi, -0x10(%rbp)
movq %rdx, -0x18(%rbp)
movq -0x10(%rbp), %rax
movq %rax, -0x20(%rbp)
movl $0x0, -0x24(%rbp)
movq $0x0, -0x30(%rbp)
movq $0x0, -0x38(%rbp)
movq $0x0, -0x40(%rbp)
movq -0x18(%rbp), %rdi
leaq 0x2745d(%rip), %rsi     # 0xb3652
callq 0x6c10
movq %rax, -0x40(%rbp)
cmpq $0x0, -0x40(%rbp)
je 0x8c29d
movq -0x40(%rbp), %rdi
xorl %eax, %eax
movl %eax, %esi
movl $0x2, %edx
callq 0x6ba0
movq -0x40(%rbp), %rdi
callq 0x6270
movq %rax, -0x38(%rbp)
movq -0x40(%rbp), %rdi
xorl %eax, %eax
movl %eax, %esi
xorl %edx, %edx
callq 0x6ba0
movq -0x38(%rbp), %rdi
addq $0x1, %rdi
callq 0x68f0
movq %rax, -0x30(%rbp)
movq -0x30(%rbp), %rdi
movq -0x38(%rbp), %rdx
movq -0x40(%rbp), %rcx
movl $0x1, %esi
callq 0x64f0
movq %rax, -0x38(%rbp)
movq -0x30(%rbp), %rax
movq -0x38(%rbp), %rcx
movb $0x0, (%rax,%rcx)
movq -0x40(%rbp), %rdi
callq 0x6420
movq $0x0, -0x40(%rbp)
movq -0x18(%rbp), %rsi
movq -0x38(%rbp), %rdx
leaq 0x2aba9(%rip), %rdi     # 0xb6e37
movb $0x0, %al
callq 0x37c90
movq -0x30(%rbp), %rax
movq %rax, -0x20(%rbp)
movl -0x4(%rbp), %edi
movq -0x20(%rbp), %rsi
callq 0x711f0
movl %eax, -0x24(%rbp)
cmpq $0x0, -0x30(%rbp)
je 0x8c2c4
movq -0x30(%rbp), %rdi
callq 0x61c0
movq $0x0, -0x30(%rbp)
movl -0x24(%rbp), %eax
addq $0x40, %rsp
popq %rbp
retq
nopl (%rax)
// File: /workspace/github_c_makefile_star2_O0/jonof[P]jftekwar/jfbuild/src/polymost.c
// Function: polymost_get_attrib
static GLint polymost_get_attrib(GLuint program, const GLchar *name)
{
	GLint attribloc = glfunc.glGetAttribLocation(program, name);
	if (attribloc < 0) {
		buildprintf("polymost_get_attrib: could not get location of attribute \"%s\"\n", name);
	}
	return attribloc;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x20, %rsp
movl %edi, -0x4(%rbp)
movq %rsi, -0x10(%rbp)
leaq 0x56142a(%rip), %rax    # 0x5ed710
movq 0x180(%rax), %rax
movl -0x4(%rbp), %edi
movq -0x10(%rbp), %rsi
callq *%rax
movl %eax, -0x14(%rbp)
cmpl $0x0, -0x14(%rbp)
jge 0x8c311
movq -0x10(%rbp), %rsi
leaq 0x2ab5a(%rip), %rdi     # 0xb6e64
movb $0x0, %al
callq 0x37c90
movl -0x14(%rbp), %eax
addq $0x20, %rsp
popq %rbp
retq
nopw (%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/jonof[P]jftekwar/jfbuild/src/polymost.c
// Function: polymost_get_uniform
static GLint polymost_get_uniform(GLuint program, const GLchar *name)
{
	GLint uniformloc = glfunc.glGetUniformLocation(program, name);
	if (uniformloc < 0) {
		buildprintf("polymost_get_uniform: could not get location of uniform \"%s\"\n", name);
	}
	return uniformloc;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x20, %rsp
movl %edi, -0x4(%rbp)
movq %rsi, -0x10(%rbp)
leaq 0x5613da(%rip), %rax    # 0x5ed710
movq 0x1a8(%rax), %rax
movl -0x4(%rbp), %edi
movq -0x10(%rbp), %rsi
callq *%rax
movl %eax, -0x14(%rbp)
cmpl $0x0, -0x14(%rbp)
jge 0x8c361
movq -0x10(%rbp), %rsi
leaq 0x2ab49(%rip), %rdi     # 0xb6ea3
movb $0x0, %al
callq 0x37c90
movl -0x14(%rbp), %eax
addq $0x20, %rsp
popq %rbp
retq
nopw (%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/jonof[P]jftekwar/jfbuild/src/polymost.c
// Function: testvisiblemost
static int testvisiblemost (float x0, float x1)
{
	int i, newi;

	for(i=vsp[0].n;i;i=newi)
	{
		newi = vsp[i].n;
		if ((x0 < vsp[newi].x) && (vsp[i].x < x1) && (vsp[i].ctag >= 0)) return(1);
	}
	return(0);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
movss %xmm0, -0x8(%rbp)
movss %xmm1, -0xc(%rbp)
movl 0x574250(%rip), %eax    # 0x601bd4
movl %eax, -0x10(%rbp)
cmpl $0x0, -0x10(%rbp)
je 0x8da17
movslq -0x10(%rbp), %rcx
leaq 0x574224(%rip), %rax    # 0x601bc0
imulq $0x28, %rcx, %rcx
addq %rcx, %rax
movl 0x14(%rax), %eax
movl %eax, -0x14(%rbp)
movss -0x8(%rbp), %xmm1
movslq -0x14(%rbp), %rcx
leaq 0x574207(%rip), %rax    # 0x601bc0
imulq $0x28, %rcx, %rcx
addq %rcx, %rax
movss (%rax), %xmm0
ucomiss %xmm1, %xmm0
jbe 0x8da0a
movslq -0x10(%rbp), %rcx
leaq 0x5741ec(%rip), %rax    # 0x601bc0
imulq $0x28, %rcx, %rcx
addq %rcx, %rax
movss (%rax), %xmm1
movss -0xc(%rbp), %xmm0
ucomiss %xmm1, %xmm0
jbe 0x8da0a
movslq -0x10(%rbp), %rcx
leaq 0x5741cc(%rip), %rax    # 0x601bc0
imulq $0x28, %rcx, %rcx
addq %rcx, %rax
cmpl $0x0, 0x20(%rax)
jl 0x8da0a
movl $0x1, -0x4(%rbp)
jmp 0x8da1e
jmp 0x8da0c
movl -0x14(%rbp), %eax
movl %eax, -0x10(%rbp)
jmp 0x8d987
movl $0x0, -0x4(%rbp)
movl -0x4(%rbp), %eax
popq %rbp
retq
nopw %cs:(%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/jonof[P]jftekwar/jfbuild/src/polymost.c
// Function: vsinsaft
static int vsinsaft (int i)
{
	int r;
		//i = next element from empty list
	r = vsp[VSPMAX-1].n;
	vsp[vsp[r].n].p = VSPMAX-1;
	vsp[VSPMAX-1].n = vsp[r].n;

	vsp[r] = vsp[i]; //copy i to r

		//insert r after i
	vsp[r].p = i; vsp[r].n = vsp[i].n;
	vsp[vsp[i].n].p = r; vsp[i].n = r;

	return(r);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x10, %rsp
movl %edi, -0x4(%rbp)
movl 0x59c16b(%rip), %eax    # 0x629bac
movl %eax, -0x8(%rbp)
movslq -0x8(%rbp), %rcx
leaq 0x574171(%rip), %rax    # 0x601bc0
imulq $0x28, %rcx, %rcx
addq %rcx, %rax
movslq 0x14(%rax), %rcx
leaq 0x57415f(%rip), %rax    # 0x601bc0
imulq $0x28, %rcx, %rcx
addq %rcx, %rax
movl $0xfff, 0x18(%rax)      # imm = 0xFFF
movslq -0x8(%rbp), %rcx
leaq 0x574146(%rip), %rax    # 0x601bc0
imulq $0x28, %rcx, %rcx
addq %rcx, %rax
movl 0x14(%rax), %eax
movl %eax, 0x59c122(%rip)    # 0x629bac
movslq -0x8(%rbp), %rax
leaq 0x57412b(%rip), %rdi    # 0x601bc0
imulq $0x28, %rax, %rax
addq %rax, %rdi
movslq -0x4(%rbp), %rax
leaq 0x574119(%rip), %rsi    # 0x601bc0
imulq $0x28, %rax, %rax
addq %rax, %rsi
movl $0x28, %edx
callq 0x60c0
movl -0x4(%rbp), %ecx
movslq -0x8(%rbp), %rdx
leaq 0x5740fa(%rip), %rax    # 0x601bc0
imulq $0x28, %rdx, %rdx
addq %rdx, %rax
movl %ecx, 0x18(%rax)
movslq -0x4(%rbp), %rcx
leaq 0x5740e5(%rip), %rax    # 0x601bc0
imulq $0x28, %rcx, %rcx
addq %rcx, %rax
movl 0x14(%rax), %ecx
movslq -0x8(%rbp), %rdx
leaq 0x5740d0(%rip), %rax    # 0x601bc0
imulq $0x28, %rdx, %rdx
addq %rdx, %rax
movl %ecx, 0x14(%rax)
movl -0x8(%rbp), %ecx
movslq -0x4(%rbp), %rdx
leaq 0x5740b8(%rip), %rax    # 0x601bc0
imulq $0x28, %rdx, %rdx
addq %rdx, %rax
movslq 0x14(%rax), %rdx
leaq 0x5740a6(%rip), %rax    # 0x601bc0
imulq $0x28, %rdx, %rdx
addq %rdx, %rax
movl %ecx, 0x18(%rax)
movl -0x8(%rbp), %ecx
movslq -0x4(%rbp), %rdx
leaq 0x57408e(%rip), %rax    # 0x601bc0
imulq $0x28, %rdx, %rdx
addq %rdx, %rax
movl %ecx, 0x14(%rax)
movl -0x8(%rbp), %eax
addq $0x10, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/jonof[P]jftekwar/jfbuild/src/polymost.c
// Function: vsdel
static void vsdel (int i)
{
	int pi, ni;
		//Delete i
	pi = vsp[i].p;
	ni = vsp[i].n;
	vsp[ni].p = pi;
	vsp[pi].n = ni;

		//Add i to empty list
	vsp[i].n = vsp[VSPMAX-1].n;
	vsp[i].p = VSPMAX-1;
	vsp[vsp[VSPMAX-1].n].p = i;
	vsp[VSPMAX-1].n = i;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
movl %edi, -0x4(%rbp)
movslq -0x4(%rbp), %rcx
leaq 0x57405e(%rip), %rax    # 0x601bc0
imulq $0x28, %rcx, %rcx
addq %rcx, %rax
movl 0x18(%rax), %eax
movl %eax, -0x8(%rbp)
movslq -0x4(%rbp), %rcx
leaq 0x574046(%rip), %rax    # 0x601bc0
imulq $0x28, %rcx, %rcx
addq %rcx, %rax
movl 0x14(%rax), %eax
movl %eax, -0xc(%rbp)
movl -0x8(%rbp), %ecx
movslq -0xc(%rbp), %rdx
leaq 0x57402b(%rip), %rax    # 0x601bc0
imulq $0x28, %rdx, %rdx
addq %rdx, %rax
movl %ecx, 0x18(%rax)
movl -0xc(%rbp), %ecx
movslq -0x8(%rbp), %rdx
leaq 0x574013(%rip), %rax    # 0x601bc0
imulq $0x28, %rdx, %rdx
addq %rdx, %rax
movl %ecx, 0x14(%rax)
movl 0x59bfef(%rip), %ecx    # 0x629bac
movslq -0x4(%rbp), %rdx
leaq 0x573ff8(%rip), %rax    # 0x601bc0
imulq $0x28, %rdx, %rdx
addq %rdx, %rax
movl %ecx, 0x14(%rax)
movslq -0x4(%rbp), %rcx
leaq 0x573fe3(%rip), %rax    # 0x601bc0
imulq $0x28, %rcx, %rcx
addq %rcx, %rax
movl $0xfff, 0x18(%rax)      # imm = 0xFFF
movl -0x4(%rbp), %ecx
movslq 0x59bfb7(%rip), %rdx    # 0x629bac
leaq 0x573fc4(%rip), %rax    # 0x601bc0
imulq $0x28, %rdx, %rdx
addq %rdx, %rax
movl %ecx, 0x18(%rax)
movl -0x4(%rbp), %eax
movl %eax, 0x59bf9d(%rip)    # 0x629bac
popq %rbp
retq
nopw %cs:(%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/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:
pushq %rbp
movq %rsp, %rbp
movl %edi, -0xc(%rbp)
movl %esi, -0x10(%rbp)
movl %edx, -0x14(%rbp)
cmpl $0x0, 0x59bc8c(%rip)    # 0x629bf0
jne 0x8df73
movq $0x0, -0x8(%rbp)
jmp 0x8e027
cmpl $0x2400, -0xc(%rbp)     # imm = 0x2400
jb 0x8df89
movq $0x0, -0x8(%rbp)
jmp 0x8e027
jmp 0x8df8b
movslq -0xc(%rbp), %rcx
leaq 0x59bc6a(%rip), %rax    # 0x629c00
movq (%rax,%rcx,8), %rax
movq %rax, -0x20(%rbp)
cmpq $0x0, -0x20(%rbp)
je 0x8e004
movq -0x20(%rbp), %rax
movzbl 0x8(%rax), %eax
cmpl -0x10(%rbp), %eax
jne 0x8dff5
cmpl $0x0, -0x14(%rbp)
je 0x8dfdd
movq -0x20(%rbp), %rax
cmpq $0x0, 0x20(%rax)
je 0x8dfdb
movq -0x20(%rbp), %rax
movq 0x20(%rax), %rax
cmpq $0x0, (%rax)
jne 0x8dfdb
movq -0x20(%rbp), %rax
movq %rax, -0x8(%rbp)
jmp 0x8e027
jmp 0x8dff3
movq -0x20(%rbp), %rax
cmpb $0x0, 0x9(%rax)
jne 0x8dff1
movq -0x20(%rbp), %rax
movq %rax, -0x8(%rbp)
jmp 0x8e027
jmp 0x8dff3
jmp 0x8dff5
jmp 0x8dff7
movq -0x20(%rbp), %rax
movq (%rax), %rax
movq %rax, -0x20(%rbp)
jmp 0x8df9e
cmpl $0x0, -0x10(%rbp)
jne 0x8e00c
jmp 0x8e01f
movl $0x0, -0x10(%rbp)
movb $0x1, %al
testb $0x1, %al
jne 0x8df8b
jmp 0x8e01f
movq $0x0, -0x8(%rbp)
movq -0x8(%rbp), %rax
popq %rbp
retq
nopl (%rax)
// File: /workspace/github_c_makefile_star2_O0/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:
pushq %rbp
movq %rsp, %rbp
subq $0x20, %rsp
movl $0x0, -0x4(%rbp)
cmpl $0x100, -0x4(%rbp)      # imm = 0x100
jge 0x8e092
movslq -0x4(%rbp), %rcx
leaq 0x5adbad(%rip), %rax    # 0x63bc00
movb $-0x1, 0x2(%rax,%rcx,4)
movslq -0x4(%rbp), %rcx
leaq 0x5adb9d(%rip), %rax    # 0x63bc00
movb $-0x1, 0x1(%rax,%rcx,4)
movslq -0x4(%rbp), %rcx
leaq 0x5adb8d(%rip), %rax    # 0x63bc00
movb $-0x1, (%rax,%rcx,4)
movslq -0x4(%rbp), %rcx
leaq 0x5adb7e(%rip), %rax    # 0x63bc00
movb $0x0, 0x3(%rax,%rcx,4)
movl -0x4(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x4(%rbp)
jmp 0x8e03f
cmpl $0x0, 0x59bb57(%rip)    # 0x629bf0
je 0x8e175
movl $0x23ff, -0x4(%rbp)     # imm = 0x23FF
cmpl $0x0, -0x4(%rbp)
jl 0x8e173
movslq -0x4(%rbp), %rcx
leaq 0x59bb45(%rip), %rax    # 0x629c00
movq (%rax,%rcx,8), %rax
movq %rax, -0x10(%rbp)
cmpq $0x0, -0x10(%rbp)
je 0x8e163
movq -0x10(%rbp), %rax
movq (%rax), %rax
movq %rax, -0x18(%rbp)
movq -0x10(%rbp), %rax
cmpq $0x0, 0x20(%rax)
je 0x8e135
movl $0x5, -0x8(%rbp)
cmpl $0x0, -0x8(%rbp)
jl 0x8e128
movq -0x10(%rbp), %rax
movq 0x20(%rax), %rax
movslq -0x8(%rbp), %rcx
cmpq $0x0, 0x8(%rax,%rcx,8)
je 0x8e11b
movq -0x10(%rbp), %rax
movq 0x20(%rax), %rax
movslq -0x8(%rbp), %rcx
movq 0x8(%rax,%rcx,8), %rdi
callq 0x61c0
jmp 0x8e11d
movl -0x8(%rbp), %eax
addl $-0x1, %eax
movl %eax, -0x8(%rbp)
jmp 0x8e0eb
movq -0x10(%rbp), %rax
movq 0x20(%rax), %rdi
callq 0x61c0
movq -0x10(%rbp), %rax
cmpq $0x0, 0x10(%rax)
je 0x8e14d
movq -0x10(%rbp), %rax
movq 0x10(%rax), %rdi
callq 0x61c0
movq -0x10(%rbp), %rdi
callq 0x61c0
movq -0x18(%rbp), %rax
movq %rax, -0x10(%rbp)
jmp 0x8e0c3
jmp 0x8e165
movl -0x4(%rbp), %eax
addl $-0x1, %eax
movl %eax, -0x4(%rbp)
jmp 0x8e0a6
jmp 0x8e175
leaq 0x59ba84(%rip), %rdi    # 0x629c00
xorl %esi, %esi
movl $0x12000, %edx          # imm = 0x12000
callq 0x62d0
movl $0x1, 0x59ba5e(%rip)    # 0x629bf0
addq $0x20, %rsp
popq %rbp
retq
nopl (%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/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:
pushq %rbp
movq %rsp, %rbp
subq $0x10, %rsp
movb %r8b, %al
movl %edi, -0x4(%rbp)
movb %sil, -0x5(%rbp)
movb %dl, -0x6(%rbp)
movb %cl, -0x7(%rbp)
movb %al, -0x8(%rbp)
cmpl $0x100, -0x4(%rbp)      # imm = 0x100
jb 0x8e1c6
jmp 0x8e221
cmpl $0x0, 0x59ba23(%rip)    # 0x629bf0
jne 0x8e1d4
callq 0x8e030
movb -0x5(%rbp), %dl
movslq -0x4(%rbp), %rcx
leaq 0x5ada1e(%rip), %rax    # 0x63bc00
movb %dl, (%rax,%rcx,4)
movb -0x6(%rbp), %dl
movslq -0x4(%rbp), %rcx
leaq 0x5ada0d(%rip), %rax    # 0x63bc00
movb %dl, 0x1(%rax,%rcx,4)
movb -0x7(%rbp), %dl
movslq -0x4(%rbp), %rcx
leaq 0x5ad9fb(%rip), %rax    # 0x63bc00
movb %dl, 0x2(%rax,%rcx,4)
movzbl -0x8(%rbp), %eax
andl $0x3, %eax
movb %al, %dl
movslq -0x4(%rbp), %rcx
leaq 0x5ad9e3(%rip), %rax    # 0x63bc00
movb %dl, 0x3(%rax,%rcx,4)
addq $0x10, %rsp
popq %rbp
retq
nopw (%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/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 %rbp
movq %rsp, %rbp
subq $0x30, %rsp
movl %edi, -0x8(%rbp)
movl %esi, -0xc(%rbp)
movq $0x0, -0x20(%rbp)
cmpl $0x2400, -0x8(%rbp)     # imm = 0x2400
jb 0x8e6db
movl $0xffffffff, -0x4(%rbp) # imm = 0xFFFFFFFF
jmp 0x8e809
cmpl $0x100, -0xc(%rbp)      # imm = 0x100
jb 0x8e6f0
movl $0xffffffff, -0x4(%rbp) # imm = 0xFFFFFFFF
jmp 0x8e809
cmpl $0x0, 0x59b4f9(%rip)    # 0x629bf0
jne 0x8e705
movl $0x0, -0x4(%rbp)
jmp 0x8e809
movslq -0x8(%rbp), %rcx
leaq 0x59b4f0(%rip), %rax    # 0x629c00
movq (%rax,%rcx,8), %rax
movq %rax, -0x18(%rbp)
cmpq $0x0, -0x18(%rbp)
je 0x8e745
movq -0x18(%rbp), %rax
movzbl 0x8(%rax), %eax
cmpl -0xc(%rbp), %eax
jne 0x8e72e
jmp 0x8e745
jmp 0x8e730
movq -0x18(%rbp), %rax
movq %rax, -0x20(%rbp)
movq -0x18(%rbp), %rax
movq (%rax), %rax
movq %rax, -0x18(%rbp)
jmp 0x8e718
cmpq $0x0, -0x18(%rbp)
jne 0x8e758
movl $0x0, -0x4(%rbp)
jmp 0x8e809
movq -0x18(%rbp), %rax
cmpq $0x0, 0x10(%rax)
je 0x8e770
movq -0x18(%rbp), %rax
movq 0x10(%rax), %rdi
callq 0x61c0
movq -0x18(%rbp), %rax
cmpq $0x0, 0x20(%rax)
je 0x8e7cc
movl $0x5, -0x24(%rbp)
cmpl $0x0, -0x24(%rbp)
jl 0x8e7bf
movq -0x18(%rbp), %rax
movq 0x20(%rax), %rax
movslq -0x24(%rbp), %rcx
cmpq $0x0, 0x8(%rax,%rcx,8)
je 0x8e7b2
movq -0x18(%rbp), %rax
movq 0x20(%rax), %rax
movslq -0x24(%rbp), %rcx
movq 0x8(%rax,%rcx,8), %rdi
callq 0x61c0
jmp 0x8e7b4
movl -0x24(%rbp), %eax
addl $-0x1, %eax
movl %eax, -0x24(%rbp)
jmp 0x8e782
movq -0x18(%rbp), %rax
movq 0x20(%rax), %rdi
callq 0x61c0
cmpq $0x0, -0x20(%rbp)
je 0x8e7e3
movq -0x18(%rbp), %rax
movq (%rax), %rcx
movq -0x20(%rbp), %rax
movq %rcx, (%rax)
jmp 0x8e7f9
movq -0x18(%rbp), %rax
movq (%rax), %rdx
movslq -0x8(%rbp), %rcx
leaq 0x59b40b(%rip), %rax    # 0x629c00
movq %rdx, (%rax,%rcx,8)
movq -0x18(%rbp), %rdi
callq 0x61c0
movl $0x0, -0x4(%rbp)
movl -0x4(%rbp), %eax
addq $0x30, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
nopl (%rax)
// File: /workspace/github_c_makefile_star2_O0/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 %rbp
movq %rsp, %rbp
subq $0x10, %rsp
cmpq $0x0, 0x5ad7d8(%rip)    # 0x63c008
je 0x8e88e
movl $0x0, -0x4(%rbp)
movl -0x4(%rbp), %eax
cmpl 0x5ad7c2(%rip), %eax    # 0x63c004
jge 0x8e863
movq 0x5ad7bd(%rip), %rax    # 0x63c008
movslq -0x4(%rbp), %rcx
movq (%rax,%rcx,8), %rdi
callq 0x8e920
movl -0x4(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x4(%rbp)
jmp 0x8e839
movq 0x5ad79e(%rip), %rdi    # 0x63c008
callq 0x61c0
movq $0x0, 0x5ad78e(%rip) # 0x63c008
movl $0x0, 0x5ad78c(%rip)    # 0x63c010
movl $0x0, 0x5ad776(%rip)    # 0x63c004
leaq 0x5ad78b(%rip), %rdi    # 0x63c020
movl $0xff, %esi
movl $0x1b000, %edx          # imm = 0x1B000
callq 0x62d0
cmpq $0x0, 0x5c8774(%rip)    # 0x657020
je 0x8e8d9
movq 0x5c876b(%rip), %rdi    # 0x657020
callq 0x61c0
movq $0x0, 0x5c875b(%rip) # 0x657020
movl $0x0, 0x5c8759(%rip)    # 0x657028
movl $0x0, 0x5c8753(%rip)    # 0x65702c
cmpq $0x0, 0x5c874f(%rip)    # 0x657030
je 0x8e90e
movq 0x5c8746(%rip), %rdi    # 0x657030
callq 0x61c0
movq $0x0, 0x5c8736(%rip) # 0x657030
movl $0x0, 0x5c8734(%rip)    # 0x657038
movl $0x0, 0x5c872e(%rip)    # 0x65703c
addq $0x10, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/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 %rbp
movq %rsp, %rbp
subq $0x20, %rsp
movq %rdi, -0x10(%rbp)
cmpb $0x0, 0x5ad2bd(%rip)    # 0x63c000
jne 0x8ed4a
callq 0x8ed00
movl 0x5ad2b4(%rip), %eax    # 0x63c004
cmpl 0x5ad2ba(%rip), %eax    # 0x63c010
jl 0x8eda6
movq 0x5ad2a9(%rip), %rdi    # 0x63c008
movl 0x5ad2ab(%rip), %eax    # 0x63c010
addl $0x100, %eax            # imm = 0x100
movslq %eax, %rsi
shlq $0x3, %rsi
callq 0x6110
movq %rax, -0x20(%rbp)
cmpq $0x0, -0x20(%rbp)
jne 0x8ed8a
movl $0xffffffff, -0x4(%rbp) # imm = 0xFFFFFFFF
jmp 0x8edf2
movq -0x20(%rbp), %rax
movq %rax, 0x5ad273(%rip)    # 0x63c008
movl 0x5ad275(%rip), %eax    # 0x63c010
addl $0x100, %eax            # imm = 0x100
movl %eax, 0x5ad26a(%rip)    # 0x63c010
movq -0x10(%rbp), %rdi
callq 0x8ee00
movq %rax, -0x18(%rbp)
cmpq $0x0, -0x18(%rbp)
jne 0x8edc3
movl $0xffffffff, -0x4(%rbp) # imm = 0xFFFFFFFF
jmp 0x8edf2
movq -0x18(%rbp), %rdx
movq 0x5ad23a(%rip), %rax    # 0x63c008
movl 0x5ad230(%rip), %ecx    # 0x63c004
movl %ecx, %esi
addl $0x1, %esi
movl %esi, 0x5ad225(%rip)    # 0x63c004
movslq %ecx, %rcx
movq %rdx, (%rax,%rcx,8)
movl 0x5ad218(%rip), %eax    # 0x63c004
subl $0x1, %eax
movl %eax, -0x4(%rbp)
movl -0x4(%rbp), %eax
addq $0x20, %rsp
popq %rbp
retq
nopl (%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/jonof[P]jftekwar/jfbuild/src/mdsprite.c
// Function: mdload
mdmodel *mdload (const char *filnam)
{
	mdmodel *vm;
	int fil;
	int i;

	vm = (mdmodel*)voxload(filnam); if (vm) return(vm);

	fil = kopen4load((char *)filnam,0); if (fil < 0) return(0);
	kread(fil,&i,4); klseek(fil,0,SEEK_SET);
	switch(B_LITTLE32(i))
	{
		case 0x32504449: vm = (mdmodel*)md2load(fil,filnam); break; //IDP2
		case 0x33504449: vm = (mdmodel*)md3load(fil); break; //IDP3
		default: vm = (mdmodel*)0; break;
	}
	kclose(fil);
	return(vm);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x30, %rsp
movq %rdi, -0x10(%rbp)
movq -0x10(%rbp), %rdi
callq 0x90310
movq %rax, -0x18(%rbp)
cmpq $0x0, -0x18(%rbp)
je 0x8ee2d
movq -0x18(%rbp), %rax
movq %rax, -0x8(%rbp)
jmp 0x8eebb
movq -0x10(%rbp), %rdi
xorl %esi, %esi
callq 0x2fee0
movl %eax, -0x1c(%rbp)
cmpl $0x0, -0x1c(%rbp)
jge 0x8ee4b
movq $0x0, -0x8(%rbp)
jmp 0x8eebb
movl -0x1c(%rbp), %edi
leaq -0x20(%rbp), %rsi
movl $0x4, %edx
callq 0x302b0
movl -0x1c(%rbp), %edi
xorl %edx, %edx
movl %edx, %esi
callq 0x30590
movl -0x20(%rbp), %eax
movl %eax, -0x24(%rbp)
subl $0x32504449, %eax       # imm = 0x32504449
je 0x8ee83
jmp 0x8ee77
movl -0x24(%rbp), %eax
subl $0x33504449, %eax       # imm = 0x33504449
je 0x8ee95
jmp 0x8eea3
movl -0x1c(%rbp), %edi
movq -0x10(%rbp), %rsi
callq 0x93a00
movq %rax, -0x18(%rbp)
jmp 0x8eeab
movl -0x1c(%rbp), %edi
callq 0x93f60
movq %rax, -0x18(%rbp)
jmp 0x8eeab
movq $0x0, -0x18(%rbp)
movl -0x1c(%rbp), %edi
callq 0x30960
movq -0x18(%rbp), %rax
movq %rax, -0x8(%rbp)
movq -0x8(%rbp), %rax
addq $0x30, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/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
movq %rsp, %rbp
subq $0x20, %rsp
movl %edi, -0x8(%rbp)
movss %xmm0, -0xc(%rbp)
movl %esi, -0x10(%rbp)
movss %xmm1, -0x14(%rbp)
cmpb $0x0, 0x5ad111(%rip)    # 0x63c000
jne 0x8eef6
callq 0x8ed00
movl -0x8(%rbp), %eax
cmpl 0x5ad105(%rip), %eax    # 0x63c004
jb 0x8ef0a
movl $0xffffffff, -0x4(%rbp) # imm = 0xFFFFFFFF
jmp 0x8ef4a
movq 0x5ad0f7(%rip), %rax    # 0x63c008
movslq -0x8(%rbp), %rcx
movq (%rax,%rcx,8), %rax
movq %rax, -0x20(%rbp)
movss -0xc(%rbp), %xmm0
movq -0x20(%rbp), %rax
movss %xmm0, 0xc(%rax)
movl -0x10(%rbp), %ecx
movq -0x20(%rbp), %rax
movl %ecx, 0x4(%rax)
movss -0x14(%rbp), %xmm0
movq -0x20(%rbp), %rax
movss %xmm0, 0x10(%rax)
movl $0x0, -0x4(%rbp)
movl -0x4(%rbp), %eax
addq $0x20, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/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
movq %rsp, %rbp
subq $0x30, %rsp
movl %edi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movl %edx, -0x14(%rbp)
movl %ecx, -0x18(%rbp)
cmpb $0x0, 0x5ad044(%rip)    # 0x63c000
jne 0x8efc3
callq 0x8ed00
movl -0x8(%rbp), %eax
cmpl 0x5ad038(%rip), %eax    # 0x63c004
jb 0x8efda
movl $0xffffffff, -0x4(%rbp) # imm = 0xFFFFFFFF
jmp 0x8f0e3
cmpl $0x2400, -0x14(%rbp)    # imm = 0x2400
jb 0x8efef
movl $0xfffffffe, -0x4(%rbp) # imm = 0xFFFFFFFE
jmp 0x8f0e3
cmpq $0x0, -0x10(%rbp)
jne 0x8f002
movl $0xfffffffd, -0x4(%rbp) # imm = 0xFFFFFFFD
jmp 0x8f0e3
movq 0x5acfff(%rip), %rax    # 0x63c008
movslq -0x8(%rbp), %rcx
movq (%rax,%rcx,8), %rax
movq %rax, -0x20(%rbp)
movq -0x20(%rbp), %rax
cmpl $0x1, (%rax)
jne 0x8f070
movl -0x8(%rbp), %ecx
movslq -0x14(%rbp), %rdx
leaq 0x5acff4(%rip), %rax    # 0x63c020
imulq $0xc, %rdx, %rdx
addq %rdx, %rax
movl %ecx, (%rax)
movslq -0x14(%rbp), %rcx
leaq 0x5acfe0(%rip), %rax    # 0x63c020
imulq $0xc, %rcx, %rcx
addq %rcx, %rax
movl $0x0, 0x4(%rax)
movslq -0x14(%rbp), %rcx
leaq 0x5acfc7(%rip), %rax    # 0x63c020
imulq $0xc, %rcx, %rcx
addq %rcx, %rax
movl $0x0, 0x8(%rax)
movl $0x0, -0x4(%rbp)
jmp 0x8f0e3
movq -0x20(%rbp), %rdi
movq -0x10(%rbp), %rsi
callq 0x8f0f0
movl %eax, -0x24(%rbp)
movl -0x24(%rbp), %eax
movq -0x20(%rbp), %rcx
cmpl 0x20(%rcx), %eax
jne 0x8f095
movl $0xfffffffd, -0x4(%rbp) # imm = 0xFFFFFFFD
jmp 0x8f0e3
movl -0x8(%rbp), %ecx
movslq -0x14(%rbp), %rdx
leaq 0x5acf7d(%rip), %rax    # 0x63c020
imulq $0xc, %rdx, %rdx
addq %rdx, %rax
movl %ecx, (%rax)
movl -0x24(%rbp), %ecx
movslq -0x14(%rbp), %rdx
leaq 0x5acf66(%rip), %rax    # 0x63c020
imulq $0xc, %rdx, %rdx
addq %rdx, %rax
movl %ecx, 0x8(%rax)
movl -0x18(%rbp), %ecx
movslq -0x14(%rbp), %rdx
leaq 0x5acf4e(%rip), %rax    # 0x63c020
imulq $0xc, %rdx, %rdx
addq %rdx, %rax
movl %ecx, 0x4(%rax)
movl $0x0, -0x4(%rbp)
movl -0x4(%rbp), %eax
addq $0x30, %rsp
popq %rbp
retq
nopl (%rax)
// File: /workspace/github_c_makefile_star2_O0/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 %rbp
movq %rsp, %rbp
subq $0x40, %rsp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movl $0x0, -0x14(%rbp)
movq -0x8(%rbp), %rax
movl (%rax), %eax
movl %eax, -0x34(%rbp)
subl $0x2, %eax
je 0x8f124
jmp 0x8f117
movl -0x34(%rbp), %eax
subl $0x3, %eax
je 0x8f183
jmp 0x8f1d7
movq -0x8(%rbp), %rax
movq %rax, -0x20(%rbp)
movl $0x0, -0x14(%rbp)
movl -0x14(%rbp), %eax
movq -0x20(%rbp), %rcx
cmpl 0x20(%rcx), %eax
jge 0x8f181
movq -0x20(%rbp), %rax
movq 0x70(%rax), %rax
movl -0x14(%rbp), %ecx
movq -0x20(%rbp), %rdx
imull 0x64(%rdx), %ecx
movslq %ecx, %rcx
addq %rcx, %rax
movq %rax, -0x28(%rbp)
movq -0x28(%rbp), %rdi
addq $0x18, %rdi
movq -0x10(%rbp), %rsi
callq 0x6820
cmpl $0x0, %eax
jne 0x8f174
jmp 0x8f181
jmp 0x8f176
movl -0x14(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x14(%rbp)
jmp 0x8f133
jmp 0x8f1d7
movq -0x8(%rbp), %rax
movq %rax, -0x30(%rbp)
movl $0x0, -0x14(%rbp)
movl -0x14(%rbp), %eax
movq -0x30(%rbp), %rcx
cmpl 0x20(%rcx), %eax
jge 0x8f1d5
movq -0x30(%rbp), %rax
movq 0xb8(%rax), %rdi
movslq -0x14(%rbp), %rax
imulq $0x38, %rax, %rax
addq %rax, %rdi
addq $0x28, %rdi
movq -0x10(%rbp), %rsi
callq 0x6820
cmpl $0x0, %eax
jne 0x8f1c8
jmp 0x8f1d5
jmp 0x8f1ca
movl -0x14(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x14(%rbp)
jmp 0x8f192
jmp 0x8f1d7
movl -0x14(%rbp), %eax
addq $0x40, %rsp
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O0/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
movq %rsp, %rbp
subq $0x50, %rsp
movl %edi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq %rdx, -0x18(%rbp)
movl %ecx, -0x1c(%rbp)
movl %r8d, -0x20(%rbp)
cmpb $0x0, 0x5acdff(%rip)    # 0x63c000
jne 0x8f208
callq 0x8ed00
movl -0x8(%rbp), %eax
cmpl 0x5acdf3(%rip), %eax    # 0x63c004
jb 0x8f21f
movl $0xffffffff, -0x4(%rbp) # imm = 0xFFFFFFFF
jmp 0x8f31d
leaq -0x40(%rbp), %rdi
xorl %esi, %esi
movl $0x18, %edx
callq 0x62d0
movq 0x5acdd2(%rip), %rax    # 0x63c008
movslq -0x8(%rbp), %rcx
movq (%rax,%rcx,8), %rax
movq %rax, -0x28(%rbp)
movq -0x28(%rbp), %rax
cmpl $0x2, (%rax)
jge 0x8f257
movl $0x0, -0x4(%rbp)
jmp 0x8f31d
movq -0x28(%rbp), %rdi
movq -0x10(%rbp), %rsi
callq 0x8f0f0
movl %eax, -0x4c(%rbp)
movl -0x4c(%rbp), %eax
movq -0x28(%rbp), %rcx
cmpl 0x20(%rcx), %eax
jne 0x8f27f
movl $0xfffffffe, -0x4(%rbp) # imm = 0xFFFFFFFE
jmp 0x8f31d
movl -0x4c(%rbp), %eax
movl %eax, -0x40(%rbp)
movq -0x28(%rbp), %rdi
movq -0x18(%rbp), %rsi
callq 0x8f0f0
movl %eax, -0x4c(%rbp)
movl -0x4c(%rbp), %eax
movq -0x28(%rbp), %rcx
cmpl 0x20(%rcx), %eax
jne 0x8f2aa
movl $0xfffffffd, -0x4(%rbp) # imm = 0xFFFFFFFD
jmp 0x8f31d
movl -0x4c(%rbp), %eax
movl %eax, -0x3c(%rbp)
movl -0x1c(%rbp), %eax
movl %eax, -0x38(%rbp)
movl -0x20(%rbp), %eax
movl %eax, -0x34(%rbp)
movl $0x1, %edi
movl $0x18, %esi
callq 0x6880
movq %rax, -0x48(%rbp)
cmpq $0x0, -0x48(%rbp)
jne 0x8f2df
movl $0xfffffffc, -0x4(%rbp) # imm = 0xFFFFFFFC
jmp 0x8f31d
movq -0x48(%rbp), %rax
movq -0x40(%rbp), %rcx
movq %rcx, (%rax)
movq -0x38(%rbp), %rcx
movq %rcx, 0x8(%rax)
movq -0x30(%rbp), %rcx
movq %rcx, 0x10(%rax)
movq -0x28(%rbp), %rax
movq 0x40(%rax), %rcx
movq -0x48(%rbp), %rax
movq %rcx, 0x10(%rax)
movq -0x48(%rbp), %rcx
movq -0x28(%rbp), %rax
movq %rcx, 0x40(%rax)
movl $0x0, -0x4(%rbp)
movl -0x4(%rbp), %eax
addq $0x50, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/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
movq %rsp, %rbp
subq $0x40, %rsp
movl %edi, -0x8(%rbp)
movl %esi, -0xc(%rbp)
movsd %xmm0, -0x18(%rbp)
movsd %xmm1, -0x20(%rbp)
movsd %xmm2, -0x28(%rbp)
movsd %xmm3, -0x30(%rbp)
movl %edx, -0x34(%rbp)
cmpb $0x0, 0x5acac4(%rip)    # 0x63c000
jne 0x8f543
callq 0x8ed00
movl -0x8(%rbp), %eax
cmpl 0x5acab8(%rip), %eax    # 0x63c004
jb 0x8f55a
movl $0xffffffff, -0x4(%rbp) # imm = 0xFFFFFFFF
jmp 0x8f670
cmpl $0x2400, -0xc(%rbp)     # imm = 0x2400
jb 0x8f56f
movl $0xfffffffe, -0x4(%rbp) # imm = 0xFFFFFFFE
jmp 0x8f670
movsd -0x18(%rbp), %xmm0
cvtsd2ss %xmm0, %xmm0
movl -0x34(%rbp), %eax
shrl $0x2, %eax
andl $0x1, %eax
leaq (%rax,%rax,8), %rax
shll $0xe, %eax
leaq 0x5cfab1(%rip), %rcx    # 0x65f040
movq %rcx, %rdx
addq %rax, %rdx
movslq -0xc(%rbp), %rax
shlq $0x4, %rax
movss %xmm0, (%rax,%rdx)
movsd -0x20(%rbp), %xmm0
cvtsd2ss %xmm0, %xmm0
movl -0x34(%rbp), %eax
shrl $0x2, %eax
andl $0x1, %eax
leaq (%rax,%rax,8), %rax
shll $0xe, %eax
movq %rcx, %rdx
addq %rax, %rdx
movslq -0xc(%rbp), %rax
shlq $0x4, %rax
movss %xmm0, 0x4(%rax,%rdx)
movsd -0x28(%rbp), %xmm0
cvtsd2ss %xmm0, %xmm0
movl -0x34(%rbp), %eax
shrl $0x2, %eax
andl $0x1, %eax
leaq (%rax,%rax,8), %rax
shll $0xe, %eax
addq %rax, %rcx
movslq -0xc(%rbp), %rax
shlq $0x4, %rax
movss %xmm0, 0x8(%rax,%rcx)
movsd -0x30(%rbp), %xmm0
cvttsd2si %xmm0, %eax
cwtl
orl $0x800, %eax            # imm = 0x800
movw %ax, %cx
movl -0x34(%rbp), %eax
sarl $0x2, %eax
andl $0x1, %eax
movslq %eax, %rdx
leaq 0x5cfa22(%rip), %rax    # 0x65f040
imulq $0x24000, %rdx, %rdx    # imm = 0x24000
addq %rdx, %rax
movslq -0xc(%rbp), %rdx
shlq $0x4, %rdx
addq %rdx, %rax
movw %cx, 0xc(%rax)
movl -0x34(%rbp), %eax
movw %ax, %cx
movl -0x34(%rbp), %eax
sarl $0x2, %eax
andl $0x1, %eax
movslq %eax, %rdx
leaq 0x5cf9f0(%rip), %rax    # 0x65f040
imulq $0x24000, %rdx, %rdx    # imm = 0x24000
addq %rdx, %rax
movslq -0xc(%rbp), %rdx
shlq $0x4, %rdx
addq %rdx, %rax
movw %cx, 0xe(%rax)
movl $0x0, -0x4(%rbp)
movl -0x4(%rbp), %eax
addq $0x40, %rsp
popq %rbp
retq
nopl (%rax)
// File: /workspace/github_c_makefile_star2_O0/jonof[P]jftekwar/jfbuild/src/mdsprite.c
// Function: md_undefinetile
int md_undefinetile(int tile)
{
	if (!mdinited) return 0;
	if ((unsigned)tile >= (unsigned)MAXTILES) return -1;

	tile2model[tile].modelid = -1;
	return 0;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
movl %edi, -0x8(%rbp)
cmpb $0x0, 0x5ac972(%rip)    # 0x63c000
jne 0x8f699
movl $0x0, -0x4(%rbp)
jmp 0x8f6ca
cmpl $0x2400, -0x8(%rbp)     # imm = 0x2400
jb 0x8f6ab
movl $0xffffffff, -0x4(%rbp) # imm = 0xFFFFFFFF
jmp 0x8f6ca
movslq -0x8(%rbp), %rcx
leaq 0x5ac96a(%rip), %rax    # 0x63c020
imulq $0xc, %rcx, %rcx
addq %rcx, %rax
movl $0xffffffff, (%rax)     # imm = 0xFFFFFFFF
movl $0x0, -0x4(%rbp)
movl -0x4(%rbp), %eax
popq %rbp
retq
nop
// File: /workspace/github_c_makefile_star2_O0/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:
pushq %rbp
movq %rsp, %rbp
subq $0x10, %rsp
movl %edi, -0x8(%rbp)
cmpb $0x0, 0x5ac91e(%rip)    # 0x63c000
jne 0x8f6f0
movl $0x0, -0x4(%rbp)
jmp 0x8f78a
movl -0x8(%rbp), %eax
cmpl 0x5ac90b(%rip), %eax    # 0x63c004
jb 0x8f707
movl $0xffffffff, -0x4(%rbp) # imm = 0xFFFFFFFF
jmp 0x8f78a
movl $0x23ff, -0xc(%rbp)     # imm = 0x23FF
cmpl $0x0, -0xc(%rbp)
jl 0x8f752
movslq -0xc(%rbp), %rcx
leaq 0x5ac901(%rip), %rax    # 0x63c020
imulq $0xc, %rcx, %rcx
addq %rcx, %rax
movl (%rax), %eax
cmpl -0x8(%rbp), %eax
jne 0x8f745
movslq -0xc(%rbp), %rcx
leaq 0x5ac8e8(%rip), %rax    # 0x63c020
imulq $0xc, %rcx, %rcx
addq %rcx, %rax
movl $0xffffffff, (%rax)     # imm = 0xFFFFFFFF
jmp 0x8f747
movl -0xc(%rbp), %eax
addl $-0x1, %eax
movl %eax, -0xc(%rbp)
jmp 0x8f70e
cmpq $0x0, 0x5ac8ae(%rip)    # 0x63c008
je 0x8f783
movq 0x5ac8a5(%rip), %rax    # 0x63c008
movslq -0x8(%rbp), %rcx
movq (%rax,%rcx,8), %rdi
callq 0x8e920
movq 0x5ac891(%rip), %rax    # 0x63c008
movslq -0x8(%rbp), %rcx
movq $0x0, (%rax,%rcx,8)
movl $0x0, -0x4(%rbp)
movl -0x4(%rbp), %eax
addq $0x10, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/jonof[P]jftekwar/jfbuild/src/mdsprite.c
// Function: md_initident
static void md_initident(PTMIdent *id, const char * filename, int effects)
{
    memset(id, 0, sizeof(PTMIdent));
    id->effects = effects;
    strncpy(id->filename, filename, sizeof(id->filename)-1);
    id->filename[sizeof(id->filename)-1] = 0;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x20, %rsp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movl %edx, -0x14(%rbp)
movq -0x8(%rbp), %rdi
xorl %esi, %esi
movl $0x418, %edx            # imm = 0x418
callq 0x62d0
movl -0x14(%rbp), %ecx
movq -0x8(%rbp), %rax
movl %ecx, 0x14(%rax)
movq -0x8(%rbp), %rdi
addq $0x18, %rdi
movq -0x10(%rbp), %rsi
movl $0x3ff, %edx            # imm = 0x3FF
callq 0x6180
movq -0x8(%rbp), %rax
movb $0x0, 0x417(%rax)
addq $0x20, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/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:
pushq %rbp
movq %rsp, %rbp
subq $0x10, %rsp
movq %rdi, -0x8(%rbp)
cmpq $0x0, -0x8(%rbp)
jne 0x902b5
jmp 0x90306
movq -0x8(%rbp), %rax
cmpq $0x0, 0x48(%rax)
je 0x902cd
movq -0x8(%rbp), %rax
movq 0x48(%rax), %rdi
callq 0x61c0
movq -0x8(%rbp), %rax
cmpq $0x0, 0x20(%rax)
je 0x902e5
movq -0x8(%rbp), %rax
movq 0x20(%rax), %rdi
callq 0x61c0
movq -0x8(%rbp), %rax
cmpq $0x0, 0x18(%rax)
je 0x902fd
movq -0x8(%rbp), %rax
movq 0x18(%rax), %rdi
callq 0x61c0
movq -0x8(%rbp), %rdi
callq 0x61c0
addq $0x10, %rsp
popq %rbp
retq
nopl (%rax)
// File: /workspace/github_c_makefile_star2_O0/jonof[P]jftekwar/jfbuild/src/mdsprite.c
// Function: mddraw
int mddraw (spritetype *tspr, int method)
{
	mdmodel *vm;

	if (maxmodelverts > allocmodelverts)
	{
		point3d *vl = (point3d *)realloc(vertlist,sizeof(point3d)*maxmodelverts);
		if (!vl) { buildprintf("ERROR: Not enough memory to allocate %d vertices!\n",maxmodelverts); return 0; }
		vertlist = vl; allocmodelverts = maxmodelverts;
	}
	if (maxelementvbo > allocelementvbo)
	{
		struct polymostvboitem *vbo = (struct polymostvboitem *)realloc(elementvbo, maxelementvbo * sizeof(struct polymostvboitem));
		if (!vbo) { buildprintf("ERROR: Not enough memory to allocate %d vertex buffer items!\n",maxelementvbo); return 0; }
		elementvbo = vbo; allocelementvbo = maxelementvbo;
	}

	vm = models[tile2model[tspr->picnum].modelid];
	if (vm->mdnum == 1) { return voxdraw((voxmodel *)vm,tspr,method); }
	if (vm->mdnum == 2) { return md2draw((md2model *)vm,tspr,method); }
	if (vm->mdnum == 3) { return md3draw((md3model *)vm,tspr,method); }
	return 0;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x30, %rsp
movq %rdi, -0x10(%rbp)
movl %esi, -0x14(%rbp)
movl 0x5c2ad3(%rip), %eax    # 0x657028
cmpl 0x5c2ad1(%rip), %eax    # 0x65702c
jle 0x945b6
movq 0x5c2abc(%rip), %rdi    # 0x657020
movslq 0x5c2abd(%rip), %rax    # 0x657028
imulq $0xc, %rax, %rsi
callq 0x6110
movq %rax, -0x28(%rbp)
cmpq $0x0, -0x28(%rbp)
jne 0x9459f
movl 0x5c2aa3(%rip), %esi    # 0x657028
leaq 0x22c40(%rip), %rdi     # 0xb71cc
movb $0x0, %al
callq 0x37c90
movl $0x0, -0x4(%rbp)
jmp 0x946a7
movq -0x28(%rbp), %rax
movq %rax, 0x5c2a76(%rip)    # 0x657020
movl 0x5c2a78(%rip), %eax    # 0x657028
movl %eax, 0x5c2a76(%rip)    # 0x65702c
movl 0x5c2a7c(%rip), %eax    # 0x657038
cmpl 0x5c2a7a(%rip), %eax    # 0x65703c
jle 0x9461d
movq 0x5c2a65(%rip), %rdi    # 0x657030
movslq 0x5c2a66(%rip), %rax    # 0x657038
imulq $0x14, %rax, %rsi
callq 0x6110
movq %rax, -0x30(%rbp)
cmpq $0x0, -0x30(%rbp)
jne 0x94606
movl 0x5c2a4c(%rip), %esi    # 0x657038
leaq 0x22c0c(%rip), %rdi     # 0xb71ff
movb $0x0, %al
callq 0x37c90
movl $0x0, -0x4(%rbp)
jmp 0x946a7
movq -0x30(%rbp), %rax
movq %rax, 0x5c2a1f(%rip)    # 0x657030
movl 0x5c2a21(%rip), %eax    # 0x657038
movl %eax, 0x5c2a1f(%rip)    # 0x65703c
movq 0x5a79e4(%rip), %rax    # 0x63c008
movq -0x10(%rbp), %rcx
movswq 0xe(%rcx), %rdx
leaq 0x5a79ec(%rip), %rcx    # 0x63c020
imulq $0xc, %rdx, %rdx
addq %rdx, %rcx
movslq (%rcx), %rcx
movq (%rax,%rcx,8), %rax
movq %rax, -0x20(%rbp)
movq -0x20(%rbp), %rax
cmpl $0x1, (%rax)
jne 0x94664
movq -0x20(%rbp), %rdi
movq -0x10(%rbp), %rsi
movl -0x14(%rbp), %edx
callq 0x924b0
movl %eax, -0x4(%rbp)
jmp 0x946a7
movq -0x20(%rbp), %rax
cmpl $0x2, (%rax)
jne 0x94682
movq -0x20(%rbp), %rdi
movq -0x10(%rbp), %rsi
movl -0x14(%rbp), %edx
callq 0x946b0
movl %eax, -0x4(%rbp)
jmp 0x946a7
movq -0x20(%rbp), %rax
cmpl $0x3, (%rax)
jne 0x946a0
movq -0x20(%rbp), %rdi
movq -0x10(%rbp), %rsi
movl -0x14(%rbp), %edx
callq 0x95e00
movl %eax, -0x4(%rbp)
jmp 0x946a7
movl $0x0, -0x4(%rbp)
movl -0x4(%rbp), %eax
addq $0x30, %rsp
popq %rbp
retq