#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 GL_COLOR_BUFFER_BIT;
int GL_DEPTH_BUFFER_BIT;
int /*<<< orphan*/ GL_QUADS;
int /*<<< orphan*/ glBegin(int /*<<< orphan*/);
int /*<<< orphan*/ glClear(int);
int /*<<< orphan*/ glColor3f(float, float, float);
int /*<<< orphan*/ glEnd();
int /*<<< orphan*/ glFlush();
int /*<<< orphan*/ glRectf(float, float, float, float);
int /*<<< orphan*/ glVertex2f(double, double);
int /*<<< orphan*/ glutSwapBuffers();
void display() {
  glClear(GL_COLOR_BUFFER_BIT | GL_DEPTH_BUFFER_BIT);
  glColor3f(0.0f, 0.0f, 0.0f);
  glRectf(-0.75f, 0.75f, 0.75f, -0.75f);
  glBegin(GL_QUADS);
  glColor3f(0.5f, 0.0f, 1.0f);
  glVertex2f(-0.75, 0.75);
  glColor3f(1.0f, 0.0f, 0.0f);
  glVertex2f(-0.75, -0.75);
  glVertex2f(0.75, -0.75);
  glVertex2f(0.75, 0.75);
  glEnd();
  glFlush();
  glutSwapBuffers();
}


x86 assembly (clang, -O0):
<display>:
push   %rbp
mov    %rsp,%rbp
mov    0x2e45(%rip),%rax
mov    (%rax),%edi
mov    0x2e54(%rip),%rax
or     (%rax),%edi
call   1030 <glClear@plt>
xorps  %xmm2,%xmm2
movaps %xmm2,%xmm0
movaps %xmm2,%xmm1
call   1070 <glColor3f@plt>
movss  0xe67(%rip),%xmm3
movss  0xe63(%rip),%xmm2
movaps %xmm3,%xmm0
movaps %xmm2,%xmm1
call   1050 <glRectf@plt>
mov    0x2e15(%rip),%rax
mov    (%rax),%edi
call   10a0 <glBegin@plt>
movss  0xe3a(%rip),%xmm0
xorps  %xmm1,%xmm1
movss  0xe2b(%rip),%xmm2
call   1070 <glColor3f@plt>
movsd  0xe16(%rip),%xmm0
movsd  0xe06(%rip),%xmm1
call   1090 <glVertex2f@plt>
movss  0xe09(%rip),%xmm0
xorps  %xmm2,%xmm2
movaps %xmm2,%xmm1
call   1070 <glColor3f@plt>
movsd  0xdee(%rip),%xmm1
movaps %xmm1,%xmm0
call   1090 <glVertex2f@plt>
movsd  0xdd6(%rip),%xmm0
movsd  0xdd6(%rip),%xmm1
call   1090 <glVertex2f@plt>
movsd  0xdc1(%rip),%xmm1
movaps %xmm1,%xmm0
call   1090 <glVertex2f@plt>
mov    $0x0,%al
call   1060 <glEnd@plt>
mov    $0x0,%al
call   1080 <glFlush@plt>
mov    $0x0,%al
call   1040 <glutSwapBuffers@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<display>:
push   %rax
mov    0x2e48(%rip),%rax
mov    0x2e59(%rip),%rcx
mov    (%rcx),%edi
or     (%rax),%edi
call   1030 <glClear@plt>
xorps  %xmm0,%xmm0
xorps  %xmm1,%xmm1
xorps  %xmm2,%xmm2
call   1070 <glColor3f@plt>
movss  0xe52(%rip),%xmm1
movss  0xe4e(%rip),%xmm0
movaps %xmm1,%xmm2
movaps %xmm0,%xmm3
call   1050 <glRectf@plt>
mov    0x2e18(%rip),%rax
mov    (%rax),%edi
call   10a0 <glBegin@plt>
movss  0xe31(%rip),%xmm0
movss  0xe2d(%rip),%xmm2
xorps  %xmm1,%xmm1
call   1070 <glColor3f@plt>
movsd  0xe21(%rip),%xmm0
movsd  0xe21(%rip),%xmm1
call   1090 <glVertex2f@plt>
xorps  %xmm1,%xmm1
xorps  %xmm2,%xmm2
movss  0xe02(%rip),%xmm0
call   1070 <glColor3f@plt>
movsd  0xdf9(%rip),%xmm0
movaps %xmm0,%xmm1
call   1090 <glVertex2f@plt>
movsd  0xdf1(%rip),%xmm0
movsd  0xde1(%rip),%xmm1
call   1090 <glVertex2f@plt>
movsd  0xddc(%rip),%xmm0
movaps %xmm0,%xmm1
call   1090 <glVertex2f@plt>
xor    %eax,%eax
call   1060 <glEnd@plt>
xor    %eax,%eax
call   1080 <glFlush@plt>
xor    %eax,%eax
pop    %rcx
jmp    1040 <glutSwapBuffers@plt>

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

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