// File: /workspace/github_c_makefile_star2_O0/QwazyWabbitWOS[P]lmctf60/p_client.c
// Function: PingAlert
void PingAlert (edict_t *ent)
{
	edict_t *other;
	int j;
	char message[MAX_INFO_STRING];
	
	// Check if they are turned off
	if (!ent->client->ctf.pingalertfloor && !ent->client->ctf.pingalertceiling)
		return;
	
	for (j = 1; j <= game.maxclients; j++)
	{
		other = &g_edicts[j];
		if (!other->inuse)
			continue;
		//bat
		//if (!other->client || other->client->ctf.teamnum == CTF_TEAM_OBSERVER)
		if (!other->client || other->client->ctf.teamnum <= CTF_TEAM_OBSERVER)
			continue;

		
		if (ent->client->ctf.pingalertfloor &&
			other->client->ping < ent->client->ctf.pingalertfloor)
		{
			sprintf(message, "PING ALERT: %s has a %d ping (below %d).\n",
				other->client->pers.netname, other->client->ping,
				ent->client->ctf.pingalertfloor);
			ctf_SafePrint(ent, PRINT_HIGH, message);
		}
		if (ent->client->ctf.pingalertceiling &&
			other->client->ping > ent->client->ctf.pingalertceiling)
		{
			sprintf(message, "PING ALERT: %s has a %d ping (above %d).\n",
				other->client->pers.netname, other->client->ping,
				ent->client->ctf.pingalertceiling);
			ctf_SafePrint(ent, PRINT_HIGH, message);
		}
		
	}
	
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x220, %rsp            # imm = 0x220
movq %rdi, -0x8(%rbp)
movq -0x8(%rbp), %rax
movq 0x58(%rax), %rax
cmpl $0x0, 0x1110(%rax)
jne 0x5cba6
movq -0x8(%rbp), %rax
movq 0x58(%rax), %rax
cmpl $0x0, 0x1114(%rax)
jne 0x5cba6
jmp 0x5cd37
movl $0x1, -0x14(%rbp)
movl -0x14(%rbp), %eax
movq 0x26189(%rip), %rcx     # 0x82d40
cmpl 0x610(%rcx), %eax
jg 0x5cd37
movq 0x2598e(%rip), %rax     # 0x82558
movq (%rax), %rax
movslq -0x14(%rbp), %rcx
imulq $0x4a8, %rcx, %rcx      # imm = 0x4A8
addq %rcx, %rax
movq %rax, -0x10(%rbp)
movq -0x10(%rbp), %rax
cmpl $0x0, 0x60(%rax)
jne 0x5cbee
jmp 0x5cd29
movq -0x10(%rbp), %rax
cmpq $0x0, 0x58(%rax)
je 0x5cc0a
movq -0x10(%rbp), %rax
movq 0x58(%rax), %rax
cmpl $-0x1, 0x1100(%rax)
jg 0x5cc0f
jmp 0x5cd29
movq -0x8(%rbp), %rax
movq 0x58(%rax), %rax
cmpl $0x0, 0x1110(%rax)
je 0x5cc9b
movq -0x10(%rbp), %rax
movq 0x58(%rax), %rax
movl 0xb8(%rax), %eax
movq -0x8(%rbp), %rcx
movq 0x58(%rcx), %rcx
cmpl 0x1110(%rcx), %eax
jge 0x5cc9b
leaq -0x220(%rbp), %rdi
movq -0x10(%rbp), %rax
movq 0x58(%rax), %rdx
addq $0xc0, %rdx
addq $0x200, %rdx            # imm = 0x200
movq -0x10(%rbp), %rax
movq 0x58(%rax), %rax
movl 0xb8(%rax), %ecx
movq -0x8(%rbp), %rax
movq 0x58(%rax), %rax
movl 0x1110(%rax), %r8d
leaq 0x1a5fd(%rip), %rsi     # 0x7727c
movb $0x0, %al
callq 0x19940
movq -0x8(%rbp), %rdi
leaq -0x220(%rbp), %rdx
movl $0x2, %esi
callq 0x18f20
movq -0x8(%rbp), %rax
movq 0x58(%rax), %rax
cmpl $0x0, 0x1114(%rax)
je 0x5cd27
movq -0x10(%rbp), %rax
movq 0x58(%rax), %rax
movl 0xb8(%rax), %eax
movq -0x8(%rbp), %rcx
movq 0x58(%rcx), %rcx
cmpl 0x1114(%rcx), %eax
jle 0x5cd27
leaq -0x220(%rbp), %rdi
movq -0x10(%rbp), %rax
movq 0x58(%rax), %rdx
addq $0xc0, %rdx
addq $0x200, %rdx            # imm = 0x200
movq -0x10(%rbp), %rax
movq 0x58(%rax), %rax
movl 0xb8(%rax), %ecx
movq -0x8(%rbp), %rax
movq 0x58(%rax), %rax
movl 0x1114(%rax), %r8d
leaq 0x1a59b(%rip), %rsi     # 0x772a6
movb $0x0, %al
callq 0x19940
movq -0x8(%rbp), %rdi
leaq -0x220(%rbp), %rdx
movl $0x2, %esi
callq 0x18f20
jmp 0x5cd29
movl -0x14(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x14(%rbp)
jmp 0x5cbad
addq $0x220, %rsp            # imm = 0x220
popq %rbp
retq