#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*/ glEnd();
int /*<<< orphan*/ glNormal3f(int, int, int);
int /*<<< orphan*/ glVertex3f(double, double, double);
void draw_cube(void) {
  glBegin(GL_QUADS);
  glNormal3f(0, -1, 0);
  glVertex3f(-.25, -.25, -.25);
  glVertex3f(.25, -.25, -.25);
  glVertex3f(.25, -.25, .25);
  glVertex3f(-.25, -.25, .25);
  glNormal3f(0, 1, 0);
  glVertex3f(-.25, .25, .25);
  glVertex3f(.25, .25, .25);
  glVertex3f(.25, .25, -.25);
  glVertex3f(-.25, .25, -.25);
  glNormal3f(1, 0, 0);
  glVertex3f(.25, -.25, -.25);
  glVertex3f(.25, .25, -.25);
  glVertex3f(.25, .25, .25);
  glVertex3f(.25, -.25, .25);
  glNormal3f(-1, 0, 0);
  glVertex3f(-.25, -.25, .25);
  glVertex3f(-.25, .25, .25);
  glVertex3f(-.25, .25, -.25);
  glVertex3f(-.25, -.25, -.25);
  glNormal3f(0, 0, -1);
  glVertex3f(-.25, .25, -.25);
  glVertex3f(.25, .25, -.25);
  glVertex3f(.25, -.25, -.25);
  glVertex3f(-.25, -.25, -.25);
  glNormal3f(0, 0, 1);
  glVertex3f(-.25, -.25, .25);
  glVertex3f(.25, -.25, .25);
  glVertex3f(.25, .25, .25);
  glVertex3f(-.25, .25, .25);
  glEnd();
}


x86 assembly (clang, -O0):
<draw_cube>:
push   %rbp
mov    %rsp,%rbp
mov    0x2e9d(%rip),%rax
mov    (%rax),%edi
call   1050 <glBegin@plt>
xor    %edx,%edx
mov    $0xffffffff,%esi
mov    %edx,%edi
call   1060 <glNormal3f@plt>
movsd  0xe98(%rip),%xmm2
movaps %xmm2,%xmm0
movaps %xmm2,%xmm1
call   1030 <glVertex3f@plt>
movsd  0xe8d(%rip),%xmm0
movsd  0xe7d(%rip),%xmm2
movaps %xmm2,%xmm1
call   1030 <glVertex3f@plt>
movsd  0xe75(%rip),%xmm2
movsd  0xe65(%rip),%xmm1
movaps %xmm2,%xmm0
call   1030 <glVertex3f@plt>
movsd  0xe55(%rip),%xmm1
movsd  0xe55(%rip),%xmm2
movaps %xmm1,%xmm0
call   1030 <glVertex3f@plt>
xor    %edx,%edx
mov    $0x1,%esi
mov    %edx,%edi
call   1060 <glNormal3f@plt>
movsd  0xe2f(%rip),%xmm0
movsd  0xe2f(%rip),%xmm2
movaps %xmm2,%xmm1
call   1030 <glVertex3f@plt>
movsd  0xe1f(%rip),%xmm2
movaps %xmm2,%xmm0
movaps %xmm2,%xmm1
call   1030 <glVertex3f@plt>
movsd  0xe0c(%rip),%xmm1
movsd  0xdfc(%rip),%xmm2
movaps %xmm1,%xmm0
call   1030 <glVertex3f@plt>
movsd  0xdec(%rip),%xmm2
movsd  0xdec(%rip),%xmm1
movaps %xmm2,%xmm0
call   1030 <glVertex3f@plt>
mov    $0x1,%edi
xor    %edx,%edx
mov    %edx,%esi
call   1060 <glNormal3f@plt>
movsd  0xdce(%rip),%xmm0
movsd  0xdbe(%rip),%xmm2
movaps %xmm2,%xmm1
call   1030 <glVertex3f@plt>
movsd  0xdb6(%rip),%xmm1
movsd  0xda6(%rip),%xmm2
movaps %xmm1,%xmm0
call   1030 <glVertex3f@plt>
movsd  0xd9e(%rip),%xmm2
movaps %xmm2,%xmm0
movaps %xmm2,%xmm1
call   1030 <glVertex3f@plt>
movsd  0xd8b(%rip),%xmm2
movsd  0xd7b(%rip),%xmm1
movaps %xmm2,%xmm0
call   1030 <glVertex3f@plt>
mov    $0xffffffff,%edi
xor    %edx,%edx
mov    %edx,%esi
call   1060 <glNormal3f@plt>
movsd  0xd5d(%rip),%xmm1
movsd  0xd5d(%rip),%xmm2
movaps %xmm1,%xmm0
call   1030 <glVertex3f@plt>
movsd  0xd45(%rip),%xmm0
movsd  0xd45(%rip),%xmm2
movaps %xmm2,%xmm1
call   1030 <glVertex3f@plt>
movsd  0xd2d(%rip),%xmm2
movsd  0xd2d(%rip),%xmm1
movaps %xmm2,%xmm0
call   1030 <glVertex3f@plt>
movsd  0xd15(%rip),%xmm2
movaps %xmm2,%xmm0
movaps %xmm2,%xmm1
call   1030 <glVertex3f@plt>
xor    %esi,%esi
mov    $0xffffffff,%edx
mov    %esi,%edi
call   1060 <glNormal3f@plt>
movsd  0xcf4(%rip),%xmm2
movsd  0xcf4(%rip),%xmm1
movaps %xmm2,%xmm0
call   1030 <glVertex3f@plt>
movsd  0xce4(%rip),%xmm1
movsd  0xcd4(%rip),%xmm2
movaps %xmm1,%xmm0
call   1030 <glVertex3f@plt>
movsd  0xccc(%rip),%xmm0
movsd  0xcbc(%rip),%xmm2
movaps %xmm2,%xmm1
call   1030 <glVertex3f@plt>
movsd  0xcac(%rip),%xmm2
movaps %xmm2,%xmm0
movaps %xmm2,%xmm1
call   1030 <glVertex3f@plt>
xor    %esi,%esi
mov    $0x1,%edx
mov    %esi,%edi
call   1060 <glNormal3f@plt>
movsd  0xc8b(%rip),%xmm1
movsd  0xc8b(%rip),%xmm2
movaps %xmm1,%xmm0
call   1030 <glVertex3f@plt>
movsd  0xc7b(%rip),%xmm2
movsd  0xc6b(%rip),%xmm1
movaps %xmm2,%xmm0
call   1030 <glVertex3f@plt>
movsd  0xc63(%rip),%xmm2
movaps %xmm2,%xmm0
movaps %xmm2,%xmm1
call   1030 <glVertex3f@plt>
movsd  0xc48(%rip),%xmm0
movsd  0xc48(%rip),%xmm2
movaps %xmm2,%xmm1
call   1030 <glVertex3f@plt>
mov    $0x0,%al
call   1040 <glEnd@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<draw_cube>:
push   %rax
mov    0x2ea0(%rip),%rax
mov    (%rax),%edi
call   1050 <glBegin@plt>
xor    %edi,%edi
mov    $0xffffffff,%esi
xor    %edx,%edx
call   1060 <glNormal3f@plt>
movsd  0xe9b(%rip),%xmm0
movaps %xmm0,%xmm1
movaps %xmm0,%xmm2
call   1030 <glVertex3f@plt>
movsd  0xe90(%rip),%xmm0
movsd  0xe80(%rip),%xmm1
movaps %xmm1,%xmm2
call   1030 <glVertex3f@plt>
movsd  0xe78(%rip),%xmm0
movsd  0xe68(%rip),%xmm1
movaps %xmm0,%xmm2
call   1030 <glVertex3f@plt>
movsd  0xe58(%rip),%xmm0
movaps %xmm0,%xmm1
movsd  0xe55(%rip),%xmm2
call   1030 <glVertex3f@plt>
xor    %edi,%edi
mov    $0x1,%esi
xor    %edx,%edx
call   1060 <glNormal3f@plt>
movsd  0xe32(%rip),%xmm0
movsd  0xe32(%rip),%xmm1
movaps %xmm1,%xmm2
call   1030 <glVertex3f@plt>
movsd  0xe22(%rip),%xmm0
movaps %xmm0,%xmm1
movaps %xmm0,%xmm2
call   1030 <glVertex3f@plt>
movsd  0xe0f(%rip),%xmm0
movaps %xmm0,%xmm1
movsd  0xdfc(%rip),%xmm2
call   1030 <glVertex3f@plt>
movsd  0xdef(%rip),%xmm0
movsd  0xdef(%rip),%xmm1
movaps %xmm0,%xmm2
call   1030 <glVertex3f@plt>
mov    $0x1,%edi
xor    %esi,%esi
xor    %edx,%edx
call   1060 <glNormal3f@plt>
movsd  0xdd1(%rip),%xmm0
movsd  0xdc1(%rip),%xmm1
movaps %xmm1,%xmm2
call   1030 <glVertex3f@plt>
movsd  0xdb9(%rip),%xmm0
movaps %xmm0,%xmm1
movsd  0xda6(%rip),%xmm2
call   1030 <glVertex3f@plt>
movsd  0xda1(%rip),%xmm0
movaps %xmm0,%xmm1
movaps %xmm0,%xmm2
call   1030 <glVertex3f@plt>
movsd  0xd8e(%rip),%xmm0
movsd  0xd7e(%rip),%xmm1
movaps %xmm0,%xmm2
call   1030 <glVertex3f@plt>
mov    $0xffffffff,%edi
xor    %esi,%esi
xor    %edx,%edx
call   1060 <glNormal3f@plt>
movsd  0xd60(%rip),%xmm0
movaps %xmm0,%xmm1
movsd  0xd5d(%rip),%xmm2
call   1030 <glVertex3f@plt>
movsd  0xd48(%rip),%xmm0
movsd  0xd48(%rip),%xmm1
movaps %xmm1,%xmm2
call   1030 <glVertex3f@plt>
movsd  0xd30(%rip),%xmm0
movsd  0xd30(%rip),%xmm1
movaps %xmm0,%xmm2
call   1030 <glVertex3f@plt>
movsd  0xd18(%rip),%xmm0
movaps %xmm0,%xmm1
movaps %xmm0,%xmm2
call   1030 <glVertex3f@plt>
xor    %edi,%edi
xor    %esi,%esi
mov    $0xffffffff,%edx
call   1060 <glNormal3f@plt>
movsd  0xcf7(%rip),%xmm0
movsd  0xcf7(%rip),%xmm1
movaps %xmm0,%xmm2
call   1030 <glVertex3f@plt>
movsd  0xce7(%rip),%xmm0
movaps %xmm0,%xmm1
movsd  0xcd4(%rip),%xmm2
call   1030 <glVertex3f@plt>
movsd  0xccf(%rip),%xmm0
movsd  0xcbf(%rip),%xmm1
movaps %xmm1,%xmm2
call   1030 <glVertex3f@plt>
movsd  0xcaf(%rip),%xmm0
movaps %xmm0,%xmm1
movaps %xmm0,%xmm2
call   1030 <glVertex3f@plt>
xor    %edi,%edi
xor    %esi,%esi
mov    $0x1,%edx
call   1060 <glNormal3f@plt>
movsd  0xc8e(%rip),%xmm0
movaps %xmm0,%xmm1
movsd  0xc8b(%rip),%xmm2
call   1030 <glVertex3f@plt>
movsd  0xc7e(%rip),%xmm0
movsd  0xc6e(%rip),%xmm1
movaps %xmm0,%xmm2
call   1030 <glVertex3f@plt>
movsd  0xc66(%rip),%xmm0
movaps %xmm0,%xmm1
movaps %xmm0,%xmm2
call   1030 <glVertex3f@plt>
movsd  0xc4b(%rip),%xmm0
movsd  0xc4b(%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 @draw_cube() {
%1 = load i32, i32* @GL_QUADS
%2 = call i32 @glBegin(i32 %1)
%3 = call i32 @glNormal3f(i32 0, i32 -1, i32 0)
%4 = call i32 @glVertex3f(double -2.500000e-01, double -2.500000e-01, double -2.500000e-01)
%5 = call i32 @glVertex3f(double 2.500000e-01, double -2.500000e-01, double -2.500000e-01)
%6 = call i32 @glVertex3f(double 2.500000e-01, double -2.500000e-01, double 2.500000e-01)
%7 = call i32 @glVertex3f(double -2.500000e-01, double -2.500000e-01, double 2.500000e-01)
%8 = call i32 @glNormal3f(i32 0, i32 1, i32 0)
%9 = call i32 @glVertex3f(double -2.500000e-01, double 2.500000e-01, double 2.500000e-01)
%10 = call i32 @glVertex3f(double 2.500000e-01, double 2.500000e-01, double 2.500000e-01)
%11 = call i32 @glVertex3f(double 2.500000e-01, double 2.500000e-01, double -2.500000e-01)
%12 = call i32 @glVertex3f(double -2.500000e-01, double 2.500000e-01, double -2.500000e-01)
%13 = call i32 @glNormal3f(i32 1, i32 0, i32 0)
%14 = call i32 @glVertex3f(double 2.500000e-01, double -2.500000e-01, double -2.500000e-01)
%15 = call i32 @glVertex3f(double 2.500000e-01, double 2.500000e-01, double -2.500000e-01)
%16 = call i32 @glVertex3f(double 2.500000e-01, double 2.500000e-01, double 2.500000e-01)
%17 = call i32 @glVertex3f(double 2.500000e-01, double -2.500000e-01, double 2.500000e-01)
%18 = call i32 @glNormal3f(i32 -1, i32 0, i32 0)
%19 = call i32 @glVertex3f(double -2.500000e-01, double -2.500000e-01, double 2.500000e-01)
%20 = call i32 @glVertex3f(double -2.500000e-01, double 2.500000e-01, double 2.500000e-01)
%21 = call i32 @glVertex3f(double -2.500000e-01, double 2.500000e-01, double -2.500000e-01)
%22 = call i32 @glVertex3f(double -2.500000e-01, double -2.500000e-01, double -2.500000e-01)
%23 = call i32 @glNormal3f(i32 0, i32 0, i32 -1)
%24 = call i32 @glVertex3f(double -2.500000e-01, double 2.500000e-01, double -2.500000e-01)
%25 = call i32 @glVertex3f(double 2.500000e-01, double 2.500000e-01, double -2.500000e-01)
%26 = call i32 @glVertex3f(double 2.500000e-01, double -2.500000e-01, double -2.500000e-01)
%27 = call i32 @glVertex3f(double -2.500000e-01, double -2.500000e-01, double -2.500000e-01)
%28 = call i32 @glNormal3f(i32 0, i32 0, i32 1)
%29 = call i32 @glVertex3f(double -2.500000e-01, double -2.500000e-01, double 2.500000e-01)
%30 = call i32 @glVertex3f(double 2.500000e-01, double -2.500000e-01, double 2.500000e-01)
%31 = call i32 @glVertex3f(double 2.500000e-01, double 2.500000e-01, double 2.500000e-01)
%32 = call i32 @glVertex3f(double -2.500000e-01, double 2.500000e-01, double 2.500000e-01)
%33 = call i32 (...) @glEnd()
ret void
}

LLVM IR (-O2):
@GL_QUADS = global i32 0
define void @draw_cube() {
%1 = load i32, i32* @GL_QUADS
%2 = tail call i32 @glBegin(i32 %1)
%3 = tail call i32 @glNormal3f(i32 0, i32 -1, i32 0)
%4 = tail call i32 @glVertex3f(double -2.500000e-01, double -2.500000e-01, double -2.500000e-01)
%5 = tail call i32 @glVertex3f(double 2.500000e-01, double -2.500000e-01, double -2.500000e-01)
%6 = tail call i32 @glVertex3f(double 2.500000e-01, double -2.500000e-01, double 2.500000e-01)
%7 = tail call i32 @glVertex3f(double -2.500000e-01, double -2.500000e-01, double 2.500000e-01)
%8 = tail call i32 @glNormal3f(i32 0, i32 1, i32 0)
%9 = tail call i32 @glVertex3f(double -2.500000e-01, double 2.500000e-01, double 2.500000e-01)
%10 = tail call i32 @glVertex3f(double 2.500000e-01, double 2.500000e-01, double 2.500000e-01)
%11 = tail call i32 @glVertex3f(double 2.500000e-01, double 2.500000e-01, double -2.500000e-01)
%12 = tail call i32 @glVertex3f(double -2.500000e-01, double 2.500000e-01, double -2.500000e-01)
%13 = tail call i32 @glNormal3f(i32 1, i32 0, i32 0)
%14 = tail call i32 @glVertex3f(double 2.500000e-01, double -2.500000e-01, double -2.500000e-01)
%15 = tail call i32 @glVertex3f(double 2.500000e-01, double 2.500000e-01, double -2.500000e-01)
%16 = tail call i32 @glVertex3f(double 2.500000e-01, double 2.500000e-01, double 2.500000e-01)
%17 = tail call i32 @glVertex3f(double 2.500000e-01, double -2.500000e-01, double 2.500000e-01)
%18 = tail call i32 @glNormal3f(i32 -1, i32 0, i32 0)
%19 = tail call i32 @glVertex3f(double -2.500000e-01, double -2.500000e-01, double 2.500000e-01)
%20 = tail call i32 @glVertex3f(double -2.500000e-01, double 2.500000e-01, double 2.500000e-01)
%21 = tail call i32 @glVertex3f(double -2.500000e-01, double 2.500000e-01, double -2.500000e-01)
%22 = tail call i32 @glVertex3f(double -2.500000e-01, double -2.500000e-01, double -2.500000e-01)
%23 = tail call i32 @glNormal3f(i32 0, i32 0, i32 -1)
%24 = tail call i32 @glVertex3f(double -2.500000e-01, double 2.500000e-01, double -2.500000e-01)
%25 = tail call i32 @glVertex3f(double 2.500000e-01, double 2.500000e-01, double -2.500000e-01)
%26 = tail call i32 @glVertex3f(double 2.500000e-01, double -2.500000e-01, double -2.500000e-01)
%27 = tail call i32 @glVertex3f(double -2.500000e-01, double -2.500000e-01, double -2.500000e-01)
%28 = tail call i32 @glNormal3f(i32 0, i32 0, i32 1)
%29 = tail call i32 @glVertex3f(double -2.500000e-01, double -2.500000e-01, double 2.500000e-01)
%30 = tail call i32 @glVertex3f(double 2.500000e-01, double -2.500000e-01, double 2.500000e-01)
%31 = tail call i32 @glVertex3f(double 2.500000e-01, double 2.500000e-01, double 2.500000e-01)
%32 = tail call i32 @glVertex3f(double -2.500000e-01, double 2.500000e-01, double 2.500000e-01)
%33 = tail call i32 (...) @glEnd()
ret void
}