// File: /workspace/github_c_makefile_star2_O1/QwazyWabbitWOS[P]lmctf60/p_client.c
// Function: ClientUserinfoChanged
void ClientUserinfoChanged (edict_t *ent, char *userinfo)
{
	char	*s, *skin;
	int 	playernum;
	
	// check for malformed or illegal info strings
	if (!Info_Validate(userinfo))
	{
		strcpy (userinfo, "\\name\\badinfo\\skin\\male/grunt");
	}

	// set name
	s = Info_ValueForKey (userinfo, "name");
	strncpy (ent->client->pers.netname, s, sizeof(ent->client->pers.netname)-1);
	stats_set_name(ent, ent->client->pers.netname);
	
	strcpy (ent->client->pers.squad, "Uncommitted"); // ADC
	strcpy (ent->client->pers.squadStatus, "Unknown"); // ADC

	// set spectator
	s = Info_ValueForKey (userinfo, "spectator");
	// spectators are only supported in deathmatch
	if (deathmatch->value && *s && strcmp(s, "0"))
		ent->client->pers.spectator = true;
	else
		ent->client->pers.spectator = false;


	// set skin
	skin = Info_ValueForKey (userinfo, "skin");

	playernum = ent-g_edicts-1;

	// combine name and skin into a configstring
	gi.configstring (CS_PLAYERSKINS+playernum, va("%s\\%s", ent->client->pers.netname, skin) );

	// fov
	if (deathmatch->value && ((int)dmflags->value & DF_FIXED_FOV))
	{
		ent->client->ps.fov = 90;
	}
	else
	{
		ent->client->ps.fov = atoi(Info_ValueForKey(userinfo, "fov"));
		if (ent->client->ps.fov < 1)
			ent->client->ps.fov = 90;
		else if (ent->client->ps.fov > 160)
			ent->client->ps.fov = 160;
	}

	// handedness
	s = Info_ValueForKey (userinfo, "hand");
	if (strlen(s))
	{
		ent->client->pers.hand = atoi(s);
	}

	// save off the userinfo in case we want to check something later
	strncpy (ent->client->pers.userinfo, userinfo, sizeof(ent->client->pers.userinfo)-1);
	
	ClientSetSkin(ent, skin);
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movq %rsi, %r14
movq %rdi, %rbx
movq %rsi, %rdi
callq 0x182b0
testl %eax, %eax
jne 0x45fac
movups 0x15284(%rip), %xmm0    # 0x5b220
movups %xmm0, 0xe(%r14)
movups 0x1526a(%rip), %xmm0    # 0x5b212
movups %xmm0, (%r14)
leaq 0x12c6a(%rip), %rsi     # 0x58c1d
movq %r14, %rdi
callq 0x18bb0
movl $0x2c0, %r15d           # imm = 0x2C0
movq 0x58(%rbx), %rdi
addq %r15, %rdi
movl $0xf, %edx
movq %rax, %rsi
callq 0x181c0
addq 0x58(%rbx), %r15
movq %rbx, %rdi
movq %r15, %rsi
callq 0x19870
movq 0x58(%rbx), %rax
movabsq $0x74696d6d6f636e55, %rcx # imm = 0x74696D6D6F636E55
movq %rcx, 0x2d0(%rax)
movl $0x646574, 0x2d8(%rax)  # imm = 0x646574
movq 0x58(%rbx), %rax
movabsq $0x6e776f6e6b6e55, %rcx # imm = 0x6E776F6E6B6E55
movq %rcx, 0x2e0(%rax)
leaq 0x150bb(%rip), %rsi     # 0x5b0da
movq %r14, %rdi
callq 0x18bb0
movq 0x23e92(%rip), %r12     # 0x69ec0
movq (%r12), %rcx
movss 0x20(%rcx), %xmm0
xorps %xmm1, %xmm1
ucomiss %xmm1, %xmm0
jne 0x46041
jnp 0x4605e
cmpb $0x0, (%rax)
je 0x4605e
leaq 0x15d2f(%rip), %rsi     # 0x5bd7c
movq %rax, %rdi
callq 0x18b20
movl $0x1, %ecx
testl %eax, %eax
jne 0x46060
xorl %ecx, %ecx
movq 0x58(%rbx), %rax
movl %ecx, 0x750(%rax)
leaq 0xd2cf(%rip), %rsi      # 0x53340
movq %r14, %rdi
callq 0x18bb0
movq %rax, %r15
movq 0x234d5(%rip), %rax     # 0x69558
movq %rbx, %rcx
subq (%rax), %rcx
shrq $0x3, %rcx
imull $0x8ce2cabd, %ecx, %ebp # imm = 0x8CE2CABD
movq 0x23566(%rip), %rax     # 0x69600
movq 0x30(%rax), %r13
addl $0x51f, %ebp            # imm = 0x51F
movl $0x2c0, %esi            # imm = 0x2C0
addq 0x58(%rbx), %rsi
leaq 0x15d89(%rip), %rdi     # 0x5be3d
movq %r15, %rdx
xorl %eax, %eax
callq 0x19340
movl %ebp, %edi
movq %rax, %rsi
callq *%r13
movq (%r12), %rax
movss 0x20(%rax), %xmm0
xorps %xmm1, %xmm1
ucomiss %xmm1, %xmm0
jne 0x460d9
jnp 0x460ed
movq 0x23538(%rip), %rax     # 0x69618
movq (%rax), %rax
cvttss2si 0x20(%rax), %eax
testw %ax, %ax
js 0x46128
leaq 0x109cc(%rip), %rsi     # 0x56ac0
movq %r14, %rdi
callq 0x18bb0
movq %rax, %rdi
callq 0x195e0
xorps %xmm0, %xmm0
cvtsi2ss %eax, %xmm0
movq 0x58(%rbx), %rcx
movss %xmm0, 0x70(%rcx)
testl %eax, %eax
jle 0x46135
cmpl $0xa1, %eax
jl 0x4613c
movl $0x43200000, 0x70(%rcx) # imm = 0x43200000
jmp 0x4613c
movq 0x58(%rbx), %rax
movl $0x42b40000, 0x70(%rax) # imm = 0x42B40000
jmp 0x4613c
movl $0x42b40000, 0x70(%rcx) # imm = 0x42B40000
leaq 0x150f9(%rip), %rsi     # 0x5b23c
movq %r14, %rdi
callq 0x18bb0
cmpb $0x0, (%rax)
je 0x46162
movq %rax, %rdi
callq 0x195e0
movq 0x58(%rbx), %rcx
movl %eax, 0x300(%rcx)
movl $0xc0, %edi
addq 0x58(%rbx), %rdi
movl $0x1ff, %edx            # imm = 0x1FF
movq %r14, %rsi
callq 0x181c0
movq %rbx, %rdi
movq %r15, %rsi
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
jmp 0x196f0