#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*/ GLCD_GoTo(int /*<<< orphan*/, unsigned char);
int /*<<< orphan*/ GLCD_WriteData(int);
void GLCD_ClearScreen(void) {
  unsigned char i, j;
  for (j = 0; j < 64 / 8; j++) {
    GLCD_GoTo(0, j);
    for (i = 0; i < 128; i++)
      GLCD_WriteData(0x00);
  }
}


x86 assembly (clang, -O0):
<GLCD_ClearScreen>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movb   $0x0,-0x2(%rbp)
movzbl -0x2(%rbp),%eax
cmp    $0x8,%eax
jge    117d <GLCD_ClearScreen+0x5d>
xor    %edi,%edi
movzbl -0x2(%rbp),%esi
call   1030 <GLCD_GoTo@plt>
movb   $0x0,-0x1(%rbp)
movzbl -0x1(%rbp),%eax
cmp    $0x80,%eax
jge    116b <GLCD_ClearScreen+0x4b>
xor    %edi,%edi
call   1040 <GLCD_WriteData@plt>
mov    -0x1(%rbp),%al
add    $0x1,%al
mov    %al,-0x1(%rbp)
jmp    1148 <GLCD_ClearScreen+0x28>
jmp    1170 <GLCD_ClearScreen+0x50>
mov    -0x2(%rbp),%al
add    $0x1,%al
mov    %al,-0x2(%rbp)
jmp    112c <GLCD_ClearScreen+0xc>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<GLCD_ClearScreen>:
push   %rbx
xor    %edi,%edi
xor    %esi,%esi
call   1030 <GLCD_GoTo@plt>
mov    $0x80,%bl
nopl   0x0(%rax)
xor    %edi,%edi
call   1040 <GLCD_WriteData@plt>
add    $0xff,%bl
jne    1130 <GLCD_ClearScreen+0x10>
xor    %edi,%edi
mov    $0x1,%esi
call   1030 <GLCD_GoTo@plt>
mov    $0x80,%bl
nopw   0x0(%rax,%rax,1)
xor    %edi,%edi
call   1040 <GLCD_WriteData@plt>
add    $0xff,%bl
jne    1150 <GLCD_ClearScreen+0x30>
xor    %edi,%edi
mov    $0x2,%esi
call   1030 <GLCD_GoTo@plt>
mov    $0x80,%bl
nopw   0x0(%rax,%rax,1)
xor    %edi,%edi
call   1040 <GLCD_WriteData@plt>
add    $0xff,%bl
jne    1170 <GLCD_ClearScreen+0x50>
xor    %edi,%edi
mov    $0x3,%esi
call   1030 <GLCD_GoTo@plt>
mov    $0x80,%bl
nopw   0x0(%rax,%rax,1)
xor    %edi,%edi
call   1040 <GLCD_WriteData@plt>
add    $0xff,%bl
jne    1190 <GLCD_ClearScreen+0x70>
xor    %edi,%edi
mov    $0x4,%esi
call   1030 <GLCD_GoTo@plt>
mov    $0x80,%bl
nopw   0x0(%rax,%rax,1)
xor    %edi,%edi
call   1040 <GLCD_WriteData@plt>
add    $0xff,%bl
jne    11b0 <GLCD_ClearScreen+0x90>
xor    %edi,%edi
mov    $0x5,%esi
call   1030 <GLCD_GoTo@plt>
mov    $0x80,%bl
nopw   0x0(%rax,%rax,1)
xor    %edi,%edi
call   1040 <GLCD_WriteData@plt>
add    $0xff,%bl
jne    11d0 <GLCD_ClearScreen+0xb0>
xor    %edi,%edi
mov    $0x6,%esi
call   1030 <GLCD_GoTo@plt>
mov    $0x80,%bl
nopw   0x0(%rax,%rax,1)
xor    %edi,%edi
call   1040 <GLCD_WriteData@plt>
add    $0xff,%bl
jne    11f0 <GLCD_ClearScreen+0xd0>
xor    %edi,%edi
mov    $0x7,%esi
call   1030 <GLCD_GoTo@plt>
mov    $0x80,%bl
nopw   0x0(%rax,%rax,1)
xor    %edi,%edi
call   1040 <GLCD_WriteData@plt>
add    $0xff,%bl
jne    1210 <GLCD_ClearScreen+0xf0>
pop    %rbx
ret

LLVM IR (-O0):
define void @GLCD_ClearScreen() {
%1 = alloca i8
%2 = alloca i8
store i8 0, i8* %2
br label %3
3: ; preds = %20, %0
%4 = load i8, i8* %2
%5 = zext i8 %4 to i32
%6 = icmp slt i32 %5, 8
br i1 %6, label %7, label %23
7: ; preds = %3
%8 = load i8, i8* %2
%9 = call i32 @GLCD_GoTo(i32 0, i8 zeroext %8)
store i8 0, i8* %1
br label %10
10: ; preds = %16, %7
%11 = load i8, i8* %1
%12 = zext i8 %11 to i32
%13 = icmp slt i32 %12, 128
br i1 %13, label %14, label %19
14: ; preds = %10
%15 = call i32 @GLCD_WriteData(i32 0)
br label %16
16: ; preds = %14
%17 = load i8, i8* %1
%18 = add i8 %17, 1
store i8 %18, i8* %1
br label %10
19: ; preds = %10
br label %20
20: ; preds = %19
%21 = load i8, i8* %2
%22 = add i8 %21, 1
store i8 %22, i8* %2
br label %3
23: ; preds = %3
ret void
}

LLVM IR (-O2):
define void @GLCD_ClearScreen() {
%1 = tail call i32 @GLCD_GoTo(i32 0, i8 zeroext 0)
br label %2
2: ; preds = %0, %2
%3 = phi i8 [ 0, %0 ], [ %5, %2 ]
%4 = tail call i32 @GLCD_WriteData(i32 0)
%5 = add nuw i8 %3, 1
%6 = icmp eq i8 %5, -128
br i1 %6, label %7, label %2
7: ; preds = %2
%8 = tail call i32 @GLCD_GoTo(i32 0, i8 zeroext 1)
br label %9
9: ; preds = %9, %7
%10 = phi i8 [ 0, %7 ], [ %12, %9 ]
%11 = tail call i32 @GLCD_WriteData(i32 0)
%12 = add nuw i8 %10, 1
%13 = icmp eq i8 %12, -128
br i1 %13, label %14, label %9
14: ; preds = %9
%15 = tail call i32 @GLCD_GoTo(i32 0, i8 zeroext 2)
br label %16
16: ; preds = %16, %14
%17 = phi i8 [ 0, %14 ], [ %19, %16 ]
%18 = tail call i32 @GLCD_WriteData(i32 0)
%19 = add nuw i8 %17, 1
%20 = icmp eq i8 %19, -128
br i1 %20, label %21, label %16
21: ; preds = %16
%22 = tail call i32 @GLCD_GoTo(i32 0, i8 zeroext 3)
br label %23
23: ; preds = %23, %21
%24 = phi i8 [ 0, %21 ], [ %26, %23 ]
%25 = tail call i32 @GLCD_WriteData(i32 0)
%26 = add nuw i8 %24, 1
%27 = icmp eq i8 %26, -128
br i1 %27, label %28, label %23
28: ; preds = %23
%29 = tail call i32 @GLCD_GoTo(i32 0, i8 zeroext 4)
br label %30
30: ; preds = %30, %28
%31 = phi i8 [ 0, %28 ], [ %33, %30 ]
%32 = tail call i32 @GLCD_WriteData(i32 0)
%33 = add nuw i8 %31, 1
%34 = icmp eq i8 %33, -128
br i1 %34, label %35, label %30
35: ; preds = %30
%36 = tail call i32 @GLCD_GoTo(i32 0, i8 zeroext 5)
br label %37
37: ; preds = %37, %35
%38 = phi i8 [ 0, %35 ], [ %40, %37 ]
%39 = tail call i32 @GLCD_WriteData(i32 0)
%40 = add nuw i8 %38, 1
%41 = icmp eq i8 %40, -128
br i1 %41, label %42, label %37
42: ; preds = %37
%43 = tail call i32 @GLCD_GoTo(i32 0, i8 zeroext 6)
br label %44
44: ; preds = %44, %42
%45 = phi i8 [ 0, %42 ], [ %47, %44 ]
%46 = tail call i32 @GLCD_WriteData(i32 0)
%47 = add nuw i8 %45, 1
%48 = icmp eq i8 %47, -128
br i1 %48, label %49, label %44
49: ; preds = %44
%50 = tail call i32 @GLCD_GoTo(i32 0, i8 zeroext 7)
br label %51
51: ; preds = %51, %49
%52 = phi i8 [ 0, %49 ], [ %54, %51 ]
%53 = tail call i32 @GLCD_WriteData(i32 0)
%54 = add nuw i8 %52, 1
%55 = icmp eq i8 %54, -128
br i1 %55, label %56, label %51
56: ; preds = %51
ret void
}