// File: /workspace/github_c_makefile_star2_O1/QwazyWabbitWOS[P]lmctf60/p_client.c
// Function: player_die
void player_die (edict_t *self, edict_t *inflictor, edict_t *attacker, int damage, vec3_t point)
{
	int		n;
	edict_t	*attacker_flag=NULL, *defender_flag=NULL;  // CTF CODE -- LM_JORM
	// int		teamnum;// CTF CODE -- LM_JORM
	vec3_t	dir;	// CTF CODE -- LM_JORM
	vec_t dist1, dist2;	// CTF CODE -- LM_JORM
	char	*flagcolor = NULL;	// CTF CODE -- LM_JORM
	char message[MAX_INFO_STRING];
	// MJD Uninitialized - Caught but Fixed
	
	
	// CTF CODE -- LM_JORM
	
	// CTF bonuses for kills
	
	//self has just died.  was self interesting in some way?
	ctf_validateflags();
	
	//stats_add(self, STATS_DEATHS, 1); // STATS - LM_Hati
	
	//first, make sure self and attacker were valid players
	if (ctf_validateplayer(attacker, CTF_TEAM_ANYTEAM) &&
		ctf_validateplayer(self,CTF_TEAM_ANYTEAM) &&
		self != attacker &&				// Can't get bonus on suicides
		(self->deadflag != DEAD_DEAD) ) //and victim not already dead
	{
		if (! OnSameTeam(attacker, self)) //must be different teams
		{
			// Find attacker's flag
			if (attacker->client->ctf.teamnum == CTF_TEAM_RED)  // Red
			{
				attacker_flag = redflag;
				defender_flag = blueflag;
			}
			else //must be blue
			{
				attacker_flag = blueflag;
				defender_flag = redflag;
			}
			
			if ( attacker_flag && !(ctf_validateplayer(attacker_flag->owner, CTF_TEAM_ANYTEAM)) ) //attacker's flag was not in anyone's posession
			{
				//so it's either at home, or lying around
				// 			if (FlagCompare (attacker_flag->homeposition, attacker_flag->s.origin))
				if (ctf_flagathome(attacker_flag))
				{
					// Flag at home
					
					VectorSubtract (attacker->s.origin, attacker_flag->s.origin, dir);
					dist1 = VectorLength(dir); //if this is small, i'm close to my flag
					
					VectorSubtract (self->s.origin, attacker_flag->s.origin, dir);
					dist2 = VectorLength(dir); //if this is small, deadguy was near my flag
					
					//surt duh, this was using | not ||
					if ((dist1 < CTF_DEFEND_FLAG_RADIUS) || (dist2 < CTF_DEFEND_FLAG_RADIUS)) // was 512  MJD Added parens
					{
						switch (attacker->client->ctf.teamnum)
						{
						case CTF_TEAM_RED: flagcolor = "red"; break;
						case CTF_TEAM_BLUE: flagcolor = "blue"; break;
						}
						sprintf(message, "%s defends the %s flag.\n",
								attacker->client->pers.netname,
								flagcolor );
						ctf_BSafePrint(PRINT_HIGH, message);
						attacker->client->resp.score += 2;
						stats_add(attacker, STATS_SCORE, 2);
						attacker->client->defend_flag_time = level.time;
						
						stats_add(attacker, STATS_DEFENSE_FLAG, 1); // STATS - LM_Hati
						// STDLog Flag Defense - Surt
						sl_LogScore( &gi,
									 attacker->client->pers.netname,
									 NULL,
									 "F Def",
									 NULL,
									 2, //surt fixme symbolic
									 level.time );
					}
				}
				else // Flag is lying around, do we get credit for defending the base?
				{
					// Defend the Base
					VectorSubtract (attacker->s.origin, attacker_flag->homeposition, dir);
					dist1 = VectorLength(dir); //attacker was near his pedastal
					
					VectorSubtract (self->s.origin, attacker_flag->homeposition, dir);
					dist2 = VectorLength(dir); //dead guy was in attacker's base
					
					//surt duh, this was using | not ||
					if ((dist1 < CTF_DEFEND_BASE_RADIUS) || (dist2 < CTF_DEFEND_BASE_RADIUS)) // was 512  MJD Added Parens
					{
						switch (attacker->client->ctf.teamnum)
						{
						case CTF_TEAM_RED: flagcolor = "red"; break;
						case CTF_TEAM_BLUE: flagcolor = "blue"; break;
						}
						sprintf(message, "%s defends the %s base.\n",
								attacker->client->pers.netname,
								flagcolor );
						ctf_BSafePrint(PRINT_HIGH, message);
						attacker->client->resp.score += 1;
						stats_add(attacker, STATS_SCORE, 1);
						
						stats_add(attacker, STATS_DEFENSE_BASE, 1); // STATS - LM_Hati
						// Log Flag Defense - MarkDavies
						sl_LogScore( &gi,
									 attacker->client->pers.netname,
									 NULL,
									 "F Base Def",
									 NULL,
									 1, //surt fixme symbolic
									 level.time );
					}
					
					// Defend the Away Flag
					VectorSubtract (attacker->s.origin, attacker_flag->s.origin, dir);
					dist1 = VectorLength(dir); //i was standing near my flag, which was not at base
					
					VectorSubtract (self->s.origin, attacker_flag->s.origin, dir);
					dist2 = VectorLength(dir); //deadguy was standing near my flag, which was not at base
					
					//surt duh, this was using | not ||
					if ((dist1 < CTF_DEFEND_REMOTE_RADIUS) || (dist2 < CTF_DEFEND_REMOTE_RADIUS)) // was 512	MJD Added Parens
					{
						attacker->client->defend_flag_time = level.time;
					}
					
				}
				
				//is the dead guy's flag in someone's posession?
				//if so, then potentially attacker was defending his flag carrier
				//but not if the dead guy's flag owner is us.
				if ( (ctf_validateplayer(defender_flag->owner, CTF_TEAM_ANYTEAM) ) &&
					 (defender_flag->owner != attacker) ) // We can't defend ourselves
				{
					
					if (level.time < self->client->hit_carrier_time + 2) //dead guy recently hit carrier
					{
						switch (attacker->client->ctf.teamnum)
						{
						case CTF_TEAM_RED: flagcolor = "red"; break;
						case CTF_TEAM_BLUE: flagcolor = "blue"; break;
						}
						sprintf(message, "%s defends the %s flag carrier from an aggressive enemy.\n",
								attacker->client->pers.netname,
								flagcolor );
						ctf_BSafePrint(PRINT_HIGH, message);
						attacker->client->resp.score += 3;
						stats_add(attacker, STATS_SCORE, 3);
						
						// STDLog Flag Danger Carrier Protect Frag - Surt
						sl_LogScore( &gi,
									 attacker->client->pers.netname,
									 NULL,
									 "FC Def",
									 NULL,
									 3, //value of this event FIXME symbolic surt
									 level.time );
						
						
						stats_add(attacker, STATS_DEFENSE_CARRIER, 1); // STATS - LM_Hati
					}
					else
					{
						dist1 = 0;
						dist2 = 0;
						
						VectorSubtract (attacker->s.origin, defender_flag->owner->s.origin, dir); //i'm standing near the carrier of the dead guy's flag
						dist1 = VectorLength(dir);
						
						VectorSubtract (self->s.origin, defender_flag->owner->s.origin, dir); //dead guy near my flag carrier
						dist2 = VectorLength(dir);
						
						if ((dist1 < CTF_DEFEND_CARRIER_RADIUS) || (dist2 < CTF_DEFEND_CARRIER_RADIUS)) //MJD Added Parens
						{
							switch (attacker->client->ctf.teamnum)
							{
							case CTF_TEAM_RED: flagcolor = "red"; break;
							case CTF_TEAM_BLUE: flagcolor = "blue"; break;
							}
							sprintf(message, "%s defends the %s flag carrier.\n",
									attacker->client->pers.netname,
									flagcolor );
							ctf_BSafePrint(PRINT_HIGH, message);
							attacker->client->resp.score += 2;
							stats_add(attacker, STATS_SCORE, 2);
							
							stats_add(attacker, STATS_DEFENSE_CARRIER, 1); // STATS - LM_Hati
							// STDLog Flag Carrier Protect Frag - Surt
							sl_LogScore( &gi,
										 attacker->client->pers.netname,
										 NULL,
										 "FC Def",
										 NULL,
										 2,
										 level.time );
						}
					}
				}
			}
		}
		
		// was the dead player the flag carrier?
		defender_flag = ClientHasFlag(self);
		if (defender_flag) //surt to avoid compiler warns on linux/solaris (assignment in conditional)
		{
			if (attacker->client->ctf.teamnum != self->client->ctf.teamnum) //implicit attacker != self
			{
				sprintf(message, "%s killed the enemy flag carrier.\n", attacker->client->pers.netname);
				ctf_BSafePrint(PRINT_HIGH, message);
				attacker->client->resp.score += 2;
				stats_add(attacker, STATS_SCORE, 2);
				attacker->client->kill_carrier_time = level.time;
				
				// STDLog Flag Carrier Frag - Surt
				sl_LogScore( &gi,
							 attacker->client->pers.netname,
							 NULL,
							 "FC Frag",
							 NULL,
							 2, //value of this event FIXME we need to make these symbolic surt
							 level.time );
				
				stats_add(attacker, STATS_OFFENSE_CARRIER, 1); // STATS - LM_Hati
			}
		}
		
		
	}
	 
	if (self->client->hook)
	{
		G_FreeEdict (self->client->hook);
		self->client->hook = NULL;
	}
	if (self->client->rune && self->client->rune->item)
	{
		Drop_Rune(self, self->client->rune->item);
	}
	 
	self->s.renderfx = 0;
	self->s.effects = 0;
	 
	 
	//surt regardless of whether everybody was valid players, if self had the flag, better drop it!
	defender_flag = ClientHasFlag(self);
	if (defender_flag) //surt to avoid compiler warns on linux/solaris (assignment in conditional)
	{
		ctf_playerdropflag(self, defender_flag->item);
	}
	 
	// END CTF CODE -- LM_JORM
	 
	 

	VectorClear (self->avelocity);

	self->takedamage = DAMAGE_YES;
	self->movetype = MOVETYPE_TOSS;

	self->s.modelindex2 = 0;	// remove linked weapon model

	self->s.angles[0] = 0;
	self->s.angles[2] = 0;

	self->s.sound = 0;
	self->client->weapon_sound = 0;

	self->maxs[2] = -8;

//	self->solid = SOLID_NOT;
	self->svflags |= SVF_DEADMONSTER;

	if (!self->deadflag)
	{
		self->client->respawn_time = level.time + 1.0;
		LookAtKiller (self, inflictor, attacker);
		self->client->ps.pmove.pm_type = PM_DEAD;
		ClientObituary (self, inflictor, attacker);
		
		//-bat added this for stdlogging.
		sl_WriteStdLogDeath( &gi, level, self, inflictor, attacker);
		
		TossClientWeapon (self);
		if (deathmatch->value)
			Cmd_Help_f (self);		// show scores

		// clear inventory
		// this is kind of ugly, but it's how we want to handle keys in coop
		for (n = 0; n < game.num_items; n++)
		{
			if (coop->value && itemlist[n].flags & IT_KEY)
				self->client->resp.coop_respawn.inventory[n] = self->client->pers.inventory[n];
			self->client->pers.inventory[n] = 0;
		}
	}

	// remove powerups
	self->client->quad_framenum = 0;
	self->client->invincible_framenum = 0;
	self->client->breather_framenum = 0;
	self->client->enviro_framenum = 0;
	self->flags &= ~FL_POWER_ARMOR;

	if (self->health < -40)
	{	// gib
		gi.sound (self, CHAN_BODY, gi.soundindex ("misc/udeath.wav"), 1, ATTN_NORM, 0);
		for (n= 0; n < 4; n++)
			ThrowGib (self, "models/objects/gibs/sm_meat/tris.md2", damage, GIB_ORGANIC);
		ThrowClientHead (self, damage);

		self->takedamage = DAMAGE_NO;
	}
	else
	{	// normal death
		if (!self->deadflag)
		{
			static int i;

			i = (i+1)%3;
			// start a death animation
			self->client->anim_priority = ANIM_DEATH;
			if (self->client->ps.pmove.pm_flags & PMF_DUCKED)
			{
				self->s.frame = FRAME_crdeath1-1;
				self->client->anim_end = FRAME_crdeath5;
			}
			else switch (i)
			{
			case 0:
				self->s.frame = FRAME_death101-1;
				self->client->anim_end = FRAME_death106;
				break;
			case 1:
				self->s.frame = FRAME_death201-1;
				self->client->anim_end = FRAME_death206;
				break;
			case 2:
				self->s.frame = FRAME_death301-1;
				self->client->anim_end = FRAME_death308;
				break;
			}
			gi.sound (self, CHAN_VOICE, gi.soundindex(va("*death%i.wav", (rand()%4)+1)), 1, ATTN_NORM, 0);
		}
	}

	self->deadflag = DEAD_DEAD;

	gi.linkentity (self);
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x388, %rsp            # imm = 0x388
movl %ecx, %ebp
movq %rdx, %r14
movq %rsi, %r15
movq %rdi, %rbx
xorl %eax, %eax
callq 0x18590
movq %r14, %rdi
movl $0xfffffffb, %esi       # imm = 0xFFFFFFFB
callq 0x18ce0
testl %eax, %eax
je 0x43bb7
movq %rbx, %rdi
movl $0xfffffffb, %esi       # imm = 0xFFFFFFFB
callq 0x18ce0
cmpq %r14, %rbx
je 0x43bb7
testl %eax, %eax
je 0x43bb7
cmpl $0x2, 0x260(%rbx)
je 0x43bb7
movq %r14, %rdi
movq %rbx, %rsi
callq 0x18700
testl %eax, %eax
je 0x43e87
movq %rbx, %rdi
callq 0x18150
testq %rax, %rax
je 0x43bb7
movq 0x58(%r14), %rdx
movl 0x1100(%rdx), %eax
movq 0x58(%rbx), %rcx
cmpl 0x1100(%rcx), %eax
je 0x43bb7
movl $0x2c0, %r13d           # imm = 0x2C0
addq %r13, %rdx
leaq 0x17545(%rip), %rsi     # 0x5b075
leaq 0x180(%rsp), %r12
movq %r12, %rdi
xorl %eax, %eax
callq 0x19700
movl $0x2, %edi
movq %r12, %rsi
callq 0x19270
movq 0x58(%r14), %rax
addl $0x2, 0xdf4(%rax)
movl $0x2, %edx
movq %r14, %rdi
movl $0x3, %esi
callq 0x19330
movq 0x2622d(%rip), %rax     # 0x69da0
movss 0x4(%rax), %xmm0
movq 0x58(%r14), %rsi
movss %xmm0, 0x10f4(%rsi)
addq %r13, %rsi
movq 0x25a72(%rip), %rdi     # 0x69600
leaq 0x17503(%rip), %rcx     # 0x5b098
xorl %edx, %edx
xorl %r8d, %r8d
movl $0x2, %r9d
callq 0x18e90
movl $0x1, %edx
movq %r14, %rdi
movl $0xd, %esi
callq 0x19330
movq 0x58(%rbx), %rax
movq 0xf60(%rax), %rdi
testq %rdi, %rdi
je 0x43bdb
callq 0x19a60
movq 0x58(%rbx), %rax
movq $0x0, 0xf60(%rax)
movq 0x58(%rbx), %rax
movq 0xf68(%rax), %rax
testq %rax, %rax
je 0x43bff
movq 0x330(%rax), %rsi
testq %rsi, %rsi
je 0x43bff
movq %rbx, %rdi
callq 0x19950
movq $0x0, 0x40(%rbx)
movq %rbx, %rdi
callq 0x18150
testq %rax, %rax
je 0x43c23
movq 0x330(%rax), %rsi
movq %rbx, %rdi
callq 0x19830
xorl %ecx, %ecx
movl %ecx, 0x1d4(%rbx)
movq $0x0, 0x1cc(%rbx)
movl $0x1, 0x27c(%rbx)
movl $0x7, 0x118(%rbx)
movl %ecx, 0x2c(%rbx)
movl %ecx, 0x10(%rbx)
movl %ecx, 0x18(%rbx)
movl %ecx, 0x4c(%rbx)
movq 0x58(%rbx), %rax
movl %ecx, 0xf20(%rax)
movl $0xc1000000, 0xe0(%rbx) # imm = 0xC1000000
orb $0x2, 0xc8(%rbx)
cmpl %ecx, 0x260(%rbx)
jne 0x43d7e
movq 0x2611c(%rip), %r12     # 0x69da0
movss 0x4(%r12), %xmm0
addss 0x10295(%rip), %xmm0    # 0x53f28
movss %xmm0, 0xf28(%rax)
movq %rbx, %rdi
movq %r15, %rsi
movq %r14, %rdx
callq 0x18fd0
movq 0x58(%rbx), %rax
movl $0x2, (%rax)
movq %rbx, %rdi
movq %r14, %rdx
callq 0x181b0
movl $0x2b, %ecx
movq %rsp, %rdi
movq %r12, %rsi
rep  movsq (%rsi), %es:(%rdi)
movq 0x2592d(%rip), %rdi     # 0x69600
movq %rbx, %rsi
movq %r15, %rdx
movq %r14, %rcx
callq 0x184e0
movq %rbx, %rdi
callq 0x18eb0
movq 0x261d0(%rip), %rax     # 0x69ec0
movq (%rax), %rax
movss 0x20(%rax), %xmm0
xorps %xmm1, %xmm1
ucomiss %xmm1, %xmm0
jne 0x43d02
jnp 0x43d0a
movq %rbx, %rdi
callq 0x186d0
movq 0x2602f(%rip), %rax     # 0x69d40
cmpl $0x0, 0x61c(%rax)
jle 0x43d7e
movq 0x2623f(%rip), %rcx     # 0x69f60
movq (%rcx), %rcx
movss 0x20(%rcx), %xmm0
movq 0x26110(%rip), %rcx     # 0x69e40
addq $0x68, %rcx
movq 0x58(%rbx), %rdx
xorl %esi, %esi
xorps %xmm1, %xmm1
ucomiss %xmm1, %xmm0
jne 0x43d44
jnp 0x43d5d
testb $0x10, (%rcx)
je 0x43d5d
movq 0x58(%rbx), %rdi
movl 0x318(%rdi,%rsi,4), %r8d
movl %r8d, 0x9b0(%rdi,%rsi,4)
movl $0x0, 0x318(%rdx,%rsi,4)
incq %rsi
movslq 0x61c(%rax), %rdi
addq $0x88, %rcx
cmpq %rdi, %rsi
jl 0x43d3d
movq 0x58(%rbx), %rax
xorps %xmm0, %xmm0
movups %xmm0, 0xf04(%rax)
andb $-0x11, 0x11d(%rbx)
cmpl $-0x29, 0x254(%rbx)
jg 0x43e06
movq 0x2585d(%rip), %rax     # 0x69600
movq 0x20(%rax), %r14
leaq 0x1479c(%rip), %rdi     # 0x5854a
callq *0x48(%rax)
movl $0x4, %r15d
movss 0x10169(%rip), %xmm0    # 0x53f28
xorps %xmm2, %xmm2
movq %rbx, %rdi
movl $0x4, %esi
movl %eax, %edx
movaps %xmm0, %xmm1
callq *%r14
leaq 0x14781(%rip), %r14     # 0x5855a
movq %rbx, %rdi
movq %r14, %rsi
movl %ebp, %edx
xorl %ecx, %ecx
callq 0x188e0
decl %r15d
jne 0x43dd9
movq %rbx, %rdi
movl %ebp, %esi
callq 0x18db0
movl $0x0, 0x27c(%rbx)
jmp 0x44022
cmpl $0x0, 0x260(%rbx)
jne 0x44022
movl 0x4e187(%rip), %ecx     # 0x91fa0
movl %ecx, %edx
incl %edx
movl $0xaaaaaaab, %esi       # imm = 0xAAAAAAAB
imulq %rdx, %rsi
shrq $0x21, %rsi
leal (%rsi,%rsi,2), %edx
negl %edx
addl %edx, %ecx
incl %ecx
movl %ecx, 0x4e167(%rip)     # 0x91fa0
movl $0x5, 0xef8(%rax)
testb $0x1, 0x10(%rax)
jne 0x43e71
cmpl $0x2, %ecx
je 0x43fa9
cmpl $0x1, %ecx
jne 0x43fbc
movl $0xb7, 0x38(%rbx)
movl $0xbd, 0xef4(%rax)
jmp 0x43fcd
movl $0xac, 0x38(%rbx)
movl $0xb1, 0xef4(%rax)
jmp 0x43fcd
movq 0x58(%r14), %rax
cmpl $0x1, 0x1100(%rax)
movq 0x259c7(%rip), %rax     # 0x69860
movq (%rax), %r13
movq 0x25955(%rip), %rax     # 0x697f8
movq (%rax), %rax
movq %rax, %r12
cmoveq %r13, %r12
cmoveq %rax, %r13
testq %r13, %r13
je 0x43af5
movq 0x110(%r13), %rdi
movl $0xfffffffb, %esi       # imm = 0xFFFFFFFB
callq 0x18ce0
testl %eax, %eax
jne 0x43af5
movq %r12, 0x168(%rsp)
movq %r13, %rdi
callq 0x19420
movss 0x4(%r14), %xmm0
testl %eax, %eax
je 0x4404e
subss 0x4(%r13), %xmm0
leaq 0x174(%rsp), %r12
movss %xmm0, (%r12)
movss 0x8(%r14), %xmm0
subss 0x8(%r13), %xmm0
movss %xmm0, 0x4(%r12)
movss 0xc(%r14), %xmm0
subss 0xc(%r13), %xmm0
movss %xmm0, 0x8(%r12)
movq %r12, %rdi
callq 0x192e0
movss %xmm0, 0x160(%rsp)
movss 0x4(%rbx), %xmm0
subss 0x4(%r13), %xmm0
movss %xmm0, (%r12)
movss 0x8(%rbx), %xmm0
subss 0x8(%r13), %xmm0
movss %xmm0, 0x4(%r12)
movss 0xc(%rbx), %xmm0
subss 0xc(%r13), %xmm0
movss %xmm0, 0x8(%r12)
movq %r12, %rdi
callq 0x192e0
movss 0x10327(%rip), %xmm1    # 0x542a8
ucomiss 0x160(%rsp), %xmm1
ja 0x44118
ucomiss %xmm0, %xmm1
ja 0x44118
movq $0x0, 0x160(%rsp)
jmp 0x4436e
movl $0xbd, 0x38(%rbx)
movl $0xc5, 0xef4(%rax)
jmp 0x43fcd
movl $0xb1, 0x38(%rbx)
movl $0xb7, 0xef4(%rax)
movq 0x2562c(%rip), %rax     # 0x69600
movq 0x20(%rax), %r14
movq 0x48(%rax), %r15
callq 0x19a20
leal 0x3(%rax), %ecx
testl %eax, %eax
cmovnsl %eax, %ecx
andl $-0x4, %ecx
negl %ecx
leal (%rax,%rcx), %esi
incl %esi
leaq 0x170a6(%rip), %rdi     # 0x5b0a0
xorl %eax, %eax
callq 0x19340
movq %rax, %rdi
callq *%r15
movss 0xff19(%rip), %xmm0     # 0x53f28
xorps %xmm2, %xmm2
movq %rbx, %rdi
movl $0x2, %esi
movl %eax, %edx
movaps %xmm0, %xmm1
callq *%r14
movl $0x2, 0x260(%rbx)
movq 0x255cd(%rip), %rax     # 0x69600
movq %rbx, %rdi
callq *0x90(%rax)
addq $0x388, %rsp            # imm = 0x388
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
subss 0x460(%r13), %xmm0
leaq 0x174(%rsp), %r12
movss %xmm0, (%r12)
movss 0x8(%r14), %xmm0
subss 0x464(%r13), %xmm0
movss %xmm0, 0x4(%r12)
movss 0xc(%r14), %xmm0
subss 0x468(%r13), %xmm0
movss %xmm0, 0x8(%r12)
movq %r12, %rdi
callq 0x192e0
movss %xmm0, 0x160(%rsp)
movss 0x4(%rbx), %xmm0
subss 0x460(%r13), %xmm0
movss %xmm0, (%r12)
movss 0x8(%rbx), %xmm0
subss 0x464(%r13), %xmm0
movss %xmm0, 0x4(%r12)
movss 0xc(%rbx), %xmm0
subss 0x468(%r13), %xmm0
movss %xmm0, 0x8(%r12)
movq %r12, %rdi
callq 0x192e0
movss 0x1414c(%rip), %xmm1    # 0x5823c
ucomiss 0x160(%rsp), %xmm1
ja 0x441f1
ucomiss %xmm0, %xmm1
ja 0x441f1
movq $0x0, 0x160(%rsp)
jmp 0x442b1
movq 0x58(%r14), %rdx
movl 0x1100(%rdx), %eax
xorl %ecx, %ecx
cmpl $0x2, %eax
leaq 0x1036b(%rip), %rsi     # 0x54499
cmovneq %rcx, %rsi
cmpl $0x1, %eax
leaq 0x1036b(%rip), %rcx     # 0x544a7
cmovneq %rsi, %rcx
movl $0x2c0, %r13d           # imm = 0x2C0
addq %r13, %rdx
leaq 0x16e80(%rip), %rsi     # 0x5afd0
leaq 0x180(%rsp), %r12
movq %r12, %rdi
movq %rcx, 0x160(%rsp)
xorl %eax, %eax
callq 0x19700
movl $0x2, %edi
movq %r12, %rsi
callq 0x19270
movq 0x58(%r14), %rax
addl $0x2, 0xdf4(%rax)
movl $0x2, %edx
movq %r14, %rdi
movl $0x3, %esi
callq 0x19330
movq 0x25c05(%rip), %r12     # 0x69da0
movss 0x4(%r12), %xmm0
movq 0x58(%r14), %rax
movss %xmm0, 0x10ec(%rax)
movl $0x1, %edx
movq %r14, %rdi
movl $0x7, %esi
callq 0x19330
addq 0x58(%r14), %r13
movss 0x4(%r12), %xmm0
movq 0x2542e(%rip), %rdi     # 0x69600
leaq 0x16e10(%rip), %rcx     # 0x5afe9
movq %r13, %rsi
xorl %edx, %edx
xorl %r8d, %r8d
movl $0x2, %r9d
callq 0x18e90
jmp 0x4436e
movq 0x58(%r14), %rdx
movl 0x1100(%rdx), %eax
xorl %ecx, %ecx
cmpl $0x2, %eax
leaq 0x10292(%rip), %rsi     # 0x54499
cmovneq %rcx, %rsi
cmpl $0x1, %eax
leaq 0x10292(%rip), %rcx     # 0x544a7
cmovneq %rsi, %rcx
movl $0x2c0, %r12d           # imm = 0x2C0
addq %r12, %rdx
leaq 0x16dc6(%rip), %rsi     # 0x5afef
leaq 0x180(%rsp), %rdi
movq %rcx, 0x160(%rsp)
xorl %eax, %eax
callq 0x19700
movl $0x2, %edi
leaq 0x180(%rsp), %rsi
callq 0x19270
movq 0x58(%r14), %rax
incl 0xdf4(%rax)
movl $0x1, %edx
movq %r14, %rdi
movl $0x3, %esi
callq 0x19330
movl $0x1, %edx
movq %r14, %rdi
movl $0x8, %esi
callq 0x19330
addq 0x58(%r14), %r12
movq 0x25b15(%rip), %rax     # 0x69da0
movss 0x4(%rax), %xmm0
movq 0x25369(%rip), %rdi     # 0x69600
leaq 0x16d6a(%rip), %rcx     # 0x5b008
movq %r12, %rsi
xorl %edx, %edx
xorl %r8d, %r8d
movl $0x1, %r9d
callq 0x18e90
movss 0x4(%r14), %xmm0
subss 0x4(%r13), %xmm0
leaq 0x174(%rsp), %r12
movss %xmm0, (%r12)
movss 0x8(%r14), %xmm0
subss 0x8(%r13), %xmm0
movss %xmm0, 0x4(%r12)
movss 0xc(%r14), %xmm0
subss 0xc(%r13), %xmm0
movss %xmm0, 0x8(%r12)
movq %r12, %rdi
callq 0x192e0
movss %xmm0, 0x170(%rsp)
movss 0x4(%rbx), %xmm0
subss 0x4(%r13), %xmm0
movss %xmm0, (%r12)
movss 0x8(%rbx), %xmm0
subss 0x8(%r13), %xmm0
movss %xmm0, 0x4(%r12)
movss 0xc(%rbx), %xmm0
subss 0xc(%r13), %xmm0
movss %xmm0, 0x8(%r12)
movq %r12, %rdi
callq 0x192e0
movss 0x12b89(%rip), %xmm1    # 0x56ed0
ucomiss 0x170(%rsp), %xmm1
ja 0x44356
ucomiss %xmm0, %xmm1
jbe 0x4436e
movq 0x25a43(%rip), %rax     # 0x69da0
movss 0x4(%rax), %xmm0
movq 0x58(%r14), %rax
movss %xmm0, 0x10ec(%rax)
movq 0x168(%rsp), %r12
movq 0x110(%r12), %rdi
movl $0xfffffffb, %esi       # imm = 0xFFFFFFFB
callq 0x18ce0
testl %eax, %eax
je 0x43af5
movq 0x110(%r12), %rax
cmpq %r14, %rax
je 0x43af5
movq 0x58(%rbx), %rcx
movss 0x10f8(%rcx), %xmm0
addss 0x100a3(%rip), %xmm0    # 0x54458
movq 0x259e4(%rip), %rcx     # 0x69da0
ucomiss 0x4(%rcx), %xmm0
jbe 0x443f2
movq 0x58(%r14), %rdx
movl 0x1100(%rdx), %eax
cmpl $0x2, %eax
je 0x444cf
cmpl $0x1, %eax
movq 0x160(%rsp), %rcx
jne 0x444d6
leaq 0x100ba(%rip), %rcx     # 0x544a7
jmp 0x444d6
movss 0x4(%r14), %xmm0
subss 0x4(%rax), %xmm0
movq %r12, %r13
leaq 0x174(%rsp), %r12
movss %xmm0, (%r12)
movss 0x8(%r14), %xmm0
subss 0x8(%rax), %xmm0
movss %xmm0, 0x4(%r12)
movss 0xc(%r14), %xmm0
subss 0xc(%rax), %xmm0
movss %xmm0, 0x8(%r12)
movq %r12, %rdi
callq 0x192e0
movss %xmm0, 0x168(%rsp)
movss 0x4(%rbx), %xmm0
movq 0x110(%r13), %rax
subss 0x4(%rax), %xmm0
movss %xmm0, (%r12)
movss 0x8(%rbx), %xmm0
subss 0x8(%rax), %xmm0
movss %xmm0, 0x4(%r12)
movss 0xc(%rbx), %xmm0
subss 0xc(%rax), %xmm0
movss %xmm0, 0x8(%r12)
movq %r12, %rdi
callq 0x192e0
movss 0x13dac(%rip), %xmm1    # 0x58238
ucomiss 0x168(%rsp), %xmm1
ja 0x4449f
ucomiss %xmm0, %xmm1
jbe 0x43af5
movq 0x58(%r14), %rdx
movl 0x1100(%rdx), %eax
cmpl $0x2, %eax
je 0x4456a
cmpl $0x1, %eax
movq 0x160(%rsp), %rcx
jne 0x44571
leaq 0xffdd(%rip), %rcx      # 0x544a7
jmp 0x44571
leaq 0xffc3(%rip), %rcx      # 0x54499
movl $0x2c0, %r12d           # imm = 0x2C0
addq %r12, %rdx
leaq 0x16b2d(%rip), %rsi     # 0x5b013
leaq 0x180(%rsp), %r13
movq %r13, %rdi
xorl %eax, %eax
callq 0x19700
movl $0x2, %edi
movq %r13, %rsi
callq 0x19270
movq 0x58(%r14), %rax
addl $0x3, 0xdf4(%rax)
movl $0x3, %edx
movq %r14, %rdi
movl $0x3, %esi
callq 0x19330
addq 0x58(%r14), %r12
movq 0x25873(%rip), %rax     # 0x69da0
movss 0x4(%rax), %xmm0
movq 0x250c7(%rip), %rdi     # 0x69600
leaq 0x16b0d(%rip), %rcx     # 0x5b04d
movq %r12, %rsi
xorl %edx, %edx
xorl %r8d, %r8d
movl $0x3, %r9d
callq 0x18e90
movl $0x1, %edx
movq %r14, %rdi
movl $0x9, %esi
callq 0x19330
jmp 0x43af5
leaq 0xff28(%rip), %rcx      # 0x54499
movl $0x2c0, %r13d           # imm = 0x2C0
addq %r13, %rdx
leaq 0x16ad3(%rip), %rsi     # 0x5b054
leaq 0x180(%rsp), %r12
movq %r12, %rdi
xorl %eax, %eax
callq 0x19700
movl $0x2, %edi
movq %r12, %rsi
callq 0x19270
movq 0x58(%r14), %rax
addl $0x2, 0xdf4(%rax)
movl $0x2, %edx
movq %r14, %rdi
movl $0x3, %esi
callq 0x19330
movl $0x1, %edx
movq %r14, %rdi
movl $0x9, %esi
callq 0x19330
addq 0x58(%r14), %r13
movq 0x257c6(%rip), %rax     # 0x69da0
movss 0x4(%rax), %xmm0
movq 0x2501a(%rip), %rdi     # 0x69600
leaq 0x16a60(%rip), %rcx     # 0x5b04d
movq %r13, %rsi
xorl %edx, %edx
xorl %r8d, %r8d
movl $0x2, %r9d
callq 0x18e90
jmp 0x43af5