#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 */
double asin(double);
double atan(double);
double cos(double);
double sin(double);
void Librations(double RAD, double LAMH, double BH, double OM, double F,
                double L, double L1, double *L0, double *B0) {
  double I, PSI, W, NUM, DEN, A, TEMP;
  I = 1.54242 * RAD;
  PSI = -17.2 * sin(OM) - 1.32 * sin(2 * L) - .23 * sin(2 * L1) +
        .21 * sin(2 * OM);
  PSI = PSI * RAD / 3600;
  W = (LAMH - PSI) - OM;
  NUM = sin(W) * cos(BH) * cos(I) - sin(BH) * sin(I);
  DEN = cos(W) * cos(BH);
  A = atan(NUM / DEN);
  if (NUM * DEN < 0)
    A = A + 3.14159;
  if (NUM < 0)
    A = A + 3.14159;
  *L0 = (A - F) / RAD;
  TEMP = -sin(W) * cos(BH) * sin(I) - sin(BH) * cos(I);
  *B0 = asin(TEMP);
}


x86 assembly (clang, -O0):
<Librations>:
push   %rbp
mov    %rsp,%rbp
sub    $0xe0,%rsp
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)
mov    %rdi,-0x40(%rbp)
mov    %rsi,-0x48(%rbp)
movsd  0xeb2(%rip),%xmm0
mulsd  -0x8(%rbp),%xmm0
movsd  %xmm0,-0x50(%rbp)
movsd  -0x20(%rbp),%xmm0
call   1030 <sin@plt>
movsd  %xmm0,-0xc0(%rbp)
ff
movsd  0xe6e(%rip),%xmm0
mulsd  -0x30(%rbp),%xmm0
call   1030 <sin@plt>
movaps %xmm0,%xmm2
movsd  -0xc0(%rbp),%xmm0
ff
movsd  0xe69(%rip),%xmm1
mulsd  %xmm2,%xmm1
movq   %xmm1,%rax
movabs $0x8000000000000000,%rcx
xor    %rcx,%rax
movq   %rax,%xmm1
movsd  0xe3e(%rip),%xmm2
mulsd  %xmm2,%xmm0
addsd  %xmm1,%xmm0
movsd  %xmm0,-0xb8(%rbp)
ff
movsd  0xe16(%rip),%xmm0
mulsd  -0x38(%rbp),%xmm0
call   1030 <sin@plt>
movsd  -0xb8(%rbp),%xmm1
ff
movsd  0xe04(%rip),%xmm2
mulsd  %xmm2,%xmm0
addsd  %xmm1,%xmm0
movsd  %xmm0,-0xb0(%rbp)
ff
movsd  0xde4(%rip),%xmm0
mulsd  -0x20(%rbp),%xmm0
call   1030 <sin@plt>
movsd  -0xb0(%rbp),%xmm1
ff
movsd  0xdc2(%rip),%xmm2
mulsd  %xmm2,%xmm0
addsd  %xmm1,%xmm0
movsd  %xmm0,-0x58(%rbp)
movsd  -0x58(%rbp),%xmm0
mulsd  -0x8(%rbp),%xmm0
movsd  0xd9b(%rip),%xmm1
divsd  %xmm1,%xmm0
movsd  %xmm0,-0x58(%rbp)
movsd  -0x10(%rbp),%xmm0
subsd  -0x58(%rbp),%xmm0
subsd  -0x20(%rbp),%xmm0
movsd  %xmm0,-0x60(%rbp)
movsd  -0x60(%rbp),%xmm0
call   1030 <sin@plt>
movsd  %xmm0,-0xa8(%rbp)
ff
movsd  -0x18(%rbp),%xmm0
call   1060 <cos@plt>
movaps %xmm0,%xmm1
movsd  -0xa8(%rbp),%xmm0
ff
mulsd  %xmm1,%xmm0
movsd  %xmm0,-0x90(%rbp)
ff
movsd  -0x50(%rbp),%xmm0
call   1060 <cos@plt>
movsd  %xmm0,-0x98(%rbp)
ff
movsd  -0x18(%rbp),%xmm0
call   1030 <sin@plt>
movsd  %xmm0,-0xa0(%rbp)
ff
movsd  -0x50(%rbp),%xmm0
call   1030 <sin@plt>
movsd  -0xa0(%rbp),%xmm1
ff
movsd  -0x98(%rbp),%xmm2
ff
movaps %xmm0,%xmm3
movsd  -0x90(%rbp),%xmm0
ff
mulsd  %xmm3,%xmm1
movq   %xmm1,%rax
movabs $0x8000000000000000,%rcx
xor    %rcx,%rax
movq   %rax,%xmm1
mulsd  %xmm2,%xmm0
addsd  %xmm1,%xmm0
movsd  %xmm0,-0x68(%rbp)
movsd  -0x60(%rbp),%xmm0
call   1060 <cos@plt>
movsd  %xmm0,-0x88(%rbp)
ff
movsd  -0x18(%rbp),%xmm0
call   1060 <cos@plt>
movaps %xmm0,%xmm1
movsd  -0x88(%rbp),%xmm0
ff
mulsd  %xmm1,%xmm0
movsd  %xmm0,-0x70(%rbp)
movsd  -0x68(%rbp),%xmm0
divsd  -0x70(%rbp),%xmm0
call   1040 <atan@plt>
movsd  %xmm0,-0x78(%rbp)
movsd  -0x68(%rbp),%xmm1
mulsd  -0x70(%rbp),%xmm1
xorps  %xmm0,%xmm0
ucomisd %xmm1,%xmm0
jbe    1393 <Librations+0x253>
movsd  0xcaf(%rip),%xmm0
addsd  -0x78(%rbp),%xmm0
movsd  %xmm0,-0x78(%rbp)
xorps  %xmm0,%xmm0
ucomisd -0x68(%rbp),%xmm0
jbe    13b3 <Librations+0x273>
movsd  0xc8f(%rip),%xmm0
addsd  -0x78(%rbp),%xmm0
movsd  %xmm0,-0x78(%rbp)
movsd  -0x78(%rbp),%xmm0
subsd  -0x28(%rbp),%xmm0
divsd  -0x8(%rbp),%xmm0
mov    -0x40(%rbp),%rax
movsd  %xmm0,(%rax)
movsd  -0x60(%rbp),%xmm0
call   1030 <sin@plt>
movq   %xmm0,%rax
movabs $0x8000000000000000,%rcx
xor    %rcx,%rax
movq   %rax,%xmm0
movsd  %xmm0,-0xe0(%rbp)
ff
movsd  -0x18(%rbp),%xmm0
call   1060 <cos@plt>
movaps %xmm0,%xmm1
movsd  -0xe0(%rbp),%xmm0
ff
mulsd  %xmm1,%xmm0
movsd  %xmm0,-0xc8(%rbp)
ff
movsd  -0x50(%rbp),%xmm0
call   1030 <sin@plt>
movsd  %xmm0,-0xd0(%rbp)
ff
movsd  -0x18(%rbp),%xmm0
call   1030 <sin@plt>
movsd  %xmm0,-0xd8(%rbp)
ff
movsd  -0x50(%rbp),%xmm0
call   1060 <cos@plt>
movsd  -0xd8(%rbp),%xmm1
ff
movsd  -0xd0(%rbp),%xmm2
ff
movaps %xmm0,%xmm3
movsd  -0xc8(%rbp),%xmm0
ff
mulsd  %xmm3,%xmm1
movq   %xmm1,%rax
movabs $0x8000000000000000,%rcx
xor    %rcx,%rax
movq   %rax,%xmm1
mulsd  %xmm2,%xmm0
addsd  %xmm1,%xmm0
movsd  %xmm0,-0x80(%rbp)
movsd  -0x80(%rbp),%xmm0
call   1050 <asin@plt>
mov    -0x48(%rbp),%rax
movsd  %xmm0,(%rax)
add    $0xe0,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<Librations>:
push   %r14
push   %rbx
sub    $0x68,%rsp
mov    %rsi,%r14
mov    %rdi,%rbx
movsd  %xmm6,0x30(%rsp)
movsd  %xmm5,0x28(%rsp)
movsd  %xmm4,0x60(%rsp)
movsd  %xmm3,0x10(%rsp)
movsd  %xmm2,0x8(%rsp)
movsd  %xmm1,0x40(%rsp)
movsd  %xmm0,0x48(%rsp)
movsd  0xe81(%rip),%xmm1
mulsd  %xmm0,%xmm1
movsd  %xmm1,0x50(%rsp)
movaps %xmm3,%xmm0
call   1030 <sin@plt>
movsd  %xmm0,0x58(%rsp)
movsd  0x28(%rsp),%xmm0
addsd  %xmm0,%xmm0
call   1030 <sin@plt>
mulsd  0xe5a(%rip),%xmm0
movsd  0x58(%rsp),%xmm1
mulsd  0xe54(%rip),%xmm1
addsd  %xmm1,%xmm0
movsd  %xmm0,0x28(%rsp)
movsd  0x30(%rsp),%xmm0
addsd  %xmm0,%xmm0
call   1030 <sin@plt>
mulsd  0xe3b(%rip),%xmm0
addsd  0x28(%rsp),%xmm0
movsd  %xmm0,0x30(%rsp)
movsd  0x10(%rsp),%xmm0
addsd  %xmm0,%xmm0
call   1030 <sin@plt>
mulsd  0xe20(%rip),%xmm0
addsd  0x30(%rsp),%xmm0
mulsd  0x48(%rsp),%xmm0
divsd  0xe14(%rip),%xmm0
addsd  0x40(%rsp),%xmm0
subsd  0x10(%rsp),%xmm0
movsd  %xmm0,0x40(%rsp)
call   1030 <sin@plt>
movsd  %xmm0,0x10(%rsp)
movsd  0x8(%rsp),%xmm0
call   1060 <cos@plt>
mulsd  0x10(%rsp),%xmm0
movsd  %xmm0,0x30(%rsp)
movsd  0x50(%rsp),%xmm0
call   1060 <cos@plt>
movaps %xmm0,0x10(%rsp)
movsd  0x8(%rsp),%xmm0
call   1030 <sin@plt>
movsd  %xmm0,0x28(%rsp)
movsd  0x50(%rsp),%xmm0
call   1030 <sin@plt>
mulsd  0x28(%rsp),%xmm0
movapd 0x10(%rsp),%xmm1
mulsd  0x30(%rsp),%xmm1
subsd  %xmm0,%xmm1
movapd %xmm1,0x10(%rsp)
movsd  0x40(%rsp),%xmm0
call   1060 <cos@plt>
movsd  %xmm0,0x30(%rsp)
movsd  0x8(%rsp),%xmm0
call   1060 <cos@plt>
movapd %xmm0,%xmm1
mulsd  0x30(%rsp),%xmm1
movapd %xmm1,0x30(%rsp)
movapd 0x10(%rsp),%xmm0
divsd  %xmm1,%xmm0
call   1040 <atan@plt>
movapd 0x10(%rsp),%xmm4
movapd 0x30(%rsp),%xmm5
mulsd  %xmm4,%xmm5
movsd  0xd4d(%rip),%xmm1
xorpd  %xmm2,%xmm2
cmpltsd %xmm2,%xmm5
movapd %xmm5,%xmm3
andnpd %xmm0,%xmm3
addsd  %xmm1,%xmm0
andpd  %xmm5,%xmm0
orpd   %xmm3,%xmm0
movapd %xmm4,%xmm3
cmpltsd %xmm2,%xmm3
movapd %xmm3,%xmm2
andnpd %xmm0,%xmm2
addsd  %xmm1,%xmm0
andpd  %xmm0,%xmm3
orpd   %xmm2,%xmm3
subsd  0x60(%rsp),%xmm3
divsd  0x48(%rsp),%xmm3
movsd  %xmm3,(%rbx)
movsd  0x40(%rsp),%xmm0
call   1030 <sin@plt>
xorps  0xd01(%rip),%xmm0
movaps %xmm0,0x10(%rsp)
movsd  0x8(%rsp),%xmm0
call   1060 <cos@plt>
mulsd  0x10(%rsp),%xmm0
movsd  %xmm0,0x10(%rsp)
movsd  0x50(%rsp),%xmm0
call   1030 <sin@plt>
movsd  %xmm0,0x48(%rsp)
movsd  0x8(%rsp),%xmm0
call   1030 <sin@plt>
movsd  %xmm0,0x8(%rsp)
movsd  0x50(%rsp),%xmm0
call   1060 <cos@plt>
mulsd  0x8(%rsp),%xmm0
movsd  0x48(%rsp),%xmm1
mulsd  0x10(%rsp),%xmm1
subsd  %xmm0,%xmm1
movapd %xmm1,%xmm0
call   1050 <asin@plt>
movsd  %xmm0,(%r14)
add    $0x68,%rsp
pop    %rbx
pop    %r14
ret

LLVM IR (-O0):
define void @Librations(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
%24 = alloca double
%25 = 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
%26 = load double, double* %10
%27 = fmul double 1.542420e+00, %26
store double %27, double* %19
%28 = load double, double* %13
%29 = call double @sin(double %28)
%30 = load double, double* %15
%31 = fmul double 2.000000e+00, %30
%32 = call double @sin(double %31)
%33 = fmul double 1.320000e+00, %32
%34 = fneg double %33
%35 = call double @llvm.fmuladd.f64(double -1.720000e+01, double %29, double %34)
%36 = load double, double* %16
%37 = fmul double 2.000000e+00, %36
%38 = call double @sin(double %37)
%39 = call double @llvm.fmuladd.f64(double -2.300000e-01, double %38, double %35)
%40 = load double, double* %13
%41 = fmul double 2.000000e+00, %40
%42 = call double @sin(double %41)
%43 = call double @llvm.fmuladd.f64(double 2.100000e-01, double %42, double %39)
store double %43, double* %20
%44 = load double, double* %20
%45 = load double, double* %10
%46 = fmul double %44, %45
%47 = fdiv double %46, 3.600000e+03
store double %47, double* %20
%48 = load double, double* %11
%49 = load double, double* %20
%50 = fsub double %48, %49
%51 = load double, double* %13
%52 = fsub double %50, %51
store double %52, double* %21
%53 = load double, double* %21
%54 = call double @sin(double %53)
%55 = load double, double* %12
%56 = call double @cos(double %55)
%57 = fmul double %54, %56
%58 = load double, double* %19
%59 = call double @cos(double %58)
%60 = load double, double* %12
%61 = call double @sin(double %60)
%62 = load double, double* %19
%63 = call double @sin(double %62)
%64 = fmul double %61, %63
%65 = fneg double %64
%66 = call double @llvm.fmuladd.f64(double %57, double %59, double %65)
store double %66, double* %22
%67 = load double, double* %21
%68 = call double @cos(double %67)
%69 = load double, double* %12
%70 = call double @cos(double %69)
%71 = fmul double %68, %70
store double %71, double* %23
%72 = load double, double* %22
%73 = load double, double* %23
%74 = fdiv double %72, %73
%75 = call double @atan(double %74)
store double %75, double* %24
%76 = load double, double* %22
%77 = load double, double* %23
%78 = fmul double %76, %77
%79 = fcmp olt double %78, 0.000000e+00
br i1 %79, label %80, label %83
80: ; preds = %9
%81 = load double, double* %24
%82 = fadd double %81, 3.141590e+00
store double %82, double* %24
br label %83
83: ; preds = %80, %9
%84 = load double, double* %22
%85 = fcmp olt double %84, 0.000000e+00
br i1 %85, label %86, label %89
86: ; preds = %83
%87 = load double, double* %24
%88 = fadd double %87, 3.141590e+00
store double %88, double* %24
br label %89
89: ; preds = %86, %83
%90 = load double, double* %24
%91 = load double, double* %14
%92 = fsub double %90, %91
%93 = load double, double* %10
%94 = fdiv double %92, %93
%95 = load double*, double** %17
store double %94, double* %95
%96 = load double, double* %21
%97 = call double @sin(double %96)
%98 = fneg double %97
%99 = load double, double* %12
%100 = call double @cos(double %99)
%101 = fmul double %98, %100
%102 = load double, double* %19
%103 = call double @sin(double %102)
%104 = load double, double* %12
%105 = call double @sin(double %104)
%106 = load double, double* %19
%107 = call double @cos(double %106)
%108 = fmul double %105, %107
%109 = fneg double %108
%110 = call double @llvm.fmuladd.f64(double %101, double %103, double %109)
store double %110, double* %25
%111 = load double, double* %25
%112 = call double @asin(double %111)
%113 = load double*, double** %18
store double %112, double* %113
ret void
}

LLVM IR (-O2):
define void @Librations(double %0, double %1, double %2, double %3, double %4, double %5, double %6, double* nocapture writeonly %7, double* nocapture writeonly %8) {
%10 = fmul double %0, 1.542420e+00
%11 = tail call double @sin(double %3)
%12 = fmul double %5, 2.000000e+00
%13 = tail call double @sin(double %12)
%14 = fmul double %13, -1.320000e+00
%15 = tail call double @llvm.fmuladd.f64(double %11, double -1.720000e+01, double %14)
%16 = fmul double %6, 2.000000e+00
%17 = tail call double @sin(double %16)
%18 = tail call double @llvm.fmuladd.f64(double %17, double -2.300000e-01, double %15)
%19 = fmul double %3, 2.000000e+00
%20 = tail call double @sin(double %19)
%21 = tail call double @llvm.fmuladd.f64(double %20, double 2.100000e-01, double %18)
%22 = fmul double %21, %0
%23 = fdiv double %22, 3.600000e+03
%24 = fsub double %1, %23
%25 = fsub double %24, %3
%26 = tail call double @sin(double %25)
%27 = tail call double @cos(double %2)
%28 = fmul double %26, %27
%29 = tail call double @cos(double %10)
%30 = tail call double @sin(double %2)
%31 = tail call double @sin(double %10)
%32 = fneg double %30
%33 = fmul double %31, %32
%34 = tail call double @llvm.fmuladd.f64(double %28, double %29, double %33)
%35 = tail call double @cos(double %25)
%36 = tail call double @cos(double %2)
%37 = fmul double %35, %36
%38 = fdiv double %34, %37
%39 = tail call double @atan(double %38)
%40 = fmul double %34, %37
%41 = fcmp olt double %40, 0.000000e+00
%42 = fadd double %39, 3.141590e+00
%43 = select i1 %41, double %42, double %39
%44 = fcmp olt double %34, 0.000000e+00
%45 = fadd double %43, 3.141590e+00
%46 = select i1 %44, double %45, double %43
%47 = fsub double %46, %4
%48 = fdiv double %47, %0
store double %48, double* %7
%49 = tail call double @sin(double %25)
%50 = fneg double %49
%51 = tail call double @cos(double %2)
%52 = fmul double %51, %50
%53 = tail call double @sin(double %10)
%54 = tail call double @sin(double %2)
%55 = tail call double @cos(double %10)
%56 = fneg double %54
%57 = fmul double %55, %56
%58 = tail call double @llvm.fmuladd.f64(double %52, double %53, double %57)
%59 = tail call double @asin(double %58)
store double %59, double* %8
ret void
}