#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 scalar_t__ GLuint;
typedef double GLdouble;

/* Variables and functions */
int /*<<< orphan*/ GL_COMPILE_AND_EXECUTE;
int /*<<< orphan*/ GL_TRIANGLE_FAN;
int /*<<< orphan*/ dodecahedron(double *, double, int /*<<< orphan*/);
scalar_t__ findList(int, double *, int);
int /*<<< orphan*/ free(double *);
int /*<<< orphan*/ glCallList(scalar_t__);
int /*<<< orphan*/ glEndList();
int /*<<< orphan*/ glNewList(int /*<<< orphan*/, int /*<<< orphan*/);
int /*<<< orphan*/ makeModelPtr(int, double *, int);
scalar_t__ malloc(int);
void auxSolidDodecahedron(GLdouble radius) {
  GLdouble *sizeArray;
  GLuint displayList;
  static GLdouble center[3] = {0.0, 0.0, 0.0};
  sizeArray = (GLdouble *)malloc(sizeof(GLdouble) * 1);
  *sizeArray = radius;
  displayList = findList(18, sizeArray, 1);
  if (displayList == 0) {
    glNewList(makeModelPtr(18, sizeArray, 1), GL_COMPILE_AND_EXECUTE);
    dodecahedron(center, radius / 1.73, GL_TRIANGLE_FAN);
    glEndList();
  } else {
    glCallList(displayList);
    free(sizeArray);
  }
}


x86 assembly (clang, -O0):
<auxSolidDodecahedron>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
movsd  %xmm0,-0x8(%rbp)
mov    $0x8,%edi
call   1080 <malloc@plt>
mov    %rax,-0x10(%rbp)
movsd  -0x8(%rbp),%xmm0
mov    -0x10(%rbp),%rax
movsd  %xmm0,(%rax)
mov    -0x10(%rbp),%rsi
mov    $0x12,%edi
mov    $0x1,%edx
call   1090 <findList@plt>
mov    %rax,-0x18(%rbp)
cmpq   $0x0,-0x18(%rbp)
jne    121f <auxSolidDodecahedron+0x9f>
mov    -0x10(%rbp),%rsi
mov    $0x12,%edi
mov    $0x1,%edx
call   1060 <makeModelPtr@plt>
mov    %eax,%edi
mov    0x2df2(%rip),%rax
mov    (%rax),%esi
call   1050 <glNewList@plt>
movsd  -0x8(%rbp),%xmm0
movsd  0xe06(%rip),%xmm1
divsd  %xmm1,%xmm0
mov    0x2ddb(%rip),%rax
mov    (%rax),%esi
lea    0x2e62(%rip),%rdi
call   1040 <dodecahedron@plt>
mov    $0x0,%al
call   10a0 <glEndList@plt>
jmp    1231 <auxSolidDodecahedron+0xb1>
mov    -0x18(%rbp),%rdi
call   1070 <glCallList@plt>
mov    -0x10(%rbp),%rdi
call   1030 <free@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<auxSolidDodecahedron>:
push   %rbx
sub    $0x10,%rsp
movsd  %xmm0,0x8(%rsp)
mov    $0x8,%edi
call   1080 <malloc@plt>
mov    %rax,%rbx
movsd  0x8(%rsp),%xmm0
movsd  %xmm0,(%rax)
mov    $0x12,%edi
mov    %rax,%rsi
mov    $0x1,%edx
call   1090 <findList@plt>
test   %rax,%rax
je     11ce <auxSolidDodecahedron+0x4e>
mov    %rax,%rdi
call   1070 <glCallList@plt>
mov    %rbx,%rdi
add    $0x10,%rsp
pop    %rbx
jmp    1030 <free@plt>
mov    $0x12,%edi
mov    %rbx,%rsi
mov    $0x1,%edx
call   1060 <makeModelPtr@plt>
mov    0x2df1(%rip),%rcx
mov    (%rcx),%esi
mov    %eax,%edi
call   1050 <glNewList@plt>
movsd  0x8(%rsp),%xmm0
divsd  0xe02(%rip),%xmm0
mov    0x2ddb(%rip),%rax
mov    (%rax),%esi
lea    0x2e62(%rip),%rdi
call   1040 <dodecahedron@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbx
jmp    10a0 <glEndList@plt>

LLVM IR (-O0):
@auxSolidDodecahedron.center = internal global [3 x double] zeroinitializer
@GL_COMPILE_AND_EXECUTE = global i32 0
@GL_TRIANGLE_FAN = global i32 0
define void @auxSolidDodecahedron(double %0) {
%2 = alloca double
%3 = alloca double*
%4 = alloca i64
store double %0, double* %2
%5 = call i64 @malloc(i32 8)
%6 = inttoptr i64 %5 to double*
store double* %6, double** %3
%7 = load double, double* %2
%8 = load double*, double** %3
store double %7, double* %8
%9 = load double*, double** %3
%10 = call i64 @findList(i32 18, double* %9, i32 1)
store i64 %10, i64* %4
%11 = load i64, i64* %4
%12 = icmp eq i64 %11, 0
br i1 %12, label %13, label %23
13: ; preds = %1
%14 = load double*, double** %3
%15 = call i32 @makeModelPtr(i32 18, double* %14, i32 1)
%16 = load i32, i32* @GL_COMPILE_AND_EXECUTE
%17 = call i32 @glNewList(i32 %15, i32 %16)
%18 = load double, double* %2
%19 = fdiv double %18, 1.730000e+00
%20 = load i32, i32* @GL_TRIANGLE_FAN
%21 = call i32 @dodecahedron(double* getelementptr inbounds ([3 x double], [3 x double]* @auxSolidDodecahedron.center, i64 0, i64 0), double %19, i32 %20)
%22 = call i32 (...) @glEndList()
br label %28
23: ; preds = %1
%24 = load i64, i64* %4
%25 = call i32 @glCallList(i64 %24)
%26 = load double*, double** %3
%27 = call i32 @free(double* %26)
br label %28
28: ; preds = %23, %13
ret void
}

LLVM IR (-O2):
@auxSolidDodecahedron.center = internal global [3 x double] zeroinitializer
@GL_COMPILE_AND_EXECUTE = global i32 0
@GL_TRIANGLE_FAN = global i32 0
define void @auxSolidDodecahedron(double %0) {
%2 = tail call i64 @malloc(i32 8)
%3 = inttoptr i64 %2 to double*
store double %0, double* %3
%4 = tail call i64 @findList(i32 18, double* %3, i32 1)
%5 = icmp eq i64 %4, 0
br i1 %5, label %6, label %14
6: ; preds = %1
%7 = tail call i32 @makeModelPtr(i32 18, double* %3, i32 1)
%8 = load i32, i32* @GL_COMPILE_AND_EXECUTE
%9 = tail call i32 @glNewList(i32 %7, i32 %8)
%10 = fdiv double %0, 1.730000e+00
%11 = load i32, i32* @GL_TRIANGLE_FAN
%12 = tail call i32 @dodecahedron(double* getelementptr inbounds ([3 x double], [3 x double]* @auxSolidDodecahedron.center, i64 0, i64 0), double %10, i32 %11)
%13 = tail call i32 (...) @glEndList()
br label %17
14: ; preds = %1
%15 = tail call i32 @glCallList(i64 %4)
%16 = tail call i32 @free(double* %3)
br label %17
17: ; preds = %14, %6
ret void
}