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


x86 assembly (clang, -O0):
<move_sequencer_with_xy>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
xor    %eax,%eax
call   1040 <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 <move_sequencer_with_xy+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,%esi
xor    %r8d,%r8d
mov    $0x2,%r9d
mov    %esi,%edi
mov    %r8d,%edx
mov    %r8d,%ecx
call   1050 <set@plt>
mov    $0xffffffc4,%esi
xor    %r8d,%r8d
mov    $0x2,%r9d
mov    %esi,%edi
mov    %r8d,%edx
mov    %r8d,%ecx
call   1050 <set@plt>
jmp    12e0 <move_sequencer_with_xy+0x1b0>
mov    $0x3c,%edi
mov    $0xffffffc4,%esi
xor    %r8d,%r8d
mov    $0x2,%r9d
mov    %r8d,%edx
mov    %r8d,%ecx
call   1050 <set@plt>
mov    $0xffffffc4,%edi
mov    $0x3c,%esi
xor    %r8d,%r8d
mov    $0x2,%r9d
mov    %r8d,%edx
mov    %r8d,%ecx
call   1050 <set@plt>
jmp    12e0 <move_sequencer_with_xy+0x1b0>
mov    $0x78,%esi
xor    %r8d,%r8d
mov    $0x2,%r9d
mov    %esi,%edi
mov    %r8d,%edx
mov    %r8d,%ecx
call   1050 <set@plt>
mov    $0x3c,%esi
xor    %r8d,%r8d
mov    $0x2,%r9d
mov    %esi,%edi
mov    %r8d,%edx
mov    %r8d,%ecx
call   1050 <set@plt>
mov    $0xffffffc4,%esi
xor    %r8d,%r8d
mov    $0x2,%r9d
mov    %esi,%edi
mov    %r8d,%edx
mov    %r8d,%ecx
call   1050 <set@plt>
mov    $0xffffff88,%esi
xor    %r8d,%r8d
mov    $0x2,%r9d
mov    %esi,%edi
mov    %r8d,%edx
mov    %r8d,%ecx
call   1050 <set@plt>
jmp    12e0 <move_sequencer_with_xy+0x1b0>
mov    $0x3c,%esi
xor    %r8d,%r8d
mov    $0x2,%r9d
mov    %esi,%edi
mov    %r8d,%edx
mov    %r8d,%ecx
call   1050 <set@plt>
mov    $0x3c,%edi
mov    $0xffffffc4,%esi
xor    %r8d,%r8d
mov    $0x2,%r9d
mov    %r8d,%edx
mov    %r8d,%ecx
call   1050 <set@plt>
mov    $0x3c,%edi
mov    $0xffffffc4,%esi
xor    %r8d,%r8d
mov    $0x2,%r9d
mov    %r8d,%edx
mov    %r8d,%ecx
call   1050 <set@plt>
mov    $0x3c,%edi
mov    $0xffffffc4,%esi
xor    %r8d,%r8d
mov    $0x2,%r9d
mov    %r8d,%edx
mov    %r8d,%ecx
call   1050 <set@plt>
mov    $0x1,%edi
call   1030 <FS460_play_run@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<move_sequencer_with_xy>:
push   %rax
xor    %eax,%eax
call   1040 <FS460_play_begin@plt>
mov    0x2efe(%rip),%eax
lea    0x1(%rax),%ecx
mov    %ecx,0x2ef5(%rip)
cmp    $0x3,%rax
ja     1188 <move_sequencer_with_xy+0x58>
lea    0xeac(%rip),%rcx
movslq (%rcx,%rax,4),%rax
add    %rcx,%rax
jmp    *%rax
mov    $0x3c,%edi
mov    $0xffffffc4,%esi
xor    %edx,%edx
xor    %ecx,%ecx
xor    %r8d,%r8d
mov    $0x2,%r9d
call   1050 <set@plt>
mov    $0xffffffc4,%edi
mov    $0x3c,%esi
jmp    1276 <move_sequencer_with_xy+0x146>
movl   $0x1,0x2eaa(%rip)
mov    $0x3c,%edi
mov    $0x3c,%esi
xor    %edx,%edx
xor    %ecx,%ecx
xor    %r8d,%r8d
mov    $0x2,%r9d
call   1050 <set@plt>
mov    $0xffffffc4,%edi
jmp    1271 <move_sequencer_with_xy+0x141>
mov    $0x78,%edi
mov    $0x78,%esi
xor    %edx,%edx
xor    %ecx,%ecx
xor    %r8d,%r8d
mov    $0x2,%r9d
call   1050 <set@plt>
mov    $0x3c,%edi
mov    $0x3c,%esi
xor    %edx,%edx
xor    %ecx,%ecx
xor    %r8d,%r8d
mov    $0x2,%r9d
call   1050 <set@plt>
mov    $0xffffffc4,%edi
mov    $0xffffffc4,%esi
xor    %edx,%edx
xor    %ecx,%ecx
xor    %r8d,%r8d
mov    $0x2,%r9d
call   1050 <set@plt>
mov    $0xffffff88,%edi
mov    $0xffffff88,%esi
jmp    1276 <move_sequencer_with_xy+0x146>
mov    $0x3c,%edi
mov    $0x3c,%esi
xor    %edx,%edx
xor    %ecx,%ecx
xor    %r8d,%r8d
mov    $0x2,%r9d
call   1050 <set@plt>
mov    $0x3c,%edi
mov    $0xffffffc4,%esi
xor    %edx,%edx
xor    %ecx,%ecx
xor    %r8d,%r8d
mov    $0x2,%r9d
call   1050 <set@plt>
mov    $0x3c,%edi
mov    $0xffffffc4,%esi
xor    %edx,%edx
xor    %ecx,%ecx
xor    %r8d,%r8d
mov    $0x2,%r9d
call   1050 <set@plt>
mov    $0x3c,%edi
mov    $0xffffffc4,%esi
xor    %edx,%edx
xor    %ecx,%ecx
xor    %r8d,%r8d
mov    $0x2,%r9d
call   1050 <set@plt>
mov    $0x1,%edi
pop    %rax
jmp    1030 <FS460_play_run@plt>

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

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