double getFajIsh(double lat, double dec, double Ang) {
  double rlat = ((lat) * (3.1415926535898 / 180.0));
  double part1 =
      sin(((-Ang) * (3.1415926535898 / 180.0))) - (sin(rlat) * sin(dec));
  double part2 = cos(rlat) * cos(dec);
  double part3 = part1 / part2;
  if (part3 < -1 || part3 > 1)
    return 99;
  return 1 / 15.0 * ((acos(part3)) / (3.1415926535898 / 180.0));
}


x86 assembly (clang, -O0):
<getFajIsh>:
push   %rbp
mov    %rsp,%rbp
sub    $0x60,%rsp
movsd  %xmm0,-0x10(%rbp)
movsd  %xmm1,-0x18(%rbp)
movsd  %xmm2,-0x20(%rbp)
movsd  0xeb9(%rip),%xmm0
mulsd  -0x10(%rbp),%xmm0
movsd  %xmm0,-0x28(%rbp)
movsd  -0x20(%rbp),%xmm0
movq   %xmm0,%rax
movabs $0x8000000000000000,%rcx
xor    %rcx,%rax
movq   %rax,%xmm0
movsd  0xe8b(%rip),%xmm1
mulsd  %xmm1,%xmm0
call   1040 <sin@plt>
movsd  %xmm0,-0x58(%rbp)
movsd  -0x28(%rbp),%xmm0
call   1040 <sin@plt>
movsd  %xmm0,-0x50(%rbp)
movsd  -0x18(%rbp),%xmm0
call   1040 <sin@plt>
movsd  -0x58(%rbp),%xmm1
movaps %xmm0,%xmm2
movsd  -0x50(%rbp),%xmm0
movq   %xmm0,%rax
movabs $0x8000000000000000,%rcx
xor    %rcx,%rax
movq   %rax,%xmm0
mulsd  %xmm2,%xmm0
addsd  %xmm1,%xmm0
movsd  %xmm0,-0x30(%rbp)
movsd  -0x28(%rbp),%xmm0
call   1050 <cos@plt>
movsd  %xmm0,-0x48(%rbp)
movsd  -0x18(%rbp),%xmm0
call   1050 <cos@plt>
movaps %xmm0,%xmm1
movsd  -0x48(%rbp),%xmm0
mulsd  %xmm1,%xmm0
movsd  %xmm0,-0x38(%rbp)
movsd  -0x30(%rbp),%xmm0
divsd  -0x38(%rbp),%xmm0
movsd  %xmm0,-0x40(%rbp)
movsd  0xdea(%rip),%xmm0
ucomisd -0x40(%rbp),%xmm0
ja     1238 <getFajIsh+0x108>
movsd  -0x40(%rbp),%xmm0
movsd  0xde2(%rip),%xmm1
ucomisd %xmm1,%xmm0
jbe    124a <getFajIsh+0x11a>
movsd  0xde0(%rip),%xmm0
movsd  %xmm0,-0x8(%rbp)
jmp    1274 <getFajIsh+0x144>
movsd  -0x40(%rbp),%xmm0
call   1030 <acos@plt>
movaps %xmm0,%xmm1
movsd  0xda9(%rip),%xmm0
divsd  %xmm0,%xmm1
movsd  0xdad(%rip),%xmm0
mulsd  %xmm1,%xmm0
movsd  %xmm0,-0x8(%rbp)
movsd  -0x8(%rbp),%xmm0
add    $0x60,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<getFajIsh>:
sub    $0x28,%rsp
movsd  %xmm1,0x18(%rsp)
mulsd  0xebe(%rip),%xmm0
movsd  %xmm0,0x8(%rsp)
mulsd  0xeb8(%rip),%xmm2
movapd %xmm2,%xmm0
call   1040 <sin@plt>
movsd  %xmm0,0x10(%rsp)
movsd  0x8(%rsp),%xmm0
call   1040 <sin@plt>
movsd  %xmm0,0x20(%rsp)
movsd  0x18(%rsp),%xmm0
call   1040 <sin@plt>
mulsd  0x20(%rsp),%xmm0
movsd  0x10(%rsp),%xmm1
subsd  %xmm0,%xmm1
movsd  %xmm1,0x10(%rsp)
movsd  0x8(%rsp),%xmm0
call   1050 <cos@plt>
movsd  %xmm0,0x8(%rsp)
movsd  0x18(%rsp),%xmm0
call   1050 <cos@plt>
movsd  0x10(%rsp),%xmm1
mulsd  0x8(%rsp),%xmm0
divsd  %xmm0,%xmm1
movsd  0xe4b(%rip),%xmm0
ucomisd %xmm1,%xmm0
movsd  0xe47(%rip),%xmm0
ja     11f6 <getFajIsh+0xc6>
ucomisd 0xe45(%rip),%xmm1
ja     11f6 <getFajIsh+0xc6>
movapd %xmm1,%xmm0
call   1030 <acos@plt>
divsd  0xe12(%rip),%xmm0
mulsd  0xe32(%rip),%xmm0
add    $0x28,%rsp
ret

LLVM IR (-O0):
define double @getFajIsh(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
store double %0, double* %5
store double %1, double* %6
store double %2, double* %7
%12 = load double, double* %5
%13 = fmul double %12, 0x3F91DF46A2529D44
store double %13, double* %8
%14 = load double, double* %7
%15 = fneg double %14
%16 = fmul double %15, 0x3F91DF46A2529D44
%17 = call double @sin(double %16)
%18 = load double, double* %8
%19 = call double @sin(double %18)
%20 = load double, double* %6
%21 = call double @sin(double %20)
%22 = fneg double %19
%23 = call double @llvm.fmuladd.f64(double %22, double %21, double %17)
store double %23, double* %9
%24 = load double, double* %8
%25 = call double @cos(double %24)
%26 = load double, double* %6
%27 = call double @cos(double %26)
%28 = fmul double %25, %27
store double %28, double* %10
%29 = load double, double* %9
%30 = load double, double* %10
%31 = fdiv double %29, %30
store double %31, double* %11
%32 = load double, double* %11
%33 = fcmp olt double %32, -1.000000e+00
br i1 %33, label %37, label %34
34: ; preds = %3
%35 = load double, double* %11
%36 = fcmp ogt double %35, 1.000000e+00
br i1 %36, label %37, label %38
37: ; preds = %34, %3
store double 9.900000e+01, double* %4
br label %43
38: ; preds = %34
%39 = load double, double* %11
%40 = call double @acos(double %39)
%41 = fdiv double %40, 0x3F91DF46A2529D44
%42 = fmul double 0x3FB1111111111111, %41
store double %42, double* %4
br label %43
43: ; preds = %38, %37
%44 = load double, double* %4
ret double %44
}

LLVM IR (-O2):
define double @getFajIsh(double %0, double %1, double %2) {
%4 = fmul double %0, 0x3F91DF46A2529D44
%5 = fmul double %2, 0xBF91DF46A2529D44
%6 = tail call double @sin(double %5)
%7 = tail call double @sin(double %4)
%8 = tail call double @sin(double %1)
%9 = fneg double %7
%10 = tail call double @llvm.fmuladd.f64(double %9, double %8, double %6)
%11 = tail call double @cos(double %4)
%12 = tail call double @cos(double %1)
%13 = fmul double %11, %12
%14 = fdiv double %10, %13
%15 = fcmp olt double %14, -1.000000e+00
%16 = fcmp ogt double %14, 1.000000e+00
%17 = or i1 %15, %16
br i1 %17, label %22, label %18
18: ; preds = %3
%19 = tail call double @acos(double %14)
%20 = fdiv double %19, 0x3F91DF46A2529D44
%21 = fmul double %20, 0x3FB1111111111111
br label %22
22: ; preds = %3, %18
%23 = phi double [ %21, %18 ], [ 9.900000e+01, %3 ]
ret double %23
}