#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*/ GL_COLOR_BUFFER_BIT;
int /*<<< orphan*/ GL_POLYGON;
int /*<<< orphan*/ glBegin(int /*<<< orphan*/);
int /*<<< orphan*/ glClear(int /*<<< orphan*/);
int /*<<< orphan*/ glColor3f(float, float, float);
int /*<<< orphan*/ glEnd();
int /*<<< orphan*/ glFlush();
int /*<<< orphan*/ glVertex3f(float, float, float);
void display(void) {
  glClear(GL_COLOR_BUFFER_BIT);
  glColor3f(1.0f, 1.0f, 1.0f);
  glBegin(GL_POLYGON);
  glColor3f(1.0f, 1.0f, 0.0f);
  glVertex3f(0.25f, 0.25f, 0.0f);
  glColor3f(1.0f, 0.0f, 0.0f);
  glVertex3f(0.75f, 0.25f, 0.0f);
  glColor3f(0.0f, 0.0f, 1.0f);
  glVertex3f(0.75f, 0.75f, 0.0f);
  glColor3f(0.0f, 1.0f, 0.0f);
  glVertex3f(0.25f, 0.75f, 0.0f);
  glEnd();
  glFlush();
}


x86 assembly (clang, -O0):
<display>:
push   %rbp
mov    %rsp,%rbp
mov    0x2e6d(%rip),%rax
mov    (%rax),%edi
call   1030 <glClear@plt>
movss  0xe8e(%rip),%xmm2
movaps %xmm2,%xmm0
movaps %xmm2,%xmm1
call   1060 <glColor3f@plt>
mov    0x2e6c(%rip),%rax
mov    (%rax),%edi
call   1080 <glBegin@plt>
movss  0xe6d(%rip),%xmm1
xorps  %xmm2,%xmm2
movaps %xmm1,%xmm0
call   1060 <glColor3f@plt>
movss  0xe52(%rip),%xmm1
xorps  %xmm2,%xmm2
movaps %xmm1,%xmm0
call   1040 <glVertex3f@plt>
movss  0xe47(%rip),%xmm0
xorps  %xmm2,%xmm2
movaps %xmm2,%xmm1
call   1060 <glColor3f@plt>
movss  0xe30(%rip),%xmm0
movss  0xe24(%rip),%xmm1
xorps  %xmm2,%xmm2
call   1040 <glVertex3f@plt>
xorps  %xmm1,%xmm1
movss  0xe19(%rip),%xmm2
movaps %xmm1,%xmm0
call   1060 <glColor3f@plt>
movss  0xe05(%rip),%xmm1
xorps  %xmm2,%xmm2
movaps %xmm1,%xmm0
call   1040 <glVertex3f@plt>
xorps  %xmm2,%xmm2
movss  0xdf3(%rip),%xmm1
movaps %xmm2,%xmm0
call   1060 <glColor3f@plt>
movss  0xddb(%rip),%xmm0
movss  0xdd7(%rip),%xmm1
xorps  %xmm2,%xmm2
call   1040 <glVertex3f@plt>
mov    $0x0,%al
call   1050 <glEnd@plt>
mov    $0x0,%al
call   1070 <glFlush@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<display>:
push   %rax
mov    0x2e70(%rip),%rax
mov    (%rax),%edi
call   1030 <glClear@plt>
movss  0xe89(%rip),%xmm0
movaps %xmm0,%xmm1
movaps %xmm0,%xmm2
call   1060 <glColor3f@plt>
mov    0x2e6f(%rip),%rax
mov    (%rax),%edi
call   1080 <glBegin@plt>
xorps  %xmm2,%xmm2
movss  0xe65(%rip),%xmm0
movaps %xmm0,%xmm1
call   1060 <glColor3f@plt>
movss  0xe59(%rip),%xmm0
xorps  %xmm2,%xmm2
movaps %xmm0,%xmm1
call   1040 <glVertex3f@plt>
xorps  %xmm1,%xmm1
xorps  %xmm2,%xmm2
movss  0xe3c(%rip),%xmm0
call   1060 <glColor3f@plt>
movss  0xe37(%rip),%xmm0
xorps  %xmm2,%xmm2
movss  0xe28(%rip),%xmm1
call   1040 <glVertex3f@plt>
xorps  %xmm0,%xmm0
xorps  %xmm1,%xmm1
movss  0xe11(%rip),%xmm2
call   1060 <glColor3f@plt>
xorps  %xmm2,%xmm2
movss  0xe09(%rip),%xmm0
movaps %xmm0,%xmm1
call   1040 <glVertex3f@plt>
xorps  %xmm0,%xmm0
xorps  %xmm2,%xmm2
movss  0xdeb(%rip),%xmm1
call   1060 <glColor3f@plt>
xorps  %xmm2,%xmm2
movss  0xddf(%rip),%xmm0
movss  0xddb(%rip),%xmm1
call   1040 <glVertex3f@plt>
xor    %eax,%eax
call   1050 <glEnd@plt>
xor    %eax,%eax
pop    %rcx
jmp    1070 <glFlush@plt>

LLVM IR (-O0):
@GL_COLOR_BUFFER_BIT = global i32 0
@GL_POLYGON = global i32 0
define void @display() {
%1 = load i32, i32* @GL_COLOR_BUFFER_BIT
%2 = call i32 @glClear(i32 %1)
%3 = call i32 @glColor3f(float 1.000000e+00, float 1.000000e+00, float 1.000000e+00)
%4 = load i32, i32* @GL_POLYGON
%5 = call i32 @glBegin(i32 %4)
%6 = call i32 @glColor3f(float 1.000000e+00, float 1.000000e+00, float 0.000000e+00)
%7 = call i32 @glVertex3f(float 2.500000e-01, float 2.500000e-01, float 0.000000e+00)
%8 = call i32 @glColor3f(float 1.000000e+00, float 0.000000e+00, float 0.000000e+00)
%9 = call i32 @glVertex3f(float 7.500000e-01, float 2.500000e-01, float 0.000000e+00)
%10 = call i32 @glColor3f(float 0.000000e+00, float 0.000000e+00, float 1.000000e+00)
%11 = call i32 @glVertex3f(float 7.500000e-01, float 7.500000e-01, float 0.000000e+00)
%12 = call i32 @glColor3f(float 0.000000e+00, float 1.000000e+00, float 0.000000e+00)
%13 = call i32 @glVertex3f(float 2.500000e-01, float 7.500000e-01, float 0.000000e+00)
%14 = call i32 (...) @glEnd()
%15 = call i32 (...) @glFlush()
ret void
}

LLVM IR (-O2):
@GL_COLOR_BUFFER_BIT = global i32 0
@GL_POLYGON = global i32 0
define void @display() {
%1 = load i32, i32* @GL_COLOR_BUFFER_BIT
%2 = tail call i32 @glClear(i32 %1)
%3 = tail call i32 @glColor3f(float 1.000000e+00, float 1.000000e+00, float 1.000000e+00)
%4 = load i32, i32* @GL_POLYGON
%5 = tail call i32 @glBegin(i32 %4)
%6 = tail call i32 @glColor3f(float 1.000000e+00, float 1.000000e+00, float 0.000000e+00)
%7 = tail call i32 @glVertex3f(float 2.500000e-01, float 2.500000e-01, float 0.000000e+00)
%8 = tail call i32 @glColor3f(float 1.000000e+00, float 0.000000e+00, float 0.000000e+00)
%9 = tail call i32 @glVertex3f(float 7.500000e-01, float 2.500000e-01, float 0.000000e+00)
%10 = tail call i32 @glColor3f(float 0.000000e+00, float 0.000000e+00, float 1.000000e+00)
%11 = tail call i32 @glVertex3f(float 7.500000e-01, float 7.500000e-01, float 0.000000e+00)
%12 = tail call i32 @glColor3f(float 0.000000e+00, float 1.000000e+00, float 0.000000e+00)
%13 = tail call i32 @glVertex3f(float 2.500000e-01, float 7.500000e-01, float 0.000000e+00)
%14 = tail call i32 (...) @glEnd()
%15 = tail call i32 (...) @glFlush()
ret void
}