// File: /workspace/github_c_makefile_star2_O0/jonof[P]jftekwar/jfbuild/src/engine.c
// Function: neartag
int neartag(int xs, int ys, int zs, short sectnum, short ange, short *neartagsector, short *neartagwall,
	short *neartagsprite, int *neartaghitdist, int neartagrange, unsigned char tagsearch)
{
	walltype *wal, *wal2;
	spritetype *spr;
	int i, z, zz, xe, ye, ze, x1, y1, z1, x2, y2, intx, inty, intz;
	int topt, topu, bot, dist, offx, offy, vx, vy, vz;
	short tempshortcnt, tempshortnum, dasector, startwall, endwall;
	short nextsector, good;

	*neartagsector = -1; *neartagwall = -1; *neartagsprite = -1;
	*neartaghitdist = 0;

	if (sectnum < 0) return(0);
	if ((tagsearch < 1) || (tagsearch > 3)) return(0);

	vx = mulscale14(sintable[(ange+2560)&2047],neartagrange); xe = xs+vx;
	vy = mulscale14(sintable[(ange+2048)&2047],neartagrange); ye = ys+vy;
	vz = 0; ze = 0;

	clipsectorlist[0] = sectnum;
	tempshortcnt = 0; tempshortnum = 1;

	do
	{
		dasector = clipsectorlist[tempshortcnt];

		startwall = sector[dasector].wallptr;
		endwall = startwall + sector[dasector].wallnum - 1;
		for(z=startwall,wal=&wall[startwall];z<=endwall;z++,wal++)
		{
			wal2 = &wall[wal->point2];
			x1 = wal->x; y1 = wal->y; x2 = wal2->x; y2 = wal2->y;

			nextsector = wal->nextsector;

			good = 0;
			if (nextsector >= 0)
			{
				if ((tagsearch&1) && sector[nextsector].lotag) good |= 1;
				if ((tagsearch&2) && sector[nextsector].hitag) good |= 1;
			}
			if ((tagsearch&1) && wal->lotag) good |= 2;
			if ((tagsearch&2) && wal->hitag) good |= 2;

			if ((good == 0) && (nextsector < 0)) continue;
			if ((x1-xs)*(y2-ys) < (x2-xs)*(y1-ys)) continue;

			if (lintersect(xs,ys,zs,xe,ye,ze,x1,y1,x2,y2,&intx,&inty,&intz) == 1)
			{
				if (good != 0)
				{
					if (good&1) *neartagsector = nextsector;
					if (good&2) *neartagwall = z;
					*neartaghitdist = dmulscale14(intx-xs,sintable[(ange+2560)&2047],inty-ys,sintable[(ange+2048)&2047]);
					xe = intx; ye = inty; ze = intz;
				}
				if (nextsector >= 0)
				{
					for(zz=tempshortnum-1;zz>=0;zz--)
						if (clipsectorlist[zz] == nextsector) break;
					if (zz < 0) clipsectorlist[tempshortnum++] = nextsector;
				}
			}
		}

		for(z=headspritesect[dasector];z>=0;z=nextspritesect[z])
		{
			spr = &sprite[z];

			good = 0;
			if ((tagsearch&1) && spr->lotag) good |= 1;
			if ((tagsearch&2) && spr->hitag) good |= 1;
			if (good != 0)
			{
				x1 = spr->x; y1 = spr->y; z1 = spr->z;

				topt = vx*(x1-xs) + vy*(y1-ys);
				if (topt > 0)
				{
					bot = vx*vx + vy*vy;
					if (bot != 0)
					{
						intz = zs+scale(vz,topt,bot);
						i = tilesizy[spr->picnum]*spr->yrepeat;
						if (spr->cstat&128) z1 += (i<<1);
						if (picanm[spr->picnum]&0x00ff0000) z1 -= ((int)((signed char)((picanm[spr->picnum]>>16)&255))*spr->yrepeat<<2);
						if ((intz <= z1) && (intz >= z1-(i<<2)))
						{
							topu = vx*(y1-ys) - vy*(x1-xs);

							offx = scale(vx,topu,bot);
							offy = scale(vy,topu,bot);
							dist = offx*offx + offy*offy;
							i = (tilesizx[spr->picnum]*spr->xrepeat); i *= i;
							if (dist <= (i>>7))
							{
								intx = xs + scale(vx,topt,bot);
								inty = ys + scale(vy,topt,bot);
								if (klabs(intx-xs)+klabs(inty-ys) < klabs(xe-xs)+klabs(ye-ys))
								{
									*neartagsprite = z;
									*neartaghitdist = dmulscale14(intx-xs,sintable[(ange+2560)&2047],inty-ys,sintable[(ange+2048)&2047]);
									xe = intx;
									ye = inty;
									ze = intz;
								}
							}
						}
					}
				}
			}
		}

		tempshortcnt++;
	} while (tempshortcnt < tempshortnum);
	return(0);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
subq $0x100, %rsp            # imm = 0x100
movw %r8w, %ax
movb 0x30(%rbp), %r8b
movl 0x28(%rbp), %r8d
movq 0x20(%rbp), %r8
movq 0x18(%rbp), %r8
movq 0x10(%rbp), %r8
movl %edi, -0x28(%rbp)
movl %esi, -0x2c(%rbp)
movl %edx, -0x30(%rbp)
movw %cx, -0x32(%rbp)
movw %ax, -0x34(%rbp)
movq %r9, -0x40(%rbp)
movq -0x40(%rbp), %rax
movw $0xffff, (%rax)         # imm = 0xFFFF
movq 0x10(%rbp), %rax
movw $0xffff, (%rax)         # imm = 0xFFFF
movq 0x18(%rbp), %rax
movw $0xffff, (%rax)         # imm = 0xFFFF
movq 0x20(%rbp), %rax
movl $0x0, (%rax)
movswl -0x32(%rbp), %eax
cmpl $0x0, %eax
jge 0x51d79
movl $0x0, -0x24(%rbp)
jmp 0x52668
movzbl 0x30(%rbp), %eax
cmpl $0x1, %eax
jl 0x51d8b
movzbl 0x30(%rbp), %eax
cmpl $0x3, %eax
jle 0x51d97
movl $0x0, -0x24(%rbp)
jmp 0x52668
movswl -0x34(%rbp), %eax
addl $0xa00, %eax            # imm = 0xA00
andl $0x7ff, %eax            # imm = 0x7FF
movslq %eax, %rcx
leaq 0x3b9b01(%rip), %rax    # 0x40b8b0
movswl (%rax,%rcx,2), %edi
movl 0x28(%rbp), %esi
callq 0x52680
movl %eax, -0xac(%rbp)
movl -0x28(%rbp), %eax
addl -0xac(%rbp), %eax
movl %eax, -0x68(%rbp)
movswl -0x34(%rbp), %eax
addl $0x800, %eax            # imm = 0x800
andl $0x7ff, %eax            # imm = 0x7FF
movslq %eax, %rcx
leaq 0x3b9acb(%rip), %rax    # 0x40b8b0
movswl (%rax,%rcx,2), %edi
movl 0x28(%rbp), %esi
callq 0x52680
movl %eax, -0xb0(%rbp)
movl -0x2c(%rbp), %eax
addl -0xb0(%rbp), %eax
movl %eax, -0x6c(%rbp)
movl $0x0, -0xb4(%rbp)
movl $0x0, -0x70(%rbp)
movw -0x32(%rbp), %ax
movw %ax, 0x419f61(%rip)     # 0x46bd80
movw $0x0, -0xb6(%rbp)
movw $0x1, -0xb8(%rbp)
movswq -0xb6(%rbp), %rcx
leaq 0x419f40(%rip), %rax    # 0x46bd80
movw (%rax,%rcx,2), %ax
movw %ax, -0xba(%rbp)
movswq -0xba(%rbp), %rcx
leaq 0x22e766(%rip), %rax    # 0x2805c0
imulq $0x28, %rcx, %rcx
addq %rcx, %rax
movw (%rax), %ax
movw %ax, -0xbc(%rbp)
movswl -0xbc(%rbp), %eax
movswq -0xba(%rbp), %rdx
leaq 0x22e73f(%rip), %rcx    # 0x2805c0
imulq $0x28, %rdx, %rdx
addq %rdx, %rcx
movswl 0x2(%rcx), %ecx
addl %ecx, %eax
subl $0x1, %eax
movw %ax, -0xbe(%rbp)
movswl -0xbc(%rbp), %eax
movl %eax, -0x60(%rbp)
movswq -0xbc(%rbp), %rcx
leaq 0x1a36ff(%rip), %rax    # 0x1f55b0
shlq $0x5, %rcx
addq %rcx, %rax
movq %rax, -0x48(%rbp)
movl -0x60(%rbp), %eax
movswl -0xbe(%rbp), %ecx
cmpl %ecx, %eax
jg 0x52209
movq -0x48(%rbp), %rax
movswq 0x8(%rax), %rcx
leaq 0x1a36d2(%rip), %rax    # 0x1f55b0
shlq $0x5, %rcx
addq %rcx, %rax
movq %rax, -0x50(%rbp)
movq -0x48(%rbp), %rax
movl (%rax), %eax
movl %eax, -0x74(%rbp)
movq -0x48(%rbp), %rax
movl 0x4(%rax), %eax
movl %eax, -0x78(%rbp)
movq -0x50(%rbp), %rax
movl (%rax), %eax
movl %eax, -0x80(%rbp)
movq -0x50(%rbp), %rax
movl 0x4(%rax), %eax
movl %eax, -0x84(%rbp)
movq -0x48(%rbp), %rax
movw 0xc(%rax), %ax
movw %ax, -0xc0(%rbp)
movw $0x0, -0xc2(%rbp)
movswl -0xc0(%rbp), %eax
cmpl $0x0, %eax
jl 0x51fb0
movzbl 0x30(%rbp), %eax
andl $0x1, %eax
cmpl $0x0, %eax
je 0x51f72
movswq -0xc0(%rbp), %rcx
leaq 0x22e66f(%rip), %rax    # 0x2805c0
imulq $0x28, %rcx, %rcx
addq %rcx, %rax
movswl 0x22(%rax), %eax
cmpl $0x0, %eax
je 0x51f72
movswl -0xc2(%rbp), %eax
orl $0x1, %eax
movw %ax, -0xc2(%rbp)
movzbl 0x30(%rbp), %eax
andl $0x2, %eax
cmpl $0x0, %eax
je 0x51fae
movswq -0xc0(%rbp), %rcx
leaq 0x22e633(%rip), %rax    # 0x2805c0
imulq $0x28, %rcx, %rcx
addq %rcx, %rax
movswl 0x24(%rax), %eax
cmpl $0x0, %eax
je 0x51fae
movswl -0xc2(%rbp), %eax
orl $0x1, %eax
movw %ax, -0xc2(%rbp)
jmp 0x51fb0
movzbl 0x30(%rbp), %eax
andl $0x1, %eax
cmpl $0x0, %eax
je 0x51fda
movq -0x48(%rbp), %rax
movswl 0x1a(%rax), %eax
cmpl $0x0, %eax
je 0x51fda
movswl -0xc2(%rbp), %eax
orl $0x2, %eax
movw %ax, -0xc2(%rbp)
movzbl 0x30(%rbp), %eax
andl $0x2, %eax
cmpl $0x0, %eax
je 0x52004
movq -0x48(%rbp), %rax
movswl 0x1c(%rax), %eax
cmpl $0x0, %eax
je 0x52004
movswl -0xc2(%rbp), %eax
orl $0x2, %eax
movw %ax, -0xc2(%rbp)
movswl -0xc2(%rbp), %eax
cmpl $0x0, %eax
jne 0x52021
movswl -0xc0(%rbp), %eax
cmpl $0x0, %eax
jge 0x52021
jmp 0x521ef
movl -0x74(%rbp), %eax
subl -0x28(%rbp), %eax
movl -0x84(%rbp), %ecx
subl -0x2c(%rbp), %ecx
imull %ecx, %eax
movl -0x80(%rbp), %ecx
subl -0x28(%rbp), %ecx
movl -0x78(%rbp), %edx
subl -0x2c(%rbp), %edx
imull %edx, %ecx
cmpl %ecx, %eax
jge 0x5204b
jmp 0x521ef
movl -0x28(%rbp), %edi
movl -0x2c(%rbp), %esi
movl -0x30(%rbp), %edx
movl -0x68(%rbp), %ecx
movl -0x6c(%rbp), %r8d
movl -0x70(%rbp), %r9d
movl -0x74(%rbp), %r12d
movl -0x78(%rbp), %r15d
movl -0x80(%rbp), %r14d
movl -0x84(%rbp), %ebx
leaq -0x88(%rbp), %r11
leaq -0x8c(%rbp), %r10
leaq -0x90(%rbp), %rax
movl %r12d, (%rsp)
movl %r15d, 0x8(%rsp)
movl %r14d, 0x10(%rsp)
movl %ebx, 0x18(%rsp)
movq %r11, 0x20(%rsp)
movq %r10, 0x28(%rsp)
movq %rax, 0x30(%rsp)
callq 0x526a0
cmpl $0x1, %eax
jne 0x521ed
movswl -0xc2(%rbp), %eax
cmpl $0x0, %eax
je 0x52170
movswl -0xc2(%rbp), %eax
andl $0x1, %eax
cmpl $0x0, %eax
je 0x520e2
movw -0xc0(%rbp), %cx
movq -0x40(%rbp), %rax
movw %cx, (%rax)
movswl -0xc2(%rbp), %eax
andl $0x2, %eax
cmpl $0x0, %eax
je 0x520fe
movl -0x60(%rbp), %eax
movw %ax, %cx
movq 0x10(%rbp), %rax
movw %cx, (%rax)
movl -0x88(%rbp), %edi
subl -0x28(%rbp), %edi
movswl -0x34(%rbp), %eax
addl $0xa00, %eax            # imm = 0xA00
andl $0x7ff, %eax            # imm = 0x7FF
movslq %eax, %rcx
leaq 0x3b9791(%rip), %rax    # 0x40b8b0
movswl (%rax,%rcx,2), %esi
movl -0x8c(%rbp), %edx
subl -0x2c(%rbp), %edx
movswl -0x34(%rbp), %eax
addl $0x800, %eax            # imm = 0x800
andl $0x7ff, %eax            # imm = 0x7FF
movslq %eax, %rcx
leaq 0x3b976c(%rip), %rax    # 0x40b8b0
movswl (%rax,%rcx,2), %ecx
callq 0x52880
movl %eax, %ecx
movq 0x20(%rbp), %rax
movl %ecx, (%rax)
movl -0x88(%rbp), %eax
movl %eax, -0x68(%rbp)
movl -0x8c(%rbp), %eax
movl %eax, -0x6c(%rbp)
movl -0x90(%rbp), %eax
movl %eax, -0x70(%rbp)
movswl -0xc0(%rbp), %eax
cmpl $0x0, %eax
jl 0x521eb
movswl -0xb8(%rbp), %eax
subl $0x1, %eax
movl %eax, -0x64(%rbp)
cmpl $0x0, -0x64(%rbp)
jl 0x521b8
movslq -0x64(%rbp), %rcx
leaq 0x419be6(%rip), %rax    # 0x46bd80
movswl (%rax,%rcx,2), %eax
movswl -0xc0(%rbp), %ecx
cmpl %ecx, %eax
jne 0x521ab
jmp 0x521b8
jmp 0x521ad
movl -0x64(%rbp), %eax
addl $-0x1, %eax
movl %eax, -0x64(%rbp)
jmp 0x52189
cmpl $0x0, -0x64(%rbp)
jge 0x521e9
movw -0xc0(%rbp), %dx
movw -0xb8(%rbp), %ax
movw %ax, %cx
addw $0x1, %cx
movw %cx, -0xb8(%rbp)
movswq %ax, %rcx
leaq 0x419b9b(%rip), %rax    # 0x46bd80
movw %dx, (%rax,%rcx,2)
jmp 0x521eb
jmp 0x521ed
jmp 0x521ef
movl -0x60(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x60(%rbp)
movq -0x48(%rbp), %rax
addq $0x20, %rax
movq %rax, -0x48(%rbp)
jmp 0x51ebc
movswq -0xba(%rbp), %rcx
leaq 0x396e58(%rip), %rax    # 0x3e9070
movswl (%rax,%rcx,2), %eax
movl %eax, -0x60(%rbp)
cmpl $0x0, -0x60(%rbp)
jl 0x52639
movslq -0x60(%rbp), %rcx
leaq 0x2675dc(%rip), %rax    # 0x2b9810
imulq $0x2c, %rcx, %rcx
addq %rcx, %rax
movq %rax, -0x58(%rbp)
movw $0x0, -0xc2(%rbp)
movzbl 0x30(%rbp), %eax
andl $0x1, %eax
cmpl $0x0, %eax
je 0x52272
movq -0x58(%rbp), %rax
movswl 0x26(%rax), %eax
cmpl $0x0, %eax
je 0x52272
movswl -0xc2(%rbp), %eax
orl $0x1, %eax
movw %ax, -0xc2(%rbp)
movzbl 0x30(%rbp), %eax
andl $0x2, %eax
cmpl $0x0, %eax
je 0x5229c
movq -0x58(%rbp), %rax
movswl 0x28(%rax), %eax
cmpl $0x0, %eax
je 0x5229c
movswl -0xc2(%rbp), %eax
orl $0x1, %eax
movw %ax, -0xc2(%rbp)
movswl -0xc2(%rbp), %eax
cmpl $0x0, %eax
je 0x52620
movq -0x58(%rbp), %rax
movl (%rax), %eax
movl %eax, -0x74(%rbp)
movq -0x58(%rbp), %rax
movl 0x4(%rax), %eax
movl %eax, -0x78(%rbp)
movq -0x58(%rbp), %rax
movl 0x8(%rax), %eax
movl %eax, -0x7c(%rbp)
movl -0xac(%rbp), %eax
movl -0x74(%rbp), %ecx
subl -0x28(%rbp), %ecx
imull %ecx, %eax
movl -0xb0(%rbp), %ecx
movl -0x78(%rbp), %edx
subl -0x2c(%rbp), %edx
imull %edx, %ecx
addl %ecx, %eax
movl %eax, -0x94(%rbp)
cmpl $0x0, -0x94(%rbp)
jle 0x5261e
movl -0xac(%rbp), %eax
imull -0xac(%rbp), %eax
movl -0xb0(%rbp), %ecx
imull -0xb0(%rbp), %ecx
addl %ecx, %eax
movl %eax, -0x9c(%rbp)
cmpl $0x0, -0x9c(%rbp)
je 0x5261c
movl -0x30(%rbp), %eax
movl %eax, -0xc8(%rbp)
movl -0xb4(%rbp), %edi
movl -0x94(%rbp), %esi
movl -0x9c(%rbp), %edx
callq 0x37720
movl %eax, %ecx
movl -0xc8(%rbp), %eax
addl %ecx, %eax
movl %eax, -0x90(%rbp)
movq -0x58(%rbp), %rax
movswq 0xe(%rax), %rcx
leaq 0x3ea1d5(%rip), %rax    # 0x43c540
movswl (%rax,%rcx,2), %eax
movq -0x58(%rbp), %rcx
movzbl 0x15(%rcx), %ecx
imull %ecx, %eax
movl %eax, -0x5c(%rbp)
movq -0x58(%rbp), %rax
movswl 0xc(%rax), %eax
andl $0x80, %eax
cmpl $0x0, %eax
je 0x5239a
movl -0x5c(%rbp), %eax
shll %eax
addl -0x7c(%rbp), %eax
movl %eax, -0x7c(%rbp)
movq -0x58(%rbp), %rax
movswq 0xe(%rax), %rcx
leaq 0x225216(%rip), %rax    # 0x2775c0
movl (%rax,%rcx,4), %eax
andl $0xff0000, %eax         # imm = 0xFF0000
cmpl $0x0, %eax
je 0x523eb
movq -0x58(%rbp), %rax
movswq 0xe(%rax), %rcx
leaq 0x2251f9(%rip), %rax    # 0x2775c0
movl (%rax,%rcx,4), %eax
sarl $0x10, %eax
andl $0xff, %eax
movsbl %al, %ecx
movq -0x58(%rbp), %rax
movzbl 0x15(%rax), %eax
imull %eax, %ecx
shll $0x2, %ecx
movl -0x7c(%rbp), %eax
subl %ecx, %eax
movl %eax, -0x7c(%rbp)
movl -0x90(%rbp), %eax
cmpl -0x7c(%rbp), %eax
jg 0x5261a
movl -0x90(%rbp), %eax
movl -0x7c(%rbp), %ecx
movl -0x5c(%rbp), %edx
shll $0x2, %edx
subl %edx, %ecx
cmpl %ecx, %eax
jl 0x5261a
movl -0xac(%rbp), %eax
movl -0x78(%rbp), %ecx
subl -0x2c(%rbp), %ecx
imull %ecx, %eax
movl -0xb0(%rbp), %ecx
movl -0x74(%rbp), %edx
subl -0x28(%rbp), %edx
imull %edx, %ecx
subl %ecx, %eax
movl %eax, -0x98(%rbp)
movl -0xac(%rbp), %edi
movl -0x98(%rbp), %esi
movl -0x9c(%rbp), %edx
callq 0x37720
movl %eax, -0xa4(%rbp)
movl -0xb0(%rbp), %edi
movl -0x98(%rbp), %esi
movl -0x9c(%rbp), %edx
callq 0x37720
movl %eax, -0xa8(%rbp)
movl -0xa4(%rbp), %eax
imull -0xa4(%rbp), %eax
movl -0xa8(%rbp), %ecx
imull -0xa8(%rbp), %ecx
addl %ecx, %eax
movl %eax, -0xa0(%rbp)
movq -0x58(%rbp), %rax
movswq 0xe(%rax), %rcx
leaq 0x3f88db(%rip), %rax    # 0x44ad80
movswl (%rax,%rcx,2), %eax
movq -0x58(%rbp), %rcx
movzbl 0x14(%rcx), %ecx
imull %ecx, %eax
movl %eax, -0x5c(%rbp)
movl -0x5c(%rbp), %eax
imull -0x5c(%rbp), %eax
movl %eax, -0x5c(%rbp)
movl -0xa0(%rbp), %eax
movl -0x5c(%rbp), %ecx
sarl $0x7, %ecx
cmpl %ecx, %eax
jg 0x52618
movl -0x28(%rbp), %eax
movl %eax, -0xdc(%rbp)
movl -0xac(%rbp), %edi
movl -0x94(%rbp), %esi
movl -0x9c(%rbp), %edx
callq 0x37720
movl %eax, %ecx
movl -0xdc(%rbp), %eax
addl %ecx, %eax
movl %eax, -0x88(%rbp)
movl -0x2c(%rbp), %eax
movl %eax, -0xd8(%rbp)
movl -0xb0(%rbp), %edi
movl -0x94(%rbp), %esi
movl -0x9c(%rbp), %edx
callq 0x37720
movl %eax, %ecx
movl -0xd8(%rbp), %eax
addl %ecx, %eax
movl %eax, -0x8c(%rbp)
movl -0x88(%rbp), %edi
subl -0x28(%rbp), %edi
callq 0x37610
movl %eax, -0xd4(%rbp)
movl -0x8c(%rbp), %edi
subl -0x2c(%rbp), %edi
callq 0x37610
movl %eax, %ecx
movl -0xd4(%rbp), %eax
addl %ecx, %eax
movl %eax, -0xcc(%rbp)
movl -0x68(%rbp), %edi
subl -0x28(%rbp), %edi
callq 0x37610
movl %eax, -0xd0(%rbp)
movl -0x6c(%rbp), %edi
subl -0x2c(%rbp), %edi
callq 0x37610
movl -0xd0(%rbp), %ecx
movl %eax, %edx
movl -0xcc(%rbp), %eax
addl %edx, %ecx
cmpl %ecx, %eax
jge 0x52616
movl -0x60(%rbp), %eax
movw %ax, %cx
movq 0x18(%rbp), %rax
movw %cx, (%rax)
movl -0x88(%rbp), %edi
subl -0x28(%rbp), %edi
movswl -0x34(%rbp), %eax
addl $0xa00, %eax            # imm = 0xA00
andl $0x7ff, %eax            # imm = 0x7FF
movslq %eax, %rcx
leaq 0x3b92eb(%rip), %rax    # 0x40b8b0
movswl (%rax,%rcx,2), %esi
movl -0x8c(%rbp), %edx
subl -0x2c(%rbp), %edx
movswl -0x34(%rbp), %eax
addl $0x800, %eax            # imm = 0x800
andl $0x7ff, %eax            # imm = 0x7FF
movslq %eax, %rcx
leaq 0x3b92c6(%rip), %rax    # 0x40b8b0
movswl (%rax,%rcx,2), %ecx
callq 0x52880
movl %eax, %ecx
movq 0x20(%rbp), %rax
movl %ecx, (%rax)
movl -0x88(%rbp), %eax
movl %eax, -0x68(%rbp)
movl -0x8c(%rbp), %eax
movl %eax, -0x6c(%rbp)
movl -0x90(%rbp), %eax
movl %eax, -0x70(%rbp)
jmp 0x52618
jmp 0x5261a
jmp 0x5261c
jmp 0x5261e
jmp 0x52620
jmp 0x52622
movslq -0x60(%rbp), %rcx
leaq 0x3a0a53(%rip), %rax    # 0x3f3080
movswl (%rax,%rcx,2), %eax
movl %eax, -0x60(%rbp)
jmp 0x5221f
movw -0xb6(%rbp), %ax
addw $0x1, %ax
movw %ax, -0xb6(%rbp)
movswl -0xb6(%rbp), %eax
movswl -0xb8(%rbp), %ecx
cmpl %ecx, %eax
jl 0x51e31
movl $0x0, -0x24(%rbp)
movl -0x24(%rbp), %eax
addq $0x100, %rsp            # imm = 0x100
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
nopl (%rax,%rax)