#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*/ DrawCube();
int GL_COLOR_BUFFER_BIT;
int GL_DEPTH_BUFFER_BIT;
int /*<<< orphan*/ GL_LINES;
int /*<<< orphan*/ SetLookAt(int, int, int, int /*<<< orphan*/,
                             int /*<<< orphan*/, int /*<<< orphan*/, int, int,
                             int /*<<< orphan*/);
int /*<<< orphan*/ glBegin(int /*<<< orphan*/);
int /*<<< orphan*/ glClear(int);
int /*<<< orphan*/ glColor3f(double, double, double);
int /*<<< orphan*/ glEnd();
int /*<<< orphan*/ glPopMatrix();
int /*<<< orphan*/ glPushMatrix();
int /*<<< orphan*/ glVertex2f(double, double);
int /*<<< orphan*/ glViewport(int, int, int, int);
int /*<<< orphan*/ glutSwapBuffers();
void Transform(void) {
  glClear(GL_COLOR_BUFFER_BIT | GL_DEPTH_BUFFER_BIT);
  glViewport(0, 0, 500, 500);
  glPushMatrix();
  glColor3f(1.0, 1.0, 1.0);
  glBegin(GL_LINES);
  glVertex2f(-12.0, 0.0);
  glVertex2f(12.0, 0.0);
  glVertex2f(0.0, -12.0);
  glVertex2f(0.0, 12.0);
  glEnd();
  glPopMatrix();
  glPushMatrix();
  glViewport(0, 0, (500 / 2), (500 / 2));
  SetLookAt(0, 0, 1, 0, 0, 0, 0, 1, 0);
  DrawCube();
  glPopMatrix();
  glPushMatrix();
  glViewport((500 / 2) + 1, 0, (500 / 2), (500 / 2));
  SetLookAt(0, 1, 0, 0, 0, 0, 1, 0, 0);
  DrawCube();
  glPopMatrix();
  glPushMatrix();
  glViewport(0, (500 / 2) + 1, (500 / 2), (500 / 2));
  SetLookAt(-1, -1, -1, 0, 0, 0, 0, 1, 0);
  DrawCube();
  glPopMatrix();
  glPushMatrix();
  glViewport((500 / 2) + 1, (500 / 2) + 1, (500 / 2), (500 / 2));
  SetLookAt(1, 1, 1, 0, 0, 0, 0, 1, 0);
  DrawCube();
  glPopMatrix();
  glutSwapBuffers();
}


x86 assembly (clang, -O0):
<Transform>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    0x2e11(%rip),%rax
mov    (%rax),%edi
mov    0x2e18(%rip),%rax
or     (%rax),%edi
call   1040 <glClear@plt>
xor    %esi,%esi
mov    $0x1f4,%ecx
mov    %esi,%edi
mov    %ecx,%edx
call   10d0 <glViewport@plt>
mov    $0x0,%al
call   10a0 <glPushMatrix@plt>
movsd  0xe22(%rip),%xmm2
movaps %xmm2,%xmm0
movaps %xmm2,%xmm1
call   1090 <glColor3f@plt>
mov    0x2df0(%rip),%rax
mov    (%rax),%edi
call   10c0 <glBegin@plt>
movsd  0xdf9(%rip),%xmm0
xorps  %xmm1,%xmm1
call   10b0 <glVertex2f@plt>
movsd  0xde1(%rip),%xmm0
xorps  %xmm1,%xmm1
call   10b0 <glVertex2f@plt>
xorps  %xmm0,%xmm0
movsd  0xdd6(%rip),%xmm1
call   10b0 <glVertex2f@plt>
xorps  %xmm0,%xmm0
movsd  0xdbe(%rip),%xmm1
call   10b0 <glVertex2f@plt>
mov    $0x0,%al
call   1060 <glEnd@plt>
mov    $0x0,%al
call   1080 <glPopMatrix@plt>
mov    $0x0,%al
call   10a0 <glPushMatrix@plt>
xor    %esi,%esi
mov    $0xfa,%ecx
mov    %esi,%edi
mov    %ecx,%edx
call   10d0 <glViewport@plt>
xor    %r9d,%r9d
mov    $0x1,%edx
mov    %r9d,%edi
mov    %r9d,%esi
mov    %r9d,%ecx
mov    %r9d,%r8d
movl   $0x0,(%rsp)
movl   $0x1,0x8(%rsp)
movl   $0x0,0x10(%rsp)
call   1070 <SetLookAt@plt>
mov    $0x0,%al
call   1030 <DrawCube@plt>
mov    $0x0,%al
call   1080 <glPopMatrix@plt>
mov    $0x0,%al
call   10a0 <glPushMatrix@plt>
mov    $0xfb,%edi
xor    %esi,%esi
mov    $0xfa,%ecx
mov    %ecx,%edx
call   10d0 <glViewport@plt>
xor    %r9d,%r9d
mov    $0x1,%esi
mov    %r9d,%edi
mov    %r9d,%edx
mov    %r9d,%ecx
mov    %r9d,%r8d
movl   $0x1,(%rsp)
movl   $0x0,0x8(%rsp)
movl   $0x0,0x10(%rsp)
call   1070 <SetLookAt@plt>
mov    $0x0,%al
call   1030 <DrawCube@plt>
mov    $0x0,%al
call   1080 <glPopMatrix@plt>
mov    $0x0,%al
call   10a0 <glPushMatrix@plt>
xor    %edi,%edi
mov    $0xfb,%esi
mov    $0xfa,%ecx
mov    %ecx,%edx
call   10d0 <glViewport@plt>
mov    $0xffffffff,%edx
xor    %r9d,%r9d
mov    %edx,%edi
mov    %edx,%esi
mov    %r9d,%ecx
mov    %r9d,%r8d
movl   $0x0,(%rsp)
movl   $0x1,0x8(%rsp)
movl   $0x0,0x10(%rsp)
call   1070 <SetLookAt@plt>
mov    $0x0,%al
call   1030 <DrawCube@plt>
mov    $0x0,%al
call   1080 <glPopMatrix@plt>
mov    $0x0,%al
call   10a0 <glPushMatrix@plt>
mov    $0xfb,%esi
mov    $0xfa,%ecx
mov    %esi,%edi
mov    %ecx,%edx
call   10d0 <glViewport@plt>
mov    $0x1,%edx
xor    %r9d,%r9d
mov    %edx,%edi
mov    %edx,%esi
mov    %r9d,%ecx
mov    %r9d,%r8d
movl   $0x0,(%rsp)
movl   $0x1,0x8(%rsp)
movl   $0x0,0x10(%rsp)
call   1070 <SetLookAt@plt>
mov    $0x0,%al
call   1030 <DrawCube@plt>
mov    $0x0,%al
call   1080 <glPopMatrix@plt>
mov    $0x0,%al
call   1050 <glutSwapBuffers@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<Transform>:
push   %rax
mov    0x2e18(%rip),%rax
mov    0x2e21(%rip),%rcx
mov    (%rcx),%edi
or     (%rax),%edi
call   1040 <glClear@plt>
xor    %edi,%edi
xor    %esi,%esi
mov    $0x1f4,%edx
mov    $0x1f4,%ecx
call   10d0 <glViewport@plt>
xor    %eax,%eax
call   10a0 <glPushMatrix@plt>
movsd  0xe16(%rip),%xmm0
movaps %xmm0,%xmm1
movaps %xmm0,%xmm2
call   1090 <glColor3f@plt>
mov    0x2df4(%rip),%rax
mov    (%rax),%edi
call   10c0 <glBegin@plt>
movsd  0xdfd(%rip),%xmm0
xorps  %xmm1,%xmm1
call   10b0 <glVertex2f@plt>
movsd  0xdf5(%rip),%xmm0
xorps  %xmm1,%xmm1
call   10b0 <glVertex2f@plt>
xorps  %xmm0,%xmm0
movsd  0xdda(%rip),%xmm1
call   10b0 <glVertex2f@plt>
xorps  %xmm0,%xmm0
movsd  0xdd2(%rip),%xmm1
call   10b0 <glVertex2f@plt>
xor    %eax,%eax
call   1060 <glEnd@plt>
xor    %eax,%eax
call   1080 <glPopMatrix@plt>
xor    %eax,%eax
call   10a0 <glPushMatrix@plt>
xor    %edi,%edi
xor    %esi,%esi
mov    $0xfa,%edx
mov    $0xfa,%ecx
call   10d0 <glViewport@plt>
sub    $0x8,%rsp
xor    %edi,%edi
xor    %esi,%esi
mov    $0x1,%edx
xor    %ecx,%ecx
xor    %r8d,%r8d
xor    %r9d,%r9d
push   $0x0
push   $0x1
push   $0x0
call   1070 <SetLookAt@plt>
add    $0x20,%rsp
xor    %eax,%eax
call   1030 <DrawCube@plt>
xor    %eax,%eax
call   1080 <glPopMatrix@plt>
xor    %eax,%eax
call   10a0 <glPushMatrix@plt>
mov    $0xfb,%edi
xor    %esi,%esi
mov    $0xfa,%edx
mov    $0xfa,%ecx
call   10d0 <glViewport@plt>
sub    $0x8,%rsp
xor    %edi,%edi
mov    $0x1,%esi
xor    %edx,%edx
xor    %ecx,%ecx
xor    %r8d,%r8d
xor    %r9d,%r9d
push   $0x0
push   $0x0
push   $0x1
call   1070 <SetLookAt@plt>
add    $0x20,%rsp
xor    %eax,%eax
call   1030 <DrawCube@plt>
xor    %eax,%eax
call   1080 <glPopMatrix@plt>
xor    %eax,%eax
call   10a0 <glPushMatrix@plt>
xor    %edi,%edi
mov    $0xfb,%esi
mov    $0xfa,%edx
mov    $0xfa,%ecx
call   10d0 <glViewport@plt>
sub    $0x8,%rsp
mov    $0xffffffff,%edi
mov    $0xffffffff,%esi
mov    $0xffffffff,%edx
xor    %ecx,%ecx
xor    %r8d,%r8d
xor    %r9d,%r9d
push   $0x0
push   $0x1
push   $0x0
call   1070 <SetLookAt@plt>
add    $0x20,%rsp
xor    %eax,%eax
call   1030 <DrawCube@plt>
xor    %eax,%eax
call   1080 <glPopMatrix@plt>
xor    %eax,%eax
call   10a0 <glPushMatrix@plt>
mov    $0xfb,%edi
mov    $0xfb,%esi
mov    $0xfa,%edx
mov    $0xfa,%ecx
call   10d0 <glViewport@plt>
sub    $0x8,%rsp
mov    $0x1,%edi
mov    $0x1,%esi
mov    $0x1,%edx
xor    %ecx,%ecx
xor    %r8d,%r8d
xor    %r9d,%r9d
push   $0x0
push   $0x1
push   $0x0
call   1070 <SetLookAt@plt>
add    $0x20,%rsp
xor    %eax,%eax
call   1030 <DrawCube@plt>
xor    %eax,%eax
call   1080 <glPopMatrix@plt>
xor    %eax,%eax
pop    %rcx
jmp    1050 <glutSwapBuffers@plt>

LLVM IR (-O0):
@GL_COLOR_BUFFER_BIT = global i32 0
@GL_DEPTH_BUFFER_BIT = global i32 0
@GL_LINES = global i32 0
define void @Transform() {
%1 = load i32, i32* @GL_COLOR_BUFFER_BIT
%2 = load i32, i32* @GL_DEPTH_BUFFER_BIT
%3 = or i32 %1, %2
%4 = call i32 @glClear(i32 %3)
%5 = call i32 @glViewport(i32 0, i32 0, i32 500, i32 500)
%6 = call i32 (...) @glPushMatrix()
%7 = call i32 @glColor3f(double 1.000000e+00, double 1.000000e+00, double 1.000000e+00)
%8 = load i32, i32* @GL_LINES
%9 = call i32 @glBegin(i32 %8)
%10 = call i32 @glVertex2f(double -1.200000e+01, double 0.000000e+00)
%11 = call i32 @glVertex2f(double 1.200000e+01, double 0.000000e+00)
%12 = call i32 @glVertex2f(double 0.000000e+00, double -1.200000e+01)
%13 = call i32 @glVertex2f(double 0.000000e+00, double 1.200000e+01)
%14 = call i32 (...) @glEnd()
%15 = call i32 (...) @glPopMatrix()
%16 = call i32 (...) @glPushMatrix()
%17 = call i32 @glViewport(i32 0, i32 0, i32 250, i32 250)
%18 = call i32 @SetLookAt(i32 0, i32 0, i32 1, i32 0, i32 0, i32 0, i32 0, i32 1, i32 0)
%19 = call i32 (...) @DrawCube()
%20 = call i32 (...) @glPopMatrix()
%21 = call i32 (...) @glPushMatrix()
%22 = call i32 @glViewport(i32 251, i32 0, i32 250, i32 250)
%23 = call i32 @SetLookAt(i32 0, i32 1, i32 0, i32 0, i32 0, i32 0, i32 1, i32 0, i32 0)
%24 = call i32 (...) @DrawCube()
%25 = call i32 (...) @glPopMatrix()
%26 = call i32 (...) @glPushMatrix()
%27 = call i32 @glViewport(i32 0, i32 251, i32 250, i32 250)
%28 = call i32 @SetLookAt(i32 -1, i32 -1, i32 -1, i32 0, i32 0, i32 0, i32 0, i32 1, i32 0)
%29 = call i32 (...) @DrawCube()
%30 = call i32 (...) @glPopMatrix()
%31 = call i32 (...) @glPushMatrix()
%32 = call i32 @glViewport(i32 251, i32 251, i32 250, i32 250)
%33 = call i32 @SetLookAt(i32 1, i32 1, i32 1, i32 0, i32 0, i32 0, i32 0, i32 1, i32 0)
%34 = call i32 (...) @DrawCube()
%35 = call i32 (...) @glPopMatrix()
%36 = call i32 (...) @glutSwapBuffers()
ret void
}

LLVM IR (-O2):
@GL_COLOR_BUFFER_BIT = global i32 0
@GL_DEPTH_BUFFER_BIT = global i32 0
@GL_LINES = global i32 0
define void @Transform() {
%1 = load i32, i32* @GL_COLOR_BUFFER_BIT
%2 = load i32, i32* @GL_DEPTH_BUFFER_BIT
%3 = or i32 %2, %1
%4 = tail call i32 @glClear(i32 %3)
%5 = tail call i32 @glViewport(i32 0, i32 0, i32 500, i32 500)
%6 = tail call i32 (...) @glPushMatrix()
%7 = tail call i32 @glColor3f(double 1.000000e+00, double 1.000000e+00, double 1.000000e+00)
%8 = load i32, i32* @GL_LINES
%9 = tail call i32 @glBegin(i32 %8)
%10 = tail call i32 @glVertex2f(double -1.200000e+01, double 0.000000e+00)
%11 = tail call i32 @glVertex2f(double 1.200000e+01, double 0.000000e+00)
%12 = tail call i32 @glVertex2f(double 0.000000e+00, double -1.200000e+01)
%13 = tail call i32 @glVertex2f(double 0.000000e+00, double 1.200000e+01)
%14 = tail call i32 (...) @glEnd()
%15 = tail call i32 (...) @glPopMatrix()
%16 = tail call i32 (...) @glPushMatrix()
%17 = tail call i32 @glViewport(i32 0, i32 0, i32 250, i32 250)
%18 = tail call i32 @SetLookAt(i32 0, i32 0, i32 1, i32 0, i32 0, i32 0, i32 0, i32 1, i32 0)
%19 = tail call i32 (...) @DrawCube()
%20 = tail call i32 (...) @glPopMatrix()
%21 = tail call i32 (...) @glPushMatrix()
%22 = tail call i32 @glViewport(i32 251, i32 0, i32 250, i32 250)
%23 = tail call i32 @SetLookAt(i32 0, i32 1, i32 0, i32 0, i32 0, i32 0, i32 1, i32 0, i32 0)
%24 = tail call i32 (...) @DrawCube()
%25 = tail call i32 (...) @glPopMatrix()
%26 = tail call i32 (...) @glPushMatrix()
%27 = tail call i32 @glViewport(i32 0, i32 251, i32 250, i32 250)
%28 = tail call i32 @SetLookAt(i32 -1, i32 -1, i32 -1, i32 0, i32 0, i32 0, i32 0, i32 1, i32 0)
%29 = tail call i32 (...) @DrawCube()
%30 = tail call i32 (...) @glPopMatrix()
%31 = tail call i32 (...) @glPushMatrix()
%32 = tail call i32 @glViewport(i32 251, i32 251, i32 250, i32 250)
%33 = tail call i32 @SetLookAt(i32 1, i32 1, i32 1, i32 0, i32 0, i32 0, i32 0, i32 1, i32 0)
%34 = tail call i32 (...) @DrawCube()
%35 = tail call i32 (...) @glPopMatrix()
%36 = tail call i32 (...) @glutSwapBuffers()
ret void
}