#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 swe_deltat(double);
double swe_sidtime0(double, double, double);
double swi_epsiln(double);
int /*<<< orphan*/ swi_nutation(double, double *);
double swe_sidtime(double tjd_ut) {
  int i;
  double eps, nutlo[2], tsid;
  double tjde = tjd_ut + swe_deltat(tjd_ut);
  eps = swi_epsiln(tjde) * 57.2957795130823;
  swi_nutation(tjde, nutlo);
  for (i = 0; i < 2; i++)
    nutlo[i] *= 57.2957795130823;
  tsid = swe_sidtime0(tjd_ut, eps + nutlo[1], nutlo[0]);
  return tsid;
}


x86 assembly (clang, -O0):
<swe_sidtime>:
push   %rbp
mov    %rsp,%rbp
sub    $0x50,%rsp
movsd  %xmm0,-0x8(%rbp)
movsd  -0x8(%rbp),%xmm0
movsd  %xmm0,-0x48(%rbp)
movsd  -0x8(%rbp),%xmm0
call   1060 <swe_deltat@plt>
movaps %xmm0,%xmm1
movsd  -0x48(%rbp),%xmm0
addsd  %xmm1,%xmm0
movsd  %xmm0,-0x40(%rbp)
movsd  -0x40(%rbp),%xmm0
call   1030 <swi_epsiln@plt>
movsd  0xe7c(%rip),%xmm1
mulsd  %xmm1,%xmm0
movsd  %xmm0,-0x18(%rbp)
movsd  -0x40(%rbp),%xmm0
lea    -0x30(%rbp),%rdi
call   1040 <swi_nutation@plt>
movl   $0x0,-0xc(%rbp)
cmpl   $0x2,-0xc(%rbp)
jge    11d2 <swe_sidtime+0x92>
movslq -0xc(%rbp),%rax
movsd  0xe48(%rip),%xmm0
mulsd  -0x30(%rbp,%rax,8),%xmm0
movsd  %xmm0,-0x30(%rbp,%rax,8)
mov    -0xc(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0xc(%rbp)
jmp    11a2 <swe_sidtime+0x62>
movsd  -0x8(%rbp),%xmm0
movsd  -0x18(%rbp),%xmm1
addsd  -0x28(%rbp),%xmm1
movsd  -0x30(%rbp),%xmm2
call   1050 <swe_sidtime0@plt>
movsd  %xmm0,-0x38(%rbp)
movsd  -0x38(%rbp),%xmm0
add    $0x50,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<swe_sidtime>:
sub    $0x38,%rsp
movsd  %xmm0,0x8(%rsp)
call   1060 <swe_deltat@plt>
addsd  0x8(%rsp),%xmm0
movsd  %xmm0,0x10(%rsp)
call   1030 <swi_epsiln@plt>
movsd  %xmm0,0x18(%rsp)
lea    0x20(%rsp),%rdi
movsd  0x10(%rsp),%xmm0
call   1040 <swi_nutation@plt>
movapd 0x20(%rsp),%xmm2
mulpd  0xe7c(%rip),%xmm2
movapd %xmm2,0x20(%rsp)
movsd  0x18(%rsp),%xmm0
mulsd  0xe78(%rip),%xmm0
movapd %xmm2,%xmm1
unpckhpd %xmm2,%xmm1
addsd  %xmm0,%xmm1
movsd  0x8(%rsp),%xmm0
call   1050 <swe_sidtime0@plt>
add    $0x38,%rsp
ret

LLVM IR (-O0):
define double @swe_sidtime(double %0) {
%2 = alloca double
%3 = alloca i32
%4 = alloca double
%5 = alloca [2 x double]
%6 = alloca double
%7 = alloca double
store double %0, double* %2
%8 = load double, double* %2
%9 = load double, double* %2
%10 = call double @swe_deltat(double %9)
%11 = fadd double %8, %10
store double %11, double* %7
%12 = load double, double* %7
%13 = call double @swi_epsiln(double %12)
%14 = fmul double %13, 0x404CA5DC1A63C1F5
store double %14, double* %4
%15 = load double, double* %7
%16 = getelementptr inbounds [2 x double], [2 x double]* %5, i64 0, i64 0
%17 = call i32 @swi_nutation(double %15, double* %16)
store i32 0, i32* %3
br label %18
18: ; preds = %27, %1
%19 = load i32, i32* %3
%20 = icmp slt i32 %19, 2
br i1 %20, label %21, label %30
21: ; preds = %18
%22 = load i32, i32* %3
%23 = sext i32 %22 to i64
%24 = getelementptr inbounds [2 x double], [2 x double]* %5, i64 0, i64 %23
%25 = load double, double* %24
%26 = fmul double %25, 0x404CA5DC1A63C1F5
store double %26, double* %24
br label %27
27: ; preds = %21
%28 = load i32, i32* %3
%29 = add nsw i32 %28, 1
store i32 %29, i32* %3
br label %18
30: ; preds = %18
%31 = load double, double* %2
%32 = load double, double* %4
%33 = getelementptr inbounds [2 x double], [2 x double]* %5, i64 0, i64 1
%34 = load double, double* %33
%35 = fadd double %32, %34
%36 = getelementptr inbounds [2 x double], [2 x double]* %5, i64 0, i64 0
%37 = load double, double* %36
%38 = call double @swe_sidtime0(double %31, double %35, double %37)
store double %38, double* %6
%39 = load double, double* %6
ret double %39
}

LLVM IR (-O2):
define double @swe_sidtime(double %0) {
%2 = alloca <2 x double>
%3 = bitcast <2 x double>* %2 to i8*
%4 = tail call double @swe_deltat(double %0)
%5 = fadd double %4, %0
%6 = tail call double @swi_epsiln(double %5)
%7 = getelementptr inbounds <2 x double>, <2 x double>* %2, i64 0, i64 0
%8 = call i32 @swi_nutation(double %5, double* %7)
%9 = load <2 x double>, <2 x double>* %2
%10 = fmul <2 x double> %9, <double 0x404CA5DC1A63C1F5, double 0x404CA5DC1A63C1F5>
store <2 x double> %10, <2 x double>* %2
%11 = fmul double %6, 0x404CA5DC1A63C1F5
%12 = extractelement <2 x double> %10, i64 1
%13 = fadd double %11, %12
%14 = extractelement <2 x double> %10, i64 0
%15 = call double @swe_sidtime0(double %0, double %13, double %14)
ret double %15
}