#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*/ __delay_ms(int);
int /*<<< orphan*/ lcdClear();
int /*<<< orphan*/ lcdSetPos(int, int);
int /*<<< orphan*/ lcdWriteChar(char);
void lcdClean() {
  int i;
  for (i = 0; i < 16; i++) {
    lcdSetPos(i, 0);
    lcdWriteChar('-');
    __delay_ms(20);
  }
  for (i = 0; i < 16; i++) {
    lcdSetPos(i, 0);
    lcdWriteChar(' ');
    lcdSetPos(16 - i, 1);
    lcdWriteChar('-');
    __delay_ms(20);
  }
  for (i = 0; i < 16; i++) {
    lcdSetPos(i, 1);
    lcdWriteChar(' ');
    __delay_ms(20);
  }
  lcdClear();
}


x86 assembly (clang, -O0):
<lcdClean>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
cmpl   $0x10,-0x4(%rbp)
jge    1185 <lcdClean+0x45>
mov    -0x4(%rbp),%edi
xor    %esi,%esi
call   1040 <lcdSetPos@plt>
mov    $0x2d,%edi
call   1060 <lcdWriteChar@plt>
mov    $0x14,%edi
call   1030 <__delay_ms@plt>
mov    -0x4(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x4(%rbp)
jmp    114f <lcdClean+0xf>
movl   $0x0,-0x4(%rbp)
cmpl   $0x10,-0x4(%rbp)
jge    11de <lcdClean+0x9e>
mov    -0x4(%rbp),%edi
xor    %esi,%esi
call   1040 <lcdSetPos@plt>
mov    $0x20,%edi
call   1060 <lcdWriteChar@plt>
mov    $0x10,%edi
sub    -0x4(%rbp),%edi
mov    $0x1,%esi
call   1040 <lcdSetPos@plt>
mov    $0x2d,%edi
call   1060 <lcdWriteChar@plt>
mov    $0x14,%edi
call   1030 <__delay_ms@plt>
mov    -0x4(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x4(%rbp)
jmp    118c <lcdClean+0x4c>
movl   $0x0,-0x4(%rbp)
cmpl   $0x10,-0x4(%rbp)
jge    121e <lcdClean+0xde>
mov    -0x4(%rbp),%edi
mov    $0x1,%esi
call   1040 <lcdSetPos@plt>
mov    $0x20,%edi
call   1060 <lcdWriteChar@plt>
mov    $0x14,%edi
call   1030 <__delay_ms@plt>
mov    -0x4(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x4(%rbp)
jmp    11e5 <lcdClean+0xa5>
mov    $0x0,%al
call   1050 <lcdClear@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<lcdClean>:
push   %rbp
push   %rbx
push   %rax
xor    %ebx,%ebx
xor    %edi,%edi
xor    %esi,%esi
call   1040 <lcdSetPos@plt>
mov    $0x2d,%edi
call   1060 <lcdWriteChar@plt>
mov    $0x14,%edi
call   1030 <__delay_ms@plt>
mov    $0x1,%edi
xor    %esi,%esi
call   1040 <lcdSetPos@plt>
mov    $0x2d,%edi
call   1060 <lcdWriteChar@plt>
mov    $0x14,%edi
call   1030 <__delay_ms@plt>
mov    $0x2,%edi
xor    %esi,%esi
call   1040 <lcdSetPos@plt>
mov    $0x2d,%edi
call   1060 <lcdWriteChar@plt>
mov    $0x14,%edi
call   1030 <__delay_ms@plt>
mov    $0x3,%edi
xor    %esi,%esi
call   1040 <lcdSetPos@plt>
mov    $0x2d,%edi
call   1060 <lcdWriteChar@plt>
mov    $0x14,%edi
call   1030 <__delay_ms@plt>
mov    $0x4,%edi
xor    %esi,%esi
call   1040 <lcdSetPos@plt>
mov    $0x2d,%edi
call   1060 <lcdWriteChar@plt>
mov    $0x14,%edi
call   1030 <__delay_ms@plt>
mov    $0x5,%edi
xor    %esi,%esi
call   1040 <lcdSetPos@plt>
mov    $0x2d,%edi
call   1060 <lcdWriteChar@plt>
mov    $0x14,%edi
call   1030 <__delay_ms@plt>
mov    $0x6,%edi
xor    %esi,%esi
call   1040 <lcdSetPos@plt>
mov    $0x2d,%edi
call   1060 <lcdWriteChar@plt>
mov    $0x14,%edi
call   1030 <__delay_ms@plt>
mov    $0x7,%edi
xor    %esi,%esi
call   1040 <lcdSetPos@plt>
mov    $0x2d,%edi
call   1060 <lcdWriteChar@plt>
mov    $0x14,%edi
call   1030 <__delay_ms@plt>
mov    $0x8,%edi
xor    %esi,%esi
call   1040 <lcdSetPos@plt>
mov    $0x2d,%edi
call   1060 <lcdWriteChar@plt>
mov    $0x14,%edi
call   1030 <__delay_ms@plt>
mov    $0x9,%edi
xor    %esi,%esi
call   1040 <lcdSetPos@plt>
mov    $0x2d,%edi
call   1060 <lcdWriteChar@plt>
mov    $0x14,%edi
call   1030 <__delay_ms@plt>
mov    $0xa,%edi
xor    %esi,%esi
call   1040 <lcdSetPos@plt>
mov    $0x2d,%edi
call   1060 <lcdWriteChar@plt>
mov    $0x14,%edi
call   1030 <__delay_ms@plt>
mov    $0xb,%edi
xor    %esi,%esi
call   1040 <lcdSetPos@plt>
mov    $0x2d,%edi
call   1060 <lcdWriteChar@plt>
mov    $0x14,%edi
call   1030 <__delay_ms@plt>
mov    $0xc,%edi
xor    %esi,%esi
call   1040 <lcdSetPos@plt>
mov    $0x2d,%edi
call   1060 <lcdWriteChar@plt>
mov    $0x14,%edi
call   1030 <__delay_ms@plt>
mov    $0xd,%edi
xor    %esi,%esi
call   1040 <lcdSetPos@plt>
mov    $0x2d,%edi
call   1060 <lcdWriteChar@plt>
mov    $0x14,%edi
call   1030 <__delay_ms@plt>
mov    $0xe,%edi
xor    %esi,%esi
call   1040 <lcdSetPos@plt>
mov    $0x2d,%edi
call   1060 <lcdWriteChar@plt>
mov    $0x14,%edi
call   1030 <__delay_ms@plt>
mov    $0xf,%edi
xor    %esi,%esi
call   1040 <lcdSetPos@plt>
mov    $0x2d,%edi
call   1060 <lcdWriteChar@plt>
mov    $0x14,%edi
call   1030 <__delay_ms@plt>
mov    $0x10,%ebp
nopw   0x0(%rax,%rax,1)
mov    %ebx,%edi
xor    %esi,%esi
call   1040 <lcdSetPos@plt>
mov    $0x20,%edi
call   1060 <lcdWriteChar@plt>
mov    %ebp,%edi
mov    $0x1,%esi
call   1040 <lcdSetPos@plt>
mov    $0x2d,%edi
call   1060 <lcdWriteChar@plt>
mov    $0x14,%edi
call   1030 <__delay_ms@plt>
add    $0x1,%ebx
add    $0xffffffff,%ebp
jne    1350 <lcdClean+0x210>
xor    %edi,%edi
mov    $0x1,%esi
call   1040 <lcdSetPos@plt>
mov    $0x20,%edi
call   1060 <lcdWriteChar@plt>
mov    $0x14,%edi
call   1030 <__delay_ms@plt>
mov    $0x1,%edi
mov    $0x1,%esi
call   1040 <lcdSetPos@plt>
mov    $0x20,%edi
call   1060 <lcdWriteChar@plt>
mov    $0x14,%edi
call   1030 <__delay_ms@plt>
mov    $0x2,%edi
mov    $0x1,%esi
call   1040 <lcdSetPos@plt>
mov    $0x20,%edi
call   1060 <lcdWriteChar@plt>
mov    $0x14,%edi
call   1030 <__delay_ms@plt>
mov    $0x3,%edi
mov    $0x1,%esi
call   1040 <lcdSetPos@plt>
mov    $0x20,%edi
call   1060 <lcdWriteChar@plt>
mov    $0x14,%edi
call   1030 <__delay_ms@plt>
mov    $0x4,%edi
mov    $0x1,%esi
call   1040 <lcdSetPos@plt>
mov    $0x20,%edi
call   1060 <lcdWriteChar@plt>
mov    $0x14,%edi
call   1030 <__delay_ms@plt>
mov    $0x5,%edi
mov    $0x1,%esi
call   1040 <lcdSetPos@plt>
mov    $0x20,%edi
call   1060 <lcdWriteChar@plt>
mov    $0x14,%edi
call   1030 <__delay_ms@plt>
mov    $0x6,%edi
mov    $0x1,%esi
call   1040 <lcdSetPos@plt>
mov    $0x20,%edi
call   1060 <lcdWriteChar@plt>
mov    $0x14,%edi
call   1030 <__delay_ms@plt>
mov    $0x7,%edi
mov    $0x1,%esi
call   1040 <lcdSetPos@plt>
mov    $0x20,%edi
call   1060 <lcdWriteChar@plt>
mov    $0x14,%edi
call   1030 <__delay_ms@plt>
mov    $0x8,%edi
mov    $0x1,%esi
call   1040 <lcdSetPos@plt>
mov    $0x20,%edi
call   1060 <lcdWriteChar@plt>
mov    $0x14,%edi
call   1030 <__delay_ms@plt>
mov    $0x9,%edi
mov    $0x1,%esi
call   1040 <lcdSetPos@plt>
mov    $0x20,%edi
call   1060 <lcdWriteChar@plt>
mov    $0x14,%edi
call   1030 <__delay_ms@plt>
mov    $0xa,%edi
mov    $0x1,%esi
call   1040 <lcdSetPos@plt>
mov    $0x20,%edi
call   1060 <lcdWriteChar@plt>
mov    $0x14,%edi
call   1030 <__delay_ms@plt>
mov    $0xb,%edi
mov    $0x1,%esi
call   1040 <lcdSetPos@plt>
mov    $0x20,%edi
call   1060 <lcdWriteChar@plt>
mov    $0x14,%edi
call   1030 <__delay_ms@plt>
mov    $0xc,%edi
mov    $0x1,%esi
call   1040 <lcdSetPos@plt>
mov    $0x20,%edi
call   1060 <lcdWriteChar@plt>
mov    $0x14,%edi
call   1030 <__delay_ms@plt>
mov    $0xd,%edi
mov    $0x1,%esi
call   1040 <lcdSetPos@plt>
mov    $0x20,%edi
call   1060 <lcdWriteChar@plt>
mov    $0x14,%edi
call   1030 <__delay_ms@plt>
mov    $0xe,%edi
mov    $0x1,%esi
call   1040 <lcdSetPos@plt>
mov    $0x20,%edi
call   1060 <lcdWriteChar@plt>
mov    $0x14,%edi
call   1030 <__delay_ms@plt>
mov    $0xf,%edi
mov    $0x1,%esi
call   1040 <lcdSetPos@plt>
mov    $0x20,%edi
call   1060 <lcdWriteChar@plt>
mov    $0x14,%edi
call   1030 <__delay_ms@plt>
xor    %eax,%eax
add    $0x8,%rsp
pop    %rbx
pop    %rbp
jmp    1050 <lcdClear@plt>

LLVM IR (-O0):
define void @lcdClean() {
%1 = alloca i32
store i32 0, i32* %1
br label %2
2: ; preds = %10, %0
%3 = load i32, i32* %1
%4 = icmp slt i32 %3, 16
br i1 %4, label %5, label %13
5: ; preds = %2
%6 = load i32, i32* %1
%7 = call i32 @lcdSetPos(i32 %6, i32 0)
%8 = call i32 @lcdWriteChar(i8 signext 45)
%9 = call i32 @__delay_ms(i32 20)
br label %10
10: ; preds = %5
%11 = load i32, i32* %1
%12 = add nsw i32 %11, 1
store i32 %12, i32* %1
br label %2
13: ; preds = %2
store i32 0, i32* %1
br label %14
14: ; preds = %26, %13
%15 = load i32, i32* %1
%16 = icmp slt i32 %15, 16
br i1 %16, label %17, label %29
17: ; preds = %14
%18 = load i32, i32* %1
%19 = call i32 @lcdSetPos(i32 %18, i32 0)
%20 = call i32 @lcdWriteChar(i8 signext 32)
%21 = load i32, i32* %1
%22 = sub nsw i32 16, %21
%23 = call i32 @lcdSetPos(i32 %22, i32 1)
%24 = call i32 @lcdWriteChar(i8 signext 45)
%25 = call i32 @__delay_ms(i32 20)
br label %26
26: ; preds = %17
%27 = load i32, i32* %1
%28 = add nsw i32 %27, 1
store i32 %28, i32* %1
br label %14
29: ; preds = %14
store i32 0, i32* %1
br label %30
30: ; preds = %38, %29
%31 = load i32, i32* %1
%32 = icmp slt i32 %31, 16
br i1 %32, label %33, label %41
33: ; preds = %30
%34 = load i32, i32* %1
%35 = call i32 @lcdSetPos(i32 %34, i32 1)
%36 = call i32 @lcdWriteChar(i8 signext 32)
%37 = call i32 @__delay_ms(i32 20)
br label %38
38: ; preds = %33
%39 = load i32, i32* %1
%40 = add nsw i32 %39, 1
store i32 %40, i32* %1
br label %30
41: ; preds = %30
%42 = call i32 (...) @lcdClear()
ret void
}

LLVM IR (-O2):
define void @lcdClean() {
%1 = tail call i32 @lcdSetPos(i32 0, i32 0)
%2 = tail call i32 @lcdWriteChar(i8 signext 45)
%3 = tail call i32 @__delay_ms(i32 20)
%4 = tail call i32 @lcdSetPos(i32 1, i32 0)
%5 = tail call i32 @lcdWriteChar(i8 signext 45)
%6 = tail call i32 @__delay_ms(i32 20)
%7 = tail call i32 @lcdSetPos(i32 2, i32 0)
%8 = tail call i32 @lcdWriteChar(i8 signext 45)
%9 = tail call i32 @__delay_ms(i32 20)
%10 = tail call i32 @lcdSetPos(i32 3, i32 0)
%11 = tail call i32 @lcdWriteChar(i8 signext 45)
%12 = tail call i32 @__delay_ms(i32 20)
%13 = tail call i32 @lcdSetPos(i32 4, i32 0)
%14 = tail call i32 @lcdWriteChar(i8 signext 45)
%15 = tail call i32 @__delay_ms(i32 20)
%16 = tail call i32 @lcdSetPos(i32 5, i32 0)
%17 = tail call i32 @lcdWriteChar(i8 signext 45)
%18 = tail call i32 @__delay_ms(i32 20)
%19 = tail call i32 @lcdSetPos(i32 6, i32 0)
%20 = tail call i32 @lcdWriteChar(i8 signext 45)
%21 = tail call i32 @__delay_ms(i32 20)
%22 = tail call i32 @lcdSetPos(i32 7, i32 0)
%23 = tail call i32 @lcdWriteChar(i8 signext 45)
%24 = tail call i32 @__delay_ms(i32 20)
%25 = tail call i32 @lcdSetPos(i32 8, i32 0)
%26 = tail call i32 @lcdWriteChar(i8 signext 45)
%27 = tail call i32 @__delay_ms(i32 20)
%28 = tail call i32 @lcdSetPos(i32 9, i32 0)
%29 = tail call i32 @lcdWriteChar(i8 signext 45)
%30 = tail call i32 @__delay_ms(i32 20)
%31 = tail call i32 @lcdSetPos(i32 10, i32 0)
%32 = tail call i32 @lcdWriteChar(i8 signext 45)
%33 = tail call i32 @__delay_ms(i32 20)
%34 = tail call i32 @lcdSetPos(i32 11, i32 0)
%35 = tail call i32 @lcdWriteChar(i8 signext 45)
%36 = tail call i32 @__delay_ms(i32 20)
%37 = tail call i32 @lcdSetPos(i32 12, i32 0)
%38 = tail call i32 @lcdWriteChar(i8 signext 45)
%39 = tail call i32 @__delay_ms(i32 20)
%40 = tail call i32 @lcdSetPos(i32 13, i32 0)
%41 = tail call i32 @lcdWriteChar(i8 signext 45)
%42 = tail call i32 @__delay_ms(i32 20)
%43 = tail call i32 @lcdSetPos(i32 14, i32 0)
%44 = tail call i32 @lcdWriteChar(i8 signext 45)
%45 = tail call i32 @__delay_ms(i32 20)
%46 = tail call i32 @lcdSetPos(i32 15, i32 0)
%47 = tail call i32 @lcdWriteChar(i8 signext 45)
%48 = tail call i32 @__delay_ms(i32 20)
br label %49
49: ; preds = %0, %49
%50 = phi i32 [ %57, %49 ], [ 0, %0 ]
%51 = tail call i32 @lcdSetPos(i32 %50, i32 0)
%52 = tail call i32 @lcdWriteChar(i8 signext 32)
%53 = sub nuw nsw i32 16, %50
%54 = tail call i32 @lcdSetPos(i32 %53, i32 1)
%55 = tail call i32 @lcdWriteChar(i8 signext 45)
%56 = tail call i32 @__delay_ms(i32 20)
%57 = add nuw nsw i32 %50, 1
%58 = icmp eq i32 %57, 16
br i1 %58, label %59, label %49
59: ; preds = %49
%60 = tail call i32 @lcdSetPos(i32 0, i32 1)
%61 = tail call i32 @lcdWriteChar(i8 signext 32)
%62 = tail call i32 @__delay_ms(i32 20)
%63 = tail call i32 @lcdSetPos(i32 1, i32 1)
%64 = tail call i32 @lcdWriteChar(i8 signext 32)
%65 = tail call i32 @__delay_ms(i32 20)
%66 = tail call i32 @lcdSetPos(i32 2, i32 1)
%67 = tail call i32 @lcdWriteChar(i8 signext 32)
%68 = tail call i32 @__delay_ms(i32 20)
%69 = tail call i32 @lcdSetPos(i32 3, i32 1)
%70 = tail call i32 @lcdWriteChar(i8 signext 32)
%71 = tail call i32 @__delay_ms(i32 20)
%72 = tail call i32 @lcdSetPos(i32 4, i32 1)
%73 = tail call i32 @lcdWriteChar(i8 signext 32)
%74 = tail call i32 @__delay_ms(i32 20)
%75 = tail call i32 @lcdSetPos(i32 5, i32 1)
%76 = tail call i32 @lcdWriteChar(i8 signext 32)
%77 = tail call i32 @__delay_ms(i32 20)
%78 = tail call i32 @lcdSetPos(i32 6, i32 1)
%79 = tail call i32 @lcdWriteChar(i8 signext 32)
%80 = tail call i32 @__delay_ms(i32 20)
%81 = tail call i32 @lcdSetPos(i32 7, i32 1)
%82 = tail call i32 @lcdWriteChar(i8 signext 32)
%83 = tail call i32 @__delay_ms(i32 20)
%84 = tail call i32 @lcdSetPos(i32 8, i32 1)
%85 = tail call i32 @lcdWriteChar(i8 signext 32)
%86 = tail call i32 @__delay_ms(i32 20)
%87 = tail call i32 @lcdSetPos(i32 9, i32 1)
%88 = tail call i32 @lcdWriteChar(i8 signext 32)
%89 = tail call i32 @__delay_ms(i32 20)
%90 = tail call i32 @lcdSetPos(i32 10, i32 1)
%91 = tail call i32 @lcdWriteChar(i8 signext 32)
%92 = tail call i32 @__delay_ms(i32 20)
%93 = tail call i32 @lcdSetPos(i32 11, i32 1)
%94 = tail call i32 @lcdWriteChar(i8 signext 32)
%95 = tail call i32 @__delay_ms(i32 20)
%96 = tail call i32 @lcdSetPos(i32 12, i32 1)
%97 = tail call i32 @lcdWriteChar(i8 signext 32)
%98 = tail call i32 @__delay_ms(i32 20)
%99 = tail call i32 @lcdSetPos(i32 13, i32 1)
%100 = tail call i32 @lcdWriteChar(i8 signext 32)
%101 = tail call i32 @__delay_ms(i32 20)
%102 = tail call i32 @lcdSetPos(i32 14, i32 1)
%103 = tail call i32 @lcdWriteChar(i8 signext 32)
%104 = tail call i32 @__delay_ms(i32 20)
%105 = tail call i32 @lcdSetPos(i32 15, i32 1)
%106 = tail call i32 @lcdWriteChar(i8 signext 32)
%107 = tail call i32 @__delay_ms(i32 20)
%108 = tail call i32 (...) @lcdClear()
ret void
}