// File: /workspace/github_c_makefile_star2_O1/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
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x198, %rsp            # imm = 0x198
movq %rsi, %r14
movq %rdi, %rbx
movq 0x230d0(%rip), %r15     # 0x69da0
movq %rdi, 0x148(%r15)
movq 0x58(%rdi), %r12
movq 0x10d8(%r12), %rax
movq 0x10e0(%r12), %rcx
cmpq $-0x9a, %rcx
movq $-0x9b, %rdx
cmovgeq %rcx, %rdx
addq $0x5, %rdx
cmpq $0x1be, %rcx            # imm = 0x1BE
movl $0x1c2, %ecx            # imm = 0x1C2
cmovlq %rdx, %rcx
cmpq $0x2, %rax
movl $0x1, %edx
cmovgeq %rax, %rdx
decq %rdx
cmpq $0xb6, %rax
movl $0xb4, %eax
cmovlq %rdx, %rax
movq %rcx, 0x10e0(%r12)
movq %rax, 0x10d8(%r12)
cmpl $0x0, 0x911c(%r12)
je 0x46d57
movq %rbx, %rdi
xorl %esi, %esi
xorl %edx, %edx
callq 0x18da0
xorl %eax, %eax
callq 0x18160
testl %eax, %eax
je 0x46d98
movq 0x58(%rbx), %rax
testb $0x2, 0x1108(%rax)
jne 0x46d98
movl $0x4, (%r12)
movq 0x22882(%rip), %rax     # 0x69600
movq %rbx, %rdi
addq $0x198, %rsp            # imm = 0x198
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
jmpq *0x90(%rax)
movss 0xc8(%r15), %xmm0
xorps %xmm1, %xmm1
ucomiss %xmm1, %xmm0
jne 0x46dab
jnp 0x46ded
movl $0x4, (%r12)
xorps %xmm1, %xmm1
cvtss2sd 0x4(%r15), %xmm1
cvtss2sd %xmm0, %xmm0
addsd 0x13888(%rip), %xmm0    # 0x5a650
ucomisd %xmm0, %xmm1
jbe 0x4758f
cmpb $0x0, 0x1(%r14)
jns 0x4758f
movl $0x1, 0xd8(%r15)
jmp 0x4758f
movq 0x23074(%rip), %rax     # 0x69e68
movq %rbx, (%rax)
movq 0x58(%rbx), %rax
cmpq $0x0, 0xf30(%rax)
je 0x46e6c
movswl 0x2(%r14), %eax
xorps %xmm0, %xmm0
cvtsi2sd %eax, %xmm0
movsd 0x1382f(%rip), %xmm1    # 0x5a648
mulsd %xmm1, %xmm0
cvtsd2ss %xmm0, %xmm0
movss %xmm0, 0xdf8(%r12)
movswl 0x4(%r14), %eax
xorps %xmm0, %xmm0
cvtsi2sd %eax, %xmm0
mulsd %xmm1, %xmm0
cvtsd2ss %xmm0, %xmm0
movss %xmm0, 0xdfc(%r12)
movswl 0x6(%r14), %eax
xorps %xmm0, %xmm0
cvtsi2sd %eax, %xmm0
mulsd %xmm1, %xmm0
cvtsd2ss %xmm0, %xmm0
movss %xmm0, 0xe00(%r12)
jmp 0x4727f
movq %rsp, %rdi
movl $0x180, %edx            # imm = 0x180
xorl %esi, %esi
callq 0x18880
movl $0x1, %eax
cmpl $0x1, 0x118(%rbx)
je 0x46ea5
movl $0x3, %eax
cmpl $0xff, 0x28(%rbx)
jne 0x46ea5
xorl %eax, %eax
cmpl $0x0, 0x260(%rbx)
setne %al
addl %eax, %eax
movl %eax, (%r12)
movq 0x23110(%rip), %rax     # 0x69fc0
movq (%rax), %rax
cvttss2si 0x20(%rax), %eax
movw %ax, 0x12(%r12)
movups (%r12), %xmm0
movaps %xmm0, (%rsp)
movups 0xc(%r12), %xmm0
movups %xmm0, 0xc(%rsp)
xorl %eax, %eax
movss 0xd01c(%rip), %xmm0     # 0x53ef8
movss 0x4(%rbx,%rax,4), %xmm1
mulss %xmm0, %xmm1
cvttss2si %xmm1, %ecx
movw %cx, 0x4(%rsp,%rax,2)
movss 0x1c0(%rbx,%rax,4), %xmm1
mulss %xmm0, %xmm1
cvttss2si %xmm1, %ecx
movw %cx, 0xa(%rsp,%rax,2)
incq %rax
cmpq $0x3, %rax
jne 0x46edc
movdqu 0xe08(%r12), %xmm0
movdqu 0xe14(%r12), %xmm1
movdqu 0xc(%rsp), %xmm2
pcmpeqb (%rsp), %xmm0
pcmpeqb %xmm1, %xmm2
pand %xmm2, %xmm0
pmovmskb %xmm0, %eax
cmpl $0xffff, %eax           # imm = 0xFFFF
je 0x46f48
movl $0x1, 0x2c(%rsp)
leaq 0xe08(%r12), %rbp
movups (%r14), %xmm0
movups %xmm0, 0x1c(%rsp)
movq 0x22890(%rip), %rax     # 0x697f0
movq %rax, 0x170(%rsp)
movq 0x22691(%rip), %r13     # 0x69600
movq 0x68(%r13), %rax
movq %rax, 0x178(%rsp)
cmpl $0x2, 0xf40(%r12)
jne 0x46f98
cmpl $0x31, 0xf5c(%r12)
jg 0x46f98
movw $0x0, 0x12(%rsp)
movq %rsp, %r15
movq %r15, %rdi
callq *0xa8(%r13)
movups 0xc(%r15), %xmm0
movups %xmm0, 0xc(%r12)
movaps (%r15), %xmm0
movups %xmm0, (%r12)
movups 0xc(%r15), %xmm0
movups %xmm0, 0xc(%rbp)
movaps (%r15), %xmm0
movups %xmm0, (%rbp)
movq $-0x3, %rax
movsd 0x11817(%rip), %xmm0    # 0x587f0
movswl 0xa(%rsp,%rax,2), %ecx
xorps %xmm1, %xmm1
cvtsi2sd %ecx, %xmm1
mulsd %xmm0, %xmm1
cvtsd2ss %xmm1, %xmm1
movss %xmm1, 0x10(%rbx,%rax,4)
movswl 0x10(%rsp,%rax,2), %ecx
xorps %xmm1, %xmm1
cvtsi2sd %ecx, %xmm1
mulsd %xmm0, %xmm1
cvtsd2ss %xmm1, %xmm1
movss %xmm1, 0x1cc(%rbx,%rax,4)
incq %rax
jne 0x46fd9
movss 0x148(%rsp), %xmm0
movss %xmm0, 0xcc(%rbx)
movss 0x14c(%rsp), %xmm0
movss %xmm0, 0xd0(%rbx)
movss 0x150(%rsp), %xmm0
movss %xmm0, 0xd4(%rbx)
movss 0x154(%rsp), %xmm0
movss %xmm0, 0xd8(%rbx)
movss 0x158(%rsp), %xmm0
movss %xmm0, 0xdc(%rbx)
movss 0x15c(%rsp), %xmm0
movss %xmm0, 0xe0(%rbx)
movswl 0x2(%r14), %eax
xorps %xmm0, %xmm0
cvtsi2sd %eax, %xmm0
movsd 0x135b9(%rip), %xmm1    # 0x5a648
mulsd %xmm1, %xmm0
cvtsd2ss %xmm0, %xmm0
movss %xmm0, 0xdf8(%r12)
movswl 0x4(%r14), %eax
xorps %xmm0, %xmm0
cvtsi2sd %eax, %xmm0
mulsd %xmm1, %xmm0
cvtsd2ss %xmm0, %xmm0
movss %xmm0, 0xdfc(%r12)
movswl 0x6(%r14), %eax
xorps %xmm0, %xmm0
cvtsi2sd %eax, %xmm0
mulsd %xmm1, %xmm0
cvtsd2ss %xmm0, %xmm0
movss %xmm0, 0xe00(%r12)
cmpq $0x0, 0x2b8(%rbx)
je 0x4713d
cmpq $0x0, 0x160(%rsp)
jne 0x4713d
cmpw $0xa, 0x28(%rsp)
jl 0x4713d
cmpl $0x0, 0x16c(%rsp)
jne 0x4713d
movq 0x20(%r13), %r15
leaq 0x128bc(%rip), %rdi     # 0x599cb
callq *0x48(%r13)
movss 0xce0d(%rip), %xmm0     # 0x53f28
pxor %xmm2, %xmm2
movq %rbx, %rdi
movl $0x2, %esi
movl %eax, %edx
movaps %xmm0, %xmm1
callq *%r15
leaq 0x4(%rbx), %rsi
movq %rbx, %rdi
xorl %edx, %edx
callq 0x18ef0
cvttss2si 0x144(%rsp), %eax
movl %eax, 0x278(%rbx)
movl 0x16c(%rsp), %eax
movl %eax, 0x30c(%rbx)
movl 0x168(%rsp), %eax
movl %eax, 0x308(%rbx)
movq 0x160(%rsp), %rax
movq %rax, 0x2b8(%rbx)
testq %rax, %rax
je 0x47183
movl 0x64(%rax), %eax
movl %eax, 0x2c0(%rbx)
cmpl $0x0, 0x260(%rbx)
je 0x471af
movl $0x42200000, 0x24(%r12) # imm = 0x42200000
movl $0xc1700000, 0x1c(%r12) # imm = 0xC1700000
movss 0xe74(%r12), %xmm0
movl $0x20, %eax
jmp 0x4720d
movss 0x138(%rsp), %xmm0
movss %xmm0, 0xebc(%r12)
movss 0x13c(%rsp), %xmm1
movss %xmm1, 0xec0(%r12)
movss 0x140(%rsp), %xmm1
movss %xmm1, 0xec4(%r12)
movss %xmm0, 0x1c(%r12)
movss 0x13c(%rsp), %xmm0
movss %xmm0, 0x20(%r12)
movl $0x24, %eax
movss 0x140(%rsp), %xmm0
movss %xmm0, (%r12,%rax)
movq %rbx, %rdi
callq *0x90(%r13)
cmpl $0x1, 0x118(%rbx)
je 0x4722e
movq %rbx, %rdi
callq 0x19200
cmpl $0x0, 0x30(%rsp)
jle 0x4727f
xorl %r15d, %r15d
movq 0x38(%rsp,%r15,8), %rdi
xorl %eax, %eax
testq %r15, %r15
je 0x47258
cmpq %rdi, 0x38(%rsp,%rax,8)
je 0x47256
incq %rax
cmpq %rax, %r15
jne 0x47244
movq %r15, %rax
movl %eax, %eax
cmpq %r15, %rax
jne 0x47272
movq 0x220(%rdi), %rax
testq %rax, %rax
je 0x47272
movq %rbx, %rsi
xorl %edx, %edx
xorl %ecx, %ecx
callq *%rax
incq %r15
movslq 0x30(%rsp), %rax
cmpq %rax, %r15
jl 0x47238
movl 0xe3c(%r12), %eax
movl %eax, 0xe40(%r12)
movzbl 0x1(%r14), %ecx
movl %ecx, 0xe3c(%r12)
notl %eax
andl %ecx, %eax
orl %eax, 0xe44(%r12)
movzbl 0xf(%r14), %eax
movl %eax, 0x328(%rbx)
xorl %eax, %eax
callq 0x18160
testl %eax, %eax
jne 0x47328
testb $0x1, 0xe44(%r12)
je 0x47328
cmpl $0x0, 0xe04(%r12)
je 0x472ff
movl $0x0, 0xe44(%r12)
cmpq $0x0, 0xf30(%r12)
je 0x47320
movq $0x0, 0xf30(%r12)
andb $-0x41, 0x10(%r12)
jmp 0x47328
cmpl $0x0, 0xe48(%r12)
jne 0x47328
movl $0x1, 0xe48(%r12)
movq %rbx, %rdi
callq 0x19590
jmp 0x47328
movq %rbx, %rdi
callq 0x19400
cmpl $0x0, 0xe04(%r12)
je 0x473eb
cmpl $-0x3, 0x1100(%r12)
jne 0x47357
movl $0x1, %edi
movq %rbx, %rsi
callq 0x19730
testl %eax, %eax
je 0x47506
cmpl $-0x2, 0x1100(%r12)
jne 0x47377
movl $0x2, %edi
movq %rbx, %rsi
callq 0x19730
testl %eax, %eax
je 0x47506
movl 0x1100(%r12), %eax
cmpl $-0x2, %eax
je 0x474e4
cmpl $-0x3, %eax
jne 0x473af
movq 0xf30(%r12), %rax
testq %rax, %rax
je 0x47587
movq 0x58(%rax), %rax
cmpl $0x1, 0x1100(%rax)
jne 0x47506
cmpw $0xa, 0xc(%r14)
movb 0x10(%r12), %al
jl 0x47515
testb $0x2, %al
jne 0x4751c
orb $0x2, %al
movb %al, 0x10(%r12)
cmpq $0x0, 0xf30(%r12)
je 0x475a1
movq %rbx, %rdi
callq 0x19570
jmp 0x4751c
movq %rbx, %rdi
callq 0x18150
testq %rax, %rax
je 0x4751c
movq %rax, %r14
movss 0x4(%rbx), %xmm0
movss %xmm0, 0x4(%rax)
movss 0x8(%rbx), %xmm0
movss %xmm0, 0x8(%rax)
movss 0xc(%rbx), %xmm0
movss %xmm0, 0xc(%rax)
leaq 0x10(%rbx), %rdi
leaq 0x18c(%rsp), %r15
movq %r15, %rsi
callq 0x18950
movss 0xcac7(%rip), %xmm0     # 0x53f00
movq %r15, %rdi
movq %r15, %rsi
callq 0x189d0
movss (%r15), %xmm0
movss 0x4(%r14), %xmm1
movss 0x8(%r14), %xmm2
subss %xmm0, %xmm1
movss %xmm1, 0x4(%r14)
movss 0x4(%r15), %xmm1
subss %xmm1, %xmm2
movss %xmm2, 0x8(%r14)
movss 0xc(%r14), %xmm2
movss 0x8(%r15), %xmm3
subss %xmm3, %xmm2
movss %xmm2, 0xc(%r14)
movss 0x1c0(%rbx), %xmm2
movss %xmm2, 0x1c0(%r14)
movss 0x1c4(%rbx), %xmm2
movss %xmm2, 0x1c4(%r14)
movd 0x1c8(%rbx), %xmm2
movd %xmm2, 0x1c8(%r14)
movss %xmm0, 0x19c(%r14)
movss %xmm1, 0x1a0(%r14)
movss %xmm3, 0x1a4(%r14)
addq $0x10, %r14
movq %r15, %rdi
movq %r14, %rsi
callq 0x190d0
jmp 0x4751c
movq 0xf30(%r12), %rax
testq %rax, %rax
je 0x47587
movq 0x58(%rax), %rax
cmpl $0x2, 0x1100(%rax)
je 0x473af
movq %rbx, %rdi
movl $0xffffffff, %esi       # imm = 0xFFFFFFFF
callq 0x196a0
jmp 0x4758f
andb $-0x3, %al
movb %al, 0x10(%r12)
movq 0x2200d(%rip), %r14     # 0x69530
movq (%r14), %rax
movss 0x20(%rax), %xmm0
ucomiss 0xc9f6(%rip), %xmm0     # 0x53f28
jb 0x4758f
movl $0x4a8, %r15d           # imm = 0x4A8
movl $0x2, %ebp
movq 0x22012(%rip), %r12     # 0x69558
movq (%r12), %rdi
cmpl $0x0, 0x60(%rdi,%r15)
je 0x47568
movq 0x58(%rdi,%r15), %rax
cmpq %rbx, 0xf30(%rax)
jne 0x47568
addq %r15, %rdi
callq 0x199d0
xorps %xmm0, %xmm0
cvtsi2ss %ebp, %xmm0
movq (%r14), %rax
movss 0x20(%rax), %xmm1
addq $0x4a8, %r15            # imm = 0x4A8
incl %ebp
ucomiss %xmm0, %xmm1
jae 0x47546
jmp 0x4758f
movq %rbx, %rdi
callq 0x19400
addq $0x198, %rsp            # imm = 0x198
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movq %rbx, %rdi
callq 0x19400
jmp 0x4751c