#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*/ vmwHlin(int /*<<< orphan*/, int, int, int /*<<< orphan*/,
                           unsigned char *);
void erase_rasterbar(int y, unsigned char *buffer) {
  int i;
  for (i = 0; i < 16; i++) {
    vmwHlin(0, 640, (y - 7) + i, 0, buffer);
  }
}


x86 assembly (clang, -O0):
<erase_rasterbar>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %edi,-0x4(%rbp)
mov    %rsi,-0x10(%rbp)
movl   $0x0,-0x14(%rbp)
cmpl   $0x10,-0x14(%rbp)
jge    1159 <erase_rasterbar+0x49>
mov    -0x4(%rbp),%edx
sub    $0x7,%edx
add    -0x14(%rbp),%edx
mov    -0x10(%rbp),%r8
xor    %ecx,%ecx
mov    $0x280,%esi
mov    %ecx,%edi
call   1030 <vmwHlin@plt>
mov    -0x14(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x14(%rbp)
jmp    1126 <erase_rasterbar+0x16>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<erase_rasterbar>:
push   %r14
push   %rbx
push   %rax
mov    %rsi,%r14
mov    %edi,%ebx
lea    -0x7(%rbx),%edx
xor    %edi,%edi
mov    $0x280,%esi
xor    %ecx,%ecx
mov    %r14,%r8
call   1030 <vmwHlin@plt>
lea    -0x6(%rbx),%edx
xor    %edi,%edi
mov    $0x280,%esi
xor    %ecx,%ecx
mov    %r14,%r8
call   1030 <vmwHlin@plt>
lea    -0x5(%rbx),%edx
xor    %edi,%edi
mov    $0x280,%esi
xor    %ecx,%ecx
mov    %r14,%r8
call   1030 <vmwHlin@plt>
lea    -0x4(%rbx),%edx
xor    %edi,%edi
mov    $0x280,%esi
xor    %ecx,%ecx
mov    %r14,%r8
call   1030 <vmwHlin@plt>
lea    -0x3(%rbx),%edx
xor    %edi,%edi
mov    $0x280,%esi
xor    %ecx,%ecx
mov    %r14,%r8
call   1030 <vmwHlin@plt>
lea    -0x2(%rbx),%edx
xor    %edi,%edi
mov    $0x280,%esi
xor    %ecx,%ecx
mov    %r14,%r8
call   1030 <vmwHlin@plt>
lea    -0x1(%rbx),%edx
xor    %edi,%edi
mov    $0x280,%esi
xor    %ecx,%ecx
mov    %r14,%r8
call   1030 <vmwHlin@plt>
xor    %edi,%edi
mov    $0x280,%esi
mov    %ebx,%edx
xor    %ecx,%ecx
mov    %r14,%r8
call   1030 <vmwHlin@plt>
lea    0x1(%rbx),%edx
xor    %edi,%edi
mov    $0x280,%esi
xor    %ecx,%ecx
mov    %r14,%r8
call   1030 <vmwHlin@plt>
lea    0x2(%rbx),%edx
xor    %edi,%edi
mov    $0x280,%esi
xor    %ecx,%ecx
mov    %r14,%r8
call   1030 <vmwHlin@plt>
lea    0x3(%rbx),%edx
xor    %edi,%edi
mov    $0x280,%esi
xor    %ecx,%ecx
mov    %r14,%r8
call   1030 <vmwHlin@plt>
lea    0x4(%rbx),%edx
xor    %edi,%edi
mov    $0x280,%esi
xor    %ecx,%ecx
mov    %r14,%r8
call   1030 <vmwHlin@plt>
lea    0x5(%rbx),%edx
xor    %edi,%edi
mov    $0x280,%esi
xor    %ecx,%ecx
mov    %r14,%r8
call   1030 <vmwHlin@plt>
lea    0x6(%rbx),%edx
xor    %edi,%edi
mov    $0x280,%esi
xor    %ecx,%ecx
mov    %r14,%r8
call   1030 <vmwHlin@plt>
lea    0x7(%rbx),%edx
xor    %edi,%edi
mov    $0x280,%esi
xor    %ecx,%ecx
mov    %r14,%r8
call   1030 <vmwHlin@plt>
add    $0x8,%ebx
xor    %edi,%edi
mov    $0x280,%esi
mov    %ebx,%edx
xor    %ecx,%ecx
mov    %r14,%r8
add    $0x8,%rsp
pop    %rbx
pop    %r14
jmp    1030 <vmwHlin@plt>

LLVM IR (-O0):
define void @erase_rasterbar(i32 %0, i8* %1) {
%3 = alloca i32
%4 = alloca i8*
%5 = alloca i32
store i32 %0, i32* %3
store i8* %1, i8** %4
store i32 0, i32* %5
br label %6
6: ; preds = %16, %2
%7 = load i32, i32* %5
%8 = icmp slt i32 %7, 16
br i1 %8, label %9, label %19
9: ; preds = %6
%10 = load i32, i32* %3
%11 = sub nsw i32 %10, 7
%12 = load i32, i32* %5
%13 = add nsw i32 %11, %12
%14 = load i8*, i8** %4
%15 = call i32 @vmwHlin(i32 0, i32 640, i32 %13, i32 0, i8* %14)
br label %16
16: ; preds = %9
%17 = load i32, i32* %5
%18 = add nsw i32 %17, 1
store i32 %18, i32* %5
br label %6
19: ; preds = %6
ret void
}

LLVM IR (-O2):
define void @erase_rasterbar(i32 %0, i8* %1) {
%3 = add nsw i32 %0, -7
%4 = tail call i32 @vmwHlin(i32 0, i32 640, i32 %3, i32 0, i8* %1)
%5 = add nsw i32 %0, -6
%6 = tail call i32 @vmwHlin(i32 0, i32 640, i32 %5, i32 0, i8* %1)
%7 = add nsw i32 %0, -5
%8 = tail call i32 @vmwHlin(i32 0, i32 640, i32 %7, i32 0, i8* %1)
%9 = add nsw i32 %0, -4
%10 = tail call i32 @vmwHlin(i32 0, i32 640, i32 %9, i32 0, i8* %1)
%11 = add nsw i32 %0, -3
%12 = tail call i32 @vmwHlin(i32 0, i32 640, i32 %11, i32 0, i8* %1)
%13 = add nsw i32 %0, -2
%14 = tail call i32 @vmwHlin(i32 0, i32 640, i32 %13, i32 0, i8* %1)
%15 = add nsw i32 %0, -1
%16 = tail call i32 @vmwHlin(i32 0, i32 640, i32 %15, i32 0, i8* %1)
%17 = tail call i32 @vmwHlin(i32 0, i32 640, i32 %0, i32 0, i8* %1)
%18 = add nsw i32 %0, 1
%19 = tail call i32 @vmwHlin(i32 0, i32 640, i32 %18, i32 0, i8* %1)
%20 = add nsw i32 %0, 2
%21 = tail call i32 @vmwHlin(i32 0, i32 640, i32 %20, i32 0, i8* %1)
%22 = add nsw i32 %0, 3
%23 = tail call i32 @vmwHlin(i32 0, i32 640, i32 %22, i32 0, i8* %1)
%24 = add nsw i32 %0, 4
%25 = tail call i32 @vmwHlin(i32 0, i32 640, i32 %24, i32 0, i8* %1)
%26 = add nsw i32 %0, 5
%27 = tail call i32 @vmwHlin(i32 0, i32 640, i32 %26, i32 0, i8* %1)
%28 = add nsw i32 %0, 6
%29 = tail call i32 @vmwHlin(i32 0, i32 640, i32 %28, i32 0, i8* %1)
%30 = add nsw i32 %0, 7
%31 = tail call i32 @vmwHlin(i32 0, i32 640, i32 %30, i32 0, i8* %1)
%32 = add nsw i32 %0, 8
%33 = tail call i32 @vmwHlin(i32 0, i32 640, i32 %32, i32 0, i8* %1)
ret void
}