#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 */
int /*<<< orphan*/ adj360(double *);
int cos(int /*<<< orphan*/);
int /*<<< orphan*/ dtor(double);
double sin(int /*<<< orphan*/);
double potm(double onday) {
  double N, Msol, Ec, LambdaSol, l, Mm, Ev, Ac, A3, Mmprime;
  double A4, lprime, V, ldprime, D, Nm;
  N = 360 * onday / 365.2422;
  adj360(&N);
  Msol = N + 279.611371 - 282.680403;
  adj360(&Msol);
  Ec = 360 / 3.14159265358979323846 * 0.01671542 * sin(dtor(Msol));
  LambdaSol = N + Ec + 279.611371;
  adj360(&LambdaSol);
  l = 13.1763966 * onday + 18.251907;
  adj360(&l);
  Mm = l - (0.1114041 * onday) - 192.917585;
  adj360(&Mm);
  Nm = 55.204723 - (0.0529539 * onday);
  adj360(&Nm);
  Ev = 1.2739 * sin(dtor(2 * (l - LambdaSol) - Mm));
  Ac = 0.1858 * sin(dtor(Msol));
  A3 = 0.37 * sin(dtor(Msol));
  Mmprime = Mm + Ev - Ac - A3;
  Ec = 6.2886 * sin(dtor(Mmprime));
  A4 = 0.214 * sin(dtor(2 * Mmprime));
  lprime = l + Ev + Ec - Ac + A4;
  V = 0.6583 * sin(dtor(2 * (lprime - LambdaSol)));
  ldprime = lprime + V;
  D = ldprime - LambdaSol;
  return (50 * (1 - cos(dtor(D))));
}


x86 assembly (clang, -O0):
<potm>:
push   %rbp
mov    %rsp,%rbp
sub    $0x90,%rsp
movsd  %xmm0,-0x8(%rbp)
movsd  0xf30(%rip),%xmm0
mulsd  -0x8(%rbp),%xmm0
movsd  0xf1b(%rip),%xmm1
divsd  %xmm1,%xmm0
movsd  %xmm0,-0x10(%rbp)
lea    -0x10(%rbp),%rdi
call   1040 <adj360@plt>
movsd  0xee9(%rip),%xmm0
addsd  -0x10(%rbp),%xmm0
movsd  0xeec(%rip),%xmm1
subsd  %xmm1,%xmm0
movsd  %xmm0,-0x18(%rbp)
lea    -0x18(%rbp),%rdi
call   1040 <adj360@plt>
movsd  -0x18(%rbp),%xmm0
call   1060 <dtor@plt>
mov    %eax,%edi
call   1030 <sin@plt>
movaps %xmm0,%xmm1
movsd  0xeb6(%rip),%xmm0
mulsd  %xmm1,%xmm0
movsd  %xmm0,-0x20(%rbp)
movsd  -0x10(%rbp),%xmm0
addsd  -0x20(%rbp),%xmm0
movsd  0xe93(%rip),%xmm1
addsd  %xmm1,%xmm0
movsd  %xmm0,-0x28(%rbp)
lea    -0x28(%rbp),%rdi
call   1040 <adj360@plt>
movsd  -0x8(%rbp),%xmm0
movsd  0xe64(%rip),%xmm1
mulsd  %xmm1,%xmm0
movsd  0xe60(%rip),%xmm1
addsd  %xmm1,%xmm0
movsd  %xmm0,-0x30(%rbp)
lea    -0x30(%rbp),%rdi
call   1040 <adj360@plt>
movsd  -0x30(%rbp),%xmm1
movsd  -0x8(%rbp),%xmm0
movsd  0xe2c(%rip),%xmm2
mulsd  %xmm2,%xmm0
addsd  %xmm1,%xmm0
movsd  0xe14(%rip),%xmm1
subsd  %xmm1,%xmm0
movsd  %xmm0,-0x38(%rbp)
lea    -0x38(%rbp),%rdi
call   1040 <adj360@plt>
movsd  -0x8(%rbp),%xmm0
movsd  0xde5(%rip),%xmm1
mulsd  %xmm1,%xmm0
movsd  0xde1(%rip),%xmm1
addsd  %xmm1,%xmm0
movsd  %xmm0,-0x88(%rbp)
ff
lea    -0x88(%rbp),%rdi
call   1040 <adj360@plt>
movsd  -0x30(%rbp),%xmm0
subsd  -0x28(%rbp),%xmm0
movsd  -0x38(%rbp),%xmm1
movq   %xmm1,%rax
movabs $0x8000000000000000,%rcx
xor    %rcx,%rax
movq   %rax,%xmm1
addsd  %xmm0,%xmm0
addsd  %xmm1,%xmm0
call   1060 <dtor@plt>
mov    %eax,%edi
call   1030 <sin@plt>
movaps %xmm0,%xmm1
movsd  0xd74(%rip),%xmm0
mulsd  %xmm1,%xmm0
movsd  %xmm0,-0x40(%rbp)
movsd  -0x18(%rbp),%xmm0
call   1060 <dtor@plt>
mov    %eax,%edi
call   1030 <sin@plt>
movaps %xmm0,%xmm1
movsd  0xd47(%rip),%xmm0
mulsd  %xmm1,%xmm0
movsd  %xmm0,-0x48(%rbp)
movsd  -0x18(%rbp),%xmm0
call   1060 <dtor@plt>
mov    %eax,%edi
call   1030 <sin@plt>
movaps %xmm0,%xmm1
movsd  0xd1a(%rip),%xmm0
mulsd  %xmm1,%xmm0
movsd  %xmm0,-0x50(%rbp)
movsd  -0x38(%rbp),%xmm0
addsd  -0x40(%rbp),%xmm0
subsd  -0x48(%rbp),%xmm0
subsd  -0x50(%rbp),%xmm0
movsd  %xmm0,-0x58(%rbp)
movsd  -0x58(%rbp),%xmm0
call   1060 <dtor@plt>
mov    %eax,%edi
call   1030 <sin@plt>
movaps %xmm0,%xmm1
movsd  0xcd4(%rip),%xmm0
mulsd  %xmm1,%xmm0
movsd  %xmm0,-0x20(%rbp)
movsd  0xcb3(%rip),%xmm0
mulsd  -0x58(%rbp),%xmm0
call   1060 <dtor@plt>
mov    %eax,%edi
call   1030 <sin@plt>
movaps %xmm0,%xmm1
movsd  0xc9f(%rip),%xmm0
mulsd  %xmm1,%xmm0
movsd  %xmm0,-0x60(%rbp)
movsd  -0x30(%rbp),%xmm0
addsd  -0x40(%rbp),%xmm0
addsd  -0x20(%rbp),%xmm0
subsd  -0x48(%rbp),%xmm0
addsd  -0x60(%rbp),%xmm0
movsd  %xmm0,-0x68(%rbp)
movsd  -0x68(%rbp),%xmm1
subsd  -0x28(%rbp),%xmm1
movsd  0xc5e(%rip),%xmm0
mulsd  %xmm1,%xmm0
call   1060 <dtor@plt>
mov    %eax,%edi
call   1030 <sin@plt>
movaps %xmm0,%xmm1
movsd  0xc3b(%rip),%xmm0
mulsd  %xmm1,%xmm0
movsd  %xmm0,-0x70(%rbp)
movsd  -0x68(%rbp),%xmm0
addsd  -0x70(%rbp),%xmm0
movsd  %xmm0,-0x78(%rbp)
movsd  -0x78(%rbp),%xmm0
subsd  -0x28(%rbp),%xmm0
movsd  %xmm0,-0x80(%rbp)
movsd  -0x80(%rbp),%xmm0
call   1060 <dtor@plt>
mov    %eax,%edi
call   1050 <cos@plt>
mov    %eax,%ecx
mov    $0x1,%eax
sub    %ecx,%eax
imul   $0x32,%eax,%eax
cvtsi2sd %eax,%xmm0
add    $0x90,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<potm>:
sub    $0x58,%rsp
movsd  %xmm0,0x8(%rsp)
movsd  0xeae(%rip),%xmm1
mulsd  %xmm0,%xmm1
divsd  0xeaa(%rip),%xmm1
movsd  %xmm1,0x30(%rsp)
lea    0x30(%rsp),%rdi
call   1040 <adj360@plt>
movsd  0x30(%rsp),%xmm0
addsd  0xe94(%rip),%xmm0
addsd  0xe94(%rip),%xmm0
movsd  %xmm0,0x20(%rsp)
lea    0x20(%rsp),%rdi
call   1040 <adj360@plt>
movsd  0x20(%rsp),%xmm0
call   1060 <dtor@plt>
mov    %eax,%edi
call   1030 <sin@plt>
mulsd  0xe72(%rip),%xmm0
addsd  0x30(%rsp),%xmm0
addsd  0xe54(%rip),%xmm0
movsd  %xmm0,0x18(%rsp)
lea    0x18(%rsp),%rdi
call   1040 <adj360@plt>
movsd  0xe54(%rip),%xmm0
mulsd  0x8(%rsp),%xmm0
addsd  0xe4e(%rip),%xmm0
movsd  %xmm0,0x10(%rsp)
lea    0x10(%rsp),%rdi
call   1040 <adj360@plt>
movsd  0xe3e(%rip),%xmm0
mulsd  0x8(%rsp),%xmm0
addsd  0x10(%rsp),%xmm0
addsd  0xe32(%rip),%xmm0
movsd  %xmm0,0x28(%rsp)
lea    0x28(%rsp),%rdi
call   1040 <adj360@plt>
movsd  0x8(%rsp),%xmm0
mulsd  0xe1c(%rip),%xmm0
addsd  0xe1c(%rip),%xmm0
movsd  %xmm0,0x50(%rsp)
lea    0x50(%rsp),%rdi
call   1040 <adj360@plt>
movsd  0x10(%rsp),%xmm0
subsd  0x18(%rsp),%xmm0
addsd  %xmm0,%xmm0
subsd  0x28(%rsp),%xmm0
call   1060 <dtor@plt>
mov    %eax,%edi
call   1030 <sin@plt>
mulsd  0xdea(%rip),%xmm0
movsd  %xmm0,0x8(%rsp)
movsd  0x20(%rsp),%xmm0
call   1060 <dtor@plt>
mov    %eax,%edi
call   1030 <sin@plt>
mulsd  0xdd2(%rip),%xmm0
movsd  %xmm0,0x38(%rsp)
movsd  0x20(%rsp),%xmm0
call   1060 <dtor@plt>
mov    %eax,%edi
call   1030 <sin@plt>
mulsd  0xdba(%rip),%xmm0
movsd  0x28(%rsp),%xmm1
addsd  0x8(%rsp),%xmm1
subsd  0x38(%rsp),%xmm1
addsd  %xmm1,%xmm0
movsd  %xmm0,0x40(%rsp)
call   1060 <dtor@plt>
mov    %eax,%edi
call   1030 <sin@plt>
mulsd  0xd92(%rip),%xmm0
movsd  %xmm0,0x48(%rsp)
movsd  0x40(%rsp),%xmm0
addsd  %xmm0,%xmm0
call   1060 <dtor@plt>
mov    %eax,%edi
call   1030 <sin@plt>
movapd %xmm0,%xmm1
mulsd  0xd72(%rip),%xmm1
movsd  0x8(%rsp),%xmm0
addsd  0x10(%rsp),%xmm0
addsd  0x48(%rsp),%xmm0
subsd  0x38(%rsp),%xmm0
addsd  %xmm0,%xmm1
movsd  %xmm1,0x8(%rsp)
subsd  0x18(%rsp),%xmm1
addsd  %xmm1,%xmm1
movapd %xmm1,%xmm0
call   1060 <dtor@plt>
mov    %eax,%edi
call   1030 <sin@plt>
mulsd  0xd36(%rip),%xmm0
addsd  0x8(%rsp),%xmm0
subsd  0x18(%rsp),%xmm0
call   1060 <dtor@plt>
mov    %eax,%edi
call   1050 <cos@plt>
mov    $0x1,%ecx
sub    %eax,%ecx
imul   $0x32,%ecx,%eax
xorps  %xmm0,%xmm0
cvtsi2sd %eax,%xmm0
add    $0x58,%rsp
ret

LLVM IR (-O0):
define double @potm(double %0) {
%2 = alloca double
%3 = alloca double
%4 = alloca double
%5 = alloca double
%6 = alloca double
%7 = alloca double
%8 = alloca double
%9 = alloca double
%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
store double %0, double* %2
%19 = load double, double* %2
%20 = fmul double 3.600000e+02, %19
%21 = fdiv double %20, 0x4076D3E00D1B7176
store double %21, double* %3
%22 = call i32 @adj360(double* %3)
%23 = load double, double* %3
%24 = fadd double %23, 0x407179C82CF52B91
%25 = fsub double %24, 0x4071AAE2EE41919B
store double %25, double* %4
%26 = call i32 @adj360(double* %4)
%27 = load double, double* %4
%28 = call i32 @dtor(double %27)
%29 = call double @sin(i32 %28)
%30 = fmul double 0x3FFEA5AABE8A585E, %29
store double %30, double* %5
%31 = load double, double* %3
%32 = load double, double* %5
%33 = fadd double %31, %32
%34 = fadd double %33, 0x407179C82CF52B91
store double %34, double* %6
%35 = call i32 @adj360(double* %6)
%36 = load double, double* %2
%37 = call double @llvm.fmuladd.f64(double 0x402A5A50A7B8404E, double %36, double 0x4032407CFA26A22B)
store double %37, double* %7
%38 = call i32 @adj360(double* %7)
%39 = load double, double* %7
%40 = load double, double* %2
%41 = call double @llvm.fmuladd.f64(double 0xBFBC84FAA623EB98, double %40, double %39)
%42 = fsub double %41, 0x40681D5CDB37C99B
store double %42, double* %8
%43 = call i32 @adj360(double* %8)
%44 = load double, double* %2
%45 = call double @llvm.fmuladd.f64(double -5.295390e-02, double %44, double 0x404B9A345CFEDE98)
store double %45, double* %18
%46 = call i32 @adj360(double* %18)
%47 = load double, double* %7
%48 = load double, double* %6
%49 = fsub double %47, %48
%50 = load double, double* %8
%51 = fneg double %50
%52 = call double @llvm.fmuladd.f64(double 2.000000e+00, double %49, double %51)
%53 = call i32 @dtor(double %52)
%54 = call double @sin(i32 %53)
%55 = fmul double 1.273900e+00, %54
store double %55, double* %9
%56 = load double, double* %4
%57 = call i32 @dtor(double %56)
%58 = call double @sin(i32 %57)
%59 = fmul double 1.858000e-01, %58
store double %59, double* %10
%60 = load double, double* %4
%61 = call i32 @dtor(double %60)
%62 = call double @sin(i32 %61)
%63 = fmul double 3.700000e-01, %62
store double %63, double* %11
%64 = load double, double* %8
%65 = load double, double* %9
%66 = fadd double %64, %65
%67 = load double, double* %10
%68 = fsub double %66, %67
%69 = load double, double* %11
%70 = fsub double %68, %69
store double %70, double* %12
%71 = load double, double* %12
%72 = call i32 @dtor(double %71)
%73 = call double @sin(i32 %72)
%74 = fmul double 6.288600e+00, %73
store double %74, double* %5
%75 = load double, double* %12
%76 = fmul double 2.000000e+00, %75
%77 = call i32 @dtor(double %76)
%78 = call double @sin(i32 %77)
%79 = fmul double 2.140000e-01, %78
store double %79, double* %13
%80 = load double, double* %7
%81 = load double, double* %9
%82 = fadd double %80, %81
%83 = load double, double* %5
%84 = fadd double %82, %83
%85 = load double, double* %10
%86 = fsub double %84, %85
%87 = load double, double* %13
%88 = fadd double %86, %87
store double %88, double* %14
%89 = load double, double* %14
%90 = load double, double* %6
%91 = fsub double %89, %90
%92 = fmul double 2.000000e+00, %91
%93 = call i32 @dtor(double %92)
%94 = call double @sin(i32 %93)
%95 = fmul double 6.583000e-01, %94
store double %95, double* %15
%96 = load double, double* %14
%97 = load double, double* %15
%98 = fadd double %96, %97
store double %98, double* %16
%99 = load double, double* %16
%100 = load double, double* %6
%101 = fsub double %99, %100
store double %101, double* %17
%102 = load double, double* %17
%103 = call i32 @dtor(double %102)
%104 = call i32 @cos(i32 %103)
%105 = sub nsw i32 1, %104
%106 = mul nsw i32 50, %105
%107 = sitofp i32 %106 to double
ret double %107
}

LLVM IR (-O2):
define double @potm(double %0) {
%2 = alloca double
%3 = alloca double
%4 = alloca double
%5 = alloca double
%6 = alloca double
%7 = alloca double
%8 = bitcast double* %2 to i8*
%9 = bitcast double* %3 to i8*
%10 = bitcast double* %4 to i8*
%11 = bitcast double* %5 to i8*
%12 = bitcast double* %6 to i8*
%13 = bitcast double* %7 to i8*
%14 = fmul double %0, 3.600000e+02
%15 = fdiv double %14, 0x4076D3E00D1B7176
store double %15, double* %2
%16 = call i32 @adj360(double* %2)
%17 = load double, double* %2
%18 = fadd double %17, 0x407179C82CF52B91
%19 = fadd double %18, 0xC071AAE2EE41919B
store double %19, double* %3
%20 = call i32 @adj360(double* %3)
%21 = load double, double* %3
%22 = call i32 @dtor(double %21)
%23 = call double @sin(i32 %22)
%24 = fmul double %23, 0x3FFEA5AABE8A585E
%25 = load double, double* %2
%26 = fadd double %25, %24
%27 = fadd double %26, 0x407179C82CF52B91
store double %27, double* %4
%28 = call i32 @adj360(double* %4)
%29 = call double @llvm.fmuladd.f64(double %0, double 0x402A5A50A7B8404E, double 0x4032407CFA26A22B)
store double %29, double* %5
%30 = call i32 @adj360(double* %5)
%31 = load double, double* %5
%32 = call double @llvm.fmuladd.f64(double %0, double 0xBFBC84FAA623EB98, double %31)
%33 = fadd double %32, 0xC0681D5CDB37C99B
store double %33, double* %6
%34 = call i32 @adj360(double* %6)
%35 = call double @llvm.fmuladd.f64(double %0, double -5.295390e-02, double 0x404B9A345CFEDE98)
store double %35, double* %7
%36 = call i32 @adj360(double* %7)
%37 = load double, double* %5
%38 = load double, double* %4
%39 = fsub double %37, %38
%40 = load double, double* %6
%41 = fneg double %40
%42 = call double @llvm.fmuladd.f64(double %39, double 2.000000e+00, double %41)
%43 = call i32 @dtor(double %42)
%44 = call double @sin(i32 %43)
%45 = fmul double %44, 1.273900e+00
%46 = load double, double* %3
%47 = call i32 @dtor(double %46)
%48 = call double @sin(i32 %47)
%49 = fmul double %48, 1.858000e-01
%50 = load double, double* %3
%51 = call i32 @dtor(double %50)
%52 = call double @sin(i32 %51)
%53 = fmul double %52, 3.700000e-01
%54 = load double, double* %6
%55 = fadd double %45, %54
%56 = fsub double %55, %49
%57 = fsub double %56, %53
%58 = call i32 @dtor(double %57)
%59 = call double @sin(i32 %58)
%60 = fmul double %59, 6.288600e+00
%61 = fmul double %57, 2.000000e+00
%62 = call i32 @dtor(double %61)
%63 = call double @sin(i32 %62)
%64 = fmul double %63, 2.140000e-01
%65 = load double, double* %5
%66 = fadd double %45, %65
%67 = fadd double %60, %66
%68 = fsub double %67, %49
%69 = fadd double %64, %68
%70 = load double, double* %4
%71 = fsub double %69, %70
%72 = fmul double %71, 2.000000e+00
%73 = call i32 @dtor(double %72)
%74 = call double @sin(i32 %73)
%75 = fmul double %74, 6.583000e-01
%76 = fadd double %69, %75
%77 = load double, double* %4
%78 = fsub double %76, %77
%79 = call i32 @dtor(double %78)
%80 = call i32 @cos(i32 %79)
%81 = sub nsw i32 1, %80
%82 = mul nsw i32 %81, 50
%83 = sitofp i32 %82 to double
ret double %83
}