LLM4Binary/decompile-bench-makefile huggingface dataset:
// File: /workspace/github_c_makefile_star2_O0/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:
pushq %rbp
movq %rsp, %rbp
subq $0x40, %rsp
movl %edi, -0x4(%rbp)
movl %esi, -0x8(%rbp)
movl %edx, -0xc(%rbp)
movq %rcx, -0x18(%rbp)
movq %r8, -0x20(%rbp)
cmpl $0x0, -0xc(%rbp)
jge 0x27d48
movq -0x20(%rbp), %rax
movl $0x0, (%rax)
movq -0x18(%rbp), %rax
movl $0x0, (%rax)
jmp 0x27e75
movslq -0xc(%rbp), %rcx
leaq 0x1cd85d(%rip), %rax    # 0x1f55b0
shlq $0x5, %rcx
addq %rcx, %rax
movq %rax, -0x28(%rbp)
movq -0x28(%rbp), %rax
movswq 0x8(%rax), %rcx
leaq 0x1cd842(%rip), %rax    # 0x1f55b0
shlq $0x5, %rcx
addq %rcx, %rax
movl (%rax), %eax
movq -0x28(%rbp), %rcx
subl (%rcx), %eax
movl %eax, -0x34(%rbp)
movq -0x28(%rbp), %rax
movswq 0x8(%rax), %rcx
leaq 0x1cd820(%rip), %rax    # 0x1f55b0
shlq $0x5, %rcx
addq %rcx, %rax
movl 0x4(%rax), %eax
movq -0x28(%rbp), %rcx
subl 0x4(%rcx), %eax
movl %eax, -0x38(%rbp)
movl -0x34(%rbp), %eax
movl -0x4(%rbp), %ecx
movq -0x28(%rbp), %rdx
subl (%rdx), %ecx
imull %ecx, %eax
movl -0x38(%rbp), %ecx
movl -0x8(%rbp), %edx
movq -0x28(%rbp), %rsi
subl 0x4(%rsi), %edx
imull %edx, %ecx
addl %ecx, %eax
movl %eax, -0x2c(%rbp)
cmpl $0x0, -0x2c(%rbp)
jg 0x27dec
movq -0x28(%rbp), %rax
movl (%rax), %ecx
movq -0x18(%rbp), %rax
movl %ecx, (%rax)
movq -0x28(%rbp), %rax
movl 0x4(%rax), %ecx
movq -0x20(%rbp), %rax
movl %ecx, (%rax)
jmp 0x27e75
movl -0x34(%rbp), %eax
imull -0x34(%rbp), %eax
movl -0x38(%rbp), %ecx
imull -0x38(%rbp), %ecx
addl %ecx, %eax
movl %eax, -0x30(%rbp)
movl -0x2c(%rbp), %eax
cmpl -0x30(%rbp), %eax
jl 0x27e28
movq -0x28(%rbp), %rax
movl (%rax), %ecx
addl -0x34(%rbp), %ecx
movq -0x18(%rbp), %rax
movl %ecx, (%rax)
movq -0x28(%rbp), %rax
movl 0x4(%rax), %ecx
addl -0x38(%rbp), %ecx
movq -0x20(%rbp), %rax
movl %ecx, (%rax)
jmp 0x27e75
movl -0x2c(%rbp), %edi
movl -0x30(%rbp), %esi
callq 0x2c070
movl %eax, -0x2c(%rbp)
movq -0x28(%rbp), %rax
movl (%rax), %eax
movl %eax, -0x40(%rbp)
movl -0x34(%rbp), %edi
movl -0x2c(%rbp), %esi
callq 0x2c090
movl -0x40(%rbp), %ecx
addl %eax, %ecx
movq -0x18(%rbp), %rax
movl %ecx, (%rax)
movq -0x28(%rbp), %rax
movl 0x4(%rax), %eax
movl %eax, -0x3c(%rbp)
movl -0x38(%rbp), %edi
movl -0x2c(%rbp), %esi
callq 0x2c090
movl -0x3c(%rbp), %ecx
addl %eax, %ecx
movq -0x20(%rbp), %rax
movl %ecx, (%rax)
addq $0x40, %rsp
popq %rbp
retq
nopl (%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/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 %rbp
movq %rsp, %rbp
subq $0x30, %rsp
movl %edi, -0x8(%rbp)
movl %esi, -0xc(%rbp)
leaq 0x429b33(%rip), %rax    # 0x4519c8
movswl (%rax), %eax
cmpl $0x0, %eax
jne 0x27ea9
movl $0xffffffff, -0x4(%rbp) # imm = 0xFFFFFFFF
jmp 0x27ff1
movl $0x0, -0x18(%rbp)
movswl 0xb80e5(%rip), %eax     # 0xdff9c
cmpl $0x0, %eax
jle 0x27ec3
movl $0x400, -0x18(%rbp)     # imm = 0x400
movl $0xffffffff, -0x1c(%rbp) # imm = 0xFFFFFFFF
movl $0x0, -0x10(%rbp)
movl -0x10(%rbp), %eax
leaq 0x429aed(%rip), %rcx    # 0x4519c8
movswl (%rcx), %ecx
cmpl %ecx, %eax
jge 0x27f49
movl -0x8(%rbp), %edi
movslq -0x10(%rbp), %rcx
leaq 0x1cd6c0(%rip), %rax    # 0x1f55b0
shlq $0x5, %rcx
addq %rcx, %rax
subl (%rax), %edi
callq 0x2b7f0
movl %eax, -0x20(%rbp)
movl -0xc(%rbp), %edi
movslq -0x10(%rbp), %rcx
leaq 0x1cd6a1(%rip), %rax    # 0x1f55b0
shlq $0x5, %rcx
addq %rcx, %rax
subl 0x4(%rax), %edi
callq 0x2b7f0
movl %eax, %ecx
movl -0x20(%rbp), %eax
addl %ecx, %eax
movl %eax, -0x14(%rbp)
movl -0x14(%rbp), %eax
cmpl -0x18(%rbp), %eax
jg 0x27f3c
movl -0x14(%rbp), %eax
movl %eax, -0x18(%rbp)
movl -0x10(%rbp), %eax
movl %eax, -0x1c(%rbp)
jmp 0x27f3e
movl -0x10(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x10(%rbp)
jmp 0x27ed1
movl $0x0, -0x10(%rbp)
cmpl $0x4000, -0x10(%rbp)    # imm = 0x4000
jge 0x27feb
movslq -0x10(%rbp), %rcx
leaq 0x2918a8(%rip), %rax    # 0x2b9810
imulq $0x2c, %rcx, %rcx
addq %rcx, %rax
movswl 0x1a(%rax), %eax
cmpl $0x400, %eax            # imm = 0x400
jge 0x27fdb
movl -0x8(%rbp), %edi
movslq -0x10(%rbp), %rcx
leaq 0x291888(%rip), %rax    # 0x2b9810
imulq $0x2c, %rcx, %rcx
addq %rcx, %rax
subl (%rax), %edi
callq 0x2b7f0
movl %eax, -0x24(%rbp)
movl -0xc(%rbp), %edi
movslq -0x10(%rbp), %rcx
leaq 0x291869(%rip), %rax    # 0x2b9810
imulq $0x2c, %rcx, %rcx
addq %rcx, %rax
subl 0x4(%rax), %edi
callq 0x2b7f0
movl %eax, %ecx
movl -0x24(%rbp), %eax
addl %ecx, %eax
movl %eax, -0x14(%rbp)
movl -0x14(%rbp), %eax
cmpl -0x18(%rbp), %eax
jg 0x27fd9
movl -0x14(%rbp), %eax
movl %eax, -0x18(%rbp)
movl -0x10(%rbp), %eax
addl $0x4000, %eax           # imm = 0x4000
movl %eax, -0x1c(%rbp)
jmp 0x27fdb
jmp 0x27fdd
movl -0x10(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x10(%rbp)
jmp 0x27f50
movl -0x1c(%rbp), %eax
movl %eax, -0x4(%rbp)
movl -0x4(%rbp), %eax
addq $0x30, %rsp
popq %rbp
retq
nopw (%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/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 %rbp
movq %rsp, %rbp
callq 0x1a410
leaq 0x192c00(%rip), %rax    # 0x1bac10
movq (%rax), %rdi
leaq 0x192dca(%rip), %rax    # 0x1bade4
movslq (%rax), %rax
movslq 0x1424a8(%rip), %rcx    # 0x16a4cc
addq $0x19, %rcx
imulq %rcx, %rax
addq %rax, %rdi
leaq 0x192dae(%rip), %rax    # 0x1bade4
movl (%rax), %esi
movl 0x14248a(%rip), %eax    # 0x16a4c8
subl $0x1, %eax
subl $0x32, %eax
imull %eax, %esi
sarl $0x2, %esi
movl $0x8080808, %edx        # imm = 0x8080808
callq 0x6ed50
movl 0x14246e(%rip), %ecx    # 0x16a4c8
subl $0x1, %ecx
xorl %edx, %edx
movl $0x7, %r8d
movl %edx, %edi
movl %edx, %esi
callq 0x250b0
leaq 0x41acd7(%rip), %rax    # 0x442d4c
movl (%rax), %edi
subl $0x1, %edi
leaq 0x41accb(%rip), %rax    # 0x442d4c
movl (%rax), %edx
subl $0x1, %edx
movl 0x14243c(%rip), %ecx    # 0x16a4c8
subl $0x1, %ecx
xorl %esi, %esi
movl $0x7, %r8d
callq 0x250b0
callq 0x1a450
popq %rbp
retq
nopw %cs:(%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/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
movq %rsp, %rbp
subq $0x80, %rsp
movb %cl, %al
movw %si, %cx
movq %rdi, -0x8(%rbp)
movw %cx, -0xa(%rbp)
movl %edx, -0x10(%rbp)
movb %al, -0x11(%rbp)
movswl -0xa(%rbp), %eax
movl %eax, -0x7c(%rbp)
movl -0x7c(%rbp), %eax
movl %eax, -0x80(%rbp)
callq 0x2dee0
leaq 0x192659(%rip), %rax    # 0x1badf0
movsbl 0x1(%rax), %eax
cmpl $0x0, %eax
jne 0x288af
callq 0xa6ab0
cmpl $0x0, %eax
je 0x287c6
leaq 0x19244b(%rip), %rax    # 0x1bac00
cmpb $0x0, (%rax)
je 0x287c4
leaq 0x19243f(%rip), %rax    # 0x1bac00
movb $0x0, (%rax)
jmp 0x287c6
callq 0x2de70
movb %al, -0x71(%rbp)
leaq -0x70(%rbp), %rdi
movq -0x8(%rbp), %rcx
movl -0x7c(%rbp), %r8d
movl $0x50, %esi
leaq 0x8813b(%rip), %rdx     # 0xb0921
movb $0x0, %al
callq 0x6490
leaq -0x70(%rbp), %rdi
callq 0x25760
callq 0xa67c0
movsbl -0x71(%rbp), %eax
cmpl $0x30, %eax
jl 0x2884e
movsbl -0x71(%rbp), %eax
cmpl $0x39, %eax
jg 0x2884e
movsbl -0x11(%rbp), %eax
cmpl $0x0, %eax
je 0x2882e
cmpl $0x0, -0x7c(%rbp)
jge 0x2882e
imull $0xa, -0x7c(%rbp), %eax
movsbl -0x71(%rbp), %ecx
subl $0x30, %ecx
subl %ecx, %eax
movl %eax, -0x78(%rbp)
jmp 0x2883e
imull $0xa, -0x7c(%rbp), %eax
movsbl -0x71(%rbp), %ecx
subl $0x30, %ecx
addl %ecx, %eax
movl %eax, -0x78(%rbp)
movl -0x78(%rbp), %eax
cmpl -0x10(%rbp), %eax
jge 0x2884c
movl -0x78(%rbp), %eax
movl %eax, -0x7c(%rbp)
jmp 0x288aa
movsbl -0x71(%rbp), %eax
cmpl $0x8, %eax
je 0x28860
movsbl -0x71(%rbp), %eax
cmpl $0x7f, %eax
jne 0x28870
movl -0x7c(%rbp), %eax
movl $0xa, %ecx
cltd
idivl %ecx
movl %eax, -0x7c(%rbp)
jmp 0x288a8
movsbl -0x71(%rbp), %eax
cmpl $0xd, %eax
jne 0x2888a
movl -0x7c(%rbp), %eax
movl %eax, -0x80(%rbp)
movw $0x1, 0x1417fe(%rip)    # 0x16a086
jmp 0x288af
movsbl -0x71(%rbp), %eax
cmpl $0x2d, %eax
jne 0x288a4
movsbl -0x11(%rbp), %eax
cmpl $0x0, %eax
je 0x288a4
xorl %eax, %eax
subl -0x7c(%rbp), %eax
movl %eax, -0x7c(%rbp)
jmp 0x288a6
jmp 0x288a8
jmp 0x288aa
jmp 0x28790
callq 0xc2a0
movl -0x80(%rbp), %eax
addq $0x80, %rsp
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O0/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
movq %rsp, %rbp
movw %dx, %ax
movl %edi, -0x8(%rbp)
movl %esi, -0xc(%rbp)
movw %ax, -0xe(%rbp)
movswl -0xe(%rbp), %eax
cmpl $0x0, %eax
jge 0x2a5c8
leaq 0x427407(%rip), %rax    # 0x4519c8
movw (%rax), %ax
movw %ax, -0xe(%rbp)
movl $0x0, -0x14(%rbp)
movl -0x14(%rbp), %eax
movswl -0xe(%rbp), %ecx
cmpl %ecx, %eax
jge 0x2a709
movslq -0x14(%rbp), %rcx
leaq 0x1cafc7(%rip), %rax    # 0x1f55b0
shlq $0x5, %rcx
addq %rcx, %rax
movl (%rax), %eax
movl %eax, -0x18(%rbp)
movslq -0x14(%rbp), %rcx
leaq 0x1cafb0(%rip), %rax    # 0x1f55b0
shlq $0x5, %rcx
addq %rcx, %rax
movl 0x4(%rax), %eax
movl %eax, -0x1c(%rbp)
movslq -0x14(%rbp), %rcx
leaq 0x1caf98(%rip), %rax    # 0x1f55b0
shlq $0x5, %rcx
addq %rcx, %rax
movswq 0x8(%rax), %rcx
leaq 0x1caf85(%rip), %rax    # 0x1f55b0
shlq $0x5, %rcx
addq %rcx, %rax
movl (%rax), %eax
movl %eax, -0x20(%rbp)
movslq -0x14(%rbp), %rcx
leaq 0x1caf6e(%rip), %rax    # 0x1f55b0
shlq $0x5, %rcx
addq %rcx, %rax
movswq 0x8(%rax), %rcx
leaq 0x1caf5b(%rip), %rax    # 0x1f55b0
shlq $0x5, %rcx
addq %rcx, %rax
movl 0x4(%rax), %eax
movl %eax, -0x24(%rbp)
movl -0x18(%rbp), %eax
cmpl -0x8(%rbp), %eax
jne 0x2a676
movl -0x1c(%rbp), %eax
cmpl -0xc(%rbp), %eax
je 0x2a6f9
movl -0x20(%rbp), %eax
cmpl -0x8(%rbp), %eax
jne 0x2a686
movl -0x24(%rbp), %eax
cmpl -0xc(%rbp), %eax
je 0x2a6f7
movl -0x18(%rbp), %eax
cmpl -0x8(%rbp), %eax
jg 0x2a696
movl -0x8(%rbp), %eax
cmpl -0x20(%rbp), %eax
jle 0x2a6a6
movl -0x20(%rbp), %eax
cmpl -0x8(%rbp), %eax
jg 0x2a6f5
movl -0x8(%rbp), %eax
cmpl -0x18(%rbp), %eax
jg 0x2a6f5
movl -0x1c(%rbp), %eax
cmpl -0xc(%rbp), %eax
jg 0x2a6b6
movl -0xc(%rbp), %eax
cmpl -0x24(%rbp), %eax
jle 0x2a6c6
movl -0x24(%rbp), %eax
cmpl -0xc(%rbp), %eax
jg 0x2a6f3
movl -0xc(%rbp), %eax
cmpl -0x1c(%rbp), %eax
jg 0x2a6f3
movl -0x8(%rbp), %eax
subl -0x18(%rbp), %eax
movl -0x24(%rbp), %ecx
subl -0x1c(%rbp), %ecx
imull %ecx, %eax
movl -0xc(%rbp), %ecx
subl -0x1c(%rbp), %ecx
movl -0x20(%rbp), %edx
subl -0x18(%rbp), %edx
imull %edx, %ecx
cmpl %ecx, %eax
jne 0x2a6f1
movl $0x1, -0x4(%rbp)
jmp 0x2a710
jmp 0x2a6f3
jmp 0x2a6f5
jmp 0x2a6f7
jmp 0x2a6f9
jmp 0x2a6fb
movl -0x14(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x14(%rbp)
jmp 0x2a5cf
movl $0x0, -0x4(%rbp)
movl -0x4(%rbp), %eax
popq %rbp
retq
nopw %cs:(%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/jonof[P]jftekwar/jfbuild/src/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:
pushq %rbp
movq %rsp, %rbp
movw %si, %ax
movw %di, %cx
movw %cx, -0x2(%rbp)
movw %ax, -0x4(%rbp)
movswl -0x4(%rbp), %eax
movswl -0x2(%rbp), %ecx
subl %ecx, %eax
movl %eax, -0x10(%rbp)
movswl -0x2(%rbp), %eax
movl %eax, -0x8(%rbp)
movl -0x8(%rbp), %eax
movswl -0x2(%rbp), %ecx
movl -0x10(%rbp), %edx
sarl %edx
addl %edx, %ecx
cmpl %ecx, %eax
jge 0x2aa7d
movswl -0x2(%rbp), %eax
movswl -0x4(%rbp), %ecx
addl %ecx, %eax
subl -0x8(%rbp), %eax
subl $0x1, %eax
movl %eax, -0xc(%rbp)
movslq -0x8(%rbp), %rcx
leaq 0x1cabe6(%rip), %rax    # 0x1f55b0
shlq $0x5, %rcx
addq %rcx, %rax
movl (%rax), %eax
movl %eax, -0x14(%rbp)
movslq -0xc(%rbp), %rcx
leaq 0x1cabcf(%rip), %rax    # 0x1f55b0
shlq $0x5, %rcx
addq %rcx, %rax
movl (%rax), %ecx
movslq -0x8(%rbp), %rdx
leaq 0x1cabbb(%rip), %rax    # 0x1f55b0
shlq $0x5, %rdx
addq %rdx, %rax
movl %ecx, (%rax)
movl -0x14(%rbp), %ecx
movslq -0xc(%rbp), %rdx
leaq 0x1caba4(%rip), %rax    # 0x1f55b0
shlq $0x5, %rdx
addq %rdx, %rax
movl %ecx, (%rax)
movslq -0x8(%rbp), %rcx
leaq 0x1cab90(%rip), %rax    # 0x1f55b0
shlq $0x5, %rcx
addq %rcx, %rax
movl 0x4(%rax), %eax
movl %eax, -0x14(%rbp)
movslq -0xc(%rbp), %rcx
leaq 0x1cab78(%rip), %rax    # 0x1f55b0
shlq $0x5, %rcx
addq %rcx, %rax
movl 0x4(%rax), %ecx
movslq -0x8(%rbp), %rdx
leaq 0x1cab63(%rip), %rax    # 0x1f55b0
shlq $0x5, %rdx
addq %rdx, %rax
movl %ecx, 0x4(%rax)
movl -0x14(%rbp), %ecx
movslq -0xc(%rbp), %rdx
leaq 0x1cab4b(%rip), %rax    # 0x1f55b0
shlq $0x5, %rdx
addq %rdx, %rax
movl %ecx, 0x4(%rax)
movl -0x8(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x8(%rbp)
jmp 0x2a996
popq %rbp
retq
nop
// File: /workspace/github_c_makefile_star2_O0/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
movq %rsp, %rbp
subq $0x30, %rsp
movw %dx, %ax
movl %edi, -0x4(%rbp)
movl %esi, -0x8(%rbp)
movw %ax, -0xa(%rbp)
movswl -0xa(%rbp), %edi
callq 0x2a720
movw %ax, -0x24(%rbp)
movw -0xa(%rbp), %ax
movw %ax, -0x22(%rbp)
movswq -0x22(%rbp), %rcx
leaq 0x1caafa(%rip), %rax    # 0x1f55b0
shlq $0x5, %rcx
addq %rcx, %rax
movl (%rax), %eax
movl %eax, -0x10(%rbp)
movswq -0x22(%rbp), %rcx
leaq 0x1caae2(%rip), %rax    # 0x1f55b0
shlq $0x5, %rcx
addq %rcx, %rax
movswq 0x8(%rax), %rcx
leaq 0x1caacf(%rip), %rax    # 0x1f55b0
shlq $0x5, %rcx
addq %rcx, %rax
movl (%rax), %eax
movl %eax, -0x18(%rbp)
movl -0x10(%rbp), %eax
cmpl -0x4(%rbp), %eax
jge 0x2ab01
movl -0x18(%rbp), %eax
cmpl -0x4(%rbp), %eax
jl 0x2abbb
movswq -0x22(%rbp), %rcx
leaq 0x1caaa3(%rip), %rax    # 0x1f55b0
shlq $0x5, %rcx
addq %rcx, %rax
movl 0x4(%rax), %eax
movl %eax, -0x14(%rbp)
movswq -0x22(%rbp), %rcx
leaq 0x1caa8a(%rip), %rax    # 0x1f55b0
shlq $0x5, %rcx
addq %rcx, %rax
movswq 0x8(%rax), %rcx
leaq 0x1caa77(%rip), %rax    # 0x1f55b0
shlq $0x5, %rcx
addq %rcx, %rax
movl 0x4(%rax), %eax
movl %eax, -0x1c(%rbp)
movl -0x14(%rbp), %eax
cmpl -0x1c(%rbp), %eax
jle 0x2ab72
movl -0x10(%rbp), %eax
movl %eax, -0x20(%rbp)
movl -0x18(%rbp), %eax
movl %eax, -0x10(%rbp)
movl -0x20(%rbp), %eax
movl %eax, -0x18(%rbp)
movl -0x14(%rbp), %eax
movl %eax, -0x20(%rbp)
movl -0x1c(%rbp), %eax
movl %eax, -0x14(%rbp)
movl -0x20(%rbp), %eax
movl %eax, -0x1c(%rbp)
movl -0x14(%rbp), %eax
cmpl -0x8(%rbp), %eax
jg 0x2abb9
movl -0x1c(%rbp), %eax
cmpl -0x8(%rbp), %eax
jle 0x2abb9
movl -0x10(%rbp), %eax
movl -0x8(%rbp), %ecx
subl -0x1c(%rbp), %ecx
imull %ecx, %eax
movl -0x18(%rbp), %ecx
movl -0x14(%rbp), %edx
subl -0x8(%rbp), %edx
imull %edx, %ecx
addl %ecx, %eax
movl -0x4(%rbp), %ecx
movl -0x14(%rbp), %edx
subl -0x1c(%rbp), %edx
imull %edx, %ecx
cmpl %ecx, %eax
jg 0x2abb7
movswl -0x24(%rbp), %eax
xorl $0x1, %eax
movw %ax, -0x24(%rbp)
jmp 0x2abb9
jmp 0x2abbb
movswq -0x22(%rbp), %rcx
leaq 0x1ca9e9(%rip), %rax    # 0x1f55b0
shlq $0x5, %rcx
addq %rcx, %rax
movw 0x8(%rax), %ax
movw %ax, -0x22(%rbp)
movswl -0x22(%rbp), %eax
movswl -0xa(%rbp), %ecx
cmpl %ecx, %eax
jne 0x2aaaa
movw -0x24(%rbp), %ax
addq $0x30, %rsp
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O0/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:
pushq %rbp
movq %rsp, %rbp
movl %edi, -0x4(%rbp)
movl %esi, -0x8(%rbp)
cmpl $0x0, -0x8(%rbp)
jge 0x2b8de
movl -0x4(%rbp), %eax
movl %eax, -0xc(%rbp)
movl -0xc(%rbp), %eax
leaq 0x426148(%rip), %rcx    # 0x4519c8
movswl (%rcx), %ecx
addl -0x8(%rbp), %ecx
cmpl %ecx, %eax
jge 0x2b8dc
movslq -0xc(%rbp), %rcx
leaq 0x1c9d1b(%rip), %rax    # 0x1f55b0
shlq $0x5, %rcx
addq %rcx, %rax
movl -0xc(%rbp), %ecx
subl -0x8(%rbp), %ecx
movslq %ecx, %rdx
leaq 0x1c9d04(%rip), %rcx    # 0x1f55b0
shlq $0x5, %rdx
addq %rdx, %rcx
movq (%rcx), %rdx
movq %rdx, (%rax)
movq 0x8(%rcx), %rdx
movq %rdx, 0x8(%rax)
movq 0x10(%rcx), %rdx
movq %rdx, 0x10(%rax)
movq 0x18(%rcx), %rcx
movq %rcx, 0x18(%rax)
movl -0xc(%rbp), %eax
addl $0x1, %eax
movl %eax, -0xc(%rbp)
jmp 0x2b876
jmp 0x2b95a
cmpl $0x0, -0x8(%rbp)
jle 0x2b958
leaq 0x4260dd(%rip), %rax    # 0x4519c8
movswl (%rax), %eax
addl -0x8(%rbp), %eax
subl $0x1, %eax
movl %eax, -0xc(%rbp)
movl -0xc(%rbp), %eax
movl -0x4(%rbp), %ecx
addl -0x8(%rbp), %ecx
cmpl %ecx, %eax
jl 0x2b956
movslq -0xc(%rbp), %rcx
leaq 0x1c9ca1(%rip), %rax    # 0x1f55b0
shlq $0x5, %rcx
addq %rcx, %rax
movl -0xc(%rbp), %ecx
subl -0x8(%rbp), %ecx
movslq %ecx, %rdx
leaq 0x1c9c8a(%rip), %rcx    # 0x1f55b0
shlq $0x5, %rdx
addq %rdx, %rcx
movq (%rcx), %rdx
movq %rdx, (%rax)
movq 0x8(%rcx), %rdx
movq %rdx, 0x8(%rax)
movq 0x10(%rcx), %rdx
movq %rdx, 0x10(%rax)
movq 0x18(%rcx), %rcx
movq %rcx, 0x18(%rax)
movl -0xc(%rbp), %eax
addl $-0x1, %eax
movl %eax, -0xc(%rbp)
jmp 0x2b8f7
jmp 0x2b958
jmp 0x2b95a
movl -0x8(%rbp), %ecx
leaq 0x426064(%rip), %rax    # 0x4519c8
movswl (%rax), %eax
addl %ecx, %eax
movw %ax, %cx
leaq 0x426055(%rip), %rax    # 0x4519c8
movw %cx, (%rax)
movl $0x0, -0xc(%rbp)
movl -0xc(%rbp), %eax
leaq 0x426041(%rip), %rcx    # 0x4519c8
movswl (%rcx), %ecx
cmpl %ecx, %eax
jge 0x2ba16
movslq -0xc(%rbp), %rcx
leaq 0x1c9c13(%rip), %rax    # 0x1f55b0
shlq $0x5, %rcx
addq %rcx, %rax
movswl 0xa(%rax), %eax
cmpl -0x4(%rbp), %eax
jl 0x2b9cc
movl -0x8(%rbp), %edx
movslq -0xc(%rbp), %rcx
leaq 0x1c9bf5(%rip), %rax    # 0x1f55b0
shlq $0x5, %rcx
addq %rcx, %rax
movswl 0xa(%rax), %ecx
addl %edx, %ecx
movw %cx, 0xa(%rax)
movslq -0xc(%rbp), %rcx
leaq 0x1c9bd9(%rip), %rax    # 0x1f55b0
shlq $0x5, %rcx
addq %rcx, %rax
movswl 0x8(%rax), %eax
cmpl -0x4(%rbp), %eax
jl 0x2ba06
movl -0x8(%rbp), %edx
movslq -0xc(%rbp), %rcx
leaq 0x1c9bbb(%rip), %rax    # 0x1f55b0
shlq $0x5, %rcx
addq %rcx, %rax
movswl 0x8(%rax), %ecx
addl %edx, %ecx
movw %cx, 0x8(%rax)
jmp 0x2ba08
movl -0xc(%rbp), %eax
addl $0x1, %eax
movl %eax, -0xc(%rbp)
jmp 0x2b97d
xorl %eax, %eax
popq %rbp
retq
nopw (%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/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:
pushq %rbp
movq %rsp, %rbp
movw %di, %ax
movw %ax, -0x2(%rbp)
movl $0x0, -0xc(%rbp)
movswq -0x2(%rbp), %rcx
leaq 0x254b82(%rip), %rax    # 0x2805c0
imulq $0x28, %rcx, %rcx
addq %rcx, %rax
movswl (%rax), %eax
movl %eax, -0x10(%rbp)
movl -0x10(%rbp), %eax
movswq -0x2(%rbp), %rdx
leaq 0x254b66(%rip), %rcx    # 0x2805c0
imulq $0x28, %rdx, %rdx
addq %rdx, %rcx
movswl 0x2(%rcx), %ecx
addl %ecx, %eax
movl %eax, -0x14(%rbp)
movl -0x10(%rbp), %eax
movl %eax, -0x8(%rbp)
movl -0x8(%rbp), %eax
cmpl -0x14(%rbp), %eax
jge 0x2baa9
movslq -0x8(%rbp), %rcx
leaq 0x1c9b2d(%rip), %rax    # 0x1f55b0
shlq $0x5, %rcx
addq %rcx, %rax
movswl 0x8(%rax), %eax
cmpl -0x8(%rbp), %eax
jge 0x2ba9c
movl -0xc(%rbp), %eax
addl $0x1, %eax
movl %eax, -0xc(%rbp)
jmp 0x2ba9e
movl -0x8(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x8(%rbp)
jmp 0x2ba70
movl -0xc(%rbp), %eax
popq %rbp
retq
nop
// File: /workspace/github_c_makefile_star2_O0/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 %rbp
movq %rsp, %rbp
subq $0x20, %rsp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movl $0x0, -0x1c(%rbp)
leaq 0x1c5792(%rip), %rax    # 0x1f1260
cmpl $0x0, (%rax)
jne 0x2bae3
cmpl $0x0, 0x13e59e(%rip)    # 0x16a078
je 0x2bae3
movl $0x100, -0x1c(%rbp)     # imm = 0x100
callq 0x1a260
movq -0x8(%rbp), %rdi
movl -0x1c(%rbp), %edx
orl $0x6, %edx
leaq 0x838ac(%rip), %rsi     # 0xaf3a5
callq 0x30a20
movq %rax, 0x18b22b(%rip)    # 0x1b6d30
movq -0x8(%rbp), %rdi
movq -0x10(%rbp), %rsi
movl -0x1c(%rbp), %edx
orl $0x1, %edx
callq 0x30a20
movq %rax, 0x18b219(%rip)    # 0x1b6d38
movq 0x18b20a(%rip), %rax    # 0x1b6d30
movq %rax, -0x18(%rbp)
cmpq $0x0, -0x18(%rbp)
je 0x2bb4e
movl 0x18b209(%rip), %eax    # 0x1b6d40
addl $0x1, %eax
movl %eax, 0x18b200(%rip)    # 0x1b6d40
movq -0x18(%rbp), %rax
movq 0x10(%rax), %rax
movq %rax, -0x18(%rbp)
jmp 0x2bb2a
movq 0x18b1e3(%rip), %rax    # 0x1b6d38
movq %rax, -0x18(%rbp)
cmpq $0x0, -0x18(%rbp)
je 0x2bb7d
movl 0x18b1de(%rip), %eax    # 0x1b6d44
addl $0x1, %eax
movl %eax, 0x18b1d5(%rip)    # 0x1b6d44
movq -0x18(%rbp), %rax
movq 0x10(%rax), %rax
movq %rax, -0x18(%rbp)
jmp 0x2bb59
movq 0x18b1ac(%rip), %rax    # 0x1b6d30
movq %rax, 0x18b1bd(%rip)    # 0x1b6d48
movq 0x18b1a6(%rip), %rax    # 0x1b6d38
movq %rax, 0x18b1b7(%rip)    # 0x1b6d50
movl $0x0, 0x18b1b5(%rip)    # 0x1b6d58
cmpq $0x0, 0x18b1a5(%rip)    # 0x1b6d50
je 0x2bbb7
movl $0x1, 0x18b1a1(%rip)    # 0x1b6d58
xorl %eax, %eax
addq $0x20, %rsp
popq %rbp
retq
nop
// File: /workspace/github_c_makefile_star2_O0/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 %rbp
movq %rsp, %rbp
subq $0x10, %rsp
movl %edi, -0x4(%rbp)
movl $0x0, -0x8(%rbp)
movl -0x4(%rbp), %eax
movswl %ax, %edi
callq 0x58ba0
movl %eax, -0xc(%rbp)
movslq -0x4(%rbp), %rcx
leaq 0x1c94d5(%rip), %rax    # 0x1f55b0
shlq $0x5, %rcx
addq %rcx, %rax
movswl 0xc(%rax), %eax
movl %eax, -0x10(%rbp)
cmpl $-0x1, -0x10(%rbp)
jne 0x2c144
movslq -0x4(%rbp), %rcx
leaq 0x1c94b6(%rip), %rax    # 0x1f55b0
shlq $0x5, %rcx
addq %rcx, %rax
movswl 0xe(%rax), %eax
andl $0x4, %eax
cmpl $0x0, %eax
je 0x2c127
movslq -0xc(%rbp), %rcx
leaq 0x2544a8(%rip), %rax    # 0x2805c0
imulq $0x28, %rcx, %rcx
addq %rcx, %rax
movl 0x8(%rax), %eax
movl %eax, -0x8(%rbp)
jmp 0x2c13f
movslq -0xc(%rbp), %rcx
leaq 0x25448e(%rip), %rax    # 0x2805c0
imulq $0x28, %rcx, %rcx
addq %rcx, %rax
movl 0x4(%rax), %eax
movl %eax, -0x8(%rbp)
jmp 0x2c20b
movslq -0x4(%rbp), %rcx
leaq 0x1c9461(%rip), %rax    # 0x1f55b0
shlq $0x5, %rcx
addq %rcx, %rax
movswl 0xe(%rax), %eax
andl $0x4, %eax
cmpl $0x0, %eax
je 0x2c17f
movslq -0xc(%rbp), %rcx
leaq 0x254453(%rip), %rax    # 0x2805c0
imulq $0x28, %rcx, %rcx
addq %rcx, %rax
movl 0x4(%rax), %eax
movl %eax, -0x8(%rbp)
jmp 0x2c209
movslq -0x10(%rbp), %rcx
leaq 0x254436(%rip), %rax    # 0x2805c0
imulq $0x28, %rcx, %rcx
addq %rcx, %rax
movl 0x4(%rax), %eax
movslq -0xc(%rbp), %rdx
leaq 0x254421(%rip), %rcx    # 0x2805c0
imulq $0x28, %rdx, %rdx
addq %rdx, %rcx
cmpl 0x4(%rcx), %eax
jle 0x2c1c3
movslq -0x10(%rbp), %rcx
leaq 0x25440a(%rip), %rax    # 0x2805c0
imulq $0x28, %rcx, %rcx
addq %rcx, %rax
movl 0x4(%rax), %eax
movl %eax, -0x8(%rbp)
movslq -0x10(%rbp), %rcx
leaq 0x2543f2(%rip), %rax    # 0x2805c0
imulq $0x28, %rcx, %rcx
addq %rcx, %rax
movl 0x8(%rax), %eax
movslq -0xc(%rbp), %rdx
leaq 0x2543dd(%rip), %rcx    # 0x2805c0
imulq $0x28, %rdx, %rdx
addq %rdx, %rcx
cmpl 0x8(%rcx), %eax
jge 0x2c207
movslq -0x10(%rbp), %rcx
leaq 0x2543c6(%rip), %rax    # 0x2805c0
imulq $0x28, %rcx, %rcx
addq %rcx, %rax
movl 0x8(%rax), %eax
movl %eax, -0x8(%rbp)
jmp 0x2c209
jmp 0x2c20b
movl -0x8(%rbp), %eax
addq $0x10, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/jonof[P]jftekwar/jfbuild/src/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 %rbp
movq %rsp, %rbp
subq $0x20, %rsp
movl %edi, -0x4(%rbp)
movl %esi, -0x8(%rbp)
movl %edx, -0xc(%rbp)
movl %ecx, -0x10(%rbp)
movl %r8d, -0x14(%rbp)
movslq -0xc(%rbp), %rcx
leaq 0x1c936d(%rip), %rax    # 0x1f55b0
shlq $0x5, %rcx
addq %rcx, %rax
movswl 0xe(%rax), %ecx
andl $0xfffffef7, %ecx       # imm = 0xFFFFFEF7
movw %cx, 0xe(%rax)
movslq -0x4(%rbp), %rcx
leaq 0x1c934d(%rip), %rax    # 0x1f55b0
shlq $0x5, %rcx
addq %rcx, %rax
movzbl 0x18(%rax), %eax
movslq -0x4(%rbp), %rdx
leaq 0x1c9337(%rip), %rcx    # 0x1f55b0
shlq $0x5, %rdx
addq %rdx, %rcx
movzbl 0x16(%rcx), %ecx
shll $0x3, %ecx
addl %ecx, %eax
movslq -0x14(%rbp), %rdx
leaq 0x41eaec(%rip), %rcx    # 0x44ad80
movswl (%rcx,%rdx,2), %ecx
cltd
idivl %ecx
movb %dl, %cl
movslq -0xc(%rbp), %rdx
leaq 0x1c9308(%rip), %rax    # 0x1f55b0
shlq $0x5, %rdx
addq %rdx, %rax
movb %cl, 0x18(%rax)
movl -0xc(%rbp), %edi
callq 0x2c0b0
movl %eax, -0x10(%rbp)
movslq -0x14(%rbp), %rcx
leaq 0x4232e8(%rip), %rax    # 0x44f5b0
movzbl (%rax,%rcx), %eax
sarl $0x4, %eax
movl %eax, -0x18(%rbp)
movl -0x18(%rbp), %ecx
movl $0x1, %eax
shll %cl, %eax
movslq -0x14(%rbp), %rdx
leaq 0x410259(%rip), %rcx    # 0x43c540
movswl (%rcx,%rdx,2), %ecx
cmpl %ecx, %eax
jge 0x2c2fc
jmp 0x2c2f1
movl -0x18(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x18(%rbp)
jmp 0x2c2d2
movslq -0x4(%rbp), %rcx
leaq 0x1c92a9(%rip), %rax    # 0x1f55b0
shlq $0x5, %rcx
addq %rcx, %rax
movb 0x17(%rax), %cl
movslq -0xc(%rbp), %rdx
leaq 0x1c9294(%rip), %rax    # 0x1f55b0
shlq $0x5, %rdx
addq %rdx, %rax
movb %cl, 0x17(%rax)
movslq -0x4(%rbp), %rcx
leaq 0x1c927f(%rip), %rax    # 0x1f55b0
shlq $0x5, %rcx
addq %rcx, %rax
movzbl 0x19(%rax), %eax
movl -0x10(%rbp), %edx
subl -0x8(%rbp), %edx
movslq -0x4(%rbp), %rsi
leaq 0x1c9263(%rip), %rcx    # 0x1f55b0
shlq $0x5, %rsi
addq %rsi, %rcx
movzbl 0x17(%rcx), %ecx
imull %ecx, %edx
movl -0x18(%rbp), %ecx
addl $0x3, %ecx
sarl %cl, %edx
movl %edx, %ecx
addl %ecx, %eax
movb %al, %cl
movslq -0xc(%rbp), %rdx
leaq 0x1c923c(%rip), %rax    # 0x1f55b0
shlq $0x5, %rdx
addq %rdx, %rax
movb %cl, 0x19(%rax)
addq $0x20, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
nop
// File: /workspace/github_c_makefile_star2_O0/jonof[P]jftekwar/jfbuild/src/startgtk_editor.c
// Function: startwin_open
int startwin_open(void)
{
    if (!gtkenabled) return 0;
    if (startwin) return 1;

    startwin = create_window();
    if (!startwin) {
        return -1;
    }

    quiteventonclose = TRUE;
    setup_messages_mode(TRUE);
    gtk_widget_show_all(GTK_WIDGET(startwin));
    return 0;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x10, %rsp
leaq 0x695699(%rip), %rax    # 0x6c2018
cmpl $0x0, (%rax)
jne 0x2c98d
movl $0x0, -0x4(%rbp)
jmp 0x2c9fe
cmpq $0x0, 0x18e1db(%rip)    # 0x1bab70
je 0x2c9a0
movl $0x1, -0x4(%rbp)
jmp 0x2c9fe
callq 0x2ca10
movq %rax, 0x18e1c4(%rip)    # 0x1bab70
cmpq $0x0, 0x18e1bc(%rip)    # 0x1bab70
jne 0x2c9bf
movl $0xffffffff, -0x4(%rbp) # imm = 0xFFFFFFFF
jmp 0x2c9fe
movl $0x1, 0x18e1af(%rip)    # 0x1bab78
movl $0x1, %edi
callq 0x2cda0
movq 0x18e196(%rip), %rax    # 0x1bab70
movq %rax, -0x10(%rbp)
callq 0x6bc0
movq -0x10(%rbp), %rdi
movq %rax, %rsi
callq 0x6130
movq %rax, %rdi
callq 0x6930
movl $0x0, -0x4(%rbp)
movl -0x4(%rbp), %eax
addq $0x10, %rsp
popq %rbp
retq
nopw (%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/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 %rbp
movq %rsp, %rbp
subq $0x20, %rsp
movl %edi, -0x4(%rbp)
movq 0x18ddde(%rip), %rax    # 0x1bab90
movq %rax, -0x18(%rbp)
callq 0x6a90
movq -0x18(%rbp), %rdi
movq %rax, %rsi
callq 0x6130
movq %rax, %rdi
movl $0x1, %esi
callq 0x6c50
movq 0x18ddbd(%rip), %rax    # 0x1bab98
movq %rax, -0x10(%rbp)
callq 0x67a0
movq -0x10(%rbp), %rdi
movq %rax, %rsi
callq 0x6130
movq %rax, %rdi
leaq 0xda6(%rip), %rsi       # 0x2dba0
xorl %eax, %eax
movl %eax, %edx
callq 0x67b0
movq 0x18dd96(%rip), %rdi    # 0x1baba0
xorl %esi, %esi
callq 0x6be0
movq 0x18dd70(%rip), %rdi    # 0x1bab88
movl -0x4(%rbp), %esi
callq 0x6be0
movq 0x18dd59(%rip), %rdi    # 0x1bab80
xorl %esi, %esi
callq 0x6be0
addq $0x20, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/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 %rbp
movq %rsp, %rbp
subq $0x10, %rsp
leaq 0x6951c9(%rip), %rax    # 0x6c2018
cmpl $0x0, (%rax)
jne 0x2ce5d
movl $0x0, -0x4(%rbp)
jmp 0x2cec1
cmpq $0x0, 0x18dd0b(%rip)    # 0x1bab70
jne 0x2ce70
movl $0x1, -0x4(%rbp)
jmp 0x2cec1
movl $0x0, 0x18dcfe(%rip)    # 0x1bab78
movq 0x18dcef(%rip), %rax    # 0x1bab70
movq %rax, -0x10(%rbp)
callq 0x6bc0
movq -0x10(%rbp), %rdi
movq %rax, %rsi
callq 0x6130
movq %rax, %rdi
callq 0x6170
movq $0x0, 0x18dcc7(%rip) # 0x1bab70
callq 0x69f0
cmpl $0x0, %eax
je 0x2ceba
callq 0x6040
jmp 0x2cea9
movl $0x0, -0x4(%rbp)
movl -0x4(%rbp), %eax
addq $0x10, %rsp
popq %rbp
retq
nopw (%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/jonof[P]jftekwar/jfbuild/src/startgtk_editor.c
// Function: startwin_settitle
int startwin_settitle(const char *title)
{
    if (!gtkenabled) return 0;

    if (startwin) {
        gtk_window_set_title(startwin, title);
    }

    return 0;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x10, %rsp
movq %rdi, -0x10(%rbp)
leaq 0x694f65(%rip), %rax    # 0x6c2018
cmpl $0x0, (%rax)
jne 0x2d0c1
movl $0x0, -0x4(%rbp)
jmp 0x2d0e2
cmpq $0x0, 0x18daa7(%rip)    # 0x1bab70
je 0x2d0db
movq 0x18da9e(%rip), %rdi    # 0x1bab70
movq -0x10(%rbp), %rsi
callq 0x6210
movl $0x0, -0x4(%rbp)
movl -0x4(%rbp), %eax
addq $0x10, %rsp
popq %rbp
retq
nopl (%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/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:
pushq %rbp
movq %rsp, %rbp
subq $0x10, %rsp
movq %rdi, -0x10(%rbp)
leaq 0x694f05(%rip), %rax    # 0x6c2018
cmpl $0x0, (%rax)
je 0x2d122
cmpq $0x0, 0x18da50(%rip)    # 0x1bab70
jne 0x2d12b
movl $0x0, -0x4(%rbp)
jmp 0x2d171
movq -0x10(%rbp), %rdi
callq 0x2d180
callq 0x2d1a0
movl $0x1, 0x18da95(%rip)    # 0x1babd8
cmpl $0x0, 0x18da8e(%rip)    # 0x1babd8
je 0x2d158
movl $0x1, %edi
callq 0x63b0
jmp 0x2d143
xorl %edi, %edi
callq 0x2cda0
xorl %eax, %eax
movl %eax, %edi
callq 0x2d180
movl 0xb327a(%rip), %eax     # 0xe03e8
movl %eax, -0x4(%rbp)
movl -0x4(%rbp), %eax
addq $0x10, %rsp
popq %rbp
retq
nopw (%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/jonof[P]jftekwar/jfbuild/src/startgtk_editor.c
// Function: setup_config_mode
static void setup_config_mode(void)
{
    gtk_notebook_set_current_page(GTK_NOTEBOOK(controls.tabs), TAB_CONFIG);

    // Enable all the controls on the Configuration page.
    gtk_container_foreach(GTK_CONTAINER(controls.configbox),
            foreach_gtk_widget_set_sensitive, (gpointer)TRUE);
    gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON(controls.alwaysshowcheck), settings->forcesetup);
    gtk_widget_set_sensitive(controls.alwaysshowcheck, TRUE);

    gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON(controls.fullscreencheck), settings->fullscreen);
    gtk_widget_set_sensitive(controls.fullscreencheck, TRUE);

    populate_video_modes(TRUE);
    gtk_widget_set_sensitive(controls.vmode3dcombo, TRUE);
    gtk_widget_set_sensitive(controls.vmode2dcombo, TRUE);

    gtk_widget_set_sensitive(controls.cancelbutton, TRUE);
    gtk_widget_set_sensitive(controls.startbutton, TRUE);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x20, %rsp
movq 0x18d9e1(%rip), %rax    # 0x1bab90
movq %rax, -0x20(%rbp)
callq 0x6a90
movq -0x20(%rbp), %rdi
movq %rax, %rsi
callq 0x6130
movq %rax, %rdi
xorl %esi, %esi
callq 0x6c50
movq 0x18d9c3(%rip), %rax    # 0x1bab98
movq %rax, -0x18(%rbp)
callq 0x67a0
movq -0x18(%rbp), %rdi
movq %rax, %rsi
callq 0x6130
movq %rax, %rdi
leaq 0x9ac(%rip), %rsi       # 0x2dba0
movl $0x1, %edx
callq 0x67b0
movq 0x18d99b(%rip), %rax    # 0x1baba0
movq %rax, -0x10(%rbp)
callq 0x6b40
movq -0x10(%rbp), %rdi
movq %rax, %rsi
callq 0x6130
movq %rax, %rdi
movq 0x18d9bc(%rip), %rax    # 0x1babe0
movl 0x18(%rax), %esi
callq 0x6c60
movq 0x18d96d(%rip), %rdi    # 0x1baba0
movl $0x1, %esi
callq 0x6be0
movq 0x18d98c(%rip), %rax    # 0x1babd0
movq %rax, -0x8(%rbp)
callq 0x6b40
movq -0x8(%rbp), %rdi
movq %rax, %rsi
callq 0x6130
movq %rax, %rdi
movq 0x18d97d(%rip), %rax    # 0x1babe0
movl (%rax), %esi
callq 0x6c60
movq 0x18d95f(%rip), %rdi    # 0x1babd0
movl $0x1, %esi
callq 0x6be0
movl $0x1, %edi
callq 0x2d630
movq 0x18d934(%rip), %rdi    # 0x1babc0
movl $0x1, %esi
callq 0x6be0
movq 0x18d913(%rip), %rdi    # 0x1babb0
movl $0x1, %esi
callq 0x6be0
movq 0x18d8da(%rip), %rdi    # 0x1bab88
movl $0x1, %esi
callq 0x6be0
movq 0x18d8c1(%rip), %rdi    # 0x1bab80
movl $0x1, %esi
callq 0x6be0
addq $0x20, %rsp
popq %rbp
retq
nop
// File: /workspace/github_c_makefile_star2_O0/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 %rbp
movq %rsp, %rbp
subq $0x30, %rsp
movq %rdi, -0x10(%rbp)
movq %rsi, -0x18(%rbp)
movq %rdx, -0x20(%rbp)
movq %rcx, -0x28(%rbp)
movq -0x10(%rbp), %rdi
movq -0x18(%rbp), %rsi
callq 0x6770
movq %rax, -0x30(%rbp)
cmpq $0x0, -0x30(%rbp)
jne 0x2d31c
movq -0x18(%rbp), %rsi
leaq 0x847c8(%rip), %rdi     # 0xb1ad3
movb $0x0, %al
callq 0x37c90
movq $0x0, -0x8(%rbp)
jmp 0x2d340
movq -0x30(%rbp), %rdi
movq -0x20(%rbp), %rsi
movq -0x28(%rbp), %rdx
xorl %eax, %eax
movl %eax, %r8d
xorl %r9d, %r9d
movq %r8, %rcx
callq 0x6200
movq -0x30(%rbp), %rax
movq %rax, -0x8(%rbp)
movq -0x8(%rbp), %rax
addq $0x30, %rsp
popq %rbp
retq
nopw (%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/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:
pushq %rbp
movq %rsp, %rbp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq %rdx, -0x18(%rbp)
movl $0x0, 0x18d86e(%rip)    # 0x1babd8
movl $0x0, 0xb3074(%rip)     # 0xe03e8
leaq 0x18d885(%rip), %rax    # 0x1bac00
movsbl (%rax), %ecx
movb $0x1, %al
cmpl $0x0, %ecx
movb %al, -0x19(%rbp)
jne 0x2d395
cmpl $0x0, 0x18d7e9(%rip)    # 0x1bab78
setne %al
movb %al, -0x19(%rbp)
movb -0x19(%rbp), %al
andb $0x1, %al
movzbl %al, %eax
movb %al, %cl
leaq 0x18d85a(%rip), %rax    # 0x1bac00
movb %cl, (%rax)
movl $0x1, %eax
popq %rbp
retq
nop
// File: /workspace/github_c_makefile_star2_O0/jonof[P]jftekwar/jfbuild/src/startgtk_editor.c
// Function: on_cancelbutton_clicked
static void on_cancelbutton_clicked(GtkButton *button, gpointer user_data)
{
    (void)button; (void)user_data;

    startwinloop = FALSE;   // Break the loop.
    retval = STARTWIN_CANCEL;
    quitevent = quitevent || quiteventonclose;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movl $0x0, 0x18d612(%rip)    # 0x1babd8
movl $0x0, 0xb2e18(%rip)     # 0xe03e8
leaq 0x18d629(%rip), %rax    # 0x1bac00
movsbl (%rax), %ecx
movb $0x1, %al
cmpl $0x0, %ecx
movb %al, -0x11(%rbp)
jne 0x2d5f1
cmpl $0x0, 0x18d58d(%rip)    # 0x1bab78
setne %al
movb %al, -0x11(%rbp)
movb -0x11(%rbp), %al
andb $0x1, %al
movzbl %al, %eax
movb %al, %cl
leaq 0x18d5fe(%rip), %rax    # 0x1bac00
movb %cl, (%rax)
popq %rbp
retq
nopw %cs:(%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/jonof[P]jftekwar/jfbuild/src/baselayer.c
// Function: bgetchar
unsigned char bgetchar(void)
{
	unsigned char c;
	if (keyasciififoplc == keyasciififoend) return 0;
	c = keyasciififo[keyasciififoplc];
	keyasciififoplc = ((keyasciififoplc+1)&(KEYFIFOSIZ-1));
	return c;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
movl 0x18cdd2(%rip), %eax    # 0x1bac4c
cmpl 0x18cdd0(%rip), %eax    # 0x1bac50
jne 0x2de88
movb $0x0, -0x1(%rbp)
jmp 0x2deb4
movslq 0x18cdbd(%rip), %rcx    # 0x1bac4c
leaq 0x18cdca(%rip), %rax    # 0x1bac60
movb (%rax,%rcx), %al
movb %al, -0x2(%rbp)
movl 0x18cdaa(%rip), %eax    # 0x1bac4c
addl $0x1, %eax
andl $0x3f, %eax
movl %eax, 0x18cd9e(%rip)    # 0x1bac4c
movb -0x2(%rbp), %al
movb %al, -0x1(%rbp)
movb -0x1(%rbp), %al
popq %rbp
retq
nopl (%rax)
// File: /workspace/github_c_makefile_star2_O0/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:
pushq %rbp
movq %rsp, %rbp
movl 0x18cd96(%rip), %eax    # 0x1baca0
cmpl 0x18cd94(%rip), %eax    # 0x1baca4
jne 0x2df1b
movl $0x0, -0x4(%rbp)
jmp 0x2df6b
movslq 0x18cd7e(%rip), %rcx    # 0x1baca0
leaq 0x18cd87(%rip), %rax    # 0x1bacb0
movl (%rax,%rcx,4), %eax
movl %eax, -0x8(%rbp)
movl 0x18cd6b(%rip), %eax    # 0x1baca0
addl $0x1, %eax
andl $0x3f, %eax
movslq %eax, %rcx
leaq 0x18cd6b(%rip), %rax    # 0x1bacb0
cmpl $0x0, (%rax,%rcx,4)
jne 0x2df53
xorl %eax, %eax
subl -0x8(%rbp), %eax
movl %eax, -0x8(%rbp)
movl 0x18cd47(%rip), %eax    # 0x1baca0
addl $0x2, %eax
andl $0x3f, %eax
movl %eax, 0x18cd3b(%rip)    # 0x1baca0
movl -0x8(%rbp), %eax
movl %eax, -0x4(%rbp)
movl -0x4(%rbp), %eax
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O0/jonof[P]jftekwar/jfbuild/src/baselayer.c
// Function: baselayer_init
int baselayer_init(void)
{
    OSD_Init();

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

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

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

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

	return 0;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
callq 0x6c230
leaq 0x83b78(%rip), %rdi     # 0xb1b38
leaq 0x83b85(%rip), %rsi     # 0xb1b4c
leaq 0x92(%rip), %rdx        # 0x2e060
callq 0x6c300
leaq 0x83bbe(%rip), %rdi     # 0xb1b98
leaq 0x83bc1(%rip), %rsi     # 0xb1ba2
leaq 0x78(%rip), %rdx        # 0x2e060
callq 0x6c300
leaq 0x83bf4(%rip), %rdi     # 0xb1be8
leaq 0x83bf7(%rip), %rsi     # 0xb1bf2
leaq 0x5e(%rip), %rdx        # 0x2e060
callq 0x6c300
leaq 0x83082(%rip), %rdi     # 0xb1090
leaq 0x83c19(%rip), %rsi     # 0xb1c2e
leaq 0x44(%rip), %rdx        # 0x2e060
callq 0x6c300
leaq 0x83c5c(%rip), %rdi     # 0xb1c84
leaq 0x83c62(%rip), %rsi     # 0xb1c91
leaq 0x32a(%rip), %rdx       # 0x2e360
callq 0x6c300
leaq 0x83c95(%rip), %rdi     # 0xb1cd7
leaq 0x83c9c(%rip), %rsi     # 0xb1ce5
leaq 0x520(%rip), %rdx       # 0x2e570
callq 0x6c300
xorl %eax, %eax
popq %rbp
retq
nopl (%rax)
// File: /workspace/github_c_makefile_star2_O0/jonof[P]jftekwar/jfbuild/src/baselayer.c
// Function: osdfunc_setrendermode
static int osdfunc_setrendermode(const osdfuncparm_t *parm)
{
	int m;
	char *p;

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

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

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

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

	return OSDCMD_OK;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x40, %rsp
movq %rdi, -0x10(%rbp)
movq 0xa058d(%rip), %rax     # 0xceb10
movq %rax, -0x40(%rbp)
movq 0xa058a(%rip), %rax     # 0xceb18
movq %rax, -0x38(%rbp)
movq 0xa0587(%rip), %rax     # 0xceb20
movq %rax, -0x30(%rbp)
movq 0xa0584(%rip), %rax     # 0xceb28
movq %rax, -0x28(%rbp)
movq -0x10(%rbp), %rax
cmpl $0x1, (%rax)
je 0x2e5ba
movl $0x1, -0x4(%rbp)
jmp 0x2e620
movq -0x10(%rbp), %rax
movq 0x10(%rax), %rax
movq (%rax), %rdi
leaq -0x20(%rbp), %rsi
movl $0xa, %edx
callq 0x68a0
movl %eax, -0x14(%rbp)
cmpl $0x0, -0x14(%rbp)
jl 0x2e5ee
cmpl $0x3, -0x14(%rbp)
jg 0x2e5ee
movq -0x20(%rbp), %rax
movsbl (%rax), %eax
cmpl $0x0, %eax
je 0x2e5f7
movl $0x1, -0x4(%rbp)
jmp 0x2e620
movl -0x14(%rbp), %edi
callq 0x5a760
callq 0x5a7b0
cltq
movq -0x40(%rbp,%rax,8), %rsi
leaq 0x838a5(%rip), %rdi     # 0xb1eb7
movb $0x0, %al
callq 0x37c90
movl $0x0, -0x4(%rbp)
movl -0x4(%rbp), %eax
addq $0x40, %rsp
popq %rbp
retq
nopl (%rax)
// File: /workspace/github_c_makefile_star2_O0/jonof[P]jftekwar/jfbuild/src/cache1d.c
// Function: initcache
void initcache(void *dacachestart, size_t dacachesize)
{
	int i;

	for(i=1;i<200;i++) lockrecip[i] = (1<<28)/(200-i);

	cachestart = ((intptr_t)dacachestart + 15) & ~15;
	cachesize = (dacachesize - ((-(intptr_t)dacachestart) & 15)) & ~15;

	cac[0].leng = cachesize;
	cac[0].lock = &zerochar;
	cacnum = 1;

	buildprintf("initcache(): Initialised with %zu bytes\n", cachesize);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x20, %rsp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movl $0x1, -0x14(%rbp)
cmpl $0xc8, -0x14(%rbp)
jge 0x2e67b
movl $0xc8, %ecx
subl -0x14(%rbp), %ecx
movl $0x10000000, %eax       # imm = 0x10000000
cltd
idivl %ecx
movl %eax, %edx
movslq -0x14(%rbp), %rcx
leaq 0x18c8c3(%rip), %rax    # 0x1baf30
movl %edx, (%rax,%rcx,4)
movl -0x14(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x14(%rbp)
jmp 0x2e647
movq -0x8(%rbp), %rax
addq $0xf, %rax
andq $-0x10, %rax
movq %rax, 0x18c88a(%rip)    # 0x1baf18
movq -0x10(%rbp), %rax
movq -0x8(%rbp), %rdx
xorl %ecx, %ecx
subq %rdx, %rcx
andq $0xf, %rcx
subq %rcx, %rax
andq $-0x10, %rax
movq %rax, 0x18cba3(%rip)    # 0x1bb250
movq 0x18cb9c(%rip), %rax    # 0x1bb250
movq %rax, 0x18cbad(%rip)    # 0x1bb268
leaq 0x18c852(%rip), %rax    # 0x1baf14
movq %rax, 0x18cba7(%rip)    # 0x1bb270
movl $0x1, 0x18c84d(%rip)    # 0x1baf20
movq 0x18cb76(%rip), %rsi    # 0x1bb250
leaq 0x837f6(%rip), %rdi     # 0xb1ed7
movb $0x0, %al
callq 0x37c90
addq $0x20, %rsp
popq %rbp
retq
nop