#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_autowipe(int, int, int, int, int, int, int, int, int);
void demo_autowipe(void) {
  static int mode = 0;
  switch (mode++) {
  default:
    mode = 1;
  case 0:
    FS460_autowipe(0, 0, 720, 0, 0, 0, 0x7F, 0x00, 2000);
    break;
  case 1:
    FS460_autowipe(0, 0, 0, 576, 0, 0x00, 0, 0x7F, 2000);
    break;
  case 2:
    FS460_autowipe(720, 0, 0, 0, 0, 0, 0x00, 0x7F, 2000);
    break;
  case 3:
    FS460_autowipe(0, 576, 0, 0, 0, 0x7F, 0, 0x00, 2000);
    break;
  case 4:
    FS460_autowipe(0, 0, 720, 576, 0x7F, 0x40, 0x40, 0x00, 4000);
    break;
  case 5:
    FS460_autowipe(720, 576, 0, 0, 0x7F, 0x40, 0x40, 0x00, 500);
    break;
  case 6:
    FS460_autowipe(720, 0, 0, 576, 0x00, 0x7F, 0x00, 0x00, 5000);
    break;
  }
}


x86 assembly (clang, -O0):
<demo_autowipe>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    0x2f0e(%rip),%eax
mov    %eax,%ecx
mov    %rcx,-0x8(%rbp)
mov    %ecx,%eax
add    $0x1,%eax
sub    $0x6,%rcx
mov    %eax,0x2ef9(%rip)
ja     114d <demo_autowipe+0x3d>
mov    -0x8(%rbp),%rax
lea    0xebc(%rip),%rcx
movslq (%rcx,%rax,4),%rax
add    %rcx,%rax
jmp    *%rax
movl   $0x1,0x2ed5(%rip)
xor    %r9d,%r9d
mov    $0x2d0,%edx
mov    %r9d,%edi
mov    %r9d,%esi
mov    %r9d,%ecx
mov    %r9d,%r8d
movl   $0x7f,(%rsp)
movl   $0x0,0x8(%rsp)
movl   $0x7d0,0x10(%rsp)
call   1030 <FS460_autowipe@plt>
jmp    12d9 <demo_autowipe+0x1c9>
xor    %r9d,%r9d
mov    $0x240,%ecx
mov    %r9d,%edi
mov    %r9d,%esi
mov    %r9d,%edx
mov    %r9d,%r8d
movl   $0x0,(%rsp)
movl   $0x7f,0x8(%rsp)
movl   $0x7d0,0x10(%rsp)
call   1030 <FS460_autowipe@plt>
jmp    12d9 <demo_autowipe+0x1c9>
mov    $0x2d0,%edi
xor    %r9d,%r9d
mov    %r9d,%esi
mov    %r9d,%edx
mov    %r9d,%ecx
mov    %r9d,%r8d
movl   $0x0,(%rsp)
movl   $0x7f,0x8(%rsp)
movl   $0x7d0,0x10(%rsp)
call   1030 <FS460_autowipe@plt>
jmp    12d9 <demo_autowipe+0x1c9>
xor    %r8d,%r8d
mov    $0x240,%esi
mov    $0x7f,%r9d
mov    %r8d,%edi
mov    %r8d,%edx
mov    %r8d,%ecx
movl   $0x0,(%rsp)
movl   $0x0,0x8(%rsp)
movl   $0x7d0,0x10(%rsp)
call   1030 <FS460_autowipe@plt>
jmp    12d9 <demo_autowipe+0x1c9>
xor    %esi,%esi
mov    $0x2d0,%edx
mov    $0x240,%ecx
mov    $0x7f,%r8d
mov    $0x40,%r9d
mov    %esi,%edi
movl   $0x40,(%rsp)
movl   $0x0,0x8(%rsp)
movl   $0xfa0,0x10(%rsp)
call   1030 <FS460_autowipe@plt>
jmp    12d9 <demo_autowipe+0x1c9>
mov    $0x2d0,%edi
mov    $0x240,%esi
xor    %ecx,%ecx
mov    $0x7f,%r8d
mov    $0x40,%r9d
mov    %ecx,%edx
movl   $0x40,(%rsp)
movl   $0x0,0x8(%rsp)
movl   $0x1f4,0x10(%rsp)
call   1030 <FS460_autowipe@plt>
jmp    12d9 <demo_autowipe+0x1c9>
mov    $0x2d0,%edi
xor    %r8d,%r8d
mov    $0x240,%ecx
mov    $0x7f,%r9d
mov    %r8d,%esi
mov    %r8d,%edx
movl   $0x0,(%rsp)
movl   $0x0,0x8(%rsp)
movl   $0x1388,0x10(%rsp)
call   1030 <FS460_autowipe@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<demo_autowipe>:
push   %rax
mov    0x2f15(%rip),%eax
lea    0x1(%rax),%ecx
mov    %ecx,0x2f0c(%rip)
cmp    $0x6,%rax
ja     1147 <demo_autowipe+0x37>
lea    0xed3(%rip),%rcx
movslq (%rcx,%rax,4),%rax
add    %rcx,%rax
jmp    *%rax
sub    $0x8,%rsp
xor    %edi,%edi
xor    %esi,%esi
xor    %edx,%edx
mov    $0x240,%ecx
jmp    1183 <demo_autowipe+0x73>
movl   $0x1,0x2edb(%rip)
sub    $0x8,%rsp
xor    %edi,%edi
xor    %esi,%esi
mov    $0x2d0,%edx
xor    %ecx,%ecx
xor    %r8d,%r8d
xor    %r9d,%r9d
push   $0x7d0
push   $0x0
push   $0x7f
jmp    1226 <demo_autowipe+0x116>
sub    $0x8,%rsp
mov    $0x2d0,%edi
xor    %esi,%esi
xor    %edx,%edx
xor    %ecx,%ecx
xor    %r8d,%r8d
xor    %r9d,%r9d
push   $0x7d0
push   $0x7f
jmp    1224 <demo_autowipe+0x114>
sub    $0x8,%rsp
xor    %edi,%edi
mov    $0x240,%esi
xor    %edx,%edx
xor    %ecx,%ecx
xor    %r8d,%r8d
mov    $0x7f,%r9d
push   $0x7d0
jmp    1222 <demo_autowipe+0x112>
sub    $0x8,%rsp
xor    %edi,%edi
xor    %esi,%esi
mov    $0x2d0,%edx
mov    $0x240,%ecx
mov    $0x7f,%r8d
mov    $0x40,%r9d
push   $0xfa0
jmp    11fc <demo_autowipe+0xec>
sub    $0x8,%rsp
mov    $0x2d0,%edi
mov    $0x240,%esi
xor    %edx,%edx
xor    %ecx,%ecx
mov    $0x7f,%r8d
mov    $0x40,%r9d
push   $0x1f4
push   $0x0
push   $0x40
jmp    1226 <demo_autowipe+0x116>
sub    $0x8,%rsp
mov    $0x2d0,%edi
xor    %esi,%esi
xor    %edx,%edx
mov    $0x240,%ecx
xor    %r8d,%r8d
mov    $0x7f,%r9d
push   $0x1388
push   $0x0
push   $0x0
call   1030 <FS460_autowipe@plt>
add    $0x20,%rsp
pop    %rax
ret

LLVM IR (-O0):
@demo_autowipe.mode = internal global i32 0
define void @demo_autowipe() {
%1 = load i32, i32* @demo_autowipe.mode
%2 = add nsw i32 %1, 1
store i32 %2, i32* @demo_autowipe.mode
switch i32 %1, label %3 [
i32 0, label %4
i32 1, label %6
i32 2, label %8
i32 3, label %10
i32 4, label %12
i32 5, label %14
i32 6, label %16
]
3: ; preds = %0
store i32 1, i32* @demo_autowipe.mode
br label %4
4: ; preds = %0, %3
%5 = call i32 @FS460_autowipe(i32 0, i32 0, i32 720, i32 0, i32 0, i32 0, i32 127, i32 0, i32 2000)
br label %18
6: ; preds = %0
%7 = call i32 @FS460_autowipe(i32 0, i32 0, i32 0, i32 576, i32 0, i32 0, i32 0, i32 127, i32 2000)
br label %18
8: ; preds = %0
%9 = call i32 @FS460_autowipe(i32 720, i32 0, i32 0, i32 0, i32 0, i32 0, i32 0, i32 127, i32 2000)
br label %18
10: ; preds = %0
%11 = call i32 @FS460_autowipe(i32 0, i32 576, i32 0, i32 0, i32 0, i32 127, i32 0, i32 0, i32 2000)
br label %18
12: ; preds = %0
%13 = call i32 @FS460_autowipe(i32 0, i32 0, i32 720, i32 576, i32 127, i32 64, i32 64, i32 0, i32 4000)
br label %18
14: ; preds = %0
%15 = call i32 @FS460_autowipe(i32 720, i32 576, i32 0, i32 0, i32 127, i32 64, i32 64, i32 0, i32 500)
br label %18
16: ; preds = %0
%17 = call i32 @FS460_autowipe(i32 720, i32 0, i32 0, i32 576, i32 0, i32 127, i32 0, i32 0, i32 5000)
br label %18
18: ; preds = %16, %14, %12, %10, %8, %6, %4
ret void
}

LLVM IR (-O2):
@demo_autowipe.mode = internal unnamed_addr global i32 0
define void @demo_autowipe() {
%1 = load i32, i32* @demo_autowipe.mode
%2 = add nsw i32 %1, 1
store i32 %2, i32* @demo_autowipe.mode
switch i32 %1, label %3 [
i32 0, label %4
i32 1, label %6
i32 2, label %8
i32 3, label %10
i32 4, label %12
i32 5, label %14
i32 6, label %16
]
3: ; preds = %0
store i32 1, i32* @demo_autowipe.mode
br label %4
4: ; preds = %0, %3
%5 = tail call i32 @FS460_autowipe(i32 0, i32 0, i32 720, i32 0, i32 0, i32 0, i32 127, i32 0, i32 2000)
br label %18
6: ; preds = %0
%7 = tail call i32 @FS460_autowipe(i32 0, i32 0, i32 0, i32 576, i32 0, i32 0, i32 0, i32 127, i32 2000)
br label %18
8: ; preds = %0
%9 = tail call i32 @FS460_autowipe(i32 720, i32 0, i32 0, i32 0, i32 0, i32 0, i32 0, i32 127, i32 2000)
br label %18
10: ; preds = %0
%11 = tail call i32 @FS460_autowipe(i32 0, i32 576, i32 0, i32 0, i32 0, i32 127, i32 0, i32 0, i32 2000)
br label %18
12: ; preds = %0
%13 = tail call i32 @FS460_autowipe(i32 0, i32 0, i32 720, i32 576, i32 127, i32 64, i32 64, i32 0, i32 4000)
br label %18
14: ; preds = %0
%15 = tail call i32 @FS460_autowipe(i32 720, i32 576, i32 0, i32 0, i32 127, i32 64, i32 64, i32 0, i32 500)
br label %18
16: ; preds = %0
%17 = tail call i32 @FS460_autowipe(i32 720, i32 0, i32 0, i32 576, i32 0, i32 127, i32 0, i32 0, i32 5000)
br label %18
18: ; preds = %16, %14, %12, %10, %8, %6, %4
ret void
}