#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 */
typedef int uint32_t;

/* Variables and functions */
char *processError(uint32_t e) {
  switch (e) {
  case 0:
    return "No error";
    break;
  case 30:
    return "Cannot open reference file";
    break;
  case 31:
    return "Cannot allocate reference";
    break;
  case 32:
    return "Reference file isn't multifasta format";
    break;
  case 37:
    return "Cannot open reference file on write mode";
    break;
  case 42:
    return "Cannot open queries file";
    break;
  case 43:
    return "Cannot allocate queries";
    break;
  case 45:
    return "Cannot allocate results";
    break;
  case 47:
    return "Cannot open results file for save intervals";
    break;
  case 48:
    return "Cannot open results file for load intervals";
    break;
  case 99:
    return "Not implemented";
    break;
  default:
    return "Unknown error";
  }
}


x86 assembly (clang, -O0):
<processError>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0xc(%rbp)
mov    -0xc(%rbp),%eax
mov    %rax,-0x18(%rbp)
sub    $0x63,%rax
ja     11dc <processError+0xdc>
mov    -0x18(%rbp),%rax
lea    0xedd(%rip),%rcx
movslq (%rcx,%rax,4),%rax
add    %rcx,%rax
jmp    *%rax
lea    0x105d(%rip),%rax
mov    %rax,-0x8(%rbp)
jmp    11e7 <processError+0xe7>
lea    0x1056(%rip),%rax
mov    %rax,-0x8(%rbp)
jmp    11e7 <processError+0xe7>
lea    0x1061(%rip),%rax
mov    %rax,-0x8(%rbp)
jmp    11e7 <processError+0xe7>
lea    0x106b(%rip),%rax
mov    %rax,-0x8(%rbp)
jmp    11e7 <processError+0xe7>
lea    0x1082(%rip),%rax
mov    %rax,-0x8(%rbp)
jmp    11e7 <processError+0xe7>
lea    0x109b(%rip),%rax
mov    %rax,-0x8(%rbp)
jmp    11e7 <processError+0xe7>
lea    0x10a4(%rip),%rax
mov    %rax,-0x8(%rbp)
jmp    11e7 <processError+0xe7>
lea    0x10ac(%rip),%rax
mov    %rax,-0x8(%rbp)
jmp    11e7 <processError+0xe7>
lea    0x10b4(%rip),%rax
mov    %rax,-0x8(%rbp)
jmp    11e7 <processError+0xe7>
lea    0x10d0(%rip),%rax
mov    %rax,-0x8(%rbp)
jmp    11e7 <processError+0xe7>
lea    0x10ec(%rip),%rax
mov    %rax,-0x8(%rbp)
jmp    11e7 <processError+0xe7>
lea    0x10ec(%rip),%rax
mov    %rax,-0x8(%rbp)
mov    -0x8(%rbp),%rax
pop    %rbp
ret

x86 assembly (clang, -O2):
<processError>:
cmp    $0x63,%edi
ja     1126 <processError+0x26>
lea    0x1084(%rip),%rax
mov    %edi,%ecx
lea    0xeeb(%rip),%rdx
movslq (%rdx,%rcx,4),%rcx
add    %rdx,%rcx
jmp    *%rcx
lea    0x1074(%rip),%rax
ret
lea    0x11a2(%rip),%rax
ret
lea    0x107f(%rip),%rax
ret
lea    0x1091(%rip),%rax
ret
lea    0x10b0(%rip),%rax
ret
lea    0x10d1(%rip),%rax
ret
lea    0x10e2(%rip),%rax
ret
lea    0x10f2(%rip),%rax
ret
lea    0x1102(%rip),%rax
ret
lea    0x1126(%rip),%rax
ret
lea    0x114a(%rip),%rax
ret

LLVM IR (-O0):
@.str = [9 x i8] c"No error\00"
@.str.1 = [27 x i8] c"Cannot open reference file\00"
@.str.2 = [26 x i8] c"Cannot allocate reference\00"
@.str.3 = [39 x i8] c"Reference file isn't multifasta format\00"
@.str.4 = [41 x i8] c"Cannot open reference file on write mode\00"
@.str.5 = [25 x i8] c"Cannot open queries file\00"
@.str.6 = [24 x i8] c"Cannot allocate queries\00"
@.str.7 = [24 x i8] c"Cannot allocate results\00"
@.str.8 = [44 x i8] c"Cannot open results file for save intervals\00"
@.str.9 = [44 x i8] c"Cannot open results file for load intervals\00"
@.str.10 = [16 x i8] c"Not implemented\00"
@.str.11 = [14 x i8] c"Unknown error\00"
define i8* @processError(i32 %0) {
%2 = alloca i8*
%3 = alloca i32
store i32 %0, i32* %3
%4 = load i32, i32* %3
switch i32 %4, label %16 [
i32 0, label %5
i32 30, label %6
i32 31, label %7
i32 32, label %8
i32 37, label %9
i32 42, label %10
i32 43, label %11
i32 45, label %12
i32 47, label %13
i32 48, label %14
i32 99, label %15
]
5: ; preds = %1
store i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str, i64 0, i64 0), i8** %2
br label %17
6: ; preds = %1
store i8* getelementptr inbounds ([27 x i8], [27 x i8]* @.str.1, i64 0, i64 0), i8** %2
br label %17
7: ; preds = %1
store i8* getelementptr inbounds ([26 x i8], [26 x i8]* @.str.2, i64 0, i64 0), i8** %2
br label %17
8: ; preds = %1
store i8* getelementptr inbounds ([39 x i8], [39 x i8]* @.str.3, i64 0, i64 0), i8** %2
br label %17
9: ; preds = %1
store i8* getelementptr inbounds ([41 x i8], [41 x i8]* @.str.4, i64 0, i64 0), i8** %2
br label %17
10: ; preds = %1
store i8* getelementptr inbounds ([25 x i8], [25 x i8]* @.str.5, i64 0, i64 0), i8** %2
br label %17
11: ; preds = %1
store i8* getelementptr inbounds ([24 x i8], [24 x i8]* @.str.6, i64 0, i64 0), i8** %2
br label %17
12: ; preds = %1
store i8* getelementptr inbounds ([24 x i8], [24 x i8]* @.str.7, i64 0, i64 0), i8** %2
br label %17
13: ; preds = %1
store i8* getelementptr inbounds ([44 x i8], [44 x i8]* @.str.8, i64 0, i64 0), i8** %2
br label %17
14: ; preds = %1
store i8* getelementptr inbounds ([44 x i8], [44 x i8]* @.str.9, i64 0, i64 0), i8** %2
br label %17
15: ; preds = %1
store i8* getelementptr inbounds ([16 x i8], [16 x i8]* @.str.10, i64 0, i64 0), i8** %2
br label %17
16: ; preds = %1
store i8* getelementptr inbounds ([14 x i8], [14 x i8]* @.str.11, i64 0, i64 0), i8** %2
br label %17
17: ; preds = %16, %15, %14, %13, %12, %11, %10, %9, %8, %7, %6, %5
%18 = load i8*, i8** %2
ret i8* %18
}

LLVM IR (-O2):
@.str = [9 x i8] c"No error\00"
@.str.1 = [27 x i8] c"Cannot open reference file\00"
@.str.2 = [26 x i8] c"Cannot allocate reference\00"
@.str.3 = [39 x i8] c"Reference file isn't multifasta format\00"
@.str.4 = [41 x i8] c"Cannot open reference file on write mode\00"
@.str.5 = [25 x i8] c"Cannot open queries file\00"
@.str.6 = [24 x i8] c"Cannot allocate queries\00"
@.str.7 = [24 x i8] c"Cannot allocate results\00"
@.str.8 = [44 x i8] c"Cannot open results file for save intervals\00"
@.str.9 = [44 x i8] c"Cannot open results file for load intervals\00"
@.str.10 = [16 x i8] c"Not implemented\00"
@.str.11 = [14 x i8] c"Unknown error\00"
define i8* @processError(i32 %0) {
switch i32 %0, label %12 [
i32 0, label %13
i32 30, label %2
i32 31, label %3
i32 32, label %4
i32 37, label %5
i32 42, label %6
i32 43, label %7
i32 45, label %8
i32 47, label %9
i32 48, label %10
i32 99, label %11
]
2: ; preds = %1
br label %13
3: ; preds = %1
br label %13
4: ; preds = %1
br label %13
5: ; preds = %1
br label %13
6: ; preds = %1
br label %13
7: ; preds = %1
br label %13
8: ; preds = %1
br label %13
9: ; preds = %1
br label %13
10: ; preds = %1
br label %13
11: ; preds = %1
br label %13
12: ; preds = %1
br label %13
13: ; preds = %1, %12, %11, %10, %9, %8, %7, %6, %5, %4, %3, %2
%14 = phi i8* [ getelementptr inbounds ([14 x i8], [14 x i8]* @.str.11, i64 0, i64 0), %12 ], [ getelementptr inbounds ([16 x i8], [16 x i8]* @.str.10, i64 0, i64 0), %11 ], [ getelementptr inbounds ([44 x i8], [44 x i8]* @.str.9, i64 0, i64 0), %10 ], [ getelementptr inbounds ([44 x i8], [44 x i8]* @.str.8, i64 0, i64 0), %9 ], [ getelementptr inbounds ([24 x i8], [24 x i8]* @.str.7, i64 0, i64 0), %8 ], [ getelementptr inbounds ([24 x i8], [24 x i8]* @.str.6, i64 0, i64 0), %7 ], [ getelementptr inbounds ([25 x i8], [25 x i8]* @.str.5, i64 0, i64 0), %6 ], [ getelementptr inbounds ([41 x i8], [41 x i8]* @.str.4, i64 0, i64 0), %5 ], [ getelementptr inbounds ([39 x i8], [39 x i8]* @.str.3, i64 0, i64 0), %4 ], [ getelementptr inbounds ([26 x i8], [26 x i8]* @.str.2, i64 0, i64 0), %3 ], [ getelementptr inbounds ([27 x i8], [27 x i8]* @.str.1, i64 0, i64 0), %2 ], [ getelementptr inbounds ([9 x i8], [9 x i8]* @.str, i64 0, i64 0), %1 ]
ret i8* %14
}