// File: /workspace/github_c_makefile_star2_O0/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
movq %rsp, %rbp
subq $0x90, %rsp
movl 0x28(%rbp), %eax
movl 0x20(%rbp), %eax
movl 0x18(%rbp), %eax
movl 0x10(%rbp), %eax
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq %rdx, -0x18(%rbp)
movq %rcx, -0x20(%rbp)
movq %r8, -0x28(%rbp)
movq %r9, -0x30(%rbp)
movb $0x0, %al
callq 0x19590
cmpl $0x0, %eax
je 0x324a0
jmp 0x32dd3
movq -0x8(%rbp), %rax
cmpl $0x0, 0x27c(%rax)
jne 0x324b2
jmp 0x32dd3
movq -0x8(%rbp), %rax
cmpq -0x18(%rbp), %rax
je 0x3254d
movq 0x509f9(%rip), %rax     # 0x82ec0
movq (%rax), %rax
movss 0x20(%rax), %xmm0
xorps %xmm1, %xmm1
ucomiss %xmm1, %xmm0
jne 0x324f4
jp 0x324f4
movq 0x50a80(%rip), %rax     # 0x82f60
movq (%rax), %rax
movss 0x20(%rax), %xmm0
xorps %xmm1, %xmm1
ucomiss %xmm1, %xmm0
jne 0x324f4
jp 0x324f4
jmp 0x3254d
movq -0x8(%rbp), %rdi
movq -0x18(%rbp), %rsi
callq 0x18770
cmpl $0x0, %eax
je 0x3254b
movq 0x5010b(%rip), %rax     # 0x82618
movq (%rax), %rax
cvttss2si 0x20(%rax), %eax
andl $0x100, %eax            # imm = 0x100
cmpl $0x0, %eax
je 0x3253e
movl 0x20(%rbp), %eax
andl $0x20, %eax
cmpl $0x0, %eax
jne 0x3253e
movl 0x28(%rbp), %eax
andl $0x15, %eax
cmpl $0x0, %eax
jne 0x3253e
movl $0x0, 0x10(%rbp)
jmp 0x32549
movl 0x28(%rbp), %eax
orl $0x8000000, %eax        # imm = 0x8000000
movl %eax, 0x28(%rbp)
jmp 0x3254b
jmp 0x3254d
movl 0x28(%rbp), %ecx
movq 0x505d1(%rip), %rax     # 0x82b28
movl %ecx, (%rax)
movq 0x501d8(%rip), %rax     # 0x82738
movq (%rax), %rax
movss 0x20(%rax), %xmm0
xorps %xmm1, %xmm1
ucomiss %xmm1, %xmm0
jne 0x325bd
jp 0x325bd
movq 0x50947(%rip), %rax     # 0x82ec0
movq (%rax), %rax
movss 0x20(%rax), %xmm0
xorps %xmm1, %xmm1
ucomiss %xmm1, %xmm0
jne 0x325bd
jp 0x325bd
movq -0x8(%rbp), %rax
cmpq $0x0, 0x58(%rax)
je 0x325bd
cvtsi2sdl 0x10(%rbp), %xmm0
movsd 0x3ee85(%rip), %xmm1    # 0x71428
mulsd %xmm1, %xmm0
cvttsd2si %xmm0, %eax
movl %eax, 0x10(%rbp)
cmpl $0x0, 0x10(%rbp)
jne 0x325bb
movl $0x1, 0x10(%rbp)
jmp 0x325bd
movq -0x8(%rbp), %rax
movq 0x58(%rax), %rax
movq %rax, -0x38(%rbp)
movl 0x20(%rbp), %eax
andl $0x10, %eax
cmpl $0x0, %eax
je 0x325dd
movl $0xe, -0x50(%rbp)
jmp 0x325e4
movl $0x9, -0x50(%rbp)
movq -0x20(%rbp), %rdi
callq 0x183d0
movl 0x20(%rbp), %eax
andl $0x1, %eax
cmpl $0x0, %eax
jne 0x32638
movq -0x8(%rbp), %rax
movl 0xc8(%rax), %eax
andl $0x4, %eax
cmpl $0x0, %eax
je 0x32638
movq -0x18(%rbp), %rax
cmpq $0x0, 0x58(%rax)
je 0x32638
movq -0x8(%rbp), %rax
cmpq $0x0, 0x2a0(%rax)
jne 0x32638
movq -0x8(%rbp), %rax
cmpl $0x0, 0x254(%rax)
jle 0x32638
movl 0x10(%rbp), %eax
shll %eax
movl %eax, 0x10(%rbp)
movq -0x8(%rbp), %rax
movl 0x11c(%rax), %eax
andl $0x800, %eax            # imm = 0x800
cmpl $0x0, %eax
je 0x32653
movl $0x0, 0x18(%rbp)
movq -0x8(%rbp), %rdi
movq -0x10(%rbp), %rsi
movq -0x18(%rbp), %rdx
movl 0x10(%rbp), %ecx
movl 0x18(%rbp), %r8d
movl 0x20(%rbp), %r9d
callq 0x180a0
movl %eax, 0x10(%rbp)
movl 0x20(%rbp), %eax
andl $0x8, %eax
cmpl $0x0, %eax
jne 0x327f3
cmpl $0x0, 0x18(%rbp)
je 0x327f1
movq -0x8(%rbp), %rax
cmpl $0x0, 0x118(%rax)
je 0x327f1
movq -0x8(%rbp), %rax
cmpl $0x9, 0x118(%rax)
je 0x327f1
movq -0x8(%rbp), %rax
cmpl $0x2, 0x118(%rax)
je 0x327f1
movq -0x8(%rbp), %rax
cmpl $0x3, 0x118(%rax)
je 0x327f1
movq -0x8(%rbp), %rax
cmpl $0x32, 0x1d8(%rax)
jge 0x326eb
movss 0x40470(%rip), %xmm0    # 0x72b54
movss %xmm0, -0x60(%rbp)
jmp 0x326fc
movq -0x8(%rbp), %rax
cvtsi2ssl 0x1d8(%rax), %xmm0
movss %xmm0, -0x60(%rbp)
movq -0x8(%rbp), %rax
cmpq $0x0, 0x58(%rax)
je 0x32746
movq -0x18(%rbp), %rax
cmpq -0x8(%rbp), %rax
jne 0x32746
movq -0x20(%rbp), %rdi
cvtsi2ssl 0x18(%rbp), %xmm0
cvtss2sd %xmm0, %xmm1
movsd 0x4040a(%rip), %xmm0    # 0x72b30
mulsd %xmm1, %xmm0
movss -0x60(%rbp), %xmm1
cvtss2sd %xmm1, %xmm1
divsd %xmm1, %xmm0
cvtsd2ss %xmm0, %xmm0
leaq -0x5c(%rbp), %rsi
callq 0x18a80
jmp 0x32779
movq -0x20(%rbp), %rdi
cvtsi2ssl 0x18(%rbp), %xmm0
cvtss2sd %xmm0, %xmm1
movsd 0x403cd(%rip), %xmm0    # 0x72b28
mulsd %xmm1, %xmm0
movss -0x60(%rbp), %xmm1
cvtss2sd %xmm1, %xmm1
divsd %xmm1, %xmm0
cvtsd2ss %xmm0, %xmm0
leaq -0x5c(%rbp), %rsi
callq 0x18a80
movq -0x8(%rbp), %rax
cmpq $0x0, 0x2b8(%rax)
je 0x3279a
xorps %xmm0, %xmm0
ucomiss -0x54(%rbp), %xmm0
jbe 0x32798
xorps %xmm0, %xmm0
movss %xmm0, -0x54(%rbp)
jmp 0x3279a
movq -0x8(%rbp), %rax
movss 0x1c0(%rax), %xmm0
addss -0x5c(%rbp), %xmm0
movq -0x8(%rbp), %rax
movss %xmm0, 0x1c0(%rax)
movq -0x8(%rbp), %rax
movss 0x1c4(%rax), %xmm0
addss -0x58(%rbp), %xmm0
movq -0x8(%rbp), %rax
movss %xmm0, 0x1c4(%rax)
movq -0x8(%rbp), %rax
movss 0x1c8(%rax), %xmm0
addss -0x54(%rbp), %xmm0
movq -0x8(%rbp), %rax
movss %xmm0, 0x1c8(%rax)
jmp 0x327f3
movl 0x10(%rbp), %eax
movl %eax, -0x3c(%rbp)
movl $0x0, -0x44(%rbp)
movq -0x8(%rbp), %rax
movl 0x11c(%rax), %eax
andl $0x10, %eax
cmpl $0x0, %eax
je 0x3283d
movl 0x20(%rbp), %eax
andl $0x20, %eax
cmpl $0x0, %eax
jne 0x3283d
movl $0x0, -0x3c(%rbp)
movl 0x10(%rbp), %eax
movl %eax, -0x44(%rbp)
movl -0x50(%rbp), %edi
movq -0x28(%rbp), %rsi
movq -0x30(%rbp), %rdx
movl -0x44(%rbp), %ecx
callq 0x19cb0
cmpq $0x0, -0x38(%rbp)
je 0x32908
movq -0x38(%rbp), %rax
movss 0xf08(%rax), %xmm0
movq 0x50545(%rip), %rax     # 0x82da0
cvtsi2ssl (%rax), %xmm1
ucomiss %xmm1, %xmm0
jbe 0x32908
movl 0x20(%rbp), %eax
andl $0x20, %eax
cmpl $0x0, %eax
jne 0x32908
movq -0x8(%rbp), %rax
movss 0x244(%rax), %xmm1
movq 0x50516(%rip), %rax     # 0x82da0
movss 0x4(%rax), %xmm0
ucomiss %xmm1, %xmm0
jbe 0x328fb
movq 0x4fd65(%rip), %rax     # 0x82600
movq 0x20(%rax), %rax
movq %rax, -0x68(%rbp)
movq -0x8(%rbp), %rax
movq %rax, -0x70(%rbp)
leaq 0x4120c(%rip), %rdi     # 0x73abe
movq 0x4fd47(%rip), %rax     # 0x82600
callq *0x48(%rax)
movq -0x70(%rbp), %rdi
movl %eax, %edx
movq -0x68(%rbp), %rax
movl $0x3, %esi
movss 0x3d619(%rip), %xmm1    # 0x6feec
xorps %xmm2, %xmm2
movaps %xmm1, %xmm0
callq *%rax
movss 0x3d605(%rip), %xmm0    # 0x6fee8
movq 0x504b6(%rip), %rax     # 0x82da0
addss 0x4(%rax), %xmm0
movq -0x8(%rbp), %rax
movss %xmm0, 0x244(%rax)
movl $0x0, -0x3c(%rbp)
movl 0x10(%rbp), %eax
movl %eax, -0x44(%rbp)
movq -0x8(%rbp), %rdi
movq -0x28(%rbp), %rsi
movq -0x30(%rbp), %rdx
movl -0x3c(%rbp), %ecx
movl 0x20(%rbp), %r8d
callq 0x32de0
movl %eax, -0x4c(%rbp)
movl -0x4c(%rbp), %ecx
movl -0x3c(%rbp), %eax
subl %ecx, %eax
movl %eax, -0x3c(%rbp)
movq -0x8(%rbp), %rdi
movq -0x10(%rbp), %rsi
movq -0x18(%rbp), %rdx
movl -0x3c(%rbp), %ecx
movl 0x18(%rbp), %r8d
movl 0x20(%rbp), %r9d
callq 0x187f0
movl %eax, -0x3c(%rbp)
movq 0x50204(%rip), %rax     # 0x82b58
movq (%rax), %rax
cvttss2si 0x20(%rax), %eax
andl $0x400, %eax            # imm = 0x400
cmpl $0x0, %eax
je 0x3298b
movq -0x8(%rbp), %rdi
movq -0x18(%rbp), %rsi
callq 0x18770
cmpl $0x0, %eax
je 0x3298b
movq -0x8(%rbp), %rax
cmpq -0x18(%rbp), %rax
je 0x3298b
movl $0x0, -0x48(%rbp)
jmp 0x329b5
movq -0x8(%rbp), %rdi
movq -0x28(%rbp), %rsi
movq -0x30(%rbp), %rdx
movl -0x3c(%rbp), %ecx
movl -0x50(%rbp), %r8d
movl 0x20(%rbp), %r9d
callq 0x330a0
movl %eax, -0x48(%rbp)
movl -0x48(%rbp), %ecx
movl -0x3c(%rbp), %eax
subl %ecx, %eax
movl %eax, -0x3c(%rbp)
movl -0x44(%rbp), %eax
addl -0x48(%rbp), %eax
movl %eax, -0x48(%rbp)
movl 0x20(%rbp), %eax
andl $0x20, %eax
cmpl $0x0, %eax
jne 0x329e0
movq -0x8(%rbp), %rdi
movq -0x18(%rbp), %rsi
callq 0x18610
cmpl $0x0, %eax
je 0x329e0
jmp 0x32dd3
cmpl $0x0, -0x3c(%rbp)
je 0x32ccb
movq -0x8(%rbp), %rax
movl 0xc8(%rax), %eax
andl $0x4, %eax
cmpl $0x0, %eax
jne 0x32a03
cmpq $0x0, -0x38(%rbp)
je 0x32a1a
movq -0x28(%rbp), %rsi
movq -0x30(%rbp), %rdx
movl -0x3c(%rbp), %ecx
movl $0x1, %edi
callq 0x19cb0
jmp 0x32a2d
movl -0x50(%rbp), %edi
movq -0x28(%rbp), %rsi
movq -0x30(%rbp), %rdx
movl -0x3c(%rbp), %ecx
callq 0x19cb0
movq -0x8(%rbp), %rax
movl 0x254(%rax), %ecx
subl -0x3c(%rbp), %ecx
movq -0x8(%rbp), %rax
movl %ecx, 0x254(%rax)
cmpq $0x0, -0x18(%rbp)
je 0x32bf8
movq -0x18(%rbp), %rax
cmpq $0x0, 0x58(%rax)
je 0x32bf8
movq -0x18(%rbp), %rax
movq 0x58(%rax), %rax
cmpq $0x0, 0xf68(%rax)
je 0x32bf8
movq -0x18(%rbp), %rax
movq 0x58(%rax), %rax
movq 0xf68(%rax), %rax
cmpl $0x10, 0x478(%rax)
jne 0x32bf6
movq -0x18(%rbp), %rax
cmpq -0x8(%rbp), %rax
je 0x32bf6
movq -0x8(%rbp), %rax
movq 0x138(%rax), %rdi
leaq 0x3e8e7(%rip), %rsi     # 0x71397
callq 0x186f0
cmpl $0x0, %eax
jne 0x32b44
movq -0x18(%rbp), %rax
movl 0x254(%rax), %eax
movl -0x3c(%rbp), %ecx
sarl %ecx
addl %ecx, %eax
movl %eax, -0x40(%rbp)
cmpl $0xfa, -0x40(%rbp)
jge 0x32aea
movl -0x40(%rbp), %ecx
movq -0x18(%rbp), %rax
movl %ecx, 0x254(%rax)
jmp 0x32af8
movq -0x18(%rbp), %rax
movl $0xfa, 0x254(%rax)
movq 0x4fb01(%rip), %rax     # 0x82600
movq 0x20(%rax), %rax
movq %rax, -0x78(%rbp)
movq -0x18(%rbp), %rax
movq %rax, -0x80(%rbp)
leaq 0x40042(%rip), %rdi     # 0x72b58
movq 0x4fae3(%rip), %rax     # 0x82600
callq *0x48(%rax)
movq -0x80(%rbp), %rdi
movl %eax, %edx
movq -0x78(%rbp), %rax
movl $0x3, %esi
movss 0x3d3b5(%rip), %xmm1    # 0x6feec
xorps %xmm2, %xmm2
movaps %xmm1, %xmm0
callq *%rax
jmp 0x32bf4
movq -0x8(%rbp), %rax
movq 0x138(%rax), %rdi
leaq 0x40015(%rip), %rsi     # 0x72b6b
callq 0x186f0
cmpl $0x0, %eax
jne 0x32bf2
movq -0x18(%rbp), %rax
movl 0x254(%rax), %eax
movl -0x3c(%rbp), %ecx
sarl $0x2, %ecx
addl %ecx, %eax
movl %eax, -0x40(%rbp)
cmpl $0xfa, -0x40(%rbp)
jge 0x32b91
movl -0x40(%rbp), %ecx
movq -0x18(%rbp), %rax
movl %ecx, 0x254(%rax)
jmp 0x32b9f
movq -0x18(%rbp), %rax
movl $0xfa, 0x254(%rax)
movq 0x4fa5a(%rip), %rax     # 0x82600
movq 0x20(%rax), %rax
movq %rax, -0x88(%rbp)
movq -0x18(%rbp), %rax
movq %rax, -0x90(%rbp)
leaq 0x3ff95(%rip), %rdi     # 0x72b58
movq 0x4fa36(%rip), %rax     # 0x82600
callq *0x48(%rax)
movq -0x90(%rbp), %rdi
movl %eax, %edx
movq -0x88(%rbp), %rax
movl $0x3, %esi
movss 0x3d302(%rip), %xmm1    # 0x6feec
xorps %xmm2, %xmm2
movaps %xmm1, %xmm0
callq *%rax
jmp 0x32bf4
jmp 0x32bf6
jmp 0x32bf8
movq 0x4fbf9(%rip), %rax     # 0x827f8
cmpq $0x0, (%rax)
je 0x32c1c
movq 0x4fbec(%rip), %rax     # 0x827f8
movq (%rax), %rax
movq 0x110(%rax), %rax
cmpq -0x8(%rbp), %rax
je 0x32c40
movq 0x4fc3d(%rip), %rax     # 0x82860
cmpq $0x0, (%rax)
je 0x32c70
movq 0x4fc30(%rip), %rax     # 0x82860
movq (%rax), %rax
movq 0x110(%rax), %rax
cmpq -0x8(%rbp), %rax
jne 0x32c70
cmpq $0x0, -0x18(%rbp)
je 0x32c6e
movq -0x18(%rbp), %rax
cmpq $0x0, 0x58(%rax)
je 0x32c6e
movq 0x50147(%rip), %rax     # 0x82da0
movss 0x4(%rax), %xmm0
movq -0x18(%rbp), %rax
movq 0x58(%rax), %rax
movss %xmm0, 0x10f8(%rax)
jmp 0x32c70
movq -0x8(%rbp), %rax
cmpl $0x0, 0x254(%rax)
jg 0x32cc9
movq -0x8(%rbp), %rax
movl 0xc8(%rax), %eax
andl $0x4, %eax
cmpl $0x0, %eax
jne 0x32c96
cmpq $0x0, -0x38(%rbp)
je 0x32cac
movq -0x8(%rbp), %rax
movl 0x11c(%rax), %ecx
orl $0x800, %ecx            # imm = 0x800
movl %ecx, 0x11c(%rax)
movq -0x8(%rbp), %rdi
movq -0x10(%rbp), %rsi
movq -0x18(%rbp), %rdx
movl -0x3c(%rbp), %ecx
movq -0x28(%rbp), %r8
callq 0x198d0
jmp 0x32dd3
jmp 0x32ccb
cmpq $0x0, -0x38(%rbp)
je 0x32d09
movq -0x8(%rbp), %rax
movl 0x11c(%rax), %eax
andl $0x10, %eax
cmpl $0x0, %eax
jne 0x32d07
cmpl $0x0, -0x3c(%rbp)
je 0x32d07
movq -0x8(%rbp), %rax
movq 0x230(%rax), %rax
movq -0x8(%rbp), %rdi
movq -0x18(%rbp), %rsi
cvtsi2ssl 0x18(%rbp), %xmm0
movl -0x3c(%rbp), %edx
callq *%rax
jmp 0x32d3e
cmpl $0x0, -0x3c(%rbp)
je 0x32d3c
movq -0x8(%rbp), %rax
cmpq $0x0, 0x230(%rax)
je 0x32d3a
movq -0x8(%rbp), %rax
movq 0x230(%rax), %rax
movq -0x8(%rbp), %rdi
movq -0x18(%rbp), %rsi
cvtsi2ssl 0x18(%rbp), %xmm0
movl -0x3c(%rbp), %edx
callq *%rax
jmp 0x32d3c
jmp 0x32d3e
cmpq $0x0, -0x38(%rbp)
je 0x32dd3
movl -0x4c(%rbp), %ecx
movq -0x38(%rbp), %rax
addl 0xe5c(%rax), %ecx
movl %ecx, 0xe5c(%rax)
movl -0x48(%rbp), %ecx
movq -0x38(%rbp), %rax
addl 0xe58(%rax), %ecx
movl %ecx, 0xe58(%rax)
movl -0x3c(%rbp), %ecx
movq -0x38(%rbp), %rax
addl 0xe60(%rax), %ecx
movl %ecx, 0xe60(%rax)
movl 0x18(%rbp), %ecx
movq -0x38(%rbp), %rax
addl 0xe64(%rax), %ecx
movl %ecx, 0xe64(%rax)
movq -0x28(%rbp), %rax
movss (%rax), %xmm0
movq -0x38(%rbp), %rax
movss %xmm0, 0xe68(%rax)
movq -0x28(%rbp), %rax
movss 0x4(%rax), %xmm0
movq -0x38(%rbp), %rax
movss %xmm0, 0xe6c(%rax)
movq -0x28(%rbp), %rax
movss 0x8(%rax), %xmm0
movq -0x38(%rbp), %rax
movss %xmm0, 0xe70(%rax)
addq $0x90, %rsp
popq %rbp
retq
nopl (%rax)