// File: /workspace/github_c_makefile_star2_O0/jonof[P]jftekwar/jfbuild/src/build.c
// Function: gettile
int gettile(int tilenum)
{
	char snotbuf[80];
	int i, j, otilenum, topleft, gap, temp, templong, ch;
	int xtiles, ytiles, tottiles;

	if (tilenum < 0) tilenum = 0;

	xtiles = (xdim>>6); ytiles = (ydim>>6); tottiles = xtiles*ytiles;
	otilenum = tilenum;

	keystatus[0x2f] = 0;
	for(i=0;i<MAXTILES;i++)
	{
		localartfreq[i] = 0;
		localartlookup[i] = i;
	}
	if ((searchstat == 1) || (searchstat == 2))
		for(i=0;i<numsectors;i++)
		{
			localartfreq[sector[i].ceilingpicnum]++;
			localartfreq[sector[i].floorpicnum]++;
		}
	if (searchstat == 0)
		for(i=0;i<numwalls;i++)
			localartfreq[wall[i].picnum]++;
	if (searchstat == 4)
		for(i=0;i<numwalls;i++)
			localartfreq[wall[i].overpicnum]++;
	if (searchstat == 3)
		for(i=0;i<MAXSPRITES;i++)
			if (sprite[i].statnum < MAXSTATUS)
				localartfreq[sprite[i].picnum]++;
	gap = (MAXTILES>>1);
	do
	{
		for(i=0;i<MAXTILES-gap;i++)
		{
			temp = i;
			while ((localartfreq[temp] < localartfreq[temp+gap]) && (temp >= 0))
			{
				templong = localartfreq[temp];
				localartfreq[temp] = localartfreq[temp+gap];
				localartfreq[temp+gap] = templong;
				templong = localartlookup[temp];
				localartlookup[temp] = localartlookup[temp+gap];
				localartlookup[temp+gap] = templong;

				if (tilenum == temp)
					tilenum = temp+gap;
				else if (tilenum == temp+gap)
					tilenum = temp;

				temp -= gap;
			}
		}
		gap >>= 1;
	}
	while (gap > 0);
	localartlookupnum = 0;
	while (localartfreq[localartlookupnum] > 0)
		localartlookupnum++;

	if (localartfreq[0] == 0)
	{
		tilenum = otilenum;
		localartlookupnum = MAXTILES;
		for(i=0;i<MAXTILES;i++)
			localartlookup[i] = i;
	}

	topleft = ((tilenum/(xtiles<<gettilezoom))*(xtiles<<gettilezoom))-(xtiles<<gettilezoom);
	if (topleft < 0) topleft = 0;
	if (topleft > MAXTILES-(tottiles<<(gettilezoom<<1))) topleft = MAXTILES-(tottiles<<(gettilezoom<<1));
	while ((keystatus[0x1c]|keystatus[1]) == 0)
	{
		drawtilescreen(topleft,tilenum);
		OSD_Draw();
		showframe();

		if (handleevents()) {
			if (quitevent) quitevent = 0;
		}

		synctics = totalclock-lockclock;
		lockclock += synctics;

		if ((keystatus[0x37] > 0) && (gettilezoom < 2))
		{
			gettilezoom++;
			topleft = ((tilenum/(xtiles<<gettilezoom))*(xtiles<<gettilezoom))-(xtiles<<gettilezoom);
			if (topleft < 0) topleft = 0;
			if (topleft > MAXTILES-(tottiles<<(gettilezoom<<1))) topleft = MAXTILES-(tottiles<<(gettilezoom<<1));
			keystatus[0x37] = 0;
		}
		if ((keystatus[0xb5] > 0) && (gettilezoom > 0))
		{
			gettilezoom--;
			topleft = ((tilenum/(xtiles<<gettilezoom))*(xtiles<<gettilezoom))-(xtiles<<gettilezoom);
			if (topleft < 0) topleft = 0;
			if (topleft > MAXTILES-(tottiles<<(gettilezoom<<1))) topleft = MAXTILES-(tottiles<<(gettilezoom<<1));
			keystatus[0xb5] = 0;
		}
		if ((keystatus[0xcb] > 0) && (tilenum > 0))
			tilenum--, keystatus[0xcb] = 0;
		if ((keystatus[0xcd] > 0) && (tilenum < MAXTILES-1))
			tilenum++, keystatus[0xcd] = 0;
		if ((keystatus[0xc8] > 0) && (tilenum >= (xtiles<<gettilezoom)))
			tilenum-=(xtiles<<gettilezoom), keystatus[0xc8] = 0;
		if ((keystatus[0xd0] > 0) && (tilenum < MAXTILES-(xtiles<<gettilezoom)))
			tilenum+=(xtiles<<gettilezoom), keystatus[0xd0] = 0;
		if ((keystatus[0xc9] > 0) && (tilenum >= (xtiles<<gettilezoom)))
		{
			tilenum-=(tottiles<<(gettilezoom<<1));
			if (tilenum < 0) tilenum = 0;
			keystatus[0xc9] = 0;
		}
		if ((keystatus[0xd1] > 0) && (tilenum < MAXTILES-(xtiles<<gettilezoom)))
		{
			tilenum+=(tottiles<<(gettilezoom<<1));
			if (tilenum >= MAXTILES) tilenum = MAXTILES-1;
			keystatus[0xd1] = 0;
		}
		if (keystatus[0x2f] > 0)   //V
		{
			keystatus[0x2f] = 0;
			if (tilenum < localartlookupnum)
				tilenum = localartlookup[tilenum];
			else
				tilenum = 0;
			localartlookupnum = MAXTILES;
			for(i=0;i<MAXTILES;i++)
				localartlookup[i] = i;
		}
		if (keystatus[0x22] > 0)       //G (goto)
		{
			if (tilenum < localartlookupnum)         //Automatically press 'V'
				tilenum = localartlookup[tilenum];
			else
				tilenum = 0;
			localartlookupnum = MAXTILES;
			for(i=0;i<MAXTILES;i++)
				localartlookup[i] = i;

			keystatus[0x22] = 0;
			bflushchars();

			j = tilenum;
			while (keystatus[1] == 0)
			{
				if (handleevents()) {
					if (quitevent) quitevent = 0;
				}

				ch = bgetchar();

				//drawtilescreen(topleft,tilenum);
				Bsprintf(snotbuf,"Goto tile: %d_ ",j);
				printext256(0,0,whitecol,blackcol,snotbuf,0);
				showframe();

				if (ch >= '0' && ch <= '9') {
					i = (j*10)+(ch-'0');
					if (i < MAXTILES) j = i;
				} else if (ch == 8) {
					j /= 10;
				} else if (ch == 13) {
					tilenum = j;
					break;
				}
			}
			clearkeys();
		}
		while (tilenum < topleft) topleft -= (xtiles<<gettilezoom);
		while (tilenum >= topleft+(tottiles<<(gettilezoom<<1))) topleft += (xtiles<<gettilezoom);
		if (topleft < 0) topleft = 0;
		if (topleft > MAXTILES-(tottiles<<(gettilezoom<<1))) topleft = MAXTILES-(tottiles<<(gettilezoom<<1));
	}

	if (keystatus[0x1c] == 0)
	{
		tilenum = otilenum;
	}
	else
	{
		if (tilenum < localartlookupnum)
		{
			tilenum = localartlookup[tilenum];
			if ((tilesizx[tilenum] == 0) || (tilesizy[tilenum] == 0))
				tilenum = otilenum;
		}
		else
			tilenum = otilenum;
	}
	keystatus[0x1] = 0;
	keystatus[0x1c] = 0;
	return(tilenum);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0xa0, %rsp
movl %edi, -0x4(%rbp)
cmpl $0x0, -0x4(%rbp)
jge 0x236db
movl $0x0, -0x4(%rbp)
leaq 0x41f66a(%rip), %rax    # 0x442d4c
movl (%rax), %eax
sarl $0x6, %eax
movl %eax, -0x84(%rbp)
leaq 0x41f65c(%rip), %rax    # 0x442d50
movl (%rax), %eax
sarl $0x6, %eax
movl %eax, -0x88(%rbp)
movl -0x84(%rbp), %eax
imull -0x88(%rbp), %eax
movl %eax, -0x8c(%rbp)
movl -0x4(%rbp), %eax
movl %eax, -0x6c(%rbp)
leaq 0x1976d1(%rip), %rax    # 0x1badf0
movb $0x0, 0x2f(%rax)
movl $0x0, -0x64(%rbp)
cmpl $0x2400, -0x64(%rbp)    # imm = 0x2400
jge 0x23764
movslq -0x64(%rbp), %rcx
leaq 0x151dc2(%rip), %rax    # 0x175500
movw $0x0, (%rax,%rcx,2)
movl -0x64(%rbp), %eax
movw %ax, %dx
movslq -0x64(%rbp), %rcx
leaq 0x1565bb(%rip), %rax    # 0x179d10
movw %dx, (%rax,%rcx,2)
movl -0x64(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x64(%rbp)
jmp 0x2372a
leaq 0x3b1ec7(%rip), %rax    # 0x3d5632
movswl (%rax), %eax
cmpl $0x1, %eax
je 0x23786
leaq 0x3b1eb8(%rip), %rax    # 0x3d5632
movswl (%rax), %eax
cmpl $0x2, %eax
jne 0x2380d
movl $0x0, -0x64(%rbp)
movl -0x64(%rbp), %eax
leaq 0x3e9329(%rip), %rcx    # 0x40cac0
movswl (%rcx), %ecx
cmpl %ecx, %eax
jge 0x2380b
movslq -0x64(%rbp), %rcx
leaq 0x25ce17(%rip), %rax    # 0x2805c0
imulq $0x28, %rcx, %rcx
addq %rcx, %rax
movswq 0x10(%rax), %rcx
leaq 0x151d44(%rip), %rax    # 0x175500
movw (%rax,%rcx,2), %dx
addw $0x1, %dx
leaq 0x151d35(%rip), %rax    # 0x175500
movw %dx, (%rax,%rcx,2)
movslq -0x64(%rbp), %rcx
leaq 0x25cde6(%rip), %rax    # 0x2805c0
imulq $0x28, %rcx, %rcx
addq %rcx, %rax
movswq 0x18(%rax), %rcx
leaq 0x151d13(%rip), %rax    # 0x175500
movw (%rax,%rcx,2), %dx
addw $0x1, %dx
leaq 0x151d04(%rip), %rax    # 0x175500
movw %dx, (%rax,%rcx,2)
movl -0x64(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x64(%rbp)
jmp 0x2378d
jmp 0x2380d
leaq 0x3b1e1e(%rip), %rax    # 0x3d5632
movswl (%rax), %eax
cmpl $0x0, %eax
jne 0x23872
movl $0x0, -0x64(%rbp)
movl -0x64(%rbp), %eax
leaq 0x42e19b(%rip), %rcx    # 0x4519c8
movswl (%rcx), %ecx
cmpl %ecx, %eax
jge 0x23870
movslq -0x64(%rbp), %rcx
leaq 0x1d1d71(%rip), %rax    # 0x1f55b0
shlq $0x5, %rcx
addq %rcx, %rax
movswq 0x10(%rax), %rcx
leaq 0x151cae(%rip), %rax    # 0x175500
movw (%rax,%rcx,2), %dx
addw $0x1, %dx
leaq 0x151c9f(%rip), %rax    # 0x175500
movw %dx, (%rax,%rcx,2)
movl -0x64(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x64(%rbp)
jmp 0x23823
jmp 0x23872
leaq 0x3b1db9(%rip), %rax    # 0x3d5632
movswl (%rax), %eax
cmpl $0x4, %eax
jne 0x238d7
movl $0x0, -0x64(%rbp)
movl -0x64(%rbp), %eax
leaq 0x42e136(%rip), %rcx    # 0x4519c8
movswl (%rcx), %ecx
cmpl %ecx, %eax
jge 0x238d5
movslq -0x64(%rbp), %rcx
leaq 0x1d1d0c(%rip), %rax    # 0x1f55b0
shlq $0x5, %rcx
addq %rcx, %rax
movswq 0x12(%rax), %rcx
leaq 0x151c49(%rip), %rax    # 0x175500
movw (%rax,%rcx,2), %dx
addw $0x1, %dx
leaq 0x151c3a(%rip), %rax    # 0x175500
movw %dx, (%rax,%rcx,2)
movl -0x64(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x64(%rbp)
jmp 0x23888
jmp 0x238d7
leaq 0x3b1d54(%rip), %rax    # 0x3d5632
movswl (%rax), %eax
cmpl $0x3, %eax
jne 0x23953
movl $0x0, -0x64(%rbp)
cmpl $0x4000, -0x64(%rbp)    # imm = 0x4000
jge 0x23951
movslq -0x64(%rbp), %rcx
leaq 0x295f0f(%rip), %rax    # 0x2b9810
imulq $0x2c, %rcx, %rcx
addq %rcx, %rax
movswl 0x1a(%rax), %eax
cmpl $0x400, %eax            # imm = 0x400
jge 0x23944
movslq -0x64(%rbp), %rcx
leaq 0x295ef2(%rip), %rax    # 0x2b9810
imulq $0x2c, %rcx, %rcx
addq %rcx, %rax
movswq 0xe(%rax), %rcx
leaq 0x151bcf(%rip), %rax    # 0x175500
movw (%rax,%rcx,2), %dx
addw $0x1, %dx
leaq 0x151bc0(%rip), %rax    # 0x175500
movw %dx, (%rax,%rcx,2)
jmp 0x23946
movl -0x64(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x64(%rbp)
jmp 0x238ed
jmp 0x23953
movl $0x1200, -0x74(%rbp)    # imm = 0x1200
movl $0x0, -0x64(%rbp)
movl -0x64(%rbp), %eax
movl $0x2400, %ecx           # imm = 0x2400
subl -0x74(%rbp), %ecx
cmpl %ecx, %eax
jge 0x23aab
movl -0x64(%rbp), %eax
movl %eax, -0x78(%rbp)
movslq -0x78(%rbp), %rcx
leaq 0x151b7b(%rip), %rax    # 0x175500
movswl (%rax,%rcx,2), %ecx
movl -0x78(%rbp), %eax
addl -0x74(%rbp), %eax
movslq %eax, %rdx
leaq 0x151b67(%rip), %rax    # 0x175500
movswl (%rax,%rdx,2), %edx
xorl %eax, %eax
cmpl %edx, %ecx
movb %al, -0x8d(%rbp)
jge 0x239b6
cmpl $0x0, -0x78(%rbp)
setge %al
movb %al, -0x8d(%rbp)
movb -0x8d(%rbp), %al
testb $0x1, %al
jne 0x239c5
jmp 0x23a9b
movslq -0x78(%rbp), %rcx
leaq 0x151b30(%rip), %rax    # 0x175500
movswl (%rax,%rcx,2), %eax
movl %eax, -0x7c(%rbp)
movl -0x78(%rbp), %eax
addl -0x74(%rbp), %eax
movslq %eax, %rcx
leaq 0x151b19(%rip), %rax    # 0x175500
movw (%rax,%rcx,2), %dx
movslq -0x78(%rbp), %rcx
leaq 0x151b0a(%rip), %rax    # 0x175500
movw %dx, (%rax,%rcx,2)
movl -0x7c(%rbp), %eax
movw %ax, %dx
movl -0x78(%rbp), %eax
addl -0x74(%rbp), %eax
movslq %eax, %rcx
leaq 0x151af0(%rip), %rax    # 0x175500
movw %dx, (%rax,%rcx,2)
movslq -0x78(%rbp), %rcx
leaq 0x1562f1(%rip), %rax    # 0x179d10
movswl (%rax,%rcx,2), %eax
movl %eax, -0x7c(%rbp)
movl -0x78(%rbp), %eax
addl -0x74(%rbp), %eax
movslq %eax, %rcx
leaq 0x1562da(%rip), %rax    # 0x179d10
movw (%rax,%rcx,2), %dx
movslq -0x78(%rbp), %rcx
leaq 0x1562cb(%rip), %rax    # 0x179d10
movw %dx, (%rax,%rcx,2)
movl -0x7c(%rbp), %eax
movw %ax, %dx
movl -0x78(%rbp), %eax
addl -0x74(%rbp), %eax
movslq %eax, %rcx
leaq 0x1562b1(%rip), %rax    # 0x179d10
movw %dx, (%rax,%rcx,2)
movl -0x4(%rbp), %eax
cmpl -0x78(%rbp), %eax
jne 0x23a76
movl -0x78(%rbp), %eax
addl -0x74(%rbp), %eax
movl %eax, -0x4(%rbp)
jmp 0x23a8b
movl -0x4(%rbp), %eax
movl -0x78(%rbp), %ecx
addl -0x74(%rbp), %ecx
cmpl %ecx, %eax
jne 0x23a89
movl -0x78(%rbp), %eax
movl %eax, -0x4(%rbp)
jmp 0x23a8b
movl -0x74(%rbp), %ecx
movl -0x78(%rbp), %eax
subl %ecx, %eax
movl %eax, -0x78(%rbp)
jmp 0x2397a
jmp 0x23a9d
movl -0x64(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x64(%rbp)
jmp 0x23961
movl -0x74(%rbp), %eax
sarl %eax
movl %eax, -0x74(%rbp)
cmpl $0x0, -0x74(%rbp)
jg 0x2395a
movw $0x0, 0x15aa4a(%rip)    # 0x17e510
movswq 0x15aa42(%rip), %rcx    # 0x17e510
leaq 0x151a2b(%rip), %rax    # 0x175500
movswl (%rax,%rcx,2), %eax
cmpl $0x0, %eax
jle 0x23af2
movw 0x15aa2b(%rip), %ax     # 0x17e510
addw $0x1, %ax
movw %ax, 0x15aa20(%rip)     # 0x17e510
jmp 0x23ac6
movswl 0x151a07(%rip), %eax    # 0x175500
cmpl $0x0, %eax
jne 0x23b3f
movl -0x6c(%rbp), %eax
movl %eax, -0x4(%rbp)
movw $0x2400, 0x15aa03(%rip) # imm = 0x2400
movl $0x0, -0x64(%rbp)
cmpl $0x2400, -0x64(%rbp)    # imm = 0x2400
jge 0x23b3d
movl -0x64(%rbp), %eax
movw %ax, %dx
movslq -0x64(%rbp), %rcx
leaq 0x1561e2(%rip), %rax    # 0x179d10
movw %dx, (%rax,%rcx,2)
movl -0x64(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x64(%rbp)
jmp 0x23b14
jmp 0x23b3f
movl -0x4(%rbp), %eax
movl -0x84(%rbp), %edx
movl 0xbc45a(%rip), %ecx     # 0xdffa8
shll %cl, %edx
movl %edx, %ecx
cltd
idivl %ecx
movl -0x84(%rbp), %edx
movl 0xbc447(%rip), %ecx     # 0xdffa8
shll %cl, %edx
movl %edx, %ecx
imull %ecx, %eax
movl -0x84(%rbp), %edx
movl 0xbc434(%rip), %ecx     # 0xdffa8
shll %cl, %edx
movl %edx, %ecx
subl %ecx, %eax
movl %eax, -0x70(%rbp)
cmpl $0x0, -0x70(%rbp)
jge 0x23b8a
movl $0x0, -0x70(%rbp)
movl -0x70(%rbp), %eax
movl -0x8c(%rbp), %edx
movl 0xbc40f(%rip), %ecx     # 0xdffa8
shll %ecx
shll %cl, %edx
movl $0x2400, %ecx           # imm = 0x2400
subl %edx, %ecx
cmpl %ecx, %eax
jle 0x23bc4
movl -0x8c(%rbp), %eax
movl 0xbc3f4(%rip), %ecx     # 0xdffa8
shll %ecx
shll %cl, %eax
movl %eax, %ecx
movl $0x2400, %eax           # imm = 0x2400
subl %ecx, %eax
movl %eax, -0x70(%rbp)
jmp 0x23bc6
leaq 0x197223(%rip), %rax    # 0x1badf0
movsbl 0x1c(%rax), %eax
leaq 0x197218(%rip), %rcx    # 0x1badf0
movsbl 0x1(%rcx), %ecx
orl %ecx, %eax
cmpl $0x0, %eax
jne 0x2422c
movl -0x70(%rbp), %edi
movl -0x4(%rbp), %esi
callq 0x248d0
callq 0x6e140
callq 0xa67c0
callq 0xa6ab0
cmpl $0x0, %eax
je 0x23c1e
leaq 0x196ff3(%rip), %rax    # 0x1bac00
cmpb $0x0, (%rax)
je 0x23c1c
leaq 0x196fe7(%rip), %rax    # 0x1bac00
movb $0x0, (%rax)
jmp 0x23c1e
leaq 0x3c5423(%rip), %rax    # 0x3e9048
movl (%rax), %eax
subl 0x146893(%rip), %eax    # 0x16a4c0
movl %eax, 0x146891(%rip)    # 0x16a4c4
movl 0x14688b(%rip), %eax    # 0x16a4c4
addl 0x146881(%rip), %eax    # 0x16a4c0
movl %eax, 0x14687b(%rip)    # 0x16a4c0
leaq 0x1971a4(%rip), %rax    # 0x1badf0
movsbl 0x37(%rax), %eax
cmpl $0x0, %eax
jle 0x23d05
cmpl $0x2, 0xbc348(%rip)     # 0xdffa8
jge 0x23d05
movl 0xbc33c(%rip), %eax     # 0xdffa8
addl $0x1, %eax
movl %eax, 0xbc333(%rip)     # 0xdffa8
movl -0x4(%rbp), %eax
movl -0x84(%rbp), %edx
movl 0xbc324(%rip), %ecx     # 0xdffa8
shll %cl, %edx
movl %edx, %ecx
cltd
idivl %ecx
movl -0x84(%rbp), %edx
movl 0xbc311(%rip), %ecx     # 0xdffa8
shll %cl, %edx
movl %edx, %ecx
imull %ecx, %eax
movl -0x84(%rbp), %edx
movl 0xbc2fe(%rip), %ecx     # 0xdffa8
shll %cl, %edx
movl %edx, %ecx
subl %ecx, %eax
movl %eax, -0x70(%rbp)
cmpl $0x0, -0x70(%rbp)
jge 0x23cc0
movl $0x0, -0x70(%rbp)
movl -0x70(%rbp), %eax
movl -0x8c(%rbp), %edx
movl 0xbc2d9(%rip), %ecx     # 0xdffa8
shll %ecx
shll %cl, %edx
movl $0x2400, %ecx           # imm = 0x2400
subl %edx, %ecx
cmpl %ecx, %eax
jle 0x23cfa
movl -0x8c(%rbp), %eax
movl 0xbc2be(%rip), %ecx     # 0xdffa8
shll %ecx
shll %cl, %eax
movl %eax, %ecx
movl $0x2400, %eax           # imm = 0x2400
subl %ecx, %eax
movl %eax, -0x70(%rbp)
leaq 0x1970ef(%rip), %rax    # 0x1badf0
movb $0x0, 0x37(%rax)
leaq 0x1970e4(%rip), %rax    # 0x1badf0
movsbl 0xb5(%rax), %eax
cmpl $0x0, %eax
jle 0x23dcb
cmpl $0x0, 0xbc285(%rip)     # 0xdffa8
jle 0x23dcb
movl 0xbc279(%rip), %eax     # 0xdffa8
addl $-0x1, %eax
movl %eax, 0xbc270(%rip)     # 0xdffa8
movl -0x4(%rbp), %eax
movl -0x84(%rbp), %edx
movl 0xbc261(%rip), %ecx     # 0xdffa8
shll %cl, %edx
movl %edx, %ecx
cltd
idivl %ecx
movl -0x84(%rbp), %edx
movl 0xbc24e(%rip), %ecx     # 0xdffa8
shll %cl, %edx
movl %edx, %ecx
imull %ecx, %eax
movl -0x84(%rbp), %edx
movl 0xbc23b(%rip), %ecx     # 0xdffa8
shll %cl, %edx
movl %edx, %ecx
subl %ecx, %eax
movl %eax, -0x70(%rbp)
cmpl $0x0, -0x70(%rbp)
jge 0x23d83
movl $0x0, -0x70(%rbp)
movl -0x70(%rbp), %eax
movl -0x8c(%rbp), %edx
movl 0xbc216(%rip), %ecx     # 0xdffa8
shll %ecx
shll %cl, %edx
movl $0x2400, %ecx           # imm = 0x2400
subl %edx, %ecx
cmpl %ecx, %eax
jle 0x23dbd
movl -0x8c(%rbp), %eax
movl 0xbc1fb(%rip), %ecx     # 0xdffa8
shll %ecx
shll %cl, %eax
movl %eax, %ecx
movl $0x2400, %eax           # imm = 0x2400
subl %ecx, %eax
movl %eax, -0x70(%rbp)
leaq 0x19702c(%rip), %rax    # 0x1badf0
movb $0x0, 0xb5(%rax)
leaq 0x19701e(%rip), %rax    # 0x1badf0
movsbl 0xcb(%rax), %eax
cmpl $0x0, %eax
jle 0x23dfb
cmpl $0x0, -0x4(%rbp)
jle 0x23dfb
movl -0x4(%rbp), %eax
addl $-0x1, %eax
movl %eax, -0x4(%rbp)
leaq 0x196ffc(%rip), %rax    # 0x1badf0
movb $0x0, 0xcb(%rax)
leaq 0x196fee(%rip), %rax    # 0x1badf0
movsbl 0xcd(%rax), %eax
cmpl $0x0, %eax
jle 0x23e2e
cmpl $0x23ff, -0x4(%rbp)     # imm = 0x23FF
jge 0x23e2e
movl -0x4(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x4(%rbp)
leaq 0x196fc9(%rip), %rax    # 0x1badf0
movb $0x0, 0xcd(%rax)
leaq 0x196fbb(%rip), %rax    # 0x1badf0
movsbl 0xc8(%rax), %eax
cmpl $0x0, %eax
jle 0x23e7e
movl -0x4(%rbp), %eax
movl -0x84(%rbp), %edx
movl 0xbc158(%rip), %ecx     # 0xdffa8
shll %cl, %edx
movl %edx, %ecx
cmpl %ecx, %eax
jl 0x23e7e
movl -0x84(%rbp), %eax
movl 0xbc144(%rip), %ecx     # 0xdffa8
shll %cl, %eax
movl %eax, %ecx
movl -0x4(%rbp), %eax
subl %ecx, %eax
movl %eax, -0x4(%rbp)
leaq 0x196f79(%rip), %rax    # 0x1badf0
movb $0x0, 0xc8(%rax)
leaq 0x196f6b(%rip), %rax    # 0x1badf0
movsbl 0xd0(%rax), %eax
cmpl $0x0, %eax
jle 0x23ecf
movl -0x4(%rbp), %eax
movl -0x84(%rbp), %edx
movl 0xbc108(%rip), %ecx     # 0xdffa8
shll %cl, %edx
movl $0x2400, %ecx           # imm = 0x2400
subl %edx, %ecx
cmpl %ecx, %eax
jge 0x23ecf
movl -0x84(%rbp), %eax
movl 0xbc0ef(%rip), %ecx     # 0xdffa8
shll %cl, %eax
addl -0x4(%rbp), %eax
movl %eax, -0x4(%rbp)
leaq 0x196f28(%rip), %rax    # 0x1badf0
movb $0x0, 0xd0(%rax)
leaq 0x196f1a(%rip), %rax    # 0x1badf0
movsbl 0xc9(%rax), %eax
cmpl $0x0, %eax
jle 0x23f2e
movl -0x4(%rbp), %eax
movl -0x84(%rbp), %edx
movl 0xbc0b7(%rip), %ecx     # 0xdffa8
shll %cl, %edx
movl %edx, %ecx
cmpl %ecx, %eax
jl 0x23f2e
movl -0x8c(%rbp), %eax
movl 0xbc0a3(%rip), %ecx     # 0xdffa8
shll %ecx
shll %cl, %eax
movl %eax, %ecx
movl -0x4(%rbp), %eax
subl %ecx, %eax
movl %eax, -0x4(%rbp)
cmpl $0x0, -0x4(%rbp)
jge 0x23f20
movl $0x0, -0x4(%rbp)
leaq 0x196ec9(%rip), %rax    # 0x1badf0
movb $0x0, 0xc9(%rax)
leaq 0x196ebb(%rip), %rax    # 0x1badf0
movsbl 0xd1(%rax), %eax
cmpl $0x0, %eax
jle 0x23f91
movl -0x4(%rbp), %eax
movl -0x84(%rbp), %edx
movl 0xbc058(%rip), %ecx     # 0xdffa8
shll %cl, %edx
movl $0x2400, %ecx           # imm = 0x2400
subl %edx, %ecx
cmpl %ecx, %eax
jge 0x23f91
movl -0x8c(%rbp), %eax
movl 0xbc03f(%rip), %ecx     # 0xdffa8
shll %ecx
shll %cl, %eax
addl -0x4(%rbp), %eax
movl %eax, -0x4(%rbp)
cmpl $0x2400, -0x4(%rbp)     # imm = 0x2400
jl 0x23f83
movl $0x23ff, -0x4(%rbp)     # imm = 0x23FF
leaq 0x196e66(%rip), %rax    # 0x1badf0
movb $0x0, 0xd1(%rax)
leaq 0x196e58(%rip), %rax    # 0x1badf0
movsbl 0x2f(%rax), %eax
cmpl $0x0, %eax
jle 0x24010
leaq 0x196e48(%rip), %rax    # 0x1badf0
movb $0x0, 0x2f(%rax)
movl -0x4(%rbp), %eax
movswl 0x15a55a(%rip), %ecx    # 0x17e510
cmpl %ecx, %eax
jge 0x23fce
movslq -0x4(%rbp), %rcx
leaq 0x155d4b(%rip), %rax    # 0x179d10
movswl (%rax,%rcx,2), %eax
movl %eax, -0x4(%rbp)
jmp 0x23fd5
movl $0x0, -0x4(%rbp)
movw $0x2400, 0x15a532(%rip) # imm = 0x2400
movl $0x0, -0x64(%rbp)
cmpl $0x2400, -0x64(%rbp)    # imm = 0x2400
jge 0x2400e
movl -0x64(%rbp), %eax
movw %ax, %dx
movslq -0x64(%rbp), %rcx
leaq 0x155d11(%rip), %rax    # 0x179d10
movw %dx, (%rax,%rcx,2)
movl -0x64(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x64(%rbp)
jmp 0x23fe5
jmp 0x24010
leaq 0x196dd9(%rip), %rax    # 0x1badf0
movsbl 0x22(%rax), %eax
cmpl $0x0, %eax
jle 0x2417c
movl -0x4(%rbp), %eax
movswl 0x15a4e2(%rip), %ecx    # 0x17e510
cmpl %ecx, %eax
jge 0x24046
movslq -0x4(%rbp), %rcx
leaq 0x155cd3(%rip), %rax    # 0x179d10
movswl (%rax,%rcx,2), %eax
movl %eax, -0x4(%rbp)
jmp 0x2404d
movl $0x0, -0x4(%rbp)
movw $0x2400, 0x15a4ba(%rip) # imm = 0x2400
movl $0x0, -0x64(%rbp)
cmpl $0x2400, -0x64(%rbp)    # imm = 0x2400
jge 0x24086
movl -0x64(%rbp), %eax
movw %ax, %dx
movslq -0x64(%rbp), %rcx
leaq 0x155c99(%rip), %rax    # 0x179d10
movw %dx, (%rax,%rcx,2)
movl -0x64(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x64(%rbp)
jmp 0x2405d
leaq 0x196d63(%rip), %rax    # 0x1badf0
movb $0x0, 0x22(%rax)
callq 0x2dee0
movl -0x4(%rbp), %eax
movl %eax, -0x68(%rbp)
leaq 0x196d4d(%rip), %rax    # 0x1badf0
movsbl 0x1(%rax), %eax
cmpl $0x0, %eax
jne 0x24177
callq 0xa6ab0
cmpl $0x0, %eax
je 0x240d2
leaq 0x196b3f(%rip), %rax    # 0x1bac00
cmpb $0x0, (%rax)
je 0x240d0
leaq 0x196b33(%rip), %rax    # 0x1bac00
movb $0x0, (%rax)
jmp 0x240d2
callq 0x2de70
movzbl %al, %eax
movl %eax, -0x80(%rbp)
leaq -0x60(%rbp), %rdi
movl -0x68(%rbp), %edx
leaq 0x8c30e(%rip), %rsi     # 0xb03f9
movb $0x0, %al
callq 0x6a30
movl 0x1463b0(%rip), %eax    # 0x16a4a8
movw %ax, %cx
movl 0x1463ab(%rip), %eax    # 0x16a4ac
leaq -0x60(%rbp), %r8
xorl %r9d, %r9d
movl %r9d, %edi
movl %r9d, %esi
movswl %cx, %edx
movswl %ax, %ecx
callq 0x59a30
callq 0xa67c0
cmpl $0x30, -0x80(%rbp)
jl 0x2414a
cmpl $0x39, -0x80(%rbp)
jg 0x2414a
imull $0xa, -0x68(%rbp), %eax
movl -0x80(%rbp), %ecx
subl $0x30, %ecx
addl %ecx, %eax
movl %eax, -0x64(%rbp)
cmpl $0x2400, -0x64(%rbp)    # imm = 0x2400
jge 0x24148
movl -0x64(%rbp), %eax
movl %eax, -0x68(%rbp)
jmp 0x24172
cmpl $0x8, -0x80(%rbp)
jne 0x24160
movl -0x68(%rbp), %eax
movl $0xa, %ecx
cltd
idivl %ecx
movl %eax, -0x68(%rbp)
jmp 0x24170
cmpl $0xd, -0x80(%rbp)
jne 0x2416e
movl -0x68(%rbp), %eax
movl %eax, -0x4(%rbp)
jmp 0x24177
jmp 0x24170
jmp 0x24172
jmp 0x2409c
callq 0xc2a0
jmp 0x2417e
movl -0x4(%rbp), %eax
cmpl -0x70(%rbp), %eax
jge 0x241a0
movl -0x84(%rbp), %eax
movl 0xbbe16(%rip), %ecx     # 0xdffa8
shll %cl, %eax
movl %eax, %ecx
movl -0x70(%rbp), %eax
subl %ecx, %eax
movl %eax, -0x70(%rbp)
jmp 0x2417e
jmp 0x241a2
movl -0x4(%rbp), %eax
movl -0x70(%rbp), %ecx
movl %ecx, -0x94(%rbp)
movl -0x8c(%rbp), %edx
movl 0xbbdee(%rip), %ecx     # 0xdffa8
shll %ecx
shll %cl, %edx
movl -0x94(%rbp), %ecx
addl %edx, %ecx
cmpl %ecx, %eax
jl 0x241e0
movl -0x84(%rbp), %eax
movl 0xbbdd2(%rip), %ecx     # 0xdffa8
shll %cl, %eax
addl -0x70(%rbp), %eax
movl %eax, -0x70(%rbp)
jmp 0x241a2
cmpl $0x0, -0x70(%rbp)
jge 0x241ed
movl $0x0, -0x70(%rbp)
movl -0x70(%rbp), %eax
movl -0x8c(%rbp), %edx
movl 0xbbdac(%rip), %ecx     # 0xdffa8
shll %ecx
shll %cl, %edx
movl $0x2400, %ecx           # imm = 0x2400
subl %edx, %ecx
cmpl %ecx, %eax
jle 0x24227
movl -0x8c(%rbp), %eax
movl 0xbbd91(%rip), %ecx     # 0xdffa8
shll %ecx
shll %cl, %eax
movl %eax, %ecx
movl $0x2400, %eax           # imm = 0x2400
subl %ecx, %eax
movl %eax, -0x70(%rbp)
jmp 0x23bc6
leaq 0x196bbd(%rip), %rax    # 0x1badf0
movsbl 0x1c(%rax), %eax
cmpl $0x0, %eax
jne 0x24244
movl -0x6c(%rbp), %eax
movl %eax, -0x4(%rbp)
jmp 0x2429c
movl -0x4(%rbp), %eax
movswl 0x15a2c2(%rip), %ecx    # 0x17e510
cmpl %ecx, %eax
jge 0x24294
movslq -0x4(%rbp), %rcx
leaq 0x155ab3(%rip), %rax    # 0x179d10
movswl (%rax,%rcx,2), %eax
movl %eax, -0x4(%rbp)
movslq -0x4(%rbp), %rcx
leaq 0x426b11(%rip), %rax    # 0x44ad80
movswl (%rax,%rcx,2), %eax
cmpl $0x0, %eax
je 0x2428c
movslq -0x4(%rbp), %rcx
leaq 0x4182bd(%rip), %rax    # 0x43c540
movswl (%rax,%rcx,2), %eax
cmpl $0x0, %eax
jne 0x24292
movl -0x6c(%rbp), %eax
movl %eax, -0x4(%rbp)
jmp 0x2429a
movl -0x6c(%rbp), %eax
movl %eax, -0x4(%rbp)
jmp 0x2429c
leaq 0x196b4d(%rip), %rax    # 0x1badf0
movb $0x0, 0x1(%rax)
leaq 0x196b42(%rip), %rax    # 0x1badf0
movb $0x0, 0x1c(%rax)
movl -0x4(%rbp), %eax
addq $0xa0, %rsp
popq %rbp
retq
nop