// File: tomfunkhouser[P]gaps/pkgs/fglut/freeglut_geometry.c
// Function: glutSolidCube
void FGAPIENTRY glutSolidCube( GLdouble dSize )
{
    double size = dSize * 0.5;

    FREEGLUT_EXIT_IF_NOT_INITIALISED ( "glutSolidCube" );

#   define V(a,b,c) glVertex3d( a size, b size, c size );
#   define N(a,b,c) glNormal3d( a, b, c );

    /* PWO: Again, I dared to convert the code to use macros... */
    glBegin( GL_QUADS );
        N( 1.0, 0.0, 0.0); V(+,-,+); V(+,-,-); V(+,+,-); V(+,+,+);
        N( 0.0, 1.0, 0.0); V(+,+,+); V(+,+,-); V(-,+,-); V(-,+,+);
        N( 0.0, 0.0, 1.0); V(+,+,+); V(-,+,+); V(-,-,+); V(+,-,+);
        N(-1.0, 0.0, 0.0); V(-,-,+); V(-,+,+); V(-,+,-); V(-,-,-);
        N( 0.0,-1.0, 0.0); V(-,-,+); V(-,-,-); V(+,-,-); V(+,-,+);
        N( 0.0, 0.0,-1.0); V(-,-,-); V(-,+,-); V(+,+,-); V(+,-,-);
    glEnd();

#   undef V
#   undef N
}

// Assembly:
subq $0x18, %rsp
movsd %xmm0, 0x10(%rsp)
movsd 0x688e(%rip), %xmm0     # 0x18e020
mulsd 0x10(%rsp), %xmm0
movsd %xmm0, 0x8(%rsp)
leaq 0x72beb(%rip), %rax     # 0x1fa390
cmpb $0x0, 0x1c(%rax)
jne 0x1877c0
leaq 0x16120(%rip), %rdi     # 0x19d8d2
leaq 0x27a28(%rip), %rsi     # 0x1af1e1
movb $0x0, %al
callq 0x17de70
movl $0x7, %edi
callq 0x221b0
movsd 0x683e(%rip), %xmm0     # 0x18e010
xorps %xmm2, %xmm2
movaps %xmm2, %xmm1
callq 0x22330
movsd 0x8(%rsp), %xmm0
movsd 0x8(%rsp), %xmm1
movq %xmm1, %rax
movabsq $-0x8000000000000000, %rcx # imm = 0x8000000000000000
xorq %rcx, %rax
movq %rax, %xmm1
movsd 0x8(%rsp), %xmm2
callq 0x23020
movsd 0x8(%rsp), %xmm0
movsd 0x8(%rsp), %xmm1
movq %xmm1, %rax
movabsq $-0x8000000000000000, %rcx # imm = 0x8000000000000000
xorq %rcx, %rax
movq %rax, %xmm1
movsd 0x8(%rsp), %xmm2
movq %xmm2, %rax
movabsq $-0x8000000000000000, %rcx # imm = 0x8000000000000000
xorq %rcx, %rax
movq %rax, %xmm2
callq 0x23020
movsd 0x8(%rsp), %xmm0
movsd 0x8(%rsp), %xmm1
movsd 0x8(%rsp), %xmm2
movq %xmm2, %rax
movabsq $-0x8000000000000000, %rcx # imm = 0x8000000000000000
xorq %rcx, %rax
movq %rax, %xmm2
callq 0x23020
movsd 0x8(%rsp), %xmm0
movsd 0x8(%rsp), %xmm1
movsd 0x8(%rsp), %xmm2
callq 0x23020
xorps %xmm2, %xmm2
movsd 0x6770(%rip), %xmm1     # 0x18e010
movaps %xmm2, %xmm0
callq 0x22330
movsd 0x8(%rsp), %xmm0
movsd 0x8(%rsp), %xmm1
movsd 0x8(%rsp), %xmm2
callq 0x23020
movsd 0x8(%rsp), %xmm0
movsd 0x8(%rsp), %xmm1
movsd 0x8(%rsp), %xmm2
movq %xmm2, %rax
movabsq $-0x8000000000000000, %rcx # imm = 0x8000000000000000
xorq %rcx, %rax
movq %rax, %xmm2
callq 0x23020
movsd 0x8(%rsp), %xmm0
movq %xmm0, %rax
movabsq $-0x8000000000000000, %rcx # imm = 0x8000000000000000
xorq %rcx, %rax
movq %rax, %xmm0
movsd 0x8(%rsp), %xmm1
movsd 0x8(%rsp), %xmm2
movq %xmm2, %rax
movabsq $-0x8000000000000000, %rcx # imm = 0x8000000000000000
xorq %rcx, %rax
movq %rax, %xmm2
callq 0x23020
movsd 0x8(%rsp), %xmm0
movq %xmm0, %rax
movabsq $-0x8000000000000000, %rcx # imm = 0x8000000000000000
xorq %rcx, %rax
movq %rax, %xmm0
movsd 0x8(%rsp), %xmm1
movsd 0x8(%rsp), %xmm2
callq 0x23020
xorps %xmm1, %xmm1
movsd 0x66a5(%rip), %xmm2     # 0x18e010
movaps %xmm1, %xmm0
callq 0x22330
movsd 0x8(%rsp), %xmm0
movsd 0x8(%rsp), %xmm1
movsd 0x8(%rsp), %xmm2
callq 0x23020
movsd 0x8(%rsp), %xmm0
movq %xmm0, %rax
movabsq $-0x8000000000000000, %rcx # imm = 0x8000000000000000
xorq %rcx, %rax
movq %rax, %xmm0
movsd 0x8(%rsp), %xmm1
movsd 0x8(%rsp), %xmm2
callq 0x23020
movsd 0x8(%rsp), %xmm0
movq %xmm0, %rax
movabsq $-0x8000000000000000, %rcx # imm = 0x8000000000000000
xorq %rcx, %rax
movq %rax, %xmm0
movsd 0x8(%rsp), %xmm1
movq %xmm1, %rax
movabsq $-0x8000000000000000, %rcx # imm = 0x8000000000000000
xorq %rcx, %rax
movq %rax, %xmm1
movsd 0x8(%rsp), %xmm2
callq 0x23020
movsd 0x8(%rsp), %xmm0
movsd 0x8(%rsp), %xmm1
movq %xmm1, %rax
movabsq $-0x8000000000000000, %rcx # imm = 0x8000000000000000
xorq %rcx, %rax
movq %rax, %xmm1
movsd 0x8(%rsp), %xmm2
callq 0x23020
movsd 0x6b7d(%rip), %xmm0     # 0x18e5b0
xorps %xmm2, %xmm2
movaps %xmm2, %xmm1
callq 0x22330
movsd 0x8(%rsp), %xmm0
movq %xmm0, %rax
movabsq $-0x8000000000000000, %rcx # imm = 0x8000000000000000
xorq %rcx, %rax
movq %rax, %xmm0
movsd 0x8(%rsp), %xmm1
movq %xmm1, %rax
movabsq $-0x8000000000000000, %rcx # imm = 0x8000000000000000
xorq %rcx, %rax
movq %rax, %xmm1
movsd 0x8(%rsp), %xmm2
callq 0x23020
movsd 0x8(%rsp), %xmm0
movq %xmm0, %rax
movabsq $-0x8000000000000000, %rcx # imm = 0x8000000000000000
xorq %rcx, %rax
movq %rax, %xmm0
movsd 0x8(%rsp), %xmm1
movsd 0x8(%rsp), %xmm2
callq 0x23020
movsd 0x8(%rsp), %xmm0
movq %xmm0, %rax
movabsq $-0x8000000000000000, %rcx # imm = 0x8000000000000000
xorq %rcx, %rax
movq %rax, %xmm0
movsd 0x8(%rsp), %xmm1
movsd 0x8(%rsp), %xmm2
movq %xmm2, %rax
movabsq $-0x8000000000000000, %rcx # imm = 0x8000000000000000
xorq %rcx, %rax
movq %rax, %xmm2
callq 0x23020
movsd 0x8(%rsp), %xmm0
movq %xmm0, %rax
movabsq $-0x8000000000000000, %rcx # imm = 0x8000000000000000
xorq %rcx, %rax
movq %rax, %xmm0
movsd 0x8(%rsp), %xmm1
movq %xmm1, %rax
movabsq $-0x8000000000000000, %rcx # imm = 0x8000000000000000
xorq %rcx, %rax
movq %rax, %xmm1
movsd 0x8(%rsp), %xmm2
movq %xmm2, %rax
movabsq $-0x8000000000000000, %rcx # imm = 0x8000000000000000
xorq %rcx, %rax
movq %rax, %xmm2
callq 0x23020
xorps %xmm2, %xmm2
movsd 0x6a53(%rip), %xmm1     # 0x18e5b0
movaps %xmm2, %xmm0
callq 0x22330
movsd 0x8(%rsp), %xmm0
movq %xmm0, %rax
movabsq $-0x8000000000000000, %rcx # imm = 0x8000000000000000
xorq %rcx, %rax
movq %rax, %xmm0
movsd 0x8(%rsp), %xmm1
movq %xmm1, %rax
movabsq $-0x8000000000000000, %rcx # imm = 0x8000000000000000
xorq %rcx, %rax
movq %rax, %xmm1
movsd 0x8(%rsp), %xmm2
callq 0x23020
movsd 0x8(%rsp), %xmm0
movq %xmm0, %rax
movabsq $-0x8000000000000000, %rcx # imm = 0x8000000000000000
xorq %rcx, %rax
movq %rax, %xmm0
movsd 0x8(%rsp), %xmm1
movq %xmm1, %rax
movabsq $-0x8000000000000000, %rcx # imm = 0x8000000000000000
xorq %rcx, %rax
movq %rax, %xmm1
movsd 0x8(%rsp), %xmm2
movq %xmm2, %rax
movabsq $-0x8000000000000000, %rcx # imm = 0x8000000000000000
xorq %rcx, %rax
movq %rax, %xmm2
callq 0x23020
movsd 0x8(%rsp), %xmm0
movsd 0x8(%rsp), %xmm1
movq %xmm1, %rax
movabsq $-0x8000000000000000, %rcx # imm = 0x8000000000000000
xorq %rcx, %rax
movq %rax, %xmm1
movsd 0x8(%rsp), %xmm2
movq %xmm2, %rax
movabsq $-0x8000000000000000, %rcx # imm = 0x8000000000000000
xorq %rcx, %rax
movq %rax, %xmm2
callq 0x23020
movsd 0x8(%rsp), %xmm0
movsd 0x8(%rsp), %xmm1
movq %xmm1, %rax
movabsq $-0x8000000000000000, %rcx # imm = 0x8000000000000000
xorq %rcx, %rax
movq %rax, %xmm1
movsd 0x8(%rsp), %xmm2
callq 0x23020
xorps %xmm1, %xmm1
movsd 0x692c(%rip), %xmm2     # 0x18e5b0
movaps %xmm1, %xmm0
callq 0x22330
movsd 0x8(%rsp), %xmm0
movq %xmm0, %rax
movabsq $-0x8000000000000000, %rcx # imm = 0x8000000000000000
xorq %rcx, %rax
movq %rax, %xmm0
movsd 0x8(%rsp), %xmm1
movq %xmm1, %rax
movabsq $-0x8000000000000000, %rcx # imm = 0x8000000000000000
xorq %rcx, %rax
movq %rax, %xmm1
movsd 0x8(%rsp), %xmm2
movq %xmm2, %rax
movabsq $-0x8000000000000000, %rcx # imm = 0x8000000000000000
xorq %rcx, %rax
movq %rax, %xmm2
callq 0x23020
movsd 0x8(%rsp), %xmm0
movq %xmm0, %rax
movabsq $-0x8000000000000000, %rcx # imm = 0x8000000000000000
xorq %rcx, %rax
movq %rax, %xmm0
movsd 0x8(%rsp), %xmm1
movsd 0x8(%rsp), %xmm2
movq %xmm2, %rax
movabsq $-0x8000000000000000, %rcx # imm = 0x8000000000000000
xorq %rcx, %rax
movq %rax, %xmm2
callq 0x23020
movsd 0x8(%rsp), %xmm0
movsd 0x8(%rsp), %xmm1
movsd 0x8(%rsp), %xmm2
movq %xmm2, %rax
movabsq $-0x8000000000000000, %rcx # imm = 0x8000000000000000
xorq %rcx, %rax
movq %rax, %xmm2
callq 0x23020
movsd 0x8(%rsp), %xmm0
movsd 0x8(%rsp), %xmm1
movq %xmm1, %rax
movabsq $-0x8000000000000000, %rcx # imm = 0x8000000000000000
xorq %rcx, %rax
movq %rax, %xmm1
movsd 0x8(%rsp), %xmm2
movq %xmm2, %rax
movabsq $-0x8000000000000000, %rcx # imm = 0x8000000000000000
xorq %rcx, %rax
movq %rax, %xmm2
callq 0x23020
callq 0x22de0
addq $0x18, %rsp
retq
nopw (%rax,%rax)