#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);
char *processError(int e) {
  printf("ERROR: %d\n", e);
  switch (e) {
  case 0:
    return "No error";
    break;
  case 1:
    return "Error opening reference file";
    break;
  case 2:
    return "Error opening queries file";
    break;
  case 5:
    return "Error reading candidates";
    break;
  case 6:
    return "Error reading original results";
    break;
  case 30:
    return "Cannot open reference file";
    break;
  case 31:
    return "Cannot allocate reference";
    break;
  case 33:
    return "Cannot allocate queries";
    break;
  case 34:
    return "Cannot allocate candidates";
    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
sub    $0x20,%rsp
mov    %edi,-0xc(%rbp)
mov    -0xc(%rbp),%esi
lea    0x106b(%rip),%rdi
call   1030 <printf@plt>
mov    -0xc(%rbp),%eax
mov    %rax,-0x18(%rbp)
sub    $0x63,%rax
ja     125f <processError+0x14f>
mov    -0x18(%rbp),%rax
lea    0xeba(%rip),%rcx
movslq (%rcx,%rax,4),%rax
add    %rcx,%rax
jmp    *%rax
lea    0x1045(%rip),%rax
mov    %rax,-0x8(%rbp)
jmp    126a <processError+0x15a>
lea    0x103e(%rip),%rax
mov    %rax,-0x8(%rbp)
jmp    126a <processError+0x15a>
lea    0x104b(%rip),%rax
mov    %rax,-0x8(%rbp)
jmp    126a <processError+0x15a>
lea    0x1056(%rip),%rax
mov    %rax,-0x8(%rbp)
jmp    126a <processError+0x15a>
lea    0x105f(%rip),%rax
mov    %rax,-0x8(%rbp)
jmp    126a <processError+0x15a>
lea    0x106e(%rip),%rax
mov    %rax,-0x8(%rbp)
jmp    126a <processError+0x15a>
lea    0x1079(%rip),%rax
mov    %rax,-0x8(%rbp)
jmp    126a <processError+0x15a>
lea    0x1083(%rip),%rax
mov    %rax,-0x8(%rbp)
jmp    126a <processError+0x15a>
lea    0x108b(%rip),%rax
mov    %rax,-0x8(%rbp)
jmp    126a <processError+0x15a>
lea    0x1096(%rip),%rax
mov    %rax,-0x8(%rbp)
jmp    126a <processError+0x15a>
lea    0x10ad(%rip),%rax
mov    %rax,-0x8(%rbp)
jmp    126a <processError+0x15a>
lea    0x10c6(%rip),%rax
mov    %rax,-0x8(%rbp)
jmp    126a <processError+0x15a>
lea    0x1033(%rip),%rax
mov    %rax,-0x8(%rbp)
jmp    126a <processError+0x15a>
lea    0x10bf(%rip),%rax
mov    %rax,-0x8(%rbp)
jmp    126a <processError+0x15a>
lea    0x10c7(%rip),%rax
mov    %rax,-0x8(%rbp)
jmp    126a <processError+0x15a>
lea    0x10e3(%rip),%rax
mov    %rax,-0x8(%rbp)
jmp    126a <processError+0x15a>
lea    0x10ff(%rip),%rax
mov    %rax,-0x8(%rbp)
jmp    126a <processError+0x15a>
lea    0x10ff(%rip),%rax
mov    %rax,-0x8(%rbp)
mov    -0x8(%rbp),%rax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<processError>:
push   %rbx
mov    %edi,%ebx
lea    0x1076(%rip),%rdi
mov    %ebx,%esi
call   1030 <printf@plt>
cmp    $0x63,%ebx
ja     115a <processError+0x4a>
lea    0x106e(%rip),%rax
mov    %ebx,%ecx
lea    0xeca(%rip),%rdx
movslq (%rdx,%rcx,4),%rcx
add    %rdx,%rcx
jmp    *%rcx
lea    0x1103(%rip),%rax
pop    %rbx
ret
lea    0x1055(%rip),%rax
pop    %rbx
ret
lea    0x1069(%rip),%rax
pop    %rbx
ret
lea    0x1204(%rip),%rax
pop    %rbx
ret
lea    0x1072(%rip),%rax
pop    %rbx
ret
lea    0x1082(%rip),%rax
pop    %rbx
ret
lea    0x1098(%rip),%rax
pop    %rbx
ret
lea    0x10aa(%rip),%rax
pop    %rbx
ret
lea    0x10ee(%rip),%rax
pop    %rbx
ret
lea    0x10ca(%rip),%rax
pop    %rbx
ret
lea    0x1103(%rip),%rax
pop    %rbx
ret
lea    0x1123(%rip),%rax
pop    %rbx
ret
lea    0x1133(%rip),%rax
pop    %rbx
ret
lea    0x1142(%rip),%rax
pop    %rbx
ret
lea    0x1165(%rip),%rax
pop    %rbx
ret
lea    0x1188(%rip),%rax
pop    %rbx
ret

LLVM IR (-O0):
@.str = [11 x i8] c"ERROR: %d\0A\00"
@.str.1 = [9 x i8] c"No error\00"
@.str.2 = [29 x i8] c"Error opening reference file\00"
@.str.3 = [27 x i8] c"Error opening queries file\00"
@.str.4 = [25 x i8] c"Error reading candidates\00"
@.str.5 = [31 x i8] c"Error reading original results\00"
@.str.6 = [27 x i8] c"Cannot open reference file\00"
@.str.7 = [26 x i8] c"Cannot allocate reference\00"
@.str.8 = [24 x i8] c"Cannot allocate queries\00"
@.str.9 = [27 x i8] c"Cannot allocate candidates\00"
@.str.10 = [39 x i8] c"Reference file isn't multifasta format\00"
@.str.11 = [41 x i8] c"Cannot open reference file on write mode\00"
@.str.12 = [25 x i8] c"Cannot open queries file\00"
@.str.13 = [24 x i8] c"Cannot allocate results\00"
@.str.14 = [44 x i8] c"Cannot open results file for save intervals\00"
@.str.15 = [44 x i8] c"Cannot open results file for load intervals\00"
@.str.16 = [16 x i8] c"Not implemented\00"
@.str.17 = [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
%5 = call i32 @printf(i8* getelementptr inbounds ([11 x i8], [11 x i8]* @.str, i64 0, i64 0), i32 %4)
%6 = load i32, i32* %3
switch i32 %6, label %24 [
i32 0, label %7
i32 1, label %8
i32 2, label %9
i32 5, label %10
i32 6, label %11
i32 30, label %12
i32 31, label %13
i32 33, label %14
i32 34, label %15
i32 32, label %16
i32 37, label %17
i32 42, label %18
i32 43, label %19
i32 45, label %20
i32 47, label %21
i32 48, label %22
i32 99, label %23
]
7: ; preds = %1
store i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str.1, i64 0, i64 0), i8** %2
br label %25
8: ; preds = %1
store i8* getelementptr inbounds ([29 x i8], [29 x i8]* @.str.2, i64 0, i64 0), i8** %2
br label %25
9: ; preds = %1
store i8* getelementptr inbounds ([27 x i8], [27 x i8]* @.str.3, i64 0, i64 0), i8** %2
br label %25
10: ; preds = %1
store i8* getelementptr inbounds ([25 x i8], [25 x i8]* @.str.4, i64 0, i64 0), i8** %2
br label %25
11: ; preds = %1
store i8* getelementptr inbounds ([31 x i8], [31 x i8]* @.str.5, i64 0, i64 0), i8** %2
br label %25
12: ; preds = %1
store i8* getelementptr inbounds ([27 x i8], [27 x i8]* @.str.6, i64 0, i64 0), i8** %2
br label %25
13: ; preds = %1
store i8* getelementptr inbounds ([26 x i8], [26 x i8]* @.str.7, i64 0, i64 0), i8** %2
br label %25
14: ; preds = %1
store i8* getelementptr inbounds ([24 x i8], [24 x i8]* @.str.8, i64 0, i64 0), i8** %2
br label %25
15: ; preds = %1
store i8* getelementptr inbounds ([27 x i8], [27 x i8]* @.str.9, i64 0, i64 0), i8** %2
br label %25
16: ; preds = %1
store i8* getelementptr inbounds ([39 x i8], [39 x i8]* @.str.10, i64 0, i64 0), i8** %2
br label %25
17: ; preds = %1
store i8* getelementptr inbounds ([41 x i8], [41 x i8]* @.str.11, i64 0, i64 0), i8** %2
br label %25
18: ; preds = %1
store i8* getelementptr inbounds ([25 x i8], [25 x i8]* @.str.12, i64 0, i64 0), i8** %2
br label %25
19: ; preds = %1
store i8* getelementptr inbounds ([24 x i8], [24 x i8]* @.str.8, i64 0, i64 0), i8** %2
br label %25
20: ; preds = %1
store i8* getelementptr inbounds ([24 x i8], [24 x i8]* @.str.13, i64 0, i64 0), i8** %2
br label %25
21: ; preds = %1
store i8* getelementptr inbounds ([44 x i8], [44 x i8]* @.str.14, i64 0, i64 0), i8** %2
br label %25
22: ; preds = %1
store i8* getelementptr inbounds ([44 x i8], [44 x i8]* @.str.15, i64 0, i64 0), i8** %2
br label %25
23: ; preds = %1
store i8* getelementptr inbounds ([16 x i8], [16 x i8]* @.str.16, i64 0, i64 0), i8** %2
br label %25
24: ; preds = %1
store i8* getelementptr inbounds ([14 x i8], [14 x i8]* @.str.17, i64 0, i64 0), i8** %2
br label %25
25: ; preds = %24, %23, %22, %21, %20, %19, %18, %17, %16, %15, %14, %13, %12, %11, %10, %9, %8, %7
%26 = load i8*, i8** %2
ret i8* %26
}

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