#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_LIGHT0;
int /*<<< orphan*/ GL_LIGHTING;
int /*<<< orphan*/ GL_LINES;
int /*<<< orphan*/ glBegin(int /*<<< orphan*/);
int /*<<< orphan*/ glColor3f(int, int, int);
int /*<<< orphan*/ glDisable(int /*<<< orphan*/);
int /*<<< orphan*/ glEnable(int /*<<< orphan*/);
int /*<<< orphan*/ glEnd();
int /*<<< orphan*/ glLineWidth(double);
int /*<<< orphan*/ glRotatef(float, double, double, double);
int /*<<< orphan*/ glVertex3f(int, int, int);
int /*<<< orphan*/ glutSolidTeapot(double);
void drawRotatedTeapot(float rotx, float roty, float rotz) {
  glRotatef(rotx, 1.0, 0.0, 0.0);
  glRotatef(roty, 0.0, 1.0, 0.0);
  glRotatef(rotz, 0.0, 0.0, 1.0);
  glEnable(GL_LIGHTING);
  glEnable(GL_LIGHT0);
  glutSolidTeapot(1.0);
  glDisable(GL_LIGHTING);
  glLineWidth(2.0);
  glBegin(GL_LINES);
  glColor3f(1, 0, 0);
  glVertex3f(0, 0, 0);
  glVertex3f(2, 0, 0);
  glColor3f(0, 1, 0);
  glVertex3f(0, 0, 0);
  glVertex3f(0, 2, 0);
  glColor3f(0, 0, 1);
  glVertex3f(0, 0, 0);
  glVertex3f(0, 0, 2);
  glEnd();
}


x86 assembly (clang, -O0):
<drawRotatedTeapot>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movss  %xmm0,-0x4(%rbp)
movss  %xmm1,-0x8(%rbp)
movss  %xmm2,-0xc(%rbp)
movss  -0x4(%rbp),%xmm0
movsd  0xe54(%rip),%xmm1
xorps  %xmm3,%xmm3
movaps %xmm3,%xmm2
call   10b0 <glRotatef@plt>
movss  -0x8(%rbp),%xmm0
xorps  %xmm3,%xmm3
movsd  0xe39(%rip),%xmm2
movaps %xmm3,%xmm1
call   10b0 <glRotatef@plt>
movss  -0xc(%rbp),%xmm0
xorps  %xmm2,%xmm2
movsd  0xe21(%rip),%xmm3
movaps %xmm2,%xmm1
call   10b0 <glRotatef@plt>
mov    0x2dda(%rip),%rax
mov    (%rax),%edi
call   1060 <glEnable@plt>
mov    0x2ddc(%rip),%rax
mov    (%rax),%edi
call   1060 <glEnable@plt>
movsd  0xdf5(%rip),%xmm0
call   1040 <glutSolidTeapot@plt>
mov    0x2db1(%rip),%rax
mov    (%rax),%edi
call   1090 <glDisable@plt>
movsd  0xdd2(%rip),%xmm0
call   1030 <glLineWidth@plt>
mov    0x2db6(%rip),%rax
mov    (%rax),%edi
call   10a0 <glBegin@plt>
mov    $0x1,%edi
xor    %edx,%edx
mov    %edx,%esi
call   1080 <glColor3f@plt>
xor    %edx,%edx
mov    %edx,%edi
mov    %edx,%esi
call   1050 <glVertex3f@plt>
mov    $0x2,%edi
xor    %edx,%edx
mov    %edx,%esi
call   1050 <glVertex3f@plt>
xor    %edx,%edx
mov    $0x1,%esi
mov    %edx,%edi
call   1080 <glColor3f@plt>
xor    %edx,%edx
mov    %edx,%edi
mov    %edx,%esi
call   1050 <glVertex3f@plt>
xor    %edx,%edx
mov    $0x2,%esi
mov    %edx,%edi
call   1050 <glVertex3f@plt>
xor    %esi,%esi
mov    $0x1,%edx
mov    %esi,%edi
call   1080 <glColor3f@plt>
xor    %edx,%edx
mov    %edx,%edi
mov    %edx,%esi
call   1050 <glVertex3f@plt>
xor    %esi,%esi
mov    $0x2,%edx
mov    %esi,%edi
call   1050 <glVertex3f@plt>
mov    $0x0,%al
call   1070 <glEnd@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<drawRotatedTeapot>:
push   %rbx
sub    $0x10,%rsp
movss  %xmm2,0xc(%rsp)
movss  %xmm1,0x8(%rsp)
movsd  0xe57(%rip),%xmm1
xorps  %xmm2,%xmm2
xorps  %xmm3,%xmm3
call   10b0 <glRotatef@plt>
xorps  %xmm1,%xmm1
xorps  %xmm3,%xmm3
movss  0x8(%rsp),%xmm0
movsd  0xe38(%rip),%xmm2
call   10b0 <glRotatef@plt>
xorps  %xmm1,%xmm1
xorps  %xmm2,%xmm2
movss  0xc(%rsp),%xmm0
movsd  0xe1f(%rip),%xmm3
call   10b0 <glRotatef@plt>
mov    0x2de3(%rip),%rbx
mov    (%rbx),%edi
call   1060 <glEnable@plt>
mov    0x2de5(%rip),%rax
mov    (%rax),%edi
call   1060 <glEnable@plt>
movsd  0xdf6(%rip),%xmm0
call   1040 <glutSolidTeapot@plt>
mov    (%rbx),%edi
call   1090 <glDisable@plt>
movsd  0xdea(%rip),%xmm0
call   1030 <glLineWidth@plt>
mov    0x2dc6(%rip),%rax
mov    (%rax),%edi
call   10a0 <glBegin@plt>
mov    $0x1,%edi
xor    %esi,%esi
xor    %edx,%edx
call   1080 <glColor3f@plt>
xor    %edi,%edi
xor    %esi,%esi
xor    %edx,%edx
call   1050 <glVertex3f@plt>
mov    $0x2,%edi
xor    %esi,%esi
xor    %edx,%edx
call   1050 <glVertex3f@plt>
xor    %edi,%edi
mov    $0x1,%esi
xor    %edx,%edx
call   1080 <glColor3f@plt>
xor    %edi,%edi
xor    %esi,%esi
xor    %edx,%edx
call   1050 <glVertex3f@plt>
xor    %edi,%edi
mov    $0x2,%esi
xor    %edx,%edx
call   1050 <glVertex3f@plt>
xor    %edi,%edi
xor    %esi,%esi
mov    $0x1,%edx
call   1080 <glColor3f@plt>
xor    %edi,%edi
xor    %esi,%esi
xor    %edx,%edx
call   1050 <glVertex3f@plt>
xor    %edi,%edi
xor    %esi,%esi
mov    $0x2,%edx
call   1050 <glVertex3f@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbx
jmp    1070 <glEnd@plt>

LLVM IR (-O0):
@GL_LIGHTING = global i32 0
@GL_LIGHT0 = global i32 0
@GL_LINES = global i32 0
define void @drawRotatedTeapot(float %0, float %1, float %2) {
%4 = alloca float
%5 = alloca float
%6 = alloca float
store float %0, float* %4
store float %1, float* %5
store float %2, float* %6
%7 = load float, float* %4
%8 = call i32 @glRotatef(float %7, double 1.000000e+00, double 0.000000e+00, double 0.000000e+00)
%9 = load float, float* %5
%10 = call i32 @glRotatef(float %9, double 0.000000e+00, double 1.000000e+00, double 0.000000e+00)
%11 = load float, float* %6
%12 = call i32 @glRotatef(float %11, double 0.000000e+00, double 0.000000e+00, double 1.000000e+00)
%13 = load i32, i32* @GL_LIGHTING
%14 = call i32 @glEnable(i32 %13)
%15 = load i32, i32* @GL_LIGHT0
%16 = call i32 @glEnable(i32 %15)
%17 = call i32 @glutSolidTeapot(double 1.000000e+00)
%18 = load i32, i32* @GL_LIGHTING
%19 = call i32 @glDisable(i32 %18)
%20 = call i32 @glLineWidth(double 2.000000e+00)
%21 = load i32, i32* @GL_LINES
%22 = call i32 @glBegin(i32 %21)
%23 = call i32 @glColor3f(i32 1, i32 0, i32 0)
%24 = call i32 @glVertex3f(i32 0, i32 0, i32 0)
%25 = call i32 @glVertex3f(i32 2, i32 0, i32 0)
%26 = call i32 @glColor3f(i32 0, i32 1, i32 0)
%27 = call i32 @glVertex3f(i32 0, i32 0, i32 0)
%28 = call i32 @glVertex3f(i32 0, i32 2, i32 0)
%29 = call i32 @glColor3f(i32 0, i32 0, i32 1)
%30 = call i32 @glVertex3f(i32 0, i32 0, i32 0)
%31 = call i32 @glVertex3f(i32 0, i32 0, i32 2)
%32 = call i32 (...) @glEnd()
ret void
}

LLVM IR (-O2):
@GL_LIGHTING = global i32 0
@GL_LIGHT0 = global i32 0
@GL_LINES = global i32 0
define void @drawRotatedTeapot(float %0, float %1, float %2) {
%4 = tail call i32 @glRotatef(float %0, double 1.000000e+00, double 0.000000e+00, double 0.000000e+00)
%5 = tail call i32 @glRotatef(float %1, double 0.000000e+00, double 1.000000e+00, double 0.000000e+00)
%6 = tail call i32 @glRotatef(float %2, double 0.000000e+00, double 0.000000e+00, double 1.000000e+00)
%7 = load i32, i32* @GL_LIGHTING
%8 = tail call i32 @glEnable(i32 %7)
%9 = load i32, i32* @GL_LIGHT0
%10 = tail call i32 @glEnable(i32 %9)
%11 = tail call i32 @glutSolidTeapot(double 1.000000e+00)
%12 = load i32, i32* @GL_LIGHTING
%13 = tail call i32 @glDisable(i32 %12)
%14 = tail call i32 @glLineWidth(double 2.000000e+00)
%15 = load i32, i32* @GL_LINES
%16 = tail call i32 @glBegin(i32 %15)
%17 = tail call i32 @glColor3f(i32 1, i32 0, i32 0)
%18 = tail call i32 @glVertex3f(i32 0, i32 0, i32 0)
%19 = tail call i32 @glVertex3f(i32 2, i32 0, i32 0)
%20 = tail call i32 @glColor3f(i32 0, i32 1, i32 0)
%21 = tail call i32 @glVertex3f(i32 0, i32 0, i32 0)
%22 = tail call i32 @glVertex3f(i32 0, i32 2, i32 0)
%23 = tail call i32 @glColor3f(i32 0, i32 0, i32 1)
%24 = tail call i32 @glVertex3f(i32 0, i32 0, i32 0)
%25 = tail call i32 @glVertex3f(i32 0, i32 0, i32 2)
%26 = tail call i32 (...) @glEnd()
ret void
}