double armc_to_mc(double armc, double eps) {
  double cose = cos((eps) * (3.14159265358979323846 / 180.0));
  double mc, tant;
  if (fabs(armc - 90) > 1E-10 && fabs(armc - 270) > 1E-10) {
    tant = tan((armc) * (3.14159265358979323846 / 180.0));
    mc = swe_degnorm((atan(tant / cose) * (180.0 / 3.14159265358979323846)));
    if (armc > 90 && armc <= 270)
      mc = swe_degnorm(mc + 180);
  } else {
    if (fabs(armc - 90) <= 1E-10)
      mc = 90;
    else
      mc = 270;
  }
  return mc;
}


x86 assembly (clang, -O0):
<armc_to_mc>:
push   %rbp
mov    %rsp,%rbp
sub    $0x30,%rsp
movsd  %xmm0,-0x8(%rbp)
movsd  %xmm1,-0x10(%rbp)
movsd  0xeb6(%rip),%xmm0
mulsd  -0x10(%rbp),%xmm0
call   1060 <cos@plt>
movsd  %xmm0,-0x18(%rbp)
movsd  -0x8(%rbp),%xmm0
movsd  0xe92(%rip),%xmm1
subsd  %xmm1,%xmm0
movaps 0xeaf(%rip),%xmm1
pand   %xmm1,%xmm0
movsd  0xe73(%rip),%xmm1
ucomisd %xmm1,%xmm0
jbe    1253 <armc_to_mc+0x113>
movsd  -0x8(%rbp),%xmm0
movsd  0xe74(%rip),%xmm1
subsd  %xmm1,%xmm0
movaps 0xe81(%rip),%xmm1
pand   %xmm1,%xmm0
movsd  0xe45(%rip),%xmm1
ucomisd %xmm1,%xmm0
jbe    1253 <armc_to_mc+0x113>
movsd  0xe43(%rip),%xmm0
mulsd  -0x8(%rbp),%xmm0
call   1050 <tan@plt>
movsd  %xmm0,-0x28(%rbp)
movsd  -0x28(%rbp),%xmm0
divsd  -0x18(%rbp),%xmm0
call   1040 <atan@plt>
movsd  0xe2d(%rip),%xmm1
mulsd  %xmm1,%xmm0
mov    $0x1,%al
call   1030 <swe_degnorm@plt>
cvtsi2sd %eax,%xmm0
movsd  %xmm0,-0x20(%rbp)
movsd  -0x8(%rbp),%xmm0
movsd  0xdf4(%rip),%xmm1
ucomisd %xmm1,%xmm0
jbe    124e <armc_to_mc+0x10e>
movsd  0xdf2(%rip),%xmm0
ucomisd -0x8(%rbp),%xmm0
jb     124e <armc_to_mc+0x10e>
movsd  0xdef(%rip),%xmm0
addsd  -0x20(%rbp),%xmm0
mov    $0x1,%al
call   1030 <swe_degnorm@plt>
cvtsi2sd %eax,%xmm0
movsd  %xmm0,-0x20(%rbp)
jmp    12a5 <armc_to_mc+0x165>
movsd  -0x8(%rbp),%xmm1
movsd  0xda8(%rip),%xmm0
subsd  %xmm0,%xmm1
movaps 0xdc5(%rip),%xmm0
pand   %xmm0,%xmm1
movsd  0xd89(%rip),%xmm0
ucomisd %xmm1,%xmm0
jb     1293 <armc_to_mc+0x153>
movsd  0xd7f(%rip),%xmm0
movsd  %xmm0,-0x20(%rbp)
jmp    12a0 <armc_to_mc+0x160>
movsd  0xd7d(%rip),%xmm0
movsd  %xmm0,-0x20(%rbp)
jmp    12a5 <armc_to_mc+0x165>
movsd  -0x20(%rbp),%xmm0
add    $0x30,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<armc_to_mc>:
sub    $0x18,%rsp
movsd  %xmm0,0x8(%rsp)
mulsd  0xeae(%rip),%xmm1
movapd %xmm1,%xmm0
call   1060 <cos@plt>
movsd  0x8(%rsp),%xmm2
movsd  0xe9f(%rip),%xmm1
addsd  %xmm2,%xmm1
andpd  0xecb(%rip),%xmm1
ucomisd 0xe93(%rip),%xmm1
jbe    1216 <armc_to_mc+0xd6>
movapd %xmm0,%xmm3
movsd  0xe89(%rip),%xmm0
addsd  %xmm2,%xmm0
andpd  0xea5(%rip),%xmm0
ucomisd 0xe6d(%rip),%xmm0
jbe    1216 <armc_to_mc+0xd6>
movsd  0xe53(%rip),%xmm0
mulsd  %xmm2,%xmm0
movsd  %xmm3,0x10(%rsp)
call   1050 <tan@plt>
divsd  0x10(%rsp),%xmm0
call   1040 <atan@plt>
mulsd  0xe51(%rip),%xmm0
mov    $0x1,%al
call   1030 <swe_degnorm@plt>
movsd  0x8(%rsp),%xmm2
xorps  %xmm0,%xmm0
cvtsi2sd %eax,%xmm0
ucomisd 0xe3d(%rip),%xmm2
jbe    1233 <armc_to_mc+0xf3>
movsd  0xe3b(%rip),%xmm1
ucomisd %xmm2,%xmm1
jb     1233 <armc_to_mc+0xf3>
addsd  0xe35(%rip),%xmm0
mov    $0x1,%al
call   1030 <swe_degnorm@plt>
xorps  %xmm0,%xmm0
cvtsi2sd %eax,%xmm0
add    $0x18,%rsp
ret
movsd  0xdf2(%rip),%xmm0
xor    %eax,%eax
ucomisd %xmm1,%xmm0
setb   %al
lea    0xe22(%rip),%rcx
movsd  (%rcx,%rax,8),%xmm0
add    $0x18,%rsp
ret

LLVM IR (-O0):
define double @armc_to_mc(double %0, double %1) {
%3 = alloca double
%4 = alloca double
%5 = alloca double
%6 = alloca double
%7 = alloca double
store double %0, double* %3
store double %1, double* %4
%8 = load double, double* %4
%9 = fmul double %8, 0x3F91DF46A2529D39
%10 = call double @cos(double %9)
store double %10, double* %5
%11 = load double, double* %3
%12 = fsub double %11, 9.000000e+01
%13 = call double @llvm.fabs.f64(double %12)
%14 = fcmp ogt double %13, 1.000000e-10
br i1 %14, label %15, label %42
15: ; preds = %2
%16 = load double, double* %3
%17 = fsub double %16, 2.700000e+02
%18 = call double @llvm.fabs.f64(double %17)
%19 = fcmp ogt double %18, 1.000000e-10
br i1 %19, label %20, label %42
20: ; preds = %15
%21 = load double, double* %3
%22 = fmul double %21, 0x3F91DF46A2529D39
%23 = call double @tan(double %22)
store double %23, double* %7
%24 = load double, double* %7
%25 = load double, double* %5
%26 = fdiv double %24, %25
%27 = call double @atan(double %26)
%28 = fmul double %27, 0x404CA5DC1A63C1F8
%29 = call i32 (double, ...) bitcast (i32 (...)* @swe_degnorm to i32 (double, ...)*)(double %28)
%30 = sitofp i32 %29 to double
store double %30, double* %6
%31 = load double, double* %3
%32 = fcmp ogt double %31, 9.000000e+01
br i1 %32, label %33, label %41
33: ; preds = %20
%34 = load double, double* %3
%35 = fcmp ole double %34, 2.700000e+02
br i1 %35, label %36, label %41
36: ; preds = %33
%37 = load double, double* %6
%38 = fadd double %37, 1.800000e+02
%39 = call i32 (double, ...) bitcast (i32 (...)* @swe_degnorm to i32 (double, ...)*)(double %38)
%40 = sitofp i32 %39 to double
store double %40, double* %6
br label %41
41: ; preds = %36, %33, %20
br label %50
42: ; preds = %15, %2
%43 = load double, double* %3
%44 = fsub double %43, 9.000000e+01
%45 = call double @llvm.fabs.f64(double %44)
%46 = fcmp ole double %45, 1.000000e-10
br i1 %46, label %47, label %48
47: ; preds = %42
store double 9.000000e+01, double* %6
br label %49
48: ; preds = %42
store double 2.700000e+02, double* %6
br label %49
49: ; preds = %48, %47
br label %50
50: ; preds = %49, %41
%51 = load double, double* %6
ret double %51
}

LLVM IR (-O2):
define double @armc_to_mc(double %0, double %1) {
%3 = fmul double %1, 0x3F91DF46A2529D39
%4 = tail call double @cos(double %3)
%5 = fadd double %0, -9.000000e+01
%6 = tail call double @llvm.fabs.f64(double %5)
%7 = fcmp ogt double %6, 1.000000e-10
br i1 %7, label %8, label %27
8: ; preds = %2
%9 = fadd double %0, -2.700000e+02
%10 = tail call double @llvm.fabs.f64(double %9)
%11 = fcmp ogt double %10, 1.000000e-10
br i1 %11, label %12, label %27
12: ; preds = %8
%13 = fmul double %0, 0x3F91DF46A2529D39
%14 = tail call double @tan(double %13)
%15 = fdiv double %14, %4
%16 = tail call double @atan(double %15)
%17 = fmul double %16, 0x404CA5DC1A63C1F8
%18 = tail call i32 (double, ...) bitcast (i32 (...)* @swe_degnorm to i32 (double, ...)*)(double %17)
%19 = sitofp i32 %18 to double
%20 = fcmp ogt double %0, 9.000000e+01
%21 = fcmp ole double %0, 2.700000e+02
%22 = and i1 %20, %21
br i1 %22, label %23, label %30
23: ; preds = %12
%24 = fadd double %19, 1.800000e+02
%25 = tail call i32 (double, ...) bitcast (i32 (...)* @swe_degnorm to i32 (double, ...)*)(double %24)
%26 = sitofp i32 %25 to double
br label %30
27: ; preds = %8, %2
%28 = fcmp ugt double %6, 1.000000e-10
%29 = select i1 %28, double 2.700000e+02, double 9.000000e+01
br label %30
30: ; preds = %27, %12, %23
%31 = phi double [ %26, %23 ], [ %19, %12 ], [ %29, %27 ]
ret double %31
}