#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 JDNow();
double LongitudeSun();
double Map360(double);
double sin(int);
double NLongitude(void) {
  double dpsi, lsun, lmoon, omega;
  double jdnow, dt, t;
  dt = 35.0;
  dt = dt + 32.184;
  dt = dt / (36525 * 24. * 60. * 60.);
  jdnow = JDNow();
  t = (jdnow - 2451545.0) / 36525.0;
  t = t + dt;
  omega = Map360(125.04452 - 1934.136261 * t + 0.0020708 * t * t +
                 t * t * t / 450000.);
  lmoon = Map360(218.31654591 + 481267.88134236 * t - 0.00163 * t * t +
                 t * t * t / 538841. - t * t * t * t / 65194000.);
  lsun = LongitudeSun();
  omega = omega * 3.14159265358 / 180.;
  lsun = lsun * 3.14159265358 / 180.;
  lmoon = lmoon * 3.14159265358 / 180.;
  dpsi = -17.20 * sin(omega) - 1.32 * sin(2. * lsun) - 0.23 * sin(2. * lmoon) +
         0.21 * sin(2. * omega);
  dpsi = dpsi / 3600.;
  return (dpsi);
}


x86 assembly (clang, -O0):
<NLongitude>:
push   %rbp
mov    %rsp,%rbp
sub    $0x50,%rsp
movsd  0xf58(%rip),%xmm0
movsd  %xmm0,-0x30(%rbp)
movsd  0xf43(%rip),%xmm0
addsd  -0x30(%rbp),%xmm0
movsd  %xmm0,-0x30(%rbp)
movsd  -0x30(%rbp),%xmm0
movsd  0xf24(%rip),%xmm1
divsd  %xmm1,%xmm0
movsd  %xmm0,-0x30(%rbp)
mov    $0x0,%al
call   1040 <JDNow@plt>
movsd  %xmm0,-0x28(%rbp)
movsd  -0x28(%rbp),%xmm0
movsd  0xefa(%rip),%xmm1
subsd  %xmm1,%xmm0
movsd  0xee6(%rip),%xmm1
divsd  %xmm1,%xmm0
movsd  %xmm0,-0x38(%rbp)
movsd  -0x38(%rbp),%xmm0
addsd  -0x30(%rbp),%xmm0
movsd  %xmm0,-0x38(%rbp)
movsd  -0x38(%rbp),%xmm1
movsd  0xeb1(%rip),%xmm0
mulsd  %xmm0,%xmm1
movsd  0xead(%rip),%xmm0
addsd  %xmm0,%xmm1
movsd  0xe91(%rip),%xmm0
mulsd  -0x38(%rbp),%xmm0
movsd  -0x38(%rbp),%xmm2
mulsd  %xmm2,%xmm0
addsd  %xmm1,%xmm0
movsd  -0x38(%rbp),%xmm1
mulsd  -0x38(%rbp),%xmm1
mulsd  -0x38(%rbp),%xmm1
movsd  0xe60(%rip),%xmm2
divsd  %xmm2,%xmm1
addsd  %xmm1,%xmm0
call   1030 <Map360@plt>
movsd  %xmm0,-0x20(%rbp)
movsd  -0x38(%rbp),%xmm1
movsd  0xe31(%rip),%xmm0
mulsd  %xmm0,%xmm1
movsd  0xe2d(%rip),%xmm0
addsd  %xmm0,%xmm1
movsd  0xe11(%rip),%xmm0
mulsd  -0x38(%rbp),%xmm0
movsd  -0x38(%rbp),%xmm2
movq   %xmm0,%rax
movabs $0x8000000000000000,%rcx
xor    %rcx,%rax
movq   %rax,%xmm0
mulsd  %xmm2,%xmm0
addsd  %xmm1,%xmm0
movsd  -0x38(%rbp),%xmm1
mulsd  -0x38(%rbp),%xmm1
mulsd  -0x38(%rbp),%xmm1
movsd  0xdc9(%rip),%xmm2
divsd  %xmm2,%xmm1
addsd  %xmm1,%xmm0
movsd  -0x38(%rbp),%xmm1
mulsd  -0x38(%rbp),%xmm1
mulsd  -0x38(%rbp),%xmm1
mulsd  -0x38(%rbp),%xmm1
movsd  0xd9d(%rip),%xmm2
divsd  %xmm2,%xmm1
subsd  %xmm1,%xmm0
call   1030 <Map360@plt>
movsd  %xmm0,-0x18(%rbp)
mov    $0x0,%al
call   1060 <LongitudeSun@plt>
movsd  %xmm0,-0x10(%rbp)
movsd  0xd6f(%rip),%xmm0
mulsd  -0x20(%rbp),%xmm0
movsd  0xd5a(%rip),%xmm1
divsd  %xmm1,%xmm0
movsd  %xmm0,-0x20(%rbp)
movsd  0xd51(%rip),%xmm0
mulsd  -0x10(%rbp),%xmm0
movsd  0xd3c(%rip),%xmm1
divsd  %xmm1,%xmm0
movsd  %xmm0,-0x10(%rbp)
movsd  0xd33(%rip),%xmm0
mulsd  -0x18(%rbp),%xmm0
movsd  0xd1e(%rip),%xmm1
divsd  %xmm1,%xmm0
movsd  %xmm0,-0x18(%rbp)
cvttsd2si -0x20(%rbp),%edi
call   1050 <sin@plt>
movsd  %xmm0,-0x50(%rbp)
movsd  0xcde(%rip),%xmm0
mulsd  -0x10(%rbp),%xmm0
cvttsd2si %xmm0,%edi
call   1050 <sin@plt>
movaps %xmm0,%xmm2
movsd  -0x50(%rbp),%xmm0
movsd  0xcd8(%rip),%xmm1
mulsd  %xmm2,%xmm1
movq   %xmm1,%rax
movabs $0x8000000000000000,%rcx
xor    %rcx,%rax
movq   %rax,%xmm1
movsd  0xcad(%rip),%xmm2
mulsd  %xmm2,%xmm0
addsd  %xmm1,%xmm0
movsd  %xmm0,-0x48(%rbp)
movsd  0xc88(%rip),%xmm0
mulsd  -0x18(%rbp),%xmm0
cvttsd2si %xmm0,%edi
call   1050 <sin@plt>
movsd  -0x48(%rbp),%xmm1
movsd  0xc75(%rip),%xmm2
mulsd  %xmm2,%xmm0
addsd  %xmm1,%xmm0
movsd  %xmm0,-0x40(%rbp)
movsd  0xc58(%rip),%xmm0
mulsd  -0x20(%rbp),%xmm0
cvttsd2si %xmm0,%edi
call   1050 <sin@plt>
movsd  -0x40(%rbp),%xmm1
movsd  0xc35(%rip),%xmm2
mulsd  %xmm2,%xmm0
addsd  %xmm1,%xmm0
movsd  %xmm0,-0x8(%rbp)
movsd  -0x8(%rbp),%xmm0
movsd  0xc13(%rip),%xmm1
divsd  %xmm1,%xmm0
movsd  %xmm0,-0x8(%rbp)
movsd  -0x8(%rbp),%xmm0
add    $0x50,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<NLongitude>:
sub    $0x38,%rsp
xor    %eax,%eax
call   1040 <JDNow@plt>
addsd  0xead(%rip),%xmm0
divsd  0xead(%rip),%xmm0
addsd  0xead(%rip),%xmm0
movapd %xmm0,0x20(%rsp)
movsd  0xea7(%rip),%xmm2
mulsd  %xmm0,%xmm2
addsd  0xea3(%rip),%xmm2
movsd  0xea3(%rip),%xmm1
mulsd  %xmm0,%xmm1
mulsd  %xmm0,%xmm1
addsd  %xmm2,%xmm1
movapd %xmm0,%xmm2
mulsd  %xmm0,%xmm2
mulsd  %xmm0,%xmm2
movapd %xmm2,(%rsp)
movapd %xmm2,%xmm0
divsd  0xe82(%rip),%xmm0
addsd  %xmm1,%xmm0
call   1030 <Map360@plt>
movsd  0xe79(%rip),%xmm1
movapd 0x20(%rsp),%xmm3
mulsd  %xmm3,%xmm1
addsd  0xe6f(%rip),%xmm1
movsd  %xmm0,0x18(%rsp)
movsd  0xe69(%rip),%xmm0
mulsd  %xmm3,%xmm0
mulsd  %xmm3,%xmm0
movapd (%rsp),%xmm2
mulsd  %xmm2,%xmm3
unpcklpd %xmm3,%xmm2
divpd  0xe94(%rip),%xmm2
addsd  %xmm1,%xmm0
addsd  %xmm2,%xmm0
unpckhpd %xmm2,%xmm2
subsd  %xmm2,%xmm0
call   1030 <Map360@plt>
movsd  %xmm0,(%rsp)
xor    %eax,%eax
call   1060 <LongitudeSun@plt>
movsd  0xe2b(%rip),%xmm4
movsd  0x18(%rsp),%xmm2
mulsd  %xmm4,%xmm2
movsd  0xe21(%rip),%xmm1
divsd  %xmm1,%xmm2
movsd  %xmm2,0x18(%rsp)
mulsd  %xmm4,%xmm0
divsd  %xmm1,%xmm0
movsd  %xmm0,0x30(%rsp)
movsd  (%rsp),%xmm0
mulsd  %xmm4,%xmm0
divsd  %xmm1,%xmm0
movsd  %xmm0,(%rsp)
cvttsd2si %xmm2,%edi
call   1050 <sin@plt>
movsd  %xmm0,0x20(%rsp)
movsd  0x30(%rsp),%xmm0
addsd  %xmm0,%xmm0
cvttsd2si %xmm0,%edi
call   1050 <sin@plt>
mulsd  0xdd5(%rip),%xmm0
movsd  0x20(%rsp),%xmm1
mulsd  0xdcf(%rip),%xmm1
addsd  %xmm1,%xmm0
movsd  %xmm0,0x20(%rsp)
movsd  (%rsp),%xmm0
addsd  %xmm0,%xmm0
cvttsd2si %xmm0,%edi
call   1050 <sin@plt>
mulsd  0xdb3(%rip),%xmm0
addsd  0x20(%rsp),%xmm0
movsd  %xmm0,(%rsp)
movsd  0x18(%rsp),%xmm0
addsd  %xmm0,%xmm0
cvttsd2si %xmm0,%edi
call   1050 <sin@plt>
mulsd  0xd95(%rip),%xmm0
addsd  (%rsp),%xmm0
divsd  0xd90(%rip),%xmm0
add    $0x38,%rsp
ret

LLVM IR (-O0):
define double @NLongitude() {
%1 = alloca double
%2 = alloca double
%3 = alloca double
%4 = alloca double
%5 = alloca double
%6 = alloca double
%7 = alloca double
store double 3.500000e+01, double* %6
%8 = load double, double* %6
%9 = fadd double %8, 3.218400e+01
store double %9, double* %6
%10 = load double, double* %6
%11 = fdiv double %10, 3.155760e+09
store double %11, double* %6
%12 = call double (...) @JDNow()
store double %12, double* %5
%13 = load double, double* %5
%14 = fsub double %13, 0x4142B42C80000000
%15 = fdiv double %14, 3.652500e+04
store double %15, double* %7
%16 = load double, double* %7
%17 = load double, double* %6
%18 = fadd double %16, %17
store double %18, double* %7
%19 = load double, double* %7
%20 = call double @llvm.fmuladd.f64(double 0xC09E388B8800EAE2, double %19, double 0x405F42D96A6A0126)
%21 = load double, double* %7
%22 = fmul double 2.070800e-03, %21
%23 = load double, double* %7
%24 = call double @llvm.fmuladd.f64(double %22, double %23, double %20)
%25 = load double, double* %7
%26 = load double, double* %7
%27 = fmul double %25, %26
%28 = load double, double* %7
%29 = fmul double %27, %28
%30 = fdiv double %29, 4.500000e+05
%31 = fadd double %24, %30
%32 = call double @Map360(double %31)
store double %32, double* %4
%33 = load double, double* %7
%34 = call double @llvm.fmuladd.f64(double 0x411D5FCF867E9C93, double %33, double 0x406B4A2124E3643E)
%35 = load double, double* %7
%36 = fmul double 1.630000e-03, %35
%37 = load double, double* %7
%38 = fneg double %36
%39 = call double @llvm.fmuladd.f64(double %38, double %37, double %34)
%40 = load double, double* %7
%41 = load double, double* %7
%42 = fmul double %40, %41
%43 = load double, double* %7
%44 = fmul double %42, %43
%45 = fdiv double %44, 5.388410e+05
%46 = fadd double %39, %45
%47 = load double, double* %7
%48 = load double, double* %7
%49 = fmul double %47, %48
%50 = load double, double* %7
%51 = fmul double %49, %50
%52 = load double, double* %7
%53 = fmul double %51, %52
%54 = fdiv double %53, 6.519400e+07
%55 = fsub double %46, %54
%56 = call double @Map360(double %55)
store double %56, double* %3
%57 = call double (...) @LongitudeSun()
store double %57, double* %2
%58 = load double, double* %4
%59 = fmul double %58, 0x400921FB5443D6F4
%60 = fdiv double %59, 1.800000e+02
store double %60, double* %4
%61 = load double, double* %2
%62 = fmul double %61, 0x400921FB5443D6F4
%63 = fdiv double %62, 1.800000e+02
store double %63, double* %2
%64 = load double, double* %3
%65 = fmul double %64, 0x400921FB5443D6F4
%66 = fdiv double %65, 1.800000e+02
store double %66, double* %3
%67 = load double, double* %4
%68 = fptosi double %67 to i32
%69 = call double @sin(i32 %68)
%70 = load double, double* %2
%71 = fmul double 2.000000e+00, %70
%72 = fptosi double %71 to i32
%73 = call double @sin(i32 %72)
%74 = fmul double 1.320000e+00, %73
%75 = fneg double %74
%76 = call double @llvm.fmuladd.f64(double -1.720000e+01, double %69, double %75)
%77 = load double, double* %3
%78 = fmul double 2.000000e+00, %77
%79 = fptosi double %78 to i32
%80 = call double @sin(i32 %79)
%81 = call double @llvm.fmuladd.f64(double -2.300000e-01, double %80, double %76)
%82 = load double, double* %4
%83 = fmul double 2.000000e+00, %82
%84 = fptosi double %83 to i32
%85 = call double @sin(i32 %84)
%86 = call double @llvm.fmuladd.f64(double 2.100000e-01, double %85, double %81)
store double %86, double* %1
%87 = load double, double* %1
%88 = fdiv double %87, 3.600000e+03
store double %88, double* %1
%89 = load double, double* %1
ret double %89
}

LLVM IR (-O2):
define double @NLongitude() {
%1 = tail call double (...) @JDNow()
%2 = fadd double %1, 0xC142B42C80000000
%3 = fdiv double %2, 3.652500e+04
%4 = fadd double %3, 0x3E56DBF70F0D61B1
%5 = tail call double @llvm.fmuladd.f64(double %4, double 0xC09E388B8800EAE2, double 0x405F42D96A6A0126)
%6 = fmul double %4, 2.070800e-03
%7 = tail call double @llvm.fmuladd.f64(double %6, double %4, double %5)
%8 = fmul double %4, %4
%9 = fmul double %4, %8
%10 = fdiv double %9, 4.500000e+05
%11 = fadd double %7, %10
%12 = tail call double @Map360(double %11)
%13 = tail call double @llvm.fmuladd.f64(double %4, double 0x411D5FCF867E9C93, double 0x406B4A2124E3643E)
%14 = fmul double %4, -1.630000e-03
%15 = tail call double @llvm.fmuladd.f64(double %14, double %4, double %13)
%16 = fmul double %4, %9
%17 = insertelement <2 x double> poison, double %9, i64 0
%18 = insertelement <2 x double> %17, double %16, i64 1
%19 = fdiv <2 x double> %18, <double 5.388410e+05, double 6.519400e+07>
%20 = extractelement <2 x double> %19, i64 0
%21 = fadd double %15, %20
%22 = extractelement <2 x double> %19, i64 1
%23 = fsub double %21, %22
%24 = tail call double @Map360(double %23)
%25 = tail call double (...) @LongitudeSun()
%26 = fmul double %12, 0x400921FB5443D6F4
%27 = fdiv double %26, 1.800000e+02
%28 = fmul double %25, 0x400921FB5443D6F4
%29 = fdiv double %28, 1.800000e+02
%30 = fmul double %24, 0x400921FB5443D6F4
%31 = fdiv double %30, 1.800000e+02
%32 = fptosi double %27 to i32
%33 = tail call double @sin(i32 %32)
%34 = fmul double %29, 2.000000e+00
%35 = fptosi double %34 to i32
%36 = tail call double @sin(i32 %35)
%37 = fmul double %36, -1.320000e+00
%38 = tail call double @llvm.fmuladd.f64(double %33, double -1.720000e+01, double %37)
%39 = fmul double %31, 2.000000e+00
%40 = fptosi double %39 to i32
%41 = tail call double @sin(i32 %40)
%42 = tail call double @llvm.fmuladd.f64(double %41, double -2.300000e-01, double %38)
%43 = fmul double %27, 2.000000e+00
%44 = fptosi double %43 to i32
%45 = tail call double @sin(i32 %44)
%46 = tail call double @llvm.fmuladd.f64(double %45, double 2.100000e-01, double %42)
%47 = fdiv double %46, 3.600000e+03
ret double %47
}