LLM4Binary/decompile-bench-makefile huggingface dataset:
// File: /workspace/github_c_makefile_star2_O0/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:
pushq %rbp
movq %rsp, %rbp
subq $0x30, %rsp
movq %rdi, -0x8(%rbp)
movq $0x0, -0x18(%rbp)
movq $0x0, -0x28(%rbp)
cmpq $0x0, -0x8(%rbp)
jne 0x97488
jmp 0x975a4
movq -0x8(%rbp), %rax
movq 0x40(%rax), %rax
movq %rax, -0x10(%rbp)
cmpq $0x0, -0x10(%rbp)
je 0x974ba
movq -0x10(%rbp), %rax
movq 0x10(%rax), %rax
movq %rax, -0x18(%rbp)
movq -0x10(%rbp), %rdi
callq 0x61c0
movq -0x18(%rbp), %rax
movq %rax, -0x10(%rbp)
jmp 0x97494
movq -0x8(%rbp), %rax
movq 0x48(%rax), %rax
movq %rax, -0x20(%rbp)
cmpq $0x0, -0x20(%rbp)
je 0x974f9
movq -0x20(%rbp), %rax
movq 0x38(%rax), %rax
movq %rax, -0x28(%rbp)
movq -0x20(%rbp), %rax
movq 0x10(%rax), %rdi
callq 0x61c0
movq -0x20(%rbp), %rdi
callq 0x61c0
movq -0x28(%rbp), %rax
movq %rax, -0x20(%rbp)
jmp 0x974c6
movq -0x8(%rbp), %rax
cmpq $0x0, 0x70(%rax)
je 0x97511
movq -0x8(%rbp), %rax
movq 0x70(%rax), %rdi
callq 0x61c0
movq -0x8(%rbp), %rax
cmpq $0x0, 0x78(%rax)
je 0x97529
movq -0x8(%rbp), %rax
movq 0x78(%rax), %rdi
callq 0x61c0
movq -0x8(%rbp), %rax
cmpq $0x0, 0x80(%rax)
je 0x97547
movq -0x8(%rbp), %rax
movq 0x80(%rax), %rdi
callq 0x61c0
movq -0x8(%rbp), %rax
cmpq $0x0, 0x88(%rax)
je 0x97565
movq -0x8(%rbp), %rax
movq 0x88(%rax), %rdi
callq 0x61c0
movq -0x8(%rbp), %rax
cmpq $0x0, 0x90(%rax)
je 0x97583
movq -0x8(%rbp), %rax
movq 0x90(%rax), %rdi
callq 0x61c0
movq -0x8(%rbp), %rax
cmpq $0x0, 0x18(%rax)
je 0x9759b
movq -0x8(%rbp), %rax
movq 0x18(%rax), %rdi
callq 0x61c0
movq -0x8(%rbp), %rdi
callq 0x61c0
addq $0x30, %rsp
popq %rbp
retq
nopw (%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/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:
pushq %rbp
movq %rsp, %rbp
subq $0x40, %rsp
movq %rdi, -0x8(%rbp)
movq $0x0, -0x18(%rbp)
movq $0x0, -0x28(%rbp)
cmpq $0x0, -0x8(%rbp)
jne 0x975d8
jmp 0x97719
movq -0x8(%rbp), %rax
movq 0x40(%rax), %rax
movq %rax, -0x10(%rbp)
cmpq $0x0, -0x10(%rbp)
je 0x9760a
movq -0x10(%rbp), %rax
movq 0x10(%rax), %rax
movq %rax, -0x18(%rbp)
movq -0x10(%rbp), %rdi
callq 0x61c0
movq -0x18(%rbp), %rax
movq %rax, -0x10(%rbp)
jmp 0x975e4
movq -0x8(%rbp), %rax
movq 0x48(%rax), %rax
movq %rax, -0x20(%rbp)
cmpq $0x0, -0x20(%rbp)
je 0x97649
movq -0x20(%rbp), %rax
movq 0x38(%rax), %rax
movq %rax, -0x28(%rbp)
movq -0x20(%rbp), %rax
movq 0x10(%rax), %rdi
callq 0x61c0
movq -0x20(%rbp), %rdi
callq 0x61c0
movq -0x28(%rbp), %rax
movq %rax, -0x20(%rbp)
jmp 0x97616
movq -0x8(%rbp), %rax
cmpq $0x0, 0xc8(%rax)
je 0x976bc
movq -0x8(%rbp), %rax
movl 0xac(%rax), %eax
subl $0x1, %eax
movl %eax, -0x34(%rbp)
cmpl $0x0, -0x34(%rbp)
jl 0x976ac
movq -0x8(%rbp), %rax
movq 0xc8(%rax), %rax
movslq -0x34(%rbp), %rcx
shlq $0x7, %rcx
addq %rcx, %rax
movq %rax, -0x30(%rbp)
movq -0x30(%rbp), %rax
cmpq $0x0, 0x58(%rax)
je 0x9769f
movq -0x30(%rbp), %rax
movq 0x58(%rax), %rdi
callq 0x61c0
jmp 0x976a1
movl -0x34(%rbp), %eax
addl $-0x1, %eax
movl %eax, -0x34(%rbp)
jmp 0x97667
movq -0x8(%rbp), %rax
movq 0xc8(%rax), %rdi
callq 0x61c0
movq -0x8(%rbp), %rax
cmpq $0x0, 0xc0(%rax)
je 0x976da
movq -0x8(%rbp), %rax
movq 0xc0(%rax), %rdi
callq 0x61c0
movq -0x8(%rbp), %rax
cmpq $0x0, 0xb8(%rax)
je 0x976f8
movq -0x8(%rbp), %rax
movq 0xb8(%rax), %rdi
callq 0x61c0
movq -0x8(%rbp), %rax
cmpq $0x0, 0x18(%rax)
je 0x97710
movq -0x8(%rbp), %rax
movq 0x18(%rax), %rdi
callq 0x61c0
movq -0x8(%rbp), %rdi
callq 0x61c0
addq $0x40, %rsp
popq %rbp
retq
nop
// File: /workspace/github_c_makefile_star2_O0/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
movq %rsp, %rbp
subq $0x20, %rsp
movl %edi, -0x4(%rbp)
movl %esi, -0x8(%rbp)
movl %edx, -0xc(%rbp)
movl %ecx, -0x10(%rbp)
movl 0x60f906(%rip), %eax    # 0x6a7040
cmpl 0x60f904(%rip), %eax    # 0x6a7044
jl 0x9778f
movl 0x60f8fc(%rip), %eax    # 0x6a7044
shll %eax
cmpl $0x1000, %eax           # imm = 0x1000
jle 0x9775e
movl 0x60f8ed(%rip), %eax    # 0x6a7044
shll %eax
movl %eax, -0x14(%rbp)
jmp 0x97768
movl $0x1000, %eax           # imm = 0x1000
movl %eax, -0x14(%rbp)
jmp 0x97768
movl -0x14(%rbp), %eax
movl %eax, 0x60f8d3(%rip)    # 0x6a7044
movq 0x60f8f8(%rip), %rdi    # 0x6a7070
movslq 0x60f8c5(%rip), %rax    # 0x6a7044
imulq $0xc, %rax, %rsi
callq 0x6110
movq %rax, 0x60f8e1(%rip)    # 0x6a7070
movl -0x4(%rbp), %eax
imull 0x60f8f3(%rip), %eax    # 0x6a708c
movl -0x8(%rbp), %ecx
imull 0x60f8ad(%rip), %ecx    # 0x6a7050
addl %ecx, %eax
addl -0xc(%rbp), %eax
movl %eax, -0xc(%rbp)
movl -0xc(%rbp), %ecx
movq 0x60f8bb(%rip), %rax    # 0x6a7070
movslq 0x60f884(%rip), %rdx    # 0x6a7040
imulq $0xc, %rdx, %rdx
addq %rdx, %rax
movl %ecx, (%rax)
imull $0x343fd, -0xc(%rbp), %eax # imm = 0x343FD
andl 0x60f8b6(%rip), %eax    # 0x6a7088
movl %eax, -0xc(%rbp)
movl -0x10(%rbp), %ecx
movq 0x60f891(%rip), %rax    # 0x6a7070
movslq 0x60f85a(%rip), %rdx    # 0x6a7040
imulq $0xc, %rdx, %rdx
addq %rdx, %rax
movl %ecx, 0x4(%rax)
movq 0x60f881(%rip), %rax    # 0x6a7078
movslq -0xc(%rbp), %rcx
movl (%rax,%rcx,4), %ecx
movq 0x60f86b(%rip), %rax    # 0x6a7070
movslq 0x60f834(%rip), %rdx    # 0x6a7040
imulq $0xc, %rdx, %rdx
addq %rdx, %rax
movl %ecx, 0x8(%rax)
movl 0x60f824(%rip), %edx    # 0x6a7040
movl %edx, %eax
addl $0x1, %eax
movl %eax, 0x60f819(%rip)    # 0x6a7040
movq 0x60f84a(%rip), %rax    # 0x6a7078
movslq -0xc(%rbp), %rcx
movl %edx, (%rax,%rcx,4)
addq $0x20, %rsp
popq %rbp
retq
nopl (%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/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
movq %rsp, %rbp
movq %rdi, -0x8(%rbp)
movl %esi, -0xc(%rbp)
movl %edx, -0x10(%rbp)
movl -0xc(%rbp), %eax
xorl -0x10(%rbp), %eax
andl $-0x20, %eax
cmpl $0x0, %eax
jne 0x97894
movl -0x10(%rbp), %ecx
movl $0x1, %eax
shll %cl, %eax
xorl %edx, %edx
subl %eax, %edx
xorl $-0x1, %edx
movl -0xc(%rbp), %ecx
movl $0x1, %eax
shll %cl, %eax
movl %eax, %ecx
xorl %eax, %eax
subl %ecx, %eax
andl %eax, %edx
movq -0x8(%rbp), %rax
movl -0xc(%rbp), %ecx
sarl $0x5, %ecx
movslq %ecx, %rcx
orl (%rax,%rcx,4), %edx
movl %edx, (%rax,%rcx,4)
jmp 0x9790c
movl -0xc(%rbp), %eax
sarl $0x5, %eax
movl %eax, -0x14(%rbp)
movl -0x10(%rbp), %eax
sarl $0x5, %eax
movl %eax, -0x18(%rbp)
movl -0xc(%rbp), %ecx
movl $0x1, %eax
shll %cl, %eax
xorl %edx, %edx
subl %eax, %edx
movq -0x8(%rbp), %rax
movslq -0x14(%rbp), %rcx
orl (%rax,%rcx,4), %edx
movl %edx, (%rax,%rcx,4)
movl -0x14(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x14(%rbp)
movl -0x14(%rbp), %eax
cmpl -0x18(%rbp), %eax
jge 0x978ed
movq -0x8(%rbp), %rax
movslq -0x14(%rbp), %rcx
movl $0xffffffff, (%rax,%rcx,4) # imm = 0xFFFFFFFF
movl -0x14(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x14(%rbp)
jmp 0x978cb
movl -0x10(%rbp), %ecx
movl $0x1, %eax
shll %cl, %eax
xorl %edx, %edx
subl %eax, %edx
xorl $-0x1, %edx
movq -0x8(%rbp), %rax
movslq -0x14(%rbp), %rcx
orl (%rax,%rcx,4), %edx
movl %edx, (%rax,%rcx,4)
popq %rbp
retq
nop
// File: /workspace/github_c_makefile_star2_O0/jonof[P]jftekwar/jfbuild/src/mdsprite.c
// Function: cntquad
static void cntquad (int x0, int y0, int z0, int x1, int y1, int z1, int x2, int y2, int z2, int face)
{
	int x, y, z;
	(void)x1; (void)y1; (void)z1; (void)face;

	x = abs(x2-x0); y = abs(y2-y0); z = abs(z2-z0);
	if (!x) x = z; else if (!y) y = z;
	if (x < y) { z = x; x = y; y = z; }
	shcnt[y*shcntp+x]++;
	if (x > gmaxx) gmaxx = x;
	if (y > gmaxy) gmaxy = y;
	garea += (x+(VOXBORDWIDTH<<1))*(y+(VOXBORDWIDTH<<1));
	gvox->qcnt++;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
movl 0x28(%rbp), %eax
movl 0x20(%rbp), %eax
movl 0x18(%rbp), %eax
movl 0x10(%rbp), %eax
movl %edi, -0x4(%rbp)
movl %esi, -0x8(%rbp)
movl %edx, -0xc(%rbp)
movl %ecx, -0x10(%rbp)
movl %r8d, -0x14(%rbp)
movl %r9d, -0x18(%rbp)
movl 0x10(%rbp), %eax
subl -0x4(%rbp), %eax
movl %eax, %ecx
negl %ecx
cmovnsl %ecx, %eax
movl %eax, -0x1c(%rbp)
movl 0x18(%rbp), %eax
subl -0x8(%rbp), %eax
movl %eax, %ecx
negl %ecx
cmovnsl %ecx, %eax
movl %eax, -0x20(%rbp)
movl 0x20(%rbp), %eax
subl -0xc(%rbp), %eax
movl %eax, %ecx
negl %ecx
cmovnsl %ecx, %eax
movl %eax, -0x24(%rbp)
cmpl $0x0, -0x1c(%rbp)
jne 0x97972
movl -0x24(%rbp), %eax
movl %eax, -0x1c(%rbp)
jmp 0x97980
cmpl $0x0, -0x20(%rbp)
jne 0x9797e
movl -0x24(%rbp), %eax
movl %eax, -0x20(%rbp)
jmp 0x97980
movl -0x1c(%rbp), %eax
cmpl -0x20(%rbp), %eax
jge 0x9799a
movl -0x1c(%rbp), %eax
movl %eax, -0x24(%rbp)
movl -0x20(%rbp), %eax
movl %eax, -0x1c(%rbp)
movl -0x24(%rbp), %eax
movl %eax, -0x20(%rbp)
movq 0x60f6ff(%rip), %rax    # 0x6a70a0
movl -0x20(%rbp), %ecx
imull 0x60f6ed(%rip), %ecx    # 0x6a7098
addl -0x1c(%rbp), %ecx
movslq %ecx, %rcx
movl (%rax,%rcx,4), %edx
addl $0x1, %edx
movl %edx, (%rax,%rcx,4)
movl -0x1c(%rbp), %eax
cmpl 0x60f6ed(%rip), %eax    # 0x6a70b0
jle 0x979ce
movl -0x1c(%rbp), %eax
movl %eax, 0x60f6e2(%rip)    # 0x6a70b0
movl -0x20(%rbp), %eax
cmpl 0x60f6d5(%rip), %eax    # 0x6a70ac
jle 0x979e2
movl -0x20(%rbp), %eax
movl %eax, 0x60f6ca(%rip)    # 0x6a70ac
movl -0x1c(%rbp), %eax
addl $0x2, %eax
movl -0x20(%rbp), %ecx
addl $0x2, %ecx
imull %ecx, %eax
addl 0x60f6b1(%rip), %eax    # 0x6a70a8
movl %eax, 0x60f6ab(%rip)    # 0x6a70a8
movq 0x60f68c(%rip), %rax    # 0x6a7090
movl 0x28(%rax), %ecx
addl $0x1, %ecx
movl %ecx, 0x28(%rax)
popq %rbp
retq
nop
// File: /workspace/github_c_makefile_star2_O0/jonof[P]jftekwar/jfbuild/src/mdsprite.c
// Function: isolid
static int isolid (int x, int y, int z)
{
	if ((unsigned int)x >= (unsigned int)xsiz) return(0);
	if ((unsigned int)y >= (unsigned int)ysiz) return(0);
	if ((unsigned int)z >= (unsigned int)zsiz) return(0);
	z += x*yzsiz + y*zsiz; return(vbit[z>>5]&(1<<SHIFTMOD32(z)));
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
movl %edi, -0x8(%rbp)
movl %esi, -0xc(%rbp)
movl %edx, -0x10(%rbp)
movl -0x8(%rbp), %eax
cmpl 0x60edc2(%rip), %eax    # 0x6a7048
jb 0x98291
movl $0x0, -0x4(%rbp)
jmp 0x982f9
movl -0xc(%rbp), %eax
cmpl 0x60edb2(%rip), %eax    # 0x6a704c
jb 0x982a5
movl $0x0, -0x4(%rbp)
jmp 0x982f9
movl -0x10(%rbp), %eax
cmpl 0x60eda2(%rip), %eax    # 0x6a7050
jb 0x982b9
movl $0x0, -0x4(%rbp)
jmp 0x982f9
movl -0x8(%rbp), %eax
imull 0x60edc9(%rip), %eax    # 0x6a708c
movl -0xc(%rbp), %ecx
imull 0x60ed83(%rip), %ecx    # 0x6a7050
addl %ecx, %eax
addl -0x10(%rbp), %eax
movl %eax, -0x10(%rbp)
movq 0x60ed8c(%rip), %rax    # 0x6a7068
movl -0x10(%rbp), %ecx
sarl $0x5, %ecx
movslq %ecx, %rcx
movl (%rax,%rcx,4), %eax
movl -0x10(%rbp), %ecx
movl $0x1, %edx
shll %cl, %edx
movl %edx, %ecx
andl %ecx, %eax
movl %eax, -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: isrectfree
static int isrectfree (int x0, int y0, int dx, int dy)
{
#if 0
	int i, j, x;
	i = y0*gvox->mytexx + x0;
	for(dy=0;dy;dy--,i+=gvox->mytexx)
		for(x=0;x<dx;x++) { j = i+x; if (zbit[j>>5]&(1<<SHIFTMOD32(j))) return(0); }
#else
	int i, c, m, m1, x;

	i = y0*mytexo5 + (x0>>5); dx += x0-1; c = (dx>>5) - (x0>>5);
	m = ~pow2m1[x0&31]; m1 = pow2m1[(dx&31)+1];
	if (!c) { for(m&=m1;dy;dy--,i+=mytexo5) if (zbit[i]&m) return(0); }
	else
	{  for(;dy;dy--,i+=mytexo5)
		{
			if (zbit[i]&m) return(0);
			for(x=1;x<c;x++) if (zbit[i+x]) return(0);
			if (zbit[i+x]&m1) return(0);
		}
	}
#endif
	return(1);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
movl %edi, -0x8(%rbp)
movl %esi, -0xc(%rbp)
movl %edx, -0x10(%rbp)
movl %ecx, -0x14(%rbp)
movl -0xc(%rbp), %eax
imull 0x60ee36(%rip), %eax    # 0x6a7150
movl -0x8(%rbp), %ecx
sarl $0x5, %ecx
addl %ecx, %eax
movl %eax, -0x18(%rbp)
movl -0x8(%rbp), %eax
subl $0x1, %eax
addl -0x10(%rbp), %eax
movl %eax, -0x10(%rbp)
movl -0x10(%rbp), %eax
sarl $0x5, %eax
movl -0x8(%rbp), %ecx
sarl $0x5, %ecx
subl %ecx, %eax
movl %eax, -0x1c(%rbp)
movl -0x8(%rbp), %eax
andl $0x1f, %eax
movslq %eax, %rcx
leaq 0x60ed6e(%rip), %rax    # 0x6a70c0
movl (%rax,%rcx,4), %eax
xorl $-0x1, %eax
movl %eax, -0x20(%rbp)
movl -0x10(%rbp), %eax
andl $0x1f, %eax
addl $0x1, %eax
movslq %eax, %rcx
leaq 0x60ed52(%rip), %rax    # 0x6a70c0
movl (%rax,%rcx,4), %eax
movl %eax, -0x24(%rbp)
cmpl $0x0, -0x1c(%rbp)
jne 0x983c9
movl -0x24(%rbp), %eax
andl -0x20(%rbp), %eax
movl %eax, -0x20(%rbp)
cmpl $0x0, -0x14(%rbp)
je 0x983c4
movq 0x60edc8(%rip), %rax    # 0x6a7158
movslq -0x18(%rbp), %rcx
movl (%rax,%rcx,4), %eax
andl -0x20(%rbp), %eax
cmpl $0x0, %eax
je 0x983ab
movl $0x0, -0x4(%rbp)
jmp 0x9847b
jmp 0x983ad
movl -0x14(%rbp), %eax
addl $-0x1, %eax
movl %eax, -0x14(%rbp)
movl 0x60ed94(%rip), %eax    # 0x6a7150
addl -0x18(%rbp), %eax
movl %eax, -0x18(%rbp)
jmp 0x98383
jmp 0x98474
jmp 0x983cb
cmpl $0x0, -0x14(%rbp)
je 0x98472
movq 0x60ed7c(%rip), %rax    # 0x6a7158
movslq -0x18(%rbp), %rcx
movl (%rax,%rcx,4), %eax
andl -0x20(%rbp), %eax
cmpl $0x0, %eax
je 0x983f7
movl $0x0, -0x4(%rbp)
jmp 0x9847b
movl $0x1, -0x28(%rbp)
movl -0x28(%rbp), %eax
cmpl -0x1c(%rbp), %eax
jge 0x98432
movq 0x60ed4b(%rip), %rax    # 0x6a7158
movl -0x18(%rbp), %ecx
addl -0x28(%rbp), %ecx
movslq %ecx, %rcx
cmpl $0x0, (%rax,%rcx,4)
je 0x98425
movl $0x0, -0x4(%rbp)
jmp 0x9847b
jmp 0x98427
movl -0x28(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x28(%rbp)
jmp 0x983fe
movq 0x60ed1f(%rip), %rax    # 0x6a7158
movl -0x18(%rbp), %ecx
addl -0x28(%rbp), %ecx
movslq %ecx, %rcx
movl (%rax,%rcx,4), %eax
andl -0x24(%rbp), %eax
cmpl $0x0, %eax
je 0x98456
movl $0x0, -0x4(%rbp)
jmp 0x9847b
jmp 0x98458
movl -0x14(%rbp), %eax
addl $-0x1, %eax
movl %eax, -0x14(%rbp)
movl 0x60ece9(%rip), %eax    # 0x6a7150
addl -0x18(%rbp), %eax
movl %eax, -0x18(%rbp)
jmp 0x983cb
jmp 0x98474
movl $0x1, -0x4(%rbp)
movl -0x4(%rbp), %eax
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O0/jonof[P]jftekwar/jfbuild/src/mdsprite.c
// Function: setrect
static void setrect (int x0, int y0, int dx, int dy)
{
#if 0
	int i, j, y;
	i = y0*gvox->mytexx + x0;
	for(y=0;y<dy;y++,i+=gvox->mytexx)
		for(x=0;x<dx;x++) { j = i+x; zbit[j>>5] |= (1<<SHIFTMOD32(j)); }
#else
	int i, c, m, m1, x;

	i = y0*mytexo5 + (x0>>5); dx += x0-1; c = (dx>>5) - (x0>>5);
	m = ~pow2m1[x0&31]; m1 = pow2m1[(dx&31)+1];
	if (!c) { for(m&=m1;dy;dy--,i+=mytexo5) zbit[i] |= m; }
	else
	{  for(;dy;dy--,i+=mytexo5)
		{
			zbit[i] |= m;
			for(x=1;x<c;x++) zbit[i+x] = -1;
			zbit[i+x] |= m1;
		}
	}
#endif
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
movl %edi, -0x4(%rbp)
movl %esi, -0x8(%rbp)
movl %edx, -0xc(%rbp)
movl %ecx, -0x10(%rbp)
movl -0x8(%rbp), %eax
imull 0x60ecb6(%rip), %eax    # 0x6a7150
movl -0x4(%rbp), %ecx
sarl $0x5, %ecx
addl %ecx, %eax
movl %eax, -0x14(%rbp)
movl -0x4(%rbp), %eax
subl $0x1, %eax
addl -0xc(%rbp), %eax
movl %eax, -0xc(%rbp)
movl -0xc(%rbp), %eax
sarl $0x5, %eax
movl -0x4(%rbp), %ecx
sarl $0x5, %ecx
subl %ecx, %eax
movl %eax, -0x18(%rbp)
movl -0x4(%rbp), %eax
andl $0x1f, %eax
movslq %eax, %rcx
leaq 0x60ebee(%rip), %rax    # 0x6a70c0
movl (%rax,%rcx,4), %eax
xorl $-0x1, %eax
movl %eax, -0x1c(%rbp)
movl -0xc(%rbp), %eax
andl $0x1f, %eax
addl $0x1, %eax
movslq %eax, %rcx
leaq 0x60ebd2(%rip), %rax    # 0x6a70c0
movl (%rax,%rcx,4), %eax
movl %eax, -0x20(%rbp)
cmpl $0x0, -0x18(%rbp)
jne 0x98536
movl -0x20(%rbp), %eax
andl -0x1c(%rbp), %eax
movl %eax, -0x1c(%rbp)
cmpl $0x0, -0x10(%rbp)
je 0x98534
movl -0x1c(%rbp), %edx
movq 0x60ec45(%rip), %rax    # 0x6a7158
movslq -0x14(%rbp), %rcx
orl (%rax,%rcx,4), %edx
movl %edx, (%rax,%rcx,4)
movl -0x10(%rbp), %eax
addl $-0x1, %eax
movl %eax, -0x10(%rbp)
movl 0x60ec24(%rip), %eax    # 0x6a7150
addl -0x14(%rbp), %eax
movl %eax, -0x14(%rbp)
jmp 0x98503
jmp 0x985b5
jmp 0x98538
cmpl $0x0, -0x10(%rbp)
je 0x985b3
movl -0x1c(%rbp), %edx
movq 0x60ec10(%rip), %rax    # 0x6a7158
movslq -0x14(%rbp), %rcx
orl (%rax,%rcx,4), %edx
movl %edx, (%rax,%rcx,4)
movl $0x1, -0x24(%rbp)
movl -0x24(%rbp), %eax
cmpl -0x18(%rbp), %eax
jge 0x98583
movq 0x60ebf0(%rip), %rax    # 0x6a7158
movl -0x14(%rbp), %ecx
addl -0x24(%rbp), %ecx
movslq %ecx, %rcx
movl $0xffffffff, (%rax,%rcx,4) # imm = 0xFFFFFFFF
movl -0x24(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x24(%rbp)
jmp 0x98559
movl -0x20(%rbp), %edx
movq 0x60ebcb(%rip), %rax    # 0x6a7158
movl -0x14(%rbp), %ecx
addl -0x24(%rbp), %ecx
movslq %ecx, %rcx
orl (%rax,%rcx,4), %edx
movl %edx, (%rax,%rcx,4)
movl -0x10(%rbp), %eax
addl $-0x1, %eax
movl %eax, -0x10(%rbp)
movl 0x60eba5(%rip), %eax    # 0x6a7150
addl -0x14(%rbp), %eax
movl %eax, -0x14(%rbp)
jmp 0x98538
jmp 0x985b5
popq %rbp
retq
nopw (%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/jonof[P]jftekwar/jfbuild/src/mdsprite.c
// Function: getvox
static int getvox (int x, int y, int z)
{
	z += x*yzsiz + y*zsiz;
	for(x=vcolhashead[(z*214013)&vcolhashsizm1];x>=0;x=vcol[x].n)
		if (vcol[x].p == z) return(vcol[x].c);
	return(0x808080);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
movl %edi, -0x8(%rbp)
movl %esi, -0xc(%rbp)
movl %edx, -0x10(%rbp)
movl -0x8(%rbp), %eax
imull 0x60eab5(%rip), %eax    # 0x6a708c
movl -0xc(%rbp), %ecx
imull 0x60ea6f(%rip), %ecx    # 0x6a7050
addl %ecx, %eax
addl -0x10(%rbp), %eax
movl %eax, -0x10(%rbp)
movq 0x60ea88(%rip), %rax    # 0x6a7078
imull $0x343fd, -0x10(%rbp), %ecx # imm = 0x343FD
andl 0x60ea8b(%rip), %ecx    # 0x6a7088
movslq %ecx, %rcx
movl (%rax,%rcx,4), %eax
movl %eax, -0x8(%rbp)
cmpl $0x0, -0x8(%rbp)
jl 0x9865b
movq 0x60ea5d(%rip), %rax    # 0x6a7070
movslq -0x8(%rbp), %rcx
imulq $0xc, %rcx, %rcx
addq %rcx, %rax
movl (%rax), %eax
cmpl -0x10(%rbp), %eax
jne 0x9863f
movq 0x60ea44(%rip), %rax    # 0x6a7070
movslq -0x8(%rbp), %rcx
imulq $0xc, %rcx, %rcx
addq %rcx, %rax
movl 0x4(%rax), %eax
movl %eax, -0x4(%rbp)
jmp 0x98662
jmp 0x98641
movq 0x60ea28(%rip), %rax    # 0x6a7070
movslq -0x8(%rbp), %rcx
imulq $0xc, %rcx, %rcx
addq %rcx, %rax
movl 0x8(%rax), %eax
movl %eax, -0x8(%rbp)
jmp 0x98606
movl $0x808080, -0x4(%rbp)   # imm = 0x808080
movl -0x4(%rbp), %eax
popq %rbp
retq
nopw (%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/jonof[P]jftekwar/jfbuild/src/polymosttex.c
// Function: PTM_InitIdent
void PTM_InitIdent(PTMIdent *id, PTHead *pth)
{
    memset(id, 0, sizeof(PTMIdent));

    if (!pth) {
        return;
    }

	if (pth->flags & PTH_HIGHTILE) {
        id->type = PTMIDENT_HIGHTILE;

		if (!pth->repldef) {
			if (polymosttexverbosity >= 1) {
				buildprintf("PolymostTex: cannot calculate texture id for pth with no repldef\n");
			}
			memset(id, 0, 16);
			return;
		}

		id->flags = pth->flags & (PTH_CLAMPED | PTH_SKYBOX);
		id->effects = (pth->palnum != pth->repldef->palnum)
            ? hictinting[pth->palnum].f : 0;
		if (pth->flags & PTH_SKYBOX) {
			// hightile + skybox + picnum ought to cover it
		    id->picnum = pth->picnum;
		} else {
		    strncpy(id->filename, pth->repldef->filename, BMAX_PATH);
		}
	} else {
		id->type = PTMIDENT_ART;
		id->flags = pth->flags & (PTH_CLAMPED);
		id->palnum = pth->palnum;
		id->picnum = pth->picnum;
	}
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x20, %rsp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq -0x8(%rbp), %rdi
xorl %esi, %esi
movl $0x418, %edx            # imm = 0x418
callq 0x62d0
cmpq $0x0, -0x10(%rbp)
jne 0x9894c
jmp 0x98a6c
movq -0x10(%rbp), %rax
movzwl 0x38(%rax), %eax
andl $0x2, %eax
cmpl $0x0, %eax
je 0x98a34
movq -0x8(%rbp), %rax
movl $0x1, (%rax)
movq -0x10(%rbp), %rax
cmpq $0x0, 0x40(%rax)
jne 0x989a1
cmpl $0x1, 0x49254(%rip)     # 0xe1bd0
jl 0x9898c
leaq 0x1f573(%rip), %rdi     # 0xb7ef8
movb $0x0, %al
callq 0x37c90
movq -0x8(%rbp), %rdi
xorl %esi, %esi
movl $0x10, %edx
callq 0x62d0
jmp 0x98a6c
movq -0x10(%rbp), %rax
movzwl 0x38(%rax), %ecx
andl $0x5, %ecx
movq -0x8(%rbp), %rax
movl %ecx, 0x4(%rax)
movq -0x10(%rbp), %rax
movl 0x34(%rax), %eax
movq -0x10(%rbp), %rcx
movq 0x40(%rcx), %rcx
movzbl 0x8(%rcx), %ecx
cmpl %ecx, %eax
je 0x989e3
movq -0x10(%rbp), %rax
movslq 0x34(%rax), %rcx
leaq 0x5a3227(%rip), %rax    # 0x63bc00
movzbl 0x3(%rax,%rcx,4), %eax
movl %eax, -0x14(%rbp)
jmp 0x989ea
xorl %eax, %eax
movl %eax, -0x14(%rbp)
jmp 0x989ea
movl -0x14(%rbp), %ecx
movq -0x8(%rbp), %rax
movl %ecx, 0x14(%rax)
movq -0x10(%rbp), %rax
movzwl 0x38(%rax), %eax
andl $0x4, %eax
cmpl $0x0, %eax
je 0x98a14
movq -0x10(%rbp), %rax
movl 0x30(%rax), %ecx
movq -0x8(%rbp), %rax
movl %ecx, 0xc(%rax)
jmp 0x98a32
movq -0x8(%rbp), %rdi
addq $0x18, %rdi
movq -0x10(%rbp), %rax
movq 0x40(%rax), %rax
movq 0x10(%rax), %rsi
movl $0x400, %edx            # imm = 0x400
callq 0x6180
jmp 0x98a6c
movq -0x8(%rbp), %rax
movl $0x0, (%rax)
movq -0x10(%rbp), %rax
movzwl 0x38(%rax), %ecx
andl $0x1, %ecx
movq -0x8(%rbp), %rax
movl %ecx, 0x4(%rax)
movq -0x10(%rbp), %rax
movl 0x34(%rax), %ecx
movq -0x8(%rbp), %rax
movl %ecx, 0x8(%rax)
movq -0x10(%rbp), %rax
movl 0x30(%rax), %ecx
movq -0x8(%rbp), %rax
movl %ecx, 0xc(%rax)
addq $0x20, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/jonof[P]jftekwar/jfbuild/src/polymosttex.c
// Function: PTM_GetHead
PTMHead * PTM_GetHead(const PTMIdent *id)
{
	PTMHash * ptmh;
	int i;
    unsigned int idcrc;

    idcrc = crc32once((unsigned char *)id, sizeof(PTMIdent));

	i = ptm_gethashhead(idcrc);
	ptmh = ptmhashhead[i];

	while (ptmh) {
        if (ptmh->idcrc == idcrc &&
            memcmp(&ptmh->id, id, sizeof(PTMIdent)) == 0) {
			return &ptmh->head;
		}
		ptmh = ptmh->next;
	}

	ptmh = (PTMHash *) malloc(sizeof(PTMHash));
	if (ptmh) {
		memset(ptmh, 0, sizeof(PTMHash));

        ptmh->idcrc = idcrc;
		memcpy(&ptmh->id, id, sizeof(PTMIdent));
		ptmh->next = ptmhashhead[i];
		ptmhashhead[i] = ptmh;
	}

	return &ptmh->head;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x20, %rsp
movq %rdi, -0x10(%rbp)
movq -0x10(%rbp), %rdi
movl $0x418, %esi            # imm = 0x418
callq 0xa8430
movl %eax, -0x20(%rbp)
movl -0x20(%rbp), %edi
callq 0x98b90
movl %eax, -0x1c(%rbp)
movslq -0x1c(%rbp), %rcx
leaq 0x60e6ad(%rip), %rax    # 0x6a7160
movq (%rax,%rcx,8), %rax
movq %rax, -0x18(%rbp)
cmpq $0x0, -0x18(%rbp)
je 0x98b07
movq -0x18(%rbp), %rax
movl 0x20(%rax), %eax
cmpl -0x20(%rbp), %eax
jne 0x98afa
movq -0x18(%rbp), %rdi
addq $0x24, %rdi
movq -0x10(%rbp), %rsi
movl $0x418, %edx            # imm = 0x418
callq 0x6ab0
cmpl $0x0, %eax
jne 0x98afa
movq -0x18(%rbp), %rax
addq $0x8, %rax
movq %rax, -0x8(%rbp)
jmp 0x98b81
movq -0x18(%rbp), %rax
movq (%rax), %rax
movq %rax, -0x18(%rbp)
jmp 0x98abb
movl $0x440, %edi            # imm = 0x440
callq 0x68f0
movq %rax, -0x18(%rbp)
cmpq $0x0, -0x18(%rbp)
je 0x98b75
movq -0x18(%rbp), %rdi
xorl %esi, %esi
movl $0x440, %edx            # imm = 0x440
callq 0x62d0
movl -0x20(%rbp), %ecx
movq -0x18(%rbp), %rax
movl %ecx, 0x20(%rax)
movq -0x18(%rbp), %rdi
addq $0x24, %rdi
movq -0x10(%rbp), %rsi
movl $0x418, %edx            # imm = 0x418
callq 0x60c0
movslq -0x1c(%rbp), %rcx
leaq 0x60e609(%rip), %rax    # 0x6a7160
movq (%rax,%rcx,8), %rcx
movq -0x18(%rbp), %rax
movq %rcx, (%rax)
movq -0x18(%rbp), %rdx
movslq -0x1c(%rbp), %rcx
leaq 0x60e5ef(%rip), %rax    # 0x6a7160
movq %rdx, (%rax,%rcx,8)
movq -0x18(%rbp), %rax
addq $0x8, %rax
movq %rax, -0x8(%rbp)
movq -0x8(%rbp), %rax
addq $0x20, %rsp
popq %rbp
retq
nopl (%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/jonof[P]jftekwar/jfbuild/src/polymosttex.c
// Function: PTM_GetLoadTextureFileErrorString
const char * PTM_GetLoadTextureFileErrorString(int err)
{
	switch (err) {
		case 0:
			return "no error";
		case -1:
			return "not found";
		case -2:
			return "out of memory";
		case -3:
			return "truncated read";
		case -4:
			return "unrecognised format";
		case -5:
			return "decode error";
		default:
			return "unknown error";
	}
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
movl %edi, -0xc(%rbp)
movl -0xc(%rbp), %eax
addl $0x5, %eax
movl %eax, %ecx
movq %rcx, -0x18(%rbp)
subl $0x5, %eax
ja 0x9a05a
movq -0x18(%rbp), %rax
leaq 0x1deb9(%rip), %rcx     # 0xb7ebc
movslq (%rcx,%rax,4), %rax
addq %rcx, %rax
jmpq *%rax
leaq 0x1df60(%rip), %rax     # 0xb7f73
movq %rax, -0x8(%rbp)
jmp 0x9a065
leaq 0x1df5c(%rip), %rax     # 0xb7f7c
movq %rax, -0x8(%rbp)
jmp 0x9a065
leaq 0x1df59(%rip), %rax     # 0xb7f86
movq %rax, -0x8(%rbp)
jmp 0x9a065
leaq 0x1df5a(%rip), %rax     # 0xb7f94
movq %rax, -0x8(%rbp)
jmp 0x9a065
leaq 0x1df5c(%rip), %rax     # 0xb7fa3
movq %rax, -0x8(%rbp)
jmp 0x9a065
leaq 0x1df63(%rip), %rax     # 0xb7fb7
movq %rax, -0x8(%rbp)
jmp 0x9a065
leaq 0x1df63(%rip), %rax     # 0xb7fc4
movq %rax, -0x8(%rbp)
movq -0x8(%rbp), %rax
popq %rbp
retq
nopl (%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/jonof[P]jftekwar/jfbuild/src/polymosttex.c
// Function: PTBeginPriming
void PTBeginPriming(void)
{
	PTHash * pth;
	int i;

	for (i=PTHASHHEADSIZ-1; i>=0; i--) {
		pth = pthashhead[i];
		while (pth) {
			pth->primecnt = 0;
			pth = pth->next;
		}
	}

	primecnt = 0;
	primedone = 0;
	primepos = 0;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
movl $0xfff, -0xc(%rbp)      # imm = 0xFFF
cmpl $0x0, -0xc(%rbp)
jl 0x9a0c0
movslq -0xc(%rbp), %rcx
leaq 0x6150d4(%rip), %rax    # 0x6af160
movq (%rax,%rcx,8), %rax
movq %rax, -0x8(%rbp)
cmpq $0x0, -0x8(%rbp)
je 0x9a0b3
movq -0x8(%rbp), %rax
movl $0x0, 0x60(%rax)
movq -0x8(%rbp), %rax
movq (%rax), %rax
movq %rax, -0x8(%rbp)
jmp 0x9a094
jmp 0x9a0b5
movl -0xc(%rbp), %eax
addl $-0x1, %eax
movl %eax, -0xc(%rbp)
jmp 0x9a07b
movl $0x0, 0x61d096(%rip)    # 0x6b7160
movl $0x0, 0x61d090(%rip)    # 0x6b7164
movl $0x0, 0x61d08a(%rip)    # 0x6b7168
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O0/jonof[P]jftekwar/jfbuild/src/polymosttex.c
// Function: PTMarkPrime
void PTMarkPrime(int picnum, int palnum, unsigned short flags)
{
	PTHash * pth;

	pth = pt_findhash(picnum, palnum, flags, 1);
	if (pth) {
		if (pth->primecnt == 0) {
			primecnt++;
		}
		pth->primecnt++;
	}
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x20, %rsp
movw %dx, %ax
movl %edi, -0x4(%rbp)
movl %esi, -0x8(%rbp)
movw %ax, -0xa(%rbp)
movl -0x4(%rbp), %edi
movl -0x8(%rbp), %esi
movl $0x1, %ecx
movzwl -0xa(%rbp), %edx
callq 0x9a140
movq %rax, -0x18(%rbp)
cmpq $0x0, -0x18(%rbp)
je 0x9a13a
movq -0x18(%rbp), %rax
cmpl $0x0, 0x60(%rax)
jne 0x9a12d
movl 0x61d03c(%rip), %eax    # 0x6b7160
addl $0x1, %eax
movl %eax, 0x61d033(%rip)    # 0x6b7160
movq -0x18(%rbp), %rax
movl 0x60(%rax), %ecx
addl $0x1, %ecx
movl %ecx, 0x60(%rax)
addq $0x20, %rsp
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O0/jonof[P]jftekwar/jfbuild/src/polymosttex.c
// Function: PTDoPrime
int PTDoPrime(int* done, int* total)
{
	PTHash * pth;

	if (primepos >= PTHASHHEADSIZ) {
		// done
		return 0;
	}

	if (primepos == 0) {
		int i;

		// first, unload all the textures that are not marked
		for (i=PTHASHHEADSIZ-1; i>=0; i--) {
			pth = pthashhead[i];
			while (pth) {
				if (pth->primecnt == 0) {
					pt_unload(pth);
				}
				pth = pth->next;
			}
		}
	}

	pth = pthashhead[primepos];
	while (pth) {
		if (pth->primecnt > 0) {
			primedone++;
			pt_load(pth);
		}
		pth = pth->next;
	}

	*done = primedone;
	*total = primecnt;
	primepos++;

	return (primepos < PTHASHHEADSIZ);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x30, %rsp
movq %rdi, -0x10(%rbp)
movq %rsi, -0x18(%rbp)
cmpl $0x1000, 0x61cdae(%rip) # imm = 0x1000
jl 0x9a3c8
movl $0x0, -0x4(%rbp)
jmp 0x9a4af
cmpl $0x0, 0x61cd99(%rip)    # 0x6b7168
jne 0x9a427
movl $0xfff, -0x24(%rbp)     # imm = 0xFFF
cmpl $0x0, -0x24(%rbp)
jl 0x9a425
movslq -0x24(%rbp), %rcx
leaq 0x614d77(%rip), %rax    # 0x6af160
movq (%rax,%rcx,8), %rax
movq %rax, -0x20(%rbp)
cmpq $0x0, -0x20(%rbp)
je 0x9a418
movq -0x20(%rbp), %rax
cmpl $0x0, 0x60(%rax)
jne 0x9a40b
movq -0x20(%rbp), %rdi
callq 0x9a4c0
movq -0x20(%rbp), %rax
movq (%rax), %rax
movq %rax, -0x20(%rbp)
jmp 0x9a3f1
jmp 0x9a41a
movl -0x24(%rbp), %eax
addl $-0x1, %eax
movl %eax, -0x24(%rbp)
jmp 0x9a3d8
jmp 0x9a427
movslq 0x61cd3a(%rip), %rcx    # 0x6b7168
leaq 0x614d2b(%rip), %rax    # 0x6af160
movq (%rax,%rcx,8), %rax
movq %rax, -0x20(%rbp)
cmpq $0x0, -0x20(%rbp)
je 0x9a473
movq -0x20(%rbp), %rax
cmpl $0x0, 0x60(%rax)
jle 0x9a466
movl 0x61cd10(%rip), %eax    # 0x6b7164
addl $0x1, %eax
movl %eax, 0x61cd07(%rip)    # 0x6b7164
movq -0x20(%rbp), %rdi
callq 0x9a550
movq -0x20(%rbp), %rax
movq (%rax), %rax
movq %rax, -0x20(%rbp)
jmp 0x9a43d
movl 0x61cceb(%rip), %ecx    # 0x6b7164
movq -0x10(%rbp), %rax
movl %ecx, (%rax)
movl 0x61ccdb(%rip), %ecx    # 0x6b7160
movq -0x18(%rbp), %rax
movl %ecx, (%rax)
movl 0x61ccd7(%rip), %eax    # 0x6b7168
addl $0x1, %eax
movl %eax, 0x61ccce(%rip)    # 0x6b7168
cmpl $0x1000, 0x61ccc4(%rip) # imm = 0x1000
setl %al
andb $0x1, %al
movzbl %al, %eax
movl %eax, -0x4(%rbp)
movl -0x4(%rbp), %eax
addq $0x30, %rsp
popq %rbp
retq
nopl (%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/jonof[P]jftekwar/jfbuild/src/polymosttex.c
// Function: pt_unload
static void pt_unload(PTHash * pth)
{
	int i;
	for (i = PTHPIC_SIZE - 1; i>=0; i--) {
		if (pth->head.pic[i] && pth->head.pic[i]->glpic) {
			glfunc.glDeleteTextures(1, &pth->head.pic[i]->glpic);
			pth->head.pic[i]->glpic = 0;
		}
	}
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x10, %rsp
movq %rdi, -0x8(%rbp)
movl $0x5, -0xc(%rbp)
cmpl $0x0, -0xc(%rbp)
jl 0x9a53d
movq -0x8(%rbp), %rax
movslq -0xc(%rbp), %rcx
cmpq $0x0, 0x8(%rax,%rcx,8)
je 0x9a530
movq -0x8(%rbp), %rax
movslq -0xc(%rbp), %rcx
movq 0x8(%rax,%rcx,8), %rax
cmpl $0x0, (%rax)
je 0x9a530
leaq 0x55320e(%rip), %rax    # 0x5ed710
movq 0xc0(%rax), %rax
movq -0x8(%rbp), %rcx
movslq -0xc(%rbp), %rdx
movq 0x8(%rcx,%rdx,8), %rsi
movl $0x1, %edi
callq *%rax
movq -0x8(%rbp), %rax
movslq -0xc(%rbp), %rcx
movq 0x8(%rax,%rcx,8), %rax
movl $0x0, (%rax)
jmp 0x9a532
movl -0xc(%rbp), %eax
addl $-0x1, %eax
movl %eax, -0xc(%rbp)
jmp 0x9a4d3
addq $0x10, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/jonof[P]jftekwar/jfbuild/src/polymosttex.c
// Function: pt_load
static int pt_load(PTHash * pth)
{
	if (pth->head.pic[PTHPIC_BASE] &&
		pth->head.pic[PTHPIC_BASE]->glpic != 0 &&
		(pth->head.pic[PTHPIC_BASE]->flags & PTH_DIRTY) == 0) {
		return 1;	// loaded
	}

	if ((pth->head.flags & PTH_HIGHTILE)) {
		// try and load from a replacement
		if (pt_load_hightile(&pth->head)) {
			return 1;
		}

		// if that failed, get the hash for the ART version and
		//   defer this to there
		pth->deferto = pt_findhash(
				pth->head.picnum, pth->head.palnum,
				(pth->head.flags & ~PTH_HIGHTILE),
				1);
		if (!pth->deferto) {
			return 0;
		}
		return pt_load(pth->deferto);
	}

	if (pt_load_art(&pth->head)) {
		return 1;
	}

	// we're SOL
	return 0;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x10, %rsp
movq %rdi, -0x10(%rbp)
movq -0x10(%rbp), %rax
cmpq $0x0, 0x8(%rax)
je 0x9a595
movq -0x10(%rbp), %rax
movq 0x8(%rax), %rax
cmpl $0x0, (%rax)
je 0x9a595
movq -0x10(%rbp), %rax
movq 0x8(%rax), %rax
movl 0x4(%rax), %eax
andl $0x80, %eax
cmpl $0x0, %eax
jne 0x9a595
movl $0x1, -0x4(%rbp)
jmp 0x9a639
movq -0x10(%rbp), %rax
movzwl 0x40(%rax), %eax
andl $0x2, %eax
cmpl $0x0, %eax
je 0x9a617
movq -0x10(%rbp), %rdi
addq $0x8, %rdi
callq 0x9b340
cmpl $0x0, %eax
je 0x9a5c0
movl $0x1, -0x4(%rbp)
jmp 0x9a639
movq -0x10(%rbp), %rax
movl 0x38(%rax), %edi
movq -0x10(%rbp), %rax
movl 0x3c(%rax), %esi
movq -0x10(%rbp), %rax
movzwl 0x40(%rax), %eax
andl $-0x3, %eax
movl $0x1, %ecx
movzwl %ax, %edx
callq 0x9a140
movq %rax, %rcx
movq -0x10(%rbp), %rax
movq %rcx, 0x58(%rax)
movq -0x10(%rbp), %rax
cmpq $0x0, 0x58(%rax)
jne 0x9a605
movl $0x0, -0x4(%rbp)
jmp 0x9a639
movq -0x10(%rbp), %rax
movq 0x58(%rax), %rdi
callq 0x9a550
movl %eax, -0x4(%rbp)
jmp 0x9a639
movq -0x10(%rbp), %rdi
addq $0x8, %rdi
callq 0x9b6f0
cmpl $0x0, %eax
je 0x9a632
movl $0x1, -0x4(%rbp)
jmp 0x9a639
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/polymosttex.c
// Function: PTReset
void PTReset(void)
{
	PTHash * pth;
	int i;

	for (i=PTHASHHEADSIZ-1; i>=0; i--) {
		pth = pthashhead[i];
		while (pth) {
			pt_unload(pth);
			pth = pth->next;
		}
	}
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x10, %rsp
movl $0xfff, -0xc(%rbp)      # imm = 0xFFF
cmpl $0x0, -0xc(%rbp)
jl 0x9a6a2
movslq -0xc(%rbp), %rcx
leaq 0x614af0(%rip), %rax    # 0x6af160
movq (%rax,%rcx,8), %rax
movq %rax, -0x8(%rbp)
cmpq $0x0, -0x8(%rbp)
je 0x9a695
movq -0x8(%rbp), %rdi
callq 0x9a4c0
movq -0x8(%rbp), %rax
movq (%rax), %rax
movq %rax, -0x8(%rbp)
jmp 0x9a678
jmp 0x9a697
movl -0xc(%rbp), %eax
addl $-0x1, %eax
movl %eax, -0xc(%rbp)
jmp 0x9a65f
addq $0x10, %rsp
popq %rbp
retq
nopl (%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/jonof[P]jftekwar/jfbuild/src/polymosttex.c
// Function: PTClear
void PTClear(void)
{
	PTHash * pth, * next;
	PTMHash * ptmh, * mnext;
	int i;

	for (i=PTHASHHEADSIZ-1; i>=0; i--) {
		pth = pthashhead[i];
		while (pth) {
			next = pth->next;
			pt_unload(pth);
			free(pth);
			pth = next;
		}
		pthashhead[i] = 0;
	}

	for (i=PTMHASHHEADSIZ-1; i>=0; i--) {
		ptmh = ptmhashhead[i];
		while (ptmh) {
			mnext = ptmh->next;
			free(ptmh);
			ptmh = mnext;
		}
		ptmhashhead[i] = 0;
	}
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x30, %rsp
movl $0xfff, -0x24(%rbp)     # imm = 0xFFF
cmpl $0x0, -0x24(%rbp)
jl 0x9a724
movslq -0x24(%rbp), %rcx
leaq 0x614a90(%rip), %rax    # 0x6af160
movq (%rax,%rcx,8), %rax
movq %rax, -0x8(%rbp)
cmpq $0x0, -0x8(%rbp)
je 0x9a706
movq -0x8(%rbp), %rax
movq (%rax), %rax
movq %rax, -0x10(%rbp)
movq -0x8(%rbp), %rdi
callq 0x9a4c0
movq -0x8(%rbp), %rdi
callq 0x61c0
movq -0x10(%rbp), %rax
movq %rax, -0x8(%rbp)
jmp 0x9a6d8
movslq -0x24(%rbp), %rcx
leaq 0x614a4f(%rip), %rax    # 0x6af160
movq $0x0, (%rax,%rcx,8)
movl -0x24(%rbp), %eax
addl $-0x1, %eax
movl %eax, -0x24(%rbp)
jmp 0x9a6bf
movl $0xfff, -0x24(%rbp)     # imm = 0xFFF
cmpl $0x0, -0x24(%rbp)
jl 0x9a787
movslq -0x24(%rbp), %rcx
leaq 0x60ca24(%rip), %rax    # 0x6a7160
movq (%rax,%rcx,8), %rax
movq %rax, -0x18(%rbp)
cmpq $0x0, -0x18(%rbp)
je 0x9a769
movq -0x18(%rbp), %rax
movq (%rax), %rax
movq %rax, -0x20(%rbp)
movq -0x18(%rbp), %rdi
callq 0x61c0
movq -0x20(%rbp), %rax
movq %rax, -0x18(%rbp)
jmp 0x9a744
movslq -0x24(%rbp), %rcx
leaq 0x60c9ec(%rip), %rax    # 0x6a7160
movq $0x0, (%rax,%rcx,8)
movl -0x24(%rbp), %eax
addl $-0x1, %eax
movl %eax, -0x24(%rbp)
jmp 0x9a72b
addq $0x30, %rsp
popq %rbp
retq
nopl (%rax)
// File: /workspace/github_c_makefile_star2_O0/jonof[P]jftekwar/jfbuild/src/polymosttex.c
// Function: PT_GetHead
PTHead * PT_GetHead(int picnum, int palnum, unsigned short flags, int peek)
{
	PTHash * pth;

	pth = pt_findhash(picnum, palnum, flags, peek == 0);
	if (pth == 0) {
		return 0;
	}

	if (!pt_load(pth)) {
		return 0;
	}

	while (pth->deferto) {
		// this might happen if pt_load needs to defer to ART
		pth = pth->deferto;
	}

	return &pth->head;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x20, %rsp
movw %dx, %ax
movl %edi, -0xc(%rbp)
movl %esi, -0x10(%rbp)
movw %ax, -0x12(%rbp)
movl %ecx, -0x18(%rbp)
movl -0xc(%rbp), %edi
movl -0x10(%rbp), %esi
movw -0x12(%rbp), %ax
cmpl $0x0, -0x18(%rbp)
sete %cl
andb $0x1, %cl
movzbl %cl, %ecx
movzwl %ax, %edx
callq 0x9a140
movq %rax, -0x20(%rbp)
cmpq $0x0, -0x20(%rbp)
jne 0x9a7dc
movq $0x0, -0x8(%rbp)
jmp 0x9a81b
movq -0x20(%rbp), %rdi
callq 0x9a550
cmpl $0x0, %eax
jne 0x9a7f4
movq $0x0, -0x8(%rbp)
jmp 0x9a81b
jmp 0x9a7f6
movq -0x20(%rbp), %rax
cmpq $0x0, 0x58(%rax)
je 0x9a80f
movq -0x20(%rbp), %rax
movq 0x58(%rax), %rax
movq %rax, -0x20(%rbp)
jmp 0x9a7f6
movq -0x20(%rbp), %rax
addq $0x8, %rax
movq %rax, -0x8(%rbp)
movq -0x8(%rbp), %rax
addq $0x20, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/jonof[P]jftekwar/jfbuild/src/polymosttex.c
// Function: PTIterNewMatch
PTIter PTIterNewMatch(int match, int picnum, int palnum, unsigned short flagsmask, unsigned short flags)
{
	PTIter iter;

	iter = (PTIter) malloc(sizeof(struct PTIter_typ));
	if (!iter) {
		return 0;
	}

	iter->i = 0;
	iter->pth = pthashhead[0];
	iter->match = match;
	iter->picnum = picnum;
	iter->palnum = palnum;
	iter->flagsmask = flagsmask;
	iter->flags = flags;

	if ((match & PTITER_PICNUM)) {
		iter->i = pt_gethashhead(picnum);
		iter->pth = pthashhead[iter->i];
		if (iter->pth == 0) {
			iter->pth = 0;
			return iter;
		}
	}

	ptiter_seekforward(iter);

	return iter;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x20, %rsp
movw %r8w, %ax
movl %edi, -0xc(%rbp)
movl %esi, -0x10(%rbp)
movl %edx, -0x14(%rbp)
movw %cx, -0x16(%rbp)
movw %ax, -0x18(%rbp)
movl $0x20, %edi
callq 0x68f0
movq %rax, -0x20(%rbp)
cmpq $0x0, -0x20(%rbp)
jne 0x9a86f
movq $0x0, -0x8(%rbp)
jmp 0x9a927
movq -0x20(%rbp), %rax
movl $0x0, (%rax)
movq 0x6148e0(%rip), %rcx    # 0x6af160
movq -0x20(%rbp), %rax
movq %rcx, 0x8(%rax)
movl -0xc(%rbp), %ecx
movq -0x20(%rbp), %rax
movl %ecx, 0x10(%rax)
movl -0x10(%rbp), %ecx
movq -0x20(%rbp), %rax
movl %ecx, 0x14(%rax)
movl -0x14(%rbp), %ecx
movq -0x20(%rbp), %rax
movl %ecx, 0x18(%rax)
movw -0x16(%rbp), %cx
movq -0x20(%rbp), %rax
movw %cx, 0x1c(%rax)
movw -0x18(%rbp), %cx
movq -0x20(%rbp), %rax
movw %cx, 0x1e(%rax)
movl -0xc(%rbp), %eax
andl $0x1, %eax
cmpl $0x0, %eax
je 0x9a916
movl -0x10(%rbp), %edi
callq 0x9a940
movl %eax, %ecx
movq -0x20(%rbp), %rax
movl %ecx, (%rax)
movq -0x20(%rbp), %rax
movslq (%rax), %rcx
leaq 0x614879(%rip), %rax    # 0x6af160
movq (%rax,%rcx,8), %rcx
movq -0x20(%rbp), %rax
movq %rcx, 0x8(%rax)
movq -0x20(%rbp), %rax
cmpq $0x0, 0x8(%rax)
jne 0x9a914
movq -0x20(%rbp), %rax
movq $0x0, 0x8(%rax)
movq -0x20(%rbp), %rax
movq %rax, -0x8(%rbp)
jmp 0x9a927
jmp 0x9a916
movq -0x20(%rbp), %rdi
callq 0x9a960
movq -0x20(%rbp), %rax
movq %rax, -0x8(%rbp)
movq -0x8(%rbp), %rax
addq $0x20, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/jonof[P]jftekwar/jfbuild/src/polymosttex.c
// Function: ptiter_seekforward
static void ptiter_seekforward(PTIter iter)
{
	while (1) {
		if (iter->pth && ptiter_matches(iter)) {
			break;
		}
		if (iter->pth == 0) {
			if ((iter->match & PTITER_PICNUM)) {
				// because the hash key is based on picture number,
				// reaching the end of the hash chain means we need
				// not look further
				break;
			}
			iter->i++;
			if (iter->i >= PTHASHHEADSIZ) {
				// end of hash
				iter->pth = 0;
				iter->i = PTHASHHEADSIZ;
				break;
			}
			iter->pth = pthashhead[iter->i];
		} else {
			iter->pth = iter->pth->next;
		}
	}
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x10, %rsp
movq %rdi, -0x8(%rbp)
movq -0x8(%rbp), %rax
cmpq $0x0, 0x8(%rax)
je 0x9a987
movq -0x8(%rbp), %rdi
callq 0x9bf10
cmpl $0x0, %eax
je 0x9a987
jmp 0x9aa06
movq -0x8(%rbp), %rax
cmpq $0x0, 0x8(%rax)
jne 0x9a9ee
movq -0x8(%rbp), %rax
movl 0x10(%rax), %eax
andl $0x1, %eax
cmpl $0x0, %eax
je 0x9a9a3
jmp 0x9aa06
movq -0x8(%rbp), %rax
movl (%rax), %ecx
addl $0x1, %ecx
movl %ecx, (%rax)
movq -0x8(%rbp), %rax
cmpl $0x1000, (%rax)         # imm = 0x1000
jl 0x9a9d2
movq -0x8(%rbp), %rax
movq $0x0, 0x8(%rax)
movq -0x8(%rbp), %rax
movl $0x1000, (%rax)         # imm = 0x1000
jmp 0x9aa06
movq -0x8(%rbp), %rax
movslq (%rax), %rcx
leaq 0x614780(%rip), %rax    # 0x6af160
movq (%rax,%rcx,8), %rcx
movq -0x8(%rbp), %rax
movq %rcx, 0x8(%rax)
jmp 0x9aa01
movq -0x8(%rbp), %rax
movq 0x8(%rax), %rax
movq (%rax), %rcx
movq -0x8(%rbp), %rax
movq %rcx, 0x8(%rax)
jmp 0x9a96c
addq $0x10, %rsp
popq %rbp
retq
nopl (%rax)
// File: /workspace/github_c_makefile_star2_O0/jonof[P]jftekwar/jfbuild/src/polymosttex.c
// Function: PTIterNext
PTHead * PTIterNext(PTIter iter)
{
	PTHead * found = 0;

	if (!iter) return 0;

	if (iter->pth == 0) {
		return 0;
	}

	found = &iter->pth->head;
	iter->pth = iter->pth->next;

	ptiter_seekforward(iter);

	return found;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x20, %rsp
movq %rdi, -0x10(%rbp)
movq $0x0, -0x18(%rbp)
cmpq $0x0, -0x10(%rbp)
jne 0x9aa55
movq $0x0, -0x8(%rbp)
jmp 0x9aa9e
movq -0x10(%rbp), %rax
cmpq $0x0, 0x8(%rax)
jne 0x9aa6a
movq $0x0, -0x8(%rbp)
jmp 0x9aa9e
movq -0x10(%rbp), %rax
movq 0x8(%rax), %rax
addq $0x8, %rax
movq %rax, -0x18(%rbp)
movq -0x10(%rbp), %rax
movq 0x8(%rax), %rax
movq (%rax), %rcx
movq -0x10(%rbp), %rax
movq %rcx, 0x8(%rax)
movq -0x10(%rbp), %rdi
callq 0x9a960
movq -0x18(%rbp), %rax
movq %rax, -0x8(%rbp)
movq -0x8(%rbp), %rax
addq $0x20, %rsp
popq %rbp
retq
nopl (%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/jonof[P]jftekwar/jfbuild/src/polymosttex.c
// Function: detect_texture_size
static void detect_texture_size(void)
{
	if (gltexmaxsize <= 0) {
		GLint siz = glinfo.maxtexsize;
		if (siz == 0) {
			gltexmaxsize = 6;   // 2^6 = 64 == default GL max texture size
		} else {
			gltexmaxsize = 0;
			for (; siz > 1; siz >>= 1) {
				gltexmaxsize++;
			}
		}
	}
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
leaq 0x552e7d(%rip), %rax    # 0x5ed968
cmpl $0x0, (%rax)
jg 0x9ab48
leaq 0x1202b9(%rip), %rax    # 0x1badb0
movl 0x28(%rax), %eax
movl %eax, -0x4(%rbp)
cmpl $0x0, -0x4(%rbp)
jne 0x9ab12
leaq 0x552e5e(%rip), %rax    # 0x5ed968
movl $0x6, (%rax)
jmp 0x9ab46
leaq 0x552e4f(%rip), %rax    # 0x5ed968
movl $0x0, (%rax)
cmpl $0x1, -0x4(%rbp)
jle 0x9ab44
leaq 0x552e3c(%rip), %rax    # 0x5ed968
movl (%rax), %ecx
addl $0x1, %ecx
leaq 0x552e30(%rip), %rax    # 0x5ed968
movl %ecx, (%rax)
movl -0x4(%rbp), %eax
sarl %eax
movl %eax, -0x4(%rbp)
jmp 0x9ab1f
jmp 0x9ab46
jmp 0x9ab48
popq %rbp
retq
nopw (%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/jonof[P]jftekwar/jfbuild/src/polymosttex.c
// Function: ptiter_matches
static inline int ptiter_matches(PTIter iter)
{
	if (iter->match == 0) {
		return 1;	// matching every item
	}
	if ((iter->match & PTITER_PICNUM) && iter->pth->head.picnum != iter->picnum) {
		return 0;
	}
	if ((iter->match & PTITER_PALNUM) && iter->pth->head.palnum != iter->palnum) {
		return 0;
	}
	if ((iter->match & PTITER_FLAGS) && (iter->pth->head.flags & iter->flagsmask) != iter->flags) {
		return 0;
	}
	return 1;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
movq %rdi, -0x10(%rbp)
movq -0x10(%rbp), %rax
cmpl $0x0, 0x10(%rax)
jne 0x9bf2e
movl $0x1, -0x4(%rbp)
jmp 0x9bfc7
movq -0x10(%rbp), %rax
movl 0x10(%rax), %eax
andl $0x1, %eax
cmpl $0x0, %eax
je 0x9bf5a
movq -0x10(%rbp), %rax
movq 0x8(%rax), %rax
movl 0x38(%rax), %eax
movq -0x10(%rbp), %rcx
cmpl 0x14(%rcx), %eax
je 0x9bf5a
movl $0x0, -0x4(%rbp)
jmp 0x9bfc7
movq -0x10(%rbp), %rax
movl 0x10(%rax), %eax
andl $0x2, %eax
cmpl $0x0, %eax
je 0x9bf86
movq -0x10(%rbp), %rax
movq 0x8(%rax), %rax
movl 0x3c(%rax), %eax
movq -0x10(%rbp), %rcx
cmpl 0x18(%rcx), %eax
je 0x9bf86
movl $0x0, -0x4(%rbp)
jmp 0x9bfc7
movq -0x10(%rbp), %rax
movl 0x10(%rax), %eax
andl $0x4, %eax
cmpl $0x0, %eax
je 0x9bfc0
movq -0x10(%rbp), %rax
movq 0x8(%rax), %rax
movzwl 0x40(%rax), %eax
movq -0x10(%rbp), %rcx
movzwl 0x1c(%rcx), %ecx
andl %ecx, %eax
movq -0x10(%rbp), %rcx
movzwl 0x1e(%rcx), %ecx
cmpl %ecx, %eax
je 0x9bfc0
movl $0x0, -0x4(%rbp)
jmp 0x9bfc7
movl $0x1, -0x4(%rbp)
movl -0x4(%rbp), %eax
popq %rbp
retq
nopl (%rax)
// File: /workspace/github_c_makefile_star2_O0/jonof[P]jftekwar/jfbuild/src/polymosttexcache.c
// Function: PTCacheUnloadIndex
void PTCacheUnloadIndex(void)
{
	PTCacheIndex * pci, * next;
	int i;

	for (i = 0; i < PTCACHEHASHSIZ; i++) {
		pci = cachehead[i];
		while (pci) {
			next = pci->next;
			// we needn't free pci->filename since it was alloced with pci
			free(pci);
			pci = next;
		}
		cachehead[i] = 0;
	}

	buildprintf("PolymostTexCache: cache index unloaded\n");
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x20, %rsp
movl $0x0, -0x14(%rbp)
cmpl $0x200, -0x14(%rbp)     # imm = 0x200
jge 0x9c43f
movslq -0x14(%rbp), %rcx
leaq 0x61ad8d(%rip), %rax    # 0x6b7180
movq (%rax,%rcx,8), %rax
movq %rax, -0x8(%rbp)
cmpq $0x0, -0x8(%rbp)
je 0x9c421
movq -0x8(%rbp), %rax
movq 0x18(%rax), %rax
movq %rax, -0x10(%rbp)
movq -0x8(%rbp), %rdi
callq 0x61c0
movq -0x10(%rbp), %rax
movq %rax, -0x8(%rbp)
jmp 0x9c3fb
movslq -0x14(%rbp), %rcx
leaq 0x61ad54(%rip), %rax    # 0x6b7180
movq $0x0, (%rax,%rcx,8)
movl -0x14(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x14(%rbp)
jmp 0x9c3df
leaq 0x1bdc7(%rip), %rdi     # 0xb820d
movb $0x0, %al
callq 0x37c90
addq $0x20, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/jonof[P]jftekwar/jfbuild/src/polymosttexcache.c
// Function: ptcache_findhash
static PTCacheIndex * ptcache_findhash(const char * filename, int effects, int flags)
{
	PTCacheIndex * pci;

	pci = cachehead[ gethashhead(filename) ];
	if (!pci) {
		return 0;
	}

	flags &= PTH_CLAMPED;

	while (pci) {
		if (effects == pci->effects &&
		    flags == pci->flags &&
		    strcmp(pci->filename, filename) == 0) {
			return pci;
		}
		pci = pci->next;
	}

	return 0;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x20, %rsp
movq %rdi, -0x10(%rbp)
movl %esi, -0x14(%rbp)
movl %edx, -0x18(%rbp)
movq -0x10(%rbp), %rdi
callq 0x9cff0
movl %eax, %eax
movl %eax, %ecx
leaq 0x61acfa(%rip), %rax    # 0x6b7180
movq (%rax,%rcx,8), %rax
movq %rax, -0x20(%rbp)
cmpq $0x0, -0x20(%rbp)
jne 0x9c49f
movq $0x0, -0x8(%rbp)
jmp 0x9c4fc
movl -0x18(%rbp), %eax
andl $0x1, %eax
movl %eax, -0x18(%rbp)
cmpq $0x0, -0x20(%rbp)
je 0x9c4f4
movl -0x14(%rbp), %eax
movq -0x20(%rbp), %rcx
cmpl 0x8(%rcx), %eax
jne 0x9c4e6
movl -0x18(%rbp), %eax
movq -0x20(%rbp), %rcx
cmpl 0xc(%rcx), %eax
jne 0x9c4e6
movq -0x20(%rbp), %rax
movq (%rax), %rdi
movq -0x10(%rbp), %rsi
callq 0x6820
cmpl $0x0, %eax
jne 0x9c4e6
movq -0x20(%rbp), %rax
movq %rax, -0x8(%rbp)
jmp 0x9c4fc
movq -0x20(%rbp), %rax
movq 0x18(%rax), %rax
movq %rax, -0x20(%rbp)
jmp 0x9c4a8
movq $0x0, -0x8(%rbp)
movq -0x8(%rbp), %rax
addq $0x20, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/jonof[P]jftekwar/jfbuild/src/polymosttexcache.c
// Function: ptcache_addhash
static void ptcache_addhash(const char * filename, int effects, int flags, unsigned offset)
{
	unsigned int hash = gethashhead(filename);

	// to reduce memory fragmentation we tack the filename onto the end of the block
	PTCacheIndex * pci = (PTCacheIndex *) malloc(sizeof(PTCacheIndex) + strlen(filename) + 1);

	pci->filename = (char *) pci + sizeof(PTCacheIndex);
	strcpy(pci->filename, filename);
	pci->effects = effects;
	pci->flags   = flags & (PTH_CLAMPED);
	pci->offset  = offset;
	pci->next = cachehead[hash];

	cachehead[hash] = pci;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x20, %rsp
movq %rdi, -0x8(%rbp)
movl %esi, -0xc(%rbp)
movl %edx, -0x10(%rbp)
movl %ecx, -0x14(%rbp)
movq -0x8(%rbp), %rdi
callq 0x9cff0
movl %eax, -0x18(%rbp)
movq -0x8(%rbp), %rdi
callq 0x63d0
movq %rax, %rdi
addq $0x20, %rdi
addq $0x1, %rdi
callq 0x68f0
movq %rax, -0x20(%rbp)
movq -0x20(%rbp), %rcx
addq $0x20, %rcx
movq -0x20(%rbp), %rax
movq %rcx, (%rax)
movq -0x20(%rbp), %rax
movq (%rax), %rdi
movq -0x8(%rbp), %rsi
callq 0x63e0
movl -0xc(%rbp), %ecx
movq -0x20(%rbp), %rax
movl %ecx, 0x8(%rax)
movl -0x10(%rbp), %ecx
andl $0x1, %ecx
movq -0x20(%rbp), %rax
movl %ecx, 0xc(%rax)
movl -0x14(%rbp), %ecx
movq -0x20(%rbp), %rax
movl %ecx, 0x10(%rax)
movl -0x18(%rbp), %eax
movl %eax, %ecx
leaq 0x61abe6(%rip), %rax    # 0x6b7180
movq (%rax,%rcx,8), %rcx
movq -0x20(%rbp), %rax
movq %rcx, 0x18(%rax)
movq -0x20(%rbp), %rdx
movl -0x18(%rbp), %eax
movl %eax, %ecx
leaq 0x61abca(%rip), %rax    # 0x6b7180
movq %rdx, (%rax,%rcx,8)
addq $0x20, %rsp
popq %rbp
retq