#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 */
char *getCustomArtworkFilename(char *, int);
char *getCustomArtworkConfigFilename(int type) {
  return getCustomArtworkFilename(((type) == 0   ? "graphicsinfo.conf"
                                   : (type) == 1 ? "soundsinfo.conf"
                                   : (type) == 2 ? "musicinfo.conf"
                                                 : ""),
                                  type);
}


x86 assembly (clang, -O0):
<getCustomArtworkConfigFilename>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %edi,-0x4(%rbp)
cmpl   $0x0,-0x4(%rbp)
jne    1135 <getCustomArtworkConfigFilename+0x25>
lea    0xed4(%rip),%rax
mov    %rax,-0x10(%rbp)
jmp    1173 <getCustomArtworkConfigFilename+0x63>
cmpl   $0x1,-0x4(%rbp)
jne    114f <getCustomArtworkConfigFilename+0x3f>
lea    0xecc(%rip),%rax
mov    %rax,-0x18(%rbp)
jmp    116b <getCustomArtworkConfigFilename+0x5b>
mov    -0x4(%rbp),%edx
lea    0xed7(%rip),%rax
lea    0xec2(%rip),%rcx
cmp    $0x2,%edx
cmove  %rcx,%rax
mov    %rax,-0x18(%rbp)
mov    -0x18(%rbp),%rax
mov    %rax,-0x10(%rbp)
mov    -0x10(%rbp),%rdi
mov    -0x4(%rbp),%esi
call   1030 <getCustomArtworkFilename@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<getCustomArtworkConfigFilename>:
mov    %edi,%esi
test   %edi,%edi
je     1127 <getCustomArtworkConfigFilename+0x17>
cmp    $0x1,%esi
jne    1133 <getCustomArtworkConfigFilename+0x23>
lea    0xef0(%rip),%rdi
jmp    1030 <getCustomArtworkFilename@plt>
lea    0xed2(%rip),%rdi
jmp    1030 <getCustomArtworkFilename@plt>
cmp    $0x2,%esi
lea    0xee5(%rip),%rax
lea    0xeec(%rip),%rdi
cmove  %rax,%rdi
jmp    1030 <getCustomArtworkFilename@plt>

LLVM IR (-O0):
@.str = [18 x i8] c"graphicsinfo.conf\00"
@.str.1 = [16 x i8] c"soundsinfo.conf\00"
@.str.2 = [15 x i8] c"musicinfo.conf\00"
@.str.3 = [1 x i8] zeroinitializer
define i8* @getCustomArtworkConfigFilename(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = load i32, i32* %2
%4 = icmp eq i32 %3, 0
br i1 %4, label %5, label %6
5: ; preds = %1
br label %17
6: ; preds = %1
%7 = load i32, i32* %2
%8 = icmp eq i32 %7, 1
br i1 %8, label %9, label %10
9: ; preds = %6
br label %15
10: ; preds = %6
%11 = load i32, i32* %2
%12 = icmp eq i32 %11, 2
%13 = zext i1 %12 to i64
%14 = select i1 %12, i8* getelementptr inbounds ([15 x i8], [15 x i8]* @.str.2, i64 0, i64 0), i8* getelementptr inbounds ([1 x i8], [1 x i8]* @.str.3, i64 0, i64 0)
br label %15
15: ; preds = %10, %9
%16 = phi i8* [ getelementptr inbounds ([16 x i8], [16 x i8]* @.str.1, i64 0, i64 0), %9 ], [ %14, %10 ]
br label %17
17: ; preds = %15, %5
%18 = phi i8* [ getelementptr inbounds ([18 x i8], [18 x i8]* @.str, i64 0, i64 0), %5 ], [ %16, %15 ]
%19 = load i32, i32* %2
%20 = call i8* @getCustomArtworkFilename(i8* %18, i32 %19)
ret i8* %20
}

LLVM IR (-O2):
@.str = [18 x i8] c"graphicsinfo.conf\00"
@.str.1 = [16 x i8] c"soundsinfo.conf\00"
@.str.2 = [15 x i8] c"musicinfo.conf\00"
@.str.3 = [1 x i8] zeroinitializer
define i8* @getCustomArtworkConfigFilename(i32 %0) {
switch i32 %0, label %2 [
i32 0, label %6
i32 1, label %5
]
2: ; preds = %1
%3 = icmp eq i32 %0, 2
%4 = select i1 %3, i8* getelementptr inbounds ([15 x i8], [15 x i8]* @.str.2, i64 0, i64 0), i8* getelementptr inbounds ([1 x i8], [1 x i8]* @.str.3, i64 0, i64 0)
br label %6
5: ; preds = %1
br label %6
6: ; preds = %1, %5, %2
%7 = phi i8* [ getelementptr inbounds ([18 x i8], [18 x i8]* @.str, i64 0, i64 0), %1 ], [ %4, %2 ], [ getelementptr inbounds ([16 x i8], [16 x i8]* @.str.1, i64 0, i64 0), %5 ]
%8 = tail call i8* @getCustomArtworkFilename(i8* %7, i32 %0)
ret i8* %8
}