#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*/ _column(int, int, int, int, int);
int /*<<< orphan*/ delay(int);
void _fast_column_scanner(int panel, int red, int green, int blue) {
  int column;
  for (column = 0; column < 8; column++) {
    _column(panel, column, red, green, blue);
    delay(100);
    _column(panel, column, 0, 0, 0);
  }
  for (column = 7; column >= 0; column--) {
    _column(panel, column, red, green, blue);
    delay(100);
    _column(panel, column, 0, 0, 0);
  }
}


x86 assembly (clang, -O0):
<_fast_column_scanner>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    %edx,-0xc(%rbp)
mov    %ecx,-0x10(%rbp)
movl   $0x0,-0x14(%rbp)
cmpl   $0x8,-0x14(%rbp)
jge    1186 <_fast_column_scanner+0x66>
mov    -0x4(%rbp),%edi
mov    -0x14(%rbp),%esi
mov    -0x8(%rbp),%edx
mov    -0xc(%rbp),%ecx
mov    -0x10(%rbp),%r8d
call   1040 <_column@plt>
mov    $0x64,%edi
call   1030 <delay@plt>
mov    -0x4(%rbp),%edi
mov    -0x14(%rbp),%esi
xor    %r8d,%r8d
mov    %r8d,%edx
mov    %r8d,%ecx
call   1040 <_column@plt>
mov    -0x14(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x14(%rbp)
jmp    113b <_fast_column_scanner+0x1b>
movl   $0x7,-0x14(%rbp)
cmpl   $0x0,-0x14(%rbp)
jl     11d8 <_fast_column_scanner+0xb8>
mov    -0x4(%rbp),%edi
mov    -0x14(%rbp),%esi
mov    -0x8(%rbp),%edx
mov    -0xc(%rbp),%ecx
mov    -0x10(%rbp),%r8d
call   1040 <_column@plt>
mov    $0x64,%edi
call   1030 <delay@plt>
mov    -0x4(%rbp),%edi
mov    -0x14(%rbp),%esi
xor    %r8d,%r8d
mov    %r8d,%edx
mov    %r8d,%ecx
call   1040 <_column@plt>
mov    -0x14(%rbp),%eax
add    $0xffffffff,%eax
mov    %eax,-0x14(%rbp)
jmp    118d <_fast_column_scanner+0x6d>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<_fast_column_scanner>:
push   %rbp
push   %r15
push   %r14
push   %rbx
push   %rax
mov    %ecx,%r14d
mov    %edx,%r15d
mov    %esi,%ebp
mov    %edi,%ebx
xor    %esi,%esi
mov    %ebp,%edx
mov    %r15d,%ecx
mov    %r14d,%r8d
call   1040 <_column@plt>
mov    $0x64,%edi
call   1030 <delay@plt>
mov    %ebx,%edi
xor    %esi,%esi
xor    %edx,%edx
xor    %ecx,%ecx
xor    %r8d,%r8d
call   1040 <_column@plt>
mov    %ebx,%edi
mov    $0x1,%esi
mov    %ebp,%edx
mov    %r15d,%ecx
mov    %r14d,%r8d
call   1040 <_column@plt>
mov    $0x64,%edi
call   1030 <delay@plt>
mov    %ebx,%edi
mov    $0x1,%esi
xor    %edx,%edx
xor    %ecx,%ecx
xor    %r8d,%r8d
call   1040 <_column@plt>
mov    %ebx,%edi
mov    $0x2,%esi
mov    %ebp,%edx
mov    %r15d,%ecx
mov    %r14d,%r8d
call   1040 <_column@plt>
mov    $0x64,%edi
call   1030 <delay@plt>
mov    %ebx,%edi
mov    $0x2,%esi
xor    %edx,%edx
xor    %ecx,%ecx
xor    %r8d,%r8d
call   1040 <_column@plt>
mov    %ebx,%edi
mov    $0x3,%esi
mov    %ebp,%edx
mov    %r15d,%ecx
mov    %r14d,%r8d
call   1040 <_column@plt>
mov    $0x64,%edi
call   1030 <delay@plt>
mov    %ebx,%edi
mov    $0x3,%esi
xor    %edx,%edx
xor    %ecx,%ecx
xor    %r8d,%r8d
call   1040 <_column@plt>
mov    %ebx,%edi
mov    $0x4,%esi
mov    %ebp,%edx
mov    %r15d,%ecx
mov    %r14d,%r8d
call   1040 <_column@plt>
mov    $0x64,%edi
call   1030 <delay@plt>
mov    %ebx,%edi
mov    $0x4,%esi
xor    %edx,%edx
xor    %ecx,%ecx
xor    %r8d,%r8d
call   1040 <_column@plt>
mov    %ebx,%edi
mov    $0x5,%esi
mov    %ebp,%edx
mov    %r15d,%ecx
mov    %r14d,%r8d
call   1040 <_column@plt>
mov    $0x64,%edi
call   1030 <delay@plt>
mov    %ebx,%edi
mov    $0x5,%esi
xor    %edx,%edx
xor    %ecx,%ecx
xor    %r8d,%r8d
call   1040 <_column@plt>
mov    %ebx,%edi
mov    $0x6,%esi
mov    %ebp,%edx
mov    %r15d,%ecx
mov    %r14d,%r8d
call   1040 <_column@plt>
mov    $0x64,%edi
call   1030 <delay@plt>
mov    %ebx,%edi
mov    $0x6,%esi
xor    %edx,%edx
xor    %ecx,%ecx
xor    %r8d,%r8d
call   1040 <_column@plt>
mov    %ebx,%edi
mov    $0x7,%esi
mov    %ebp,%edx
mov    %r15d,%ecx
mov    %r14d,%r8d
call   1040 <_column@plt>
mov    $0x64,%edi
call   1030 <delay@plt>
mov    %ebx,%edi
mov    $0x7,%esi
xor    %edx,%edx
xor    %ecx,%ecx
xor    %r8d,%r8d
call   1040 <_column@plt>
mov    %ebx,%edi
mov    $0x7,%esi
mov    %ebp,%edx
mov    %r15d,%ecx
mov    %r14d,%r8d
call   1040 <_column@plt>
mov    $0x64,%edi
call   1030 <delay@plt>
mov    %ebx,%edi
mov    $0x7,%esi
xor    %edx,%edx
xor    %ecx,%ecx
xor    %r8d,%r8d
call   1040 <_column@plt>
mov    %ebx,%edi
mov    $0x6,%esi
mov    %ebp,%edx
mov    %r15d,%ecx
mov    %r14d,%r8d
call   1040 <_column@plt>
mov    $0x64,%edi
call   1030 <delay@plt>
mov    %ebx,%edi
mov    $0x6,%esi
xor    %edx,%edx
xor    %ecx,%ecx
xor    %r8d,%r8d
call   1040 <_column@plt>
mov    %ebx,%edi
mov    $0x5,%esi
mov    %ebp,%edx
mov    %r15d,%ecx
mov    %r14d,%r8d
call   1040 <_column@plt>
mov    $0x64,%edi
call   1030 <delay@plt>
mov    %ebx,%edi
mov    $0x5,%esi
xor    %edx,%edx
xor    %ecx,%ecx
xor    %r8d,%r8d
call   1040 <_column@plt>
mov    %ebx,%edi
mov    $0x4,%esi
mov    %ebp,%edx
mov    %r15d,%ecx
mov    %r14d,%r8d
call   1040 <_column@plt>
mov    $0x64,%edi
call   1030 <delay@plt>
mov    %ebx,%edi
mov    $0x4,%esi
xor    %edx,%edx
xor    %ecx,%ecx
xor    %r8d,%r8d
call   1040 <_column@plt>
mov    %ebx,%edi
mov    $0x3,%esi
mov    %ebp,%edx
mov    %r15d,%ecx
mov    %r14d,%r8d
call   1040 <_column@plt>
mov    $0x64,%edi
call   1030 <delay@plt>
mov    %ebx,%edi
mov    $0x3,%esi
xor    %edx,%edx
xor    %ecx,%ecx
xor    %r8d,%r8d
call   1040 <_column@plt>
mov    %ebx,%edi
mov    $0x2,%esi
mov    %ebp,%edx
mov    %r15d,%ecx
mov    %r14d,%r8d
call   1040 <_column@plt>
mov    $0x64,%edi
call   1030 <delay@plt>
mov    %ebx,%edi
mov    $0x2,%esi
xor    %edx,%edx
xor    %ecx,%ecx
xor    %r8d,%r8d
call   1040 <_column@plt>
mov    %ebx,%edi
mov    $0x1,%esi
mov    %ebp,%edx
mov    %r15d,%ecx
mov    %r14d,%r8d
call   1040 <_column@plt>
mov    $0x64,%edi
call   1030 <delay@plt>
mov    %ebx,%edi
mov    $0x1,%esi
xor    %edx,%edx
xor    %ecx,%ecx
xor    %r8d,%r8d
call   1040 <_column@plt>
mov    %ebx,%edi
xor    %esi,%esi
mov    %ebp,%edx
mov    %r15d,%ecx
mov    %r14d,%r8d
call   1040 <_column@plt>
mov    $0x64,%edi
call   1030 <delay@plt>
mov    %ebx,%edi
xor    %esi,%esi
xor    %edx,%edx
xor    %ecx,%ecx
xor    %r8d,%r8d
add    $0x8,%rsp
pop    %rbx
pop    %r14
pop    %r15
pop    %rbp
jmp    1040 <_column@plt>

LLVM IR (-O0):
define void @_fast_column_scanner(i32 %0, i32 %1, i32 %2, i32 %3) {
%5 = alloca i32
%6 = alloca i32
%7 = alloca i32
%8 = alloca i32
%9 = alloca i32
store i32 %0, i32* %5
store i32 %1, i32* %6
store i32 %2, i32* %7
store i32 %3, i32* %8
store i32 0, i32* %9
br label %10
10: ; preds = %24, %4
%11 = load i32, i32* %9
%12 = icmp slt i32 %11, 8
br i1 %12, label %13, label %27
13: ; preds = %10
%14 = load i32, i32* %5
%15 = load i32, i32* %9
%16 = load i32, i32* %6
%17 = load i32, i32* %7
%18 = load i32, i32* %8
%19 = call i32 @_column(i32 %14, i32 %15, i32 %16, i32 %17, i32 %18)
%20 = call i32 @delay(i32 100)
%21 = load i32, i32* %5
%22 = load i32, i32* %9
%23 = call i32 @_column(i32 %21, i32 %22, i32 0, i32 0, i32 0)
br label %24
24: ; preds = %13
%25 = load i32, i32* %9
%26 = add nsw i32 %25, 1
store i32 %26, i32* %9
br label %10
27: ; preds = %10
store i32 7, i32* %9
br label %28
28: ; preds = %42, %27
%29 = load i32, i32* %9
%30 = icmp sge i32 %29, 0
br i1 %30, label %31, label %45
31: ; preds = %28
%32 = load i32, i32* %5
%33 = load i32, i32* %9
%34 = load i32, i32* %6
%35 = load i32, i32* %7
%36 = load i32, i32* %8
%37 = call i32 @_column(i32 %32, i32 %33, i32 %34, i32 %35, i32 %36)
%38 = call i32 @delay(i32 100)
%39 = load i32, i32* %5
%40 = load i32, i32* %9
%41 = call i32 @_column(i32 %39, i32 %40, i32 0, i32 0, i32 0)
br label %42
42: ; preds = %31
%43 = load i32, i32* %9
%44 = add nsw i32 %43, -1
store i32 %44, i32* %9
br label %28
45: ; preds = %28
ret void
}

LLVM IR (-O2):
define void @_fast_column_scanner(i32 %0, i32 %1, i32 %2, i32 %3) {
%5 = tail call i32 @_column(i32 %0, i32 0, i32 %1, i32 %2, i32 %3)
%6 = tail call i32 @delay(i32 100)
%7 = tail call i32 @_column(i32 %0, i32 0, i32 0, i32 0, i32 0)
%8 = tail call i32 @_column(i32 %0, i32 1, i32 %1, i32 %2, i32 %3)
%9 = tail call i32 @delay(i32 100)
%10 = tail call i32 @_column(i32 %0, i32 1, i32 0, i32 0, i32 0)
%11 = tail call i32 @_column(i32 %0, i32 2, i32 %1, i32 %2, i32 %3)
%12 = tail call i32 @delay(i32 100)
%13 = tail call i32 @_column(i32 %0, i32 2, i32 0, i32 0, i32 0)
%14 = tail call i32 @_column(i32 %0, i32 3, i32 %1, i32 %2, i32 %3)
%15 = tail call i32 @delay(i32 100)
%16 = tail call i32 @_column(i32 %0, i32 3, i32 0, i32 0, i32 0)
%17 = tail call i32 @_column(i32 %0, i32 4, i32 %1, i32 %2, i32 %3)
%18 = tail call i32 @delay(i32 100)
%19 = tail call i32 @_column(i32 %0, i32 4, i32 0, i32 0, i32 0)
%20 = tail call i32 @_column(i32 %0, i32 5, i32 %1, i32 %2, i32 %3)
%21 = tail call i32 @delay(i32 100)
%22 = tail call i32 @_column(i32 %0, i32 5, i32 0, i32 0, i32 0)
%23 = tail call i32 @_column(i32 %0, i32 6, i32 %1, i32 %2, i32 %3)
%24 = tail call i32 @delay(i32 100)
%25 = tail call i32 @_column(i32 %0, i32 6, i32 0, i32 0, i32 0)
%26 = tail call i32 @_column(i32 %0, i32 7, i32 %1, i32 %2, i32 %3)
%27 = tail call i32 @delay(i32 100)
%28 = tail call i32 @_column(i32 %0, i32 7, i32 0, i32 0, i32 0)
%29 = tail call i32 @_column(i32 %0, i32 7, i32 %1, i32 %2, i32 %3)
%30 = tail call i32 @delay(i32 100)
%31 = tail call i32 @_column(i32 %0, i32 7, i32 0, i32 0, i32 0)
%32 = tail call i32 @_column(i32 %0, i32 6, i32 %1, i32 %2, i32 %3)
%33 = tail call i32 @delay(i32 100)
%34 = tail call i32 @_column(i32 %0, i32 6, i32 0, i32 0, i32 0)
%35 = tail call i32 @_column(i32 %0, i32 5, i32 %1, i32 %2, i32 %3)
%36 = tail call i32 @delay(i32 100)
%37 = tail call i32 @_column(i32 %0, i32 5, i32 0, i32 0, i32 0)
%38 = tail call i32 @_column(i32 %0, i32 4, i32 %1, i32 %2, i32 %3)
%39 = tail call i32 @delay(i32 100)
%40 = tail call i32 @_column(i32 %0, i32 4, i32 0, i32 0, i32 0)
%41 = tail call i32 @_column(i32 %0, i32 3, i32 %1, i32 %2, i32 %3)
%42 = tail call i32 @delay(i32 100)
%43 = tail call i32 @_column(i32 %0, i32 3, i32 0, i32 0, i32 0)
%44 = tail call i32 @_column(i32 %0, i32 2, i32 %1, i32 %2, i32 %3)
%45 = tail call i32 @delay(i32 100)
%46 = tail call i32 @_column(i32 %0, i32 2, i32 0, i32 0, i32 0)
%47 = tail call i32 @_column(i32 %0, i32 1, i32 %1, i32 %2, i32 %3)
%48 = tail call i32 @delay(i32 100)
%49 = tail call i32 @_column(i32 %0, i32 1, i32 0, i32 0, i32 0)
%50 = tail call i32 @_column(i32 %0, i32 0, i32 %1, i32 %2, i32 %3)
%51 = tail call i32 @delay(i32 100)
%52 = tail call i32 @_column(i32 %0, i32 0, i32 0, i32 0, i32 0)
ret void
}