#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 *eCopyString(char *);
char *blockName(int klass) {
  switch (klass) {
  case -1:
    return eCopyString("end-of-file");
  case 298:
    return eCopyString("End For/Next");
  case 299:
    return eCopyString("End Function");
  case 303:
    return eCopyString("End If");
  case 339:
    return eCopyString("End While");
  case 288:
    return eCopyString("Loop");
  case 327:
    return eCopyString("End Select");
  case 334:
    return eCopyString("End Sub");
  default:
    return eCopyString("block");
  }
}


x86 assembly (clang, -O0):
<blockName>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0xc(%rbp)
mov    -0xc(%rbp),%eax
mov    %eax,-0x10(%rbp)
sub    $0xffffffff,%eax
je     11b4 <blockName+0xa4>
jmp    112f <blockName+0x1f>
mov    -0x10(%rbp),%eax
sub    $0x120,%eax
je     121d <blockName+0x10d>
jmp    1142 <blockName+0x32>
mov    -0x10(%rbp),%eax
sub    $0x12a,%eax
je     11c9 <blockName+0xb9>
jmp    1155 <blockName+0x45>
mov    -0x10(%rbp),%eax
sub    $0x12b,%eax
je     11de <blockName+0xce>
jmp    1168 <blockName+0x58>
mov    -0x10(%rbp),%eax
sub    $0x12f,%eax
je     11f3 <blockName+0xe3>
jmp    117b <blockName+0x6b>
mov    -0x10(%rbp),%eax
sub    $0x147,%eax
je     1232 <blockName+0x122>
jmp    118e <blockName+0x7e>
mov    -0x10(%rbp),%eax
sub    $0x14e,%eax
je     1247 <blockName+0x137>
jmp    11a1 <blockName+0x91>
mov    -0x10(%rbp),%eax
sub    $0x153,%eax
je     1208 <blockName+0xf8>
jmp    125c <blockName+0x14c>
lea    0xe45(%rip),%rdi
call   1030 <eCopyString@plt>
mov    %rax,-0x8(%rbp)
jmp    126c <blockName+0x15c>
lea    0xe3c(%rip),%rdi
call   1030 <eCopyString@plt>
mov    %rax,-0x8(%rbp)
jmp    126c <blockName+0x15c>
lea    0xe34(%rip),%rdi
call   1030 <eCopyString@plt>
mov    %rax,-0x8(%rbp)
jmp    126c <blockName+0x15c>
lea    0xe2c(%rip),%rdi
call   1030 <eCopyString@plt>
mov    %rax,-0x8(%rbp)
jmp    126c <blockName+0x15c>
lea    0xe1e(%rip),%rdi
call   1030 <eCopyString@plt>
mov    %rax,-0x8(%rbp)
jmp    126c <blockName+0x15c>
lea    0xe13(%rip),%rdi
call   1030 <eCopyString@plt>
mov    %rax,-0x8(%rbp)
jmp    126c <blockName+0x15c>
lea    0xe03(%rip),%rdi
call   1030 <eCopyString@plt>
mov    %rax,-0x8(%rbp)
jmp    126c <blockName+0x15c>
lea    0xdf9(%rip),%rdi
call   1030 <eCopyString@plt>
mov    %rax,-0x8(%rbp)
jmp    126c <blockName+0x15c>
lea    0xdec(%rip),%rdi
call   1030 <eCopyString@plt>
mov    %rax,-0x8(%rbp)
mov    -0x8(%rbp),%rax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<blockName>:
lea    -0x120(%rdi),%eax
cmp    $0x33,%eax
ja     1137 <blockName+0x27>
lea    0xede(%rip),%rcx
movslq (%rcx,%rax,4),%rax
add    %rcx,%rax
jmp    *%rax
lea    0xfd5(%rip),%rdi
jmp    1030 <eCopyString@plt>
cmp    $0xffffffff,%edi
jne    1148 <blockName+0x38>
lea    0xf8d(%rip),%rdi
jmp    1030 <eCopyString@plt>
lea    0xfd0(%rip),%rdi
jmp    1030 <eCopyString@plt>
lea    0xf81(%rip),%rdi
jmp    1030 <eCopyString@plt>
lea    0xf82(%rip),%rdi
jmp    1030 <eCopyString@plt>
lea    0xf83(%rip),%rdi
jmp    1030 <eCopyString@plt>
lea    0xf8d(%rip),%rdi
jmp    1030 <eCopyString@plt>
lea    0xf8c(%rip),%rdi
jmp    1030 <eCopyString@plt>
lea    0xf66(%rip),%rdi
jmp    1030 <eCopyString@plt>

LLVM IR (-O0):
@.str = [12 x i8] c"end-of-file\00"
@.str.1 = [13 x i8] c"End For/Next\00"
@.str.2 = [13 x i8] c"End Function\00"
@.str.3 = [7 x i8] c"End If\00"
@.str.4 = [10 x i8] c"End While\00"
@.str.5 = [5 x i8] c"Loop\00"
@.str.6 = [11 x i8] c"End Select\00"
@.str.7 = [8 x i8] c"End Sub\00"
@.str.8 = [6 x i8] c"block\00"
define i8* @blockName(i32 %0) {
%2 = alloca i8*
%3 = alloca i32
store i32 %0, i32* %3
%4 = load i32, i32* %3
switch i32 %4, label %21 [
i32 -1, label %5
i32 298, label %7
i32 299, label %9
i32 303, label %11
i32 339, label %13
i32 288, label %15
i32 327, label %17
i32 334, label %19
]
5: ; preds = %1
%6 = call i8* @eCopyString(i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str, i64 0, i64 0))
store i8* %6, i8** %2
br label %23
7: ; preds = %1
%8 = call i8* @eCopyString(i8* getelementptr inbounds ([13 x i8], [13 x i8]* @.str.1, i64 0, i64 0))
store i8* %8, i8** %2
br label %23
9: ; preds = %1
%10 = call i8* @eCopyString(i8* getelementptr inbounds ([13 x i8], [13 x i8]* @.str.2, i64 0, i64 0))
store i8* %10, i8** %2
br label %23
11: ; preds = %1
%12 = call i8* @eCopyString(i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str.3, i64 0, i64 0))
store i8* %12, i8** %2
br label %23
13: ; preds = %1
%14 = call i8* @eCopyString(i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str.4, i64 0, i64 0))
store i8* %14, i8** %2
br label %23
15: ; preds = %1
%16 = call i8* @eCopyString(i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.5, i64 0, i64 0))
store i8* %16, i8** %2
br label %23
17: ; preds = %1
%18 = call i8* @eCopyString(i8* getelementptr inbounds ([11 x i8], [11 x i8]* @.str.6, i64 0, i64 0))
store i8* %18, i8** %2
br label %23
19: ; preds = %1
%20 = call i8* @eCopyString(i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str.7, i64 0, i64 0))
store i8* %20, i8** %2
br label %23
21: ; preds = %1
%22 = call i8* @eCopyString(i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.8, i64 0, i64 0))
store i8* %22, i8** %2
br label %23
23: ; preds = %21, %19, %17, %15, %13, %11, %9, %7, %5
%24 = load i8*, i8** %2
ret i8* %24
}

LLVM IR (-O2):
@.str = [12 x i8] c"end-of-file\00"
@.str.1 = [13 x i8] c"End For/Next\00"
@.str.2 = [13 x i8] c"End Function\00"
@.str.3 = [7 x i8] c"End If\00"
@.str.4 = [10 x i8] c"End While\00"
@.str.5 = [5 x i8] c"Loop\00"
@.str.6 = [11 x i8] c"End Select\00"
@.str.7 = [8 x i8] c"End Sub\00"
@.str.8 = [6 x i8] c"block\00"
define i8* @blockName(i32 %0) {
switch i32 %0, label %9 [
i32 -1, label %10
i32 298, label %2
i32 299, label %3
i32 303, label %4
i32 339, label %5
i32 288, label %6
i32 327, label %7
i32 334, label %8
]
2: ; preds = %1
br label %10
3: ; preds = %1
br label %10
4: ; preds = %1
br label %10
5: ; preds = %1
br label %10
6: ; preds = %1
br label %10
7: ; preds = %1
br label %10
8: ; preds = %1
br label %10
9: ; preds = %1
br label %10
10: ; preds = %1, %9, %8, %7, %6, %5, %4, %3, %2
%11 = phi i8* [ getelementptr inbounds ([6 x i8], [6 x i8]* @.str.8, i64 0, i64 0), %9 ], [ getelementptr inbounds ([8 x i8], [8 x i8]* @.str.7, i64 0, i64 0), %8 ], [ getelementptr inbounds ([11 x i8], [11 x i8]* @.str.6, i64 0, i64 0), %7 ], [ getelementptr inbounds ([5 x i8], [5 x i8]* @.str.5, i64 0, i64 0), %6 ], [ getelementptr inbounds ([10 x i8], [10 x i8]* @.str.4, i64 0, i64 0), %5 ], [ getelementptr inbounds ([7 x i8], [7 x i8]* @.str.3, i64 0, i64 0), %4 ], [ getelementptr inbounds ([13 x i8], [13 x i8]* @.str.2, i64 0, i64 0), %3 ], [ getelementptr inbounds ([13 x i8], [13 x i8]* @.str.1, i64 0, i64 0), %2 ], [ getelementptr inbounds ([12 x i8], [12 x i8]* @.str, i64 0, i64 0), %1 ]
%12 = tail call i8* @eCopyString(i8* %11)
ret i8* %12
}