#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 */
typedef int /*<<< orphan*/ parm2;
typedef int /*<<< orphan*/ parm1;

/* Variables and functions */
scalar_t__ CG_ConfigString(int);
int /*<<< orphan*/ COM_Parse(char **);
int /*<<< orphan*/ Q_strncpyz(char *, int /*<<< orphan*/, int);
scalar_t__ strlen(char *);
int /*<<< orphan*/ trap_S_StartBackgroundTrack(char *, char *,
                                               int /*<<< orphan*/);
void CG_StartMusic(void) {
  char *s;
  char parm1[64], parm2[64];
  s = (char *)CG_ConfigString(2);
  Q_strncpyz(parm1, COM_Parse(&s), sizeof(parm1));
  Q_strncpyz(parm2, COM_Parse(&s), sizeof(parm2));
  if (strlen(parm1)) {
    trap_S_StartBackgroundTrack(parm1, parm2, 0);
  }
}


x86 assembly (clang, -O0):
<CG_StartMusic>:
push   %rbp
mov    %rsp,%rbp
sub    $0xa0,%rsp
mov    $0x2,%edi
call   1060 <CG_ConfigString@plt>
mov    %rax,-0x8(%rbp)
lea    -0x50(%rbp),%rax
mov    %rax,-0xa0(%rbp)
lea    -0x8(%rbp),%rdi
call   1050 <COM_Parse@plt>
mov    -0xa0(%rbp),%rdi
mov    %eax,%esi
mov    $0x40,%edx
call   1070 <Q_strncpyz@plt>
lea    -0x90(%rbp),%rax
mov    %rax,-0x98(%rbp)
lea    -0x8(%rbp),%rdi
call   1050 <COM_Parse@plt>
mov    -0x98(%rbp),%rdi
mov    %eax,%esi
mov    $0x40,%edx
call   1070 <Q_strncpyz@plt>
lea    -0x50(%rbp),%rdi
call   1030 <strlen@plt>
cmp    $0x0,%rax
je     11df <CG_StartMusic+0x8f>
lea    -0x50(%rbp),%rdi
lea    -0x90(%rbp),%rsi
xor    %edx,%edx
call   1040 <trap_S_StartBackgroundTrack@plt>
add    $0xa0,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<CG_StartMusic>:
push   %rbx
sub    $0x90,%rsp
mov    $0x2,%edi
call   1050 <CG_ConfigString@plt>
mov    %rax,0x8(%rsp)
lea    0x8(%rsp),%rbx
mov    %rbx,%rdi
call   1040 <COM_Parse@plt>
lea    0x10(%rsp),%rdi
mov    %eax,%esi
mov    $0x40,%edx
call   1060 <Q_strncpyz@plt>
mov    %rbx,%rdi
call   1040 <COM_Parse@plt>
lea    0x50(%rsp),%rdi
mov    %eax,%esi
mov    $0x40,%edx
call   1060 <Q_strncpyz@plt>
cmpb   $0x0,0x10(%rsp)
je     11a6 <CG_StartMusic+0x66>
lea    0x10(%rsp),%rdi
lea    0x50(%rsp),%rsi
xor    %edx,%edx
call   1030 <trap_S_StartBackgroundTrack@plt>
add    $0x90,%rsp
pop    %rbx
ret

LLVM IR (-O0):
define void @CG_StartMusic() {
%1 = alloca i8*
%2 = alloca [64 x i8]
%3 = alloca [64 x i8]
%4 = call i64 @CG_ConfigString(i32 2)
%5 = inttoptr i64 %4 to i8*
store i8* %5, i8** %1
%6 = getelementptr inbounds [64 x i8], [64 x i8]* %2, i64 0, i64 0
%7 = call i32 @COM_Parse(i8** %1)
%8 = call i32 @Q_strncpyz(i8* %6, i32 %7, i32 64)
%9 = getelementptr inbounds [64 x i8], [64 x i8]* %3, i64 0, i64 0
%10 = call i32 @COM_Parse(i8** %1)
%11 = call i32 @Q_strncpyz(i8* %9, i32 %10, i32 64)
%12 = getelementptr inbounds [64 x i8], [64 x i8]* %2, i64 0, i64 0
%13 = call i64 @strlen(i8* %12)
%14 = icmp ne i64 %13, 0
br i1 %14, label %15, label %19
15: ; preds = %0
%16 = getelementptr inbounds [64 x i8], [64 x i8]* %2, i64 0, i64 0
%17 = getelementptr inbounds [64 x i8], [64 x i8]* %3, i64 0, i64 0
%18 = call i32 @trap_S_StartBackgroundTrack(i8* %16, i8* %17, i32 0)
br label %19
19: ; preds = %15, %0
ret void
}

LLVM IR (-O2):
define void @CG_StartMusic() {
%1 = alloca i8*
%2 = alloca [64 x i8]
%3 = alloca [64 x i8]
%4 = bitcast i8** %1 to i8*
%5 = getelementptr inbounds [64 x i8], [64 x i8]* %2, i64 0, i64 0
%6 = getelementptr inbounds [64 x i8], [64 x i8]* %3, i64 0, i64 0
%7 = tail call i64 @CG_ConfigString(i32 2)
%8 = inttoptr i64 %7 to i8*
store i8* %8, i8** %1
%9 = call i32 @COM_Parse(i8** %1)
%10 = call i32 @Q_strncpyz(i8* %5, i32 %9, i32 64)
%11 = call i32 @COM_Parse(i8** %1)
%12 = call i32 @Q_strncpyz(i8* %6, i32 %11, i32 64)
%13 = load i8, i8* %5
%14 = icmp eq i8 %13, 0
br i1 %14, label %17, label %15
15: ; preds = %0
%16 = call i32 @trap_S_StartBackgroundTrack(i8* %5, i8* %6, i32 0)
br label %17
17: ; preds = %15, %0
ret void
}