#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*/ vertical(int, int);
void v_bump(void) {
  static int mode = 0;
  FS460_play_begin();
  switch (mode++) {
  default:
    mode = 1;
  case 0:
    vertical(60, 20);
    break;
  case 1:
    vertical(60, 10);
    break;
  case 2:
    vertical(60, 6);
    break;
  case 3:
    vertical(60, 4);
    break;
  case 4:
    vertical(60, 2);
    break;
  case 5:
    vertical(60, 1);
    break;
  case 6:
    vertical(60, 0);
    break;
  }
  FS460_play_run(0x0001);
}


x86 assembly (clang, -O0):
<v_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    $0x6,%rcx
mov    %eax,0x2ee2(%rip)
ja     1174 <v_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
mov    $0x14,%esi
call   1030 <vertical@plt>
jmp    1202 <v_bump+0xd2>
mov    $0x3c,%edi
mov    $0xa,%esi
call   1030 <vertical@plt>
jmp    1202 <v_bump+0xd2>
mov    $0x3c,%edi
mov    $0x6,%esi
call   1030 <vertical@plt>
jmp    1202 <v_bump+0xd2>
mov    $0x3c,%edi
mov    $0x4,%esi
call   1030 <vertical@plt>
jmp    1202 <v_bump+0xd2>
mov    $0x3c,%edi
mov    $0x2,%esi
call   1030 <vertical@plt>
jmp    1202 <v_bump+0xd2>
mov    $0x3c,%edi
mov    $0x1,%esi
call   1030 <vertical@plt>
jmp    1202 <v_bump+0xd2>
mov    $0x3c,%edi
xor    %esi,%esi
call   1030 <vertical@plt>
mov    $0x1,%edi
call   1040 <FS460_play_run@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<v_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    $0x7,%rax
jae    115a <v_bump+0x2a>
lea    0xeab(%rip),%rcx
mov    (%rcx,%rax,4),%esi
jmp    1169 <v_bump+0x39>
movl   $0x1,0x2ed8(%rip)
mov    $0x14,%esi
mov    $0x3c,%edi
call   1030 <vertical@plt>
mov    $0x1,%edi
pop    %rax
jmp    1040 <FS460_play_run@plt>

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

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