// File: /workspace/github_c_makefile_star2_O3/jonof[P]jftekwar/jfbuild/src/engine.c
// Function: drawmapview
void drawmapview(int dax, int day, int zoome, short ang)
{
	walltype *wal;
	sectortype *sec;
	spritetype *spr;
	int tilenum, xoff, yoff, i, j, k, l, cosang, sinang, xspan, yspan;
	int xrepeat, yrepeat, x, y, x1, y1, x2, y2, x3, y3, x4, y4, bakx1, baky1;
	int s, w, ox, oy, startwall, cx1, cy1, cx2, cy2;
	int bakgxvect, bakgyvect, sortnum, gap, npoints;
	int xvect, yvect, xvect2, yvect2, daslope;

	beforedrawrooms = 0;

	clearbuf(&gotsector[0],(int)((numsectors+31)>>5),0L);

	cx1 = (windowx1<<12); cy1 = (windowy1<<12);
	cx2 = ((windowx2+1)<<12)-1; cy2 = ((windowy2+1)<<12)-1;
	zoome <<= 8;
	bakgxvect = divscale28(sintable[(1536-ang)&2047],zoome);
	bakgyvect = divscale28(sintable[(2048-ang)&2047],zoome);
	xvect = mulscale8(sintable[(2048-ang)&2047],zoome);
	yvect = mulscale8(sintable[(1536-ang)&2047],zoome);
	xvect2 = mulscale16(xvect,yxaspect);
	yvect2 = mulscale16(yvect,yxaspect);

	sortnum = 0;

	for(s=0,sec=&sector[s];s<numsectors;s++,sec++)
		if (show2dsector[s>>3]&pow2char[s&7])
		{
			npoints = 0; i = 0;
			startwall = sec->wallptr;
#if 0
			for(w=sec->wallnum,wal=&wall[startwall];w>0;w--,wal++)
			{
				ox = wal->x - dax; oy = wal->y - day;
				x = dmulscale16(ox,xvect,-oy,yvect) + (xdim<<11);
				y = dmulscale16(oy,xvect2,ox,yvect2) + (ydim<<11);
				i |= getclipmask(x-cx1,cx2-x,y-cy1,cy2-y);
				rx1[npoints] = x;
				ry1[npoints] = y;
				xb1[npoints] = wal->point2 - startwall;
				npoints++;
			}
#else
			j = startwall; l = 0;
			for(w=sec->wallnum,wal=&wall[startwall];w>0;w--,wal++,j++)
			{
				k = lastwall(j);
				if ((k > j) && (npoints > 0)) { xb1[npoints-1] = l; l = npoints; } //overwrite point2
					//wall[k].x wal->x wall[wal->point2].x
					//wall[k].y wal->y wall[wal->point2].y
				if (!dmulscale1(wal->x-wall[k].x,wall[wal->point2].y-wal->y,-(wal->y-wall[k].y),wall[wal->point2].x-wal->x)) continue;
				ox = wal->x - dax; oy = wal->y - day;
				x = dmulscale16(ox,xvect,-oy,yvect) + (xdim<<11);
				y = dmulscale16(oy,xvect2,ox,yvect2) + (ydim<<11);
				i |= getclipmask(x-cx1,cx2-x,y-cy1,cy2-y);
				rx1[npoints] = x;
				ry1[npoints] = y;
				xb1[npoints] = npoints+1;
				npoints++;
			}
			if (npoints > 0) xb1[npoints-1] = l; //overwrite point2
#endif
			if ((i&0xf0) != 0xf0) continue;
			bakx1 = rx1[0]; baky1 = mulscale16(ry1[0]-(ydim<<11),xyaspect)+(ydim<<11);
			if (i&0x0f)
			{
				npoints = clippoly(npoints,i);
				if (npoints < 3) continue;
			}

				//Collect floor sprites to draw
			for(i=headspritesect[s];i>=0;i=nextspritesect[i])
				if ((sprite[i].cstat&48) == 32)
				{
					if ((sprite[i].cstat&(64+8)) == (64+8)) continue;
					tsprite[sortnum++].owner = i;
				}

			gotsector[s>>3] |= pow2char[s&7];

			globalorientation = (int)sec->floorstat;
			if ((globalorientation&1) != 0) continue;

			globalpal = sec->floorpal;
			if (palookup[sec->floorpal] != globalpalwritten)
			{
				globalpalwritten = palookup[sec->floorpal];
				if (!globalpalwritten) globalpalwritten = palookup[0];	// JBF: fixes null-pointer crash
				setpalookupaddress(globalpalwritten);
			}
			globalpicnum = sec->floorpicnum;
			if ((unsigned)globalpicnum >= (unsigned)MAXTILES) globalpicnum = 0;
			setgotpic(globalpicnum);
			if ((tilesizx[globalpicnum] <= 0) || (tilesizy[globalpicnum] <= 0)) continue;
			if ((picanm[globalpicnum]&192) != 0) globalpicnum += animateoffs((short)globalpicnum,s);
			if (waloff[globalpicnum] == 0) loadtile(globalpicnum);
			globalbufplc = waloff[globalpicnum];
			globalshade = max(min(sec->floorshade,numpalookups-1),0);
			globvis = globalhisibility;
			if (sec->visibility != 0) globvis = mulscale4(globvis,(int)((unsigned char)(sec->visibility+16)));
			globalpolytype = 0;
			if ((globalorientation&64) == 0)
			{
				globalposx = dax; globalx1 = bakgxvect; globaly1 = bakgyvect;
				globalposy = day; globalx2 = bakgxvect; globaly2 = bakgyvect;
			}
			else
			{
				ox = wall[wall[startwall].point2].x - wall[startwall].x;
				oy = wall[wall[startwall].point2].y - wall[startwall].y;
				i = nsqrtasm(ox*ox+oy*oy); if (i == 0) continue;
				i = 1048576/i;
				globalx1 = mulscale10(dmulscale10(ox,bakgxvect,oy,bakgyvect),i);
				globaly1 = mulscale10(dmulscale10(ox,bakgyvect,-oy,bakgxvect),i);
				ox = (bakx1>>4)-(xdim<<7); oy = (baky1>>4)-(ydim<<7);
				globalposx = dmulscale28(-oy,globalx1,-ox,globaly1);
				globalposy = dmulscale28(-ox,globalx1,oy,globaly1);
				globalx2 = -globalx1;
				globaly2 = -globaly1;

				daslope = sector[s].floorheinum;
				i = nsqrtasm(daslope*daslope+16777216);
				globalposy = mulscale12(globalposy,i);
				globalx2 = mulscale12(globalx2,i);
				globaly2 = mulscale12(globaly2,i);
			}
			globalxshift = (8-(picsiz[globalpicnum]&15));
			globalyshift = (8-(picsiz[globalpicnum]>>4));
			if (globalorientation&8) {globalxshift++; globalyshift++; }

			sethlinesizes(picsiz[globalpicnum]&15,picsiz[globalpicnum]>>4,(void *)globalbufplc);

			if ((globalorientation&0x4) > 0)
			{
				i = globalposx; globalposx = -globalposy; globalposy = -i;
				i = globalx2; globalx2 = globaly1; globaly1 = i;
				i = globalx1; globalx1 = -globaly2; globaly2 = -i;
			}
			if ((globalorientation&0x10) > 0) globalx1 = -globalx1, globaly1 = -globaly1, globalposx = -globalposx;
			if ((globalorientation&0x20) > 0) globalx2 = -globalx2, globaly2 = -globaly2, globalposy = -globalposy;
			asm1 = (globaly1<<globalxshift);
			asm2 = (globalx2<<globalyshift);
			globalx1 <<= globalxshift;
			globaly2 <<= globalyshift;
			globalposx = (globalposx<<(20+globalxshift))+(((int)sec->floorxpanning)<<24);
			globalposy = (globalposy<<(20+globalyshift))-(((int)sec->floorypanning)<<24);

			fillpolygon(npoints);
		}

		//Sort sprite list
	gap = 1; while (gap < sortnum) gap = (gap<<1)+1;
	for(gap>>=1;gap>0;gap>>=1)
		for(i=0;i<sortnum-gap;i++)
			for(j=i;j>=0;j-=gap)
			{
				if (sprite[tsprite[j].owner].z <= sprite[tsprite[j+gap].owner].z) break;
				swapshort(&tsprite[j].owner,&tsprite[j+gap].owner);
			}

	for(s=sortnum-1;s>=0;s--)
	{
		spr = &sprite[tsprite[s].owner];
		if ((spr->cstat&48) == 32)
		{
			npoints = 0;

			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 ((spr->cstat&4) > 0) xoff = -xoff;
			if ((spr->cstat&8) > 0) yoff = -yoff;

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

			ox = ((xspan>>1)+xoff)*xrepeat; oy = ((yspan>>1)+yoff)*yrepeat;
			x1 = spr->x + mulscale16(sinang,ox) + mulscale16(cosang,oy);
			y1 = spr->y + mulscale16(sinang,oy) - mulscale16(cosang,ox);
			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;

			xb1[0] = 1; xb1[1] = 2; xb1[2] = 3; xb1[3] = 0;
			npoints = 4;

			i = 0;

			ox = x1 - dax; oy = y1 - day;
			x = dmulscale16(ox,xvect,-oy,yvect) + (xdim<<11);
			y = dmulscale16(oy,xvect2,ox,yvect2) + (ydim<<11);
			i |= getclipmask(x-cx1,cx2-x,y-cy1,cy2-y);
			rx1[0] = x; ry1[0] = y;

			ox = x2 - dax; oy = y2 - day;
			x = dmulscale16(ox,xvect,-oy,yvect) + (xdim<<11);
			y = dmulscale16(oy,xvect2,ox,yvect2) + (ydim<<11);
			i |= getclipmask(x-cx1,cx2-x,y-cy1,cy2-y);
			rx1[1] = x; ry1[1] = y;

			ox = x3 - dax; oy = y3 - day;
			x = dmulscale16(ox,xvect,-oy,yvect) + (xdim<<11);
			y = dmulscale16(oy,xvect2,ox,yvect2) + (ydim<<11);
			i |= getclipmask(x-cx1,cx2-x,y-cy1,cy2-y);
			rx1[2] = x; ry1[2] = y;

			x = rx1[0]+rx1[2]-rx1[1];
			y = ry1[0]+ry1[2]-ry1[1];
			i |= getclipmask(x-cx1,cx2-x,y-cy1,cy2-y);
			rx1[3] = x; ry1[3] = y;

			if ((i&0xf0) != 0xf0) continue;
			bakx1 = rx1[0]; baky1 = mulscale16(ry1[0]-(ydim<<11),xyaspect)+(ydim<<11);
			if (i&0x0f)
			{
				npoints = clippoly(npoints,i);
				if (npoints < 3) continue;
			}

			globalpicnum = spr->picnum;
			if ((unsigned)globalpicnum >= (unsigned)MAXTILES) globalpicnum = 0;
			setgotpic(globalpicnum);
			if ((tilesizx[globalpicnum] <= 0) || (tilesizy[globalpicnum] <= 0)) continue;
			if ((picanm[globalpicnum]&192) != 0) globalpicnum += animateoffs((short)globalpicnum,s);
			if (waloff[globalpicnum] == 0) loadtile(globalpicnum);
			globalbufplc = waloff[globalpicnum];
			if ((sector[spr->sectnum].ceilingstat&1) > 0)
				globalshade = ((int)sector[spr->sectnum].ceilingshade);
			else
				globalshade = ((int)sector[spr->sectnum].floorshade);
			globalshade = max(min(globalshade+spr->shade+6,numpalookups-1),0);
			asm3 = (intptr_t)palookup[spr->pal]+(globalshade<<8);
			globvis = globalhisibility;
			if (sec->visibility != 0) globvis = mulscale4(globvis,(int)((unsigned char)(sec->visibility+16)));
			globalpolytype = ((spr->cstat&2)>>1)+1;

				//relative alignment stuff
			ox = x2-x1; oy = y2-y1;
			i = ox*ox+oy*oy; if (i == 0) continue; i = (65536*16384)/i;
			globalx1 = mulscale10(dmulscale10(ox,bakgxvect,oy,bakgyvect),i);
			globaly1 = mulscale10(dmulscale10(ox,bakgyvect,-oy,bakgxvect),i);
			ox = y1-y4; oy = x4-x1;
			i = ox*ox+oy*oy; if (i == 0) continue; i = (65536*16384)/i;
			globalx2 = mulscale10(dmulscale10(ox,bakgxvect,oy,bakgyvect),i);
			globaly2 = mulscale10(dmulscale10(ox,bakgyvect,-oy,bakgxvect),i);

			ox = picsiz[globalpicnum]; oy = ((ox>>4)&15); ox &= 15;
			if (pow2long[ox] != xspan)
			{
				ox++;
				globalx1 = mulscale(globalx1,xspan,ox);
				globaly1 = mulscale(globaly1,xspan,ox);
			}

			bakx1 = (bakx1>>4)-(xdim<<7); baky1 = (baky1>>4)-(ydim<<7);
			globalposx = dmulscale28(-baky1,globalx1,-bakx1,globaly1);
			globalposy = dmulscale28(bakx1,globalx2,-baky1,globaly2);

			if ((spr->cstat&2) == 0)
				msethlineshift(ox,oy);
			else {
				if (spr->cstat&512) settransreverse(); else settransnormal();
				tsethlineshift(ox,oy);
			}

			if ((spr->cstat&0x4) > 0) globalx1 = -globalx1, globaly1 = -globaly1, globalposx = -globalposx;
			asm1 = (globaly1<<2); globalx1 <<= 2; globalposx <<= (20+2);
			asm2 = (globalx2<<2); globaly2 <<= 2; globalposy <<= (20+2);

			globalorientation = ((spr->cstat&2)<<7) | ((spr->cstat&512)>>2);	// so polymost can get the translucency. ignored in software mode.
			fillpolygon(npoints);
		}
	}
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0xe8, %rsp
movl %ecx, %r12d
movl %edx, %ebp
movq %rsi, 0x88(%rsp)
movq %rdi, 0x78(%rsp)
movl $0x0, 0x76bd8(%rip)     # 0xa4788
movswl 0x3a23a9(%rip), %esi    # 0x3cff60
addl $0x1f, %esi
sarl $0x5, %esi
leaq 0x3a219c(%rip), %rdi    # 0x3cfd60
xorl %edx, %edx
callq 0x4d2d8
shll $0x8, %ebp
movl $0x600, %eax            # imm = 0x600
subl %r12d, %eax
movl $0x7ff, %esi            # imm = 0x7FF
andl %esi, %eax
leaq 0x3a116c(%rip), %rdi    # 0x3ced50
movswq (%rdi,%rax,2), %rcx
movq %rcx, %rax
shlq $0x1c, %rax
movslq %ebp, %r8
cqto
idivq %r8
movq %rax, %r9
negl %r12d
andl %esi, %r12d
movswq (%rdi,%r12,2), %rax
movq %rax, %rdi
shlq $0x1c, %rax
cqto
idivq %r8
cmpw $0x0, 0x3a2346(%rip)    # 0x3cff60
jle 0x2efdc
movq %r8, %rsi
movl 0x3a4147(%rip), %edx    # 0x3d1d70
shll $0xc, %edx
movl %edx, 0x70(%rsp)
movl 0x3a5f4a(%rip), %edx    # 0x3d3b80
shll $0xc, %edx
movl %edx, 0x30(%rsp)
movl 0x3da39c(%rip), %r8d    # 0x407fe0
shll $0xc, %r8d
movl $0xfff, %edx            # imm = 0xFFF
orl %edx, %r8d
movl %r8d, 0x28(%rsp)
movl 0x3da388(%rip), %r8d    # 0x407fe4
shll $0xc, %r8d
orl %edx, %r8d
movl %r8d, 0x48(%rsp)
movslq 0x3da379(%rip), %rdx    # 0x407fe8
shlq $0x18, %rsi
imulq %rsi, %rdi
sarq $0x20, %rdi
movq %rdi, 0x90(%rsp)
imulq %rdx, %rdi
shrq $0x10, %rdi
imulq %rcx, %rsi
sarq $0x20, %rsi
movq %rsi, 0x98(%rsp)
imulq %rsi, %rdx
shrq $0x10, %rdx
movq %rdi, 0x58(%rsp)
movslq %edi, %rcx
movq %rcx, 0x68(%rsp)
movq %rdx, 0x80(%rsp)
movslq %edx, %rcx
movq %rcx, 0x60(%rsp)
movq %r9, 0xb0(%rsp)
movslq %r9d, %rcx
movq %rcx, 0x50(%rsp)
movq %rax, 0xa0(%rsp)
cltq
movq %rax, 0xe0(%rsp)
leaq 0x215d77(%rip), %rax    # 0x243a60
leaq 0x37d5f0(%rip), %rdx    # 0x3ab2e0
leaq 0x76aa9(%rip), %rsi     # 0xa47a0
leaq 0x18ad52(%rip), %r13    # 0x1b8a50
leaq 0x24efab(%rip), %r12    # 0x27ccb0
leaq 0x3b3ac4(%rip), %rbx    # 0x3e17d0
xorl %edi, %edi
xorl %r9d, %r9d
movq %rax, %r8
movl %edi, %r10d
shrl $0x3, %r10d
movl %edi, %r11d
andl $0x7, %r11d
movb (%r11,%rsi), %al
testb %al, (%r10,%rdx)
je 0x2dfa0
movswl 0x2(%r8), %ecx
testl %ecx, %ecx
jle 0x2dfa0
movq %r11, 0xd0(%rsp)
movq %r10, 0x40(%rsp)
movq %rdi, 0x10(%rsp)
movl %r9d, 0x20(%rsp)
movq %r8, 0x8(%rsp)
movswq (%r8), %rax
movq %rax, %r9
shlq $0x5, %r9
addq %r13, %r9
movl 0x3da27f(%rip), %edx    # 0x407fec
shll $0xb, %edx
movl %edx, 0x18(%rsp)
movl 0x3da276(%rip), %edx    # 0x407ff0
shll $0xb, %edx
movl %edx, 0x38(%rsp)
xorl %esi, %esi
movq %r9, 0xc0(%rsp)
xorl %ebp, %ebp
xorl %r8d, %r8d
movswl %ax, %r10d
testw %r10w, %r10w
jle 0x2ddad
leal -0x1(%r10), %r11d
movq %r11, %r14
shlq $0x5, %r14
cmpw %r10w, 0x8(%r14,%r13)
je 0x2ddd8
movl $0x4001, %r14d          # imm = 0x4001
movl %r10d, %r15d
movl %r15d, %r11d
movslq %r15d, %r15
shlq $0x5, %r15
movswl 0x8(%r15,%r13), %r15d
cmpw %ax, %r15w
je 0x2ddd8
decl %r14d
cmpl $0x1, %r14d
ja 0x2ddb6
movl %r10d, %r11d
cmpl %eax, %r11d
setg %r10b
testl %ebp, %ebp
setg %r14b
andb %r10b, %r14b
cmpb $0x1, %r14b
jne 0x2de00
leal -0x1(%rbp), %r10d
leaq 0x23dc77(%rip), %rdx    # 0x26ba70
movl %r8d, (%rdx,%r10,4)
movl %ebp, %r8d
movslq (%r9), %r10
movslq %r11d, %r11
shlq $0x5, %r11
movslq (%r11,%r13), %r14
movq %r10, %r15
subq %r14, %r15
movswq 0x8(%r9), %rdx
shlq $0x5, %rdx
movslq 0x4(%rdx,%r13), %rdi
movslq 0x4(%r9), %r14
subq %r14, %rdi
imulq %r15, %rdi
movslq 0x4(%r11,%r13), %r11
subq %r14, %r11
movslq (%rdx,%r13), %rdx
subq %r10, %rdx
imulq %r11, %rdx
addq %rdi, %rdx
shrq %rdx
testl %edx, %edx
je 0x2df18
movslq 0x78(%rsp), %rdx
subq %rdx, %r10
movslq 0x88(%rsp), %rdx
subq %rdx, %r14
movq %r14, %r11
negq %r11
movq 0x90(%rsp), %rdx
imulq %r10, %rdx
imulq 0x98(%rsp), %r11
addq %rdx, %r11
shrq $0x10, %r11
addl 0x18(%rsp), %r11d
movslq %r14d, %rdx
imulq 0x68(%rsp), %rdx
imulq 0x60(%rsp), %r10
addq %rdx, %r10
shrq $0x10, %r10
addl 0x38(%rsp), %r10d
movl 0x28(%rsp), %edx
movl %edx, %r14d
subl %r11d, %r14d
movslq %ebp, %rdx
leaq 0x3da149(%rip), %rdi    # 0x408000
movl %r11d, (%rdi,%rdx,4)
subl 0x70(%rsp), %r11d
movl %r10d, %edi
subl 0x30(%rsp), %edi
shrl $0x1f, %r11d
shll $0x3, %r11d
shrl $0x1f, %r14d
shrl $0x1f, %edi
leal (%r11,%r14,4), %r11d
xorl %r14d, %r14d
cmpl %r10d, 0x48(%rsp)
setl %r14b
orl %r14d, %r11d
leal (%r11,%rdi,2), %edi
movl %edi, %r11d
shll $0x4, %r11d
orl %edi, %r11d
xorl $0xf0, %r11d
orl %r11d, %esi
leaq 0x3de0f8(%rip), %rdi    # 0x40c000
movl %r10d, (%rdi,%rdx,4)
incl %ebp
leaq 0x23db5b(%rip), %rdi    # 0x26ba70
movl %ebp, (%rdi,%rdx,4)
leal -0x1(%rcx), %edx
addq $0x20, %r9
incl %eax
cmpl $0x1, %ecx
movl %edx, %ecx
jg 0x2dd90
testl %ebp, %ebp
jle 0x2df3e
leal -0x1(%rbp), %eax
leaq 0x23db36(%rip), %rcx    # 0x26ba70
movl %r8d, (%rcx,%rax,4)
movl %esi, %eax
notl %eax
testb $-0x10, %al
movl 0x20(%rsp), %r9d
jne 0x2df88
movl 0x3da0af(%rip), %eax    # 0x408000
movl %eax, 0x38(%rsp)
movslq 0x3de0a4(%rip), %r14    # 0x40c000
movl 0x3da08d(%rip), %r15d   # 0x407ff0
movslq 0x32f94e(%rip), %rax    # 0x35d8b8
movq %rax, 0x18(%rsp)
testb $0xf, %sil
je 0x2dfbd
movl %ebp, %edi
callq 0x2f02f
movl 0x20(%rsp), %r9d
movl %eax, %ebp
cmpl $0x3, %eax
jge 0x2dfbd
leaq 0x76811(%rip), %rsi     # 0xa47a0
movq 0x8(%rsp), %r8
leaq 0x37d345(%rip), %rdx    # 0x3ab2e0
movq 0x10(%rsp), %rdi
incq %rdi
leaq 0x28(%r8), %rax
movswq 0x3a1fb1(%rip), %rcx    # 0x3cff60
cmpq %rcx, %rdi
jl 0x2dd11
jmp 0x2e598
leaq 0x37e54c(%rip), %rax    # 0x3ac510
movq 0x10(%rsp), %rcx
movzwl (%rax,%rcx,2), %eax
testw %ax, %ax
movq 0x8(%rsp), %r8
js 0x2e01c
movzwl %ax, %ecx
imulq $0x2c, %rcx, %rdx
movzwl 0xc(%rdx,%r12), %edx
movl %edx, %esi
andl $0x30, %esi
cmpl $0x20, %esi
setne %sil
notl %edx
testb $0x48, %dl
sete %dl
orb %sil, %dl
jne 0x2e00c
movslq %r9d, %rdx
incl %r9d
imulq $0x2c, %rdx, %rdx
movw %ax, 0x1e(%rdx,%rbx)
leaq 0x38850d(%rip), %rax    # 0x3b6520
movzwl (%rax,%rcx,2), %eax
testw %ax, %ax
jns 0x2dfd7
leaq 0x7677d(%rip), %rsi     # 0xa47a0
movq 0xd0(%rsp), %rax
movb (%rax,%rsi), %al
leaq 0x3a1d2b(%rip), %rcx    # 0x3cfd60
movq 0x40(%rsp), %rdx
orb %al, (%rdx,%rcx)
movswl 0xe(%r8), %eax
movl %eax, 0x3e1fb8(%rip)    # 0x410000
testb $0x1, %al
jne 0x2df94
movq %r14, 0x40(%rsp)
movzbl 0x1d(%r8), %eax
movl %eax, 0x3e1fa4(%rip)    # 0x410004
leaq 0x36aa79(%rip), %rcx    # 0x398ae0
movq (%rcx,%rax,8), %rdi
cmpq 0x3e1f96(%rip), %rdi    # 0x410008
je 0x2e0a5
movl %r9d, %r14d
movq %rdi, 0x3e1f8a(%rip)    # 0x410008
testq %rdi, %rdi
jne 0x2e091
movq 0x36aa56(%rip), %rdi    # 0x398ae0
movq %rdi, 0x3e1f77(%rip)    # 0x410008
callq 0x6fa7b
leaq 0x76703(%rip), %rsi     # 0xa47a0
movq 0x8(%rsp), %r8
movl %r14d, %r9d
movzwl 0x18(%r8), %r14d
cmpl $0x2400, %r14d          # imm = 0x2400
movl $0x0, %eax
cmovael %eax, %r14d
movw %r14w, 0x3e1f4e(%rip)   # 0x410010
movswq %r14w, %rax
leaq 0x400673(%rip), %rcx    # 0x42e740
cmpb $-0x39, (%rax,%rcx)
ja 0x2e0de
leaq 0x400666(%rip), %rcx    # 0x42e740
movb $-0x39, (%rax,%rcx)
movswl %r14w, %edi
movl %edi, %ecx
andl $0x7, %ecx
movb (%rcx,%rsi), %cl
movl %edi, %edx
sarl $0x3, %edx
movslq %edx, %rdx
leaq 0x4001b7(%rip), %r8     # 0x42e2b0
orb %cl, (%rdx,%r8)
leaq 0x3e1f1c(%rip), %rcx    # 0x410020
cmpw $0x0, (%rcx,%rax,2)
jle 0x2df8f
leaq 0x3d36ca(%rip), %rcx    # 0x4017e0
cmpw $0x0, (%rcx,%rax,2)
jle 0x2df8f
movl %r9d, 0x20(%rsp)
leaq 0x20c933(%rip), %rcx    # 0x23aa60
testb $-0x40, (%rcx,%rax,4)
je 0x2e149
xorl %esi, %esi
callq 0x242cd
addl %eax, %r14d
movw %r14w, 0x3e1ecb(%rip)   # 0x410010
movswq %r14w, %rax
leaq 0x36b190(%rip), %rcx    # 0x3992e0
cmpq $0x0, (%rcx,%rax,8)
jne 0x2e168
movswl %r14w, %edi
callq 0x2fc7e
movzwl 0x3e1ea8(%rip), %r14d   # 0x410010
movswq %r14w, %rsi
leaq 0x36b16d(%rip), %rax    # 0x3992e0
movq (%rax,%rsi,8), %r14
movq %r14, 0x3e66a2(%rip)    # 0x414820
movq 0x8(%rsp), %rdx
movsbl 0x1c(%rdx), %eax
movswl 0x3e669a(%rip), %ecx    # 0x414828
decl %ecx
cmpl %eax, %ecx
cmovgel %eax, %ecx
testl %ecx, %ecx
movl $0x0, %eax
cmovlel %eax, %ecx
movl %ecx, 0x3e6687(%rip)    # 0x41482c
movslq 0x3a0b98(%rip), %rax    # 0x3ced44
movl %eax, 0x3e667e(%rip)    # 0x414830
movb 0x20(%rdx), %cl
testb %cl, %cl
je 0x2e1cd
addb $0x10, %cl
movzbl %cl, %ecx
imulq %rax, %rcx
shrq $0x4, %rcx
movl %ecx, 0x3e6663(%rip)    # 0x414830
movb $0x0, 0x3e6660(%rip)    # 0x414834
movl 0x3e1e26(%rip), %edi    # 0x410000
testb $0x40, %dil
jne 0x2e221
movq 0x78(%rsp), %rax
movl %eax, 0x20c865(%rip)    # 0x23aa50
movq 0xb0(%rsp), %rcx
movl %ecx, 0x3e663f(%rip)    # 0x414838
movq 0xa0(%rsp), %r9
movl %r9d, 0x3e6634(%rip)    # 0x41483c
movq 0x88(%rsp), %rax
movl %eax, 0x20c83e(%rip)    # 0x23aa54
movl %ecx, 0x3e6624(%rip)    # 0x414840
jmp 0x2e40f
movq 0xc0(%rsp), %rdx
movswq 0x8(%rdx), %rax
shlq $0x5, %rax
movslq (%rax,%r13), %r9
movslq (%rdx), %rcx
subq %rcx, %r9
movslq 0x4(%rax,%r13), %r10
movslq 0x4(%rdx), %rax
subq %rax, %r10
movl %r9d, %eax
imull %r9d, %eax
movl %r10d, %r11d
imull %r11d, %r11d
addl %eax, %r11d
movl %r11d, %eax
shrl $0x18, %eax
orl $0x1000, %eax           # imm = 0x1000
movl %r11d, %ecx
shrl $0xc, %ecx
cmpl $0x1000000, %r11d       # imm = 0x1000000
cmovael %eax, %ecx
leaq 0x427c85(%rip), %r8     # 0x455f00
movzwl (%r8,%rcx,2), %ecx
shrl %cl, %r11d
leaq 0x429e76(%rip), %rax    # 0x458100
movzwl (%rax,%r11,2), %r11d
shrl $0x8, %ecx
shrl %cl, %r11d
testl %r11d, %r11d
je 0x2e58a
shll $0xb, %r15d
movslq %r15d, %rcx
movq 0x40(%rsp), %rax
subq %rcx, %rax
imulq 0x18(%rsp), %rax
shrq $0x10, %rax
addl %eax, %ecx
movl $0x100000, %eax         # imm = 0x100000
xorl %edx, %edx
divl %r11d
movq %r14, 0x18(%rsp)
movq 0x50(%rsp), %r14
movq %r14, %rdx
imulq %r9, %rdx
movq %r10, %r11
movl 0x38(%rsp), %r8d
movq 0xe0(%rsp), %r15
imulq %r15, %r11
addq %rdx, %r11
shrq $0xa, %r11
movslq %r11d, %rdx
imulq %rax, %rdx
shrq $0xa, %rdx
movl %edx, 0x3e6538(%rip)    # 0x414838
negl %r10d
imulq %r15, %r9
movslq %r10d, %r10
imulq %r14, %r10
addq %r9, %r10
shrq $0xa, %r10
movslq %r10d, %r9
imulq %rax, %r9
shrq $0xa, %r9
movl %r9d, 0x3e6515(%rip)    # 0x41483c
sarl $0x4, %r8d
movl 0x3d9cbb(%rip), %eax    # 0x407fec
shll $0x7, %eax
subl %r8d, %eax
sarl $0x4, %ecx
movl 0x3d9caf(%rip), %r10d   # 0x407ff0
shll $0x7, %r10d
subl %r10d, %ecx
movslq %ecx, %r10
negl %ecx
movslq %ecx, %rcx
movslq %edx, %r11
imulq %r11, %rcx
movslq %eax, %r14
movslq %r9d, %rax
imulq %rax, %r10
movq %rax, %r15
imulq %r14, %r15
addq %rcx, %r15
movq 0x10(%rsp), %rax
leaq (%rax,%rax,4), %rax
leaq 0x2156e5(%rip), %rcx    # 0x243a60
movswl 0x1a(%rcx,%rax,8), %eax
imull %eax, %eax
addl $0x1000000, %eax        # imm = 0x1000000
movl %eax, %ecx
shrl $0x17, %ecx
andl $-0x2, %ecx
leaq 0x427b69(%rip), %r8     # 0x455f00
movzwl 0x2000(%r8,%rcx), %ecx
shrl %cl, %eax
shrq $0x1c, %r15
movl %r15d, 0x20c6a3(%rip)   # 0x23aa50
leaq 0x429d4c(%rip), %r8     # 0x458100
movzwl (%r8,%rax,2), %eax
shrl $0x8, %ecx
shrl %cl, %eax
imulq %r14, %r11
movq 0x18(%rsp), %r14
addq %r11, %r10
shrq $0x1c, %r10
movslq %r10d, %rcx
imulq %rax, %rcx
shrq $0xc, %rcx
movl %ecx, 0x20c675(%rip)    # 0x23aa54
movabsq $-0x100000000, %rcx     # imm = 0xFFFFFFFF00000000
imulq %rcx, %rdx
sarq $0x20, %rdx
imulq %rax, %rdx
shrq $0xc, %rdx
movl %edx, 0x3e6441(%rip)    # 0x414840
imulq %rcx, %r9
sarq $0x20, %r9
imulq %rax, %r9
shrq $0xc, %r9
movl %r9d, 0x3e642e(%rip)    # 0x414844
leaq 0x3e6433(%rip), %rax    # 0x414850
movzbl (%rsi,%rax), %esi
movl %esi, %eax
andb $0xf, %al
movb $0x8, %cl
subb %al, %cl
movb %cl, 0x3e8821(%rip)     # 0x416c50
movl %esi, %ecx
shrb $0x4, %cl
movb $0x8, %dl
subb %cl, %dl
movb %dl, 0x3e8813(%rip)     # 0x416c51
testb $0x8, %dil
je 0x2e458
movb $0x9, %dl
subb %al, %dl
movb %dl, 0x3e8802(%rip)     # 0x416c50
movb $0x9, %al
subb %cl, %al
movb %al, 0x3e87f9(%rip)     # 0x416c51
movl %esi, %edi
andl $0xf, %edi
shrl $0x4, %esi
movq %r14, %rdx
callq 0x6fa67
movl 0x3e1b92(%rip), %eax    # 0x410000
testb $0x4, %al
je 0x2e4c2
xorl %ecx, %ecx
subl 0x20c5da(%rip), %ecx    # 0x23aa54
xorl %edx, %edx
subl 0x20c5ce(%rip), %edx    # 0x23aa50
movl %ecx, 0x20c5c8(%rip)    # 0x23aa50
movl %edx, 0x20c5c6(%rip)    # 0x23aa54
movl 0x3e63ac(%rip), %ecx    # 0x414840
movl 0x3e63a2(%rip), %edx    # 0x41483c
movl %edx, 0x3e63a0(%rip)    # 0x414840
movl %ecx, 0x3e6396(%rip)    # 0x41483c
xorl %ecx, %ecx
subl 0x3e6396(%rip), %ecx    # 0x414844
xorl %edx, %edx
subl 0x3e6382(%rip), %edx    # 0x414838
movl %ecx, 0x3e637c(%rip)    # 0x414838
movl %edx, 0x3e6382(%rip)    # 0x414844
testb $0x10, %al
je 0x2e4d8
negl 0x3e636c(%rip)          # 0x414838
negl 0x3e636a(%rip)          # 0x41483c
negl 0x20c578(%rip)          # 0x23aa50
movl 0x3e6361(%rip), %r8d    # 0x414840
movl 0x3e635f(%rip), %edi    # 0x414844
movl 0x20c569(%rip), %esi    # 0x23aa54
testb $0x20, %al
je 0x2e4fd
negl %r8d
movl %r8d, 0x3e6347(%rip)    # 0x414840
negl %edi
negl %esi
movl 0x3e6339(%rip), %edx    # 0x41483c
movb 0x3e8747(%rip), %al     # 0x416c50
movl %eax, %ecx
shll %cl, %edx
movl %edx, 0x3e8741(%rip)    # 0x416c54
movb 0x3e8738(%rip), %dl     # 0x416c51
movl %edx, %ecx
shll %cl, %r8d
movl %r8d, 0x3e8733(%rip)    # 0x416c58
movl %eax, %ecx
shll %cl, 0x3e630b(%rip)     # 0x414838
movl %edx, %ecx
shll %cl, %edi
movl %edi, 0x3e630d(%rip)    # 0x414844
movl 0x20c513(%rip), %edi    # 0x23aa50
addb $0x14, %al
movl %eax, %ecx
shll %cl, %edi
movq 0x8(%rsp), %r14
movzbl 0x1e(%r14), %eax
shll $0x18, %eax
addl %edi, %eax
movl %eax, 0x20c4f8(%rip)    # 0x23aa50
addb $0x14, %dl
movl %edx, %ecx
shll %cl, %esi
movzbl 0x1f(%r14), %eax
shll $0x18, %eax
subl %eax, %esi
movl %esi, 0x20c4e5(%rip)    # 0x23aa54
movl %ebp, %edi
callq 0x2fdef
movq %r14, %r8
leaq 0x76220(%rip), %rsi     # 0xa47a0
movl 0x20(%rsp), %r9d
jmp 0x2df94
leaq 0x7620f(%rip), %rsi     # 0xa47a0
movq 0x8(%rsp), %r8
jmp 0x2e580
movq %r8, 0x8(%rsp)
cmpl $0x2, %r9d
movq 0xb0(%rsp), %r15
jl 0x2e634
movl $0x1, %ecx
movl %ecx, %eax
leal 0x1(,%rax,2), %ecx
cmpl %r9d, %ecx
jl 0x2e5b4
addl %eax, %eax
sarl %eax
testl %eax, %eax
jle 0x2e634
movl %r9d, %ebp
movl %r9d, %ecx
subl %eax, %ecx
jle 0x2e626
xorl %edx, %edx
movl %edx, %esi
movl %esi, %edi
imulq $0x2c, %rdi, %r8
movswq 0x1e(%r8,%rbx), %rdi
imulq $0x2c, %rdi, %r9
movl 0x8(%r9,%r12), %r11d
leal (%rax,%rsi), %r9d
imulq $0x2c, %r9, %r10
movswq 0x1e(%r10,%rbx), %r9
imulq $0x2c, %r9, %r14
cmpl 0x8(%r14,%r12), %r11d
jle 0x2e620
addq %rbx, %r8
addq $0x1e, %r8
addq %rbx, %r10
addq $0x1e, %r10
movw %di, (%r10)
movw %r9w, (%r8)
subl %eax, %esi
jns 0x2e5d8
incl %edx
cmpl %ecx, %edx
jne 0x2e5d6
movl %eax, %ecx
shrl %ecx
cmpl $0x2, %eax
movl %ecx, %eax
movl %ebp, %r9d
jae 0x2e5ca
testl %r9d, %r9d
movq 0xa0(%rsp), %rax
jle 0x2efdc
movslq 0x58(%rsp), %rcx
movq %rcx, 0x20(%rsp)
movslq 0x80(%rsp), %rcx
movq %rcx, 0x10(%rsp)
movslq %r15d, %rcx
movq %rcx, 0x58(%rsp)
cltq
movq %rax, 0x50(%rsp)
movl %r9d, %ecx
movd 0x70(%rsp), %xmm0
pshufd $0x0, %xmm0, %xmm6      # xmm6 = xmm0[0,0,0,0]
movd 0x48(%rsp), %xmm0
pshufd $0x0, %xmm0, %xmm7      # xmm7 = xmm0[0,0,0,0]
movd 0x28(%rsp), %xmm0
pshufd $0x0, %xmm0, %xmm8      # xmm8 = xmm0[0,0,0,0]
movd 0x30(%rsp), %xmm0
pshufd $0x0, %xmm0, %xmm9      # xmm9 = xmm0[0,0,0,0]
imulq $0x2c, %rcx, %rax
incq %rcx
movq %rcx, 0x38(%rsp)
addq %rbx, %rax
addq $-0xe, %rax
movq %rax, 0x18(%rsp)
movaps 0x48994(%rip), %xmm10   # 0x77050
movdqa 0x4899b(%rip), %xmm11   # 0x77060
movdqa 0x489a2(%rip), %xmm12   # 0x77070
movdqa 0x489a9(%rip), %xmm13   # 0x77080
movdqa 0x489b0(%rip), %xmm14   # 0x77090
movdqa %xmm6, 0xd0(%rsp)
movdqa %xmm7, 0xc0(%rsp)
movdqa %xmm8, 0xb0(%rsp)
movdqa %xmm9, 0xa0(%rsp)
movq 0x18(%rsp), %rax
movswq (%rax), %rax
imulq $0x2c, %rax, %r9
movzwl 0xc(%r9,%r12), %eax
movl %eax, %ecx
andl $0x30, %ecx
cmpl $0x20, %ecx
jne 0x2efbf
addq %r12, %r9
movq %r9, 0x70(%rsp)
movswq 0xe(%r9), %rcx
leaq 0x20c325(%rip), %rdx    # 0x23aa60
movl (%rdx,%rcx,4), %edx
movl %edx, %esi
shrl $0x8, %esi
movsbl %sil, %esi
movsbl 0x16(%r9), %edi
addl %esi, %edi
shrl $0x10, %edx
movsbl %dl, %edx
movsbl 0x17(%r9), %r8d
addl %edx, %r8d
movl %edi, %edx
negl %edx
testb $0x4, %al
cmovel %edi, %edx
movl %r8d, %esi
negl %esi
testb $0x8, %al
cmovel %r8d, %esi
movswq 0x1c(%r9), %rax
leal 0x200(%rax), %edi
andl $0x7ff, %edi            # imm = 0x7FF
leaq 0x3a05c8(%rip), %r8     # 0x3ced50
movswq (%r8,%rdi,2), %r11
movswq (%r8,%rax,2), %rax
leaq 0x3e1887(%rip), %rdi    # 0x410020
movswq (%rdi,%rcx,2), %rbx
movzbl 0x14(%r9), %r14d
leaq 0x3d3036(%rip), %rdi    # 0x4017e0
movswq (%rdi,%rcx,2), %rcx
movzbl 0x15(%r9), %r10d
movl %ebx, %edi
sarl %edi
addl %edx, %edi
movslq %edi, %rdx
imulq %r14, %rdx
movl %ecx, %edi
sarl %edi
addl %esi, %edi
movslq %edi, %rsi
imulq %r10, %rsi
movq %rdx, %r8
imulq %rax, %r8
shrq $0x10, %r8
addl (%r9), %r8d
movq %rsi, %rdi
imulq %r11, %rdi
shrq $0x10, %rdi
addl %r8d, %edi
movl 0x4(%r9), %r8d
imulq %rax, %rsi
shrq $0x10, %rsi
imulq %r11, %rdx
shrq $0x10, %rdx
subl %edx, %r8d
addl %esi, %r8d
movq %rbx, 0x40(%rsp)
imulq %rbx, %r14
movq %r14, %rsi
imulq %rax, %rsi
shrq $0x10, %rsi
movl %edi, %edx
movq %rsi, 0x48(%rsp)
subl %esi, %edx
imulq %r11, %r14
shrq $0x10, %r14
movq %r14, 0x28(%rsp)
leal (%r8,%r14), %esi
imulq %rcx, %r10
imulq %r10, %r11
shrq $0x10, %r11
imulq %rax, %r10
shrq $0x10, %r10
subl 0x78(%rsp), %edi
movq 0x88(%rsp), %r15
subl %r15d, %r8d
movslq %r8d, %rax
negl %r8d
movslq %edi, %r9
movq 0x90(%rsp), %r13
movq %r13, %rcx
imulq %r9, %rcx
movslq %r8d, %rbp
imulq 0x98(%rsp), %rbp
addq %rcx, %rbp
shrq $0x10, %rbp
movq 0x20(%rsp), %rbx
imulq %rbx, %rax
movq 0x10(%rsp), %r14
imulq %r14, %r9
addq %rax, %r9
movq %r9, 0x30(%rsp)
movl %edx, %eax
movq 0x78(%rsp), %r9
subl %r9d, %eax
movl %esi, %ecx
subl %r15d, %ecx
movslq %ecx, %rdi
negl %ecx
cltq
movq %r13, %r8
imulq %rax, %r8
movslq %ecx, %rcx
movq 0x98(%rsp), %r13
imulq %r13, %rcx
addq %r8, %rcx
imulq %rbx, %rdi
imulq %r14, %rax
addq %rdi, %rax
movq %r11, 0x68(%rsp)
subl %r11d, %edx
subl %r9d, %edx
movq %r10, 0x60(%rsp)
subl %r10d, %esi
subl %r15d, %esi
movslq %esi, %r8
negl %esi
movslq %edx, %rdx
movq 0x90(%rsp), %rdi
imulq %rdx, %rdi
movslq %esi, %rsi
imulq %r13, %rsi
addq %rdi, %rsi
movl 0x3d96de(%rip), %edi    # 0x407fec
shll $0xb, %edi
movq 0x30(%rsp), %r9
shrq $0x10, %r9
imulq %rbx, %r8
movq 0x70(%rsp), %r10
imulq %r14, %rdx
addq %r8, %rdx
movl 0x3d96bf(%rip), %r8d    # 0x407ff0
shll $0xb, %r8d
shrq $0x10, %rcx
shrq $0x10, %rax
shrq $0x10, %rsi
shrq $0x10, %rdx
addl %edi, %ebp
movl %ebp, 0x3d96b3(%rip)    # 0x408000
addl %edi, %ecx
addl %edi, %esi
leal (%rsi,%rbp), %edi
subl %ecx, %edi
movd %ecx, %xmm0
movl %ecx, 0x3d96a4(%rip)    # 0x408004
movq %r9, 0x30(%rsp)
leal (%r8,%r9), %ecx
movq %r8, %r14
movl %ecx, 0x3dd68e(%rip)    # 0x40c000
addl %r14d, %eax
addl %r14d, %edx
movd %ecx, %xmm1
addl %edx, %ecx
subl %eax, %ecx
movd %eax, %xmm2
movl %eax, 0x3dd67a(%rip)    # 0x40c004
movd %esi, %xmm3
movl %esi, 0x3d9674(%rip)    # 0x408008
movd %edx, %xmm4
movl %edx, 0x3dd66a(%rip)    # 0x40c008
movd %ebp, %xmm5
punpckldq %xmm0, %xmm5    # xmm5 = xmm5[0],xmm0[0],xmm5[1],xmm0[1]
movd %edi, %xmm0
punpckldq %xmm0, %xmm3    # xmm3 = xmm3[0],xmm0[0],xmm3[1],xmm0[1]
movaps %xmm10, 0x23d0ba(%rip)  # 0x26ba70
punpcklqdq %xmm3, %xmm5    # xmm5 = xmm5[0],xmm3[0]
movdqa %xmm8, %xmm0
psubd %xmm5, %xmm0
psubd %xmm6, %xmm5
punpckldq %xmm2, %xmm1    # xmm1 = xmm1[0],xmm2[0],xmm1[1],xmm2[1]
movd %ecx, %xmm2
punpckldq %xmm2, %xmm4    # xmm4 = xmm4[0],xmm2[0],xmm4[1],xmm2[1]
punpcklqdq %xmm4, %xmm1    # xmm1 = xmm1[0],xmm4[0]
movdqa %xmm1, %xmm2
psubd %xmm9, %xmm2
psrld $0x1c, %xmm5
pand %xmm11, %xmm5
psrld $0x1d, %xmm0
pand %xmm12, %xmm0
psrld $0x1e, %xmm2
pand %xmm13, %xmm2
por %xmm0, %xmm2
pcmpgtd %xmm7, %xmm1
psubd %xmm1, %xmm5
por %xmm2, %xmm5
movdqa %xmm5, %xmm0
pslld $0x4, %xmm0
por %xmm5, %xmm0
pxor %xmm14, %xmm0
pshufd $0xee, %xmm0, %xmm1     # xmm1 = xmm0[2,3,2,3]
por %xmm0, %xmm1
pshufd $0x55, %xmm1, %xmm0     # xmm0 = xmm1[1,1,1,1]
por %xmm1, %xmm0
movl %edi, 0x3d95d4(%rip)    # 0x40800c
movd %xmm0, %esi
movl %ecx, 0x3dd5ca(%rip)    # 0x40c00c
movl %esi, %eax
notl %eax
testb $-0x10, %al
jne 0x2efbf
movslq 0x32ee63(%rip), %rax    # 0x35d8b8
movq %rax, 0x80(%rsp)
testb $0xf, %sil
je 0x2ead2
movl $0x4, %edi
movq %r10, %rbx
callq 0x2f02f
movq %rbx, %r10
movdqa 0x48614(%rip), %xmm14   # 0x77090
movdqa 0x485fb(%rip), %xmm13   # 0x77080
movdqa 0x485e2(%rip), %xmm12   # 0x77070
movdqa 0x485c9(%rip), %xmm11   # 0x77060
movaps 0x485b1(%rip), %xmm10   # 0x77050
movdqa 0xa0(%rsp), %xmm9
movdqa 0xb0(%rsp), %xmm8
movdqa 0xc0(%rsp), %xmm7
movdqa 0xd0(%rsp), %xmm6
movl %eax, %r15d
cmpl $0x3, %eax
jge 0x2ead8
jmp 0x2efbf
movl $0x4, %r15d
movzwl 0xe(%r10), %ebx
cmpl $0x2400, %ebx           # imm = 0x2400
movl $0x0, %eax
cmovael %eax, %ebx
movw %bx, 0x3e151e(%rip)     # 0x410010
movswq %bx, %rax
leaq 0x3ffc43(%rip), %rcx    # 0x42e740
cmpb $-0x39, (%rax,%rcx)
ja 0x2eb0e
leaq 0x3ffc36(%rip), %rcx    # 0x42e740
movb $-0x39, (%rax,%rcx)
movswl %bx, %edi
movl %edi, %ecx
andl $0x7, %ecx
leaq 0x75c83(%rip), %rdx     # 0xa47a0
movb (%rcx,%rdx), %cl
movl %edi, %edx
sarl $0x3, %edx
movslq %edx, %rdx
leaq 0x3ff781(%rip), %rsi    # 0x42e2b0
orb %cl, (%rdx,%rsi)
leaq 0x3e14e7(%rip), %rcx    # 0x410020
cmpw $0x0, (%rcx,%rax,2)
jle 0x2efbf
leaq 0x3d2c95(%rip), %rcx    # 0x4017e0
cmpw $0x0, (%rcx,%rax,2)
jle 0x2efbf
leaq 0x20bf03(%rip), %rcx    # 0x23aa60
testb $-0x40, (%rcx,%rax,4)
je 0x2eb7d
xorl %esi, %esi
movq %r10, %r13
callq 0x242cd
movq %r13, %r10
addl %eax, %ebx
movw %bx, 0x3e1497(%rip)     # 0x410010
movswq %bx, %rax
leaq 0x36a75c(%rip), %rcx    # 0x3992e0
cmpq $0x0, (%rcx,%rax,8)
movq 0x8(%rsp), %rdi
jne 0x2ebaa
movswl %bx, %edi
movq %r10, %rbx
callq 0x2fc7e
movq %rbx, %r10
movq 0x8(%rsp), %rdi
movzwl 0x3e1466(%rip), %ebx    # 0x410010
movswq %bx, %rcx
leaq 0x36a72b(%rip), %rax    # 0x3992e0
movq (%rax,%rcx,8), %rax
movq %rax, 0x3e5c60(%rip)    # 0x414820
movswq 0x18(%r10), %rax
leaq (%rax,%rax,4), %rax
leaq 0x214e90(%rip), %rdx    # 0x243a60
leaq (%rdx,%rax,8), %rax
movzwl 0xc(%rax), %edx
xorl %esi, %esi
testb $0x1, %dl
sete %sil
movsbl 0x14(%rax,%rsi,8), %eax
movsbl 0x10(%r10), %edx
addl %edx, %eax
addl $0x6, %eax
movswl 0x3e5c31(%rip), %edx    # 0x414828
decl %edx
cmpl %edx, %eax
cmovll %eax, %edx
testl %edx, %edx
movl $0x0, %eax
cmovlel %eax, %edx
movl %edx, 0x3e5c1e(%rip)    # 0x41482c
movzbl 0x11(%r10), %eax
shll $0x8, %edx
leaq 0x369ec3(%rip), %rsi    # 0x398ae0
addq (%rsi,%rax,8), %rdx
movq %rdx, 0x3e8038(%rip)    # 0x416c60
movslq 0x3a0115(%rip), %rax    # 0x3ced44
movl %eax, 0x3e5bfb(%rip)    # 0x414830
movb 0x48(%rdi), %dl
testb %dl, %dl
movdqa 0xd0(%rsp), %xmm6
movdqa 0xc0(%rsp), %xmm7
movdqa 0xb0(%rsp), %xmm8
movdqa 0xa0(%rsp), %xmm9
movaps 0x483e8(%rip), %xmm10   # 0x77050
movdqa 0x483ef(%rip), %xmm11   # 0x77060
movdqa 0x483f6(%rip), %xmm12   # 0x77070
movdqa 0x483fd(%rip), %xmm13   # 0x77080
movdqa 0x48404(%rip), %xmm14   # 0x77090
je 0x2eca2
addb $0x10, %dl
movzbl %dl, %edx
imulq %rax, %rdx
shrq $0x4, %rdx
movl %edx, 0x3e5b8e(%rip)    # 0x414830
movzwl 0xc(%r10), %esi
btl $0x1, %esi
movl $0x0, %eax
adcb $0x1, %al
movb %al, 0x3e5b7c(%rip)     # 0x414834
movq 0x48(%rsp), %rax
imull %eax, %eax
movq 0x28(%rsp), %rdx
movl %edx, %edi
imull %edx, %edi
addl %eax, %edi
je 0x2efbf
movl $0x40000000, %eax       # imm = 0x40000000
xorl %edx, %edx
idivl %edi
movabsq $-0x100000000, %r8      # imm = 0xFFFFFFFF00000000
movq 0x48(%rsp), %rbx
imulq %r8, %rbx
sarq $0x20, %rbx
movq %rbx, %rdx
movq 0x58(%rsp), %r9
imulq %r9, %rdx
movq 0x28(%rsp), %r11
movslq %r11d, %rdi
movq %r10, %r13
movq 0x50(%rsp), %r10
imulq %r10, %rdi
addq %rdx, %rdi
shrq $0xa, %rdi
movslq %edi, %rdi
cltq
imulq %rax, %rdi
shrq $0xa, %rdi
movl %edi, 0x3e5b0c(%rip)    # 0x414838
imulq %r10, %rbx
imulq %r8, %r11
sarq $0x20, %r11
imulq %r9, %r11
addq %rbx, %r11
shrq $0xa, %r11
movslq %r11d, %r8
imulq %rax, %r8
shrq $0xa, %r8
movl %r8d, 0x3e5ae7(%rip)    # 0x41483c
movq 0x60(%rsp), %rax
imull %eax, %eax
movq 0x68(%rsp), %rdx
movl %edx, %r9d
imull %edx, %r9d
addl %eax, %r9d
je 0x2efbf
movl %r15d, 0x28(%rsp)
movl $0x40000000, %eax       # imm = 0x40000000
xorl %edx, %edx
divl %r9d
movslq 0x60(%rsp), %r9
movq %r9, %rdx
movq 0x58(%rsp), %rbx
imulq %rbx, %rdx
movq 0x68(%rsp), %r15
movq %r15, %r10
movabsq $-0x100000000, %r11     # imm = 0xFFFFFFFF00000000
imulq %r11, %r10
sarq $0x20, %r10
movq 0x50(%rsp), %r11
imulq %r11, %r10
addq %rdx, %r10
shrq $0xa, %r10
movslq %r10d, %rdx
imulq %rax, %rdx
shrq $0xa, %rdx
movl %edx, 0x3e5a73(%rip)    # 0x414840
imulq %r11, %r9
movslq %r15d, %r10
imulq %rbx, %r10
addq %r9, %r10
shrq $0xa, %r10
movslq %r10d, %r9
imulq %rax, %r9
shrq $0xa, %r9
movl %r9d, 0x3e5a53(%rip)    # 0x414844
leaq 0x3e5a58(%rip), %rax    # 0x414850
movzbl (%rcx,%rax), %r15d
movl %r15d, %ecx
andl $0xf, %ecx
leaq 0x759a6(%rip), %rax     # 0xa47b0
movq 0x40(%rsp), %r10
cmpl %r10d, (%rax,%rcx,4)
je 0x2ee3d
movq %r10, %rax
incl %ecx
movslq %edi, %rdi
cltq
imulq %rax, %rdi
sarq %cl, %rdi
movl %edi, 0x3e5a0c(%rip)    # 0x414838
movslq %r8d, %r8
imulq %rax, %r8
sarq %cl, %r8
movl %r8d, 0x3e59ff(%rip)    # 0x41483c
movslq 0x30(%rsp), %rax
imulq 0x80(%rsp), %rax
shrq $0x10, %rax
addl %eax, %r14d
shrl $0x4, %r15d
sarl $0x4, %ebp
movl 0x3d918d(%rip), %eax    # 0x407fec
shll $0x7, %eax
subl %eax, %ebp
sarl $0x4, %r14d
movl 0x3d9182(%rip), %eax    # 0x407ff0
shll $0x7, %eax
subl %r14d, %eax
movl %ebp, %r10d
negl %r10d
cltq
movslq %edi, %rdi
imulq %rax, %rdi
movslq %r10d, %r10
movslq %r8d, %r8
imulq %r10, %r8
addq %rdi, %r8
shrq $0x1c, %r8
movl %r8d, 0x20bbb5(%rip)    # 0x23aa50
movslq %ebp, %rdi
movslq %edx, %rdx
imulq %rdi, %rdx
movslq %r9d, %rdi
imulq %rax, %rdi
addq %rdx, %rdi
shrq $0x1c, %rdi
movl %edi, 0x20bb9b(%rip)    # 0x23aa54
testb $0x2, %sil
movl 0x28(%rsp), %ebx
jne 0x2eecf
movl %ecx, %edi
movl %r15d, %esi
callq 0x6fd6f
jmp 0x2eeef
movq %rcx, %r14
btl $0x9, %esi
jb 0x2eedf
callq 0x6fa57
jmp 0x2eee4
callq 0x6fa5f
movl %r14d, %edi
movl %r15d, %esi
callq 0x6fe13
movswl 0xc(%r13), %eax
movl 0x3e5942(%rip), %esi    # 0x41483c
movl 0x3e5938(%rip), %edx    # 0x414838
movl 0x20bb4a(%rip), %ecx    # 0x23aa50
testb $0x4, %al
je 0x2ef16
negl %edx
negl %esi
movl %esi, 0x3e5928(%rip)    # 0x41483c
negl %ecx
shll $0x2, %esi
movl %esi, 0x3e7d35(%rip)    # 0x416c54
shll $0x2, %edx
movl %edx, 0x3e5910(%rip)    # 0x414838
shll $0x16, %ecx
movl %ecx, 0x20bb1f(%rip)    # 0x23aa50
movl 0x3e5909(%rip), %ecx    # 0x414840
shll $0x2, %ecx
shll $0x2, 0x3e5903(%rip)    # 0x414844
shll $0x16, 0x20bb0c(%rip)   # 0x23aa54
movl %ecx, 0x3e7d0a(%rip)    # 0x416c58
movl %eax, %ecx
andl $0x2, %ecx
shll $0x7, %ecx
shrl $0x2, %eax
andl $0x80, %eax
orl %ecx, %eax
movl %eax, 0x3e109a(%rip)    # 0x410000
movl %ebx, %edi
callq 0x2fdef
movdqa 0xd0(%rsp), %xmm6
movdqa 0xc0(%rsp), %xmm7
movdqa 0xb0(%rsp), %xmm8
movdqa 0xa0(%rsp), %xmm9
movaps 0x480b5(%rip), %xmm10   # 0x77050
movdqa 0x480bc(%rip), %xmm11   # 0x77060
movdqa 0x480c3(%rip), %xmm12   # 0x77070
movdqa 0x480ca(%rip), %xmm13   # 0x77080
movdqa 0x480d1(%rip), %xmm14   # 0x77090
movq 0x38(%rsp), %rax
decq %rax
addq $-0x2c, 0x18(%rsp)
movq %rax, 0x38(%rsp)
cmpq $0x1, %rax
ja 0x2e706
addq $0xe8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq