// File: /workspace/github_c_makefile_star2_O0/QwazyWabbitWOS[P]lmctf60/p_view.c
// Function: ClientShowMOD
int ClientShowMOD(edict_t *ent)
{
	char	string[5000];
	char	temp[1000], temp2[MAX_INFO_STRING];
	char	*line;
	char    *color;
	int		time, i;
	
	if (!ent->client->showmod)
		return  1;
	
	time = (level.framenum - ent->client->resp.enterframe);
	if (time < 60) // We just entered the game
	{
		//ent->client->ps.stats[STAT_LAYOUTS] = 1;
		/*
		// Don't show the message if we are moving or pulling up menus
		if (ent->client->showscores || ent->client->showinventory ||
			(ent->client->latched_buttons|ent->client->buttons))
		{
			return 0;
		}

		if (time % 20)
			return 0;
		*/

		switch (ent->client->ctf.teamnum)
		{
			case CTF_TEAM_RED: color = "Red"; break;
			case CTF_TEAM_BLUE: color = "Blue"; break;
			default: color = "Unassigned"; break;
		}
	
		Com_sprintf(string, sizeof(string),
			"xv %i yv %i cstring2 \""
			"You are on the %s team!\n\n"
			"Welcome to %s\nRunning %s\n"
			"Pak File is available at:\n\" "
			"xv %i yv %i cstring2 \""
			"%s\n\n",
			0,40,
			color,
			hostname->string,
			GAMEVERSION,
			0,85,
			mod_website->string);
		
		strcat(string, "\" ");

		if (motd[0]) // if we have a MOTD
		{
			strcpy(temp, motd);
			i = 100;
			line = strtok(temp, "\n");
			while (line)
			{
				Com_sprintf(temp2, sizeof(temp2),				
					"xv 0 yv %d cstring \"%s\" ",
					i, line);
				i+=8;
				strcat(string, temp2);
				line = strtok(NULL, "\n");
			}
		}

			

			   	
		gi.WriteByte (svc_layout);
		gi.WriteString (string);
		gi.unicast (ent, false);
		
	

		/*
		Com_sprintf(string, sizeof(string),
			"You are on the %s team!\n\nWelcome to %s\nRunning LM CTF\n"
			"Skins are available at:\nhttp://www.planetquake.com/lmctf/\n", 
			color,
			hostname->string);

		if (motd[0]) // if we have a MOTD
		{
			strcat(string, motd);
		}

		gi.centerprintf(ent, "%s", string);
		

		ent->client->ps.stats[STAT_LAYOUTS] = 0;
		*/
		return 1;
	}
	else
		ent->client->showmod = false;
	return 0;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x19e0, %rsp           # imm = 0x19E0
movq %rdi, -0x10(%rbp)
movq -0x10(%rbp), %rax
movq 0x58(%rax), %rax
cmpl $0x0, 0xf74(%rax)
jne 0x652ec
movl $0x1, -0x4(%rbp)
jmp 0x654ff
movq 0x1daad(%rip), %rax     # 0x82da0
movl (%rax), %eax
movq -0x10(%rbp), %rcx
movq 0x58(%rcx), %rcx
subl 0xdf0(%rcx), %eax
movl %eax, -0x19a4(%rbp)
cmpl $0x3c, -0x19a4(%rbp)
jge 0x654e6
movq -0x10(%rbp), %rax
movq 0x58(%rax), %rax
movl 0x1100(%rax), %eax
movl %eax, -0x19ac(%rbp)
subl $0x1, %eax
je 0x6533e
jmp 0x65331
movl -0x19ac(%rbp), %eax
subl $0x2, %eax
je 0x6534e
jmp 0x6535e
leaq 0xa042(%rip), %rax      # 0x6f387
movq %rax, -0x19a0(%rbp)
jmp 0x6536c
leaq 0xa03e(%rip), %rax      # 0x6f393
movq %rax, -0x19a0(%rbp)
jmp 0x6536c
leaq 0x125c0(%rip), %rax     # 0x77925
movq %rax, -0x19a0(%rbp)
leaq -0x13a0(%rbp), %rdi
movq -0x19a0(%rbp), %r9
movq 0x1d86f(%rip), %rax     # 0x82bf0
movq (%rax), %rax
movq 0x8(%rax), %r11
movq 0x1d699(%rip), %rax     # 0x82a28
movq (%rax), %rax
movq 0x8(%rax), %rax
movl $0x1388, %esi           # imm = 0x1388
leaq 0x1258e(%rip), %rdx     # 0x77930
xorl %ecx, %ecx
movl $0x28, %r8d
leaq 0xb515(%rip), %r10      # 0x708c6
movq %r11, (%rsp)
movq %r10, 0x8(%rsp)
movl $0x0, 0x10(%rsp)
movl $0x55, 0x18(%rsp)
movq %rax, 0x20(%rsp)
movb $0x0, %al
callq 0x18f90
leaq -0x13a0(%rbp), %rdi
leaq 0x12000(%rip), %rsi     # 0x773e4
callq 0x19880
movq 0x1d2b0(%rip), %rax     # 0x826a0
cmpb $0x0, (%rax)
je 0x6549e
leaq -0x1790(%rbp), %rdi
movq 0x1d299(%rip), %rsi     # 0x826a0
callq 0x182c0
movl $0x64, -0x19a8(%rbp)
leaq -0x1790(%rbp), %rdi
leaq 0xbae4(%rip), %rsi      # 0x70f08
callq 0x196e0
movq %rax, -0x1998(%rbp)
cmpq $0x0, -0x1998(%rbp)
je 0x6549c
leaq -0x1990(%rbp), %rdi
movl -0x19a8(%rbp), %ecx
movq -0x1998(%rbp), %r8
movl $0x200, %esi            # imm = 0x200
leaq 0x12555(%rip), %rdx     # 0x779af
movb $0x0, %al
callq 0x18f90
movl -0x19a8(%rbp), %eax
addl $0x8, %eax
movl %eax, -0x19a8(%rbp)
leaq -0x13a0(%rbp), %rdi
leaq -0x1990(%rbp), %rsi
callq 0x19880
xorl %eax, %eax
movl %eax, %edi
leaq 0xba7a(%rip), %rsi      # 0x70f08
callq 0x196e0
movq %rax, -0x1998(%rbp)
jmp 0x65430
jmp 0x6549e
movl $0x4, %edi
movq 0x1d156(%rip), %rax     # 0x82600
callq *0xc8(%rax)
movq 0x1d149(%rip), %rax     # 0x82600
movq 0xe8(%rax), %rax
leaq -0x13a0(%rbp), %rdi
callq *%rax
movq 0x1d132(%rip), %rax     # 0x82600
movq 0xb8(%rax), %rax
movq -0x10(%rbp), %rdi
xorl %esi, %esi
callq *%rax
movl $0x1, -0x4(%rbp)
jmp 0x654ff
movq -0x10(%rbp), %rax
movq 0x58(%rax), %rax
movl $0x0, 0xf74(%rax)
movl $0x0, -0x4(%rbp)
movl -0x4(%rbp), %eax
addq $0x19e0, %rsp           # imm = 0x19E0
popq %rbp
retq
nopl (%rax,%rax)