#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(double, double, double);
int /*<<< orphan*/ glVertex3f(double, double, double);
void drawPlane(void) {
  glBegin(GL_QUADS);
  glNormal3f(0.0, 0.0, 1.0);
  glVertex3f(-1.0, -1.0, 0.0);
  glVertex3f(0.0, -1.0, 0.0);
  glVertex3f(0.0, 0.0, 0.0);
  glVertex3f(-1.0, 0.0, 0.0);
  glNormal3f(0.0, 0.0, 1.0);
  glVertex3f(0.0, -1.0, 0.0);
  glVertex3f(1.0, -1.0, 0.0);
  glVertex3f(1.0, 0.0, 0.0);
  glVertex3f(0.0, 0.0, 0.0);
  glNormal3f(0.0, 0.0, 1.0);
  glVertex3f(0.0, 0.0, 0.0);
  glVertex3f(1.0, 0.0, 0.0);
  glVertex3f(1.0, 1.0, 0.0);
  glVertex3f(0.0, 1.0, 0.0);
  glNormal3f(0.0, 0.0, 1.0);
  glVertex3f(0.0, 0.0, 0.0);
  glVertex3f(0.0, 1.0, 0.0);
  glVertex3f(-1.0, 1.0, 0.0);
  glVertex3f(-1.0, 0.0, 0.0);
  glEnd();
}


x86 assembly (clang, -O0):
<drawPlane>:
push   %rbp
mov    %rsp,%rbp
mov    0x2e9d(%rip),%rax
mov    (%rax),%edi
call   1050 <glBegin@plt>
xorps  %xmm1,%xmm1
movsd  0xeab(%rip),%xmm2
movaps %xmm1,%xmm0
call   1060 <glNormal3f@plt>
movsd  0xe93(%rip),%xmm1
xorps  %xmm2,%xmm2
movaps %xmm1,%xmm0
call   1030 <glVertex3f@plt>
xorps  %xmm2,%xmm2
movsd  0xe7d(%rip),%xmm1
movaps %xmm2,%xmm0
call   1030 <glVertex3f@plt>
xorps  %xmm2,%xmm2
movaps %xmm2,%xmm0
movaps %xmm2,%xmm1
call   1030 <glVertex3f@plt>
movsd  0xe5f(%rip),%xmm0
xorps  %xmm2,%xmm2
movaps %xmm2,%xmm1
call   1030 <glVertex3f@plt>
xorps  %xmm1,%xmm1
movsd  0xe51(%rip),%xmm2
movaps %xmm1,%xmm0
call   1060 <glNormal3f@plt>
xorps  %xmm2,%xmm2
movsd  0xe36(%rip),%xmm1
movaps %xmm2,%xmm0
call   1030 <glVertex3f@plt>
movsd  0xe2e(%rip),%xmm0
movsd  0xe1e(%rip),%xmm1
xorps  %xmm2,%xmm2
call   1030 <glVertex3f@plt>
movsd  0xe16(%rip),%xmm0
xorps  %xmm2,%xmm2
movaps %xmm2,%xmm1
call   1030 <glVertex3f@plt>
xorps  %xmm2,%xmm2
movaps %xmm2,%xmm0
movaps %xmm2,%xmm1
call   1030 <glVertex3f@plt>
xorps  %xmm1,%xmm1
movsd  0xdf2(%rip),%xmm2
movaps %xmm1,%xmm0
call   1060 <glNormal3f@plt>
xorps  %xmm2,%xmm2
movaps %xmm2,%xmm0
movaps %xmm2,%xmm1
call   1030 <glVertex3f@plt>
movsd  0xdd4(%rip),%xmm0
xorps  %xmm2,%xmm2
movaps %xmm2,%xmm1
call   1030 <glVertex3f@plt>
movsd  0xdc1(%rip),%xmm1
xorps  %xmm2,%xmm2
movaps %xmm1,%xmm0
call   1030 <glVertex3f@plt>
xorps  %xmm2,%xmm2
movsd  0xdab(%rip),%xmm1
movaps %xmm2,%xmm0
call   1030 <glVertex3f@plt>
xorps  %xmm1,%xmm1
movsd  0xd98(%rip),%xmm2
movaps %xmm1,%xmm0
call   1060 <glNormal3f@plt>
xorps  %xmm2,%xmm2
movaps %xmm2,%xmm0
movaps %xmm2,%xmm1
call   1030 <glVertex3f@plt>
xorps  %xmm2,%xmm2
movsd  0xd77(%rip),%xmm1
movaps %xmm2,%xmm0
call   1030 <glVertex3f@plt>
movsd  0xd5f(%rip),%xmm0
movsd  0xd5f(%rip),%xmm1
xorps  %xmm2,%xmm2
call   1030 <glVertex3f@plt>
movsd  0xd47(%rip),%xmm0
xorps  %xmm2,%xmm2
movaps %xmm2,%xmm1
call   1030 <glVertex3f@plt>
mov    $0x0,%al
call   1040 <glEnd@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<drawPlane>:
push   %rax
mov    0x2ea0(%rip),%rax
mov    (%rax),%edi
call   1050 <glBegin@plt>
movsd  0xea9(%rip),%xmm2
xorps  %xmm0,%xmm0
xorps  %xmm1,%xmm1
call   1060 <glNormal3f@plt>
movsd  0xe9e(%rip),%xmm0
xorps  %xmm2,%xmm2
movaps %xmm0,%xmm1
call   1030 <glVertex3f@plt>
xorps  %xmm0,%xmm0
xorps  %xmm2,%xmm2
movsd  0xe85(%rip),%xmm1
call   1030 <glVertex3f@plt>
xorps  %xmm0,%xmm0
xorps  %xmm1,%xmm1
xorps  %xmm2,%xmm2
call   1030 <glVertex3f@plt>
xorps  %xmm1,%xmm1
xorps  %xmm2,%xmm2
movsd  0xe64(%rip),%xmm0
call   1030 <glVertex3f@plt>
xorps  %xmm0,%xmm0
xorps  %xmm1,%xmm1
movsd  0xe49(%rip),%xmm2
call   1060 <glNormal3f@plt>
xorps  %xmm0,%xmm0
xorps  %xmm2,%xmm2
movsd  0xe3e(%rip),%xmm1
call   1030 <glVertex3f@plt>
xorps  %xmm2,%xmm2
movsd  0xe26(%rip),%xmm0
movsd  0xe26(%rip),%xmm1
call   1030 <glVertex3f@plt>
xorps  %xmm1,%xmm1
xorps  %xmm2,%xmm2
movsd  0xe0b(%rip),%xmm0
call   1030 <glVertex3f@plt>
xorps  %xmm0,%xmm0
xorps  %xmm1,%xmm1
xorps  %xmm2,%xmm2
call   1030 <glVertex3f@plt>
xorps  %xmm0,%xmm0
xorps  %xmm1,%xmm1
movsd  0xdea(%rip),%xmm2
call   1060 <glNormal3f@plt>
xorps  %xmm0,%xmm0
xorps  %xmm1,%xmm1
xorps  %xmm2,%xmm2
call   1030 <glVertex3f@plt>
xorps  %xmm1,%xmm1
xorps  %xmm2,%xmm2
movsd  0xdc9(%rip),%xmm0
call   1030 <glVertex3f@plt>
xorps  %xmm2,%xmm2
movsd  0xdb9(%rip),%xmm0
movaps %xmm0,%xmm1
call   1030 <glVertex3f@plt>
xorps  %xmm0,%xmm0
xorps  %xmm2,%xmm2
movsd  0xda3(%rip),%xmm1
call   1030 <glVertex3f@plt>
xorps  %xmm0,%xmm0
xorps  %xmm1,%xmm1
movsd  0xd90(%rip),%xmm2
call   1060 <glNormal3f@plt>
xorps  %xmm0,%xmm0
xorps  %xmm1,%xmm1
xorps  %xmm2,%xmm2
call   1030 <glVertex3f@plt>
xorps  %xmm0,%xmm0
xorps  %xmm2,%xmm2
movsd  0xd6f(%rip),%xmm1
call   1030 <glVertex3f@plt>
xorps  %xmm2,%xmm2
movsd  0xd67(%rip),%xmm0
movsd  0xd57(%rip),%xmm1
call   1030 <glVertex3f@plt>
xorps  %xmm1,%xmm1
xorps  %xmm2,%xmm2
movsd  0xd4c(%rip),%xmm0
call   1030 <glVertex3f@plt>
xor    %eax,%eax
pop    %rcx
jmp    1040 <glEnd@plt>

LLVM IR (-O0):
@GL_QUADS = global i32 0
define void @drawPlane() {
%1 = load i32, i32* @GL_QUADS
%2 = call i32 @glBegin(i32 %1)
%3 = call i32 @glNormal3f(double 0.000000e+00, double 0.000000e+00, double 1.000000e+00)
%4 = call i32 @glVertex3f(double -1.000000e+00, double -1.000000e+00, double 0.000000e+00)
%5 = call i32 @glVertex3f(double 0.000000e+00, double -1.000000e+00, double 0.000000e+00)
%6 = call i32 @glVertex3f(double 0.000000e+00, double 0.000000e+00, double 0.000000e+00)
%7 = call i32 @glVertex3f(double -1.000000e+00, double 0.000000e+00, double 0.000000e+00)
%8 = call i32 @glNormal3f(double 0.000000e+00, double 0.000000e+00, double 1.000000e+00)
%9 = call i32 @glVertex3f(double 0.000000e+00, double -1.000000e+00, double 0.000000e+00)
%10 = call i32 @glVertex3f(double 1.000000e+00, double -1.000000e+00, double 0.000000e+00)
%11 = call i32 @glVertex3f(double 1.000000e+00, double 0.000000e+00, double 0.000000e+00)
%12 = call i32 @glVertex3f(double 0.000000e+00, double 0.000000e+00, double 0.000000e+00)
%13 = call i32 @glNormal3f(double 0.000000e+00, double 0.000000e+00, double 1.000000e+00)
%14 = call i32 @glVertex3f(double 0.000000e+00, double 0.000000e+00, double 0.000000e+00)
%15 = call i32 @glVertex3f(double 1.000000e+00, double 0.000000e+00, double 0.000000e+00)
%16 = call i32 @glVertex3f(double 1.000000e+00, double 1.000000e+00, double 0.000000e+00)
%17 = call i32 @glVertex3f(double 0.000000e+00, double 1.000000e+00, double 0.000000e+00)
%18 = call i32 @glNormal3f(double 0.000000e+00, double 0.000000e+00, double 1.000000e+00)
%19 = call i32 @glVertex3f(double 0.000000e+00, double 0.000000e+00, double 0.000000e+00)
%20 = call i32 @glVertex3f(double 0.000000e+00, double 1.000000e+00, double 0.000000e+00)
%21 = call i32 @glVertex3f(double -1.000000e+00, double 1.000000e+00, double 0.000000e+00)
%22 = call i32 @glVertex3f(double -1.000000e+00, double 0.000000e+00, double 0.000000e+00)
%23 = call i32 (...) @glEnd()
ret void
}

LLVM IR (-O2):
@GL_QUADS = global i32 0
define void @drawPlane() {
%1 = load i32, i32* @GL_QUADS
%2 = tail call i32 @glBegin(i32 %1)
%3 = tail call i32 @glNormal3f(double 0.000000e+00, double 0.000000e+00, double 1.000000e+00)
%4 = tail call i32 @glVertex3f(double -1.000000e+00, double -1.000000e+00, double 0.000000e+00)
%5 = tail call i32 @glVertex3f(double 0.000000e+00, double -1.000000e+00, double 0.000000e+00)
%6 = tail call i32 @glVertex3f(double 0.000000e+00, double 0.000000e+00, double 0.000000e+00)
%7 = tail call i32 @glVertex3f(double -1.000000e+00, double 0.000000e+00, double 0.000000e+00)
%8 = tail call i32 @glNormal3f(double 0.000000e+00, double 0.000000e+00, double 1.000000e+00)
%9 = tail call i32 @glVertex3f(double 0.000000e+00, double -1.000000e+00, double 0.000000e+00)
%10 = tail call i32 @glVertex3f(double 1.000000e+00, double -1.000000e+00, double 0.000000e+00)
%11 = tail call i32 @glVertex3f(double 1.000000e+00, double 0.000000e+00, double 0.000000e+00)
%12 = tail call i32 @glVertex3f(double 0.000000e+00, double 0.000000e+00, double 0.000000e+00)
%13 = tail call i32 @glNormal3f(double 0.000000e+00, double 0.000000e+00, double 1.000000e+00)
%14 = tail call i32 @glVertex3f(double 0.000000e+00, double 0.000000e+00, double 0.000000e+00)
%15 = tail call i32 @glVertex3f(double 1.000000e+00, double 0.000000e+00, double 0.000000e+00)
%16 = tail call i32 @glVertex3f(double 1.000000e+00, double 1.000000e+00, double 0.000000e+00)
%17 = tail call i32 @glVertex3f(double 0.000000e+00, double 1.000000e+00, double 0.000000e+00)
%18 = tail call i32 @glNormal3f(double 0.000000e+00, double 0.000000e+00, double 1.000000e+00)
%19 = tail call i32 @glVertex3f(double 0.000000e+00, double 0.000000e+00, double 0.000000e+00)
%20 = tail call i32 @glVertex3f(double 0.000000e+00, double 1.000000e+00, double 0.000000e+00)
%21 = tail call i32 @glVertex3f(double -1.000000e+00, double 1.000000e+00, double 0.000000e+00)
%22 = tail call i32 @glVertex3f(double -1.000000e+00, double 0.000000e+00, double 0.000000e+00)
%23 = tail call i32 (...) @glEnd()
ret void
}