// File: /workspace/github_c_makefile_star2_O1/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 $0xc8, %rsp
movl %ecx, %ebp
movl %edx, %ebx
movq %rsi, 0x58(%rsp)
movq %rdi, 0x50(%rsp)
movl $0x0, 0x766b2(%rip)     # 0xa3788
movswl 0x3a1e83(%rip), %esi    # 0x3cef60
addl $0x1f, %esi
sarl $0x5, %esi
leaq 0x3a1c76(%rip), %rdi    # 0x3ced60
xorl %r13d, %r13d
xorl %edx, %edx
callq 0x4abc9
movl 0x3a3c76(%rip), %eax    # 0x3d0d70
shll $0xc, %eax
movl %eax, 0x34(%rsp)
movl 0x3a5a79(%rip), %eax    # 0x3d2b80
shll $0xc, %eax
movl %eax, 0x24(%rsp)
movl 0x3d9ecc(%rip), %ecx    # 0x406fe0
shll $0xc, %ecx
movl $0xfff, %eax            # imm = 0xFFF
orl %eax, %ecx
movl %ecx, 0x20(%rsp)
movl 0x3d9ebc(%rip), %ecx    # 0x406fe4
shll $0xc, %ecx
orl %eax, %ecx
movl %ecx, 0x1c(%rsp)
shll $0x8, %ebx
movl $0x600, %eax            # imm = 0x600
subl %ebp, %eax
movl $0x7ff, %esi            # imm = 0x7FF
andl %esi, %eax
leaq 0x3a0c07(%rip), %rdi    # 0x3cdd50
movswq (%rdi,%rax,2), %rcx
movq %rcx, %rax
shlq $0x1c, %rax
movslq %ebx, %r8
cqto
idivq %r8
movq %rax, %r9
negl %ebp
andl %esi, %ebp
movswq (%rdi,%rbp,2), %rsi
movq %rsi, %rax
shlq $0x1c, %rax
cqto
idivq %r8
movslq 0x3d9e6c(%rip), %rdx    # 0x406fe8
shlq $0x18, %r8
imulq %r8, %rsi
sarq $0x20, %rsi
movq %rsi, 0x90(%rsp)
imulq %rdx, %rsi
shrq $0x10, %rsi
imulq %rcx, %r8
sarq $0x20, %r8
movq %r8, 0x98(%rsp)
imulq %r8, %rdx
shrq $0x10, %rdx
cmpw $0x0, 0x3a1da8(%rip)    # 0x3cef60
movq %r9, 0x40(%rsp)
movq %rax, 0x68(%rsp)
movq %rdx, 0xb0(%rsp)
movq %rsi, 0xa8(%rsp)
jle 0x2da90
movslq %esi, %rcx
movq %rcx, 0x88(%rsp)
movslq %edx, %rcx
movq %rcx, 0x48(%rsp)
movslq %r9d, %rcx
movq %rcx, 0xa0(%rsp)
cltq
movq %rax, 0x60(%rsp)
leaq 0x21585c(%rip), %rdx    # 0x242a60
leaq 0x18a845(%rip), %rbx    # 0x1b7a50
xorl %esi, %esi
xorl %r15d, %r15d
movl %esi, %edi
shrl $0x3, %edi
movl %esi, %r8d
andl $0x7, %r8d
leaq 0x7657d(%rip), %rax     # 0xa37a0
movb (%r8,%rax), %al
leaq 0x37d0b2(%rip), %rcx    # 0x3aa2e0
testb %al, (%rdi,%rcx)
je 0x2da6f
movq %r8, 0x80(%rsp)
movq %rdi, 0x28(%rsp)
movq %rsi, (%rsp)
movl %r15d, 0x10(%rsp)
movswq (%rdx), %rax
movq %rdx, 0x8(%rsp)
movswl 0x2(%rdx), %edx
movq %rax, %r9
shlq $0x5, %r9
addq %rbx, %r9
testl %edx, %edx
movq %r9, 0x78(%rsp)
jle 0x2d42e
movl 0x3d9d75(%rip), %ecx    # 0x406fec
shll $0xb, %ecx
movl %ecx, 0x38(%rsp)
movl 0x3d9d6b(%rip), %r8d    # 0x406ff0
shll $0xb, %r8d
xorl %esi, %esi
xorl %ebp, %ebp
xorl %ecx, %ecx
movswl %ax, %r10d
testw %r10w, %r10w
jle 0x2d2ac
leal -0x1(%r10), %r11d
movq %r11, %r14
shlq $0x5, %r14
cmpw %r10w, 0x8(%r14,%rbx)
je 0x2d2d7
movl $0x4001, %r15d          # imm = 0x4001
movl %r10d, %r14d
movl %r14d, %r11d
movslq %r14d, %r14
shlq $0x5, %r14
movswl 0x8(%r14,%rbx), %r14d
cmpw %ax, %r14w
je 0x2d2d7
decl %r15d
cmpl $0x1, %r15d
ja 0x2d2b5
movl %r10d, %r11d
cmpl %eax, %r11d
setg %r10b
testl %ebp, %ebp
setg %r14b
andb %r10b, %r14b
cmpb $0x1, %r14b
jne 0x2d2fe
leal -0x1(%rbp), %r10d
leaq 0x23d778(%rip), %rdi    # 0x26aa70
movl %ecx, (%rdi,%r10,4)
movl %ebp, %ecx
movslq (%r9), %r12
movslq %r11d, %r11
shlq $0x5, %r11
movslq (%r11,%rbx), %r14
movq %r12, %r10
subq %r14, %r10
movswq 0x8(%r9), %r14
shlq $0x5, %r14
movslq 0x4(%r14,%rbx), %rdi
movslq 0x4(%r9), %r15
subq %r15, %rdi
imulq %r10, %rdi
movslq 0x4(%r11,%rbx), %r10
subq %r15, %r10
movslq (%r14,%rbx), %r11
subq %r12, %r11
imulq %r10, %r11
addq %rdi, %r11
shrq %r11
testl %r11d, %r11d
je 0x2d418
movslq 0x50(%rsp), %rdi
subq %rdi, %r12
movslq 0x58(%rsp), %rdi
subq %rdi, %r15
movq %r15, %r11
negq %r11
movq 0x90(%rsp), %rdi
imulq %r12, %rdi
imulq 0x98(%rsp), %r11
addq %rdi, %r11
shrq $0x10, %r11
addl 0x38(%rsp), %r11d
movslq %r15d, %rdi
imulq 0x88(%rsp), %rdi
imulq 0x48(%rsp), %r12
addq %rdi, %r12
shrq $0x10, %r12
addl %r8d, %r12d
movl 0x20(%rsp), %edi
movl %edi, %r15d
subl %r11d, %r15d
movslq %ebp, %rdi
leaq 0x3d9c4c(%rip), %r10    # 0x407000
movl %r11d, (%r10,%rdi,4)
subl 0x34(%rsp), %r11d
movl %r12d, %r10d
subl 0x24(%rsp), %r10d
shrl $0x1f, %r11d
shll $0x3, %r11d
shrl $0x1f, %r15d
shrl $0x1f, %r10d
leal (%r11,%r15,4), %r11d
xorl %r14d, %r14d
cmpl %r12d, 0x1c(%rsp)
setl %r14b
orl %r14d, %r11d
leal (%r11,%r10,2), %r10d
movl %r10d, %r11d
shll $0x4, %r11d
orl %r10d, %r11d
xorl $0xf0, %r11d
orl %r11d, %esi
leaq 0x3ddbf9(%rip), %r10    # 0x40b000
movl %r12d, (%r10,%rdi,4)
incl %ebp
leaq 0x23d65c(%rip), %r10    # 0x26aa70
movl %ebp, (%r10,%rdi,4)
leal -0x1(%rdx), %edi
addq $0x20, %r9
incl %eax
cmpl $0x1, %edx
movl %edi, %edx
jg 0x2d28f
jmp 0x2d434
xorl %ecx, %ecx
xorl %ebp, %ebp
xorl %esi, %esi
testl %ebp, %ebp
jle 0x2d445
leal -0x1(%rbp), %eax
leaq 0x23d62e(%rip), %rdx    # 0x26aa70
movl %ecx, (%rdx,%rax,4)
movl %esi, %eax
notl %eax
testb $-0x10, %al
movl 0x10(%rsp), %r15d
leaq 0x24e859(%rip), %rdi    # 0x27bcb0
leaq 0x3880c2(%rip), %r8     # 0x3b5520
leaq 0x3b336b(%rip), %r9     # 0x3e07d0
jne 0x2d4b7
movl 0x3d9b93(%rip), %eax    # 0x407000
movl %eax, 0x38(%rsp)
movslq 0x3ddb88(%rip), %r14    # 0x40b000
movl 0x3d9b72(%rip), %eax    # 0x406ff0
movl %eax, 0x70(%rsp)
movslq 0x32f42f(%rip), %r12    # 0x35c8b8
testb $0xf, %sil
je 0x2d4c1
movl %ebp, %edi
callq 0x2e4a7
leaq 0x3b3333(%rip), %r9     # 0x3e07d0
leaq 0x38807c(%rip), %r8     # 0x3b5520
leaq 0x24e805(%rip), %rdi    # 0x27bcb0
movl 0x10(%rsp), %r15d
movl %eax, %ebp
cmpl $0x3, %eax
jge 0x2d4c1
movq 0x8(%rsp), %rdx
jmp 0x2da6b
leaq 0x37e048(%rip), %rax    # 0x3ab510
movq (%rsp), %rcx
movzwl (%rax,%rcx,2), %eax
testw %ax, %ax
js 0x2d511
movzwl %ax, %ecx
imulq $0x2c, %rcx, %rdx
movzwl 0xc(%rdx,%rdi), %edx
movl %edx, %esi
andl $0x30, %esi
cmpl $0x20, %esi
setne %sil
notl %edx
testb $0x48, %dl
sete %dl
orb %sil, %dl
jne 0x2d50a
movslq %r15d, %rdx
incl %r15d
imulq $0x2c, %rdx, %rdx
movw %ax, 0x1e(%rdx,%r9)
movzwl (%r8,%rcx,2), %eax
jmp 0x2d4d0
leaq 0x76288(%rip), %rax     # 0xa37a0
movq 0x80(%rsp), %rcx
movb (%rcx,%rax), %al
leaq 0x3a1836(%rip), %rcx    # 0x3ced60
movq 0x28(%rsp), %rdx
orb %al, (%rdx,%rcx)
movq 0x8(%rsp), %rdx
movswl 0xe(%rdx), %eax
movl %eax, 0x3e1abf(%rip)    # 0x40f000
testb $0x1, %al
jne 0x2da6b
movzbl 0x1d(%rdx), %eax
movl %eax, 0x3e1ab1(%rip)    # 0x40f004
leaq 0x36a586(%rip), %rcx    # 0x397ae0
movq (%rcx,%rax,8), %rax
cmpq 0x3e1aa3(%rip), %rax    # 0x40f008
je 0x2d592
movq %rax, 0x3e1a9a(%rip)    # 0x40f008
testq %rax, %rax
jne 0x2d581
movq 0x36a566(%rip), %rax    # 0x397ae0
movq %rax, 0x3e1a87(%rip)    # 0x40f008
movq 0x3e1a80(%rip), %rdi    # 0x40f008
callq 0x6dcef
movq 0x8(%rsp), %rdx
movq %r12, 0x28(%rsp)
movq %r14, %r12
movzwl 0x18(%rdx), %eax
cmpl $0x2400, %eax           # imm = 0x2400
movl $0x0, %ecx
cmovael %ecx, %eax
movw %ax, 0x3e1a5e(%rip)     # 0x40f010
movswq %ax, %rdi
leaq 0x400183(%rip), %rcx    # 0x42d740
cmpb $-0x39, (%rdi,%rcx)
ja 0x2d5ce
leaq 0x400176(%rip), %rcx    # 0x42d740
movb $-0x39, (%rdi,%rcx)
movswl %ax, %r14d
movl %r14d, %eax
andl $0x7, %eax
leaq 0x761c1(%rip), %rcx     # 0xa37a0
movb (%rax,%rcx), %al
movl %r14d, %ecx
sarl $0x3, %ecx
movslq %ecx, %rcx
leaq 0x3ffcbe(%rip), %rsi    # 0x42d2b0
orb %al, (%rcx,%rsi)
movslq %r14d, %rax
leaq 0x3e1a21(%rip), %rcx    # 0x40f020
cmpw $0x0, (%rcx,%rax,2)
jle 0x2da6b
leaq 0x3d31cf(%rip), %rcx    # 0x4007e0
cmpw $0x0, (%rcx,%rax,2)
jle 0x2da6b
movl %r15d, 0x10(%rsp)
leaq 0x20c438(%rip), %rcx    # 0x239a60
testb $-0x40, (%rcx,%rax,4)
je 0x2d640
xorl %esi, %esi
callq 0x23d49
addl %eax, %r14d
movw %r14w, 0x3e19d0(%rip)   # 0x40f010
movswq 0x3e19c8(%rip), %rax    # 0x40f010
leaq 0x36ac91(%rip), %rcx    # 0x3982e0
cmpq $0x0, (%rcx,%rax,8)
jne 0x2d665
movswl %ax, %edi
callq 0x2f106
leaq 0x36ac7b(%rip), %rcx    # 0x3982e0
movswq 0x3e19a3(%rip), %rsi    # 0x40f010
movq (%rcx,%rsi,8), %r8
movq %r8, 0x3e61a8(%rip)     # 0x413820
movq 0x8(%rsp), %rdx
movsbl 0x1c(%rdx), %eax
movswl 0x3e61a0(%rip), %ecx    # 0x413828
decl %ecx
cmpl %eax, %ecx
cmovgel %eax, %ecx
testl %ecx, %ecx
movl $0x0, %eax
cmovlel %eax, %ecx
movl %ecx, 0x3e618d(%rip)    # 0x41382c
movslq 0x3a069e(%rip), %rax    # 0x3cdd44
movl %eax, 0x3e6184(%rip)    # 0x413830
movb 0x20(%rdx), %cl
testb %cl, %cl
movq %r12, %r14
je 0x2d6ca
addb $0x10, %cl
movzbl %cl, %ecx
imulq %rax, %rcx
shrq $0x4, %rcx
movl %ecx, 0x3e6166(%rip)    # 0x413830
movb $0x0, 0x3e6163(%rip)    # 0x413834
movl 0x3e1929(%rip), %edi    # 0x40f000
testb $0x40, %dil
movq 0x28(%rsp), %r12
jne 0x2d71b
movq 0x50(%rsp), %rax
movl %eax, 0x20c363(%rip)    # 0x239a50
movq 0x40(%rsp), %rcx
movl %ecx, 0x3e6140(%rip)    # 0x413838
movq 0x68(%rsp), %rdx
movl %edx, 0x3e6139(%rip)    # 0x41383c
movq 0x58(%rsp), %rax
movl %eax, 0x20c346(%rip)    # 0x239a54
movl %ecx, 0x3e612c(%rip)    # 0x413840
movl %edx, %eax
jmp 0x2d901
movq 0x78(%rsp), %rdx
movswq 0x8(%rdx), %rax
shlq $0x5, %rax
movslq (%rax,%rbx), %r9
movslq (%rdx), %rcx
subq %rcx, %r9
movslq 0x4(%rax,%rbx), %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 0x42778e(%rip), %r15    # 0x454f00
movzwl (%r15,%rcx,2), %ecx
shrl %cl, %r11d
leaq 0x42997f(%rip), %rax    # 0x457100
movzwl (%rax,%r11,2), %r11d
shrl $0x8, %ecx
shrl %cl, %r11d
testl %r11d, %r11d
je 0x2da89
movl 0x70(%rsp), %eax
shll $0xb, %eax
movslq %eax, %rcx
subq %rcx, %r14
imulq %r12, %r14
shrq $0x10, %r14
addl %r14d, %ecx
movl $0x100000, %eax         # imm = 0x100000
xorl %edx, %edx
divl %r11d
movq 0xa0(%rsp), %r14
movq %r14, %rdx
imulq %r9, %rdx
movq %r10, %r11
movl 0x38(%rsp), %r15d
movq 0x60(%rsp), %r12
imulq %r12, %r11
addq %rdx, %r11
shrq $0xa, %r11
movslq %r11d, %rdx
imulq %rax, %rdx
shrq $0xa, %rdx
movl %edx, 0x3e6049(%rip)    # 0x413838
negl %r10d
imulq %r12, %r9
movslq %r10d, %r10
imulq %r14, %r10
addq %r9, %r10
shrq $0xa, %r10
movslq %r10d, %r10
imulq %rax, %r10
shrq $0xa, %r10
movl %r10d, 0x3e6026(%rip)   # 0x41383c
sarl $0x4, %r15d
movl 0x3d97cc(%rip), %eax    # 0x406fec
shll $0x7, %eax
subl %r15d, %eax
sarl $0x4, %ecx
movl 0x3d97c0(%rip), %r9d    # 0x406ff0
shll $0x7, %r9d
subl %r9d, %ecx
movslq %ecx, %r9
negl %ecx
movslq %ecx, %rcx
movslq %edx, %rdx
imulq %rdx, %rcx
movslq %eax, %r11
movslq %r10d, %rax
movq %rax, %r10
imulq %r11, %r10
addq %rcx, %r10
shrq $0x1c, %r10
movl %r10d, 0x20c1ef(%rip)   # 0x239a50
imulq %rdx, %r11
imulq %rax, %r9
addq %r11, %r9
shrq $0x1c, %r9
movl %r9d, 0x20c1dd(%rip)    # 0x239a54
negl %edx
movq (%rsp), %rcx
leaq (%rcx,%rcx,4), %rcx
leaq 0x2151d8(%rip), %r10    # 0x242a60
movswl 0x1a(%r10,%rcx,8), %r10d
imull %r10d, %r10d
addl $0x1000000, %r10d       # imm = 0x1000000
movl %r10d, %ecx
shrl $0x17, %ecx
andl $-0x2, %ecx
leaq 0x427657(%rip), %r11    # 0x454f00
movzwl 0x2000(%r11,%rcx), %ecx
shrl %cl, %r10d
movl %edx, 0x3e5f85(%rip)    # 0x413840
negl %eax
leaq 0x42983c(%rip), %r11    # 0x457100
movzwl (%r11,%r10,2), %r10d
shrl $0x8, %ecx
shrl %cl, %r10d
movl %eax, 0x3e5f6f(%rip)    # 0x413844
movslq %r9d, %rcx
imulq %r10, %rcx
shrq $0xc, %rcx
movl %ecx, 0x20c16e(%rip)    # 0x239a54
movslq %edx, %rcx
imulq %r10, %rcx
shrq $0xc, %rcx
movl %ecx, 0x3e5f49(%rip)    # 0x413840
cltq
imulq %r10, %rax
shrq $0xc, %rax
movl %eax, 0x3e5f3d(%rip)    # 0x413844
leaq 0x3e5f42(%rip), %rax    # 0x413850
movzbl (%rsi,%rax), %esi
movl %esi, %eax
andb $0xf, %al
movb $0x8, %cl
subb %al, %cl
movb %cl, 0x3e8330(%rip)     # 0x415c50
movl %esi, %ecx
shrb $0x4, %cl
movb $0x8, %dl
subb %cl, %dl
movb %dl, 0x3e8322(%rip)     # 0x415c51
testb $0x8, %dil
je 0x2d949
movb $0x9, %dl
subb %al, %dl
movb %dl, 0x3e8311(%rip)     # 0x415c50
movb $0x9, %al
subb %cl, %al
movb %al, 0x3e8308(%rip)     # 0x415c51
movl %esi, %edi
andl $0xf, %edi
shrl $0x4, %esi
movq %r8, %rdx
callq 0x6dcdb
movl 0x3e16a1(%rip), %eax    # 0x40f000
testb $0x4, %al
je 0x2d9b3
xorl %ecx, %ecx
subl 0x20c0e9(%rip), %ecx    # 0x239a54
xorl %edx, %edx
subl 0x20c0dd(%rip), %edx    # 0x239a50
movl %ecx, 0x20c0d7(%rip)    # 0x239a50
movl %edx, 0x20c0d5(%rip)    # 0x239a54
movl 0x3e5ebb(%rip), %ecx    # 0x413840
movl 0x3e5eb1(%rip), %edx    # 0x41383c
movl %edx, 0x3e5eaf(%rip)    # 0x413840
movl %ecx, 0x3e5ea5(%rip)    # 0x41383c
xorl %ecx, %ecx
subl 0x3e5ea5(%rip), %ecx    # 0x413844
xorl %edx, %edx
subl 0x3e5e91(%rip), %edx    # 0x413838
movl %ecx, 0x3e5e8b(%rip)    # 0x413838
movl %edx, 0x3e5e91(%rip)    # 0x413844
testb $0x10, %al
je 0x2d9c9
negl 0x3e5e7b(%rip)          # 0x413838
negl 0x3e5e79(%rip)          # 0x41383c
negl 0x20c087(%rip)          # 0x239a50
testb $0x20, %al
je 0x2d9df
negl 0x3e5e6d(%rip)          # 0x413840
negl 0x3e5e6b(%rip)          # 0x413844
negl 0x20c075(%rip)          # 0x239a54
movl 0x3e5e57(%rip), %esi    # 0x41383c
movb 0x3e8265(%rip), %al     # 0x415c50
movl %eax, %ecx
shll %cl, %esi
movl 0x3e5e4b(%rip), %edi    # 0x413840
movb 0x3e8256(%rip), %dl     # 0x415c51
movl %edx, %ecx
shll %cl, %edi
movl %eax, %ecx
shll %cl, 0x3e5e31(%rip)     # 0x413838
movl %edx, %ecx
shll %cl, 0x3e5e35(%rip)     # 0x413844
movl 0x20c03a(%rip), %r8d    # 0x239a50
addb $0x14, %al
movl %eax, %ecx
shll %cl, %r8d
movl %esi, 0x3e8231(%rip)    # 0x415c54
movl %edi, 0x3e822f(%rip)    # 0x415c58
movq 0x8(%rsp), %r14
movzbl 0x1e(%r14), %eax
shll $0x18, %eax
addl %r8d, %eax
movl %eax, 0x20c011(%rip)    # 0x239a50
movl 0x20c00f(%rip), %eax    # 0x239a54
addb $0x14, %dl
movl %edx, %ecx
shll %cl, %eax
movzbl 0x1f(%r14), %ecx
shll $0x18, %ecx
subl %ecx, %eax
movl %eax, 0x20bff8(%rip)    # 0x239a54
movl %ebp, %edi
callq 0x2f277
movq %r14, %rdx
movl 0x10(%rsp), %r15d
movq (%rsp), %rsi
incq %rsi
addq $0x28, %rdx
movswq 0x3a14e2(%rip), %rax    # 0x3cef60
cmpq %rax, %rsi
jl 0x2d210
jmp 0x2da9a
movq 0x8(%rsp), %rdx
jmp 0x2da66
leaq 0x214fc9(%rip), %rdx    # 0x242a60
xorl %r15d, %r15d
cmpl $0x2, %r15d
jl 0x2dabb
movl $0x1, %eax
movl %eax, %r13d
leal 0x1(,%r13,2), %eax
cmpl %r15d, %eax
jl 0x2daa5
addl %r13d, %r13d
sarl %r13d
movq %rdx, 0x8(%rsp)
leaq 0x3b2d09(%rip), %rax    # 0x3e07d0
leaq 0x24e1e2(%rip), %rbp    # 0x27bcb0
testl %r13d, %r13d
jle 0x2db42
movl %r15d, %r14d
movl %r15d, %ecx
subl %r13d, %ecx
jle 0x2db31
xorl %edx, %edx
movl %edx, %esi
movl %esi, %edi
imulq $0x2c, %rdi, %r8
movswq 0x1e(%r8,%rax), %rdi
imulq $0x2c, %rdi, %r9
movl 0x8(%r9,%rbp), %r11d
leal (%rsi,%r13), %r9d
imulq $0x2c, %r9, %r10
movswq 0x1e(%r10,%rax), %r9
imulq $0x2c, %r9, %rbx
cmpl 0x8(%rbx,%rbp), %r11d
jle 0x2db2b
addq %rax, %r8
addq $0x1e, %r8
addq %rax, %r10
addq $0x1e, %r10
movw %di, (%r10)
movw %r9w, (%r8)
subl %r13d, %esi
jns 0x2dae2
incl %edx
cmpl %ecx, %edx
jne 0x2dae0
movl %r13d, %ecx
shrl %ecx
cmpl $0x2, %r13d
movl %ecx, %r13d
movl %r14d, %r15d
jae 0x2dad3
testl %r15d, %r15d
jle 0x2e454
movslq 0xa8(%rsp), %rcx
movq %rcx, 0x48(%rsp)
movslq 0xb0(%rsp), %rcx
movq %rcx, 0x10(%rsp)
movslq 0x40(%rsp), %rcx
movq %rcx, 0x60(%rsp)
movslq 0x68(%rsp), %rcx
movq %rcx, 0xc0(%rsp)
movl %r15d, %edx
imulq $0x2c, %rdx, %rcx
incq %rdx
movq %rdx, 0x38(%rsp)
addq %rcx, %rax
addq $-0xe, %rax
movq %rax, 0x88(%rsp)
movaps 0x483df(%rip), %xmm0    # 0x75f80
movq 0x88(%rsp), %rax
movswq (%rax), %rax
imulq $0x2c, %rax, %r9
movzwl 0xc(%r9,%rbp), %eax
movl %eax, %ecx
andl $0x30, %ecx
cmpl $0x20, %ecx
jne 0x2e434
addq %rbp, %r9
movq %r9, (%rsp)
movswq 0xe(%r9), %rcx
leaq 0x20be88(%rip), %rdx    # 0x239a60
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), %esi
addl %edx, %esi
movl %edi, %r8d
negl %r8d
testb $0x4, %al
cmovel %edi, %r8d
movl %esi, %edx
negl %edx
testb $0x8, %al
cmovel %esi, %edx
movswq 0x1c(%r9), %rax
leal 0x200(%rax), %esi
andl $0x7ff, %esi            # imm = 0x7FF
leaq 0x3a012b(%rip), %rdi    # 0x3cdd50
movswq (%rdi,%rsi,2), %rbx
movswq (%rdi,%rax,2), %rax
leaq 0x3e13ea(%rip), %rsi    # 0x40f020
movswq (%rsi,%rcx,2), %r10
movzbl 0x14(%r9), %r11d
leaq 0x3d2b99(%rip), %rsi    # 0x4007e0
movswq (%rsi,%rcx,2), %rsi
movzbl 0x15(%r9), %r15d
movl %r10d, %ecx
sarl %ecx
addl %r8d, %ecx
movslq %ecx, %rcx
imulq %r11, %rcx
movl %esi, %edi
sarl %edi
addl %edx, %edi
movslq %edi, %rdx
movq %rcx, %r8
imulq %rax, %r8
shrq $0x10, %r8
addl (%r9), %r8d
imulq %r15, %rdx
movq %rdx, %rdi
imulq %rbx, %rdi
shrq $0x10, %rdi
addl %r8d, %edi
movl 0x4(%r9), %r8d
imulq %rax, %rdx
shrq $0x10, %rdx
imulq %rbx, %rcx
shrq $0x10, %rcx
subl %ecx, %r8d
addl %edx, %r8d
movq %r10, 0x68(%rsp)
imulq %r10, %r11
movq %r11, %rcx
imulq %rax, %rcx
shrq $0x10, %rcx
movl %edi, %r14d
movq %rcx, 0x78(%rsp)
subl %ecx, %r14d
imulq %rbx, %r11
shrq $0x10, %r11
movq %r11, 0x80(%rsp)
leal (%r8,%r11), %edx
imulq %rsi, %r15
imulq %r15, %rbx
shrq $0x10, %rbx
imulq %rax, %r15
shrq $0x10, %r15
subl 0x50(%rsp), %edi
subl 0x58(%rsp), %r8d
movslq %r8d, %rax
negl %r8d
movslq %edi, %rdi
movq 0x90(%rsp), %rsi
imulq %rdi, %rsi
movslq %r8d, %rcx
imulq 0x98(%rsp), %rcx
addq %rsi, %rcx
shrq $0x10, %rcx
movl 0x3d92cb(%rip), %esi    # 0x406fec
shll $0xb, %esi
addl %esi, %ecx
imulq 0x48(%rsp), %rax
imulq 0x10(%rsp), %rdi
addq %rax, %rdi
shrq $0x10, %rdi
movl 0x3d92b1(%rip), %eax    # 0x406ff0
shll $0xb, %eax
movq %rdi, 0xb0(%rsp)
leal (%rax,%rdi), %r13d
movl %r13d, 0x28(%rsp)
movl %ecx, %edi
movl 0x34(%rsp), %r8d
subl %r8d, %edi
movl %r8d, %r12d
movl 0x20(%rsp), %r8d
subl %ecx, %r8d
movl %r13d, %r9d
subl 0x24(%rsp), %r9d
shrl $0x1f, %edi
shrl $0x1f, %r8d
shrl $0x1f, %r9d
xorl %r10d, %r10d
cmpl %r13d, 0x1c(%rsp)
setl %r10b
leal (%r10,%rdi,8), %edi
leal (%rdi,%r8,4), %edi
leal (%rdi,%r9,2), %edi
movl %edi, %r10d
shll $0x4, %r10d
orl %edi, %r10d
movl %r14d, %edi
subl 0x50(%rsp), %edi
movl %edx, %r8d
subl 0x58(%rsp), %r8d
movslq %r8d, %r9
negl %r8d
movslq %edi, %rdi
movq 0x90(%rsp), %r11
imulq %rdi, %r11
movslq %r8d, %r8
imulq 0x98(%rsp), %r8
addq %r11, %r8
imulq 0x48(%rsp), %r9
imulq 0x10(%rsp), %rdi
addq %r9, %rdi
movl $0xf0, %r9d
xorl %r9d, %r10d
shrq $0x10, %r8
addl %esi, %r8d
shrq $0x10, %rdi
addl %eax, %edi
movl %r8d, %r9d
subl %r12d, %r9d
movl 0x20(%rsp), %r11d
subl %r8d, %r11d
movl %edi, %r13d
subl 0x24(%rsp), %r13d
shrl $0x1f, %r9d
shrl $0x1f, %r11d
shrl $0x1f, %r13d
xorl %r12d, %r12d
cmpl %edi, 0x1c(%rsp)
setl %r12b
leal (%r12,%r9,8), %r9d
leal (%r9,%r11,4), %r9d
leal (%r9,%r13,2), %r11d
movl %r11d, %r9d
shll $0x4, %r9d
orl %r11d, %r9d
movl $0xf0, %r11d
xorl %r11d, %r9d
orl %r10d, %r9d
movq %rbx, 0x70(%rsp)
movq 0x50(%rsp), %r10
addl %ebx, %r10d
movq %rcx, %rbx
subl %r10d, %r14d
movq %r15, 0x40(%rsp)
movq 0x58(%rsp), %rcx
subl %r15d, %edx
subl %ecx, %edx
movslq %edx, %r10
negl %edx
movslq %r14d, %rcx
movq 0x90(%rsp), %r11
imulq %rcx, %r11
movslq %edx, %rdx
imulq 0x98(%rsp), %rdx
addq %r11, %rdx
shrq $0x10, %rdx
addl %esi, %edx
imulq 0x48(%rsp), %r10
imulq 0x10(%rsp), %rcx
addq %r10, %rcx
shrq $0x10, %rcx
movq %rax, 0xa8(%rsp)
addl %eax, %ecx
movl %edx, %esi
movl 0x34(%rsp), %r15d
subl %r15d, %esi
movl 0x20(%rsp), %eax
movl %eax, %r10d
subl %edx, %r10d
movl %ecx, %r11d
movl 0x24(%rsp), %r13d
subl %r13d, %r11d
shrl $0x1f, %esi
shrl $0x1f, %r10d
shrl $0x1f, %r11d
xorl %r12d, %r12d
movl 0x1c(%rsp), %r14d
cmpl %ecx, %r14d
setl %r12b
leal (%r12,%rsi,8), %esi
movq (%rsp), %r12
leal (%rsi,%r10,4), %esi
leal (%rsi,%r11,2), %esi
movl %esi, %r10d
shll $0x4, %r10d
orl %esi, %r10d
movl $0xf0, %r11d
xorl %r11d, %r10d
orl %r9d, %r10d
movl %ebx, 0x3d90ef(%rip)    # 0x407000
movl 0x28(%rsp), %esi
movl %esi, 0x3dd0e5(%rip)    # 0x40b000
movl %r8d, 0x3d90e2(%rip)    # 0x407004
movl %edi, 0x3dd0dc(%rip)    # 0x40b004
movl %edx, 0x3d90da(%rip)    # 0x407008
movl %ecx, 0x3dd0d4(%rip)    # 0x40b008
movq %rbx, 0xa0(%rsp)
addl %ebx, %edx
subl %r8d, %edx
addl %esi, %ecx
subl %edi, %ecx
subl %edx, %eax
movl %edx, 0x3d90bf(%rip)    # 0x40700c
subl %r15d, %edx
movl %ecx, %esi
subl %r13d, %esi
shrl $0x1f, %edx
shrl $0x1f, %eax
shrl $0x1f, %esi
xorl %edi, %edi
cmpl %ecx, %r14d
setl %dil
leal (%rdi,%rdx,8), %edx
leal (%rdx,%rax,4), %eax
leal (%rax,%rsi,2), %eax
movl %eax, %esi
shll $0x4, %esi
orl %eax, %esi
xorl %r11d, %esi
orl %r10d, %esi
movaps %xmm0, 0x23caec(%rip)   # 0x26aa70
movl %ecx, 0x3dd082(%rip)    # 0x40b00c
movl %esi, %eax
notl %eax
testb $-0x10, %al
jne 0x2e434
movslq 0x32e91b(%rip), %rbx    # 0x35c8b8
testb $0xf, %sil
je 0x2dfbe
movl $0x4, %edi
callq 0x2e4a7
movaps 0x47fcc(%rip), %xmm0    # 0x75f80
cmpl $0x3, %eax
jge 0x2dfc3
jmp 0x2e434
movl $0x4, %eax
movzwl 0xe(%r12), %edx
cmpl $0x2400, %edx           # imm = 0x2400
movl $0x0, %ecx
cmovael %ecx, %edx
movw %dx, 0x3e1032(%rip)     # 0x40f010
movswq %dx, %rdi
leaq 0x3ff757(%rip), %rcx    # 0x42d740
cmpb $-0x39, (%rdi,%rcx)
ja 0x2dffa
leaq 0x3ff74a(%rip), %rcx    # 0x42d740
movb $-0x39, (%rdi,%rcx)
movswl %dx, %r13d
movl %r13d, %edx
andl $0x7, %edx
leaq 0x75795(%rip), %rcx     # 0xa37a0
movb (%rdx,%rcx), %sil
movl %r13d, %ecx
sarl $0x3, %ecx
movslq %ecx, %rcx
leaq 0x3ff291(%rip), %rdx    # 0x42d2b0
orb %sil, (%rcx,%rdx)
movslq %r13d, %rdx
leaq 0x3e0ff3(%rip), %rcx    # 0x40f020
cmpw $0x0, (%rcx,%rdx,2)
jle 0x2e434
leaq 0x3d27a1(%rip), %rcx    # 0x4007e0
cmpw $0x0, (%rcx,%rdx,2)
jle 0x2e434
movq %rbx, 0xb8(%rsp)
leaq 0x20ba07(%rip), %rcx    # 0x239a60
testb $-0x40, (%rcx,%rdx,4)
movl %eax, 0x28(%rsp)
je 0x2e07c
xorl %esi, %esi
callq 0x23d49
movaps 0x47f0f(%rip), %xmm0    # 0x75f80
addl %eax, %r13d
movw %r13w, 0x3e0f94(%rip)   # 0x40f010
movswq 0x3e0f8c(%rip), %rax    # 0x40f010
leaq 0x36a255(%rip), %rbx    # 0x3982e0
cmpq $0x0, (%rbx,%rax,8)
jne 0x2e0a1
movswl %ax, %edi
callq 0x2f106
movaps 0x47edf(%rip), %xmm0    # 0x75f80
movswq 0x3e0f67(%rip), %rcx    # 0x40f010
movq (%rbx,%rcx,8), %rax
movq %rax, 0x3e576c(%rip)    # 0x413820
movswq 0x18(%r12), %rax
leaq (%rax,%rax,4), %rax
leaq 0x21499b(%rip), %rdx    # 0x242a60
leaq (%rdx,%rax,8), %rax
movzwl 0xc(%rax), %edx
xorl %esi, %esi
testb $0x1, %dl
sete %sil
movsbl 0x14(%rax,%rsi,8), %eax
movl %eax, 0x3e574b(%rip)    # 0x41382c
movsbl 0x10(%r12), %edx
addl %edx, %eax
addl $0x6, %eax
movswl 0x3e5735(%rip), %edx    # 0x413828
decl %edx
cmpl %edx, %eax
cmovll %eax, %edx
testl %edx, %edx
movl $0x0, %eax
cmovlel %eax, %edx
movl %edx, 0x3e5722(%rip)    # 0x41382c
movzbl 0x11(%r12), %eax
shll $0x8, %edx
leaq 0x3699c6(%rip), %rsi    # 0x397ae0
addq (%rsi,%rax,8), %rdx
movq %rdx, 0x3e7b3b(%rip)    # 0x415c60
movslq 0x39fc18(%rip), %rax    # 0x3cdd44
movl %eax, 0x3e56fe(%rip)    # 0x413830
movq 0x8(%rsp), %rdx
movb 0x20(%rdx), %dl
testb %dl, %dl
je 0x2e152
addb $0x10, %dl
movzbl %dl, %edx
imulq %rax, %rdx
shrq $0x4, %rdx
movl %edx, 0x3e56de(%rip)    # 0x413830
movzwl 0xc(%r12), %esi
btl $0x1, %esi
movl $0x0, %eax
adcb $0x1, %al
movb %al, 0x3e56cb(%rip)     # 0x413834
movq 0x78(%rsp), %rax
imull %eax, %eax
movq 0x80(%rsp), %rdx
movl %edx, %edi
imull %edx, %edi
addl %eax, %edi
je 0x2e434
movl $0x40000000, %eax       # imm = 0x40000000
xorl %edx, %edx
idivl %edi
movabsq $-0x100000000, %r8      # imm = 0xFFFFFFFF00000000
movq 0x78(%rsp), %rbx
imulq %r8, %rbx
sarq $0x20, %rbx
movq %rbx, %rdx
movq 0x60(%rsp), %r9
imulq %r9, %rdx
movq 0x80(%rsp), %r11
movslq %r11d, %rdi
movq 0xc0(%rsp), %r10
imulq %r10, %rdi
addq %rdx, %rdi
shrq $0xa, %rdi
movslq %edi, %rdi
cltq
imulq %rax, %rdi
shrq $0xa, %rdi
movl %edi, 0x3e5655(%rip)    # 0x413838
imulq %r10, %rbx
imulq %r8, %r11
sarq $0x20, %r11
imulq %r9, %r11
addq %rbx, %r11
shrq $0xa, %r11
movslq %r11d, %r9
imulq %rax, %r9
shrq $0xa, %r9
movl %r9d, 0x3e5630(%rip)    # 0x41383c
movq 0x40(%rsp), %rax
imull %eax, %eax
movq 0x70(%rsp), %rdx
movl %edx, %r8d
imull %edx, %r8d
addl %eax, %r8d
je 0x2e434
movl $0x40000000, %eax       # imm = 0x40000000
xorl %edx, %edx
divl %r8d
movslq 0x40(%rsp), %r8
movq %r8, %rdx
movq 0x60(%rsp), %rbx
imulq %rbx, %rdx
movq 0x70(%rsp), %r13
movq %r13, %r10
movabsq $-0x100000000, %r11     # imm = 0xFFFFFFFF00000000
imulq %r11, %r10
sarq $0x20, %r10
movq 0xc0(%rsp), %r11
imulq %r11, %r10
addq %rdx, %r10
shrq $0xa, %r10
movslq %r10d, %rdx
imulq %rax, %rdx
shrq $0xa, %rdx
movl %edx, 0x3e55be(%rip)    # 0x413840
imulq %r11, %r8
movslq %r13d, %r10
imulq %rbx, %r10
addq %r8, %r10
shrq $0xa, %r10
movslq %r10d, %r8
imulq %rax, %r8
shrq $0xa, %r8
movl %r8d, 0x3e559e(%rip)    # 0x413844
leaq 0x3e55a3(%rip), %rax    # 0x413850
movzbl (%rcx,%rax), %ebx
movl %ebx, %r15d
andl $0xf, %r15d
leaq 0x754f1(%rip), %rax     # 0xa37b0
movq 0x68(%rsp), %rcx
cmpl %ecx, (%rax,%r15,4)
je 0x2e2f3
incl %r15d
movslq %edi, %rax
movslq %ecx, %rdi
imulq %rdi, %rax
movl %r15d, %ecx
sarq %cl, %rax
movl %eax, 0x3e5555(%rip)    # 0x413838
movslq %r9d, %rax
imulq %rdi, %rax
sarq %cl, %rax
movl %eax, 0x3e5549(%rip)    # 0x41383c
movq 0xb8(%rsp), %rcx
movslq 0xb0(%rsp), %rax
imulq %rcx, %rax
shrq $0x10, %rax
movq 0xa8(%rsp), %rcx
addl %eax, %ecx
shrl $0x4, %ebx
movq 0xa0(%rsp), %r14
sarl $0x4, %r14d
movl 0x3d8cc2(%rip), %eax    # 0x406fec
shll $0x7, %eax
subl %eax, %r14d
sarl $0x4, %ecx
movl 0x3d8cb7(%rip), %eax    # 0x406ff0
shll $0x7, %eax
subl %ecx, %eax
movslq 0x3e54f3(%rip), %rcx    # 0x413838
movslq %r14d, %rdi
negl %r14d
movslq 0x3e54ea(%rip), %r9     # 0x41383c
cltq
imulq %rax, %rcx
movslq %r14d, %r10
imulq %r9, %r10
addq %rcx, %r10
shrq $0x1c, %r10
movl %r10d, 0x20b6e3(%rip)   # 0x239a50
movslq %edx, %rcx
imulq %rdi, %rcx
movslq %r8d, %rdx
imulq %rax, %rdx
addq %rcx, %rdx
shrq $0x1c, %rdx
movl %edx, 0x20b6cc(%rip)    # 0x239a54
testb $0x2, %sil
jne 0x2e39a
movl %r15d, %edi
movl %ebx, %esi
callq 0x6dfe7
jmp 0x2e3b6
btl $0x9, %esi
jb 0x2e3a7
callq 0x6dccb
jmp 0x2e3ac
callq 0x6dcd3
movl %r15d, %edi
movl %ebx, %esi
callq 0x6e08b
movswl 0xc(%r12), %eax
testb $0x4, %al
movl 0x28(%rsp), %edi
je 0x2e3d6
negl 0x3e546e(%rip)          # 0x413838
negl 0x3e546c(%rip)          # 0x41383c
negl 0x20b67a(%rip)          # 0x239a50
movl 0x3e5460(%rip), %ecx    # 0x41383c
shll $0x2, 0x3e5455(%rip)    # 0x413838
shll $0x16, 0x20b666(%rip)   # 0x239a50
shll $0x2, %ecx
movl %ecx, 0x3e7861(%rip)    # 0x415c54
movl 0x3e5447(%rip), %ecx    # 0x413840
shll $0x2, %ecx
shll $0x2, 0x3e5441(%rip)    # 0x413844
shll $0x16, 0x20b64a(%rip)   # 0x239a54
movl %ecx, 0x3e7848(%rip)    # 0x415c58
movl %eax, %ecx
andl $0x2, %ecx
shll $0x7, %ecx
shrl $0x2, %eax
andl $0x80, %eax
orl %ecx, %eax
movl %eax, 0x3e0bd8(%rip)    # 0x40f000
callq 0x2f277
movaps 0x47b4c(%rip), %xmm0    # 0x75f80
movq 0x38(%rsp), %rax
decq %rax
addq $-0x2c, 0x88(%rsp)
movq %rax, 0x38(%rsp)
cmpq $0x1, %rax
jg 0x2dba1
addq $0xc8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq