// File: /workspace/github_c_makefile_star2_O0/jonof[P]jftekwar/jfbuild/src/engine.c
// Function: scansector
static void scansector(short sectnum)
{
	walltype *wal, *wal2;
	spritetype *spr;
	int xs, ys, x1, y1, x2, y2, xp1, yp1, xp2=0, yp2=0, templong;
	short z, zz, startwall, endwall, numscansbefore, scanfirst, bunchfrst;
	short nextsectnum;

	if (sectnum < 0) return;

	if (automapping) show2dsector[sectnum>>3] |= pow2char[sectnum&7];

	sectorborder[0] = sectnum, sectorbordercnt = 1;
	do
	{
		sectnum = sectorborder[--sectorbordercnt];

		for(z=headspritesect[sectnum];z>=0;z=nextspritesect[z])
		{
			spr = &sprite[z];
			if ((((spr->cstat&0x8000) == 0) || (showinvisibility)) &&
				  (spr->xrepeat > 0) && (spr->yrepeat > 0) &&
				  (spritesortcnt < MAXSPRITESONSCREEN))
			{
				xs = spr->x-globalposx; ys = spr->y-globalposy;
				if ((spr->cstat&48) || (xs*cosglobalang+ys*singlobalang > 0))
				{
					copybufbyte(spr,&tsprite[spritesortcnt],sizeof(spritetype));
					tsprite[spritesortcnt++].owner = z;
				}
			}
		}

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

		bunchfrst = numbunches;
		numscansbefore = numscans;

		startwall = sector[sectnum].wallptr;
		endwall = startwall + sector[sectnum].wallnum;
		scanfirst = numscans;
		for(z=startwall,wal=&wall[z];z<endwall;z++,wal++)
		{
			nextsectnum = wal->nextsector;

			wal2 = &wall[wal->point2];
			x1 = wal->x-globalposx; y1 = wal->y-globalposy;
			x2 = wal2->x-globalposx; y2 = wal2->y-globalposy;

			if ((nextsectnum >= 0) && ((wal->cstat&32) == 0))
				if ((gotsector[nextsectnum>>3]&pow2char[nextsectnum&7]) == 0)
				{
					templong = x1*y2-x2*y1;
					if (((unsigned)templong+262144) < 524288)
						if (mulscale5(templong,templong) <= (x2-x1)*(x2-x1)+(y2-y1)*(y2-y1))
							sectorborder[sectorbordercnt++] = nextsectnum;
				}

			if ((z == startwall) || (wall[z-1].point2 != z))
			{
				xp1 = dmulscale6(y1,cosglobalang,-x1,singlobalang);
				yp1 = dmulscale6(x1,cosviewingrangeglobalang,y1,sinviewingrangeglobalang);
			}
			else
			{
				xp1 = xp2;
				yp1 = yp2;
			}
			xp2 = dmulscale6(y2,cosglobalang,-x2,singlobalang);
			yp2 = dmulscale6(x2,cosviewingrangeglobalang,y2,sinviewingrangeglobalang);
			if ((yp1 < 256) && (yp2 < 256)) goto skipitaddwall;

				//If wall's NOT facing you
			if (dmulscale32(xp1,yp2,-xp2,yp1) >= 0) goto skipitaddwall;

			if (xp1 >= -yp1)
			{
				if ((xp1 > yp1) || (yp1 == 0)) goto skipitaddwall;
				xb1[numscans] = halfxdimen + scale(xp1,halfxdimen,yp1);
				if (xp1 >= 0) xb1[numscans]++;   //Fix for SIGNED divide
				if (xb1[numscans] >= xdimen) xb1[numscans] = xdimen-1;
				yb1[numscans] = yp1;
			}
			else
			{
				if (xp2 < -yp2) goto skipitaddwall;
				xb1[numscans] = 0;
				templong = yp1-yp2+xp1-xp2;
				if (templong == 0) goto skipitaddwall;
				yb1[numscans] = yp1 + scale(yp2-yp1,xp1+yp1,templong);
			}
			if (yb1[numscans] < 256) goto skipitaddwall;

			if (xp2 <= yp2)
			{
				if ((xp2 < -yp2) || (yp2 == 0)) goto skipitaddwall;
				xb2[numscans] = halfxdimen + scale(xp2,halfxdimen,yp2) - 1;
				if (xp2 >= 0) xb2[numscans]++;   //Fix for SIGNED divide
				if (xb2[numscans] >= xdimen) xb2[numscans] = xdimen-1;
				yb2[numscans] = yp2;
			}
			else
			{
				if (xp1 > yp1) goto skipitaddwall;
				xb2[numscans] = xdimen-1;
				templong = xp2-xp1+yp1-yp2;
				if (templong == 0) goto skipitaddwall;
				yb2[numscans] = yp1 + scale(yp2-yp1,yp1-xp1,templong);
			}
			if ((yb2[numscans] < 256) || (xb1[numscans] > xb2[numscans])) goto skipitaddwall;

				//Made it all the way!
			thesector[numscans] = sectnum; thewall[numscans] = z;
			rx1[numscans] = xp1; ry1[numscans] = yp1;
			rx2[numscans] = xp2; ry2[numscans] = yp2;
			p2[numscans] = numscans+1;
			numscans++;
skipitaddwall:

			if ((wall[z].point2 < z) && (scanfirst < numscans))
				p2[numscans-1] = scanfirst, scanfirst = numscans;
		}

		for(z=numscansbefore;z<numscans;z++)
			if ((wall[thewall[z]].point2 != thewall[p2[z]]) || (xb2[z] >= xb1[p2[z]]))
				bunchfirst[numbunches++] = p2[z], p2[z] = -1;

		for(z=bunchfrst;z<numbunches;z++)
		{
			for(zz=bunchfirst[z];p2[zz]>=0;zz=p2[zz]);
			bunchlast[z] = zz;
		}
	} while (sectorbordercnt > 0);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x70, %rsp
movw %di, %ax
movw %ax, -0x2(%rbp)
movl $0x0, -0x44(%rbp)
movl $0x0, -0x48(%rbp)
movswl -0x2(%rbp), %eax
cmpl $0x0, %eax
jge 0x3959b
jmp 0x39f95
cmpb $0x0, 0x3afa9e(%rip)    # 0x3e9040
je 0x395dc
movswl -0x2(%rbp), %eax
andl $0x7, %eax
movslq %eax, %rcx
leaq 0xa76db(%rip), %rax     # 0xe0c90
movzbl (%rax,%rcx), %edx
movswl -0x2(%rbp), %eax
sarl $0x3, %eax
movslq %eax, %rcx
leaq 0x3ae876(%rip), %rax    # 0x3e7e40
movzbl (%rax,%rcx), %eax
orl %edx, %eax
movb %al, %dl
leaq 0x3ae867(%rip), %rax    # 0x3e7e40
movb %dl, (%rax,%rcx)
movw -0x2(%rbp), %ax
movw %ax, 0x44f389(%rip)     # 0x488970
movw $0x1, 0x44f580(%rip)    # 0x488b70
movw 0x44f579(%rip), %ax     # 0x488b70
addw $-0x1, %ax
movw %ax, 0x44f56e(%rip)     # 0x488b70
movswq %ax, %rcx
leaq 0x44f363(%rip), %rax    # 0x488970
movw (%rax,%rcx,2), %ax
movw %ax, -0x2(%rbp)
movswq -0x2(%rbp), %rcx
leaq 0x3afa4f(%rip), %rax    # 0x3e9070
movw (%rax,%rcx,2), %ax
movw %ax, -0x4e(%rbp)
movswl -0x4e(%rbp), %eax
cmpl $0x0, %eax
jl 0x39755
movswq -0x4e(%rbp), %rcx
leaq 0x2801ce(%rip), %rax    # 0x2b9810
imulq $0x2c, %rcx, %rcx
addq %rcx, %rax
movq %rax, -0x20(%rbp)
movq -0x20(%rbp), %rax
movswl 0xc(%rax), %eax
andl $0x8000, %eax           # imm = 0x8000
cmpl $0x0, %eax
je 0x3966f
movzbl 0x360fc6(%rip), %eax    # 0x39a62c
cmpl $0x0, %eax
je 0x3973a
movq -0x20(%rbp), %rax
movzbl 0x14(%rax), %eax
cmpl $0x0, %eax
jle 0x3973a
movq -0x20(%rbp), %rax
movzbl 0x15(%rax), %eax
cmpl $0x0, %eax
jle 0x3973a
cmpl $0x800, 0x3d8e69(%rip)  # imm = 0x800
jge 0x3973a
movq -0x20(%rbp), %rax
movl (%rax), %eax
subl 0x23df03(%rip), %eax    # 0x2775b0
movl %eax, -0x24(%rbp)
movq -0x20(%rbp), %rax
movl 0x4(%rax), %eax
subl 0x23def7(%rip), %eax    # 0x2775b4
movl %eax, -0x28(%rbp)
movq -0x20(%rbp), %rax
movswl 0xc(%rax), %eax
andl $0x30, %eax
cmpl $0x0, %eax
jne 0x396eb
movl -0x24(%rbp), %eax
imull 0x272ef6(%rip), %eax    # 0x2ac5d0
movl -0x28(%rbp), %ecx
imull 0x272ef4(%rip), %ecx    # 0x2ac5d8
addl %ecx, %eax
cmpl $0x0, %eax
jle 0x39738
movq -0x20(%rbp), %rdi
movslq 0x3d8e0e(%rip), %rax    # 0x412504
leaq 0x3e2e33(%rip), %rsi    # 0x41c530
imulq $0x2c, %rax, %rax
addq %rax, %rsi
movl $0x2c, %edx
callq 0x6ef00
movw -0x4e(%rbp), %cx
movl 0x3d8dec(%rip), %eax    # 0x412504
movl %eax, %edx
addl $0x1, %edx
movl %edx, 0x3d8de1(%rip)    # 0x412504
movslq %eax, %rdx
leaq 0x3e2e03(%rip), %rax    # 0x41c530
imulq $0x2c, %rdx, %rdx
addq %rdx, %rax
movw %cx, 0x1e(%rax)
jmp 0x3973a
jmp 0x3973c
movswq -0x4e(%rbp), %rcx
leaq 0x3b9938(%rip), %rax    # 0x3f3080
movw (%rax,%rcx,2), %ax
movw %ax, -0x4e(%rbp)
jmp 0x39629
movswl -0x2(%rbp), %eax
andl $0x7, %eax
movslq %eax, %rcx
leaq 0xa752a(%rip), %rax     # 0xe0c90
movzbl (%rax,%rcx), %edx
movswl -0x2(%rbp), %eax
sarl $0x3, %eax
movslq %eax, %rcx
leaq 0x3d3145(%rip), %rax    # 0x40c8c0
movzbl (%rax,%rcx), %eax
orl %edx, %eax
movb %al, %dl
leaq 0x3d3136(%rip), %rax    # 0x40c8c0
movb %dl, (%rax,%rcx)
movw 0x3d8d68(%rip), %ax     # 0x4124fc
movw %ax, -0x5a(%rbp)
movw 0x3d8d5b(%rip), %ax     # 0x4124fa
movw %ax, -0x56(%rbp)
movswq -0x2(%rbp), %rcx
leaq 0x246e11(%rip), %rax    # 0x2805c0
imulq $0x28, %rcx, %rcx
addq %rcx, %rax
movw (%rax), %ax
movw %ax, -0x52(%rbp)
movswl -0x52(%rbp), %eax
movswq -0x2(%rbp), %rdx
leaq 0x246df3(%rip), %rcx    # 0x2805c0
imulq $0x28, %rdx, %rdx
addq %rdx, %rcx
movswl 0x2(%rcx), %ecx
addl %ecx, %eax
movw %ax, -0x54(%rbp)
movw 0x3d8d15(%rip), %ax     # 0x4124fa
movw %ax, -0x58(%rbp)
movw -0x52(%rbp), %ax
movw %ax, -0x4e(%rbp)
movswq -0x4e(%rbp), %rcx
leaq 0x1bbdb3(%rip), %rax    # 0x1f55b0
shlq $0x5, %rcx
addq %rcx, %rax
movq %rax, -0x10(%rbp)
movswl -0x4e(%rbp), %eax
movswl -0x54(%rbp), %ecx
cmpl %ecx, %eax
jge 0x39e26
movq -0x10(%rbp), %rax
movw 0xc(%rax), %ax
movw %ax, -0x5c(%rbp)
movq -0x10(%rbp), %rax
movswq 0x8(%rax), %rcx
leaq 0x1bbd7c(%rip), %rax    # 0x1f55b0
shlq $0x5, %rcx
addq %rcx, %rax
movq %rax, -0x18(%rbp)
movq -0x10(%rbp), %rax
movl (%rax), %eax
subl 0x23dd65(%rip), %eax    # 0x2775b0
movl %eax, -0x2c(%rbp)
movq -0x10(%rbp), %rax
movl 0x4(%rax), %eax
subl 0x23dd59(%rip), %eax    # 0x2775b4
movl %eax, -0x30(%rbp)
movq -0x18(%rbp), %rax
movl (%rax), %eax
subl 0x23dd46(%rip), %eax    # 0x2775b0
movl %eax, -0x34(%rbp)
movq -0x18(%rbp), %rax
movl 0x4(%rax), %eax
subl 0x23dd3a(%rip), %eax    # 0x2775b4
movl %eax, -0x38(%rbp)
movswl -0x5c(%rbp), %eax
cmpl $0x0, %eax
jl 0x3994e
movq -0x10(%rbp), %rax
movswl 0xe(%rax), %eax
andl $0x20, %eax
cmpl $0x0, %eax
jne 0x3994e
movswl -0x5c(%rbp), %eax
sarl $0x3, %eax
movslq %eax, %rcx
leaq 0x3d3011(%rip), %rax    # 0x40c8c0
movzbl (%rax,%rcx), %eax
movswl -0x5c(%rbp), %ecx
andl $0x7, %ecx
movslq %ecx, %rdx
leaq 0xa73cc(%rip), %rcx     # 0xe0c90
movzbl (%rcx,%rdx), %ecx
andl %ecx, %eax
cmpl $0x0, %eax
jne 0x3994c
movl -0x2c(%rbp), %eax
imull -0x38(%rbp), %eax
movl -0x34(%rbp), %ecx
imull -0x30(%rbp), %ecx
subl %ecx, %eax
movl %eax, -0x4c(%rbp)
movl -0x4c(%rbp), %eax
addl $0x40000, %eax          # imm = 0x40000
cmpl $0x80000, %eax          # imm = 0x80000
jae 0x3994a
movl -0x4c(%rbp), %edi
movl -0x4c(%rbp), %esi
callq 0x5ae80
movl -0x34(%rbp), %ecx
subl -0x2c(%rbp), %ecx
movl -0x34(%rbp), %edx
subl -0x2c(%rbp), %edx
imull %edx, %ecx
movl -0x38(%rbp), %edx
subl -0x30(%rbp), %edx
movl -0x38(%rbp), %esi
subl -0x30(%rbp), %esi
imull %esi, %edx
addl %edx, %ecx
cmpl %ecx, %eax
jg 0x39948
movw -0x5c(%rbp), %dx
movw 0x44f245(%rip), %ax     # 0x488b70
movw %ax, %cx
addw $0x1, %cx
movw %cx, 0x44f237(%rip)     # 0x488b70
movswq %ax, %rcx
leaq 0x44f02c(%rip), %rax    # 0x488970
movw %dx, (%rax,%rcx,2)
jmp 0x3994a
jmp 0x3994c
jmp 0x3994e
movswl -0x4e(%rbp), %eax
movswl -0x52(%rbp), %ecx
cmpl %ecx, %eax
je 0x3997e
movswl -0x4e(%rbp), %eax
subl $0x1, %eax
movslq %eax, %rcx
leaq 0x1bbc45(%rip), %rax    # 0x1f55b0
shlq $0x5, %rcx
addq %rcx, %rax
movswl 0x8(%rax), %eax
movswl -0x4e(%rbp), %ecx
cmpl %ecx, %eax
je 0x399b6
movl -0x30(%rbp), %edi
movl 0x272c49(%rip), %esi    # 0x2ac5d0
xorl %edx, %edx
subl -0x2c(%rbp), %edx
movl 0x272c46(%rip), %ecx    # 0x2ac5d8
callq 0x3c870
movl %eax, -0x3c(%rbp)
movl -0x2c(%rbp), %edi
movl 0x272c39(%rip), %esi    # 0x2ac5dc
movl -0x30(%rbp), %edx
movl 0x272c28(%rip), %ecx    # 0x2ac5d4
callq 0x3c870
movl %eax, -0x40(%rbp)
jmp 0x399c2
movl -0x44(%rbp), %eax
movl %eax, -0x3c(%rbp)
movl -0x48(%rbp), %eax
movl %eax, -0x40(%rbp)
movl -0x38(%rbp), %edi
movl 0x272c05(%rip), %esi    # 0x2ac5d0
xorl %edx, %edx
subl -0x34(%rbp), %edx
movl 0x272c02(%rip), %ecx    # 0x2ac5d8
callq 0x3c870
movl %eax, -0x44(%rbp)
movl -0x34(%rbp), %edi
movl 0x272bf5(%rip), %esi    # 0x2ac5dc
movl -0x38(%rbp), %edx
movl 0x272be4(%rip), %ecx    # 0x2ac5d4
callq 0x3c870
movl %eax, -0x48(%rbp)
cmpl $0x100, -0x40(%rbp)     # imm = 0x100
jge 0x39a0f
cmpl $0x100, -0x48(%rbp)     # imm = 0x100
jge 0x39a0f
jmp 0x39db2
movl -0x3c(%rbp), %edi
movl -0x48(%rbp), %esi
xorl %edx, %edx
subl -0x44(%rbp), %edx
movl -0x40(%rbp), %ecx
callq 0x5aea0
cmpl $0x0, %eax
jl 0x39a2c
jmp 0x39db2
movl -0x3c(%rbp), %eax
xorl %ecx, %ecx
subl -0x40(%rbp), %ecx
cmpl %ecx, %eax
jl 0x39af1
movl -0x3c(%rbp), %eax
cmpl -0x40(%rbp), %eax
jg 0x39a4a
cmpl $0x0, -0x40(%rbp)
jne 0x39a4f
jmp 0x39db2
movl 0x419c4f(%rip), %eax    # 0x4536a4
movl %eax, -0x60(%rbp)
movl -0x3c(%rbp), %edi
movl 0x419c43(%rip), %esi    # 0x4536a4
movl -0x40(%rbp), %edx
callq 0x37720
movl -0x60(%rbp), %edx
addl %eax, %edx
movswq 0x3d8a84(%rip), %rcx    # 0x4124fa
leaq 0x26eb53(%rip), %rax    # 0x2a85d0
movl %edx, (%rax,%rcx,4)
cmpl $0x0, -0x3c(%rbp)
jl 0x39aa5
movswq 0x3d8a6c(%rip), %rcx    # 0x4124fa
leaq 0x26eb3b(%rip), %rax    # 0x2a85d0
movl (%rax,%rcx,4), %edx
addl $0x1, %edx
leaq 0x26eb2e(%rip), %rax    # 0x2a85d0
movl %edx, (%rax,%rcx,4)
movswq 0x3d8a4d(%rip), %rcx    # 0x4124fa
leaq 0x26eb1c(%rip), %rax    # 0x2a85d0
movl (%rax,%rcx,4), %eax
cmpl 0xa7263(%rip), %eax     # 0xe0d20
jl 0x39ada
movl 0xa725b(%rip), %edx     # 0xe0d20
subl $0x1, %edx
movswq 0x3d8a2a(%rip), %rcx    # 0x4124fa
leaq 0x26eaf9(%rip), %rax    # 0x2a85d0
movl %edx, (%rax,%rcx,4)
movl -0x40(%rbp), %edx
movswq 0x3d8a15(%rip), %rcx    # 0x4124fa
leaq 0x276b04(%rip), %rax    # 0x2b05f0
movl %edx, (%rax,%rcx,4)
jmp 0x39b63
movl -0x44(%rbp), %eax
xorl %ecx, %ecx
subl -0x48(%rbp), %ecx
cmpl %ecx, %eax
jge 0x39b02
jmp 0x39db2
movswq 0x3d89f0(%rip), %rcx    # 0x4124fa
leaq 0x26eabf(%rip), %rax    # 0x2a85d0
movl $0x0, (%rax,%rcx,4)
movl -0x40(%rbp), %eax
subl -0x48(%rbp), %eax
addl -0x3c(%rbp), %eax
subl -0x44(%rbp), %eax
movl %eax, -0x4c(%rbp)
cmpl $0x0, -0x4c(%rbp)
jne 0x39b32
jmp 0x39db2
movl -0x40(%rbp), %eax
movl %eax, -0x64(%rbp)
movl -0x48(%rbp), %edi
subl -0x40(%rbp), %edi
movl -0x3c(%rbp), %esi
addl -0x40(%rbp), %esi
movl -0x4c(%rbp), %edx
callq 0x37720
movl -0x64(%rbp), %edx
addl %eax, %edx
movswq 0x3d89a1(%rip), %rcx    # 0x4124fa
leaq 0x276a90(%rip), %rax    # 0x2b05f0
movl %edx, (%rax,%rcx,4)
movswq 0x3d898f(%rip), %rcx    # 0x4124fa
leaq 0x276a7e(%rip), %rax    # 0x2b05f0
cmpl $0x100, (%rax,%rcx,4)   # imm = 0x100
jge 0x39b80
jmp 0x39db2
movl -0x44(%rbp), %eax
cmpl -0x48(%rbp), %eax
jg 0x39c48
movl -0x44(%rbp), %eax
xorl %ecx, %ecx
subl -0x48(%rbp), %ecx
cmpl %ecx, %eax
jl 0x39b9e
cmpl $0x0, -0x48(%rbp)
jne 0x39ba3
jmp 0x39db2
movl 0x419afb(%rip), %eax    # 0x4536a4
movl %eax, -0x68(%rbp)
movl -0x44(%rbp), %edi
movl 0x419aef(%rip), %esi    # 0x4536a4
movl -0x48(%rbp), %edx
callq 0x37720
movl -0x68(%rbp), %edx
addl %eax, %edx
subl $0x1, %edx
movswq 0x3d892d(%rip), %rcx    # 0x4124fa
leaq 0x272a0c(%rip), %rax    # 0x2ac5e0
movl %edx, (%rax,%rcx,4)
cmpl $0x0, -0x44(%rbp)
jl 0x39bfc
movswq 0x3d8915(%rip), %rcx    # 0x4124fa
leaq 0x2729f4(%rip), %rax    # 0x2ac5e0
movl (%rax,%rcx,4), %edx
addl $0x1, %edx
leaq 0x2729e7(%rip), %rax    # 0x2ac5e0
movl %edx, (%rax,%rcx,4)
movswq 0x3d88f6(%rip), %rcx    # 0x4124fa
leaq 0x2729d5(%rip), %rax    # 0x2ac5e0
movl (%rax,%rcx,4), %eax
cmpl 0xa710c(%rip), %eax     # 0xe0d20
jl 0x39c31
movl 0xa7104(%rip), %edx     # 0xe0d20
subl $0x1, %edx
movswq 0x3d88d3(%rip), %rcx    # 0x4124fa
leaq 0x2729b2(%rip), %rax    # 0x2ac5e0
movl %edx, (%rax,%rcx,4)
movl -0x48(%rbp), %edx
movswq 0x3d88be(%rip), %rcx    # 0x4124fa
leaq 0x27a9ad(%rip), %rax    # 0x2b45f0
movl %edx, (%rax,%rcx,4)
jmp 0x39cbb
movl -0x3c(%rbp), %eax
cmpl -0x40(%rbp), %eax
jle 0x39c55
jmp 0x39db2
movl 0xa70c5(%rip), %edx     # 0xe0d20
subl $0x1, %edx
movswq 0x3d8894(%rip), %rcx    # 0x4124fa
leaq 0x272973(%rip), %rax    # 0x2ac5e0
movl %edx, (%rax,%rcx,4)
movl -0x44(%rbp), %eax
subl -0x3c(%rbp), %eax
addl -0x40(%rbp), %eax
subl -0x48(%rbp), %eax
movl %eax, -0x4c(%rbp)
cmpl $0x0, -0x4c(%rbp)
jne 0x39c8a
jmp 0x39db2
movl -0x40(%rbp), %eax
movl %eax, -0x6c(%rbp)
movl -0x48(%rbp), %edi
subl -0x40(%rbp), %edi
movl -0x40(%rbp), %esi
subl -0x3c(%rbp), %esi
movl -0x4c(%rbp), %edx
callq 0x37720
movl -0x6c(%rbp), %edx
addl %eax, %edx
movswq 0x3d8849(%rip), %rcx    # 0x4124fa
leaq 0x27a938(%rip), %rax    # 0x2b45f0
movl %edx, (%rax,%rcx,4)
movswq 0x3d8837(%rip), %rcx    # 0x4124fa
leaq 0x27a926(%rip), %rax    # 0x2b45f0
cmpl $0x100, (%rax,%rcx,4)   # imm = 0x100
jl 0x39cf9
movswq 0x3d881f(%rip), %rcx    # 0x4124fa
leaq 0x26e8ee(%rip), %rax    # 0x2a85d0
movl (%rax,%rcx,4), %eax
movswq 0x3d880d(%rip), %rdx    # 0x4124fa
leaq 0x2728ec(%rip), %rcx    # 0x2ac5e0
cmpl (%rcx,%rdx,4), %eax
jle 0x39cfe
jmp 0x39db2
movw -0x2(%rbp), %dx
movswq 0x3d87f0(%rip), %rcx    # 0x4124fa
leaq 0x449ebf(%rip), %rax    # 0x483bd0
movw %dx, (%rax,%rcx,2)
movw -0x4e(%rbp), %dx
movswq 0x3d87d9(%rip), %rcx    # 0x4124fa
leaq 0x23b888(%rip), %rax    # 0x2755b0
movw %dx, (%rax,%rcx,2)
movl -0x3c(%rbp), %edx
movswq 0x3d87c3(%rip), %rcx    # 0x4124fa
leaq 0x409022(%rip), %rax    # 0x442d60
movl %edx, (%rax,%rcx,4)
movl -0x40(%rbp), %edx
movswq 0x3d87ae(%rip), %rcx    # 0x4124fa
leaq 0x40d00d(%rip), %rax    # 0x446d60
movl %edx, (%rax,%rcx,4)
movl -0x44(%rbp), %edx
movswq 0x3d8799(%rip), %rcx    # 0x4124fa
leaq 0x4962e8(%rip), %rax    # 0x4d0050
movl %edx, (%rax,%rcx,4)
movl -0x48(%rbp), %edx
movswq 0x3d8784(%rip), %rcx    # 0x4124fa
leaq 0x49a2d3(%rip), %rax    # 0x4d4050
movl %edx, (%rax,%rcx,4)
movswl 0x3d8773(%rip), %eax    # 0x4124fa
addl $0x1, %eax
movw %ax, %dx
movswq 0x3d8765(%rip), %rcx    # 0x4124fa
leaq 0x3e0794(%rip), %rax    # 0x41a530
movw %dx, (%rax,%rcx,2)
movw 0x3d8753(%rip), %ax     # 0x4124fa
addw $0x1, %ax
movw %ax, 0x3d8748(%rip)     # 0x4124fa
movswq -0x4e(%rbp), %rcx
leaq 0x1bb7f2(%rip), %rax    # 0x1f55b0
shlq $0x5, %rcx
addq %rcx, %rax
movswl 0x8(%rax), %eax
movswl -0x4e(%rbp), %ecx
cmpl %ecx, %eax
jge 0x39e07
movswl -0x58(%rbp), %eax
movswl 0x3d871e(%rip), %ecx    # 0x4124fa
cmpl %ecx, %eax
jge 0x39e07
movw -0x58(%rbp), %dx
movswl 0x3d870f(%rip), %eax    # 0x4124fa
subl $0x1, %eax
movslq %eax, %rcx
leaq 0x3e0738(%rip), %rax    # 0x41a530
movw %dx, (%rax,%rcx,2)
movw 0x3d86f7(%rip), %ax     # 0x4124fa
movw %ax, -0x58(%rbp)
jmp 0x39e09
movw -0x4e(%rbp), %ax
addw $0x1, %ax
movw %ax, -0x4e(%rbp)
movq -0x10(%rbp), %rax
addq $0x20, %rax
movq %rax, -0x10(%rbp)
jmp 0x39808
movw -0x56(%rbp), %ax
movw %ax, -0x4e(%rbp)
movswl -0x4e(%rbp), %eax
movswl 0x3d86c1(%rip), %ecx    # 0x4124fa
cmpl %ecx, %eax
jge 0x39f09
movswq -0x4e(%rbp), %rcx
leaq 0x23b763(%rip), %rax    # 0x2755b0
movswq (%rax,%rcx,2), %rcx
leaq 0x1bb757(%rip), %rax    # 0x1f55b0
shlq $0x5, %rcx
addq %rcx, %rax
movswl 0x8(%rax), %eax
movswq -0x4e(%rbp), %rdx
leaq 0x3e06c0(%rip), %rcx    # 0x41a530
movswq (%rcx,%rdx,2), %rdx
leaq 0x23b734(%rip), %rcx    # 0x2755b0
movswl (%rcx,%rdx,2), %ecx
cmpl %ecx, %eax
jne 0x39eb0
movswq -0x4e(%rbp), %rcx
leaq 0x272750(%rip), %rax    # 0x2ac5e0
movl (%rax,%rcx,4), %eax
movswq -0x4e(%rbp), %rdx
leaq 0x3e0691(%rip), %rcx    # 0x41a530
movswq (%rcx,%rdx,2), %rdx
leaq 0x26e725(%rip), %rcx    # 0x2a85d0
cmpl (%rcx,%rdx,4), %eax
jl 0x39ef6
movswq -0x4e(%rbp), %rcx
leaq 0x3e0674(%rip), %rax    # 0x41a530
movw (%rax,%rcx,2), %dx
movw 0x3d8635(%rip), %ax     # 0x4124fc
movw %ax, %cx
addw $0x1, %cx
movw %cx, 0x3d8627(%rip)     # 0x4124fc
movswq %ax, %rcx
leaq 0x3d8640(%rip), %rax    # 0x412520
movw %dx, (%rax,%rcx,2)
movswq -0x4e(%rbp), %rcx
leaq 0x3e0640(%rip), %rax    # 0x41a530
movw $0xffff, (%rax,%rcx,2)  # imm = 0xFFFF
jmp 0x39ef8
movw -0x4e(%rbp), %ax
addw $0x1, %ax
movw %ax, -0x4e(%rbp)
jmp 0x39e2e
movw -0x5a(%rbp), %ax
movw %ax, -0x4e(%rbp)
movswl -0x4e(%rbp), %eax
movswl 0x3d85e0(%rip), %ecx    # 0x4124fc
cmpl %ecx, %eax
jge 0x39f83
movswq -0x4e(%rbp), %rcx
leaq 0x3d85f4(%rip), %rax    # 0x412520
movw (%rax,%rcx,2), %ax
movw %ax, -0x50(%rbp)
movswq -0x50(%rbp), %rcx
leaq 0x3e05f0(%rip), %rax    # 0x41a530
movswl (%rax,%rcx,2), %eax
cmpl $0x0, %eax
jl 0x39f61
jmp 0x39f4b
movswq -0x50(%rbp), %rcx
leaq 0x3e05d9(%rip), %rax    # 0x41a530
movw (%rax,%rcx,2), %ax
movw %ax, -0x50(%rbp)
jmp 0x39f34
movw -0x50(%rbp), %dx
movswq -0x4e(%rbp), %rcx
leaq 0x3da5af(%rip), %rax    # 0x414520
movw %dx, (%rax,%rcx,2)
movw -0x4e(%rbp), %ax
addw $0x1, %ax
movw %ax, -0x4e(%rbp)
jmp 0x39f11
jmp 0x39f85
movswl 0x44ebe4(%rip), %eax    # 0x488b70
cmpl $0x0, %eax
jg 0x395f0
addq $0x70, %rsp
popq %rbp
retq
nopl (%rax,%rax)