#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*/ strcpy(char *, char *);
char *error_il(int e) {
  static char err[100];
  switch (e) {
  case 0:
    strcpy(err, "No error");
    break;
  case 1:
    strcpy(err, "Out of memory");
    break;
  case 30:
    strcpy(err, "Error reading source posting lists");
    break;
  case 31:
    strcpy(err, "Empty Source list or incomplete !!");
    break;
  case 40:
    strcpy(err, "default function for Intersect_2-op not initialized");
    break;
  case 41:
    strcpy(err, "default function for Intersect_N-op not initialized");
    break;
  case 42:
    strcpy(err, "default function for fsearch-op not initialized");
    break;
  case 2:
    strcpy(err, "The text must end with a \\0");
    break;
  case 5:
    strcpy(err, "You can't free the text if you don't copy it");
    break;
  case 20:
    strcpy(err, "Cannot create files");
    break;
  case 21:
    strcpy(err, "Error writing the index");
    break;
  case 22:
    strcpy(err, "Error writing the index");
    break;
  case 23:
    strcpy(err, "Cannot open index; break");
  case 24:
    strcpy(err, "Cannot open text; break");
  case 25:
    strcpy(err, "Error reading the index");
    break;
  case 26:
    strcpy(err, "Error reading the index");
    break;
  case 27:
    strcpy(err, "Error reading the text");
    break;
  case 28:
    strcpy(err, "Error reading the text");
    break;
  case 99:
    strcpy(err, "Not implemented");
    break;
  default:
    strcpy(err, "Unknown error");
  }
  return err;
}


x86 assembly (clang, -O0):
<error_il>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    -0x4(%rbp),%eax
mov    %rax,-0x10(%rbp)
sub    $0x63,%rax
ja     12fe <error_il+0x1ee>
mov    -0x10(%rbp),%rax
lea    0xec9(%rip),%rcx
movslq (%rcx,%rax,4),%rax
add    %rcx,%rax
jmp    *%rax
lea    0x2ef9(%rip),%rdi
lea    0x1042(%rip),%rsi
call   1030 <strcpy@plt>
jmp    1311 <error_il+0x201>
lea    0x2ee1(%rip),%rdi
lea    0x1033(%rip),%rsi
call   1030 <strcpy@plt>
jmp    1311 <error_il+0x201>
lea    0x2ec9(%rip),%rdi
lea    0x1029(%rip),%rsi
call   1030 <strcpy@plt>
jmp    1311 <error_il+0x201>
lea    0x2eb1(%rip),%rdi
lea    0x1034(%rip),%rsi
call   1030 <strcpy@plt>
jmp    1311 <error_il+0x201>
lea    0x2e99(%rip),%rdi
lea    0x103f(%rip),%rsi
call   1030 <strcpy@plt>
jmp    1311 <error_il+0x201>
lea    0x2e81(%rip),%rdi
lea    0x105b(%rip),%rsi
call   1030 <strcpy@plt>
jmp    1311 <error_il+0x201>
lea    0x2e69(%rip),%rdi
lea    0x1077(%rip),%rsi
call   1030 <strcpy@plt>
jmp    1311 <error_il+0x201>
lea    0x2e51(%rip),%rdi
lea    0x108f(%rip),%rsi
call   1030 <strcpy@plt>
jmp    1311 <error_il+0x201>
lea    0x2e39(%rip),%rdi
lea    0x1093(%rip),%rsi
call   1030 <strcpy@plt>
jmp    1311 <error_il+0x201>
lea    0x2e21(%rip),%rdi
lea    0x10a8(%rip),%rsi
call   1030 <strcpy@plt>
jmp    1311 <error_il+0x201>
lea    0x2e09(%rip),%rdi
lea    0x10a4(%rip),%rsi
call   1030 <strcpy@plt>
jmp    1311 <error_il+0x201>
lea    0x2df1(%rip),%rdi
lea    0x108c(%rip),%rsi
call   1030 <strcpy@plt>
jmp    1311 <error_il+0x201>
lea    0x2dd9(%rip),%rdi
lea    0x108c(%rip),%rsi
call   1030 <strcpy@plt>
lea    0x2dc6(%rip),%rdi
lea    0x1092(%rip),%rsi
call   1030 <strcpy@plt>
lea    0x2db3(%rip),%rdi
lea    0x1097(%rip),%rsi
call   1030 <strcpy@plt>
jmp    1311 <error_il+0x201>
lea    0x2d9b(%rip),%rdi
lea    0x107f(%rip),%rsi
call   1030 <strcpy@plt>
jmp    1311 <error_il+0x201>
lea    0x2d83(%rip),%rdi
lea    0x107f(%rip),%rsi
call   1030 <strcpy@plt>
jmp    1311 <error_il+0x201>
lea    0x2d6b(%rip),%rdi
lea    0x1067(%rip),%rsi
call   1030 <strcpy@plt>
jmp    1311 <error_il+0x201>
lea    0x2d53(%rip),%rdi
lea    0x1066(%rip),%rsi
call   1030 <strcpy@plt>
jmp    1311 <error_il+0x201>
lea    0x2d3b(%rip),%rdi
lea    0x105e(%rip),%rsi
call   1030 <strcpy@plt>
lea    0x2d28(%rip),%rax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<error_il>:
push   %rbx
cmp    $0x63,%edi
ja     115c <error_il+0x4c>
lea    0x1073(%rip),%rsi
mov    %edi,%eax
lea    0xeda(%rip),%rcx
movslq (%rcx,%rax,4),%rax
add    %rcx,%rax
jmp    *%rax
lea    0x11ac(%rip),%rsi
jmp    11da <error_il+0xca>
lea    0x1201(%rip),%rsi
jmp    11da <error_il+0xca>
lea    0x104b(%rip),%rsi
jmp    11da <error_il+0xca>
lea    0x112b(%rip),%rsi
jmp    11da <error_il+0xca>
lea    0x1207(%rip),%rsi
jmp    11da <error_il+0xca>
lea    0x1135(%rip),%rsi
jmp    11da <error_il+0xca>
lea    0x1159(%rip),%rsi
jmp    11da <error_il+0xca>
lea    0x2ec2(%rip),%rdi
lea    0x1175(%rip),%rsi
call   1030 <strcpy@plt>
lea    0x2eaf(%rip),%rdi
lea    0x117b(%rip),%rsi
call   1030 <strcpy@plt>
lea    0x1187(%rip),%rsi
jmp    11da <error_il+0xca>
lea    0xffa(%rip),%rsi
jmp    11da <error_il+0xca>
lea    0x1014(%rip),%rsi
jmp    11da <error_il+0xca>
lea    0x102e(%rip),%rsi
jmp    11da <error_il+0xca>
lea    0x1059(%rip),%rsi
jmp    11da <error_il+0xca>
lea    0x1084(%rip),%rsi
jmp    11da <error_il+0xca>
lea    0x1180(%rip),%rsi
lea    0x2e5f(%rip),%rbx
mov    %rbx,%rdi
call   1030 <strcpy@plt>
mov    %rbx,%rax
pop    %rbx
ret

LLVM IR (-O0):
@error_il.err = internal global [100 x i8] zeroinitializer
@.str = [9 x i8] c"No error\00"
@.str.1 = [14 x i8] c"Out of memory\00"
@.str.2 = [35 x i8] c"Error reading source posting lists\00"
@.str.3 = [35 x i8] c"Empty Source list or incomplete !!\00"
@.str.4 = [52 x i8] c"default function for Intersect_2-op not initialized\00"
@.str.5 = [52 x i8] c"default function for Intersect_N-op not initialized\00"
@.str.6 = [48 x i8] c"default function for fsearch-op not initialized\00"
@.str.7 = [28 x i8] c"The text must end with a \\0\00"
@.str.8 = [45 x i8] c"You can't free the text if you don't copy it\00"
@.str.9 = [20 x i8] c"Cannot create files\00"
@.str.10 = [24 x i8] c"Error writing the index\00"
@.str.11 = [25 x i8] c"Cannot open index; break\00"
@.str.12 = [24 x i8] c"Cannot open text; break\00"
@.str.13 = [24 x i8] c"Error reading the index\00"
@.str.14 = [23 x i8] c"Error reading the text\00"
@.str.15 = [16 x i8] c"Not implemented\00"
@.str.16 = [14 x i8] c"Unknown error\00"
define i8* @error_il(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = load i32, i32* %2
switch i32 %3, label %42 [
i32 0, label %4
i32 1, label %6
i32 30, label %8
i32 31, label %10
i32 40, label %12
i32 41, label %14
i32 42, label %16
i32 2, label %18
i32 5, label %20
i32 20, label %22
i32 21, label %24
i32 22, label %26
i32 23, label %28
i32 24, label %30
i32 25, label %32
i32 26, label %34
i32 27, label %36
i32 28, label %38
i32 99, label %40
]
4: ; preds = %1
%5 = call i32 @strcpy(i8* getelementptr inbounds ([100 x i8], [100 x i8]* @error_il.err, i64 0, i64 0), i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str, i64 0, i64 0))
br label %44
6: ; preds = %1
%7 = call i32 @strcpy(i8* getelementptr inbounds ([100 x i8], [100 x i8]* @error_il.err, i64 0, i64 0), i8* getelementptr inbounds ([14 x i8], [14 x i8]* @.str.1, i64 0, i64 0))
br label %44
8: ; preds = %1
%9 = call i32 @strcpy(i8* getelementptr inbounds ([100 x i8], [100 x i8]* @error_il.err, i64 0, i64 0), i8* getelementptr inbounds ([35 x i8], [35 x i8]* @.str.2, i64 0, i64 0))
br label %44
10: ; preds = %1
%11 = call i32 @strcpy(i8* getelementptr inbounds ([100 x i8], [100 x i8]* @error_il.err, i64 0, i64 0), i8* getelementptr inbounds ([35 x i8], [35 x i8]* @.str.3, i64 0, i64 0))
br label %44
12: ; preds = %1
%13 = call i32 @strcpy(i8* getelementptr inbounds ([100 x i8], [100 x i8]* @error_il.err, i64 0, i64 0), i8* getelementptr inbounds ([52 x i8], [52 x i8]* @.str.4, i64 0, i64 0))
br label %44
14: ; preds = %1
%15 = call i32 @strcpy(i8* getelementptr inbounds ([100 x i8], [100 x i8]* @error_il.err, i64 0, i64 0), i8* getelementptr inbounds ([52 x i8], [52 x i8]* @.str.5, i64 0, i64 0))
br label %44
16: ; preds = %1
%17 = call i32 @strcpy(i8* getelementptr inbounds ([100 x i8], [100 x i8]* @error_il.err, i64 0, i64 0), i8* getelementptr inbounds ([48 x i8], [48 x i8]* @.str.6, i64 0, i64 0))
br label %44
18: ; preds = %1
%19 = call i32 @strcpy(i8* getelementptr inbounds ([100 x i8], [100 x i8]* @error_il.err, i64 0, i64 0), i8* getelementptr inbounds ([28 x i8], [28 x i8]* @.str.7, i64 0, i64 0))
br label %44
20: ; preds = %1
%21 = call i32 @strcpy(i8* getelementptr inbounds ([100 x i8], [100 x i8]* @error_il.err, i64 0, i64 0), i8* getelementptr inbounds ([45 x i8], [45 x i8]* @.str.8, i64 0, i64 0))
br label %44
22: ; preds = %1
%23 = call i32 @strcpy(i8* getelementptr inbounds ([100 x i8], [100 x i8]* @error_il.err, i64 0, i64 0), i8* getelementptr inbounds ([20 x i8], [20 x i8]* @.str.9, i64 0, i64 0))
br label %44
24: ; preds = %1
%25 = call i32 @strcpy(i8* getelementptr inbounds ([100 x i8], [100 x i8]* @error_il.err, i64 0, i64 0), i8* getelementptr inbounds ([24 x i8], [24 x i8]* @.str.10, i64 0, i64 0))
br label %44
26: ; preds = %1
%27 = call i32 @strcpy(i8* getelementptr inbounds ([100 x i8], [100 x i8]* @error_il.err, i64 0, i64 0), i8* getelementptr inbounds ([24 x i8], [24 x i8]* @.str.10, i64 0, i64 0))
br label %44
28: ; preds = %1
%29 = call i32 @strcpy(i8* getelementptr inbounds ([100 x i8], [100 x i8]* @error_il.err, i64 0, i64 0), i8* getelementptr inbounds ([25 x i8], [25 x i8]* @.str.11, i64 0, i64 0))
br label %30
30: ; preds = %1, %28
%31 = call i32 @strcpy(i8* getelementptr inbounds ([100 x i8], [100 x i8]* @error_il.err, i64 0, i64 0), i8* getelementptr inbounds ([24 x i8], [24 x i8]* @.str.12, i64 0, i64 0))
br label %32
32: ; preds = %1, %30
%33 = call i32 @strcpy(i8* getelementptr inbounds ([100 x i8], [100 x i8]* @error_il.err, i64 0, i64 0), i8* getelementptr inbounds ([24 x i8], [24 x i8]* @.str.13, i64 0, i64 0))
br label %44
34: ; preds = %1
%35 = call i32 @strcpy(i8* getelementptr inbounds ([100 x i8], [100 x i8]* @error_il.err, i64 0, i64 0), i8* getelementptr inbounds ([24 x i8], [24 x i8]* @.str.13, i64 0, i64 0))
br label %44
36: ; preds = %1
%37 = call i32 @strcpy(i8* getelementptr inbounds ([100 x i8], [100 x i8]* @error_il.err, i64 0, i64 0), i8* getelementptr inbounds ([23 x i8], [23 x i8]* @.str.14, i64 0, i64 0))
br label %44
38: ; preds = %1
%39 = call i32 @strcpy(i8* getelementptr inbounds ([100 x i8], [100 x i8]* @error_il.err, i64 0, i64 0), i8* getelementptr inbounds ([23 x i8], [23 x i8]* @.str.14, i64 0, i64 0))
br label %44
40: ; preds = %1
%41 = call i32 @strcpy(i8* getelementptr inbounds ([100 x i8], [100 x i8]* @error_il.err, i64 0, i64 0), i8* getelementptr inbounds ([16 x i8], [16 x i8]* @.str.15, i64 0, i64 0))
br label %44
42: ; preds = %1
%43 = call i32 @strcpy(i8* getelementptr inbounds ([100 x i8], [100 x i8]* @error_il.err, i64 0, i64 0), i8* getelementptr inbounds ([14 x i8], [14 x i8]* @.str.16, i64 0, i64 0))
br label %44
44: ; preds = %42, %40, %38, %36, %34, %32, %26, %24, %22, %20, %18, %16, %14, %12, %10, %8, %6, %4
ret i8* getelementptr inbounds ([100 x i8], [100 x i8]* @error_il.err, i64 0, i64 0)
}

LLVM IR (-O2):
@error_il.err = internal global [100 x i8] zeroinitializer
@.str = [9 x i8] c"No error\00"
@.str.1 = [14 x i8] c"Out of memory\00"
@.str.2 = [35 x i8] c"Error reading source posting lists\00"
@.str.3 = [35 x i8] c"Empty Source list or incomplete !!\00"
@.str.4 = [52 x i8] c"default function for Intersect_2-op not initialized\00"
@.str.5 = [52 x i8] c"default function for Intersect_N-op not initialized\00"
@.str.6 = [48 x i8] c"default function for fsearch-op not initialized\00"
@.str.7 = [28 x i8] c"The text must end with a \\0\00"
@.str.8 = [45 x i8] c"You can't free the text if you don't copy it\00"
@.str.9 = [20 x i8] c"Cannot create files\00"
@.str.10 = [24 x i8] c"Error writing the index\00"
@.str.11 = [25 x i8] c"Cannot open index; break\00"
@.str.12 = [24 x i8] c"Cannot open text; break\00"
@.str.13 = [24 x i8] c"Error reading the index\00"
@.str.14 = [23 x i8] c"Error reading the text\00"
@.str.15 = [16 x i8] c"Not implemented\00"
@.str.16 = [14 x i8] c"Unknown error\00"
define i8* @error_il(i32 %0) {
switch i32 %0, label %22 [
i32 0, label %23
i32 1, label %2
i32 30, label %3
i32 31, label %4
i32 40, label %5
i32 41, label %6
i32 42, label %7
i32 2, label %8
i32 5, label %9
i32 20, label %10
i32 21, label %11
i32 22, label %12
i32 23, label %13
i32 24, label %15
i32 25, label %17
i32 26, label %18
i32 27, label %19
i32 28, label %20
i32 99, label %21
]
2: ; preds = %1
br label %23
3: ; preds = %1
br label %23
4: ; preds = %1
br label %23
5: ; preds = %1
br label %23
6: ; preds = %1
br label %23
7: ; preds = %1
br label %23
8: ; preds = %1
br label %23
9: ; preds = %1
br label %23
10: ; preds = %1
br label %23
11: ; preds = %1
br label %23
12: ; preds = %1
br label %23
13: ; preds = %1
%14 = tail call i32 @strcpy(i8* getelementptr inbounds ([100 x i8], [100 x i8]* @error_il.err, i64 0, i64 0), i8* getelementptr inbounds ([25 x i8], [25 x i8]* @.str.11, i64 0, i64 0))
br label %15
15: ; preds = %1, %13
%16 = tail call i32 @strcpy(i8* getelementptr inbounds ([100 x i8], [100 x i8]* @error_il.err, i64 0, i64 0), i8* getelementptr inbounds ([24 x i8], [24 x i8]* @.str.12, i64 0, i64 0))
br label %17
17: ; preds = %1, %15
br label %23
18: ; preds = %1
br label %23
19: ; preds = %1
br label %23
20: ; preds = %1
br label %23
21: ; preds = %1
br label %23
22: ; preds = %1
br label %23
23: ; preds = %1, %22, %21, %20, %19, %18, %17, %12, %11, %10, %9, %8, %7, %6, %5, %4, %3, %2
%24 = phi i8* [ getelementptr inbounds ([14 x i8], [14 x i8]* @.str.16, i64 0, i64 0), %22 ], [ getelementptr inbounds ([16 x i8], [16 x i8]* @.str.15, i64 0, i64 0), %21 ], [ getelementptr inbounds ([23 x i8], [23 x i8]* @.str.14, i64 0, i64 0), %20 ], [ getelementptr inbounds ([23 x i8], [23 x i8]* @.str.14, i64 0, i64 0), %19 ], [ getelementptr inbounds ([24 x i8], [24 x i8]* @.str.13, i64 0, i64 0), %18 ], [ getelementptr inbounds ([24 x i8], [24 x i8]* @.str.13, i64 0, i64 0), %17 ], [ getelementptr inbounds ([24 x i8], [24 x i8]* @.str.10, i64 0, i64 0), %12 ], [ getelementptr inbounds ([24 x i8], [24 x i8]* @.str.10, i64 0, i64 0), %11 ], [ getelementptr inbounds ([20 x i8], [20 x i8]* @.str.9, i64 0, i64 0), %10 ], [ getelementptr inbounds ([45 x i8], [45 x i8]* @.str.8, i64 0, i64 0), %9 ], [ getelementptr inbounds ([28 x i8], [28 x i8]* @.str.7, i64 0, i64 0), %8 ], [ getelementptr inbounds ([48 x i8], [48 x i8]* @.str.6, i64 0, i64 0), %7 ], [ getelementptr inbounds ([52 x i8], [52 x i8]* @.str.5, i64 0, i64 0), %6 ], [ getelementptr inbounds ([52 x i8], [52 x i8]* @.str.4, i64 0, i64 0), %5 ], [ getelementptr inbounds ([35 x i8], [35 x i8]* @.str.3, i64 0, i64 0), %4 ], [ getelementptr inbounds ([35 x i8], [35 x i8]* @.str.2, i64 0, i64 0), %3 ], [ getelementptr inbounds ([14 x i8], [14 x i8]* @.str.1, i64 0, i64 0), %2 ], [ getelementptr inbounds ([9 x i8], [9 x i8]* @.str, i64 0, i64 0), %1 ]
%25 = tail call i32 @strcpy(i8* getelementptr inbounds ([100 x i8], [100 x i8]* @error_il.err, i64 0, i64 0), i8* %24)
ret i8* getelementptr inbounds ([100 x i8], [100 x i8]* @error_il.err, i64 0, i64 0)
}