LLM4Binary/decompile-bench-makefile huggingface dataset:
// File: /workspace/github_c_makefile_star2_O1/jonof[P]jftekwar/jfbuild/src/baselayer.c
// Function: baselayer_init
int baselayer_init(void)
{
    OSD_Init();

	OSD_RegisterFunction("screencaptureformat","screencaptureformat: sets the output format for screenshots (TGA, PCX, PNG)",osdcmd_vars);

	OSD_RegisterFunction("novoxmips","novoxmips: turn off/on the use of mipmaps when rendering 8-bit voxels",osdcmd_vars);
	OSD_RegisterFunction("usevoxels","usevoxels: enable/disable automatic sprite->voxel rendering",osdcmd_vars);
	OSD_RegisterFunction("usegammabrightness","usegammabrightness: set brightness using system gamma (2), shader (1), or palette (0)",osdcmd_vars);
	OSD_RegisterFunction("listvidmodes","listvidmodes [bpp|win|fs]: show all available video mode combinations",osdcmd_listvidmodes);

#if USE_POLYMOST
	OSD_RegisterFunction("setrendermode","setrendermode <number>: sets the engine's rendering mode.\n"
			"Mode numbers are:\n"
			"   0 - Classic Build software\n"
			"   1 - Polygonal flat-shaded software\n"
			"   2 - Polygonal textured software\n"
#if USE_OPENGL
			"   3 - Polygonal OpenGL\n"
#endif
			,
			osdfunc_setrendermode);
#endif //USE_POLYMOST

#if defined(DEBUGGINGAIDS) && USE_POLYMOST && USE_OPENGL
	OSD_RegisterFunction("hicsetpalettetint","hicsetpalettetint: sets palette tinting values",osdcmd_hicsetpalettetint);
#endif

	return 0;
}

// Assembly:
pushq %rbx
callq 0x48f56
leaq 0x55f93(%rip), %rdi     # 0x74c38
leaq 0x55fa0(%rip), %rsi     # 0x74c4c
leaq 0x82(%rip), %rbx        # 0x1ed35
movq %rbx, %rdx
callq 0x49014
leaq 0x55fd6(%rip), %rdi     # 0x74c98
leaq 0x55fd9(%rip), %rsi     # 0x74ca2
movq %rbx, %rdx
callq 0x49014
leaq 0x56010(%rip), %rdi     # 0x74ce8
leaq 0x56013(%rip), %rsi     # 0x74cf2
movq %rbx, %rdx
callq 0x49014
leaq 0x554aa(%rip), %rdi     # 0x74198
leaq 0x56039(%rip), %rsi     # 0x74d2e
movq %rbx, %rdx
callq 0x49014
leaq 0x56080(%rip), %rdi     # 0x74d84
leaq 0x56086(%rip), %rsi     # 0x74d91
leaq 0x202(%rip), %rdx       # 0x1ef14
callq 0x49014
leaq 0x560b9(%rip), %rdi     # 0x74dd7
leaq 0x560c0(%rip), %rsi     # 0x74de5
leaq 0x34c(%rip), %rdx       # 0x1f078
callq 0x49014
xorl %eax, %eax
popq %rbx
retq
// File: /workspace/github_c_makefile_star2_O1/jonof[P]jftekwar/jfbuild/src/baselayer.c
// Function: osdcmd_listvidmodes
static int osdcmd_listvidmodes(const osdfuncparm_t *parm)
{
	int filterbpp = -1, filterfs = -1, found = 0;

	for (int i = 0; i < parm->numparms; i++) {
		if (strcasecmp(parm->parms[i], "win") == 0) {
			filterfs = 0;
		} else if (strcasecmp(parm->parms[i], "fs") == 0) {
			filterfs = 1;
		} else {
			char *e = NULL;
			long l = strtol(parm->parms[i], &e, 10);
			if (!e || *e != 0) return OSDCMD_SHOWHELP;
			filterbpp = (int)l;
		}
	}

	for (int i = 0; i < validmodecnt; i++) {
		if (filterbpp >= 0 && validmode[i].bpp != filterbpp) continue;
		if (filterfs >= 0 && (validmode[i].fs & 1) != filterfs) continue;
		buildprintf(" %4dx%-4d %d-bit %s\n", validmode[i].xdim, validmode[i].ydim,
			validmode[i].bpp, (validmode[i].fs & 1) ? "fullscreen" : "windowed");
		found++;
	}
	buildprintf("%d modes identified\n", found);
	return OSDCMD_OK;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
cmpl $0x0, (%rdi)
setg %r14b
jle 0x1efbc
movq %rdi, %rbx
movl $0xffffffff, %r12d      # imm = 0xFFFFFFFF
xorl %ebp, %ebp
movl $0xffffffff, %r15d      # imm = 0xFFFFFFFF
movq 0x10(%rbx), %rax
movq (%rax,%rbp,8), %r13
movq %r13, %rdi
leaq 0x55fd1(%rip), %rsi     # 0x74f20
callq 0x6880
testl %eax, %eax
je 0x1ef98
movq %r13, %rdi
leaq 0x55fc2(%rip), %rsi     # 0x74f24
callq 0x6880
testl %eax, %eax
je 0x1ef9d
movq $0x0, (%rsp)
movq %r13, %rdi
movq %rsp, %rsi
movl $0xa, %edx
callq 0x6940
movq (%rsp), %rcx
testq %rcx, %rcx
je 0x1efa5
cmpb $0x0, (%rcx)
sete %cl
cmovel %eax, %r15d
jmp 0x1efa7
xorl %r12d, %r12d
jmp 0x1efab
movl $0x1, %r12d
jmp 0x1efab
xorl %ecx, %ecx
testb %cl, %cl
je 0x1efc8
incq %rbp
movslq (%rbx), %rax
cmpq %rax, %rbp
setl %r14b
jl 0x1ef3d
jmp 0x1efc8
movl $0xffffffff, %r12d      # imm = 0xFFFFFFFF
movl $0xffffffff, %r15d      # imm = 0xFFFFFFFF
movl $0x1, %eax
testb $0x1, %r14b
jne 0x1f069
leaq 0x33d8d2(%rip), %r13    # 0x35c8b0
cmpl $0x0, (%r13)
movl $0x0, %ebp
jle 0x1f057
leaq 0x41be5f(%rip), %rbx    # 0x43ae50
addq $0x9, %rbx
xorl %r14d, %r14d
xorl %ebp, %ebp
testl %r15d, %r15d
js 0x1f008
movzbl -0x1(%rbx), %eax
cmpl %eax, %r15d
jne 0x1f047
testl %r12d, %r12d
js 0x1f018
movzbl (%rbx), %eax
andl $0x1, %eax
cmpl %eax, %r12d
jne 0x1f047
movl -0x9(%rbx), %esi
movl -0x5(%rbx), %edx
testb $0x1, (%rbx)
movzbl -0x1(%rbx), %ecx
leaq 0x55037(%rip), %r8      # 0x74063
leaq 0x55f09(%rip), %rax     # 0x74f3c
cmoveq %rax, %r8
leaq 0x55ee9(%rip), %rdi     # 0x74f27
xorl %eax, %eax
callq 0x24cb4
incl %ebp
incq %r14
movslq (%r13), %rax
addq $0x10, %rbx
cmpq %rax, %r14
jl 0x1effa
leaq 0x55ee7(%rip), %rdi     # 0x74f45
movl %ebp, %esi
xorl %eax, %eax
callq 0x24cb4
xorl %eax, %eax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O1/jonof[P]jftekwar/jfbuild/src/baselayer.c
// Function: osdfunc_setrendermode
static int osdfunc_setrendermode(const osdfuncparm_t *parm)
{
	int m;
	char *p;

	char *modestrs[] = {
		"classic software", "polygonal flat-shaded software",
		"polygonal textured software", "polygonal OpenGL"
	};

	if (parm->numparms != 1) return OSDCMD_SHOWHELP;
	m = (int)strtol(parm->parms[0], &p, 10);

	if (m < 0 || m > 3 || *p) return OSDCMD_SHOWHELP;

	setrendermode(m);
	buildprintf("Rendering method changed to %s\n", modestrs[ getrendermode() ] );

	return OSDCMD_OK;
}

// Assembly:
pushq %rbx
subq $0x10, %rsp
movl $0x1, %ebx
cmpl $0x1, (%rdi)
jne 0x1f0d8
movq 0x10(%rdi), %rax
movq (%rax), %rdi
leaq 0x8(%rsp), %rsi
movl $0xa, %edx
callq 0x6940
cmpl $0x3, %eax
ja 0x1f0d8
movq 0x8(%rsp), %rcx
cmpb $0x0, (%rcx)
jne 0x1f0d8
movl %eax, %edi
callq 0x3c5be
callq 0x3c5ee
cltq
leaq 0x55f23(%rip), %rcx     # 0x74fe4
movslq (%rcx,%rax,4), %rsi
addq %rcx, %rsi
leaq 0x55ee8(%rip), %rdi     # 0x74fb7
xorl %ebx, %ebx
xorl %eax, %eax
callq 0x24cb4
movl %ebx, %eax
addq $0x10, %rsp
popq %rbx
retq
// File: /workspace/github_c_makefile_star2_O1/jonof[P]jftekwar/jfbuild/src/cache1d.c
// Function: initcache
void initcache(void *dacachestart, size_t dacachesize)
{
	int i;

	for(i=1;i<200;i++) lockrecip[i] = (1<<28)/(200-i);

	cachestart = ((intptr_t)dacachestart + 15) & ~15;
	cachesize = (dacachesize - ((-(intptr_t)dacachestart) & 15)) & ~15;

	cac[0].leng = cachesize;
	cac[0].lock = &zerochar;
	cacnum = 1;

	buildprintf("initcache(): Initialised with %zu bytes\n", cachesize);
}

// Assembly:
movl $0xc7, %ecx
leaq 0x15e2e8(%rip), %r8     # 0x17d3d4
movl $0x10000000, %eax       # imm = 0x10000000
xorl %edx, %edx
divl %ecx
movl %eax, (%r8)
addq $0x4, %r8
decq %rcx
jne 0x1f0ec
leaq 0xf(%rdi), %rax
andq $-0x10, %rax
movq %rax, 0x15e2a8(%rip)    # 0x17d3b8
negl %edi
andl $0xf, %edi
subq %rdi, %rsi
andq $-0x10, %rsi
movq %rsi, 0x15e5cd(%rip)    # 0x17d6f0
movq %rsi, 0x15e5de(%rip)    # 0x17d708
leaq 0x15e283(%rip), %rax    # 0x17d3b4
movq %rax, 0x15e5d8(%rip)    # 0x17d710
movl $0x1, 0x15e27e(%rip)    # 0x17d3c0
leaq 0x55eab(%rip), %rdi     # 0x74ff4
xorl %eax, %eax
jmp 0x24cb4
// File: /workspace/github_c_makefile_star2_O1/jonof[P]jftekwar/jfbuild/src/cache1d.c
// Function: reportandexit
static void reportandexit(char *errormessage)
{
    int i;
    size_t j;

    j = 0;
    for(i=0;i<cacnum;i++)
    {
        buildprintf("%d- ",i);
        if (cac[i].hand) {
            buildprintf("ptr: 0x%p, ",*cac[i].hand);
        } else {
            buildprintf("ptr: NULL, ");
        }
        buildprintf("leng: %zu, ",cac[i].leng);
        if (cac[i].lock) {
            buildprintf("lock: %d\n",*cac[i].lock);
        } else {
            buildprintf("lock: NULL\n");
        }
        j += cac[i].leng;
    }
	buildprintf("Cachesize = %zu\n",cachesize);
	buildprintf("Cacnum = %d\n",cacnum);
	buildprintf("Cache length sum = %zu\n",j);
	buildprintf("ERROR: %s\n",errormessage);
	exit(0);
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movq %rdi, (%rsp)
cmpl $0x0, 0x15df22(%rip)    # 0x17d3c0
jle 0x1f547
leaq 0x15e265(%rip), %rbx    # 0x17d710
leaq 0x55ccb(%rip), %r15     # 0x7517d
leaq 0x55ce1(%rip), %r13     # 0x7519a
leaq 0x55cc2(%rip), %r12     # 0x75182
xorl %ebp, %ebp
xorl %r14d, %r14d
movq %r15, %rdi
movl %ebp, %esi
xorl %eax, %eax
callq 0x24cb4
movq -0x10(%rbx), %rax
testq %rax, %rax
je 0x1f4e9
movq (%rax), %rsi
movq %r12, %rdi
xorl %eax, %eax
callq 0x24cb4
jmp 0x1f4f7
leaq 0x55c9e(%rip), %rdi     # 0x7518e
xorl %eax, %eax
callq 0x24cb4
movq -0x8(%rbx), %rsi
movq %r13, %rdi
xorl %eax, %eax
callq 0x24cb4
movq (%rbx), %rax
testq %rax, %rax
je 0x1f520
movzbl (%rax), %esi
leaq 0x55b3a(%rip), %rdi     # 0x75051
xorl %eax, %eax
callq 0x24cb4
jmp 0x1f52e
leaq 0x55c7f(%rip), %rdi     # 0x751a6
xorl %eax, %eax
callq 0x24cb4
addq -0x8(%rbx), %r14
incq %rbp
movslq 0x15de84(%rip), %rax    # 0x17d3c0
addq $0x18, %rbx
cmpq %rax, %rbp
jl 0x1f4c5
jmp 0x1f54a
xorl %r14d, %r14d
movq 0x15e19f(%rip), %rsi    # 0x17d6f0
leaq 0x55c5a(%rip), %rdi     # 0x751b2
xorl %eax, %eax
callq 0x24cb4
movl 0x15de5b(%rip), %esi    # 0x17d3c0
leaq 0x55c57(%rip), %rdi     # 0x751c3
xorl %eax, %eax
callq 0x24cb4
leaq 0x55c56(%rip), %rdi     # 0x751d0
movq %r14, %rsi
xorl %eax, %eax
callq 0x24cb4
leaq 0x55c5d(%rip), %rdi     # 0x751e8
movq (%rsp), %rsi
xorl %eax, %eax
callq 0x24cb4
xorl %edi, %edi
callq 0x66a0
// File: /workspace/github_c_makefile_star2_O1/jonof[P]jftekwar/jfbuild/src/cache1d.c
// Function: suckcache
void suckcache(void *suckptr)
{
	int i;

		//Can't exit early, because invalid pointer might be same even though lock = 0
	for(i=0;i<cacnum;i++)
		if (*cac[i].hand == suckptr)
		{
			if (*cac[i].lock) *cac[i].hand = 0;
			cac[i].lock = &zerochar;
			cac[i].hand = 0;

				//Combine empty blocks
			if ((i > 0) && (*cac[i-1].lock == 0))
			{
				cac[i-1].leng += cac[i].leng;
				cacnum--; copybuf(&cac[i+1],&cac[i],(cacnum-i)*sizeof(cactype));
			}
			else if ((i < cacnum-1) && (*cac[i+1].lock == 0))
			{
				cac[i+1].leng += cac[i].leng;
				cacnum--; copybuf(&cac[i+1],&cac[i],(cacnum-i)*sizeof(cactype));
			}
		}
}

// Assembly:
movl 0x15de1d(%rip), %eax    # 0x17d3c0
testl %eax, %eax
jle 0x1f689
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movq %rdi, %rbx
xorl %r15d, %r15d
leaq 0x15e13d(%rip), %r12    # 0x17d700
leaq 0x15ddea(%rip), %r13    # 0x17d3b4
movq %r12, %r14
xorl %ebp, %ebp
movq (%r14), %rcx
cmpq %rbx, (%rcx)
je 0x1f5f2
incq %rbp
movslq 0x15dddf(%rip), %rax    # 0x17d3c0
decl %r15d
addq $0x18, %r14
cmpq %rax, %rbp
jl 0x1f5cf
jmp 0x1f67b
movq 0x10(%r14), %rdx
cmpb $0x0, (%rdx)
je 0x1f602
movq $0x0, (%rcx)
movq %r13, 0x10(%r14)
movq $0x0, (%r14)
testq %rbp, %rbp
je 0x1f61b
movq -0x8(%r14), %rcx
cmpb $0x0, (%rcx)
je 0x1f651
decl %eax
movslq %eax, %rcx
cmpq %rcx, %rbp
jge 0x1f5d7
movq 0x28(%r14), %rcx
cmpb $0x0, (%rcx)
jne 0x1f5d7
leaq (,%rbp,2), %rcx
addq %rbp, %rcx
leaq (%r12,%rcx,8), %rdi
addq $0x18, %rdi
movq 0x8(%r14), %rcx
addq %rcx, 0x20(%r14)
movl %eax, 0x15dd71(%rip)    # 0x17d3c0
jmp 0x1f665
movq 0x8(%r14), %rcx
addq %rcx, -0x10(%r14)
decl %eax
movl %eax, 0x15dd5f(%rip)    # 0x17d3c0
leaq 0x18(%r14), %rdi
addl %r15d, %eax
shll $0x3, %eax
leal (%rax,%rax,2), %edx
movq %r14, %rsi
callq 0x4abdd
jmp 0x1f5d7
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O1/jonof[P]jftekwar/jfbuild/src/cache1d.c
// Function: agecache
void agecache(void)
{
	int cnt;
	unsigned char ch;

	if (agecount >= cacnum) agecount = cacnum-1;
	if (agecount < 0) return;
	for(cnt=(cacnum>>4);cnt>=0;cnt--)
	{
		ch = (*cac[agecount].lock);
		if (((ch-2)&255) < 198)
			(*cac[agecount].lock) = ch-1;

		agecount--; if (agecount < 0) agecount = cacnum-1;
	}
}

// Assembly:
movl 0x15dd30(%rip), %eax    # 0x17d3c0
cmpl %eax, 0x15dd2e(%rip)    # 0x17d3c4
jl 0x1f6a1
leal -0x1(%rax), %ecx
movl %ecx, 0x15dd23(%rip)    # 0x17d3c4
sarl $0x4, %eax
movl 0x15dd1a(%rip), %ecx    # 0x17d3c4
orl %eax, %ecx
js 0x1f6fe
incl %eax
leaq 0x15e049(%rip), %rcx    # 0x17d700
movslq 0x15dd06(%rip), %rdx    # 0x17d3c4
leaq (%rdx,%rdx,2), %rdx
movq 0x10(%rcx,%rdx,8), %rdx
movb (%rdx), %sil
leal -0x2(%rsi), %edi
cmpb $-0x3b, %dil
ja 0x1f6d9
decb %sil
movb %sil, (%rdx)
movl 0x15dce5(%rip), %edx    # 0x17d3c4
leal -0x1(%rdx), %esi
movl %esi, 0x15dcdc(%rip)    # 0x17d3c4
testl %edx, %edx
jg 0x1f6fa
movl 0x15dcce(%rip), %edx    # 0x17d3c0
decl %edx
movl %edx, 0x15dcca(%rip)    # 0x17d3c4
decl %eax
jg 0x1f6b7
retq
// File: /workspace/github_c_makefile_star2_O1/jonof[P]jftekwar/jfbuild/src/cache1d.c
// Function: addsearchpath
int addsearchpath(const char *p)
{
	struct stat st;
	char *s;
	searchpath_t *srch;

	if (Bstat(p, &st) < 0) {
		if (errno == ENOENT) return -2;
		return -1;
	}
	if (!(st.st_mode & BS_IFDIR)) return -1;

	srch = (searchpath_t*)malloc(sizeof(searchpath_t));
	if (!srch) return -1;

	srch->next    = searchpathhead;
	srch->pathlen = strlen(p)+1;
	srch->path    = (char*)malloc(srch->pathlen + 1);
	if (!srch->path) {
		free(srch);
		return -1;
	}
	strcpy(srch->path, p);
	for (s=srch->path; *s; s++) ;
	s--;
	if (s<srch->path || toupperlookup[(int)(unsigned char)*s] != '/') strcat(srch->path, "/");

	searchpathhead = srch;
	if (srch->pathlen > maxsearchpathlen) maxsearchpathlen = srch->pathlen;
	buildprintf("Added %s to search path.\n", srch->path);

	return 0;
}

// Assembly:
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
subq $0x98, %rsp
movq %rdi, %r12
leaq 0x8(%rsp), %rsi
callq 0x6110
testl %eax, %eax
js 0x1f7dd
movl $0xffffffff, %ebx       # imm = 0xFFFFFFFF
testb $0x40, 0x21(%rsp)
je 0x1f7ec
movl $0x18, %edi
callq 0x69a0
testq %rax, %rax
je 0x1f7ec
movq %rax, %r14
movq 0x193fb9(%rip), %rax    # 0x1b3708
movq %rax, (%r14)
movq %r12, %rdi
callq 0x6420
leaq 0x1(%rax), %rcx
movq %rcx, 0x10(%r14)
leaq 0x2(%rax), %rdi
callq 0x69a0
movq %rax, 0x8(%r14)
testq %rax, %rax
je 0x1f7fd
movq %rax, %r15
movq %rax, %rdi
movq %r12, %rsi
callq 0x6430
leaq -0x2(%r15), %rax
cmpb $0x0, 0x2(%rax)
leaq 0x1(%rax), %rax
jne 0x1f78a
cmpq %r15, %rax
jb 0x1f79e
cmpb $0x2f, (%rax)
je 0x1f7ad
movq %r15, %rdi
callq 0x6420
movw $0x2f, (%r15,%rax)
movq %r14, 0x193f54(%rip)    # 0x1b3708
movq 0x10(%r14), %rax
cmpq 0x193f51(%rip), %rax    # 0x1b3710
jbe 0x1f7c8
movq %rax, 0x193f48(%rip)    # 0x1b3710
leaq 0x5591e(%rip), %rdi     # 0x750ed
xorl %ebx, %ebx
movq %r15, %rsi
xorl %eax, %eax
callq 0x24cb4
jmp 0x1f7ec
callq 0x6a90
xorl %ebx, %ebx
cmpl $0x2, (%rax)
sete %bl
notl %ebx
movl %ebx, %eax
addq $0x98, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
retq
movq %r14, %rdi
callq 0x61c0
jmp 0x1f7ec
// File: /workspace/github_c_makefile_star2_O1/jonof[P]jftekwar/jfbuild/src/cache1d.c
// Function: findfrompath
int findfrompath(const char *fn, char **where)
{
	searchpath_t *sp;
	char *pfn, *ffn;
	size_t allocsiz;

	// pathsearchmode == 0: tests current dir and then the dirs of the path stack
	// pathsearchmode == 1: tests fn without modification, then like for pathsearchmode == 0
	
	if (pathsearchmode) {
		// test unmolested filename first
		if (access(fn, F_OK) >= 0) {
			*where = strdup(fn);
			return 0;
		}
	}

	for (; toupperlookup[(int)(unsigned char)*fn] == '/'; fn++);
	ffn = strdup(fn);
	if (!ffn) return -1;
	Bcorrectfilename(ffn,0);	// compress relative paths
	
	allocsiz = max(maxsearchpathlen, 2u);	// "./" (aka. curdir)
	allocsiz += strlen(ffn);
	allocsiz += 1;	// a nul
	
	pfn = (char *)malloc(allocsiz);
	if (!pfn) { free(ffn); return -1; }

	strcpy(pfn, "./");
	strcat(pfn, ffn);
	if (access(pfn, F_OK) >= 0) {
		*where = pfn;
		free(ffn);
		return 0;
	}
	
	for (sp = searchpathhead; sp; sp = sp->next) {
		strcpy(pfn, sp->path);
		strcat(pfn, ffn);
		//buildprintf("Trying %s\n", pfn);
		if (access(pfn, F_OK) >= 0) {
			*where = pfn;
			free(ffn);
			return 0;
		}
	}
	free(pfn); free(ffn);
	return -1;
}

// Assembly:
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
movq %rsi, %r14
movq %rdi, %r15
cmpl $0x0, 0x193ee3(%rip)    # 0x1b3700
je 0x1f83f
xorl %ebx, %ebx
movq %r15, %rdi
xorl %esi, %esi
callq 0x6160
testl %eax, %eax
js 0x1f83f
movq %r15, %rdi
callq 0x6060
movq %rax, (%r14)
jmp 0x1f917
decq %r15
cmpb $0x2f, 0x1(%r15)
leaq 0x1(%r15), %r15
je 0x1f842
movq %r15, %rdi
callq 0x6060
movl $0xffffffff, %ebx       # imm = 0xFFFFFFFF
testq %rax, %rax
je 0x1f917
movq %rax, %r15
movq %rax, %rdi
xorl %esi, %esi
callq 0x21bc8
movq 0x193e99(%rip), %rax    # 0x1b3710
cmpq $0x3, %rax
movl $0x2, %r12d
cmovaeq %rax, %r12
movq %r15, %rdi
callq 0x6420
leaq (%rax,%r12), %rdi
incq %rdi
callq 0x69a0
testq %rax, %rax
je 0x1f90f
movq %rax, %r12
movb $0x0, 0x2(%rax)
movw $0x2f2e, (%rax)         # imm = 0x2F2E
movq %rax, %rdi
movq %r15, %rsi
callq 0x6710
movq %r12, %rdi
xorl %esi, %esi
callq 0x6160
testl %eax, %eax
jns 0x1f8f8
leaq 0x193e3e(%rip), %r13    # 0x1b3708
movq (%r13), %r13
testq %r13, %r13
je 0x1f907
movq 0x8(%r13), %rsi
movq %r12, %rdi
callq 0x6430
movq %r12, %rdi
movq %r15, %rsi
callq 0x6710
movq %r12, %rdi
xorl %esi, %esi
callq 0x6160
testl %eax, %eax
js 0x1f8ca
movq %r12, (%r14)
movq %r15, %rdi
callq 0x61c0
xorl %ebx, %ebx
jmp 0x1f917
movq %r12, %rdi
callq 0x61c0
movq %r15, %rdi
callq 0x61c0
movl %ebx, %eax
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
retq
// File: /workspace/github_c_makefile_star2_O1/jonof[P]jftekwar/jfbuild/src/cache1d.c
// Function: fopenfrompath
BFILE* fopenfrompath(const char *fn, const char *mode)
{
	int fh;
	BFILE *h;
	int bmode = 0, smode = 0;
	const char *c;

	for (c=mode; c[0]; ) {
			 if (c[0] == 'r' && c[1] == '+') { bmode = BO_RDWR; smode = BS_IREAD|BS_IWRITE; c+=2; }
		else if (c[0] == 'r')                { bmode = BO_RDONLY; smode = BS_IREAD; c+=1; }
		else if (c[0] == 'w' && c[1] == '+') { bmode = BO_RDWR|BO_CREAT|BO_TRUNC; smode = BS_IREAD|BS_IWRITE; c+=2; }
		else if (c[0] == 'w')                { bmode = BO_WRONLY|BO_CREAT|BO_TRUNC; smode = BS_IREAD|BS_IWRITE; c+=2; }
		else if (c[0] == 'a' && c[1] == '+') { bmode = BO_RDWR|BO_CREAT; smode=BS_IREAD|BS_IWRITE; c+=2; }
		else if (c[0] == 'a')                { bmode = BO_WRONLY|BO_CREAT; smode=BS_IREAD|BS_IWRITE; c+=1; }
		else if (c[0] == 'b')                { bmode |= BO_BINARY; c+=1; }
		else if (c[1] == 't')                { bmode |= BO_TEXT; c+=1; }
		else c++;
	}
	fh = openfrompath(fn,bmode,smode);
	if (fh < 0) return NULL;
	
	h = fdopen(fh,mode);
	if (!h) close(fh);

	return h;
}

// Assembly:
pushq %rbp
pushq %rbx
pushq %rax
movq %rsi, %rbx
xorl %esi, %esi
xorl %edx, %edx
movq %rbx, %rax
movzbl (%rax), %ecx
cmpl $0x71, %ecx
jg 0x1f994
cmpl $0x61, %ecx
je 0x1f9ee
cmpl $0x62, %ecx
je 0x1fa09
testl %ecx, %ecx
jne 0x1fa09
jmp 0x1fa39
cmpl $0x77, %ecx
je 0x1f9cc
cmpl $0x72, %ecx
jne 0x1fa09
cmpb $0x2b, 0x1(%rax)
jne 0x1f9b6
movl $0x180, %edx            # imm = 0x180
movl $0x2, %esi
movl $0x2, %r8d
jmp 0x1fa28
cmpl $0x71, %ecx
jg 0x1f9c2
cmpl $0x61, %ecx
jne 0x1fa06
jmp 0x1f9ee
cmpl $0x72, %ecx
je 0x1fa30
cmpl $0x77, %ecx
jne 0x1fa09
movl $0x2, %r8d
cmpb $0x2b, 0x1(%rax)
jne 0x1f9df
movl $0x242, %esi            # imm = 0x242
jmp 0x1fa23
cmpl $0x77, %ecx
je 0x1fa1e
cmpl $0x62, %ecx
je 0x1fa09
cmpl $0x61, %ecx
jne 0x1fa09
cmpb $0x2b, 0x1(%rax)
jne 0x1fa01
movl $0x42, %esi
movl $0x2, %r8d
jmp 0x1fa23
cmpl $0x61, %ecx
je 0x1fa11
cmpl $0x62, %ecx
movl $0x1, %r8d
jmp 0x1fa28
movl $0x41, %esi
movl $0x1, %r8d
jmp 0x1fa23
movl $0x241, %esi            # imm = 0x241
movl $0x180, %edx            # imm = 0x180
addq %r8, %rax
jmp 0x1f979
movl $0x100, %edx            # imm = 0x100
xorl %esi, %esi
jmp 0x1fa09
callq 0x1f923
testl %eax, %eax
js 0x1fa5f
movl %eax, %ebp
movl %eax, %edi
movq %rbx, %rsi
callq 0x60b0
movq %rax, %rbx
testq %rax, %rax
jne 0x1fa61
movl %ebp, %edi
callq 0x6220
jmp 0x1fa61
xorl %ebx, %ebx
movq %rbx, %rax
addq $0x8, %rsp
popq %rbx
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O1/jonof[P]jftekwar/jfbuild/src/cache1d.c
// Function: uninitsinglegroupfile
void uninitsinglegroupfile(int grphandle)
{
	int i, grpnum = -1;

	for(i=numgroupfiles-1;i>=0;i--)
		if (groupfil[i] != -1 && groupfil[i] == grphandle)
		{
			kfree(gfilelist[i]);
			kfree(gfileoffs[i]);
			Bclose(groupfil[i]);
			groupfil[i] = -1;
			grpnum = i;
			break;
		}

	if (grpnum == -1) return;

	// JBF 20040111
	numgroupfiles--;

	// move any group files following this one back
	for (i=grpnum+1; i<MAXGROUPFILES; i++)
		if (groupfil[i] != -1) {
			groupfil[i-1]    = groupfil[i];
			gnumfiles[i-1]   = gnumfiles[i];
			groupfilpos[i-1] = groupfilpos[i];
			gfilelist[i-1]   = gfilelist[i];
			gfileoffs[i-1]   = gfileoffs[i];
			groupfil[i] = -1;
		}

	// fix up the open files that need attention
	for(i=0;i<MAXOPENFILES;i++) {
		if (filegrp[i] >= 254)         // external file (255) or ZIPped file (254)
			continue;
		else if (filegrp[i] == grpnum)   // close file in group we closed
			filehan[i] = -1;
		else if (filegrp[i] > grpnum)   // move back a file in a group after the one we closed
			filegrp[i]--;
	}
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movl 0x1939b4(%rip), %ebp    # 0x1b3718
leaq 0x832d5(%rip), %r14     # 0xa3040
leaq (%r14,%rbp,4), %r12
xorl %r13d, %r13d
movl %ebp, %ebx
movl %ebx, %r15d
testl %ebx, %ebx
jle 0x1fdd1
movl -0x4(%r12,%r13,4), %eax
cmpl $-0x1, %eax
sete %cl
cmpl %edi, %eax
setne %al
leal -0x1(%r15), %ebx
decq %r13
orb %cl, %al
jne 0x1fd74
leaq 0x1939a3(%rip), %rax    # 0x1b3740
leaq (%rax,%rbp,8), %rax
movq (%rax,%r13,8), %rdi
callq 0x23bb9
leaq 0x1939af(%rip), %rax    # 0x1b3760
leaq (%rax,%rbp,8), %rax
movq (%rax,%r13,8), %rdi
callq 0x23bb9
movl (%r12,%r13,4), %edi
callq 0x6220
movl $0xffffffff, (%r12,%r13,4) # imm = 0xFFFFFFFF
jmp 0x1fdd6
movl $0xffffffff, %ebx       # imm = 0xFFFFFFFF
cmpl $-0x1, %ebx
je 0x1fe9e
decl 0x193933(%rip)          # 0x1b3718
cmpl $0x2, %ebx
jg 0x1fe5e
xorl %eax, %eax
testl %r15d, %r15d
cmovgl %r15d, %eax
decl %eax
decq %rax
leaq 0x193931(%rip), %rcx    # 0x1b3730
leaq 0x19391a(%rip), %rdx    # 0x1b3720
leaq 0x193933(%rip), %rsi    # 0x1b3740
leaq 0x19394c(%rip), %rdi    # 0x1b3760
movl 0x8(%r14,%rax,4), %r8d
cmpl $-0x1, %r8d
je 0x1fe55
movl %r8d, 0x4(%r14,%rax,4)
movl 0x8(%rcx,%rax,4), %r8d
movl %r8d, 0x4(%rcx,%rax,4)
movl 0x8(%rdx,%rax,4), %r8d
movl %r8d, 0x4(%rdx,%rax,4)
movq 0x10(%rsi,%rax,8), %r8
movq %r8, 0x8(%rsi,%rax,8)
movq 0x10(%rdi,%rax,8), %r8
movq %r8, 0x8(%rdi,%rax,8)
movl $0xffffffff, 0x8(%r14,%rax,4) # imm = 0xFFFFFFFF
incq %rax
cmpq $0x2, %rax
jb 0x1fe14
leaq 0x19391b(%rip), %rax    # 0x1b3780
xorl %ecx, %ecx
leaq 0x831e2(%rip), %rdx     # 0xa3050
movzbl (%rax), %esi
cmpl $0xfd, %esi
ja 0x1fe8e
cmpl %esi, %ebx
jne 0x1fe86
movl $0xffffffff, (%rcx,%rdx) # imm = 0xFFFFFFFF
jmp 0x1fe8e
jge 0x1fe8e
decb %sil
movb %sil, (%rax)
addq $0x4, %rcx
incq %rax
cmpq $0x100, %rcx            # imm = 0x100
jne 0x1fe6e
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O1/jonof[P]jftekwar/jfbuild/src/cache1d.c
// Function: uninitgroupfile
void uninitgroupfile(void)
{
	int i;

	for(i=numgroupfiles-1;i>=0;i--)
		if (groupfil[i] != -1)
		{
			kfree(gfilelist[i]);
			kfree(gfileoffs[i]);
			Bclose(groupfil[i]);
			groupfil[i] = -1;
		}
	numgroupfiles = 0;

	// JBF 20040111: "close" any files open in groups
	for(i=0;i<MAXOPENFILES;i++) {
		if (filegrp[i] < 254)   // JBF 20040130: not external or ZIPped
			filehan[i] = -1;
	}
}

// Assembly:
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
pushq %rax
movslq 0x19385c(%rip), %rbx    # 0x1b3718
testq %rbx, %rbx
jle 0x1ff11
incq %rbx
leaq 0x83175(%rip), %r14     # 0xa3040
leaq 0x19386e(%rip), %r15    # 0x1b3740
leaq 0x193887(%rip), %r12    # 0x1b3760
cmpl $-0x1, -0x8(%r14,%rbx,4)
je 0x1ff08
movq -0x10(%r15,%rbx,8), %rdi
callq 0x23bb9
movq -0x10(%r12,%rbx,8), %rdi
callq 0x23bb9
movl -0x8(%r14,%rbx,4), %edi
callq 0x6220
movl $0xffffffff, -0x8(%r14,%rbx,4) # imm = 0xFFFFFFFF
decq %rbx
cmpq $0x1, %rbx
jg 0x1fed9
movl $0x0, 0x1937fd(%rip)    # 0x1b3718
leaq 0x8312e(%rip), %rax     # 0xa3050
xorl %ecx, %ecx
leaq 0x193855(%rip), %rdx    # 0x1b3780
cmpb $-0x3, (%rcx,%rdx)
ja 0x1ff37
movl $0xffffffff, (%rax)     # imm = 0xFFFFFFFF
incq %rcx
addq $0x4, %rax
cmpq $0x40, %rcx
jne 0x1ff2b
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
retq
// File: /workspace/github_c_makefile_star2_O1/jonof[P]jftekwar/jfbuild/src/cache1d.c
// Function: kzipopen
static int kzipopen(const char *filnam)
{
	unsigned int i;
	char newst[BMAX_PATH+4];

	newst[0] = '|';
	for(i=0;filnam[i] && (i < sizeof(newst)-2);i++) newst[i+1] = filnam[i];
	newst[i+1] = 0;
	return(kzopen(newst));
}

// Assembly:
subq $0x408, %rsp            # imm = 0x408
movb $0x7c, (%rsp)
movb (%rdi), %cl
testb %cl, %cl
je 0x201a9
movl $0x1, %edx
leaq -0x1(%rdx), %rsi
movb %cl, (%rsp,%rdx)
leaq 0x1(%rdx), %rax
cmpq $0x400, %rsi            # imm = 0x400
ja 0x201ae
movb (%rdi,%rdx), %cl
movq %rax, %rdx
testb %cl, %cl
jne 0x20189
jmp 0x201ae
movl $0x1, %eax
movb $0x0, (%rsp,%rax)
movq %rsp, %rdi
callq 0x45558
addq $0x408, %rsp            # imm = 0x408
retq
// File: /workspace/github_c_makefile_star2_O1/jonof[P]jftekwar/jfbuild/src/cache1d.c
// Function: klseek
int klseek(int handle, int offset, int whence)
{
	int i, groupnum;

	groupnum = filegrp[handle];

	if (groupnum == 255) return((int)lseek(filehan[handle],offset,whence));
#ifdef WITHKPLIB
	else if (groupnum == 254)
	{
		if (kzcurhand != handle)
		{
			if (kztell() >= 0) { filepos[kzcurhand] = kztell(); kzclose(); }
			kzcurhand = handle;
			kzipopen(filenamsav[handle]);
			kzseek(filepos[handle],SEEK_SET);
		}
		return(kzseek(offset,whence));
	}
#endif

	if (groupfil[groupnum] != -1)
	{
		switch(whence)
		{
			case BSEEK_SET: filepos[handle] = offset; break;
			case BSEEK_END: i = filehan[handle];
				filepos[handle] = (gfileoffs[groupnum][i+1]-gfileoffs[groupnum][i])+offset;
				break;
			case BSEEK_CUR: filepos[handle] += offset; break;
		}
		return(filepos[handle]);
	}
	return(-1);
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %rbx
pushq %rax
movl %edx, %ebp
movl %esi, %ebx
movslq %edi, %r15
leaq 0x1933c3(%rip), %rax    # 0x1b3780
movzbl (%r15,%rax), %eax
cmpl $0xfe, %eax
je 0x203ee
cmpl $0xff, %eax
jne 0x20463
leaq 0x82c75(%rip), %rax     # 0xa3050
movl (%rax,%r15,4), %edi
movslq %ebx, %rsi
movl %ebp, %edx
callq 0x62b0
jmp 0x204c7
movl %edi, %r14d
cmpl %edi, 0x82d59(%rip)     # 0xa3150
je 0x20450
callq 0x47c82
testl %eax, %eax
js 0x2041d
callq 0x47c82
movslq 0x82d42(%rip), %rcx     # 0xa3150
leaq 0x1933ab(%rip), %rdx    # 0x1b37c0
movl %eax, (%rdx,%rcx,4)
callq 0x47ce0
movl %r14d, 0x82d2c(%rip)    # 0xa3150
movq %r15, %rax
shlq $0x8, %rax
leaq (%rax,%r15,4), %rax
leaq 0x19348a(%rip), %rdi    # 0x1b38c0
addq %rax, %rdi
callq 0x20173
leaq 0x19337b(%rip), %rax    # 0x1b37c0
movl (%rax,%r15,4), %edi
xorl %esi, %esi
callq 0x47c41
movl %ebx, %edi
movl %ebp, %esi
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
jmp 0x47c41
leaq 0x82bd6(%rip), %rcx     # 0xa3040
cmpl $-0x1, (%rcx,%rax,4)
je 0x20480
cmpl $0x2, %ebp
je 0x20494
cmpl $0x1, %ebp
je 0x20487
testl %ebp, %ebp
je 0x204b1
jmp 0x204bc
movl $0xffffffff, %eax       # imm = 0xFFFFFFFF
jmp 0x204c7
leaq 0x193332(%rip), %rax    # 0x1b37c0
addl %ebx, (%rax,%r15,4)
jmp 0x204bc
leaq 0x82bb5(%rip), %rcx     # 0xa3050
movslq (%rcx,%r15,4), %rcx
leaq 0x1932ba(%rip), %rdx    # 0x1b3760
movq (%rdx,%rax,8), %rax
addl 0x4(%rax,%rcx,4), %ebx
subl (%rax,%rcx,4), %ebx
leaq 0x193308(%rip), %rax    # 0x1b37c0
movl %ebx, (%rax,%r15,4)
leaq 0x1932fd(%rip), %rax    # 0x1b37c0
movl (%rax,%r15,4), %eax
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O1/jonof[P]jftekwar/jfbuild/src/cache1d.c
// Function: kfilelength
int kfilelength(int handle)
{
	int i, groupnum;

	groupnum = filegrp[handle];
	if (groupnum == 255) {
		return (int)Bfilelength(filehan[handle]);
	}
#ifdef WITHKPLIB
	else if (groupnum == 254)
	{
		if (kzcurhand != handle)
		{
			if (kztell() >= 0) { filepos[kzcurhand] = kztell(); kzclose(); }
			kzcurhand = handle;
			kzipopen(filenamsav[handle]);
			kzseek(filepos[handle],SEEK_SET);
		}
		return kzfilelength();
	}
#endif
	i = filehan[handle];
	return(gfileoffs[groupnum][i+1]-gfileoffs[groupnum][i]);
}

// Assembly:
pushq %r14
pushq %rbx
pushq %rax
movslq %edi, %r14
leaq 0x1932a0(%rip), %rax    # 0x1b3780
movzbl (%r14,%rax), %eax
cmpl $0xfe, %eax
je 0x2050c
cmpl $0xff, %eax
jne 0x20578
leaq 0x82b52(%rip), %rax     # 0xa3050
movl (%rax,%r14,4), %edi
callq 0x21ece
jmp 0x20595
movl %edi, %ebx
cmpl %edi, 0x82c3c(%rip)     # 0xa3150
je 0x2056c
callq 0x47c82
testl %eax, %eax
js 0x2053a
callq 0x47c82
movslq 0x82c25(%rip), %rcx     # 0xa3150
leaq 0x19328e(%rip), %rdx    # 0x1b37c0
movl %eax, (%rdx,%rcx,4)
callq 0x47ce0
movl %ebx, 0x82c10(%rip)     # 0xa3150
movq %r14, %rax
shlq $0x8, %rax
leaq (%rax,%r14,4), %rax
leaq 0x19336e(%rip), %rdi    # 0x1b38c0
addq %rax, %rdi
callq 0x20173
leaq 0x19325f(%rip), %rax    # 0x1b37c0
movl (%rax,%r14,4), %edi
xorl %esi, %esi
callq 0x47c41
addq $0x8, %rsp
popq %rbx
popq %r14
jmp 0x47c2e
leaq 0x82ad1(%rip), %rcx     # 0xa3050
movslq (%rcx,%r14,4), %rcx
leaq 0x1931d6(%rip), %rdx    # 0x1b3760
movq (%rdx,%rax,8), %rdx
movl 0x4(%rdx,%rcx,4), %eax
subl (%rdx,%rcx,4), %eax
addq $0x8, %rsp
popq %rbx
popq %r14
retq
// File: /workspace/github_c_makefile_star2_O1/jonof[P]jftekwar/jfbuild/src/cache1d.c
// Function: ktell
int ktell(int handle)
{
	int groupnum;

	groupnum = filegrp[handle];

	if (groupnum == 255) return((int)lseek(filehan[handle],0,SEEK_CUR));
#ifdef WITHKPLIB
	else if (groupnum == 254)
	{
		if (kzcurhand != handle)
		{
			if (kztell() >= 0) { filepos[kzcurhand] = kztell(); kzclose(); }
			kzcurhand = handle;
			kzipopen(filenamsav[handle]);
			kzseek(filepos[handle],SEEK_SET);
		}
		return kztell();
	}
#endif
	if (groupfil[groupnum] != -1)
		return filepos[handle];
	return(-1);
}

// Assembly:
pushq %r14
pushq %rbx
pushq %rax
movslq %edi, %r14
leaq 0x1931d5(%rip), %rax    # 0x1b3780
movzbl (%r14,%rax), %eax
cmpl $0xfe, %eax
je 0x205de
cmpl $0xff, %eax
jne 0x2064a
leaq 0x82a87(%rip), %rax     # 0xa3050
movl (%rax,%r14,4), %edi
xorl %esi, %esi
movl $0x1, %edx
callq 0x62b0
jmp 0x20669
movl %edi, %ebx
cmpl %edi, 0x82b6a(%rip)     # 0xa3150
je 0x2063e
callq 0x47c82
testl %eax, %eax
js 0x2060c
callq 0x47c82
movslq 0x82b53(%rip), %rcx     # 0xa3150
leaq 0x1931bc(%rip), %rdx    # 0x1b37c0
movl %eax, (%rdx,%rcx,4)
callq 0x47ce0
movl %ebx, 0x82b3e(%rip)     # 0xa3150
movq %r14, %rax
shlq $0x8, %rax
leaq (%rax,%r14,4), %rax
leaq 0x19329c(%rip), %rdi    # 0x1b38c0
addq %rax, %rdi
callq 0x20173
leaq 0x19318d(%rip), %rax    # 0x1b37c0
movl (%rax,%r14,4), %edi
xorl %esi, %esi
callq 0x47c41
addq $0x8, %rsp
popq %rbx
popq %r14
jmp 0x47c82
leaq 0x829ef(%rip), %rcx     # 0xa3040
cmpl $-0x1, (%rcx,%rax,4)
je 0x20664
leaq 0x193162(%rip), %rax    # 0x1b37c0
movl (%rax,%r14,4), %eax
jmp 0x20669
movl $0xffffffff, %eax       # imm = 0xFFFFFFFF
addq $0x8, %rsp
popq %rbx
popq %r14
retq
// File: /workspace/github_c_makefile_star2_O1/jonof[P]jftekwar/jfbuild/src/cache1d.c
// Function: kclose
void kclose(int handle)
{
	if (handle < 0) return;
	if (filegrp[handle] == 255) Bclose(filehan[handle]);
#ifdef WITHKPLIB
	else if (filegrp[handle] == 254)
	{
		kzclose();
		kzcurhand = -1;
	}
#endif
	filehan[handle] = -1;
}

// Assembly:
testl %edi, %edi
js 0x206c0
pushq %rbx
movl %edi, %ebx
leaq 0x193101(%rip), %rax    # 0x1b3780
movzbl (%rbx,%rax), %eax
cmpl $0xfe, %eax
je 0x206a2
cmpl $0xff, %eax
jne 0x206b1
leaq 0x829b8(%rip), %rax     # 0xa3050
movl (%rax,%rbx,4), %edi
callq 0x6220
jmp 0x206b1
callq 0x47ce0
movl $0xffffffff, 0x82a9f(%rip) # imm = 0xFFFFFFFF
leaq 0x82998(%rip), %rax     # 0xa3050
movl $0xffffffff, (%rax,%rbx,4) # imm = 0xFFFFFFFF
popq %rbx
retq
// File: /workspace/github_c_makefile_star2_O1/jonof[P]jftekwar/jfbuild/src/cache1d.c
// Function: klistfree
void klistfree(CACHE1D_FIND_REC *rec)
{
	CACHE1D_FIND_REC *n;
	
	while (rec) {
		n = rec->next;
		free(rec);
		rec = n;
	}
}

// Assembly:
testq %rdi, %rdi
je 0x206d9
pushq %rbx
movq 0x10(%rdi), %rbx
callq 0x61c0
movq %rbx, %rdi
testq %rbx, %rbx
jne 0x206c7
popq %rbx
retq
// File: /workspace/github_c_makefile_star2_O1/jonof[P]jftekwar/jfbuild/src/cache1d.c
// Function: lzwallocate
static void lzwallocate(void)
{
	lzwbuflock[0] = lzwbuflock[1] = lzwbuflock[2] = lzwbuflock[3] = lzwbuflock[4] = 200;
	if (lzwbuf1 == NULL) allocache((void **)&lzwbuf1,LZWSIZE+(LZWSIZE>>4),&lzwbuflock[0]);
	if (lzwbuf2 == NULL) allocache((void **)&lzwbuf2,(LZWSIZE+(LZWSIZE>>4))*2,&lzwbuflock[1]);
	if (lzwbuf3 == NULL) allocache((void **)&lzwbuf3,(LZWSIZE+(LZWSIZE>>4))*2,&lzwbuflock[2]);
	if (lzwbuf4 == NULL) allocache((void **)&lzwbuf4,LZWSIZE,&lzwbuflock[3]);
	if (lzwbuf5 == NULL) allocache((void **)&lzwbuf5,LZWSIZE+(LZWSIZE>>4),&lzwbuflock[4]);
}

// Assembly:
pushq %rax
movb $-0x38, 0x196a28(%rip)  # 0x1b79d4
movl $0xc8c8c8c8, 0x196a1a(%rip) # imm = 0xC8C8C8C8
cmpq $0x0, 0x196a1a(%rip)    # 0x1b79d8
jne 0x20fd8
leaq 0x196a11(%rip), %rdi    # 0x1b79d8
leaq 0x196a02(%rip), %rdx    # 0x1b79d0
movl $0x4400, %esi           # imm = 0x4400
callq 0x1f150
cmpq $0x0, 0x196a00(%rip)    # 0x1b79e0
jne 0x20ffa
leaq 0x1969f7(%rip), %rdi    # 0x1b79e0
leaq 0x1969e1(%rip), %rdx    # 0x1b79d1
movl $0x8800, %esi           # imm = 0x8800
callq 0x1f150
cmpq $0x0, 0x1969e6(%rip)    # 0x1b79e8
jne 0x2101c
leaq 0x1969dd(%rip), %rdi    # 0x1b79e8
leaq 0x1969c0(%rip), %rdx    # 0x1b79d2
movl $0x8800, %esi           # imm = 0x8800
callq 0x1f150
cmpq $0x0, 0x1969a4(%rip)    # 0x1b79c8
jne 0x2103e
leaq 0x19699b(%rip), %rdi    # 0x1b79c8
leaq 0x19699f(%rip), %rdx    # 0x1b79d3
movl $0x4000, %esi           # imm = 0x4000
callq 0x1f150
cmpq $0x0, 0x19697a(%rip)    # 0x1b79c0
je 0x2104a
popq %rax
retq
leaq 0x19696f(%rip), %rdi    # 0x1b79c0
leaq 0x19697c(%rip), %rdx    # 0x1b79d4
movl $0x4400, %esi           # imm = 0x4400
popq %rax
jmp 0x1f150
// File: /workspace/github_c_makefile_star2_O1/jonof[P]jftekwar/jfbuild/src/compat.c
// Function: Bvasprintf
int Bvasprintf(char **ret, const char *format, va_list ap)
{
    int len;
    va_list app;

    va_copy(app, ap);
    len = vsnprintf(NULL, 0, format, app);
    va_end(app);

    if (len < 0) return -1;
    if ((*ret = malloc(len + 1)) == NULL) return -1;

    va_copy(app, ap);
    len = vsnprintf(*ret, len + 1, format, app);
    va_end(app);

    return len;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
subq $0x20, %rsp
movq %rdx, %r15
movq %rsi, %rbx
movq %rdi, %r14
movq 0x10(%rdx), %rax
movq %rsp, %rcx
movq %rax, 0x10(%rcx)
movups (%rdx), %xmm0
movaps %xmm0, (%rcx)
xorl %edi, %edi
xorl %esi, %esi
movq %rbx, %rdx
callq 0x6740
movl $0xffffffff, %ebp       # imm = 0xFFFFFFFF
testl %eax, %eax
js 0x21b03
movl %eax, %r12d
incl %r12d
movq %r12, %rdi
callq 0x69a0
movq %rax, (%r14)
testq %rax, %rax
je 0x21b03
movq 0x10(%r15), %rax
movq %rsp, %rcx
movq %rax, 0x10(%rcx)
movups (%r15), %xmm0
movaps %xmm0, (%rcx)
movq (%r14), %rdi
movq %r12, %rsi
movq %rbx, %rdx
callq 0x6740
movl %eax, %ebp
movl %ebp, %eax
addq $0x20, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O1/jonof[P]jftekwar/jfbuild/src/compat.c
// Function: Bstrtoken
char *Bstrtoken(char *s, char *delim, char **ptrptr, int chop)
{
	char *p, *start;

	if (!ptrptr) return NULL;
	
	if (s) p = s;
	else p = *ptrptr;

	if (!p) return NULL;

	while (*p != 0 && strchr(delim, *p)) p++;
	if (*p == 0) {
		*ptrptr = NULL;
		return NULL;
	}
	start = p;
	while (*p != 0 && !strchr(delim, *p)) p++;
	if (*p == 0) *ptrptr = NULL;
	else {
		if (chop) *(p++) = 0;
		*ptrptr = p;
	}

	return start;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
testq %rdx, %rdx
je 0x21dc0
movl %ecx, %ebp
movq %rdx, %rbx
movq %rsi, %r15
movq %rdi, %r14
testq %rdi, %rdi
jne 0x21d72
movq (%rbx), %r14
testq %r14, %r14
je 0x21dc0
movsbl (%r14), %esi
testl %esi, %esi
sete %r13b
je 0x21db5
movq %r15, %rdi
callq 0x6530
testq %rax, %rax
je 0x21db0
xorl %r12d, %r12d
movsbl 0x1(%r14), %esi
testl %esi, %esi
sete %r13b
je 0x21db8
incq %r14
movq %r15, %rdi
callq 0x6530
testq %rax, %rax
jne 0x21d93
testb %r13b, %r13b
je 0x21dd5
xorl %r12d, %r12d
xorl %r14d, %r14d
movq %r12, (%rbx)
jmp 0x21dc3
xorl %r14d, %r14d
movq %r14, %rax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movsbl (%r14), %esi
testl %esi, %esi
sete %r13b
je 0x21e17
movq %r15, %rdi
callq 0x6530
movq %r14, %r12
testq %rax, %rax
jne 0x21e12
movq %r14, %r12
movsbl 0x1(%r12), %esi
testl %esi, %esi
sete %r13b
je 0x21e17
incq %r12
movq %r15, %rdi
callq 0x6530
testq %rax, %rax
je 0x21df4
testb %r13b, %r13b
je 0x21e1c
xorl %r12d, %r12d
jmp 0x21dbb
testl %ebp, %ebp
je 0x21dbb
movb $0x0, (%r12)
incq %r12
jmp 0x21dbb
// File: /workspace/github_c_makefile_star2_O1/jonof[P]jftekwar/jfbuild/src/compat.c
// Function: Bwildmatch
int Bwildmatch (const char *i, const char *j)
{
	const char *k;
	char c0, c1;

	if (!*j) return(1);
	do
	{
		if (*j == '*')
		{
			for(k=i,j++;*k;k++) if (Bwildmatch(k,j)) return(1);
			continue;
		}
		if (!*i) return(0);
		if (*j == '?') { i++; j++; continue; }
		c0 = *i; if ((c0 >= 'a') && (c0 <= 'z')) c0 -= 32;
		c1 = *j; if ((c1 >= 'a') && (c1 <= 'z')) c1 -= 32;
#ifdef _WIN32
		if (c0 == '/') c0 = '\\';
		if (c1 == '/') c1 = '\\';
#endif
		if (c0 != c1) return(0);
		i++; j++;
	} while (*j);
	return(!*i);
}

// Assembly:
cmpb $0x0, (%rsi)
je 0x220a3
pushq %r15
pushq %r14
pushq %rbx
movq %rsi, %r14
movq %rdi, %rbx
movb (%r14), %cl
cmpb $0x2a, %cl
jne 0x22049
incq %r14
cmpb $0x0, (%rbx)
movq %rbx, %r15
je 0x22088
movq %r15, %rdi
movq %r14, %rsi
callq 0x22006
testl %eax, %eax
jne 0x22098
cmpb $0x0, 0x1(%r15)
leaq 0x1(%r15), %r15
jne 0x2202d
jmp 0x22088
movb (%rbx), %dl
xorl %eax, %eax
testb %dl, %dl
je 0x2209d
cmpb $0x3f, %cl
je 0x22082
leal -0x61(%rdx), %esi
leal -0x20(%rdx), %edi
cmpb $0x1a, %sil
movzbl %dl, %edx
movzbl %dil, %esi
cmovael %edx, %esi
leal -0x61(%rcx), %edx
leal -0x20(%rcx), %edi
cmpb $0x1a, %dl
movzbl %cl, %ecx
movzbl %dil, %edx
cmovael %ecx, %edx
cmpb %dl, %sil
jne 0x2209d
incq %rbx
incq %r14
cmpb $0x0, (%r14)
jne 0x2201a
xorl %eax, %eax
cmpb $0x0, (%rbx)
sete %al
jmp 0x2209d
movl $0x1, %eax
popq %rbx
popq %r14
popq %r15
retq
movl $0x1, %eax
retq
// File: /workspace/github_c_makefile_star2_O1/jonof[P]jftekwar/jfbuild/src/defs.c
// Function: loaddefinitionsfile
int loaddefinitionsfile(const char *fn)
{
	scriptfile *script;

	script = scriptfile_fromfile(fn);
	if (!script) return -1;

	defsparser(script);

	scriptfile_close(script);
	scriptfile_clearsymbols();

	return 0;
}

// Assembly:
pushq %rbx
callq 0x4b43d
testq %rax, %rax
je 0x2210b
movq %rax, %rbx
movq %rax, %rdi
callq 0x22112
movq %rbx, %rdi
callq 0x4b574
callq 0x4b6e4
xorl %eax, %eax
jmp 0x22110
movl $0xffffffff, %eax       # imm = 0xFFFFFFFF
popq %rbx
retq
// File: /workspace/github_c_makefile_star2_O1/jonof[P]jftekwar/jfbuild/src/defs.c
// Function: getatoken
static int getatoken(scriptfile *sf, tokenlist *tl, int ntokens)
{
	char *tok;
	int i;

	if (!sf) return T_ERROR;
	tok = scriptfile_gettoken(sf);
	if (!tok) return T_EOF;

	for(i=0;i<ntokens;i++) {
		if (!Bstrcasecmp(tok, tl[i].text))
			return tl[i].tokenid;
	}

	return T_ERROR;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movl %edx, %ebp
movq %rsi, %r14
callq 0x4ac84
testq %rax, %rax
je 0x23b94
movl $0xffffffff, %ebx       # imm = 0xFFFFFFFF
testl %ebp, %ebp
jle 0x23ba0
movq %rax, %r15
movl %ebp, %r12d
shlq $0x4, %r12
xorl %r13d, %r13d
movq (%r14,%r13), %rsi
movq %r15, %rdi
callq 0x6880
testl %eax, %eax
je 0x23b9b
addq $0x10, %r13
cmpq %r13, %r12
jne 0x23b79
jmp 0x23ba0
movl $0xfffffffe, %ebx       # imm = 0xFFFFFFFE
jmp 0x23ba0
movl 0x8(%r14,%r13), %ebx
movl %ebx, %eax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
nopl (%rax)
// File: /workspace/github_c_makefile_star2_O1/jonof[P]jftekwar/jfbuild/src/engine.c
// Function: animateoffs
int animateoffs(short tilenum, short fakevar)
{
	int i, k, offs;

	(void)fakevar;

	offs = 0;
	i = (totalclocklock>>((picanm[tilenum]>>24)&15));
	if ((picanm[tilenum]&63) > 0)
	{
		switch(picanm[tilenum]&192)
		{
			case 64:
				k = (i%((picanm[tilenum]&63)<<1));
				if (k < (picanm[tilenum]&63))
					offs = k;
				else
					offs = (((picanm[tilenum]&63)<<1)-k);
				break;
			case 128:
				offs = (i%((picanm[tilenum]&63)+1));
					break;
			case 192:
				offs = -(i%((picanm[tilenum]&63)+1));
		}
	}
	return(offs);
}

// Assembly:
movl 0x215d09(%rip), %eax    # 0x239a58
movslq %edi, %rcx
leaq 0x215d07(%rip), %rdx    # 0x239a60
movl (%rdx,%rcx,4), %esi
movl %esi, %ecx
shrl $0x18, %ecx
andb $0xf, %cl
sarl %cl, %eax
movl %esi, %ecx
andl $0x3f, %ecx
je 0x23d92
shrl $0x6, %esi
andl $0x3, %esi
leaq 0x52076(%rip), %rdx     # 0x75df0
movslq (%rdx,%rsi,4), %rdi
addq %rdx, %rdi
jmpq *%rdi
leal (%rcx,%rcx), %esi
cltd
idivl %esi
subl %edx, %esi
cmpl %ecx, %edx
cmovll %edx, %esi
jmp 0x23da8
xorl %esi, %esi
jmp 0x23da8
incl %ecx
cltd
idivl %ecx
movl %edx, %esi
jmp 0x23da8
incl %ecx
cltd
idivl %ecx
movl %edx, %esi
negl %esi
movl %esi, %eax
retq
// File: /workspace/github_c_makefile_star2_O1/jonof[P]jftekwar/jfbuild/src/engine.c
// Function: buildprintf
void buildprintf(const char *fmt, ...)
{
	char tmpstr[1024];
	va_list va, vac;

	va_start(va, fmt);

	va_copy(vac, va);
	vfprintf(stdout, fmt, vac);
	va_end(vac);

	if (logfile) {
		va_copy(vac, va);
		vfprintf(logfile, fmt, vac);
		va_end(vac);
	}

	va_copy(vac, va);
	vsnprintf(tmpstr, sizeof(tmpstr), fmt, vac);
	va_end(vac);

	initputs(tmpstr);
	OSD_Puts(tmpstr);

	va_end(va);
}

// Assembly:
pushq %r14
pushq %rbx
subq $0x4f8, %rsp            # imm = 0x4F8
movq %rdi, %rbx
leaq 0x40(%rsp), %rdi
movq %rsi, 0x8(%rdi)
movq %rdx, 0x10(%rdi)
movq %rcx, 0x18(%rdi)
movq %r8, 0x20(%rdi)
movq %r9, 0x28(%rdi)
testb %al, %al
je 0x24d1b
movaps %xmm0, 0x70(%rsp)
movaps %xmm1, 0x80(%rsp)
movaps %xmm2, 0x90(%rsp)
movaps %xmm3, 0xa0(%rsp)
movaps %xmm4, 0xb0(%rsp)
movaps %xmm5, 0xc0(%rsp)
movaps %xmm6, 0xd0(%rsp)
movaps %xmm7, 0xe0(%rsp)
movabsq $0x3000000008, %rax     # imm = 0x3000000008
movq %rax, (%rsp)
leaq 0x510(%rsp), %rax
movq %rax, 0x8(%rsp)
movq %rdi, 0x10(%rsp)
leaq 0x20(%rsp), %rdx
movq %rdi, 0x10(%rdx)
movq (%rsp), %rax
movq %rax, (%rdx)
movq 0x8(%rsp), %rax
movq %rax, 0x8(%rdx)
movq 0x6d265(%rip), %rax     # 0x91fc0
movq (%rax), %rdi
movq %rbx, %rsi
callq 0x6b60
movq 0x38678b(%rip), %rdi    # 0x3ab4f8
testq %rdi, %rdi
je 0x24d8f
movq 0x10(%rsp), %rax
leaq 0x20(%rsp), %rdx
movq %rax, 0x10(%rdx)
movaps (%rsp), %xmm0
movaps %xmm0, (%rdx)
movq %rbx, %rsi
callq 0x6b60
movq 0x10(%rsp), %rax
leaq 0x20(%rsp), %rcx
movq %rax, 0x10(%rcx)
movaps (%rsp), %xmm0
movaps %xmm0, (%rcx)
leaq 0xf0(%rsp), %r14
movl $0x400, %esi            # imm = 0x400
movq %r14, %rdi
movq %rbx, %rdx
callq 0x6740
movq %r14, %rdi
callq 0x6c30a
movq %r14, %rdi
callq 0x4a70a
addq $0x4f8, %rsp            # imm = 0x4F8
popq %rbx
popq %r14
retq
// File: /workspace/github_c_makefile_star2_O1/jonof[P]jftekwar/jfbuild/src/engine.c
// Function: uninitengine
void uninitengine(void)
{
	int i;

	//buildprintf("cacheresets = %d, cacheinvalidates = %d\n", cacheresets, cacheinvalidates);

#if USE_POLYMOST && USE_OPENGL
	polymost_glreset();
	PTClear();
	PTCacheUnloadIndex();
	hicinit();
	freeallmodels();
#endif

	uninitsystem();

	if (logfile) Bfclose(logfile);
	logfile = NULL;

	if (artfil != -1) kclose(artfil);

	if (transluc != NULL) { kfree(transluc); transluc = NULL; }
	if (pic != NULL) { kfree(pic); pic = NULL; }
	if (lookups != NULL) { kfree(lookups); lookups = NULL; }
	for(i=0;i<MAXPALOOKUPS;i++)
		if (palookup[i] != NULL) { kfree(palookup[i]); palookup[i] = NULL; }
}

// Assembly:
pushq %r14
pushq %rbx
pushq %rax
callq 0x4d9ef
callq 0x65717
callq 0x668e3
callq 0x5d92b
callq 0x5dd7c
callq 0x6c0da
movq 0x385f46(%rip), %rdi    # 0x3ab4f8
testq %rdi, %rdi
je 0x255bc
callq 0x6480
movq $0x0, 0x385f31(%rip) # 0x3ab4f8
movl 0x7e677(%rip), %edi     # 0xa3c44
cmpl $-0x1, %edi
je 0x255d7
callq 0x20671
movq 0x192452(%rip), %rdi    # 0x1b7a30
testq %rdi, %rdi
je 0x255f3
callq 0x61c0
movq $0x0, 0x19243d(%rip) # 0x1b7a30
movq 0x19240e(%rip), %rdi    # 0x1b7a08
testq %rdi, %rdi
je 0x2560f
callq 0x61c0
movq $0x0, 0x1923f9(%rip) # 0x1b7a08
movq 0x385eea(%rip), %rdi    # 0x3ab500
testq %rdi, %rdi
je 0x2562b
callq 0x61c0
movq $0x0, 0x385ed5(%rip) # 0x3ab500
xorl %ebx, %ebx
leaq 0x3724ac(%rip), %r14    # 0x397ae0
movq (%rbx,%r14), %rdi
testq %rdi, %rdi
je 0x2564a
callq 0x61c0
movq $0x0, (%rbx,%r14)
addq $0x8, %rbx
cmpq $0x800, %rbx            # imm = 0x800
jne 0x25634
addq $0x8, %rsp
popq %rbx
popq %r14
retq
// File: /workspace/github_c_makefile_star2_O1/jonof[P]jftekwar/jfbuild/src/engine.c
// Function: initspritelists
void initspritelists(void)
{
	int i;

	for (i=0;i<MAXSECTORS;i++)     //Init doubly-linked sprite sector lists
		headspritesect[i] = -1;
	headspritesect[MAXSECTORS] = 0;
	for(i=0;i<MAXSPRITES;i++)
	{
		prevspritesect[i] = i-1;
		nextspritesect[i] = i+1;
		sprite[i].sectnum = MAXSECTORS;
	}
	prevspritesect[0] = -1;
	nextspritesect[MAXSPRITES-1] = -1;


	for(i=0;i<MAXSTATUS;i++)      //Init doubly-linked sprite status lists
		headspritestat[i] = -1;
	headspritestat[MAXSTATUS] = 0;
	for(i=0;i<MAXSPRITES;i++)
	{
		prevspritestat[i] = i-1;
		nextspritestat[i] = i+1;
		sprite[i].statnum = MAXSTATUS;
	}
	prevspritestat[0] = -1;
	nextspritestat[MAXSPRITES-1] = -1;
}

// Assembly:
pushq %rbx
leaq 0x385ea9(%rip), %rdi    # 0x3ab510
movl $0x2000, %edx           # imm = 0x2000
movl $0xff, %esi
callq 0x62f0
movw $0x0, 0x387e91(%rip)    # 0x3ad510
movw $0xffff, %ax            # imm = 0xFFFF
leaq 0x25663e(%rip), %rcx    # 0x27bcc8
xorl %edx, %edx
leaq 0x387e8d(%rip), %rsi    # 0x3ad520
leaq 0x38fe86(%rip), %rdi    # 0x3b5520
movw %ax, (%rdx,%rsi)
leal 0x2(%rax), %r8d
movw %r8w, (%rdx,%rdi)
movw $0x1000, (%rcx)         # imm = 0x1000
incl %eax
addq $0x2, %rdx
addq $0x2c, %rcx
cmpq $0x8000, %rdx           # imm = 0x8000
jne 0x2569a
movw $0xffff, %bx            # imm = 0xFFFF
movw %bx, 0x387e56(%rip)     # 0x3ad520
movw %bx, 0x397e4d(%rip)     # 0x3bd51e
leaq 0x397e48(%rip), %rdi    # 0x3bd520
movl $0x800, %edx            # imm = 0x800
movl $0xff, %esi
callq 0x62f0
movw $0x0, 0x398630(%rip)    # 0x3bdd20
leaq 0x2565d3(%rip), %rax    # 0x27bcca
xorl %ecx, %ecx
leaq 0x398630(%rip), %rdx    # 0x3bdd30
leaq 0x3a0629(%rip), %rsi    # 0x3c5d30
movw %bx, (%rcx,%rdx)
leal 0x2(%rbx), %edi
movw %di, (%rcx,%rsi)
movw $0x400, (%rax)          # imm = 0x400
incl %ebx
addq $0x2, %rcx
addq $0x2c, %rax
cmpq $0x8000, %rcx           # imm = 0x8000
jne 0x25707
movw $0xffff, %ax            # imm = 0xFFFF
movw %ax, 0x3985fb(%rip)     # 0x3bdd30
movw %ax, 0x3a85f2(%rip)     # 0x3cdd2e
popq %rbx
retq
// File: /workspace/github_c_makefile_star2_O1/jonof[P]jftekwar/jfbuild/src/engine.c
// Function: updatesector
void updatesector(int x, int y, short *sectnum)
{
	walltype *wal;
	int i, j;

	if (inside(x,y,*sectnum) == 1) return;

	if ((*sectnum >= 0) && (*sectnum < numsectors))
	{
		wal = &wall[sector[*sectnum].wallptr];
		j = sector[*sectnum].wallnum;
		do
		{
			i = wal->nextsector;
			if (i >= 0)
				if (inside(x,y,(short)i) == 1)
				{
					*sectnum = i;
					return;
				}
			wal++;
			j--;
		} while (j != 0);
	}

	for(i=numsectors-1;i>=0;i--)
		if (inside(x,y,(short)i) == 1)
		{
			*sectnum = i;
			return;
		}

	*sectnum = -1;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movq %rdx, %rbx
movl %esi, %ebp
movl %edi, %r14d
movswl (%rdx), %r15d
movl %r15d, %edx
callq 0x355a7
cmpl $0x1, %eax
je 0x25ffe
movslq %r15d, %rax
testw %ax, %ax
setns %cl
movzwl 0x3a8ff4(%rip), %edx    # 0x3cef60
movw %dx, 0x6(%rsp)
cmpw %dx, %ax
setl %dl
andb %cl, %dl
cmpb $0x1, %dl
jne 0x25fce
leaq (%rax,%rax,4), %rax
leaq 0x21cad7(%rip), %rcx    # 0x242a60
movswq (%rcx,%rax,8), %rdx
movswl 0x2(%rcx,%rax,8), %r13d
shlq $0x5, %rdx
leaq 0x191ab1(%rip), %rax    # 0x1b7a50
leaq (%rdx,%rax), %r12
addq $0xc, %r12
movzwl (%r12), %r15d
testw %r15w, %r15w
js 0x25fc5
movswl %r15w, %edx
movl %r14d, %edi
movl %ebp, %esi
callq 0x355a7
cmpl $0x1, %eax
je 0x25ffa
addq $0x20, %r12
decl %r13d
jne 0x25fa7
movswl 0x6(%rsp), %r15d
testl %r15d, %r15d
jle 0x25ff5
movl %r15d, %eax
decl %r15d
decl %eax
movswl %ax, %edx
movl %r14d, %edi
movl %ebp, %esi
callq 0x355a7
cmpl $0x1, %eax
jne 0x25fd4
jmp 0x25ffa
movw $0xffff, %r15w          # imm = 0xFFFF
movw %r15w, (%rbx)
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq