#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*/ LcdWrite(int, int);
int /*<<< orphan*/ gotoXY(int, unsigned char);
void drawLine(void) {
  unsigned char j;
  for (j = 0; j < 84; j++) {
    gotoXY(j, 0);
    LcdWrite(1, 0x01);
  }
  for (j = 0; j < 84; j++) {
    gotoXY(j, 5);
    LcdWrite(1, 0x80);
  }
  for (j = 0; j < 6; j++) {
    gotoXY(83, j);
    LcdWrite(1, 0xff);
  }
  for (j = 0; j < 6; j++) {
    gotoXY(0, j);
    LcdWrite(1, 0xff);
  }
}


x86 assembly (clang, -O0):
<drawLine>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movb   $0x0,-0x1(%rbp)
movzbl -0x1(%rbp),%eax
cmp    $0x54,%eax
jge    115d <drawLine+0x3d>
movzbl -0x1(%rbp),%edi
xor    %esi,%esi
call   1040 <gotoXY@plt>
mov    $0x1,%esi
mov    %esi,%edi
call   1030 <LcdWrite@plt>
mov    -0x1(%rbp),%al
add    $0x1,%al
mov    %al,-0x1(%rbp)
jmp    112c <drawLine+0xc>
movb   $0x0,-0x1(%rbp)
movzbl -0x1(%rbp),%eax
cmp    $0x54,%eax
jge    1198 <drawLine+0x78>
movzbl -0x1(%rbp),%edi
mov    $0x5,%esi
call   1040 <gotoXY@plt>
mov    $0x1,%edi
mov    $0x80,%esi
call   1030 <LcdWrite@plt>
mov    -0x1(%rbp),%al
add    $0x1,%al
mov    %al,-0x1(%rbp)
jmp    1161 <drawLine+0x41>
movb   $0x0,-0x1(%rbp)
movzbl -0x1(%rbp),%eax
cmp    $0x6,%eax
jge    11d3 <drawLine+0xb3>
mov    $0x53,%edi
movzbl -0x1(%rbp),%esi
call   1040 <gotoXY@plt>
mov    $0x1,%edi
mov    $0xff,%esi
call   1030 <LcdWrite@plt>
mov    -0x1(%rbp),%al
add    $0x1,%al
mov    %al,-0x1(%rbp)
jmp    119c <drawLine+0x7c>
movb   $0x0,-0x1(%rbp)
movzbl -0x1(%rbp),%eax
cmp    $0x6,%eax
jge    120b <drawLine+0xeb>
xor    %edi,%edi
movzbl -0x1(%rbp),%esi
call   1040 <gotoXY@plt>
mov    $0x1,%edi
mov    $0xff,%esi
call   1030 <LcdWrite@plt>
mov    -0x1(%rbp),%al
add    $0x1,%al
mov    %al,-0x1(%rbp)
jmp    11d7 <drawLine+0xb7>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<drawLine>:
push   %rbx
xor    %ebx,%ebx
cs nopw 0x0(%rax,%rax,1)
nopl   (%rax)
mov    %ebx,%edi
xor    %esi,%esi
call   1040 <gotoXY@plt>
mov    $0x1,%edi
mov    $0x1,%esi
call   1030 <LcdWrite@plt>
add    $0x1,%ebx
cmp    $0x54,%ebx
jne    1130 <drawLine+0x10>
xor    %ebx,%ebx
cs nopw 0x0(%rax,%rax,1)
nopl   0x0(%rax)
mov    %ebx,%edi
mov    $0x5,%esi
call   1040 <gotoXY@plt>
mov    $0x1,%edi
mov    $0x80,%esi
call   1030 <LcdWrite@plt>
add    $0x1,%ebx
cmp    $0x54,%ebx
jne    1160 <drawLine+0x40>
mov    $0x53,%edi
xor    %esi,%esi
call   1040 <gotoXY@plt>
mov    $0x1,%edi
mov    $0xff,%esi
call   1030 <LcdWrite@plt>
mov    $0x53,%edi
mov    $0x1,%esi
call   1040 <gotoXY@plt>
mov    $0x1,%edi
mov    $0xff,%esi
call   1030 <LcdWrite@plt>
mov    $0x53,%edi
mov    $0x2,%esi
call   1040 <gotoXY@plt>
mov    $0x1,%edi
mov    $0xff,%esi
call   1030 <LcdWrite@plt>
mov    $0x53,%edi
mov    $0x3,%esi
call   1040 <gotoXY@plt>
mov    $0x1,%edi
mov    $0xff,%esi
call   1030 <LcdWrite@plt>
mov    $0x53,%edi
mov    $0x4,%esi
call   1040 <gotoXY@plt>
mov    $0x1,%edi
mov    $0xff,%esi
call   1030 <LcdWrite@plt>
mov    $0x53,%edi
mov    $0x5,%esi
call   1040 <gotoXY@plt>
mov    $0x1,%edi
mov    $0xff,%esi
call   1030 <LcdWrite@plt>
xor    %edi,%edi
xor    %esi,%esi
call   1040 <gotoXY@plt>
mov    $0x1,%edi
mov    $0xff,%esi
call   1030 <LcdWrite@plt>
xor    %edi,%edi
mov    $0x1,%esi
call   1040 <gotoXY@plt>
mov    $0x1,%edi
mov    $0xff,%esi
call   1030 <LcdWrite@plt>
xor    %edi,%edi
mov    $0x2,%esi
call   1040 <gotoXY@plt>
mov    $0x1,%edi
mov    $0xff,%esi
call   1030 <LcdWrite@plt>
xor    %edi,%edi
mov    $0x3,%esi
call   1040 <gotoXY@plt>
mov    $0x1,%edi
mov    $0xff,%esi
call   1030 <LcdWrite@plt>
xor    %edi,%edi
mov    $0x4,%esi
call   1040 <gotoXY@plt>
mov    $0x1,%edi
mov    $0xff,%esi
call   1030 <LcdWrite@plt>
xor    %edi,%edi
mov    $0x5,%esi
call   1040 <gotoXY@plt>
mov    $0x1,%edi
mov    $0xff,%esi
pop    %rbx
jmp    1030 <LcdWrite@plt>

LLVM IR (-O0):
define void @drawLine() {
%1 = alloca i8
store i8 0, i8* %1
br label %2
2: ; preds = %11, %0
%3 = load i8, i8* %1
%4 = zext i8 %3 to i32
%5 = icmp slt i32 %4, 84
br i1 %5, label %6, label %14
6: ; preds = %2
%7 = load i8, i8* %1
%8 = zext i8 %7 to i32
%9 = call i32 @gotoXY(i32 %8, i8 zeroext 0)
%10 = call i32 @LcdWrite(i32 1, i32 1)
br label %11
11: ; preds = %6
%12 = load i8, i8* %1
%13 = add i8 %12, 1
store i8 %13, i8* %1
br label %2
14: ; preds = %2
store i8 0, i8* %1
br label %15
15: ; preds = %24, %14
%16 = load i8, i8* %1
%17 = zext i8 %16 to i32
%18 = icmp slt i32 %17, 84
br i1 %18, label %19, label %27
19: ; preds = %15
%20 = load i8, i8* %1
%21 = zext i8 %20 to i32
%22 = call i32 @gotoXY(i32 %21, i8 zeroext 5)
%23 = call i32 @LcdWrite(i32 1, i32 128)
br label %24
24: ; preds = %19
%25 = load i8, i8* %1
%26 = add i8 %25, 1
store i8 %26, i8* %1
br label %15
27: ; preds = %15
store i8 0, i8* %1
br label %28
28: ; preds = %36, %27
%29 = load i8, i8* %1
%30 = zext i8 %29 to i32
%31 = icmp slt i32 %30, 6
br i1 %31, label %32, label %39
32: ; preds = %28
%33 = load i8, i8* %1
%34 = call i32 @gotoXY(i32 83, i8 zeroext %33)
%35 = call i32 @LcdWrite(i32 1, i32 255)
br label %36
36: ; preds = %32
%37 = load i8, i8* %1
%38 = add i8 %37, 1
store i8 %38, i8* %1
br label %28
39: ; preds = %28
store i8 0, i8* %1
br label %40
40: ; preds = %48, %39
%41 = load i8, i8* %1
%42 = zext i8 %41 to i32
%43 = icmp slt i32 %42, 6
br i1 %43, label %44, label %51
44: ; preds = %40
%45 = load i8, i8* %1
%46 = call i32 @gotoXY(i32 0, i8 zeroext %45)
%47 = call i32 @LcdWrite(i32 1, i32 255)
br label %48
48: ; preds = %44
%49 = load i8, i8* %1
%50 = add i8 %49, 1
store i8 %50, i8* %1
br label %40
51: ; preds = %40
ret void
}

LLVM IR (-O2):
define void @drawLine() {
br label %1
1: ; preds = %0, %1
%2 = phi i32 [ 0, %0 ], [ %5, %1 ]
%3 = tail call i32 @gotoXY(i32 %2, i8 zeroext 0)
%4 = tail call i32 @LcdWrite(i32 1, i32 1)
%5 = add nuw nsw i32 %2, 1
%6 = icmp eq i32 %5, 84
br i1 %6, label %7, label %1
7: ; preds = %1, %7
%8 = phi i32 [ %11, %7 ], [ 0, %1 ]
%9 = tail call i32 @gotoXY(i32 %8, i8 zeroext 5)
%10 = tail call i32 @LcdWrite(i32 1, i32 128)
%11 = add nuw nsw i32 %8, 1
%12 = icmp eq i32 %11, 84
br i1 %12, label %13, label %7
13: ; preds = %7
%14 = tail call i32 @gotoXY(i32 83, i8 zeroext 0)
%15 = tail call i32 @LcdWrite(i32 1, i32 255)
%16 = tail call i32 @gotoXY(i32 83, i8 zeroext 1)
%17 = tail call i32 @LcdWrite(i32 1, i32 255)
%18 = tail call i32 @gotoXY(i32 83, i8 zeroext 2)
%19 = tail call i32 @LcdWrite(i32 1, i32 255)
%20 = tail call i32 @gotoXY(i32 83, i8 zeroext 3)
%21 = tail call i32 @LcdWrite(i32 1, i32 255)
%22 = tail call i32 @gotoXY(i32 83, i8 zeroext 4)
%23 = tail call i32 @LcdWrite(i32 1, i32 255)
%24 = tail call i32 @gotoXY(i32 83, i8 zeroext 5)
%25 = tail call i32 @LcdWrite(i32 1, i32 255)
%26 = tail call i32 @gotoXY(i32 0, i8 zeroext 0)
%27 = tail call i32 @LcdWrite(i32 1, i32 255)
%28 = tail call i32 @gotoXY(i32 0, i8 zeroext 1)
%29 = tail call i32 @LcdWrite(i32 1, i32 255)
%30 = tail call i32 @gotoXY(i32 0, i8 zeroext 2)
%31 = tail call i32 @LcdWrite(i32 1, i32 255)
%32 = tail call i32 @gotoXY(i32 0, i8 zeroext 3)
%33 = tail call i32 @LcdWrite(i32 1, i32 255)
%34 = tail call i32 @gotoXY(i32 0, i8 zeroext 4)
%35 = tail call i32 @LcdWrite(i32 1, i32 255)
%36 = tail call i32 @gotoXY(i32 0, i8 zeroext 5)
%37 = tail call i32 @LcdWrite(i32 1, i32 255)
ret void
}