#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*/ glBegin(int /*<<< orphan*/);
int /*<<< orphan*/ glEnd();
int /*<<< orphan*/ glEndList();
int /*<<< orphan*/ glMaterialfv(int /*<<< orphan*/, int /*<<< orphan*/,
                                double *);
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);
  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    0xe3e(%rip),%rax
mov    %rax,-0x30(%rbp)
mov    0xe3b(%rip),%rax
mov    %rax,-0x28(%rbp)
mov    0xe38(%rip),%rax
mov    %rax,-0x20(%rbp)
mov    0xe35(%rip),%rax
mov    %rax,-0x18(%rbp)
mov    -0x4(%rbp),%edi
mov    0x2dbf(%rip),%rax
mov    (%rax),%esi
call   1040 <glNewList@plt>
mov    0x2dc9(%rip),%rax
mov    (%rax),%edi
call   10a0 <glPushAttrib@plt>
mov    0x2dc3(%rip),%rax
mov    (%rax),%edi
mov    0x2da2(%rip),%rax
mov    (%rax),%esi
lea    -0x30(%rbp),%rdx
call   10c0 <glMaterialfv@plt>
mov    0x2db8(%rip),%rax
mov    (%rax),%edi
call   10d0 <glBegin@plt>
mov    $0xf,%edi
xor    %edx,%edx
mov    %edx,%esi
call   1030 <glVertex3f@plt>
mov    $0xfffffff1,%edi
xor    %edx,%edx
mov    %edx,%esi
call   1030 <glVertex3f@plt>
xor    %edx,%edx
mov    $0xf,%esi
mov    %edx,%edi
call   1030 <glVertex3f@plt>
xor    %edx,%edx
mov    $0xfffffff1,%esi
mov    %edx,%edi
call   1030 <glVertex3f@plt>
xor    %esi,%esi
mov    $0xf,%edx
mov    %esi,%edi
call   1030 <glVertex3f@plt>
xor    %esi,%esi
mov    $0xfffffff1,%edx
mov    %esi,%edi
call   1030 <glVertex3f@plt>
mov    $0x0,%al
call   1050 <glEnd@plt>
movl   $0x0,-0x8(%rbp)
cmpl   $0x3,-0x8(%rbp)
jge    1357 <agvMakeAxesList+0x197>
mov    $0x0,%al
call   1080 <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   10b0 <glTranslatef@plt>
movl   $0x0,-0xc(%rbp)
cmpl   $0x15,-0xc(%rbp)
jge    1342 <agvMakeAxesList+0x182>
movsd  0xcfa(%rip),%xmm0
call   1060 <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   10b0 <glTranslatef@plt>
mov    -0xc(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0xc(%rbp)
jmp    12f4 <agvMakeAxesList+0x134>
mov    $0x0,%al
call   1070 <glPopMatrix@plt>
mov    -0x8(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x8(%rbp)
jmp    12a1 <agvMakeAxesList+0xe1>
mov    $0x0,%al
call   1090 <glPopAttrib@plt>
mov    $0x0,%al
call   10e0 <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 0xe4d(%rip),%xmm0
movaps %xmm0,0x10(%rsp)
movaps 0xe31(%rip),%xmm0
movaps %xmm0,(%rsp)
mov    0x2dd6(%rip),%rax
mov    (%rax),%esi
call   1040 <glNewList@plt>
mov    0x2de0(%rip),%rax
mov    (%rax),%edi
call   10a0 <glPushAttrib@plt>
mov    0x2dda(%rip),%rax
mov    (%rax),%edi
mov    0x2db9(%rip),%rax
mov    (%rax),%esi
mov    %rsp,%rdx
call   10c0 <glMaterialfv@plt>
mov    0x2dd0(%rip),%rax
mov    (%rax),%edi
call   10d0 <glBegin@plt>
mov    $0xf,%edi
xor    %esi,%esi
xor    %edx,%edx
call   1030 <glVertex3f@plt>
mov    $0xfffffff1,%edi
xor    %esi,%esi
xor    %edx,%edx
call   1030 <glVertex3f@plt>
xor    %edi,%edi
mov    $0xf,%esi
xor    %edx,%edx
call   1030 <glVertex3f@plt>
xor    %edi,%edi
mov    $0xfffffff1,%esi
xor    %edx,%edx
call   1030 <glVertex3f@plt>
xor    %edi,%edi
xor    %esi,%esi
mov    $0xf,%edx
call   1030 <glVertex3f@plt>
xor    %edi,%edi
xor    %esi,%esi
mov    $0xfffffff1,%edx
call   1030 <glVertex3f@plt>
xor    %eax,%eax
call   1050 <glEnd@plt>
mov    $0x3,%r15d
mov    $0xfffffff6,%r12d
xchg   %ax,%ax
xor    %eax,%eax
call   1080 <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   10b0 <glTranslatef@plt>
movsd  0xd23(%rip),%xmm0
call   1060 <glutSolidCube@plt>
mov    %r14d,%edi
mov    %ebp,%esi
mov    %ebx,%edx
call   10b0 <glTranslatef@plt>
movsd  0xd0a(%rip),%xmm0
call   1060 <glutSolidCube@plt>
mov    %r14d,%edi
mov    %ebp,%esi
mov    %ebx,%edx
call   10b0 <glTranslatef@plt>
movsd  0xcf1(%rip),%xmm0
call   1060 <glutSolidCube@plt>
mov    %r14d,%edi
mov    %ebp,%esi
mov    %ebx,%edx
call   10b0 <glTranslatef@plt>
movsd  0xcd8(%rip),%xmm0
call   1060 <glutSolidCube@plt>
mov    %r14d,%edi
mov    %ebp,%esi
mov    %ebx,%edx
call   10b0 <glTranslatef@plt>
movsd  0xcbf(%rip),%xmm0
call   1060 <glutSolidCube@plt>
mov    %r14d,%edi
mov    %ebp,%esi
mov    %ebx,%edx
call   10b0 <glTranslatef@plt>
movsd  0xca6(%rip),%xmm0
call   1060 <glutSolidCube@plt>
mov    %r14d,%edi
mov    %ebp,%esi
mov    %ebx,%edx
call   10b0 <glTranslatef@plt>
movsd  0xc8d(%rip),%xmm0
call   1060 <glutSolidCube@plt>
mov    %r14d,%edi
mov    %ebp,%esi
mov    %ebx,%edx
call   10b0 <glTranslatef@plt>
movsd  0xc74(%rip),%xmm0
call   1060 <glutSolidCube@plt>
mov    %r14d,%edi
mov    %ebp,%esi
mov    %ebx,%edx
call   10b0 <glTranslatef@plt>
movsd  0xc5b(%rip),%xmm0
call   1060 <glutSolidCube@plt>
mov    %r14d,%edi
mov    %ebp,%esi
mov    %ebx,%edx
call   10b0 <glTranslatef@plt>
movsd  0xc42(%rip),%xmm0
call   1060 <glutSolidCube@plt>
mov    %r14d,%edi
mov    %ebp,%esi
mov    %ebx,%edx
call   10b0 <glTranslatef@plt>
movsd  0xc29(%rip),%xmm0
call   1060 <glutSolidCube@plt>
mov    %r14d,%edi
mov    %ebp,%esi
mov    %ebx,%edx
call   10b0 <glTranslatef@plt>
movsd  0xc10(%rip),%xmm0
call   1060 <glutSolidCube@plt>
mov    %r14d,%edi
mov    %ebp,%esi
mov    %ebx,%edx
call   10b0 <glTranslatef@plt>
movsd  0xbf7(%rip),%xmm0
call   1060 <glutSolidCube@plt>
mov    %r14d,%edi
mov    %ebp,%esi
mov    %ebx,%edx
call   10b0 <glTranslatef@plt>
movsd  0xbde(%rip),%xmm0
call   1060 <glutSolidCube@plt>
mov    %r14d,%edi
mov    %ebp,%esi
mov    %ebx,%edx
call   10b0 <glTranslatef@plt>
movsd  0xbc5(%rip),%xmm0
call   1060 <glutSolidCube@plt>
mov    %r14d,%edi
mov    %ebp,%esi
mov    %ebx,%edx
call   10b0 <glTranslatef@plt>
movsd  0xbac(%rip),%xmm0
call   1060 <glutSolidCube@plt>
mov    %r14d,%edi
mov    %ebp,%esi
mov    %ebx,%edx
call   10b0 <glTranslatef@plt>
movsd  0xb93(%rip),%xmm0
call   1060 <glutSolidCube@plt>
mov    %r14d,%edi
mov    %ebp,%esi
mov    %ebx,%edx
call   10b0 <glTranslatef@plt>
movsd  0xb7a(%rip),%xmm0
call   1060 <glutSolidCube@plt>
mov    %r14d,%edi
mov    %ebp,%esi
mov    %ebx,%edx
call   10b0 <glTranslatef@plt>
movsd  0xb61(%rip),%xmm0
call   1060 <glutSolidCube@plt>
mov    %r14d,%edi
mov    %ebp,%esi
mov    %ebx,%edx
call   10b0 <glTranslatef@plt>
movsd  0xb48(%rip),%xmm0
call   1060 <glutSolidCube@plt>
mov    %r14d,%edi
mov    %ebp,%esi
mov    %ebx,%edx
call   10b0 <glTranslatef@plt>
movsd  0xb2f(%rip),%xmm0
call   1060 <glutSolidCube@plt>
mov    %r14d,%edi
mov    %ebp,%esi
mov    %ebx,%edx
call   10b0 <glTranslatef@plt>
xor    %eax,%eax
call   1070 <glPopMatrix@plt>
add    $0xffffffff,%r15d
jne    1290 <agvMakeAxesList+0xd0>
xor    %eax,%eax
call   1090 <glPopAttrib@plt>
xor    %eax,%eax
call   10e0 <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_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_FRONT
%13 = load i32, i32* @GL_AMBIENT_AND_DIFFUSE
%14 = getelementptr inbounds [4 x double], [4 x double]* %5, i64 0, i64 0
%15 = call i32 @glMaterialfv(i32 %12, i32 %13, double* %14)
%16 = load i32, i32* @GL_LINES
%17 = call i32 @glBegin(i32 %16)
%18 = call i32 @glVertex3f(i32 15, i32 0, i32 0)
%19 = call i32 @glVertex3f(i32 -15, i32 0, i32 0)
%20 = call i32 @glVertex3f(i32 0, i32 15, i32 0)
%21 = call i32 @glVertex3f(i32 0, i32 -15, i32 0)
%22 = call i32 @glVertex3f(i32 0, i32 0, i32 15)
%23 = call i32 @glVertex3f(i32 0, i32 0, i32 -15)
%24 = call i32 (...) @glEnd()
store i32 0, i32* %3
br label %25
25: ; preds = %63, %1
%26 = load i32, i32* %3
%27 = icmp slt i32 %26, 3
br i1 %27, label %28, label %66
28: ; preds = %25
%29 = call i32 (...) @glPushMatrix()
%30 = load i32, i32* %3
%31 = icmp eq i32 %30, 0
%32 = zext i1 %31 to i32
%33 = mul nsw i32 -10, %32
%34 = load i32, i32* %3
%35 = icmp eq i32 %34, 1
%36 = zext i1 %35 to i32
%37 = mul nsw i32 -10, %36
%38 = load i32, i32* %3
%39 = icmp eq i32 %38, 2
%40 = zext i1 %39 to i32
%41 = mul nsw i32 -10, %40
%42 = call i32 @glTranslatef(i32 %33, i32 %37, i32 %41)
store i32 0, i32* %4
br label %43
43: ; preds = %58, %28
%44 = load i32, i32* %4
%45 = icmp slt i32 %44, 21
br i1 %45, label %46, label %61
46: ; preds = %43
%47 = call i32 @glutSolidCube(double 1.000000e-01)
%48 = load i32, i32* %3
%49 = icmp eq i32 %48, 0
%50 = zext i1 %49 to i32
%51 = load i32, i32* %3
%52 = icmp eq i32 %51, 1
%53 = zext i1 %52 to i32
%54 = load i32, i32* %3
%55 = icmp eq i32 %54, 2
%56 = zext i1 %55 to i32
%57 = call i32 @glTranslatef(i32 %50, i32 %53, i32 %56)
br label %58
58: ; preds = %46
%59 = load i32, i32* %4
%60 = add nsw i32 %59, 1
store i32 %60, i32* %4
br label %43
61: ; preds = %43
%62 = call i32 (...) @glPopMatrix()
br label %63
63: ; preds = %61
%64 = load i32, i32* %3
%65 = add nsw i32 %64, 1
store i32 %65, i32* %3
br label %25
66: ; preds = %25
%67 = call i32 (...) @glPopAttrib()
%68 = 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_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_FRONT
%9 = load i32, i32* @GL_AMBIENT_AND_DIFFUSE
%10 = getelementptr inbounds [4 x double], [4 x double]* %2, i64 0, i64 0
%11 = call i32 @glMaterialfv(i32 %8, i32 %9, double* %10)
%12 = load i32, i32* @GL_LINES
%13 = call i32 @glBegin(i32 %12)
%14 = call i32 @glVertex3f(i32 15, i32 0, i32 0)
%15 = call i32 @glVertex3f(i32 -15, i32 0, i32 0)
%16 = call i32 @glVertex3f(i32 0, i32 15, i32 0)
%17 = call i32 @glVertex3f(i32 0, i32 -15, i32 0)
%18 = call i32 @glVertex3f(i32 0, i32 0, i32 15)
%19 = call i32 @glVertex3f(i32 0, i32 0, i32 -15)
%20 = call i32 (...) @glEnd()
br label %21
21: ; preds = %1, %21
%22 = phi i32 [ 0, %1 ], [ %77, %21 ]
%23 = call i32 (...) @glPushMatrix()
%24 = icmp eq i32 %22, 0
%25 = zext i1 %24 to i32
%26 = select i1 %24, i32 -10, i32 0
%27 = icmp eq i32 %22, 1
%28 = zext i1 %27 to i32
%29 = select i1 %27, i32 -10, i32 0
%30 = icmp eq i32 %22, 2
%31 = zext i1 %30 to i32
%32 = select i1 %30, i32 -10, i32 0
%33 = call i32 @glTranslatef(i32 %26, i32 %29, i32 %32)
%34 = call i32 @glutSolidCube(double 1.000000e-01)
%35 = call i32 @glTranslatef(i32 %25, i32 %28, i32 %31)
%36 = call i32 @glutSolidCube(double 1.000000e-01)
%37 = call i32 @glTranslatef(i32 %25, i32 %28, i32 %31)
%38 = call i32 @glutSolidCube(double 1.000000e-01)
%39 = call i32 @glTranslatef(i32 %25, i32 %28, i32 %31)
%40 = call i32 @glutSolidCube(double 1.000000e-01)
%41 = call i32 @glTranslatef(i32 %25, i32 %28, i32 %31)
%42 = call i32 @glutSolidCube(double 1.000000e-01)
%43 = call i32 @glTranslatef(i32 %25, i32 %28, i32 %31)
%44 = call i32 @glutSolidCube(double 1.000000e-01)
%45 = call i32 @glTranslatef(i32 %25, i32 %28, i32 %31)
%46 = call i32 @glutSolidCube(double 1.000000e-01)
%47 = call i32 @glTranslatef(i32 %25, i32 %28, i32 %31)
%48 = call i32 @glutSolidCube(double 1.000000e-01)
%49 = call i32 @glTranslatef(i32 %25, i32 %28, i32 %31)
%50 = call i32 @glutSolidCube(double 1.000000e-01)
%51 = call i32 @glTranslatef(i32 %25, i32 %28, i32 %31)
%52 = call i32 @glutSolidCube(double 1.000000e-01)
%53 = call i32 @glTranslatef(i32 %25, i32 %28, i32 %31)
%54 = call i32 @glutSolidCube(double 1.000000e-01)
%55 = call i32 @glTranslatef(i32 %25, i32 %28, i32 %31)
%56 = call i32 @glutSolidCube(double 1.000000e-01)
%57 = call i32 @glTranslatef(i32 %25, i32 %28, i32 %31)
%58 = call i32 @glutSolidCube(double 1.000000e-01)
%59 = call i32 @glTranslatef(i32 %25, i32 %28, i32 %31)
%60 = call i32 @glutSolidCube(double 1.000000e-01)
%61 = call i32 @glTranslatef(i32 %25, i32 %28, i32 %31)
%62 = call i32 @glutSolidCube(double 1.000000e-01)
%63 = call i32 @glTranslatef(i32 %25, i32 %28, i32 %31)
%64 = call i32 @glutSolidCube(double 1.000000e-01)
%65 = call i32 @glTranslatef(i32 %25, i32 %28, i32 %31)
%66 = call i32 @glutSolidCube(double 1.000000e-01)
%67 = call i32 @glTranslatef(i32 %25, i32 %28, i32 %31)
%68 = call i32 @glutSolidCube(double 1.000000e-01)
%69 = call i32 @glTranslatef(i32 %25, i32 %28, i32 %31)
%70 = call i32 @glutSolidCube(double 1.000000e-01)
%71 = call i32 @glTranslatef(i32 %25, i32 %28, i32 %31)
%72 = call i32 @glutSolidCube(double 1.000000e-01)
%73 = call i32 @glTranslatef(i32 %25, i32 %28, i32 %31)
%74 = call i32 @glutSolidCube(double 1.000000e-01)
%75 = call i32 @glTranslatef(i32 %25, i32 %28, i32 %31)
%76 = call i32 (...) @glPopMatrix()
%77 = add nuw nsw i32 %22, 1
%78 = icmp eq i32 %77, 3
br i1 %78, label %79, label %21
79: ; preds = %21
%80 = call i32 (...) @glPopAttrib()
%81 = call i32 (...) @glEndList()
ret void
}