double swi_armc_to_mc(double armc, double eps) {
  double tant, mc;
  if (fabs(armc - 90) > 1E-10 && fabs(armc - 270) > 1E-10) {
    tant = tan((armc) * (3.14159265358979323846 / 180.0));
    mc = (atan(tant / cos((eps) * (3.14159265358979323846 / 180.0))) *
          (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):
<swi_armc_to_mc>:
push   %rbp
mov    %rsp,%rbp
sub    $0x30,%rsp
movsd  %xmm0,-0x8(%rbp)
movsd  %xmm1,-0x10(%rbp)
movsd  -0x8(%rbp),%xmm0
movsd  0xea9(%rip),%xmm1
subsd  %xmm1,%xmm0
movaps 0xec6(%rip),%xmm1
pand   %xmm1,%xmm0
movsd  0xe8a(%rip),%xmm1
ucomisd %xmm1,%xmm0
jbe    124f <swi_armc_to_mc+0x10f>
movsd  -0x8(%rbp),%xmm0
movsd  0xe83(%rip),%xmm1
subsd  %xmm1,%xmm0
movaps 0xe98(%rip),%xmm1
pand   %xmm1,%xmm0
movsd  0xe5c(%rip),%xmm1
ucomisd %xmm1,%xmm0
jbe    124f <swi_armc_to_mc+0x10f>
movsd  0xe6a(%rip),%xmm0
mulsd  -0x8(%rbp),%xmm0
call   1050 <tan@plt>
movsd  %xmm0,-0x18(%rbp)
movsd  -0x18(%rbp),%xmm0
movsd  %xmm0,-0x28(%rbp)
movsd  0xe49(%rip),%xmm0
mulsd  -0x10(%rbp),%xmm0
call   1060 <cos@plt>
movaps %xmm0,%xmm1
movsd  -0x28(%rbp),%xmm0
divsd  %xmm1,%xmm0
call   1040 <atan@plt>
movsd  0xe1e(%rip),%xmm1
mulsd  %xmm1,%xmm0
movsd  %xmm0,-0x20(%rbp)
movsd  -0x8(%rbp),%xmm0
movsd  0xdf8(%rip),%xmm1
ucomisd %xmm1,%xmm0
jbe    124a <swi_armc_to_mc+0x10a>
movsd  0xdee(%rip),%xmm0
ucomisd -0x8(%rbp),%xmm0
jb     124a <swi_armc_to_mc+0x10a>
movsd  0xdf3(%rip),%xmm0
addsd  -0x20(%rbp),%xmm0
mov    $0x1,%al
call   1030 <swe_degnorm@plt>
cvtsi2sd %eax,%xmm0
movsd  %xmm0,-0x20(%rbp)
jmp    12a1 <swi_armc_to_mc+0x161>
movsd  -0x8(%rbp),%xmm1
movsd  0xdac(%rip),%xmm0
subsd  %xmm0,%xmm1
movaps 0xdc9(%rip),%xmm0
pand   %xmm0,%xmm1
movsd  0xd8d(%rip),%xmm0
ucomisd %xmm1,%xmm0
jb     128f <swi_armc_to_mc+0x14f>
movsd  0xd83(%rip),%xmm0
movsd  %xmm0,-0x20(%rbp)
jmp    129c <swi_armc_to_mc+0x15c>
movsd  0xd79(%rip),%xmm0
movsd  %xmm0,-0x20(%rbp)
jmp    12a1 <swi_armc_to_mc+0x161>
movsd  -0x20(%rbp),%xmm0
add    $0x30,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<swi_armc_to_mc>:
sub    $0x18,%rsp
movapd %xmm0,%xmm2
movsd  0xeb0(%rip),%xmm0
addsd  %xmm2,%xmm0
andpd  0xee4(%rip),%xmm0
ucomisd 0xea4(%rip),%xmm0
jbe    1214 <swi_armc_to_mc+0xd4>
movsd  0xe9e(%rip),%xmm3
addsd  %xmm2,%xmm3
andpd  0xec2(%rip),%xmm3
ucomisd 0xe82(%rip),%xmm3
jbe    1214 <swi_armc_to_mc+0xd4>
movapd %xmm2,%xmm0
mulsd  0xe80(%rip),%xmm0
movsd  %xmm2,0x10(%rsp)
movsd  %xmm1,(%rsp)
call   1050 <tan@plt>
movsd  %xmm0,0x8(%rsp)
movsd  (%rsp),%xmm0
mulsd  0xe5d(%rip),%xmm0
call   1060 <cos@plt>
movsd  0x8(%rsp),%xmm1
divsd  %xmm0,%xmm1
movapd %xmm1,%xmm0
call   1040 <atan@plt>
movsd  0x10(%rsp),%xmm2
mulsd  0xe3f(%rip),%xmm0
ucomisd 0xe3f(%rip),%xmm2
jbe    1231 <swi_armc_to_mc+0xf1>
movsd  0xe3d(%rip),%xmm1
ucomisd %xmm2,%xmm1
jb     1231 <swi_armc_to_mc+0xf1>
addsd  0xe37(%rip),%xmm0
mov    $0x1,%al
call   1030 <swe_degnorm@plt>
xorps  %xmm0,%xmm0
cvtsi2sd %eax,%xmm0
add    $0x18,%rsp
ret
movsd  0xdec(%rip),%xmm1
xor    %eax,%eax
ucomisd %xmm0,%xmm1
setb   %al
lea    0xe24(%rip),%rcx
movsd  (%rcx,%rax,8),%xmm0
add    $0x18,%rsp
ret

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

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