double asin(x)
double x;
{
  double y;
  int sign;
  if (x > 1.0 || x < -1.0)
    exit(1);
  sign = 0;
  if (x < 0) {
    sign = 1;
    x = -x;
  }
  y = ((((((-.0012624911 * x + .0066700901) * x - .0170881256) * x +
          .0308918810) *
             x -
         .0501743046) *
            x +
        .0889789874) *
           x -
       .2145988016) *
          x +
      1.5707963050;
  y = 1.57079632679 - sqrt(1.0 - x) * y;
  if (sign)
    y = -y;
  return (y);
}


x86 assembly (clang, -O0):
<asin>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
movsd  %xmm0,-0x8(%rbp)
movsd  -0x8(%rbp),%xmm0
movsd  0xec6(%rip),%xmm1
ucomisd %xmm1,%xmm0
ja     1157 <asin+0x37>
movsd  0xebc(%rip),%xmm0
ucomisd -0x8(%rbp),%xmm0
jbe    1161 <asin+0x41>
mov    $0x1,%edi
call   1040 <exit@plt>
movl   $0x0,-0x14(%rbp)
xorps  %xmm0,%xmm0
ucomisd -0x8(%rbp),%xmm0
jbe    119e <asin+0x7e>
movl   $0x1,-0x14(%rbp)
movsd  -0x8(%rbp),%xmm0
movq   %xmm0,%rax
movabs $0x8000000000000000,%rcx
xor    %rcx,%rax
movq   %rax,%xmm0
movsd  %xmm0,-0x8(%rbp)
movsd  -0x8(%rbp),%xmm0
movsd  0xe9d(%rip),%xmm1
mulsd  %xmm1,%xmm0
movsd  0xe99(%rip),%xmm1
addsd  %xmm1,%xmm0
movsd  -0x8(%rbp),%xmm1
mulsd  %xmm1,%xmm0
movsd  0xe74(%rip),%xmm1
addsd  %xmm1,%xmm0
movsd  -0x8(%rbp),%xmm1
mulsd  %xmm1,%xmm0
movsd  0xe57(%rip),%xmm1
addsd  %xmm1,%xmm0
movsd  -0x8(%rbp),%xmm1
mulsd  %xmm1,%xmm0
movsd  0xe3a(%rip),%xmm1
addsd  %xmm1,%xmm0
movsd  -0x8(%rbp),%xmm1
mulsd  %xmm1,%xmm0
movsd  0xe1d(%rip),%xmm1
addsd  %xmm1,%xmm0
movsd  -0x8(%rbp),%xmm1
mulsd  %xmm1,%xmm0
movsd  0xe00(%rip),%xmm1
addsd  %xmm1,%xmm0
movsd  -0x8(%rbp),%xmm1
mulsd  %xmm1,%xmm0
movsd  0xde3(%rip),%xmm1
addsd  %xmm1,%xmm0
movsd  %xmm0,-0x10(%rbp)
movsd  0xdba(%rip),%xmm0
subsd  -0x8(%rbp),%xmm0
call   1030 <sqrt@plt>
movsd  -0x10(%rbp),%xmm1
movq   %xmm0,%rax
movabs $0x8000000000000000,%rcx
xor    %rcx,%rax
movq   %rax,%xmm0
mulsd  %xmm1,%xmm0
movsd  0xd98(%rip),%xmm1
addsd  %xmm1,%xmm0
movsd  %xmm0,-0x10(%rbp)
cmpl   $0x0,-0x14(%rbp)
je     12ac <asin+0x18c>
movsd  -0x10(%rbp),%xmm0
movq   %xmm0,%rax
movabs $0x8000000000000000,%rcx
xor    %rcx,%rax
movq   %rax,%xmm0
movsd  %xmm0,-0x10(%rbp)
movsd  -0x10(%rbp),%xmm0
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<asin>:
sub    $0x28,%rsp
ucomisd 0xed4(%rip),%xmm0
ja     122f <asin+0x10f>
movsd  0xece(%rip),%xmm1
ucomisd %xmm0,%xmm1
ja     122f <asin+0x10f>
movapd 0xf14(%rip),%xmm3
xorpd  %xmm0,%xmm3
xorpd  %xmm1,%xmm1
movapd %xmm0,%xmm4
cmpltsd %xmm1,%xmm4
andpd  %xmm4,%xmm3
movapd %xmm4,%xmm2
andnpd %xmm0,%xmm2
orpd   %xmm3,%xmm2
movsd  0xe9b(%rip),%xmm3
mulsd  %xmm2,%xmm3
addsd  0xe97(%rip),%xmm3
mulsd  %xmm2,%xmm3
addsd  0xe93(%rip),%xmm3
mulsd  %xmm2,%xmm3
addsd  0xe8f(%rip),%xmm3
mulsd  %xmm2,%xmm3
addsd  0xe8b(%rip),%xmm3
mulsd  %xmm2,%xmm3
addsd  0xe87(%rip),%xmm3
mulsd  %xmm2,%xmm3
addsd  0xe83(%rip),%xmm3
mulsd  %xmm2,%xmm3
addsd  0xe7f(%rip),%xmm3
movsd  0xe2f(%rip),%xmm0
subsd  %xmm2,%xmm0
ucomisd %xmm1,%xmm0
jb     11e1 <asin+0xc1>
sqrtsd %xmm0,%xmm0
jmp    11fe <asin+0xde>
movapd %xmm4,0x10(%rsp)
movsd  %xmm3,0x8(%rsp)
call   1030 <sqrt@plt>
movsd  0x8(%rsp),%xmm3
movapd 0x10(%rsp),%xmm4
mulsd  %xmm3,%xmm0
movsd  0xe46(%rip),%xmm1
subsd  %xmm0,%xmm1
movapd %xmm4,%xmm0
andnpd %xmm1,%xmm0
xorpd  0xe42(%rip),%xmm1
andpd  %xmm4,%xmm1
orpd   %xmm0,%xmm1
movapd %xmm1,%xmm0
add    $0x28,%rsp
ret
mov    $0x1,%edi
call   1040 <exit@plt>

LLVM IR (-O0):
define double @asin(double %0) {
%2 = alloca double
%3 = alloca double
%4 = alloca i32
store double %0, double* %2
%5 = load double, double* %2
%6 = fcmp ogt double %5, 1.000000e+00
br i1 %6, label %10, label %7
7: ; preds = %1
%8 = load double, double* %2
%9 = fcmp olt double %8, -1.000000e+00
br i1 %9, label %10, label %11
10: ; preds = %7, %1
unreachable
11: ; preds = %7
store i32 0, i32* %4
%12 = load double, double* %2
%13 = fcmp olt double %12, 0.000000e+00
br i1 %13, label %14, label %17
14: ; preds = %11
store i32 1, i32* %4
%15 = load double, double* %2
%16 = fneg double %15
store double %16, double* %2
br label %17
17: ; preds = %14, %11
%18 = load double, double* %2
%19 = call double @llvm.fmuladd.f64(double 0xBF54AF457F1A7A45, double %18, double 0x3F7B5218AD7437A2)
%20 = load double, double* %2
%21 = call double @llvm.fmuladd.f64(double %19, double %20, double 0xBF917F8CB268630F)
%22 = load double, double* %2
%23 = call double @llvm.fmuladd.f64(double %21, double %22, double 0x3F9FA21F0A6D7D6D)
%24 = load double, double* %2
%25 = call double @llvm.fmuladd.f64(double %23, double %24, double 0xBFA9B0724AB68CB8)
%26 = load double, double* %2
%27 = call double @llvm.fmuladd.f64(double %25, double %26, double 0x3FB6C753B0EA08C1)
%28 = load double, double* %2
%29 = call double @llvm.fmuladd.f64(double %27, double %28, double 0xBFCB77F93950FF58)
%30 = load double, double* %2
%31 = call double @llvm.fmuladd.f64(double %29, double %30, double 0x3FF921FB4E6A7138)
store double %31, double* %3
%32 = load double, double* %2
%33 = fsub double 1.000000e+00, %32
%34 = call double @sqrt(double %33)
%35 = load double, double* %3
%36 = fneg double %34
%37 = call double @llvm.fmuladd.f64(double %36, double %35, double 0x3FF921FB5443D6F4)
store double %37, double* %3
%38 = load i32, i32* %4
%39 = icmp ne i32 %38, 0
br i1 %39, label %40, label %43
40: ; preds = %17
%41 = load double, double* %3
%42 = fneg double %41
store double %42, double* %3
br label %43
43: ; preds = %40, %17
%44 = load double, double* %3
ret double %44
}

LLVM IR (-O2):
define double @asin(double %0) {
%2 = fcmp ogt double %0, 1.000000e+00
%3 = fcmp olt double %0, -1.000000e+00
%4 = or i1 %2, %3
br i1 %4, label %5, label %6
5: ; preds = %1
tail call void @exit(i32 1)
unreachable
6: ; preds = %1
%7 = fcmp olt double %0, 0.000000e+00
%8 = fneg double %0
%9 = select i1 %7, double %8, double %0
%10 = tail call double @llvm.fmuladd.f64(double %9, double 0xBF54AF457F1A7A45, double 0x3F7B5218AD7437A2)
%11 = tail call double @llvm.fmuladd.f64(double %10, double %9, double 0xBF917F8CB268630F)
%12 = tail call double @llvm.fmuladd.f64(double %11, double %9, double 0x3F9FA21F0A6D7D6D)
%13 = tail call double @llvm.fmuladd.f64(double %12, double %9, double 0xBFA9B0724AB68CB8)
%14 = tail call double @llvm.fmuladd.f64(double %13, double %9, double 0x3FB6C753B0EA08C1)
%15 = tail call double @llvm.fmuladd.f64(double %14, double %9, double 0xBFCB77F93950FF58)
%16 = tail call double @llvm.fmuladd.f64(double %15, double %9, double 0x3FF921FB4E6A7138)
%17 = fsub double 1.000000e+00, %9
%18 = tail call double @sqrt(double %17)
%19 = fneg double %18
%20 = tail call double @llvm.fmuladd.f64(double %19, double %16, double 0x3FF921FB5443D6F4)
%21 = fneg double %20
%22 = select i1 %7, double %21, double %20
ret double %22
}