// File: /workspace/github_c_makefile_star2_O1/QwazyWabbitWOS[P]lmctf60/p_client.c
// Function: ClientObituary
void ClientObituary (edict_t *self, edict_t *inflictor, edict_t *attacker)
{
	int			mod;
	char		*message;
	char		*message2;
	qboolean ff;
	char		msg[MAX_INFO_STRING];
	int Sex;

	int New_Death_Messages;

	if((int)ctfflags->value & CTF_RANDOM_DEATH_MSG)
		New_Death_Messages = true;
	else
		New_Death_Messages = false;


	if(IsFemale(self))
		Sex = FEMALE;
	else
		Sex = MALE;

	if (coop->value && attacker->client)
		meansOfDeath |= MOD_FRIENDLY_FIRE;

	if (deathmatch->value || coop->value)
	{
		ff = meansOfDeath & MOD_FRIENDLY_FIRE;
		mod = meansOfDeath & ~MOD_FRIENDLY_FIRE;
		message = NULL;
		message2 = "";

		switch (mod)
		{
		case MOD_SUICIDE:
			message = "suicides";
			break;
		case MOD_FALLING:
			message = "cratered";
			break;
		case MOD_CRUSH:
			message = "was squished";
			break;
		case MOD_WATER:
			message = "sank like a rock";
			break;
		case MOD_SLIME:
			message = "melted";
			break;
		case MOD_LAVA:
			message = "does a back flip into the lava";
			break;
		case MOD_EXPLOSIVE:
		case MOD_BARREL:
			message = "blew up";
			break;
		case MOD_EXIT:
			message = "found a way out";
			break;
		case MOD_TARGET_LASER:
			message = "saw the light";
			break;
		case MOD_TARGET_BLASTER:
			message = "got blasted";
			break;
		case MOD_BOMB:
		case MOD_SPLASH:
		case MOD_TRIGGER_HURT:
			message = "was in the wrong place";
			break;
		}
		if (attacker == self)
		{
			switch (mod)
			{
			case MOD_HELD_GRENADE:
				message = "tried to put the pin back in";
				break;
			case MOD_HG_SPLASH:
			case MOD_G_SPLASH:
				if (IsNeutral(self))
					message = "tripped on its own grenade";
				else if (Sex)
					message = "tripped on her own grenade";
				else
					message = "tripped on his own grenade";
				break;
			case MOD_R_SPLASH:
				if (IsNeutral(self))
					message = "blew itself up";
				else if (Sex)
					message = "blew herself up";
				else
					message = "blew himself up";
				break;
			case MOD_BFG_BLAST:
				message = "should have used a smaller gun";
				break;
// SKWiD MOD
#include "plasma.h"
 			case MOD_PLASMA:
 				message = "get's shocked";
 				break;
// END

			default:
				if (IsNeutral(self))
					message = "killed itself";
				else if (Sex)
					message = "killed herself";
				else
					message = "killed himself";
				break;
			}
		}
		if (message)
		{
			if(Match_CanScore())
			{
				sprintf(msg, "%s %s.\n", self->client->pers.netname, message);
				ctf_BSafePrint(PRINT_HIGH, msg);
				if (deathmatch->value)
				{
					self->client->resp.score--;
					stats_add(self, STATS_SCORE, -1);
					stats_add(self, STATS_DEATHS, 1);
				}
			}
			self->enemy = NULL;
			return;
		}

		self->enemy = attacker;
		if (attacker && attacker->client)
		{
			switch (mod)
			{
			case MOD_BLASTER:
				message = "was blasted by";
				if(New_Death_Messages)
					message2 = "'s blaster"; //bat
				break;

			case MOD_SHOTGUN:
				message = "was gunned down by";
				if(New_Death_Messages)
					message2 = "'s shotgun"; //bat
				break;

			case MOD_SSHOTGUN:
				message = "was blown away by";
				message2 = "'s super shotgun";
				break;

			case MOD_MACHINEGUN:
				message = "was machinegunned by";
				if(New_Death_Messages)
					message2 = "'s machinegun";	//bat
				break;

			case MOD_CHAINGUN:
				message = "was cut in half by";
				message2 = "'s chaingun";
				break;

			case MOD_GRENADE:
				message = "was popped by";
				message2 = "'s grenade";
				break;
			case MOD_G_SPLASH:
				message = "was shredded by";
				message2 = "'s shrapnel";
				break;

			case MOD_ROCKET:
				message = "ate";
				message2 = "'s rocket";
				break;
			case MOD_R_SPLASH:
				message = "almost dodged";
				message2 = "'s rocket";
				break;

			case MOD_HYPERBLASTER:
				message = "was melted by";
				message2 = "'s hyperblaster";
				break;
			case MOD_RAILGUN:
				message = "was railed by";
				if(New_Death_Messages)
					message2 = "'s railgun"; //bat
				break;

			case MOD_BFG_LASER:
				message = "saw the pretty lights from";
				message2 = "'s BFG";
				break;

			case MOD_BFG_BLAST:
				message = "was disintegrated by";
				message2 = "'s BFG blast";
				break;

			case MOD_BFG_EFFECT:
				message = "couldn't hide from";
				message2 = "'s BFG";
				break;

// SKWiD MOD
			case MOD_PLASMA:
				message = "got an infusion of plasma from";
				if(New_Death_Messages)
					message2 = "'s plasma rifle";
				break;
// END
			case MOD_HANDGRENADE:
				message = "caught";
				message2 = "'s handgrenade";
				break;

			case MOD_HG_SPLASH:
				message = "didn't see";
				message2 = "'s handgrenade";
				break;

			case MOD_HELD_GRENADE:
				message = "feels";
				if(New_Death_Messages)
					message2 = "'s paingrenade";
				else
					message2 = "'s pain";
				break;

			case MOD_TELEFRAG:
				message = "tried to invade";
				message2 = "'s personal space";
				break;

			case MOD_CTF_GRAPPLE:
				message = "was gored by";
				message2 = "'s grappling hook";
				break;
			}

			if (message)
			{
				if((int)ctfflags->value & CTF_RANDOM_DEATH_MSG)
				{
					Gimme_Any_Death_Message();
					message = &Death_Msg_String[0];
				}
				
				
				sprintf(msg, "%s %s %s%s\n", self->client->pers.netname, message, attacker->client->pers.netname, message2);

				ctf_BSafePrint(PRINT_HIGH, msg);
				if (deathmatch->value)
				{
					if (ff && matchstate == MATCH_RAILGUN_INPLAY)
					{
						stats_add(attacker, STATS_SCORE, -1);
						stats_add(attacker, STATS_DEATHS, 1);
						attacker->client->resp.score--;
					}
					else
					{
						stats_add(attacker, STATS_SCORE, 1);
						stats_add(attacker, STATS_FRAGS, 1);
						attacker->client->resp.score++;
					}
				}
				return;
			}
		}
	 }
	 

	 sprintf(msg, "%s died.\n", self->client->pers.netname);
	 ctf_BSafePrint(PRINT_HIGH, msg);
	 if (deathmatch->value)
	 {
		 self->client->resp.score--;
		 stats_add(self, STATS_SCORE, -1);
		 stats_add(self, STATS_DEATHS, 1);
	 }
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x208, %rsp            # imm = 0x208
movq 0x26a1a(%rip), %rax     # 0x69b58
movq (%rax), %rax
cvttss2si 0x20(%rax), %ebp
movq %rdx, %r14
movq %rdi, %rbx
movq 0x58(%rdi), %rdi
testq %rdi, %rdi
je 0x43174
addq $0xc0, %rdi
leaq 0x17537(%rip), %rsi     # 0x5a69a
callq 0x18bb0
movb (%rax), %al
addb $-0x46, %al
testb $-0x21, %al
setne %r13b
jmp 0x43177
movb $0x1, %r13b
movq 0x26de2(%rip), %rax     # 0x69f60
movq (%rax), %rax
movss 0x20(%rax), %xmm0
xorps %xmm1, %xmm1
ucomiss %xmm1, %xmm0
jne 0x43190
jnp 0x431a2
cmpq $0x0, 0x58(%r14)
je 0x431a2
movq 0x2698a(%rip), %rax     # 0x69b28
orb $0x8, 0x3(%rax)
ucomiss %xmm1, %xmm0
movq 0x26d14(%rip), %rsi     # 0x69ec0
jne 0x4323f
jp 0x4323f
movq (%rsi), %rax
movss 0x20(%rax), %xmm0
ucomiss %xmm1, %xmm0
jne 0x4323f
jp 0x4323f
movl $0x2c0, %edx            # imm = 0x2C0
addq 0x58(%rbx), %rdx
movq %rsi, %r15
leaq 0x17dec(%rip), %rsi     # 0x5afc6
movq %rsp, %r14
movq %r14, %rdi
xorl %eax, %eax
callq 0x19700
movl $0x2, %edi
movq %r14, %rsi
callq 0x19270
movq (%r15), %rax
movss 0x20(%rax), %xmm0
xorps %xmm1, %xmm1
ucomiss %xmm1, %xmm0
jne 0x4320a
jnp 0x4348c
movq 0x58(%rbx), %rax
decl 0xdf4(%rax)
movq %rbx, %rdi
movl $0x3, %esi
movq $-0x1, %rdx
callq 0x19330
movl $0x1, %edx
movq %rbx, %rdi
movl $0x6, %esi
callq 0x19330
jmp 0x4348c
movq 0x268e2(%rip), %rax     # 0x69b28
movl (%rax), %r8d
movl %r8d, %r12d
andl $0xf7ffffff, %r12d      # imm = 0xF7FFFFFF
leal -0x11(%r12), %eax
cmpl $0x10, %eax
ja 0x4326c
movl %eax, %eax
leaq 0x25f02(%rip), %rcx     # 0x69168
movq (%rcx,%rax,8), %r15
jmp 0x4326f
xorl %r15d, %r15d
cmpq %rbx, %r14
jne 0x433f7
leal -0x7(%r12), %eax
cmpl $0x9, %eax
ja 0x432d5
leaq 0x172d3(%rip), %rcx     # 0x5a55c
movslq (%rcx,%rax,4), %rax
addq %rcx, %rax
jmpq *%rax
movq 0x58(%rbx), %rdi
testq %rdi, %rdi
je 0x4337e
movl %r8d, %r15d
addq $0xc0, %rdi
leaq 0x173ea(%rip), %rsi     # 0x5a69a
callq 0x18bb0
movb (%rax), %cl
addb $-0x46, %cl
cmpb $0x27, %cl
ja 0x43382
movabsq $0x8100000081, %rax     # imm = 0x8100000081
shrq %cl, %rax
jmp 0x43384
cmpl $0x18, %r12d
je 0x43375
cmpl $0x22, %r12d
jne 0x432f1
leaq 0x17a66(%rip), %r15     # 0x5ad52
jmp 0x433f7
movq 0x58(%rbx), %rdi
testq %rdi, %rdi
je 0x433a5
movl %r8d, %r15d
addq $0xc0, %rdi
leaq 0x1738b(%rip), %rsi     # 0x5a69a
callq 0x18bb0
movb (%rax), %cl
addb $-0x46, %cl
cmpb $0x27, %cl
ja 0x433ad
movabsq $0x8100000081, %rax     # imm = 0x8100000081
shrq %cl, %rax
jmp 0x433af
leaq 0x179fb(%rip), %r15     # 0x5ad33
jmp 0x433f7
movq 0x58(%rbx), %rdi
testq %rdi, %rdi
je 0x433a9
movl %r8d, %r15d
addq $0xc0, %rdi
leaq 0x17343(%rip), %rsi     # 0x5a69a
callq 0x18bb0
movb (%rax), %cl
addb $-0x46, %cl
cmpb $0x27, %cl
ja 0x433d0
movabsq $0x8100000081, %rax     # imm = 0x8100000081
shrq %cl, %rax
jmp 0x433d2
leaq 0x1791a(%rip), %r15     # 0x5ac96
jmp 0x433f7
movb $0x1, %al
jmp 0x43387
xorl %eax, %eax
movl %r15d, %r8d
leaq 0x1795b(%rip), %rcx     # 0x5ace9
leaq 0x17939(%rip), %rdx     # 0x5acce
testb %r13b, %r13b
cmovneq %rcx, %rdx
leaq 0x17910(%rip), %r15     # 0x5acb3
jmp 0x433f1
movb $0x1, %al
jmp 0x433b2
movb $0x1, %al
jmp 0x433d5
xorl %eax, %eax
movl %r15d, %r8d
leaq 0x179c4(%rip), %rcx     # 0x5ad7d
leaq 0x179ae(%rip), %rdx     # 0x5ad6e
testb %r13b, %r13b
cmovneq %rcx, %rdx
leaq 0x17992(%rip), %r15     # 0x5ad60
jmp 0x433f1
xorl %eax, %eax
movl %r15d, %r8d
leaq 0x17947(%rip), %rcx     # 0x5ad23
leaq 0x17930(%rip), %rdx     # 0x5ad13
testb %r13b, %r13b
cmovneq %rcx, %rdx
leaq 0x17913(%rip), %r15     # 0x5ad04
testb $0x1, %al
cmovneq %rdx, %r15
testq %r15, %r15
je 0x4349e
xorl %eax, %eax
callq 0x19000
testl %eax, %eax
je 0x43481
movl $0x2c0, %edx            # imm = 0x2C0
addq 0x58(%rbx), %rdx
leaq 0x17971(%rip), %rsi     # 0x5ad8c
movq %rsp, %r14
movq %r14, %rdi
movq %r15, %rcx
xorl %eax, %eax
callq 0x19700
movl $0x2, %edi
movq %r14, %rsi
callq 0x19270
movq 0x26a81(%rip), %rax     # 0x69ec0
movq (%rax), %rax
movss 0x20(%rax), %xmm0
xorps %xmm1, %xmm1
ucomiss %xmm1, %xmm0
jne 0x43451
jnp 0x43481
movq 0x58(%rbx), %rax
decl 0xdf4(%rax)
movq %rbx, %rdi
movl $0x3, %esi
movq $-0x1, %rdx
callq 0x19330
movl $0x1, %edx
movq %rbx, %rdi
movl $0x6, %esi
callq 0x19330
movq $0x0, 0x2a0(%rbx)
addq $0x208, %rsp            # imm = 0x208
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movq %r14, 0x2a0(%rbx)
testq %r14, %r14
movq 0x26a11(%rip), %rsi     # 0x69ec0
je 0x431c7
cmpq $0x0, 0x58(%r14)
je 0x431c7
movb $0x1, %al
leaq 0x11a3c(%rip), %r13     # 0x54f05
xorl %r15d, %r15d
leal -0x1(%r12), %ecx
cmpl $0x21, %ecx
ja 0x43508
leaq 0x170a7(%rip), %rdx     # 0x5a584
movslq (%rdx,%rcx,4), %rcx
addq %rdx, %rcx
jmpq *%rcx
btl $0xe, %ebp
leaq 0x11a14(%rip), %rax     # 0x54f05
leaq 0x178ab(%rip), %r13     # 0x5ada3
cmovaeq %rax, %r13
leaq 0x17891(%rip), %r15     # 0x5ad94
jmp 0x43694
cmpl $0x3c, %r12d
jne 0x43696
leaq 0x17a82(%rip), %r15     # 0x5af9b
leaq 0x17a88(%rip), %r13     # 0x5afa8
jmp 0x43694
btl $0xe, %ebp
leaq 0x119d5(%rip), %rax     # 0x54f05
leaq 0x179f4(%rip), %r13     # 0x5af2b
cmovaeq %rax, %r13
leaq 0x179ca(%rip), %r15     # 0x5af0c
jmp 0x43694
leaq 0x17a2b(%rip), %r15     # 0x5af79
leaq 0x17a34(%rip), %r13     # 0x5af89
jmp 0x43694
leaq 0x178e9(%rip), %r15     # 0x5ae4a
leaq 0x178f2(%rip), %r13     # 0x5ae5a
jmp 0x43694
leaq 0x178bd(%rip), %r15     # 0x5ae31
leaq 0x178c4(%rip), %r13     # 0x5ae3f
jmp 0x43694
leaq 0x179b4(%rip), %r15     # 0x5af3b
jmp 0x435a3
leaq 0x17882(%rip), %r15     # 0x5ae12
leaq 0x1788e(%rip), %r13     # 0x5ae25
jmp 0x43694
leaq 0x179ae(%rip), %r15     # 0x5af51
leaq 0x17998(%rip), %r13     # 0x5af42
jmp 0x43694
leaq 0x17943(%rip), %r15     # 0x5aef9
jmp 0x435bf
leaq 0x178f6(%rip), %r15     # 0x5aeb5
leaq 0x1790a(%rip), %r13     # 0x5aed0
jmp 0x43694
btl $0xe, %ebp
leaq 0x1192f(%rip), %rax     # 0x54f05
leaq 0x177e4(%rip), %r13     # 0x5adc1
cmovaeq %rax, %r13
leaq 0x177c6(%rip), %r15     # 0x5adae
jmp 0x43694
btl $0xe, %ebp
leaq 0x1190d(%rip), %rax     # 0x54f05
leaq 0x17805(%rip), %r13     # 0x5ae04
cmovaeq %rax, %r13
leaq 0x177e5(%rip), %r15     # 0x5adef
jmp 0x43694
leaq 0x177b6(%rip), %r15     # 0x5adcc
leaq 0x177c1(%rip), %r13     # 0x5adde
jmp 0x43694
btl $0xe, %ebp
leaq 0x17947(%rip), %rax     # 0x5af71
leaq 0x17931(%rip), %r13     # 0x5af62
cmovaeq %rax, %r13
leaq 0x17920(%rip), %r15     # 0x5af5c
jmp 0x43694
btl $0xe, %ebp
leaq 0x118bc(%rip), %rax     # 0x54f05
leaq 0x1785a(%rip), %r13     # 0x5aeaa
cmovaeq %rax, %r13
leaq 0x17841(%rip), %r15     # 0x5ae9c
jmp 0x43694
leaq 0x155c3(%rip), %r15     # 0x58c27
jmp 0x4366d
leaq 0x17803(%rip), %r15     # 0x5ae70
leaq 0x177f2(%rip), %r13     # 0x5ae66
jmp 0x43694
leaq 0x1785a(%rip), %r15     # 0x5aed7
leaq 0x17868(%rip), %r13     # 0x5aeec
jmp 0x43694
leaq 0x177f1(%rip), %r15     # 0x5ae7e
leaq 0x177f8(%rip), %r13     # 0x5ae8c
xorl %eax, %eax
testb %al, %al
jne 0x431c7
movl %r8d, %ebp
movq 0x264b0(%rip), %rax     # 0x69b58
movq (%rax), %rax
cvttss2si 0x20(%rax), %eax
btl $0xe, %eax
jae 0x436f2
callq 0x19a20
cltq
imulq $0x2e8ba2e9, %rax, %rcx # imm = 0x2E8BA2E9
movq %rcx, %rdx
shrq $0x3f, %rdx
sarq $0x23, %rcx
addl %edx, %ecx
imull $0x2c, %ecx, %ecx
subl %ecx, %eax
cltq
movq 0x260b9(%rip), %rcx     # 0x69798
movq (%rcx,%rax,8), %rsi
movq 0x261ee(%rip), %r15     # 0x698d8
movq %r15, %rdi
callq 0x182a0
movl $0x2c0, %r8d            # imm = 0x2C0
movq 0x58(%rbx), %rdx
addq %r8, %rdx
addq 0x58(%r14), %r8
leaq 0x178b0(%rip), %rsi     # 0x5afba
movq %rsp, %rbx
movq %rbx, %rdi
movq %r15, %rcx
movq %r13, %r9
xorl %eax, %eax
callq 0x19700
movl $0x2, %edi
movq %rbx, %rsi
callq 0x19270
movq 0x2678f(%rip), %rax     # 0x69ec0
movq (%rax), %rax
movss 0x20(%rax), %xmm0
xorps %xmm1, %xmm1
ucomiss %xmm1, %xmm0
jne 0x43747
jnp 0x4348c
btl $0x1b, %ebp
jae 0x4378e
movq 0x26084(%rip), %rax     # 0x697d8
cmpl $0x6, (%rax)
jne 0x4378e
movq %r14, %rdi
movl $0x3, %esi
movq $-0x1, %rdx
callq 0x19330
movl $0x1, %edx
movq %r14, %rdi
movl $0x6, %esi
callq 0x19330
movq 0x58(%r14), %rax
decl 0xdf4(%rax)
jmp 0x4348c
movl $0x1, %edx
movq %r14, %rdi
movl $0x3, %esi
callq 0x19330
movl $0x1, %edx
movq %r14, %rdi
movl $0x5, %esi
callq 0x19330
movq 0x58(%r14), %rax
incl 0xdf4(%rax)
jmp 0x4348c