#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_QUADS;
int /*<<< orphan*/ glBegin(int /*<<< orphan*/);
int /*<<< orphan*/ glColor3f(float, float, float);
int /*<<< orphan*/ glEnd();
int /*<<< orphan*/ glVertex3f(float, float, float);
void drawCube() {
  glBegin(GL_QUADS);
  glColor3f(0.0f, 1.0f, 0.0f);
  glVertex3f(1.0f, 1.0f, -1.0f);
  glVertex3f(-1.0f, 1.0f, -1.0f);
  glVertex3f(-1.0f, 1.0f, 1.0f);
  glVertex3f(1.0f, 1.0f, 1.0f);
  glColor3f(1.0f, 0.5f, 0.0f);
  glVertex3f(1.0f, -1.0f, 1.0f);
  glVertex3f(-1.0f, -1.0f, 1.0f);
  glVertex3f(-1.0f, -1.0f, -1.0f);
  glVertex3f(1.0f, -1.0f, -1.0f);
  glColor3f(1.0f, 0.0f, 0.0f);
  glVertex3f(1.0f, 1.0f, 1.0f);
  glVertex3f(-1.0f, 1.0f, 1.0f);
  glVertex3f(-1.0f, -1.0f, 1.0f);
  glVertex3f(1.0f, -1.0f, 1.0f);
  glColor3f(1.0f, 1.0f, 0.0f);
  glVertex3f(1.0f, -1.0f, -1.0f);
  glVertex3f(-1.0f, -1.0f, -1.0f);
  glVertex3f(-1.0f, 1.0f, -1.0f);
  glVertex3f(1.0f, 1.0f, -1.0f);
  glColor3f(0.0f, 0.0f, 1.0f);
  glVertex3f(-1.0f, 1.0f, 1.0f);
  glVertex3f(-1.0f, 1.0f, -1.0f);
  glVertex3f(-1.0f, -1.0f, -1.0f);
  glVertex3f(-1.0f, -1.0f, 1.0f);
  glColor3f(1.0f, 0.0f, 1.0f);
  glVertex3f(1.0f, 1.0f, -1.0f);
  glVertex3f(1.0f, 1.0f, 1.0f);
  glVertex3f(1.0f, -1.0f, 1.0f);
  glVertex3f(1.0f, -1.0f, -1.0f);
  glEnd();
}


x86 assembly (clang, -O0):
<drawCube>:
push   %rbp
mov    %rsp,%rbp
mov    0x2e9d(%rip),%rax
mov    (%rax),%edi
call   1060 <glBegin@plt>
xorps  %xmm2,%xmm2
movss  0xea3(%rip),%xmm1
movaps %xmm2,%xmm0
call   1050 <glColor3f@plt>
movss  0xe93(%rip),%xmm1
movss  0xe8f(%rip),%xmm2
movaps %xmm1,%xmm0
call   1030 <glVertex3f@plt>
movss  0xe7f(%rip),%xmm2
movss  0xe73(%rip),%xmm1
movaps %xmm2,%xmm0
call   1030 <glVertex3f@plt>
movss  0xe67(%rip),%xmm0
movss  0xe5b(%rip),%xmm2
movaps %xmm2,%xmm1
call   1030 <glVertex3f@plt>
movss  0xe4b(%rip),%xmm2
movaps %xmm2,%xmm0
movaps %xmm2,%xmm1
call   1030 <glVertex3f@plt>
movss  0xe38(%rip),%xmm0
movss  0xe38(%rip),%xmm1
xorps  %xmm2,%xmm2
call   1050 <glColor3f@plt>
movss  0xe20(%rip),%xmm2
movss  0xe1c(%rip),%xmm1
movaps %xmm2,%xmm0
call   1030 <glVertex3f@plt>
movss  0xe0c(%rip),%xmm1
movss  0xe00(%rip),%xmm2
movaps %xmm1,%xmm0
call   1030 <glVertex3f@plt>
movss  0xdf4(%rip),%xmm2
movaps %xmm2,%xmm0
movaps %xmm2,%xmm1
call   1030 <glVertex3f@plt>
movss  0xddd(%rip),%xmm0
movss  0xdd9(%rip),%xmm2
movaps %xmm2,%xmm1
call   1030 <glVertex3f@plt>
movss  0xdc5(%rip),%xmm0
xorps  %xmm2,%xmm2
movaps %xmm2,%xmm1
call   1050 <glColor3f@plt>
movss  0xdb2(%rip),%xmm2
movaps %xmm2,%xmm0
movaps %xmm2,%xmm1
call   1030 <glVertex3f@plt>
movss  0xda3(%rip),%xmm0
movss  0xd97(%rip),%xmm2
movaps %xmm2,%xmm1
call   1030 <glVertex3f@plt>
movss  0xd8b(%rip),%xmm1
movss  0xd7f(%rip),%xmm2
movaps %xmm1,%xmm0
call   1030 <glVertex3f@plt>
movss  0xd6f(%rip),%xmm2
movss  0xd6b(%rip),%xmm1
movaps %xmm2,%xmm0
call   1030 <glVertex3f@plt>
movss  0xd57(%rip),%xmm1
xorps  %xmm2,%xmm2
movaps %xmm1,%xmm0
call   1050 <glColor3f@plt>
movss  0xd44(%rip),%xmm0
movss  0xd40(%rip),%xmm2
movaps %xmm2,%xmm1
call   1030 <glVertex3f@plt>
movss  0xd30(%rip),%xmm2
movaps %xmm2,%xmm0
movaps %xmm2,%xmm1
call   1030 <glVertex3f@plt>
movss  0xd1d(%rip),%xmm2
movss  0xd11(%rip),%xmm1
movaps %xmm2,%xmm0
call   1030 <glVertex3f@plt>
movss  0xd01(%rip),%xmm1
movss  0xcfd(%rip),%xmm2
movaps %xmm1,%xmm0
call   1030 <glVertex3f@plt>
xorps  %xmm1,%xmm1
movss  0xce6(%rip),%xmm2
movaps %xmm1,%xmm0
call   1050 <glColor3f@plt>
movss  0xcda(%rip),%xmm0
movss  0xcce(%rip),%xmm2
movaps %xmm2,%xmm1
call   1030 <glVertex3f@plt>
movss  0xcc2(%rip),%xmm2
movss  0xcb6(%rip),%xmm1
movaps %xmm2,%xmm0
call   1030 <glVertex3f@plt>
movss  0xcaa(%rip),%xmm2
movaps %xmm2,%xmm0
movaps %xmm2,%xmm1
call   1030 <glVertex3f@plt>
movss  0xc97(%rip),%xmm1
movss  0xc8b(%rip),%xmm2
movaps %xmm1,%xmm0
call   1030 <glVertex3f@plt>
movss  0xc7b(%rip),%xmm2
xorps  %xmm1,%xmm1
movaps %xmm2,%xmm0
call   1050 <glColor3f@plt>
movss  0xc68(%rip),%xmm1
movss  0xc64(%rip),%xmm2
movaps %xmm1,%xmm0
call   1030 <glVertex3f@plt>
movss  0xc50(%rip),%xmm2
movaps %xmm2,%xmm0
movaps %xmm2,%xmm1
call   1030 <glVertex3f@plt>
movss  0xc3d(%rip),%xmm2
movss  0xc39(%rip),%xmm1
movaps %xmm2,%xmm0
call   1030 <glVertex3f@plt>
movss  0xc25(%rip),%xmm0
movss  0xc21(%rip),%xmm2
movaps %xmm2,%xmm1
call   1030 <glVertex3f@plt>
mov    $0x0,%al
call   1040 <glEnd@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<drawCube>:
push   %rax
mov    0x2ea0(%rip),%rax
mov    (%rax),%edi
call   1060 <glBegin@plt>
movss  0xea9(%rip),%xmm1
xorps  %xmm0,%xmm0
xorps  %xmm2,%xmm2
call   1050 <glColor3f@plt>
movss  0xe9a(%rip),%xmm2
movss  0xe8e(%rip),%xmm0
movaps %xmm0,%xmm1
call   1030 <glVertex3f@plt>
movss  0xe82(%rip),%xmm0
movss  0xe76(%rip),%xmm1
movaps %xmm0,%xmm2
call   1030 <glVertex3f@plt>
movss  0xe6a(%rip),%xmm0
movss  0xe5e(%rip),%xmm1
movaps %xmm1,%xmm2
call   1030 <glVertex3f@plt>
movss  0xe4e(%rip),%xmm0
movaps %xmm0,%xmm1
movaps %xmm0,%xmm2
call   1030 <glVertex3f@plt>
movss  0xe43(%rip),%xmm1
xorps  %xmm2,%xmm2
movss  0xe30(%rip),%xmm0
call   1050 <glColor3f@plt>
movss  0xe23(%rip),%xmm0
movss  0xe1f(%rip),%xmm1
movaps %xmm0,%xmm2
call   1030 <glVertex3f@plt>
movss  0xe0f(%rip),%xmm0
movaps %xmm0,%xmm1
movss  0xe00(%rip),%xmm2
call   1030 <glVertex3f@plt>
movss  0xdf7(%rip),%xmm0
movaps %xmm0,%xmm1
movaps %xmm0,%xmm2
call   1030 <glVertex3f@plt>
movss  0xde0(%rip),%xmm0
movss  0xddc(%rip),%xmm1
movaps %xmm1,%xmm2
call   1030 <glVertex3f@plt>
xorps  %xmm1,%xmm1
xorps  %xmm2,%xmm2
movss  0xdc2(%rip),%xmm0
call   1050 <glColor3f@plt>
movss  0xdb5(%rip),%xmm0
movaps %xmm0,%xmm1
movaps %xmm0,%xmm2
call   1030 <glVertex3f@plt>
movss  0xda6(%rip),%xmm0
movss  0xd9a(%rip),%xmm1
movaps %xmm1,%xmm2
call   1030 <glVertex3f@plt>
movss  0xd8e(%rip),%xmm0
movaps %xmm0,%xmm1
movss  0xd7f(%rip),%xmm2
call   1030 <glVertex3f@plt>
movss  0xd72(%rip),%xmm0
movss  0xd6e(%rip),%xmm1
movaps %xmm0,%xmm2
call   1030 <glVertex3f@plt>
xorps  %xmm2,%xmm2
movss  0xd57(%rip),%xmm0
movaps %xmm0,%xmm1
call   1050 <glColor3f@plt>
movss  0xd47(%rip),%xmm0
movss  0xd43(%rip),%xmm1
movaps %xmm1,%xmm2
call   1030 <glVertex3f@plt>
movss  0xd33(%rip),%xmm0
movaps %xmm0,%xmm1
movaps %xmm0,%xmm2
call   1030 <glVertex3f@plt>
movss  0xd20(%rip),%xmm0
movss  0xd14(%rip),%xmm1
movaps %xmm0,%xmm2
call   1030 <glVertex3f@plt>
movss  0xd04(%rip),%xmm0
movaps %xmm0,%xmm1
movss  0xcfd(%rip),%xmm2
call   1030 <glVertex3f@plt>
xorps  %xmm0,%xmm0
xorps  %xmm1,%xmm1
movss  0xce6(%rip),%xmm2
call   1050 <glColor3f@plt>
movss  0xcdd(%rip),%xmm0
movss  0xcd1(%rip),%xmm1
movaps %xmm1,%xmm2
call   1030 <glVertex3f@plt>
movss  0xcc5(%rip),%xmm0
movss  0xcb9(%rip),%xmm1
movaps %xmm0,%xmm2
call   1030 <glVertex3f@plt>
movss  0xcad(%rip),%xmm0
movaps %xmm0,%xmm1
movaps %xmm0,%xmm2
call   1030 <glVertex3f@plt>
movss  0xc9a(%rip),%xmm0
movaps %xmm0,%xmm1
movss  0xc8b(%rip),%xmm2
call   1030 <glVertex3f@plt>
xorps  %xmm1,%xmm1
movss  0xc7b(%rip),%xmm0
movaps %xmm0,%xmm2
call   1050 <glColor3f@plt>
movss  0xc6b(%rip),%xmm0
movaps %xmm0,%xmm1
movss  0xc64(%rip),%xmm2
call   1030 <glVertex3f@plt>
movss  0xc53(%rip),%xmm0
movaps %xmm0,%xmm1
movaps %xmm0,%xmm2
call   1030 <glVertex3f@plt>
movss  0xc40(%rip),%xmm0
movss  0xc3c(%rip),%xmm1
movaps %xmm0,%xmm2
call   1030 <glVertex3f@plt>
movss  0xc28(%rip),%xmm0
movss  0xc24(%rip),%xmm1
movaps %xmm1,%xmm2
call   1030 <glVertex3f@plt>
xor    %eax,%eax
pop    %rcx
jmp    1040 <glEnd@plt>

LLVM IR (-O0):
@GL_QUADS = global i32 0
define void @drawCube() {
%1 = load i32, i32* @GL_QUADS
%2 = call i32 @glBegin(i32 %1)
%3 = call i32 @glColor3f(float 0.000000e+00, float 1.000000e+00, float 0.000000e+00)
%4 = call i32 @glVertex3f(float 1.000000e+00, float 1.000000e+00, float -1.000000e+00)
%5 = call i32 @glVertex3f(float -1.000000e+00, float 1.000000e+00, float -1.000000e+00)
%6 = call i32 @glVertex3f(float -1.000000e+00, float 1.000000e+00, float 1.000000e+00)
%7 = call i32 @glVertex3f(float 1.000000e+00, float 1.000000e+00, float 1.000000e+00)
%8 = call i32 @glColor3f(float 1.000000e+00, float 5.000000e-01, float 0.000000e+00)
%9 = call i32 @glVertex3f(float 1.000000e+00, float -1.000000e+00, float 1.000000e+00)
%10 = call i32 @glVertex3f(float -1.000000e+00, float -1.000000e+00, float 1.000000e+00)
%11 = call i32 @glVertex3f(float -1.000000e+00, float -1.000000e+00, float -1.000000e+00)
%12 = call i32 @glVertex3f(float 1.000000e+00, float -1.000000e+00, float -1.000000e+00)
%13 = call i32 @glColor3f(float 1.000000e+00, float 0.000000e+00, float 0.000000e+00)
%14 = call i32 @glVertex3f(float 1.000000e+00, float 1.000000e+00, float 1.000000e+00)
%15 = call i32 @glVertex3f(float -1.000000e+00, float 1.000000e+00, float 1.000000e+00)
%16 = call i32 @glVertex3f(float -1.000000e+00, float -1.000000e+00, float 1.000000e+00)
%17 = call i32 @glVertex3f(float 1.000000e+00, float -1.000000e+00, float 1.000000e+00)
%18 = call i32 @glColor3f(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 -1.000000e+00)
%20 = call i32 @glVertex3f(float -1.000000e+00, float -1.000000e+00, float -1.000000e+00)
%21 = call i32 @glVertex3f(float -1.000000e+00, float 1.000000e+00, float -1.000000e+00)
%22 = call i32 @glVertex3f(float 1.000000e+00, float 1.000000e+00, float -1.000000e+00)
%23 = call i32 @glColor3f(float 0.000000e+00, float 0.000000e+00, float 1.000000e+00)
%24 = call i32 @glVertex3f(float -1.000000e+00, float 1.000000e+00, float 1.000000e+00)
%25 = call i32 @glVertex3f(float -1.000000e+00, float 1.000000e+00, float -1.000000e+00)
%26 = call i32 @glVertex3f(float -1.000000e+00, float -1.000000e+00, float -1.000000e+00)
%27 = call i32 @glVertex3f(float -1.000000e+00, float -1.000000e+00, float 1.000000e+00)
%28 = call i32 @glColor3f(float 1.000000e+00, float 0.000000e+00, float 1.000000e+00)
%29 = call i32 @glVertex3f(float 1.000000e+00, float 1.000000e+00, float -1.000000e+00)
%30 = call i32 @glVertex3f(float 1.000000e+00, float 1.000000e+00, float 1.000000e+00)
%31 = call i32 @glVertex3f(float 1.000000e+00, float -1.000000e+00, float 1.000000e+00)
%32 = call i32 @glVertex3f(float 1.000000e+00, float -1.000000e+00, float -1.000000e+00)
%33 = call i32 (...) @glEnd()
ret void
}

LLVM IR (-O2):
@GL_QUADS = global i32 0
define void @drawCube() {
%1 = load i32, i32* @GL_QUADS
%2 = tail call i32 @glBegin(i32 %1)
%3 = tail call i32 @glColor3f(float 0.000000e+00, float 1.000000e+00, float 0.000000e+00)
%4 = tail call i32 @glVertex3f(float 1.000000e+00, float 1.000000e+00, float -1.000000e+00)
%5 = tail call i32 @glVertex3f(float -1.000000e+00, float 1.000000e+00, float -1.000000e+00)
%6 = tail call i32 @glVertex3f(float -1.000000e+00, float 1.000000e+00, float 1.000000e+00)
%7 = tail call i32 @glVertex3f(float 1.000000e+00, float 1.000000e+00, float 1.000000e+00)
%8 = tail call i32 @glColor3f(float 1.000000e+00, float 5.000000e-01, float 0.000000e+00)
%9 = tail call i32 @glVertex3f(float 1.000000e+00, float -1.000000e+00, float 1.000000e+00)
%10 = tail call i32 @glVertex3f(float -1.000000e+00, float -1.000000e+00, float 1.000000e+00)
%11 = tail call i32 @glVertex3f(float -1.000000e+00, float -1.000000e+00, float -1.000000e+00)
%12 = tail call i32 @glVertex3f(float 1.000000e+00, float -1.000000e+00, float -1.000000e+00)
%13 = tail call i32 @glColor3f(float 1.000000e+00, float 0.000000e+00, float 0.000000e+00)
%14 = tail call i32 @glVertex3f(float 1.000000e+00, float 1.000000e+00, float 1.000000e+00)
%15 = tail call i32 @glVertex3f(float -1.000000e+00, float 1.000000e+00, float 1.000000e+00)
%16 = tail call i32 @glVertex3f(float -1.000000e+00, float -1.000000e+00, float 1.000000e+00)
%17 = tail call i32 @glVertex3f(float 1.000000e+00, float -1.000000e+00, float 1.000000e+00)
%18 = tail call i32 @glColor3f(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 -1.000000e+00)
%20 = tail call i32 @glVertex3f(float -1.000000e+00, float -1.000000e+00, float -1.000000e+00)
%21 = tail call i32 @glVertex3f(float -1.000000e+00, float 1.000000e+00, float -1.000000e+00)
%22 = tail call i32 @glVertex3f(float 1.000000e+00, float 1.000000e+00, float -1.000000e+00)
%23 = tail call i32 @glColor3f(float 0.000000e+00, float 0.000000e+00, float 1.000000e+00)
%24 = tail call i32 @glVertex3f(float -1.000000e+00, float 1.000000e+00, float 1.000000e+00)
%25 = tail call i32 @glVertex3f(float -1.000000e+00, float 1.000000e+00, float -1.000000e+00)
%26 = tail call i32 @glVertex3f(float -1.000000e+00, float -1.000000e+00, float -1.000000e+00)
%27 = tail call i32 @glVertex3f(float -1.000000e+00, float -1.000000e+00, float 1.000000e+00)
%28 = tail call i32 @glColor3f(float 1.000000e+00, float 0.000000e+00, float 1.000000e+00)
%29 = tail call i32 @glVertex3f(float 1.000000e+00, float 1.000000e+00, float -1.000000e+00)
%30 = tail call i32 @glVertex3f(float 1.000000e+00, float 1.000000e+00, float 1.000000e+00)
%31 = tail call i32 @glVertex3f(float 1.000000e+00, float -1.000000e+00, float 1.000000e+00)
%32 = tail call i32 @glVertex3f(float 1.000000e+00, float -1.000000e+00, float -1.000000e+00)
%33 = tail call i32 (...) @glEnd()
ret void
}