#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*/ Mark_Pixel(int, int, unsigned char, unsigned char,
                              unsigned char, unsigned char *, int);
void Draw_H_Line(int Xmin, int Xmax, int Y, unsigned char R, unsigned char G,
                 unsigned char B, unsigned char *Frame, int Width) {
  int X;
  for (X = Xmin; X <= Xmax; X++)
    Mark_Pixel(X, Y, R, G, B, Frame, Width);
}


x86 assembly (clang, -O0):
<Draw_H_Line>:
push   %rbp
mov    %rsp,%rbp
sub    $0x30,%rsp
mov    %r8d,-0x24(%rbp)
mov    %ecx,%eax
mov    -0x24(%rbp),%ecx
mov    %eax,-0x20(%rbp)
mov    %edx,%eax
mov    -0x20(%rbp),%edx
mov    %eax,-0x1c(%rbp)
mov    %esi,%eax
mov    -0x1c(%rbp),%esi
mov    %eax,-0x18(%rbp)
mov    %edi,%r8d
mov    -0x18(%rbp),%edi
mov    %r9b,%al
mov    0x18(%rbp),%r9d
mov    0x10(%rbp),%r9
mov    %r8d,-0x4(%rbp)
mov    %edi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    %dl,-0xd(%rbp)
mov    %cl,-0xe(%rbp)
mov    %al,-0xf(%rbp)
mov    -0x4(%rbp),%eax
mov    %eax,-0x14(%rbp)
mov    -0x14(%rbp),%eax
cmp    -0x8(%rbp),%eax
jg     11a1 <Draw_H_Line+0x91>
mov    -0x14(%rbp),%edi
mov    -0xc(%rbp),%esi
mov    -0xd(%rbp),%dl
mov    -0xe(%rbp),%cl
mov    -0xf(%rbp),%r8b
mov    0x10(%rbp),%r9
mov    0x18(%rbp),%eax
movzbl %dl,%edx
movzbl %cl,%ecx
movzbl %r8b,%r8d
mov    %eax,(%rsp)
call   1030 <Mark_Pixel@plt>
mov    -0x14(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x14(%rbp)
jmp    115e <Draw_H_Line+0x4e>
add    $0x30,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<Draw_H_Line>:
push   %rbp
push   %r15
push   %r14
push   %r13
push   %r12
push   %rbx
push   %rax
cmp    %esi,%edi
jg     1166 <Draw_H_Line+0x56>
mov    %edx,%r14d
mov    %esi,%r12d
mov    %edi,%ebx
add    $0x1,%r12d
movzbl %cl,%r13d
movzbl %r8b,%ebp
movzbl %r9b,%r15d
nopw   0x0(%rax,%rax,1)
mov    0x48(%rsp),%eax
mov    %eax,(%rsp)
mov    %ebx,%edi
mov    %r14d,%esi
mov    %r13d,%edx
mov    %ebp,%ecx
mov    %r15d,%r8d
mov    0x40(%rsp),%r9
call   1030 <Mark_Pixel@plt>
add    $0x1,%ebx
cmp    %ebx,%r12d
jne    1140 <Draw_H_Line+0x30>
add    $0x8,%rsp
pop    %rbx
pop    %r12
pop    %r13
pop    %r14
pop    %r15
pop    %rbp
ret

LLVM IR (-O0):
define void @Draw_H_Line(i32 %0, i32 %1, i32 %2, i8 zeroext %3, i8 zeroext %4, i8 zeroext %5, i8* %6, i32 %7) {
%9 = alloca i32
%10 = alloca i32
%11 = alloca i32
%12 = alloca i8
%13 = alloca i8
%14 = alloca i8
%15 = alloca i8*
%16 = alloca i32
%17 = alloca i32
store i32 %0, i32* %9
store i32 %1, i32* %10
store i32 %2, i32* %11
store i8 %3, i8* %12
store i8 %4, i8* %13
store i8 %5, i8* %14
store i8* %6, i8** %15
store i32 %7, i32* %16
%18 = load i32, i32* %9
store i32 %18, i32* %17
br label %19
19: ; preds = %32, %8
%20 = load i32, i32* %17
%21 = load i32, i32* %10
%22 = icmp sle i32 %20, %21
br i1 %22, label %23, label %35
23: ; preds = %19
%24 = load i32, i32* %17
%25 = load i32, i32* %11
%26 = load i8, i8* %12
%27 = load i8, i8* %13
%28 = load i8, i8* %14
%29 = load i8*, i8** %15
%30 = load i32, i32* %16
%31 = call i32 @Mark_Pixel(i32 %24, i32 %25, i8 zeroext %26, i8 zeroext %27, i8 zeroext %28, i8* %29, i32 %30)
br label %32
32: ; preds = %23
%33 = load i32, i32* %17
%34 = add nsw i32 %33, 1
store i32 %34, i32* %17
br label %19
35: ; preds = %19
ret void
}

LLVM IR (-O2):
define void @Draw_H_Line(i32 %0, i32 %1, i32 %2, i8 zeroext %3, i8 zeroext %4, i8 zeroext %5, i8* %6, i32 %7) {
%9 = icmp sgt i32 %0, %1
br i1 %9, label %15, label %10
10: ; preds = %8, %10
%11 = phi i32 [ %13, %10 ], [ %0, %8 ]
%12 = tail call i32 @Mark_Pixel(i32 %11, i32 %2, i8 zeroext %3, i8 zeroext %4, i8 zeroext %5, i8* %6, i32 %7)
%13 = add i32 %11, 1
%14 = icmp eq i32 %11, %1
br i1 %14, label %15, label %10
15: ; preds = %10, %8
ret void
}