#define NULL ((void *)0)
typedef unsigned long size_t; // Customize by platform.
typedef long intptr_t;
typedef unsigned long uintptr_t;
typedef long scalar_t__; // Either arithmetic or pointer type.
/* By default, we understand bool (as a convenience). */
typedef int bool;
#define false 0
#define true 1

/* Forward declarations */

/* Type definitions */

/* Variables and functions */
int CG_LastAttacker();
int /*<<< orphan*/ Com_sprintf(char *, int, char *, int, char *);
int /*<<< orphan*/ trap_Args(char *, int);
int /*<<< orphan*/ trap_SendClientCommand(char *);
void CG_VoiceTellAttacker_f(void) {
  int clientNum;
  char command[128];
  char message[128];
  clientNum = CG_LastAttacker();
  if (clientNum == -1) {
    return;
  }
  trap_Args(message, 128);
  Com_sprintf(command, 128, "vtell %i %s", clientNum, message);
  trap_SendClientCommand(command);
}


x86 assembly (clang, -O0):
<CG_VoiceTellAttacker_f>:
push   %rbp
mov    %rsp,%rbp
sub    $0x110,%rsp
mov    $0x0,%al
call   1040 <CG_LastAttacker@plt>
mov    %eax,-0x4(%rbp)
cmpl   $0xffffffff,-0x4(%rbp)
jne    1164 <CG_VoiceTellAttacker_f+0x24>
jmp    11a3 <CG_VoiceTellAttacker_f+0x63>
lea    -0x110(%rbp),%rdi
mov    $0x80,%esi
call   1030 <trap_Args@plt>
lea    -0x90(%rbp),%rdi
mov    -0x4(%rbp),%ecx
lea    -0x110(%rbp),%r8
mov    $0x80,%esi
lea    0xe6e(%rip),%rdx
call   1050 <Com_sprintf@plt>
lea    -0x90(%rbp),%rdi
call   1060 <trap_SendClientCommand@plt>
add    $0x110,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<CG_VoiceTellAttacker_f>:
push   %r15
push   %r14
push   %rbx
sub    $0x100,%rsp
xor    %eax,%eax
call   1040 <CG_LastAttacker@plt>
cmp    $0xffffffff,%eax
je     1193 <CG_VoiceTellAttacker_f+0x53>
mov    %eax,%ebx
mov    %rsp,%r14
mov    %r14,%rdi
mov    $0x80,%esi
call   1030 <trap_Args@plt>
lea    0xe8f(%rip),%rdx
lea    0x80(%rsp),%r15
mov    %r15,%rdi
mov    $0x80,%esi
mov    %ebx,%ecx
mov    %r14,%r8
call   1050 <Com_sprintf@plt>
mov    %r15,%rdi
call   1060 <trap_SendClientCommand@plt>
add    $0x100,%rsp
pop    %rbx
pop    %r14
pop    %r15
ret

LLVM IR (-O0):
@.str = [12 x i8] c"vtell %i %s\00"
define void @CG_VoiceTellAttacker_f() {
%1 = alloca i32
%2 = alloca [128 x i8]
%3 = alloca [128 x i8]
%4 = call i32 (...) @CG_LastAttacker()
store i32 %4, i32* %1
%5 = load i32, i32* %1
%6 = icmp eq i32 %5, -1
br i1 %6, label %7, label %8
7: ; preds = %0
br label %17
8: ; preds = %0
%9 = getelementptr inbounds [128 x i8], [128 x i8]* %3, i64 0, i64 0
%10 = call i32 @trap_Args(i8* %9, i32 128)
%11 = getelementptr inbounds [128 x i8], [128 x i8]* %2, i64 0, i64 0
%12 = load i32, i32* %1
%13 = getelementptr inbounds [128 x i8], [128 x i8]* %3, i64 0, i64 0
%14 = call i32 @Com_sprintf(i8* %11, i32 128, i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str, i64 0, i64 0), i32 %12, i8* %13)
%15 = getelementptr inbounds [128 x i8], [128 x i8]* %2, i64 0, i64 0
%16 = call i32 @trap_SendClientCommand(i8* %15)
br label %17
17: ; preds = %8, %7
ret void
}

LLVM IR (-O2):
@.str = [12 x i8] c"vtell %i %s\00"
define void @CG_VoiceTellAttacker_f() {
%1 = alloca [128 x i8]
%2 = alloca [128 x i8]
%3 = getelementptr inbounds [128 x i8], [128 x i8]* %1, i64 0, i64 0
%4 = getelementptr inbounds [128 x i8], [128 x i8]* %2, i64 0, i64 0
%5 = tail call i32 (...) @CG_LastAttacker()
%6 = icmp eq i32 %5, -1
br i1 %6, label %11, label %7
7: ; preds = %0
%8 = call i32 @trap_Args(i8* %4, i32 128)
%9 = call i32 @Com_sprintf(i8* %3, i32 128, i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str, i64 0, i64 0), i32 %5, i8* %4)
%10 = call i32 @trap_SendClientCommand(i8* %3)
br label %11
11: ; preds = %0, %7
ret void
}