#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 M_PI;
double fmod(double, double);
double sunmodel_geom_mean_long_sun(double t) {
  double lon;
  lon = 280.46646 + t * (36000.76983 + t * 0.0003032);
  lon = fmod(lon, 360.0);
  if (lon < 0.0) {
    lon += 360.0;
  }
  lon = (M_PI * (lon) / 180.0);
  return lon;
}


x86 assembly (clang, -O0):
<sunmodel_geom_mean_long_sun>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movsd  %xmm0,-0x8(%rbp)
movsd  -0x8(%rbp),%xmm0
movsd  -0x8(%rbp),%xmm1
movsd  0xee1(%rip),%xmm2
mulsd  %xmm2,%xmm1
movsd  0xedd(%rip),%xmm2
addsd  %xmm2,%xmm1
mulsd  %xmm1,%xmm0
movsd  0xebd(%rip),%xmm1
addsd  %xmm1,%xmm0
movsd  %xmm0,-0x10(%rbp)
movsd  -0x10(%rbp),%xmm0
movsd  0xe9f(%rip),%xmm1
call   1030 <fmod@plt>
movsd  %xmm0,-0x10(%rbp)
xorps  %xmm0,%xmm0
ucomisd -0x10(%rbp),%xmm0
jbe    118b <sunmodel_geom_mean_long_sun+0x7b>
movsd  0xe7f(%rip),%xmm0
addsd  -0x10(%rbp),%xmm0
movsd  %xmm0,-0x10(%rbp)
mov    0x2e56(%rip),%rax
movsd  (%rax),%xmm0
mulsd  -0x10(%rbp),%xmm0
movsd  0xe7d(%rip),%xmm1
divsd  %xmm1,%xmm0
movsd  %xmm0,-0x10(%rbp)
movsd  -0x10(%rbp),%xmm0
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<sunmodel_geom_mean_long_sun>:
push   %rax
movsd  0xee7(%rip),%xmm1
mulsd  %xmm0,%xmm1
addsd  0xee3(%rip),%xmm1
mulsd  %xmm1,%xmm0
addsd  0xedf(%rip),%xmm0
movsd  0xedf(%rip),%xmm1
call   1030 <fmod@plt>
movsd  0xed2(%rip),%xmm3
addsd  %xmm0,%xmm3
xorpd  %xmm2,%xmm2
movapd %xmm0,%xmm1
cmpltsd %xmm2,%xmm1
andpd  %xmm1,%xmm3
andnpd %xmm0,%xmm1
orpd   %xmm3,%xmm1
mov    0x2e7e(%rip),%rax
mulsd  (%rax),%xmm1
divsd  0xeaa(%rip),%xmm1
movapd %xmm1,%xmm0
pop    %rax
ret

LLVM IR (-O0):
@M_PI = global double 0.000000e+00
define double @sunmodel_geom_mean_long_sun(double %0) {
%2 = alloca double
%3 = alloca double
store double %0, double* %2
%4 = load double, double* %2
%5 = load double, double* %2
%6 = call double @llvm.fmuladd.f64(double %5, double 3.032000e-04, double 0x40E19418A272862F)
%7 = call double @llvm.fmuladd.f64(double %4, double %6, double 0x407187769EC2CE46)
store double %7, double* %3
%8 = load double, double* %3
%9 = call double @fmod(double %8, double 3.600000e+02)
store double %9, double* %3
%10 = load double, double* %3
%11 = fcmp olt double %10, 0.000000e+00
br i1 %11, label %12, label %15
12: ; preds = %1
%13 = load double, double* %3
%14 = fadd double %13, 3.600000e+02
store double %14, double* %3
br label %15
15: ; preds = %12, %1
%16 = load double, double* @M_PI
%17 = load double, double* %3
%18 = fmul double %16, %17
%19 = fdiv double %18, 1.800000e+02
store double %19, double* %3
%20 = load double, double* %3
ret double %20
}

LLVM IR (-O2):
@M_PI = global double 0.000000e+00
define double @sunmodel_geom_mean_long_sun(double %0) {
%2 = tail call double @llvm.fmuladd.f64(double %0, double 3.032000e-04, double 0x40E19418A272862F)
%3 = tail call double @llvm.fmuladd.f64(double %0, double %2, double 0x407187769EC2CE46)
%4 = tail call double @fmod(double %3, double 3.600000e+02)
%5 = fcmp olt double %4, 0.000000e+00
%6 = fadd double %4, 3.600000e+02
%7 = select i1 %5, double %6, double %4
%8 = load double, double* @M_PI
%9 = fmul double %8, %7
%10 = fdiv double %9, 1.800000e+02
ret double %10
}