// File: /workspace/github_c_makefile_star2_O1/jonof[P]jftekwar/jfbuild/src/engine.c
// Function: hitscan
int hitscan(int xs, int ys, int zs, short sectnum, int vx, int vy, int vz,
	short *hitsect, short *hitwall, short *hitsprite,
	int *hitx, int *hity, int *hitz, unsigned int cliptype)
{
	sectortype *sec;
	walltype *wal, *wal2;
	spritetype *spr;
	int z, zz, x1, y1=0, z1=0, x2, y2, x3, y3, x4, y4, intx, inty, intz;
	int topt, topu, bot, dist, offx, offy, cstat;
	int i, j, k, l, tilenum, xoff, yoff, dax, day, daz, daz2;
	int ang, cosang, sinang, xspan, yspan, xrepeat, yrepeat;
	int dawalclipmask, dasprclipmask;
	short tempshortcnt, tempshortnum, dasector, startwall, endwall;
	short nextsector;
	unsigned char clipyou;

	*hitsect = -1; *hitwall = -1; *hitsprite = -1;
	if (sectnum < 0) return(-1);

	*hitx = hitscangoalx; *hity = hitscangoaly;

	dawalclipmask = (cliptype&65535);
	dasprclipmask = (cliptype>>16);

	clipsectorlist[0] = sectnum;
	tempshortcnt = 0; tempshortnum = 1;
	do
	{
		dasector = clipsectorlist[tempshortcnt]; sec = &sector[dasector];

		x1 = 0x7fffffff;
		if (sec->ceilingstat&2)
		{
			wal = &wall[sec->wallptr]; wal2 = &wall[wal->point2];
			dax = wal2->x-wal->x; day = wal2->y-wal->y;
			i = nsqrtasm(dax*dax+day*day); if (i == 0) continue;
			i = divscale15(sec->ceilingheinum,i);
			dax *= i; day *= i;

			j = (vz<<8)-dmulscale15(dax,vy,-day,vx);
			if (j != 0)
			{
				i = ((sec->ceilingz-zs)<<8)+dmulscale15(dax,ys-wal->y,-day,xs-wal->x);
				if (((i^j) >= 0) && ((klabs(i)>>1) < klabs(j)))
				{
					i = divscale30(i,j);
					x1 = xs + mulscale30(vx,i);
					y1 = ys + mulscale30(vy,i);
					z1 = zs + mulscale30(vz,i);
				}
			}
		}
		else if ((vz < 0) && (zs >= sec->ceilingz))
		{
			z1 = sec->ceilingz; i = z1-zs;
			if ((klabs(i)>>1) < -vz)
			{
				i = divscale30(i,vz);
				x1 = xs + mulscale30(vx,i);
				y1 = ys + mulscale30(vy,i);
			}
		}
		if ((x1 != 0x7fffffff) && (klabs(x1-xs)+klabs(y1-ys) < klabs((*hitx)-xs)+klabs((*hity)-ys)))
			if (inside(x1,y1,dasector) != 0)
			{
				*hitsect = dasector; *hitwall = -1; *hitsprite = -1;
				*hitx = x1; *hity = y1; *hitz = z1;
			}

		x1 = 0x7fffffff;
		if (sec->floorstat&2)
		{
			wal = &wall[sec->wallptr]; wal2 = &wall[wal->point2];
			dax = wal2->x-wal->x; day = wal2->y-wal->y;
			i = nsqrtasm(dax*dax+day*day); if (i == 0) continue;
			i = divscale15(sec->floorheinum,i);
			dax *= i; day *= i;

			j = (vz<<8)-dmulscale15(dax,vy,-day,vx);
			if (j != 0)
			{
				i = ((sec->floorz-zs)<<8)+dmulscale15(dax,ys-wal->y,-day,xs-wal->x);
				if (((i^j) >= 0) && ((klabs(i)>>1) < klabs(j)))
				{
					i = divscale30(i,j);
					x1 = xs + mulscale30(vx,i);
					y1 = ys + mulscale30(vy,i);
					z1 = zs + mulscale30(vz,i);
				}
			}
		}
		else if ((vz > 0) && (zs <= sec->floorz))
		{
			z1 = sec->floorz; i = z1-zs;
			if ((klabs(i)>>1) < vz)
			{
				i = divscale30(i,vz);
				x1 = xs + mulscale30(vx,i);
				y1 = ys + mulscale30(vy,i);
			}
		}
		if ((x1 != 0x7fffffff) && (klabs(x1-xs)+klabs(y1-ys) < klabs((*hitx)-xs)+klabs((*hity)-ys)))
			if (inside(x1,y1,dasector) != 0)
			{
				*hitsect = dasector; *hitwall = -1; *hitsprite = -1;
				*hitx = x1; *hity = y1; *hitz = z1;
			}

		startwall = sec->wallptr; endwall = startwall + sec->wallnum;
		for(z=startwall,wal=&wall[startwall];z<endwall;z++,wal++)
		{
			wal2 = &wall[wal->point2];
			x1 = wal->x; y1 = wal->y; x2 = wal2->x; y2 = wal2->y;

			if ((x1-xs)*(y2-ys) < (x2-xs)*(y1-ys)) continue;
			if (rintersect(xs,ys,zs,vx,vy,vz,x1,y1,x2,y2,&intx,&inty,&intz) == 0) continue;

			if (klabs(intx-xs)+klabs(inty-ys) >= klabs((*hitx)-xs)+klabs((*hity)-ys)) continue;

			nextsector = wal->nextsector;
			if ((nextsector < 0) || (wal->cstat&dawalclipmask))
			{
				*hitsect = dasector; *hitwall = z; *hitsprite = -1;
				*hitx = intx; *hity = inty; *hitz = intz;
				continue;
			}
			getzsofslope(nextsector,intx,inty,&daz,&daz2);
			if ((intz <= daz) || (intz >= daz2))
			{
				*hitsect = dasector; *hitwall = z; *hitsprite = -1;
				*hitx = intx; *hity = inty; *hitz = intz;
				continue;
			}

			for(zz=tempshortnum-1;zz>=0;zz--)
				if (clipsectorlist[zz] == nextsector) break;
			if (zz < 0) clipsectorlist[tempshortnum++] = nextsector;
		}

		for(z=headspritesect[dasector];z>=0;z=nextspritesect[z])
		{
			spr = &sprite[z];
			cstat = spr->cstat;
#if USE_POLYMOST
			if (!hitallsprites)
#endif
			if ((cstat&dasprclipmask) == 0) continue;

			x1 = spr->x; y1 = spr->y; z1 = spr->z;
			switch(cstat&48)
			{
				case 0:
					topt = vx*(x1-xs) + vy*(y1-ys); if (topt <= 0) continue;
					bot = vx*vx + vy*vy; if (bot == 0) continue;

					intz = zs+scale(vz,topt,bot);

					i = (tilesizy[spr->picnum]*spr->yrepeat<<2);
					if (cstat&128) z1 += (i>>1);
					if (picanm[spr->picnum]&0x00ff0000) z1 -= ((int)((signed char)((picanm[spr->picnum]>>16)&255))*spr->yrepeat<<2);
					if ((intz > z1) || (intz < z1-i)) continue;
					topu = vx*(y1-ys) - vy*(x1-xs);

					offx = scale(vx,topu,bot);
					offy = scale(vy,topu,bot);
					dist = offx*offx + offy*offy;
					i = tilesizx[spr->picnum]*spr->xrepeat; i *= i;
					if (dist > (i>>7)) continue;
					intx = xs + scale(vx,topt,bot);
					inty = ys + scale(vy,topt,bot);

					if (klabs(intx-xs)+klabs(inty-ys) > klabs((*hitx)-xs)+klabs((*hity)-ys)) continue;

					*hitsect = dasector; *hitwall = -1; *hitsprite = z;
					*hitx = intx; *hity = inty; *hitz = intz;
					break;
				case 16:
						//These lines get the 2 points of the rotated sprite
						//Given: (x1, y1) starts out as the center point
					tilenum = spr->picnum;
					xoff = (int)((signed char)((picanm[tilenum]>>8)&255))+((int)spr->xoffset);
					if ((cstat&4) > 0) xoff = -xoff;
					k = spr->ang; l = spr->xrepeat;
					dax = sintable[k&2047]*l; day = sintable[(k+1536)&2047]*l;
					l = tilesizx[tilenum]; k = (l>>1)+xoff;
					x1 -= mulscale16(dax,k); x2 = x1+mulscale16(dax,l);
					y1 -= mulscale16(day,k); y2 = y1+mulscale16(day,l);

					if ((cstat&64) != 0)   //back side of 1-way sprite
						if ((x1-xs)*(y2-ys) < (x2-xs)*(y1-ys)) continue;

					if (rintersect(xs,ys,zs,vx,vy,vz,x1,y1,x2,y2,&intx,&inty,&intz) == 0) continue;

					if (klabs(intx-xs)+klabs(inty-ys) > klabs((*hitx)-xs)+klabs((*hity)-ys)) continue;

					k = ((tilesizy[spr->picnum]*spr->yrepeat)<<2);
					if (cstat&128) daz = spr->z+(k>>1); else daz = spr->z;
					if (picanm[spr->picnum]&0x00ff0000) daz -= ((int)((signed char)((picanm[spr->picnum]>>16)&255))*spr->yrepeat<<2);
					if ((intz < daz) && (intz > daz-k))
					{
						*hitsect = dasector; *hitwall = -1; *hitsprite = z;
						*hitx = intx; *hity = inty; *hitz = intz;
					}
					break;
				case 32:
					if (vz == 0) continue;
					intz = z1;
					if (((intz-zs)^vz) < 0) continue;
					if ((cstat&64) != 0)
						if ((zs > intz) == ((cstat&8)==0)) continue;

					intx = xs+scale(intz-zs,vx,vz);
					inty = ys+scale(intz-zs,vy,vz);

					if (klabs(intx-xs)+klabs(inty-ys) > klabs((*hitx)-xs)+klabs((*hity)-ys)) continue;

					tilenum = spr->picnum;
					xoff = (int)((signed char)((picanm[tilenum]>>8)&255))+((int)spr->xoffset);
					yoff = (int)((signed char)((picanm[tilenum]>>16)&255))+((int)spr->yoffset);
					if ((cstat&4) > 0) xoff = -xoff;
					if ((cstat&8) > 0) yoff = -yoff;

					ang = spr->ang;
					cosang = sintable[(ang+512)&2047]; sinang = sintable[ang];
					xspan = tilesizx[tilenum]; xrepeat = spr->xrepeat;
					yspan = tilesizy[tilenum]; yrepeat = spr->yrepeat;

					dax = ((xspan>>1)+xoff)*xrepeat; day = ((yspan>>1)+yoff)*yrepeat;
					x1 += dmulscale16(sinang,dax,cosang,day)-intx;
					y1 += dmulscale16(sinang,day,-cosang,dax)-inty;
					l = xspan*xrepeat;
					x2 = x1 - mulscale16(sinang,l);
					y2 = y1 + mulscale16(cosang,l);
					l = yspan*yrepeat;
					k = -mulscale16(cosang,l); x3 = x2+k; x4 = x1+k;
					k = -mulscale16(sinang,l); y3 = y2+k; y4 = y1+k;

					clipyou = 0;
					if ((y1^y2) < 0)
					{
						if ((x1^x2) < 0) clipyou ^= (x1*y2<x2*y1)^(y1<y2);
						else if (x1 >= 0) clipyou ^= 1;
					}
					if ((y2^y3) < 0)
					{
						if ((x2^x3) < 0) clipyou ^= (x2*y3<x3*y2)^(y2<y3);
						else if (x2 >= 0) clipyou ^= 1;
					}
					if ((y3^y4) < 0)
					{
						if ((x3^x4) < 0) clipyou ^= (x3*y4<x4*y3)^(y3<y4);
						else if (x3 >= 0) clipyou ^= 1;
					}
					if ((y4^y1) < 0)
					{
						if ((x4^x1) < 0) clipyou ^= (x4*y1<x1*y4)^(y4<y1);
						else if (x4 >= 0) clipyou ^= 1;
					}

					if (clipyou != 0)
					{
						*hitsect = dasector; *hitwall = -1; *hitsprite = z;
						*hitx = intx; *hity = inty; *hitz = intz;
					}
					break;
			}
		}
		tempshortcnt++;
	} while (tempshortcnt < tempshortnum);
	return(0);
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0xa8, %rsp
movl %edx, 0xc(%rsp)
movl %esi, %r14d
movq %rdi, 0x10(%rsp)
movq 0xf8(%rsp), %rax
movq 0xf0(%rsp), %rdx
movq 0xe8(%rsp), %rsi
movw $0xffff, %di            # imm = 0xFFFF
movw %di, (%rsi)
movw %di, (%rdx)
movw %di, (%rax)
testw %cx, %cx
js 0x37307
movl 0x118(%rsp), %edx
movq 0x108(%rsp), %rsi
movq 0x100(%rsp), %rdi
movl 0xe0(%rsp), %r10d
movl 0x6d77c(%rip), %eax     # 0xa3834
movl %eax, (%rdi)
movl 0x6d778(%rip), %eax     # 0xa3838
movl %eax, (%rsi)
shrl $0x10, %edx
movl %edx, 0x90(%rsp)
movw %cx, 0x3fa46d(%rip)     # 0x430540
movl %r10d, %eax
shll $0x8, %eax
movl %eax, 0x78(%rsp)
movslq %r9d, %rcx
movl %r8d, 0x2c(%rsp)
movslq %r8d, %rax
movslq %r10d, %rdx
movl %edx, %esi
movq %rsi, 0xa0(%rsp)
movq %rdx, 0x70(%rsp)
negl %edx
movl %edx, 0x88(%rsp)
movq %rax, 0x50(%rsp)
imull %eax, %eax
movq %rcx, 0x58(%rsp)
imull %ecx, %ecx
addl %eax, %ecx
movq %rcx, 0x98(%rsp)
movw $0x1, %ax
movq %rax, 0x80(%rsp)
xorl %r11d, %r11d
xorl %r8d, %r8d
xorl %r10d, %r10d
movl %r9d, 0x4(%rsp)
movq %r14, 0x20(%rsp)
movq 0x10(%rsp), %rdi
movswq %r10w, %rax
leaq 0x3fa3f4(%rip), %rcx    # 0x430540
movzwl (%rcx,%rax,2), %eax
movw %ax, 0xa(%rsp)
movswq %ax, %rax
movq %rax, 0x30(%rsp)
leaq (%rax,%rax,4), %rax
leaq 0x20c8f7(%rip), %rcx    # 0x242a60
leaq (%rcx,%rax,8), %rbp
testb $0x2, 0xc(%rbp)
jne 0x361dd
movl %r10d, 0x68(%rsp)
movl $0x7fffffff, %ebx       # imm = 0x7FFFFFFF
cmpl $0x0, 0xe0(%rsp)
jns 0x36365
movl 0x4(%rbp), %ecx
movl %ecx, %eax
subl 0xc(%rsp), %eax
jg 0x36365
movl %eax, %edx
negl %edx
shrl %edx
cmpl 0x88(%rsp), %edx
jge 0x361d5
cltq
shlq $0x1e, %rax
cqto
idivq 0x70(%rsp)
movslq %eax, %r8
movq %r8, %rbx
imulq 0x50(%rsp), %rbx
shrq $0x1e, %rbx
addl %edi, %ebx
imulq 0x58(%rsp), %r8
shrq $0x1e, %r8
addl %r14d, %r8d
movl %ecx, %r11d
jmp 0x36365
movq %r8, %r15
movl %r9d, %r14d
movswq (%rbp), %rax
shlq $0x5, %rax
leaq 0x18185d(%rip), %rdx    # 0x1b7a50
movswq 0x8(%rax,%rdx), %rcx
shlq $0x5, %rcx
movl (%rax,%rdx), %esi
movl 0x4(%rax,%rdx), %edi
movl (%rcx,%rdx), %r9d
movl 0x4(%rcx,%rdx), %r8d
subl %esi, %r9d
subl %edi, %r8d
movl %r9d, %eax
imull %r9d, %eax
movl %r8d, %edx
imull %edx, %edx
addl %eax, %edx
movl %edx, %eax
shrl $0x18, %eax
orl $0x1000, %eax           # imm = 0x1000
movl %edx, %ecx
shrl $0xc, %ecx
cmpl $0x1000000, %edx        # imm = 0x1000000
cmovael %eax, %ecx
leaq 0x41ecbf(%rip), %rax    # 0x454f00
movzwl (%rax,%rcx,2), %ecx
shrl %cl, %edx
leaq 0x420eb2(%rip), %rax    # 0x457100
movzwl (%rax,%rdx,2), %edx
shrl $0x8, %ecx
shrl %cl, %edx
testl %edx, %edx
je 0x3661b
movl %r10d, 0x68(%rsp)
movswq 0x12(%rbp), %rax
shlq $0xf, %rax
movl %edx, %ecx
cqto
idivq %rcx
imull %eax, %r9d
imull %eax, %r8d
negl %r8d
movslq %r9d, %rdx
movq %rdx, %rcx
imulq 0x58(%rsp), %rcx
movslq %r8d, %rax
movq %rax, %r8
imulq 0x50(%rsp), %r8
addq %rcx, %r8
shrq $0xf, %r8
movl 0x78(%rsp), %ecx
movl $0x7fffffff, %ebx       # imm = 0x7FFFFFFF
subl %r8d, %ecx
je 0x36352
movl 0x4(%rbp), %r8d
subl 0xc(%rsp), %r8d
shll $0x8, %r8d
movq 0x20(%rsp), %r9
subl %edi, %r9d
movq 0x10(%rsp), %rdi
subl %esi, %edi
movslq %r9d, %rsi
imulq %rsi, %rdx
movslq %edi, %rsi
imulq %rsi, %rax
addq %rdx, %rax
shrq $0xf, %rax
addl %r8d, %eax
movl %eax, %edx
xorl %ecx, %edx
js 0x36352
movl %eax, %edx
negl %edx
cmovsl %eax, %edx
shrl %edx
movl %ecx, %esi
negl %esi
cmovsl %ecx, %esi
cmpl %esi, %edx
movq 0x20(%rsp), %rdx
movq 0x10(%rsp), %rdi
movl %r14d, %r9d
movq %rdx, %r14
movq %r15, %r8
jae 0x36365
cltq
shlq $0x1e, %rax
movslq %ecx, %rcx
cqto
idivq %rcx
movslq %eax, %r11
movq %r11, %rbx
imulq 0x50(%rsp), %rbx
shrq $0x1e, %rbx
addl %edi, %ebx
movq %r11, %r8
imulq 0x58(%rsp), %r8
shrq $0x1e, %r8
addl %r14d, %r8d
imulq 0x70(%rsp), %r11
shrq $0x1e, %r11
addl 0xc(%rsp), %r11d
jmp 0x36365
movq 0x20(%rsp), %rax
movq 0x10(%rsp), %rdi
movl %r14d, %r9d
movq %rax, %r14
movq %r15, %r8
cmpl $0x7fffffff, %ebx       # imm = 0x7FFFFFFF
je 0x36431
movl %ebx, %eax
subl %edi, %eax
movl %eax, %ecx
negl %ecx
cmovsl %eax, %ecx
movl %r8d, %eax
subl %r14d, %eax
movl %eax, %edx
negl %edx
cmovsl %eax, %edx
addl %ecx, %edx
movq 0x100(%rsp), %rax
movl (%rax), %eax
subl %edi, %eax
movl %eax, %ecx
negl %ecx
cmovsl %eax, %ecx
movq 0x108(%rsp), %rax
movl (%rax), %eax
subl %r14d, %eax
movl %eax, %esi
negl %esi
cmovsl %eax, %esi
addl %ecx, %esi
cmpl %esi, %edx
jae 0x36431
movswl 0xa(%rsp), %edx
movl %ebx, %edi
movl %r8d, %esi
movq %r11, %r14
movl %r9d, %r15d
movq %r8, %r12
callq 0x355a7
movq %r12, %r8
movl %r15d, %r9d
movq %r14, %r11
movq 0x10(%rsp), %rdi
movq 0x20(%rsp), %r14
testl %eax, %eax
je 0x36431
movq 0xe8(%rsp), %rax
movzwl 0xa(%rsp), %ecx
movw %cx, (%rax)
movq 0xf0(%rsp), %rax
movw $0xffff, %cx            # imm = 0xFFFF
movw %cx, (%rax)
movq 0xf8(%rsp), %rax
movw %cx, (%rax)
movq 0x100(%rsp), %rax
movl %ebx, (%rax)
movq 0x108(%rsp), %rax
movl %r8d, (%rax)
movq 0x110(%rsp), %rax
movl %r11d, (%rax)
testb $0x2, 0xe(%rbp)
jne 0x364a1
movq %r11, 0x38(%rsp)
movl $0x7fffffff, %ebx       # imm = 0x7FFFFFFF
cmpl $0x0, 0xe0(%rsp)
jle 0x3663d
movl 0x8(%rbp), %ecx
movl %ecx, %eax
subl 0xc(%rsp), %eax
jl 0x3663d
movl %eax, %edx
shrl %edx
cmpl 0xe0(%rsp), %edx
jge 0x3649a
cltq
shlq $0x1e, %rax
cqto
idivq 0xa0(%rsp)
movslq %eax, %r8
movq %r8, %rbx
imulq 0x50(%rsp), %rbx
shrq $0x1e, %rbx
addl %edi, %ebx
imulq 0x58(%rsp), %r8
shrq $0x1e, %r8
addl %r14d, %r8d
movl %ecx, %eax
jmp 0x36614
movq %r8, %r15
movl %r9d, %r14d
movswq (%rbp), %rax
shlq $0x5, %rax
leaq 0x181599(%rip), %rdx    # 0x1b7a50
movswq 0x8(%rax,%rdx), %rcx
shlq $0x5, %rcx
movl (%rax,%rdx), %esi
movl 0x4(%rax,%rdx), %edi
movl (%rcx,%rdx), %r9d
movl 0x4(%rcx,%rdx), %r8d
subl %esi, %r9d
subl %edi, %r8d
movl %r9d, %eax
imull %r9d, %eax
movl %r8d, %edx
imull %edx, %edx
addl %eax, %edx
movl %edx, %eax
shrl $0x18, %eax
orl $0x1000, %eax           # imm = 0x1000
movl %edx, %ecx
shrl $0xc, %ecx
cmpl $0x1000000, %edx        # imm = 0x1000000
cmovael %eax, %ecx
leaq 0x41e9fb(%rip), %rax    # 0x454f00
movzwl (%rax,%rcx,2), %ecx
shrl %cl, %edx
leaq 0x420bee(%rip), %rax    # 0x457100
movzwl (%rax,%rdx,2), %edx
shrl $0x8, %ecx
shrl %cl, %edx
testl %edx, %edx
je 0x372dc
movq %r11, 0x38(%rsp)
movswq 0x1a(%rbp), %rax
shlq $0xf, %rax
movl %edx, %ecx
cqto
idivq %rcx
imull %eax, %r9d
imull %eax, %r8d
negl %r8d
movslq %r9d, %rdx
movq %rdx, %rcx
movq 0x58(%rsp), %r10
imulq %r10, %rcx
movslq %r8d, %rax
movq %rax, %r8
movq 0x50(%rsp), %r11
imulq %r11, %r8
addq %rcx, %r8
shrq $0xf, %r8
movl 0x78(%rsp), %ecx
movl $0x7fffffff, %ebx       # imm = 0x7FFFFFFF
subl %r8d, %ecx
je 0x3662a
movl 0x8(%rbp), %r8d
subl 0xc(%rsp), %r8d
shll $0x8, %r8d
movq 0x20(%rsp), %r9
subl %edi, %r9d
movq 0x10(%rsp), %rdi
subl %esi, %edi
movslq %r9d, %rsi
imulq %rsi, %rdx
movslq %edi, %rsi
imulq %rsi, %rax
addq %rdx, %rax
shrq $0xf, %rax
addl %r8d, %eax
movl %eax, %edx
xorl %ecx, %edx
js 0x3662a
movl %eax, %edx
negl %edx
cmovsl %eax, %edx
shrl %edx
movl %ecx, %esi
negl %esi
cmovsl %ecx, %esi
cmpl %esi, %edx
movq 0x20(%rsp), %rdx
movq 0x10(%rsp), %rdi
movl %r14d, %r9d
movq %rdx, %r14
movq %r15, %r8
jae 0x3663d
cltq
shlq $0x1e, %rax
movslq %ecx, %rcx
cqto
idivq %rcx
cltq
movq %rax, %rbx
imulq %r11, %rbx
shrq $0x1e, %rbx
addl %edi, %ebx
movq %rax, %r8
imulq %r10, %r8
shrq $0x1e, %r8
addl %r14d, %r8d
imulq 0x70(%rsp), %rax
shrq $0x1e, %rax
addl 0xc(%rsp), %eax
movq %rax, 0x38(%rsp)
jmp 0x3663d
movq 0x20(%rsp), %rax
movq 0x10(%rsp), %rdi
jmp 0x372eb
movq 0x20(%rsp), %rax
movq 0x10(%rsp), %rdi
movl %r14d, %r9d
movq %rax, %r14
movq %r15, %r8
cmpl $0x7fffffff, %ebx       # imm = 0x7FFFFFFF
je 0x36707
movl %ebx, %eax
subl %edi, %eax
movl %eax, %ecx
negl %ecx
cmovsl %eax, %ecx
movl %r8d, %eax
subl %r14d, %eax
movl %eax, %edx
negl %edx
cmovsl %eax, %edx
addl %ecx, %edx
movq 0x100(%rsp), %rax
movl (%rax), %eax
subl %edi, %eax
movl %eax, %ecx
negl %ecx
cmovsl %eax, %ecx
movq 0x108(%rsp), %rax
movl (%rax), %eax
subl %r14d, %eax
movl %eax, %esi
negl %esi
cmovsl %eax, %esi
addl %ecx, %esi
cmpl %esi, %edx
jae 0x36707
movswl 0xa(%rsp), %edx
movl %ebx, %edi
movl %r8d, %esi
movl %r9d, %r14d
movq %r8, %r15
callq 0x355a7
movq %r15, %r8
movl %r14d, %r9d
movq 0x10(%rsp), %rdi
movq 0x20(%rsp), %r14
testl %eax, %eax
je 0x36707
movq 0xe8(%rsp), %rax
movzwl 0xa(%rsp), %ecx
movw %cx, (%rax)
movq 0xf0(%rsp), %rax
movw $0xffff, %cx            # imm = 0xFFFF
movw %cx, (%rax)
movq 0xf8(%rsp), %rax
movw %cx, (%rax)
movq 0x100(%rsp), %rax
movl %ebx, (%rax)
movq 0x108(%rsp), %rax
movl %r8d, (%rax)
movq 0x110(%rsp), %rax
movq 0x38(%rsp), %rcx
movl %ecx, (%rax)
movswq (%rbp), %r15
movzwl 0x2(%rbp), %eax
addw %r15w, %ax
cmpw %ax, %r15w
jge 0x36a0e
movswl %ax, %ebx
movq %r15, %r13
shlq $0x5, %r13
leaq 0x181321(%rip), %rbp    # 0x1b7a50
addq %rbp, %r13
movl 0x2c(%rsp), %ecx
movl %ebx, 0x18(%rsp)
movswq 0x8(%r13), %rdx
shlq $0x5, %rdx
movl (%r13), %eax
movl 0x4(%r13), %r8d
movl (%rdx,%rbp), %r10d
movl 0x4(%rdx,%rbp), %r11d
movl %eax, %esi
subl %edi, %esi
movl %r11d, %edx
subl %r14d, %edx
imull %esi, %edx
movl %r10d, %r12d
subl %edi, %r12d
movl %r8d, %esi
subl %r14d, %esi
imull %r12d, %esi
cmpl %esi, %edx
jl 0x368ce
subq $0x8, %rsp
movl %r14d, %esi
movl 0x14(%rsp), %edx
movq %rdi, %r12
movq %r8, %rbp
movl %r9d, %r8d
movl 0xe8(%rsp), %r9d
leaq 0x4c(%rsp), %rbx
pushq %rbx
leaq 0x58(%rsp), %rbx
pushq %rbx
leaq 0x64(%rsp), %rbx
pushq %rbx
pushq %r11
pushq %r10
movq %rbp, %rbx
pushq %rbp
pushq %rax
callq 0x3731e
addq $0x40, %rsp
testl %eax, %eax
je 0x3689b
movl 0x4c(%rsp), %esi
movl %esi, %eax
subl %r12d, %eax
movl %eax, %ecx
negl %ecx
cmovsl %eax, %ecx
movl 0x48(%rsp), %ebp
movl %ebp, %eax
subl %r14d, %eax
movl %eax, %edx
negl %edx
cmovsl %eax, %edx
addl %ecx, %edx
movq 0x100(%rsp), %rax
movl (%rax), %eax
subl %r12d, %eax
movl %eax, %ecx
negl %ecx
cmovsl %eax, %ecx
movq 0x108(%rsp), %rax
movl (%rax), %eax
subl %r14d, %eax
movl %eax, %edi
negl %edi
cmovsl %eax, %edi
addl %ecx, %edi
cmpl %edi, %edx
movq %r12, %rdi
jae 0x368b7
movq %r14, %rdx
movzwl 0xc(%r13), %r14d
testw %r14w, %r14w
movq %rbx, %r8
js 0x3683b
movzwl 0xe(%r13), %eax
testl %eax, 0x118(%rsp)
je 0x368e3
movq 0xe8(%rsp), %rax
movzwl 0xa(%rsp), %ecx
movw %cx, (%rax)
movq 0xf0(%rsp), %rax
movw %r15w, (%rax)
movq 0xf8(%rsp), %rax
movw $0xffff, (%rax)         # imm = 0xFFFF
movq 0x100(%rsp), %rax
movl %esi, (%rax)
movq 0x108(%rsp), %rax
movl %ebp, (%rax)
movl 0x44(%rsp), %eax
movq 0x110(%rsp), %rcx
movl %eax, (%rcx)
movl 0x4(%rsp), %r9d
movl 0x2c(%rsp), %ecx
leaq 0x1811ba(%rip), %rbp    # 0x1b7a50
movq %rdx, %r14
jmp 0x368ca
movq %r12, %rdi
movl 0x4(%rsp), %r9d
movq %rbx, %r8
movl 0x18(%rsp), %ebx
leaq 0x18119f(%rip), %rbp    # 0x1b7a50
movl 0x2c(%rsp), %ecx
jmp 0x368ce
movl 0x2c(%rsp), %ecx
leaq 0x18118e(%rip), %rbp    # 0x1b7a50
movl 0x4(%rsp), %r9d
movq %rbx, %r8
movl 0x18(%rsp), %ebx
incl %r15d
addq $0x20, %r13
cmpl %ebx, %r15d
jne 0x3673a
jmp 0x36a0e
movswl %r14w, %edi
movl %esi, %r12d
movl %ebp, %edx
leaq 0x6c(%rsp), %rcx
leaq 0x94(%rsp), %r8
callq 0x2600d
movl 0x44(%rsp), %eax
cmpl 0x6c(%rsp), %eax
jle 0x369a7
cmpl 0x94(%rsp), %eax
jge 0x369a7
movswl 0x80(%rsp), %r9d
movl %r9d, %eax
sarl $0x1f, %eax
andl %r9d, %eax
leaq 0x3f9c0e(%rip), %rdx    # 0x430540
leaq (%rdx,%r9,2), %rdx
addq $-0x2, %rdx
movl 0x2c(%rsp), %ecx
movq 0x20(%rsp), %r10
movq 0x10(%rsp), %rdi
leaq 0x181101(%rip), %rbp    # 0x1b7a50
movq %rbx, %r8
movl 0x18(%rsp), %ebx
testl %r9d, %r9d
jle 0x36971
decl %r9d
leaq -0x2(%rdx), %rsi
cmpw %r14w, (%rdx)
movq %rsi, %rdx
jne 0x36956
incl %r9d
movl %r9d, %eax
testl %eax, %eax
jg 0x3699a
movq 0x80(%rsp), %rdx
movswq %dx, %rax
leal 0x1(%rdx), %esi
leaq 0x3f9bb5(%rip), %rdx    # 0x430540
movw %r14w, (%rdx,%rax,2)
movl %esi, %eax
movq %rax, 0x80(%rsp)
movl 0x4(%rsp), %r9d
movq %r10, %r14
jmp 0x368ce
movq 0xe8(%rsp), %rcx
movzwl 0xa(%rsp), %edx
movw %dx, (%rcx)
movq 0xf0(%rsp), %rcx
movw %r15w, (%rcx)
movq 0xf8(%rsp), %rcx
movw $0xffff, (%rcx)         # imm = 0xFFFF
movq 0x100(%rsp), %rcx
movl %r12d, (%rcx)
movq 0x108(%rsp), %rcx
movl %ebp, (%rcx)
movq 0x110(%rsp), %rcx
movl %eax, (%rcx)
movl 0x4(%rsp), %r9d
movl 0x2c(%rsp), %ecx
movq 0x20(%rsp), %r14
movq 0x10(%rsp), %rdi
leaq 0x181047(%rip), %rbp    # 0x1b7a50
jmp 0x368c7
movl 0x6c(%rsp), %eax
movl %eax, 0x7c(%rsp)
leaq 0x374af3(%rip), %rax    # 0x3ab510
movq 0x30(%rsp), %rcx
movzwl (%rax,%rcx,2), %ebx
testw %bx, %bx
js 0x372c5
leaq 0x24527a(%rip), %rbp    # 0x27bcb0
movq 0x38(%rsp), %r11
movzwl %bx, %esi
imulq $0x2c, %rsi, %r15
movzwl 0xc(%r15,%rbp), %r12d
movl 0x90(%rsp), %eax
andl %r12d, %eax
orl 0x180fe0(%rip), %eax    # 0x1b7a38
je 0x36ec0
addq %rbp, %r15
movl (%r15), %r10d
movl 0x4(%r15), %r8d
movl 0x8(%r15), %r11d
movl %r12d, %eax
shrl $0x4, %eax
andl $0x3, %eax
leaq 0x3f3c4(%rip), %rcx     # 0x75e40
movslq (%rcx,%rax,4), %rax
addq %rcx, %rax
jmpq *%rax
movq %r11, %rbp
movq %rsi, 0x18(%rsp)
movq 0x98(%rsp), %r13
testl %r13d, %r13d
sete %cl
subl %edi, %r10d
movl %r10d, %edx
imull 0x2c(%rsp), %edx
movq %r14, %rax
movl %r8d, %r14d
movq %rax, %rsi
subl %eax, %r14d
movl %r14d, %eax
imull %r9d, %eax
addl %edx, %eax
setle %dl
orb %cl, %dl
je 0x36d76
movq %rsi, %r14
movq 0x18(%rsp), %rsi
movq %rbp, %r11
jmp 0x36ca2
cmpl $0x0, 0xe0(%rsp)
je 0x36bae
movl %r11d, 0x44(%rsp)
movl %r11d, %eax
subl 0xc(%rsp), %eax
movl %eax, %ecx
xorl 0xe0(%rsp), %ecx
js 0x36bae
testb $0x40, %r12b
je 0x36b1c
cmpl 0xc(%rsp), %r11d
setl %cl
testb $0x8, %r12b
sete %dl
cmpb %cl, %dl
je 0x36bae
movq %r8, 0x30(%rsp)
movq %rsi, 0x18(%rsp)
movslq %eax, %rcx
movq %rcx, %rax
imulq 0x50(%rsp), %rax
cqto
movq 0x70(%rsp), %r8
idivq %r8
movq %rax, %rsi
leal (%rax,%rdi), %r13d
movl %r13d, 0x4c(%rsp)
imulq 0x58(%rsp), %rcx
movq %rcx, %rax
cqto
idivq %r8
leal (%rax,%r14), %edx
movl %esi, %ecx
negl %ecx
cmovsl %esi, %ecx
movl %eax, %esi
negl %esi
cmovsl %eax, %esi
movl %edx, 0x48(%rsp)
addl %ecx, %esi
movq 0x100(%rsp), %rax
movl (%rax), %eax
subl %edi, %eax
movl %eax, %ecx
negl %ecx
cmovsl %eax, %ecx
movq 0x108(%rsp), %rax
movl (%rax), %eax
subl %r14d, %eax
movl %eax, %r8d
negl %r8d
cmovsl %eax, %r8d
addl %ecx, %r8d
cmpl %r8d, %esi
jbe 0x36f60
movq 0x30(%rsp), %r8
jmp 0x36ebb
jmp 0x36ec0
movq %rsi, 0x18(%rsp)
movq %r11, 0x38(%rsp)
movswq 0xe(%r15), %rbp
leaq 0x202e97(%rip), %rax    # 0x239a60
movl (%rax,%rbp,4), %r13d
movl %r13d, %eax
shrl $0x8, %eax
movsbl %al, %eax
movsbl 0x16(%r15), %ecx
addl %eax, %ecx
movl %ecx, %edx
negl %edx
testb $0x4, %r12b
cmovel %ecx, %edx
movzwl 0x1c(%r15), %ecx
movzbl 0x14(%r15), %esi
movl %ecx, %eax
movq %r8, %r11
movl $0x7ff, %r8d            # imm = 0x7FF
andl %r8d, %eax
leaq 0x397149(%rip), %r9     # 0x3cdd50
movswq (%r9,%rax,2), %rax
imulq %rsi, %rax
addl $0x600, %ecx            # imm = 0x600
andl %r8d, %ecx
movq %r11, %r8
movswq (%r9,%rcx,2), %r11
imulq %rsi, %r11
leaq 0x3d83f4(%rip), %rcx    # 0x40f020
movq %rbp, 0x30(%rsp)
movswq (%rcx,%rbp,2), %rcx
movl %ecx, %esi
sarl %esi
addl %edx, %esi
movslq %esi, %rdx
movq %rdx, %rsi
imulq %rax, %rsi
shrq $0x10, %rsi
subl %esi, %r10d
imulq %rcx, %rax
shrq $0x10, %rax
addl %r10d, %eax
imulq %r11, %rdx
shrq $0x10, %rdx
subl %edx, %r8d
imulq %rcx, %r11
shrq $0x10, %r11
addl %r8d, %r11d
testb $0x40, %r12b
je 0x36cae
movl %r10d, %ecx
subl %edi, %ecx
movl %r11d, %edx
subl %r14d, %edx
imull %ecx, %edx
movl %eax, %ecx
subl %edi, %ecx
movl %r8d, %esi
subl %r14d, %esi
imull %ecx, %esi
cmpl %esi, %edx
jge 0x36cae
movl 0x4(%rsp), %r9d
movq 0x38(%rsp), %r11
movq 0x18(%rsp), %rsi
leaq 0x245007(%rip), %rbp    # 0x27bcb0
jmp 0x36ec0
movl %r13d, 0x8c(%rsp)
subq $0x8, %rsp
movl %r14d, %esi
movl 0x14(%rsp), %edx
movl 0x34(%rsp), %ecx
movq %r8, %r13
movl 0xc(%rsp), %r8d
movl 0xe8(%rsp), %r9d
leaq 0x4c(%rsp), %rbp
pushq %rbp
leaq 0x58(%rsp), %rbp
pushq %rbp
leaq 0x64(%rsp), %rbp
pushq %rbp
pushq %r11
pushq %rax
pushq %r13
pushq %r10
callq 0x3731e
addq $0x40, %rsp
testl %eax, %eax
je 0x36e96
movl 0x4c(%rsp), %r8d
movl %r8d, %eax
movq 0x10(%rsp), %r9
subl %r9d, %eax
movl %eax, %ecx
negl %ecx
cmovsl %eax, %ecx
movl 0x48(%rsp), %edx
movl %edx, %eax
subl %r14d, %eax
movl %eax, %esi
negl %esi
cmovsl %eax, %esi
addl %ecx, %esi
movq 0x100(%rsp), %rax
movl (%rax), %eax
subl %r9d, %eax
movl %eax, %ecx
negl %ecx
cmovsl %eax, %ecx
movq 0x108(%rsp), %rax
movl (%rax), %eax
subl %r14d, %eax
movl %eax, %edi
negl %edi
cmovsl %eax, %edi
addl %ecx, %edi
cmpl %edi, %esi
movq %r9, %rdi
movq 0x38(%rsp), %r11
jbe 0x36ed9
movl %r13d, %r8d
movl 0x4(%rsp), %r9d
leaq 0x244f3f(%rip), %rbp    # 0x27bcb0
jmp 0x36ebb
movq %r8, 0x30(%rsp)
movl %eax, %esi
movq %rsi, %rax
imulq 0x70(%rsp), %rax
cqto
idivq %r13
movq %rax, %rcx
addl 0xc(%rsp), %ecx
movl %ecx, 0x44(%rsp)
movswq 0xe(%r15), %r13
leaq 0x3c9a3e(%rip), %rax    # 0x4007e0
movswl (%rax,%r13,2), %eax
movzbl 0x15(%r15), %edx
imull %edx, %eax
movsbl %r12b, %r8d
sarl $0x7, %r8d
leal (%rax,%rax), %r11d
andl %r8d, %r11d
addl %r11d, %ebp
movq %rbp, %r11
leaq 0x202c95(%rip), %rdi    # 0x239a60
movl (%rdi,%r13,4), %r8d
testl $0xff0000, %r8d         # imm = 0xFF0000
je 0x36dea
shrl $0x10, %r8d
movsbl %r8b, %r8d
imull %r8d, %edx
shll $0x2, %edx
subl %edx, %r11d
movq 0x30(%rsp), %r8
leaq 0x244eba(%rip), %rbp    # 0x27bcb0
cmpl %r11d, %ecx
movq 0x10(%rsp), %rdi
jg 0x36eb1
shll $0x2, %eax
movl %r11d, %edx
subl %eax, %edx
cmpl %edx, %ecx
jl 0x36eb1
movq %r11, %r12
imull 0x2c(%rsp), %r14d
imull 0x4(%rsp), %r10d
subl %r10d, %r14d
movslq %r14d, %rdi
movq %rdi, %rax
movq 0x50(%rsp), %r10
imulq %r10, %rax
cqto
movq 0x98(%rsp), %r14
idivq %r14
movq %rax, %r8
movq 0x58(%rsp), %r11
imulq %r11, %rdi
movq %rdi, %rax
cqto
idivq %r14
imull %r8d, %r8d
imull %eax, %eax
addl %r8d, %eax
leaq 0x3d81b9(%rip), %rdx    # 0x40f020
movswl (%rdx,%r13,2), %edx
movzbl 0x14(%r15), %edi
imull %edx, %edi
imull %edi, %edi
shrl $0x7, %edi
cmpl %edi, %eax
jbe 0x37080
movq 0x30(%rsp), %r8
movq 0x20(%rsp), %r14
movq 0x10(%rsp), %rdi
movq %r12, %r11
jmp 0x36eb6
movl %r13d, %r8d
movl 0x4(%rsp), %r9d
movq 0x10(%rsp), %rdi
leaq 0x244e06(%rip), %rbp    # 0x27bcb0
movq 0x38(%rsp), %r11
jmp 0x36ebb
movq 0x20(%rsp), %r14
movl 0x4(%rsp), %r9d
movq 0x18(%rsp), %rsi
leaq 0x37e659(%rip), %rax    # 0x3b5520
movzwl (%rax,%rsi,2), %ebx
testw %bx, %bx
jns 0x36a3b
jmp 0x372ca
movl %r8d, 0x64(%rsp)
leaq 0x3c98fb(%rip), %rax    # 0x4007e0
movq 0x30(%rsp), %rcx
movswl (%rax,%rcx,2), %eax
movzbl 0x15(%r15), %ecx
imull %ecx, %eax
movsbl %r12b, %esi
sarl $0x7, %esi
leal (%rax,%rax), %r8d
andl %esi, %r8d
addl %r11d, %r8d
movl 0x8c(%rsp), %esi
testl $0xff0000, %esi         # imm = 0xFF0000
leaq 0x244d95(%rip), %rbp    # 0x27bcb0
je 0x36f2c
shll $0x8, %esi
sarl $0x16, %esi
andl $-0x4, %esi
imull %ecx, %esi
subl %esi, %r8d
movl 0x44(%rsp), %ecx
cmpl %r8d, %ecx
movl 0x4(%rsp), %r9d
movl %r8d, 0x7c(%rsp)
jge 0x3711c
shll $0x2, %eax
movl %r8d, %esi
subl %eax, %esi
movl %r13d, %r8d
cmpl %esi, %ecx
movq 0x18(%rsp), %rsi
jg 0x3726e
jmp 0x36ec0
movq %r11, 0x38(%rsp)
movswq 0xe(%r15), %rax
leaq 0x202aef(%rip), %rcx    # 0x239a60
movl (%rcx,%rax,4), %ecx
movl %ecx, %esi
shrl $0x8, %esi
movsbl %sil, %esi
movsbl 0x16(%r15), %edi
addl %esi, %edi
shrl $0x10, %ecx
movsbl %cl, %ecx
movsbl 0x17(%r15), %esi
addl %ecx, %esi
movl %edi, %r8d
negl %r8d
testb $0x4, %r12b
cmovel %edi, %r8d
movl %esi, %r11d
negl %r11d
testb $0x8, %r12b
cmovel %esi, %r11d
movswq 0x1c(%r15), %rsi
leal 0x200(%rsi), %ecx
andl $0x7ff, %ecx            # imm = 0x7FF
leaq 0x396d8b(%rip), %rdi    # 0x3cdd50
movswq (%rdi,%rcx,2), %rcx
movswq (%rdi,%rsi,2), %r9
leaq 0x3d804a(%rip), %rsi    # 0x40f020
movswq (%rsi,%rax,2), %r14
movzbl 0x14(%r15), %edi
leaq 0x3c97f9(%rip), %rsi    # 0x4007e0
movswq (%rsi,%rax,2), %r12
movzbl 0x15(%r15), %esi
movl %r14d, %eax
sarl %eax
addl %r8d, %eax
movslq %eax, %r8
imulq %rdi, %r8
movl %r12d, %eax
sarl %eax
addl %r11d, %eax
movslq %eax, %r15
imulq %rsi, %r15
movq %r8, %r11
imulq %r9, %r11
movq %r15, %rax
imulq %rcx, %rax
addq %r11, %rax
shrq $0x10, %rax
movl %r13d, 0x64(%rsp)
subl %r13d, %eax
addl %r10d, %eax
imulq %r9, %r15
imulq %rcx, %r8
subq %r8, %r15
shrq $0x10, %r15
subl %edx, %r15d
addl 0x30(%rsp), %r15d
imulq %r14, %rdi
movq %rdi, %r8
imulq %r9, %r8
shrq $0x10, %r8
movl %eax, %r10d
subl %r8d, %r10d
imulq %rcx, %rdi
shrq $0x10, %rdi
leal (%r15,%rdi), %r14d
movl %r14d, %r8d
movq %r15, 0x30(%rsp)
xorl %r15d, %r8d
js 0x37124
xorl %r15d, %r15d
jmp 0x37154
movq %rsi, %rax
imulq %r10, %rax
cqto
idivq %r14
movq %rax, %rdi
movq 0x10(%rsp), %r10
addl %r10d, %eax
movl %eax, 0x64(%rsp)
movl %eax, 0x4c(%rsp)
imulq %r11, %rsi
movq %rsi, %rax
cqto
idivq %r14
movq 0x20(%rsp), %r14
leal (%rax,%r14), %edx
movl %edx, 0x48(%rsp)
movl %edi, %esi
negl %esi
cmovsl %edi, %esi
movl %eax, %edi
negl %edi
cmovsl %eax, %edi
addl %esi, %edi
movq 0x100(%rsp), %rax
movl (%rax), %eax
subl %r10d, %eax
movl %eax, %esi
negl %esi
cmovsl %eax, %esi
movq 0x108(%rsp), %rax
movl (%rax), %eax
subl %r14d, %eax
movl %eax, %r9d
negl %r9d
cmovsl %eax, %r9d
addl %esi, %r9d
movq 0x30(%rsp), %rax
movl %eax, %r8d
cmpl %r9d, %edi
movq %r10, %rdi
movq %r12, %r11
movl 0x4(%rsp), %r9d
movq 0x18(%rsp), %rsi
ja 0x36ec0
jmp 0x3726e
movl %r13d, %r8d
jmp 0x36ebb
movl %r10d, %r8d
xorl %eax, %r8d
js 0x37134
testl %eax, %eax
setns %r15b
jmp 0x37154
movl %r14d, %r8d
imull %eax, %r8d
movl %r10d, %r11d
imull 0x30(%rsp), %r11d
cmpl %r11d, %r8d
setl %r8b
testl %edi, %edi
setg %r15b
xorb %r8b, %r15b
imulq %r12, %rsi
imulq %rsi, %rcx
shrq $0x10, %rcx
movl %r10d, %r11d
subl %ecx, %r11d
imulq %r9, %rsi
shrq $0x10, %rsi
movl %r14d, %r9d
subl %esi, %r9d
movl %r9d, %r8d
xorl %r14d, %r8d
jns 0x371b5
movl %r11d, %r8d
xorl %r10d, %r8d
js 0x37193
testl %r10d, %r10d
setns %r8b
xorb %r15b, %r8b
movl %r8d, %r15d
jmp 0x371b5
imull %r9d, %r10d
movl %r11d, %r8d
imull %r14d, %r8d
cmpl %r8d, %r10d
setl %r8b
cmpl %r9d, %r14d
setl %r10b
xorb %r15b, %r10b
xorb %r8b, %r10b
movl %r10d, %r15d
movl %eax, %r10d
subl %ecx, %r10d
movq 0x30(%rsp), %r8
movl %r8d, %ecx
subl %esi, %ecx
movl %r9d, %esi
xorl %ecx, %esi
movl 0x4(%rsp), %r14d
movq 0x10(%rsp), %rdi
jns 0x37219
movl %r11d, %esi
xorl %r10d, %esi
js 0x371ed
testl %r11d, %r11d
setns %sil
xorb %r15b, %sil
movl %esi, %r15d
jmp 0x37219
imull %ecx, %r11d
movl %r9d, %esi
imull %r10d, %esi
cmpl %esi, %r11d
setl %sil
cmpl %ecx, %r9d
setl %r8b
xorb %r15b, %r8b
xorb %sil, %r8b
movl %r8d, %r15d
movq 0x30(%rsp), %r8
movq 0x10(%rsp), %rdi
movl %r14d, %r9d
movl %ecx, %esi
xorl %r8d, %esi
movq 0x20(%rsp), %r14
movq 0x38(%rsp), %r11
jns 0x3725d
movl %r10d, %esi
xorl %eax, %esi
js 0x37242
testl %r10d, %r10d
setns %al
xorb %r15b, %al
movl %eax, %r15d
jmp 0x3725d
imull %r8d, %r10d
imull %ecx, %eax
cmpl %eax, %r10d
setl %al
cmpl %r8d, %ecx
setl %cl
xorb %r15b, %cl
xorb %al, %cl
movl %ecx, %r15d
movq 0x18(%rsp), %rsi
movl %r11d, %ecx
testb %r15b, %r15b
je 0x36ec0
movq 0xe8(%rsp), %rax
movq %rsi, %r10
movzwl 0xa(%rsp), %esi
movw %si, (%rax)
movq %r10, %rsi
movq 0xf0(%rsp), %rax
movw $0xffff, (%rax)         # imm = 0xFFFF
movq 0xf8(%rsp), %rax
movw %bx, (%rax)
movq 0x100(%rsp), %rax
movl 0x64(%rsp), %r10d
movl %r10d, (%rax)
movq 0x108(%rsp), %rax
movl %edx, (%rax)
movq 0x110(%rsp), %rax
movl %ecx, (%rax)
jmp 0x36ec0
movq 0x38(%rsp), %r11
movl 0x7c(%rsp), %eax
movl %eax, 0x6c(%rsp)
movl 0x68(%rsp), %r10d
incl %r10d
jmp 0x372f4
movq 0x20(%rsp), %rax
movq 0x10(%rsp), %rdi
movl 0x68(%rsp), %r10d
movl %r14d, %r9d
movq %rax, %r14
movq %r15, %r8
cmpw 0x80(%rsp), %r10w
jl 0x36141
xorl %eax, %eax
jmp 0x3730c
movl $0xffffffff, %eax       # imm = 0xFFFFFFFF
addq $0xa8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq