#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, double, double,
                             double);
int main(void) {
  if (pixInitialize(512, 512, "Pixel Graphics") != 0)
    return 1;
  else {
    pixClearRGB(0.0, 0.0, 0.0);
    triRender(100, 100, 300, 100, 200, 200, 0.1, 0.3, 0.4);
    pixRun();
    return 0;
  }
}


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

x86 assembly (clang, -O2):
<main>:
push   %rbx
lea    0xed0(%rip),%rdx
mov    $0x200,%edi
mov    $0x200,%esi
call   1060 <pixInitialize@plt>
mov    $0x1,%ebx
test   %rax,%rax
jne    11b5 <main+0x75>
xorps  %xmm0,%xmm0
xorps  %xmm1,%xmm1
xorps  %xmm2,%xmm2
call   1050 <pixClearRGB@plt>
movsd  0xe89(%rip),%xmm0
movsd  0xe89(%rip),%xmm1
movsd  0xe89(%rip),%xmm2
mov    $0x64,%edi
mov    $0x64,%esi
mov    $0x12c,%edx
mov    $0x64,%ecx
mov    $0xc8,%r8d
mov    $0xc8,%r9d
call   1030 <triRender@plt>
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 100, i32 100, i32 300, i32 100, i32 200, i32 200, double 1.000000e-01, double 3.000000e-01, double 4.000000e-01)
%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 100, i32 100, i32 300, i32 100, i32 200, i32 200, double 1.000000e-01, double 3.000000e-01, double 4.000000e-01)
%6 = tail call i32 (...) @pixRun()
br label %7
7: ; preds = %0, %3
%8 = phi i32 [ 0, %3 ], [ 1, %0 ]
ret i32 %8
}