#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*/ Cbuf_AddText(char *);
char *va(char *, char *);
void SV_StartMod(char *mod) {
  Cbuf_AddText("killserver\n");
  Cbuf_AddText(va("game %s\n", mod));
  Cbuf_AddText("unbindall\n");
  Cbuf_AddText("exec default.cfg\n");
  Cbuf_AddText("exec kmq2config.cfg\n");
  Cbuf_AddText("exec autoexec.cfg\n");
  Cbuf_AddText("d1\n");
}


x86 assembly (clang, -O0):
<SV_StartMod>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
lea    0xecd(%rip),%rdi
call   1030 <Cbuf_AddText@plt>
mov    -0x8(%rbp),%rsi
lea    0xec9(%rip),%rdi
call   1040 <va@plt>
mov    %rax,%rdi
call   1030 <Cbuf_AddText@plt>
lea    0xebe(%rip),%rdi
call   1030 <Cbuf_AddText@plt>
lea    0xebd(%rip),%rdi
call   1030 <Cbuf_AddText@plt>
lea    0xec3(%rip),%rdi
call   1030 <Cbuf_AddText@plt>
lea    0xecc(%rip),%rdi
call   1030 <Cbuf_AddText@plt>
lea    0xed3(%rip),%rdi
call   1030 <Cbuf_AddText@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<SV_StartMod>:
push   %rbx
mov    %rdi,%rbx
lea    0xed5(%rip),%rdi
call   1030 <Cbuf_AddText@plt>
lea    0xed5(%rip),%rdi
mov    %rbx,%rsi
call   1040 <va@plt>
mov    %rax,%rdi
call   1030 <Cbuf_AddText@plt>
lea    0xec7(%rip),%rdi
call   1030 <Cbuf_AddText@plt>
lea    0xec6(%rip),%rdi
call   1030 <Cbuf_AddText@plt>
lea    0xecc(%rip),%rdi
call   1030 <Cbuf_AddText@plt>
lea    0xed5(%rip),%rdi
call   1030 <Cbuf_AddText@plt>
lea    0xedc(%rip),%rdi
pop    %rbx
jmp    1030 <Cbuf_AddText@plt>

LLVM IR (-O0):
@.str = [12 x i8] c"killserver\0A\00"
@.str.1 = [9 x i8] c"game %s\0A\00"
@.str.2 = [11 x i8] c"unbindall\0A\00"
@.str.3 = [18 x i8] c"exec default.cfg\0A\00"
@.str.4 = [21 x i8] c"exec kmq2config.cfg\0A\00"
@.str.5 = [19 x i8] c"exec autoexec.cfg\0A\00"
@.str.6 = [4 x i8] c"d1\0A\00"
define void @SV_StartMod(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = call i32 @Cbuf_AddText(i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str, i64 0, i64 0))
%4 = load i8*, i8** %2
%5 = call i8* @va(i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str.1, i64 0, i64 0), i8* %4)
%6 = call i32 @Cbuf_AddText(i8* %5)
%7 = call i32 @Cbuf_AddText(i8* getelementptr inbounds ([11 x i8], [11 x i8]* @.str.2, i64 0, i64 0))
%8 = call i32 @Cbuf_AddText(i8* getelementptr inbounds ([18 x i8], [18 x i8]* @.str.3, i64 0, i64 0))
%9 = call i32 @Cbuf_AddText(i8* getelementptr inbounds ([21 x i8], [21 x i8]* @.str.4, i64 0, i64 0))
%10 = call i32 @Cbuf_AddText(i8* getelementptr inbounds ([19 x i8], [19 x i8]* @.str.5, i64 0, i64 0))
%11 = call i32 @Cbuf_AddText(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.6, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@.str = [12 x i8] c"killserver\0A\00"
@.str.1 = [9 x i8] c"game %s\0A\00"
@.str.2 = [11 x i8] c"unbindall\0A\00"
@.str.3 = [18 x i8] c"exec default.cfg\0A\00"
@.str.4 = [21 x i8] c"exec kmq2config.cfg\0A\00"
@.str.5 = [19 x i8] c"exec autoexec.cfg\0A\00"
@.str.6 = [4 x i8] c"d1\0A\00"
define void @SV_StartMod(i8* %0) {
%2 = tail call i32 @Cbuf_AddText(i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str, i64 0, i64 0))
%3 = tail call i8* @va(i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str.1, i64 0, i64 0), i8* %0)
%4 = tail call i32 @Cbuf_AddText(i8* %3)
%5 = tail call i32 @Cbuf_AddText(i8* getelementptr inbounds ([11 x i8], [11 x i8]* @.str.2, i64 0, i64 0))
%6 = tail call i32 @Cbuf_AddText(i8* getelementptr inbounds ([18 x i8], [18 x i8]* @.str.3, i64 0, i64 0))
%7 = tail call i32 @Cbuf_AddText(i8* getelementptr inbounds ([21 x i8], [21 x i8]* @.str.4, i64 0, i64 0))
%8 = tail call i32 @Cbuf_AddText(i8* getelementptr inbounds ([19 x i8], [19 x i8]* @.str.5, i64 0, i64 0))
%9 = tail call i32 @Cbuf_AddText(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.6, i64 0, i64 0))
ret void
}