float _asinf(float x) {
  float y, g;
  float num, den, result;
  long int i;
  float sign = 1.0;
  y = x;
  if (y < (float)0.0) {
    y = -y;
    sign = -sign;
  }
  if (y > (float)0.5) {
    i = 1;
    if (y > (float)1.0) {
      result = 0.0;
      return result;
    }
    g = ((float)(1.0) - (float)(y));
    g = ((float)(0.5) * (float)(g));
    y = sqrtf(g);
    y = ((float)(y) * (float)(-2.0));
  } else {
    i = 0;
    if (y < (float)(+3.452669830012e-4F)) {
      result = y;
      if (sign < (float)0.0) {
        result = -result;
      }
      return result;
    }
    g = ((float)(y) * (float)(y));
  }
  num = ((float)((-5.9450144193246e-1F)) * (float)(g));
  num = ((float)(num) + (float)((+2.9058762374859F)));
  num = ((float)(num) * (float)(g));
  num = ((float)(num) + (float)((-2.7516555290596F)));
  num = ((float)(num) * (float)(g));
  den = ((float)(g) + (float)((-1.0333867072113e+1F)));
  den = ((float)(den) * (float)(g));
  den = ((float)(den) + (float)((+2.4864728969164e+1F)));
  den = ((float)(den) * (float)(g));
  den = ((float)(den) + (float)((-1.6509933202424e+1F)));
  result = ((float)(num) / (float)(den));
  result = ((float)(result) * (float)(y));
  result = ((float)(result) + (float)(y));
  if (i == 1) {
    result = ((float)(result) +
              (float)((float)(0.78539816339744830961566084581988L)));
    result = ((float)(result) +
              (float)((float)(0.78539816339744830961566084581988L)));
  }
  if (sign < (float)0.0) {
    result = -result;
  }
  return result;
}


x86 assembly (clang, -O0):
<_asinf>:
push   %rbp
mov    %rsp,%rbp
sub    $0x30,%rsp
movss  %xmm0,-0x8(%rbp)
movss  0xedb(%rip),%xmm0
movss  %xmm0,-0x2c(%rbp)
movss  -0x8(%rbp),%xmm0
movss  %xmm0,-0xc(%rbp)
xorps  %xmm0,%xmm0
ucomiss -0xc(%rbp),%xmm0
jbe    116f <_asinf+0x5f>
movss  -0xc(%rbp),%xmm0
movd   %xmm0,%eax
xor    $0x80000000,%eax
movd   %eax,%xmm0
movss  %xmm0,-0xc(%rbp)
movss  -0x2c(%rbp),%xmm0
movd   %xmm0,%eax
xor    $0x80000000,%eax
movd   %eax,%xmm0
movss  %xmm0,-0x2c(%rbp)
movss  -0xc(%rbp),%xmm0
movss  0xe88(%rip),%xmm1
ucomiss %xmm1,%xmm0
jbe    1204 <_asinf+0xf4>
movq   $0x1,-0x28(%rbp)
movss  -0xc(%rbp),%xmm0
movss  0xe66(%rip),%xmm1
ucomiss %xmm1,%xmm0
jbe    11ba <_asinf+0xaa>
xorps  %xmm0,%xmm0
movss  %xmm0,-0x1c(%rbp)
movss  -0x1c(%rbp),%xmm0
movss  %xmm0,-0x4(%rbp)
jmp    139c <_asinf+0x28c>
movss  0xe3e(%rip),%xmm0
subss  -0xc(%rbp),%xmm0
movss  %xmm0,-0x10(%rbp)
movss  0xe30(%rip),%xmm0
mulss  -0x10(%rbp),%xmm0
movss  %xmm0,-0x10(%rbp)
movss  -0x10(%rbp),%xmm0
call   1030 <sqrtf@plt>
movss  %xmm0,-0xc(%rbp)
movss  0xe17(%rip),%xmm0
mulss  -0xc(%rbp),%xmm0
movss  %xmm0,-0xc(%rbp)
jmp    126a <_asinf+0x15a>
movq   $0x0,-0x28(%rbp)
movss  0xdf4(%rip),%xmm0
ucomiss -0xc(%rbp),%xmm0
jbe    125b <_asinf+0x14b>
movss  -0xc(%rbp),%xmm0
movss  %xmm0,-0x1c(%rbp)
xorps  %xmm0,%xmm0
ucomiss -0x2c(%rbp),%xmm0
jbe    124c <_asinf+0x13c>
movss  -0x1c(%rbp),%xmm0
movd   %xmm0,%eax
xor    $0x80000000,%eax
movd   %eax,%xmm0
movss  %xmm0,-0x1c(%rbp)
movss  -0x1c(%rbp),%xmm0
movss  %xmm0,-0x4(%rbp)
jmp    139c <_asinf+0x28c>
movss  -0xc(%rbp),%xmm0
mulss  -0xc(%rbp),%xmm0
movss  %xmm0,-0x10(%rbp)
movss  0xdb2(%rip),%xmm0
mulss  -0x10(%rbp),%xmm0
movss  %xmm0,-0x14(%rbp)
movss  0xd9c(%rip),%xmm0
addss  -0x14(%rbp),%xmm0
movss  %xmm0,-0x14(%rbp)
movss  -0x14(%rbp),%xmm0
mulss  -0x10(%rbp),%xmm0
movss  %xmm0,-0x14(%rbp)
movss  0xd77(%rip),%xmm0
addss  -0x14(%rbp),%xmm0
movss  %xmm0,-0x14(%rbp)
movss  -0x14(%rbp),%xmm0
mulss  -0x10(%rbp),%xmm0
movss  %xmm0,-0x14(%rbp)
movss  0xd52(%rip),%xmm0
addss  -0x10(%rbp),%xmm0
movss  %xmm0,-0x18(%rbp)
movss  -0x18(%rbp),%xmm0
mulss  -0x10(%rbp),%xmm0
movss  %xmm0,-0x18(%rbp)
movss  0xd2d(%rip),%xmm0
addss  -0x18(%rbp),%xmm0
movss  %xmm0,-0x18(%rbp)
movss  -0x18(%rbp),%xmm0
mulss  -0x10(%rbp),%xmm0
movss  %xmm0,-0x18(%rbp)
movss  0xd08(%rip),%xmm0
addss  -0x18(%rbp),%xmm0
movss  %xmm0,-0x18(%rbp)
movss  -0x14(%rbp),%xmm0
divss  -0x18(%rbp),%xmm0
movss  %xmm0,-0x1c(%rbp)
movss  -0x1c(%rbp),%xmm0
mulss  -0xc(%rbp),%xmm0
movss  %xmm0,-0x1c(%rbp)
movss  -0x1c(%rbp),%xmm0
addss  -0xc(%rbp),%xmm0
movss  %xmm0,-0x1c(%rbp)
cmpq   $0x1,-0x28(%rbp)
jne    136e <_asinf+0x25e>
movss  0xcd6(%rip),%xmm0
addss  -0x1c(%rbp),%xmm0
movss  %xmm0,-0x1c(%rbp)
movss  0xcc4(%rip),%xmm0
addss  -0x1c(%rbp),%xmm0
movss  %xmm0,-0x1c(%rbp)
xorps  %xmm0,%xmm0
ucomiss -0x2c(%rbp),%xmm0
jbe    1392 <_asinf+0x282>
movss  -0x1c(%rbp),%xmm0
movd   %xmm0,%eax
xor    $0x80000000,%eax
movd   %eax,%xmm0
movss  %xmm0,-0x1c(%rbp)
movss  -0x1c(%rbp),%xmm0
movss  %xmm0,-0x4(%rbp)
movss  -0x4(%rbp),%xmm0
add    $0x30,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<_asinf>:
sub    $0x38,%rsp
movaps %xmm0,%xmm4
movaps 0xee2(%rip),%xmm1
xorps  %xmm0,%xmm1
xorps  %xmm0,%xmm0
movaps %xmm4,%xmm3
cmpltss %xmm0,%xmm3
andps  %xmm3,%xmm1
andnps %xmm4,%xmm3
orps   %xmm1,%xmm3
ucomiss 0xef4(%rip),%xmm3
jbe    1170 <_asinf+0x60>
ucomiss 0xef3(%rip),%xmm3
ja     1274 <_asinf+0x164>
movss  0xee5(%rip),%xmm5
subss  %xmm3,%xmm5
mulss  0xed1(%rip),%xmm5
xorps  %xmm0,%xmm0
ucomiss %xmm0,%xmm5
jb     11ac <_asinf+0x9c>
xorps  %xmm0,%xmm0
sqrtss %xmm5,%xmm0
jmp    11d0 <_asinf+0xc0>
movss  0xebc(%rip),%xmm0
ucomiss %xmm3,%xmm0
jbe    11a0 <_asinf+0x90>
movaps 0xe7c(%rip),%xmm1
xorps  %xmm3,%xmm1
xorps  %xmm2,%xmm2
movaps %xmm4,%xmm0
cmpltss %xmm2,%xmm0
andps  %xmm0,%xmm1
andnps %xmm4,%xmm0
orps   %xmm1,%xmm0
add    $0x38,%rsp
ret
movaps %xmm3,%xmm5
mulss  %xmm3,%xmm5
movaps %xmm3,%xmm0
jmp    11d8 <_asinf+0xc8>
movaps %xmm5,%xmm0
movaps %xmm4,0x20(%rsp)
movaps %xmm3,0x10(%rsp)
movaps %xmm5,(%rsp)
call   1030 <sqrtf@plt>
movaps (%rsp),%xmm5
movaps 0x10(%rsp),%xmm3
movaps 0x20(%rsp),%xmm4
mulss  0xe64(%rip),%xmm0
movss  0xe60(%rip),%xmm1
mulss  %xmm5,%xmm1
addss  0xe58(%rip),%xmm1
shufps $0x0,%xmm5,%xmm5
movaps 0xe19(%rip),%xmm2
addps  %xmm5,%xmm2
shufps $0x1,%xmm1,%xmm2
shufps $0xe2,%xmm1,%xmm2
mulps  %xmm5,%xmm2
addps  0xe14(%rip),%xmm2
mulps  %xmm5,%xmm2
movaps %xmm2,%xmm1
shufps $0x55,%xmm2,%xmm1
addss  0xe2a(%rip),%xmm1
divss  %xmm1,%xmm2
mulss  %xmm0,%xmm2
addss  %xmm0,%xmm2
movss  0xe1a(%rip),%xmm0
movss  0xdf6(%rip),%xmm1
cmpltss %xmm3,%xmm1
movaps %xmm1,%xmm3
andnps %xmm2,%xmm3
addss  %xmm0,%xmm2
addss  %xmm0,%xmm2
andps  %xmm2,%xmm1
orps   %xmm3,%xmm1
movaps 0xda6(%rip),%xmm0
xorps  %xmm1,%xmm0
xorps  %xmm2,%xmm2
cmpltss %xmm2,%xmm4
movaps %xmm4,%xmm2
andnps %xmm1,%xmm2
andps  %xmm0,%xmm4
orps   %xmm2,%xmm4
movaps %xmm4,%xmm0
add    $0x38,%rsp
ret

LLVM IR (-O0):
define float @_asinf(float %0) {
%2 = alloca float
%3 = alloca float
%4 = alloca float
%5 = alloca float
%6 = alloca float
%7 = alloca float
%8 = alloca float
%9 = alloca i64
%10 = alloca float
store float %0, float* %3
store float 1.000000e+00, float* %10
%11 = load float, float* %3
store float %11, float* %4
%12 = load float, float* %4
%13 = fcmp olt float %12, 0.000000e+00
br i1 %13, label %14, label %19
14: ; preds = %1
%15 = load float, float* %4
%16 = fneg float %15
store float %16, float* %4
%17 = load float, float* %10
%18 = fneg float %17
store float %18, float* %10
br label %19
19: ; preds = %14, %1
%20 = load float, float* %4
%21 = fcmp ogt float %20, 5.000000e-01
br i1 %21, label %22, label %36
22: ; preds = %19
store i64 1, i64* %9
%23 = load float, float* %4
%24 = fcmp ogt float %23, 1.000000e+00
br i1 %24, label %25, label %27
25: ; preds = %22
store float 0.000000e+00, float* %8
%26 = load float, float* %8
store float %26, float* %2
br label %101
27: ; preds = %22
%28 = load float, float* %4
%29 = fsub float 1.000000e+00, %28
store float %29, float* %5
%30 = load float, float* %5
%31 = fmul float 5.000000e-01, %30
store float %31, float* %5
%32 = load float, float* %5
%33 = call float @sqrtf(float %32)
store float %33, float* %4
%34 = load float, float* %4
%35 = fmul float %34, -2.000000e+00
store float %35, float* %4
br label %52
36: ; preds = %19
store i64 0, i64* %9
%37 = load float, float* %4
%38 = fcmp olt float %37, 0x3F36A09E60000000
br i1 %38, label %39, label %48
39: ; preds = %36
%40 = load float, float* %4
store float %40, float* %8
%41 = load float, float* %10
%42 = fcmp olt float %41, 0.000000e+00
br i1 %42, label %43, label %46
43: ; preds = %39
%44 = load float, float* %8
%45 = fneg float %44
store float %45, float* %8
br label %46
46: ; preds = %43, %39
%47 = load float, float* %8
store float %47, float* %2
br label %101
48: ; preds = %36
%49 = load float, float* %4
%50 = load float, float* %4
%51 = fmul float %49, %50
store float %51, float* %5
br label %52
52: ; preds = %48, %27
%53 = load float, float* %5
%54 = fmul float 0xBFE30627E0000000, %53
store float %54, float* %6
%55 = load float, float* %6
%56 = fadd float %55, 0x40073F3C00000000
store float %56, float* %6
%57 = load float, float* %6
%58 = load float, float* %5
%59 = fmul float %57, %58
store float %59, float* %6
%60 = load float, float* %6
%61 = fadd float %60, 0xC006036400000000
store float %61, float* %6
%62 = load float, float* %6
%63 = load float, float* %5
%64 = fmul float %62, %63
store float %64, float* %6
%65 = load float, float* %5
%66 = fadd float %65, 0xC024AAF0A0000000
store float %66, float* %7
%67 = load float, float* %7
%68 = load float, float* %5
%69 = fmul float %67, %68
store float %69, float* %7
%70 = load float, float* %7
%71 = fadd float %70, 0x4038DD5EE0000000
store float %71, float* %7
%72 = load float, float* %7
%73 = load float, float* %5
%74 = fmul float %72, %73
store float %74, float* %7
%75 = load float, float* %7
%76 = fadd float %75, 0xC030828B00000000
store float %76, float* %7
%77 = load float, float* %6
%78 = load float, float* %7
%79 = fdiv float %77, %78
store float %79, float* %8
%80 = load float, float* %8
%81 = load float, float* %4
%82 = fmul float %80, %81
store float %82, float* %8
%83 = load float, float* %8
%84 = load float, float* %4
%85 = fadd float %83, %84
store float %85, float* %8
%86 = load i64, i64* %9
%87 = icmp eq i64 %86, 1
br i1 %87, label %88, label %93
88: ; preds = %52
%89 = load float, float* %8
%90 = fadd float %89, 0x3FE921FB60000000
store float %90, float* %8
%91 = load float, float* %8
%92 = fadd float %91, 0x3FE921FB60000000
store float %92, float* %8
br label %93
93: ; preds = %88, %52
%94 = load float, float* %10
%95 = fcmp olt float %94, 0.000000e+00
br i1 %95, label %96, label %99
96: ; preds = %93
%97 = load float, float* %8
%98 = fneg float %97
store float %98, float* %8
br label %99
99: ; preds = %96, %93
%100 = load float, float* %8
store float %100, float* %2
br label %101
101: ; preds = %99, %46, %25
%102 = load float, float* %2
ret float %102
}

LLVM IR (-O2):
define float @_asinf(float %0) {
%2 = fcmp olt float %0, 0.000000e+00
%3 = fneg float %0
%4 = select i1 %2, float %3, float %0
%5 = fcmp ogt float %4, 5.000000e-01
br i1 %5, label %6, label %13
6: ; preds = %1
%7 = fcmp ogt float %4, 1.000000e+00
br i1 %7, label %45, label %8
8: ; preds = %6
%9 = fsub float 1.000000e+00, %4
%10 = fmul float %9, 5.000000e-01
%11 = tail call float @sqrtf(float %10)
%12 = fmul float %11, -2.000000e+00
br label %20
13: ; preds = %1
%14 = fcmp olt float %4, 0x3F36A09E60000000
br i1 %14, label %15, label %18
15: ; preds = %13
%16 = fneg float %4
%17 = select i1 %2, float %16, float %0
br label %45
18: ; preds = %13
%19 = fmul float %4, %4
br label %20
20: ; preds = %18, %8
%21 = phi float [ %10, %8 ], [ %19, %18 ]
%22 = phi float [ %12, %8 ], [ %4, %18 ]
%23 = fmul float %21, 0x3FE30627E0000000
%24 = insertelement <2 x float> poison, float %23, i64 0
%25 = insertelement <2 x float> %24, float %21, i64 1
%26 = fsub <2 x float> <float 0x40073F3C00000000, float poison>, %25
%27 = fadd <2 x float> %25, <float poison, float 0xC024AAF0A0000000>
%28 = shufflevector <2 x float> %26, <2 x float> %27, <2 x i32> <i32 0, i32 3>
%29 = insertelement <2 x float> poison, float %21, i64 0
%30 = shufflevector <2 x float> %29, <2 x float> poison, <2 x i32> zeroinitializer
%31 = fmul <2 x float> %30, %28
%32 = fadd <2 x float> %31, <float 0xC006036400000000, float 0x4038DD5EE0000000>
%33 = fmul <2 x float> %30, %32
%34 = extractelement <2 x float> %33, i64 1
%35 = fadd float %34, 0xC030828B00000000
%36 = extractelement <2 x float> %33, i64 0
%37 = fdiv float %36, %35
%38 = fmul float %22, %37
%39 = fadd float %22, %38
%40 = fadd float %39, 0x3FE921FB60000000
%41 = fadd float %40, 0x3FE921FB60000000
%42 = select i1 %5, float %41, float %39
%43 = fneg float %42
%44 = select i1 %2, float %43, float %42
br label %45
45: ; preds = %6, %20, %15
%46 = phi float [ %44, %20 ], [ %17, %15 ], [ 0.000000e+00, %6 ]
ret float %46
}