#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*/ glPopMatrix();
int /*<<< orphan*/ glPushMatrix();
int /*<<< orphan*/ glRotatef(int, int, int, int /*<<< orphan*/);
int /*<<< orphan*/ glTranslatef(int /*<<< orphan*/, int /*<<< orphan*/, double);
int /*<<< orphan*/ glid(int, int);
void glidcube(int div) {
  glPushMatrix();
  glTranslatef(0, 0, -0.5);
  glid(div, div);
  glPopMatrix();
  glPushMatrix();
  glRotatef(180, 0, 1, 0);
  glTranslatef(0, 0, -0.5);
  glid(div, div);
  glPopMatrix();
  glPushMatrix();
  glRotatef(90, 1, 0, 0);
  glTranslatef(0, 0, -0.5);
  glid(div, div);
  glPopMatrix();
  glPushMatrix();
  glRotatef(90, -1, 0, 0);
  glTranslatef(0, 0, -0.5);
  glid(div, div);
  glPopMatrix();
  glPushMatrix();
  glRotatef(90, 0, 1, 0);
  glTranslatef(0, 0, -0.5);
  glid(div, div);
  glPopMatrix();
  glPushMatrix();
  glRotatef(90, 0, -1, 0);
  glTranslatef(0, 0, -0.5);
  glid(div, div);
  glPopMatrix();
  glPopMatrix();
}


x86 assembly (clang, -O0):
<glidcube>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    $0x0,%al
call   1040 <glPushMatrix@plt>
xor    %esi,%esi
movsd  0xe94(%rip),%xmm0
mov    %esi,%edi
call   1060 <glTranslatef@plt>
mov    -0x4(%rbp),%edi
mov    -0x4(%rbp),%esi
call   1050 <glid@plt>
mov    $0x0,%al
call   1030 <glPopMatrix@plt>
mov    $0x0,%al
call   1040 <glPushMatrix@plt>
mov    $0xb4,%edi
xor    %ecx,%ecx
mov    $0x1,%edx
mov    %ecx,%esi
call   1070 <glRotatef@plt>
xor    %esi,%esi
movsd  0xe57(%rip),%xmm0
mov    %esi,%edi
call   1060 <glTranslatef@plt>
mov    -0x4(%rbp),%edi
mov    -0x4(%rbp),%esi
call   1050 <glid@plt>
mov    $0x0,%al
call   1030 <glPopMatrix@plt>
mov    $0x0,%al
call   1040 <glPushMatrix@plt>
mov    $0x5a,%edi
mov    $0x1,%esi
xor    %ecx,%ecx
mov    %ecx,%edx
call   1070 <glRotatef@plt>
xor    %esi,%esi
movsd  0xe1a(%rip),%xmm0
mov    %esi,%edi
call   1060 <glTranslatef@plt>
mov    -0x4(%rbp),%edi
mov    -0x4(%rbp),%esi
call   1050 <glid@plt>
mov    $0x0,%al
call   1030 <glPopMatrix@plt>
mov    $0x0,%al
call   1040 <glPushMatrix@plt>
mov    $0x5a,%edi
mov    $0xffffffff,%esi
xor    %ecx,%ecx
mov    %ecx,%edx
call   1070 <glRotatef@plt>
xor    %esi,%esi
movsd  0xddd(%rip),%xmm0
mov    %esi,%edi
call   1060 <glTranslatef@plt>
mov    -0x4(%rbp),%edi
mov    -0x4(%rbp),%esi
call   1050 <glid@plt>
mov    $0x0,%al
call   1030 <glPopMatrix@plt>
mov    $0x0,%al
call   1040 <glPushMatrix@plt>
mov    $0x5a,%edi
xor    %ecx,%ecx
mov    $0x1,%edx
mov    %ecx,%esi
call   1070 <glRotatef@plt>
xor    %esi,%esi
movsd  0xda0(%rip),%xmm0
mov    %esi,%edi
call   1060 <glTranslatef@plt>
mov    -0x4(%rbp),%edi
mov    -0x4(%rbp),%esi
call   1050 <glid@plt>
mov    $0x0,%al
call   1030 <glPopMatrix@plt>
mov    $0x0,%al
call   1040 <glPushMatrix@plt>
mov    $0x5a,%edi
xor    %ecx,%ecx
mov    $0xffffffff,%edx
mov    %ecx,%esi
call   1070 <glRotatef@plt>
xor    %esi,%esi
movsd  0xd63(%rip),%xmm0
mov    %esi,%edi
call   1060 <glTranslatef@plt>
mov    -0x4(%rbp),%edi
mov    -0x4(%rbp),%esi
call   1050 <glid@plt>
mov    $0x0,%al
call   1030 <glPopMatrix@plt>
mov    $0x0,%al
call   1030 <glPopMatrix@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<glidcube>:
push   %rbx
mov    %edi,%ebx
xor    %eax,%eax
call   1040 <glPushMatrix@plt>
movsd  0xe9e(%rip),%xmm0
xor    %edi,%edi
xor    %esi,%esi
call   1060 <glTranslatef@plt>
mov    %ebx,%edi
mov    %ebx,%esi
call   1050 <glid@plt>
xor    %eax,%eax
call   1030 <glPopMatrix@plt>
xor    %eax,%eax
call   1040 <glPushMatrix@plt>
mov    $0xb4,%edi
xor    %esi,%esi
mov    $0x1,%edx
xor    %ecx,%ecx
call   1070 <glRotatef@plt>
xor    %edi,%edi
xor    %esi,%esi
movsd  0xe5f(%rip),%xmm0
call   1060 <glTranslatef@plt>
mov    %ebx,%edi
mov    %ebx,%esi
call   1050 <glid@plt>
xor    %eax,%eax
call   1030 <glPopMatrix@plt>
xor    %eax,%eax
call   1040 <glPushMatrix@plt>
mov    $0x5a,%edi
mov    $0x1,%esi
xor    %edx,%edx
xor    %ecx,%ecx
call   1070 <glRotatef@plt>
xor    %edi,%edi
xor    %esi,%esi
movsd  0xe24(%rip),%xmm0
call   1060 <glTranslatef@plt>
mov    %ebx,%edi
mov    %ebx,%esi
call   1050 <glid@plt>
xor    %eax,%eax
call   1030 <glPopMatrix@plt>
xor    %eax,%eax
call   1040 <glPushMatrix@plt>
mov    $0x5a,%edi
mov    $0xffffffff,%esi
xor    %edx,%edx
xor    %ecx,%ecx
call   1070 <glRotatef@plt>
xor    %edi,%edi
xor    %esi,%esi
movsd  0xde9(%rip),%xmm0
call   1060 <glTranslatef@plt>
mov    %ebx,%edi
mov    %ebx,%esi
call   1050 <glid@plt>
xor    %eax,%eax
call   1030 <glPopMatrix@plt>
xor    %eax,%eax
call   1040 <glPushMatrix@plt>
mov    $0x5a,%edi
xor    %esi,%esi
mov    $0x1,%edx
xor    %ecx,%ecx
call   1070 <glRotatef@plt>
xor    %edi,%edi
xor    %esi,%esi
movsd  0xdae(%rip),%xmm0
call   1060 <glTranslatef@plt>
mov    %ebx,%edi
mov    %ebx,%esi
call   1050 <glid@plt>
xor    %eax,%eax
call   1030 <glPopMatrix@plt>
xor    %eax,%eax
call   1040 <glPushMatrix@plt>
mov    $0x5a,%edi
xor    %esi,%esi
mov    $0xffffffff,%edx
xor    %ecx,%ecx
call   1070 <glRotatef@plt>
xor    %edi,%edi
xor    %esi,%esi
movsd  0xd73(%rip),%xmm0
call   1060 <glTranslatef@plt>
mov    %ebx,%edi
mov    %ebx,%esi
call   1050 <glid@plt>
xor    %eax,%eax
call   1030 <glPopMatrix@plt>
xor    %eax,%eax
pop    %rbx
jmp    1030 <glPopMatrix@plt>

LLVM IR (-O0):
define void @glidcube(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = call i32 (...) @glPushMatrix()
%4 = call i32 @glTranslatef(i32 0, i32 0, double -5.000000e-01)
%5 = load i32, i32* %2
%6 = load i32, i32* %2
%7 = call i32 @glid(i32 %5, i32 %6)
%8 = call i32 (...) @glPopMatrix()
%9 = call i32 (...) @glPushMatrix()
%10 = call i32 @glRotatef(i32 180, i32 0, i32 1, i32 0)
%11 = call i32 @glTranslatef(i32 0, i32 0, double -5.000000e-01)
%12 = load i32, i32* %2
%13 = load i32, i32* %2
%14 = call i32 @glid(i32 %12, i32 %13)
%15 = call i32 (...) @glPopMatrix()
%16 = call i32 (...) @glPushMatrix()
%17 = call i32 @glRotatef(i32 90, i32 1, i32 0, i32 0)
%18 = call i32 @glTranslatef(i32 0, i32 0, double -5.000000e-01)
%19 = load i32, i32* %2
%20 = load i32, i32* %2
%21 = call i32 @glid(i32 %19, i32 %20)
%22 = call i32 (...) @glPopMatrix()
%23 = call i32 (...) @glPushMatrix()
%24 = call i32 @glRotatef(i32 90, i32 -1, i32 0, i32 0)
%25 = call i32 @glTranslatef(i32 0, i32 0, double -5.000000e-01)
%26 = load i32, i32* %2
%27 = load i32, i32* %2
%28 = call i32 @glid(i32 %26, i32 %27)
%29 = call i32 (...) @glPopMatrix()
%30 = call i32 (...) @glPushMatrix()
%31 = call i32 @glRotatef(i32 90, i32 0, i32 1, i32 0)
%32 = call i32 @glTranslatef(i32 0, i32 0, double -5.000000e-01)
%33 = load i32, i32* %2
%34 = load i32, i32* %2
%35 = call i32 @glid(i32 %33, i32 %34)
%36 = call i32 (...) @glPopMatrix()
%37 = call i32 (...) @glPushMatrix()
%38 = call i32 @glRotatef(i32 90, i32 0, i32 -1, i32 0)
%39 = call i32 @glTranslatef(i32 0, i32 0, double -5.000000e-01)
%40 = load i32, i32* %2
%41 = load i32, i32* %2
%42 = call i32 @glid(i32 %40, i32 %41)
%43 = call i32 (...) @glPopMatrix()
%44 = call i32 (...) @glPopMatrix()
ret void
}

LLVM IR (-O2):
define void @glidcube(i32 %0) {
%2 = tail call i32 (...) @glPushMatrix()
%3 = tail call i32 @glTranslatef(i32 0, i32 0, double -5.000000e-01)
%4 = tail call i32 @glid(i32 %0, i32 %0)
%5 = tail call i32 (...) @glPopMatrix()
%6 = tail call i32 (...) @glPushMatrix()
%7 = tail call i32 @glRotatef(i32 180, i32 0, i32 1, i32 0)
%8 = tail call i32 @glTranslatef(i32 0, i32 0, double -5.000000e-01)
%9 = tail call i32 @glid(i32 %0, i32 %0)
%10 = tail call i32 (...) @glPopMatrix()
%11 = tail call i32 (...) @glPushMatrix()
%12 = tail call i32 @glRotatef(i32 90, i32 1, i32 0, i32 0)
%13 = tail call i32 @glTranslatef(i32 0, i32 0, double -5.000000e-01)
%14 = tail call i32 @glid(i32 %0, i32 %0)
%15 = tail call i32 (...) @glPopMatrix()
%16 = tail call i32 (...) @glPushMatrix()
%17 = tail call i32 @glRotatef(i32 90, i32 -1, i32 0, i32 0)
%18 = tail call i32 @glTranslatef(i32 0, i32 0, double -5.000000e-01)
%19 = tail call i32 @glid(i32 %0, i32 %0)
%20 = tail call i32 (...) @glPopMatrix()
%21 = tail call i32 (...) @glPushMatrix()
%22 = tail call i32 @glRotatef(i32 90, i32 0, i32 1, i32 0)
%23 = tail call i32 @glTranslatef(i32 0, i32 0, double -5.000000e-01)
%24 = tail call i32 @glid(i32 %0, i32 %0)
%25 = tail call i32 (...) @glPopMatrix()
%26 = tail call i32 (...) @glPushMatrix()
%27 = tail call i32 @glRotatef(i32 90, i32 0, i32 -1, i32 0)
%28 = tail call i32 @glTranslatef(i32 0, i32 0, double -5.000000e-01)
%29 = tail call i32 @glid(i32 %0, i32 %0)
%30 = tail call i32 (...) @glPopMatrix()
%31 = tail call i32 (...) @glPopMatrix()
ret void
}