LLM4Binary/decompile-bench-makefile huggingface dataset:
// File: /workspace/github_c_makefile_star2_O2/jonof[P]jftekwar/jfbuild/src/build.c
// Function: osdcmd_showspriteextents
static int osdcmd_showspriteextents(const osdfuncparm_t *parm)
{
	int newval;

	if (parm->numparms != 1) {
		buildprintf("showspriteextents is %d\n", showspriteextents);
		return OSDCMD_OK;
	}
	newval = atoi(parm->parms[0]);
	if (newval < 0 || newval > 2) {
		return OSDCMD_SHOWHELP;
	}

	buildprintf("showspriteextents is now %d (was %d)\n", newval, showspriteextents);
	showspriteextents = newval;
	return OSDCMD_OK;
}

// Assembly:
pushq %rbp
pushq %rbx
pushq %rax
cmpl $0x1, (%rdi)
jne 0xaaca
movq 0x10(%rdi), %rax
movq (%rax), %rdi
callq 0x6310
cmpl $0x2, %eax
jbe 0xaae3
pushq $0x1
popq %rbx
jmp 0xab05
movswl 0x11be57(%rip), %esi    # 0x126928
leaq 0x5f49b(%rip), %rdi     # 0x69f73
xorl %ebx, %ebx
xorl %eax, %eax
callq 0x22427
jmp 0xab05
movl %eax, %ebp
movswl 0x11be3c(%rip), %edx    # 0x126928
leaq 0x5f499(%rip), %rdi     # 0x69f8c
xorl %ebx, %ebx
movl %eax, %esi
xorl %eax, %eax
callq 0x22427
movw %bp, 0x11be23(%rip)     # 0x126928
movl %ebx, %eax
addq $0x8, %rsp
popq %rbx
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O2/jonof[P]jftekwar/jfbuild/src/build.c
// Function: updatenumsprites
void updatenumsprites(void)
{
	int i;

	numsprites = 0;
	for(i=0;i<MAXSPRITES;i++)
		if (sprite[i].statnum < MAXSTATUS)
			numsprites++;
}

// Assembly:
andl $0x0, 0x161239(%rip)    # 0x1731cc
xorl %eax, %eax
pushq $0x1a
popq %rcx
leaq 0x263d11(%rip), %rdx    # 0x275cb0
cmpq $0xb001a, %rcx          # imm = 0xB001A
je 0x11fbe
cmpw $0x3ff, (%rdx,%rcx)     # imm = 0x3FF
jg 0x11fb8
incl %eax
movl %eax, 0x161214(%rip)    # 0x1731cc
addq $0x2c, %rcx
jmp 0x11f9f
retq
// File: /workspace/github_c_makefile_star2_O2/jonof[P]jftekwar/jfbuild/src/build.c
// Function: printmessage256
void printmessage256(char *name)
{
	char snotbuf[40];
	int i;

	i = 0;
	while ((name[i] != 0) && (i < 38))
	{
		snotbuf[i] = name[i];
		i++;
	}
	while (i < 38)
	{
		snotbuf[i] = 32;
		i++;
	}
	snotbuf[38] = 0;

	printext256(0L,0L,whitecol,blackcol,snotbuf,0);
}

// Assembly:
subq $0x28, %rsp
xorl %eax, %eax
cmpq $0x25, %rax
ja 0x11fe1
movb (%rdi,%rax), %cl
testb %cl, %cl
je 0x11fe1
movb %cl, (%rsp,%rax)
incq %rax
jmp 0x11fc5
movb $0x20, (%rsp,%rax)
incq %rax
cmpq $0x26, %rax
jne 0x11fda
movq %rsp, %r8
movb $0x0, 0x26(%r8)
movswl 0x114d52(%rip), %edx    # 0x126d48
movswl 0x114d4f(%rip), %ecx    # 0x126d4c
xorl %edi, %edi
xorl %esi, %esi
xorl %r9d, %r9d
callq 0x39aab
addq $0x28, %rsp
retq
// File: /workspace/github_c_makefile_star2_O2/jonof[P]jftekwar/jfbuild/src/build.c
// Function: fixspritesectors
void fixspritesectors(void)
{
	int i, j, dax, day, daz;

	for(i=numsectors-1;i>=0;i--)
		if ((sector[i].wallnum <= 0) || (sector[i].wallptr >= numwalls))
			deletesector((short)i);

	for(i=0;i<MAXSPRITES;i++)
		if (sprite[i].statnum < MAXSTATUS)
		{
			dax = sprite[i].x;
			day = sprite[i].y;
			if (inside(dax,day,sprite[i].sectnum) != 1)
			{
				daz = ((tilesizy[sprite[i].picnum]*sprite[i].yrepeat)<<2);

				for(j=0;j<numsectors;j++)
					if (inside(dax,day,(short)j) == 1)
						if (sprite[i].z >= getceilzofslope(j,dax,day))
							if (sprite[i].z-daz <= getflorzofslope(j,dax,day))
							{
								changespritesect((short)i,(short)j);
								break;
							}
			}
		}
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
leaq 0x3b6f24(%rip), %rax    # 0x3c8f60
movswq (%rax), %rbx
movl %ebx, %r14d
decl %ebx
leaq 0x22aa14(%rip), %r15    # 0x23ca60
leaq 0x3fdc15(%rip), %r12    # 0x40fc68
testl %r14d, %r14d
jle 0x12084
decq %r14
movl %r14d, %eax
imulq $0x28, %rax, %rax
cmpw $0x0, 0x2(%r15,%rax)
jle 0x12078
addq %r15, %rax
movzwl (%rax), %eax
cmpw (%r12), %ax
jl 0x12080
movswl %bx, %edi
callq 0x1a17a
decl %ebx
jmp 0x12053
xorl %eax, %eax
cmpq $0x4000, %rax           # imm = 0x4000
je 0x1215d
movq %rax, (%rsp)
imulq $0x2c, %rax, %r13
leaq 0x263c0f(%rip), %rax    # 0x275cb0
cmpw $0x3ff, 0x1a(%rax,%r13) # imm = 0x3FF
jg 0x120cd
addq 0x79f06(%rip), %r13     # 0x8bfb8
movl (%r13), %ebx
movl 0x4(%r13), %ebp
movswl 0x18(%r13), %edx
movl %ebx, %edi
movl %ebp, %esi
callq 0x330c8
cmpl $0x1, %eax
jne 0x120d6
movq (%rsp), %rax
incq %rax
jmp 0x12086
movswq 0xe(%r13), %rax
leaq 0x3e86fe(%rip), %rcx    # 0x3fa7e0
movswl (%rcx,%rax,2), %eax
movzbl 0x15(%r13), %r12d
imull %eax, %r12d
shll $0x2, %r12d
xorl %r14d, %r14d
leaq 0x3b6e63(%rip), %rax    # 0x3c8f60
movswl (%rax), %eax
cmpl %eax, %r14d
jge 0x120cd
movswl %r14w, %edx
movl %ebx, %edi
movl %ebp, %esi
callq 0x330c8
cmpl $0x1, %eax
jne 0x12146
movl 0x8(%r13), %r15d
movswl %r14w, %edi
movl %ebx, %esi
movl %ebp, %edx
callq 0x371c4
cmpl %eax, %r15d
jl 0x12146
movl 0x8(%r13), %r15d
subl %r12d, %r15d
movswl %r14w, %edi
movl %ebx, %esi
movl %ebp, %edx
callq 0x370fb
cmpl %eax, %r15d
jle 0x1214b
incl %r14d
jmp 0x120f6
movswl %r14w, %esi
movswl (%rsp), %edi
callq 0x332e1
jmp 0x120cd
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O2/jonof[P]jftekwar/jfbuild/src/build.c
// Function: clearfilenames
void clearfilenames(void)
{
	klistfree(finddirs);
	klistfree(findfiles);
	finddirs = findfiles = NULL;
	numfiles = numdirs = 0;
}

// Assembly:
pushq %rax
movq 0x16145c(%rip), %rdi    # 0x1735d0
callq 0x1e325
movq 0x161458(%rip), %rdi    # 0x1735d8
callq 0x1e325
andq $0x0, 0x16144b(%rip)    # 0x1735d8
andq $0x0, 0x16143b(%rip)    # 0x1735d0
andl $0x0, 0x161444(%rip)    # 0x1735e0
andl $0x0, 0x161441(%rip)    # 0x1735e4
popq %rax
retq
// File: /workspace/github_c_makefile_star2_O2/jonof[P]jftekwar/jfbuild/src/build.c
// Function: showmouse
void showmouse(void)
{
	drawline256((searchx+1)<<12, (searchy  )<<12, (searchx+5)<<12, (searchy  )<<12, whitecol);
	drawline256((searchx  )<<12, (searchy+1)<<12, (searchx  )<<12, (searchy+5)<<12, whitecol);
	drawline256((searchx-1)<<12, (searchy  )<<12, (searchx-5)<<12, (searchy  )<<12, whitecol);
	drawline256((searchx  )<<12, (searchy-1)<<12, (searchx  )<<12, (searchy-5)<<12, whitecol);
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %rbx
pushq %rax
leaq 0x8ba8d(%rip), %r14     # 0x9dc40
movl (%r14), %edx
shll $0xc, %edx
movl $0x1000, %ebx           # imm = 0x1000
leal (%rdx,%rbx), %edi
leaq 0x3ffca0(%rip), %r15    # 0x411e68
movl (%r15), %ecx
shll $0xc, %ecx
movl $0x5000, %ebp           # imm = 0x5000
addl %ebp, %edx
movzbl 0x114b6b(%rip), %r8d    # 0x126d48
movl %ecx, %esi
callq 0x3973b
movl (%r14), %edi
shll $0xc, %edi
movl (%r15), %ecx
shll $0xc, %ecx
addl %ecx, %ebx
addl %ebp, %ecx
movzbl 0x114b4c(%rip), %r8d    # 0x126d48
movl %ebx, %esi
movl %edi, %edx
callq 0x3973b
movl (%r14), %edx
shll $0xc, %edx
movl $0xfffff000, %ebx       # imm = 0xFFFFF000
leal (%rdx,%rbx), %edi
movl (%r15), %ecx
shll $0xc, %ecx
movl $0xffffb000, %ebp       # imm = 0xFFFFB000
addl %ebp, %edx
movzbl 0x114b20(%rip), %r8d    # 0x126d48
movl %ecx, %esi
callq 0x3973b
movl (%r14), %edi
shll $0xc, %edi
movl (%r15), %ecx
shll $0xc, %ecx
addl %ecx, %ebx
addl %ebp, %ecx
movzbl 0x114b01(%rip), %r8d    # 0x126d48
movl %ebx, %esi
movl %edi, %edx
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
jmp 0x3973b
// File: /workspace/github_c_makefile_star2_O2/jonof[P]jftekwar/jfbuild/src/build.c
// Function: setoverheadviewport16
void setoverheadviewport16(void)
{
	bakydim16 = ydim16;
	bakytop16 = ytop16;
	ydim16 = yres - STATUS2DSIZ;
	ytop16 = 0;
}

// Assembly:
movl 0x114b08(%rip), %eax    # 0x126d68
movl %eax, 0x8adaa(%rip)     # 0x9d010
movl 0x114b00(%rip), %eax    # 0x126d6c
movl %eax, 0x8ada2(%rip)     # 0x9d014
leaq 0x8adbb(%rip), %rax     # 0x9d034
movl $0xffffff70, %ecx       # imm = 0xFFFFFF70
addl (%rax), %ecx
movl %ecx, 0x114ae2(%rip)    # 0x126d68
andl $0x0, 0x114adf(%rip)    # 0x126d6c
retq
// File: /workspace/github_c_makefile_star2_O2/jonof[P]jftekwar/jfbuild/src/build.c
// Function: setstatusbarviewport16
void setstatusbarviewport16(void)
{
	bakydim16 = ydim16;
	bakytop16 = ytop16;
	ydim16 = STATUS2DSIZ;
	ytop16 = yres - STATUS2DSIZ;
}

// Assembly:
movl 0x114ad4(%rip), %eax    # 0x126d68
movl %eax, 0x8ad76(%rip)     # 0x9d010
movl 0x114acc(%rip), %eax    # 0x126d6c
movl %eax, 0x8ad6e(%rip)     # 0x9d014
movl $0x90, 0x114ab8(%rip)   # 0x126d68
leaq 0x8ad7d(%rip), %rax     # 0x9d034
movl $0xffffff70, %ecx       # imm = 0xFFFFFF70
addl (%rax), %ecx
movl %ecx, 0x114aa8(%rip)    # 0x126d6c
retq
// File: /workspace/github_c_makefile_star2_O2/jonof[P]jftekwar/jfbuild/src/build.c
// Function: restoreviewport16
void restoreviewport16(void)
{
	if (bakytop16 < 0) {
		debugprintf("restoreviewport16: no viewport saved\n");
		return;
	}
	ydim16 = bakydim16;
	ytop16 = bakytop16;
	bakytop16 = bakydim16 = -1;
}

// Assembly:
movl 0x8ad49(%rip), %eax     # 0x9d014
testl %eax, %eax
js 0x122f0
movl 0x8ad3b(%rip), %ecx     # 0x9d010
movl %ecx, 0x114a8d(%rip)    # 0x126d68
orl $-0x1, 0x8ad2e(%rip)    # 0x9d010
movl %eax, 0x114a84(%rip)    # 0x126d6c
orl $-0x1, 0x8ad25(%rip)    # 0x9d014
retq
leaq 0x571c9(%rip), %rdi     # 0x694c0
xorl %eax, %eax
jmp 0x62903
// File: /workspace/github_c_makefile_star2_O2/jonof[P]jftekwar/jfbuild/src/build.c
// Function: fixrepeats
void fixrepeats(short i)
{
	int dax, day, dist;

	dax = wall[wall[i].point2].x-wall[i].x;
	day = wall[wall[i].point2].y-wall[i].y;
	dist = ksqrt(dax*dax+day*day);
	dax = wall[i].xrepeat; day = wall[i].yrepeat;
	wall[i].xrepeat = (unsigned char)min(max(mulscale10(dist,day),1),255);
}

// Assembly:
pushq %r14
pushq %rbx
pushq %rax
movslq %edi, %rbx
shlq $0x5, %rbx
leaq 0x19b6f6(%rip), %r14    # 0x1b1a50
movswq 0x8(%r14,%rbx), %rax
shlq $0x5, %rax
movl (%r14,%rax), %ecx
movl 0x4(%r14,%rax), %edi
subl (%r14,%rbx), %ecx
subl 0x4(%r14,%rbx), %edi
imull %ecx, %ecx
imull %edi, %edi
addl %ecx, %edi
callq 0x3326c
movzbl 0x17(%r14,%rbx), %ecx
cltq
imulq %rcx, %rax
shrq $0xa, %rax
movl $0xff, %ecx
cmpl %ecx, %eax
cmovbl %eax, %ecx
cmpl $0x2, %eax
pushq $0x1
popq %rax
cmovgel %ecx, %eax
movb %al, 0x16(%r14,%rbx)
addq $0x8, %rsp
popq %rbx
popq %r14
retq
// File: /workspace/github_c_makefile_star2_O2/jonof[P]jftekwar/jfbuild/src/build.c
// Function: changechar
unsigned char changechar(unsigned char dachar, int dadir, unsigned char smooshyalign, unsigned char boundcheck)
{
	if (dadir < 0)
	{
		if ((dachar > 0) || (boundcheck == 0))
		{
			dachar--;
			if (smooshyalign > 0)
				dachar = (dachar&0xf8);
		}
	}
	else if (dadir > 0)
	{
		if ((dachar < 255) || (boundcheck == 0))
		{
			dachar++;
			if (smooshyalign > 0)
			{
				if (dachar >= 256-8) dachar = 255;
				else dachar = ((dachar+7)&0xf8);
			}
		}
	}
	return(dachar);
}

// Assembly:
testl %esi, %esi
js 0x16aa0
je 0x16a9d
cmpb $-0x1, %dil
sete %sil
testb %cl, %cl
setne %cl
movb $-0x1, %al
testb %cl, %sil
jne 0x16a9f
leal 0x1(%rdi), %ecx
testb %dl, %dl
je 0x16ac7
cmpb $-0x9, %cl
ja 0x16a9f
andb $-0x8, %dil
addb $0x8, %dil
movl %edi, %eax
retq
testb %dil, %dil
sete %al
testb %cl, %cl
setne %cl
testb %cl, %al
jne 0x16ac4
decb %dil
movzbl %dil, %ecx
andb $-0x8, %dil
testb %dl, %dl
movzbl %dil, %eax
cmovel %ecx, %eax
retq
xorl %eax, %eax
retq
movl %ecx, %eax
retq
// File: /workspace/github_c_makefile_star2_O2/jonof[P]jftekwar/jfbuild/src/build.c
// Function: getnumber256
short getnumber256(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;
		}

		drawrooms(posx,posy,posz,ang,horiz,cursectnum);
		ExtAnalyzeSprites();
		drawmasks();

		ch = bgetchar();

		snprintf(buffer, sizeof(buffer), "%s%d_ ",namestart,danum);
		printmessage256(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();

	lockclock = totalclock;  //Reset timing

	return((short)oldnum);
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x68, %rsp
movl %ecx, %ebp
movl %edx, 0xc(%rsp)
movl %esi, %r14d
movq %rdi, %r15
callq 0x1cac9
leaq 0x16041d(%rip), %rbx    # 0x1770a0
leaq 0x10(%rsp), %r13
movl %r14d, 0x8(%rsp)
leaq 0x1605fc(%rip), %rax    # 0x177290
cmpb $0x0, 0x1(%rax)
jne 0x16d85
callq 0x63a71
testl %eax, %eax
je 0x16caf
cmpb $0x0, (%rbx)
je 0x16caf
movb $0x0, (%rbx)
movl 0x11009b(%rip), %edi    # 0x126d50
movl 0x110099(%rip), %esi    # 0x126d54
movl 0x110097(%rip), %edx    # 0x126d58
movswl 0x110094(%rip), %ecx    # 0x126d5c
movl 0x86301(%rip), %r8d     # 0x9cfd0
movswl 0x110087(%rip), %r9d    # 0x126d5e
callq 0x22e95
callq 0x9fd7
callq 0x2639d
callq 0x1ca8f
movl %eax, %r12d
movq %r13, %rdi
pushq $0x50
popq %rsi
leaq 0x52d4f(%rip), %rdx     # 0x69a4a
movq %r15, %rcx
movl %r14d, %r8d
xorl %eax, %eax
callq 0x64f0
movq %r13, %rdi
callq 0x11fbf
callq 0x63720
leal -0x30(%r12), %ecx
movzbl %r12b, %eax
cmpb $0x9, %cl
ja 0x16d4b
imull $0xa, %r14d, %ecx
leal (%rcx,%rax), %edx
addl $-0x30, %edx
subl %eax, %ecx
addl $0x30, %ecx
testl %r14d, %r14d
cmovnsl %edx, %ecx
testb %bpl, %bpl
cmovel %edx, %ecx
cmpl 0xc(%rsp), %ecx
cmovll %ecx, %r14d
jmp 0x16c8d
cmpb $0x8, %r12b
je 0x16d74
cmpl $0x7f, %eax
je 0x16d74
cmpl $0xd, %eax
je 0x16dbe
movl %r14d, %eax
negl %eax
cmpb $0x2d, %r12b
cmovnel %r14d, %eax
testb %bpl, %bpl
cmovnel %eax, %r14d
jmp 0x16c8d
movl %r14d, %eax
cltd
pushq $0xa
popq %rcx
idivl %ecx
movl %eax, %r14d
jmp 0x16c8d
movl 0x8(%rsp), %r14d
leaq 0x1604ff(%rip), %rdi    # 0x177290
movl $0x100, %edx            # imm = 0x100
xorl %esi, %esi
callq 0x62f0
leaq 0x38e744(%rip), %rax    # 0x3a54e8
movl (%rax), %eax
movl %eax, 0x10ffb4(%rip)    # 0x126d60
movl %r14d, %eax
addq $0x68, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movw $0x1, 0x10fb5f(%rip)    # 0x126926
jmp 0x16d8a
// File: /workspace/github_c_makefile_star2_O2/jonof[P]jftekwar/jfbuild/src/build.c
// Function: qsetmodeany
void qsetmodeany(int daxdim, int daydim)
{
	if (daxdim < 640) daxdim = 640;
	if (daydim < 480) daydim = 480;

	if (qsetmode != ((daxdim<<16)|(daydim&0xffff))) {
		if (setvideomode(daxdim, daydim, 8, fullscreen) < 0)
			return;
		setbrightness(0,NULL,4);

		xdim = xres;
		ydim = yres;
		pixelaspect = 65536;

		setvgapalette();

		setoverheadviewport16();
		bakydim16 = -1; bakytop16 = -1;
		halfxdim16 = xres >> 1;
		midydim16 = scale(200,yres,480);

		clearbuf((void *)(frameplace + (ydim16*bytesperline)), (bytesperline*STATUS2DSIZ) >> 2, 0x08080808l);
		clearbuf((void *)frameplace, (ydim16*bytesperline) >> 2, 0L);
	}

	qsetmode = ((daxdim<<16)|(daydim&0xffff));
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %rbx
pushq %rax
movl %esi, %eax
movl %edi, %ecx
cmpl $0x281, %edi            # imm = 0x281
movl $0x280, %edi            # imm = 0x280
cmovgel %ecx, %edi
cmpl $0x1e1, %esi            # imm = 0x1E1
movl $0x1e0, %esi            # imm = 0x1E0
cmovgel %eax, %esi
leaq 0x19a7a6(%rip), %rbx    # 0x1b1a28
movl %edi, %eax
shll $0x10, %eax
movzwl %si, %ebp
orl %eax, %ebp
cmpl %ebp, (%rbx)
je 0x17372
leaq 0x15fe0d(%rip), %rax    # 0x1770a8
movl (%rax), %ecx
pushq $0x8
popq %rdx
callq 0x63081
testl %eax, %eax
js 0x17374
pushq $0x4
popq %rdx
xorl %edi, %edi
xorl %esi, %esi
callq 0x31279
leaq 0x85d70(%rip), %r14     # 0x9d030
movl (%r14), %eax
leaq 0x3e9d22(%rip), %rcx    # 0x400fec
movl %eax, (%rcx)
leaq 0x85d61(%rip), %r15     # 0x9d034
movl (%r15), %eax
leaq 0x3e9d13(%rip), %rcx    # 0x400ff0
movl %eax, (%rcx)
leaq 0x3f8992(%rip), %rax    # 0x40fc78
movl $0x10000, (%rax)        # imm = 0x10000
callq 0x38878
callq 0x1225a
orl $-0x1, 0x85d13(%rip)    # 0x9d010
orl $-0x1, 0x85d10(%rip)    # 0x9d014
movl (%r14), %eax
sarl %eax
movl %eax, 0x15beb5(%rip)    # 0x1731c4
movslq (%r15), %rax
imulq $0xc8, %rax, %rax
movl $0x1e0, %ecx            # imm = 0x1E0
cqto
idivq %rcx
movl %eax, 0x15be9f(%rip)    # 0x1731c8
leaq 0x15fd80(%rip), %r14    # 0x1770b0
movslq 0x10fa31(%rip), %rdi    # 0x126d68
leaq 0x15ff46(%rip), %r15    # 0x177284
movslq (%r15), %rax
imulq %rax, %rdi
addq (%r14), %rdi
imull $0x90, %eax, %esi
sarl $0x2, %esi
movl $0x8080808, %edx        # imm = 0x8080808
callq 0x444af
movq (%r14), %rdi
movl (%r15), %esi
imull 0x10fa00(%rip), %esi    # 0x126d68
sarl $0x2, %esi
xorl %edx, %edx
callq 0x444af
movl %ebp, (%rbx)
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O2/jonof[P]jftekwar/jfbuild/src/build.c
// Function: printext16
void printext16(int xpos, int ypos, short col, short backcol, const char *name, char fontsize)
{
	int stx, i, x, y;
	const unsigned char *letptr;
	unsigned char *ptr;
	const struct textfontspec *f;

	f = &textfonts[min((unsigned)fontsize, 2)];
	stx = xpos;

	for(i=0;name[i];i++)
	{
		letptr = &f->font[((int)(unsigned char)name[i])*f->cellh + f->cellyoff];
		ptr = (unsigned char *)(bytesperline*(ytop16+ypos+f->charysiz-1)+stx+frameplace);
		for(y=f->charysiz-1;y>=0;y--)
		{
			for(x=f->charxsiz-1;x>=0;x--)
			{
				if (letptr[y]&pow2char[7-x-f->cellxoff])
					ptr[x] = (unsigned char)col;
				else if (backcol >= 0)
					ptr[x] = (unsigned char)backcol;
			}
			ptr -= bytesperline;
		}
		stx += f->charxsiz;
	}
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
movq %r8, -0x10(%rsp)
cmpb $0x2, %r9b
movl $0x2, %eax
cmovbl %r9d, %eax
movzbl %al, %eax
shll $0x5, %eax
addq 0x748ef(%rip), %rax     # 0x8bfd8
decl %esi
movl %esi, -0x18(%rsp)
xorl %r11d, %r11d
leaq 0x15fb8b(%rip), %r10    # 0x177284
leaq 0x860a0(%rip), %r14     # 0x9d7a0
movq -0x10(%rsp), %rsi
movzbl (%rsi,%r11), %r8d
testq %r8, %r8
je 0x177c8
movq %r11, -0x8(%rsp)
movslq 0x10(%rax), %r9
imulq %r8, %r9
movslq 0x18(%rax), %r12
addq %r9, %r12
addq (%rax), %r12
movl 0x8(%rax), %r9d
movl 0xc(%rax), %r13d
movl 0x10f633(%rip), %r8d    # 0x126d6c
addl -0x18(%rsp), %r8d
addl %r13d, %r8d
imull (%r10), %r8d
movl %edi, -0x14(%rsp)
addl %edi, %r8d
movslq %r8d, %rbp
leaq 0x15f95a(%rip), %rsi    # 0x1770b0
addq (%rsi), %rbp
movl $0x8, %r11d
subl %r9d, %r11d
testl %r13d, %r13d
jle 0x177b3
decq %r13
movl %r11d, %ebx
movq %r9, %r15
testl %r15d, %r15d
jle 0x177ab
testw %cx, %cx
setns %sil
movl %ebx, %r8d
subl 0x14(%rax), %r8d
movslq %r8d, %r8
movb (%r14,%r8), %r8b
andb (%r12,%r13), %r8b
setne %dil
orb %sil, %dil
je 0x177a4
testb %r8b, %r8b
movl %ecx, %esi
cmovnel %edx, %esi
movb %sil, -0x1(%rbp,%r15)
incl %ebx
decq %r15
jmp 0x17770
movslq (%r10), %rsi
subq %rsi, %rbp
jmp 0x17762
addl -0x14(%rsp), %r9d
movq -0x8(%rsp), %r11
incq %r11
movl %r9d, %edi
jmp 0x17700
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O2/jonof[P]jftekwar/jfbuild/src/build.c
// Function: printmessage16
void printmessage16(char *name)
{
	char snotbuf[60];
	int i;

	i = 0;
	while ((name[i] != 0) && (i < 54))
	{
		snotbuf[i] = name[i];
		i++;
	}
	while (i < 54)
	{
		snotbuf[i] = 32;
		i++;
	}
	snotbuf[54] = 0;

	setstatusbarviewport16();
	printext16(200L, 8L, 0, 6, snotbuf, 0);
	restoreviewport16();
}

// Assembly:
pushq %rbx
subq $0x40, %rsp
xorl %eax, %eax
cmpq $0x35, %rax
ja 0x177f6
movb (%rdi,%rax), %cl
testb %cl, %cl
je 0x177f6
movb %cl, (%rsp,%rax)
incq %rax
jmp 0x177da
movb $0x20, (%rsp,%rax)
incq %rax
cmpq $0x36, %rax
jne 0x177ef
movq %rsp, %rbx
movb $0x0, 0x36(%rbx)
callq 0x1228e
pushq $0x8
popq %rsi
pushq $0x6
popq %rcx
movl $0xc8, %edi
xorl %edx, %edx
movq %rbx, %r8
xorl %r9d, %r9d
callq 0x176c0
addq $0x40, %rsp
popq %rbx
jmp 0x122c5
// File: /workspace/github_c_makefile_star2_O2/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:
pushq %rbx
movq %rdx, %r8
movl 0x10f51b(%rip), %r10d   # 0x126d50
leaq 0x85f60(%rip), %r9      # 0x9d79c
movl (%r9), %eax
movl %eax, %edx
negl %edx
cmpl %edx, %r10d
setg %r11b
cmovlel %edx, %r10d
cmpl %eax, %r10d
setl %bl
cmovgel %eax, %r10d
testb %bl, %r11b
jne 0x17864
movl %r10d, 0x10f4ec(%rip)   # 0x126d50
movl 0x10f4e9(%rip), %r11d   # 0x126d54
cmpl %edx, %r11d
cmovgl %r11d, %edx
setg %r11b
cmpl %eax, %edx
setl %bl
testb %bl, %r11b
jne 0x1788b
cmpl %eax, %edx
cmovll %edx, %eax
movl %eax, 0x10f4c9(%rip)    # 0x126d54
movslq 0x15b932(%rip), %rdx    # 0x1731c4
movslq %edi, %rax
subq %rdx, %rax
movslq 0x85765(%rip), %rdi     # 0x9d004
shlq $0xe, %rax
cqto
idivq %rdi
addl %eax, %r10d
movl %r10d, (%r8)
movslq 0x15b913(%rip), %rdx    # 0x1731c8
movslq %esi, %rax
subq %rdx, %rax
movslq 0x85742(%rip), %rsi     # 0x9d004
shlq $0xe, %rax
cqto
idivq %rsi
addl 0x10f483(%rip), %eax    # 0x126d54
movl %eax, (%rcx)
movl (%r8), %edx
movl (%r9), %eax
movl %eax, %esi
negl %esi
cmpl %esi, %edx
jg 0x178e9
movl %esi, (%r8)
movl (%r9), %eax
movl %esi, %edx
cmpl %eax, %edx
jl 0x178f3
movl %eax, (%r8)
movl (%r9), %eax
movl (%rcx), %edx
movl %eax, %esi
negl %esi
cmpl %esi, %edx
jg 0x17904
movl %esi, (%rcx)
movl (%r9), %eax
movl %esi, %edx
cmpl %eax, %edx
jl 0x1790a
movl %eax, (%rcx)
popq %rbx
retq
// File: /workspace/github_c_makefile_star2_O2/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 0x3f834a(%rip), %rax    # 0x40fc68
movswl (%rax), %r12d
testl %r12d, %r12d
je 0x179e0
movl %esi, %ebp
movl %edi, %r14d
leal -0x1(%r12), %ebx
xorl %r15d, %r15d
testl %r12d, %r12d
cmovlel %r15d, %r12d
movl $0x7fffffff, %r13d      # imm = 0x7FFFFFFF
cmpl %r15d, %r12d
je 0x1798b
movl %r14d, %edi
movl %ebp, %esi
movl %r15d, %edx
leaq 0x4(%rsp), %rcx
movq %rsp, %r8
callq 0x18ed5
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
jmp 0x17945
movslq %ebx, %rdx
shlq $0x5, %rdx
leaq 0x19a0b7(%rip), %rcx    # 0x1b1a50
movswl 0xa(%rcx,%rdx), %eax
testl %eax, %eax
js 0x179e3
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 0x179e3
pushq $-0x1
popq %rbx
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_O2/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 0x17a03
leaq 0x3f8268(%rip), %rax    # 0x40fc68
movzwl (%rax), %edx
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
movswl 0x855e8(%rip), %ecx     # 0x9cffc
movzwl 0x855e2(%rip), %r8d     # 0x9cffe
movl $0x80, %eax
shrl %cl, %eax
xorl %r10d, %r10d
movw %r8w, -0x12(%rsp)
testw %r8w, %r8w
cmovlel %r10d, %eax
testl %ecx, %ecx
cmovlel %r10d, %eax
movq %rdi, -0x10(%rsp)
movl (%rdi), %r9d
movq %rsi, -0x8(%rsp)
movl (%rsi), %edi
testw %dx, %dx
cmovlel %r10d, %edx
movzwl %dx, %r14d
shll $0x5, %r14d
leaq 0x199ff1(%rip), %r15    # 0x1b1a50
movl %eax, %ebp
movl %r9d, %edx
movl %edi, %r8d
cmpq %r10, %r14
je 0x17aab
movl (%r15,%r10), %r12d
movl 0x4(%r15,%r10), %r13d
movl %r9d, %r11d
subl %r12d, %r11d
movl %r11d, %esi
negl %esi
cmovsl %r11d, %esi
movl %edi, %ebx
subl %r13d, %ebx
movl %ebx, %r11d
negl %r11d
cmovsl %ebx, %r11d
addl %esi, %r11d
cmpl %ebp, %r11d
cmovll %r11d, %ebp
cmovll %r12d, %edx
cmovll %r13d, %r8d
addq $0x20, %r10
jmp 0x17a67
cmpw $0x0, -0x12(%rsp)
setg %sil
testw %cx, %cx
setg %dil
cmpl %eax, %ebp
sete %al
andb %sil, %dil
andb %al, %dil
cmpb $0x1, %dil
jne 0x17aeb
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, %edx
andl %edi, %edx
addl %esi, %r8d
andl %edi, %r8d
movq -0x8(%rsp), %rax
movq -0x10(%rsp), %rcx
movl %edx, (%rcx)
movl %r8d, (%rax)
xorl %eax, %eax
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O2/jonof[P]jftekwar/jfbuild/src/build.c
// Function: printcoords16
void printcoords16(int posxe, int posye, short ange)
{
	char snotbuf[80];
	int i, maxsect = 0, maxwall = 0, maxspri = 0;

	setstatusbarviewport16();

	Bsprintf(snotbuf,"x=%d y=%d ang=%d",posxe,posye,ange);
	i = 0;
	while ((snotbuf[i] != 0) && (i < 30))
		i++;
	while (i < 30)
	{
		snotbuf[i] = 32;
		i++;
	}
	snotbuf[30] = 0;

	switch (mapversion) {
		case 5:
			maxsect = MAXSECTORSV5;
			maxwall = MAXWALLSV5;
			maxspri = MAXSPRITESV5;
			break;
		case 6:
			maxsect = MAXSECTORSV6;
			maxwall = MAXWALLSV6;
			maxspri = MAXSPRITESV6;
			break;
		case 7:
			maxsect = MAXSECTORSV7;
			maxwall = MAXWALLSV7;
			maxspri = MAXSPRITESV7;
			break;
		case 8:
			maxsect = MAXSECTORSV8;
			maxwall = MAXWALLSV8;
			maxspri = MAXSPRITESV8;
			break;
	}

	printext16(8,128, 11, 6, snotbuf,0);

	Bsprintf(snotbuf,"v%d %d/%d sect %d/%d wall %d/%d spri",
					mapversion,
					numsectors, maxsect,
					numwalls, maxwall,
					numsprites, maxspri);
	i = 0;
	while ((snotbuf[i] != 0) && (i < 46))
		i++;
	while (i < 46)
	{
		snotbuf[i] = 32;
		i++;
	}
	snotbuf[46] = 0;

	printext16(264,128, 14, 6, snotbuf,0);

	restoreviewport16();
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x58, %rsp
movl %edx, %ebx
movl %esi, %ebp
movl %edi, %r14d
callq 0x1228e
leaq 0x51187(%rip), %rsi     # 0x69c9a
xorl %r15d, %r15d
movq %rsp, %rdi
movl %r14d, %edx
movl %ebp, %ecx
movl %ebx, %r8d
xorl %eax, %eax
callq 0x6b00
leaq 0x1(%r15), %rax
cmpq $0x1d, %r15
ja 0x18b3c
cmpb $0x0, (%rsp,%r15)
movq %rax, %r15
jne 0x18b28
decq %rax
cmpq $0x1e, %rax
je 0x18b4e
movb $0x20, (%rsp,%rax)
incq %rax
jmp 0x18b3f
movb $0x0, 0x1e(%rsp)
leaq 0x84c3e(%rip), %rbp     # 0x9d798
movl (%rbp), %eax
addl $-0x5, %eax
xorl %ebx, %ebx
movl $0x0, %r15d
movl $0x0, %r13d
cmpl $0x3, %eax
ja 0x18b95
movl %eax, %eax
leaq 0x504e4(%rip), %rcx     # 0x69060
movl (%rcx,%rax,4), %ebx
leaq 0x504ea(%rip), %rcx     # 0x69070
movl (%rcx,%rax,4), %r15d
leaq 0x504ef(%rip), %rcx     # 0x69080
movl (%rcx,%rax,4), %r13d
pushq $0x8
popq %rdi
pushq $0xb
popq %rdx
pushq $0x6
popq %rcx
movq %rsp, %r14
xorl %r12d, %r12d
movl $0x80, %esi
movq %r14, %r8
xorl %r9d, %r9d
callq 0x176c0
movl (%rbp), %edx
leaq 0x3b03a2(%rip), %rax    # 0x3c8f60
movswl (%rax), %ecx
leaq 0x3f70a0(%rip), %rax    # 0x40fc68
movswl (%rax), %r9d
movl 0x15a5f9(%rip), %r10d   # 0x1731cc
subq $0x8, %rsp
leaq 0x510cd(%rip), %rsi     # 0x69cab
movq %r14, %rdi
movl %ebx, %r8d
xorl %eax, %eax
pushq %r13
pushq %r10
pushq %r15
callq 0x6b00
addq $0x20, %rsp
leaq 0x1(%r12), %rax
cmpq $0x2d, %r12
ja 0x18c0a
cmpb $0x0, (%rsp,%r12)
movq %rax, %r12
jne 0x18bf5
decq %rax
cmpq $0x2e, %rax
je 0x18c1c
movb $0x20, (%rsp,%rax)
incq %rax
jmp 0x18c0d
movq %rsp, %r8
movb $0x0, 0x2e(%r8)
pushq $0xe
popq %rdx
pushq $0x6
popq %rcx
movl $0x108, %edi            # imm = 0x108
movl $0x80, %esi
xorl %r9d, %r9d
callq 0x176c0
addq $0x58, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
jmp 0x122c5
// File: /workspace/github_c_makefile_star2_O2/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 0x18f68
pushq %r14
pushq %rbx
movl %edx, %edx
shlq $0x5, %rdx
leaq 0x198b63(%rip), %r14    # 0x1b1a50
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 0x18f70
movl %ebx, %edi
imull %ebx, %edi
movl %r10d, %edx
imull %r10d, %edx
addl %edi, %edx
cmpl %edx, %esi
jge 0x18f79
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 0x18f85
andl $0x0, (%r8)
andl $0x0, (%rcx)
retq
movl %r11d, (%rcx)
movl 0x4(%r9), %eax
jmp 0x18f82
movl %eax, (%rcx)
movl 0x4(%r9), %eax
addl %r10d, %eax
movl %eax, (%r8)
popq %rbx
popq %r14
retq
// File: /workspace/github_c_makefile_star2_O2/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:
leaq 0x3f6cd8(%rip), %rax    # 0x40fc68
movzwl (%rax), %eax
testw %ax, %ax
je 0x19068
pushq %rbx
xorl %ecx, %ecx
cmpw $0x0, 0x84055(%rip)     # 0x9cffc
setg %cl
shll $0xa, %ecx
xorl %edx, %edx
testw %ax, %ax
movl $0x0, %r8d
cmovgl %eax, %r8d
movzwl %r8w, %r8d
leaq 0x198a89(%rip), %r9     # 0x1b1a50
addq $0x4, %r9
movl $0xffffffff, %eax       # imm = 0xFFFFFFFF
cmpq %rdx, %r8
je 0x19009
movl %edi, %r10d
subl -0x4(%r9), %r10d
movl %r10d, %r11d
negl %r11d
cmovsl %r10d, %r11d
movl %esi, %r10d
subl (%r9), %r10d
movl %r10d, %ebx
negl %ebx
cmovsl %r10d, %ebx
addl %r11d, %ebx
cmpl %ecx, %ebx
cmovll %ebx, %ecx
cmovlel %edx, %eax
incq %rdx
addq $0x20, %r9
jmp 0x18fd0
leaq 0x25cca0(%rip), %rdx    # 0x275cb0
xorl %r8d, %r8d
cmpq $0x4000, %r8            # imm = 0x4000
je 0x19066
cmpw $0x3ff, 0x1a(%rdx)      # imm = 0x3FF
jg 0x1905d
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
jmp 0x19013
popq %rbx
retq
movl $0xffffffff, %eax       # imm = 0xFFFFFFFF
retq
// File: /workspace/github_c_makefile_star2_O2/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 %rbx
callq 0x1228e
leaq 0x15e035(%rip), %rax    # 0x1770b0
leaq 0x15e202(%rip), %rcx    # 0x177284
movslq (%rcx), %rcx
movslq 0x10dce0(%rip), %rdi    # 0x126d6c
addq $0x19, %rdi
imulq %rcx, %rdi
addq (%rax), %rdi
movl 0x10dccb(%rip), %esi    # 0x126d68
addl $-0x33, %esi
imull %ecx, %esi
sarl $0x2, %esi
movl $0x8080808, %edx        # imm = 0x8080808
callq 0x444af
movl 0x10dcb2(%rip), %ecx    # 0x126d68
decl %ecx
pushq $0x7
popq %rbx
xorl %edi, %edi
xorl %esi, %esi
xorl %edx, %edx
movl %ebx, %r8d
callq 0x1737f
leaq 0x3e7f1c(%rip), %rax    # 0x400fec
movl (%rax), %edi
decl %edi
movl 0x10dc8e(%rip), %ecx    # 0x126d68
decl %ecx
xorl %esi, %esi
movl %edi, %edx
movl %ebx, %r8d
callq 0x1737f
popq %rbx
jmp 0x122c5
// File: /workspace/github_c_makefile_star2_O2/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, 0xc(%rsp)
movl %esi, %r14d
movq %rdi, %r15
callq 0x1cac9
leaq 0x15db3e(%rip), %rbx    # 0x1770a0
leaq 0x10(%rsp), %r13
movl %r14d, 0x8(%rsp)
leaq 0x15dd1d(%rip), %rax    # 0x177290
cmpb $0x0, 0x1(%rax)
jne 0x1962d
callq 0x63a71
testl %eax, %eax
je 0x1958e
cmpb $0x0, (%rbx)
je 0x1958e
movb $0x0, (%rbx)
callq 0x1ca8f
movl %eax, %r12d
movq %r13, %rdi
pushq $0x50
popq %rsi
leaq 0x504a7(%rip), %rdx     # 0x69a4a
movq %r15, %rcx
movl %r14d, %r8d
xorl %eax, %eax
callq 0x64f0
movq %r13, %rdi
callq 0x177d3
callq 0x63720
leal -0x30(%r12), %ecx
movzbl %r12b, %eax
cmpb $0x9, %cl
ja 0x195f3
imull $0xa, %r14d, %ecx
leal (%rcx,%rax), %edx
addl $-0x30, %edx
subl %eax, %ecx
addl $0x30, %ecx
testl %r14d, %r14d
cmovnsl %edx, %ecx
testb %bpl, %bpl
cmovel %edx, %ecx
cmpl 0xc(%rsp), %ecx
cmovll %ecx, %r14d
jmp 0x1956c
cmpb $0x8, %r12b
je 0x1961c
cmpl $0x7f, %eax
je 0x1961c
cmpl $0xd, %eax
je 0x19657
movl %r14d, %eax
negl %eax
cmpb $0x2d, %r12b
cmovnel %r14d, %eax
testb %bpl, %bpl
cmovnel %eax, %r14d
jmp 0x1956c
movl %r14d, %eax
cltd
pushq $0xa
popq %rcx
idivl %ecx
movl %eax, %r14d
jmp 0x1956c
movl 0x8(%rsp), %r14d
leaq 0x15dc57(%rip), %rdi    # 0x177290
movl $0x100, %edx            # imm = 0x100
xorl %esi, %esi
callq 0x62f0
movl %r14d, %eax
addq $0x68, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movw $0x1, 0x10d2c6(%rip)    # 0x126926
jmp 0x19632
// File: /workspace/github_c_makefile_star2_O2/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
movslq %edi, %rax
shlq $0x5, %rax
leaq 0x197aae(%rip), %rcx    # 0x1b1a50
movl (%rcx,%rax), %edx
movl 0x4(%rcx,%rax), %r8d
movswq 0x8(%rcx,%rax), %r10
shlq $0x5, %r10
movl (%rcx,%r10), %r9d
movl 0x4(%rcx,%r10), %r10d
movswq 0xa(%rcx,%rax), %r11
testq %r11, %r11
js 0x1a000
shlq $0x5, %r11
cmpl %r9d, (%rcx,%r11)
jne 0x1a000
addq %rcx, %r11
cmpl %r10d, 0x4(%r11)
jne 0x1a000
movswq 0x8(%r11), %r11
shlq $0x5, %r11
cmpl %edx, (%rcx,%r11)
jne 0x1a000
addq %rcx, %r11
cmpl %r8d, 0x4(%r11)
jne 0x1a000
xorl %eax, %eax
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
addq %rcx, %rax
orl $-0x1, 0xa(%rax)
leaq 0x3aef52(%rip), %r11    # 0x3c8f60
movzwl (%r11), %ebp
movswq %si, %r11
movl %r11d, %r11d
xorl %ebx, %ebx
testw %bp, %bp
cmovlel %ebx, %ebp
movzwl %bp, %r14d
cmpq %r14, %rbx
je 0x19ff3
imulq $0x28, %rbx, %r15
leaq 0x222a2b(%rip), %r13    # 0x23ca60
movswq (%r13,%r15), %r12
movswq 0x2(%r13,%r15), %r13
addq %r12, %r13
movq %r12, %r15
shlq $0x5, %r15
leaq (%rcx,%r15), %rbp
addq $0xc, %rbp
cmpq %r13, %r12
jge 0x1a09b
cmpl %r9d, -0xc(%rbp)
jne 0x1a092
cmpl %r10d, -0x8(%rbp)
jne 0x1a092
movswq -0x4(%rbp), %r15
shlq $0x5, %r15
cmpl %edx, (%rcx,%r15)
jne 0x1a092
cmpq %r11, %rbx
je 0x1a092
addq %rcx, %r15
cmpl %r8d, 0x4(%r15)
jne 0x1a092
movw %bx, 0xc(%rax)
movw %r12w, 0xa(%rax)
movw %si, (%rbp)
movw %di, -0x2(%rbp)
incq %r12
addq $0x20, %rbp
jmp 0x1a053
incq %rbx
jmp 0x1a025
// File: /workspace/github_c_makefile_star2_O2/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 0x39217
movl %eax, %ebx
cltq
imulq $0x28, %rax, %rcx
leaq 0x2229a6(%rip), %rdx    # 0x23ca60
addq %rdx, %rcx
addq $0x28, %rcx
decw -0x26(%rcx)
leaq 0x3aee94(%rip), %rdx    # 0x3c8f60
movswq (%rdx), %rdx
incq %rax
cmpq %rdx, %rax
jge 0x1a0e4
decw (%rcx)
incq %rax
addq $0x28, %rcx
jmp 0x1a0d3
movswl %bp, %r14d
movl %r14d, %edi
callq 0x2bf2f
movl %eax, %ebp
movswq %r14w, %rdx
shlq $0x5, %rdx
leaq 0x19794f(%rip), %rax    # 0x1b1a50
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 0x1a13d
addq %rax, %rdx
shlq $0x5, %rsi
orw $-0x1, 0xa(%rax,%rsi)
movswq 0xa(%rdx), %rdx
shlq $0x5, %rdx
orw $-0x1, 0xc(%rax,%rdx)
movswq 0xa(%rcx), %rdx
testq %rdx, %rdx
js 0x1a160
shlq $0x5, %rdx
orw $-0x1, 0xa(%rax,%rdx)
movswq 0xa(%rcx), %rcx
shlq $0x5, %rcx
orw $-0x1, 0xc(%rax,%rcx)
pushq $-0x1
popq %rsi
movl %r14d, %edi
callq 0x1b17a
movswl %bp, %edi
movswl %bx, %esi
popq %rbx
popq %r14
popq %rbp
jmp 0x19f8a
// File: /workspace/github_c_makefile_star2_O2/jonof[P]jftekwar/jfbuild/src/build.c
// Function: insertpoint
void insertpoint(short linehighlight, int dax, int day)
{
	short sucksect;
	int i, j, k;

	j = linehighlight;
	sucksect = sectorofwall((short)j);

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

	movewalls((int)j+1,+1L);
	Bmemcpy(&wall[j+1],&wall[j],sizeof(walltype));

	wall[j].point2 = j+1;
	wall[j+1].x = dax;
	wall[j+1].y = day;
	fixrepeats((short)j);
	fixrepeats((short)j+1);

	if (wall[j].nextwall >= 0)
	{
		k = wall[j].nextwall;

		sucksect = sectorofwall((short)k);

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

		movewalls((int)k+1,+1L);
		Bmemcpy(&wall[k+1],&wall[k],sizeof(walltype));

		wall[k].point2 = k+1;
		wall[k+1].x = dax;
		wall[k+1].y = day;
		fixrepeats((short)k);
		fixrepeats((short)k+1);

		j = wall[k].nextwall;
		wall[j].nextwall = k+1;
		wall[j+1].nextwall = k;
		wall[k].nextwall = j+1;
		wall[k+1].nextwall = j;
	}
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movl %edx, %ebx
movl %esi, %ebp
movl %edi, %r14d
callq 0x39217
movswq %ax, %rax
imulq $0x28, %rax, %rcx
leaq 0x22255d(%rip), %rdx    # 0x23ca60
addq %rdx, %rcx
addq $0x28, %rcx
incw -0x26(%rcx)
leaq 0x3aea4b(%rip), %rdx    # 0x3c8f60
movswq (%rdx), %rdx
incq %rax
cmpq %rdx, %rax
jge 0x1a52d
incw (%rcx)
incq %rax
addq $0x28, %rcx
jmp 0x1a51c
movswl %r14w, %r14d
leal 0x1(%r14), %r15d
pushq $0x1
popq %rsi
movl %r15d, %edi
callq 0x1b17a
leaq 0x197509(%rip), %r12    # 0x1b1a50
movswq %r14w, %r13
shlq $0x5, %r13
movaps (%r12,%r13), %xmm0
movaps 0x10(%r12,%r13), %xmm1
movaps %xmm0, 0x20(%r12,%r13)
movaps %xmm1, 0x30(%r12,%r13)
movw %r15w, 0x8(%r12,%r13)
movl %ebp, 0x20(%r12,%r13)
movl %ebx, 0x24(%r12,%r13)
movl %r14d, %edi
callq 0x16348
movswl %r15w, %edi
callq 0x16348
movswl 0xa(%r12,%r13), %r13d
testl %r13d, %r13d
js 0x1a65d
movswl %r13w, %r14d
movl %r14d, %edi
callq 0x39217
movswq %ax, %rax
imulq $0x28, %rax, %rcx
leaq 0x2224af(%rip), %rdx    # 0x23ca60
addq %rdx, %rcx
addq $0x28, %rcx
incw -0x26(%rcx)
leaq 0x3ae99d(%rip), %rdx    # 0x3c8f60
movswq (%rdx), %rdx
incq %rax
cmpq %rdx, %rax
jge 0x1a5db
incw (%rcx)
incq %rax
addq $0x28, %rcx
jmp 0x1a5ca
leal 0x1(%r13), %r15d
pushq $0x1
popq %rsi
movl %r15d, %edi
callq 0x1b17a
movl %r13d, %r13d
shlq $0x5, %r13
movaps (%r12,%r13), %xmm0
movaps 0x10(%r12,%r13), %xmm1
movaps %xmm0, 0x20(%r12,%r13)
movaps %xmm1, 0x30(%r12,%r13)
movw %r15w, 0x8(%r12,%r13)
movl %ebp, 0x20(%r12,%r13)
movl %ebx, 0x24(%r12,%r13)
movl %r14d, %edi
callq 0x16348
movswl %r15w, %ebx
movl %ebx, %edi
callq 0x16348
movswq 0xa(%r12,%r13), %rax
movq %rax, %rcx
shlq $0x5, %rcx
movw %bx, 0xa(%r12,%rcx)
movq %rax, %rcx
incq %rcx
movq %rcx, %rdx
shlq $0x5, %rdx
movw %r14w, 0xa(%r12,%rdx)
movw %cx, 0xa(%r12,%r13)
movw %ax, 0x2a(%r12,%r13)
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O2/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 %r15
pushq %r14
pushq %rbx
testw %dx, %dx
jns 0x1a681
leaq 0x3f55ea(%rip), %rax    # 0x40fc68
movzwl (%rax), %edx
xorl %eax, %eax
testw %dx, %dx
movl $0x0, %ecx
cmovgl %edx, %ecx
movzwl %cx, %ecx
shll $0x5, %ecx
leaq 0x1973b5(%rip), %r8     # 0x1b1a50
movl $0x1, %edx
xorl %r9d, %r9d
cmpq %r9, %rcx
je 0x1a72e
movl (%r8,%r9), %r10d
movl 0x4(%r8,%r9), %r11d
movl %edi, %ebx
xorl %r10d, %ebx
movl %esi, %ebp
xorl %r11d, %ebp
orl %ebx, %ebp
je 0x1a723
movswq 0x8(%r8,%r9), %r14
shlq $0x5, %r14
movl (%r8,%r14), %ebx
movl 0x4(%r8,%r14), %ebp
movl %ebx, %r14d
xorl %edi, %r14d
movl %ebp, %r15d
xorl %esi, %r15d
orl %r14d, %r15d
je 0x1a723
movl %edi, %r14d
subl %r10d, %r14d
jl 0x1a6f3
cmpl %edi, %ebx
jge 0x1a6fc
cmpl %r10d, %edi
jg 0x1a723
cmpl %edi, %ebx
jg 0x1a723
movl %esi, %r15d
subl %r11d, %r15d
jl 0x1a708
cmpl %esi, %ebp
jge 0x1a711
cmpl %esi, %ebp
jg 0x1a723
cmpl %r11d, %esi
jg 0x1a723
subl %r11d, %ebp
imull %r14d, %ebp
subl %r10d, %ebx
imull %r15d, %ebx
cmpl %ebx, %ebp
je 0x1a72c
addq $0x20, %r9
jmp 0x1a6a3
movl %edx, %eax
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O2/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 0x19730b(%rip), %rax    # 0x1b1a50
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 0x1a781
incl %r8d
cmpw $0x4000, %si            # imm = 0x4000
movl %r8d, %esi
jl 0x1a747
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 0x1a7c5
xorl %eax, %eax
cmpl %r8d, %r9d
jg 0x1a7c5
retq
movl %r9d, %eax
subl %r8d, %eax
jl 0x1a7d6
cmpl %r9d, %r10d
jl 0x1a7d6
pushq $0x1
popq %rax
retq
subl %esi, %edx
imull %edx, %edi
subl %esi, %ecx
imull %eax, %ecx
addl %edi, %ecx
notl %ecx
shrl $0x1f, %ecx
movl %ecx, %eax
retq
// File: /workspace/github_c_makefile_star2_O2/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:
movslq %esi, %rdx
subl %edi, %esi
sarl %esi
addl %edi, %esi
movslq %edi, %rax
movslq %esi, %rcx
shlq $0x5, %rdx
leaq 0x19724c(%rip), %rdi    # 0x1b1a50
addq %rdi, %rdx
addq $-0x20, %rdx
movq %rax, %rsi
shlq $0x5, %rsi
addq %rdi, %rsi
cmpq %rcx, %rax
jge 0x1a833
movq (%rsi), %rdi
movq (%rdx), %r8
movq %r8, (%rsi)
movq %rdi, (%rdx)
incq %rax
addq $-0x20, %rdx
addq $0x20, %rsi
jmp 0x1a815
retq