#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*/ LCDHex_Write(int, int);
int /*<<< orphan*/ ms_sleep(int);
int /*<<< orphan*/ setGUILed(int, int);
int main() {
  int i;
  int j;
  j = 0;
  i = 0;
  for (i = 0; i < 6; i++)
    for (j = 0; j < 16; j++) {
      setGUILed(i, j);
      LCDHex_Write((i + 1), j);
      ms_sleep(300);
    }
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
movl   $0x0,-0xc(%rbp)
movl   $0x0,-0x8(%rbp)
movl   $0x0,-0x8(%rbp)
cmpl   $0x6,-0x8(%rbp)
jge    11b3 <main+0x83>
movl   $0x0,-0xc(%rbp)
cmpl   $0x10,-0xc(%rbp)
jge    11a0 <main+0x70>
mov    -0x8(%rbp),%edi
mov    -0xc(%rbp),%esi
call   1050 <setGUILed@plt>
mov    -0x8(%rbp),%edi
add    $0x1,%edi
mov    -0xc(%rbp),%esi
call   1030 <LCDHex_Write@plt>
mov    $0x12c,%edi
call   1040 <ms_sleep@plt>
mov    -0xc(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0xc(%rbp)
jmp    1165 <main+0x35>
jmp    11a5 <main+0x75>
mov    -0x8(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x8(%rbp)
jmp    1154 <main+0x24>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbp
push   %rbx
push   %rax
xor    %ebx,%ebx
cs nopw 0x0(%rax,%rax,1)
nop
mov    %ebx,%edi
xor    %esi,%esi
call   1050 <setGUILed@plt>
lea    0x1(%rbx),%ebp
mov    %ebp,%edi
xor    %esi,%esi
call   1030 <LCDHex_Write@plt>
mov    $0x12c,%edi
call   1040 <ms_sleep@plt>
mov    %ebx,%edi
mov    $0x1,%esi
call   1050 <setGUILed@plt>
mov    %ebp,%edi
mov    $0x1,%esi
call   1030 <LCDHex_Write@plt>
mov    $0x12c,%edi
call   1040 <ms_sleep@plt>
mov    %ebx,%edi
mov    $0x2,%esi
call   1050 <setGUILed@plt>
mov    %ebp,%edi
mov    $0x2,%esi
call   1030 <LCDHex_Write@plt>
mov    $0x12c,%edi
call   1040 <ms_sleep@plt>
mov    %ebx,%edi
mov    $0x3,%esi
call   1050 <setGUILed@plt>
mov    %ebp,%edi
mov    $0x3,%esi
call   1030 <LCDHex_Write@plt>
mov    $0x12c,%edi
call   1040 <ms_sleep@plt>
mov    %ebx,%edi
mov    $0x4,%esi
call   1050 <setGUILed@plt>
mov    %ebp,%edi
mov    $0x4,%esi
call   1030 <LCDHex_Write@plt>
mov    $0x12c,%edi
call   1040 <ms_sleep@plt>
mov    %ebx,%edi
mov    $0x5,%esi
call   1050 <setGUILed@plt>
mov    %ebp,%edi
mov    $0x5,%esi
call   1030 <LCDHex_Write@plt>
mov    $0x12c,%edi
call   1040 <ms_sleep@plt>
mov    %ebx,%edi
mov    $0x6,%esi
call   1050 <setGUILed@plt>
mov    %ebp,%edi
mov    $0x6,%esi
call   1030 <LCDHex_Write@plt>
mov    $0x12c,%edi
call   1040 <ms_sleep@plt>
mov    %ebx,%edi
mov    $0x7,%esi
call   1050 <setGUILed@plt>
mov    %ebp,%edi
mov    $0x7,%esi
call   1030 <LCDHex_Write@plt>
mov    $0x12c,%edi
call   1040 <ms_sleep@plt>
mov    %ebx,%edi
mov    $0x8,%esi
call   1050 <setGUILed@plt>
mov    %ebp,%edi
mov    $0x8,%esi
call   1030 <LCDHex_Write@plt>
mov    $0x12c,%edi
call   1040 <ms_sleep@plt>
mov    %ebx,%edi
mov    $0x9,%esi
call   1050 <setGUILed@plt>
mov    %ebp,%edi
mov    $0x9,%esi
call   1030 <LCDHex_Write@plt>
mov    $0x12c,%edi
call   1040 <ms_sleep@plt>
mov    %ebx,%edi
mov    $0xa,%esi
call   1050 <setGUILed@plt>
mov    %ebp,%edi
mov    $0xa,%esi
call   1030 <LCDHex_Write@plt>
mov    $0x12c,%edi
call   1040 <ms_sleep@plt>
mov    %ebx,%edi
mov    $0xb,%esi
call   1050 <setGUILed@plt>
mov    %ebp,%edi
mov    $0xb,%esi
call   1030 <LCDHex_Write@plt>
mov    $0x12c,%edi
call   1040 <ms_sleep@plt>
mov    %ebx,%edi
mov    $0xc,%esi
call   1050 <setGUILed@plt>
mov    %ebp,%edi
mov    $0xc,%esi
call   1030 <LCDHex_Write@plt>
mov    $0x12c,%edi
call   1040 <ms_sleep@plt>
mov    %ebx,%edi
mov    $0xd,%esi
call   1050 <setGUILed@plt>
mov    %ebp,%edi
mov    $0xd,%esi
call   1030 <LCDHex_Write@plt>
mov    $0x12c,%edi
call   1040 <ms_sleep@plt>
mov    %ebx,%edi
mov    $0xe,%esi
call   1050 <setGUILed@plt>
mov    %ebp,%edi
mov    $0xe,%esi
call   1030 <LCDHex_Write@plt>
mov    $0x12c,%edi
call   1040 <ms_sleep@plt>
mov    %ebx,%edi
mov    $0xf,%esi
call   1050 <setGUILed@plt>
mov    %ebp,%edi
mov    $0xf,%esi
call   1030 <LCDHex_Write@plt>
mov    $0x12c,%edi
call   1040 <ms_sleep@plt>
mov    %ebp,%ebx
cmp    $0x6,%ebp
jne    1140 <main+0x10>
xor    %eax,%eax
add    $0x8,%rsp
pop    %rbx
pop    %rbp
ret

LLVM IR (-O0):
define i32 @main() {
%1 = alloca i32
%2 = alloca i32
%3 = alloca i32
store i32 0, i32* %1
store i32 0, i32* %3
store i32 0, i32* %2
store i32 0, i32* %2
br label %4
4: ; preds = %24, %0
%5 = load i32, i32* %2
%6 = icmp slt i32 %5, 6
br i1 %6, label %7, label %27
7: ; preds = %4
store i32 0, i32* %3
br label %8
8: ; preds = %20, %7
%9 = load i32, i32* %3
%10 = icmp slt i32 %9, 16
br i1 %10, label %11, label %23
11: ; preds = %8
%12 = load i32, i32* %2
%13 = load i32, i32* %3
%14 = call i32 @setGUILed(i32 %12, i32 %13)
%15 = load i32, i32* %2
%16 = add nsw i32 %15, 1
%17 = load i32, i32* %3
%18 = call i32 @LCDHex_Write(i32 %16, i32 %17)
%19 = call i32 @ms_sleep(i32 300)
br label %20
20: ; preds = %11
%21 = load i32, i32* %3
%22 = add nsw i32 %21, 1
store i32 %22, i32* %3
br label %8
23: ; preds = %8
br label %24
24: ; preds = %23
%25 = load i32, i32* %2
%26 = add nsw i32 %25, 1
store i32 %26, i32* %2
br label %4
27: ; preds = %4
ret i32 0
}

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