double Asc2(double x, double f, double sine, double cose) {
  double ass, sinx;
  ass = -tan((f) * (3.14159265358979323846 / 180.0)) * sine +
        cose * cos((x) * (3.14159265358979323846 / 180.0));
  if (fabs(ass) < 1E-10)
    ass = 0;
  sinx = sin((x) * (3.14159265358979323846 / 180.0));
  if (fabs(sinx) < 1E-10)
    sinx = 0;
  if (sinx == 0) {
    if (ass < 0)
      ass = -1E-10;
    else
      ass = 1E-10;
  } else if (ass == 0) {
    if (sinx < 0)
      ass = -90;
    else
      ass = 90;
  } else {
    ass = (atan(sinx / ass) * (180.0 / 3.14159265358979323846));
  }
  if (ass < 0)
    ass = 180 + ass;
  return (ass);
}


x86 assembly (clang, -O0):
<Asc2>:
push   %rbp
mov    %rsp,%rbp
sub    $0x50,%rsp
movsd  %xmm0,-0x8(%rbp)
movsd  %xmm1,-0x10(%rbp)
movsd  %xmm2,-0x18(%rbp)
movsd  %xmm3,-0x20(%rbp)
movsd  0xea4(%rip),%xmm0
mulsd  -0x10(%rbp),%xmm0
call   1050 <tan@plt>
movq   %xmm0,%rax
movabs $0x8000000000000000,%rcx
xor    %rcx,%rax
movq   %rax,%xmm0
movsd  %xmm0,-0x38(%rbp)
movsd  -0x18(%rbp),%xmm0
movsd  %xmm0,-0x40(%rbp)
movsd  -0x20(%rbp),%xmm0
movsd  %xmm0,-0x48(%rbp)
movsd  0xe62(%rip),%xmm0
mulsd  -0x8(%rbp),%xmm0
call   1060 <cos@plt>
movsd  -0x48(%rbp),%xmm1
movsd  -0x40(%rbp),%xmm2
movaps %xmm0,%xmm3
movsd  -0x38(%rbp),%xmm0
mulsd  %xmm3,%xmm1
mulsd  %xmm2,%xmm0
addsd  %xmm1,%xmm0
movsd  %xmm0,-0x28(%rbp)
movsd  -0x28(%rbp),%xmm1
movaps 0xe61(%rip),%xmm0
pand   %xmm0,%xmm1
movsd  0xe15(%rip),%xmm0
ucomisd %xmm1,%xmm0
jbe    11fd <Asc2+0xbd>
xorps  %xmm0,%xmm0
movsd  %xmm0,-0x28(%rbp)
movsd  0xe03(%rip),%xmm0
mulsd  -0x8(%rbp),%xmm0
call   1030 <sin@plt>
movsd  %xmm0,-0x30(%rbp)
movsd  -0x30(%rbp),%xmm1
movaps 0xe20(%rip),%xmm0
pand   %xmm0,%xmm1
movsd  0xdd4(%rip),%xmm0
ucomisd %xmm1,%xmm0
jbe    123e <Asc2+0xfe>
xorps  %xmm0,%xmm0
movsd  %xmm0,-0x30(%rbp)
movsd  -0x30(%rbp),%xmm0
xorps  %xmm1,%xmm1
ucomisd %xmm1,%xmm0
jne    1288 <Asc2+0x148>
jp     1288 <Asc2+0x148>
xorps  %xmm0,%xmm0
ucomisd -0x28(%rbp),%xmm0
jbe    1276 <Asc2+0x136>
movsd  0xdbc(%rip),%xmm0
movsd  %xmm0,-0x28(%rbp)
jmp    1283 <Asc2+0x143>
movsd  0xd82(%rip),%xmm0
movsd  %xmm0,-0x28(%rbp)
jmp    12f7 <Asc2+0x1b7>
movsd  -0x28(%rbp),%xmm0
xorps  %xmm1,%xmm1
ucomisd %xmm1,%xmm0
jne    12d2 <Asc2+0x192>
jp     12d2 <Asc2+0x192>
xorps  %xmm0,%xmm0
ucomisd -0x30(%rbp),%xmm0
jbe    12c0 <Asc2+0x180>
movsd  0xd6a(%rip),%xmm0
movsd  %xmm0,-0x28(%rbp)
jmp    12cd <Asc2+0x18d>
movsd  0xd50(%rip),%xmm0
movsd  %xmm0,-0x28(%rbp)
jmp    12f2 <Asc2+0x1b2>
movsd  -0x30(%rbp),%xmm0
divsd  -0x28(%rbp),%xmm0
call   1040 <atan@plt>
movsd  0xd27(%rip),%xmm1
mulsd  %xmm1,%xmm0
movsd  %xmm0,-0x28(%rbp)
jmp    12f7 <Asc2+0x1b7>
xorps  %xmm0,%xmm0
ucomisd -0x28(%rbp),%xmm0
jbe    1317 <Asc2+0x1d7>
movsd  0xd23(%rip),%xmm0
addsd  -0x28(%rbp),%xmm0
movsd  %xmm0,-0x28(%rbp)
movsd  -0x28(%rbp),%xmm0
add    $0x50,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<Asc2>:
sub    $0x38,%rsp
movsd  %xmm3,0x30(%rsp)
movsd  %xmm2,0x10(%rsp)
movsd  %xmm0,0x8(%rsp)
mulsd  0xea2(%rip),%xmm1
movapd %xmm1,%xmm0
call   1050 <tan@plt>
movsd  %xmm0,0x28(%rsp)
movsd  0x8(%rsp),%xmm0
mulsd  0xe85(%rip),%xmm0
movsd  %xmm0,0x8(%rsp)
call   1060 <cos@plt>
mulsd  0x30(%rsp),%xmm0
movsd  0x28(%rsp),%xmm1
mulsd  0x10(%rsp),%xmm1
subsd  %xmm1,%xmm0
movapd %xmm0,%xmm1
andpd  0xe78(%rip),%xmm1
cmpltsd 0xe57(%rip),%xmm1
andnpd %xmm0,%xmm1
movapd %xmm1,0x10(%rsp)
movsd  0x8(%rsp),%xmm0
call   1030 <sin@plt>
movapd 0xe52(%rip),%xmm1
andpd  %xmm0,%xmm1
cmpltsd 0xe2d(%rip),%xmm1
andnpd %xmm0,%xmm1
xorpd  %xmm0,%xmm0
ucomisd %xmm0,%xmm1
jne    1204 <Asc2+0xc4>
jp     1204 <Asc2+0xc4>
xor    %eax,%eax
ucomisd 0x10(%rsp),%xmm0
seta   %al
lea    0xe43(%rip),%rcx
movsd  (%rcx,%rax,8),%xmm0
jmp    1242 <Asc2+0x102>
movapd 0x10(%rsp),%xmm2
ucomisd %xmm0,%xmm2
jne    122d <Asc2+0xed>
jp     122d <Asc2+0xed>
xorpd  %xmm0,%xmm0
xor    %eax,%eax
ucomisd %xmm1,%xmm0
seta   %al
lea    0xe0a(%rip),%rcx
movsd  (%rcx,%rax,8),%xmm0
jmp    1242 <Asc2+0x102>
divsd  %xmm2,%xmm1
movapd %xmm1,%xmm0
call   1040 <atan@plt>
mulsd  0xdce(%rip),%xmm0
movsd  0xdce(%rip),%xmm2
addsd  %xmm0,%xmm2
xorpd  %xmm3,%xmm3
movapd %xmm0,%xmm1
cmpltsd %xmm3,%xmm1
andpd  %xmm1,%xmm2
andnpd %xmm0,%xmm1
orpd   %xmm2,%xmm1
movapd %xmm1,%xmm0
add    $0x38,%rsp
ret

LLVM IR (-O0):
define double @Asc2(double %0, double %1, double %2, double %3) {
%5 = alloca double
%6 = alloca double
%7 = alloca double
%8 = alloca double
%9 = alloca double
%10 = alloca double
store double %0, double* %5
store double %1, double* %6
store double %2, double* %7
store double %3, double* %8
%11 = load double, double* %6
%12 = fmul double %11, 0x3F91DF46A2529D39
%13 = call double @tan(double %12)
%14 = fneg double %13
%15 = load double, double* %7
%16 = load double, double* %8
%17 = load double, double* %5
%18 = fmul double %17, 0x3F91DF46A2529D39
%19 = call double @cos(double %18)
%20 = fmul double %16, %19
%21 = call double @llvm.fmuladd.f64(double %14, double %15, double %20)
store double %21, double* %9
%22 = load double, double* %9
%23 = call double @llvm.fabs.f64(double %22)
%24 = fcmp olt double %23, 1.000000e-10
br i1 %24, label %25, label %26
25: ; preds = %4
store double 0.000000e+00, double* %9
br label %26
26: ; preds = %25, %4
%27 = load double, double* %5
%28 = fmul double %27, 0x3F91DF46A2529D39
%29 = call double @sin(double %28)
store double %29, double* %10
%30 = load double, double* %10
%31 = call double @llvm.fabs.f64(double %30)
%32 = fcmp olt double %31, 1.000000e-10
br i1 %32, label %33, label %34
33: ; preds = %26
store double 0.000000e+00, double* %10
br label %34
34: ; preds = %33, %26
%35 = load double, double* %10
%36 = fcmp oeq double %35, 0.000000e+00
br i1 %36, label %37, label %43
37: ; preds = %34
%38 = load double, double* %9
%39 = fcmp olt double %38, 0.000000e+00
br i1 %39, label %40, label %41
40: ; preds = %37
store double -1.000000e-10, double* %9
br label %42
41: ; preds = %37
store double 1.000000e-10, double* %9
br label %42
42: ; preds = %41, %40
br label %59
43: ; preds = %34
%44 = load double, double* %9
%45 = fcmp oeq double %44, 0.000000e+00
br i1 %45, label %46, label %52
46: ; preds = %43
%47 = load double, double* %10
%48 = fcmp olt double %47, 0.000000e+00
br i1 %48, label %49, label %50
49: ; preds = %46
store double -9.000000e+01, double* %9
br label %51
50: ; preds = %46
store double 9.000000e+01, double* %9
br label %51
51: ; preds = %50, %49
br label %58
52: ; preds = %43
%53 = load double, double* %10
%54 = load double, double* %9
%55 = fdiv double %53, %54
%56 = call double @atan(double %55)
%57 = fmul double %56, 0x404CA5DC1A63C1F8
store double %57, double* %9
br label %58
58: ; preds = %52, %51
br label %59
59: ; preds = %58, %42
%60 = load double, double* %9
%61 = fcmp olt double %60, 0.000000e+00
br i1 %61, label %62, label %65
62: ; preds = %59
%63 = load double, double* %9
%64 = fadd double 1.800000e+02, %63
store double %64, double* %9
br label %65
65: ; preds = %62, %59
%66 = load double, double* %9
ret double %66
}

LLVM IR (-O2):
define double @Asc2(double %0, double %1, double %2, double %3) {
%5 = fmul double %1, 0x3F91DF46A2529D39
%6 = tail call double @tan(double %5)
%7 = fneg double %6
%8 = fmul double %0, 0x3F91DF46A2529D39
%9 = tail call double @cos(double %8)
%10 = fmul double %9, %3
%11 = tail call double @llvm.fmuladd.f64(double %7, double %2, double %10)
%12 = tail call double @llvm.fabs.f64(double %11)
%13 = fcmp olt double %12, 1.000000e-10
%14 = select i1 %13, double 0.000000e+00, double %11
%15 = tail call double @sin(double %8)
%16 = tail call double @llvm.fabs.f64(double %15)
%17 = fcmp olt double %16, 1.000000e-10
%18 = select i1 %17, double 0.000000e+00, double %15
%19 = fcmp oeq double %18, 0.000000e+00
br i1 %19, label %20, label %23
20: ; preds = %4
%21 = fcmp olt double %14, 0.000000e+00
%22 = select i1 %21, double -1.000000e-10, double 1.000000e-10
br label %32
23: ; preds = %4
%24 = fcmp oeq double %14, 0.000000e+00
br i1 %24, label %25, label %28
25: ; preds = %23
%26 = fcmp olt double %18, 0.000000e+00
%27 = select i1 %26, double -9.000000e+01, double 9.000000e+01
br label %32
28: ; preds = %23
%29 = fdiv double %18, %14
%30 = tail call double @atan(double %29)
%31 = fmul double %30, 0x404CA5DC1A63C1F8
br label %32
32: ; preds = %25, %20, %28
%33 = phi double [ %31, %28 ], [ %22, %20 ], [ %27, %25 ]
%34 = fcmp olt double %33, 0.000000e+00
%35 = fadd double %33, 1.800000e+02
%36 = select i1 %34, double %35, double %33
ret double %36
}