#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*/ glColor4f(double, double, double, double);
int /*<<< orphan*/ glEnd();
int /*<<< orphan*/ glTexCoord2f(int, int);
int /*<<< orphan*/ glVertex3f(float, float, float);
void draw_base(void) {
  glColor4f(.1, .3, .1, 1.0);
  glBegin(GL_QUADS);
  glTexCoord2f(0, 0);
  glVertex3f(-1.f, 0.f, -1.f);
  glTexCoord2f(0, 1);
  glVertex3f(-1.f, 0.f, 1.f);
  glTexCoord2f(1, 1);
  glVertex3f(1.f, 0.f, 1.f);
  glTexCoord2f(1, 0);
  glVertex3f(1.f, 0.f, -1.f);
  glEnd();
}


x86 assembly (clang, -O0):
<draw_base>:
push   %rbp
mov    %rsp,%rbp
movsd  0xeac(%rip),%xmm2
movsd  0xeac(%rip),%xmm1
movsd  0xeac(%rip),%xmm3
movaps %xmm2,%xmm0
call   1030 <glColor4f@plt>
mov    0x2e6d(%rip),%rax
mov    (%rax),%edi
call   1070 <glBegin@plt>
xor    %esi,%esi
mov    %esi,%edi
call   1060 <glTexCoord2f@plt>
movss  0xe71(%rip),%xmm2
xorps  %xmm1,%xmm1
movaps %xmm2,%xmm0
call   1040 <glVertex3f@plt>
xor    %edi,%edi
mov    $0x1,%esi
call   1060 <glTexCoord2f@plt>
movss  0xe52(%rip),%xmm0
xorps  %xmm1,%xmm1
movss  0xe43(%rip),%xmm2
call   1040 <glVertex3f@plt>
mov    $0x1,%esi
mov    %esi,%edi
call   1060 <glTexCoord2f@plt>
movss  0xe2a(%rip),%xmm2
xorps  %xmm1,%xmm1
movaps %xmm2,%xmm0
call   1040 <glVertex3f@plt>
mov    $0x1,%edi
xor    %esi,%esi
call   1060 <glTexCoord2f@plt>
movss  0xe0b(%rip),%xmm0
xorps  %xmm1,%xmm1
movss  0xe04(%rip),%xmm2
call   1040 <glVertex3f@plt>
mov    $0x0,%al
call   1050 <glEnd@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<draw_base>:
push   %rax
movsd  0xea7(%rip),%xmm1
movsd  0xea7(%rip),%xmm0
movsd  0xea7(%rip),%xmm3
movaps %xmm0,%xmm2
call   1030 <glColor4f@plt>
mov    0x2e70(%rip),%rax
mov    (%rax),%edi
call   1070 <glBegin@plt>
xor    %edi,%edi
xor    %esi,%esi
call   1060 <glTexCoord2f@plt>
movss  0xe88(%rip),%xmm0
xorps  %xmm1,%xmm1
movaps %xmm0,%xmm2
call   1040 <glVertex3f@plt>
xor    %edi,%edi
mov    $0x1,%esi
call   1060 <glTexCoord2f@plt>
movss  0xe6d(%rip),%xmm2
xorps  %xmm1,%xmm1
movss  0xe5e(%rip),%xmm0
call   1040 <glVertex3f@plt>
mov    $0x1,%edi
mov    $0x1,%esi
call   1060 <glTexCoord2f@plt>
xorps  %xmm1,%xmm1
movss  0xe43(%rip),%xmm0
movaps %xmm0,%xmm2
call   1040 <glVertex3f@plt>
mov    $0x1,%edi
xor    %esi,%esi
call   1060 <glTexCoord2f@plt>
xorps  %xmm1,%xmm1
movss  0xe24(%rip),%xmm0
movss  0xe18(%rip),%xmm2
call   1040 <glVertex3f@plt>
xor    %eax,%eax
pop    %rcx
jmp    1050 <glEnd@plt>

LLVM IR (-O0):
@GL_QUADS = global i32 0
define void @draw_base() {
%1 = call i32 @glColor4f(double 1.000000e-01, double 3.000000e-01, double 1.000000e-01, double 1.000000e+00)
%2 = load i32, i32* @GL_QUADS
%3 = call i32 @glBegin(i32 %2)
%4 = call i32 @glTexCoord2f(i32 0, i32 0)
%5 = call i32 @glVertex3f(float -1.000000e+00, float 0.000000e+00, float -1.000000e+00)
%6 = call i32 @glTexCoord2f(i32 0, i32 1)
%7 = call i32 @glVertex3f(float -1.000000e+00, float 0.000000e+00, float 1.000000e+00)
%8 = call i32 @glTexCoord2f(i32 1, i32 1)
%9 = call i32 @glVertex3f(float 1.000000e+00, float 0.000000e+00, float 1.000000e+00)
%10 = call i32 @glTexCoord2f(i32 1, i32 0)
%11 = call i32 @glVertex3f(float 1.000000e+00, float 0.000000e+00, float -1.000000e+00)
%12 = call i32 (...) @glEnd()
ret void
}

LLVM IR (-O2):
@GL_QUADS = global i32 0
define void @draw_base() {
%1 = tail call i32 @glColor4f(double 1.000000e-01, double 3.000000e-01, double 1.000000e-01, double 1.000000e+00)
%2 = load i32, i32* @GL_QUADS
%3 = tail call i32 @glBegin(i32 %2)
%4 = tail call i32 @glTexCoord2f(i32 0, i32 0)
%5 = tail call i32 @glVertex3f(float -1.000000e+00, float 0.000000e+00, float -1.000000e+00)
%6 = tail call i32 @glTexCoord2f(i32 0, i32 1)
%7 = tail call i32 @glVertex3f(float -1.000000e+00, float 0.000000e+00, float 1.000000e+00)
%8 = tail call i32 @glTexCoord2f(i32 1, i32 1)
%9 = tail call i32 @glVertex3f(float 1.000000e+00, float 0.000000e+00, float 1.000000e+00)
%10 = tail call i32 @glTexCoord2f(i32 1, i32 0)
%11 = tail call i32 @glVertex3f(float 1.000000e+00, float 0.000000e+00, float -1.000000e+00)
%12 = tail call i32 (...) @glEnd()
ret void
}