#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*/ Flat_Display();
int /*<<< orphan*/ Gouraud_Display();
int /*<<< orphan*/ Phong_Display();
int /*<<< orphan*/ strcmp(char *, char *);
void Choose_Display(char *shad_name) {
  if (!strcmp(shad_name, "flat"))
    Flat_Display();
  else if (!strcmp(shad_name, "gouraud"))
    Gouraud_Display();
  else if (!strcmp(shad_name, "phong"))
    Phong_Display();
}


x86 assembly (clang, -O0):
<Choose_Display>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rdi
lea    0xea9(%rip),%rsi
call   1040 <strcmp@plt>
cmp    $0x0,%eax
jne    1171 <Choose_Display+0x31>
mov    $0x0,%al
call   1050 <Flat_Display@plt>
jmp    11c0 <Choose_Display+0x80>
mov    -0x8(%rbp),%rdi
lea    0xe89(%rip),%rsi
call   1040 <strcmp@plt>
cmp    $0x0,%eax
jne    1196 <Choose_Display+0x56>
mov    $0x0,%al
call   1060 <Gouraud_Display@plt>
jmp    11bb <Choose_Display+0x7b>
mov    -0x8(%rbp),%rdi
lea    0xe6c(%rip),%rsi
call   1040 <strcmp@plt>
cmp    $0x0,%eax
jne    11b6 <Choose_Display+0x76>
mov    $0x0,%al
call   1030 <Phong_Display@plt>
jmp    11bb <Choose_Display+0x7b>
jmp    11c0 <Choose_Display+0x80>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<Choose_Display>:
push   %rbx
mov    %rdi,%rbx
lea    0xeb5(%rip),%rsi
call   1040 <strcmp@plt>
test   %eax,%eax
je     117c <Choose_Display+0x3c>
lea    0xeaa(%rip),%rsi
mov    %rbx,%rdi
call   1040 <strcmp@plt>
test   %eax,%eax
je     1184 <Choose_Display+0x44>
lea    0xe9f(%rip),%rsi
mov    %rbx,%rdi
call   1040 <strcmp@plt>
test   %eax,%eax
je     118c <Choose_Display+0x4c>
pop    %rbx
ret
xor    %eax,%eax
pop    %rbx
jmp    1050 <Flat_Display@plt>
xor    %eax,%eax
pop    %rbx
jmp    1060 <Gouraud_Display@plt>
xor    %eax,%eax
pop    %rbx
jmp    1030 <Phong_Display@plt>

LLVM IR (-O0):
@.str = [5 x i8] c"flat\00"
@.str.1 = [8 x i8] c"gouraud\00"
@.str.2 = [6 x i8] c"phong\00"
define void @Choose_Display(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = load i8*, i8** %2
%4 = call i32 @strcmp(i8* %3, i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str, i64 0, i64 0))
%5 = icmp ne i32 %4, 0
br i1 %5, label %8, label %6
6: ; preds = %1
%7 = call i32 (...) @Flat_Display()
br label %22
8: ; preds = %1
%9 = load i8*, i8** %2
%10 = call i32 @strcmp(i8* %9, i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str.1, i64 0, i64 0))
%11 = icmp ne i32 %10, 0
br i1 %11, label %14, label %12
12: ; preds = %8
%13 = call i32 (...) @Gouraud_Display()
br label %21
14: ; preds = %8
%15 = load i8*, i8** %2
%16 = call i32 @strcmp(i8* %15, i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.2, i64 0, i64 0))
%17 = icmp ne i32 %16, 0
br i1 %17, label %20, label %18
18: ; preds = %14
%19 = call i32 (...) @Phong_Display()
br label %20
20: ; preds = %18, %14
br label %21
21: ; preds = %20, %12
br label %22
22: ; preds = %21, %6
ret void
}

LLVM IR (-O2):
@.str = [5 x i8] c"flat\00"
@.str.1 = [8 x i8] c"gouraud\00"
@.str.2 = [6 x i8] c"phong\00"
define void @Choose_Display(i8* nocapture %0) {
%2 = tail call i32 @strcmp(i8* dereferenceable(1) %0, i8* dereferenceable(5) getelementptr inbounds ([5 x i8], [5 x i8]* @.str, i64 0, i64 0))
%3 = icmp eq i32 %2, 0
br i1 %3, label %4, label %6
4: ; preds = %1
%5 = tail call i32 (...) @Flat_Display()
br label %16
6: ; preds = %1
%7 = tail call i32 @strcmp(i8* dereferenceable(1) %0, i8* dereferenceable(8) getelementptr inbounds ([8 x i8], [8 x i8]* @.str.1, i64 0, i64 0))
%8 = icmp eq i32 %7, 0
br i1 %8, label %9, label %11
9: ; preds = %6
%10 = tail call i32 (...) @Gouraud_Display()
br label %16
11: ; preds = %6
%12 = tail call i32 @strcmp(i8* dereferenceable(1) %0, i8* dereferenceable(6) getelementptr inbounds ([6 x i8], [6 x i8]* @.str.2, i64 0, i64 0))
%13 = icmp eq i32 %12, 0
br i1 %13, label %14, label %16
14: ; preds = %11
%15 = tail call i32 (...) @Phong_Display()
br label %16
16: ; preds = %9, %14, %11, %4
ret void
}