#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 *, int);
void f_print_type(int TOKENIKTYPE) {
  switch (TOKENIKTYPE) {
  case 37:
    printf("void\t type_num: %d\n", TOKENIKTYPE);
    break;
  case 38:
    printf("double\t type_num: %d\n", TOKENIKTYPE);
    break;
  case 39:
    printf("int\t type_num: %d\n", TOKENIKTYPE);
    break;
  case 49:
    printf("String\t type_num: %d\n", TOKENIKTYPE);
    break;
  case 41:
    printf("boolean\t type_num: %d\n", TOKENIKTYPE);
    break;
  default:
    printf("Something Wrong type_num: %d\n", TOKENIKTYPE);
    break;
  }
}


x86 assembly (clang, -O0):
<f_print_type>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0xffffffdb,%eax
mov    %eax,%ecx
mov    %rcx,-0x10(%rbp)
sub    $0xc,%eax
ja     11a8 <f_print_type+0x98>
mov    -0x10(%rbp),%rax
lea    0xec5(%rip),%rcx
movslq (%rcx,%rax,4),%rax
add    %rcx,%rax
jmp    *%rax
mov    -0x4(%rbp),%esi
lea    0xee6(%rip),%rdi
call   1030 <printf@plt>
jmp    11b7 <f_print_type+0xa7>
mov    -0x4(%rbp),%esi
lea    0xee6(%rip),%rdi
call   1030 <printf@plt>
jmp    11b7 <f_print_type+0xa7>
mov    -0x4(%rbp),%esi
lea    0xee8(%rip),%rdi
call   1030 <printf@plt>
jmp    11b7 <f_print_type+0xa7>
mov    -0x4(%rbp),%esi
lea    0xee7(%rip),%rdi
call   1030 <printf@plt>
jmp    11b7 <f_print_type+0xa7>
mov    -0x4(%rbp),%esi
lea    0xee9(%rip),%rdi
call   1030 <printf@plt>
jmp    11b7 <f_print_type+0xa7>
mov    -0x4(%rbp),%esi
lea    0xeec(%rip),%rdi
call   1030 <printf@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<f_print_type>:
mov    %edi,%esi
lea    -0x25(%rsi),%eax
cmp    $0xc,%eax
ja     115d <f_print_type+0x4d>
lea    0xedf(%rip),%rcx
movslq (%rcx,%rax,4),%rax
add    %rcx,%rax
jmp    *%rax
lea    0xf03(%rip),%rdi
mov    $0x25,%esi
jmp    1030 <printf@plt>
lea    0xf06(%rip),%rdi
mov    $0x26,%esi
jmp    1030 <printf@plt>
lea    0xf0b(%rip),%rdi
mov    $0x27,%esi
jmp    1030 <printf@plt>
lea    0xf3a(%rip),%rdi
jmp    1030 <printf@plt>
lea    0xf17(%rip),%rdi
mov    $0x29,%esi
jmp    1030 <printf@plt>
lea    0xef0(%rip),%rdi
mov    $0x31,%esi
jmp    1030 <printf@plt>

LLVM IR (-O0):
@.str = [20 x i8] c"void\09 type_num: %d\0A\00"
@.str.1 = [22 x i8] c"double\09 type_num: %d\0A\00"
@.str.2 = [19 x i8] c"int\09 type_num: %d\0A\00"
@.str.3 = [22 x i8] c"String\09 type_num: %d\0A\00"
@.str.4 = [23 x i8] c"boolean\09 type_num: %d\0A\00"
@.str.5 = [30 x i8] c"Something Wrong type_num: %d\0A\00"
define void @f_print_type(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = load i32, i32* %2
switch i32 %3, label %19 [
i32 37, label %4
i32 38, label %7
i32 39, label %10
i32 49, label %13
i32 41, label %16
]
4: ; preds = %1
%5 = load i32, i32* %2
%6 = call i32 @printf(i8* getelementptr inbounds ([20 x i8], [20 x i8]* @.str, i64 0, i64 0), i32 %5)
br label %22
7: ; preds = %1
%8 = load i32, i32* %2
%9 = call i32 @printf(i8* getelementptr inbounds ([22 x i8], [22 x i8]* @.str.1, i64 0, i64 0), i32 %8)
br label %22
10: ; preds = %1
%11 = load i32, i32* %2
%12 = call i32 @printf(i8* getelementptr inbounds ([19 x i8], [19 x i8]* @.str.2, i64 0, i64 0), i32 %11)
br label %22
13: ; preds = %1
%14 = load i32, i32* %2
%15 = call i32 @printf(i8* getelementptr inbounds ([22 x i8], [22 x i8]* @.str.3, i64 0, i64 0), i32 %14)
br label %22
16: ; preds = %1
%17 = load i32, i32* %2
%18 = call i32 @printf(i8* getelementptr inbounds ([23 x i8], [23 x i8]* @.str.4, i64 0, i64 0), i32 %17)
br label %22
19: ; preds = %1
%20 = load i32, i32* %2
%21 = call i32 @printf(i8* getelementptr inbounds ([30 x i8], [30 x i8]* @.str.5, i64 0, i64 0), i32 %20)
br label %22
22: ; preds = %19, %16, %13, %10, %7, %4
ret void
}

LLVM IR (-O2):
@.str = [20 x i8] c"void\09 type_num: %d\0A\00"
@.str.1 = [22 x i8] c"double\09 type_num: %d\0A\00"
@.str.2 = [19 x i8] c"int\09 type_num: %d\0A\00"
@.str.3 = [22 x i8] c"String\09 type_num: %d\0A\00"
@.str.4 = [23 x i8] c"boolean\09 type_num: %d\0A\00"
@.str.5 = [30 x i8] c"Something Wrong type_num: %d\0A\00"
define void @f_print_type(i32 %0) {
switch i32 %0, label %12 [
i32 37, label %2
i32 38, label %4
i32 39, label %6
i32 49, label %8
i32 41, label %10
]
2: ; preds = %1
%3 = tail call i32 @printf(i8* getelementptr inbounds ([20 x i8], [20 x i8]* @.str, i64 0, i64 0), i32 37)
br label %14
4: ; preds = %1
%5 = tail call i32 @printf(i8* getelementptr inbounds ([22 x i8], [22 x i8]* @.str.1, i64 0, i64 0), i32 38)
br label %14
6: ; preds = %1
%7 = tail call i32 @printf(i8* getelementptr inbounds ([19 x i8], [19 x i8]* @.str.2, i64 0, i64 0), i32 39)
br label %14
8: ; preds = %1
%9 = tail call i32 @printf(i8* getelementptr inbounds ([22 x i8], [22 x i8]* @.str.3, i64 0, i64 0), i32 49)
br label %14
10: ; preds = %1
%11 = tail call i32 @printf(i8* getelementptr inbounds ([23 x i8], [23 x i8]* @.str.4, i64 0, i64 0), i32 41)
br label %14
12: ; preds = %1
%13 = tail call i32 @printf(i8* getelementptr inbounds ([30 x i8], [30 x i8]* @.str.5, i64 0, i64 0), i32 %0)
br label %14
14: ; preds = %12, %10, %8, %6, %4, %2
ret void
}