// File: /workspace/github_c_makefile_star2_O0/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
movq %rsp, %rbp
subq $0x40, %rsp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq -0x10(%rbp), %rdi
callq 0x182d0
cmpl $0x0, %eax
jne 0x5ac6e
movq -0x10(%rbp), %rdi
leaq 0x1c53b(%rip), %rsi     # 0x771a4
callq 0x182c0
movq -0x10(%rbp), %rdi
leaq 0x19ea0(%rip), %rsi     # 0x74b19
callq 0x18cb0
movq %rax, -0x18(%rbp)
movq -0x8(%rbp), %rax
movq 0x58(%rax), %rdi
addq $0xc0, %rdi
addq $0x200, %rdi            # imm = 0x200
movq -0x18(%rbp), %rsi
movl $0xf, %edx
callq 0x181e0
movq -0x8(%rbp), %rdi
movq -0x8(%rbp), %rax
movq 0x58(%rax), %rsi
addq $0xc0, %rsi
addq $0x200, %rsi            # imm = 0x200
callq 0x19ad0
movq -0x8(%rbp), %rax
movq 0x58(%rax), %rdi
addq $0xc0, %rdi
addq $0x210, %rdi            # imm = 0x210
leaq 0x1c4e0(%rip), %rsi     # 0x771c2
callq 0x182c0
movq -0x8(%rbp), %rax
movq 0x58(%rax), %rdi
addq $0xc0, %rdi
addq $0x220, %rdi            # imm = 0x220
leaq 0x17c13(%rip), %rsi     # 0x72917
callq 0x182c0
movq -0x10(%rbp), %rdi
leaq 0x1c358(%rip), %rsi     # 0x7706c
callq 0x18cb0
movq %rax, -0x18(%rbp)
movq 0x2819c(%rip), %rax     # 0x82ec0
movq (%rax), %rax
movss 0x20(%rax), %xmm0
xorps %xmm1, %xmm1
ucomiss %xmm1, %xmm0
jne 0x5ad38
jp 0x5ad38
jmp 0x5ad6d
movq -0x18(%rbp), %rax
movsbl (%rax), %eax
cmpl $0x0, %eax
je 0x5ad6d
movq -0x18(%rbp), %rdi
leaq 0x1cf61(%rip), %rsi     # 0x77cb0
callq 0x18bf0
cmpl $0x0, %eax
je 0x5ad6d
movq -0x8(%rbp), %rax
movq 0x58(%rax), %rax
movl $0x1, 0x750(%rax)
jmp 0x5ad7f
movq -0x8(%rbp), %rax
movq 0x58(%rax), %rax
movl $0x0, 0x750(%rax)
movq -0x10(%rbp), %rdi
leaq 0x145a6(%rip), %rsi     # 0x6f330
callq 0x18cb0
movq %rax, -0x20(%rbp)
movq -0x8(%rbp), %rax
movq 0x277ba(%rip), %rcx     # 0x82558
movq (%rcx), %rcx
subq %rcx, %rax
movl $0x4a8, %ecx            # imm = 0x4A8
cqto
idivq %rcx
subq $0x1, %rax
movl %eax, -0x24(%rbp)
movq 0x27844(%rip), %rax     # 0x82600
movq 0x30(%rax), %rax
movq %rax, -0x30(%rbp)
movl -0x24(%rbp), %eax
addl $0x520, %eax            # imm = 0x520
movl %eax, -0x34(%rbp)
movq -0x8(%rbp), %rax
movq 0x58(%rax), %rsi
addq $0xc0, %rsi
addq $0x200, %rsi            # imm = 0x200
movq -0x20(%rbp), %rdx
leaq 0x1cf87(%rip), %rdi     # 0x77d77
movb $0x0, %al
callq 0x19560
movl -0x34(%rbp), %edi
movq %rax, %rsi
movq -0x30(%rbp), %rax
callq *%rax
movq 0x280b6(%rip), %rax     # 0x82ec0
movq (%rax), %rax
movss 0x20(%rax), %xmm0
xorps %xmm1, %xmm1
ucomiss %xmm1, %xmm0
jne 0x5ae1e
jp 0x5ae1e
jmp 0x5ae51
movq 0x277f3(%rip), %rax     # 0x82618
movq (%rax), %rax
cvttss2si 0x20(%rax), %eax
andl $0x8000, %eax           # imm = 0x8000
cmpl $0x0, %eax
je 0x5ae51
movq -0x8(%rbp), %rax
movq 0x58(%rax), %rax
movss 0x165dd(%rip), %xmm0    # 0x71424
movss %xmm0, 0x70(%rax)
jmp 0x5aeda
movq -0x10(%rbp), %rdi
leaq 0x17c2d(%rip), %rsi     # 0x72a89
callq 0x18cb0
movq %rax, %rdi
callq 0x19820
cvtsi2ss %eax, %xmm0
movq -0x8(%rbp), %rax
movq 0x58(%rax), %rax
movss %xmm0, 0x70(%rax)
movq -0x8(%rbp), %rax
movq 0x58(%rax), %rax
movss 0x15062(%rip), %xmm0    # 0x6feec
ucomiss 0x70(%rax), %xmm0
jbe 0x5aea7
movq -0x8(%rbp), %rax
movq 0x58(%rax), %rax
movss 0x16584(%rip), %xmm0    # 0x71424
movss %xmm0, 0x70(%rax)
jmp 0x5aed8
movq -0x8(%rbp), %rax
movq 0x58(%rax), %rax
movss 0x70(%rax), %xmm0
movss 0x16564(%rip), %xmm1    # 0x71420
ucomiss %xmm1, %xmm0
jbe 0x5aed6
movq -0x8(%rbp), %rax
movq 0x58(%rax), %rax
movss 0x1654f(%rip), %xmm0    # 0x71420
movss %xmm0, 0x70(%rax)
jmp 0x5aed8
jmp 0x5aeda
movq -0x10(%rbp), %rdi
leaq 0x1c2e9(%rip), %rsi     # 0x771ce
callq 0x18cb0
movq %rax, -0x18(%rbp)
movq -0x18(%rbp), %rdi
callq 0x186e0
cmpq $0x0, %rax
je 0x5af16
movq -0x18(%rbp), %rdi
callq 0x19820
movl %eax, %ecx
movq -0x8(%rbp), %rax
movq 0x58(%rax), %rax
movl %ecx, 0x300(%rax)
movq -0x8(%rbp), %rax
movq 0x58(%rax), %rdi
addq $0xc0, %rdi
movq -0x10(%rbp), %rsi
movl $0x1ff, %edx            # imm = 0x1FF
callq 0x181e0
movq -0x8(%rbp), %rdi
movq -0x20(%rbp), %rsi
callq 0x19930
addq $0x40, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)