#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_degnorm(int);
double swe_deltat(double);
int swe_houses_armc(double, double, double, int, double *, double *);
int swe_sidtime0(double, double, double);
double swi_epsiln(double);
int /*<<< orphan*/ swi_nutation(double, double *);
int swe_houses(double tjd_ut, double geolat, double geolon, int hsys,
               double *cusp, double *ascmc) {
  int i, retc = 0;
  double armc, eps, nutlo[2];
  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;
  armc =
      swe_degnorm(swe_sidtime0(tjd_ut, eps + nutlo[1], nutlo[0]) * 15 + geolon);
  retc = swe_houses_armc(armc, geolat, eps + nutlo[1], hsys, cusp, ascmc);
  return retc;
}


x86 assembly (clang, -O0):
<swe_houses>:
push   %rbp
mov    %rsp,%rbp
sub    $0x70,%rsp
movsd  %xmm0,-0x8(%rbp)
movsd  %xmm1,-0x10(%rbp)
movsd  %xmm2,-0x18(%rbp)
mov    %edi,-0x1c(%rbp)
mov    %rsi,-0x28(%rbp)
mov    %rdx,-0x30(%rbp)
movl   $0x0,-0x38(%rbp)
movsd  -0x8(%rbp),%xmm0
movsd  %xmm0,-0x70(%rbp)
movsd  -0x8(%rbp),%xmm0
call   1080 <swe_deltat@plt>
movaps %xmm0,%xmm1
movsd  -0x70(%rbp),%xmm0
addsd  %xmm1,%xmm0
movsd  %xmm0,-0x68(%rbp)
movsd  -0x68(%rbp),%xmm0
call   1030 <swi_epsiln@plt>
movsd  0xe40(%rip),%xmm1
mulsd  %xmm1,%xmm0
movsd  %xmm0,-0x48(%rbp)
movsd  -0x68(%rbp),%xmm0
lea    -0x60(%rbp),%rdi
call   1050 <swi_nutation@plt>
movl   $0x0,-0x34(%rbp)
cmpl   $0x2,-0x34(%rbp)
jge    120e <swe_houses+0xae>
movslq -0x34(%rbp),%rax
movsd  0xe0c(%rip),%xmm0
mulsd  -0x60(%rbp,%rax,8),%xmm0
movsd  %xmm0,-0x60(%rbp,%rax,8)
mov    -0x34(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x34(%rbp)
jmp    11de <swe_houses+0x7e>
movsd  -0x8(%rbp),%xmm0
movsd  -0x48(%rbp),%xmm1
addsd  -0x58(%rbp),%xmm1
movsd  -0x60(%rbp),%xmm2
call   1060 <swe_sidtime0@plt>
imul   $0xf,%eax,%eax
cvtsi2sd %eax,%xmm0
addsd  -0x18(%rbp),%xmm0
cvttsd2si %xmm0,%edi
call   1040 <swe_degnorm@plt>
movsd  %xmm0,-0x40(%rbp)
movsd  -0x40(%rbp),%xmm0
movsd  -0x10(%rbp),%xmm1
movsd  -0x48(%rbp),%xmm2
addsd  -0x58(%rbp),%xmm2
mov    -0x1c(%rbp),%edi
mov    -0x28(%rbp),%rsi
mov    -0x30(%rbp),%rdx
call   1070 <swe_houses_armc@plt>
mov    %eax,-0x38(%rbp)
mov    -0x38(%rbp),%eax
add    $0x70,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<swe_houses>:
push   %rbp
push   %r14
push   %rbx
sub    $0x40,%rsp
mov    %rdx,%r14
mov    %rsi,%rbx
mov    %edi,%ebp
movsd  %xmm2,0x30(%rsp)
movsd  %xmm1,0x38(%rsp)
movsd  %xmm0,0x8(%rsp)
call   1080 <swe_deltat@plt>
addsd  0x8(%rsp),%xmm0
movsd  %xmm0,0x28(%rsp)
call   1030 <swi_epsiln@plt>
movsd  %xmm0,(%rsp)
lea    0x10(%rsp),%rdi
movsd  0x28(%rsp),%xmm0
call   1050 <swi_nutation@plt>
movapd 0x10(%rsp),%xmm2
mulpd  0xe45(%rip),%xmm2
movapd %xmm2,0x10(%rsp)
movsd  (%rsp),%xmm0
mulsd  0xe42(%rip),%xmm0
movsd  %xmm0,(%rsp)
movapd %xmm2,%xmm1
unpckhpd %xmm2,%xmm1
addsd  %xmm0,%xmm1
movsd  0x8(%rsp),%xmm0
call   1060 <swe_sidtime0@plt>
lea    (%rax,%rax,4),%eax
lea    (%rax,%rax,2),%eax
xorps  %xmm0,%xmm0
cvtsi2sd %eax,%xmm0
addsd  0x30(%rsp),%xmm0
cvttsd2si %xmm0,%edi
call   1040 <swe_degnorm@plt>
movsd  (%rsp),%xmm2
addsd  0x18(%rsp),%xmm2
movsd  0x38(%rsp),%xmm1
mov    %ebp,%edi
mov    %rbx,%rsi
mov    %r14,%rdx
call   1070 <swe_houses_armc@plt>
add    $0x40,%rsp
pop    %rbx
pop    %r14
pop    %rbp
ret

LLVM IR (-O0):
define i32 @swe_houses(double %0, double %1, double %2, i32 %3, double* %4, double* %5) {
%7 = alloca double
%8 = alloca double
%9 = alloca double
%10 = alloca i32
%11 = alloca double*
%12 = alloca double*
%13 = alloca i32
%14 = alloca i32
%15 = alloca double
%16 = alloca double
%17 = alloca [2 x double]
%18 = alloca double
store double %0, double* %7
store double %1, double* %8
store double %2, double* %9
store i32 %3, i32* %10
store double* %4, double** %11
store double* %5, double** %12
store i32 0, i32* %14
%19 = load double, double* %7
%20 = load double, double* %7
%21 = call double @swe_deltat(double %20)
%22 = fadd double %19, %21
store double %22, double* %18
%23 = load double, double* %18
%24 = call double @swi_epsiln(double %23)
%25 = fmul double %24, 0x404CA5DC1A63C1F5
store double %25, double* %16
%26 = load double, double* %18
%27 = getelementptr inbounds [2 x double], [2 x double]* %17, i64 0, i64 0
%28 = call i32 @swi_nutation(double %26, double* %27)
store i32 0, i32* %13
br label %29
29: ; preds = %38, %6
%30 = load i32, i32* %13
%31 = icmp slt i32 %30, 2
br i1 %31, label %32, label %41
32: ; preds = %29
%33 = load i32, i32* %13
%34 = sext i32 %33 to i64
%35 = getelementptr inbounds [2 x double], [2 x double]* %17, i64 0, i64 %34
%36 = load double, double* %35
%37 = fmul double %36, 0x404CA5DC1A63C1F5
store double %37, double* %35
br label %38
38: ; preds = %32
%39 = load i32, i32* %13
%40 = add nsw i32 %39, 1
store i32 %40, i32* %13
br label %29
41: ; preds = %29
%42 = load double, double* %7
%43 = load double, double* %16
%44 = getelementptr inbounds [2 x double], [2 x double]* %17, i64 0, i64 1
%45 = load double, double* %44
%46 = fadd double %43, %45
%47 = getelementptr inbounds [2 x double], [2 x double]* %17, i64 0, i64 0
%48 = load double, double* %47
%49 = call i32 @swe_sidtime0(double %42, double %46, double %48)
%50 = mul nsw i32 %49, 15
%51 = sitofp i32 %50 to double
%52 = load double, double* %9
%53 = fadd double %51, %52
%54 = fptosi double %53 to i32
%55 = call double @swe_degnorm(i32 %54)
store double %55, double* %15
%56 = load double, double* %15
%57 = load double, double* %8
%58 = load double, double* %16
%59 = getelementptr inbounds [2 x double], [2 x double]* %17, i64 0, i64 1
%60 = load double, double* %59
%61 = fadd double %58, %60
%62 = load i32, i32* %10
%63 = load double*, double** %11
%64 = load double*, double** %12
%65 = call i32 @swe_houses_armc(double %56, double %57, double %61, i32 %62, double* %63, double* %64)
store i32 %65, i32* %14
%66 = load i32, i32* %14
ret i32 %66
}

LLVM IR (-O2):
define i32 @swe_houses(double %0, double %1, double %2, i32 %3, double* %4, double* %5) {
%7 = alloca <2 x double>
%8 = bitcast <2 x double>* %7 to i8*
%9 = tail call double @swe_deltat(double %0)
%10 = fadd double %9, %0
%11 = tail call double @swi_epsiln(double %10)
%12 = getelementptr inbounds <2 x double>, <2 x double>* %7, i64 0, i64 0
%13 = call i32 @swi_nutation(double %10, double* %12)
%14 = getelementptr inbounds <2 x double>, <2 x double>* %7, i64 0, i64 1
%15 = load <2 x double>, <2 x double>* %7
%16 = fmul <2 x double> %15, <double 0x404CA5DC1A63C1F5, double 0x404CA5DC1A63C1F5>
store <2 x double> %16, <2 x double>* %7
%17 = fmul double %11, 0x404CA5DC1A63C1F5
%18 = extractelement <2 x double> %16, i64 1
%19 = fadd double %17, %18
%20 = extractelement <2 x double> %16, i64 0
%21 = call i32 @swe_sidtime0(double %0, double %19, double %20)
%22 = mul nsw i32 %21, 15
%23 = sitofp i32 %22 to double
%24 = fadd double %23, %2
%25 = fptosi double %24 to i32
%26 = call double @swe_degnorm(i32 %25)
%27 = load double, double* %14
%28 = fadd double %17, %27
%29 = call i32 @swe_houses_armc(double %26, double %1, double %28, i32 %3, double* %4, double* %5)
ret i32 %29
}