// File: /workspace/github_c_makefile_star2_O2/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 $0x1a8, %rsp            # imm = 0x1A8
movq %rsi, %r14
movq %rdi, %rbx
movq 0x247f3(%rip), %r15     # 0x66da0
movq %rdi, 0x148(%r15)
movq 0x58(%rdi), %rbp
movq 0x10e0(%rbp), %rcx
leaq 0x5(%rcx), %rax
movq %rax, 0x10e0(%rbp)
movl $0x1c2, %eax            # imm = 0x1C2
cmpq $0x1bd, %rcx            # imm = 0x1BD
jg 0x425e8
movq $-0x96, %rax
cmpq $-0x9c, %rcx
jg 0x425ef
movq %rax, 0x10e0(%rbp)
movq 0x10d8(%rbp), %rcx
leaq -0x1(%rcx), %rax
movq %rax, 0x10d8(%rbp)
movl $0xb4, %eax
cmpq $0xb5, %rcx
jg 0x42616
testq %rcx, %rcx
jg 0x4261d
xorl %eax, %eax
movq %rax, 0x10d8(%rbp)
cmpl $0x0, 0x911c(%rbp)
je 0x42632
movq %rbx, %rdi
xorl %esi, %esi
xorl %edx, %edx
callq 0x18ec0
xorl %eax, %eax
callq 0x18160
testl %eax, %eax
je 0x42672
movq 0x58(%rbx), %rax
testb $0x2, 0x1108(%rax)
jne 0x42672
movl $0x4, (%rbp)
movq 0x23fa8(%rip), %rax     # 0x66600
movq %rbx, %rdi
addq $0x1a8, %rsp            # imm = 0x1A8
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 0x42685
jnp 0x426c3
movl $0x4, (%rbp)
cvtss2sd 0x4(%r15), %xmm1
cvtss2sd %xmm0, %xmm0
addsd 0x1327a(%rip), %xmm0    # 0x55918
ucomisd %xmm0, %xmm1
jbe 0x42d69
cmpb $0x0, 0x1(%r14)
jns 0x42d69
movl $0x1, 0xd8(%r15)
jmp 0x42d69
movq 0x2479e(%rip), %rax     # 0x66e68
movq %rbx, (%rax)
movq 0x58(%rbx), %rax
cmpq $0x0, 0xf30(%rax)
je 0x4279f
movd 0x2(%r14), %xmm0
pshuflw $0x60, %xmm0, %xmm0     # xmm0 = xmm0[0,0,2,1,4,5,6,7]
psrad $0x10, %xmm0
cvtdq2pd %xmm0, %xmm0
mulpd 0x130d5(%rip), %xmm0    # 0x557d0
cvtpd2ps %xmm0, %xmm0
movlpd %xmm0, 0xdf8(%rbp)
movswl 0x6(%r14), %eax
cvtsi2sd %eax, %xmm0
mulsd 0x131f8(%rip), %xmm0    # 0x55910
cvtsd2ss %xmm0, %xmm0
movss %xmm0, 0xe00(%rbp)
movl 0xe3c(%rbp), %eax
movl %eax, 0xe40(%rbp)
movzbl 0x1(%r14), %ecx
movl %ecx, 0xe3c(%rbp)
notl %eax
andl %ecx, %eax
orl %eax, 0xe44(%rbp)
movzbl 0xf(%r14), %eax
movl %eax, 0x328(%rbx)
xorl %eax, %eax
callq 0x18160
testl %eax, %eax
jne 0x42b2f
testb $0x1, 0xe44(%rbp)
je 0x42b2f
cmpl $0x0, 0xe04(%rbp)
je 0x42b0a
andl $0x0, 0xe44(%rbp)
cmpq $0x0, 0xf30(%rbp)
je 0x42b27
andq $0x0, 0xf30(%rbp)
andb $-0x41, 0x10(%rbp)
jmp 0x42b2f
leaq 0x20(%rsp), %rdi
movl $0x180, %edx            # imm = 0x180
xorl %esi, %esi
callq 0x188e0
cmpl $0x1, 0x118(%rbx)
jne 0x427bd
pushq $0x1
jmp 0x427d8
cmpl $0xff, 0x28(%rbx)
jne 0x427d6
xorl %eax, %eax
cmpl $0x0, 0x260(%rbx)
setne %al
addl %eax, %eax
jmp 0x427d9
pushq $0x3
popq %rax
movl %eax, (%rbp)
movq 0x247dd(%rip), %rax     # 0x66fc0
movq (%rax), %rax
cvttss2si 0x20(%rax), %eax
movw %ax, 0x12(%rbp)
movups (%rbp), %xmm0
movaps %xmm0, 0x20(%rsp)
movups 0xc(%rbp), %xmm0
movups %xmm0, 0x2c(%rsp)
leaq 0x4(%rbx), %rax
movq %rax, 0x8(%rsp)
xorl %eax, %eax
movss 0xc6e4(%rip), %xmm0     # 0x4eef8
cmpq $0x3, %rax
je 0x42848
movss 0x4(%rbx,%rax,4), %xmm1
mulss %xmm0, %xmm1
cvttss2si %xmm1, %ecx
movw %cx, 0x24(%rsp,%rax,2)
movss 0x1c0(%rbx,%rax,4), %xmm1
mulss %xmm0, %xmm1
cvttss2si %xmm1, %ecx
movw %cx, 0x2a(%rsp,%rax,2)
incq %rax
jmp 0x42814
leaq 0xe08(%rbp), %r12
leaq 0x20(%rsp), %rsi
pushq $0x1c
popq %rdx
movq %r12, %rdi
callq 0x191e0
testl %eax, %eax
je 0x4286b
movl $0x1, 0x4c(%rsp)
movups (%r14), %xmm0
movups %xmm0, 0x3c(%rsp)
movq 0x23f75(%rip), %rax     # 0x667f0
movq %rax, 0x190(%rsp)
movq 0x23d76(%rip), %r15     # 0x66600
movq 0x68(%r15), %rax
movq %rax, 0x198(%rsp)
cmpl $0x2, 0xf40(%rbp)
jne 0x428ae
cmpl $0x31, 0xf5c(%rbp)
jg 0x428ae
andw $0x0, 0x32(%rsp)
leaq 0x20(%rsp), %r13
movq %r13, %rdi
callq *0xa8(%r15)
movups 0xc(%r13), %xmm0
movups %xmm0, 0xc(%rbp)
movaps (%r13), %xmm0
movups %xmm0, (%rbp)
movups 0xc(%r13), %xmm0
movups %xmm0, 0xc(%r12)
movaps (%r13), %xmm0
movups %xmm0, (%r12)
pushq $-0x6
popq %rax
movsd 0x110f1(%rip), %xmm0    # 0x539e0
testq %rax, %rax
je 0x4292b
movswl 0x2a(%rsp,%rax), %ecx
cvtsi2sd %ecx, %xmm1
mulsd %xmm0, %xmm1
cvtsd2ss %xmm1, %xmm1
movss %xmm1, 0x10(%rbx,%rax,2)
movswl 0x30(%rsp,%rax), %ecx
cvtsi2sd %ecx, %xmm1
mulsd %xmm0, %xmm1
cvtsd2ss %xmm1, %xmm1
movss %xmm1, 0x1cc(%rbx,%rax,2)
addq $0x2, %rax
jmp 0x428ef
movups 0x168(%rsp), %xmm0
movups %xmm0, 0xcc(%rbx)
movsd 0x178(%rsp), %xmm0
movsd %xmm0, 0xdc(%rbx)
movd 0x2(%r14), %xmm0
pshuflw $0x60, %xmm0, %xmm0     # xmm0 = xmm0[0,0,2,1,4,5,6,7]
psrad $0x10, %xmm0
cvtdq2pd %xmm0, %xmm0
mulpd 0x12e69(%rip), %xmm0    # 0x557d0
cvtpd2ps %xmm0, %xmm0
movlpd %xmm0, 0xdf8(%rbp)
movswl 0x6(%r14), %eax
cvtsi2sd %eax, %xmm0
mulsd 0x12f8c(%rip), %xmm0    # 0x55910
cvtsd2ss %xmm0, %xmm0
movss %xmm0, 0xe00(%rbp)
cmpq $0x0, 0x2b8(%rbx)
setne %cl
movq 0x180(%rsp), %rax
testq %rax, %rax
sete %dl
andb %cl, %dl
cmpw $0xa, 0x48(%rsp)
setge %sil
movl 0x18c(%rsp), %ecx
testl %ecx, %ecx
sete %dil
andb %sil, %dil
andb %dl, %dil
cmpb $0x1, %dil
jne 0x42a14
movq 0x20(%r15), %r12
leaq 0x121e6(%rip), %rdi     # 0x54bbf
callq *0x48(%r15)
pushq $0x2
popq %rsi
movss 0xc540(%rip), %xmm0     # 0x4ef28
xorps %xmm2, %xmm2
movq %rbx, %rdi
movl %eax, %edx
movaps %xmm0, %xmm1
callq *%r12
movq %rbx, %rdi
movq 0x8(%rsp), %rsi
xorl %edx, %edx
callq 0x19010
movl 0x18c(%rsp), %ecx
movq 0x180(%rsp), %rax
cvttss2si 0x164(%rsp), %edx
movl %edx, 0x278(%rbx)
movl %ecx, 0x30c(%rbx)
movl 0x188(%rsp), %ecx
movl %ecx, 0x308(%rbx)
movq %rax, 0x2b8(%rbx)
testq %rax, %rax
je 0x42a4b
movl 0x64(%rax), %eax
movl %eax, 0x2c0(%rbx)
cmpl $0x0, 0x260(%rbx)
je 0x42a6d
movl $0xc1700000, 0x1c(%rbp) # imm = 0xC1700000
movss 0xe74(%rbp), %xmm0
movss 0xf1bd(%rip), %xmm1     # 0x51c28
jmp 0x42a98
movsd 0x158(%rsp), %xmm0
movsd %xmm0, 0xebc(%rbp)
movss 0x160(%rsp), %xmm1
movss %xmm1, 0xec4(%rbp)
movss %xmm0, 0x1c(%rbp)
shufps $0x55, %xmm0, %xmm0     # xmm0 = xmm0[1,1,1,1]
movss %xmm0, 0x20(%rbp)
movss %xmm1, 0x24(%rbp)
movq %rbx, %rdi
callq *0x90(%r15)
cmpl $0x1, 0x118(%rbx)
je 0x42abd
movq %rbx, %rdi
callq 0x19380
xorl %r15d, %r15d
movslq 0x50(%rsp), %rax
cmpq %rax, %r15
jge 0x42724
movq 0x58(%rsp,%r15,8), %rdi
xorl %eax, %eax
cmpq %rax, %r15
je 0x42ae6
cmpq %rdi, 0x58(%rsp,%rax,8)
je 0x42ae9
incq %rax
jmp 0x42ad5
movq %r15, %rax
movl %eax, %eax
cmpq %r15, %rax
jne 0x42b05
movq 0x220(%rdi), %rax
testq %rax, %rax
je 0x42b05
movq %rbx, %rsi
xorl %edx, %edx
xorl %ecx, %ecx
callq *%rax
incq %r15
jmp 0x42ac0
cmpl $0x0, 0xe48(%rbp)
jne 0x42b2f
movl $0x1, 0xe48(%rbp)
movq %rbx, %rdi
callq 0x19750
jmp 0x42b2f
movq %rbx, %rdi
callq 0x195b0
cmpl $0x0, 0xe04(%rbp)
je 0x42be4
movl 0x1100(%rbp), %eax
cmpl $-0x3, %eax
jne 0x42b60
pushq $0x1
popq %rdi
movq %rbx, %rsi
callq 0x198f0
testl %eax, %eax
je 0x42cf7
movl 0x1100(%rbp), %eax
cmpl $-0x2, %eax
jne 0x42b7e
pushq $0x2
popq %rdi
movq %rbx, %rsi
callq 0x198f0
testl %eax, %eax
je 0x42cf7
movl 0x1100(%rbp), %eax
cmpl $-0x2, %eax
je 0x42cda
cmpl $-0x3, %eax
jne 0x42bad
movq 0xf30(%rbp), %rax
testq %rax, %rax
je 0x42d61
movq 0x58(%rax), %rax
cmpl $0x1, 0x1100(%rax)
jne 0x42cf7
cmpw $0xa, 0xc(%r14)
movb 0x10(%rbp), %al
jl 0x42d04
testb $0x2, %al
jne 0x42d09
orb $0x2, %al
movb %al, 0x10(%rbp)
cmpq $0x0, 0xf30(%rbp)
je 0x42d7b
movq %rbx, %rdi
callq 0x19730
jmp 0x42d09
movq %rbx, %rdi
callq 0x18150
testq %rax, %rax
je 0x42d09
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 0x14(%rsp), %r15
movq %r15, %rsi
callq 0x189d0
movss 0xc2d1(%rip), %xmm0     # 0x4ef00
movq %r15, %rdi
movq %r15, %rsi
callq 0x18a70
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)
movss 0x1c8(%rbx), %xmm2
movss %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 0x19240
jmp 0x42d09
movq 0xf30(%rbp), %rax
testq %rax, %rax
je 0x42d61
movq 0x58(%rax), %rax
cmpl $0x2, 0x1100(%rax)
je 0x42bad
pushq $-0x1
popq %rsi
movq %rbx, %rdi
callq 0x19860
jmp 0x42d69
andb $-0x3, %al
movb %al, 0x10(%rbp)
pushq $0x1
popq %rbp
movq 0x2381d(%rip), %r14     # 0x66530
movq (%r14), %rax
movl $0x4a8, %r15d           # imm = 0x4A8
movq 0x23835(%rip), %r12     # 0x66558
cvtsi2ss %ebp, %xmm0
movss 0x20(%rax), %xmm1
ucomiss %xmm0, %xmm1
jb 0x42d69
movq (%r12), %rdi
cmpl $0x0, 0x60(%rdi,%r15)
je 0x42d56
movq 0x58(%rdi,%r15), %rcx
cmpq %rbx, 0xf30(%rcx)
jne 0x42d56
addq %r15, %rdi
callq 0x19ba0
movq (%r14), %rax
addq $0x4a8, %r15            # imm = 0x4A8
incl %ebp
jmp 0x42d23
movq %rbx, %rdi
callq 0x195b0
addq $0x1a8, %rsp            # imm = 0x1A8
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movq %rbx, %rdi
callq 0x195b0
jmp 0x42d09