// File: /workspace/github_c_makefile_star2_O0/jonof[P]jftekwar/jfbuild/src/engine.c
// Function: wallmost
int wallmost(short *mostbuf, int w, int sectnum, unsigned char dastat)
{
	int bad, i, j, t, y, z, inty, intz, xcross, yinc, fw;
	int x1, y1, z1, x2, y2, z2, xv, yv, dx, dy, dasqr, oz1, oz2;
	int s1, s2, s3, s4, ix1, ix2, iy1, iy2;

	if (dastat == 0)
	{
		z = sector[sectnum].ceilingz-globalposz;
		if ((sector[sectnum].ceilingstat&2) == 0) return(owallmost(mostbuf,w,z));
	}
	else
	{
		z = sector[sectnum].floorz-globalposz;
		if ((sector[sectnum].floorstat&2) == 0) return(owallmost(mostbuf,w,z));
	}

	i = thewall[w];
	if (i == sector[sectnum].wallptr) return(owallmost(mostbuf,w,z));

	x1 = wall[i].x; x2 = wall[wall[i].point2].x-x1;
	y1 = wall[i].y; y2 = wall[wall[i].point2].y-y1;

	fw = sector[sectnum].wallptr; i = wall[fw].point2;
	dx = wall[i].x-wall[fw].x; dy = wall[i].y-wall[fw].y;
	dasqr = krecipasm(nsqrtasm(dx*dx+dy*dy));

	if (xb1[w] == 0)
		{ xv = cosglobalang+sinviewingrangeglobalang; yv = singlobalang-cosviewingrangeglobalang; }
	else
		{ xv = x1-globalposx; yv = y1-globalposy; }
	i = xv*(y1-globalposy)-yv*(x1-globalposx); j = yv*x2-xv*y2;
	if (klabs(j) > klabs(i>>3)) i = divscale28(i,j);
	if (dastat == 0)
	{
		t = mulscale15(sector[sectnum].ceilingheinum,dasqr);
		z1 = sector[sectnum].ceilingz;
	}
	else
	{
		t = mulscale15(sector[sectnum].floorheinum,dasqr);
		z1 = sector[sectnum].floorz;
	}
	z1 = dmulscale24(dx*t,mulscale20(y2,i)+((y1-wall[fw].y)<<8),
						 -dy*t,mulscale20(x2,i)+((x1-wall[fw].x)<<8))+((z1-globalposz)<<7);


	if (xb2[w] == xdimen-1)
		{ xv = cosglobalang-sinviewingrangeglobalang; yv = singlobalang+cosviewingrangeglobalang; }
	else
		{ xv = (x2+x1)-globalposx; yv = (y2+y1)-globalposy; }
	i = xv*(y1-globalposy)-yv*(x1-globalposx); j = yv*x2-xv*y2;
	if (klabs(j) > klabs(i>>3)) i = divscale28(i,j);
	if (dastat == 0)
	{
		t = mulscale15(sector[sectnum].ceilingheinum,dasqr);
		z2 = sector[sectnum].ceilingz;
	}
	else
	{
		t = mulscale15(sector[sectnum].floorheinum,dasqr);
		z2 = sector[sectnum].floorz;
	}
	z2 = dmulscale24(dx*t,mulscale20(y2,i)+((y1-wall[fw].y)<<8),
						 -dy*t,mulscale20(x2,i)+((x1-wall[fw].x)<<8))+((z2-globalposz)<<7);


	s1 = mulscale20(globaluclip,yb1[w]); s2 = mulscale20(globaluclip,yb2[w]);
	s3 = mulscale20(globaldclip,yb1[w]); s4 = mulscale20(globaldclip,yb2[w]);
	bad = (z1<s1)+((z2<s2)<<1)+((z1>s3)<<2)+((z2>s4)<<3);

	ix1 = xb1[w]; ix2 = xb2[w];
	iy1 = yb1[w]; iy2 = yb2[w];
	oz1 = z1; oz2 = z2;

	if ((bad&3) == 3)
	{
		//clearbufbyte(&mostbuf[ix1],(ix2-ix1+1)*sizeof(mostbuf[0]),0L);
		for (i=ix1; i<=ix2; i++) mostbuf[i] = 0;
		return(bad);
	}

	if ((bad&12) == 12)
	{
		//clearbufbyte(&mostbuf[ix1],(ix2-ix1+1)*sizeof(mostbuf[0]),ydimen+(ydimen<<16));
		for (i=ix1; i<=ix2; i++) mostbuf[i] = ydimen;
		return(bad);
	}

	if (bad&3)
	{
			//inty = intz / (globaluclip>>16)
		t = divscale30(oz1-s1,s2-s1+oz1-oz2);
		inty = yb1[w] + mulscale30(yb2[w]-yb1[w],t);
		intz = oz1 + mulscale30(oz2-oz1,t);
		xcross = xb1[w] + scale(mulscale30(yb2[w],t),xb2[w]-xb1[w],inty);

		//t = divscale30((x1<<4)-xcross*yb1[w],xcross*(yb2[w]-yb1[w])-((x2-x1)<<4));
		//inty = yb1[w] + mulscale30(yb2[w]-yb1[w],t);
		//intz = z1 + mulscale30(z2-z1,t);

		if ((bad&3) == 2)
		{
			if (xb1[w] <= xcross) { z2 = intz; iy2 = inty; ix2 = xcross; }
			//clearbufbyte(&mostbuf[xcross+1],(xb2[w]-xcross)*sizeof(mostbuf[0]),0L);
			for (i=xcross+1; i<=xb2[w]; i++) mostbuf[i] = 0;
		}
		else
		{
			if (xcross <= xb2[w]) { z1 = intz; iy1 = inty; ix1 = xcross; }
			//clearbufbyte(&mostbuf[xb1[w]],(xcross-xb1[w]+1)*sizeof(mostbuf[0]),0L);
			for (i=xb1[w]; i<=xcross; i++) mostbuf[i] = 0;
		}
	}

	if (bad&12)
	{
			//inty = intz / (globaldclip>>16)
		t = divscale30(oz1-s3,s4-s3+oz1-oz2);
		inty = yb1[w] + mulscale30(yb2[w]-yb1[w],t);
		intz = oz1 + mulscale30(oz2-oz1,t);
		xcross = xb1[w] + scale(mulscale30(yb2[w],t),xb2[w]-xb1[w],inty);

		//t = divscale30((x1<<4)-xcross*yb1[w],xcross*(yb2[w]-yb1[w])-((x2-x1)<<4));
		//inty = yb1[w] + mulscale30(yb2[w]-yb1[w],t);
		//intz = z1 + mulscale30(z2-z1,t);

		if ((bad&12) == 8)
		{
			if (xb1[w] <= xcross) { z2 = intz; iy2 = inty; ix2 = xcross; }
			//clearbufbyte(&mostbuf[xcross+1],(xb2[w]-xcross)*sizeof(mostbuf[0]),ydimen+(ydimen<<16));
			for (i=xcross+1; i<=xb2[w]; i++) mostbuf[i] = ydimen;
		}
		else
		{
			if (xcross <= xb2[w]) { z1 = intz; iy1 = inty; ix1 = xcross; }
			//clearbufbyte(&mostbuf[xb1[w]],(xcross-xb1[w]+1)*sizeof(mostbuf[0]),ydimen+(ydimen<<16));
			for (i=xb1[w]; i<=xcross; i++) mostbuf[i] = ydimen;
		}
	}

	y = (scale(z1,xdimenscale,iy1)<<4);
	yinc = ((scale(z2,xdimenscale,iy2)<<4)-y) / (ix2-ix1+1);
	qinterpolatedown16short(&mostbuf[ix1],ix2-ix1+1,y+(globalhoriz<<16),yinc);

	if (mostbuf[ix1] < 0) mostbuf[ix1] = 0;
	if (mostbuf[ix1] > ydimen) mostbuf[ix1] = ydimen;
	if (mostbuf[ix2] < 0) mostbuf[ix2] = 0;
	if (mostbuf[ix2] > ydimen) mostbuf[ix2] = ydimen;

	return(bad);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0xe0, %rsp
movb %cl, %al
movq %rdi, -0x10(%rbp)
movl %esi, -0x14(%rbp)
movl %edx, -0x18(%rbp)
movb %al, -0x19(%rbp)
movzbl -0x19(%rbp), %eax
cmpl $0x0, %eax
jne 0x36388
movslq -0x18(%rbp), %rcx
leaq 0x24a282(%rip), %rax    # 0x2805c0
imulq $0x28, %rcx, %rcx
addq %rcx, %rax
movl 0x4(%rax), %eax
subl 0x272272(%rip), %eax    # 0x2a85c0
movl %eax, -0x34(%rbp)
movslq -0x18(%rbp), %rcx
leaq 0x24a264(%rip), %rax    # 0x2805c0
imulq $0x28, %rcx, %rcx
addq %rcx, %rax
movswl 0xc(%rax), %eax
andl $0x2, %eax
cmpl $0x0, %eax
jne 0x36386
movq -0x10(%rbp), %rdi
movl -0x14(%rbp), %esi
movl -0x34(%rbp), %edx
callq 0x36f80
movl %eax, -0x4(%rbp)
jmp 0x36f72
jmp 0x363dd
movslq -0x18(%rbp), %rcx
leaq 0x24a22d(%rip), %rax    # 0x2805c0
imulq $0x28, %rcx, %rcx
addq %rcx, %rax
movl 0x8(%rax), %eax
subl 0x27221d(%rip), %eax    # 0x2a85c0
movl %eax, -0x34(%rbp)
movslq -0x18(%rbp), %rcx
leaq 0x24a20f(%rip), %rax    # 0x2805c0
imulq $0x28, %rcx, %rcx
addq %rcx, %rax
movswl 0xe(%rax), %eax
andl $0x2, %eax
cmpl $0x0, %eax
jne 0x363db
movq -0x10(%rbp), %rdi
movl -0x14(%rbp), %esi
movl -0x34(%rbp), %edx
callq 0x36f80
movl %eax, -0x4(%rbp)
jmp 0x36f72
jmp 0x363dd
movslq -0x14(%rbp), %rcx
leaq 0x23f1c8(%rip), %rax    # 0x2755b0
movswl (%rax,%rcx,2), %eax
movl %eax, -0x24(%rbp)
movl -0x24(%rbp), %eax
movslq -0x18(%rbp), %rdx
leaq 0x24a1c3(%rip), %rcx    # 0x2805c0
imulq $0x28, %rdx, %rdx
addq %rdx, %rcx
movswl (%rcx), %ecx
cmpl %ecx, %eax
jne 0x36422
movq -0x10(%rbp), %rdi
movl -0x14(%rbp), %esi
movl -0x34(%rbp), %edx
callq 0x36f80
movl %eax, -0x4(%rbp)
jmp 0x36f72
movslq -0x24(%rbp), %rcx
leaq 0x1bf183(%rip), %rax    # 0x1f55b0
shlq $0x5, %rcx
addq %rcx, %rax
movl (%rax), %eax
movl %eax, -0x4c(%rbp)
movslq -0x24(%rbp), %rcx
leaq 0x1bf16c(%rip), %rax    # 0x1f55b0
shlq $0x5, %rcx
addq %rcx, %rax
movswq 0x8(%rax), %rcx
leaq 0x1bf159(%rip), %rax    # 0x1f55b0
shlq $0x5, %rcx
addq %rcx, %rax
movl (%rax), %eax
subl -0x4c(%rbp), %eax
movl %eax, -0x58(%rbp)
movslq -0x24(%rbp), %rcx
leaq 0x1bf13f(%rip), %rax    # 0x1f55b0
shlq $0x5, %rcx
addq %rcx, %rax
movl 0x4(%rax), %eax
movl %eax, -0x50(%rbp)
movslq -0x24(%rbp), %rcx
leaq 0x1bf127(%rip), %rax    # 0x1f55b0
shlq $0x5, %rcx
addq %rcx, %rax
movswq 0x8(%rax), %rcx
leaq 0x1bf114(%rip), %rax    # 0x1f55b0
shlq $0x5, %rcx
addq %rcx, %rax
movl 0x4(%rax), %eax
subl -0x50(%rbp), %eax
movl %eax, -0x5c(%rbp)
movslq -0x18(%rbp), %rcx
leaq 0x24a109(%rip), %rax    # 0x2805c0
imulq $0x28, %rcx, %rcx
addq %rcx, %rax
movswl (%rax), %eax
movl %eax, -0x48(%rbp)
movslq -0x48(%rbp), %rcx
leaq 0x1bf0e1(%rip), %rax    # 0x1f55b0
shlq $0x5, %rcx
addq %rcx, %rax
movswl 0x8(%rax), %eax
movl %eax, -0x24(%rbp)
movslq -0x24(%rbp), %rcx
leaq 0x1bf0c8(%rip), %rax    # 0x1f55b0
shlq $0x5, %rcx
addq %rcx, %rax
movl (%rax), %eax
movslq -0x48(%rbp), %rdx
leaq 0x1bf0b4(%rip), %rcx    # 0x1f55b0
shlq $0x5, %rdx
addq %rdx, %rcx
subl (%rcx), %eax
movl %eax, -0x6c(%rbp)
movslq -0x24(%rbp), %rcx
leaq 0x1bf09d(%rip), %rax    # 0x1f55b0
shlq $0x5, %rcx
addq %rcx, %rax
movl 0x4(%rax), %eax
movslq -0x48(%rbp), %rdx
leaq 0x1bf088(%rip), %rcx    # 0x1f55b0
shlq $0x5, %rdx
addq %rdx, %rcx
subl 0x4(%rcx), %eax
movl %eax, -0x70(%rbp)
movl -0x6c(%rbp), %edi
imull -0x6c(%rbp), %edi
movl -0x70(%rbp), %eax
imull -0x70(%rbp), %eax
addl %eax, %edi
callq 0x37570
movl %eax, %edi
callq 0x37520
movl %eax, -0x74(%rbp)
movslq -0x14(%rbp), %rcx
leaq 0x272071(%rip), %rax    # 0x2a85d0
cmpl $0x0, (%rax,%rcx,4)
jne 0x36585
movl 0x276065(%rip), %eax    # 0x2ac5d0
addl 0x276063(%rip), %eax    # 0x2ac5d4
movl %eax, -0x64(%rbp)
movl 0x27605e(%rip), %eax    # 0x2ac5d8
subl 0x27605c(%rip), %eax    # 0x2ac5dc
movl %eax, -0x68(%rbp)
jmp 0x3659d
movl -0x4c(%rbp), %eax
subl 0x241022(%rip), %eax    # 0x2775b0
movl %eax, -0x64(%rbp)
movl -0x50(%rbp), %eax
subl 0x24101a(%rip), %eax    # 0x2775b4
movl %eax, -0x68(%rbp)
movl -0x64(%rbp), %eax
movl -0x50(%rbp), %ecx
subl 0x24100b(%rip), %ecx    # 0x2775b4
imull %ecx, %eax
movl -0x68(%rbp), %ecx
movl -0x4c(%rbp), %edx
subl 0x240ff8(%rip), %edx    # 0x2775b0
imull %edx, %ecx
subl %ecx, %eax
movl %eax, -0x24(%rbp)
movl -0x68(%rbp), %eax
imull -0x58(%rbp), %eax
movl -0x64(%rbp), %ecx
imull -0x5c(%rbp), %ecx
subl %ecx, %eax
movl %eax, -0x28(%rbp)
movl -0x28(%rbp), %edi
callq 0x37610
movl %eax, -0xa0(%rbp)
movl -0x24(%rbp), %edi
sarl $0x3, %edi
callq 0x37610
movl %eax, %ecx
movl -0xa0(%rbp), %eax
cmpl %ecx, %eax
jle 0x36606
movl -0x24(%rbp), %edi
movl -0x28(%rbp), %esi
callq 0x37640
movl %eax, -0x24(%rbp)
movzbl -0x19(%rbp), %eax
cmpl $0x0, %eax
jne 0x3664a
movslq -0x18(%rbp), %rcx
leaq 0x249fa6(%rip), %rax    # 0x2805c0
imulq $0x28, %rcx, %rcx
addq %rcx, %rax
movswl 0x12(%rax), %edi
movl -0x74(%rbp), %esi
callq 0x37660
movl %eax, -0x2c(%rbp)
movslq -0x18(%rbp), %rcx
leaq 0x249f85(%rip), %rax    # 0x2805c0
imulq $0x28, %rcx, %rcx
addq %rcx, %rax
movl 0x4(%rax), %eax
movl %eax, -0x54(%rbp)
jmp 0x36683
movslq -0x18(%rbp), %rcx
leaq 0x249f6b(%rip), %rax    # 0x2805c0
imulq $0x28, %rcx, %rcx
addq %rcx, %rax
movswl 0x1a(%rax), %edi
movl -0x74(%rbp), %esi
callq 0x37660
movl %eax, -0x2c(%rbp)
movslq -0x18(%rbp), %rcx
leaq 0x249f4a(%rip), %rax    # 0x2805c0
imulq $0x28, %rcx, %rcx
addq %rcx, %rax
movl 0x8(%rax), %eax
movl %eax, -0x54(%rbp)
movl -0x6c(%rbp), %eax
imull -0x2c(%rbp), %eax
movl %eax, -0xac(%rbp)
movl -0x5c(%rbp), %edi
movl -0x24(%rbp), %esi
callq 0x376c0
movl -0x50(%rbp), %ecx
movslq -0x48(%rbp), %rsi
leaq 0x1bef07(%rip), %rdx    # 0x1f55b0
shlq $0x5, %rsi
addq %rsi, %rdx
subl 0x4(%rdx), %ecx
shll $0x8, %ecx
addl %ecx, %eax
movl %eax, -0xa8(%rbp)
xorl %eax, %eax
subl -0x70(%rbp), %eax
imull -0x2c(%rbp), %eax
movl %eax, -0xa4(%rbp)
movl -0x58(%rbp), %edi
movl -0x24(%rbp), %esi
callq 0x376c0
movl -0xac(%rbp), %edi
movl -0xa8(%rbp), %esi
movl -0xa4(%rbp), %edx
movl %eax, %ecx
movl -0x4c(%rbp), %eax
movslq -0x48(%rbp), %r9
leaq 0x1beeb6(%rip), %r8     # 0x1f55b0
shlq $0x5, %r9
addq %r9, %r8
subl (%r8), %eax
shll $0x8, %eax
addl %eax, %ecx
callq 0x37680
movl -0x54(%rbp), %ecx
subl 0x271ea9(%rip), %ecx    # 0x2a85c0
shll $0x7, %ecx
addl %ecx, %eax
movl %eax, -0x54(%rbp)
movslq -0x14(%rbp), %rcx
leaq 0x275eb6(%rip), %rax    # 0x2ac5e0
movl (%rax,%rcx,4), %eax
movl 0xaa5ed(%rip), %ecx     # 0xe0d20
subl $0x1, %ecx
cmpl %ecx, %eax
jne 0x3675a
movl 0x275e90(%rip), %eax    # 0x2ac5d0
subl 0x275e8e(%rip), %eax    # 0x2ac5d4
movl %eax, -0x64(%rbp)
movl 0x275e89(%rip), %eax    # 0x2ac5d8
addl 0x275e87(%rip), %eax    # 0x2ac5dc
movl %eax, -0x68(%rbp)
jmp 0x36778
movl -0x58(%rbp), %eax
addl -0x4c(%rbp), %eax
subl 0x240e4a(%rip), %eax    # 0x2775b0
movl %eax, -0x64(%rbp)
movl -0x5c(%rbp), %eax
addl -0x50(%rbp), %eax
subl 0x240e3f(%rip), %eax    # 0x2775b4
movl %eax, -0x68(%rbp)
movl -0x64(%rbp), %eax
movl -0x50(%rbp), %ecx
subl 0x240e30(%rip), %ecx    # 0x2775b4
imull %ecx, %eax
movl -0x68(%rbp), %ecx
movl -0x4c(%rbp), %edx
subl 0x240e1d(%rip), %edx    # 0x2775b0
imull %edx, %ecx
subl %ecx, %eax
movl %eax, -0x24(%rbp)
movl -0x68(%rbp), %eax
imull -0x58(%rbp), %eax
movl -0x64(%rbp), %ecx
imull -0x5c(%rbp), %ecx
subl %ecx, %eax
movl %eax, -0x28(%rbp)
movl -0x28(%rbp), %edi
callq 0x37610
movl %eax, -0xb0(%rbp)
movl -0x24(%rbp), %edi
sarl $0x3, %edi
callq 0x37610
movl %eax, %ecx
movl -0xb0(%rbp), %eax
cmpl %ecx, %eax
jle 0x367e1
movl -0x24(%rbp), %edi
movl -0x28(%rbp), %esi
callq 0x37640
movl %eax, -0x24(%rbp)
movzbl -0x19(%rbp), %eax
cmpl $0x0, %eax
jne 0x36825
movslq -0x18(%rbp), %rcx
leaq 0x249dcb(%rip), %rax    # 0x2805c0
imulq $0x28, %rcx, %rcx
addq %rcx, %rax
movswl 0x12(%rax), %edi
movl -0x74(%rbp), %esi
callq 0x37660
movl %eax, -0x2c(%rbp)
movslq -0x18(%rbp), %rcx
leaq 0x249daa(%rip), %rax    # 0x2805c0
imulq $0x28, %rcx, %rcx
addq %rcx, %rax
movl 0x4(%rax), %eax
movl %eax, -0x60(%rbp)
jmp 0x3685e
movslq -0x18(%rbp), %rcx
leaq 0x249d90(%rip), %rax    # 0x2805c0
imulq $0x28, %rcx, %rcx
addq %rcx, %rax
movswl 0x1a(%rax), %edi
movl -0x74(%rbp), %esi
callq 0x37660
movl %eax, -0x2c(%rbp)
movslq -0x18(%rbp), %rcx
leaq 0x249d6f(%rip), %rax    # 0x2805c0
imulq $0x28, %rcx, %rcx
addq %rcx, %rax
movl 0x8(%rax), %eax
movl %eax, -0x60(%rbp)
movl -0x6c(%rbp), %eax
imull -0x2c(%rbp), %eax
movl %eax, -0xbc(%rbp)
movl -0x5c(%rbp), %edi
movl -0x24(%rbp), %esi
callq 0x376c0
movl -0x50(%rbp), %ecx
movslq -0x48(%rbp), %rsi
leaq 0x1bed2c(%rip), %rdx    # 0x1f55b0
shlq $0x5, %rsi
addq %rsi, %rdx
subl 0x4(%rdx), %ecx
shll $0x8, %ecx
addl %ecx, %eax
movl %eax, -0xb8(%rbp)
xorl %eax, %eax
subl -0x70(%rbp), %eax
imull -0x2c(%rbp), %eax
movl %eax, -0xb4(%rbp)
movl -0x58(%rbp), %edi
movl -0x24(%rbp), %esi
callq 0x376c0
movl -0xbc(%rbp), %edi
movl -0xb8(%rbp), %esi
movl -0xb4(%rbp), %edx
movl %eax, %ecx
movl -0x4c(%rbp), %eax
movslq -0x48(%rbp), %r9
leaq 0x1becdb(%rip), %r8     # 0x1f55b0
shlq $0x5, %r9
addq %r9, %r8
subl (%r8), %eax
shll $0x8, %eax
addl %eax, %ecx
callq 0x37680
movl -0x60(%rbp), %ecx
subl 0x271cce(%rip), %ecx    # 0x2a85c0
shll $0x7, %ecx
addl %ecx, %eax
movl %eax, -0x60(%rbp)
movl 0x279ce0(%rip), %edi    # 0x2b05e0
movslq -0x14(%rbp), %rcx
leaq 0x279ce5(%rip), %rax    # 0x2b05f0
movl (%rax,%rcx,4), %esi
callq 0x376c0
movl %eax, -0x80(%rbp)
movl 0x279cc4(%rip), %edi    # 0x2b05e0
movslq -0x14(%rbp), %rcx
leaq 0x27dcc9(%rip), %rax    # 0x2b45f0
movl (%rax,%rcx,4), %esi
callq 0x376c0
movl %eax, -0x84(%rbp)
movl 0x281cb5(%rip), %edi    # 0x2b85f0
movslq -0x14(%rbp), %rcx
leaq 0x279caa(%rip), %rax    # 0x2b05f0
movl (%rax,%rcx,4), %esi
callq 0x376c0
movl %eax, -0x88(%rbp)
movl 0x281c96(%rip), %edi    # 0x2b85f0
movslq -0x14(%rbp), %rcx
leaq 0x27dc8b(%rip), %rax    # 0x2b45f0
movl (%rax,%rcx,4), %esi
callq 0x376c0
movl %eax, -0x8c(%rbp)
movl -0x54(%rbp), %eax
cmpl -0x80(%rbp), %eax
setl %al
andb $0x1, %al
movzbl %al, %eax
movl -0x60(%rbp), %ecx
cmpl -0x84(%rbp), %ecx
setl %cl
andb $0x1, %cl
movzbl %cl, %ecx
shll %ecx
addl %ecx, %eax
movl -0x54(%rbp), %ecx
cmpl -0x88(%rbp), %ecx
setg %cl
andb $0x1, %cl
movzbl %cl, %ecx
shll $0x2, %ecx
addl %ecx, %eax
movl -0x60(%rbp), %ecx
cmpl -0x8c(%rbp), %ecx
setg %cl
andb $0x1, %cl
movzbl %cl, %ecx
shll $0x3, %ecx
addl %ecx, %eax
movl %eax, -0x20(%rbp)
movslq -0x14(%rbp), %rcx
leaq 0x271bfd(%rip), %rax    # 0x2a85d0
movl (%rax,%rcx,4), %eax
movl %eax, -0x90(%rbp)
movslq -0x14(%rbp), %rcx
leaq 0x275bf9(%rip), %rax    # 0x2ac5e0
movl (%rax,%rcx,4), %eax
movl %eax, -0x94(%rbp)
movslq -0x14(%rbp), %rcx
leaq 0x279bf5(%rip), %rax    # 0x2b05f0
movl (%rax,%rcx,4), %eax
movl %eax, -0x98(%rbp)
movslq -0x14(%rbp), %rcx
leaq 0x27dbe1(%rip), %rax    # 0x2b45f0
movl (%rax,%rcx,4), %eax
movl %eax, -0x9c(%rbp)
movl -0x54(%rbp), %eax
movl %eax, -0x78(%rbp)
movl -0x60(%rbp), %eax
movl %eax, -0x7c(%rbp)
movl -0x20(%rbp), %eax
andl $0x3, %eax
cmpl $0x3, %eax
jne 0x36a67
movl -0x90(%rbp), %eax
movl %eax, -0x24(%rbp)
movl -0x24(%rbp), %eax
cmpl -0x94(%rbp), %eax
jg 0x36a5c
movq -0x10(%rbp), %rax
movslq -0x24(%rbp), %rcx
movw $0x0, (%rax,%rcx,2)
movl -0x24(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x24(%rbp)
jmp 0x36a38
movl -0x20(%rbp), %eax
movl %eax, -0x4(%rbp)
jmp 0x36f72
movl -0x20(%rbp), %eax
andl $0xc, %eax
cmpl $0xc, %eax
jne 0x36ab1
movl -0x90(%rbp), %eax
movl %eax, -0x24(%rbp)
movl -0x24(%rbp), %eax
cmpl -0x94(%rbp), %eax
jg 0x36aa6
movl 0x281b68(%rip), %eax    # 0x2b85f4
movw %ax, %dx
movq -0x10(%rbp), %rax
movslq -0x24(%rbp), %rcx
movw %dx, (%rax,%rcx,2)
movl -0x24(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x24(%rbp)
jmp 0x36a7b
movl -0x20(%rbp), %eax
movl %eax, -0x4(%rbp)
jmp 0x36f72
movl -0x20(%rbp), %eax
andl $0x3, %eax
cmpl $0x0, %eax
je 0x36c71
movl -0x78(%rbp), %edi
subl -0x80(%rbp), %edi
movl -0x84(%rbp), %esi
subl -0x80(%rbp), %esi
addl -0x78(%rbp), %esi
subl -0x7c(%rbp), %esi
callq 0x376e0
movl %eax, -0x2c(%rbp)
movslq -0x14(%rbp), %rcx
leaq 0x279b08(%rip), %rax    # 0x2b05f0
movl (%rax,%rcx,4), %eax
movl %eax, -0xc8(%rbp)
movslq -0x14(%rbp), %rcx
leaq 0x27daf4(%rip), %rax    # 0x2b45f0
movl (%rax,%rcx,4), %edi
movslq -0x14(%rbp), %rcx
leaq 0x279ae6(%rip), %rax    # 0x2b05f0
subl (%rax,%rcx,4), %edi
movl -0x2c(%rbp), %esi
callq 0x37700
movl %eax, %ecx
movl -0xc8(%rbp), %eax
addl %ecx, %eax
movl %eax, -0x38(%rbp)
movl -0x78(%rbp), %eax
movl %eax, -0xc4(%rbp)
movl -0x7c(%rbp), %edi
subl -0x78(%rbp), %edi
movl -0x2c(%rbp), %esi
callq 0x37700
movl %eax, %ecx
movl -0xc4(%rbp), %eax
addl %ecx, %eax
movl %eax, -0x3c(%rbp)
movslq -0x14(%rbp), %rcx
leaq 0x271a7f(%rip), %rax    # 0x2a85d0
movl (%rax,%rcx,4), %eax
movl %eax, -0xc0(%rbp)
movslq -0x14(%rbp), %rcx
leaq 0x27da8b(%rip), %rax    # 0x2b45f0
movl (%rax,%rcx,4), %edi
movl -0x2c(%rbp), %esi
callq 0x37700
movl %eax, %edi
movslq -0x14(%rbp), %rcx
leaq 0x275a63(%rip), %rax    # 0x2ac5e0
movl (%rax,%rcx,4), %esi
movslq -0x14(%rbp), %rcx
leaq 0x271a45(%rip), %rax    # 0x2a85d0
subl (%rax,%rcx,4), %esi
movl -0x38(%rbp), %edx
callq 0x37720
movl %eax, %ecx
movl -0xc0(%rbp), %eax
addl %ecx, %eax
movl %eax, -0x40(%rbp)
movl -0x20(%rbp), %eax
andl $0x3, %eax
cmpl $0x2, %eax
jne 0x36c10
movslq -0x14(%rbp), %rcx
leaq 0x271a17(%rip), %rax    # 0x2a85d0
movl (%rax,%rcx,4), %eax
cmpl -0x40(%rbp), %eax
jg 0x36bd9
movl -0x3c(%rbp), %eax
movl %eax, -0x60(%rbp)
movl -0x38(%rbp), %eax
movl %eax, -0x9c(%rbp)
movl -0x40(%rbp), %eax
movl %eax, -0x94(%rbp)
movl -0x40(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x24(%rbp)
movl -0x24(%rbp), %eax
movslq -0x14(%rbp), %rdx
leaq 0x2759f0(%rip), %rcx    # 0x2ac5e0
cmpl (%rcx,%rdx,4), %eax
jg 0x36c0e
movq -0x10(%rbp), %rax
movslq -0x24(%rbp), %rcx
movw $0x0, (%rax,%rcx,2)
movl -0x24(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x24(%rbp)
jmp 0x36be2
jmp 0x36c6f
movl -0x40(%rbp), %eax
movslq -0x14(%rbp), %rdx
leaq 0x2759c2(%rip), %rcx    # 0x2ac5e0
cmpl (%rcx,%rdx,4), %eax
jg 0x36c3b
movl -0x3c(%rbp), %eax
movl %eax, -0x54(%rbp)
movl -0x38(%rbp), %eax
movl %eax, -0x98(%rbp)
movl -0x40(%rbp), %eax
movl %eax, -0x90(%rbp)
movslq -0x14(%rbp), %rcx
leaq 0x27198a(%rip), %rax    # 0x2a85d0
movl (%rax,%rcx,4), %eax
movl %eax, -0x24(%rbp)
movl -0x24(%rbp), %eax
cmpl -0x40(%rbp), %eax
jg 0x36c6d
movq -0x10(%rbp), %rax
movslq -0x24(%rbp), %rcx
movw $0x0, (%rax,%rcx,2)
movl -0x24(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x24(%rbp)
jmp 0x36c4c
jmp 0x36c6f
jmp 0x36c71
movl -0x20(%rbp), %eax
andl $0xc, %eax
cmpl $0x0, %eax
je 0x36e45
movl -0x78(%rbp), %edi
subl -0x88(%rbp), %edi
movl -0x8c(%rbp), %esi
subl -0x88(%rbp), %esi
addl -0x78(%rbp), %esi
subl -0x7c(%rbp), %esi
callq 0x376e0
movl %eax, -0x2c(%rbp)
movslq -0x14(%rbp), %rcx
leaq 0x279942(%rip), %rax    # 0x2b05f0
movl (%rax,%rcx,4), %eax
movl %eax, -0xd4(%rbp)
movslq -0x14(%rbp), %rcx
leaq 0x27d92e(%rip), %rax    # 0x2b45f0
movl (%rax,%rcx,4), %edi
movslq -0x14(%rbp), %rcx
leaq 0x279920(%rip), %rax    # 0x2b05f0
subl (%rax,%rcx,4), %edi
movl -0x2c(%rbp), %esi
callq 0x37700
movl %eax, %ecx
movl -0xd4(%rbp), %eax
addl %ecx, %eax
movl %eax, -0x38(%rbp)
movl -0x78(%rbp), %eax
movl %eax, -0xd0(%rbp)
movl -0x7c(%rbp), %edi
subl -0x78(%rbp), %edi
movl -0x2c(%rbp), %esi
callq 0x37700
movl %eax, %ecx
movl -0xd0(%rbp), %eax
addl %ecx, %eax
movl %eax, -0x3c(%rbp)
movslq -0x14(%rbp), %rcx
leaq 0x2718b9(%rip), %rax    # 0x2a85d0
movl (%rax,%rcx,4), %eax
movl %eax, -0xcc(%rbp)
movslq -0x14(%rbp), %rcx
leaq 0x27d8c5(%rip), %rax    # 0x2b45f0
movl (%rax,%rcx,4), %edi
movl -0x2c(%rbp), %esi
callq 0x37700
movl %eax, %edi
movslq -0x14(%rbp), %rcx
leaq 0x27589d(%rip), %rax    # 0x2ac5e0
movl (%rax,%rcx,4), %esi
movslq -0x14(%rbp), %rcx
leaq 0x27187f(%rip), %rax    # 0x2a85d0
subl (%rax,%rcx,4), %esi
movl -0x38(%rbp), %edx
callq 0x37720
movl %eax, %ecx
movl -0xcc(%rbp), %eax
addl %ecx, %eax
movl %eax, -0x40(%rbp)
movl -0x20(%rbp), %eax
andl $0xc, %eax
cmpl $0x8, %eax
jne 0x36ddd
movslq -0x14(%rbp), %rcx
leaq 0x271851(%rip), %rax    # 0x2a85d0
movl (%rax,%rcx,4), %eax
cmpl -0x40(%rbp), %eax
jg 0x36d9f
movl -0x3c(%rbp), %eax
movl %eax, -0x60(%rbp)
movl -0x38(%rbp), %eax
movl %eax, -0x9c(%rbp)
movl -0x40(%rbp), %eax
movl %eax, -0x94(%rbp)
movl -0x40(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x24(%rbp)
movl -0x24(%rbp), %eax
movslq -0x14(%rbp), %rdx
leaq 0x27582a(%rip), %rcx    # 0x2ac5e0
cmpl (%rcx,%rdx,4), %eax
jg 0x36ddb
movl 0x281833(%rip), %eax    # 0x2b85f4
movw %ax, %dx
movq -0x10(%rbp), %rax
movslq -0x24(%rbp), %rcx
movw %dx, (%rax,%rcx,2)
movl -0x24(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x24(%rbp)
jmp 0x36da8
jmp 0x36e43
movl -0x40(%rbp), %eax
movslq -0x14(%rbp), %rdx
leaq 0x2757f5(%rip), %rcx    # 0x2ac5e0
cmpl (%rcx,%rdx,4), %eax
jg 0x36e08
movl -0x3c(%rbp), %eax
movl %eax, -0x54(%rbp)
movl -0x38(%rbp), %eax
movl %eax, -0x98(%rbp)
movl -0x40(%rbp), %eax
movl %eax, -0x90(%rbp)
movslq -0x14(%rbp), %rcx
leaq 0x2717bd(%rip), %rax    # 0x2a85d0
movl (%rax,%rcx,4), %eax
movl %eax, -0x24(%rbp)
movl -0x24(%rbp), %eax
cmpl -0x40(%rbp), %eax
jg 0x36e41
movl 0x2817cd(%rip), %eax    # 0x2b85f4
movw %ax, %dx
movq -0x10(%rbp), %rax
movslq -0x24(%rbp), %rcx
movw %dx, (%rax,%rcx,2)
movl -0x24(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x24(%rbp)
jmp 0x36e19
jmp 0x36e43
jmp 0x36e45
movl -0x54(%rbp), %edi
movl 0x2817aa(%rip), %esi    # 0x2b85f8
movl -0x98(%rbp), %edx
callq 0x37720
shll $0x4, %eax
movl %eax, -0x30(%rbp)
movl -0x60(%rbp), %edi
movl 0x281790(%rip), %esi    # 0x2b85f8
movl -0x9c(%rbp), %edx
callq 0x37720
shll $0x4, %eax
subl -0x30(%rbp), %eax
movl -0x94(%rbp), %ecx
subl -0x90(%rbp), %ecx
addl $0x1, %ecx
cltd
idivl %ecx
movl %eax, -0x44(%rbp)
movq -0x10(%rbp), %rdi
movslq -0x90(%rbp), %rax
shlq %rax
addq %rax, %rdi
movl -0x94(%rbp), %esi
subl -0x90(%rbp), %esi
addl $0x1, %esi
movl -0x30(%rbp), %edx
movl 0x281745(%rip), %eax    # 0x2b85fc
shll $0x10, %eax
addl %eax, %edx
movl -0x44(%rbp), %ecx
callq 0x6ecf0
movq -0x10(%rbp), %rax
movslq -0x90(%rbp), %rcx
movswl (%rax,%rcx,2), %eax
cmpl $0x0, %eax
jge 0x36ee9
movq -0x10(%rbp), %rax
movslq -0x90(%rbp), %rcx
movw $0x0, (%rax,%rcx,2)
movq -0x10(%rbp), %rax
movslq -0x90(%rbp), %rcx
movswl (%rax,%rcx,2), %eax
cmpl 0x2816f6(%rip), %eax    # 0x2b85f4
jle 0x36f18
movl 0x2816ee(%rip), %eax    # 0x2b85f4
movw %ax, %dx
movq -0x10(%rbp), %rax
movslq -0x90(%rbp), %rcx
movw %dx, (%rax,%rcx,2)
movq -0x10(%rbp), %rax
movslq -0x94(%rbp), %rcx
movswl (%rax,%rcx,2), %eax
cmpl $0x0, %eax
jge 0x36f3d
movq -0x10(%rbp), %rax
movslq -0x94(%rbp), %rcx
movw $0x0, (%rax,%rcx,2)
movq -0x10(%rbp), %rax
movslq -0x94(%rbp), %rcx
movswl (%rax,%rcx,2), %eax
cmpl 0x2816a2(%rip), %eax    # 0x2b85f4
jle 0x36f6c
movl 0x28169a(%rip), %eax    # 0x2b85f4
movw %ax, %dx
movq -0x10(%rbp), %rax
movslq -0x94(%rbp), %rcx
movw %dx, (%rax,%rcx,2)
movl -0x20(%rbp), %eax
movl %eax, -0x4(%rbp)
movl -0x4(%rbp), %eax
addq $0xe0, %rsp
popq %rbp
retq
nop