#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 double GLdouble;

/* Variables and functions */
int /*<<< orphan*/ accFrustum(double, double, double, double, double, double,
                              double, double, double, double, double);
double cos(double);
double sin(double);
void accPerspective(GLdouble fovy, GLdouble aspect, GLdouble nnear,
                    GLdouble ffar, GLdouble pixdx, GLdouble pixdy,
                    GLdouble eyedx, GLdouble eyedy, GLdouble focus) {
  GLdouble fov2, left, right, bottom, top;
  fov2 = ((fovy * 3.14159265358979323846) / 180.0) / 2.0;
  top = nnear / (cos(fov2) / sin(fov2));
  bottom = -top;
  right = top * aspect;
  left = -right;
  accFrustum(left, right, bottom, top, nnear, ffar, pixdx, pixdy, eyedx, eyedy,
             focus);
}


x86 assembly (clang, -O0):
<accPerspective>:
push   %rbp
mov    %rsp,%rbp
sub    $0x90,%rsp
movsd  0x10(%rbp),%xmm8
movsd  %xmm0,-0x8(%rbp)
movsd  %xmm1,-0x10(%rbp)
movsd  %xmm2,-0x18(%rbp)
movsd  %xmm3,-0x20(%rbp)
movsd  %xmm4,-0x28(%rbp)
movsd  %xmm5,-0x30(%rbp)
movsd  %xmm6,-0x38(%rbp)
movsd  %xmm7,-0x40(%rbp)
movsd  0xe9f(%rip),%xmm0
mulsd  -0x8(%rbp),%xmm0
movsd  0xe8a(%rip),%xmm1
divsd  %xmm1,%xmm0
movsd  0xe76(%rip),%xmm1
divsd  %xmm1,%xmm0
movsd  %xmm0,-0x48(%rbp)
movsd  -0x18(%rbp),%xmm0
movsd  %xmm0,-0x70(%rbp)
movsd  -0x48(%rbp),%xmm0
call   1050 <cos@plt>
movsd  %xmm0,-0x78(%rbp)
movsd  -0x48(%rbp),%xmm0
call   1030 <sin@plt>
movsd  -0x78(%rbp),%xmm1
movaps %xmm0,%xmm2
movsd  -0x70(%rbp),%xmm0
divsd  %xmm2,%xmm1
divsd  %xmm1,%xmm0
movsd  %xmm0,-0x68(%rbp)
movsd  -0x68(%rbp),%xmm0
movq   %xmm0,%rax
movabs $0x8000000000000000,%rcx
xor    %rcx,%rax
movq   %rax,%xmm0
movsd  %xmm0,-0x60(%rbp)
movsd  -0x68(%rbp),%xmm0
mulsd  -0x10(%rbp),%xmm0
movsd  %xmm0,-0x58(%rbp)
movsd  -0x58(%rbp),%xmm0
movq   %xmm0,%rax
movabs $0x8000000000000000,%rcx
xor    %rcx,%rax
movq   %rax,%xmm0
movsd  %xmm0,-0x50(%rbp)
movsd  -0x50(%rbp),%xmm0
movsd  -0x58(%rbp),%xmm1
movsd  -0x60(%rbp),%xmm2
movsd  -0x68(%rbp),%xmm3
movsd  -0x18(%rbp),%xmm4
movsd  -0x20(%rbp),%xmm5
movsd  -0x28(%rbp),%xmm6
movsd  -0x30(%rbp),%xmm7
movsd  -0x38(%rbp),%xmm10
movsd  -0x40(%rbp),%xmm9
movsd  0x10(%rbp),%xmm8
movsd  %xmm10,(%rsp)
movsd  %xmm9,0x8(%rsp)
movsd  %xmm8,0x10(%rsp)
call   1040 <accFrustum@plt>
add    $0x90,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<accPerspective>:
sub    $0x78,%rsp
movsd  %xmm7,0x38(%rsp)
movsd  %xmm6,0x40(%rsp)
movsd  %xmm5,0x58(%rsp)
movsd  %xmm4,0x50(%rsp)
movsd  %xmm3,0x48(%rsp)
movsd  %xmm2,0x30(%rsp)
movaps %xmm1,0x60(%rsp)
mulsd  0xe9b(%rip),%xmm0
divsd  0xe9b(%rip),%xmm0
mulsd  0xe9b(%rip),%xmm0
movsd  %xmm0,0x20(%rsp)
call   1050 <cos@plt>
movsd  %xmm0,0x28(%rsp)
movsd  0x20(%rsp),%xmm0
call   1030 <sin@plt>
movsd  0x28(%rsp),%xmm1
divsd  %xmm0,%xmm1
movsd  0x30(%rsp),%xmm4
movapd %xmm4,%xmm3
divsd  %xmm1,%xmm3
movapd 0xe6f(%rip),%xmm0
movapd %xmm3,%xmm2
xorpd  %xmm0,%xmm2
movapd 0x60(%rsp),%xmm5
mulsd  %xmm3,%xmm5
xorpd  %xmm5,%xmm0
movsd  0x80(%rsp),%xmm1
movsd  %xmm1,0x10(%rsp)
movsd  0x38(%rsp),%xmm1
movsd  %xmm1,0x8(%rsp)
movsd  0x40(%rsp),%xmm1
movsd  %xmm1,(%rsp)
movapd %xmm5,%xmm1
movsd  0x48(%rsp),%xmm5
movsd  0x50(%rsp),%xmm6
movsd  0x58(%rsp),%xmm7
call   1040 <accFrustum@plt>
add    $0x78,%rsp
ret

LLVM IR (-O0):
define void @accPerspective(double %0, double %1, double %2, double %3, double %4, double %5, double %6, double %7, double %8) {
%10 = alloca double
%11 = alloca double
%12 = alloca double
%13 = alloca double
%14 = alloca double
%15 = alloca double
%16 = alloca double
%17 = alloca double
%18 = alloca double
%19 = alloca double
%20 = alloca double
%21 = alloca double
%22 = alloca double
%23 = alloca double
store double %0, double* %10
store double %1, double* %11
store double %2, double* %12
store double %3, double* %13
store double %4, double* %14
store double %5, double* %15
store double %6, double* %16
store double %7, double* %17
store double %8, double* %18
%24 = load double, double* %10
%25 = fmul double %24, 0x400921FB54442D18
%26 = fdiv double %25, 1.800000e+02
%27 = fdiv double %26, 2.000000e+00
store double %27, double* %19
%28 = load double, double* %12
%29 = load double, double* %19
%30 = call double @cos(double %29)
%31 = load double, double* %19
%32 = call double @sin(double %31)
%33 = fdiv double %30, %32
%34 = fdiv double %28, %33
store double %34, double* %23
%35 = load double, double* %23
%36 = fneg double %35
store double %36, double* %22
%37 = load double, double* %23
%38 = load double, double* %11
%39 = fmul double %37, %38
store double %39, double* %21
%40 = load double, double* %21
%41 = fneg double %40
store double %41, double* %20
%42 = load double, double* %20
%43 = load double, double* %21
%44 = load double, double* %22
%45 = load double, double* %23
%46 = load double, double* %12
%47 = load double, double* %13
%48 = load double, double* %14
%49 = load double, double* %15
%50 = load double, double* %16
%51 = load double, double* %17
%52 = load double, double* %18
%53 = call i32 @accFrustum(double %42, double %43, double %44, double %45, double %46, double %47, double %48, double %49, double %50, double %51, double %52)
ret void
}

LLVM IR (-O2):
define void @accPerspective(double %0, double %1, double %2, double %3, double %4, double %5, double %6, double %7, double %8) {
%10 = fmul double %0, 0x400921FB54442D18
%11 = fdiv double %10, 1.800000e+02
%12 = fmul double %11, 5.000000e-01
%13 = tail call double @cos(double %12)
%14 = tail call double @sin(double %12)
%15 = fdiv double %13, %14
%16 = fdiv double %2, %15
%17 = fneg double %16
%18 = fmul double %16, %1
%19 = fneg double %18
%20 = tail call i32 @accFrustum(double %19, double %18, double %17, double %16, double %2, double %3, double %4, double %5, double %6, double %7, double %8)
ret void
}