#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 */
typedef int /*<<< orphan*/ GLdouble;

/* Variables and functions */
int /*<<< orphan*/ glRotated(int /*<<< orphan*/, double, double, double);
int /*<<< orphan*/ glTranslated(double, double, int /*<<< orphan*/);
void polarView(GLdouble radius, GLdouble twist, GLdouble latitude,
               GLdouble longitude) {
  glTranslated(0.0, 0.0, -radius);
  glRotated(-twist, 0.0, 0.0, 1.0);
  glRotated(-latitude, 1.0, 0.0, 0.0);
  glRotated(longitude, 0.0, 0.0, 1.0);
}


x86 assembly (clang, -O0):
<polarView>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    %edx,-0xc(%rbp)
mov    %ecx,-0x10(%rbp)
xor    %edi,%edi
sub    -0x4(%rbp),%edi
xorps  %xmm1,%xmm1
movaps %xmm1,%xmm0
call   1030 <glTranslated@plt>
xor    %edi,%edi
sub    -0x8(%rbp),%edi
xorps  %xmm1,%xmm1
movsd  0xeac(%rip),%xmm2
movaps %xmm1,%xmm0
call   1040 <glRotated@plt>
xor    %edi,%edi
sub    -0xc(%rbp),%edi
movsd  0xe97(%rip),%xmm0
xorps  %xmm2,%xmm2
movaps %xmm2,%xmm1
call   1040 <glRotated@plt>
mov    -0x10(%rbp),%edi
xorps  %xmm1,%xmm1
movsd  0xe7e(%rip),%xmm2
movaps %xmm1,%xmm0
call   1040 <glRotated@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<polarView>:
push   %rbp
push   %r14
push   %rbx
mov    %ecx,%r14d
mov    %edx,%ebp
mov    %esi,%ebx
neg    %edi
xorps  %xmm0,%xmm0
xorps  %xmm1,%xmm1
call   1030 <glTranslated@plt>
neg    %ebx
movsd  0xebe(%rip),%xmm2
xorps  %xmm0,%xmm0
xorps  %xmm1,%xmm1
mov    %ebx,%edi
call   1040 <glRotated@plt>
neg    %ebp
xorps  %xmm1,%xmm1
xorps  %xmm2,%xmm2
mov    %ebp,%edi
movsd  0xe9f(%rip),%xmm0
call   1040 <glRotated@plt>
xorps  %xmm0,%xmm0
xorps  %xmm1,%xmm1
mov    %r14d,%edi
movsd  0xe89(%rip),%xmm2
pop    %rbx
pop    %r14
pop    %rbp
jmp    1040 <glRotated@plt>

LLVM IR (-O0):
define void @polarView(i32 %0, i32 %1, i32 %2, i32 %3) {
%5 = alloca i32
%6 = alloca i32
%7 = alloca i32
%8 = alloca i32
store i32 %0, i32* %5
store i32 %1, i32* %6
store i32 %2, i32* %7
store i32 %3, i32* %8
%9 = load i32, i32* %5
%10 = sub nsw i32 0, %9
%11 = call i32 @glTranslated(double 0.000000e+00, double 0.000000e+00, i32 %10)
%12 = load i32, i32* %6
%13 = sub nsw i32 0, %12
%14 = call i32 @glRotated(i32 %13, double 0.000000e+00, double 0.000000e+00, double 1.000000e+00)
%15 = load i32, i32* %7
%16 = sub nsw i32 0, %15
%17 = call i32 @glRotated(i32 %16, double 1.000000e+00, double 0.000000e+00, double 0.000000e+00)
%18 = load i32, i32* %8
%19 = call i32 @glRotated(i32 %18, double 0.000000e+00, double 0.000000e+00, double 1.000000e+00)
ret void
}

LLVM IR (-O2):
define void @polarView(i32 %0, i32 %1, i32 %2, i32 %3) {
%5 = sub nsw i32 0, %0
%6 = tail call i32 @glTranslated(double 0.000000e+00, double 0.000000e+00, i32 %5)
%7 = sub nsw i32 0, %1
%8 = tail call i32 @glRotated(i32 %7, double 0.000000e+00, double 0.000000e+00, double 1.000000e+00)
%9 = sub nsw i32 0, %2
%10 = tail call i32 @glRotated(i32 %9, double 1.000000e+00, double 0.000000e+00, double 0.000000e+00)
%11 = tail call i32 @glRotated(i32 %3, double 0.000000e+00, double 0.000000e+00, double 1.000000e+00)
ret void
}