#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 acos(double);
double arccot(double const);
double cos(double);
double sin(double);
double tan(double);
double to_degrees(double);
double to_radians(double const);
double A(const double t, 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 = tan(to_radians((latitude - D)));
  double p5 = arccot(t + p4);
  double p6 = sin(p5);
  double p7 = acos((p6 - p3) / p2);
  double r = p1 * to_degrees(p7);
  return r;
}


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

x86 assembly (clang, -O2):
<A>:
sub    $0x28,%rsp
movsd  %xmm2,0x10(%rsp)
movsd  %xmm1,0x18(%rsp)
movsd  %xmm0,0x20(%rsp)
movaps %xmm1,%xmm0
call   1030 <to_radians@plt>
call   1090 <cos@plt>
movsd  %xmm0,0x8(%rsp)
movsd  0x10(%rsp),%xmm0
call   1030 <to_radians@plt>
call   1090 <cos@plt>
mulsd  0x8(%rsp),%xmm0
movsd  %xmm0,0x8(%rsp)
movsd  0x18(%rsp),%xmm0
call   1030 <to_radians@plt>
call   1070 <sin@plt>
movsd  %xmm0,(%rsp)
movsd  0x10(%rsp),%xmm0
call   1030 <to_radians@plt>
call   1070 <sin@plt>
mulsd  (%rsp),%xmm0
movsd  %xmm0,(%rsp)
movsd  0x18(%rsp),%xmm0
subsd  0x10(%rsp),%xmm0
call   1030 <to_radians@plt>
call   1080 <tan@plt>
addsd  0x20(%rsp),%xmm0
call   1040 <arccot@plt>
call   1070 <sin@plt>
subsd  (%rsp),%xmm0
divsd  0x8(%rsp),%xmm0
call   1050 <acos@plt>
call   1060 <to_degrees@plt>
mulsd  0xdd9(%rip),%xmm0
add    $0x28,%rsp
ret

LLVM IR (-O0):
define double @A(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
%13 = alloca double
%14 = alloca double
store double %0, double* %4
store double %1, double* %5
store double %2, double* %6
store double 0x3FB1111111111111, double* %7
%15 = load double, double* %5
%16 = call double @to_radians(double %15)
%17 = call double @cos(double %16)
%18 = load double, double* %6
%19 = call double @to_radians(double %18)
%20 = call double @cos(double %19)
%21 = fmul double %17, %20
store double %21, double* %8
%22 = load double, double* %5
%23 = call double @to_radians(double %22)
%24 = call double @sin(double %23)
%25 = load double, double* %6
%26 = call double @to_radians(double %25)
%27 = call double @sin(double %26)
%28 = fmul double %24, %27
store double %28, double* %9
%29 = load double, double* %5
%30 = load double, double* %6
%31 = fsub double %29, %30
%32 = call double @to_radians(double %31)
%33 = call double @tan(double %32)
store double %33, double* %10
%34 = load double, double* %4
%35 = load double, double* %10
%36 = fadd double %34, %35
%37 = call double @arccot(double %36)
store double %37, double* %11
%38 = load double, double* %11
%39 = call double @sin(double %38)
store double %39, double* %12
%40 = load double, double* %12
%41 = load double, double* %9
%42 = fsub double %40, %41
%43 = load double, double* %8
%44 = fdiv double %42, %43
%45 = call double @acos(double %44)
store double %45, double* %13
%46 = load double, double* %7
%47 = load double, double* %13
%48 = call double @to_degrees(double %47)
%49 = fmul double %46, %48
store double %49, double* %14
%50 = load double, double* %14
ret double %50
}

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