#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_PROJECTION;
int /*<<< orphan*/ GL_TRANSFORM_BIT;
int /*<<< orphan*/ glMatrixMode(int /*<<< orphan*/);
int /*<<< orphan*/ glPopAttrib();
int /*<<< orphan*/ glPushAttrib(int /*<<< orphan*/);
int /*<<< orphan*/ gluPerspective(int, float, float, float);
void setPerspective(int angle, float aspect, float zNear, float zFar) {
  glPushAttrib(GL_TRANSFORM_BIT);
  glMatrixMode(GL_PROJECTION);
  gluPerspective(angle * 0.1, aspect, zNear, zFar);
  glPopAttrib();
}


x86 assembly (clang, -O0):
<setPerspective>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
movss  %xmm0,-0x8(%rbp)
movss  %xmm1,-0xc(%rbp)
movss  %xmm2,-0x10(%rbp)
mov    0x2e7f(%rip),%rax
mov    (%rax),%edi
call   1060 <glPushAttrib@plt>
mov    0x2e69(%rip),%rax
mov    (%rax),%edi
call   1030 <glMatrixMode@plt>
cvtsi2sdl -0x4(%rbp),%xmm0
movsd  0xe7d(%rip),%xmm1
mulsd  %xmm1,%xmm0
cvttsd2si %xmm0,%edi
movss  -0x8(%rbp),%xmm0
movss  -0xc(%rbp),%xmm1
movss  -0x10(%rbp),%xmm2
call   1040 <gluPerspective@plt>
mov    $0x0,%al
call   1050 <glPopAttrib@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<setPerspective>:
push   %rbx
sub    $0x10,%rsp
movss  %xmm2,0xc(%rsp)
movss  %xmm1,0x8(%rsp)
movss  %xmm0,0x4(%rsp)
mov    %edi,%ebx
mov    0x2e80(%rip),%rax
mov    (%rax),%edi
call   1060 <glPushAttrib@plt>
mov    0x2e6a(%rip),%rax
mov    (%rax),%edi
call   1030 <glMatrixMode@plt>
xorps  %xmm0,%xmm0
cvtsi2sd %ebx,%xmm0
mulsd  0xe7c(%rip),%xmm0
cvttsd2si %xmm0,%edi
movss  0x4(%rsp),%xmm0
movss  0x8(%rsp),%xmm1
movss  0xc(%rsp),%xmm2
call   1040 <gluPerspective@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbx
jmp    1050 <glPopAttrib@plt>

LLVM IR (-O0):
@GL_TRANSFORM_BIT = global i32 0
@GL_PROJECTION = global i32 0
define void @setPerspective(i32 %0, float %1, float %2, float %3) {
%5 = alloca i32
%6 = alloca float
%7 = alloca float
%8 = alloca float
store i32 %0, i32* %5
store float %1, float* %6
store float %2, float* %7
store float %3, float* %8
%9 = load i32, i32* @GL_TRANSFORM_BIT
%10 = call i32 @glPushAttrib(i32 %9)
%11 = load i32, i32* @GL_PROJECTION
%12 = call i32 @glMatrixMode(i32 %11)
%13 = load i32, i32* %5
%14 = sitofp i32 %13 to double
%15 = fmul double %14, 1.000000e-01
%16 = fptosi double %15 to i32
%17 = load float, float* %6
%18 = load float, float* %7
%19 = load float, float* %8
%20 = call i32 @gluPerspective(i32 %16, float %17, float %18, float %19)
%21 = call i32 (...) @glPopAttrib()
ret void
}

LLVM IR (-O2):
@GL_TRANSFORM_BIT = global i32 0
@GL_PROJECTION = global i32 0
define void @setPerspective(i32 %0, float %1, float %2, float %3) {
%5 = load i32, i32* @GL_TRANSFORM_BIT
%6 = tail call i32 @glPushAttrib(i32 %5)
%7 = load i32, i32* @GL_PROJECTION
%8 = tail call i32 @glMatrixMode(i32 %7)
%9 = sitofp i32 %0 to double
%10 = fmul double %9, 1.000000e-01
%11 = fptosi double %10 to i32
%12 = tail call i32 @gluPerspective(i32 %11, float %1, float %2, float %3)
%13 = tail call i32 (...) @glPopAttrib()
ret void
}