#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 */
const char *GifErrorString(int ErrorCode) {
  const char *Err;
  switch (ErrorCode) {
  case 1:
    Err = "Failed to open given file";
    break;
  case 2:
    Err = "Failed to write to given file";
    break;
  case 3:
    Err = "Screen descriptor has already been set";
    break;
  case 4:
    Err = "Image descriptor is still active";
    break;
  case 5:
    Err = "Neither global nor local color map";
    break;
  case 6:
    Err = "Number of pixels bigger than width * height";
    break;
  case 7:
    Err = "Failed to allocate required memory";
    break;
  case 8:
    Err = "Write failed (disk full?)";
    break;
  case 9:
    Err = "Failed to close given file";
    break;
  case 10:
    Err = "Given file was not opened for write";
    break;
  case 101:
    Err = "Failed to open given file";
    break;
  case 102:
    Err = "Failed to read from given file";
    break;
  case 103:
    Err = "Data is not in GIF format";
    break;
  case 104:
    Err = "No screen descriptor detected";
    break;
  case 105:
    Err = "No Image Descriptor detected";
    break;
  case 106:
    Err = "Neither global nor local color map";
    break;
  case 107:
    Err = "Wrong record type detected";
    break;
  case 108:
    Err = "Number of pixels bigger than width * height";
    break;
  case 109:
    Err = "Failed to allocate required memory";
    break;
  case 110:
    Err = "Failed to close given file";
    break;
  case 111:
    Err = "Given file was not opened for read";
    break;
  case 112:
    Err = "Image is defective, decoding aborted";
    break;
  case 113:
    Err = "Image EOF detected before image complete";
    break;
  default:
    Err = NULL;
    break;
  }
  return Err;
}


x86 assembly (clang, -O0):
<GifErrorString>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0xffffffff,%eax
mov    %eax,%ecx
mov    %rcx,-0x18(%rbp)
sub    $0x70,%eax
ja     12a0 <GifErrorString+0x1a0>
mov    -0x18(%rbp),%rax
lea    0xed9(%rip),%rcx
movslq (%rcx,%rax,4),%rax
add    %rcx,%rax
jmp    *%rax
lea    0x108d(%rip),%rax
mov    %rax,-0x10(%rbp)
jmp    12a8 <GifErrorString+0x1a8>
lea    0x1097(%rip),%rax
mov    %rax,-0x10(%rbp)
jmp    12a8 <GifErrorString+0x1a8>
lea    0x10a5(%rip),%rax
mov    %rax,-0x10(%rbp)
jmp    12a8 <GifErrorString+0x1a8>
lea    0x10bc(%rip),%rax
mov    %rax,-0x10(%rbp)
jmp    12a8 <GifErrorString+0x1a8>
lea    0x10cd(%rip),%rax
mov    %rax,-0x10(%rbp)
jmp    12a8 <GifErrorString+0x1a8>
lea    0x10e0(%rip),%rax
mov    %rax,-0x10(%rbp)
jmp    12a8 <GifErrorString+0x1a8>
lea    0x10fc(%rip),%rax
mov    %rax,-0x10(%rbp)
jmp    12a8 <GifErrorString+0x1a8>
lea    0x110f(%rip),%rax
mov    %rax,-0x10(%rbp)
jmp    12a8 <GifErrorString+0x1a8>
lea    0x1119(%rip),%rax
mov    %rax,-0x10(%rbp)
jmp    12a8 <GifErrorString+0x1a8>
lea    0x1124(%rip),%rax
mov    %rax,-0x10(%rbp)
jmp    12a8 <GifErrorString+0x1a8>
lea    0xfed(%rip),%rax
mov    %rax,-0x10(%rbp)
jmp    12a8 <GifErrorString+0x1a8>
lea    0x1128(%rip),%rax
mov    %rax,-0x10(%rbp)
jmp    12a8 <GifErrorString+0x1a8>
lea    0x1137(%rip),%rax
mov    %rax,-0x10(%rbp)
jmp    12a8 <GifErrorString+0x1a8>
lea    0x1141(%rip),%rax
mov    %rax,-0x10(%rbp)
jmp    12a8 <GifErrorString+0x1a8>
lea    0x114f(%rip),%rax
mov    %rax,-0x10(%rbp)
jmp    12a8 <GifErrorString+0x1a8>
lea    0x101d(%rip),%rax
mov    %rax,-0x10(%rbp)
jmp    12a8 <GifErrorString+0x1a8>
lea    0x114c(%rip),%rax
mov    %rax,-0x10(%rbp)
jmp    12a8 <GifErrorString+0x1a8>
lea    0x1020(%rip),%rax
mov    %rax,-0x10(%rbp)
jmp    12a8 <GifErrorString+0x1a8>
lea    0x103c(%rip),%rax
mov    %rax,-0x10(%rbp)
jmp    12a8 <GifErrorString+0x1a8>
lea    0x1069(%rip),%rax
mov    %rax,-0x10(%rbp)
jmp    12a8 <GifErrorString+0x1a8>
lea    0x1127(%rip),%rax
mov    %rax,-0x10(%rbp)
jmp    12a8 <GifErrorString+0x1a8>
lea    0x113a(%rip),%rax
mov    %rax,-0x10(%rbp)
jmp    12a8 <GifErrorString+0x1a8>
lea    0x114f(%rip),%rax
mov    %rax,-0x10(%rbp)
jmp    12a8 <GifErrorString+0x1a8>
movq   $0x0,-0x10(%rbp)
mov    -0x10(%rbp),%rax
pop    %rbp
ret

x86 assembly (clang, -O2):
<GifErrorString>:
add    $0xffffffff,%edi
cmp    $0x70,%edi
ja     1168 <GifErrorString+0x68>
lea    0x10b5(%rip),%rax
lea    0xeea(%rip),%rcx
movslq (%rcx,%rdi,4),%rdx
add    %rcx,%rdx
jmp    *%rdx
ret
lea    0x111d(%rip),%rax
ret
lea    0x1138(%rip),%rax
ret
lea    0x115c(%rip),%rax
ret
lea    0x1191(%rip),%rax
ret
lea    0x1097(%rip),%rax
ret
lea    0x10ad(%rip),%rax
ret
lea    0x10cc(%rip),%rax
ret
lea    0x1157(%rip),%rax
ret
lea    0x1184(%rip),%rax
ret
xor    %eax,%eax
ret
lea    0x119d(%rip),%rax
ret
lea    0x11b4(%rip),%rax
ret
lea    0x11c6(%rip),%rax
ret
lea    0x11dc(%rip),%rax
ret
lea    0x11f1(%rip),%rax
ret
lea    0x1204(%rip),%rax
ret
lea    0x121f(%rip),%rax
ret
lea    0x123c(%rip),%rax
ret

LLVM IR (-O0):
@.str = [26 x i8] c"Failed to open given file\00"
@.str.1 = [30 x i8] c"Failed to write to given file\00"
@.str.2 = [39 x i8] c"Screen descriptor has already been set\00"
@.str.3 = [33 x i8] c"Image descriptor is still active\00"
@.str.4 = [35 x i8] c"Neither global nor local color map\00"
@.str.5 = [44 x i8] c"Number of pixels bigger than width * height\00"
@.str.6 = [35 x i8] c"Failed to allocate required memory\00"
@.str.7 = [26 x i8] c"Write failed (disk full?)\00"
@.str.8 = [27 x i8] c"Failed to close given file\00"
@.str.9 = [36 x i8] c"Given file was not opened for write\00"
@.str.10 = [31 x i8] c"Failed to read from given file\00"
@.str.11 = [26 x i8] c"Data is not in GIF format\00"
@.str.12 = [30 x i8] c"No screen descriptor detected\00"
@.str.13 = [29 x i8] c"No Image Descriptor detected\00"
@.str.14 = [27 x i8] c"Wrong record type detected\00"
@.str.15 = [35 x i8] c"Given file was not opened for read\00"
@.str.16 = [37 x i8] c"Image is defective, decoding aborted\00"
@.str.17 = [41 x i8] c"Image EOF detected before image complete\00"
define i8* @GifErrorString(i32 %0) {
%2 = alloca i32
%3 = alloca i8*
store i32 %0, i32* %2
%4 = load i32, i32* %2
switch i32 %4, label %28 [
i32 1, label %5
i32 2, label %6
i32 3, label %7
i32 4, label %8
i32 5, label %9
i32 6, label %10
i32 7, label %11
i32 8, label %12
i32 9, label %13
i32 10, label %14
i32 101, label %15
i32 102, label %16
i32 103, label %17
i32 104, label %18
i32 105, label %19
i32 106, label %20
i32 107, label %21
i32 108, label %22
i32 109, label %23
i32 110, label %24
i32 111, label %25
i32 112, label %26
i32 113, label %27
]
5: ; preds = %1
store i8* getelementptr inbounds ([26 x i8], [26 x i8]* @.str, i64 0, i64 0), i8** %3
br label %29
6: ; preds = %1
store i8* getelementptr inbounds ([30 x i8], [30 x i8]* @.str.1, i64 0, i64 0), i8** %3
br label %29
7: ; preds = %1
store i8* getelementptr inbounds ([39 x i8], [39 x i8]* @.str.2, i64 0, i64 0), i8** %3
br label %29
8: ; preds = %1
store i8* getelementptr inbounds ([33 x i8], [33 x i8]* @.str.3, i64 0, i64 0), i8** %3
br label %29
9: ; preds = %1
store i8* getelementptr inbounds ([35 x i8], [35 x i8]* @.str.4, i64 0, i64 0), i8** %3
br label %29
10: ; preds = %1
store i8* getelementptr inbounds ([44 x i8], [44 x i8]* @.str.5, i64 0, i64 0), i8** %3
br label %29
11: ; preds = %1
store i8* getelementptr inbounds ([35 x i8], [35 x i8]* @.str.6, i64 0, i64 0), i8** %3
br label %29
12: ; preds = %1
store i8* getelementptr inbounds ([26 x i8], [26 x i8]* @.str.7, i64 0, i64 0), i8** %3
br label %29
13: ; preds = %1
store i8* getelementptr inbounds ([27 x i8], [27 x i8]* @.str.8, i64 0, i64 0), i8** %3
br label %29
14: ; preds = %1
store i8* getelementptr inbounds ([36 x i8], [36 x i8]* @.str.9, i64 0, i64 0), i8** %3
br label %29
15: ; preds = %1
store i8* getelementptr inbounds ([26 x i8], [26 x i8]* @.str, i64 0, i64 0), i8** %3
br label %29
16: ; preds = %1
store i8* getelementptr inbounds ([31 x i8], [31 x i8]* @.str.10, i64 0, i64 0), i8** %3
br label %29
17: ; preds = %1
store i8* getelementptr inbounds ([26 x i8], [26 x i8]* @.str.11, i64 0, i64 0), i8** %3
br label %29
18: ; preds = %1
store i8* getelementptr inbounds ([30 x i8], [30 x i8]* @.str.12, i64 0, i64 0), i8** %3
br label %29
19: ; preds = %1
store i8* getelementptr inbounds ([29 x i8], [29 x i8]* @.str.13, i64 0, i64 0), i8** %3
br label %29
20: ; preds = %1
store i8* getelementptr inbounds ([35 x i8], [35 x i8]* @.str.4, i64 0, i64 0), i8** %3
br label %29
21: ; preds = %1
store i8* getelementptr inbounds ([27 x i8], [27 x i8]* @.str.14, i64 0, i64 0), i8** %3
br label %29
22: ; preds = %1
store i8* getelementptr inbounds ([44 x i8], [44 x i8]* @.str.5, i64 0, i64 0), i8** %3
br label %29
23: ; preds = %1
store i8* getelementptr inbounds ([35 x i8], [35 x i8]* @.str.6, i64 0, i64 0), i8** %3
br label %29
24: ; preds = %1
store i8* getelementptr inbounds ([27 x i8], [27 x i8]* @.str.8, i64 0, i64 0), i8** %3
br label %29
25: ; preds = %1
store i8* getelementptr inbounds ([35 x i8], [35 x i8]* @.str.15, i64 0, i64 0), i8** %3
br label %29
26: ; preds = %1
store i8* getelementptr inbounds ([37 x i8], [37 x i8]* @.str.16, i64 0, i64 0), i8** %3
br label %29
27: ; preds = %1
store i8* getelementptr inbounds ([41 x i8], [41 x i8]* @.str.17, i64 0, i64 0), i8** %3
br label %29
28: ; preds = %1
store i8* null, i8** %3
br label %29
29: ; preds = %28, %27, %26, %25, %24, %23, %22, %21, %20, %19, %18, %17, %16, %15, %14, %13, %12, %11, %10, %9, %8, %7, %6, %5
%30 = load i8*, i8** %3
ret i8* %30
}

LLVM IR (-O2):
@.str = [26 x i8] c"Failed to open given file\00"
@.str.1 = [30 x i8] c"Failed to write to given file\00"
@.str.2 = [39 x i8] c"Screen descriptor has already been set\00"
@.str.3 = [33 x i8] c"Image descriptor is still active\00"
@.str.4 = [35 x i8] c"Neither global nor local color map\00"
@.str.5 = [44 x i8] c"Number of pixels bigger than width * height\00"
@.str.6 = [35 x i8] c"Failed to allocate required memory\00"
@.str.7 = [26 x i8] c"Write failed (disk full?)\00"
@.str.8 = [27 x i8] c"Failed to close given file\00"
@.str.9 = [36 x i8] c"Given file was not opened for write\00"
@.str.10 = [31 x i8] c"Failed to read from given file\00"
@.str.11 = [26 x i8] c"Data is not in GIF format\00"
@.str.12 = [30 x i8] c"No screen descriptor detected\00"
@.str.13 = [29 x i8] c"No Image Descriptor detected\00"
@.str.14 = [27 x i8] c"Wrong record type detected\00"
@.str.15 = [35 x i8] c"Given file was not opened for read\00"
@.str.16 = [37 x i8] c"Image is defective, decoding aborted\00"
@.str.17 = [41 x i8] c"Image EOF detected before image complete\00"
define i8* @GifErrorString(i32 %0) {
switch i32 %0, label %23 [
i32 1, label %24
i32 2, label %2
i32 3, label %3
i32 4, label %4
i32 5, label %5
i32 6, label %6
i32 7, label %7
i32 8, label %8
i32 9, label %9
i32 10, label %10
i32 101, label %24
i32 102, label %11
i32 103, label %12
i32 104, label %13
i32 105, label %14
i32 106, label %15
i32 107, label %16
i32 108, label %17
i32 109, label %18
i32 110, label %19
i32 111, label %20
i32 112, label %21
i32 113, label %22
]
2: ; preds = %1
br label %24
3: ; preds = %1
br label %24
4: ; preds = %1
br label %24
5: ; preds = %1
br label %24
6: ; preds = %1
br label %24
7: ; preds = %1
br label %24
8: ; preds = %1
br label %24
9: ; preds = %1
br label %24
10: ; preds = %1
br label %24
11: ; preds = %1
br label %24
12: ; preds = %1
br label %24
13: ; preds = %1
br label %24
14: ; preds = %1
br label %24
15: ; preds = %1
br label %24
16: ; preds = %1
br label %24
17: ; preds = %1
br label %24
18: ; preds = %1
br label %24
19: ; preds = %1
br label %24
20: ; preds = %1
br label %24
21: ; preds = %1
br label %24
22: ; preds = %1
br label %24
23: ; preds = %1
br label %24
24: ; preds = %1, %1, %23, %22, %21, %20, %19, %18, %17, %16, %15, %14, %13, %12, %11, %10, %9, %8, %7, %6, %5, %4, %3, %2
%25 = phi i8* [ null, %23 ], [ getelementptr inbounds ([41 x i8], [41 x i8]* @.str.17, i64 0, i64 0), %22 ], [ getelementptr inbounds ([37 x i8], [37 x i8]* @.str.16, i64 0, i64 0), %21 ], [ getelementptr inbounds ([35 x i8], [35 x i8]* @.str.15, i64 0, i64 0), %20 ], [ getelementptr inbounds ([27 x i8], [27 x i8]* @.str.8, i64 0, i64 0), %19 ], [ getelementptr inbounds ([35 x i8], [35 x i8]* @.str.6, i64 0, i64 0), %18 ], [ getelementptr inbounds ([44 x i8], [44 x i8]* @.str.5, i64 0, i64 0), %17 ], [ getelementptr inbounds ([27 x i8], [27 x i8]* @.str.14, i64 0, i64 0), %16 ], [ getelementptr inbounds ([35 x i8], [35 x i8]* @.str.4, i64 0, i64 0), %15 ], [ getelementptr inbounds ([29 x i8], [29 x i8]* @.str.13, i64 0, i64 0), %14 ], [ getelementptr inbounds ([30 x i8], [30 x i8]* @.str.12, i64 0, i64 0), %13 ], [ getelementptr inbounds ([26 x i8], [26 x i8]* @.str.11, i64 0, i64 0), %12 ], [ getelementptr inbounds ([31 x i8], [31 x i8]* @.str.10, i64 0, i64 0), %11 ], [ getelementptr inbounds ([36 x i8], [36 x i8]* @.str.9, i64 0, i64 0), %10 ], [ getelementptr inbounds ([27 x i8], [27 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 ([35 x i8], [35 x i8]* @.str.6, i64 0, i64 0), %7 ], [ getelementptr inbounds ([44 x i8], [44 x i8]* @.str.5, i64 0, i64 0), %6 ], [ getelementptr inbounds ([35 x i8], [35 x i8]* @.str.4, i64 0, i64 0), %5 ], [ getelementptr inbounds ([33 x i8], [33 x i8]* @.str.3, i64 0, i64 0), %4 ], [ getelementptr inbounds ([39 x i8], [39 x i8]* @.str.2, i64 0, i64 0), %3 ], [ getelementptr inbounds ([30 x i8], [30 x i8]* @.str.1, i64 0, i64 0), %2 ], [ getelementptr inbounds ([26 x i8], [26 x i8]* @.str, i64 0, i64 0), %1 ], [ getelementptr inbounds ([26 x i8], [26 x i8]* @.str, i64 0, i64 0), %1 ]
ret i8* %25
}