#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*/ tq2440_lcd_init();
int /*<<< orphan*/ tq2440_lcd_set_color(int, int, int);
int main(int argc, char *argv[]) {
  tq2440_lcd_init();
  for (int i = 0; i < 240; ++i) {
    for (int j = 0; j < 240; ++j) {
      tq2440_lcd_set_color(i, j, 255);
    }
  }
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
movl   $0x0,-0x4(%rbp)
mov    %edi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    $0x0,%al
call   1030 <tq2440_lcd_init@plt>
movl   $0x0,-0x14(%rbp)
cmpl   $0xf0,-0x14(%rbp)
jge    1196 <main+0x76>
movl   $0x0,-0x18(%rbp)
cmpl   $0xf0,-0x18(%rbp)
jge    1183 <main+0x63>
mov    -0x14(%rbp),%edi
mov    -0x18(%rbp),%esi
mov    $0xff,%edx
call   1040 <tq2440_lcd_set_color@plt>
mov    -0x18(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x18(%rbp)
jmp    1158 <main+0x38>
jmp    1188 <main+0x68>
mov    -0x14(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x14(%rbp)
jmp    1144 <main+0x24>
xor    %eax,%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbp
push   %rbx
push   %rax
xor    %ebx,%ebx
xor    %eax,%eax
call   1030 <tq2440_lcd_init@plt>
nopl   0x0(%rax)
xor    %ebp,%ebp
cs nopw 0x0(%rax,%rax,1)
nopl   0x0(%rax)
mov    %ebx,%edi
mov    %ebp,%esi
mov    $0xff,%edx
call   1040 <tq2440_lcd_set_color@plt>
add    $0x1,%ebp
cmp    $0xf0,%ebp
jne    1140 <main+0x20>
add    $0x1,%ebx
cmp    $0xf0,%ebx
jne    1130 <main+0x10>
xor    %eax,%eax
add    $0x8,%rsp
pop    %rbx
pop    %rbp
ret

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

LLVM IR (-O2):
define i32 @main(i32 %0, i8** nocapture readnone %1) {
%3 = tail call i32 (...) @tq2440_lcd_init()
br label %4
4: ; preds = %2, %7
%5 = phi i32 [ 0, %2 ], [ %8, %7 ]
br label %10
6: ; preds = %7
ret i32 0
7: ; preds = %10
%8 = add nuw nsw i32 %5, 1
%9 = icmp eq i32 %8, 240
br i1 %9, label %6, label %4
10: ; preds = %4, %10
%11 = phi i32 [ 0, %4 ], [ %13, %10 ]
%12 = tail call i32 @tq2440_lcd_set_color(i32 %5, i32 %11, i32 255)
%13 = add nuw nsw i32 %11, 1
%14 = icmp eq i32 %13, 240
br i1 %14, label %7, label %10
}