// File: /workspace/github_c_makefile_star2_O0/QwazyWabbitWOS[P]lmctf60/p_view.c
// Function: ClientEndServerFrame
void ClientEndServerFrame (edict_t *ent)
{
	float	bobtime;
	int		i;

	current_player = ent;
	current_client = ent->client;
	
	// Paril
	if (!GamePaused())
	{
	// Paril
		if (ent->client->hookstate) // We are still grappled
		{
			Weapon_Hook_Fire(ent);
		}

		//
		// If the origin or velocity have changed since ClientThink(),
		// update the pmove values.  This will happen when the client
		// is pushed by a bmodel or kicked by an explosion.
		// 
		// If it wasn't updated here, the view position would lag a frame
		// behind the body position when pushed -- "sinking into plats"
		//
		for (i=0 ; i<3 ; i++)
		{
			current_client->ps.pmove.origin[i] = ent->s.origin[i]*8.0;
			current_client->ps.pmove.velocity[i] = ent->velocity[i]*8.0;
		}

		//
		// If the end of unit layout is displayed, don't give
		// the player any normal movement attributes
		//
		if (level.intermissiontime)
		{
			// FIXME: add view drifting here?
			current_client->ps.blend[3] = 0;
			current_client->ps.fov = 90;
			G_SetStats (ent);
			return;
		}

		AngleVectors (ent->client->v_angle, forward, right, up);

		// burn from lava, etc
		P_WorldEffects ();

		//
		// set model angles from view angles so other things in
		// the world can tell which direction you are looking
		//
		if (ent->client->v_angle[PITCH] > 180)
			ent->s.angles[PITCH] = (-360 + ent->client->v_angle[PITCH])/3;
		else
			ent->s.angles[PITCH] = ent->client->v_angle[PITCH]/3;
		ent->s.angles[YAW] = ent->client->v_angle[YAW];
		ent->s.angles[ROLL] = 0;
		ent->s.angles[ROLL] = SV_CalcRoll (ent->s.angles, ent->velocity)*4;

		//
		// calculate speed and cycle to be used for
		// all cyclic walking effects
		//
		xyspeed = sqrtf(ent->velocity[0]*ent->velocity[0] + ent->velocity[1]*ent->velocity[1]);

		if (xyspeed < 5)
		{
			bobmove = 0;
			current_client->bobtime = 0;	// start at beginning of cycle again
		}
		else if (ent->groundentity)
		{	// so bobbing only cycles when on ground
			if (xyspeed > 210)
				bobmove = 0.25;
			else if (xyspeed > 100)
				bobmove = 0.125;
			else
				bobmove = 0.0625;
		}
	
		bobtime = (current_client->bobtime += bobmove);

		if (current_client->ps.pmove.pm_flags & PMF_DUCKED)
			bobtime *= 4;

		bobcycle = (int)bobtime;
		bobfracsin = fabs(sin(bobtime*M_PI));

		// detect hitting the floor
		P_FallingDamage (ent);

		// apply all the damage taken this frame
		P_DamageFeedback (ent);

		// determine the view offsets
		SV_CalcViewOffset (ent);

		// determine the gun offsets
		SV_CalcGunOffset (ent);

		// determine the full screen color blend
		// must be after viewoffset, so eye contents can be
		// accurately determined
		// FIXME: with client prediction, the contents
		// should be determined by the client
		SV_CalcBlend (ent);
	// Paril
	}
	// Paril

	// chase cam stuff
	if (ent->client->resp.spectator)
		G_SetSpectatorStats(ent);
	else
		G_SetStats (ent);

	G_CheckChaseStats(ent);
	
	// Paril
	if (!GamePaused())
	{
	// Paril
		G_SetClientEvent (ent);

		G_SetClientEffects (ent);

		G_SetClientSound (ent);

		G_SetClientFrame (ent);

		VectorCopy (ent->velocity, ent->client->oldvelocity);
		VectorCopy (ent->client->ps.viewangles, ent->client->oldviewangles);

		// clear weapon kicks
		VectorClear (ent->client->kick_origin);
		VectorClear (ent->client->kick_angles);
	// Paril
	}
	// Paril
	
	if (ent->client->showscores &&  deathmatch->value)
	{
		if (!(level.framenum & 31) )
		{
			DeathmatchScoreboardMessage (ent, ent->enemy);
			gi.unicast (ent, false);
		}
	}
// ADC
	else if (ent->client->showsquadboard && deathmatch->value)
	{
		if (!(level.framenum & 31) )
		{
			SquadboardMessage (ent, ent->enemy);
			gi.unicast (ent, false);
		}
	}
// ADC
	else if (ent->client->showmod)
	{
		if (!(level.framenum & 7))
			ClientShowMOD(ent);
	}
	else 
		ClientShowID(ent, NULL); 
	
	// Paril
	if (GamePaused())
	{
		ent->s.sound = 0;
	}
	// Paril
// END CTF CODE -- LM_CTF
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x10, %rsp
movq %rdi, -0x8(%rbp)
movq -0x8(%rbp), %rax
movq %rax, 0x4e5f9(%rip)     # 0xb3250
movq -0x8(%rbp), %rax
movq 0x58(%rax), %rax
movq %rax, 0x4e5f2(%rip)     # 0xb3258
movb $0x0, %al
callq 0x18160
cmpl $0x0, %eax
jne 0x65003
movq -0x8(%rbp), %rax
movq 0x58(%rax), %rax
cmpl $0x0, 0xf40(%rax)
je 0x64c90
movq -0x8(%rbp), %rdi
callq 0x19d90
movl $0x0, -0x10(%rbp)
cmpl $0x3, -0x10(%rbp)
jge 0x64d09
movq -0x8(%rbp), %rax
movslq -0x10(%rbp), %rcx
movss 0x4(%rax,%rcx,4), %xmm0
cvtss2sd %xmm0, %xmm0
movsd 0xfa39(%rip), %xmm1     # 0x746f0
mulsd %xmm1, %xmm0
cvttsd2si %xmm0, %eax
movw %ax, %dx
movq 0x4e58f(%rip), %rax     # 0xb3258
movw %dx, 0x4(%rax,%rcx,2)
movq -0x8(%rbp), %rax
movslq -0x10(%rbp), %rcx
movss 0x1c0(%rax,%rcx,4), %xmm0
cvtss2sd %xmm0, %xmm0
mulsd %xmm1, %xmm0
cvttsd2si %xmm0, %eax
movw %ax, %dx
movq 0x4e563(%rip), %rax     # 0xb3258
movslq -0x10(%rbp), %rcx
movw %dx, 0xa(%rax,%rcx,2)
movl -0x10(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x10(%rbp)
jmp 0x64c97
movq 0x1e090(%rip), %rax     # 0x82da0
movss 0xc8(%rax), %xmm0
xorps %xmm1, %xmm1
ucomiss %xmm1, %xmm0
jne 0x64d24
jp 0x64d24
jmp 0x64d55
movq 0x4e52d(%rip), %rax     # 0xb3258
xorps %xmm0, %xmm0
movss %xmm0, 0x6c(%rax)
movq 0x4e51e(%rip), %rax     # 0xb3258
movss 0xc6e2(%rip), %xmm0     # 0x71424
movss %xmm0, 0x70(%rax)
movq -0x8(%rbp), %rdi
callq 0x19a60
jmp 0x652ac
movq -0x8(%rbp), %rax
movq 0x58(%rax), %rdi
addq $0xebc, %rdi            # imm = 0xEBC
leaq 0x4e4bd(%rip), %rsi     # 0xb3228
leaq 0x4e4a6(%rip), %rdx     # 0xb3218
leaq 0x4e4c7(%rip), %rcx     # 0xb3240
callq 0x183e0
callq 0x191b0
movq -0x8(%rbp), %rax
movq 0x58(%rax), %rax
movss 0xebc(%rax), %xmm0
movss 0x11649(%rip), %xmm1    # 0x763e4
ucomiss %xmm1, %xmm0
jbe 0x64dcf
movq -0x8(%rbp), %rax
movq 0x58(%rax), %rax
movss 0x12a98(%rip), %xmm0    # 0x77848
addss 0xebc(%rax), %xmm0
movss 0xb150(%rip), %xmm1     # 0x6ff10
divss %xmm1, %xmm0
movq -0x8(%rbp), %rax
movss %xmm0, 0x10(%rax)
jmp 0x64df4
movq -0x8(%rbp), %rax
movq 0x58(%rax), %rax
movss 0xebc(%rax), %xmm0
movss 0xb129(%rip), %xmm1     # 0x6ff10
divss %xmm1, %xmm0
movq -0x8(%rbp), %rax
movss %xmm0, 0x10(%rax)
movq -0x8(%rbp), %rax
movq 0x58(%rax), %rax
movss 0xec0(%rax), %xmm0
movq -0x8(%rbp), %rax
movss %xmm0, 0x14(%rax)
movq -0x8(%rbp), %rax
xorps %xmm0, %xmm0
movss %xmm0, 0x18(%rax)
movq -0x8(%rbp), %rdi
addq $0x10, %rdi
movq -0x8(%rbp), %rsi
addq $0x1c0, %rsi            # imm = 0x1C0
callq 0x18d20
movss 0xb0d3(%rip), %xmm1     # 0x6ff0c
mulss %xmm1, %xmm0
movq -0x8(%rbp), %rax
movss %xmm0, 0x18(%rax)
movq -0x8(%rbp), %rax
movss 0x1c0(%rax), %xmm0
movq -0x8(%rbp), %rax
movss 0x1c0(%rax), %xmm2
movq -0x8(%rbp), %rax
movss 0x1c4(%rax), %xmm1
movq -0x8(%rbp), %rax
mulss 0x1c4(%rax), %xmm1
mulss %xmm2, %xmm0
addss %xmm1, %xmm0
callq 0x19000
movq 0x1e0be(%rip), %rax     # 0x82f48
movss %xmm0, (%rax)
movss 0xb072(%rip), %xmm0     # 0x6ff08
movq 0x1e0ab(%rip), %rax     # 0x82f48
ucomiss (%rax), %xmm0
jbe 0x64ec7
movq 0x1df9f(%rip), %rax     # 0x82e48
xorps %xmm0, %xmm0
movss %xmm0, (%rax)
movq 0x4e3a1(%rip), %rax     # 0xb3258
xorps %xmm0, %xmm0
movss %xmm0, 0xec8(%rax)
jmp 0x64f48
movq -0x8(%rbp), %rax
cmpq $0x0, 0x2b8(%rax)
je 0x64f46
movq 0x1e06c(%rip), %rax     # 0x82f48
movss (%rax), %xmm0
movss 0x12964(%rip), %xmm1    # 0x7784c
ucomiss %xmm1, %xmm0
jbe 0x64f02
movq 0x1df54(%rip), %rax     # 0x82e48
movss 0xb598(%rip), %xmm0     # 0x70494
movss %xmm0, (%rax)
jmp 0x64f44
movq 0x1e03f(%rip), %rax     # 0x82f48
movss (%rax), %xmm0
movss 0xdc6b(%rip), %xmm1     # 0x72b80
ucomiss %xmm1, %xmm0
jbe 0x64f2f
movq 0x1df27(%rip), %rax     # 0x82e48
movss 0x1292b(%rip), %xmm0    # 0x77854
movss %xmm0, (%rax)
jmp 0x64f42
movq 0x1df12(%rip), %rax     # 0x82e48
movss 0x12912(%rip), %xmm0    # 0x77850
movss %xmm0, (%rax)
jmp 0x64f44
jmp 0x64f46
jmp 0x64f48
movq 0x1def9(%rip), %rax     # 0x82e48
movss (%rax), %xmm0
movq 0x4e2fe(%rip), %rax     # 0xb3258
addss 0xec8(%rax), %xmm0
movss %xmm0, 0xec8(%rax)
movss %xmm0, -0xc(%rbp)
movq 0x4e2e2(%rip), %rax     # 0xb3258
movzbl 0x10(%rax), %eax
andl $0x1, %eax
cmpl $0x0, %eax
je 0x64f94
movss 0xaf82(%rip), %xmm0     # 0x6ff0c
mulss -0xc(%rbp), %xmm0
movss %xmm0, -0xc(%rbp)
cvttss2si -0xc(%rbp), %ecx
movq 0x1dbf0(%rip), %rax     # 0x82b90
movl %ecx, (%rax)
movss -0xc(%rbp), %xmm0
cvtss2sd %xmm0, %xmm0
movsd 0x11165(%rip), %xmm1    # 0x76118
mulsd %xmm1, %xmm0
callq 0x19770
movaps 0xdbdd(%rip), %xmm1     # 0x72ba0
pand %xmm1, %xmm0
cvtsd2ss %xmm0, %xmm0
movq 0x1dca6(%rip), %rax     # 0x82c78
movss %xmm0, (%rax)
movq -0x8(%rbp), %rdi
callq 0x18620
movq -0x8(%rbp), %rdi
callq 0x18340
movq -0x8(%rbp), %rdi
callq 0x190a0
movq -0x8(%rbp), %rdi
callq 0x19a50
movq -0x8(%rbp), %rdi
callq 0x19310
movq -0x8(%rbp), %rax
movq 0x58(%rax), %rax
cmpl $0x0, 0xe04(%rax)
je 0x6501f
movq -0x8(%rbp), %rdi
callq 0x196f0
jmp 0x65028
movq -0x8(%rbp), %rdi
callq 0x19a60
movq -0x8(%rbp), %rdi
callq 0x19c20
movb $0x0, %al
callq 0x18160
cmpl $0x0, %eax
jne 0x65182
movq -0x8(%rbp), %rdi
callq 0x19150
movq -0x8(%rbp), %rdi
callq 0x18270
movq -0x8(%rbp), %rdi
callq 0x18d90
movq -0x8(%rbp), %rdi
callq 0x187b0
movq -0x8(%rbp), %rax
movss 0x1c0(%rax), %xmm0
movq -0x8(%rbp), %rax
movq 0x58(%rax), %rax
movss %xmm0, 0xed8(%rax)
movq -0x8(%rbp), %rax
movss 0x1c4(%rax), %xmm0
movq -0x8(%rbp), %rax
movq 0x58(%rax), %rax
movss %xmm0, 0xedc(%rax)
movq -0x8(%rbp), %rax
movss 0x1c8(%rax), %xmm0
movq -0x8(%rbp), %rax
movq 0x58(%rax), %rax
movss %xmm0, 0xee0(%rax)
movq -0x8(%rbp), %rax
movq 0x58(%rax), %rax
movss 0x1c(%rax), %xmm0
movq -0x8(%rbp), %rax
movq 0x58(%rax), %rax
movss %xmm0, 0xecc(%rax)
movq -0x8(%rbp), %rax
movq 0x58(%rax), %rax
movss 0x20(%rax), %xmm0
movq -0x8(%rbp), %rax
movq 0x58(%rax), %rax
movss %xmm0, 0xed0(%rax)
movq -0x8(%rbp), %rax
movq 0x58(%rax), %rax
movss 0x24(%rax), %xmm0
movq -0x8(%rbp), %rax
movq 0x58(%rax), %rax
movss %xmm0, 0xed4(%rax)
movq -0x8(%rbp), %rax
movq 0x58(%rax), %rax
xorps %xmm0, %xmm0
movss %xmm0, 0xe90(%rax)
movq -0x8(%rbp), %rax
movq 0x58(%rax), %rax
xorps %xmm0, %xmm0
movss %xmm0, 0xe8c(%rax)
movq -0x8(%rbp), %rax
movq 0x58(%rax), %rax
xorps %xmm0, %xmm0
movss %xmm0, 0xe88(%rax)
movq -0x8(%rbp), %rax
movq 0x58(%rax), %rax
xorps %xmm0, %xmm0
movss %xmm0, 0xe84(%rax)
movq -0x8(%rbp), %rax
movq 0x58(%rax), %rax
xorps %xmm0, %xmm0
movss %xmm0, 0xe80(%rax)
movq -0x8(%rbp), %rax
movq 0x58(%rax), %rax
xorps %xmm0, %xmm0
movss %xmm0, 0xe7c(%rax)
movq -0x8(%rbp), %rax
movq 0x58(%rax), %rax
cmpl $0x0, 0xe24(%rax)
je 0x651ee
movq 0x1dd26(%rip), %rax     # 0x82ec0
movq (%rax), %rax
movss 0x20(%rax), %xmm0
xorps %xmm1, %xmm1
ucomiss %xmm1, %xmm0
jne 0x651ae
jp 0x651ae
jmp 0x651ee
movq 0x1dbeb(%rip), %rax     # 0x82da0
movl (%rax), %eax
andl $0x1f, %eax
cmpl $0x0, %eax
jne 0x651e9
movq -0x8(%rbp), %rdi
movq -0x8(%rbp), %rax
movq 0x2a0(%rax), %rsi
callq 0x18be0
movq 0x1d426(%rip), %rax     # 0x82600
movq 0xb8(%rax), %rax
movq -0x8(%rbp), %rdi
xorl %esi, %esi
callq *%rax
jmp 0x65295
movq -0x8(%rbp), %rax
movq 0x58(%rax), %rax
cmpl $0x0, 0xe34(%rax)
je 0x65257
movq 0x1dcba(%rip), %rax     # 0x82ec0
movq (%rax), %rax
movss 0x20(%rax), %xmm0
xorps %xmm1, %xmm1
ucomiss %xmm1, %xmm0
jne 0x6521a
jp 0x6521a
jmp 0x65257
movq 0x1db7f(%rip), %rax     # 0x82da0
movl (%rax), %eax
andl $0x1f, %eax
cmpl $0x0, %eax
jne 0x65255
movq -0x8(%rbp), %rdi
movq -0x8(%rbp), %rax
movq 0x2a0(%rax), %rsi
callq 0x180e0
movq 0x1d3ba(%rip), %rax     # 0x82600
movq 0xb8(%rax), %rax
movq -0x8(%rbp), %rdi
xorl %esi, %esi
callq *%rax
jmp 0x65293
movq -0x8(%rbp), %rax
movq 0x58(%rax), %rax
cmpl $0x0, 0xf74(%rax)
je 0x65284
movq 0x1db31(%rip), %rax     # 0x82da0
movl (%rax), %eax
andl $0x7, %eax
cmpl $0x0, %eax
jne 0x65282
movq -0x8(%rbp), %rdi
callq 0x18320
jmp 0x65291
movq -0x8(%rbp), %rdi
xorl %eax, %eax
movl %eax, %esi
callq 0x188d0
jmp 0x65293
jmp 0x65295
movb $0x0, %al
callq 0x18160
cmpl $0x0, %eax
je 0x652ac
movq -0x8(%rbp), %rax
movl $0x0, 0x4c(%rax)
addq $0x10, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)