LLM4Binary/decompile-bench-makefile huggingface dataset:
// File: /workspace/github_c_makefile_star2_O0/jonof[P]jftekwar/jfbuild/src/engine.c
// Function: alignceilslope
void alignceilslope(short dasect, int x, int y, int z)
{
	int i, dax, day;
	walltype *wal;

	wal = &wall[sector[dasect].wallptr];
	dax = wall[wal->point2].x-wal->x;
	day = wall[wal->point2].y-wal->y;

	i = (y-wal->y)*dax - (x-wal->x)*day; if (i == 0) return;
	sector[dasect].ceilingheinum = scale((z-sector[dasect].ceilingz)<<8,
	  nsqrtasm(dax*dax+day*day),i);

	if (sector[dasect].ceilingheinum == 0) sector[dasect].ceilingstat &= ~2;
	else sector[dasect].ceilingstat |= 2;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x30, %rsp
movw %di, %ax
movw %ax, -0x2(%rbp)
movl %esi, -0x8(%rbp)
movl %edx, -0xc(%rbp)
movl %ecx, -0x10(%rbp)
movswq -0x2(%rbp), %rcx
leaq 0x22787c(%rip), %rax    # 0x2805c0
imulq $0x28, %rcx, %rcx
addq %rcx, %rax
movswq (%rax), %rcx
leaq 0x19c85a(%rip), %rax    # 0x1f55b0
shlq $0x5, %rcx
addq %rcx, %rax
movq %rax, -0x28(%rbp)
movq -0x28(%rbp), %rax
movswq 0x8(%rax), %rcx
leaq 0x19c83f(%rip), %rax    # 0x1f55b0
shlq $0x5, %rcx
addq %rcx, %rax
movl (%rax), %eax
movq -0x28(%rbp), %rcx
subl (%rcx), %eax
movl %eax, -0x18(%rbp)
movq -0x28(%rbp), %rax
movswq 0x8(%rax), %rcx
leaq 0x19c81d(%rip), %rax    # 0x1f55b0
shlq $0x5, %rcx
addq %rcx, %rax
movl 0x4(%rax), %eax
movq -0x28(%rbp), %rcx
subl 0x4(%rcx), %eax
movl %eax, -0x1c(%rbp)
movl -0xc(%rbp), %eax
movq -0x28(%rbp), %rcx
subl 0x4(%rcx), %eax
imull -0x18(%rbp), %eax
movl -0x8(%rbp), %ecx
movq -0x28(%rbp), %rdx
subl (%rdx), %ecx
imull -0x1c(%rbp), %ecx
subl %ecx, %eax
movl %eax, -0x14(%rbp)
cmpl $0x0, -0x14(%rbp)
jne 0x58dd2
jmp 0x58e87
movl -0x10(%rbp), %eax
movswq -0x2(%rbp), %rdx
leaq 0x2277df(%rip), %rcx    # 0x2805c0
imulq $0x28, %rdx, %rdx
addq %rdx, %rcx
subl 0x4(%rcx), %eax
shll $0x8, %eax
movl %eax, -0x2c(%rbp)
movl -0x18(%rbp), %edi
imull -0x18(%rbp), %edi
movl -0x1c(%rbp), %eax
imull -0x1c(%rbp), %eax
addl %eax, %edi
callq 0x37570
movl -0x2c(%rbp), %edi
movl %eax, %esi
movl -0x14(%rbp), %edx
callq 0x37720
movw %ax, %cx
movswq -0x2(%rbp), %rdx
leaq 0x22779e(%rip), %rax    # 0x2805c0
imulq $0x28, %rdx, %rdx
addq %rdx, %rax
movw %cx, 0x12(%rax)
movswq -0x2(%rbp), %rcx
leaq 0x227787(%rip), %rax    # 0x2805c0
imulq $0x28, %rcx, %rcx
addq %rcx, %rax
movswl 0x12(%rax), %eax
cmpl $0x0, %eax
jne 0x58e69
movswq -0x2(%rbp), %rcx
leaq 0x22776b(%rip), %rax    # 0x2805c0
imulq $0x28, %rcx, %rcx
addq %rcx, %rax
movswl 0xc(%rax), %ecx
andl $-0x3, %ecx
movw %cx, 0xc(%rax)
jmp 0x58e87
movswq -0x2(%rbp), %rcx
leaq 0x22774b(%rip), %rax    # 0x2805c0
imulq $0x28, %rcx, %rcx
addq %rcx, %rax
movswl 0xc(%rax), %ecx
orl $0x2, %ecx
movw %cx, 0xc(%rax)
addq $0x30, %rsp
popq %rbp
retq
nopl (%rax)
// File: /workspace/github_c_makefile_star2_O0/jonof[P]jftekwar/jfbuild/src/engine.c
// Function: alignflorslope
void alignflorslope(short dasect, int x, int y, int z)
{
	int i, dax, day;
	walltype *wal;

	wal = &wall[sector[dasect].wallptr];
	dax = wall[wal->point2].x-wal->x;
	day = wall[wal->point2].y-wal->y;

	i = (y-wal->y)*dax - (x-wal->x)*day; if (i == 0) return;
	sector[dasect].floorheinum = scale((z-sector[dasect].floorz)<<8,
	  nsqrtasm(dax*dax+day*day),i);

	if (sector[dasect].floorheinum == 0) sector[dasect].floorstat &= ~2;
	else sector[dasect].floorstat |= 2;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x30, %rsp
movw %di, %ax
movw %ax, -0x2(%rbp)
movl %esi, -0x8(%rbp)
movl %edx, -0xc(%rbp)
movl %ecx, -0x10(%rbp)
movswq -0x2(%rbp), %rcx
leaq 0x22770c(%rip), %rax    # 0x2805c0
imulq $0x28, %rcx, %rcx
addq %rcx, %rax
movswq (%rax), %rcx
leaq 0x19c6ea(%rip), %rax    # 0x1f55b0
shlq $0x5, %rcx
addq %rcx, %rax
movq %rax, -0x28(%rbp)
movq -0x28(%rbp), %rax
movswq 0x8(%rax), %rcx
leaq 0x19c6cf(%rip), %rax    # 0x1f55b0
shlq $0x5, %rcx
addq %rcx, %rax
movl (%rax), %eax
movq -0x28(%rbp), %rcx
subl (%rcx), %eax
movl %eax, -0x18(%rbp)
movq -0x28(%rbp), %rax
movswq 0x8(%rax), %rcx
leaq 0x19c6ad(%rip), %rax    # 0x1f55b0
shlq $0x5, %rcx
addq %rcx, %rax
movl 0x4(%rax), %eax
movq -0x28(%rbp), %rcx
subl 0x4(%rcx), %eax
movl %eax, -0x1c(%rbp)
movl -0xc(%rbp), %eax
movq -0x28(%rbp), %rcx
subl 0x4(%rcx), %eax
imull -0x18(%rbp), %eax
movl -0x8(%rbp), %ecx
movq -0x28(%rbp), %rdx
subl (%rdx), %ecx
imull -0x1c(%rbp), %ecx
subl %ecx, %eax
movl %eax, -0x14(%rbp)
cmpl $0x0, -0x14(%rbp)
jne 0x58f42
jmp 0x58ff7
movl -0x10(%rbp), %eax
movswq -0x2(%rbp), %rdx
leaq 0x22766f(%rip), %rcx    # 0x2805c0
imulq $0x28, %rdx, %rdx
addq %rdx, %rcx
subl 0x8(%rcx), %eax
shll $0x8, %eax
movl %eax, -0x2c(%rbp)
movl -0x18(%rbp), %edi
imull -0x18(%rbp), %edi
movl -0x1c(%rbp), %eax
imull -0x1c(%rbp), %eax
addl %eax, %edi
callq 0x37570
movl -0x2c(%rbp), %edi
movl %eax, %esi
movl -0x14(%rbp), %edx
callq 0x37720
movw %ax, %cx
movswq -0x2(%rbp), %rdx
leaq 0x22762e(%rip), %rax    # 0x2805c0
imulq $0x28, %rdx, %rdx
addq %rdx, %rax
movw %cx, 0x1a(%rax)
movswq -0x2(%rbp), %rcx
leaq 0x227617(%rip), %rax    # 0x2805c0
imulq $0x28, %rcx, %rcx
addq %rcx, %rax
movswl 0x1a(%rax), %eax
cmpl $0x0, %eax
jne 0x58fd9
movswq -0x2(%rbp), %rcx
leaq 0x2275fb(%rip), %rax    # 0x2805c0
imulq $0x28, %rcx, %rcx
addq %rcx, %rax
movswl 0xe(%rax), %ecx
andl $-0x3, %ecx
movw %cx, 0xe(%rax)
jmp 0x58ff7
movswq -0x2(%rbp), %rcx
leaq 0x2275db(%rip), %rax    # 0x2805c0
imulq $0x28, %rcx, %rcx
addq %rcx, %rax
movswl 0xe(%rax), %ecx
orl $0x2, %ecx
movw %cx, 0xe(%rax)
addq $0x30, %rsp
popq %rbp
retq
nopl (%rax)
// File: /workspace/github_c_makefile_star2_O0/jonof[P]jftekwar/jfbuild/src/engine.c
// Function: loopnumofsector
int loopnumofsector(short sectnum, short wallnum)
{
	int i, numloops, startwall, endwall;

	numloops = 0;
	startwall = sector[sectnum].wallptr;
	endwall = startwall + sector[sectnum].wallnum;
	for(i=startwall;i<endwall;i++)
	{
		if (i == wallnum) return(numloops);
		if (wall[i].point2 < i) numloops++;
	}
	return(-1);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
movw %si, %ax
movw %di, %cx
movw %cx, -0x6(%rbp)
movw %ax, -0x8(%rbp)
movl $0x0, -0x10(%rbp)
movswq -0x6(%rbp), %rcx
leaq 0x22759b(%rip), %rax    # 0x2805c0
imulq $0x28, %rcx, %rcx
addq %rcx, %rax
movswl (%rax), %eax
movl %eax, -0x14(%rbp)
movl -0x14(%rbp), %eax
movswq -0x6(%rbp), %rdx
leaq 0x22757f(%rip), %rcx    # 0x2805c0
imulq $0x28, %rdx, %rdx
addq %rdx, %rcx
movswl 0x2(%rcx), %ecx
addl %ecx, %eax
movl %eax, -0x18(%rbp)
movl -0x14(%rbp), %eax
movl %eax, -0xc(%rbp)
movl -0xc(%rbp), %eax
cmpl -0x18(%rbp), %eax
jge 0x590a3
movl -0xc(%rbp), %eax
movswl -0x8(%rbp), %ecx
cmpl %ecx, %eax
jne 0x59072
movl -0x10(%rbp), %eax
movl %eax, -0x4(%rbp)
jmp 0x590aa
movslq -0xc(%rbp), %rcx
leaq 0x19c533(%rip), %rax    # 0x1f55b0
shlq $0x5, %rcx
addq %rcx, %rax
movswl 0x8(%rax), %eax
cmpl -0xc(%rbp), %eax
jge 0x59096
movl -0x10(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x10(%rbp)
jmp 0x59098
movl -0xc(%rbp), %eax
addl $0x1, %eax
movl %eax, -0xc(%rbp)
jmp 0x59057
movl $0xffffffff, -0x4(%rbp) # imm = 0xFFFFFFFF
movl -0x4(%rbp), %eax
popq %rbp
retq
nop
// File: /workspace/github_c_makefile_star2_O0/jonof[P]jftekwar/jfbuild/src/engine.c
// Function: setrendermode
int setrendermode(int renderer)
{
	if (bpp == 8) {
		if (renderer < 0) renderer = 0;
		else if (renderer > 2) renderer = 2;
	} else {
		renderer = 3;
	}

	rendmode = renderer;

	return 0;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
movl %edi, -0x4(%rbp)
leaq 0x160496(%rip), %rax    # 0x1bac04
cmpl $0x8, (%rax)
jne 0x5a793
cmpl $0x0, -0x4(%rbp)
jge 0x5a782
movl $0x0, -0x4(%rbp)
jmp 0x5a791
cmpl $0x2, -0x4(%rbp)
jle 0x5a78f
movl $0x2, -0x4(%rbp)
jmp 0x5a791
jmp 0x5a79a
movl $0x3, -0x4(%rbp)
movl -0x4(%rbp), %ecx
leaq 0x59317c(%rip), %rax    # 0x5ed920
movl %ecx, (%rax)
xorl %eax, %eax
popq %rbp
retq
nopw (%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/jonof[P]jftekwar/jfbuild/src/engine.c
// Function: setpolymost2dview
void setpolymost2dview(void)
{
	if (rendmode < 3) return;

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

	gloy1 = -1;

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

// Assembly:
pushq %rbp
movq %rsp, %rbp
leaq 0x593105(%rip), %rax    # 0x5ed920
cmpl $0x3, (%rax)
jge 0x5a822
jmp 0x5a895
leaq 0x5931f7(%rip), %rax    # 0x5eda20
movss (%rax), %xmm0
movss 0x578c3(%rip), %xmm1    # 0xb20f8
ucomiss %xmm1, %xmm0
jne 0x5a83e
jp 0x5a83e
jmp 0x5a864
leaq 0x592ecb(%rip), %rax    # 0x5ed710
movq 0x80(%rax), %rax
leaq 0x85ba1(%rip), %rcx     # 0xe03f4
movl (%rcx), %edx
leaq 0x85b9c(%rip), %rcx     # 0xe03f8
movl (%rcx), %ecx
xorl %esi, %esi
movl %esi, %edi
callq *%rax
leaq 0x5931b5(%rip), %rax    # 0x5eda20
movss 0x57885(%rip), %xmm0    # 0xb20f8
movss %xmm0, (%rax)
movl $0xb71, %edi            # imm = 0xB71
leaq 0x592e8d(%rip), %rax    # 0x5ed710
callq *0x48(%rax)
movl $0xbe2, %edi            # imm = 0xBE2
leaq 0x592e7e(%rip), %rax    # 0x5ed710
callq *0x48(%rax)
popq %rbp
retq
nopw (%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/jonof[P]jftekwar/jfbuild/src/engine.c
// Function: buildsetlogfile
void buildsetlogfile(const char *fn)
{
	if (logfile) Bfclose(logfile);
	logfile = NULL;
	if (fn) logfile = Bfopen(fn,"w");
	if (logfile) setvbuf(logfile, (char*)NULL, _IONBF, 0);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x10, %rsp
movq %rdi, -0x8(%rbp)
cmpq $0x0, 0x38e7a4(%rip)    # 0x3e9058
je 0x5a8c2
movq 0x38e79b(%rip), %rdi    # 0x3e9058
callq 0x6420
movq $0x0, 0x38e78b(%rip) # 0x3e9058
cmpq $0x0, -0x8(%rbp)
je 0x5a8eb
movq -0x8(%rbp), %rdi
leaq 0x5c4ca(%rip), %rsi     # 0xb6da9
callq 0x6c10
movq %rax, 0x38e76d(%rip)    # 0x3e9058
cmpq $0x0, 0x38e765(%rip)    # 0x3e9058
je 0x5a90d
movq 0x38e75c(%rip), %rdi    # 0x3e9058
xorl %eax, %eax
movl %eax, %ecx
movl $0x2, %edx
movq %rcx, %rsi
callq 0x6440
addq $0x10, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/jonof[P]jftekwar/jfbuild/src/engine.c
// Function: initksqrt
static void initksqrt(void)
{
	int i, j, k;

	j = 1; k = 0;
	for(i=0;i<4096;i++)
	{
		if (i >= j) { j <<= 2; k++; }
		sqrtable[i] = (unsigned short)(msqrtasm((i<<18)+131072)<<1);
		shlookup[i] = (k<<1)+((10-k)<<8);
		if (i < 256) shlookup[i+4096] = ((k+6)<<1)+((10-(k+6))<<8);
	}
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x10, %rsp
movl $0x1, -0x8(%rbp)
movl $0x0, -0xc(%rbp)
movl $0x0, -0x4(%rbp)
cmpl $0x1000, -0x4(%rbp)     # imm = 0x1000
jge 0x5a9f9
movl -0x4(%rbp), %eax
cmpl -0x8(%rbp), %eax
jl 0x5a964
movl -0x8(%rbp), %eax
shll $0x2, %eax
movl %eax, -0x8(%rbp)
movl -0xc(%rbp), %eax
addl $0x1, %eax
movl %eax, -0xc(%rbp)
movl -0x4(%rbp), %edi
shll $0x12, %edi
addl $0x20000, %edi          # imm = 0x20000
callq 0x5aad0
shll %eax
movw %ax, %dx
movslq -0x4(%rbp), %rcx
leaq 0x43203b(%rip), %rax    # 0x48c9c0
movw %dx, (%rax,%rcx,2)
movl -0xc(%rbp), %eax
shll %eax
movl $0xa, %ecx
subl -0xc(%rbp), %ecx
shll $0x8, %ecx
addl %ecx, %eax
movw %ax, %dx
movslq -0x4(%rbp), %rcx
leaq 0x42fe17(%rip), %rax    # 0x48a7c0
movw %dx, (%rax,%rcx,2)
cmpl $0x100, -0x4(%rbp)      # imm = 0x100
jge 0x5a9e9
movl -0xc(%rbp), %eax
addl $0x6, %eax
shll %eax
movl -0xc(%rbp), %edx
addl $0x6, %edx
movl $0xa, %ecx
subl %edx, %ecx
shll $0x8, %ecx
addl %ecx, %eax
movw %ax, %dx
movl -0x4(%rbp), %eax
addl $0x1000, %eax           # imm = 0x1000
movslq %eax, %rcx
leaq 0x42fddb(%rip), %rax    # 0x48a7c0
movw %dx, (%rax,%rcx,2)
jmp 0x5a9eb
movl -0x4(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x4(%rbp)
jmp 0x5a93d
addq $0x10, %rsp
popq %rbp
retq
nop
// File: /workspace/github_c_makefile_star2_O0/jonof[P]jftekwar/jfbuild/src/engine.c
// Function: calcbritable
static void calcbritable(void)
{
	int i,j;
	double a,b;
	for(i=0;i<16;i++) {
		a = (double)8 / ((double)i+8);
		b = (double)255 / pow((double)255,a);
		for(j=0;j<256;j++)	// JBF 20040207: full 8bit precision
			britable[i][j] = (unsigned char)(pow((double)j,a)*b);
	}
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x20, %rsp
movl $0x0, -0x4(%rbp)
cmpl $0x10, -0x4(%rbp)
jge 0x5aac3
cvtsi2sdl -0x4(%rbp), %xmm1
movsd 0x5830a(%rip), %xmm0    # 0xb2d30
addsd %xmm0, %xmm1
movsd 0x582fe(%rip), %xmm0    # 0xb2d30
divsd %xmm1, %xmm0
movsd %xmm0, -0x10(%rbp)
movsd -0x10(%rbp), %xmm1
movsd 0x582d8(%rip), %xmm0    # 0xb2d20
callq 0x6350
movaps %xmm0, %xmm1
movsd 0x582c8(%rip), %xmm0    # 0xb2d20
divsd %xmm1, %xmm0
movsd %xmm0, -0x18(%rbp)
movl $0x0, -0x8(%rbp)
cmpl $0x100, -0x8(%rbp)      # imm = 0x100
jge 0x5aab3
cvtsi2sdl -0x8(%rbp), %xmm0
movsd -0x10(%rbp), %xmm1
callq 0x6350
movsd -0x18(%rbp), %xmm1
mulsd %xmm1, %xmm0
cvttsd2si %xmm0, %eax
movb %al, %dl
movslq -0x4(%rbp), %rcx
leaq 0x416f66(%rip), %rax    # 0x471a00
shlq $0x8, %rcx
addq %rcx, %rax
movslq -0x8(%rbp), %rcx
movb %dl, (%rax,%rcx)
movl -0x8(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x8(%rbp)
jmp 0x5aa68
jmp 0x5aab5
movl -0x4(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x4(%rbp)
jmp 0x5aa0f
addq $0x20, %rsp
popq %rbp
retq
nopl (%rax)
// File: /workspace/github_c_makefile_star2_O0/jonof[P]jftekwar/jfbuild/src/engine.c
// Function: msqrtasm
static inline int msqrtasm(unsigned int c)
{
	unsigned int a,b;

	a = 0x40000000l;		// mov eax, 0x40000000
	b = 0x20000000l;		// mov ebx, 0x20000000
	do {				// begit:
		if (c >= a) {		// cmp ecx, eax	 /  jl skip
			c -= a;		// sub ecx, eax
			a += b*4;	// lea eax, [eax+ebx*4]
		}			// skip:
		a -= b;			// sub eax, ebx
		a >>= 1;		// shr eax, 1
		b >>= 2;		// shr ebx, 2
	} while (b);			// jnz begit
	if (c >= a)			// cmp ecx, eax
		a++;			// sbb eax, -1
	a >>= 1;			// shr eax, 1
	return a;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
movl %edi, -0x4(%rbp)
movl $0x40000000, -0x8(%rbp) # imm = 0x40000000
movl $0x20000000, -0xc(%rbp) # imm = 0x20000000
movl -0x4(%rbp), %eax
cmpl -0x8(%rbp), %eax
jb 0x5ab04
movl -0x8(%rbp), %ecx
movl -0x4(%rbp), %eax
subl %ecx, %eax
movl %eax, -0x4(%rbp)
movl -0xc(%rbp), %eax
shll $0x2, %eax
addl -0x8(%rbp), %eax
movl %eax, -0x8(%rbp)
movl -0xc(%rbp), %ecx
movl -0x8(%rbp), %eax
subl %ecx, %eax
movl %eax, -0x8(%rbp)
movl -0x8(%rbp), %eax
shrl %eax
movl %eax, -0x8(%rbp)
movl -0xc(%rbp), %eax
shrl $0x2, %eax
movl %eax, -0xc(%rbp)
cmpl $0x0, -0xc(%rbp)
jne 0x5aae5
movl -0x4(%rbp), %eax
cmpl -0x8(%rbp), %eax
jb 0x5ab37
movl -0x8(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x8(%rbp)
movl -0x8(%rbp), %eax
shrl %eax
movl %eax, -0x8(%rbp)
movl -0x8(%rbp), %eax
popq %rbp
retq
nopw %cs:(%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/jonof[P]jftekwar/jfbuild/src/engine.c
// Function: hline
static void hline(int xr, int yp)
{
	int xl, r, s;

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

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

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x20, %rsp
movl %edi, -0x4(%rbp)
movl %esi, -0x8(%rbp)
movslq -0x8(%rbp), %rcx
leaq 0x429e77(%rip), %rax    # 0x488b90
movl (%rax,%rcx,4), %eax
movl %eax, -0xc(%rbp)
movl -0xc(%rbp), %eax
cmpl -0x4(%rbp), %eax
jle 0x5ed2c
jmp 0x5edda
movq 0x3f2d35(%rip), %rax    # 0x451a68
movl -0x8(%rbp), %ecx
subl 0x2598c0(%rip), %ecx    # 0x2b85fc
addl 0x3f2d2e(%rip), %ecx    # 0x451a70
movslq %ecx, %rcx
movl (%rax,%rcx,4), %eax
movl %eax, -0x10(%rbp)
movl 0x3f0847(%rip), %eax    # 0x44f598
imull -0x10(%rbp), %eax
movl %eax, 0x3f2c59(%rip)    # 0x4519b4
movl 0x3f0843(%rip), %eax    # 0x44f5a4
imull -0x10(%rbp), %eax
movl %eax, 0x3f2c4d(%rip)    # 0x4519b8
movl -0x10(%rbp), %edi
movl 0x3f081c(%rip), %esi    # 0x44f590
callq 0x39010
movl %eax, %edi
movl 0x3f080b(%rip), %esi    # 0x44f58c
callq 0x5ec70
shll $0x8, %eax
movl %eax, -0x14(%rbp)
movl -0x4(%rbp), %edi
subl -0xc(%rbp), %edi
movl -0x14(%rbp), %edx
movl 0x3f0805(%rip), %ecx    # 0x44f5a0
imull -0x10(%rbp), %ecx
addl 0x429b9f(%rip), %ecx    # 0x488944
movl 0x3f07f0(%rip), %r8d    # 0x44f59c
imull -0x10(%rbp), %r8d
addl 0x429b88(%rip), %r8d    # 0x488940
movslq -0x8(%rbp), %rsi
leaq 0x3f2cbd(%rip), %rax    # 0x451a80
movl (%rax,%rsi,4), %eax
addl -0x4(%rbp), %eax
movslq %eax, %r9
addq 0x3b371d(%rip), %r9     # 0x4124f0
xorl %esi, %esi
callq 0xa7620
addq $0x20, %rsp
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O0/jonof[P]jftekwar/jfbuild/src/engine.c
// Function: transmaskwallscan
static void transmaskwallscan(int x1, int x2)
{
	int x;

	setgotpic(globalpicnum);
	if ((tilesizx[globalpicnum] <= 0) || (tilesizy[globalpicnum] <= 0)) return;

	if (waloff[globalpicnum] == 0) loadtile(globalpicnum);

	setuptvlineasm(globalshiftval);

	x = x1;
	while ((startumost[x+windowx1] > startdmost[x+windowx1]) && (x <= x2)) x++;
#ifndef USING_A_C
	if ((x <= x2) && (x&1)) transmaskvline(x), x++;
	while (x < x2) transmaskvline2(x), x += 2;
#endif
	while (x <= x2) transmaskvline(x), x++;
	faketimerhandler();
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x10, %rsp
movl %edi, -0x4(%rbp)
movl %esi, -0x8(%rbp)
movswl 0x3eb87b(%rip), %edi    # 0x44ad70
callq 0x44d80
movswq 0x3eb86e(%rip), %rcx    # 0x44ad70
leaq 0x3eb877(%rip), %rax    # 0x44ad80
movswl (%rax,%rcx,2), %eax
cmpl $0x0, %eax
jle 0x5f52a
movswq 0x3eb856(%rip), %rcx    # 0x44ad70
leaq 0x3dd01f(%rip), %rax    # 0x43c540
movswl (%rax,%rcx,2), %eax
cmpl $0x0, %eax
jg 0x5f52f
jmp 0x5f5dc
movswq 0x3eb839(%rip), %rcx    # 0x44ad70
leaq 0x376902(%rip), %rax    # 0x3d5e40
cmpq $0x0, (%rax,%rcx,8)
jne 0x5f551
movswl 0x3eb824(%rip), %edi    # 0x44ad70
callq 0x44df0
movswl 0x4293f0(%rip), %edi    # 0x488948
callq 0xa7a00
movl -0x4(%rbp), %eax
movl %eax, -0xc(%rbp)
movl -0xc(%rbp), %eax
addl 0x3aebe4(%rip), %eax    # 0x40e150
movslq %eax, %rcx
leaq 0x3ad55a(%rip), %rax    # 0x40cad0
movswl (%rax,%rcx,2), %ecx
movl -0xc(%rbp), %eax
addl 0x3aebcd(%rip), %eax    # 0x40e150
movslq %eax, %rdx
leaq 0x3aebd3(%rip), %rax    # 0x40e160
movswl (%rax,%rdx,2), %edx
xorl %eax, %eax
cmpl %edx, %ecx
movb %al, -0xd(%rbp)
jle 0x5f5a6
movl -0xc(%rbp), %eax
cmpl -0x8(%rbp), %eax
setle %al
movb %al, -0xd(%rbp)
movb -0xd(%rbp), %al
testb $0x1, %al
jne 0x5f5af
jmp 0x5f5ba
movl -0xc(%rbp), %eax
addl $0x1, %eax
movl %eax, -0xc(%rbp)
jmp 0x5f563
jmp 0x5f5bc
movl -0xc(%rbp), %eax
cmpl -0x8(%rbp), %eax
jg 0x5f5d7
movl -0xc(%rbp), %edi
callq 0x60a70
movl -0xc(%rbp), %eax
addl $0x1, %eax
movl %eax, -0xc(%rbp)
jmp 0x5f5bc
callq 0xc220
addq $0x10, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/jonof[P]jftekwar/jfbuild/src/engine.c
// Function: sectorofwallv5
static short sectorofwallv5(short theline)
{
	short i, startwall, endwall, sucksect;

	sucksect = -1;
	for(i=0;i<numsectors;i++)
	{
		startwall = sector[i].wallptr;
		endwall = startwall + sector[i].wallnum - 1;
		if ((theline >= startwall) && (theline <= endwall))
		{
			sucksect = i;
			break;
		}
	}
	return(sucksect);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
movw %di, %ax
movw %ax, -0x2(%rbp)
movw $0xffff, -0xa(%rbp)     # imm = 0xFFFF
movw $0x0, -0x4(%rbp)
movswl -0x4(%rbp), %eax
movswl 0x3abb7e(%rip), %ecx    # 0x40cac0
cmpl %ecx, %eax
jge 0x60fb6
movswq -0x4(%rbp), %rcx
leaq 0x21f66e(%rip), %rax    # 0x2805c0
imulq $0x28, %rcx, %rcx
addq %rcx, %rax
movw (%rax), %ax
movw %ax, -0x6(%rbp)
movswl -0x6(%rbp), %eax
movswq -0x4(%rbp), %rdx
leaq 0x21f650(%rip), %rcx    # 0x2805c0
imulq $0x28, %rdx, %rdx
addq %rdx, %rcx
movswl 0x2(%rcx), %ecx
addl %ecx, %eax
subl $0x1, %eax
movw %ax, -0x8(%rbp)
movswl -0x2(%rbp), %eax
movswl -0x6(%rbp), %ecx
cmpl %ecx, %eax
jl 0x60fa6
movswl -0x2(%rbp), %eax
movswl -0x8(%rbp), %ecx
cmpl %ecx, %eax
jg 0x60fa6
movw -0x4(%rbp), %ax
movw %ax, -0xa(%rbp)
jmp 0x60fb6
jmp 0x60fa8
movw -0x4(%rbp), %ax
addw $0x1, %ax
movw %ax, -0x4(%rbp)
jmp 0x60f37
movw -0xa(%rbp), %ax
popq %rbp
retq
nopl (%rax)
// File: /workspace/github_c_makefile_star2_O0/jonof[P]jftekwar/jfbuild/src/engine.c
// Function: screencapture_openfile
static BFILE *screencapture_openfile(const char *ext)
{
	char *seq;
	BFILE *fil;

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

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

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

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x20, %rsp
movq %rdi, -0x10(%rbp)
movswl 0x5477bd(%rip), %eax    # 0x5a8b40
cmpl $0x270f, %eax           # imm = 0x270F
jle 0x61397
movq $0x0, -0x8(%rbp)
jmp 0x614f6
leaq 0x7fe62(%rip), %rdi     # 0xe1200
movl $0x2e, %esi
callq 0x6910
movq %rax, -0x18(%rbp)
cmpq $0x0, -0x18(%rbp)
jne 0x613c0
movq $0x0, -0x8(%rbp)
jmp 0x614f6
movq -0x18(%rbp), %rax
addq $-0x4, %rax
movq %rax, -0x18(%rbp)
movswl 0x54776d(%rip), %eax    # 0x5a8b40
movl $0x3e8, %ecx            # imm = 0x3E8
cltd
idivl %ecx
movl $0xa, %ecx
cltd
idivl %ecx
addl $0x30, %edx
movb %dl, %cl
movq -0x18(%rbp), %rax
movb %cl, (%rax)
movswl 0x54774b(%rip), %eax    # 0x5a8b40
movl $0x64, %ecx
cltd
idivl %ecx
movl $0xa, %ecx
cltd
idivl %ecx
addl $0x30, %edx
movb %dl, %cl
movq -0x18(%rbp), %rax
movb %cl, 0x1(%rax)
movswl 0x547728(%rip), %eax    # 0x5a8b40
movl $0xa, %ecx
cltd
idivl %ecx
movl $0xa, %ecx
cltd
idivl %ecx
addl $0x30, %edx
movb %dl, %cl
movq -0x18(%rbp), %rax
movb %cl, 0x2(%rax)
movswl 0x547705(%rip), %eax    # 0x5a8b40
movl $0xa, %ecx
cltd
idivl %ecx
addl $0x30, %edx
movb %dl, %cl
movq -0x18(%rbp), %rax
movb %cl, 0x3(%rax)
movq -0x10(%rbp), %rax
movb (%rax), %cl
movq -0x18(%rbp), %rax
movb %cl, 0x5(%rax)
movq -0x10(%rbp), %rax
movb 0x1(%rax), %cl
movq -0x18(%rbp), %rax
movb %cl, 0x6(%rax)
movq -0x10(%rbp), %rax
movb 0x2(%rax), %cl
movq -0x18(%rbp), %rax
movb %cl, 0x7(%rax)
leaq 0x7fd81(%rip), %rdi     # 0xe1200
leaq 0x521cc(%rip), %rsi     # 0xb3652
callq 0x6c10
movq %rax, -0x20(%rbp)
cmpq $0x0, %rax
jne 0x61497
jmp 0x614be
movq -0x20(%rbp), %rdi
callq 0x6420
movw 0x547699(%rip), %ax     # 0x5a8b40
addw $0x1, %ax
movw %ax, 0x54768e(%rip)     # 0x5a8b40
movb $0x1, %al
testb $0x1, %al
jne 0x6137c
jmp 0x614be
leaq 0x7fd3b(%rip), %rdi     # 0xe1200
leaq 0x52189(%rip), %rsi     # 0xb3655
callq 0x6c10
movq %rax, -0x20(%rbp)
cmpq $0x0, -0x20(%rbp)
je 0x614ee
movw 0x54765d(%rip), %ax     # 0x5a8b40
addw $0x1, %ax
movw %ax, 0x547652(%rip)     # 0x5a8b40
movq -0x20(%rbp), %rax
movq %rax, -0x8(%rbp)
movq -0x8(%rbp), %rax
addq $0x20, %rsp
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O0/jonof[P]jftekwar/jfbuild/src/engine.c
// Function: screencapture_writepcxline
static void screencapture_writepcxline(unsigned char *buf, int bytes, int elements, BFILE *fp, void *v)
{
	(void)v;
	if (elements == 3) {
		writepcxline(buf,   bytes, 3, fp);
		writepcxline(buf+1, bytes, 3, fp);
		writepcxline(buf+2, bytes, 3, fp);
		return;
	}
	writepcxline(buf, bytes, 1, fp);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x20, %rsp
movq %rdi, -0x8(%rbp)
movl %esi, -0xc(%rbp)
movl %edx, -0x10(%rbp)
movq %rcx, -0x18(%rbp)
movq %r8, -0x20(%rbp)
cmpl $0x3, -0x10(%rbp)
jne 0x618e9
movq -0x8(%rbp), %rdi
movl -0xc(%rbp), %esi
movq -0x18(%rbp), %rcx
movl $0x3, %edx
callq 0x61910
movq -0x8(%rbp), %rdi
addq $0x1, %rdi
movl -0xc(%rbp), %esi
movq -0x18(%rbp), %rcx
movl $0x3, %edx
callq 0x61910
movq -0x8(%rbp), %rdi
addq $0x2, %rdi
movl -0xc(%rbp), %esi
movq -0x18(%rbp), %rcx
movl $0x3, %edx
callq 0x61910
jmp 0x618fe
movq -0x8(%rbp), %rdi
movl -0xc(%rbp), %esi
movq -0x18(%rbp), %rcx
movl $0x1, %edx
callq 0x61910
addq $0x20, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/jonof[P]jftekwar/jfbuild/src/engine.c
// Function: writepcxline
static void writepcxline(unsigned char *buf, int bytes, int step, BFILE *fp)
{
	unsigned char ths, last;
	int srcIndex;
	unsigned char runCount;

	runCount = 1;
	last = *buf;

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

			last = ths;
			runCount = 1;
		}
	}

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

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x30, %rsp
movq %rdi, -0x8(%rbp)
movl %esi, -0xc(%rbp)
movl %edx, -0x10(%rbp)
movq %rcx, -0x18(%rbp)
movb $0x1, -0x21(%rbp)
movq -0x8(%rbp), %rax
movb (%rax), %al
movb %al, -0x1a(%rbp)
movl $0x1, -0x20(%rbp)
movl -0x20(%rbp), %eax
cmpl -0xc(%rbp), %eax
jge 0x619cd
movl -0x10(%rbp), %ecx
movq -0x8(%rbp), %rax
movslq %ecx, %rcx
addq %rcx, %rax
movq %rax, -0x8(%rbp)
movq -0x8(%rbp), %rax
movb (%rax), %al
movb %al, -0x19(%rbp)
movzbl -0x19(%rbp), %eax
movzbl -0x1a(%rbp), %ecx
cmpl %ecx, %eax
jne 0x61998
movb -0x21(%rbp), %al
addb $0x1, %al
movb %al, -0x21(%rbp)
movzbl -0x21(%rbp), %eax
cmpl $0x3f, %eax
jne 0x61996
movb -0x1a(%rbp), %cl
movb -0x21(%rbp), %al
movq -0x18(%rbp), %rdx
movzbl %cl, %edi
movzbl %al, %esi
callq 0x61a10
movb $0x0, -0x21(%rbp)
jmp 0x619bd
cmpb $0x0, -0x21(%rbp)
je 0x619b3
movb -0x1a(%rbp), %cl
movb -0x21(%rbp), %al
movq -0x18(%rbp), %rdx
movzbl %cl, %edi
movzbl %al, %esi
callq 0x61a10
movb -0x19(%rbp), %al
movb %al, -0x1a(%rbp)
movb $0x1, -0x21(%rbp)
jmp 0x619bf
movl -0x20(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x20(%rbp)
jmp 0x6193a
cmpb $0x0, -0x21(%rbp)
je 0x619e8
movb -0x1a(%rbp), %cl
movb -0x21(%rbp), %al
movq -0x18(%rbp), %rdx
movzbl %cl, %edi
movzbl %al, %esi
callq 0x61a10
movl -0xc(%rbp), %eax
andl $0x1, %eax
cmpl $0x0, %eax
je 0x61a03
movq -0x18(%rbp), %rdx
xorl %edi, %edi
movl $0x1, %esi
callq 0x61a10
addq $0x30, %rsp
popq %rbp
retq
nopl (%rax)
// File: /workspace/github_c_makefile_star2_O0/jonof[P]jftekwar/jfbuild/src/engine.c
// Function: writepcxbyte
static int writepcxbyte(unsigned char colour, unsigned char count, BFILE *fp)
{
	if (!count) return 0;
	if (count == 1 && (colour & 0xc0) != 0xc0) {
		Bfputc(colour, fp);
		return 1;
	} else {
		Bfputc(0xc0 | count, fp);
		Bfputc(colour, fp);
		return 2;
	}
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x10, %rsp
movb %sil, %al
movb %dil, %cl
movb %cl, -0x5(%rbp)
movb %al, -0x6(%rbp)
movq %rdx, -0x10(%rbp)
cmpb $0x0, -0x6(%rbp)
jne 0x61a37
movl $0x0, -0x4(%rbp)
jmp 0x61a8d
movzbl -0x6(%rbp), %eax
cmpl $0x1, %eax
jne 0x61a66
movzbl -0x5(%rbp), %eax
andl $0xc0, %eax
cmpl $0xc0, %eax
je 0x61a66
movzbl -0x5(%rbp), %edi
movq -0x10(%rbp), %rsi
callq 0x6870
movl $0x1, -0x4(%rbp)
jmp 0x61a8d
movzbl -0x6(%rbp), %edi
orl $0xc0, %edi
movq -0x10(%rbp), %rsi
callq 0x6870
movzbl -0x5(%rbp), %edi
movq -0x10(%rbp), %rsi
callq 0x6870
movl $0x2, -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/engine.c
// Function: screencapture_writepngline
static void screencapture_writepngline(unsigned char *buf, int bytes, int elements, BFILE *fp, void *v)
{
	unsigned char header[6];
	unsigned short blklen;
	int i;
	struct pngsums *sums = (struct pngsums *)v;

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

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

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

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x40, %rsp
movq %rdi, -0x8(%rbp)
movl %esi, -0xc(%rbp)
movl %edx, -0x10(%rbp)
movq %rcx, -0x18(%rbp)
movq %r8, -0x20(%rbp)
movq -0x20(%rbp), %rax
movq %rax, -0x38(%rbp)
movl -0xc(%rbp), %eax
imull -0x10(%rbp), %eax
addl $0x1, %eax
movw %ax, -0x28(%rbp)
movb $0x0, -0x26(%rbp)
movw -0x28(%rbp), %ax
movw %ax, -0x25(%rbp)
movzwl -0x28(%rbp), %eax
xorl $-0x1, %eax
movw %ax, -0x28(%rbp)
movw -0x28(%rbp), %ax
movw %ax, -0x23(%rbp)
movb $0x0, -0x21(%rbp)
movq -0x38(%rbp), %rax
movzwl 0x6(%rax), %eax
movq -0x38(%rbp), %rcx
movzwl 0x4(%rcx), %ecx
addl %ecx, %eax
movl $0xfff1, %ecx           # imm = 0xFFF1
cltd
idivl %ecx
movw %dx, %cx
movq -0x38(%rbp), %rax
movw %cx, 0x6(%rax)
movq -0x38(%rbp), %rdi
leaq -0x26(%rbp), %rsi
movl $0x6, %edx
callq 0xa8490
leaq -0x26(%rbp), %rdi
movq -0x18(%rbp), %rcx
movl $0x6, %esi
movl $0x1, %edx
callq 0x6aa0
movl $0x0, -0x2c(%rbp)
movl -0x2c(%rbp), %eax
movl -0xc(%rbp), %ecx
imull -0x10(%rbp), %ecx
cmpl %ecx, %eax
jge 0x61bef
movq -0x38(%rbp), %rax
movzwl 0x4(%rax), %eax
movq -0x8(%rbp), %rcx
movslq -0x2c(%rbp), %rdx
movzbl (%rcx,%rdx), %ecx
addl %ecx, %eax
movl $0xfff1, %ecx           # imm = 0xFFF1
cltd
idivl %ecx
movw %dx, %cx
movq -0x38(%rbp), %rax
movw %cx, 0x4(%rax)
movq -0x38(%rbp), %rax
movzwl 0x6(%rax), %eax
movq -0x38(%rbp), %rcx
movzwl 0x4(%rcx), %ecx
addl %ecx, %eax
movl $0xfff1, %ecx           # imm = 0xFFF1
cltd
idivl %ecx
movw %dx, %cx
movq -0x38(%rbp), %rax
movw %cx, 0x6(%rax)
movl -0x2c(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x2c(%rbp)
jmp 0x61b88
movq -0x38(%rbp), %rdi
movq -0x8(%rbp), %rsi
movl -0xc(%rbp), %edx
imull -0x10(%rbp), %edx
callq 0xa8490
movq -0x8(%rbp), %rdi
movslq -0xc(%rbp), %rsi
movslq -0x10(%rbp), %rdx
movq -0x18(%rbp), %rcx
callq 0x6aa0
addq $0x40, %rsp
popq %rbp
retq
nop
// File: /workspace/github_c_makefile_star2_O0/jonof[P]jftekwar/jfbuild/src/kplib.c
// Function: kzcheckhashsiz
static int kzcheckhashsiz (int siz)
{
	int i;

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

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x10, %rsp
movl %edi, -0x8(%rbp)
cmpq $0x0, 0x5409a5(%rip)    # 0x5a8b68
jne 0x68220
leaq 0x5409b4(%rip), %rdi    # 0x5a8b80
movl $0xff, %esi
movl $0x400, %edx            # imm = 0x400
callq 0x62d0
movl $0x2000, %edi           # imm = 0x2000
callq 0x68f0
movq %rax, 0x54097c(%rip)    # 0x5a8b68
cmpq $0x0, 0x540974(%rip)    # 0x5a8b68
jne 0x68202
movl $0x0, -0x4(%rbp)
jmp 0x6828a
movl $0x0, 0x540968(%rip)    # 0x5a8b74
movl $0xffffffff, 0x540d6a(%rip) # imm = 0xFFFFFFFF
movl $0x2000, 0x540950(%rip) # imm = 0x2000
movl 0x54094e(%rip), %eax    # 0x5a8b74
addl -0x8(%rbp), %eax
cmpl 0x540941(%rip), %eax    # 0x5a8b70
jle 0x68283
movl 0x540939(%rip), %eax    # 0x5a8b70
movl %eax, -0xc(%rbp)
movl -0xc(%rbp), %eax
shll %eax
movl %eax, -0xc(%rbp)
movl 0x54092c(%rip), %eax    # 0x5a8b74
addl -0x8(%rbp), %eax
cmpl -0xc(%rbp), %eax
jg 0x6823a
movq 0x540911(%rip), %rdi    # 0x5a8b68
movslq -0xc(%rbp), %rsi
callq 0x6110
movq %rax, 0x540901(%rip)    # 0x5a8b68
cmpq $0x0, 0x5408f9(%rip)    # 0x5a8b68
jne 0x6827a
movl $0x0, -0x4(%rbp)
jmp 0x6828a
movl -0xc(%rbp), %eax
movl %eax, 0x5408ed(%rip)    # 0x5a8b70
movl $0x1, -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/kplib.c
// Function: kzcalchash
static int kzcalchash (const char *st)
{
	int i, hashind;
	char ch;

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

// Assembly:
pushq %rbp
movq %rsp, %rbp
movq %rdi, -0x8(%rbp)
movl $0x0, -0xc(%rbp)
movl $0x0, -0x10(%rbp)
movq -0x8(%rbp), %rax
movslq -0xc(%rbp), %rcx
cmpb $0x0, (%rax,%rcx)
je 0x68313
movq -0x8(%rbp), %rax
movslq -0xc(%rbp), %rcx
movb (%rax,%rcx), %al
movb %al, -0x11(%rbp)
movsbl -0x11(%rbp), %eax
cmpl $0x61, %eax
jl 0x682ee
movsbl -0x11(%rbp), %eax
cmpl $0x7a, %eax
jg 0x682ee
movsbl -0x11(%rbp), %eax
subl $0x20, %eax
movb %al, -0x11(%rbp)
movsbl -0x11(%rbp), %eax
cmpl $0x2f, %eax
jne 0x682fb
movb $0x5c, -0x11(%rbp)
movsbl -0x11(%rbp), %eax
imull $0x3, -0x10(%rbp), %ecx
subl %ecx, %eax
movl %eax, -0x10(%rbp)
movl -0xc(%rbp), %eax
addl $0x1, %eax
movl %eax, -0xc(%rbp)
jmp 0x682b6
movslq -0x10(%rbp), %rax
andq $0xff, %rax
popq %rbp
retq
nop
// File: /workspace/github_c_makefile_star2_O0/jonof[P]jftekwar/jfbuild/src/kplib.c
// Function: kzcheckhash
static int kzcheckhash (const char *filnam, char **zipnam, unsigned int *zipseek)
{
	int i;

	if (!kzhashbuf) return(0);
	if (filnam[0] == '|') filnam++;
	for(i=kzhashead[kzcalchash(filnam)];i>=0;i=(*(int *)&kzhashbuf[i]))
		if (!filnamcmp(filnam,&kzhashbuf[i+16]))
		{
			(*zipnam) = &kzhashbuf[*(int *)&kzhashbuf[i+8]];
			(*zipseek) = *(unsigned int *)&kzhashbuf[i+12];
			return(1);
		}
	return(0);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x30, %rsp
movq %rdi, -0x10(%rbp)
movq %rsi, -0x18(%rbp)
movq %rdx, -0x20(%rbp)
cmpq $0x0, 0x54057c(%rip)    # 0x5a8b68
jne 0x685fa
movl $0x0, -0x4(%rbp)
jmp 0x686b7
movq -0x10(%rbp), %rax
movsbl (%rax), %eax
cmpl $0x7c, %eax
jne 0x68612
movq -0x10(%rbp), %rax
addq $0x1, %rax
movq %rax, -0x10(%rbp)
movq -0x10(%rbp), %rdi
callq 0x682a0
movslq %eax, %rcx
leaq 0x54055b(%rip), %rax    # 0x5a8b80
movl (%rax,%rcx,4), %eax
movl %eax, -0x24(%rbp)
cmpl $0x0, -0x24(%rbp)
jl 0x686b0
movq -0x10(%rbp), %rdi
movq 0x54052c(%rip), %rsi    # 0x5a8b68
movl -0x24(%rbp), %eax
addl $0x10, %eax
cltq
addq %rax, %rsi
callq 0x6be20
cmpl $0x0, %eax
jne 0x68698
movq 0x540510(%rip), %rcx    # 0x5a8b68
movq 0x540509(%rip), %rax    # 0x5a8b68
movl -0x24(%rbp), %edx
addl $0x8, %edx
movslq %edx, %rdx
movslq (%rax,%rdx), %rax
addq %rax, %rcx
movq -0x18(%rbp), %rax
movq %rcx, (%rax)
movq 0x5404eb(%rip), %rax    # 0x5a8b68
movl -0x24(%rbp), %ecx
addl $0xc, %ecx
movslq %ecx, %rcx
movl (%rax,%rcx), %ecx
movq -0x20(%rbp), %rax
movl %ecx, (%rax)
movl $0x1, -0x4(%rbp)
jmp 0x686b7
jmp 0x6869a
movq 0x5404c7(%rip), %rax    # 0x5a8b68
movslq -0x24(%rbp), %rcx
movl (%rax,%rcx), %eax
movl %eax, -0x24(%rbp)
jmp 0x6862b
movl $0x0, -0x4(%rbp)
movl -0x4(%rbp), %eax
addq $0x30, %rsp
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O0/jonof[P]jftekwar/jfbuild/src/kplib.c
// Function: putbuf4zip
static void putbuf4zip (const unsigned char *buf, int uncomp0, int uncomp1)
{
	int i0, i1;
		//              uncomp0 ... uncomp1
		//  &gzbufptr[kzfs.pos] ... &gzbufptr[kzfs.endpos];
	i0 = max(uncomp0,kzfs.pos);
	i1 = min(uncomp1,kzfs.endpos);
	if (i0 < i1) memcpy(&gzbufptr[i0],&buf[i0-uncomp0],i1-i0);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x20, %rsp
movq %rdi, -0x8(%rbp)
movl %esi, -0xc(%rbp)
movl %edx, -0x10(%rbp)
movl -0xc(%rbp), %eax
cmpl 0x53f699(%rip), %eax    # 0x5a8fa4
jle 0x69915
movl -0xc(%rbp), %eax
movl %eax, -0x1c(%rbp)
jmp 0x6991e
movl 0x53f689(%rip), %eax    # 0x5a8fa4
movl %eax, -0x1c(%rbp)
movl -0x1c(%rbp), %eax
movl %eax, -0x14(%rbp)
movl -0x10(%rbp), %eax
cmpl 0x53f67b(%rip), %eax    # 0x5a8fa8
jge 0x69937
movl -0x10(%rbp), %eax
movl %eax, -0x20(%rbp)
jmp 0x69940
movl 0x53f66b(%rip), %eax    # 0x5a8fa8
movl %eax, -0x20(%rbp)
movl -0x20(%rbp), %eax
movl %eax, -0x18(%rbp)
movl -0x14(%rbp), %eax
cmpl -0x18(%rbp), %eax
jge 0x69979
movq 0x53f793(%rip), %rdi    # 0x5a90e8
movslq -0x14(%rbp), %rax
addq %rax, %rdi
movq -0x8(%rbp), %rsi
movl -0x14(%rbp), %eax
subl -0xc(%rbp), %eax
cltq
addq %rax, %rsi
movl -0x18(%rbp), %eax
subl -0x14(%rbp), %eax
movslq %eax, %rdx
callq 0x60c0
addq $0x20, %rsp
popq %rbp
retq
nop
// File: /workspace/github_c_makefile_star2_O0/jonof[P]jftekwar/jfbuild/src/kplib.c
// Function: hufgencode
static void hufgencode (int *inbuf, int inum, int *hitab, int *hbmax)
{
	int i, tbuf[31];

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

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x20, %rsp
movq %rdi, -0x8(%rbp)
movl %esi, -0xc(%rbp)
movq %rdx, -0x18(%rbp)
movq %rcx, -0x20(%rbp)
movl $0x1e, -0x24(%rbp)
cmpl $0x0, -0x24(%rbp)
je 0x69a1e
movslq -0x24(%rbp), %rax
movl $0x0, -0xa0(%rbp,%rax,4)
movl -0x24(%rbp), %eax
addl $-0x1, %eax
movl %eax, -0x24(%rbp)
jmp 0x699fe
movl -0xc(%rbp), %eax
subl $0x1, %eax
movl %eax, -0x24(%rbp)
cmpl $0x0, -0x24(%rbp)
jl 0x69a55
movq -0x8(%rbp), %rax
movslq -0x24(%rbp), %rcx
movslq (%rax,%rcx,4), %rax
movl -0xa0(%rbp,%rax,4), %ecx
addl $0x1, %ecx
movl %ecx, -0xa0(%rbp,%rax,4)
movl -0x24(%rbp), %eax
addl $-0x1, %eax
movl %eax, -0x24(%rbp)
jmp 0x69a27
movq -0x20(%rbp), %rax
movl $0x0, (%rax)
movl $0x0, -0xa0(%rbp)
movl $0x0, -0x24(%rbp)
cmpl $0x1f, -0x24(%rbp)
jge 0x69aa7
movq -0x20(%rbp), %rax
movslq -0x24(%rbp), %rcx
movl (%rax,%rcx,4), %edx
movslq -0x24(%rbp), %rax
addl -0xa0(%rbp,%rax,4), %edx
movq -0x20(%rbp), %rax
movl -0x24(%rbp), %ecx
addl $0x1, %ecx
movslq %ecx, %rcx
movl %edx, (%rax,%rcx,4)
movl -0x24(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x24(%rbp)
jmp 0x69a70
movl $0x0, -0x24(%rbp)
movl -0x24(%rbp), %eax
cmpl -0xc(%rbp), %eax
jge 0x69afc
movq -0x8(%rbp), %rax
movslq -0x24(%rbp), %rcx
cmpl $0x0, (%rax,%rcx,4)
je 0x69aef
movl -0x24(%rbp), %edx
movq -0x18(%rbp), %rax
movq -0x20(%rbp), %rsi
movq -0x8(%rbp), %rcx
movslq -0x24(%rbp), %rdi
movslq (%rcx,%rdi,4), %rdi
movl (%rsi,%rdi,4), %ecx
movl %ecx, %r8d
addl $0x1, %r8d
movl %r8d, (%rsi,%rdi,4)
movslq %ecx, %rcx
movl %edx, (%rax,%rcx,4)
jmp 0x69af1
movl -0x24(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x24(%rbp)
jmp 0x69aae
addq $0x20, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/jonof[P]jftekwar/jfbuild/src/kplib.c
// Function: qhufgencode
static void qhufgencode (int *hitab, int *hbmax, int *qhval, unsigned char *qhbit, int numbits)
{
	int i, j, k, n, r;

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

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

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

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

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x40, %rsp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq %rdx, -0x18(%rbp)
movq %rcx, -0x20(%rbp)
movl %r8d, -0x24(%rbp)
movl $0x0, -0x38(%rbp)
movl $0x0, -0x28(%rbp)
movl $0x1, -0x34(%rbp)
movl -0x34(%rbp), %eax
cmpl -0x24(%rbp), %eax
jg 0x69c7d
movq -0x10(%rbp), %rax
movl -0x34(%rbp), %ecx
subl $0x1, %ecx
movslq %ecx, %rcx
movl (%rax,%rcx,4), %eax
movl %eax, -0x30(%rbp)
movl -0x30(%rbp), %eax
movq -0x10(%rbp), %rcx
movslq -0x34(%rbp), %rdx
cmpl (%rcx,%rdx,4), %eax
jge 0x69c6d
movl -0x28(%rbp), %eax
movl -0x24(%rbp), %ecx
subl -0x34(%rbp), %ecx
movslq %ecx, %rdx
leaq 0x49c4d(%rip), %rcx     # 0xb3860
addl (%rcx,%rdx,4), %eax
movl %eax, -0x2c(%rbp)
movl -0x28(%rbp), %eax
cmpl -0x2c(%rbp), %eax
jg 0x69c60
movl -0x28(%rbp), %edi
movl -0x24(%rbp), %esi
callq 0x6c180
movl %eax, -0x38(%rbp)
movq -0x8(%rbp), %rax
movslq -0x30(%rbp), %rcx
movl (%rax,%rcx,4), %edx
movq -0x18(%rbp), %rax
movslq -0x38(%rbp), %rcx
movl %edx, (%rax,%rcx,4)
movl -0x34(%rbp), %eax
movb %al, %dl
movq -0x20(%rbp), %rax
movslq -0x38(%rbp), %rcx
movb %dl, (%rax,%rcx)
movl -0x28(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x28(%rbp)
jmp 0x69c19
jmp 0x69c62
movl -0x30(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x30(%rbp)
jmp 0x69bf0
jmp 0x69c6f
movl -0x34(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x34(%rbp)
jmp 0x69bd1
movslq -0x24(%rbp), %rcx
leaq 0x49bd8(%rip), %rax     # 0xb3860
movl (%rax,%rcx,4), %eax
movl %eax, -0x2c(%rbp)
movl -0x28(%rbp), %eax
cmpl -0x2c(%rbp), %eax
jg 0x69cbb
movl -0x28(%rbp), %edi
movl -0x24(%rbp), %esi
callq 0x6c180
movl %eax, -0x38(%rbp)
movq -0x20(%rbp), %rax
movslq -0x38(%rbp), %rcx
movb $0x0, (%rax,%rcx)
movl -0x28(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x28(%rbp)
jmp 0x69c8e
addq $0x40, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/jonof[P]jftekwar/jfbuild/src/kplib.c
// Function: kzseek
int kzseek (int offset, int whence)
{
	if (!kzfs.fil) return(-1);
	switch (whence)
	{
		case SEEK_CUR: kzfs.pos += offset; break;
		case SEEK_END: kzfs.pos = kzfs.leng+offset; break;
		case SEEK_SET: default: kzfs.pos = offset;
	}
	if (kzfs.pos < 0) kzfs.pos = 0;
	if (kzfs.pos > kzfs.leng) kzfs.pos = kzfs.leng;
	return(kzfs.pos);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
movl %edi, -0x8(%rbp)
movl %esi, -0xc(%rbp)
cmpq $0x0, 0x53f236(%rip)    # 0x5a8f88
jne 0x69d60
movl $0xffffffff, -0x4(%rbp) # imm = 0xFFFFFFFF
jmp 0x69de3
movl -0xc(%rbp), %eax
movl %eax, -0x10(%rbp)
testl %eax, %eax
je 0x69da2
jmp 0x69d6c
movl -0x10(%rbp), %eax
subl $0x1, %eax
je 0x69d80
jmp 0x69d76
movl -0x10(%rbp), %eax
subl $0x2, %eax
je 0x69d91
jmp 0x69da4
movl -0x8(%rbp), %eax
addl 0x53f21b(%rip), %eax    # 0x5a8fa4
movl %eax, 0x53f215(%rip)    # 0x5a8fa4
jmp 0x69dad
movl 0x53f209(%rip), %eax    # 0x5a8fa0
addl -0x8(%rbp), %eax
movl %eax, 0x53f204(%rip)    # 0x5a8fa4
jmp 0x69dad
jmp 0x69da4
movl -0x8(%rbp), %eax
movl %eax, 0x53f1f7(%rip)    # 0x5a8fa4
cmpl $0x0, 0x53f1f0(%rip)    # 0x5a8fa4
jge 0x69dc0
movl $0x0, 0x53f1e4(%rip)    # 0x5a8fa4
movl 0x53f1de(%rip), %eax    # 0x5a8fa4
cmpl 0x53f1d4(%rip), %eax    # 0x5a8fa0
jle 0x69dda
movl 0x53f1cc(%rip), %eax    # 0x5a8fa0
movl %eax, 0x53f1ca(%rip)    # 0x5a8fa4
movl 0x53f1c4(%rip), %eax    # 0x5a8fa4
movl %eax, -0x4(%rbp)
movl -0x4(%rbp), %eax
popq %rbp
retq
nopl (%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/jonof[P]jftekwar/jfbuild/src/kplib.c
// Function: kpzload
void kpzload (const char *filnam, intptr_t *pic, int *bpl, int *xsiz, int *ysiz)
{
	char *buf;
	int leng;

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

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

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x50, %rsp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq %rdx, -0x18(%rbp)
movq %rcx, -0x20(%rbp)
movq %r8, -0x28(%rbp)
movq -0x10(%rbp), %rax
movq $0x0, (%rax)
movq -0x8(%rbp), %rdi
callq 0x68320
cmpl $0x0, %eax
jne 0x69f0a
jmp 0x69ffb
callq 0x69d10
movl %eax, -0x34(%rbp)
movslq -0x34(%rbp), %rdi
callq 0x68f0
movq %rax, -0x30(%rbp)
cmpq $0x0, -0x30(%rbp)
jne 0x69f2b
jmp 0x69ffb
movq -0x30(%rbp), %rdi
movl -0x34(%rbp), %esi
callq 0x68de0
callq 0x69ea0
movq -0x30(%rbp), %rdi
movl -0x34(%rbp), %esi
movq -0x20(%rbp), %rdx
movq -0x28(%rbp), %rcx
callq 0x61c40
movq -0x20(%rbp), %rax
movl (%rax), %ecx
shll $0x2, %ecx
movq -0x18(%rbp), %rax
movl %ecx, (%rax)
movq -0x28(%rbp), %rax
movl (%rax), %eax
movq -0x18(%rbp), %rcx
imull (%rcx), %eax
movslq %eax, %rdi
callq 0x68f0
movq %rax, %rcx
movq -0x10(%rbp), %rax
movq %rcx, (%rax)
movq -0x10(%rbp), %rax
cmpq $0x0, (%rax)
jne 0x69f93
movq -0x30(%rbp), %rdi
callq 0x61c0
jmp 0x69ffb
movq -0x30(%rbp), %rdi
movl -0x34(%rbp), %esi
movq -0x10(%rbp), %rax
movq (%rax), %rdx
movq -0x18(%rbp), %rax
movl (%rax), %ecx
movq -0x20(%rbp), %rax
movl (%rax), %r8d
movq -0x28(%rbp), %rax
movl (%rax), %r9d
xorl %eax, %eax
movl $0x0, (%rsp)
movl $0x0, 0x8(%rsp)
callq 0x62120
cmpl $0x0, %eax
jge 0x69ff2
movq -0x30(%rbp), %rdi
callq 0x61c0
movq -0x10(%rbp), %rax
movq (%rax), %rdi
callq 0x61c0
movq -0x10(%rbp), %rax
movq $0x0, (%rax)
jmp 0x69ffb
movq -0x30(%rbp), %rdi
callq 0x61c0
addq $0x50, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/jonof[P]jftekwar/jfbuild/src/kplib.c
// Function: rgbhlineasm
static inline void rgbhlineasm (int x, int xr1, intptr_t p, int ixstp)
{
	int i;
	if (!trnsrgb)
	{
		for(;x>xr1;p+=ixstp,x-=3) *(int *)p = (*(int *)&olinbuf[x])|LSWAPIB(0xff000000);
		return;
	}
	for(;x>xr1;p+=ixstp,x-=3)
	{
		i = (*(int *)&olinbuf[x])|LSWAPIB(0xff000000);
		if (i == trnsrgb) i &= LSWAPIB(0xffffff);
		*(int *)p = i;
	}
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
movl %edi, -0x4(%rbp)
movl %esi, -0x8(%rbp)
movq %rdx, -0x10(%rbp)
movl %ecx, -0x14(%rbp)
cmpl $0x0, 0x557fac(%rip)    # 0x5c2d84
jne 0x6ae17
jmp 0x6addc
movl -0x4(%rbp), %eax
cmpl -0x8(%rbp), %eax
jle 0x6ae15
movslq -0x4(%rbp), %rcx
leaq 0x53e311(%rip), %rax    # 0x5a9100
movl (%rax,%rcx), %ecx
orl $0xff000000, %ecx       # imm = 0xFF000000
movq -0x10(%rbp), %rax
movl %ecx, (%rax)
movslq -0x14(%rbp), %rax
addq -0x10(%rbp), %rax
movq %rax, -0x10(%rbp)
movl -0x4(%rbp), %eax
subl $0x3, %eax
movl %eax, -0x4(%rbp)
jmp 0x6addc
jmp 0x6ae6d
jmp 0x6ae19
movl -0x4(%rbp), %eax
cmpl -0x8(%rbp), %eax
jle 0x6ae6d
movslq -0x4(%rbp), %rcx
leaq 0x53e2d4(%rip), %rax    # 0x5a9100
movl (%rax,%rcx), %eax
orl $0xff000000, %eax       # imm = 0xFF000000
movl %eax, -0x18(%rbp)
movl -0x18(%rbp), %eax
cmpl 0x557f44(%rip), %eax    # 0x5c2d84
jne 0x6ae4d
movl -0x18(%rbp), %eax
andl $0xffffff, %eax         # imm = 0xFFFFFF
movl %eax, -0x18(%rbp)
movl -0x18(%rbp), %ecx
movq -0x10(%rbp), %rax
movl %ecx, (%rax)
movslq -0x14(%rbp), %rax
addq -0x10(%rbp), %rax
movq %rax, -0x10(%rbp)
movl -0x4(%rbp), %eax
subl $0x3, %eax
movl %eax, -0x4(%rbp)
jmp 0x6ae19
popq %rbp
retq
nop
// File: /workspace/github_c_makefile_star2_O0/jonof[P]jftekwar/jfbuild/src/kplib.c
// Function: huffgetval
static void huffgetval (int index, int curbits, int num, int *daval, int *dabits)
{
	int b, v, pow2, *hmax;

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

// Assembly:
pushq %rbp
movq %rsp, %rbp
movl %edi, -0x4(%rbp)
movl %esi, -0x8(%rbp)
movl %edx, -0xc(%rbp)
movq %rcx, -0x18(%rbp)
movq %r8, -0x20(%rbp)
movslq -0x4(%rbp), %rcx
leaq 0x557d50(%rip), %rax    # 0x5c2f90
imulq $0x50, %rcx, %rcx
addq %rcx, %rax
movq %rax, -0x38(%rbp)
movl -0x8(%rbp), %eax
subl $0x1, %eax
movslq %eax, %rcx
leaq 0x48585(%rip), %rax     # 0xb37e0
movl (%rax,%rcx,4), %eax
movl %eax, -0x2c(%rbp)
movl -0xc(%rbp), %eax
andl -0x2c(%rbp), %eax
cmpl $0x0, %eax
je 0x6b275
movl $0x1, -0x28(%rbp)
jmp 0x6b27c
movl $0x0, -0x28(%rbp)
movl $0x1, -0x24(%rbp)
cmpl $0x10, -0x24(%rbp)
jg 0x6b317
movl -0x28(%rbp), %eax
movq -0x38(%rbp), %rcx
movslq -0x24(%rbp), %rdx
cmpl (%rcx,%rdx,4), %eax
jge 0x6b2e3
movl -0x24(%rbp), %ecx
movq -0x20(%rbp), %rax
movl %ecx, (%rax)
movslq -0x4(%rbp), %rcx
leaq 0x5581df(%rip), %rax    # 0x5c3490
shlq $0x8, %rcx
addq %rcx, %rax
movslq -0x4(%rbp), %rdx
leaq 0x557f4d(%rip), %rcx    # 0x5c3210
imulq $0x50, %rdx, %rdx
addq %rdx, %rcx
movslq -0x24(%rbp), %rdx
movl (%rcx,%rdx,4), %ecx
addl -0x28(%rbp), %ecx
movslq %ecx, %rcx
movzbl (%rax,%rcx), %ecx
movq -0x18(%rbp), %rax
movl %ecx, (%rax)
jmp 0x6b32b
movl -0x2c(%rbp), %eax
sarl %eax
movl %eax, -0x2c(%rbp)
movl -0x28(%rbp), %eax
shll %eax
movl %eax, -0x28(%rbp)
movl -0xc(%rbp), %eax
andl -0x2c(%rbp), %eax
cmpl $0x0, %eax
je 0x6b307
movl -0x28(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x28(%rbp)
jmp 0x6b309
movl -0x24(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x24(%rbp)
jmp 0x6b283
movq -0x20(%rbp), %rax
movl $0x10, (%rax)
movq -0x18(%rbp), %rax
movl $0x0, (%rax)
popq %rbp
retq
nopl (%rax)