#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*/ FS460_play_begin();
int /*<<< orphan*/ FS460_play_run(int);
int /*<<< orphan*/ horizontal(int);
void h_bump(void) {
  static int mode = 0;
  FS460_play_begin();
  switch (mode++) {
  default:
    mode = 1;
  case 0:
    horizontal(60);
    break;
  case 1:
    horizontal(2);
    break;
  case 2:
    horizontal(0);
    break;
  case 3:
    horizontal(-60);
    break;
  }
  FS460_play_run(0x0001);
}


x86 assembly (clang, -O0):
<h_bump>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
xor    %eax,%eax
call   1050 <FS460_play_begin@plt>
mov    0x2ef7(%rip),%eax
mov    %eax,%ecx
mov    %rcx,-0x8(%rbp)
mov    %ecx,%eax
add    $0x1,%eax
sub    $0x3,%rcx
mov    %eax,0x2ee2(%rip)
ja     1174 <h_bump+0x44>
mov    -0x8(%rbp),%rax
lea    0xe95(%rip),%rcx
movslq (%rcx,%rax,4),%rax
add    %rcx,%rax
jmp    *%rax
movl   $0x1,0x2ebe(%rip)
mov    $0x3c,%edi
call   1030 <horizontal@plt>
jmp    11b2 <h_bump+0x82>
mov    $0x2,%edi
call   1030 <horizontal@plt>
jmp    11b2 <h_bump+0x82>
xor    %edi,%edi
call   1030 <horizontal@plt>
jmp    11b2 <h_bump+0x82>
mov    $0xffffffc4,%edi
call   1030 <horizontal@plt>
mov    $0x1,%edi
call   1040 <FS460_play_run@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<h_bump>:
push   %rax
xor    %eax,%eax
call   1050 <FS460_play_begin@plt>
movslq 0x2efd(%rip),%rax
lea    0x1(%rax),%ecx
mov    %ecx,0x2ef4(%rip)
cmp    $0x4,%rax
jae    115a <h_bump+0x2a>
lea    0xeab(%rip),%rcx
mov    (%rcx,%rax,4),%edi
jmp    1169 <h_bump+0x39>
movl   $0x1,0x2ed8(%rip)
mov    $0x3c,%edi
call   1030 <horizontal@plt>
mov    $0x1,%edi
pop    %rax
jmp    1040 <FS460_play_run@plt>

LLVM IR (-O0):
@h_bump.mode = internal global i32 0
define void @h_bump() {
%1 = call i32 (...) @FS460_play_begin()
%2 = load i32, i32* @h_bump.mode
%3 = add nsw i32 %2, 1
store i32 %3, i32* @h_bump.mode
switch i32 %2, label %4 [
i32 0, label %5
i32 1, label %7
i32 2, label %9
i32 3, label %11
]
4: ; preds = %0
store i32 1, i32* @h_bump.mode
br label %5
5: ; preds = %0, %4
%6 = call i32 @horizontal(i32 60)
br label %13
7: ; preds = %0
%8 = call i32 @horizontal(i32 2)
br label %13
9: ; preds = %0
%10 = call i32 @horizontal(i32 0)
br label %13
11: ; preds = %0
%12 = call i32 @horizontal(i32 -60)
br label %13
13: ; preds = %11, %9, %7, %5
%14 = call i32 @FS460_play_run(i32 1)
ret void
}

LLVM IR (-O2):
@h_bump.mode = internal unnamed_addr global i32 0
@switch.table.h_bump = [4 x i32] [i32 60, i32 2, i32 0, i32 -60]
define void @h_bump() {
%1 = tail call i32 (...) @FS460_play_begin()
%2 = load i32, i32* @h_bump.mode
%3 = add nsw i32 %2, 1
store i32 %3, i32* @h_bump.mode
%4 = icmp ult i32 %2, 4
br i1 %4, label %6, label %5
5: ; preds = %0
store i32 1, i32* @h_bump.mode
br label %10
6: ; preds = %0
%7 = sext i32 %2 to i64
%8 = getelementptr inbounds [4 x i32], [4 x i32]* @switch.table.h_bump, i64 0, i64 %7
%9 = load i32, i32* %8
br label %10
10: ; preds = %6, %5
%11 = phi i32 [ 60, %5 ], [ %9, %6 ]
%12 = tail call i32 @horizontal(i32 %11)
%13 = tail call i32 @FS460_play_run(i32 1)
ret void
}