#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*/ glPopMatrix();
int /*<<< orphan*/ glPushMatrix();
int /*<<< orphan*/ glRotatef(float, float, float, float);
int /*<<< orphan*/ glScalef(float, float, float);
int /*<<< orphan*/ glTexCoord2f(int, int);
int /*<<< orphan*/ glTranslatef(float, float, float);
int /*<<< orphan*/ glVertex3f(float, float, float);
void draw_quad(float x, float y, float z) {
  glPushMatrix();
  glTranslatef(x, y, z);
  glRotatef(90.f, 1.f, 0.f, 0.f);
  glScalef(.03f, .03f, .03f);
  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();
  glPopMatrix();
}


x86 assembly (clang, -O0):
<draw_quad>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movss  %xmm0,-0x4(%rbp)
movss  %xmm1,-0x8(%rbp)
movss  %xmm2,-0xc(%rbp)
mov    $0x0,%al
call   1070 <glPushMatrix@plt>
movss  -0x4(%rbp),%xmm0
movss  -0x8(%rbp),%xmm1
movss  -0xc(%rbp),%xmm2
call   1090 <glTranslatef@plt>
movss  0xe42(%rip),%xmm0
movss  0xe2e(%rip),%xmm1
xorps  %xmm3,%xmm3
movaps %xmm3,%xmm2
call   10b0 <glRotatef@plt>
movss  0xe23(%rip),%xmm2
movaps %xmm2,%xmm0
movaps %xmm2,%xmm1
call   1060 <glScalef@plt>
mov    0x2df1(%rip),%rax
mov    (%rax),%edi
call   10a0 <glBegin@plt>
xor    %esi,%esi
mov    %esi,%edi
call   1080 <glTexCoord2f@plt>
movss  0xdf5(%rip),%xmm2
xorps  %xmm1,%xmm1
movaps %xmm2,%xmm0
call   1030 <glVertex3f@plt>
xor    %edi,%edi
mov    $0x1,%esi
call   1080 <glTexCoord2f@plt>
movss  0xdd6(%rip),%xmm0
xorps  %xmm1,%xmm1
movss  0xdc7(%rip),%xmm2
call   1030 <glVertex3f@plt>
mov    $0x1,%esi
mov    %esi,%edi
call   1080 <glTexCoord2f@plt>
movss  0xdae(%rip),%xmm2
xorps  %xmm1,%xmm1
movaps %xmm2,%xmm0
call   1030 <glVertex3f@plt>
mov    $0x1,%edi
xor    %esi,%esi
call   1080 <glTexCoord2f@plt>
movss  0xd8f(%rip),%xmm0
xorps  %xmm1,%xmm1
movss  0xd88(%rip),%xmm2
call   1030 <glVertex3f@plt>
mov    $0x0,%al
call   1040 <glEnd@plt>
mov    $0x0,%al
call   1050 <glPopMatrix@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<draw_quad>:
sub    $0x18,%rsp
movss  %xmm2,0x14(%rsp)
movss  %xmm1,0x10(%rsp)
movss  %xmm0,0xc(%rsp)
xor    %eax,%eax
call   1070 <glPushMatrix@plt>
movss  0xc(%rsp),%xmm0
movss  0x10(%rsp),%xmm1
movss  0x14(%rsp),%xmm2
call   1090 <glTranslatef@plt>
movss  0xe34(%rip),%xmm0
movss  0xe30(%rip),%xmm1
xorps  %xmm2,%xmm2
xorps  %xmm3,%xmm3
call   10b0 <glRotatef@plt>
movss  0xe21(%rip),%xmm0
movaps %xmm0,%xmm1
movaps %xmm0,%xmm2
call   1060 <glScalef@plt>
mov    0x2def(%rip),%rax
mov    (%rax),%edi
call   10a0 <glBegin@plt>
xor    %edi,%edi
xor    %esi,%esi
call   1080 <glTexCoord2f@plt>
movss  0xdfb(%rip),%xmm0
xorps  %xmm1,%xmm1
movaps %xmm0,%xmm2
call   1030 <glVertex3f@plt>
xor    %edi,%edi
mov    $0x1,%esi
call   1080 <glTexCoord2f@plt>
xorps  %xmm1,%xmm1
movss  0xdd9(%rip),%xmm0
movss  0xdc9(%rip),%xmm2
call   1030 <glVertex3f@plt>
mov    $0x1,%edi
mov    $0x1,%esi
call   1080 <glTexCoord2f@plt>
xorps  %xmm1,%xmm1
movss  0xdaa(%rip),%xmm0
movaps %xmm0,%xmm2
call   1030 <glVertex3f@plt>
mov    $0x1,%edi
xor    %esi,%esi
call   1080 <glTexCoord2f@plt>
xorps  %xmm1,%xmm1
movss  0xd8b(%rip),%xmm0
movss  0xd8b(%rip),%xmm2
call   1030 <glVertex3f@plt>
xor    %eax,%eax
call   1040 <glEnd@plt>
xor    %eax,%eax
add    $0x18,%rsp
jmp    1050 <glPopMatrix@plt>

LLVM IR (-O0):
@GL_QUADS = global i32 0
define void @draw_quad(float %0, float %1, float %2) {
%4 = alloca float
%5 = alloca float
%6 = alloca float
store float %0, float* %4
store float %1, float* %5
store float %2, float* %6
%7 = call i32 (...) @glPushMatrix()
%8 = load float, float* %4
%9 = load float, float* %5
%10 = load float, float* %6
%11 = call i32 @glTranslatef(float %8, float %9, float %10)
%12 = call i32 @glRotatef(float 9.000000e+01, float 1.000000e+00, float 0.000000e+00, float 0.000000e+00)
%13 = call i32 @glScalef(float 0x3F9EB851E0000000, float 0x3F9EB851E0000000, float 0x3F9EB851E0000000)
%14 = load i32, i32* @GL_QUADS
%15 = call i32 @glBegin(i32 %14)
%16 = call i32 @glTexCoord2f(i32 0, i32 0)
%17 = call i32 @glVertex3f(float -1.000000e+00, float 0.000000e+00, float -1.000000e+00)
%18 = call i32 @glTexCoord2f(i32 0, i32 1)
%19 = call i32 @glVertex3f(float -1.000000e+00, float 0.000000e+00, float 1.000000e+00)
%20 = call i32 @glTexCoord2f(i32 1, i32 1)
%21 = call i32 @glVertex3f(float 1.000000e+00, float 0.000000e+00, float 1.000000e+00)
%22 = call i32 @glTexCoord2f(i32 1, i32 0)
%23 = call i32 @glVertex3f(float 1.000000e+00, float 0.000000e+00, float -1.000000e+00)
%24 = call i32 (...) @glEnd()
%25 = call i32 (...) @glPopMatrix()
ret void
}

LLVM IR (-O2):
@GL_QUADS = global i32 0
define void @draw_quad(float %0, float %1, float %2) {
%4 = tail call i32 (...) @glPushMatrix()
%5 = tail call i32 @glTranslatef(float %0, float %1, float %2)
%6 = tail call i32 @glRotatef(float 9.000000e+01, float 1.000000e+00, float 0.000000e+00, float 0.000000e+00)
%7 = tail call i32 @glScalef(float 0x3F9EB851E0000000, float 0x3F9EB851E0000000, float 0x3F9EB851E0000000)
%8 = load i32, i32* @GL_QUADS
%9 = tail call i32 @glBegin(i32 %8)
%10 = tail call i32 @glTexCoord2f(i32 0, i32 0)
%11 = tail call i32 @glVertex3f(float -1.000000e+00, float 0.000000e+00, float -1.000000e+00)
%12 = tail call i32 @glTexCoord2f(i32 0, i32 1)
%13 = tail call i32 @glVertex3f(float -1.000000e+00, float 0.000000e+00, float 1.000000e+00)
%14 = tail call i32 @glTexCoord2f(i32 1, i32 1)
%15 = tail call i32 @glVertex3f(float 1.000000e+00, float 0.000000e+00, float 1.000000e+00)
%16 = tail call i32 @glTexCoord2f(i32 1, i32 0)
%17 = tail call i32 @glVertex3f(float 1.000000e+00, float 0.000000e+00, float -1.000000e+00)
%18 = tail call i32 (...) @glEnd()
%19 = tail call i32 (...) @glPopMatrix()
ret void
}