#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 double GLfloat;

/* Variables and functions */
int /*<<< orphan*/ GL_AMBIENT_AND_DIFFUSE;
int /*<<< orphan*/ GL_COMPILE;
int /*<<< orphan*/ GL_FRONT;
int /*<<< orphan*/ GL_LIGHTING_BIT;
int /*<<< orphan*/ GL_LINES;
int /*<<< orphan*/ GL_MODELVIEW;
int /*<<< orphan*/ glBegin(int /*<<< orphan*/);
int /*<<< orphan*/ glEnd();
int /*<<< orphan*/ glEndList();
int /*<<< orphan*/ glMaterialfv(int /*<<< orphan*/, int /*<<< orphan*/,
                                double *);
int /*<<< orphan*/ glMatrixMode(int /*<<< orphan*/);
int /*<<< orphan*/ glNewList(int, int /*<<< orphan*/);
int /*<<< orphan*/ glPopAttrib();
int /*<<< orphan*/ glPopMatrix();
int /*<<< orphan*/ glPushAttrib(int /*<<< orphan*/);
int /*<<< orphan*/ glPushMatrix();
int /*<<< orphan*/ glTranslatef(int, int, int);
int /*<<< orphan*/ glVertex3f(int, int, int);
int /*<<< orphan*/ glutSolidCube(double);
void agvMakeAxesList(int displaylistnum) {
  int i, j;
  GLfloat axes_ambuse[] = {0.5, 0.0, 0.0, 1.0};
  glNewList(displaylistnum, GL_COMPILE);
  glPushAttrib(GL_LIGHTING_BIT);
  glMatrixMode(GL_MODELVIEW);
  glMaterialfv(GL_FRONT, GL_AMBIENT_AND_DIFFUSE, axes_ambuse);
  glBegin(GL_LINES);
  glVertex3f(15, 0, 0);
  glVertex3f(-15, 0, 0);
  glVertex3f(0, 15, 0);
  glVertex3f(0, -15, 0);
  glVertex3f(0, 0, 15);
  glVertex3f(0, 0, -15);
  glEnd();
  for (i = 0; i < 3; i++) {
    glPushMatrix();
    glTranslatef(-10 * (i == 0), -10 * (i == 1), -10 * (i == 2));
    for (j = 0; j < 21; j++) {
      glutSolidCube(0.1);
      glTranslatef(i == 0, i == 1, i == 2);
    }
    glPopMatrix();
  }
  glPopAttrib();
  glEndList();
}


x86 assembly (clang, -O0):
<agvMakeAxesList>:
push   %rbp
mov    %rsp,%rbp
sub    $0x30,%rsp
mov    %edi,-0x4(%rbp)
mov    0xe2e(%rip),%rax
mov    %rax,-0x30(%rbp)
mov    0xe2b(%rip),%rax
mov    %rax,-0x28(%rbp)
mov    0xe28(%rip),%rax
mov    %rax,-0x20(%rbp)
mov    0xe25(%rip),%rax
mov    %rax,-0x18(%rbp)
mov    -0x4(%rbp),%edi
mov    0x2da7(%rip),%rax
mov    (%rax),%esi
call   1050 <glNewList@plt>
mov    0x2db9(%rip),%rax
mov    (%rax),%edi
call   10b0 <glPushAttrib@plt>
mov    0x2da3(%rip),%rax
mov    (%rax),%edi
call   1030 <glMatrixMode@plt>
mov    0x2da5(%rip),%rax
mov    (%rax),%edi
mov    0x2d7c(%rip),%rax
mov    (%rax),%esi
lea    -0x30(%rbp),%rdx
call   10d0 <glMaterialfv@plt>
mov    0x2d9a(%rip),%rax
mov    (%rax),%edi
call   10e0 <glBegin@plt>
mov    $0xf,%edi
xor    %edx,%edx
mov    %edx,%esi
call   1040 <glVertex3f@plt>
mov    $0xfffffff1,%edi
xor    %edx,%edx
mov    %edx,%esi
call   1040 <glVertex3f@plt>
xor    %edx,%edx
mov    $0xf,%esi
mov    %edx,%edi
call   1040 <glVertex3f@plt>
xor    %edx,%edx
mov    $0xfffffff1,%esi
mov    %edx,%edi
call   1040 <glVertex3f@plt>
xor    %esi,%esi
mov    $0xf,%edx
mov    %esi,%edi
call   1040 <glVertex3f@plt>
xor    %esi,%esi
mov    $0xfffffff1,%edx
mov    %esi,%edi
call   1040 <glVertex3f@plt>
mov    $0x0,%al
call   1060 <glEnd@plt>
movl   $0x0,-0x8(%rbp)
cmpl   $0x3,-0x8(%rbp)
jge    1375 <agvMakeAxesList+0x1a5>
mov    $0x0,%al
call   1090 <glPushMatrix@plt>
cmpl   $0x0,-0x8(%rbp)
sete   %al
and    $0x1,%al
movzbl %al,%eax
imul   $0xfffffff6,%eax,%edi
cmpl   $0x1,-0x8(%rbp)
sete   %al
and    $0x1,%al
movzbl %al,%eax
imul   $0xfffffff6,%eax,%esi
cmpl   $0x2,-0x8(%rbp)
sete   %al
and    $0x1,%al
movzbl %al,%eax
imul   $0xfffffff6,%eax,%edx
call   10c0 <glTranslatef@plt>
movl   $0x0,-0xc(%rbp)
cmpl   $0x15,-0xc(%rbp)
jge    1360 <agvMakeAxesList+0x190>
movsd  0xcdc(%rip),%xmm0
call   1070 <glutSolidCube@plt>
cmpl   $0x0,-0x8(%rbp)
sete   %al
and    $0x1,%al
movzbl %al,%edi
cmpl   $0x1,-0x8(%rbp)
sete   %al
and    $0x1,%al
movzbl %al,%esi
cmpl   $0x2,-0x8(%rbp)
sete   %al
and    $0x1,%al
movzbl %al,%edx
call   10c0 <glTranslatef@plt>
mov    -0xc(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0xc(%rbp)
jmp    1312 <agvMakeAxesList+0x142>
mov    $0x0,%al
call   1080 <glPopMatrix@plt>
mov    -0x8(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x8(%rbp)
jmp    12bf <agvMakeAxesList+0xef>
mov    $0x0,%al
call   10a0 <glPopAttrib@plt>
mov    $0x0,%al
call   10f0 <glEndList@plt>
add    $0x30,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<agvMakeAxesList>:
push   %rbp
push   %r15
push   %r14
push   %r12
push   %rbx
sub    $0x20,%rsp
movaps 0xe3d(%rip),%xmm0
movaps %xmm0,0x10(%rsp)
movaps 0xe21(%rip),%xmm0
movaps %xmm0,(%rsp)
mov    0x2dbe(%rip),%rax
mov    (%rax),%esi
call   1050 <glNewList@plt>
mov    0x2dd0(%rip),%rax
mov    (%rax),%edi
call   10b0 <glPushAttrib@plt>
mov    0x2dba(%rip),%rax
mov    (%rax),%edi
call   1030 <glMatrixMode@plt>
mov    0x2dbc(%rip),%rax
mov    (%rax),%edi
mov    0x2d93(%rip),%rax
mov    (%rax),%esi
mov    %rsp,%rdx
call   10d0 <glMaterialfv@plt>
mov    0x2db2(%rip),%rax
mov    (%rax),%edi
call   10e0 <glBegin@plt>
mov    $0xf,%edi
xor    %esi,%esi
xor    %edx,%edx
call   1040 <glVertex3f@plt>
mov    $0xfffffff1,%edi
xor    %esi,%esi
xor    %edx,%edx
call   1040 <glVertex3f@plt>
xor    %edi,%edi
mov    $0xf,%esi
xor    %edx,%edx
call   1040 <glVertex3f@plt>
xor    %edi,%edi
mov    $0xfffffff1,%esi
xor    %edx,%edx
call   1040 <glVertex3f@plt>
xor    %edi,%edi
xor    %esi,%esi
mov    $0xf,%edx
call   1040 <glVertex3f@plt>
xor    %edi,%edi
xor    %esi,%esi
mov    $0xfffffff1,%edx
call   1040 <glVertex3f@plt>
xor    %eax,%eax
call   1060 <glEnd@plt>
mov    $0x3,%r15d
mov    $0xfffffff6,%r12d
nopl   0x0(%rax)
xor    %eax,%eax
call   1090 <glPushMatrix@plt>
xor    %r14d,%r14d
cmp    $0x3,%r15d
sete   %r14b
mov    $0x0,%edi
cmove  %r12d,%edi
xor    %ebp,%ebp
cmp    $0x2,%r15d
sete   %bpl
mov    $0x0,%esi
cmove  %r12d,%esi
xor    %ebx,%ebx
cmp    $0x1,%r15d
sete   %bl
mov    $0x0,%edx
cmove  %r12d,%edx
call   10c0 <glTranslatef@plt>
movsd  0xd03(%rip),%xmm0
call   1070 <glutSolidCube@plt>
mov    %r14d,%edi
mov    %ebp,%esi
mov    %ebx,%edx
call   10c0 <glTranslatef@plt>
movsd  0xcea(%rip),%xmm0
call   1070 <glutSolidCube@plt>
mov    %r14d,%edi
mov    %ebp,%esi
mov    %ebx,%edx
call   10c0 <glTranslatef@plt>
movsd  0xcd1(%rip),%xmm0
call   1070 <glutSolidCube@plt>
mov    %r14d,%edi
mov    %ebp,%esi
mov    %ebx,%edx
call   10c0 <glTranslatef@plt>
movsd  0xcb8(%rip),%xmm0
call   1070 <glutSolidCube@plt>
mov    %r14d,%edi
mov    %ebp,%esi
mov    %ebx,%edx
call   10c0 <glTranslatef@plt>
movsd  0xc9f(%rip),%xmm0
call   1070 <glutSolidCube@plt>
mov    %r14d,%edi
mov    %ebp,%esi
mov    %ebx,%edx
call   10c0 <glTranslatef@plt>
movsd  0xc86(%rip),%xmm0
call   1070 <glutSolidCube@plt>
mov    %r14d,%edi
mov    %ebp,%esi
mov    %ebx,%edx
call   10c0 <glTranslatef@plt>
movsd  0xc6d(%rip),%xmm0
call   1070 <glutSolidCube@plt>
mov    %r14d,%edi
mov    %ebp,%esi
mov    %ebx,%edx
call   10c0 <glTranslatef@plt>
movsd  0xc54(%rip),%xmm0
call   1070 <glutSolidCube@plt>
mov    %r14d,%edi
mov    %ebp,%esi
mov    %ebx,%edx
call   10c0 <glTranslatef@plt>
movsd  0xc3b(%rip),%xmm0
call   1070 <glutSolidCube@plt>
mov    %r14d,%edi
mov    %ebp,%esi
mov    %ebx,%edx
call   10c0 <glTranslatef@plt>
movsd  0xc22(%rip),%xmm0
call   1070 <glutSolidCube@plt>
mov    %r14d,%edi
mov    %ebp,%esi
mov    %ebx,%edx
call   10c0 <glTranslatef@plt>
movsd  0xc09(%rip),%xmm0
call   1070 <glutSolidCube@plt>
mov    %r14d,%edi
mov    %ebp,%esi
mov    %ebx,%edx
call   10c0 <glTranslatef@plt>
movsd  0xbf0(%rip),%xmm0
call   1070 <glutSolidCube@plt>
mov    %r14d,%edi
mov    %ebp,%esi
mov    %ebx,%edx
call   10c0 <glTranslatef@plt>
movsd  0xbd7(%rip),%xmm0
call   1070 <glutSolidCube@plt>
mov    %r14d,%edi
mov    %ebp,%esi
mov    %ebx,%edx
call   10c0 <glTranslatef@plt>
movsd  0xbbe(%rip),%xmm0
call   1070 <glutSolidCube@plt>
mov    %r14d,%edi
mov    %ebp,%esi
mov    %ebx,%edx
call   10c0 <glTranslatef@plt>
movsd  0xba5(%rip),%xmm0
call   1070 <glutSolidCube@plt>
mov    %r14d,%edi
mov    %ebp,%esi
mov    %ebx,%edx
call   10c0 <glTranslatef@plt>
movsd  0xb8c(%rip),%xmm0
call   1070 <glutSolidCube@plt>
mov    %r14d,%edi
mov    %ebp,%esi
mov    %ebx,%edx
call   10c0 <glTranslatef@plt>
movsd  0xb73(%rip),%xmm0
call   1070 <glutSolidCube@plt>
mov    %r14d,%edi
mov    %ebp,%esi
mov    %ebx,%edx
call   10c0 <glTranslatef@plt>
movsd  0xb5a(%rip),%xmm0
call   1070 <glutSolidCube@plt>
mov    %r14d,%edi
mov    %ebp,%esi
mov    %ebx,%edx
call   10c0 <glTranslatef@plt>
movsd  0xb41(%rip),%xmm0
call   1070 <glutSolidCube@plt>
mov    %r14d,%edi
mov    %ebp,%esi
mov    %ebx,%edx
call   10c0 <glTranslatef@plt>
movsd  0xb28(%rip),%xmm0
call   1070 <glutSolidCube@plt>
mov    %r14d,%edi
mov    %ebp,%esi
mov    %ebx,%edx
call   10c0 <glTranslatef@plt>
movsd  0xb0f(%rip),%xmm0
call   1070 <glutSolidCube@plt>
mov    %r14d,%edi
mov    %ebp,%esi
mov    %ebx,%edx
call   10c0 <glTranslatef@plt>
xor    %eax,%eax
call   1080 <glPopMatrix@plt>
add    $0xffffffff,%r15d
jne    12b0 <agvMakeAxesList+0xe0>
xor    %eax,%eax
call   10a0 <glPopAttrib@plt>
xor    %eax,%eax
call   10f0 <glEndList@plt>
add    $0x20,%rsp
pop    %rbx
pop    %r12
pop    %r14
pop    %r15
pop    %rbp
ret

LLVM IR (-O0):
@__const.agvMakeAxesList.axes_ambuse = [4 x double] [double 5.000000e-01, double 0.000000e+00, double 0.000000e+00, double 1.000000e+00]
@GL_COMPILE = global i32 0
@GL_LIGHTING_BIT = global i32 0
@GL_MODELVIEW = global i32 0
@GL_FRONT = global i32 0
@GL_AMBIENT_AND_DIFFUSE = global i32 0
@GL_LINES = global i32 0
define void @agvMakeAxesList(i32 %0) {
%2 = alloca i32
%3 = alloca i32
%4 = alloca i32
%5 = alloca [4 x double]
store i32 %0, i32* %2
%6 = bitcast [4 x double]* %5 to i8*
%7 = load i32, i32* %2
%8 = load i32, i32* @GL_COMPILE
%9 = call i32 @glNewList(i32 %7, i32 %8)
%10 = load i32, i32* @GL_LIGHTING_BIT
%11 = call i32 @glPushAttrib(i32 %10)
%12 = load i32, i32* @GL_MODELVIEW
%13 = call i32 @glMatrixMode(i32 %12)
%14 = load i32, i32* @GL_FRONT
%15 = load i32, i32* @GL_AMBIENT_AND_DIFFUSE
%16 = getelementptr inbounds [4 x double], [4 x double]* %5, i64 0, i64 0
%17 = call i32 @glMaterialfv(i32 %14, i32 %15, double* %16)
%18 = load i32, i32* @GL_LINES
%19 = call i32 @glBegin(i32 %18)
%20 = call i32 @glVertex3f(i32 15, i32 0, i32 0)
%21 = call i32 @glVertex3f(i32 -15, i32 0, i32 0)
%22 = call i32 @glVertex3f(i32 0, i32 15, i32 0)
%23 = call i32 @glVertex3f(i32 0, i32 -15, i32 0)
%24 = call i32 @glVertex3f(i32 0, i32 0, i32 15)
%25 = call i32 @glVertex3f(i32 0, i32 0, i32 -15)
%26 = call i32 (...) @glEnd()
store i32 0, i32* %3
br label %27
27: ; preds = %65, %1
%28 = load i32, i32* %3
%29 = icmp slt i32 %28, 3
br i1 %29, label %30, label %68
30: ; preds = %27
%31 = call i32 (...) @glPushMatrix()
%32 = load i32, i32* %3
%33 = icmp eq i32 %32, 0
%34 = zext i1 %33 to i32
%35 = mul nsw i32 -10, %34
%36 = load i32, i32* %3
%37 = icmp eq i32 %36, 1
%38 = zext i1 %37 to i32
%39 = mul nsw i32 -10, %38
%40 = load i32, i32* %3
%41 = icmp eq i32 %40, 2
%42 = zext i1 %41 to i32
%43 = mul nsw i32 -10, %42
%44 = call i32 @glTranslatef(i32 %35, i32 %39, i32 %43)
store i32 0, i32* %4
br label %45
45: ; preds = %60, %30
%46 = load i32, i32* %4
%47 = icmp slt i32 %46, 21
br i1 %47, label %48, label %63
48: ; preds = %45
%49 = call i32 @glutSolidCube(double 1.000000e-01)
%50 = load i32, i32* %3
%51 = icmp eq i32 %50, 0
%52 = zext i1 %51 to i32
%53 = load i32, i32* %3
%54 = icmp eq i32 %53, 1
%55 = zext i1 %54 to i32
%56 = load i32, i32* %3
%57 = icmp eq i32 %56, 2
%58 = zext i1 %57 to i32
%59 = call i32 @glTranslatef(i32 %52, i32 %55, i32 %58)
br label %60
60: ; preds = %48
%61 = load i32, i32* %4
%62 = add nsw i32 %61, 1
store i32 %62, i32* %4
br label %45
63: ; preds = %45
%64 = call i32 (...) @glPopMatrix()
br label %65
65: ; preds = %63
%66 = load i32, i32* %3
%67 = add nsw i32 %66, 1
store i32 %67, i32* %3
br label %27
68: ; preds = %27
%69 = call i32 (...) @glPopAttrib()
%70 = call i32 (...) @glEndList()
ret void
}

LLVM IR (-O2):
@__const.agvMakeAxesList.axes_ambuse = [4 x double] [double 5.000000e-01, double 0.000000e+00, double 0.000000e+00, double 1.000000e+00]
@GL_COMPILE = global i32 0
@GL_LIGHTING_BIT = global i32 0
@GL_MODELVIEW = global i32 0
@GL_FRONT = global i32 0
@GL_AMBIENT_AND_DIFFUSE = global i32 0
@GL_LINES = global i32 0
define void @agvMakeAxesList(i32 %0) {
%2 = alloca [4 x double]
%3 = bitcast [4 x double]* %2 to i8*
%4 = load i32, i32* @GL_COMPILE
%5 = tail call i32 @glNewList(i32 %0, i32 %4)
%6 = load i32, i32* @GL_LIGHTING_BIT
%7 = tail call i32 @glPushAttrib(i32 %6)
%8 = load i32, i32* @GL_MODELVIEW
%9 = tail call i32 @glMatrixMode(i32 %8)
%10 = load i32, i32* @GL_FRONT
%11 = load i32, i32* @GL_AMBIENT_AND_DIFFUSE
%12 = getelementptr inbounds [4 x double], [4 x double]* %2, i64 0, i64 0
%13 = call i32 @glMaterialfv(i32 %10, i32 %11, double* %12)
%14 = load i32, i32* @GL_LINES
%15 = call i32 @glBegin(i32 %14)
%16 = call i32 @glVertex3f(i32 15, i32 0, i32 0)
%17 = call i32 @glVertex3f(i32 -15, i32 0, i32 0)
%18 = call i32 @glVertex3f(i32 0, i32 15, i32 0)
%19 = call i32 @glVertex3f(i32 0, i32 -15, i32 0)
%20 = call i32 @glVertex3f(i32 0, i32 0, i32 15)
%21 = call i32 @glVertex3f(i32 0, i32 0, i32 -15)
%22 = call i32 (...) @glEnd()
br label %23
23: ; preds = %1, %23
%24 = phi i32 [ 0, %1 ], [ %79, %23 ]
%25 = call i32 (...) @glPushMatrix()
%26 = icmp eq i32 %24, 0
%27 = zext i1 %26 to i32
%28 = select i1 %26, i32 -10, i32 0
%29 = icmp eq i32 %24, 1
%30 = zext i1 %29 to i32
%31 = select i1 %29, i32 -10, i32 0
%32 = icmp eq i32 %24, 2
%33 = zext i1 %32 to i32
%34 = select i1 %32, i32 -10, i32 0
%35 = call i32 @glTranslatef(i32 %28, i32 %31, i32 %34)
%36 = call i32 @glutSolidCube(double 1.000000e-01)
%37 = call i32 @glTranslatef(i32 %27, i32 %30, i32 %33)
%38 = call i32 @glutSolidCube(double 1.000000e-01)
%39 = call i32 @glTranslatef(i32 %27, i32 %30, i32 %33)
%40 = call i32 @glutSolidCube(double 1.000000e-01)
%41 = call i32 @glTranslatef(i32 %27, i32 %30, i32 %33)
%42 = call i32 @glutSolidCube(double 1.000000e-01)
%43 = call i32 @glTranslatef(i32 %27, i32 %30, i32 %33)
%44 = call i32 @glutSolidCube(double 1.000000e-01)
%45 = call i32 @glTranslatef(i32 %27, i32 %30, i32 %33)
%46 = call i32 @glutSolidCube(double 1.000000e-01)
%47 = call i32 @glTranslatef(i32 %27, i32 %30, i32 %33)
%48 = call i32 @glutSolidCube(double 1.000000e-01)
%49 = call i32 @glTranslatef(i32 %27, i32 %30, i32 %33)
%50 = call i32 @glutSolidCube(double 1.000000e-01)
%51 = call i32 @glTranslatef(i32 %27, i32 %30, i32 %33)
%52 = call i32 @glutSolidCube(double 1.000000e-01)
%53 = call i32 @glTranslatef(i32 %27, i32 %30, i32 %33)
%54 = call i32 @glutSolidCube(double 1.000000e-01)
%55 = call i32 @glTranslatef(i32 %27, i32 %30, i32 %33)
%56 = call i32 @glutSolidCube(double 1.000000e-01)
%57 = call i32 @glTranslatef(i32 %27, i32 %30, i32 %33)
%58 = call i32 @glutSolidCube(double 1.000000e-01)
%59 = call i32 @glTranslatef(i32 %27, i32 %30, i32 %33)
%60 = call i32 @glutSolidCube(double 1.000000e-01)
%61 = call i32 @glTranslatef(i32 %27, i32 %30, i32 %33)
%62 = call i32 @glutSolidCube(double 1.000000e-01)
%63 = call i32 @glTranslatef(i32 %27, i32 %30, i32 %33)
%64 = call i32 @glutSolidCube(double 1.000000e-01)
%65 = call i32 @glTranslatef(i32 %27, i32 %30, i32 %33)
%66 = call i32 @glutSolidCube(double 1.000000e-01)
%67 = call i32 @glTranslatef(i32 %27, i32 %30, i32 %33)
%68 = call i32 @glutSolidCube(double 1.000000e-01)
%69 = call i32 @glTranslatef(i32 %27, i32 %30, i32 %33)
%70 = call i32 @glutSolidCube(double 1.000000e-01)
%71 = call i32 @glTranslatef(i32 %27, i32 %30, i32 %33)
%72 = call i32 @glutSolidCube(double 1.000000e-01)
%73 = call i32 @glTranslatef(i32 %27, i32 %30, i32 %33)
%74 = call i32 @glutSolidCube(double 1.000000e-01)
%75 = call i32 @glTranslatef(i32 %27, i32 %30, i32 %33)
%76 = call i32 @glutSolidCube(double 1.000000e-01)
%77 = call i32 @glTranslatef(i32 %27, i32 %30, i32 %33)
%78 = call i32 (...) @glPopMatrix()
%79 = add nuw nsw i32 %24, 1
%80 = icmp eq i32 %79, 3
br i1 %80, label %81, label %23
81: ; preds = %23
%82 = call i32 (...) @glPopAttrib()
%83 = call i32 (...) @glEndList()
ret void
}