#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*/ pixelInt(int, int);
void paintAxis() {
  int i, j;
  for (i = 0; i < 1024; i++) {
    for (j = -1; j < 1; j++) {
      pixelInt(i, 768 / 2 + j);
    }
  }
  for (i = 0; i < 768; i++) {
    for (j = -1; j < 1; j++) {
      pixelInt(1024 / 2 + j, i);
    }
  }
}


x86 assembly (clang, -O0):
<paintAxis>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
cmpl   $0x400,-0x4(%rbp)
jge    116f <paintAxis+0x5f>
movl   $0xffffffff,-0x8(%rbp)
cmpl   $0x1,-0x8(%rbp)
jge    115c <paintAxis+0x4c>
mov    -0x4(%rbp),%edi
mov    -0x8(%rbp),%esi
add    $0x180,%esi
call   1030 <pixelInt@plt>
mov    -0x8(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x8(%rbp)
jmp    1133 <paintAxis+0x23>
jmp    1161 <paintAxis+0x51>
mov    -0x4(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x4(%rbp)
jmp    111f <paintAxis+0xf>
movl   $0x0,-0x4(%rbp)
cmpl   $0x300,-0x4(%rbp)
jge    11c6 <paintAxis+0xb6>
movl   $0xffffffff,-0x8(%rbp)
cmpl   $0x1,-0x8(%rbp)
jge    11b3 <paintAxis+0xa3>
mov    -0x8(%rbp),%edi
add    $0x200,%edi
mov    -0x4(%rbp),%esi
call   1030 <pixelInt@plt>
mov    -0x8(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x8(%rbp)
jmp    118a <paintAxis+0x7a>
jmp    11b8 <paintAxis+0xa8>
mov    -0x4(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x4(%rbp)
jmp    1176 <paintAxis+0x66>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<paintAxis>:
push   %rbx
xor    %ebx,%ebx
cs nopw 0x0(%rax,%rax,1)
nopl   (%rax)
mov    %ebx,%edi
mov    $0x17f,%esi
call   1030 <pixelInt@plt>
mov    %ebx,%edi
mov    $0x180,%esi
call   1030 <pixelInt@plt>
add    $0x1,%ebx
cmp    $0x400,%ebx
jne    1120 <paintAxis+0x10>
xor    %ebx,%ebx
cs nopw 0x0(%rax,%rax,1)
nop
mov    $0x1ff,%edi
mov    %ebx,%esi
call   1030 <pixelInt@plt>
mov    $0x200,%edi
mov    %ebx,%esi
call   1030 <pixelInt@plt>
add    $0x1,%ebx
cmp    $0x300,%ebx
jne    1150 <paintAxis+0x40>
pop    %rbx
ret

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

LLVM IR (-O2):
define void @paintAxis() {
br label %1
1: ; preds = %0, %1
%2 = phi i32 [ 0, %0 ], [ %5, %1 ]
%3 = tail call i32 @pixelInt(i32 %2, i32 383)
%4 = tail call i32 @pixelInt(i32 %2, i32 384)
%5 = add nuw nsw i32 %2, 1
%6 = icmp eq i32 %5, 1024
br i1 %6, label %7, label %1
7: ; preds = %1, %7
%8 = phi i32 [ %11, %7 ], [ 0, %1 ]
%9 = tail call i32 @pixelInt(i32 511, i32 %8)
%10 = tail call i32 @pixelInt(i32 512, i32 %8)
%11 = add nuw nsw i32 %8, 1
%12 = icmp eq i32 %11, 768
br i1 %12, label %13, label %7
13: ; preds = %7
ret void
}