#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 */
typedef int /*<<< orphan*/ GLfloat;

/* Variables and functions */
int /*<<< orphan*/ GL_AMBIENT;
int /*<<< orphan*/ GL_DIFFUSE;
int /*<<< orphan*/ GL_FRONT;
int /*<<< orphan*/ drawCube(int /*<<< orphan*/ *, int /*<<< orphan*/ *);
int /*<<< orphan*/ glMaterialfv(int /*<<< orphan*/, int /*<<< orphan*/,
                                int /*<<< orphan*/ *);
int /*<<< orphan*/ glPopMatrix();
int /*<<< orphan*/ glPushMatrix();
int /*<<< orphan*/ glRotatef(double, double, double, double);
int /*<<< orphan*/ glScalef(double, double, double);
int /*<<< orphan*/ glTranslatef(double, double, double);
void drawPanels(GLfloat color[4], GLfloat ambient[4]) {
  glMaterialfv(GL_FRONT, GL_DIFFUSE, color);
  glMaterialfv(GL_FRONT, GL_AMBIENT, ambient);
  glPushMatrix();
  glTranslatef(0.95, 0.0, -0.45);
  glRotatef(45.0, 1.0, 0.0, 0.0);
  glScalef(0.65, 0.20, 0.02);
  drawCube(color, ambient);
  glPopMatrix();
  glPushMatrix();
  glTranslatef(-0.95, 0.0, -0.45);
  glRotatef(45.0, 1.0, 0.0, 0.0);
  glScalef(0.65, 0.20, 0.02);
  drawCube(color, ambient);
  glPopMatrix();
}


x86 assembly (clang, -O0):
<drawPanels>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    0x2e59(%rip),%rax
mov    (%rax),%edi
mov    0x2e40(%rip),%rax
mov    (%rax),%esi
mov    -0x8(%rbp),%rdx
call   1080 <glMaterialfv@plt>
mov    0x2e3e(%rip),%rax
mov    (%rax),%edi
mov    0x2e45(%rip),%rax
mov    (%rax),%esi
mov    -0x10(%rbp),%rdx
call   1080 <glMaterialfv@plt>
mov    $0x0,%al
call   1060 <glPushMatrix@plt>
movsd  0xe73(%rip),%xmm0
xorps  %xmm1,%xmm1
movsd  0xe60(%rip),%xmm2
call   1070 <glTranslatef@plt>
movsd  0xe3b(%rip),%xmm0
movsd  0xe3b(%rip),%xmm1
xorps  %xmm3,%xmm3
movaps %xmm3,%xmm2
call   1090 <glRotatef@plt>
movsd  0xe08(%rip),%xmm0
movsd  0xe08(%rip),%xmm1
movsd  0xe08(%rip),%xmm2
call   1040 <glScalef@plt>
mov    -0x8(%rbp),%rdi
mov    -0x10(%rbp),%rsi
call   1050 <drawCube@plt>
mov    $0x0,%al
call   1030 <glPopMatrix@plt>
mov    $0x0,%al
call   1060 <glPushMatrix@plt>
movsd  0xdf8(%rip),%xmm0
xorps  %xmm1,%xmm1
movsd  0xdf5(%rip),%xmm2
call   1070 <glTranslatef@plt>
movsd  0xdd0(%rip),%xmm0
movsd  0xdd0(%rip),%xmm1
xorps  %xmm3,%xmm3
movaps %xmm3,%xmm2
call   1090 <glRotatef@plt>
movsd  0xd9d(%rip),%xmm0
movsd  0xd9d(%rip),%xmm1
movsd  0xd9d(%rip),%xmm2
call   1040 <glScalef@plt>
mov    -0x8(%rbp),%rdi
mov    -0x10(%rbp),%rsi
call   1050 <drawCube@plt>
mov    $0x0,%al
call   1030 <glPopMatrix@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<drawPanels>:
push   %r15
push   %r14
push   %rbx
mov    %rsi,%r14
mov    %rdi,%r15
mov    0x2e5e(%rip),%rbx
mov    (%rbx),%edi
mov    0x2e45(%rip),%rax
mov    (%rax),%esi
mov    %r15,%rdx
call   1080 <glMaterialfv@plt>
mov    (%rbx),%edi
mov    0x2e52(%rip),%rax
mov    (%rax),%esi
mov    %r14,%rdx
call   1080 <glMaterialfv@plt>
xor    %eax,%eax
call   1060 <glPushMatrix@plt>
movsd  0xe49(%rip),%xmm0
movsd  0xe49(%rip),%xmm2
xorps  %xmm1,%xmm1
call   1070 <glTranslatef@plt>
movsd  0xe41(%rip),%xmm0
movsd  0xe41(%rip),%xmm1
xorps  %xmm2,%xmm2
xorps  %xmm3,%xmm3
call   1090 <glRotatef@plt>
movsd  0xe36(%rip),%xmm0
movsd  0xe36(%rip),%xmm1
movsd  0xe36(%rip),%xmm2
call   1040 <glScalef@plt>
mov    %r15,%rdi
mov    %r14,%rsi
call   1050 <drawCube@plt>
xor    %eax,%eax
call   1030 <glPopMatrix@plt>
xor    %eax,%eax
call   1060 <glPushMatrix@plt>
movsd  0xe18(%rip),%xmm0
xorps  %xmm1,%xmm1
movsd  0xddd(%rip),%xmm2
call   1070 <glTranslatef@plt>
xorps  %xmm2,%xmm2
xorps  %xmm3,%xmm3
movsd  0xdd2(%rip),%xmm0
movsd  0xdd2(%rip),%xmm1
call   1090 <glRotatef@plt>
movsd  0xdcd(%rip),%xmm0
movsd  0xdcd(%rip),%xmm1
movsd  0xdcd(%rip),%xmm2
call   1040 <glScalef@plt>
mov    %r15,%rdi
mov    %r14,%rsi
call   1050 <drawCube@plt>
xor    %eax,%eax
pop    %rbx
pop    %r14
pop    %r15
jmp    1030 <glPopMatrix@plt>

LLVM IR (-O0):
@GL_FRONT = global i32 0
@GL_DIFFUSE = global i32 0
@GL_AMBIENT = global i32 0
define void @drawPanels(i32* %0, i32* %1) {
%3 = alloca i32*
%4 = alloca i32*
store i32* %0, i32** %3
store i32* %1, i32** %4
%5 = load i32, i32* @GL_FRONT
%6 = load i32, i32* @GL_DIFFUSE
%7 = load i32*, i32** %3
%8 = call i32 @glMaterialfv(i32 %5, i32 %6, i32* %7)
%9 = load i32, i32* @GL_FRONT
%10 = load i32, i32* @GL_AMBIENT
%11 = load i32*, i32** %4
%12 = call i32 @glMaterialfv(i32 %9, i32 %10, i32* %11)
%13 = call i32 (...) @glPushMatrix()
%14 = call i32 @glTranslatef(double 0x3FEE666666666666, double 0.000000e+00, double -4.500000e-01)
%15 = call i32 @glRotatef(double 4.500000e+01, double 1.000000e+00, double 0.000000e+00, double 0.000000e+00)
%16 = call i32 @glScalef(double 6.500000e-01, double 2.000000e-01, double 2.000000e-02)
%17 = load i32*, i32** %3
%18 = load i32*, i32** %4
%19 = call i32 @drawCube(i32* %17, i32* %18)
%20 = call i32 (...) @glPopMatrix()
%21 = call i32 (...) @glPushMatrix()
%22 = call i32 @glTranslatef(double 0xBFEE666666666666, double 0.000000e+00, double -4.500000e-01)
%23 = call i32 @glRotatef(double 4.500000e+01, double 1.000000e+00, double 0.000000e+00, double 0.000000e+00)
%24 = call i32 @glScalef(double 6.500000e-01, double 2.000000e-01, double 2.000000e-02)
%25 = load i32*, i32** %3
%26 = load i32*, i32** %4
%27 = call i32 @drawCube(i32* %25, i32* %26)
%28 = call i32 (...) @glPopMatrix()
ret void
}

LLVM IR (-O2):
@GL_FRONT = global i32 0
@GL_DIFFUSE = global i32 0
@GL_AMBIENT = global i32 0
define void @drawPanels(i32* %0, i32* %1) {
%3 = load i32, i32* @GL_FRONT
%4 = load i32, i32* @GL_DIFFUSE
%5 = tail call i32 @glMaterialfv(i32 %3, i32 %4, i32* %0)
%6 = load i32, i32* @GL_FRONT
%7 = load i32, i32* @GL_AMBIENT
%8 = tail call i32 @glMaterialfv(i32 %6, i32 %7, i32* %1)
%9 = tail call i32 (...) @glPushMatrix()
%10 = tail call i32 @glTranslatef(double 0x3FEE666666666666, double 0.000000e+00, double -4.500000e-01)
%11 = tail call i32 @glRotatef(double 4.500000e+01, double 1.000000e+00, double 0.000000e+00, double 0.000000e+00)
%12 = tail call i32 @glScalef(double 6.500000e-01, double 2.000000e-01, double 2.000000e-02)
%13 = tail call i32 @drawCube(i32* %0, i32* %1)
%14 = tail call i32 (...) @glPopMatrix()
%15 = tail call i32 (...) @glPushMatrix()
%16 = tail call i32 @glTranslatef(double 0xBFEE666666666666, double 0.000000e+00, double -4.500000e-01)
%17 = tail call i32 @glRotatef(double 4.500000e+01, double 1.000000e+00, double 0.000000e+00, double 0.000000e+00)
%18 = tail call i32 @glScalef(double 6.500000e-01, double 2.000000e-01, double 2.000000e-02)
%19 = tail call i32 @drawCube(i32* %0, i32* %1)
%20 = tail call i32 (...) @glPopMatrix()
ret void
}