#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 *getDefaultGraphicsDir(char *);
char *getDefaultMusicDir(char *);
char *getDefaultSoundsDir(char *);
char *getClassicArtworkDir(int type) {
  return (type == 0   ? getDefaultGraphicsDir("gfx_classic")
          : type == 1 ? getDefaultSoundsDir("snd_classic")
          : type == 2 ? getDefaultMusicDir("mus_classic")
                      : "");
}


x86 assembly (clang, -O0):
<getClassicArtworkDir>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %edi,-0x4(%rbp)
cmpl   $0x0,-0x4(%rbp)
jne    115a <getClassicArtworkDir+0x2a>
lea    0xeb4(%rip),%rdi
call   1050 <getDefaultGraphicsDir@plt>
mov    %rax,-0x10(%rbp)
jmp    11b8 <getClassicArtworkDir+0x88>
cmpl   $0x1,-0x4(%rbp)
jne    1179 <getClassicArtworkDir+0x49>
lea    0xea1(%rip),%rdi
call   1030 <getDefaultSoundsDir@plt>
mov    %rax,-0x18(%rbp)
jmp    11b0 <getClassicArtworkDir+0x80>
cmpl   $0x2,-0x4(%rbp)
jne    1198 <getClassicArtworkDir+0x68>
lea    0xe8e(%rip),%rdi
call   1040 <getDefaultMusicDir@plt>
mov    %rax,-0x20(%rbp)
jmp    11a8 <getClassicArtworkDir+0x78>
lea    0xe78(%rip),%rax
mov    %rax,-0x20(%rbp)
jmp    11a8 <getClassicArtworkDir+0x78>
mov    -0x20(%rbp),%rax
mov    %rax,-0x18(%rbp)
mov    -0x18(%rbp),%rax
mov    %rax,-0x10(%rbp)
mov    -0x10(%rbp),%rax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<getClassicArtworkDir>:
cmp    $0x2,%edi
je     114a <getClassicArtworkDir+0x1a>
cmp    $0x1,%edi
je     1156 <getClassicArtworkDir+0x26>
test   %edi,%edi
jne    1162 <getClassicArtworkDir+0x32>
lea    0xebb(%rip),%rdi
jmp    1050 <getDefaultGraphicsDir@plt>
lea    0xec7(%rip),%rdi
jmp    1040 <getDefaultMusicDir@plt>
lea    0xeaf(%rip),%rdi
jmp    1030 <getDefaultSoundsDir@plt>
lea    0xeae(%rip),%rax
ret

LLVM IR (-O0):
@.str = [12 x i8] c"gfx_classic\00"
@.str.1 = [12 x i8] c"snd_classic\00"
@.str.2 = [12 x i8] c"mus_classic\00"
@.str.3 = [1 x i8] zeroinitializer
define i8* @getClassicArtworkDir(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 %7
5: ; preds = %1
%6 = call i8* @getDefaultGraphicsDir(i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str, i64 0, i64 0))
br label %22
7: ; preds = %1
%8 = load i32, i32* %2
%9 = icmp eq i32 %8, 1
br i1 %9, label %10, label %12
10: ; preds = %7
%11 = call i8* @getDefaultSoundsDir(i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str.1, i64 0, i64 0))
br label %20
12: ; preds = %7
%13 = load i32, i32* %2
%14 = icmp eq i32 %13, 2
br i1 %14, label %15, label %17
15: ; preds = %12
%16 = call i8* @getDefaultMusicDir(i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str.2, i64 0, i64 0))
br label %18
17: ; preds = %12
br label %18
18: ; preds = %17, %15
%19 = phi i8* [ %16, %15 ], [ getelementptr inbounds ([1 x i8], [1 x i8]* @.str.3, i64 0, i64 0), %17 ]
br label %20
20: ; preds = %18, %10
%21 = phi i8* [ %11, %10 ], [ %19, %18 ]
br label %22
22: ; preds = %20, %5
%23 = phi i8* [ %6, %5 ], [ %21, %20 ]
ret i8* %23
}

LLVM IR (-O2):
@.str = [12 x i8] c"gfx_classic\00"
@.str.1 = [12 x i8] c"snd_classic\00"
@.str.2 = [12 x i8] c"mus_classic\00"
@.str.3 = [1 x i8] zeroinitializer
define i8* @getClassicArtworkDir(i32 %0) {
switch i32 %0, label %8 [
i32 0, label %2
i32 1, label %4
i32 2, label %6
]
2: ; preds = %1
%3 = tail call i8* @getDefaultGraphicsDir(i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str, i64 0, i64 0))
br label %8
4: ; preds = %1
%5 = tail call i8* @getDefaultSoundsDir(i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str.1, i64 0, i64 0))
br label %8
6: ; preds = %1
%7 = tail call i8* @getDefaultMusicDir(i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str.2, i64 0, i64 0))
br label %8
8: ; preds = %1, %4, %6, %2
%9 = phi i8* [ %3, %2 ], [ %5, %4 ], [ %7, %6 ], [ getelementptr inbounds ([1 x i8], [1 x i8]* @.str.3, i64 0, i64 0), %1 ]
ret i8* %9
}