#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 atan(double);
double cos(double);
int fabs(double);
double sin(double);
double tan(double);
double Asc2(double x, double f, double sine, double cose) {
  double ass, sinx;
  ass =
      -tan(f * 0.0174532925199433) * sine + cose * cos(x * 0.0174532925199433);
  if (fabs(ass) < 1E-10)
    ass = 0;
  sinx = sin(x * 0.0174532925199433);
  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) * 57.2957795130823);
  }
  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  0xe94(%rip),%xmm0
mulsd  -0x10(%rbp),%xmm0
call   1060 <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  0xe52(%rip),%xmm0
mulsd  -0x8(%rbp),%xmm0
call   1070 <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),%xmm0
call   1030 <fabs@plt>
cvtsi2sd %eax,%xmm1
movsd  0xe07(%rip),%xmm0
ucomisd %xmm1,%xmm0
jbe    120b <Asc2+0xbb>
xorps  %xmm0,%xmm0
movsd  %xmm0,-0x28(%rbp)
movsd  0xdf5(%rip),%xmm0
mulsd  -0x8(%rbp),%xmm0
call   1040 <sin@plt>
movsd  %xmm0,-0x30(%rbp)
movsd  -0x30(%rbp),%xmm0
call   1030 <fabs@plt>
cvtsi2sd %eax,%xmm1
movsd  0xdc8(%rip),%xmm0
ucomisd %xmm1,%xmm0
jbe    124a <Asc2+0xfa>
xorps  %xmm0,%xmm0
movsd  %xmm0,-0x30(%rbp)
movsd  -0x30(%rbp),%xmm0
xorps  %xmm1,%xmm1
ucomisd %xmm1,%xmm0
jne    1294 <Asc2+0x144>
jp     1294 <Asc2+0x144>
xorps  %xmm0,%xmm0
ucomisd -0x28(%rbp),%xmm0
jbe    1282 <Asc2+0x132>
movsd  0xdb0(%rip),%xmm0
movsd  %xmm0,-0x28(%rbp)
jmp    128f <Asc2+0x13f>
movsd  0xd76(%rip),%xmm0
movsd  %xmm0,-0x28(%rbp)
jmp    1303 <Asc2+0x1b3>
movsd  -0x28(%rbp),%xmm0
xorps  %xmm1,%xmm1
ucomisd %xmm1,%xmm0
jne    12de <Asc2+0x18e>
jp     12de <Asc2+0x18e>
xorps  %xmm0,%xmm0
ucomisd -0x30(%rbp),%xmm0
jbe    12cc <Asc2+0x17c>
movsd  0xd5e(%rip),%xmm0
movsd  %xmm0,-0x28(%rbp)
jmp    12d9 <Asc2+0x189>
movsd  0xd44(%rip),%xmm0
movsd  %xmm0,-0x28(%rbp)
jmp    12fe <Asc2+0x1ae>
movsd  -0x30(%rbp),%xmm0
divsd  -0x28(%rbp),%xmm0
call   1050 <atan@plt>
movsd  0xd1b(%rip),%xmm1
mulsd  %xmm1,%xmm0
movsd  %xmm0,-0x28(%rbp)
jmp    1303 <Asc2+0x1b3>
xorps  %xmm0,%xmm0
ucomisd -0x28(%rbp),%xmm0
jbe    1323 <Asc2+0x1d3>
movsd  0xd17(%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    $0x28,%rsp
movsd  %xmm3,0x20(%rsp)
movsd  %xmm2,0x8(%rsp)
movsd  %xmm0,0x10(%rsp)
mulsd  0xe92(%rip),%xmm1
movapd %xmm1,%xmm0
call   1060 <tan@plt>
movsd  %xmm0,0x18(%rsp)
movsd  0x10(%rsp),%xmm0
mulsd  0xe75(%rip),%xmm0
movsd  %xmm0,0x10(%rsp)
call   1070 <cos@plt>
mulsd  0x20(%rsp),%xmm0
movsd  0x18(%rsp),%xmm1
mulsd  0x8(%rsp),%xmm1
subsd  %xmm1,%xmm0
movsd  %xmm0,0x8(%rsp)
call   1030 <fabs@plt>
xorpd  %xmm0,%xmm0
test   %eax,%eax
jle    11c5 <Asc2+0x75>
movsd  0x8(%rsp),%xmm0
movsd  %xmm0,0x8(%rsp)
movsd  0x10(%rsp),%xmm0
call   1040 <sin@plt>
movsd  %xmm0,0x10(%rsp)
call   1030 <fabs@plt>
xorpd  %xmm0,%xmm0
test   %eax,%eax
jle    11ef <Asc2+0x9f>
movsd  0x10(%rsp),%xmm0
ucomisd 0xe21(%rip),%xmm0
movsd  0x8(%rsp),%xmm2
jne    121c <Asc2+0xcc>
jp     121c <Asc2+0xcc>
xorpd  %xmm0,%xmm0
xor    %eax,%eax
ucomisd %xmm2,%xmm0
seta   %al
lea    0xe1b(%rip),%rcx
movsd  (%rcx,%rax,8),%xmm0
jmp    1250 <Asc2+0x100>
xorpd  %xmm1,%xmm1
ucomisd %xmm1,%xmm2
jne    123f <Asc2+0xef>
jp     123f <Asc2+0xef>
xor    %eax,%eax
ucomisd %xmm0,%xmm1
seta   %al
lea    0xde8(%rip),%rcx
movsd  (%rcx,%rax,8),%xmm0
jmp    1250 <Asc2+0x100>
divsd  %xmm2,%xmm0
call   1050 <atan@plt>
mulsd  0xdb8(%rip),%xmm0
movsd  0xdb8(%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    $0x28,%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, 0x3F91DF46A2529D3A
%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, 0x3F91DF46A2529D3A
%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 i32 @fabs(double %22)
%24 = sitofp i32 %23 to double
%25 = fcmp olt double %24, 1.000000e-10
br i1 %25, label %26, label %27
26: ; preds = %4
store double 0.000000e+00, double* %9
br label %27
27: ; preds = %26, %4
%28 = load double, double* %5
%29 = fmul double %28, 0x3F91DF46A2529D3A
%30 = call double @sin(double %29)
store double %30, double* %10
%31 = load double, double* %10
%32 = call i32 @fabs(double %31)
%33 = sitofp i32 %32 to double
%34 = fcmp olt double %33, 1.000000e-10
br i1 %34, label %35, label %36
35: ; preds = %27
store double 0.000000e+00, double* %10
br label %36
36: ; preds = %35, %27
%37 = load double, double* %10
%38 = fcmp oeq double %37, 0.000000e+00
br i1 %38, label %39, label %45
39: ; preds = %36
%40 = load double, double* %9
%41 = fcmp olt double %40, 0.000000e+00
br i1 %41, label %42, label %43
42: ; preds = %39
store double -1.000000e-10, double* %9
br label %44
43: ; preds = %39
store double 1.000000e-10, double* %9
br label %44
44: ; preds = %43, %42
br label %61
45: ; preds = %36
%46 = load double, double* %9
%47 = fcmp oeq double %46, 0.000000e+00
br i1 %47, label %48, label %54
48: ; preds = %45
%49 = load double, double* %10
%50 = fcmp olt double %49, 0.000000e+00
br i1 %50, label %51, label %52
51: ; preds = %48
store double -9.000000e+01, double* %9
br label %53
52: ; preds = %48
store double 9.000000e+01, double* %9
br label %53
53: ; preds = %52, %51
br label %60
54: ; preds = %45
%55 = load double, double* %10
%56 = load double, double* %9
%57 = fdiv double %55, %56
%58 = call double @atan(double %57)
%59 = fmul double %58, 0x404CA5DC1A63C1F5
store double %59, double* %9
br label %60
60: ; preds = %54, %53
br label %61
61: ; preds = %60, %44
%62 = load double, double* %9
%63 = fcmp olt double %62, 0.000000e+00
br i1 %63, label %64, label %67
64: ; preds = %61
%65 = load double, double* %9
%66 = fadd double 1.800000e+02, %65
store double %66, double* %9
br label %67
67: ; preds = %64, %61
%68 = load double, double* %9
ret double %68
}

LLVM IR (-O2):
define double @Asc2(double %0, double %1, double %2, double %3) {
%5 = fmul double %1, 0x3F91DF46A2529D3A
%6 = tail call double @tan(double %5)
%7 = fneg double %6
%8 = fmul double %0, 0x3F91DF46A2529D3A
%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 i32 @fabs(double %11)
%13 = icmp slt i32 %12, 1
%14 = select i1 %13, double 0.000000e+00, double %11
%15 = tail call double @sin(double %8)
%16 = tail call i32 @fabs(double %15)
%17 = icmp slt i32 %16, 1
%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, 0x404CA5DC1A63C1F5
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
}