#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*/ pixClearRGB(double, double, double);
scalar_t__ pixInitialize(int, int, char *);
int /*<<< orphan*/ pixRun();
int /*<<< orphan*/ triRender(int, int, int, int, int, int, int, int, int);
int main(void) {
  if (pixInitialize(512, 512, "Pixel Graphics") != 0)
    return 1;
  else {
    pixClearRGB(0.0, 0.0, 0.0);
    triRender(180, 200, 190, 210, 200, 200, 1, 1, 1);
    pixRun();
    return 0;
  }
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
movl   $0x0,-0x4(%rbp)
mov    $0x200,%esi
lea    0xea5(%rip),%rdx
mov    %esi,%edi
call   1060 <pixInitialize@plt>
cmp    $0x0,%rax
je     1178 <main+0x38>
movl   $0x1,-0x4(%rbp)
jmp    11cb <main+0x8b>
xorps  %xmm2,%xmm2
movaps %xmm2,%xmm0
movaps %xmm2,%xmm1
call   1050 <pixClearRGB@plt>
mov    $0xb4,%edi
mov    $0xc8,%r9d
mov    $0xbe,%edx
mov    $0xd2,%ecx
mov    %r9d,%esi
mov    %r9d,%r8d
movl   $0x1,(%rsp)
movl   $0x1,0x8(%rsp)
movl   $0x1,0x10(%rsp)
call   1030 <triRender@plt>
mov    $0x0,%al
call   1040 <pixRun@plt>
movl   $0x0,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbx
lea    0xeb8(%rip),%rdx
mov    $0x200,%edi
mov    $0x200,%esi
call   1060 <pixInitialize@plt>
mov    $0x1,%ebx
test   %rax,%rax
jne    11ab <main+0x6b>
xorps  %xmm0,%xmm0
xorps  %xmm1,%xmm1
xorps  %xmm2,%xmm2
call   1050 <pixClearRGB@plt>
sub    $0x8,%rsp
mov    $0xb4,%edi
mov    $0xc8,%esi
mov    $0xbe,%edx
mov    $0xd2,%ecx
mov    $0xc8,%r8d
mov    $0xc8,%r9d
push   $0x1
push   $0x1
push   $0x1
call   1030 <triRender@plt>
add    $0x20,%rsp
xor    %ebx,%ebx
xor    %eax,%eax
call   1040 <pixRun@plt>
mov    %ebx,%eax
pop    %rbx
ret

LLVM IR (-O0):
@.str = [15 x i8] c"Pixel Graphics\00"
define i32 @main() {
%1 = alloca i32
store i32 0, i32* %1
%2 = call i64 @pixInitialize(i32 512, i32 512, i8* getelementptr inbounds ([15 x i8], [15 x i8]* @.str, i64 0, i64 0))
%3 = icmp ne i64 %2, 0
br i1 %3, label %4, label %5
4: ; preds = %0
store i32 1, i32* %1
br label %9
5: ; preds = %0
%6 = call i32 @pixClearRGB(double 0.000000e+00, double 0.000000e+00, double 0.000000e+00)
%7 = call i32 @triRender(i32 180, i32 200, i32 190, i32 210, i32 200, i32 200, i32 1, i32 1, i32 1)
%8 = call i32 (...) @pixRun()
store i32 0, i32* %1
br label %9
9: ; preds = %5, %4
%10 = load i32, i32* %1
ret i32 %10
}

LLVM IR (-O2):
@.str = [15 x i8] c"Pixel Graphics\00"
define i32 @main() {
%1 = tail call i64 @pixInitialize(i32 512, i32 512, i8* getelementptr inbounds ([15 x i8], [15 x i8]* @.str, i64 0, i64 0))
%2 = icmp eq i64 %1, 0
br i1 %2, label %3, label %7
3: ; preds = %0
%4 = tail call i32 @pixClearRGB(double 0.000000e+00, double 0.000000e+00, double 0.000000e+00)
%5 = tail call i32 @triRender(i32 180, i32 200, i32 190, i32 210, i32 200, i32 200, i32 1, i32 1, i32 1)
%6 = tail call i32 (...) @pixRun()
br label %7
7: ; preds = %0, %3
%8 = phi i32 [ 0, %3 ], [ 1, %0 ]
ret i32 %8
}