#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*/ vfdlib_drawLineHorizUnclipped(char *, int, int, int, char);
int /*<<< orphan*/ vfdlib_drawLineVertUnclipped(char *, int, int, int, char);
void vfdlib_drawOutlineRectangleUnclipped(char *buffer, int xLeft, int yTop,
                                          int xWidth, int yHeight, char shade) {
  vfdlib_drawLineHorizUnclipped(buffer, yTop, xLeft, xWidth, shade);
  vfdlib_drawLineVertUnclipped(buffer, xLeft, yTop, yHeight, shade);
  vfdlib_drawLineHorizUnclipped(buffer, yTop + yHeight - 1, xLeft, xWidth,
                                shade);
  vfdlib_drawLineVertUnclipped(buffer, xLeft + xWidth - 1, yTop, yHeight,
                               shade);
}


x86 assembly (clang, -O0):
<vfdlib_drawOutlineRectangleUnclipped>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %r9b,%al
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    %edx,-0x10(%rbp)
mov    %ecx,-0x14(%rbp)
mov    %r8d,-0x18(%rbp)
mov    %al,-0x19(%rbp)
mov    -0x8(%rbp),%rdi
mov    -0x10(%rbp),%esi
mov    -0xc(%rbp),%edx
mov    -0x14(%rbp),%ecx
movsbl -0x19(%rbp),%r8d
call   1040 <vfdlib_drawLineHorizUnclipped@plt>
mov    -0x8(%rbp),%rdi
mov    -0xc(%rbp),%esi
mov    -0x10(%rbp),%edx
mov    -0x18(%rbp),%ecx
movsbl -0x19(%rbp),%r8d
call   1030 <vfdlib_drawLineVertUnclipped@plt>
mov    -0x8(%rbp),%rdi
mov    -0x10(%rbp),%esi
add    -0x18(%rbp),%esi
sub    $0x1,%esi
mov    -0xc(%rbp),%edx
mov    -0x14(%rbp),%ecx
movsbl -0x19(%rbp),%r8d
call   1040 <vfdlib_drawLineHorizUnclipped@plt>
mov    -0x8(%rbp),%rdi
mov    -0xc(%rbp),%esi
add    -0x14(%rbp),%esi
sub    $0x1,%esi
mov    -0x10(%rbp),%edx
mov    -0x18(%rbp),%ecx
movsbl -0x19(%rbp),%r8d
call   1030 <vfdlib_drawLineVertUnclipped@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<vfdlib_drawOutlineRectangleUnclipped>:
push   %rbp
push   %r15
push   %r14
push   %r13
push   %r12
push   %rbx
push   %rax
mov    %r9d,%r12d
mov    %r8d,%r14d
mov    %ecx,%r15d
mov    %edx,%r13d
mov    %esi,%ebx
mov    %rdi,%rbp
mov    %edx,%esi
mov    %ebx,%edx
mov    %r9d,%r8d
call   1040 <vfdlib_drawLineHorizUnclipped@plt>
mov    %rbp,%rdi
mov    %ebx,%esi
mov    %r13d,%edx
mov    %r14d,%ecx
mov    %r12d,%r8d
call   1030 <vfdlib_drawLineVertUnclipped@plt>
lea    (%r14,%r13,1),%esi
add    $0xffffffff,%esi
mov    %rbp,%rdi
mov    %ebx,%edx
mov    %r15d,%ecx
mov    %r12d,%r8d
call   1040 <vfdlib_drawLineHorizUnclipped@plt>
lea    (%rbx,%r15,1),%esi
add    $0xffffffff,%esi
mov    %rbp,%rdi
mov    %r13d,%edx
mov    %r14d,%ecx
mov    %r12d,%r8d
add    $0x8,%rsp
pop    %rbx
pop    %r12
pop    %r13
pop    %r14
pop    %r15
pop    %rbp
jmp    1030 <vfdlib_drawLineVertUnclipped@plt>

LLVM IR (-O0):
define void @vfdlib_drawOutlineRectangleUnclipped(i8* %0, i32 %1, i32 %2, i32 %3, i32 %4, i8 signext %5) {
%7 = alloca i8*
%8 = alloca i32
%9 = alloca i32
%10 = alloca i32
%11 = alloca i32
%12 = alloca i8
store i8* %0, i8** %7
store i32 %1, i32* %8
store i32 %2, i32* %9
store i32 %3, i32* %10
store i32 %4, i32* %11
store i8 %5, i8* %12
%13 = load i8*, i8** %7
%14 = load i32, i32* %9
%15 = load i32, i32* %8
%16 = load i32, i32* %10
%17 = load i8, i8* %12
%18 = call i32 @vfdlib_drawLineHorizUnclipped(i8* %13, i32 %14, i32 %15, i32 %16, i8 signext %17)
%19 = load i8*, i8** %7
%20 = load i32, i32* %8
%21 = load i32, i32* %9
%22 = load i32, i32* %11
%23 = load i8, i8* %12
%24 = call i32 @vfdlib_drawLineVertUnclipped(i8* %19, i32 %20, i32 %21, i32 %22, i8 signext %23)
%25 = load i8*, i8** %7
%26 = load i32, i32* %9
%27 = load i32, i32* %11
%28 = add nsw i32 %26, %27
%29 = sub nsw i32 %28, 1
%30 = load i32, i32* %8
%31 = load i32, i32* %10
%32 = load i8, i8* %12
%33 = call i32 @vfdlib_drawLineHorizUnclipped(i8* %25, i32 %29, i32 %30, i32 %31, i8 signext %32)
%34 = load i8*, i8** %7
%35 = load i32, i32* %8
%36 = load i32, i32* %10
%37 = add nsw i32 %35, %36
%38 = sub nsw i32 %37, 1
%39 = load i32, i32* %9
%40 = load i32, i32* %11
%41 = load i8, i8* %12
%42 = call i32 @vfdlib_drawLineVertUnclipped(i8* %34, i32 %38, i32 %39, i32 %40, i8 signext %41)
ret void
}

LLVM IR (-O2):
define void @vfdlib_drawOutlineRectangleUnclipped(i8* %0, i32 %1, i32 %2, i32 %3, i32 %4, i8 signext %5) {
%7 = tail call i32 @vfdlib_drawLineHorizUnclipped(i8* %0, i32 %2, i32 %1, i32 %3, i8 signext %5)
%8 = tail call i32 @vfdlib_drawLineVertUnclipped(i8* %0, i32 %1, i32 %2, i32 %4, i8 signext %5)
%9 = add i32 %2, -1
%10 = add i32 %9, %4
%11 = tail call i32 @vfdlib_drawLineHorizUnclipped(i8* %0, i32 %10, i32 %1, i32 %3, i8 signext %5)
%12 = add i32 %1, -1
%13 = add i32 %12, %3
%14 = tail call i32 @vfdlib_drawLineVertUnclipped(i8* %0, i32 %13, i32 %2, i32 %4, i8 signext %5)
ret void
}