// File: /workspace/github_c_makefile_star2_O0/jonof[P]jftekwar/jfbuild/src/engine.c
// Function: ceilscan
static void ceilscan(int x1, int x2, int sectnum)
{
	int i, j, ox, oy, x, y1, y2, twall, bwall;
	sectortype *sec;

	sec = &sector[sectnum];
	if (palookup[sec->ceilingpal] != globalpalwritten)
	{
		globalpalwritten = palookup[sec->ceilingpal];
		if (!globalpalwritten) globalpalwritten = palookup[globalpal];	// JBF: fixes null-pointer crash
		setpalookupaddress(globalpalwritten);
	}

	globalzd = sec->ceilingz-globalposz;
	if (globalzd > 0) return;
	globalpicnum = sec->ceilingpicnum;
	if ((unsigned)globalpicnum >= (unsigned)MAXTILES) globalpicnum = 0;
	setgotpic(globalpicnum);
	if ((tilesizx[globalpicnum] <= 0) || (tilesizy[globalpicnum] <= 0)) return;
	if (picanm[globalpicnum]&192) globalpicnum += animateoffs((short)globalpicnum,(short)sectnum);

	if (waloff[globalpicnum] == 0) loadtile(globalpicnum);
	globalbufplc = waloff[globalpicnum];

	globalshade = (int)sec->ceilingshade;
	globvis = globalcisibility;
	if (sec->visibility != 0) globvis = mulscale4(globvis,(int)((unsigned char)(sec->visibility+16)));
	globalorientation = (int)sec->ceilingstat;


	if ((globalorientation&64) == 0)
	{
		globalx1 = singlobalang; globalx2 = singlobalang;
		globaly1 = cosglobalang; globaly2 = cosglobalang;
		globalxpanning = (globalposx<<20);
		globalypanning = -(globalposy<<20);
	}
	else
	{
		j = sec->wallptr;
		ox = wall[wall[j].point2].x - wall[j].x;
		oy = wall[wall[j].point2].y - wall[j].y;
		i = nsqrtasm(ox*ox+oy*oy); if (i == 0) i = 1024; else i = 1048576/i;
		globalx1 = mulscale10(dmulscale10(ox,singlobalang,-oy,cosglobalang),i);
		globaly1 = mulscale10(dmulscale10(ox,cosglobalang,oy,singlobalang),i);
		globalx2 = -globalx1;
		globaly2 = -globaly1;

		ox = ((wall[j].x-globalposx)<<6); oy = ((wall[j].y-globalposy)<<6);
		i = dmulscale14(oy,cosglobalang,-ox,singlobalang);
		j = dmulscale14(ox,cosglobalang,oy,singlobalang);
		ox = i; oy = j;
		globalxpanning = globalx1*ox - globaly1*oy;
		globalypanning = globaly2*ox + globalx2*oy;
	}
	globalx2 = mulscale16(globalx2,viewingrangerecip);
	globaly1 = mulscale16(globaly1,viewingrangerecip);
	globalxshift = (8-(picsiz[globalpicnum]&15));
	globalyshift = (8-(picsiz[globalpicnum]>>4));
	if (globalorientation&8) { globalxshift++; globalyshift++; }

	if ((globalorientation&0x4) > 0)
	{
		i = globalxpanning; globalxpanning = globalypanning; globalypanning = i;
		i = globalx2; globalx2 = -globaly1; globaly1 = -i;
		i = globalx1; globalx1 = globaly2; globaly2 = i;
	}
	if ((globalorientation&0x10) > 0) globalx1 = -globalx1, globaly1 = -globaly1, globalxpanning = -globalxpanning;
	if ((globalorientation&0x20) > 0) globalx2 = -globalx2, globaly2 = -globaly2, globalypanning = -globalypanning;
	globalx1 <<= globalxshift; globaly1 <<= globalxshift;
	globalx2 <<= globalyshift;  globaly2 <<= globalyshift;
	globalxpanning <<= globalxshift; globalypanning <<= globalyshift;
	globalxpanning += (((int)sec->ceilingxpanning)<<24);
	globalypanning += (((int)sec->ceilingypanning)<<24);
	globaly1 = (-globalx1-globaly1)*halfxdimen;
	globalx2 = (globalx2-globaly2)*halfxdimen;

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

	globalx2 += globaly2*(x1-1);
	globaly1 += globalx1*(x1-1);
	globalx1 = mulscale16(globalx1,globalzd);
	globalx2 = mulscale16(globalx2,globalzd);
	globaly1 = mulscale16(globaly1,globalzd);
	globaly2 = mulscale16(globaly2,globalzd);
	globvis = klabs(mulscale10(globvis,globalzd));

	if (!(globalorientation&0x180))
	{
		y1 = umost[x1]; y2 = y1;
		for(x=x1;x<=x2;x++)
		{
			twall = umost[x]-1; bwall = min(uplc[x],dmost[x]);
			if (twall < bwall-1)
			{
				if (twall >= y2)
				{
					while (y1 < y2-1) hline(x-1,++y1);
					y1 = twall;
				}
				else
				{
					while (y1 < twall) hline(x-1,++y1);
					while (y1 > twall) lastx[y1--] = x;
				}
				while (y2 > bwall) hline(x-1,--y2);
				while (y2 < bwall) lastx[y2++] = x;
			}
			else
			{
				while (y1 < y2-1) hline(x-1,++y1);
				if (x == x2) { globalx2 += globaly2; globaly1 += globalx1; break; }
				y1 = umost[x+1]; y2 = y1;
			}
			globalx2 += globaly2; globaly1 += globalx1;
		}
		while (y1 < y2-1) hline(x2,++y1);
		faketimerhandler();
		return;
	}

	switch(globalorientation&0x180)
	{
		case 128:
			msethlineshift(picsiz[globalpicnum]&15,picsiz[globalpicnum]>>4);
			break;
		case 256:
			settransnormal();
			tsethlineshift(picsiz[globalpicnum]&15,picsiz[globalpicnum]>>4);
			break;
		case 384:
			settransreverse();
			tsethlineshift(picsiz[globalpicnum]&15,picsiz[globalpicnum]>>4);
			break;
	}

	y1 = umost[x1]; y2 = y1;
	for(x=x1;x<=x2;x++)
	{
		twall = umost[x]-1; bwall = min(uplc[x],dmost[x]);
		if (twall < bwall-1)
		{
			if (twall >= y2)
			{
				while (y1 < y2-1) slowhline(x-1,++y1);
				y1 = twall;
			}
			else
			{
				while (y1 < twall) slowhline(x-1,++y1);
				while (y1 > twall) lastx[y1--] = x;
			}
			while (y2 > bwall) slowhline(x-1,--y2);
			while (y2 < bwall) lastx[y2++] = x;
		}
		else
		{
			while (y1 < y2-1) slowhline(x-1,++y1);
			if (x == x2) { globalx2 += globaly2; globaly1 += globalx1; break; }
			y1 = umost[x+1]; y2 = y1;
		}
		globalx2 += globaly2; globaly1 += globalx1;
	}
	while (y1 < y2-1) slowhline(x2,++y1);
	faketimerhandler();
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x50, %rsp
movl %edi, -0x4(%rbp)
movl %esi, -0x8(%rbp)
movl %edx, -0xc(%rbp)
movslq -0xc(%rbp), %rcx
leaq 0x2247e4(%rip), %rax    # 0x2805c0
imulq $0x28, %rcx, %rcx
addq %rcx, %rax
movq %rax, -0x38(%rbp)
movq -0x38(%rbp), %rax
movzbl 0x15(%rax), %eax
movl %eax, %ecx
leaq 0x379848(%rip), %rax    # 0x3d5640
movq (%rax,%rcx,8), %rax
cmpq 0x3eef65(%rip), %rax    # 0x44ad68
je 0x5be50
movq -0x38(%rbp), %rax
movzbl 0x15(%rax), %eax
movl %eax, %ecx
leaq 0x37982a(%rip), %rax    # 0x3d5640
movq (%rax,%rcx,8), %rax
movq %rax, 0x3eef47(%rip)    # 0x44ad68
cmpq $0x0, 0x3eef3f(%rip)    # 0x44ad68
jne 0x5be44
movslq 0x3eef32(%rip), %rcx    # 0x44ad64
leaq 0x379807(%rip), %rax    # 0x3d5640
movq (%rax,%rcx,8), %rax
movq %rax, 0x3eef24(%rip)    # 0x44ad68
movq 0x3eef1d(%rip), %rdi    # 0x44ad68
callq 0xa75e0
movq -0x38(%rbp), %rax
movl 0x4(%rax), %eax
subl 0x24c763(%rip), %eax    # 0x2a85c0
movl %eax, 0x42cae9(%rip)    # 0x48894c
cmpl $0x0, 0x42cae2(%rip)    # 0x48894c
jle 0x5be71
jmp 0x5ca7c
movq -0x38(%rbp), %rax
movw 0x10(%rax), %ax
movw %ax, 0x3eeef0(%rip)     # 0x44ad70
movswl 0x3eeee9(%rip), %eax    # 0x44ad70
cmpl $0x2400, %eax           # imm = 0x2400
jb 0x5be97
movw $0x0, 0x3eeed9(%rip)    # 0x44ad70
movswl 0x3eeed2(%rip), %edi    # 0x44ad70
callq 0x44d80
movswq 0x3eeec5(%rip), %rcx    # 0x44ad70
leaq 0x3eeece(%rip), %rax    # 0x44ad80
movswl (%rax,%rcx,2), %eax
cmpl $0x0, %eax
jle 0x5bed3
movswq 0x3eeead(%rip), %rcx    # 0x44ad70
leaq 0x3e0676(%rip), %rax    # 0x43c540
movswl (%rax,%rcx,2), %eax
cmpl $0x0, %eax
jg 0x5bed8
jmp 0x5ca7c
movswq 0x3eee90(%rip), %rcx    # 0x44ad70
leaq 0x21b6d9(%rip), %rax    # 0x2775c0
movl (%rax,%rcx,4), %eax
andl $0xc0, %eax
cmpl $0x0, %eax
je 0x5bf1b
movw 0x3eee75(%rip), %cx     # 0x44ad70
movl -0xc(%rbp), %eax
movswl %cx, %edi
movswl %ax, %esi
callq 0x361e0
movl %eax, %ecx
movswl 0x3eee5e(%rip), %eax    # 0x44ad70
addl %ecx, %eax
movw %ax, 0x3eee55(%rip)     # 0x44ad70
movswq 0x3eee4d(%rip), %rcx    # 0x44ad70
leaq 0x379f16(%rip), %rax    # 0x3d5e40
cmpq $0x0, (%rax,%rcx,8)
jne 0x5bf3d
movswl 0x3eee38(%rip), %edi    # 0x44ad70
callq 0x44df0
movswq 0x3eee2b(%rip), %rcx    # 0x44ad70
leaq 0x379ef4(%rip), %rax    # 0x3d5e40
movq (%rax,%rcx,8), %rax
movq %rax, 0x3f3629(%rip)    # 0x44f580
movq -0x38(%rbp), %rax
movsbl 0x14(%rax), %eax
movl %eax, 0x3f3627(%rip)    # 0x44f58c
movl 0x3af93d(%rip), %eax    # 0x40b8a8
movl %eax, 0x3f361f(%rip)    # 0x44f590
movq -0x38(%rbp), %rax
movzbl 0x20(%rax), %eax
cmpl $0x0, %eax
je 0x5bf9d
movl 0x3f360c(%rip), %edi    # 0x44f590
movq -0x38(%rbp), %rax
movzbl 0x20(%rax), %eax
addl $0x10, %eax
movzbl %al, %esi
callq 0x44ff0
movl %eax, 0x3f35f3(%rip)    # 0x44f590
movq -0x38(%rbp), %rax
movswl 0xc(%rax), %eax
movl %eax, 0x3eedb5(%rip)    # 0x44ad60
movl 0x3eedaf(%rip), %eax    # 0x44ad60
andl $0x40, %eax
cmpl $0x0, %eax
jne 0x5c010
movl 0x250619(%rip), %eax    # 0x2ac5d8
movl %eax, 0x3f35d3(%rip)    # 0x44f598
movl 0x25060d(%rip), %eax    # 0x2ac5d8
movl %eax, 0x3f35cf(%rip)    # 0x44f5a0
movl 0x2505f9(%rip), %eax    # 0x2ac5d0
movl %eax, 0x3f35bf(%rip)    # 0x44f59c
movl 0x2505ed(%rip), %eax    # 0x2ac5d0
movl %eax, 0x3f35bb(%rip)    # 0x44f5a4
movl 0x21b5c1(%rip), %eax    # 0x2775b0
shll $0x14, %eax
movl %eax, 0x42c948(%rip)    # 0x488940
movl 0x21b5b6(%rip), %ecx    # 0x2775b4
shll $0x14, %ecx
xorl %eax, %eax
subl %ecx, %eax
movl %eax, 0x42c939(%rip)    # 0x488944
jmp 0x5c1f2
movq -0x38(%rbp), %rax
movswl (%rax), %eax
movl %eax, -0x14(%rbp)
movslq -0x14(%rbp), %rcx
leaq 0x19958b(%rip), %rax    # 0x1f55b0
shlq $0x5, %rcx
addq %rcx, %rax
movswq 0x8(%rax), %rcx
leaq 0x199578(%rip), %rax    # 0x1f55b0
shlq $0x5, %rcx
addq %rcx, %rax
movl (%rax), %eax
movslq -0x14(%rbp), %rdx
leaq 0x199564(%rip), %rcx    # 0x1f55b0
shlq $0x5, %rdx
addq %rdx, %rcx
subl (%rcx), %eax
movl %eax, -0x18(%rbp)
movslq -0x14(%rbp), %rcx
leaq 0x19954d(%rip), %rax    # 0x1f55b0
shlq $0x5, %rcx
addq %rcx, %rax
movswq 0x8(%rax), %rcx
leaq 0x19953a(%rip), %rax    # 0x1f55b0
shlq $0x5, %rcx
addq %rcx, %rax
movl 0x4(%rax), %eax
movslq -0x14(%rbp), %rdx
leaq 0x199525(%rip), %rcx    # 0x1f55b0
shlq $0x5, %rdx
addq %rdx, %rcx
subl 0x4(%rcx), %eax
movl %eax, -0x1c(%rbp)
movl -0x18(%rbp), %edi
imull -0x18(%rbp), %edi
movl -0x1c(%rbp), %eax
imull -0x1c(%rbp), %eax
addl %eax, %edi
callq 0x37570
movl %eax, -0x10(%rbp)
cmpl $0x0, -0x10(%rbp)
jne 0x5c0bf
movl $0x400, -0x10(%rbp)     # imm = 0x400
jmp 0x5c0cb
movl $0x100000, %eax         # imm = 0x100000
cltd
idivl -0x10(%rbp)
movl %eax, -0x10(%rbp)
movl -0x18(%rbp), %edi
movl 0x250504(%rip), %esi    # 0x2ac5d8
xorl %edx, %edx
subl -0x1c(%rbp), %edx
movl 0x2504f1(%rip), %ecx    # 0x2ac5d0
callq 0x45030
movl %eax, %edi
movl -0x10(%rbp), %esi
callq 0x45010
movl %eax, 0x3f34a4(%rip)    # 0x44f598
movl -0x18(%rbp), %edi
movl 0x2504d3(%rip), %esi    # 0x2ac5d0
movl -0x1c(%rbp), %edx
movl 0x2504d2(%rip), %ecx    # 0x2ac5d8
callq 0x45030
movl %eax, %edi
movl -0x10(%rbp), %esi
callq 0x45010
movl %eax, 0x3f3481(%rip)    # 0x44f59c
xorl %eax, %eax
subl 0x3f3475(%rip), %eax    # 0x44f598
movl %eax, 0x3f3477(%rip)    # 0x44f5a0
xorl %eax, %eax
subl 0x3f346b(%rip), %eax    # 0x44f59c
movl %eax, 0x3f346d(%rip)    # 0x44f5a4
movslq -0x14(%rbp), %rcx
leaq 0x19946e(%rip), %rax    # 0x1f55b0
shlq $0x5, %rcx
addq %rcx, %rax
movl (%rax), %eax
subl 0x21b45f(%rip), %eax    # 0x2775b0
shll $0x6, %eax
movl %eax, -0x18(%rbp)
movslq -0x14(%rbp), %rcx
leaq 0x19944e(%rip), %rax    # 0x1f55b0
shlq $0x5, %rcx
addq %rcx, %rax
movl 0x4(%rax), %eax
subl 0x21b442(%rip), %eax    # 0x2775b4
shll $0x6, %eax
movl %eax, -0x1c(%rbp)
movl -0x1c(%rbp), %edi
movl 0x25044f(%rip), %esi    # 0x2ac5d0
xorl %edx, %edx
subl -0x18(%rbp), %edx
movl 0x25044c(%rip), %ecx    # 0x2ac5d8
callq 0x52880
movl %eax, -0x10(%rbp)
movl -0x18(%rbp), %edi
movl 0x250433(%rip), %esi    # 0x2ac5d0
movl -0x1c(%rbp), %edx
movl 0x250432(%rip), %ecx    # 0x2ac5d8
callq 0x52880
movl %eax, -0x14(%rbp)
movl -0x10(%rbp), %eax
movl %eax, -0x18(%rbp)
movl -0x14(%rbp), %eax
movl %eax, -0x1c(%rbp)
movl 0x3f33d8(%rip), %eax    # 0x44f598
imull -0x18(%rbp), %eax
movl 0x3f33d2(%rip), %ecx    # 0x44f59c
imull -0x1c(%rbp), %ecx
subl %ecx, %eax
movl %eax, 0x42c76a(%rip)    # 0x488940
movl 0x3f33c8(%rip), %eax    # 0x44f5a4
imull -0x18(%rbp), %eax
movl 0x3f33ba(%rip), %ecx    # 0x44f5a0
imull -0x1c(%rbp), %ecx
addl %ecx, %eax
movl %eax, 0x42c752(%rip)    # 0x488944
movl 0x3f33a8(%rip), %edi    # 0x44f5a0
movl 0x3af69a(%rip), %esi    # 0x40b898
callq 0x39010
movl %eax, 0x3f3397(%rip)    # 0x44f5a0
movl 0x3f338d(%rip), %edi    # 0x44f59c
movl 0x3af683(%rip), %esi    # 0x40b898
callq 0x39010
movl %eax, 0x3f337c(%rip)    # 0x44f59c
movswq 0x3eeb48(%rip), %rcx    # 0x44ad70
leaq 0x3f3381(%rip), %rax    # 0x44f5b0
movzbl (%rax,%rcx), %ecx
andl $0xf, %ecx
movl $0x8, %eax
subl %ecx, %eax
movb %al, 0x3f576d(%rip)     # 0x4519b0
movswq 0x3eeb25(%rip), %rcx    # 0x44ad70
leaq 0x3f335e(%rip), %rax    # 0x44f5b0
movzbl (%rax,%rcx), %ecx
sarl $0x4, %ecx
movl $0x8, %eax
subl %ecx, %eax
movb %al, 0x3f574b(%rip)     # 0x4519b1
movl 0x3eeaf4(%rip), %eax    # 0x44ad60
andl $0x8, %eax
cmpl $0x0, %eax
je 0x5c290
movb 0x3f5736(%rip), %al     # 0x4519b0
addb $0x1, %al
movb %al, 0x3f572e(%rip)     # 0x4519b0
movb 0x3f5729(%rip), %al     # 0x4519b1
addb $0x1, %al
movb %al, 0x3f5721(%rip)     # 0x4519b1
movl 0x3eeaca(%rip), %eax    # 0x44ad60
andl $0x4, %eax
cmpl $0x0, %eax
jle 0x5c2fc
movl 0x42c69c(%rip), %eax    # 0x488940
movl %eax, -0x10(%rbp)
movl 0x42c697(%rip), %eax    # 0x488944
movl %eax, 0x42c68d(%rip)    # 0x488940
movl -0x10(%rbp), %eax
movl %eax, 0x42c688(%rip)    # 0x488944
movl 0x3f32de(%rip), %eax    # 0x44f5a0
movl %eax, -0x10(%rbp)
xorl %eax, %eax
subl 0x3f32cf(%rip), %eax    # 0x44f59c
movl %eax, 0x3f32cd(%rip)    # 0x44f5a0
xorl %eax, %eax
subl -0x10(%rbp), %eax
movl %eax, 0x3f32be(%rip)    # 0x44f59c
movl 0x3f32b4(%rip), %eax    # 0x44f598
movl %eax, -0x10(%rbp)
movl 0x3f32b7(%rip), %eax    # 0x44f5a4
movl %eax, 0x3f32a5(%rip)    # 0x44f598
movl -0x10(%rbp), %eax
movl %eax, 0x3f32a8(%rip)    # 0x44f5a4
movl 0x3eea5e(%rip), %eax    # 0x44ad60
andl $0x10, %eax
cmpl $0x0, %eax
jle 0x5c334
xorl %eax, %eax
subl 0x3f3286(%rip), %eax    # 0x44f598
movl %eax, 0x3f3280(%rip)    # 0x44f598
xorl %eax, %eax
subl 0x3f327c(%rip), %eax    # 0x44f59c
movl %eax, 0x3f3276(%rip)    # 0x44f59c
xorl %eax, %eax
subl 0x42c612(%rip), %eax    # 0x488940
movl %eax, 0x42c60c(%rip)    # 0x488940
movl 0x3eea26(%rip), %eax    # 0x44ad60
andl $0x20, %eax
cmpl $0x0, %eax
jle 0x5c36c
xorl %eax, %eax
subl 0x3f3256(%rip), %eax    # 0x44f5a0
movl %eax, 0x3f3250(%rip)    # 0x44f5a0
xorl %eax, %eax
subl 0x3f324c(%rip), %eax    # 0x44f5a4
movl %eax, 0x3f3246(%rip)    # 0x44f5a4
xorl %eax, %eax
subl 0x42c5de(%rip), %eax    # 0x488944
movl %eax, 0x42c5d8(%rip)    # 0x488944
movzbl 0x3f563d(%rip), %ecx    # 0x4519b0
movl 0x3f321f(%rip), %eax    # 0x44f598
shll %cl, %eax
movl %eax, 0x3f3217(%rip)    # 0x44f598
movzbl 0x3f5628(%rip), %ecx    # 0x4519b0
movl 0x3f320e(%rip), %eax    # 0x44f59c
shll %cl, %eax
movl %eax, 0x3f3206(%rip)    # 0x44f59c
movzbl 0x3f5614(%rip), %ecx    # 0x4519b1
movl 0x3f31fd(%rip), %eax    # 0x44f5a0
shll %cl, %eax
movl %eax, 0x3f31f5(%rip)    # 0x44f5a0
movzbl 0x3f55ff(%rip), %ecx    # 0x4519b1
movl 0x3f31ec(%rip), %eax    # 0x44f5a4
shll %cl, %eax
movl %eax, 0x3f31e4(%rip)    # 0x44f5a4
movzbl 0x3f55e9(%rip), %ecx    # 0x4519b0
movl 0x42c573(%rip), %eax    # 0x488940
shll %cl, %eax
movl %eax, 0x42c56b(%rip)    # 0x488940
movzbl 0x3f55d5(%rip), %ecx    # 0x4519b1
movl 0x42c562(%rip), %eax    # 0x488944
shll %cl, %eax
movl %eax, 0x42c55a(%rip)    # 0x488944
movq -0x38(%rbp), %rax
movzbl 0x16(%rax), %eax
shll $0x18, %eax
addl 0x42c545(%rip), %eax    # 0x488940
movl %eax, 0x42c53f(%rip)    # 0x488940
movq -0x38(%rbp), %rax
movzbl 0x17(%rax), %eax
shll $0x18, %eax
addl 0x42c532(%rip), %eax    # 0x488944
movl %eax, 0x42c52c(%rip)    # 0x488944
xorl %eax, %eax
subl 0x3f3178(%rip), %eax    # 0x44f598
subl 0x3f3176(%rip), %eax    # 0x44f59c
imull 0x3f7277(%rip), %eax    # 0x4536a4
movl %eax, 0x3f3169(%rip)    # 0x44f59c
movl 0x3f3167(%rip), %eax    # 0x44f5a0
subl 0x3f3165(%rip), %eax    # 0x44f5a4
imull 0x3f725e(%rip), %eax    # 0x4536a4
movl %eax, 0x3f3154(%rip)    # 0x44f5a0
movswq 0x3ee91c(%rip), %rcx    # 0x44ad70
leaq 0x3f3155(%rip), %rax    # 0x44f5b0
movzbl (%rax,%rcx), %edi
andl $0xf, %edi
movswq 0x3ee906(%rip), %rcx    # 0x44ad70
leaq 0x3f313f(%rip), %rax    # 0x44f5b0
movzbl (%rax,%rcx), %esi
sarl $0x4, %esi
movq 0x3f3101(%rip), %rdx    # 0x44f580
callq 0xa75b0
movl 0x3f311a(%rip), %eax    # 0x44f5a4
movl -0x4(%rbp), %ecx
subl $0x1, %ecx
imull %ecx, %eax
addl 0x3f3107(%rip), %eax    # 0x44f5a0
movl %eax, 0x3f3101(%rip)    # 0x44f5a0
movl 0x3f30f3(%rip), %eax    # 0x44f598
movl -0x4(%rbp), %ecx
subl $0x1, %ecx
imull %ecx, %eax
addl 0x3f30e8(%rip), %eax    # 0x44f59c
movl %eax, 0x3f30e2(%rip)    # 0x44f59c
movl 0x3f30d8(%rip), %edi    # 0x44f598
movl 0x42c486(%rip), %esi    # 0x48894c
callq 0x39010
movl %eax, 0x3f30c7(%rip)    # 0x44f598
movl 0x3f30c9(%rip), %edi    # 0x44f5a0
movl 0x42c46f(%rip), %esi    # 0x48894c
callq 0x39010
movl %eax, 0x3f30b8(%rip)    # 0x44f5a0
movl 0x3f30ae(%rip), %edi    # 0x44f59c
movl 0x42c458(%rip), %esi    # 0x48894c
callq 0x39010
movl %eax, 0x3f309d(%rip)    # 0x44f59c
movl 0x3f309f(%rip), %edi    # 0x44f5a4
movl 0x42c441(%rip), %esi    # 0x48894c
callq 0x39010
movl %eax, 0x3f308e(%rip)    # 0x44f5a4
movl 0x3f3074(%rip), %edi    # 0x44f590
movl 0x42c42a(%rip), %esi    # 0x48894c
callq 0x45010
movl %eax, %edi
callq 0x37610
movl %eax, 0x3f305c(%rip)    # 0x44f590
movl 0x3ee826(%rip), %eax    # 0x44ad60
andl $0x180, %eax            # imm = 0x180
cmpl $0x0, %eax
jne 0x5c77b
movslq -0x4(%rbp), %rcx
leaq 0x3b329d(%rip), %rax    # 0x40f7f0
movswl (%rax,%rcx,2), %eax
movl %eax, -0x24(%rbp)
movl -0x24(%rbp), %eax
movl %eax, -0x28(%rbp)
movl -0x4(%rbp), %eax
movl %eax, -0x20(%rbp)
movl -0x20(%rbp), %eax
cmpl -0x8(%rbp), %eax
jg 0x5c74f
movslq -0x20(%rbp), %rcx
leaq 0x3b3273(%rip), %rax    # 0x40f7f0
movswl (%rax,%rcx,2), %eax
subl $0x1, %eax
movl %eax, -0x2c(%rbp)
movslq -0x20(%rbp), %rcx
leaq 0x42963e(%rip), %rax    # 0x485bd0
movswl (%rax,%rcx,2), %eax
movslq -0x20(%rbp), %rdx
leaq 0x3b48cf(%rip), %rcx    # 0x410e70
movswl (%rcx,%rdx,2), %ecx
cmpl %ecx, %eax
jge 0x5c5bd
movslq -0x20(%rbp), %rcx
leaq 0x42961c(%rip), %rax    # 0x485bd0
movswl (%rax,%rcx,2), %eax
movl %eax, -0x3c(%rbp)
jmp 0x5c5cf
movslq -0x20(%rbp), %rcx
leaq 0x3b48a8(%rip), %rax    # 0x410e70
movswl (%rax,%rcx,2), %eax
movl %eax, -0x3c(%rbp)
movl -0x3c(%rbp), %eax
movl %eax, -0x30(%rbp)
movl -0x2c(%rbp), %eax
movl -0x30(%rbp), %ecx
subl $0x1, %ecx
cmpl %ecx, %eax
jge 0x5c6ad
movl -0x2c(%rbp), %eax
cmpl -0x28(%rbp), %eax
jl 0x5c61b
jmp 0x5c5f0
movl -0x24(%rbp), %eax
movl -0x28(%rbp), %ecx
subl $0x1, %ecx
cmpl %ecx, %eax
jge 0x5c613
movl -0x20(%rbp), %edi
subl $0x1, %edi
movl -0x24(%rbp), %esi
addl $0x1, %esi
movl %esi, -0x24(%rbp)
callq 0x5ed00
jmp 0x5c5f0
movl -0x2c(%rbp), %eax
movl %eax, -0x24(%rbp)
jmp 0x5c664
jmp 0x5c61d
movl -0x24(%rbp), %eax
cmpl -0x2c(%rbp), %eax
jge 0x5c63b
movl -0x20(%rbp), %edi
subl $0x1, %edi
movl -0x24(%rbp), %esi
addl $0x1, %esi
movl %esi, -0x24(%rbp)
callq 0x5ed00
jmp 0x5c61d
jmp 0x5c63d
movl -0x24(%rbp), %eax
cmpl -0x2c(%rbp), %eax
jle 0x5c662
movl -0x20(%rbp), %edx
movl -0x24(%rbp), %eax
movl %eax, %ecx
addl $-0x1, %ecx
movl %ecx, -0x24(%rbp)
movslq %eax, %rcx
leaq 0x42c533(%rip), %rax    # 0x488b90
movl %edx, (%rax,%rcx,4)
jmp 0x5c63d
jmp 0x5c664
jmp 0x5c666
movl -0x28(%rbp), %eax
cmpl -0x30(%rbp), %eax
jle 0x5c684
movl -0x20(%rbp), %edi
subl $0x1, %edi
movl -0x28(%rbp), %esi
addl $-0x1, %esi
movl %esi, -0x28(%rbp)
callq 0x5ed00
jmp 0x5c666
jmp 0x5c686
movl -0x28(%rbp), %eax
cmpl -0x30(%rbp), %eax
jge 0x5c6ab
movl -0x20(%rbp), %edx
movl -0x28(%rbp), %eax
movl %eax, %ecx
addl $0x1, %ecx
movl %ecx, -0x28(%rbp)
movslq %eax, %rcx
leaq 0x42c4ea(%rip), %rax    # 0x488b90
movl %edx, (%rax,%rcx,4)
jmp 0x5c686
jmp 0x5c71d
jmp 0x5c6af
movl -0x24(%rbp), %eax
movl -0x28(%rbp), %ecx
subl $0x1, %ecx
cmpl %ecx, %eax
jge 0x5c6d2
movl -0x20(%rbp), %edi
subl $0x1, %edi
movl -0x24(%rbp), %esi
addl $0x1, %esi
movl %esi, -0x24(%rbp)
callq 0x5ed00
jmp 0x5c6af
movl -0x20(%rbp), %eax
cmpl -0x8(%rbp), %eax
jne 0x5c700
movl 0x3f2ec4(%rip), %eax    # 0x44f5a4
addl 0x3f2eba(%rip), %eax    # 0x44f5a0
movl %eax, 0x3f2eb4(%rip)    # 0x44f5a0
movl 0x3f2ea6(%rip), %eax    # 0x44f598
addl 0x3f2ea4(%rip), %eax    # 0x44f59c
movl %eax, 0x3f2e9e(%rip)    # 0x44f59c
jmp 0x5c74f
movl -0x20(%rbp), %eax
addl $0x1, %eax
movslq %eax, %rcx
leaq 0x3b30e0(%rip), %rax    # 0x40f7f0
movswl (%rax,%rcx,2), %eax
movl %eax, -0x24(%rbp)
movl -0x24(%rbp), %eax
movl %eax, -0x28(%rbp)
movl 0x3f2e81(%rip), %eax    # 0x44f5a4
addl 0x3f2e77(%rip), %eax    # 0x44f5a0
movl %eax, 0x3f2e71(%rip)    # 0x44f5a0
movl 0x3f2e63(%rip), %eax    # 0x44f598
addl 0x3f2e61(%rip), %eax    # 0x44f59c
movl %eax, 0x3f2e5b(%rip)    # 0x44f59c
movl -0x20(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x20(%rbp)
jmp 0x5c566
jmp 0x5c751
movl -0x24(%rbp), %eax
movl -0x28(%rbp), %ecx
subl $0x1, %ecx
cmpl %ecx, %eax
jge 0x5c771
movl -0x8(%rbp), %edi
movl -0x24(%rbp), %esi
addl $0x1, %esi
movl %esi, -0x24(%rbp)
callq 0x5ed00
jmp 0x5c751
callq 0xc220
jmp 0x5ca7c
movl 0x3ee5df(%rip), %eax    # 0x44ad60
andl $0x180, %eax            # imm = 0x180
movl %eax, -0x40(%rbp)
subl $0x80, %eax
je 0x5c7ad
jmp 0x5c792
movl -0x40(%rbp), %eax
subl $0x100, %eax            # imm = 0x100
je 0x5c7e0
jmp 0x5c79e
movl -0x40(%rbp), %eax
subl $0x180, %eax            # imm = 0x180
je 0x5c818
jmp 0x5c84e
movswq 0x3ee5bb(%rip), %rcx    # 0x44ad70
leaq 0x3f2df4(%rip), %rax    # 0x44f5b0
movzbl (%rax,%rcx), %edi
andl $0xf, %edi
movswq 0x3ee5a5(%rip), %rcx    # 0x44ad70
leaq 0x3f2dde(%rip), %rax    # 0x44f5b0
movzbl (%rax,%rcx), %esi
sarl $0x4, %esi
callq 0xa7b90
jmp 0x5c84e
callq 0xa7590
movswq 0x3ee583(%rip), %rcx    # 0x44ad70
leaq 0x3f2dbc(%rip), %rax    # 0x44f5b0
movzbl (%rax,%rcx), %edi
andl $0xf, %edi
movswq 0x3ee56d(%rip), %rcx    # 0x44ad70
leaq 0x3f2da6(%rip), %rax    # 0x44f5b0
movzbl (%rax,%rcx), %esi
sarl $0x4, %esi
callq 0xa7ca0
jmp 0x5c84e
callq 0xa75a0
movswq 0x3ee54b(%rip), %rcx    # 0x44ad70
leaq 0x3f2d84(%rip), %rax    # 0x44f5b0
movzbl (%rax,%rcx), %edi
andl $0xf, %edi
movswq 0x3ee535(%rip), %rcx    # 0x44ad70
leaq 0x3f2d6e(%rip), %rax    # 0x44f5b0
movzbl (%rax,%rcx), %esi
sarl $0x4, %esi
callq 0xa7ca0
movslq -0x4(%rbp), %rcx
leaq 0x3b2f97(%rip), %rax    # 0x40f7f0
movswl (%rax,%rcx,2), %eax
movl %eax, -0x24(%rbp)
movl -0x24(%rbp), %eax
movl %eax, -0x28(%rbp)
movl -0x4(%rbp), %eax
movl %eax, -0x20(%rbp)
movl -0x20(%rbp), %eax
cmpl -0x8(%rbp), %eax
jg 0x5ca55
movslq -0x20(%rbp), %rcx
leaq 0x3b2f6d(%rip), %rax    # 0x40f7f0
movswl (%rax,%rcx,2), %eax
subl $0x1, %eax
movl %eax, -0x2c(%rbp)
movslq -0x20(%rbp), %rcx
leaq 0x429338(%rip), %rax    # 0x485bd0
movswl (%rax,%rcx,2), %eax
movslq -0x20(%rbp), %rdx
leaq 0x3b45c9(%rip), %rcx    # 0x410e70
movswl (%rcx,%rdx,2), %ecx
cmpl %ecx, %eax
jge 0x5c8c3
movslq -0x20(%rbp), %rcx
leaq 0x429316(%rip), %rax    # 0x485bd0
movswl (%rax,%rcx,2), %eax
movl %eax, -0x44(%rbp)
jmp 0x5c8d5
movslq -0x20(%rbp), %rcx
leaq 0x3b45a2(%rip), %rax    # 0x410e70
movswl (%rax,%rcx,2), %eax
movl %eax, -0x44(%rbp)
movl -0x44(%rbp), %eax
movl %eax, -0x30(%rbp)
movl -0x2c(%rbp), %eax
movl -0x30(%rbp), %ecx
subl $0x1, %ecx
cmpl %ecx, %eax
jge 0x5c9b3
movl -0x2c(%rbp), %eax
cmpl -0x28(%rbp), %eax
jl 0x5c921
jmp 0x5c8f6
movl -0x24(%rbp), %eax
movl -0x28(%rbp), %ecx
subl $0x1, %ecx
cmpl %ecx, %eax
jge 0x5c919
movl -0x20(%rbp), %edi
subl $0x1, %edi
movl -0x24(%rbp), %esi
addl $0x1, %esi
movl %esi, -0x24(%rbp)
callq 0x5ede0
jmp 0x5c8f6
movl -0x2c(%rbp), %eax
movl %eax, -0x24(%rbp)
jmp 0x5c96a
jmp 0x5c923
movl -0x24(%rbp), %eax
cmpl -0x2c(%rbp), %eax
jge 0x5c941
movl -0x20(%rbp), %edi
subl $0x1, %edi
movl -0x24(%rbp), %esi
addl $0x1, %esi
movl %esi, -0x24(%rbp)
callq 0x5ede0
jmp 0x5c923
jmp 0x5c943
movl -0x24(%rbp), %eax
cmpl -0x2c(%rbp), %eax
jle 0x5c968
movl -0x20(%rbp), %edx
movl -0x24(%rbp), %eax
movl %eax, %ecx
addl $-0x1, %ecx
movl %ecx, -0x24(%rbp)
movslq %eax, %rcx
leaq 0x42c22d(%rip), %rax    # 0x488b90
movl %edx, (%rax,%rcx,4)
jmp 0x5c943
jmp 0x5c96a
jmp 0x5c96c
movl -0x28(%rbp), %eax
cmpl -0x30(%rbp), %eax
jle 0x5c98a
movl -0x20(%rbp), %edi
subl $0x1, %edi
movl -0x28(%rbp), %esi
addl $-0x1, %esi
movl %esi, -0x28(%rbp)
callq 0x5ede0
jmp 0x5c96c
jmp 0x5c98c
movl -0x28(%rbp), %eax
cmpl -0x30(%rbp), %eax
jge 0x5c9b1
movl -0x20(%rbp), %edx
movl -0x28(%rbp), %eax
movl %eax, %ecx
addl $0x1, %ecx
movl %ecx, -0x28(%rbp)
movslq %eax, %rcx
leaq 0x42c1e4(%rip), %rax    # 0x488b90
movl %edx, (%rax,%rcx,4)
jmp 0x5c98c
jmp 0x5ca23
jmp 0x5c9b5
movl -0x24(%rbp), %eax
movl -0x28(%rbp), %ecx
subl $0x1, %ecx
cmpl %ecx, %eax
jge 0x5c9d8
movl -0x20(%rbp), %edi
subl $0x1, %edi
movl -0x24(%rbp), %esi
addl $0x1, %esi
movl %esi, -0x24(%rbp)
callq 0x5ede0
jmp 0x5c9b5
movl -0x20(%rbp), %eax
cmpl -0x8(%rbp), %eax
jne 0x5ca06
movl 0x3f2bbe(%rip), %eax    # 0x44f5a4
addl 0x3f2bb4(%rip), %eax    # 0x44f5a0
movl %eax, 0x3f2bae(%rip)    # 0x44f5a0
movl 0x3f2ba0(%rip), %eax    # 0x44f598
addl 0x3f2b9e(%rip), %eax    # 0x44f59c
movl %eax, 0x3f2b98(%rip)    # 0x44f59c
jmp 0x5ca55
movl -0x20(%rbp), %eax
addl $0x1, %eax
movslq %eax, %rcx
leaq 0x3b2dda(%rip), %rax    # 0x40f7f0
movswl (%rax,%rcx,2), %eax
movl %eax, -0x24(%rbp)
movl -0x24(%rbp), %eax
movl %eax, -0x28(%rbp)
movl 0x3f2b7b(%rip), %eax    # 0x44f5a4
addl 0x3f2b71(%rip), %eax    # 0x44f5a0
movl %eax, 0x3f2b6b(%rip)    # 0x44f5a0
movl 0x3f2b5d(%rip), %eax    # 0x44f598
addl 0x3f2b5b(%rip), %eax    # 0x44f59c
movl %eax, 0x3f2b55(%rip)    # 0x44f59c
movl -0x20(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x20(%rbp)
jmp 0x5c86c
jmp 0x5ca57
movl -0x24(%rbp), %eax
movl -0x28(%rbp), %ecx
subl $0x1, %ecx
cmpl %ecx, %eax
jge 0x5ca77
movl -0x8(%rbp), %edi
movl -0x24(%rbp), %esi
addl $0x1, %esi
movl %esi, -0x24(%rbp)
callq 0x5ede0
jmp 0x5ca57
callq 0xc220
addq $0x50, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)