#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*/ strcpy(char *, char *);
void GetIRTransType(char ver, char typ[]) {
  *typ = 0;
  switch (ver) {
  case 'C':
    strcpy(typ, "Temp");
    return;
  case 'U':
    strcpy(typ, "USB");
    return;
  case 'V':
    strcpy(typ, "USB B&O");
    return;
  case 'S':
    strcpy(typ, "RS232/Bus");
    return;
  case 'T':
    strcpy(typ, "RS232/Bus B&O");
    return;
  case 'X':
    strcpy(typ, "IR Translator");
    return;
  }
}


x86 assembly (clang, -O0):
<GetIRTransType>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %dil,%al
mov    %al,-0x1(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x10(%rbp),%rax
movb   $0x0,(%rax)
movsbl -0x1(%rbp),%eax
add    $0xffffffbd,%eax
mov    %eax,%ecx
mov    %rcx,-0x18(%rbp)
sub    $0x15,%eax
ja     11cc <GetIRTransType+0xbc>
mov    -0x18(%rbp),%rax
lea    0xeb6(%rip),%rcx
movslq (%rcx,%rax,4),%rax
add    %rcx,%rax
jmp    *%rax
mov    -0x10(%rbp),%rdi
lea    0xefa(%rip),%rsi
call   1030 <strcpy@plt>
jmp    11cc <GetIRTransType+0xbc>
mov    -0x10(%rbp),%rdi
lea    0xeea(%rip),%rsi
call   1030 <strcpy@plt>
jmp    11cc <GetIRTransType+0xbc>
mov    -0x10(%rbp),%rdi
lea    0xed9(%rip),%rsi
call   1030 <strcpy@plt>
jmp    11cc <GetIRTransType+0xbc>
mov    -0x10(%rbp),%rdi
lea    0xecc(%rip),%rsi
call   1030 <strcpy@plt>
jmp    11cc <GetIRTransType+0xbc>
mov    -0x10(%rbp),%rdi
lea    0xec1(%rip),%rsi
call   1030 <strcpy@plt>
jmp    11cc <GetIRTransType+0xbc>
mov    -0x10(%rbp),%rdi
lea    0xeba(%rip),%rsi
call   1030 <strcpy@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<GetIRTransType>:
movb   $0x0,(%rsi)
add    $0xffffffbd,%edi
cmp    $0x15,%edi
ja     113b <GetIRTransType+0x2b>
lea    0xf36(%rip),%rax
lea    0xed7(%rip),%rcx
movslq (%rcx,%rdi,4),%rdx
add    %rcx,%rdx
jmp    *%rdx
lea    0xf30(%rip),%rax
jmp    115e <GetIRTransType+0x4e>
ret
lea    0xf30(%rip),%rax
jmp    115e <GetIRTransType+0x4e>
lea    0xf11(%rip),%rax
jmp    115e <GetIRTransType+0x4e>
lea    0xf0c(%rip),%rax
jmp    115e <GetIRTransType+0x4e>
lea    0xf23(%rip),%rax
mov    %rsi,%rdi
mov    %rax,%rsi
jmp    1030 <strcpy@plt>

LLVM IR (-O0):
@.str = [5 x i8] c"Temp\00"
@.str.1 = [4 x i8] c"USB\00"
@.str.2 = [8 x i8] c"USB B&O\00"
@.str.3 = [10 x i8] c"RS232/Bus\00"
@.str.4 = [14 x i8] c"RS232/Bus B&O\00"
@.str.5 = [14 x i8] c"IR Translator\00"
define void @GetIRTransType(i8 signext %0, i8* %1) {
%3 = alloca i8
%4 = alloca i8*
store i8 %0, i8* %3
store i8* %1, i8** %4
%5 = load i8*, i8** %4
store i8 0, i8* %5
%6 = load i8, i8* %3
%7 = sext i8 %6 to i32
switch i32 %7, label %26 [
i32 67, label %8
i32 85, label %11
i32 86, label %14
i32 83, label %17
i32 84, label %20
i32 88, label %23
]
8: ; preds = %2
%9 = load i8*, i8** %4
%10 = call i32 @strcpy(i8* %9, i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str, i64 0, i64 0))
br label %26
11: ; preds = %2
%12 = load i8*, i8** %4
%13 = call i32 @strcpy(i8* %12, i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.1, i64 0, i64 0))
br label %26
14: ; preds = %2
%15 = load i8*, i8** %4
%16 = call i32 @strcpy(i8* %15, i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str.2, i64 0, i64 0))
br label %26
17: ; preds = %2
%18 = load i8*, i8** %4
%19 = call i32 @strcpy(i8* %18, i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str.3, i64 0, i64 0))
br label %26
20: ; preds = %2
%21 = load i8*, i8** %4
%22 = call i32 @strcpy(i8* %21, i8* getelementptr inbounds ([14 x i8], [14 x i8]* @.str.4, i64 0, i64 0))
br label %26
23: ; preds = %2
%24 = load i8*, i8** %4
%25 = call i32 @strcpy(i8* %24, i8* getelementptr inbounds ([14 x i8], [14 x i8]* @.str.5, i64 0, i64 0))
br label %26
26: ; preds = %8, %11, %14, %17, %20, %23, %2
ret void
}

LLVM IR (-O2):
@.str = [5 x i8] c"Temp\00"
@.str.1 = [4 x i8] c"USB\00"
@.str.2 = [8 x i8] c"USB B&O\00"
@.str.3 = [10 x i8] c"RS232/Bus\00"
@.str.4 = [14 x i8] c"RS232/Bus B&O\00"
@.str.5 = [14 x i8] c"IR Translator\00"
define void @GetIRTransType(i8 signext %0, i8* %1) {
store i8 0, i8* %1
%3 = sext i8 %0 to i32
switch i32 %3, label %12 [
i32 67, label %9
i32 85, label %4
i32 86, label %5
i32 83, label %6
i32 84, label %7
i32 88, label %8
]
4: ; preds = %2
br label %9
5: ; preds = %2
br label %9
6: ; preds = %2
br label %9
7: ; preds = %2
br label %9
8: ; preds = %2
br label %9
9: ; preds = %2, %8, %7, %6, %5, %4
%10 = phi i8* [ getelementptr inbounds ([4 x i8], [4 x i8]* @.str.1, i64 0, i64 0), %4 ], [ getelementptr inbounds ([8 x i8], [8 x i8]* @.str.2, i64 0, i64 0), %5 ], [ getelementptr inbounds ([10 x i8], [10 x i8]* @.str.3, i64 0, i64 0), %6 ], [ getelementptr inbounds ([14 x i8], [14 x i8]* @.str.4, i64 0, i64 0), %7 ], [ getelementptr inbounds ([14 x i8], [14 x i8]* @.str.5, i64 0, i64 0), %8 ], [ getelementptr inbounds ([5 x i8], [5 x i8]* @.str, i64 0, i64 0), %2 ]
%11 = tail call i32 @strcpy(i8* %1, i8* %10)
br label %12
12: ; preds = %9, %2
ret void
}