#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*/ printf(char *);
void GetInfoDestTV(short sNoFo) {
  if (sNoFo == 1)
    printf("one");
  else if (sNoFo == 2)
    printf("two");
  else if (sNoFo == 2)
    printf("three");
  else
    printf("other");
}


x86 assembly (clang, -O0):
<GetInfoDestTV>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %di,%ax
mov    %ax,-0x2(%rbp)
movswl -0x2(%rbp),%eax
cmp    $0x1,%eax
jne    113d <GetInfoDestTV+0x2d>
lea    0xecd(%rip),%rdi
call   1030 <printf@plt>
jmp    118f <GetInfoDestTV+0x7f>
movswl -0x2(%rbp),%eax
cmp    $0x2,%eax
jne    115b <GetInfoDestTV+0x4b>
lea    0xeb3(%rip),%rdi
call   1030 <printf@plt>
jmp    118a <GetInfoDestTV+0x7a>
movswl -0x2(%rbp),%eax
cmp    $0x2,%eax
jne    1179 <GetInfoDestTV+0x69>
lea    0xe99(%rip),%rdi
call   1030 <printf@plt>
jmp    1185 <GetInfoDestTV+0x75>
lea    0xe8e(%rip),%rdi
call   1030 <printf@plt>
jmp    118a <GetInfoDestTV+0x7a>
jmp    118f <GetInfoDestTV+0x7f>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<GetInfoDestTV>:
cmp    $0x2,%di
lea    0xee9(%rip),%rax
lea    0xee6(%rip),%rcx
cmove  %rax,%rcx
cmp    $0x1,%di
lea    0xecf(%rip),%rdi
cmovne %rcx,%rdi
jmp    1030 <printf@plt>

LLVM IR (-O0):
@.str = [4 x i8] c"one\00"
@.str.1 = [4 x i8] c"two\00"
@.str.2 = [6 x i8] c"three\00"
@.str.3 = [6 x i8] c"other\00"
define void @GetInfoDestTV(i16 signext %0) {
%2 = alloca i16
store i16 %0, i16* %2
%3 = load i16, i16* %2
%4 = sext i16 %3 to i32
%5 = icmp eq i32 %4, 1
br i1 %5, label %6, label %8
6: ; preds = %1
%7 = call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0))
br label %24
8: ; preds = %1
%9 = load i16, i16* %2
%10 = sext i16 %9 to i32
%11 = icmp eq i32 %10, 2
br i1 %11, label %12, label %14
12: ; preds = %8
%13 = call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.1, i64 0, i64 0))
br label %23
14: ; preds = %8
%15 = load i16, i16* %2
%16 = sext i16 %15 to i32
%17 = icmp eq i32 %16, 2
br i1 %17, label %18, label %20
18: ; preds = %14
%19 = call i32 @printf(i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.2, i64 0, i64 0))
br label %22
20: ; preds = %14
%21 = call i32 @printf(i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.3, i64 0, i64 0))
br label %22
22: ; preds = %20, %18
br label %23
23: ; preds = %22, %12
br label %24
24: ; preds = %23, %6
ret void
}

LLVM IR (-O2):
@.str = [4 x i8] c"one\00"
@.str.1 = [4 x i8] c"two\00"
@.str.3 = [6 x i8] c"other\00"
define void @GetInfoDestTV(i16 signext %0) {
%2 = icmp eq i16 %0, 2
%3 = select i1 %2, i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.1, i64 0, i64 0), i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.3, i64 0, i64 0)
%4 = icmp eq i16 %0, 1
%5 = select i1 %4, i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i8* %3
%6 = tail call i32 @printf(i8* dereferenceable(1) %5)
ret void
}