#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 *TypeToText(int);
char *TypeToDefault(int type) {
  char *result = TypeToText(type);
  switch (type) {
  case 102:
    result = "double";
    break;
  case 111:
    result = "unsigned";
    break;
  case 109:
    result = "int";
    break;
  }
  return result;
}


x86 assembly (clang, -O0):
<TypeToDefault>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %edi,-0x4(%rbp)
mov    -0x4(%rbp),%edi
call   1030 <TypeToText@plt>
mov    %rax,-0x10(%rbp)
mov    -0x4(%rbp),%eax
mov    %eax,-0x14(%rbp)
sub    $0x66,%eax
je     115d <TypeToDefault+0x4d>
jmp    113b <TypeToDefault+0x2b>
mov    -0x14(%rbp),%eax
sub    $0x6d,%eax
je     117d <TypeToDefault+0x6d>
jmp    114c <TypeToDefault+0x3c>
mov    -0x14(%rbp),%eax
sub    $0x6f,%eax
je     116d <TypeToDefault+0x5d>
jmp    1188 <TypeToDefault+0x78>
lea    0xe9c(%rip),%rax
mov    %rax,-0x10(%rbp)
jmp    1188 <TypeToDefault+0x78>
lea    0xe93(%rip),%rax
mov    %rax,-0x10(%rbp)
jmp    1188 <TypeToDefault+0x78>
lea    0xe8c(%rip),%rax
mov    %rax,-0x10(%rbp)
mov    -0x10(%rbp),%rax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<TypeToDefault>:
push   %rbx
mov    %edi,%ebx
call   1030 <TypeToText@plt>
cmp    $0x6f,%ebx
je     1130 <TypeToDefault+0x20>
cmp    $0x6d,%ebx
je     1139 <TypeToDefault+0x29>
cmp    $0x66,%ebx
jne    1140 <TypeToDefault+0x30>
lea    0xed2(%rip),%rax
pop    %rbx
ret
lea    0xed0(%rip),%rax
pop    %rbx
ret
lea    0xed0(%rip),%rax
pop    %rbx
ret

LLVM IR (-O0):
@.str = [7 x i8] c"double\00"
@.str.1 = [9 x i8] c"unsigned\00"
@.str.2 = [4 x i8] c"int\00"
define i8* @TypeToDefault(i32 %0) {
%2 = alloca i32
%3 = alloca i8*
store i32 %0, i32* %2
%4 = load i32, i32* %2
%5 = call i8* @TypeToText(i32 %4)
store i8* %5, i8** %3
%6 = load i32, i32* %2
switch i32 %6, label %10 [
i32 102, label %7
i32 111, label %8
i32 109, label %9
]
7: ; preds = %1
store i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str, i64 0, i64 0), i8** %3
br label %10
8: ; preds = %1
store i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str.1, i64 0, i64 0), i8** %3
br label %10
9: ; preds = %1
store i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.2, i64 0, i64 0), i8** %3
br label %10
10: ; preds = %1, %9, %8, %7
%11 = load i8*, i8** %3
ret i8* %11
}

LLVM IR (-O2):
@.str = [7 x i8] c"double\00"
@.str.1 = [9 x i8] c"unsigned\00"
@.str.2 = [4 x i8] c"int\00"
define i8* @TypeToDefault(i32 %0) {
%2 = tail call i8* @TypeToText(i32 %0)
switch i32 %0, label %6 [
i32 102, label %3
i32 111, label %4
i32 109, label %5
]
3: ; preds = %1
br label %6
4: ; preds = %1
br label %6
5: ; preds = %1
br label %6
6: ; preds = %1, %5, %4, %3
%7 = phi i8* [ %2, %1 ], [ getelementptr inbounds ([4 x i8], [4 x i8]* @.str.2, i64 0, i64 0), %5 ], [ getelementptr inbounds ([9 x i8], [9 x i8]* @.str.1, i64 0, i64 0), %4 ], [ getelementptr inbounds ([7 x i8], [7 x i8]* @.str, i64 0, i64 0), %3 ]
ret i8* %7
}