#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*/ acos(double);
double cos(int /*<<< orphan*/);
double sin(int /*<<< orphan*/);
double to_degrees(int /*<<< orphan*/);
int /*<<< orphan*/ to_radians(double const);
double T(const double alpha, const double latitude, const double D) {
  double p1 = 1.0 / 15.0;
  double p2 = cos(to_radians(latitude)) * cos(to_radians(D));
  double p3 = sin(to_radians(latitude)) * sin(to_radians(D));
  double p4 = -1.0 * sin(to_radians(alpha));
  double p5 = to_degrees(acos((p4 - p3) / p2));
  double r = p1 * p5;
  return r;
}


x86 assembly (clang, -O0):
<T>:
push   %rbp
mov    %rsp,%rbp
sub    $0x60,%rsp
movsd  %xmm0,-0x8(%rbp)
movsd  %xmm1,-0x10(%rbp)
movsd  %xmm2,-0x18(%rbp)
movsd  0xe99(%rip),%xmm0
movsd  %xmm0,-0x20(%rbp)
movsd  -0x10(%rbp),%xmm0
call   1030 <to_radians@plt>
mov    %eax,%edi
call   1070 <cos@plt>
movsd  %xmm0,-0x58(%rbp)
movsd  -0x18(%rbp),%xmm0
call   1030 <to_radians@plt>
mov    %eax,%edi
call   1070 <cos@plt>
movaps %xmm0,%xmm1
movsd  -0x58(%rbp),%xmm0
mulsd  %xmm1,%xmm0
movsd  %xmm0,-0x28(%rbp)
movsd  -0x10(%rbp),%xmm0
call   1030 <to_radians@plt>
mov    %eax,%edi
call   1060 <sin@plt>
movsd  %xmm0,-0x50(%rbp)
movsd  -0x18(%rbp),%xmm0
call   1030 <to_radians@plt>
mov    %eax,%edi
call   1060 <sin@plt>
movaps %xmm0,%xmm1
movsd  -0x50(%rbp),%xmm0
mulsd  %xmm1,%xmm0
movsd  %xmm0,-0x30(%rbp)
movsd  -0x8(%rbp),%xmm0
call   1030 <to_radians@plt>
mov    %eax,%edi
call   1060 <sin@plt>
movaps %xmm0,%xmm1
movsd  0xe00(%rip),%xmm0
mulsd  %xmm1,%xmm0
movsd  %xmm0,-0x38(%rbp)
movsd  -0x38(%rbp),%xmm0
subsd  -0x30(%rbp),%xmm0
divsd  -0x28(%rbp),%xmm0
call   1040 <acos@plt>
mov    %eax,%edi
call   1050 <to_degrees@plt>
movsd  %xmm0,-0x40(%rbp)
movsd  -0x20(%rbp),%xmm0
mulsd  -0x40(%rbp),%xmm0
movsd  %xmm0,-0x48(%rbp)
movsd  -0x48(%rbp),%xmm0
add    $0x60,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<T>:
sub    $0x28,%rsp
movsd  %xmm2,0x8(%rsp)
movsd  %xmm1,0x10(%rsp)
movsd  %xmm0,0x20(%rsp)
movaps %xmm1,%xmm0
call   1030 <to_radians@plt>
mov    %eax,%edi
call   1070 <cos@plt>
movsd  %xmm0,0x18(%rsp)
movsd  0x8(%rsp),%xmm0
call   1030 <to_radians@plt>
mov    %eax,%edi
call   1070 <cos@plt>
mulsd  0x18(%rsp),%xmm0
movsd  %xmm0,0x18(%rsp)
movsd  0x10(%rsp),%xmm0
call   1030 <to_radians@plt>
mov    %eax,%edi
call   1060 <sin@plt>
movsd  %xmm0,0x10(%rsp)
movsd  0x8(%rsp),%xmm0
call   1030 <to_radians@plt>
mov    %eax,%edi
call   1060 <sin@plt>
mulsd  0x10(%rsp),%xmm0
movsd  %xmm0,0x8(%rsp)
movsd  0x20(%rsp),%xmm0
call   1030 <to_radians@plt>
mov    %eax,%edi
call   1060 <sin@plt>
xorpd  0xe17(%rip),%xmm0
subsd  0x8(%rsp),%xmm0
divsd  0x18(%rsp),%xmm0
call   1040 <acos@plt>
mov    %eax,%edi
call   1050 <to_degrees@plt>
mulsd  0xe07(%rip),%xmm0
add    $0x28,%rsp
ret

LLVM IR (-O0):
define double @T(double %0, double %1, double %2) {
%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
store double %0, double* %4
store double %1, double* %5
store double %2, double* %6
store double 0x3FB1111111111111, double* %7
%13 = load double, double* %5
%14 = call i32 @to_radians(double %13)
%15 = call double @cos(i32 %14)
%16 = load double, double* %6
%17 = call i32 @to_radians(double %16)
%18 = call double @cos(i32 %17)
%19 = fmul double %15, %18
store double %19, double* %8
%20 = load double, double* %5
%21 = call i32 @to_radians(double %20)
%22 = call double @sin(i32 %21)
%23 = load double, double* %6
%24 = call i32 @to_radians(double %23)
%25 = call double @sin(i32 %24)
%26 = fmul double %22, %25
store double %26, double* %9
%27 = load double, double* %4
%28 = call i32 @to_radians(double %27)
%29 = call double @sin(i32 %28)
%30 = fmul double -1.000000e+00, %29
store double %30, double* %10
%31 = load double, double* %10
%32 = load double, double* %9
%33 = fsub double %31, %32
%34 = load double, double* %8
%35 = fdiv double %33, %34
%36 = call i32 @acos(double %35)
%37 = call double @to_degrees(i32 %36)
store double %37, double* %11
%38 = load double, double* %7
%39 = load double, double* %11
%40 = fmul double %38, %39
store double %40, double* %12
%41 = load double, double* %12
ret double %41
}

LLVM IR (-O2):
define double @T(double %0, double %1, double %2) {
%4 = tail call i32 @to_radians(double %1)
%5 = tail call double @cos(i32 %4)
%6 = tail call i32 @to_radians(double %2)
%7 = tail call double @cos(i32 %6)
%8 = fmul double %5, %7
%9 = tail call i32 @to_radians(double %1)
%10 = tail call double @sin(i32 %9)
%11 = tail call i32 @to_radians(double %2)
%12 = tail call double @sin(i32 %11)
%13 = fmul double %10, %12
%14 = tail call i32 @to_radians(double %0)
%15 = tail call double @sin(i32 %14)
%16 = fneg double %15
%17 = fsub double %16, %13
%18 = fdiv double %17, %8
%19 = tail call i32 @acos(double %18)
%20 = tail call double @to_degrees(i32 %19)
%21 = fmul double %20, 0x3FB1111111111111
ret double %21
}