// File: /workspace/github_c_makefile_star2_O1/QwazyWabbitWOS[P]lmctf60/g_combat.c
// Function: T_Damage
void T_Damage (edict_t *targ, edict_t *inflictor, edict_t *attacker, vec3_t dir, vec3_t point, vec3_t normal, int damage, int knockback, int dflags, int mod)
{
	gclient_t	*client;
	int			take;
	int			vampdrain;
	int			save;
	int			asave;
	int			psave;
	int			te_sparks;

	if (Match_InCountdown())
		return;
	
	if (!targ->takedamage)
		return;

	// friendly fire avoidance
	// if enabled you can't hurt teammates (but you can hurt yourself)
	// knockback still occurs
	if ((targ != attacker) && (deathmatch->value || coop->value))
	{
		if (OnSameTeam (targ, attacker))
		{
			if (	
					(   ((int)(dmflags->value)) & DF_NO_FRIENDLY_FIRE   )  && 
					!(dflags & DAMAGE_NO_PROTECTION) &&
					!(mod & MOD_TELEFRAG)   
				)
			{
				damage = 0;
			}
			else
				mod |= MOD_FRIENDLY_FIRE;
		}
	}
	meansOfDeath = mod;

	// easy mode takes half damage
	if (skill->value == 0 && deathmatch->value == 0 && targ->client)
	{
		damage *= 0.5;
		if (!damage)
			damage = 1;
	}

	client = targ->client;

	if (dflags & DAMAGE_BULLET)
		te_sparks = TE_BULLET_SPARKS;
	else
		te_sparks = TE_SPARKS;

	VectorNormalize(dir);

// bonus damage for suprising a monster
	if (!(dflags & DAMAGE_RADIUS) && (targ->svflags & SVF_MONSTER) && (attacker->client) && (!targ->enemy) && (targ->health > 0))
		damage *= 2;

	if (targ->flags & FL_NO_KNOCKBACK)
		knockback = 0;

	// apply Damage rune
	damage = DamageRuneHook(targ, inflictor, attacker, damage, knockback, dflags);

// figure momentum add
	if (!(dflags & DAMAGE_NO_KNOCKBACK))
	{
		if ((knockback) && (targ->movetype != MOVETYPE_NONE) && (targ->movetype != MOVETYPE_BOUNCE) && (targ->movetype != MOVETYPE_PUSH) && (targ->movetype != MOVETYPE_STOP))
		{
			vec3_t	kvel;
			float	mass;

			if (targ->mass < 50)
				mass = 50;
			else
				mass = targ->mass;

			if (targ->client  && attacker == targ)
				VectorScale (dir, 1600.0 * (float)knockback / mass, kvel);	// the rocket jump hack...
			else
				VectorScale (dir, 500.0 * (float)knockback / mass, kvel);
			
#ifdef WEAP_BALANCE_OK	
			if ((int)ctfflags->value & CTF_WEAP_BALANCE) //a little extra umph to knockback
			{
				if (targ->client  && attacker == targ)
					VectorScale (dir, 1800.0 * (float)knockback / mass, kvel);	// the rocket jump hack...
				else
					VectorScale (dir, 800.0 * (float)knockback / mass, kvel);
			}
#endif
			if (targ->groundentity)
			{
				if (kvel[2] < 0)
					kvel[2] = 0;
			}
			VectorAdd (targ->velocity, kvel, targ->velocity);
		}
	}

	take = damage;
	save = 0;

	// check for godmode
	if ( (targ->flags & FL_GODMODE) && !(dflags & DAMAGE_NO_PROTECTION) )
	{
		take = 0;
		save = damage;
		SpawnDamage (te_sparks, point, normal, save);
	}

	// check for invincibility
	if ((client && client->invincible_framenum > level.framenum ) && !(dflags & DAMAGE_NO_PROTECTION))
	{
		if (targ->pain_debounce_time < level.time)
		{
			gi.sound(targ, CHAN_ITEM, gi.soundindex("items/protect4.wav"), 1, ATTN_NORM, 0);
			targ->pain_debounce_time = level.time + 2;
		}
		take = 0;
		save = damage;
	}

	psave = CheckPowerArmor (targ, point, normal, take, dflags);
	take -= psave;

	// apply Resist rune
	take = ResistRuneHook(targ, inflictor, attacker, take, knockback, dflags);

	// armor protect from teammates...only protect normal armor
	if (((int) ctfflags->value & CTF_TEAM_ARMOR_PROTECT) &&
	    (OnSameTeam (targ, attacker)) &&
	    (targ != attacker))
	  asave = 0;
	else
	{
	  asave = CheckArmor (targ, point, normal, take, te_sparks, dflags);
	  take -= asave;
	}

	//treat cheat/powerup savings the same as armor
	asave += save;

	// team damage avoidance
	if (!(dflags & DAMAGE_NO_PROTECTION) && CheckTeamDamage (targ, attacker))
		return;

// do the damage
	if (take)
	{
		if ((targ->svflags & SVF_MONSTER) || (client))
			SpawnDamage (TE_BLOOD, point, normal, take);
		else
			SpawnDamage (te_sparks, point, normal, take);


		targ->health = targ->health - take;

		if (attacker && attacker->client && attacker->client->rune)   //added by Vampire - if the attacker is this client
		{                                                             // and the client has a rune
			if ((attacker->client->rune->runetype == RUNE_VAMP)&&(attacker!=targ))   // if the rune is the VAMPIRE rune and the target is not himself
			{
				if (Q_stricmp(targ->classname,"player") == 0)                     // if the target is a player,
                {
					vampdrain = attacker->health + (take >> 1); // take half of the health removed from the player
					if (vampdrain < 250)
						attacker->health = vampdrain;        // and add it to the attackers health
					else
						attacker->health = 250;              // to a maximum of 250 health
					gi.sound(attacker, CHAN_ITEM, gi.soundindex("brain/brnatck3.wav"), 1, ATTN_NORM, 0); //make the vampiric sound
					//gi.bprintf(PRINT_MEDIUM,"sucking the life from %s\n",targ->classname);   //for debugging purposes
				}
				else if (Q_stricmp(targ->classname, "bodyque") == 0)      // if the target is a dead body.  NOTE: the grapple classname = 'noclass'
				{
					vampdrain = attacker->health + (take >> 2); // take quarter of the health removed from the corpse
					if (vampdrain < 250)
						attacker->health = vampdrain;        // and add it to the attackers health
					else
						attacker->health = 250;              // to a maximum of 250 health
					gi.sound(attacker, CHAN_ITEM, gi.soundindex("brain/brnatck3.wav"), 1, ATTN_NORM, 0); //make the vampiric sound
					//gi.bprintf(PRINT_MEDIUM,"sucking the life from %s\n",targ->classname);   //for debugging purposes
				}
			}
		}




		// LM_JORM -- CTF Track those who hit the flag carrier
		if ((redflag  &&  redflag->owner == targ)	||
			(blueflag && blueflag->owner == targ))
		{
			if (attacker && attacker->client)
				attacker->client->hit_carrier_time = level.time;
		}
		// END LM_JORM
			
		if (targ->health <= 0)
		{
			if ((targ->svflags & SVF_MONSTER) || (client))
				targ->flags |= FL_NO_KNOCKBACK;
			Killed (targ, inflictor, attacker, take, point);
			return;
		}
	}

	//no monsters
	//bat
#ifdef MONSTERS_OK
	if (targ->svflags & SVF_MONSTER)
	{
		M_ReactToDamage (targ, attacker);
		if (!(targ->monsterinfo.aiflags & AI_DUCKED) && (take))
		{
			targ->pain (targ, attacker, knockback, take);
			// nightmare mode monsters don't go into pain frames often
			if (skill->value == 3)
				targ->pain_debounce_time = level.time + 5;
		}
	}
	else if (client)
#else	
	if (client)
#endif
	{
		if (!(targ->flags & FL_GODMODE) && (take))
			targ->pain (targ, attacker, knockback, take);
	}
	else if (take)
	{
		if (targ->pain)
			targ->pain (targ, attacker, knockback, take);
	}

	// add to the damage inflicted on a player this frame
	// the total will be turned into screen blends and view angle kicks
	// at the end of the frame
	if (client)
	{
		client->damage_parmor += psave;
		client->damage_armor += asave;
		client->damage_blood += take;
		client->damage_knockback += knockback;
		VectorCopy (point, client->damage_from);
	}
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x78, %rsp
movq %r9, 0x48(%rsp)
movq %r8, %rbx
movq %rcx, %r12
movq %rdx, %r14
movq %rsi, 0x60(%rsp)
movq %rdi, %r15
xorl %eax, %eax
callq 0x19370
testl %eax, %eax
je 0x2b7ac
addq $0x78, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
cmpl $0x0, 0x27c(%r15)
je 0x2b79d
movq %rbx, 0x18(%rsp)
movl 0xc8(%rsp), %r13d
movl 0xb0(%rsp), %ebp
cmpq %r14, %r15
je 0x2b84b
movq 0x3e6ea(%rip), %rax     # 0x69ec0
movq (%rax), %rax
movss 0x20(%rax), %xmm1
xorps %xmm0, %xmm0
ucomiss %xmm0, %xmm1
jne 0x2b7fe
jp 0x2b7fe
movq 0x3e771(%rip), %rax     # 0x69f60
movq (%rax), %rax
movss 0x20(%rax), %xmm1
ucomiss %xmm0, %xmm1
jne 0x2b7fe
jnp 0x2b84b
movq %r15, %rdi
movq %r14, %rsi
callq 0x18700
testl %eax, %eax
je 0x2b84b
movq 0x3de04(%rip), %rax     # 0x69618
movq (%rax), %rax
cvttss2si 0x20(%rax), %eax
shrl $0x8, %eax
andl $0x1, %eax
movl 0xc0(%rsp), %ecx
andl $0x20, %ecx
movl %r13d, %edx
andl $0x15, %edx
orl %ecx, %edx
sete %cl
movl %r13d, %edx
orl $0x8000000, %edx        # imm = 0x8000000
xorl %esi, %esi
testb %al, %cl
cmovel %edx, %r13d
cmovnel %esi, %ebp
movq 0x3e2d6(%rip), %rax     # 0x69b28
movl %r13d, (%rax)
movq 0x3dedc(%rip), %rax     # 0x69738
movq (%rax), %rax
movss 0x20(%rax), %xmm1
xorps %xmm0, %xmm0
ucomiss %xmm0, %xmm1
jne 0x2b8a9
jp 0x2b8a9
movq 0x3e64b(%rip), %rax     # 0x69ec0
movq (%rax), %rax
movss 0x20(%rax), %xmm1
ucomiss %xmm0, %xmm1
jne 0x2b8a9
jp 0x2b8a9
cmpq $0x0, 0x58(%r15)
je 0x2b8a9
movq %r14, %rbx
xorps %xmm0, %xmm0
cvtsi2sd %ebp, %xmm0
mulsd 0x2b2eb(%rip), %xmm0    # 0x56b88
cvttsd2si %xmm0, %ebp
cmpl $0x1, %ebp
adcl $0x0, %ebp
jmp 0x2b8ac
movq %r14, %rbx
movq 0x58(%r15), %rax
movq %rax, 0x28(%rsp)
movl 0xc0(%rsp), %r14d
movl %r14d, %r13d
andl $0x10, %r13d
shrl $0x4, %r13d
movq %r12, %rdi
callq 0x18390
testb $0x1, %r14b
movq %rbx, 0x8(%rsp)
jne 0x2b908
testb $0x4, 0xc8(%r15)
je 0x2b908
movq 0x8(%rsp), %rax
cmpq $0x0, 0x58(%rax)
je 0x2b908
cmpq $0x0, 0x2a0(%r15)
jne 0x2b908
cmpl $0x0, 0x254(%r15)
setg %cl
shll %cl, %ebp
xorl %eax, %eax
btl $0xb, 0x11c(%r15)
movl 0xb8(%rsp), %r8d
movl $0x0, 0x24(%rsp)
cmovbl %eax, %r8d
movq %r15, %rdi
movq 0x60(%rsp), %rsi
movq 0x8(%rsp), %rdx
movl %ebp, %ecx
movl %r8d, 0x14(%rsp)
movl 0xc0(%rsp), %ebx
movl %ebx, %r9d
callq 0x180a0
movl %eax, %ebp
testb $0x8, %bl
jne 0x2b976
cmpl $0x0, 0x14(%rsp)
je 0x2b976
movl 0x118(%r15), %eax
cmpl $0x9, %eax
ja 0x2bbc9
movl $0x20d, %ecx            # imm = 0x20D
btl %eax, %ecx
jae 0x2bbc9
leal 0x9(%r13,%r13,4), %eax
movl %eax, 0x34(%rsp)
movl 0xc0(%rsp), %eax
testb $0x20, %al
jne 0x2b9e5
movl 0x11c(%r15), %eax
movl %ebp, %r13d
andl $0x10, %eax
je 0x2b9e8
movq 0x3dc60(%rip), %rbx     # 0x69600
movl $0x3, %edi
callq *0xc8(%rbx)
movl 0x34(%rsp), %edi
callq *0xc8(%rbx)
movq 0x18(%rsp), %r12
movq %r12, %rdi
callq *0xf0(%rbx)
movq 0x48(%rsp), %rdi
callq *0xf8(%rbx)
movq %r12, %rdi
movl $0x2, %esi
callq *0xb0(%rbx)
xorl %r13d, %r13d
movl %ebp, 0x24(%rsp)
jmp 0x2b9e8
movl %ebp, %r13d
cmpq $0x0, 0x28(%rsp)
je 0x2ba7b
movl 0xc0(%rsp), %eax
testb $0x20, %al
jne 0x2ba7b
movq 0x3e39a(%rip), %rbx     # 0x69da0
xorps %xmm0, %xmm0
cvtsi2ssl (%rbx), %xmm0
movq 0x28(%rsp), %rax
movss 0xf08(%rax), %xmm1
ucomiss %xmm0, %xmm1
jbe 0x2ba7b
movss 0x4(%rbx), %xmm0
xorl %r13d, %r13d
ucomiss 0x244(%r15), %xmm0
jbe 0x2ba77
movq 0x3dbc8(%rip), %rax     # 0x69600
movq 0x20(%rax), %r12
leaq 0x2c0f3(%rip), %rdi     # 0x57b36
callq *0x48(%rax)
movss 0x284da(%rip), %xmm0    # 0x53f28
xorps %xmm2, %xmm2
movq %r15, %rdi
movl $0x3, %esi
movl %eax, %edx
movaps %xmm0, %xmm1
callq *%r12
movss 0x4(%rbx), %xmm0
addss 0x289ea(%rip), %xmm0    # 0x54458
movss %xmm0, 0x244(%r15)
movl %ebp, 0x24(%rsp)
xorl %ebx, %ebx
testl %r13d, %r13d
je 0x2bcad
movq 0x58(%r15), %r14
movl 0xc0(%rsp), %eax
andl $0x2, %eax
shrl %eax
testq %r14, %r14
sete %cl
orb %al, %cl
jne 0x2bcad
movq %r15, %rdi
callq 0x18ab0
movl %eax, %r12d
xorl %ebx, %ebx
testl %eax, %eax
je 0x2bade
leaq 0x2b127(%rip), %rdi     # 0x56be3
callq 0x189e0
subq 0x3e378(%rip), %rax     # 0x69e40
shrq $0x3, %rax
imull $0xf0f0f0f1, %eax, %eax # imm = 0xF0F0F0F1
cltq
movl 0x318(%r14,%rax,4), %ebp
jmp 0x2bae2
xorl %eax, %eax
xorl %ebp, %ebp
testl %r12d, %r12d
je 0x2bcad
movq %rax, 0x38(%rsp)
testl %ebp, %ebp
je 0x2bcad
cmpl $0x1, %r12d
jne 0x2bbe9
leaq 0x10(%r15), %rdi
xorl %ebx, %ebx
leaq 0x6c(%rsp), %rsi
xorl %edx, %edx
xorl %ecx, %ecx
callq 0x183a0
movq 0x18(%rsp), %rax
movss (%rax), %xmm0
subss 0x4(%r15), %xmm0
leaq 0x54(%rsp), %r12
movss %xmm0, (%r12)
movss 0x4(%rax), %xmm0
subss 0x8(%r15), %xmm0
movss %xmm0, 0x4(%r12)
movss 0x8(%rax), %xmm0
subss 0xc(%r15), %xmm0
movss %xmm0, 0x8(%r12)
movq %r12, %rdi
callq 0x18390
movss 0x4(%r12), %xmm0
leaq 0x6c(%rsp), %rax
mulss 0x4(%rax), %xmm0
movss (%r12), %xmm1
mulss (%rax), %xmm1
addss %xmm0, %xmm1
movss 0x8(%r12), %xmm0
mulss 0x8(%rax), %xmm0
addss %xmm1, %xmm0
cvtss2sd %xmm0, %xmm0
movslq %r13d, %rax
imulq $0x55555556, %rax, %rax # imm = 0x55555556
movq %rax, %rcx
shrq $0x3f, %rcx
shrq $0x20, %rax
addl %ecx, %eax
movsd 0x2aff2(%rip), %xmm1    # 0x56ba0
ucomisd %xmm0, %xmm1
cmovael %r13d, %eax
jae 0x2bcad
movl $0xc, %r12d
movl $0x1, %edx
jmp 0x2bc25
movl 0x1d8(%r15), %eax
cmpl $0x32, %eax
jl 0x2bf2c
xorps %xmm0, %xmm0
cvtsi2ss %eax, %xmm0
cvtss2sd %xmm0, %xmm0
jmp 0x2bf34
movq 0x3df68(%rip), %rax     # 0x69b58
movq (%rax), %rax
cvttss2si 0x20(%rax), %eax
xorl %edx, %edx
btl $0xb, %eax
adcl $0x1, %edx
leal (,%r13,2), %eax
cltq
imulq $0x55555556, %rax, %rax # imm = 0x55555556
movq %rax, %rcx
shrq $0x3f, %rcx
shrq $0x20, %rax
addl %ecx, %eax
movl $0xd, %r12d
movl %edx, 0x40(%rsp)
imull %edx, %ebp
cmpl %eax, %ebp
cmovgel %eax, %ebp
movq 0x3d9c8(%rip), %rbx     # 0x69600
movl $0x3, %edi
callq *0xc8(%rbx)
movl %r12d, %edi
callq *0xc8(%rbx)
movq 0x18(%rsp), %r12
movq %r12, %rdi
callq *0xf0(%rbx)
movq 0x48(%rsp), %rdi
callq *0xf8(%rbx)
movq %r12, %rdi
movl $0x2, %esi
callq *0xb0(%rbx)
movq 0x3e126(%rip), %rax     # 0x69da0
xorps %xmm0, %xmm0
cvtss2sd 0x4(%rax), %xmm0
addsd 0x2af1e(%rip), %xmm0    # 0x56ba8
cvtsd2ss %xmm0, %xmm0
movss %xmm0, 0x268(%r15)
movl %ebp, %eax
cltd
idivl 0x40(%rsp)
movq 0x38(%rsp), %rcx
subl %eax, 0x318(%r14,%rcx,4)
movl %ebp, %ebx
subl %ebx, %r13d
movq %r15, %rdi
movq 0x60(%rsp), %rsi
movq 0x8(%rsp), %rdx
movl %r13d, %ecx
movl 0x14(%rsp), %r8d
movl 0xc0(%rsp), %r9d
callq 0x18780
movl %eax, %r13d
movq 0x3de7c(%rip), %rax     # 0x69b58
movq (%rax), %rax
cvttss2si 0x20(%rax), %eax
btl $0xa, %eax
jb 0x2bdd2
movq %rbx, %r14
movl $0x0, 0x38(%rsp)
testl %r13d, %r13d
movq 0x18(%rsp), %rbp
je 0x2be07
movq 0x58(%r15), %rbx
testq %rbx, %rbx
sete %al
movl 0xc0(%rsp), %ecx
andl $0x2, %ecx
shrl %ecx
orb %al, %cl
jne 0x2be07
movq %r15, %rdi
callq 0x18750
testl %eax, %eax
je 0x2be02
movl %eax, %ebp
movl %eax, %edi
callq 0x18c30
movl 0xc0(%rsp), %ecx
xorps %xmm0, %xmm0
cvtsi2ss %r13d, %xmm0
andl $0x4, %ecx
movq 0x70(%rax), %rax
mulss 0x8(%rax,%rcx), %xmm0
callq 0x18a30
cvttss2si %xmm0, %r12d
movslq %ebp, %rax
movl 0x318(%rbx,%rax,4), %ecx
cmpl %r12d, %ecx
cmovll %ecx, %r12d
testl %r12d, %r12d
movq 0x18(%rsp), %rbp
je 0x2be07
subl %r12d, %ecx
movl %ecx, 0x318(%rbx,%rax,4)
movq 0x3d86c(%rip), %rbx     # 0x69600
movl $0x3, %edi
callq *0xc8(%rbx)
movl 0x34(%rsp), %edi
callq *0xc8(%rbx)
movq %rbp, %rdi
callq *0xf0(%rbx)
movq 0x48(%rsp), %rdi
callq *0xf8(%rbx)
movq %rbp, %rdi
movl $0x2, %esi
callq *0xb0(%rbx)
movl %r12d, 0x38(%rsp)
jmp 0x2be07
movq %r15, %rdi
movq 0x8(%rsp), %r14
movq %r14, %rsi
callq 0x18700
cmpq %r14, %r15
je 0x2bcee
testl %eax, %eax
je 0x2bcee
movl $0x0, 0x38(%rsp)
movq 0x18(%rsp), %rbp
jmp 0x2be0f
movq 0x18(%rsp), %rbp
subl 0x38(%rsp), %r13d
movq %r14, %rbx
movl 0xc0(%rsp), %eax
testb $0x20, %al
jne 0x2be2f
movq %r15, %rdi
movq 0x8(%rsp), %rsi
callq 0x185b0
testl %eax, %eax
jne 0x2b79d
testl %r13d, %r13d
je 0x2c0c4
movq %rbx, 0x40(%rsp)
testb $0x4, 0xc8(%r15)
movq %rbp, %r12
movq 0x3d7b1(%rip), %rbp     # 0x69600
movl $0x1, %ebx
movl 0x34(%rsp), %r14d
cmovnel %ebx, %r14d
movl $0x3, %edi
callq *0xc8(%rbp)
cmpq $0x0, 0x28(%rsp)
cmovnel %ebx, %r14d
movl %r14d, %edi
movq 0x8(%rsp), %rbx
callq *0xc8(%rbp)
movq %r12, %rdi
callq *0xf0(%rbp)
movq 0x48(%rsp), %rdi
callq *0xf8(%rbp)
movq %r12, %rdi
movl $0x2, %esi
callq *0xb0(%rbp)
subl %r13d, 0x254(%r15)
testq %rbx, %rbx
je 0x2c03e
movq 0x8(%rsp), %rax
movq 0x58(%rax), %rax
testq %rax, %rax
je 0x2c03e
movq 0xf68(%rax), %rax
testq %rax, %rax
je 0x2c03e
cmpq 0x8(%rsp), %r15
je 0x2c03e
cmpl $0x10, 0x478(%rax)
jne 0x2c03e
movq 0x138(%r15), %rdi
leaq 0x29499(%rip), %rsi     # 0x55393
callq 0x18690
testl %eax, %eax
je 0x2bfef
movq 0x138(%r15), %rdi
leaq 0x2acc6(%rip), %rsi     # 0x56bdb
callq 0x18690
testl %eax, %eax
jne 0x2c03e
movl $0x2, %ecx
jmp 0x2bff4
movsd 0x2ac5c(%rip), %xmm0    # 0x56b90
xorl %eax, %eax
cmpq $0x0, 0x58(%r15)
xorps %xmm1, %xmm1
cvtsi2ssl 0x14(%rsp), %xmm1
setne %cl
cvtss2sd %xmm1, %xmm1
cmpq 0x8(%rsp), %r15
je 0x2bf5c
movsd 0x2ac3e(%rip), %xmm2    # 0x56b98
jmp 0x2bf6a
movb %cl, %al
leaq 0x2ac53(%rip), %rcx     # 0x56bb8
movsd (%rcx,%rax,8), %xmm2
mulsd %xmm1, %xmm2
divsd %xmm0, %xmm2
xorps %xmm0, %xmm0
cvtsd2ss %xmm2, %xmm0
leaq 0x54(%rsp), %rsi
movq %r12, %rdi
callq 0x189d0
cmpq $0x0, 0x2b8(%r15)
je 0x2bfa2
xorps %xmm0, %xmm0
ucomiss 0x5c(%rsp), %xmm0
jbe 0x2bfa2
movl $0x0, 0x5c(%rsp)
movss 0x1c0(%r15), %xmm0
movss 0x1c4(%r15), %xmm1
addss 0x54(%rsp), %xmm0
movss %xmm0, 0x1c0(%r15)
addss 0x58(%rsp), %xmm1
movss %xmm1, 0x1c4(%r15)
movss 0x1c8(%r15), %xmm0
addss 0x5c(%rsp), %xmm0
movss %xmm0, 0x1c8(%r15)
jmp 0x2b976
movl $0x1, %ecx
movl %r13d, %eax
sarl %cl, %eax
movq 0x8(%rsp), %r14
addl 0x254(%r14), %eax
movl $0xfa, %ecx
cmpl %ecx, %eax
cmovgel %ecx, %eax
movl %eax, 0x254(%r14)
movq 0x20(%rbp), %rbx
leaq 0x2aba7(%rip), %rdi     # 0x56bc8
callq *0x48(%rbp)
movss 0x27efc(%rip), %xmm0    # 0x53f28
xorps %xmm2, %xmm2
movq %r14, %rdi
movl $0x3, %esi
movl %eax, %edx
movaps %xmm0, %xmm1
callq *%rbx
movq 0x3d7b3(%rip), %rax     # 0x697f8
movq (%rax), %rax
testq %rax, %rax
je 0x2c056
cmpq %r15, 0x110(%rax)
je 0x2c082
movq 0x3d803(%rip), %rax     # 0x69860
movq (%rax), %rax
testq %rax, %rax
movq 0x18(%rsp), %rbp
movq 0x40(%rsp), %rbx
je 0x2c0b6
cmpq $0x0, 0x8(%rsp)
je 0x2c0b6
cmpq %r15, 0x110(%rax)
je 0x2c094
jmp 0x2c0b6
cmpq $0x0, 0x8(%rsp)
movq 0x18(%rsp), %rbp
movq 0x40(%rsp), %rbx
je 0x2c0b6
movq 0x8(%rsp), %rax
movq 0x58(%rax), %rax
testq %rax, %rax
je 0x2c0b6
movq 0x3dcf7(%rip), %rcx     # 0x69da0
movss 0x4(%rcx), %xmm0
movss %xmm0, 0x10f8(%rax)
cmpl $0x0, 0x254(%r15)
jle 0x2c16f
cmpq $0x0, 0x28(%rsp)
je 0x2c0e6
testl %r13d, %r13d
je 0x2c10d
movl 0x11c(%r15), %eax
andl $0x10, %eax
jne 0x2c10d
movq 0x230(%r15), %rax
jmp 0x2c0f7
testl %r13d, %r13d
je 0x2c10d
movq 0x230(%r15), %rax
testq %rax, %rax
je 0x2c10d
xorps %xmm0, %xmm0
cvtsi2ssl 0x14(%rsp), %xmm0
movq %r15, %rdi
movq 0x8(%rsp), %rsi
movl %r13d, %edx
callq *%rax
cmpq $0x0, 0x28(%rsp)
je 0x2b79d
movq 0x28(%rsp), %rax
addl %ebx, 0xe5c(%rax)
movl 0x38(%rsp), %ecx
addl 0x24(%rsp), %ecx
addl %ecx, 0xe58(%rax)
addl %r13d, 0xe60(%rax)
movl 0x14(%rsp), %ecx
addl %ecx, 0xe64(%rax)
movss (%rbp), %xmm0
movss %xmm0, 0xe68(%rax)
movss 0x4(%rbp), %xmm0
movss %xmm0, 0xe6c(%rax)
movss 0x8(%rbp), %xmm0
movss %xmm0, 0xe70(%rax)
jmp 0x2b79d
cmpq $0x0, 0x28(%rsp)
jne 0x2c183
movl 0xc8(%r15), %eax
andl $0x4, %eax
je 0x2c18b
orb $0x8, 0x11d(%r15)
movq %r15, %rdi
movq 0x60(%rsp), %rsi
movq 0x8(%rsp), %rdx
movl %r13d, %ecx
movq %rbp, %r8
callq 0x19690
jmp 0x2b79d