#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 /*<<< orphan*/ trap_Cvar_Set(char *, char *);
int /*<<< orphan*/ trap_Cvar_VariableStringBuffer(char *, char *, int);
int /*<<< orphan*/ trap_SendConsoleCommand(int /*<<< orphan*/);
int /*<<< orphan*/ va(char *, char *);
void CG_SetGoalNameNF_f(void) {
  char genericText[256];
  trap_Cvar_VariableStringBuffer("cg_genericText", genericText, 256);
  trap_Cvar_Set("cg_genericText", "");
  trap_SendConsoleCommand(
      va("bot goal_setproperty tagname\"%s\"\n", genericText));
}


x86 assembly (clang, -O0):
<CG_SetGoalNameNF_f>:
push   %rbp
mov    %rsp,%rbp
sub    $0x100,%rsp
lea    -0x100(%rbp),%rsi
lea    0xea7(%rip),%rdi
mov    $0x100,%edx
call   1030 <trap_Cvar_VariableStringBuffer@plt>
lea    0xe96(%rip),%rdi
lea    0xebf(%rip),%rsi
call   1060 <trap_Cvar_Set@plt>
lea    -0x100(%rbp),%rsi
lea    0xe8b(%rip),%rdi
call   1040 <va@plt>
mov    %eax,%edi
call   1050 <trap_SendConsoleCommand@plt>
add    $0x100,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<CG_SetGoalNameNF_f>:
push   %r14
push   %rbx
sub    $0x108,%rsp
lea    0xeaf(%rip),%rbx
mov    %rsp,%r14
mov    %rbx,%rdi
mov    %r14,%rsi
mov    $0x100,%edx
call   1030 <trap_Cvar_VariableStringBuffer@plt>
lea    0xec5(%rip),%rsi
mov    %rbx,%rdi
call   1060 <trap_Cvar_Set@plt>
lea    0xe95(%rip),%rdi
mov    %r14,%rsi
call   1040 <va@plt>
mov    %eax,%edi
call   1050 <trap_SendConsoleCommand@plt>
add    $0x108,%rsp
pop    %rbx
pop    %r14
ret

LLVM IR (-O0):
@.str = [15 x i8] c"cg_genericText\00"
@.str.1 = [1 x i8] zeroinitializer
@.str.2 = [34 x i8] c"bot goal_setproperty tagname\22%s\22\0A\00"
define void @CG_SetGoalNameNF_f() {
%1 = alloca [256 x i8]
%2 = getelementptr inbounds [256 x i8], [256 x i8]* %1, i64 0, i64 0
%3 = call i32 @trap_Cvar_VariableStringBuffer(i8* getelementptr inbounds ([15 x i8], [15 x i8]* @.str, i64 0, i64 0), i8* %2, i32 256)
%4 = call i32 @trap_Cvar_Set(i8* getelementptr inbounds ([15 x i8], [15 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([1 x i8], [1 x i8]* @.str.1, i64 0, i64 0))
%5 = getelementptr inbounds [256 x i8], [256 x i8]* %1, i64 0, i64 0
%6 = call i32 @va(i8* getelementptr inbounds ([34 x i8], [34 x i8]* @.str.2, i64 0, i64 0), i8* %5)
%7 = call i32 @trap_SendConsoleCommand(i32 %6)
ret void
}

LLVM IR (-O2):
@.str = [15 x i8] c"cg_genericText\00"
@.str.1 = [1 x i8] zeroinitializer
@.str.2 = [34 x i8] c"bot goal_setproperty tagname\22%s\22\0A\00"
define void @CG_SetGoalNameNF_f() {
%1 = alloca [256 x i8]
%2 = getelementptr inbounds [256 x i8], [256 x i8]* %1, i64 0, i64 0
%3 = call i32 @trap_Cvar_VariableStringBuffer(i8* getelementptr inbounds ([15 x i8], [15 x i8]* @.str, i64 0, i64 0), i8* %2, i32 256)
%4 = call i32 @trap_Cvar_Set(i8* getelementptr inbounds ([15 x i8], [15 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([1 x i8], [1 x i8]* @.str.1, i64 0, i64 0))
%5 = call i32 @va(i8* getelementptr inbounds ([34 x i8], [34 x i8]* @.str.2, i64 0, i64 0), i8* %2)
%6 = call i32 @trap_SendConsoleCommand(i32 %5)
ret void
}