#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 */

/* Variables and functions */
int /*<<< orphan*/ GL_LINE_LOOP;
int /*<<< orphan*/ GL_QUADS;
int /*<<< orphan*/ GL_TRIANGLES;
int /*<<< orphan*/ glBegin(int /*<<< orphan*/);
int /*<<< orphan*/ glEnd();
int /*<<< orphan*/ glNormal3f(double, double, double);
int /*<<< orphan*/ glRotatef(double, double, double, double);
int /*<<< orphan*/ glVertex3f(float, float, float);
void Box(float width, float height, float depth, char solid) {
  char i, j = 0;
  float x = width / 2.0, y = height / 2.0, z = depth / 2.0;
  for (i = 0; i < 4; i++) {
    glRotatef(90.0, 0.0, 0.0, 1.0);
    if (j) {
      if (!solid)
        glBegin(GL_LINE_LOOP);
      else
        glBegin(GL_QUADS);
      glNormal3f(-1.0, 0.0, 0.0);
      glVertex3f(-x, y, z);
      glVertex3f(-x, -y, z);
      glVertex3f(-x, -y, -z);
      glVertex3f(-x, y, -z);
      glEnd();
      if (solid) {
        glBegin(GL_TRIANGLES);
        glNormal3f(0.0, 0.0, 1.0);
        glVertex3f(0.0, 0.0, z);
        glVertex3f(-x, y, z);
        glVertex3f(-x, -y, z);
        glNormal3f(0.0, 0.0, -1.0);
        glVertex3f(0.0, 0.0, -z);
        glVertex3f(-x, -y, -z);
        glVertex3f(-x, y, -z);
        glEnd();
      }
      j = 0;
    } else {
      if (!solid)
        glBegin(GL_LINE_LOOP);
      else
        glBegin(GL_QUADS);
      glNormal3f(-1.0, 0.0, 0.0);
      glVertex3f(-y, x, z);
      glVertex3f(-y, -x, z);
      glVertex3f(-y, -x, -z);
      glVertex3f(-y, x, -z);
      glEnd();
      if (solid) {
        glBegin(GL_TRIANGLES);
        glNormal3f(0.0, 0.0, 1.0);
        glVertex3f(0.0, 0.0, z);
        glVertex3f(-y, x, z);
        glVertex3f(-y, -x, z);
        glNormal3f(0.0, 0.0, -1.0);
        glVertex3f(0.0, 0.0, -z);
        glVertex3f(-y, -x, -z);
        glVertex3f(-y, x, -z);
        glEnd();
      }
      j = 1;
    }
  }
}


x86 assembly (clang, -O0):
<Box>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %dil,%al
movss  %xmm0,-0x4(%rbp)
movss  %xmm1,-0x8(%rbp)
movss  %xmm2,-0xc(%rbp)
mov    %al,-0xd(%rbp)
movb   $0x0,-0xf(%rbp)
movss  -0x4(%rbp),%xmm0
cvtss2sd %xmm0,%xmm0
movsd  0xe7e(%rip),%xmm1
divsd  %xmm1,%xmm0
cvtsd2ss %xmm0,%xmm0
movss  %xmm0,-0x14(%rbp)
movss  -0x8(%rbp),%xmm0
cvtss2sd %xmm0,%xmm0
movsd  0xe60(%rip),%xmm1
divsd  %xmm1,%xmm0
cvtsd2ss %xmm0,%xmm0
movss  %xmm0,-0x18(%rbp)
movss  -0xc(%rbp),%xmm0
cvtss2sd %xmm0,%xmm0
movsd  0xe42(%rip),%xmm1
divsd  %xmm1,%xmm0
cvtsd2ss %xmm0,%xmm0
movss  %xmm0,-0x1c(%rbp)
movb   $0x0,-0xe(%rbp)
movsbl -0xe(%rbp),%eax
cmp    $0x4,%eax
jge    166e <Box+0x51e>
movsd  0xe24(%rip),%xmm0
xorps  %xmm2,%xmm2
movsd  0xe21(%rip),%xmm3
movaps %xmm2,%xmm1
call   1060 <glRotatef@plt>
cmpb   $0x0,-0xf(%rbp)
je     1431 <Box+0x2e1>
cmpb   $0x0,-0xd(%rbp)
jne    121e <Box+0xce>
mov    0x2dd6(%rip),%rax
mov    (%rax),%edi
call   1050 <glBegin@plt>
jmp    122c <Box+0xdc>
mov    0x2dbb(%rip),%rax
mov    (%rax),%edi
call   1050 <glBegin@plt>
movsd  0xde4(%rip),%xmm0
xorps  %xmm2,%xmm2
movaps %xmm2,%xmm1
call   1070 <glNormal3f@plt>
movss  -0x14(%rbp),%xmm0
movd   %xmm0,%eax
xor    $0x80000000,%eax
movd   %eax,%xmm0
movss  -0x18(%rbp),%xmm1
movss  -0x1c(%rbp),%xmm2
call   1030 <glVertex3f@plt>
movss  -0x14(%rbp),%xmm0
movd   %xmm0,%eax
xor    $0x80000000,%eax
movd   %eax,%xmm0
movss  -0x18(%rbp),%xmm1
movd   %xmm1,%eax
xor    $0x80000000,%eax
movd   %eax,%xmm1
movss  -0x1c(%rbp),%xmm2
call   1030 <glVertex3f@plt>
movss  -0x14(%rbp),%xmm0
movd   %xmm0,%eax
xor    $0x80000000,%eax
movd   %eax,%xmm0
movss  -0x18(%rbp),%xmm1
movd   %xmm1,%eax
xor    $0x80000000,%eax
movd   %eax,%xmm1
movss  -0x1c(%rbp),%xmm2
movd   %xmm2,%eax
xor    $0x80000000,%eax
movd   %eax,%xmm2
call   1030 <glVertex3f@plt>
movss  -0x14(%rbp),%xmm0
movd   %xmm0,%eax
xor    $0x80000000,%eax
movd   %eax,%xmm0
movss  -0x18(%rbp),%xmm1
movss  -0x1c(%rbp),%xmm2
movd   %xmm2,%eax
xor    $0x80000000,%eax
movd   %eax,%xmm2
call   1030 <glVertex3f@plt>
mov    $0x0,%al
call   1040 <glEnd@plt>
cmpb   $0x0,-0xd(%rbp)
je     1428 <Box+0x2d8>
mov    0x2cc1(%rip),%rax
mov    (%rax),%edi
call   1050 <glBegin@plt>
xorps  %xmm1,%xmm1
movsd  0xcef(%rip),%xmm2
movaps %xmm1,%xmm0
call   1070 <glNormal3f@plt>
movss  -0x1c(%rbp),%xmm2
xorps  %xmm1,%xmm1
movaps %xmm1,%xmm0
call   1030 <glVertex3f@plt>
movss  -0x14(%rbp),%xmm0
movd   %xmm0,%eax
xor    $0x80000000,%eax
movd   %eax,%xmm0
movss  -0x18(%rbp),%xmm1
movss  -0x1c(%rbp),%xmm2
call   1030 <glVertex3f@plt>
movss  -0x14(%rbp),%xmm0
movd   %xmm0,%eax
xor    $0x80000000,%eax
movd   %eax,%xmm0
movss  -0x18(%rbp),%xmm1
movd   %xmm1,%eax
xor    $0x80000000,%eax
movd   %eax,%xmm1
movss  -0x1c(%rbp),%xmm2
call   1030 <glVertex3f@plt>
xorps  %xmm1,%xmm1
movsd  0xc85(%rip),%xmm2
movaps %xmm1,%xmm0
call   1070 <glNormal3f@plt>
movss  -0x1c(%rbp),%xmm0
movd   %xmm0,%eax
xor    $0x80000000,%eax
movd   %eax,%xmm2
xorps  %xmm1,%xmm1
movaps %xmm1,%xmm0
call   1030 <glVertex3f@plt>
movss  -0x14(%rbp),%xmm0
movd   %xmm0,%eax
xor    $0x80000000,%eax
movd   %eax,%xmm0
movss  -0x18(%rbp),%xmm1
movd   %xmm1,%eax
xor    $0x80000000,%eax
movd   %eax,%xmm1
movss  -0x1c(%rbp),%xmm2
movd   %xmm2,%eax
xor    $0x80000000,%eax
movd   %eax,%xmm2
call   1030 <glVertex3f@plt>
movss  -0x14(%rbp),%xmm0
movd   %xmm0,%eax
xor    $0x80000000,%eax
movd   %eax,%xmm0
movss  -0x18(%rbp),%xmm1
movss  -0x1c(%rbp),%xmm2
movd   %xmm2,%eax
xor    $0x80000000,%eax
movd   %eax,%xmm2
call   1030 <glVertex3f@plt>
mov    $0x0,%al
call   1040 <glEnd@plt>
movb   $0x0,-0xf(%rbp)
jmp    165c <Box+0x50c>
cmpb   $0x0,-0xd(%rbp)
jne    144e <Box+0x2fe>
mov    0x2ba6(%rip),%rax
mov    (%rax),%edi
call   1050 <glBegin@plt>
jmp    145c <Box+0x30c>
mov    0x2b8b(%rip),%rax
mov    (%rax),%edi
call   1050 <glBegin@plt>
movsd  0xbb4(%rip),%xmm0
xorps  %xmm2,%xmm2
movaps %xmm2,%xmm1
call   1070 <glNormal3f@plt>
movss  -0x18(%rbp),%xmm0
movd   %xmm0,%eax
xor    $0x80000000,%eax
movd   %eax,%xmm0
movss  -0x14(%rbp),%xmm1
movss  -0x1c(%rbp),%xmm2
call   1030 <glVertex3f@plt>
movss  -0x18(%rbp),%xmm0
movd   %xmm0,%eax
xor    $0x80000000,%eax
movd   %eax,%xmm0
movss  -0x14(%rbp),%xmm1
movd   %xmm1,%eax
xor    $0x80000000,%eax
movd   %eax,%xmm1
movss  -0x1c(%rbp),%xmm2
call   1030 <glVertex3f@plt>
movss  -0x18(%rbp),%xmm0
movd   %xmm0,%eax
xor    $0x80000000,%eax
movd   %eax,%xmm0
movss  -0x14(%rbp),%xmm1
movd   %xmm1,%eax
xor    $0x80000000,%eax
movd   %eax,%xmm1
movss  -0x1c(%rbp),%xmm2
movd   %xmm2,%eax
xor    $0x80000000,%eax
movd   %eax,%xmm2
call   1030 <glVertex3f@plt>
movss  -0x18(%rbp),%xmm0
movd   %xmm0,%eax
xor    $0x80000000,%eax
movd   %eax,%xmm0
movss  -0x14(%rbp),%xmm1
movss  -0x1c(%rbp),%xmm2
movd   %xmm2,%eax
xor    $0x80000000,%eax
movd   %eax,%xmm2
call   1030 <glVertex3f@plt>
mov    $0x0,%al
call   1040 <glEnd@plt>
cmpb   $0x0,-0xd(%rbp)
je     1658 <Box+0x508>
mov    0x2a91(%rip),%rax
mov    (%rax),%edi
call   1050 <glBegin@plt>
xorps  %xmm1,%xmm1
movsd  0xabf(%rip),%xmm2
movaps %xmm1,%xmm0
call   1070 <glNormal3f@plt>
movss  -0x1c(%rbp),%xmm2
xorps  %xmm1,%xmm1
movaps %xmm1,%xmm0
call   1030 <glVertex3f@plt>
movss  -0x18(%rbp),%xmm0
movd   %xmm0,%eax
xor    $0x80000000,%eax
movd   %eax,%xmm0
movss  -0x14(%rbp),%xmm1
movss  -0x1c(%rbp),%xmm2
call   1030 <glVertex3f@plt>
movss  -0x18(%rbp),%xmm0
movd   %xmm0,%eax
xor    $0x80000000,%eax
movd   %eax,%xmm0
movss  -0x14(%rbp),%xmm1
movd   %xmm1,%eax
xor    $0x80000000,%eax
movd   %eax,%xmm1
movss  -0x1c(%rbp),%xmm2
call   1030 <glVertex3f@plt>
xorps  %xmm1,%xmm1
movsd  0xa55(%rip),%xmm2
movaps %xmm1,%xmm0
call   1070 <glNormal3f@plt>
movss  -0x1c(%rbp),%xmm0
movd   %xmm0,%eax
xor    $0x80000000,%eax
movd   %eax,%xmm2
xorps  %xmm1,%xmm1
movaps %xmm1,%xmm0
call   1030 <glVertex3f@plt>
movss  -0x18(%rbp),%xmm0
movd   %xmm0,%eax
xor    $0x80000000,%eax
movd   %eax,%xmm0
movss  -0x14(%rbp),%xmm1
movd   %xmm1,%eax
xor    $0x80000000,%eax
movd   %eax,%xmm1
movss  -0x1c(%rbp),%xmm2
movd   %xmm2,%eax
xor    $0x80000000,%eax
movd   %eax,%xmm2
call   1030 <glVertex3f@plt>
movss  -0x18(%rbp),%xmm0
movd   %xmm0,%eax
xor    $0x80000000,%eax
movd   %eax,%xmm0
movss  -0x14(%rbp),%xmm1
movss  -0x1c(%rbp),%xmm2
movd   %xmm2,%eax
xor    $0x80000000,%eax
movd   %eax,%xmm2
call   1030 <glVertex3f@plt>
mov    $0x0,%al
call   1040 <glEnd@plt>
movb   $0x1,-0xf(%rbp)
jmp    1661 <Box+0x511>
mov    -0xe(%rbp),%al
add    $0x1,%al
mov    %al,-0xe(%rbp)
jmp    11cf <Box+0x7f>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<Box>:
push   %rbp
push   %r15
push   %r14
push   %r13
push   %r12
push   %rbx
sub    $0x68,%rsp
mov    %edi,%r13d
movss  0xe97(%rip),%xmm3
mulss  %xmm3,%xmm0
mulss  %xmm3,%xmm1
mulss  %xmm3,%xmm2
movaps 0xe94(%rip),%xmm3
movaps %xmm0,0x40(%rsp)
xorps  %xmm3,%xmm0
movaps %xmm0,0x10(%rsp)
movaps %xmm1,0x50(%rsp)
xorps  %xmm3,%xmm1
movaps %xmm1,(%rsp)
movaps %xmm2,0x30(%rsp)
xorps  %xmm2,%xmm3
movaps %xmm3,0x20(%rsp)
mov    $0x4,%bl
mov    0x2e35(%rip),%r14
mov    0x2e36(%rip),%r15
mov    0x2e17(%rip),%r12
xor    %ebp,%ebp
jmp    12ca <Box+0x17a>
movaps (%rsp),%xmm0
movaps 0x40(%rsp),%xmm1
movaps 0x30(%rsp),%xmm2
call   1030 <glVertex3f@plt>
movaps (%rsp),%xmm0
movaps 0x10(%rsp),%xmm1
movaps 0x30(%rsp),%xmm2
call   1030 <glVertex3f@plt>
movaps (%rsp),%xmm0
movaps 0x10(%rsp),%xmm1
movaps 0x20(%rsp),%xmm2
call   1030 <glVertex3f@plt>
movaps (%rsp),%xmm0
movaps 0x40(%rsp),%xmm1
movaps 0x20(%rsp),%xmm2
call   1030 <glVertex3f@plt>
xor    %eax,%eax
call   1040 <glEnd@plt>
test   %r13b,%r13b
je     1417 <Box+0x2c7>
mov    (%r12),%edi
call   1050 <glBegin@plt>
xorps  %xmm0,%xmm0
xorps  %xmm1,%xmm1
movsd  0xdf5(%rip),%xmm2
call   1070 <glNormal3f@plt>
xorps  %xmm0,%xmm0
xorps  %xmm1,%xmm1
movaps 0x30(%rsp),%xmm2
call   1030 <glVertex3f@plt>
movaps (%rsp),%xmm0
movaps 0x40(%rsp),%xmm1
movaps 0x30(%rsp),%xmm2
call   1030 <glVertex3f@plt>
movaps (%rsp),%xmm0
movaps 0x10(%rsp),%xmm1
movaps 0x30(%rsp),%xmm2
call   1030 <glVertex3f@plt>
xorps  %xmm0,%xmm0
xorps  %xmm1,%xmm1
movsd  0xdb4(%rip),%xmm2
call   1070 <glNormal3f@plt>
xorps  %xmm0,%xmm0
xorps  %xmm1,%xmm1
movaps 0x20(%rsp),%xmm2
call   1030 <glVertex3f@plt>
movaps (%rsp),%xmm0
movaps 0x10(%rsp),%xmm1
movaps 0x20(%rsp),%xmm2
call   1030 <glVertex3f@plt>
movaps (%rsp),%xmm0
movaps 0x40(%rsp),%xmm1
movaps 0x20(%rsp),%xmm2
call   1030 <glVertex3f@plt>
mov    $0x1,%bpl
xor    %eax,%eax
call   1040 <glEnd@plt>
add    $0xff,%bl
je     141f <Box+0x2cf>
xorps  %xmm1,%xmm1
xorps  %xmm2,%xmm2
movsd  0xd48(%rip),%xmm0
movsd  0xd48(%rip),%xmm3
call   1060 <glRotatef@plt>
mov    %r14,%rax
test   %r13b,%r13b
jne    12f0 <Box+0x1a0>
mov    %r15,%rax
mov    (%rax),%edi
call   1050 <glBegin@plt>
xorps  %xmm1,%xmm1
xorps  %xmm2,%xmm2
movsd  0xd2b(%rip),%xmm0
call   1070 <glNormal3f@plt>
test   %bpl,%bpl
je     11c0 <Box+0x70>
movaps 0x10(%rsp),%xmm0
movaps 0x50(%rsp),%xmm1
movaps 0x30(%rsp),%xmm2
call   1030 <glVertex3f@plt>
movaps 0x10(%rsp),%xmm0
movaps (%rsp),%xmm1
movaps 0x30(%rsp),%xmm2
call   1030 <glVertex3f@plt>
movaps 0x10(%rsp),%xmm0
movaps (%rsp),%xmm1
movaps 0x20(%rsp),%xmm2
call   1030 <glVertex3f@plt>
movaps 0x10(%rsp),%xmm0
movaps 0x50(%rsp),%xmm1
movaps 0x20(%rsp),%xmm2
call   1030 <glVertex3f@plt>
xor    %ebp,%ebp
xor    %eax,%eax
call   1040 <glEnd@plt>
test   %r13b,%r13b
je     12c1 <Box+0x171>
mov    (%r12),%edi
call   1050 <glBegin@plt>
xorps  %xmm0,%xmm0
xorps  %xmm1,%xmm1
movsd  0xc9e(%rip),%xmm2
call   1070 <glNormal3f@plt>
xorps  %xmm0,%xmm0
xorps  %xmm1,%xmm1
movaps 0x30(%rsp),%xmm2
call   1030 <glVertex3f@plt>
movaps 0x10(%rsp),%xmm0
movaps 0x50(%rsp),%xmm1
movaps 0x30(%rsp),%xmm2
call   1030 <glVertex3f@plt>
movaps 0x10(%rsp),%xmm0
movaps (%rsp),%xmm1
movaps 0x30(%rsp),%xmm2
call   1030 <glVertex3f@plt>
xorps  %xmm0,%xmm0
xorps  %xmm1,%xmm1
movsd  0xc5c(%rip),%xmm2
call   1070 <glNormal3f@plt>
xorps  %xmm0,%xmm0
xorps  %xmm1,%xmm1
movaps 0x20(%rsp),%xmm2
call   1030 <glVertex3f@plt>
movaps 0x10(%rsp),%xmm0
movaps (%rsp),%xmm1
movaps 0x20(%rsp),%xmm2
call   1030 <glVertex3f@plt>
movaps 0x10(%rsp),%xmm0
movaps 0x50(%rsp),%xmm1
movaps 0x20(%rsp),%xmm2
call   1030 <glVertex3f@plt>
xor    %ebp,%ebp
jmp    12ba <Box+0x16a>
mov    $0x1,%bpl
jmp    12c1 <Box+0x171>
add    $0x68,%rsp
pop    %rbx
pop    %r12
pop    %r13
pop    %r14
pop    %r15
pop    %rbp
ret

LLVM IR (-O0):
@GL_LINE_LOOP = global i32 0
@GL_QUADS = global i32 0
@GL_TRIANGLES = global i32 0
define void @Box(float %0, float %1, float %2, i8 signext %3) {
%5 = alloca float
%6 = alloca float
%7 = alloca float
%8 = alloca i8
%9 = alloca i8
%10 = alloca i8
%11 = alloca float
%12 = alloca float
%13 = alloca float
store float %0, float* %5
store float %1, float* %6
store float %2, float* %7
store i8 %3, i8* %8
store i8 0, i8* %10
%14 = load float, float* %5
%15 = fpext float %14 to double
%16 = fdiv double %15, 2.000000e+00
%17 = fptrunc double %16 to float
store float %17, float* %11
%18 = load float, float* %6
%19 = fpext float %18 to double
%20 = fdiv double %19, 2.000000e+00
%21 = fptrunc double %20 to float
store float %21, float* %12
%22 = load float, float* %7
%23 = fpext float %22 to double
%24 = fdiv double %23, 2.000000e+00
%25 = fptrunc double %24 to float
store float %25, float* %13
store i8 0, i8* %9
br label %26
26: ; preds = %183, %4
%27 = load i8, i8* %9
%28 = sext i8 %27 to i32
%29 = icmp slt i32 %28, 4
br i1 %29, label %30, label %186
30: ; preds = %26
%31 = call i32 @glRotatef(double 9.000000e+01, double 0.000000e+00, double 0.000000e+00, double 1.000000e+00)
%32 = load i8, i8* %10
%33 = icmp ne i8 %32, 0
br i1 %33, label %34, label %108
34: ; preds = %30
%35 = load i8, i8* %8
%36 = icmp ne i8 %35, 0
br i1 %36, label %40, label %37
37: ; preds = %34
%38 = load i32, i32* @GL_LINE_LOOP
%39 = call i32 @glBegin(i32 %38)
br label %43
40: ; preds = %34
%41 = load i32, i32* @GL_QUADS
%42 = call i32 @glBegin(i32 %41)
br label %43
43: ; preds = %40, %37
%44 = call i32 @glNormal3f(double -1.000000e+00, double 0.000000e+00, double 0.000000e+00)
%45 = load float, float* %11
%46 = fneg float %45
%47 = load float, float* %12
%48 = load float, float* %13
%49 = call i32 @glVertex3f(float %46, float %47, float %48)
%50 = load float, float* %11
%51 = fneg float %50
%52 = load float, float* %12
%53 = fneg float %52
%54 = load float, float* %13
%55 = call i32 @glVertex3f(float %51, float %53, float %54)
%56 = load float, float* %11
%57 = fneg float %56
%58 = load float, float* %12
%59 = fneg float %58
%60 = load float, float* %13
%61 = fneg float %60
%62 = call i32 @glVertex3f(float %57, float %59, float %61)
%63 = load float, float* %11
%64 = fneg float %63
%65 = load float, float* %12
%66 = load float, float* %13
%67 = fneg float %66
%68 = call i32 @glVertex3f(float %64, float %65, float %67)
%69 = call i32 (...) @glEnd()
%70 = load i8, i8* %8
%71 = icmp ne i8 %70, 0
br i1 %71, label %72, label %107
72: ; preds = %43
%73 = load i32, i32* @GL_TRIANGLES
%74 = call i32 @glBegin(i32 %73)
%75 = call i32 @glNormal3f(double 0.000000e+00, double 0.000000e+00, double 1.000000e+00)
%76 = load float, float* %13
%77 = call i32 @glVertex3f(float 0.000000e+00, float 0.000000e+00, float %76)
%78 = load float, float* %11
%79 = fneg float %78
%80 = load float, float* %12
%81 = load float, float* %13
%82 = call i32 @glVertex3f(float %79, float %80, float %81)
%83 = load float, float* %11
%84 = fneg float %83
%85 = load float, float* %12
%86 = fneg float %85
%87 = load float, float* %13
%88 = call i32 @glVertex3f(float %84, float %86, float %87)
%89 = call i32 @glNormal3f(double 0.000000e+00, double 0.000000e+00, double -1.000000e+00)
%90 = load float, float* %13
%91 = fneg float %90
%92 = call i32 @glVertex3f(float 0.000000e+00, float 0.000000e+00, float %91)
%93 = load float, float* %11
%94 = fneg float %93
%95 = load float, float* %12
%96 = fneg float %95
%97 = load float, float* %13
%98 = fneg float %97
%99 = call i32 @glVertex3f(float %94, float %96, float %98)
%100 = load float, float* %11
%101 = fneg float %100
%102 = load float, float* %12
%103 = load float, float* %13
%104 = fneg float %103
%105 = call i32 @glVertex3f(float %101, float %102, float %104)
%106 = call i32 (...) @glEnd()
br label %107
107: ; preds = %72, %43
store i8 0, i8* %10
br label %182
108: ; preds = %30
%109 = load i8, i8* %8
%110 = icmp ne i8 %109, 0
br i1 %110, label %114, label %111
111: ; preds = %108
%112 = load i32, i32* @GL_LINE_LOOP
%113 = call i32 @glBegin(i32 %112)
br label %117
114: ; preds = %108
%115 = load i32, i32* @GL_QUADS
%116 = call i32 @glBegin(i32 %115)
br label %117
117: ; preds = %114, %111
%118 = call i32 @glNormal3f(double -1.000000e+00, double 0.000000e+00, double 0.000000e+00)
%119 = load float, float* %12
%120 = fneg float %119
%121 = load float, float* %11
%122 = load float, float* %13
%123 = call i32 @glVertex3f(float %120, float %121, float %122)
%124 = load float, float* %12
%125 = fneg float %124
%126 = load float, float* %11
%127 = fneg float %126
%128 = load float, float* %13
%129 = call i32 @glVertex3f(float %125, float %127, float %128)
%130 = load float, float* %12
%131 = fneg float %130
%132 = load float, float* %11
%133 = fneg float %132
%134 = load float, float* %13
%135 = fneg float %134
%136 = call i32 @glVertex3f(float %131, float %133, float %135)
%137 = load float, float* %12
%138 = fneg float %137
%139 = load float, float* %11
%140 = load float, float* %13
%141 = fneg float %140
%142 = call i32 @glVertex3f(float %138, float %139, float %141)
%143 = call i32 (...) @glEnd()
%144 = load i8, i8* %8
%145 = icmp ne i8 %144, 0
br i1 %145, label %146, label %181
146: ; preds = %117
%147 = load i32, i32* @GL_TRIANGLES
%148 = call i32 @glBegin(i32 %147)
%149 = call i32 @glNormal3f(double 0.000000e+00, double 0.000000e+00, double 1.000000e+00)
%150 = load float, float* %13
%151 = call i32 @glVertex3f(float 0.000000e+00, float 0.000000e+00, float %150)
%152 = load float, float* %12
%153 = fneg float %152
%154 = load float, float* %11
%155 = load float, float* %13
%156 = call i32 @glVertex3f(float %153, float %154, float %155)
%157 = load float, float* %12
%158 = fneg float %157
%159 = load float, float* %11
%160 = fneg float %159
%161 = load float, float* %13
%162 = call i32 @glVertex3f(float %158, float %160, float %161)
%163 = call i32 @glNormal3f(double 0.000000e+00, double 0.000000e+00, double -1.000000e+00)
%164 = load float, float* %13
%165 = fneg float %164
%166 = call i32 @glVertex3f(float 0.000000e+00, float 0.000000e+00, float %165)
%167 = load float, float* %12
%168 = fneg float %167
%169 = load float, float* %11
%170 = fneg float %169
%171 = load float, float* %13
%172 = fneg float %171
%173 = call i32 @glVertex3f(float %168, float %170, float %172)
%174 = load float, float* %12
%175 = fneg float %174
%176 = load float, float* %11
%177 = load float, float* %13
%178 = fneg float %177
%179 = call i32 @glVertex3f(float %175, float %176, float %178)
%180 = call i32 (...) @glEnd()
br label %181
181: ; preds = %146, %117
store i8 1, i8* %10
br label %182
182: ; preds = %181, %107
br label %183
183: ; preds = %182
%184 = load i8, i8* %9
%185 = add i8 %184, 1
store i8 %185, i8* %9
br label %26
186: ; preds = %26
ret void
}

LLVM IR (-O2):
@GL_LINE_LOOP = global i32 0
@GL_QUADS = global i32 0
@GL_TRIANGLES = global i32 0
define void @Box(float %0, float %1, float %2, i8 signext %3) {
%5 = fmul float %0, 5.000000e-01
%6 = fmul float %1, 5.000000e-01
%7 = fmul float %2, 5.000000e-01
%8 = icmp eq i8 %3, 0
%9 = fneg float %5
%10 = fneg float %6
%11 = fneg float %7
br label %12
12: ; preds = %4, %59
%13 = phi i8 [ 0, %4 ], [ %61, %59 ]
%14 = phi i8 [ 0, %4 ], [ %60, %59 ]
%15 = tail call i32 @glRotatef(double 9.000000e+01, double 0.000000e+00, double 0.000000e+00, double 1.000000e+00)
%16 = icmp eq i8 %14, 0
%17 = load i32, i32* @GL_LINE_LOOP
%18 = load i32, i32* @GL_QUADS
%19 = select i1 %8, i32 %17, i32 %18
%20 = tail call i32 @glBegin(i32 %19)
%21 = tail call i32 @glNormal3f(double -1.000000e+00, double 0.000000e+00, double 0.000000e+00)
br i1 %16, label %39, label %22
22: ; preds = %12
%23 = tail call i32 @glVertex3f(float %9, float %6, float %7)
%24 = tail call i32 @glVertex3f(float %9, float %10, float %7)
%25 = tail call i32 @glVertex3f(float %9, float %10, float %11)
%26 = tail call i32 @glVertex3f(float %9, float %6, float %11)
%27 = tail call i32 (...) @glEnd()
br i1 %8, label %59, label %28
28: ; preds = %22
%29 = load i32, i32* @GL_TRIANGLES
%30 = tail call i32 @glBegin(i32 %29)
%31 = tail call i32 @glNormal3f(double 0.000000e+00, double 0.000000e+00, double 1.000000e+00)
%32 = tail call i32 @glVertex3f(float 0.000000e+00, float 0.000000e+00, float %7)
%33 = tail call i32 @glVertex3f(float %9, float %6, float %7)
%34 = tail call i32 @glVertex3f(float %9, float %10, float %7)
%35 = tail call i32 @glNormal3f(double 0.000000e+00, double 0.000000e+00, double -1.000000e+00)
%36 = tail call i32 @glVertex3f(float 0.000000e+00, float 0.000000e+00, float %11)
%37 = tail call i32 @glVertex3f(float %9, float %10, float %11)
%38 = tail call i32 @glVertex3f(float %9, float %6, float %11)
br label %56
39: ; preds = %12
%40 = tail call i32 @glVertex3f(float %10, float %5, float %7)
%41 = tail call i32 @glVertex3f(float %10, float %9, float %7)
%42 = tail call i32 @glVertex3f(float %10, float %9, float %11)
%43 = tail call i32 @glVertex3f(float %10, float %5, float %11)
%44 = tail call i32 (...) @glEnd()
br i1 %8, label %59, label %45
45: ; preds = %39
%46 = load i32, i32* @GL_TRIANGLES
%47 = tail call i32 @glBegin(i32 %46)
%48 = tail call i32 @glNormal3f(double 0.000000e+00, double 0.000000e+00, double 1.000000e+00)
%49 = tail call i32 @glVertex3f(float 0.000000e+00, float 0.000000e+00, float %7)
%50 = tail call i32 @glVertex3f(float %10, float %5, float %7)
%51 = tail call i32 @glVertex3f(float %10, float %9, float %7)
%52 = tail call i32 @glNormal3f(double 0.000000e+00, double 0.000000e+00, double -1.000000e+00)
%53 = tail call i32 @glVertex3f(float 0.000000e+00, float 0.000000e+00, float %11)
%54 = tail call i32 @glVertex3f(float %10, float %9, float %11)
%55 = tail call i32 @glVertex3f(float %10, float %5, float %11)
br label %56
56: ; preds = %28, %45
%57 = phi i8 [ 1, %45 ], [ 0, %28 ]
%58 = tail call i32 (...) @glEnd()
br label %59
59: ; preds = %56, %39, %22
%60 = phi i8 [ 0, %22 ], [ 1, %39 ], [ %57, %56 ]
%61 = add nuw nsw i8 %13, 1
%62 = icmp eq i8 %61, 4
br i1 %62, label %63, label %12
63: ; preds = %59
ret void
}