#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 cos(double);
double fmoond(double time) {
  double A0 = 0.950725;
  double A[] = {51820.0E-6, 9530.0E-6, 7842.0E-6, 2824.0E-6, 858.0E-6, 531.0E-6,
                400.0E-6,   319.0E-6,  271.0E-6,  263.0E-6,  197.0E-6, 173.0E-6,
                167.0E-6,   111.0E-6,  103.0E-6,  84.0E-6,   83.0E-6,  78.0E-6,
                73.0E-6,    64.0E-6,   63.0E-6,   41.0E-6,   34.0E-6,  33.0E-6,
                31.0E-6,    30.0E-6,   29.0E-6,   26.0E-6,   23.0E-6,  19.0E-6,
                13.0E-6,    13.0E-6,   13.0E-6,   12.0E-6,   11.0E-6,  11.0E-6,
                10.0E-6,    9.0E-6,    7.0E-6,    7.0E-6,    6.0E-6,   6.0E-6,
                5.0E-6};
  double B[] = {
      477198.868E0, 413335.35E0, 890534.22E0, 954397.74E0, 1367733.1E0,
      854535.2E0,   377336.3E0,  441199.8E0,  445267.0E0,  513198.0E0,
      489205.0E0,   1431597.0E0, 1303870.0E0, 35999.0E0,   826671.0E0,
      63864.0E0,    926533.0E0,  1844932.0E0, 1781068.0E0, 1331734.0E0,
      449334.0E0,   481266.0E0,  918399.0E0,  541062.0E0,  922466.0E0,
      75870.0E0,    990397.0E0,  818536.0E0,  553069.0E0,  1267871.0E0,
      1403732.0E0,  341337.0E0,  401329.0E0,  2258267.0E0, 1908795.0E0,
      858602.0E0,   1745069.0E0, 790672.0E0,  2322131.0E0, 1808933.0E0,
      485333.0E0,   99863.0E0,   405201.0E0};
  double C[] = {134.963E0, 100.74E0, 235.70E0, 269.93E0, 10.7E0,  238.2E0,
                103.2E0,   137.4E0,  118.0E0,  312.0E0,  232.0E0, 45.0E0,
                336.0E0,   178.0E0,  201.0E0,  214.0E0,  53.0E0,  146.0E0,
                111.0E0,   13.0E0,   278.0E0,  295.0E0,  272.0E0, 349.0E0,
                253.0E0,   131.0E0,  87.0E0,   241.0E0,  266.0E0, 339.0E0,
                188.0E0,   106.0E0,  4.0E0,    246.0E0,  180.0E0, 219.0E0,
                114.0E0,   204.0E0,  281.0E0,  148.0E0,  276.0E0, 212.0E0,
                140.0E0};
  double paralx = 0;
  int i;
  for (i = 0; i < 43; i++) {
    paralx += A[i] * cos((B[i] * time + C[i]) * 0.0174532925199433);
  }
  paralx = (paralx + A0) * 0.0174532925199433;
  return (6378137.0 / (paralx * (1 - paralx * paralx / 6)));
}


x86 assembly (clang, -O0):
<fmoond>:
push   %rbp
mov    %rsp,%rbp
sub    $0x450,%rsp
movsd  %xmm0,-0x8(%rbp)
movsd  0xec8(%rip),%xmm0
movsd  %xmm0,-0x10(%rbp)
lea    -0x170(%rbp),%rdi
lea    0xee5(%rip),%rsi
mov    $0x158,%edx
call   1030 <memcpy@plt>
lea    -0x2d0(%rbp),%rdi
lea    0x102d(%rip),%rsi
mov    $0x158,%edx
call   1030 <memcpy@plt>
lea    -0x430(%rbp),%rdi
lea    0x1175(%rip),%rsi
mov    $0x158,%edx
call   1030 <memcpy@plt>
xorps  %xmm0,%xmm0
movsd  %xmm0,-0x438(%rbp)
ff
movl   $0x0,-0x43c(%rbp)
cmpl   $0x2b,-0x43c(%rbp)
jge    1234 <fmoond+0x114>
movslq -0x43c(%rbp),%rax
movsd  -0x170(%rbp,%rax,8),%xmm0
ff ff
movsd  %xmm0,-0x448(%rbp)
ff
movslq -0x43c(%rbp),%rax
movsd  -0x2d0(%rbp,%rax,8),%xmm0
ff ff
movsd  -0x8(%rbp),%xmm2
movslq -0x43c(%rbp),%rax
movsd  -0x430(%rbp,%rax,8),%xmm1
ff ff
mulsd  %xmm2,%xmm0
addsd  %xmm1,%xmm0
movsd  0xe2c(%rip),%xmm1
mulsd  %xmm1,%xmm0
call   1040 <cos@plt>
movaps %xmm0,%xmm2
movsd  -0x448(%rbp),%xmm0
ff
movsd  -0x438(%rbp),%xmm1
ff
mulsd  %xmm2,%xmm0
addsd  %xmm1,%xmm0
movsd  %xmm0,-0x438(%rbp)
ff
mov    -0x43c(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x43c(%rbp)
jmp    119a <fmoond+0x7a>
movsd  -0x438(%rbp),%xmm0
ff
addsd  -0x10(%rbp),%xmm0
movsd  0xdd7(%rip),%xmm1
mulsd  %xmm1,%xmm0
movsd  %xmm0,-0x438(%rbp)
ff
movsd  -0x438(%rbp),%xmm1
ff
movsd  -0x438(%rbp),%xmm2
ff
mulsd  -0x438(%rbp),%xmm2
ff
movsd  0xda3(%rip),%xmm0
divsd  %xmm0,%xmm2
movsd  0xd8f(%rip),%xmm0
subsd  %xmm2,%xmm0
mulsd  %xmm0,%xmm1
movsd  0xd77(%rip),%xmm0
divsd  %xmm1,%xmm0
add    $0x450,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<fmoond>:
push   %r15
push   %r14
push   %r12
push   %rbx
sub    $0x18,%rsp
movsd  %xmm0,0x10(%rsp)
xorpd  %xmm0,%xmm0
movsd  %xmm0,0x8(%rsp)
mov    $0x1,%ebx
lea    0xef9(%rip),%r14
lea    0x1052(%rip),%r15
lea    0x11ab(%rip),%r12
cs nopw 0x0(%rax,%rax,1)
nop
movsd  -0x8(%r15,%rbx,8),%xmm0
mulsd  0x10(%rsp),%xmm0
addsd  -0x8(%r12,%rbx,8),%xmm0
mulsd  0xe94(%rip),%xmm0
call   1030 <cos@plt>
mulsd  -0x8(%r14,%rbx,8),%xmm0
addsd  0x8(%rsp),%xmm0
cmp    $0x2b,%rbx
je     11c1 <fmoond+0xb1>
movsd  %xmm0,0x8(%rsp)
movsd  (%r15,%rbx,8),%xmm0
mulsd  0x10(%rsp),%xmm0
addsd  (%r12,%rbx,8),%xmm0
mulsd  0xe5c(%rip),%xmm0
call   1030 <cos@plt>
mulsd  (%r14,%rbx,8),%xmm0
addsd  0x8(%rsp),%xmm0
movsd  %xmm0,0x8(%rsp)
add    $0x2,%rbx
jmp    1150 <fmoond+0x40>
addsd  0xe3f(%rip),%xmm0
mulsd  0xe2f(%rip),%xmm0
movapd %xmm0,%xmm1
mulsd  %xmm0,%xmm1
divsd  0xe2f(%rip),%xmm1
addsd  0xe2f(%rip),%xmm1
mulsd  %xmm0,%xmm1
movsd  0xe2b(%rip),%xmm0
divsd  %xmm1,%xmm0
add    $0x18,%rsp
pop    %rbx
pop    %r12
pop    %r14
pop    %r15
ret

LLVM IR (-O0):
@__const.fmoond.A = [43 x double] [double 5.182000e-02, double 9.530000e-03, double 7.842000e-03, double 2.824000e-03, double 8.580000e-04, double 5.310000e-04, double 4.000000e-04, double 3.190000e-04, double 2.710000e-04, double 2.630000e-04, double 1.970000e-04, double 1.730000e-04, double 1.670000e-04, double 1.110000e-04, double 1.030000e-04, double 8.400000e-05, double 8.300000e-05, double 7.800000e-05, double 7.300000e-05, double 6.400000e-05, double 6.300000e-05, double 4.100000e-05, double 3.400000e-05, double 3.300000e-05, double 3.100000e-05, double 3.000000e-05, double 2.900000e-05, double 2.600000e-05, double 2.300000e-05, double 1.900000e-05, double 1.300000e-05, double 1.300000e-05, double 1.300000e-05, double 1.200000e-05, double 1.100000e-05, double 1.100000e-05, double 1.000000e-05, double 9.000000e-06, double 0x3EDD5C31593E5FB7, double 0x3EDD5C31593E5FB7, double 6.000000e-06, double 6.000000e-06, double 5.000000e-06]
@__const.fmoond.B = [43 x double] [double 0x411D203B78D4FDF4, double 0x41193A5D66666666, double 0x412B2D4C70A3D70A, double 0x412D203B7AE147AE, double 0x4134DEB51999999A, double 0x412A140E66666666, double 0x411707E133333333, double 0x411AEDBF33333333, double 4.452670e+05, double 5.131980e+05, double 4.892050e+05, double 0x4135D82D00000000, double 1.303870e+06, double 3.599900e+04, double 8.266710e+05, double 6.386400e+04, double 9.265330e+05, double 0x413C26C400000000, double 0x413B2D4C00000000, double 0x4134521600000000, double 4.493340e+05, double 4.812660e+05, double 9.183990e+05, double 5.410620e+05, double 9.224660e+05, double 7.587000e+04, double 9.903970e+05, double 8.185360e+05, double 5.530690e+05, double 0x4133589F00000000, double 0x41356B5400000000, double 3.413370e+05, double 4.013290e+05, double 0x41413AAD80000000, double 0x413D203B00000000, double 8.586020e+05, double 0x413AA0AD00000000, double 7.906720e+05, double 0x4141B76980000000, double 0x413B9A2500000000, double 4.853330e+05, double 9.986300e+04, double 4.052010e+05]
@__const.fmoond.C = [43 x double] [double 1.349630e+02, double 1.007400e+02, double 2.357000e+02, double 2.699300e+02, double 1.070000e+01, double 2.382000e+02, double 1.032000e+02, double 1.374000e+02, double 1.180000e+02, double 3.120000e+02, double 2.320000e+02, double 4.500000e+01, double 3.360000e+02, double 1.780000e+02, double 2.010000e+02, double 2.140000e+02, double 5.300000e+01, double 1.460000e+02, double 1.110000e+02, double 1.300000e+01, double 2.780000e+02, double 2.950000e+02, double 2.720000e+02, double 3.490000e+02, double 2.530000e+02, double 1.310000e+02, double 8.700000e+01, double 2.410000e+02, double 2.660000e+02, double 3.390000e+02, double 1.880000e+02, double 1.060000e+02, double 4.000000e+00, double 2.460000e+02, double 1.800000e+02, double 2.190000e+02, double 1.140000e+02, double 2.040000e+02, double 2.810000e+02, double 1.480000e+02, double 2.760000e+02, double 2.120000e+02, double 1.400000e+02]
define double @fmoond(double %0) {
%2 = alloca double
%3 = alloca double
%4 = alloca [43 x double]
%5 = alloca [43 x double]
%6 = alloca [43 x double]
%7 = alloca double
%8 = alloca i32
store double %0, double* %2
store double 9.507250e-01, double* %3
%9 = bitcast [43 x double]* %4 to i8*
%10 = bitcast [43 x double]* %5 to i8*
%11 = bitcast [43 x double]* %6 to i8*
store double 0.000000e+00, double* %7
store i32 0, i32* %8
br label %12
12: ; preds = %34, %1
%13 = load i32, i32* %8
%14 = icmp slt i32 %13, 43
br i1 %14, label %15, label %37
15: ; preds = %12
%16 = load i32, i32* %8
%17 = sext i32 %16 to i64
%18 = getelementptr inbounds [43 x double], [43 x double]* %4, i64 0, i64 %17
%19 = load double, double* %18
%20 = load i32, i32* %8
%21 = sext i32 %20 to i64
%22 = getelementptr inbounds [43 x double], [43 x double]* %5, i64 0, i64 %21
%23 = load double, double* %22
%24 = load double, double* %2
%25 = load i32, i32* %8
%26 = sext i32 %25 to i64
%27 = getelementptr inbounds [43 x double], [43 x double]* %6, i64 0, i64 %26
%28 = load double, double* %27
%29 = call double @llvm.fmuladd.f64(double %23, double %24, double %28)
%30 = fmul double %29, 0x3F91DF46A2529D3A
%31 = call double @cos(double %30)
%32 = load double, double* %7
%33 = call double @llvm.fmuladd.f64(double %19, double %31, double %32)
store double %33, double* %7
br label %34
34: ; preds = %15
%35 = load i32, i32* %8
%36 = add nsw i32 %35, 1
store i32 %36, i32* %8
br label %12
37: ; preds = %12
%38 = load double, double* %7
%39 = load double, double* %3
%40 = fadd double %38, %39
%41 = fmul double %40, 0x3F91DF46A2529D3A
store double %41, double* %7
%42 = load double, double* %7
%43 = load double, double* %7
%44 = load double, double* %7
%45 = fmul double %43, %44
%46 = fdiv double %45, 6.000000e+00
%47 = fsub double 1.000000e+00, %46
%48 = fmul double %42, %47
%49 = fdiv double 0x415854A640000000, %48
ret double %49
}

LLVM IR (-O2):
@__const.fmoond.A = [43 x double] [double 5.182000e-02, double 9.530000e-03, double 7.842000e-03, double 2.824000e-03, double 8.580000e-04, double 5.310000e-04, double 4.000000e-04, double 3.190000e-04, double 2.710000e-04, double 2.630000e-04, double 1.970000e-04, double 1.730000e-04, double 1.670000e-04, double 1.110000e-04, double 1.030000e-04, double 8.400000e-05, double 8.300000e-05, double 7.800000e-05, double 7.300000e-05, double 6.400000e-05, double 6.300000e-05, double 4.100000e-05, double 3.400000e-05, double 3.300000e-05, double 3.100000e-05, double 3.000000e-05, double 2.900000e-05, double 2.600000e-05, double 2.300000e-05, double 1.900000e-05, double 1.300000e-05, double 1.300000e-05, double 1.300000e-05, double 1.200000e-05, double 1.100000e-05, double 1.100000e-05, double 1.000000e-05, double 9.000000e-06, double 0x3EDD5C31593E5FB7, double 0x3EDD5C31593E5FB7, double 6.000000e-06, double 6.000000e-06, double 5.000000e-06]
@__const.fmoond.B = [43 x double] [double 0x411D203B78D4FDF4, double 0x41193A5D66666666, double 0x412B2D4C70A3D70A, double 0x412D203B7AE147AE, double 0x4134DEB51999999A, double 0x412A140E66666666, double 0x411707E133333333, double 0x411AEDBF33333333, double 4.452670e+05, double 5.131980e+05, double 4.892050e+05, double 0x4135D82D00000000, double 1.303870e+06, double 3.599900e+04, double 8.266710e+05, double 6.386400e+04, double 9.265330e+05, double 0x413C26C400000000, double 0x413B2D4C00000000, double 0x4134521600000000, double 4.493340e+05, double 4.812660e+05, double 9.183990e+05, double 5.410620e+05, double 9.224660e+05, double 7.587000e+04, double 9.903970e+05, double 8.185360e+05, double 5.530690e+05, double 0x4133589F00000000, double 0x41356B5400000000, double 3.413370e+05, double 4.013290e+05, double 0x41413AAD80000000, double 0x413D203B00000000, double 8.586020e+05, double 0x413AA0AD00000000, double 7.906720e+05, double 0x4141B76980000000, double 0x413B9A2500000000, double 4.853330e+05, double 9.986300e+04, double 4.052010e+05]
@__const.fmoond.C = [43 x double] [double 1.349630e+02, double 1.007400e+02, double 2.357000e+02, double 2.699300e+02, double 1.070000e+01, double 2.382000e+02, double 1.032000e+02, double 1.374000e+02, double 1.180000e+02, double 3.120000e+02, double 2.320000e+02, double 4.500000e+01, double 3.360000e+02, double 1.780000e+02, double 2.010000e+02, double 2.140000e+02, double 5.300000e+01, double 1.460000e+02, double 1.110000e+02, double 1.300000e+01, double 2.780000e+02, double 2.950000e+02, double 2.720000e+02, double 3.490000e+02, double 2.530000e+02, double 1.310000e+02, double 8.700000e+01, double 2.410000e+02, double 2.660000e+02, double 3.390000e+02, double 1.880000e+02, double 1.060000e+02, double 4.000000e+00, double 2.460000e+02, double 1.800000e+02, double 2.190000e+02, double 1.140000e+02, double 2.040000e+02, double 2.810000e+02, double 1.480000e+02, double 2.760000e+02, double 2.120000e+02, double 1.400000e+02]
define double @fmoond(double %0) {
br label %2
2: ; preds = %17, %1
%3 = phi i64 [ 0, %1 ], [ %28, %17 ]
%4 = phi double [ 0.000000e+00, %1 ], [ %27, %17 ]
%5 = getelementptr inbounds [43 x double], [43 x double]* @__const.fmoond.A, i64 0, i64 %3
%6 = load double, double* %5
%7 = getelementptr inbounds [43 x double], [43 x double]* @__const.fmoond.B, i64 0, i64 %3
%8 = load double, double* %7
%9 = getelementptr inbounds [43 x double], [43 x double]* @__const.fmoond.C, i64 0, i64 %3
%10 = load double, double* %9
%11 = tail call double @llvm.fmuladd.f64(double %8, double %0, double %10)
%12 = fmul double %11, 0x3F91DF46A2529D3A
%13 = tail call double @cos(double %12)
%14 = tail call double @llvm.fmuladd.f64(double %6, double %13, double %4)
%15 = or i64 %3, 1
%16 = icmp eq i64 %15, 43
br i1 %16, label %29, label %17
17: ; preds = %2
%18 = getelementptr inbounds [43 x double], [43 x double]* @__const.fmoond.A, i64 0, i64 %15
%19 = load double, double* %18
%20 = getelementptr inbounds [43 x double], [43 x double]* @__const.fmoond.B, i64 0, i64 %15
%21 = load double, double* %20
%22 = getelementptr inbounds [43 x double], [43 x double]* @__const.fmoond.C, i64 0, i64 %15
%23 = load double, double* %22
%24 = tail call double @llvm.fmuladd.f64(double %21, double %0, double %23)
%25 = fmul double %24, 0x3F91DF46A2529D3A
%26 = tail call double @cos(double %25)
%27 = tail call double @llvm.fmuladd.f64(double %19, double %26, double %14)
%28 = add nuw nsw i64 %3, 2
br label %2
29: ; preds = %2
%30 = fadd double %14, 9.507250e-01
%31 = fmul double %30, 0x3F91DF46A2529D3A
%32 = fmul double %31, %31
%33 = fdiv double %32, 6.000000e+00
%34 = fsub double 1.000000e+00, %33
%35 = fmul double %31, %34
%36 = fdiv double 0x415854A640000000, %35
ret double %36
}