LLM4Binary/decompile-bench-makefile huggingface dataset:
// File: /workspace/github_c_makefile_star2_O1/jonof[P]jftekwar/jfbuild/src/build.c
// Function: getpoint
void getpoint(int searchxe, int searchye, int *x, int *y)
{
	if (posx <= -editorgridextent) posx = -editorgridextent;
	if (posx >= editorgridextent) posx = editorgridextent;
	if (posy <= -editorgridextent) posy = -editorgridextent;
	if (posy >= editorgridextent) posy = editorgridextent;

	*x = posx + divscale14(searchxe-halfxdim16,zoom);
	*y = posy + divscale14(searchye-midydim16,zoom);

	if (*x <= -editorgridextent) *x = -editorgridextent;
	if (*x >= editorgridextent) *x = editorgridextent;
	if (*y <= -editorgridextent) *y = -editorgridextent;
	if (*y >= editorgridextent) *y = editorgridextent;
}

// Assembly:
movq %rdx, %r8
leaq 0x8a439(%rip), %r9      # 0xa379c
movl (%r9), %eax
movl %eax, %edx
negl %edx
cmpl %edx, 0x1139e0(%rip)    # 0x12cd50
jg 0x19378
movl %edx, 0x1139d8(%rip)    # 0x12cd50
cmpl %eax, 0x1139d2(%rip)    # 0x12cd50
jl 0x19386
movl %eax, 0x1139ca(%rip)    # 0x12cd50
cmpl %edx, 0x1139c8(%rip)    # 0x12cd54
jg 0x19394
movl %edx, 0x1139c0(%rip)    # 0x12cd54
cmpl %eax, 0x1139ba(%rip)    # 0x12cd54
jl 0x193a2
movl %eax, 0x1139b2(%rip)    # 0x12cd54
movslq 0x15fe1b(%rip), %rdx    # 0x1791c4
movslq %edi, %rax
subq %rdx, %rax
movslq 0x89c4e(%rip), %rdi     # 0xa3004
shlq $0xe, %rax
cqto
idivq %rdi
addl 0x11398b(%rip), %eax    # 0x12cd50
movl %eax, (%r8)
movslq 0x15fdf9(%rip), %rdx    # 0x1791c8
movslq %esi, %rax
subq %rdx, %rax
movslq 0x89c28(%rip), %rsi     # 0xa3004
shlq $0xe, %rax
cqto
idivq %rsi
addl 0x113969(%rip), %eax    # 0x12cd54
movl %eax, (%rcx)
xorl %eax, %eax
subl (%r9), %eax
cmpl %eax, (%r8)
jg 0x193fa
movl %eax, (%r8)
movl (%r9), %eax
cmpl %eax, (%r8)
jl 0x19405
movl %eax, (%r8)
xorl %eax, %eax
subl (%r9), %eax
cmpl %eax, (%rcx)
jg 0x19410
movl %eax, (%rcx)
movl (%r9), %eax
cmpl %eax, (%rcx)
jl 0x19419
movl %eax, (%rcx)
retq
// File: /workspace/github_c_makefile_star2_O1/jonof[P]jftekwar/jfbuild/src/build.c
// Function: getlinehighlight
int getlinehighlight(int xplc, int yplc)
{
	int i, dst, dist, closest, x1, y1, x2, y2, nx, ny;

	if (numwalls == 0)
		return(-1);
	dist = 0x7fffffff;
	closest = numwalls-1;
	for(i=0;i<numwalls;i++)
	{
		getclosestpointonwall(xplc,yplc,i,&nx,&ny);
		dst = klabs(xplc-nx)+klabs(yplc-ny);
		if (dst <= dist)
			dist = dst, closest = i;
	}

	if (wall[closest].nextwall >= 0)
	{    //if red line, allow highlighting of both sides
		x1 = wall[closest].x;
		y1 = wall[closest].y;
		x2 = wall[wall[closest].point2].x;
		y2 = wall[wall[closest].point2].y;
		if (dmulscale32(xplc-x1,y2-y1,-(x2-x1),yplc-y1) >= 0)
			closest = wall[closest].nextwall;
	}

	return(closest);
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
leaq 0x3fc83c(%rip), %rax    # 0x415c68
movswl (%rax), %r12d
testl %r12d, %r12d
je 0x194eb
movl %esi, %ebp
movl %edi, %r14d
leal -0x1(%r12), %ebx
testw %r12w, %r12w
jle 0x19496
movl $0x7fffffff, %r13d      # imm = 0x7FFFFFFF
xorl %r15d, %r15d
movl %r14d, %edi
movl %ebp, %esi
movl %r15d, %edx
leaq 0x4(%rsp), %rcx
movq %rsp, %r8
callq 0x1ab74
movl %r14d, %eax
subl 0x4(%rsp), %eax
movl %eax, %ecx
negl %ecx
cmovsl %eax, %ecx
movl %ebp, %eax
subl (%rsp), %eax
movl %eax, %edx
negl %edx
cmovsl %eax, %edx
addl %ecx, %edx
cmpl %r13d, %edx
cmovlel %r15d, %ebx
cmovll %edx, %r13d
incl %r15d
cmpl %r15d, %r12d
jne 0x19452
movslq %ebx, %rdx
shlq $0x5, %rdx
leaq 0x19e5ac(%rip), %rcx    # 0x1b7a50
movswl 0xa(%rcx,%rdx), %eax
testl %eax, %eax
js 0x194f0
addq %rcx, %rdx
movslq (%rdx), %rsi
movslq 0x4(%rdx), %rdi
movswq 0x8(%rdx), %rdx
shlq $0x5, %rdx
movslq (%rcx,%rdx), %r8
movslq 0x4(%rcx,%rdx), %rcx
movslq %r14d, %rdx
subq %rsi, %rdx
subq %rdi, %rcx
imulq %rdx, %rcx
subq %r8, %rsi
movslq %ebp, %rdx
subq %rdi, %rdx
imulq %rsi, %rdx
addq %rcx, %rdx
cmovnsl %eax, %ebx
jmp 0x194f0
movl $0xffffffff, %ebx       # imm = 0xFFFFFFFF
movl %ebx, %eax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O1/jonof[P]jftekwar/jfbuild/src/build.c
// Function: adjustmark
int adjustmark(int *xplc, int *yplc, short danumwalls)
{
	int i, dst, dist, dax, day, pointlockdist;

	if (danumwalls < 0)
		danumwalls = numwalls;

	pointlockdist = 0;
	if ((grid > 0) && (gridlock > 0))
		pointlockdist = (128>>grid);

	dist = pointlockdist;
	dax = *xplc;
	day = *yplc;
	for(i=0;i<danumwalls;i++)
	{
		dst = klabs((*xplc)-wall[i].x) + klabs((*yplc)-wall[i].y);
		if (dst < dist)
		{
			dist = dst;
			dax = wall[i].x;
			day = wall[i].y;
		}
	}
	if (dist == pointlockdist)
		if ((gridlock > 0) && (grid > 0))
		{
			dax = ((dax+(1024>>grid))&(0xffffffff<<(11-grid)));
			day = ((day+(1024>>grid))&(0xffffffff<<(11-grid)));
		}

	*xplc = dax;
	*yplc = day;
	return(0);
}

// Assembly:
testw %dx, %dx
jns 0x19510
leaq 0x3fc75b(%rip), %rax    # 0x415c68
movzwl (%rax), %edx
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
movswl 0x89adb(%rip), %ecx     # 0xa2ffc
movzwl 0x89ad5(%rip), %r9d     # 0xa2ffe
movl $0x80, %eax
shrl %cl, %eax
xorl %r8d, %r8d
movw %r9w, -0x12(%rsp)
testw %r9w, %r9w
cmovlel %r8d, %eax
testl %ecx, %ecx
cmovlel %r8d, %eax
movq %rdi, -0x10(%rsp)
movl (%rdi), %r9d
movq %rsi, -0x8(%rsp)
movl (%rsi), %edi
testw %dx, %dx
jle 0x195b9
movzwl %dx, %r14d
shll $0x5, %r14d
xorl %r15d, %r15d
leaq 0x19e4e3(%rip), %r12    # 0x1b7a50
movl %edi, %edx
movl %r9d, %r8d
movl %eax, %ebx
movl (%r12,%r15), %ebp
movl 0x4(%r12,%r15), %r13d
movl %r9d, %r10d
subl %ebp, %r10d
movl %r10d, %esi
negl %esi
cmovsl %r10d, %esi
movl %edi, %r11d
subl %r13d, %r11d
movl %r11d, %r10d
negl %r10d
cmovsl %r11d, %r10d
addl %esi, %r10d
cmpl %ebx, %r10d
cmovll %r10d, %ebx
cmovll %ebp, %r8d
cmovll %r13d, %edx
addq $0x20, %r15
cmpq %r15, %r14
jne 0x19574
jmp 0x195c0
movl %eax, %ebx
movl %r9d, %r8d
movl %edi, %edx
cmpw $0x0, -0x12(%rsp)
setg %sil
testw %cx, %cx
setg %dil
cmpl %eax, %ebx
sete %al
andb %sil, %dil
andb %al, %dil
cmpb $0x1, %dil
jne 0x19600
movl $0x400, %esi            # imm = 0x400
shrl %cl, %esi
movb $0xb, %al
subb %cl, %al
movl $0xffffffff, %edi       # imm = 0xFFFFFFFF
movl %eax, %ecx
shll %cl, %edi
addl %esi, %r8d
andl %edi, %r8d
addl %esi, %edx
andl %edi, %edx
movq -0x8(%rsp), %rax
movq -0x10(%rsp), %rcx
movl %r8d, (%rcx)
movl %edx, (%rax)
xorl %eax, %eax
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/build.c
// Function: getclosestpointonwall
void getclosestpointonwall(int x, int y, int dawall, int *nx, int *ny)
{
	walltype *wal;
	int i, j, dx, dy;

    if (dawall < 0) { *nx = *ny = 0; return; }
	wal = &wall[dawall];
	dx = wall[wal->point2].x-wal->x;
	dy = wall[wal->point2].y-wal->y;
	i = dx*(x-wal->x) + dy*(y-wal->y);
	if (i <= 0) { *nx = wal->x; *ny = wal->y; return; }
	j = dx*dx+dy*dy;
	if (i >= j) { *nx = wal->x+dx; *ny = wal->y+dy; return; }
	i = divscale30(i,j);
	*nx = wal->x + mulscale30(dx,i);
	*ny = wal->y + mulscale30(dy,i);
}

// Assembly:
testl %edx, %edx
js 0x1ac07
pushq %r14
pushq %rbx
movl %edx, %edx
shlq $0x5, %rdx
leaq 0x19cec4(%rip), %r14    # 0x1b7a50
leaq (%r14,%rdx), %r9
movswq 0x8(%r14,%rdx), %r10
shlq $0x5, %r10
movl (%r14,%r10), %eax
movl (%r14,%rdx), %r11d
movl %eax, %ebx
subl %r11d, %ebx
movslq 0x4(%r14,%r10), %r10
movslq 0x4(%r14,%rdx), %rdx
subq %rdx, %r10
subl %r11d, %edi
imull %ebx, %edi
subl %edx, %esi
imull %r10d, %esi
addl %edi, %esi
jle 0x1ac0f
movl %ebx, %edi
imull %ebx, %edi
movl %r10d, %edx
imull %r10d, %edx
addl %edi, %edx
cmpl %edx, %esi
jge 0x1ac18
movl %esi, %eax
shlq $0x1e, %rax
movl %edx, %esi
xorl %edx, %edx
divq %rsi
movslq %ebx, %rdx
cltq
imulq %rax, %rdx
shrq $0x1e, %rdx
addl %edx, %r11d
movl %r11d, (%rcx)
imulq %rax, %r10
shrq $0x1e, %r10
addl 0x4(%r9), %r10d
movl %r10d, (%r8)
jmp 0x1ac24
xorl %eax, %eax
movl %eax, (%r8)
movl %eax, (%rcx)
retq
movl %r11d, (%rcx)
movl 0x4(%r9), %eax
jmp 0x1ac21
movl %eax, (%rcx)
movl 0x4(%r9), %eax
addl %r10d, %eax
movl %eax, (%r8)
popq %rbx
popq %r14
retq
// File: /workspace/github_c_makefile_star2_O1/jonof[P]jftekwar/jfbuild/src/build.c
// Function: getpointhighlight
int getpointhighlight(int xplc, int yplc)
{
	int i, dst, dist, closest;

	if (numwalls == 0)
		return(-1);

	dist = 0;
	if (grid > 0)
		dist = 1024;

	closest = -1;
	for(i=0;i<numwalls;i++)
	{
		dst = klabs(xplc-wall[i].x) + klabs(yplc-wall[i].y);
		if (dst <= dist)
			dist = dst, closest = i;
	}
	for(i=0;i<MAXSPRITES;i++)
		if (sprite[i].statnum < MAXSTATUS)
		{
			dst = klabs(xplc-sprite[i].x) + klabs(yplc-sprite[i].y);
			if (dst <= dist)
				dist = dst, closest = i+16384;
		}
	return(closest);
}

// Assembly:
pushq %rbx
leaq 0x3fb038(%rip), %rax    # 0x415c68
movzwl (%rax), %edx
testq %rdx, %rdx
je 0x1ac9a
xorl %ecx, %ecx
cmpw $0x0, 0x883ba(%rip)     # 0xa2ffc
setg %cl
shll $0xa, %ecx
testw %dx, %dx
jle 0x1aca1
leaq 0x19cdfc(%rip), %r8     # 0x1b7a50
addq $0x4, %r8
movl $0xffffffff, %eax       # imm = 0xFFFFFFFF
xorl %r9d, %r9d
movl %edi, %r10d
subl -0x4(%r8), %r10d
movl %r10d, %r11d
negl %r11d
cmovsl %r10d, %r11d
movl %esi, %r10d
subl (%r8), %r10d
movl %r10d, %ebx
negl %ebx
cmovsl %r10d, %ebx
addl %r11d, %ebx
cmpl %ecx, %ebx
cmovll %ebx, %ecx
cmovlel %r9d, %eax
incq %r9
addq $0x20, %r8
cmpq %r9, %rdx
jne 0x1ac60
jmp 0x1aca6
movl $0xffffffff, %eax       # imm = 0xFFFFFFFF
jmp 0x1ad01
movl $0xffffffff, %eax       # imm = 0xFFFFFFFF
leaq 0x261003(%rip), %rdx    # 0x27bcb0
xorl %r8d, %r8d
cmpw $0x3ff, 0x1a(%rdx)      # imm = 0x3FF
jg 0x1acf1
movl %edi, %r9d
subl (%rdx), %r9d
movl %r9d, %r10d
negl %r10d
cmovsl %r9d, %r10d
movl %esi, %r9d
subl 0x4(%rdx), %r9d
movl %r9d, %r11d
negl %r11d
cmovsl %r9d, %r11d
addl %r10d, %r11d
movl %r8d, %r9d
orl $0x4000, %r9d           # imm = 0x4000
cmpl %ecx, %r11d
cmovll %r11d, %ecx
cmovlel %r9d, %eax
incq %r8
addq $0x2c, %rdx
cmpq $0x4000, %r8            # imm = 0x4000
jne 0x1acb0
popq %rbx
retq
// File: /workspace/github_c_makefile_star2_O1/jonof[P]jftekwar/jfbuild/src/build.c
// Function: clearmidstatbar16
void clearmidstatbar16(void)
{
	setstatusbarviewport16();
	clearbuf((unsigned char *)(frameplace + (bytesperline*(ytop16+25L))),(bytesperline*(ydim16-1-(25<<1))) >> 2, 0x08080808l);
	drawline16(0,0,0,ydim16-1,7);
	drawline16(xdim-1,0,xdim-1,ydim16-1,7);
	restoreviewport16();
}

// Assembly:
pushq %rax
movl 0x11205e(%rip), %eax    # 0x12cd68
movl %eax, 0x88300(%rip)     # 0xa3010
movl 0x112056(%rip), %eax    # 0x12cd6c
movl %eax, 0x882f8(%rip)     # 0xa3014
movl $0x90, 0x112042(%rip)   # 0x12cd68
leaq 0x88307(%rip), %rax     # 0xa3034
movslq (%rax), %rdi
leal -0x90(%rdi), %eax
movl %eax, 0x112030(%rip)    # 0x12cd6c
leaq 0x16236d(%rip), %rax    # 0x17d0b0
leaq 0x16253a(%rip), %rcx    # 0x17d284
movslq (%rcx), %rcx
addq $-0x77, %rdi
imulq %rcx, %rdi
addq (%rax), %rdi
imull $0x5d, %ecx, %esi
sarl $0x2, %esi
movl $0x8080808, %edx        # imm = 0x8080808
callq 0x4abc9
movl 0x111ffa(%rip), %ecx    # 0x12cd68
decl %ecx
xorl %edi, %edi
xorl %esi, %esi
xorl %edx, %edx
movl $0x7, %r8d
callq 0x18db3
leaq 0x3ec264(%rip), %rax    # 0x406fec
movl (%rax), %edi
decl %edi
movl 0x111fd6(%rip), %ecx    # 0x12cd68
decl %ecx
xorl %esi, %esi
movl %edi, %edx
movl $0x7, %r8d
callq 0x18db3
movl 0x8826b(%rip), %eax     # 0xa3014
testl %eax, %eax
js 0x1add2
movl 0x8825d(%rip), %ecx     # 0xa3010
movl %ecx, 0x111faf(%rip)    # 0x12cd68
movl %eax, 0x111fad(%rip)    # 0x12cd6c
movl $0xffffffff, %eax       # imm = 0xFFFFFFFF
movl %eax, 0x88246(%rip)     # 0xa3010
movl %eax, 0x88244(%rip)     # 0xa3014
popq %rax
retq
leaq 0x58665(%rip), %rdi     # 0x7343e
xorl %eax, %eax
popq %rcx
jmp 0x6c31f
// File: /workspace/github_c_makefile_star2_O1/jonof[P]jftekwar/jfbuild/src/build.c
// Function: getnumber16
short getnumber16(char *namestart, short num, int maxnumber, char sign)
{
	char buffer[80], ch;
	int n, danum, oldnum;

	danum = (int)num;
	oldnum = danum;
	bflushchars();
	while (keystatus[0x1] == 0)
	{
		if (handleevents()) {
			if (quitevent) quitevent = 0;
		}

		ch = bgetchar();

		snprintf(buffer, sizeof(buffer), "%s%d_ ",namestart,danum);
		printmessage16(buffer);
		showframe();

		if (ch >= '0' && ch <= '9') {
			if (sign && danum<0)
				n = (danum*10)-(ch-'0');
			else
				n = (danum*10)+(ch-'0');
			if (n < maxnumber) danum = n;
		} else if (ch == 8 || ch == 127) {	// backspace
			danum /= 10;
		} else if (ch == 13) {
			oldnum = danum;
			asksave = 1;
			break;
		} else if (ch == '-' && sign) {	// negate
			danum = -danum;
		}
	}
	clearkeys();
	return((short)oldnum);
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x68, %rsp
movl %ecx, %ebp
movl %edx, %r14d
movl %esi, %ebx
movq %rdi, %r15
callq 0x1ec2f
leaq 0x161f2d(%rip), %rax    # 0x17d290
cmpb $0x0, 0x1(%rax)
jne 0x1b45d
movl %r14d, 0xc(%rsp)
movl %ebx, 0x8(%rsp)
movswl %bx, %r12d
leaq 0x10(%rsp), %rbx
movq %rax, %r14
callq 0x6d55e
testl %eax, %eax
je 0x1b3a1
leaq 0x161d0e(%rip), %rax    # 0x17d0a0
cmpb $0x0, (%rax)
je 0x1b3a1
leaq 0x161d02(%rip), %rax    # 0x17d0a0
movb $0x0, (%rax)
callq 0x1ebf5
movl %eax, %r13d
movl $0x50, %esi
movq %rbx, %rdi
leaq 0x58610(%rip), %rdx     # 0x739c8
movq %r15, %rcx
movl %r12d, %r8d
xorl %eax, %eax
callq 0x64f0
movq %rbx, %rdi
callq 0x19277
callq 0x6d200
leal -0x30(%r13), %ecx
movzbl %r13b, %eax
cmpb $0x9, %cl
ja 0x1b40a
leal (%r12,%r12), %ecx
leal (%rcx,%rcx,4), %ecx
leal (%rax,%rcx), %edx
addl $-0x30, %edx
subl %eax, %ecx
addl $0x30, %ecx
testl %r12d, %r12d
cmovnsl %edx, %ecx
testb %bpl, %bpl
cmovel %edx, %ecx
cmpl 0xc(%rsp), %ecx
cmovgel %r12d, %ecx
movl %ecx, %r12d
jmp 0x1b44b
cmpb $0x8, %r13b
je 0x1b433
cmpl $0x7f, %eax
je 0x1b433
cmpl $0xd, %eax
je 0x1b481
movl %r12d, %eax
negl %eax
cmpb $0x2d, %r13b
cmovnel %r12d, %eax
testb %bpl, %bpl
cmovel %r12d, %eax
movl %eax, %r12d
jmp 0x1b44b
movslq %r12d, %rax
imulq $0x66666667, %rax, %r12 # imm = 0x66666667
movq %r12, %rax
shrq $0x3f, %rax
sarq $0x22, %r12
addl %eax, %r12d
movq %r14, %rax
cmpb $0x0, 0x1(%r14)
je 0x1b37f
movl 0x8(%rsp), %ebx
leaq 0x161e2c(%rip), %rdi    # 0x17d290
movl $0x100, %edx            # imm = 0x100
xorl %esi, %esi
callq 0x62f0
movl %ebx, %eax
addq $0x68, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movw $0x1, 0x11149c(%rip)    # 0x12c926
movl %r12d, %ebx
jmp 0x1b45d
// File: /workspace/github_c_makefile_star2_O1/jonof[P]jftekwar/jfbuild/src/build.c
// Function: checksectorpointer
int checksectorpointer(short i, short sectnum)
{
	int j, k, startwall, endwall, x1, y1, x2, y2;

	x1 = wall[i].x;
	y1 = wall[i].y;
	x2 = wall[wall[i].point2].x;
	y2 = wall[wall[i].point2].y;

	if (wall[i].nextwall >= 0)          //Check for early exit
	{
		k = wall[i].nextwall;
		if ((wall[k].x == x2) && (wall[k].y == y2))
			if ((wall[wall[k].point2].x == x1) && (wall[wall[k].point2].y == y1))
				return(0);
	}

	wall[i].nextsector = -1;
	wall[i].nextwall = -1;
	for(j=0;j<numsectors;j++)
	{
		startwall = sector[j].wallptr;
		endwall = startwall + sector[j].wallnum - 1;
		for(k=startwall;k<=endwall;k++)
		{
			if ((wall[k].x == x2) && (wall[k].y == y2))
				if ((wall[wall[k].point2].x == x1) && (wall[wall[k].point2].y == y1))
					if (j != sectnum)
					{
						wall[i].nextsector = j;
						wall[i].nextwall = k;
						wall[k].nextsector = sectnum;
						wall[k].nextwall = i;
					}
		}
	}
	return(0);
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
movl %esi, -0x4(%rsp)
movslq %edi, %rax
shlq $0x5, %rax
leaq 0x19ba79(%rip), %rcx    # 0x1b7a50
movl (%rcx,%rax), %edx
movl 0x4(%rcx,%rax), %r8d
movswq 0x8(%rcx,%rax), %rsi
shlq $0x5, %rsi
movl (%rcx,%rsi), %r9d
movl 0x4(%rcx,%rsi), %r10d
movswq 0xa(%rcx,%rax), %r11
testq %r11, %r11
js 0x1c02b
shlq $0x5, %r11
cmpl %r9d, (%rcx,%r11)
jne 0x1c02b
addq %rcx, %r11
cmpl %r10d, 0x4(%r11)
jne 0x1c02b
movswq 0x8(%r11), %rsi
shlq $0x5, %rsi
cmpl %edx, (%rcx,%rsi)
jne 0x1c02b
addq %rcx, %rsi
cmpl %r8d, 0x4(%rsi)
je 0x1c0d9
addq %rcx, %rax
movl $0xffffffff, 0xa(%rax)  # imm = 0xFFFFFFFF
leaq 0x3b2f24(%rip), %rsi    # 0x3cef60
movswq (%rsi), %r11
testq %r11, %r11
jle 0x1c0d9
movswq -0x4(%rsp), %rsi
movl %esi, %ebx
xorl %r14d, %r14d
leaq 0x226a05(%rip), %rsi    # 0x242a60
leaq (%r14,%r14,4), %r15
movswq 0x2(%rsi,%r15,8), %r12
testq %r12, %r12
jle 0x1c0d1
leaq (%rsi,%r15,8), %r15
movswq (%r15), %r13
addq %r13, %r12
movq %r13, %r15
shlq $0x5, %r15
leaq (%rcx,%r15), %rbp
addq $0xc, %rbp
cmpl %r9d, -0xc(%rbp)
jne 0x1c0c5
cmpl %r10d, -0x8(%rbp)
jne 0x1c0c5
movswq -0x4(%rbp), %r15
shlq $0x5, %r15
cmpl %edx, (%rcx,%r15)
jne 0x1c0c5
cmpq %rbx, %r14
je 0x1c0c5
addq %rcx, %r15
cmpl %r8d, 0x4(%r15)
jne 0x1c0c5
movw %r14w, 0xc(%rax)
movw %r13w, 0xa(%rax)
movl -0x4(%rsp), %r15d
movw %r15w, (%rbp)
movw %di, -0x2(%rbp)
incq %r13
addq $0x20, %rbp
cmpq %r12, %r13
jl 0x1c084
incq %r14
cmpq %r11, %r14
jne 0x1c05b
xorl %eax, %eax
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/build.c
// Function: deletepoint
void deletepoint(short point)
{
	int i, j, k, sucksect;

	sucksect = sectorofwall(point);

	sector[sucksect].wallnum--;
	for(i=sucksect+1;i<numsectors;i++)
		sector[i].wallptr--;

	j = lastwall(point);
	k = wall[point].point2;
	wall[j].point2 = k;

	if (wall[j].nextwall >= 0)
	{
		wall[wall[j].nextwall].nextwall = -1;
		wall[wall[j].nextwall].nextsector = -1;
	}
	if (wall[point].nextwall >= 0)
	{
		wall[wall[point].nextwall].nextwall = -1;
		wall[wall[point].nextwall].nextsector = -1;
	}
	movewalls((int)point,-1L);

	checksectorpointer((short)j,(short)sucksect);
}

// Assembly:
pushq %rbp
pushq %r14
pushq %rbx
movl %edi, %ebp
callq 0x3bae9
movl %eax, %ebx
cltq
leaq (%rax,%rax,4), %rax
leaq 0x226960(%rip), %rcx    # 0x242a60
decw 0x2(%rcx,%rax,8)
leaq 0x3b2e54(%rip), %rax    # 0x3cef60
movswl (%rax), %edx
leal 0x1(%rbx), %eax
cmpl %edx, %eax
jge 0x1c138
cltq
leaq (%rax,%rax,4), %rax
shlq $0x3, %rax
addq 0x75e79(%rip), %rax     # 0x91fa0
movl %ebx, %ecx
notl %ecx
addl %edx, %ecx
decw (%rax)
addq $0x28, %rax
decl %ecx
jne 0x1c12d
movswl %bp, %r14d
movl %r14d, %edi
callq 0x2e466
movl %eax, %ebp
movswq %r14w, %rdx
shlq $0x5, %rdx
leaq 0x19b8fb(%rip), %rax    # 0x1b7a50
leaq (%rax,%rdx), %rcx
movzwl 0x8(%rax,%rdx), %esi
movslq %ebp, %rdx
shlq $0x5, %rdx
movw %si, 0x8(%rax,%rdx)
movswq 0xa(%rax,%rdx), %rsi
testq %rsi, %rsi
js 0x1c193
addq %rax, %rdx
shlq $0x5, %rsi
movw $0xffff, %di            # imm = 0xFFFF
movw %di, 0xa(%rax,%rsi)
movswq 0xa(%rdx), %rdx
shlq $0x5, %rdx
movw %di, 0xc(%rax,%rdx)
movswq 0xa(%rcx), %rdx
testq %rdx, %rdx
js 0x1c1b8
shlq $0x5, %rdx
movw $0xffff, %si            # imm = 0xFFFF
movw %si, 0xa(%rax,%rdx)
movswq 0xa(%rcx), %rcx
shlq $0x5, %rcx
movw %si, 0xc(%rax,%rcx)
movl %r14d, %edi
movl $0xffffffff, %esi       # imm = 0xFFFFFFFF
callq 0x1d235
movswl %bp, %edi
movswl %bx, %esi
popq %rbx
popq %r14
popq %rbp
jmp 0x1bfbb
// File: /workspace/github_c_makefile_star2_O1/jonof[P]jftekwar/jfbuild/src/build.c
// Function: checkautoinsert
int checkautoinsert(int dax, int day, short danumwalls)
{
	int i, x1, y1, x2, y2;

	if (danumwalls < 0)
		danumwalls = numwalls;
	for(i=0;i<danumwalls;i++)       // Check if a point should be inserted
	{
		x1 = wall[i].x;
		y1 = wall[i].y;
		x2 = wall[wall[i].point2].x;
		y2 = wall[wall[i].point2].y;

		if ((x1 != dax) || (y1 != day))
			if ((x2 != dax) || (y2 != day))
				if (((x1 <= dax) && (dax <= x2)) || ((x2 <= dax) && (dax <= x1)))
					if (((y1 <= day) && (day <= y2)) || ((y2 <= day) && (day <= y1)))
						if ((dax-x1)*(y2-y1) == (day-y1)*(x2-x1))
							return(1);          //insertpoint((short)i,dax,day);
	}
	return(0);
}

// Assembly:
pushq %rbp
pushq %rbx
testw %dx, %dx
jns 0x1c74a
leaq 0x3f9521(%rip), %rax    # 0x415c68
movzwl (%rax), %edx
testw %dx, %dx
jle 0x1c7e9
movzwl %dx, %eax
shll $0x5, %eax
xorl %ecx, %ecx
leaq 0x19b2ee(%rip), %rdx    # 0x1b7a50
movl (%rdx,%rcx), %r8d
movl 0x4(%rdx,%rcx), %r9d
movl %edi, %r10d
xorl %r8d, %r10d
movl %esi, %r11d
xorl %r9d, %r11d
orl %r10d, %r11d
je 0x1c7dc
movswq 0x8(%rdx,%rcx), %r11
shlq $0x5, %r11
movl (%rdx,%r11), %r10d
movl 0x4(%rdx,%r11), %r11d
movl %r10d, %ebx
xorl %edi, %ebx
movl %r11d, %ebp
xorl %esi, %ebp
orl %ebx, %ebp
je 0x1c7dc
movl %edi, %ebx
subl %r8d, %ebx
jl 0x1c7a9
cmpl %edi, %r10d
jge 0x1c7b3
cmpl %r8d, %edi
jg 0x1c7dc
cmpl %edi, %r10d
jg 0x1c7dc
movl %esi, %ebp
subl %r9d, %ebp
jl 0x1c7bf
cmpl %esi, %r11d
jge 0x1c7c9
cmpl %esi, %r11d
jg 0x1c7dc
cmpl %r9d, %esi
jg 0x1c7dc
subl %r9d, %r11d
imull %ebx, %r11d
subl %r8d, %r10d
imull %ebp, %r10d
cmpl %r10d, %r11d
je 0x1c7ee
addq $0x20, %rcx
cmpq %rcx, %rax
jne 0x1c762
xorl %eax, %eax
popq %rbx
popq %rbp
retq
movl $0x1, %eax
jmp 0x1c7eb
// File: /workspace/github_c_makefile_star2_O1/jonof[P]jftekwar/jfbuild/src/build.c
// Function: clockdir
int clockdir(short wallstart)   //Returns: 0 is CW, 1 is CCW
{
	short i, themin;
	int minx, templong, x0, x1, x2, y0, y1, y2;

	minx = 0x7fffffff;
	themin = -1;
	i = wallstart-1;
	do
	{
		i++;
		if (wall[wall[i].point2].x < minx)
		{
			minx = wall[wall[i].point2].x;
			themin = i;
		}
	}
	while ((wall[i].point2 != wallstart) && (i < MAXWALLS));

	x0 = wall[themin].x;
	y0 = wall[themin].y;
	x1 = wall[wall[themin].point2].x;
	y1 = wall[wall[themin].point2].y;
	x2 = wall[wall[wall[themin].point2].point2].x;
	y2 = wall[wall[wall[themin].point2].point2].y;

	if ((y1 >= y2) && (y1 <= y0)) return(0);
	if ((y1 >= y0) && (y1 <= y2)) return(1);

	templong = (x0-x1)*(y2-y1) - (x2-x1)*(y0-y1);
	if (templong < 0)
		return(0);
	else
		return(1);
}

// Assembly:
movw $0xffff, %cx            # imm = 0xFFFF
movl $0x7fffffff, %edx       # imm = 0x7FFFFFFF
leaq 0x19b24b(%rip), %rax    # 0x1b7a50
movl %edi, %esi
movswq %si, %r8
movq %r8, %r9
shlq $0x5, %r9
movswq 0x8(%rax,%r9), %r9
movq %r9, %r10
shlq $0x5, %r10
movl (%rax,%r10), %r10d
cmpl %edx, %r10d
cmovll %r10d, %edx
cmovll %r8d, %ecx
cmpw %di, %r9w
je 0x1c847
incl %r8d
movswl %si, %r9d
movl %r8d, %esi
cmpl $0x4000, %r9d           # imm = 0x4000
jl 0x1c807
movswq %cx, %rcx
shlq $0x5, %rcx
movl (%rax,%rcx), %edx
movl 0x4(%rax,%rcx), %r8d
movswq 0x8(%rax,%rcx), %rcx
shlq $0x5, %rcx
movl (%rax,%rcx), %esi
movl 0x4(%rax,%rcx), %r9d
movswq 0x8(%rax,%rcx), %rdi
shlq $0x5, %rdi
movl (%rax,%rdi), %ecx
movl 0x4(%rax,%rdi), %r10d
movl %r10d, %edi
subl %r9d, %edi
jg 0x1c88b
xorl %eax, %eax
cmpl %r8d, %r9d
jg 0x1c88b
retq
movl %r9d, %r11d
subl %r8d, %r11d
jl 0x1c89d
movl $0x1, %eax
cmpl %r9d, %r10d
jge 0x1c88a
subl %esi, %edx
imull %edx, %edi
subl %esi, %ecx
imull %r11d, %ecx
addl %edi, %ecx
notl %ecx
shrl $0x1f, %ecx
movl %ecx, %eax
retq
// File: /workspace/github_c_makefile_star2_O1/jonof[P]jftekwar/jfbuild/src/build.c
// Function: flipwalls
void flipwalls(short numwalls, short newnumwalls)
{
	int i, j, nume, templong;

	nume = newnumwalls-numwalls;

	for(i=numwalls;i<numwalls+(nume>>1);i++)
	{
		j = numwalls+newnumwalls-i-1;
		templong = wall[i].x; wall[i].x = wall[j].x; wall[j].x = templong;
		templong = wall[i].y; wall[i].y = wall[j].y; wall[j].y = templong;
	}
}

// Assembly:
movl %esi, %ecx
subl %edi, %ecx
sarl %ecx
testl %ecx, %ecx
jle 0x1c911
addl %edi, %ecx
movswq %di, %rax
movslq %ecx, %rcx
movq %rax, %rdx
shlq $0x5, %rdx
leaq 0x19b17d(%rip), %rdi    # 0x1b7a50
addq %rdi, %rdx
addq $0x4, %rdx
movswq %si, %rsi
shlq $0x5, %rsi
addq %rdi, %rsi
addq $-0x1c, %rsi
movl -0x4(%rdx), %edi
movl -0x4(%rsi), %r8d
movl %r8d, -0x4(%rdx)
movl %edi, -0x4(%rsi)
movl (%rdx), %edi
movl (%rsi), %r8d
movl %r8d, (%rdx)
movl %edi, (%rsi)
incq %rax
addq $0x20, %rdx
addq $-0x20, %rsi
cmpq %rcx, %rax
jl 0x1c8e9
retq
// File: /workspace/github_c_makefile_star2_O1/jonof[P]jftekwar/jfbuild/src/build.c
// Function: loopinside
short loopinside(int x, int y, short startwall)
{
	int x1, y1, x2, y2, templong;
	short i, cnt;

	cnt = clockdir(startwall);
	i = startwall;
	do
	{
		x1 = wall[i].x; x2 = wall[wall[i].point2].x;
		if ((x1 >= x) || (x2 >= x))
		{
			y1 = wall[i].y; y2 = wall[wall[i].point2].y;
			if (y1 > y2)
			{
				templong = x1, x1 = x2, x2 = templong;
				templong = y1, y1 = y2, y2 = templong;
			}
			if ((y1 <= y) && (y2 > y))
				if (x1*(y-y2)+x2*(y1-y) <= x*(y1-y2))
					cnt ^= 1;
		}
		i = wall[i].point2;
	}
	while (i != startwall);
	return(cnt);
}

// Assembly:
pushq %rbp
pushq %r14
pushq %rbx
movl %edx, %ebx
movl %esi, %ebp
movl %edi, %r14d
movl %edx, %edi
callq 0x1c7f5
leaq 0x19b125(%rip), %rcx    # 0x1b7a50
movl %ebx, %edx
movswq %dx, %rdi
shlq $0x5, %rdi
movl (%rcx,%rdi), %r10d
movzwl 0x8(%rcx,%rdi), %edx
movswq %dx, %r8
shlq $0x5, %r8
movl (%rcx,%r8), %esi
cmpl %r14d, %r10d
setl %r9b
cmpl %r14d, %esi
setl %r11b
testb %r11b, %r9b
jne 0x1c9ae
addq %rcx, %rdi
movl 0x4(%rdi), %edi
movl 0x4(%rcx,%r8), %r11d
cmpl %r11d, %edi
jle 0x1c975
movl %r11d, %r8d
movl %r10d, %r9d
jmp 0x1c981
movl %edi, %r8d
movl %esi, %r9d
movl %r11d, %edi
movl %r10d, %esi
movl %r8d, %r10d
subl %ebp, %r10d
jg 0x1c9ae
movl %ebp, %r11d
subl %edi, %r11d
jge 0x1c9ae
imull %r11d, %esi
imull %r10d, %r9d
addl %esi, %r9d
subl %edi, %r8d
imull %r14d, %r8d
xorl %esi, %esi
cmpl %r8d, %r9d
setle %sil
xorl %esi, %eax
cmpw %bx, %dx
jne 0x1c92d
popq %rbx
popq %r14
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O1/jonof[P]jftekwar/jfbuild/src/build.c
// Function: movewalls
int movewalls(int start, int offs)
{
	int i;

	if (offs < 0)  //Delete
	{
		for(i=start;i<numwalls+offs;i++)
			Bmemcpy(&wall[i],&wall[i-offs],sizeof(walltype));
	}
	else if (offs > 0)  //Insert
	{
		for(i=numwalls+offs-1;i>=start+offs;i--)
			Bmemcpy(&wall[i],&wall[i-offs],sizeof(walltype));
	}
	numwalls += offs;
	for(i=0;i<numwalls;i++)
	{
		if (wall[i].nextwall >= start) wall[i].nextwall += offs;
		if (wall[i].point2 >= start) wall[i].point2 += offs;
	}
	return(0);
}

// Assembly:
testl %esi, %esi
js 0x1d29b
je 0x1d2e5
leaq 0x3f8a22(%rip), %rax    # 0x415c68
movswl (%rax), %eax
cmpl %edi, %eax
jle 0x1d2e5
leal (%rsi,%rdi), %edx
addl %esi, %eax
cltq
movl %esi, %ecx
movslq %edx, %rdx
shlq $0x5, %rcx
negq %rcx
movq %rax, %r8
shlq $0x5, %r8
leaq 0x19a7de(%rip), %r9     # 0x1b7a50
addq %r9, %r8
addq $-0x20, %r8
decq %rax
movaps (%r8,%rcx), %xmm0
movaps 0x10(%r8,%rcx), %xmm1
movaps %xmm1, 0x10(%r8)
movaps %xmm0, (%r8)
addq $-0x20, %r8
cmpq %rdx, %rax
jg 0x1d279
jmp 0x1d2e5
leaq 0x3f89c6(%rip), %rax    # 0x415c68
movswl (%rax), %eax
leal (%rax,%rsi), %ecx
cmpl %edi, %ecx
jle 0x1d2e5
cltq
movslq %edi, %rcx
movslq %esi, %rdx
addq %rdx, %rax
shlq $0x5, %rdx
negq %rdx
subq %rcx, %rax
shlq $0x5, %rcx
addq 0x74d2c(%rip), %rcx     # 0x91ff8
movaps (%rcx,%rdx), %xmm0
movaps 0x10(%rcx,%rdx), %xmm1
movaps %xmm1, 0x10(%rcx)
movaps %xmm0, (%rcx)
addq $0x20, %rcx
decq %rax
jne 0x1d2cc
leaq 0x3f897c(%rip), %rcx    # 0x415c68
movzwl (%rcx), %eax
addw %si, %ax
movw %ax, (%rcx)
testw %ax, %ax
jle 0x1d33a
movzwl %ax, %eax
shll $0x5, %eax
xorl %ecx, %ecx
leaq 0x19a747(%rip), %rdx    # 0x1b7a50
movswl 0xa(%rdx,%rcx), %r8d
cmpl %edi, %r8d
jl 0x1d31d
addl %esi, %r8d
movw %r8w, 0xa(%rdx,%rcx)
movswl 0x8(%rdx,%rcx), %r8d
cmpl %edi, %r8d
jl 0x1d331
addl %esi, %r8d
movw %r8w, 0x8(%rdx,%rcx)
addq $0x20, %rcx
cmpq %rcx, %rax
jne 0x1d309
xorl %eax, %eax
retq
// File: /workspace/github_c_makefile_star2_O1/jonof[P]jftekwar/jfbuild/src/build.c
// Function: numloopsofsector
int numloopsofsector(short sectnum)
{
	int i, numloops, startwall, endwall;

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

// Assembly:
movslq %edi, %rax
leaq (%rax,%rax,4), %rax
leaq 0x225715(%rip), %rdx    # 0x242a60
movswq 0x2(%rdx,%rax,8), %rcx
testq %rcx, %rcx
jle 0x1d396
leaq (%rdx,%rax,8), %rax
movswq (%rax), %rdx
addq %rdx, %rcx
movq %rdx, %rax
shlq $0x5, %rax
leaq 0x19a6e1(%rip), %rsi    # 0x1b7a50
addq %rax, %rsi
addq $0x8, %rsi
xorl %eax, %eax
movswq (%rsi), %rdi
xorl %r8d, %r8d
cmpq %rdi, %rdx
setg %r8b
addl %r8d, %eax
incq %rdx
addq $0x20, %rsi
cmpq %rcx, %rdx
jl 0x1d378
retq
xorl %eax, %eax
retq
// File: /workspace/github_c_makefile_star2_O1/jonof[P]jftekwar/jfbuild/src/build.c
// Function: getfilenames
int getfilenames(char *path, char *kind)
{
	CACHE1D_FIND_REC *r;
	int type = 0;

	if (pathsearchmode == PATHSEARCH_GAME && grponlymode) {
		type = CACHE1D_OPT_NOSTACK;
	}

	clearfilenames();
	finddirs = klistpath(path,"*",CACHE1D_FIND_DIR|CACHE1D_FIND_DRIVE|type);
	findfiles = klistpath(path,kind,CACHE1D_FIND_FILE|type);
	for (r = finddirs; r; r=r->next) numdirs++;
	for (r = findfiles; r; r=r->next) numfiles++;

	finddirshigh = finddirs;
	findfileshigh = findfiles;
	currentlist = 0;
	if (findfileshigh) currentlist = 1;

	return(0);
}

// Assembly:
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
pushq %rax
movq %rsi, %rbx
movq %rdi, %r14
leaq 0x196352(%rip), %rax    # 0x1b3700
xorl %r12d, %r12d
cmpl %r12d, (%rax)
sete %al
cmpl $0x0, 0x10f55a(%rip)    # 0x12c918
setne %cl
andb %al, %cl
movzbl %cl, %r15d
shll $0x8, %r15d
movq 0x15c1fe(%rip), %rdi    # 0x1795d0
callq 0x206c1
movq 0x15c1fa(%rip), %rdi    # 0x1795d8
callq 0x206c1
movq %r12, 0x15c1ee(%rip)    # 0x1795d8
movq %r12, 0x15c1df(%rip)    # 0x1795d0
movl %r12d, 0x15c1e8(%rip)   # 0x1795e0
movl %r12d, 0x15c1e5(%rip)   # 0x1795e4
leal 0x6(%r15), %edx
leaq 0x5505b(%rip), %rsi     # 0x72465
movq %r14, %rdi
callq 0x206da
movq %rax, 0x15c1b7(%rip)    # 0x1795d0
incl %r15d
movq %r14, %rdi
movq %rbx, %rsi
movl %r15d, %edx
callq 0x206da
movq %rax, 0x15c1a7(%rip)    # 0x1795d8
movq 0x15c198(%rip), %rcx    # 0x1795d0
testq %rcx, %rcx
je 0x1d454
movl 0x15c19d(%rip), %edx    # 0x1795e0
incl %edx
movq 0x10(%rcx), %rcx
testq %rcx, %rcx
jne 0x1d443
movl %edx, 0x15c18c(%rip)    # 0x1795e0
movq 0x15c17d(%rip), %rcx    # 0x1795d8
testq %rcx, %rcx
je 0x1d477
movl 0x15c17e(%rip), %edx    # 0x1795e4
incl %edx
movq 0x10(%rcx), %rcx
testq %rcx, %rcx
jne 0x1d466
movl %edx, 0x15c16d(%rip)    # 0x1795e4
movq 0x15c152(%rip), %rcx    # 0x1795d0
movq %rcx, 0x15c163(%rip)    # 0x1795e8
movq %rax, 0x15c164(%rip)    # 0x1795f0
xorl %ecx, %ecx
testq %rax, %rax
setne %cl
movl %ecx, 0x15c15e(%rip)    # 0x1795f8
xorl %eax, %eax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
retq
// File: /workspace/github_c_makefile_star2_O1/jonof[P]jftekwar/jfbuild/src/build.c
// Function: GetWallZPeg
int GetWallZPeg(int nWall)
{
	int z=0, nSector, nNextSector;

	nSector = sectorofwall((short)nWall);
	nNextSector = wall[nWall].nextsector;
	if (nNextSector == -1)
	{
			//1-sided wall
		if (wall[nWall].cstat&4) z = sector[nSector].floorz;
								  else z = sector[nSector].ceilingz;
	}
	else
	{
			//2-sided wall
		if (wall[nWall].cstat&4)
			z = sector[nSector].ceilingz;
		else
		{
			if (sector[nNextSector].ceilingz > sector[nSector].ceilingz)
				z = sector[nNextSector].ceilingz;   //top step
			if (sector[nNextSector].floorz < sector[nSector].floorz)
				z = sector[nNextSector].floorz;   //bottom step
		}
	}
	return(z);
}

// Assembly:
pushq %rbx
movl %edi, %ebx
movswl %bx, %edi
callq 0x3bae9
movslq %ebx, %rdx
shlq $0x5, %rdx
leaq 0x19a192(%rip), %rsi    # 0x1b7a50
movswq 0xc(%rsi,%rdx), %rcx
movzwl 0xe(%rsi,%rdx), %edx
cmpq $-0x1, %rcx
je 0x1d8ff
testb $0x4, %dl
jne 0x1d917
leaq (%rcx,%rcx,4), %rcx
leaq 0x225181(%rip), %rdx    # 0x242a60
cltq
leaq (%rax,%rax,4), %rsi
movl 0x4(%rdx,%rcx,8), %edi
movl 0x8(%rdx,%rcx,8), %ecx
xorl %eax, %eax
cmpl 0x4(%rdx,%rsi,8), %edi
cmovgl %edi, %eax
cmpl 0x8(%rdx,%rsi,8), %ecx
cmovll %ecx, %eax
jmp 0x1d928
cltq
testb $0x4, %dl
je 0x1d919
leaq (%rax,%rax,4), %rax
leaq 0x22514f(%rip), %rcx    # 0x242a60
movl 0x8(%rcx,%rax,8), %eax
jmp 0x1d928
cltq
leaq (%rax,%rax,4), %rax
leaq 0x22513c(%rip), %rcx    # 0x242a60
movl 0x4(%rcx,%rax,8), %eax
popq %rbx
retq
// File: /workspace/github_c_makefile_star2_O1/jonof[P]jftekwar/jfbuild/src/build.c
// Function: AlignWalls
void AlignWalls(int nWall0, int z0, int nWall1, int z1, int nTile)
{
	int n;

		//do the x alignment
	wall[nWall1].cstat &= ~0x0108;    //Set to non-flip
	wall[nWall1].xpanning = (unsigned char)((wall[nWall0].xpanning+(wall[nWall0].xrepeat<<3))%tilesizx[nTile]);

	z1 = GetWallZPeg(nWall1);

	for(n=(picsiz[nTile]>>4);((1<<n)<tilesizy[nTile]);n++);

	wall[nWall1].yrepeat = wall[nWall0].yrepeat;
	wall[nWall1].ypanning = (unsigned char)(wall[nWall0].ypanning+(((z1-z0)*wall[nWall0].yrepeat)>>(n+3)));
}

// Assembly:
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
pushq %rax
movl %esi, %ebx
movslq %edx, %rcx
movq %rcx, %rsi
shlq $0x5, %rsi
leaq 0x19a10b(%rip), %r9     # 0x1b7a50
andw $0xfef7, 0xe(%r9,%rsi)  # imm = 0xFEF7
leaq (%r9,%rsi), %r14
movslq %edi, %rax
shlq $0x5, %rax
leaq (%r9,%rax), %r15
movzbl 0x18(%r9,%rax), %edx
movzbl 0x16(%r9,%rax), %eax
leal (%rdx,%rax,8), %eax
movslq %r8d, %r12
leaq 0x3f16ab(%rip), %rdx    # 0x40f020
movswl (%rdx,%r12,2), %edi
xorl %edx, %edx
idivl %edi
movb %dl, 0x18(%r9,%rsi)
movl %ecx, %edi
callq 0x1d8a5
leaq 0x3f5ebf(%rip), %rcx    # 0x413850
movzbl (%rcx,%r12), %ecx
shrl $0x4, %ecx
leaq 0x3e2e40(%rip), %rdx    # 0x4007e0
movswl (%rdx,%r12,2), %edx
movl $0x1, %esi
shll %cl, %esi
incl %ecx
cmpl %edx, %esi
jl 0x1d9a5
movb 0x17(%r15), %dl
movb %dl, 0x17(%r14)
subl %ebx, %eax
movzbl 0x17(%r15), %edx
imull %eax, %edx
addb $0x2, %cl
sarl %cl, %edx
addb 0x19(%r15), %dl
movb %dl, 0x19(%r14)
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
retq
nopl (%rax)
// File: /workspace/github_c_makefile_star2_O1/jonof[P]jftekwar/jfbuild/src/config.c
// Function: writesetup
int writesetup(const char *fn)
{
	BFILE *fp;
	int item;

	fp = Bfopen(fn,"wt");
	if (!fp) return -1;

	tmpbrightness = brightness;
#if USE_POLYMOST
	tmprenderer = getrendermode();
#endif
#ifdef RENDERTYPEWIN
	tmpmaxrefreshfreq = win_getmaxrefreshfreq();
#endif

	for (item = 0; configspec[item].name; item++) {
		if (configspec[item].doc) {
			if (item > 0) fputs("\n", fp);
			fputs(configspec[item].doc, fp);
		}
		fputs(configspec[item].name, fp);
		fputs(" = ", fp);
		switch (configspec[item].type) {
			case type_bool: {
				fprintf(fp, "%d\n", (*(int*)configspec[item].store != 0));
				break;
			}
			case type_int: {
				fprintf(fp, "%d\n", *(int*)configspec[item].store);
				break;
			}
			case type_hex: {
				fprintf(fp, "%X\n", *(int*)configspec[item].store);
				break;
			}
			case type_fixed16: {
				fprintf(fp, "%g\n", (double)(*(int*)configspec[item].store) / 65536.0);
				break;
			}
			case type_double: {
				fprintf(fp, "%g\n", *(double*)configspec[item].store);
				break;
			}
			default: {
				fputs("?\n", fp);
				break;
			}
		}
	}

	Bfclose(fp);

	return 0;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
leaq 0x548d4(%rip), %rsi     # 0x724f0
callq 0x6ce0
testq %rax, %rax
je 0x1dd56
movq %rax, %rbx
leaq 0x10ece8(%rip), %rax    # 0x12c91c
movswl (%rax), %eax
movl %eax, 0x853e3(%rip)     # 0xa3020
callq 0x3c5ee
movl %eax, 0x853d4(%rip)     # 0xa301c
leaq 0x563c2(%rip), %rbp     # 0x74011
leaq 0x7395a(%rip), %r13     # 0x915b0
leaq 0x56357(%rip), %r15     # 0x73fb4
xorl %r14d, %r14d
movq 0x18(%r14,%r13), %r12
testq %r12, %r12
je 0x1dc89
testq %r14, %r14
je 0x1dc7e
leaq 0x58416(%rip), %rdi     # 0x7608c
movq %rbx, %rsi
callq 0x6320
movq %r12, %rdi
movq %rbx, %rsi
callq 0x6320
movq %rbp, %rdi
movq %rbx, %rsi
callq 0x6320
leaq 0x54dd2(%rip), %rdi     # 0x72a6d
movq %rbx, %rsi
callq 0x6320
movl 0x8(%r14,%r13), %eax
cmpq $0x4, %rax
ja 0x1dd25
movslq (%r15,%rax,4), %rax
addq %r15, %rax
jmpq *%rax
movq 0x10(%r14,%r13), %rax
xorl %edx, %edx
cmpl $0x0, (%rax)
setne %dl
jmp 0x1dce3
movq 0x10(%r14,%r13), %rax
xorps %xmm0, %xmm0
cvtsi2sdl (%rax), %xmm0
mulsd 0x562be(%rip), %xmm0    # 0x73f98
jmp 0x1dd12
movq 0x10(%r14,%r13), %rax
movl (%rax), %edx
movq %rbx, %rdi
leaq 0x5736a(%rip), %rsi     # 0x75057
jmp 0x1dd00
movq 0x10(%r14,%r13), %rax
movl (%rax), %edx
movq %rbx, %rdi
leaq 0x56306(%rip), %rsi     # 0x74006
xorl %eax, %eax
callq 0x61e0
jmp 0x1dd34
movq 0x10(%r14,%r13), %rax
movsd (%rax), %xmm0
movq %rbx, %rdi
leaq 0x562ee(%rip), %rsi     # 0x7400a
movb $0x1, %al
callq 0x61e0
jmp 0x1dd34
leaq 0x562e2(%rip), %rdi     # 0x7400e
movq %rbx, %rsi
callq 0x6320
movq 0x20(%r14,%r13), %rbp
addq $0x20, %r14
cmpq $0x400, %r14            # imm = 0x400
jne 0x1dc60
movq %rbx, %rdi
callq 0x6480
xorl %eax, %eax
jmp 0x1dd5b
movl $0xffffffff, %eax       # imm = 0xFFFFFFFF
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
nop
// File: /workspace/github_c_makefile_star2_O1/jonof[P]jftekwar/jfbuild/src/startgtk_editor.c
// Function: setup_messages_mode
static void setup_messages_mode(gboolean allowcancel)
{
    gtk_notebook_set_current_page(GTK_NOTEBOOK(controls.tabs), TAB_MESSAGES);

    // Disable all the controls on the Configuration page.
    gtk_container_foreach(GTK_CONTAINER(controls.configbox),
            foreach_gtk_widget_set_sensitive, (gpointer)FALSE);
    gtk_widget_set_sensitive(controls.alwaysshowcheck, FALSE);

    gtk_widget_set_sensitive(controls.cancelbutton, allowcancel);
    gtk_widget_set_sensitive(controls.startbutton, FALSE);
}

// Assembly:
pushq %r14
pushq %rbx
pushq %rax
movl %edi, %ebx
movq 0x15ef95(%rip), %r14    # 0x17d030
callq 0x6b80
movq %r14, %rdi
movq %rax, %rsi
callq 0x6140
movq %rax, %rdi
movl $0x1, %esi
callq 0x6d20
movq 0x15ef79(%rip), %r14    # 0x17d038
callq 0x6860
movq %r14, %rdi
movq %rax, %rsi
callq 0x6140
leaq 0x967(%rip), %rsi       # 0x1ea3d
movq %rax, %rdi
xorl %edx, %edx
callq 0x6870
movq 0x15ef59(%rip), %rdi    # 0x17d040
xorl %esi, %esi
callq 0x6cb0
movq 0x15ef33(%rip), %rdi    # 0x17d028
movl %ebx, %esi
callq 0x6cb0
movq 0x15ef1d(%rip), %rdi    # 0x17d020
xorl %esi, %esi
addq $0x8, %rsp
popq %rbx
popq %r14
jmp 0x6cb0
// File: /workspace/github_c_makefile_star2_O1/jonof[P]jftekwar/jfbuild/src/startgtk_editor.c
// Function: startwin_close
int startwin_close(void)
{
    if (!gtkenabled) return 0;
    if (!startwin) return 1;

    quiteventonclose = FALSE;
    gtk_widget_destroy(GTK_WIDGET(startwin));
    startwin = NULL;

    while (gtk_events_pending()) {
        gtk_main_iteration();
    }

    return 0;
}

// Assembly:
pushq %r14
pushq %rbx
pushq %rax
leaq 0x6aff68(%rip), %rax    # 0x6ce084
xorl %ebx, %ebx
cmpl $0x0, (%rax)
je 0x1e16e
movq 0x15eee6(%rip), %r14    # 0x17d010
testq %r14, %r14
je 0x1e169
movb $0x0, 0x15eee2(%rip)    # 0x17d018
callq 0x6c90
movq %r14, %rdi
movq %rax, %rsi
callq 0x6140
movq %rax, %rdi
callq 0x6180
movq $0x0, 0x15eeb7(%rip) # 0x17d010
callq 0x6ac0
testl %eax, %eax
je 0x1e16e
callq 0x6040
jmp 0x1e159
movl $0x1, %ebx
movl %ebx, %eax
addq $0x8, %rsp
popq %rbx
popq %r14
retq
// File: /workspace/github_c_makefile_star2_O1/jonof[P]jftekwar/jfbuild/src/startgtk_editor.c
// Function: startwin_puts
int startwin_puts(const char *str)
{
    GtkTextBuffer *textbuffer;
    GtkTextIter enditer;
    GtkTextMark *mark;
    const char *aptr, *bptr;

    if (!gtkenabled || !str) return 0;
    if (!startwin) return 1;

    textbuffer = gtk_text_view_get_buffer(GTK_TEXT_VIEW(controls.messagestext));

    gtk_text_buffer_get_end_iter(textbuffer, &enditer);
    for (aptr = bptr = str; *aptr != 0; ) {
        switch (*bptr) {
            case '\b':
                if (bptr > aptr) {
                    // Insert any normal characters seen so far.
                    gtk_text_buffer_insert(textbuffer, &enditer, (const gchar *)aptr, (gint)(bptr-aptr)-1);
                }
                gtk_text_buffer_backspace(textbuffer, &enditer, FALSE, TRUE);
                aptr = ++bptr;
                break;
            case 0:
                if (bptr > aptr) {
                    gtk_text_buffer_insert(textbuffer, &enditer, (const gchar *)aptr, (gint)(bptr-aptr));
                }
                aptr = bptr;
                break;
            default:
                bptr++;
                break;
        }
    }

    mark = gtk_text_buffer_create_mark(textbuffer, NULL, &enditer, 1);
    gtk_text_view_scroll_to_mark(GTK_TEXT_VIEW(controls.messagestext), mark, 0.0, FALSE, 0.0, 1.0);
    gtk_text_buffer_delete_mark(textbuffer, mark);

    return 0;
}

// Assembly:
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
subq $0x58, %rsp
xorl %r12d, %r12d
testq %rdi, %rdi
je 0x1e2b1
leaq 0x6afeee(%rip), %rax    # 0x6ce084
cmpl $0x0, (%rax)
je 0x1e2b1
cmpq $0x0, 0x15ee69(%rip)    # 0x17d010
je 0x1e2ab
movq %rdi, %r15
movq 0x15ee91(%rip), %rbx    # 0x17d048
callq 0x66d0
movq %rax, %r14
movq %rbx, %rdi
movq %rax, %rsi
callq 0x6140
movq %rax, %rdi
callq 0x6260
movq %rax, %rbx
leaq 0x8(%rsp), %rsi
movq %rax, %rdi
callq 0x6ae0
cmpb $0x0, (%r15)
je 0x1e25a
leaq 0x8(%rsp), %r12
movq %r15, %rdx
movzbl (%r15), %eax
testl %eax, %eax
je 0x1e22b
cmpl $0x8, %eax
jne 0x1e245
cmpq %rdx, %r15
jbe 0x1e214
movl %edx, %ecx
notl %ecx
addl %r15d, %ecx
movq %rbx, %rdi
movq %r12, %rsi
callq 0x68f0
movq %rbx, %rdi
movq %r12, %rsi
xorl %edx, %edx
movl $0x1, %ecx
callq 0x65a0
incq %r15
jmp 0x1e240
cmpq %rdx, %r15
jbe 0x1e240
movl %r15d, %ecx
subl %edx, %ecx
movq %rbx, %rdi
movq %r12, %rsi
callq 0x68f0
movq %r15, %rax
jmp 0x1e24e
movq %r15, %rax
incq %rax
movq %rdx, %r15
movq %r15, %rdx
cmpb $0x0, (%r15)
movq %rax, %r15
jne 0x1e1f0
xorl %r12d, %r12d
leaq 0x8(%rsp), %rdx
movq %rbx, %rdi
xorl %esi, %esi
movl $0x1, %ecx
callq 0x6a50
movq %rax, %r15
movq 0x15edcd(%rip), %rdi    # 0x17d048
movq %r14, %rsi
callq 0x6140
movsd 0x5684d(%rip), %xmm2    # 0x74ad8
xorps %xmm0, %xmm0
xorps %xmm1, %xmm1
movq %rax, %rdi
movq %r15, %rsi
xorl %edx, %edx
callq 0x6030
movq %rbx, %rdi
movq %r15, %rsi
callq 0x6050
jmp 0x1e2b1
movl $0x1, %r12d
movl %r12d, %eax
addq $0x58, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
retq
// File: /workspace/github_c_makefile_star2_O1/jonof[P]jftekwar/jfbuild/src/startgtk_editor.c
// Function: startwin_run
int startwin_run(struct startwin_settings *settings)
{
    if (!gtkenabled || !startwin) return 0;

    set_settings(settings);
    setup_config_mode();
    startwinloop = TRUE;
    while (startwinloop) {
        gtk_main_iteration_do(TRUE);
    }
    setup_messages_mode(FALSE);
    set_settings(NULL);

    return retval;
}

// Assembly:
leaq 0x6afd92(%rip), %rcx    # 0x6ce084
xorl %eax, %eax
cmpl $0x0, (%rcx)
je 0x1e457
cmpq $0x0, 0x15ed0b(%rip)    # 0x17d010
je 0x1e457
pushq %r14
pushq %rbx
pushq %rax
movq %rdi, 0x15ed6a(%rip)    # 0x17d080
movq 0x15ed13(%rip), %rbx    # 0x17d030
callq 0x6b80
movq %rbx, %rdi
movq %rax, %rsi
callq 0x6140
movq %rax, %rdi
xorl %esi, %esi
callq 0x6d20
movq 0x15ecfa(%rip), %rbx    # 0x17d038
callq 0x6860
movq %rbx, %rdi
movq %rax, %rsi
callq 0x6140
leaq 0x6e8(%rip), %rsi       # 0x1ea3d
movl $0x1, %edx
movq %rax, %rdi
callq 0x6870
movq 0x15ecd7(%rip), %rbx    # 0x17d040
callq 0x6c10
movq %rax, %r14
movq %rbx, %rdi
movq %rax, %rsi
callq 0x6140
movq 0x15ecfd(%rip), %rcx    # 0x17d080
movl 0x18(%rcx), %esi
movq %rax, %rdi
callq 0x6d30
movq 0x15ecab(%rip), %rdi    # 0x17d040
movl $0x1, %esi
callq 0x6cb0
movq 0x15ecca(%rip), %rdi    # 0x17d070
movq %r14, %rsi
callq 0x6140
movq 0x15eccb(%rip), %rcx    # 0x17d080
movl (%rcx), %esi
movq %rax, %rdi
callq 0x6d30
movq 0x15ecaa(%rip), %rdi    # 0x17d070
movl $0x1, %esi
callq 0x6cb0
movl $0x1, %edi
callq 0x1e676
movq 0x15ec7f(%rip), %rdi    # 0x17d060
movl $0x1, %esi
callq 0x6cb0
movq 0x15ec5e(%rip), %rdi    # 0x17d050
movl $0x1, %esi
callq 0x6cb0
movq 0x15ec25(%rip), %rdi    # 0x17d028
movl $0x1, %esi
callq 0x6cb0
movq 0x15ec0c(%rip), %rdi    # 0x17d020
movl $0x1, %esi
callq 0x6cb0
movb $0x1, 0x15ec53(%rip)    # 0x17d078
movl $0x1, %edi
callq 0x63f0
cmpb $0x0, 0x15ec42(%rip)    # 0x17d078
jne 0x1e425
xorl %edi, %edi
callq 0x1e08e
movq $0x0, 0x15ec36(%rip) # 0x17d080
movl 0x84bd4(%rip), %eax     # 0xa3024
addq $0x8, %rsp
popq %rbx
popq %r14
retq
// File: /workspace/github_c_makefile_star2_O1/jonof[P]jftekwar/jfbuild/src/startgtk_editor.c
// Function: get_and_connect_signal
static GObject * get_and_connect_signal(GtkBuilder *builder, const char *name, const char *signal_name, GCallback handler)
{
    GObject *object;

    object = gtk_builder_get_object(builder, name);
    if (!object) {
        buildprintf("gtk_builder_get_object: %s not found\n", name);
        return 0;
    }
    g_signal_connect(object, signal_name, handler, NULL);
    return object;
}

// Assembly:
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
pushq %rax
movq %rcx, %r14
movq %rdx, %r15
movq %rsi, %r12
callq 0x6820
testq %rax, %rax
je 0x1e48e
movq %rax, %rbx
movq %rax, %rdi
movq %r15, %rsi
movq %r14, %rdx
xorl %ecx, %ecx
xorl %r8d, %r8d
xorl %r9d, %r9d
callq 0x6200
jmp 0x1e4a1
leaq 0x56746(%rip), %rdi     # 0x74bdb
xorl %ebx, %ebx
movq %r12, %rsi
xorl %eax, %eax
callq 0x24cb4
movq %rbx, %rax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
retq
// File: /workspace/github_c_makefile_star2_O1/jonof[P]jftekwar/jfbuild/src/startgtk_editor.c
// Function: on_startgtk_delete_event
static gboolean on_startgtk_delete_event(GtkWidget *widget, GdkEvent *event, gpointer user_data)
{
    (void)widget; (void)event; (void)user_data;

    startwinloop = FALSE;   // Break the loop.
    retval = STARTWIN_CANCEL;
    quitevent = quitevent || quiteventonclose;
    return TRUE;    // FALSE would let the event go through. We want the game to decide when to close.
}

// Assembly:
leaq 0x15ebe9(%rip), %rax    # 0x17d0a0
cmpb $0x0, (%rax)
movb $0x0, 0x15ebb7(%rip)    # 0x17d078
setne %cl
orb 0x15eb4e(%rip), %cl     # 0x17d018
movl $0x0, 0x84b50(%rip)     # 0xa3024
andb $0x1, %cl
movb %cl, (%rax)
movl $0x1, %eax
retq
// File: /workspace/github_c_makefile_star2_O1/jonof[P]jftekwar/jfbuild/src/startgtk_editor.c
// Function: on_startbutton_clicked
static void on_startbutton_clicked(GtkButton *button, gpointer user_data)
{
    int mode = -1;
    GtkTreeIter iter;

    (void)button; (void)user_data;

    if (gtk_combo_box_get_active_iter(GTK_COMBO_BOX(controls.vmode3dcombo), &iter)) {
        gtk_tree_model_get(GTK_TREE_MODEL(controls.vmode3dlist), &iter, 1 /*index*/, &mode, -1);
    }
    if (mode >= 0) {
        settings->xdim3d = validmode[mode].xdim;
        settings->ydim3d = validmode[mode].ydim;
        settings->bpp3d = validmode[mode].bpp;
        settings->fullscreen = validmode[mode].fs;
    }
    if (gtk_combo_box_get_active_iter(GTK_COMBO_BOX(controls.vmode2dcombo), &iter)) {
        gtk_tree_model_get(GTK_TREE_MODEL(controls.vmode2dlist), &iter, 1 /*index*/, &mode, -1);
    }
    if (mode >= 0) {
        settings->xdim2d = validmode[mode].xdim;
        settings->ydim2d = validmode[mode].ydim;
    }

    settings->forcesetup = gtk_toggle_button_get_active(GTK_TOGGLE_BUTTON(controls.alwaysshowcheck));

    startwinloop = FALSE;   // Break the loop.
    retval = STARTWIN_RUN;
}

// Assembly:
pushq %r14
pushq %rbx
subq $0x28, %rsp
movl $0xffffffff, 0x4(%rsp)  # imm = 0xFFFFFFFF
movq 0x15eb6b(%rip), %r14    # 0x17d060
callq 0x6640
movq %rax, %rbx
movq %r14, %rdi
movq %rax, %rsi
callq 0x6140
leaq 0x8(%rsp), %rsi
movq %rax, %rdi
callq 0x6cc0
testl %eax, %eax
je 0x1e54f
movq 0x15eb48(%rip), %r14    # 0x17d068
callq 0x6440
movq %r14, %rdi
movq %rax, %rsi
callq 0x6140
leaq 0x8(%rsp), %rsi
leaq 0x4(%rsp), %rcx
movq %rax, %rdi
movl $0x1, %edx
movl $0xffffffff, %r8d       # imm = 0xFFFFFFFF
xorl %eax, %eax
callq 0x66b0
movslq 0x4(%rsp), %rax
testq %rax, %rax
js 0x1e587
shlq $0x4, %rax
leaq 0x41c8ec(%rip), %rcx    # 0x43ae50
movl (%rcx,%rax), %edx
movq 0x15eb12(%rip), %rsi    # 0x17d080
movl %edx, 0xc(%rsi)
movl 0x4(%rcx,%rax), %edx
movl %edx, 0x10(%rsi)
movzbl 0x8(%rcx,%rax), %edx
movl %edx, 0x14(%rsi)
movzbl 0x9(%rcx,%rax), %eax
movl %eax, (%rsi)
movq 0x15eac2(%rip), %rdi    # 0x17d050
movq %rbx, %rsi
callq 0x6140
leaq 0x8(%rsp), %rsi
movq %rax, %rdi
callq 0x6cc0
testl %eax, %eax
je 0x1e5dd
movq 0x15eaaa(%rip), %rbx    # 0x17d058
callq 0x6440
movq %rbx, %rdi
movq %rax, %rsi
callq 0x6140
leaq 0x8(%rsp), %rsi
leaq 0x4(%rsp), %rcx
movq %rax, %rdi
movl $0x1, %edx
movl $0xffffffff, %r8d       # imm = 0xFFFFFFFF
xorl %eax, %eax
callq 0x66b0
movslq 0x4(%rsp), %rax
testq %rax, %rax
js 0x1e606
shlq $0x4, %rax
leaq 0x41c85e(%rip), %rcx    # 0x43ae50
movl (%rcx,%rax), %edx
movq 0x15ea84(%rip), %rsi    # 0x17d080
movl %edx, 0x4(%rsi)
movl 0x4(%rcx,%rax), %eax
movl %eax, 0x8(%rsi)
movq 0x15ea33(%rip), %rbx    # 0x17d040
callq 0x6c10
movq %rbx, %rdi
movq %rax, %rsi
callq 0x6140
movq %rax, %rdi
callq 0x62d0
movq 0x15ea54(%rip), %rcx    # 0x17d080
movl %eax, 0x18(%rcx)
movb $0x0, 0x15ea42(%rip)    # 0x17d078
movl $0x1, 0x849e4(%rip)     # 0xa3024
addq $0x28, %rsp
popq %rbx
popq %r14
retq
// File: /workspace/github_c_makefile_star2_O1/jonof[P]jftekwar/jfbuild/src/baselayer.c
// Function: bgetkey
int bgetkey(void)
{
	int c;
	if (keyfifoplc == keyfifoend) return 0;
	c = keyfifo[keyfifoplc];
	if (!keyfifo[(keyfifoplc+1)&(KEYFIFOSIZ-1)]) c = -c;
	keyfifoplc = (keyfifoplc+2)&(KEYFIFOSIZ-1);
	return c;
}

// Assembly:
movslq 0x15e4fb(%rip), %rcx    # 0x17d140
xorl %eax, %eax
cmpl 0x15e4f7(%rip), %ecx    # 0x17d144
je 0x1ec76
leaq 0x15e4fa(%rip), %rdx    # 0x17d150
movl (%rdx,%rcx,4), %esi
leal 0x1(%rcx), %edi
andl $0x3f, %edi
movl %esi, %eax
negl %eax
cmpl $0x0, (%rdx,%rdi,4)
cmovnel %esi, %eax
addl $0x2, %ecx
andl $0x3f, %ecx
movl %ecx, 0x15e4ca(%rip)    # 0x17d140
retq