#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*/ laguna_writeb(int, int);
void __svgalib_laguna_outseq(int index, int val) {
  switch (index) {
  case 0x0e:
    laguna_writeb(0x84, val);
    break;
  case 0x18:
    laguna_writeb(0x90, val);
    break;
  case 0x19:
    laguna_writeb(0x94, val);
    break;
  case 0x1a:
    laguna_writeb(0x98, val);
    break;
  case 0x1e:
    laguna_writeb(0x88, val);
    break;
  }
}


x86 assembly (clang, -O0):
<__svgalib_laguna_outseq>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    -0x4(%rbp),%eax
add    $0xfffffff2,%eax
mov    %eax,%ecx
mov    %rcx,-0x10(%rbp)
sub    $0x10,%eax
ja     119c <__svgalib_laguna_outseq+0x8c>
mov    -0x10(%rbp),%rax
lea    0xec2(%rip),%rcx
movslq (%rcx,%rax,4),%rax
add    %rcx,%rax
jmp    *%rax
mov    -0x8(%rbp),%esi
mov    $0x84,%edi
call   1030 <laguna_writeb@plt>
jmp    119c <__svgalib_laguna_outseq+0x8c>
mov    -0x8(%rbp),%esi
mov    $0x90,%edi
call   1030 <laguna_writeb@plt>
jmp    119c <__svgalib_laguna_outseq+0x8c>
mov    -0x8(%rbp),%esi
mov    $0x94,%edi
call   1030 <laguna_writeb@plt>
jmp    119c <__svgalib_laguna_outseq+0x8c>
mov    -0x8(%rbp),%esi
mov    $0x98,%edi
call   1030 <laguna_writeb@plt>
jmp    119c <__svgalib_laguna_outseq+0x8c>
mov    -0x8(%rbp),%esi
mov    $0x88,%edi
call   1030 <laguna_writeb@plt>
add    $0x10,%rsp
pop    %rbp
ret

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

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

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