#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_CrosshairPlayer();
int /*<<< orphan*/ atoi(char *);
int /*<<< orphan*/ trap_Argv(int, char *, int);
int /*<<< orphan*/ trap_SendConsoleCommand(int /*<<< orphan*/);
int /*<<< orphan*/ va(char *, int, int /*<<< orphan*/);
void CG_TargetCommand_f(void) {
  int targetNum;
  char test[4];
  targetNum = CG_CrosshairPlayer();
  if (!targetNum) {
    return;
  }
  trap_Argv(1, test, 4);
  trap_SendConsoleCommand(va("gc %i %i", targetNum, atoi(test)));
}


x86 assembly (clang, -O0):
<CG_TargetCommand_f>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    $0x0,%al
call   1030 <CG_CrosshairPlayer@plt>
mov    %eax,-0x4(%rbp)
cmpl   $0x0,-0x4(%rbp)
jne    1171 <CG_TargetCommand_f+0x21>
jmp    11ab <CG_TargetCommand_f+0x5b>
lea    -0x8(%rbp),%rsi
mov    $0x1,%edi
mov    $0x4,%edx
call   1040 <trap_Argv@plt>
mov    -0x4(%rbp),%eax
mov    %eax,-0xc(%rbp)
lea    -0x8(%rbp),%rdi
call   1060 <atoi@plt>
mov    -0xc(%rbp),%esi
mov    %eax,%edx
lea    0xe61(%rip),%rdi
call   1050 <va@plt>
mov    %eax,%edi
call   1070 <trap_SendConsoleCommand@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<CG_TargetCommand_f>:
push   %r14
push   %rbx
push   %rax
xor    %eax,%eax
call   1030 <CG_CrosshairPlayer@plt>
test   %eax,%eax
je     1197 <CG_TargetCommand_f+0x47>
mov    %eax,%ebx
lea    0x4(%rsp),%r14
mov    $0x1,%edi
mov    %r14,%rsi
mov    $0x4,%edx
call   1040 <trap_Argv@plt>
mov    %r14,%rdi
call   1060 <atoi@plt>
lea    0xe79(%rip),%rdi
mov    %ebx,%esi
mov    %eax,%edx
call   1050 <va@plt>
mov    %eax,%edi
call   1070 <trap_SendConsoleCommand@plt>
add    $0x8,%rsp
pop    %rbx
pop    %r14
ret

LLVM IR (-O0):
@.str = [9 x i8] c"gc %i %i\00"
define void @CG_TargetCommand_f() {
%1 = alloca i32
%2 = alloca [4 x i8]
%3 = call i32 (...) @CG_CrosshairPlayer()
store i32 %3, i32* %1
%4 = load i32, i32* %1
%5 = icmp ne i32 %4, 0
br i1 %5, label %7, label %6
6: ; preds = %0
br label %15
7: ; preds = %0
%8 = getelementptr inbounds [4 x i8], [4 x i8]* %2, i64 0, i64 0
%9 = call i32 @trap_Argv(i32 1, i8* %8, i32 4)
%10 = load i32, i32* %1
%11 = getelementptr inbounds [4 x i8], [4 x i8]* %2, i64 0, i64 0
%12 = call i32 @atoi(i8* %11)
%13 = call i32 @va(i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str, i64 0, i64 0), i32 %10, i32 %12)
%14 = call i32 @trap_SendConsoleCommand(i32 %13)
br label %15
15: ; preds = %7, %6
ret void
}

LLVM IR (-O2):
@.str = [9 x i8] c"gc %i %i\00"
define void @CG_TargetCommand_f() {
%1 = alloca [4 x i8]
%2 = getelementptr inbounds [4 x i8], [4 x i8]* %1, i64 0, i64 0
%3 = tail call i32 (...) @CG_CrosshairPlayer()
%4 = icmp eq i32 %3, 0
br i1 %4, label %10, label %5
5: ; preds = %0
%6 = call i32 @trap_Argv(i32 1, i8* %2, i32 4)
%7 = call i32 @atoi(i8* %2)
%8 = call i32 @va(i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str, i64 0, i64 0), i32 %3, i32 %7)
%9 = call i32 @trap_SendConsoleCommand(i32 %8)
br label %10
10: ; preds = %0, %5
ret void
}