#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_POLYGON;
int /*<<< orphan*/ GL_QUADS;
int /*<<< orphan*/ glBegin(int /*<<< orphan*/);
int /*<<< orphan*/ glClear(int);
int /*<<< orphan*/ glEnd();
int /*<<< orphan*/ glLoadIdentity();
int /*<<< orphan*/ glTranslatef(float, float, float);
int /*<<< orphan*/ glVertex3f(float, float, float);
int /*<<< orphan*/ glutSwapBuffers();
void DrawGLScene() {
  glClear(GL_COLOR_BUFFER_BIT | GL_DEPTH_BUFFER_BIT);
  glLoadIdentity();
  glTranslatef(-1.5f, 0.0f, -6.0f);
  glBegin(GL_POLYGON);
  glVertex3f(0.0f, 1.0f, 0.0f);
  glVertex3f(1.0f, -1.0f, 0.0f);
  glVertex3f(-1.0f, -1.0f, 0.0f);
  glEnd();
  glTranslatef(3.0f, 0.0f, 0.0f);
  glBegin(GL_QUADS);
  glVertex3f(-1.0f, 1.0f, 0.0f);
  glVertex3f(1.0f, 1.0f, 0.0f);
  glVertex3f(1.0f, -1.0f, 0.0f);
  glVertex3f(-1.0f, -1.0f, 0.0f);
  glEnd();
  glutSwapBuffers();
}


x86 assembly (clang, -O0):
<DrawGLScene>:
push   %rbp
mov    %rsp,%rbp
mov    0x2e4d(%rip),%rax
mov    (%rax),%edi
mov    0x2e5c(%rip),%rax
or     (%rax),%edi
call   1030 <glClear@plt>
mov    $0x0,%al
call   1070 <glLoadIdentity@plt>
movss  0xe72(%rip),%xmm0
xorps  %xmm1,%xmm1
movss  0xe6b(%rip),%xmm2
call   1080 <glTranslatef@plt>
mov    0x2e47(%rip),%rax
mov    (%rax),%edi
call   1090 <glBegin@plt>
xorps  %xmm2,%xmm2
movss  0xe41(%rip),%xmm1
movaps %xmm2,%xmm0
call   1040 <glVertex3f@plt>
movss  0xe31(%rip),%xmm0
movss  0xe25(%rip),%xmm1
xorps  %xmm2,%xmm2
call   1040 <glVertex3f@plt>
movss  0xe15(%rip),%xmm1
xorps  %xmm2,%xmm2
movaps %xmm1,%xmm0
call   1040 <glVertex3f@plt>
mov    $0x0,%al
call   1060 <glEnd@plt>
movss  0xe03(%rip),%xmm0
xorps  %xmm2,%xmm2
movaps %xmm2,%xmm1
call   1080 <glTranslatef@plt>
mov    0x2dc1(%rip),%rax
mov    (%rax),%edi
call   1090 <glBegin@plt>
movss  0xdda(%rip),%xmm0
movss  0xdd6(%rip),%xmm1
xorps  %xmm2,%xmm2
call   1040 <glVertex3f@plt>
movss  0xdc6(%rip),%xmm1
xorps  %xmm2,%xmm2
movaps %xmm1,%xmm0
call   1040 <glVertex3f@plt>
movss  0xdb3(%rip),%xmm0
movss  0xda7(%rip),%xmm1
xorps  %xmm2,%xmm2
call   1040 <glVertex3f@plt>
movss  0xd97(%rip),%xmm1
xorps  %xmm2,%xmm2
movaps %xmm1,%xmm0
call   1040 <glVertex3f@plt>
mov    $0x0,%al
call   1060 <glEnd@plt>
mov    $0x0,%al
call   1050 <glutSwapBuffers@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<DrawGLScene>:
push   %rax
mov    0x2e50(%rip),%rax
mov    0x2e61(%rip),%rcx
mov    (%rcx),%edi
or     (%rax),%edi
call   1030 <glClear@plt>
xor    %eax,%eax
call   1070 <glLoadIdentity@plt>
movss  0xe69(%rip),%xmm0
movss  0xe65(%rip),%xmm2
xorps  %xmm1,%xmm1
call   1080 <glTranslatef@plt>
mov    0x2e4a(%rip),%rax
mov    (%rax),%edi
call   1090 <glBegin@plt>
movss  0xe4b(%rip),%xmm1
xorps  %xmm0,%xmm0
xorps  %xmm2,%xmm2
call   1040 <glVertex3f@plt>
movss  0xe3c(%rip),%xmm1
xorps  %xmm2,%xmm2
movss  0xe2d(%rip),%xmm0
call   1040 <glVertex3f@plt>
xorps  %xmm2,%xmm2
movss  0xe21(%rip),%xmm0
movaps %xmm0,%xmm1
call   1040 <glVertex3f@plt>
xor    %eax,%eax
call   1060 <glEnd@plt>
movss  0xe0e(%rip),%xmm0
xorps  %xmm1,%xmm1
xorps  %xmm2,%xmm2
call   1080 <glTranslatef@plt>
mov    0x2dc4(%rip),%rax
mov    (%rax),%edi
call   1090 <glBegin@plt>
xorps  %xmm2,%xmm2
movss  0xde6(%rip),%xmm0
movss  0xdda(%rip),%xmm1
call   1040 <glVertex3f@plt>
xorps  %xmm2,%xmm2
movss  0xdca(%rip),%xmm0
movaps %xmm0,%xmm1
call   1040 <glVertex3f@plt>
xorps  %xmm2,%xmm2
movss  0xdb7(%rip),%xmm0
movss  0xdb3(%rip),%xmm1
call   1040 <glVertex3f@plt>
xorps  %xmm2,%xmm2
movss  0xda3(%rip),%xmm0
movaps %xmm0,%xmm1
call   1040 <glVertex3f@plt>
xor    %eax,%eax
call   1060 <glEnd@plt>
xor    %eax,%eax
pop    %rcx
jmp    1050 <glutSwapBuffers@plt>

LLVM IR (-O0):
@GL_COLOR_BUFFER_BIT = global i32 0
@GL_DEPTH_BUFFER_BIT = global i32 0
@GL_POLYGON = global i32 0
@GL_QUADS = global i32 0
define void @DrawGLScene() {
%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 (...) @glLoadIdentity()
%6 = call i32 @glTranslatef(float -1.500000e+00, float 0.000000e+00, float -6.000000e+00)
%7 = load i32, i32* @GL_POLYGON
%8 = call i32 @glBegin(i32 %7)
%9 = call i32 @glVertex3f(float 0.000000e+00, float 1.000000e+00, float 0.000000e+00)
%10 = call i32 @glVertex3f(float 1.000000e+00, float -1.000000e+00, float 0.000000e+00)
%11 = call i32 @glVertex3f(float -1.000000e+00, float -1.000000e+00, float 0.000000e+00)
%12 = call i32 (...) @glEnd()
%13 = call i32 @glTranslatef(float 3.000000e+00, float 0.000000e+00, float 0.000000e+00)
%14 = load i32, i32* @GL_QUADS
%15 = call i32 @glBegin(i32 %14)
%16 = call i32 @glVertex3f(float -1.000000e+00, float 1.000000e+00, float 0.000000e+00)
%17 = call i32 @glVertex3f(float 1.000000e+00, float 1.000000e+00, float 0.000000e+00)
%18 = call i32 @glVertex3f(float 1.000000e+00, float -1.000000e+00, float 0.000000e+00)
%19 = call i32 @glVertex3f(float -1.000000e+00, float -1.000000e+00, float 0.000000e+00)
%20 = call i32 (...) @glEnd()
%21 = call i32 (...) @glutSwapBuffers()
ret void
}

LLVM IR (-O2):
@GL_COLOR_BUFFER_BIT = global i32 0
@GL_DEPTH_BUFFER_BIT = global i32 0
@GL_POLYGON = global i32 0
@GL_QUADS = global i32 0
define void @DrawGLScene() {
%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 (...) @glLoadIdentity()
%6 = tail call i32 @glTranslatef(float -1.500000e+00, float 0.000000e+00, float -6.000000e+00)
%7 = load i32, i32* @GL_POLYGON
%8 = tail call i32 @glBegin(i32 %7)
%9 = tail call i32 @glVertex3f(float 0.000000e+00, float 1.000000e+00, float 0.000000e+00)
%10 = tail call i32 @glVertex3f(float 1.000000e+00, float -1.000000e+00, float 0.000000e+00)
%11 = tail call i32 @glVertex3f(float -1.000000e+00, float -1.000000e+00, float 0.000000e+00)
%12 = tail call i32 (...) @glEnd()
%13 = tail call i32 @glTranslatef(float 3.000000e+00, float 0.000000e+00, float 0.000000e+00)
%14 = load i32, i32* @GL_QUADS
%15 = tail call i32 @glBegin(i32 %14)
%16 = tail call i32 @glVertex3f(float -1.000000e+00, float 1.000000e+00, float 0.000000e+00)
%17 = tail call i32 @glVertex3f(float 1.000000e+00, float 1.000000e+00, float 0.000000e+00)
%18 = tail call i32 @glVertex3f(float 1.000000e+00, float -1.000000e+00, float 0.000000e+00)
%19 = tail call i32 @glVertex3f(float -1.000000e+00, float -1.000000e+00, float 0.000000e+00)
%20 = tail call i32 (...) @glEnd()
%21 = tail call i32 (...) @glutSwapBuffers()
ret void
}