#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*/ hlen_vs_alpha(int, int);
int /*<<< orphan*/ hlen_vs_alpha_twostep(int, int);
void hlen_alpha_test(void) {
  static int mode = 0;
  FS460_play_begin();
  switch (mode++) {
  default:
    mode = 1;
  case 0:
    hlen_vs_alpha(80, 0);
    break;
  case 1:
    hlen_vs_alpha(80, 1);
    break;
  case 2:
    hlen_vs_alpha(-80, 0);
    break;
  case 3:
    hlen_vs_alpha(-80, 1);
    break;
  case 4:
    hlen_vs_alpha_twostep(80, 0);
    break;
  case 5:
    hlen_vs_alpha_twostep(80, 1);
    break;
  case 6:
    hlen_vs_alpha_twostep(-80, 0);
    break;
  case 7:
    hlen_vs_alpha_twostep(-80, 1);
    break;
  }
  FS460_play_run(0x0001);
}


x86 assembly (clang, -O0):
<hlen_alpha_test>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
xor    %eax,%eax
call   1060 <FS460_play_begin@plt>
mov    0x2eef(%rip),%eax
mov    %eax,%ecx
mov    %rcx,-0x8(%rbp)
mov    %ecx,%eax
add    $0x1,%eax
sub    $0x7,%rcx
mov    %eax,0x2eda(%rip)
ja     1184 <hlen_alpha_test+0x44>
mov    -0x8(%rbp),%rax
lea    0xe85(%rip),%rcx
movslq (%rcx,%rax,4),%rax
add    %rcx,%rax
jmp    *%rax
movl   $0x1,0x2eb6(%rip)
mov    $0x50,%edi
xor    %esi,%esi
call   1030 <hlen_vs_alpha@plt>
jmp    121d <hlen_alpha_test+0xdd>
mov    $0x50,%edi
mov    $0x1,%esi
call   1030 <hlen_vs_alpha@plt>
jmp    121d <hlen_alpha_test+0xdd>
mov    $0xffffffb0,%edi
xor    %esi,%esi
call   1030 <hlen_vs_alpha@plt>
jmp    121d <hlen_alpha_test+0xdd>
mov    $0xffffffb0,%edi
mov    $0x1,%esi
call   1030 <hlen_vs_alpha@plt>
jmp    121d <hlen_alpha_test+0xdd>
mov    $0x50,%edi
xor    %esi,%esi
call   1040 <hlen_vs_alpha_twostep@plt>
jmp    121d <hlen_alpha_test+0xdd>
mov    $0x50,%edi
mov    $0x1,%esi
call   1040 <hlen_vs_alpha_twostep@plt>
jmp    121d <hlen_alpha_test+0xdd>
mov    $0xffffffb0,%edi
xor    %esi,%esi
call   1040 <hlen_vs_alpha_twostep@plt>
jmp    121d <hlen_alpha_test+0xdd>
mov    $0xffffffb0,%edi
mov    $0x1,%esi
call   1040 <hlen_vs_alpha_twostep@plt>
mov    $0x1,%edi
call   1050 <FS460_play_run@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<hlen_alpha_test>:
push   %rax
xor    %eax,%eax
call   1060 <FS460_play_begin@plt>
mov    0x2ef6(%rip),%eax
lea    0x1(%rax),%ecx
mov    %ecx,0x2eed(%rip)
cmp    $0x7,%rax
ja     1174 <hlen_alpha_test+0x34>
lea    0xe9c(%rip),%rcx
movslq (%rcx,%rax,4),%rax
add    %rcx,%rax
jmp    *%rax
mov    $0x50,%edi
jmp    1198 <hlen_alpha_test+0x58>
movl   $0x1,0x2ec6(%rip)
mov    $0x50,%edi
jmp    118a <hlen_alpha_test+0x4a>
mov    $0xffffffb0,%edi
xor    %esi,%esi
call   1030 <hlen_vs_alpha@plt>
jmp    11cc <hlen_alpha_test+0x8c>
mov    $0xffffffb0,%edi
mov    $0x1,%esi
call   1030 <hlen_vs_alpha@plt>
jmp    11cc <hlen_alpha_test+0x8c>
mov    $0x50,%edi
xor    %esi,%esi
jmp    11c7 <hlen_alpha_test+0x87>
mov    $0x50,%edi
jmp    11c2 <hlen_alpha_test+0x82>
mov    $0xffffffb0,%edi
xor    %esi,%esi
jmp    11c7 <hlen_alpha_test+0x87>
mov    $0xffffffb0,%edi
mov    $0x1,%esi
call   1040 <hlen_vs_alpha_twostep@plt>
mov    $0x1,%edi
pop    %rax
jmp    1050 <FS460_play_run@plt>

LLVM IR (-O0):
@hlen_alpha_test.mode = internal global i32 0
define void @hlen_alpha_test() {
%1 = call i32 (...) @FS460_play_begin()
%2 = load i32, i32* @hlen_alpha_test.mode
%3 = add nsw i32 %2, 1
store i32 %3, i32* @hlen_alpha_test.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
i32 7, label %19
]
4: ; preds = %0
store i32 1, i32* @hlen_alpha_test.mode
br label %5
5: ; preds = %0, %4
%6 = call i32 @hlen_vs_alpha(i32 80, i32 0)
br label %21
7: ; preds = %0
%8 = call i32 @hlen_vs_alpha(i32 80, i32 1)
br label %21
9: ; preds = %0
%10 = call i32 @hlen_vs_alpha(i32 -80, i32 0)
br label %21
11: ; preds = %0
%12 = call i32 @hlen_vs_alpha(i32 -80, i32 1)
br label %21
13: ; preds = %0
%14 = call i32 @hlen_vs_alpha_twostep(i32 80, i32 0)
br label %21
15: ; preds = %0
%16 = call i32 @hlen_vs_alpha_twostep(i32 80, i32 1)
br label %21
17: ; preds = %0
%18 = call i32 @hlen_vs_alpha_twostep(i32 -80, i32 0)
br label %21
19: ; preds = %0
%20 = call i32 @hlen_vs_alpha_twostep(i32 -80, i32 1)
br label %21
21: ; preds = %19, %17, %15, %13, %11, %9, %7, %5
%22 = call i32 @FS460_play_run(i32 1)
ret void
}

LLVM IR (-O2):
@hlen_alpha_test.mode = internal unnamed_addr global i32 0
define void @hlen_alpha_test() {
%1 = tail call i32 (...) @FS460_play_begin()
%2 = load i32, i32* @hlen_alpha_test.mode
%3 = add nsw i32 %2, 1
store i32 %3, i32* @hlen_alpha_test.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
i32 7, label %19
]
4: ; preds = %0
store i32 1, i32* @hlen_alpha_test.mode
br label %5
5: ; preds = %0, %4
%6 = tail call i32 @hlen_vs_alpha(i32 80, i32 0)
br label %21
7: ; preds = %0
%8 = tail call i32 @hlen_vs_alpha(i32 80, i32 1)
br label %21
9: ; preds = %0
%10 = tail call i32 @hlen_vs_alpha(i32 -80, i32 0)
br label %21
11: ; preds = %0
%12 = tail call i32 @hlen_vs_alpha(i32 -80, i32 1)
br label %21
13: ; preds = %0
%14 = tail call i32 @hlen_vs_alpha_twostep(i32 80, i32 0)
br label %21
15: ; preds = %0
%16 = tail call i32 @hlen_vs_alpha_twostep(i32 80, i32 1)
br label %21
17: ; preds = %0
%18 = tail call i32 @hlen_vs_alpha_twostep(i32 -80, i32 0)
br label %21
19: ; preds = %0
%20 = tail call i32 @hlen_vs_alpha_twostep(i32 -80, i32 1)
br label %21
21: ; preds = %19, %17, %15, %13, %11, %9, %7, %5
%22 = tail call i32 @FS460_play_run(i32 1)
ret void
}