// File: /workspace/github_c_makefile_star2_O0/QwazyWabbitWOS[P]lmctf60/p_client.c
// Function: ClientThink
void ClientThink (edict_t *ent, usercmd_t *ucmd)
{
	gclient_t	*client;
	edict_t	*other;
	int		i, j;
	pmove_t	pm;
	edict_t		*flag;  // CTF CODE -- LM_JORM
	vec3_t 	offset; // CTF CODE -- LM_JORM

#ifdef ZBOT
	if (use_zbotdetect->value)
	{
		char message[100];

		if (((int) use_zbotdetect->value > 0) && ZbotCheck(ent, ucmd))
		{
			if ((int) use_zbotdetect->value == 2)
			{
				sprintf(message, "%s was kicked by ZBot detection.\n", 
					ent->client->pers.netname);
				ctf_BSafePrint(PRINT_HIGH, message);
				ForceCommand(ent, "disconnect\n");
			}
			else if ((int) use_zbotdetect->value == 1)
			{
				sprintf(message, "WARNING:  ZBOT DETECTOR THINKS %s IS A BOT.\n", 
					ent->client->pers.netname);
				ctf_BSafePrint(PRINT_HIGH, message);
			}
		}
	}
#endif
	
	level.current_entity = ent;
	client = ent->client;
	
	// CTF CODE -- LM_JORM
	//surt spam control
	ent->client->spam_band_count+=CTF_SPAM_BAND_RECOVER; //this locks based on bandwidth
	if (ent->client->spam_band_count > CTF_SPAM_BAND_MAX)
		ent->client->spam_band_count = CTF_SPAM_BAND_MAX;
	if (ent->client->spam_band_count < CTF_SPAM_BAND_MIN)
		ent->client->spam_band_count = CTF_SPAM_BAND_MIN;
	
	ent->client->spam_freq_count--; //this locks based on frequency
	if (ent->client->spam_freq_count > CTF_SPAM_FREQ_MAX)
		ent->client->spam_freq_count = CTF_SPAM_FREQ_MAX;
	if (ent->client->spam_freq_count < CTF_SPAM_FREQ_MIN)
		ent->client->spam_freq_count = CTF_SPAM_FREQ_MIN;
	//surt end spam control

	if (ent->client->ctf.printready)
		ctf_SafePrint(ent, 0, NULL); //trigger a queued print
	
	if (GamePaused() && !(ent->client->ctf.extra_flags & CTF_EXTRAFLAGS_REFEREE))
	{
		client->ps.pmove.pm_type = PM_FREEZE;
		gi.linkentity (ent); //they call this below, but we abort early here!
		return;
	}

#ifdef OLDOBSERVERCODE
	if (!ctf_validateplayer(ent,CTF_TEAM_ANYTEAM)) //surt if not on a team, you're observer 
	{
		if (ent->client->ctf.teamnum != CTF_TEAM_OBSERVER)
		{
			ctf_SetEntTeam(ent, CTF_TEAM_OBSERVER); //catch anyone on wierd teams
			Observer_Start(ent);
		}
		// Let's us check buttons in Camera Think
		client->oldbuttons = client->buttons;
		client->buttons = ucmd->buttons;
		client->latched_buttons |= client->buttons & ~client->oldbuttons;
		gi.linkentity (ent); //they call this below, but we abort early here!
	
		if (Camera_Think(ent))
			return;
	}
#endif
	
	// END CTF CODE -- LM_JORM

	if (level.intermissiontime)
	{
		client->ps.pmove.pm_type = PM_FREEZE;
		// can exit intermission after five seconds
		if (level.time > level.intermissiontime + 5.0 
			&& (ucmd->buttons & BUTTON_ANY) )
			level.exitintermission = true;
		return;
	}

	pm_passent = ent;

	if (ent->client->chase_target) {

		client->resp.cmd_angles[0] = SHORT2ANGLE(ucmd->angles[0]);
		client->resp.cmd_angles[1] = SHORT2ANGLE(ucmd->angles[1]);
		client->resp.cmd_angles[2] = SHORT2ANGLE(ucmd->angles[2]);

	} else {

		// set up for pmove
		memset (&pm, 0, sizeof(pm));

		if (ent->movetype == MOVETYPE_NOCLIP)
			client->ps.pmove.pm_type = PM_SPECTATOR;
		else if (ent->s.modelindex != 255)
			client->ps.pmove.pm_type = PM_GIB;
		else if (ent->deadflag)
			client->ps.pmove.pm_type = PM_DEAD;
		else
			client->ps.pmove.pm_type = PM_NORMAL;

		client->ps.pmove.gravity = sv_gravity->value;

		/* QwazyWabbit */
		/* This causes gravity to go negative if 
		   your player Z-position goes above 0. 
		   Original code by gaia, I added the 
		   macro condition. */

#ifdef WANT_FUNKY_GRAVITY
		if(ent->s.origin[2] > 0) //gaia
			client->ps.pmove.gravity = -800;
		else
			client->ps.pmove.gravity = 800;
#endif

		pm.s = client->ps.pmove;

		for (i=0 ; i<3 ; i++)
		{
			pm.s.origin[i] = ent->s.origin[i]*8;
			pm.s.velocity[i] = ent->velocity[i]*8;
		}

		if (memcmp(&client->old_pmove, &pm.s, sizeof(pm.s)))
		{
			pm.snapinitial = true;
	//		gi.dprintf ("pmove changed!\n");
		}

		pm.cmd = *ucmd;

		pm.trace = PM_trace;	// adds default parms
		pm.pointcontents = gi.pointcontents;

		// Stop that damn bobbing of the client!
		if (client->hookstate == 2 && client->hooklength < 50)
		{
			pm.s.gravity = 0;
		}
		// END CTF CODE -- LM_JORM

		// perform a pmove
		gi.Pmove (&pm);

		// save results of pmove
		client->ps.pmove = pm.s;
		client->old_pmove = pm.s;

		for (i=0 ; i<3 ; i++)
		{
			ent->s.origin[i] = pm.s.origin[i]*0.125;
			ent->velocity[i] = pm.s.velocity[i]*0.125;
		}

		VectorCopy (pm.mins, ent->mins);
		VectorCopy (pm.maxs, ent->maxs);

		client->resp.cmd_angles[0] = SHORT2ANGLE(ucmd->angles[0]);
		client->resp.cmd_angles[1] = SHORT2ANGLE(ucmd->angles[1]);
		client->resp.cmd_angles[2] = SHORT2ANGLE(ucmd->angles[2]);

		if (ent->groundentity && !pm.groundentity && (pm.cmd.upmove >= 10) && (pm.waterlevel == 0))
		{
			gi.sound(ent, CHAN_VOICE, gi.soundindex("*jump1.wav"), 1, ATTN_NORM, 0);
			PlayerNoise(ent, ent->s.origin, PNOISE_SELF);
		}

		ent->viewheight = pm.viewheight;
		ent->waterlevel = pm.waterlevel;
		ent->watertype = pm.watertype;
		ent->groundentity = pm.groundentity;
		if (pm.groundentity)
			ent->groundentity_linkcount = pm.groundentity->linkcount;

		if (ent->deadflag)
		{
			client->ps.viewangles[ROLL] = 40;
			client->ps.viewangles[PITCH] = -15;
			client->ps.viewangles[YAW] = client->killer_yaw;
		}
		else
		{
			VectorCopy (pm.viewangles, client->v_angle);
			VectorCopy (pm.viewangles, client->ps.viewangles);
		}

		gi.linkentity (ent);

		if (ent->movetype != MOVETYPE_NOCLIP)
			G_TouchTriggers (ent);

		// touch other objects
		for (i=0 ; i<pm.numtouch ; i++)
		{
			other = pm.touchents[i];
			for (j=0 ; j<i ; j++)
				if (pm.touchents[j] == other)
					break;
			if (j != i)
				continue;	// duplicated
			if (!other->touch)
				continue;
			other->touch (other, ent, NULL, NULL);
		}

	}

	client->oldbuttons = client->buttons;
	client->buttons = ucmd->buttons;
	client->latched_buttons |= client->buttons & ~client->oldbuttons;

	// save light level the player is standing on for
	// monster sighting AI
	ent->light_level = ucmd->lightlevel;

	// fire weapon from final position if needed
	//bat not needed for team observers
	//if(client->ctf.teamnum != CTF_TEAM_OBSERVER_RED &&
	//	client->ctf.teamnum != CTF_TEAM_OBSERVER_BLUE)
	// Paril
	if (!GamePaused())
	// Paril
	{
		if (client->latched_buttons & BUTTON_ATTACK)
		{
			if (client->resp.spectator) 
			{

				client->latched_buttons = 0;

				if (client->chase_target) 
				{
					client->chase_target = NULL;
					client->ps.pmove.pm_flags &= ~PMF_NO_PREDICTION;
				} 
				else
					GetChaseTarget(ent);

			} 
			else if (!client->weapon_thunk) 
			{
				client->weapon_thunk = true;
				Think_Weapon (ent);
			}
		}
	}

	if (client->resp.spectator) 
	{
		if(client->ctf.teamnum == CTF_TEAM_OBSERVER_RED &&
			!Team_Observer_OK(CTF_TEAM_RED, ent))
		{
			Cmd_Observe_f(ent, CTF_TEAM_OBSERVER);
			return;
		}
		else if(client->ctf.teamnum == CTF_TEAM_OBSERVER_BLUE &&
			!Team_Observer_OK(CTF_TEAM_BLUE, ent))
		{
			Cmd_Observe_f(ent, CTF_TEAM_OBSERVER);
			return;
		}
		
	
		//When we first start, we are observing nobody
		if(client->ctf.teamnum == CTF_TEAM_OBSERVER_RED)
		{
			if(!client->chase_target)
			{
				GetChaseTarget(ent);
				return;
			}
			else if(client->chase_target->client->ctf.teamnum != CTF_TEAM_RED)
			{
				Cmd_Observe_f(ent, CTF_TEAM_OBSERVER);
				return;
			}

		}
		else if(client->ctf.teamnum == CTF_TEAM_OBSERVER_BLUE)
		{
			if(!client->chase_target)
			{	
				GetChaseTarget(ent);
				return;
			}
			else if(client->chase_target->client->ctf.teamnum != CTF_TEAM_BLUE)
			{
				Cmd_Observe_f(ent, CTF_TEAM_OBSERVER);
				return;
			}

		}
		


		if (ucmd->upmove >= 10) 
		{
			if (!(client->ps.pmove.pm_flags & PMF_JUMP_HELD)) 
			{
				client->ps.pmove.pm_flags |= PMF_JUMP_HELD;
				if(client->chase_target)
				{
					//Debug_Show("Chase Next");
					ChaseNext(ent);
				}
				else
				{
					//Debug_Show("Get chase target");
					GetChaseTarget(ent);
				}
			}
		} 
		else
			client->ps.pmove.pm_flags &= ~PMF_JUMP_HELD;
	}
	else
	{
		// CTF CODE -- LM_JORM
		// Were we carrying a flag?  MJD Suggest Parens
		flag = ClientHasFlag(ent);
		if (flag)
		{
			// MOVE THE FLAG!
			VectorCopy(ent->s.origin, flag->s.origin);
			VectorNormalize2(ent->s.angles, offset);
			VectorScale(offset, 6, offset);
			//offset[2] = -10;
			VectorSubtract (flag->s.origin, offset, flag->s.origin);
		
		/*
		// Make sure flag is not inside another object
		tr = gi.trace (ent->s.origin, flag->mins, flag->maxs, flag->s.origin, ent, MASK_SHOT);
		VectorCopy(tr.endpos, flag->s.origin);
		*/
		
			VectorCopy(ent->velocity, flag->velocity);
			VectorCopy (offset, flag->movedir);
			vectoangles (offset, flag->s.angles);
		
		}
	
		// END CTF CODE -- LM_JORM
	}

	// update chase cam if being followed
	for (i = 1; i <= maxclients->value; i++) 
	{
		other = g_edicts + i;
		if (other->inuse && other->client->chase_target == ent)
			UpdateChaseCam(other);
	}
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x1d0, %rsp            # imm = 0x1D0
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq -0x8(%rbp), %rcx
movq 0x26ef2(%rip), %rax     # 0x82da0
movq %rcx, 0x148(%rax)
movq -0x8(%rbp), %rax
movq 0x58(%rax), %rax
movq %rax, -0x18(%rbp)
movq -0x8(%rbp), %rax
movq 0x58(%rax), %rax
movq 0x10e0(%rax), %rcx
addq $0x5, %rcx
movq %rcx, 0x10e0(%rax)
movq -0x8(%rbp), %rax
movq 0x58(%rax), %rax
cmpq $0x1c2, 0x10e0(%rax) # imm = 0x1C2
jle 0x5bf03
movq -0x8(%rbp), %rax
movq 0x58(%rax), %rax
movq $0x1c2, 0x10e0(%rax) # imm = 0x1C2
movq -0x8(%rbp), %rax
movq 0x58(%rax), %rax
cmpq $-0x96, 0x10e0(%rax)
jge 0x5bf2b
movq -0x8(%rbp), %rax
movq 0x58(%rax), %rax
movq $-0x96, 0x10e0(%rax)
movq -0x8(%rbp), %rax
movq 0x58(%rax), %rax
movq 0x10d8(%rax), %rcx
addq $-0x1, %rcx
movq %rcx, 0x10d8(%rax)
movq -0x8(%rbp), %rax
movq 0x58(%rax), %rax
cmpq $0xb4, 0x10d8(%rax)
jle 0x5bf6d
movq -0x8(%rbp), %rax
movq 0x58(%rax), %rax
movq $0xb4, 0x10d8(%rax)
movq -0x8(%rbp), %rax
movq 0x58(%rax), %rax
cmpq $0x0, 0x10d8(%rax)
jge 0x5bf92
movq -0x8(%rbp), %rax
movq 0x58(%rax), %rax
movq $0x0, 0x10d8(%rax)
movq -0x8(%rbp), %rax
movq 0x58(%rax), %rax
cmpl $0x0, 0x911c(%rax)
je 0x5bfb3
movq -0x8(%rbp), %rdi
xorl %eax, %eax
movl %eax, %edx
movq %rdx, %rsi
callq 0x18f20
movb $0x0, %al
callq 0x18160
cmpl $0x0, %eax
je 0x5bff8
movq -0x8(%rbp), %rax
movq 0x58(%rax), %rax
movl 0x1108(%rax), %eax
andl $0x2, %eax
cmpl $0x0, %eax
jne 0x5bff8
movq -0x18(%rbp), %rax
movl $0x4, (%rax)
movq 0x2661a(%rip), %rax     # 0x82600
movq 0x90(%rax), %rax
movq -0x8(%rbp), %rdi
callq *%rax
jmp 0x5cb64
movq 0x26da1(%rip), %rax     # 0x82da0
movss 0xc8(%rax), %xmm0
xorps %xmm1, %xmm1
ucomiss %xmm1, %xmm0
jne 0x5c013
jp 0x5c013
jmp 0x5c07a
movq -0x18(%rbp), %rax
movl $0x4, (%rax)
movq 0x26d7c(%rip), %rax     # 0x82da0
movss 0x4(%rax), %xmm0
cvtss2sd %xmm0, %xmm0
movq 0x26d6c(%rip), %rax     # 0x82da0
movss 0xc8(%rax), %xmm1
cvtss2sd %xmm1, %xmm1
movsd 0x16b48(%rip), %xmm2    # 0x72b90
addsd %xmm2, %xmm1
ucomisd %xmm1, %xmm0
jbe 0x5c075
movq -0x10(%rbp), %rax
movzbl 0x1(%rax), %eax
andl $0x80, %eax
cmpl $0x0, %eax
je 0x5c075
movq 0x26d35(%rip), %rax     # 0x82da0
movl $0x1, 0xd8(%rax)
jmp 0x5cb64
movq -0x8(%rbp), %rcx
movq 0x26de3(%rip), %rax     # 0x82e68
movq %rcx, (%rax)
movq -0x8(%rbp), %rax
movq 0x58(%rax), %rax
cmpq $0x0, 0xf30(%rax)
je 0x5c117
movq -0x10(%rbp), %rax
movswl 0x2(%rax), %eax
cvtsi2sd %eax, %xmm0
movsd 0x1a542(%rip), %xmm1    # 0x765f0
mulsd %xmm1, %xmm0
cvtsd2ss %xmm0, %xmm0
movq -0x18(%rbp), %rax
movss %xmm0, 0xdf8(%rax)
movq -0x10(%rbp), %rax
movswl 0x4(%rax), %eax
cvtsi2sd %eax, %xmm0
movsd 0x1a51a(%rip), %xmm1    # 0x765f0
mulsd %xmm1, %xmm0
cvtsd2ss %xmm0, %xmm0
movq -0x18(%rbp), %rax
movss %xmm0, 0xdfc(%rax)
movq -0x10(%rbp), %rax
movswl 0x6(%rax), %eax
cvtsi2sd %eax, %xmm0
movsd 0x1a4f2(%rip), %xmm1    # 0x765f0
mulsd %xmm1, %xmm0
cvtsd2ss %xmm0, %xmm0
movq -0x18(%rbp), %rax
movss %xmm0, 0xe00(%rax)
jmp 0x5c6c9
leaq -0x1a8(%rbp), %rdi
xorl %esi, %esi
movl $0x180, %edx            # imm = 0x180
callq 0x188f0
movq -0x8(%rbp), %rax
cmpl $0x1, 0x118(%rax)
jne 0x5c143
movq -0x18(%rbp), %rax
movl $0x1, (%rax)
jmp 0x5c183
movq -0x8(%rbp), %rax
cmpl $0xff, 0x28(%rax)
je 0x5c15c
movq -0x18(%rbp), %rax
movl $0x3, (%rax)
jmp 0x5c181
movq -0x8(%rbp), %rax
cmpl $0x0, 0x260(%rax)
je 0x5c175
movq -0x18(%rbp), %rax
movl $0x2, (%rax)
jmp 0x5c17f
movq -0x18(%rbp), %rax
movl $0x0, (%rax)
jmp 0x5c181
jmp 0x5c183
movq 0x26e36(%rip), %rax     # 0x82fc0
movq (%rax), %rax
movss 0x20(%rax), %xmm0
cvttss2si %xmm0, %eax
movw %ax, %cx
movq -0x18(%rbp), %rax
movw %cx, 0x12(%rax)
movq -0x18(%rbp), %rax
movq (%rax), %rcx
movq %rcx, -0x1a8(%rbp)
movq 0x8(%rax), %rcx
movq %rcx, -0x1a0(%rbp)
movq 0x10(%rax), %rcx
movq %rcx, -0x198(%rbp)
movl 0x18(%rax), %eax
movl %eax, -0x190(%rbp)
movl $0x0, -0x24(%rbp)
cmpl $0x3, -0x24(%rbp)
jge 0x5c234
movq -0x8(%rbp), %rcx
movslq -0x24(%rbp), %rax
movss 0x4(%rcx,%rax,4), %xmm0
movss 0x13d0b(%rip), %xmm1    # 0x6fefc
mulss %xmm1, %xmm0
cvttss2si %xmm0, %ecx
movw %cx, -0x1a4(%rbp,%rax,2)
movq -0x8(%rbp), %rax
movslq -0x24(%rbp), %rcx
movss 0x1c0(%rax,%rcx,4), %xmm0
mulss %xmm1, %xmm0
cvttss2si %xmm0, %eax
movw %ax, %cx
movslq -0x24(%rbp), %rax
movw %cx, -0x19e(%rbp,%rax,2)
movl -0x24(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x24(%rbp)
jmp 0x5c1d5
movq -0x18(%rbp), %rdi
addq $0xe08, %rdi            # imm = 0xE08
leaq -0x1a8(%rbp), %rsi
movl $0x1c, %edx
callq 0x18ab0
cmpl $0x0, %eax
je 0x5c25f
movl $0x1, -0x17c(%rbp)
movq -0x10(%rbp), %rax
movq (%rax), %rcx
movq %rcx, -0x18c(%rbp)
movq 0x8(%rax), %rax
movq %rax, -0x184(%rbp)
movq 0x26571(%rip), %rax     # 0x827f0
movq %rax, -0x38(%rbp)
movq 0x26376(%rip), %rax     # 0x82600
movq 0x68(%rax), %rax
movq %rax, -0x30(%rbp)
movq -0x18(%rbp), %rax
cmpl $0x2, 0xf40(%rax)
jne 0x5c2b5
movq -0x18(%rbp), %rax
cmpl $0x32, 0xf5c(%rax)
jge 0x5c2b5
movw $0x0, -0x196(%rbp)
leaq -0x1a8(%rbp), %rdi
movq 0x2633d(%rip), %rax     # 0x82600
callq *0xa8(%rax)
movq -0x18(%rbp), %rax
movq -0x1a8(%rbp), %rcx
movq %rcx, (%rax)
movq -0x1a0(%rbp), %rcx
movq %rcx, 0x8(%rax)
movq -0x198(%rbp), %rcx
movq %rcx, 0x10(%rax)
movl -0x190(%rbp), %ecx
movl %ecx, 0x18(%rax)
movq -0x18(%rbp), %rax
movq -0x1a8(%rbp), %rcx
movq %rcx, 0xe08(%rax)
movq -0x1a0(%rbp), %rcx
movq %rcx, 0xe10(%rax)
movq -0x198(%rbp), %rcx
movq %rcx, 0xe18(%rax)
movl -0x190(%rbp), %ecx
movl %ecx, 0xe20(%rax)
movl $0x0, -0x24(%rbp)
cmpl $0x3, -0x24(%rbp)
jge 0x5c3a7
movslq -0x24(%rbp), %rax
movswl -0x1a4(%rbp,%rax,2), %eax
cvtsi2sd %eax, %xmm0
movsd 0x183a3(%rip), %xmm1    # 0x746f8
mulsd %xmm1, %xmm0
cvtsd2ss %xmm0, %xmm0
movq -0x8(%rbp), %rax
movslq -0x24(%rbp), %rcx
movss %xmm0, 0x4(%rax,%rcx,4)
movslq -0x24(%rbp), %rax
movswl -0x19e(%rbp,%rax,2), %eax
cvtsi2sd %eax, %xmm0
movsd 0x18375(%rip), %xmm1    # 0x746f8
mulsd %xmm1, %xmm0
cvtsd2ss %xmm0, %xmm0
movq -0x8(%rbp), %rax
movslq -0x24(%rbp), %rcx
movss %xmm0, 0x1c0(%rax,%rcx,4)
movl -0x24(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x24(%rbp)
jmp 0x5c337
movss -0x60(%rbp), %xmm0
movq -0x8(%rbp), %rax
movss %xmm0, 0xcc(%rax)
movss -0x5c(%rbp), %xmm0
movq -0x8(%rbp), %rax
movss %xmm0, 0xd0(%rax)
movss -0x58(%rbp), %xmm0
movq -0x8(%rbp), %rax
movss %xmm0, 0xd4(%rax)
movss -0x54(%rbp), %xmm0
movq -0x8(%rbp), %rax
movss %xmm0, 0xd8(%rax)
movss -0x50(%rbp), %xmm0
movq -0x8(%rbp), %rax
movss %xmm0, 0xdc(%rax)
movss -0x4c(%rbp), %xmm0
movq -0x8(%rbp), %rax
movss %xmm0, 0xe0(%rax)
movq -0x10(%rbp), %rax
movswl 0x2(%rax), %eax
cvtsi2sd %eax, %xmm0
movsd 0x1a1cf(%rip), %xmm1    # 0x765f0
mulsd %xmm1, %xmm0
cvtsd2ss %xmm0, %xmm0
movq -0x18(%rbp), %rax
movss %xmm0, 0xdf8(%rax)
movq -0x10(%rbp), %rax
movswl 0x4(%rax), %eax
cvtsi2sd %eax, %xmm0
movsd 0x1a1a7(%rip), %xmm1    # 0x765f0
mulsd %xmm1, %xmm0
cvtsd2ss %xmm0, %xmm0
movq -0x18(%rbp), %rax
movss %xmm0, 0xdfc(%rax)
movq -0x10(%rbp), %rax
movswl 0x6(%rax), %eax
cvtsi2sd %eax, %xmm0
movsd 0x1a17f(%rip), %xmm1    # 0x765f0
mulsd %xmm1, %xmm0
cvtsd2ss %xmm0, %xmm0
movq -0x18(%rbp), %rax
movss %xmm0, 0xe00(%rax)
movq -0x8(%rbp), %rax
cmpq $0x0, 0x2b8(%rax)
je 0x5c512
cmpq $0x0, -0x48(%rbp)
jne 0x5c512
movswl -0x180(%rbp), %eax
cmpl $0xa, %eax
jl 0x5c512
cmpl $0x0, -0x3c(%rbp)
jne 0x5c512
movq 0x2614d(%rip), %rax     # 0x82600
movq 0x20(%rax), %rax
movq %rax, -0x1c8(%rbp)
movq -0x8(%rbp), %rax
movq %rax, -0x1d0(%rbp)
leaq 0x1940f(%rip), %rdi     # 0x758df
movq 0x26129(%rip), %rax     # 0x82600
callq *0x48(%rax)
movq -0x1d0(%rbp), %rdi
movl %eax, %edx
movq -0x1c8(%rbp), %rax
movl $0x2, %esi
movss 0x139f5(%rip), %xmm1    # 0x6feec
xorps %xmm2, %xmm2
movaps %xmm1, %xmm0
callq *%rax
movq -0x8(%rbp), %rdi
movq -0x8(%rbp), %rsi
addq $0x4, %rsi
xorl %edx, %edx
callq 0x19080
cvttss2si -0x64(%rbp), %ecx
movq -0x8(%rbp), %rax
movl %ecx, 0x278(%rax)
movl -0x3c(%rbp), %ecx
movq -0x8(%rbp), %rax
movl %ecx, 0x30c(%rax)
movl -0x40(%rbp), %ecx
movq -0x8(%rbp), %rax
movl %ecx, 0x308(%rax)
movq -0x48(%rbp), %rcx
movq -0x8(%rbp), %rax
movq %rcx, 0x2b8(%rax)
cmpq $0x0, -0x48(%rbp)
je 0x5c562
movq -0x48(%rbp), %rax
movl 0x64(%rax), %ecx
movq -0x8(%rbp), %rax
movl %ecx, 0x2c0(%rax)
movq -0x8(%rbp), %rax
cmpl $0x0, 0x260(%rax)
je 0x5c5a8
movq -0x18(%rbp), %rax
movss 0x147a5(%rip), %xmm0    # 0x70d20
movss %xmm0, 0x24(%rax)
movq -0x18(%rbp), %rax
movss 0x13d10(%rip), %xmm0    # 0x7029c
movss %xmm0, 0x1c(%rax)
movq -0x18(%rbp), %rax
movss 0xe74(%rax), %xmm0
movq -0x18(%rbp), %rax
movss %xmm0, 0x20(%rax)
jmp 0x5c605
movss -0x70(%rbp), %xmm0
movq -0x18(%rbp), %rax
movss %xmm0, 0xebc(%rax)
movss -0x6c(%rbp), %xmm0
movq -0x18(%rbp), %rax
movss %xmm0, 0xec0(%rax)
movss -0x68(%rbp), %xmm0
movq -0x18(%rbp), %rax
movss %xmm0, 0xec4(%rax)
movss -0x70(%rbp), %xmm0
movq -0x18(%rbp), %rax
movss %xmm0, 0x1c(%rax)
movss -0x6c(%rbp), %xmm0
movq -0x18(%rbp), %rax
movss %xmm0, 0x20(%rax)
movss -0x68(%rbp), %xmm0
movq -0x18(%rbp), %rax
movss %xmm0, 0x24(%rax)
movq 0x25ff4(%rip), %rax     # 0x82600
movq 0x90(%rax), %rax
movq -0x8(%rbp), %rdi
callq *%rax
movq -0x8(%rbp), %rax
cmpl $0x1, 0x118(%rax)
je 0x5c62f
movq -0x8(%rbp), %rdi
callq 0x193f0
movl $0x0, -0x24(%rbp)
movl -0x24(%rbp), %eax
cmpl -0x178(%rbp), %eax
jge 0x5c6c7
movslq -0x24(%rbp), %rax
movq -0x170(%rbp,%rax,8), %rax
movq %rax, -0x20(%rbp)
movl $0x0, -0x28(%rbp)
movl -0x28(%rbp), %eax
cmpl -0x24(%rbp), %eax
jge 0x5c685
movslq -0x28(%rbp), %rax
movq -0x170(%rbp,%rax,8), %rax
cmpq -0x20(%rbp), %rax
jne 0x5c678
jmp 0x5c685
jmp 0x5c67a
movl -0x28(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x28(%rbp)
jmp 0x5c65c
movl -0x28(%rbp), %eax
cmpl -0x24(%rbp), %eax
je 0x5c68f
jmp 0x5c6b9
movq -0x20(%rbp), %rax
cmpq $0x0, 0x220(%rax)
jne 0x5c69f
jmp 0x5c6b9
movq -0x20(%rbp), %rax
movq 0x220(%rax), %rax
movq -0x20(%rbp), %rdi
movq -0x8(%rbp), %rsi
xorl %ecx, %ecx
movq %rcx, %rdx
callq *%rax
movl -0x24(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x24(%rbp)
jmp 0x5c636
jmp 0x5c6c9
movq -0x18(%rbp), %rax
movl 0xe3c(%rax), %ecx
movq -0x18(%rbp), %rax
movl %ecx, 0xe40(%rax)
movq -0x10(%rbp), %rax
movzbl 0x1(%rax), %ecx
movq -0x18(%rbp), %rax
movl %ecx, 0xe3c(%rax)
movq -0x18(%rbp), %rax
movl 0xe3c(%rax), %ecx
movq -0x18(%rbp), %rax
movl 0xe40(%rax), %eax
xorl $-0x1, %eax
andl %eax, %ecx
movq -0x18(%rbp), %rax
orl 0xe44(%rax), %ecx
movl %ecx, 0xe44(%rax)
movq -0x10(%rbp), %rax
movzbl 0xf(%rax), %ecx
movq -0x8(%rbp), %rax
movl %ecx, 0x328(%rax)
movb $0x0, %al
callq 0x18160
cmpl $0x0, %eax
jne 0x5c7c9
movq -0x18(%rbp), %rax
movl 0xe44(%rax), %eax
andl $0x1, %eax
cmpl $0x0, %eax
je 0x5c7c7
movq -0x18(%rbp), %rax
cmpl $0x0, 0xe04(%rax)
je 0x5c79f
movq -0x18(%rbp), %rax
movl $0x0, 0xe44(%rax)
movq -0x18(%rbp), %rax
cmpq $0x0, 0xf30(%rax)
je 0x5c794
movq -0x18(%rbp), %rax
movq $0x0, 0xf30(%rax)
movq -0x18(%rbp), %rax
movzbl 0x10(%rax), %ecx
andl $-0x41, %ecx
movb %cl, 0x10(%rax)
jmp 0x5c79d
movq -0x8(%rbp), %rdi
callq 0x19630
jmp 0x5c7c5
movq -0x18(%rbp), %rax
cmpl $0x0, 0xe48(%rax)
jne 0x5c7c3
movq -0x18(%rbp), %rax
movl $0x1, 0xe48(%rax)
movq -0x8(%rbp), %rdi
callq 0x197d0
jmp 0x5c7c5
jmp 0x5c7c7
jmp 0x5c7c9
movq -0x18(%rbp), %rax
cmpl $0x0, 0xe04(%rax)
je 0x5c958
movq -0x18(%rbp), %rax
cmpl $-0x3, 0x1100(%rax)
jne 0x5c80d
movq -0x8(%rbp), %rsi
movl $0x1, %edi
callq 0x19970
cmpl $0x0, %eax
jne 0x5c80d
movq -0x8(%rbp), %rdi
movl $0xffffffff, %esi       # imm = 0xFFFFFFFF
callq 0x198e0
jmp 0x5cb64
movq -0x18(%rbp), %rax
cmpl $-0x2, 0x1100(%rax)
jne 0x5c840
movq -0x8(%rbp), %rsi
movl $0x2, %edi
callq 0x19970
cmpl $0x0, %eax
jne 0x5c840
movq -0x8(%rbp), %rdi
movl $0xffffffff, %esi       # imm = 0xFFFFFFFF
callq 0x198e0
jmp 0x5cb64
jmp 0x5c842
movq -0x18(%rbp), %rax
cmpl $-0x3, 0x1100(%rax)
jne 0x5c89a
movq -0x18(%rbp), %rax
cmpq $0x0, 0xf30(%rax)
jne 0x5c86b
movq -0x8(%rbp), %rdi
callq 0x19630
jmp 0x5cb64
movq -0x18(%rbp), %rax
movq 0xf30(%rax), %rax
movq 0x58(%rax), %rax
cmpl $0x1, 0x1100(%rax)
je 0x5c896
movq -0x8(%rbp), %rdi
movl $0xffffffff, %esi       # imm = 0xFFFFFFFF
callq 0x198e0
jmp 0x5cb64
jmp 0x5c898
jmp 0x5c8f4
movq -0x18(%rbp), %rax
cmpl $-0x2, 0x1100(%rax)
jne 0x5c8f2
movq -0x18(%rbp), %rax
cmpq $0x0, 0xf30(%rax)
jne 0x5c8c3
movq -0x8(%rbp), %rdi
callq 0x19630
jmp 0x5cb64
movq -0x18(%rbp), %rax
movq 0xf30(%rax), %rax
movq 0x58(%rax), %rax
cmpl $0x2, 0x1100(%rax)
je 0x5c8ee
movq -0x8(%rbp), %rdi
movl $0xffffffff, %esi       # imm = 0xFFFFFFFF
callq 0x198e0
jmp 0x5cb64
jmp 0x5c8f0
jmp 0x5c8f2
jmp 0x5c8f4
movq -0x10(%rbp), %rax
movswl 0xc(%rax), %eax
cmpl $0xa, %eax
jl 0x5c945
movq -0x18(%rbp), %rax
movzbl 0x10(%rax), %eax
andl $0x2, %eax
cmpl $0x0, %eax
jne 0x5c943
movq -0x18(%rbp), %rax
movzbl 0x10(%rax), %ecx
orl $0x2, %ecx
movb %cl, 0x10(%rax)
movq -0x18(%rbp), %rax
cmpq $0x0, 0xf30(%rax)
je 0x5c938
movq -0x8(%rbp), %rdi
callq 0x197b0
jmp 0x5c941
movq -0x8(%rbp), %rdi
callq 0x19630
jmp 0x5c943
jmp 0x5c953
movq -0x18(%rbp), %rax
movzbl 0x10(%rax), %ecx
andl $-0x3, %ecx
movb %cl, 0x10(%rax)
jmp 0x5caf3
movq -0x8(%rbp), %rdi
callq 0x18150
movq %rax, -0x1b0(%rbp)
cmpq $0x0, -0x1b0(%rbp)
je 0x5caf1
movq -0x8(%rbp), %rax
movss 0x4(%rax), %xmm0
movq -0x1b0(%rbp), %rax
movss %xmm0, 0x4(%rax)
movq -0x8(%rbp), %rax
movss 0x8(%rax), %xmm0
movq -0x1b0(%rbp), %rax
movss %xmm0, 0x8(%rax)
movq -0x8(%rbp), %rax
movss 0xc(%rax), %xmm0
movq -0x1b0(%rbp), %rax
movss %xmm0, 0xc(%rax)
movq -0x8(%rbp), %rdi
addq $0x10, %rdi
leaq -0x1bc(%rbp), %rsi
callq 0x189f0
leaq -0x1bc(%rbp), %rdi
leaq -0x1bc(%rbp), %rsi
movss 0x13525(%rip), %xmm0    # 0x6ff04
callq 0x18a80
movq -0x1b0(%rbp), %rax
movss 0x4(%rax), %xmm0
subss -0x1bc(%rbp), %xmm0
movq -0x1b0(%rbp), %rax
movss %xmm0, 0x4(%rax)
movq -0x1b0(%rbp), %rax
movss 0x8(%rax), %xmm0
subss -0x1b8(%rbp), %xmm0
movq -0x1b0(%rbp), %rax
movss %xmm0, 0x8(%rax)
movq -0x1b0(%rbp), %rax
movss 0xc(%rax), %xmm0
subss -0x1b4(%rbp), %xmm0
movq -0x1b0(%rbp), %rax
movss %xmm0, 0xc(%rax)
movq -0x8(%rbp), %rax
movss 0x1c0(%rax), %xmm0
movq -0x1b0(%rbp), %rax
movss %xmm0, 0x1c0(%rax)
movq -0x8(%rbp), %rax
movss 0x1c4(%rax), %xmm0
movq -0x1b0(%rbp), %rax
movss %xmm0, 0x1c4(%rax)
movq -0x8(%rbp), %rax
movss 0x1c8(%rax), %xmm0
movq -0x1b0(%rbp), %rax
movss %xmm0, 0x1c8(%rax)
movss -0x1bc(%rbp), %xmm0
movq -0x1b0(%rbp), %rax
movss %xmm0, 0x19c(%rax)
movss -0x1b8(%rbp), %xmm0
movq -0x1b0(%rbp), %rax
movss %xmm0, 0x1a0(%rax)
movss -0x1b4(%rbp), %xmm0
movq -0x1b0(%rbp), %rax
movss %xmm0, 0x1a4(%rax)
leaq -0x1bc(%rbp), %rdi
movq -0x1b0(%rbp), %rsi
addq $0x10, %rsi
callq 0x192a0
jmp 0x5caf3
movl $0x1, -0x24(%rbp)
cvtsi2ssl -0x24(%rbp), %xmm1
movq 0x25a2a(%rip), %rax     # 0x82530
movq (%rax), %rax
movss 0x20(%rax), %xmm0
ucomiss %xmm1, %xmm0
jb 0x5cb64
movq 0x25a3e(%rip), %rax     # 0x82558
movq (%rax), %rax
movslq -0x24(%rbp), %rcx
imulq $0x4a8, %rcx, %rcx      # imm = 0x4A8
addq %rcx, %rax
movq %rax, -0x20(%rbp)
movq -0x20(%rbp), %rax
cmpl $0x0, 0x60(%rax)
je 0x5cb57
movq -0x20(%rbp), %rax
movq 0x58(%rax), %rax
movq 0xf30(%rax), %rax
cmpq -0x8(%rbp), %rax
jne 0x5cb57
movq -0x20(%rbp), %rdi
callq 0x19c30
jmp 0x5cb59
movl -0x24(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x24(%rbp)
jmp 0x5cafa
addq $0x1d0, %rsp            # imm = 0x1D0
popq %rbp
retq
nopl (%rax)