// File: /workspace/github_c_makefile_star2_O3/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 0x453fe
movups 0x150f2(%rip), %xmm0    # 0x5a4e0
movups %xmm0, 0xe(%r14)
movups 0x150d8(%rip), %xmm0    # 0x5a4d2
movups %xmm0, (%r14)
leaq 0x12a2c(%rip), %rsi     # 0x57e31
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 0x19860
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 0x14f29(%rip), %rsi     # 0x5a39a
movq %r14, %rdi
callq 0x18bb0
movq 0x23a40(%rip), %r12     # 0x68ec0
movq (%r12), %rcx
movss 0x20(%rcx), %xmm0
xorps %xmm1, %xmm1
ucomiss %xmm1, %xmm0
jne 0x45493
jnp 0x454aa
movzbl (%rax), %edx
testl %edx, %edx
je 0x454aa
movl $0x1, %ecx
cmpl $0x30, %edx
jne 0x454ac
cmpb $0x0, 0x1(%rax)
jne 0x454ac
xorl %ecx, %ecx
movq 0x58(%rbx), %rax
movl %ecx, 0x750(%rax)
leaq 0xce83(%rip), %rsi      # 0x52340
movq %r14, %rdi
callq 0x18bb0
movq %rax, %r15
movq 0x23089(%rip), %rax     # 0x68558
movq %rbx, %rcx
subq (%rax), %rcx
shrq $0x3, %rcx
imull $0x8ce2cabd, %ecx, %ebp # imm = 0x8CE2CABD
movq 0x2311a(%rip), %rax     # 0x68600
movq 0x30(%rax), %r13
addl $0x51f, %ebp            # imm = 0x51F
movl $0x2c0, %esi            # imm = 0x2C0
addq 0x58(%rbx), %rsi
leaq 0x15cad(%rip), %rdi     # 0x5b1ad
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 0x45525
jnp 0x45539
movq 0x230ec(%rip), %rax     # 0x68618
movq (%rax), %rax
cvttss2si 0x20(%rax), %eax
testw %ax, %ax
js 0x45574
leaq 0x105a0(%rip), %rsi     # 0x55ae0
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 0x45581
cmpl $0xa1, %eax
jb 0x45588
movl $0x43200000, 0x70(%rcx) # imm = 0x43200000
jmp 0x45588
movq 0x58(%rbx), %rax
movl $0x42b40000, 0x70(%rax) # imm = 0x42B40000
jmp 0x45588
movl $0x42b40000, 0x70(%rcx) # imm = 0x42B40000
leaq 0x14f6d(%rip), %rsi     # 0x5a4fc
movq %r14, %rdi
callq 0x18bb0
cmpb $0x0, (%rax)
movq 0x58(%rbx), %r12
je 0x455b0
movq %rax, %rdi
callq 0x195e0
movl %eax, 0x300(%r12)
addq $0xc0, %r12
movl $0x1ff, %edx            # imm = 0x1FF
movq %r12, %rdi
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 0x196e0