#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 laguna_readb(int);
int __svgalib_laguna_inseq(int index) {
  switch (index) {
  case 0x0e:
    return laguna_readb(0x84);
    break;
  case 0x18:
    return laguna_readb(0x90);
    break;
  case 0x19:
    return laguna_readb(0x94);
    break;
  case 0x1a:
    return laguna_readb(0x98);
    break;
  case 0x1e:
    return laguna_readb(0x88);
    break;
  default:
    return 0;
  }
}


x86 assembly (clang, -O0):
<__svgalib_laguna_inseq>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x8(%rbp)
mov    -0x8(%rbp),%eax
add    $0xfffffff2,%eax
mov    %eax,%ecx
mov    %rcx,-0x10(%rbp)
sub    $0x10,%eax
ja     119e <__svgalib_laguna_inseq+0x8e>
mov    -0x10(%rbp),%rax
lea    0xec5(%rip),%rcx
movslq (%rcx,%rax,4),%rax
add    %rcx,%rax
jmp    *%rax
mov    $0x84,%edi
call   1030 <laguna_readb@plt>
mov    %eax,-0x4(%rbp)
jmp    11a5 <__svgalib_laguna_inseq+0x95>
mov    $0x90,%edi
call   1030 <laguna_readb@plt>
mov    %eax,-0x4(%rbp)
jmp    11a5 <__svgalib_laguna_inseq+0x95>
mov    $0x94,%edi
call   1030 <laguna_readb@plt>
mov    %eax,-0x4(%rbp)
jmp    11a5 <__svgalib_laguna_inseq+0x95>
mov    $0x98,%edi
call   1030 <laguna_readb@plt>
mov    %eax,-0x4(%rbp)
jmp    11a5 <__svgalib_laguna_inseq+0x95>
mov    $0x88,%edi
call   1030 <laguna_readb@plt>
mov    %eax,-0x4(%rbp)
jmp    11a5 <__svgalib_laguna_inseq+0x95>
movl   $0x0,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<__svgalib_laguna_inseq>:
mov    %edi,%eax
add    $0xfffffff2,%eax
cmp    $0x10,%eax
ja     1139 <__svgalib_laguna_inseq+0x29>
mov    $0x84,%edi
lea    0xeda(%rip),%rcx
movslq (%rcx,%rax,4),%rax
add    %rcx,%rax
jmp    *%rax
mov    $0x90,%edi
jmp    1030 <laguna_readb@plt>
xor    %eax,%eax
ret
mov    $0x94,%edi
jmp    1030 <laguna_readb@plt>
mov    $0x98,%edi
jmp    1030 <laguna_readb@plt>
mov    $0x88,%edi
jmp    1030 <laguna_readb@plt>

LLVM IR (-O0):
define i32 @__svgalib_laguna_inseq(i32 %0) {
%2 = alloca i32
%3 = alloca i32
store i32 %0, i32* %3
%4 = load i32, i32* %3
switch i32 %4, label %15 [
i32 14, label %5
i32 24, label %7
i32 25, label %9
i32 26, label %11
i32 30, label %13
]
5: ; preds = %1
%6 = call i32 @laguna_readb(i32 132)
store i32 %6, i32* %2
br label %16
7: ; preds = %1
%8 = call i32 @laguna_readb(i32 144)
store i32 %8, i32* %2
br label %16
9: ; preds = %1
%10 = call i32 @laguna_readb(i32 148)
store i32 %10, i32* %2
br label %16
11: ; preds = %1
%12 = call i32 @laguna_readb(i32 152)
store i32 %12, i32* %2
br label %16
13: ; preds = %1
%14 = call i32 @laguna_readb(i32 136)
store i32 %14, i32* %2
br label %16
15: ; preds = %1
store i32 0, i32* %2
br label %16
16: ; preds = %15, %13, %11, %9, %7, %5
%17 = load i32, i32* %2
ret i32 %17
}

LLVM IR (-O2):
define i32 @__svgalib_laguna_inseq(i32 %0) {
switch i32 %0, label %9 [
i32 14, label %6
i32 24, label %2
i32 25, label %3
i32 26, label %4
i32 30, label %5
]
2: ; preds = %1
br label %6
3: ; preds = %1
br label %6
4: ; preds = %1
br label %6
5: ; preds = %1
br label %6
6: ; preds = %1, %2, %3, %4, %5
%7 = phi i32 [ 136, %5 ], [ 152, %4 ], [ 148, %3 ], [ 144, %2 ], [ 132, %1 ]
%8 = tail call i32 @laguna_readb(i32 %7)
br label %9
9: ; preds = %6, %1
%10 = phi i32 [ 0, %1 ], [ %8, %6 ]
ret i32 %10
}