long double acosd(long double x) {
  long double y, g;
  long double num, den, result;
  long int i;
  y = x;
  if (y < (long double)0.0) {
    y = -y;
  }
  if (y > (long double)0.5) {
    i = 0;
    if (y > (long double)1.0) {
      result = 0.0;
      return result;
    }
    g = ((long double)(1.0) - (long double)(y));
    g = ((long double)(0.5) * (long double)(g));
    y = sqrtd(g);
    y = ((long double)(y) * (long double)(-2.0));
  } else {
    i = 1;
    if (y < (+1.490116119385e-8L)) {
      result = y;
      if (x < (long double)0.0) {
        result = ((long double)((0.78539816339744830961566084581988L)) +
                  (long double)(result));
        result = ((long double)(result) +
                  (long double)((0.78539816339744830961566084581988L)));
      } else {
        result = ((long double)((0.78539816339744830961566084581988L)) -
                  (long double)(result));
        result = ((long double)(result) +
                  (long double)((0.78539816339744830961566084581988L)));
      }
      return result;
    }
    g = ((long double)(y) * (long double)(y));
  }
  num = ((long double)((-6.9674573447350646411e-1L)) * (long double)(g));
  num = ((long double)(num) + (long double)((+1.0152522233806463645e+1L)));
  num = ((long double)(num) * (long double)(g));
  num = ((long double)(num) + (long double)((-3.9688862997504877339e+1L)));
  num = ((long double)(num) * (long double)(g));
  num = ((long double)(num) + (long double)((+5.7208227877891731407e+1L)));
  num = ((long double)(num) * (long double)(g));
  num = ((long double)(num) + (long double)((-2.7368494524164255994e+1L)));
  num = ((long double)(num) * (long double)(g));
  den = ((long double)(g) + (long double)((-2.3823859153670238830e+1L)));
  den = ((long double)(den) * (long double)(g));
  den = ((long double)(den) + (long double)((+1.5095270841030604719e+2L)));
  den = ((long double)(den) * (long double)(g));
  den = ((long double)(den) + (long double)((-3.8186303361750149284e+2L)));
  den = ((long double)(den) * (long double)(g));
  den = ((long double)(den) + (long double)((+4.1714430248260412556e+2L)));
  den = ((long double)(den) * (long double)(g));
  den = ((long double)(den) + (long double)((-1.6421096714498560795e+2L)));
  result = ((long double)(num) / (long double)(den));
  result = ((long double)(result) * (long double)(y));
  result = ((long double)(result) + (long double)(y));
  if (x < (long double)0.0) {
    if (i == 0) {
      result = ((long double)(result) +
                (long double)((1.5707963267948966192313216916398L)));
      result = ((long double)(result) +
                (long double)((1.5707963267948966192313216916398L)));
    } else {
      result = ((long double)((0.78539816339744830961566084581988L)) +
                (long double)(result));
      result = ((long double)(result) +
                (long double)((0.78539816339744830961566084581988L)));
    }
  } else {
    if (i == 1) {
      result = ((long double)((0.78539816339744830961566084581988L)) -
                (long double)(result));
      result = ((long double)(result) +
                (long double)((0.78539816339744830961566084581988L)));
    } else {
      result = -result;
    }
  }
  return result;
}


x86 assembly (clang, -O0):
<acosd>:
push   %rbp
mov    %rsp,%rbp
sub    $0x90,%rsp
fldt   0x10(%rbp)
fstpt  -0x20(%rbp)
fldt   -0x20(%rbp)
fstpt  -0x30(%rbp)
fldt   -0x30(%rbp)
fldz
fucomip %st(1),%st
fstp   %st(0)
jbe    1143 <acosd+0x33>
jmp    113b <acosd+0x2b>
fldt   -0x30(%rbp)
fchs
fstpt  -0x30(%rbp)
fldt   -0x30(%rbp)
flds   0xeb4(%rip)
fxch   %st(1)
fucomip %st(1),%st
fstp   %st(0)
jbe    11ce <acosd+0xbe>
jmp    115d <acosd+0x4d>
movq   $0x0,-0x78(%rbp)
fldt   -0x30(%rbp)
fld1
fxch   %st(1)
fucomip %st(1),%st
fstp   %st(0)
jbe    118b <acosd+0x7b>
jmp    117b <acosd+0x6b>
fldz
fstpt  -0x70(%rbp)
fldt   -0x70(%rbp)
fstpt  -0x10(%rbp)
jmp    13e9 <acosd+0x2d9>
fldt   -0x30(%rbp)
fld1
fsubp  %st,%st(1)
fstpt  -0x40(%rbp)
fldt   -0x40(%rbp)
flds   0xe62(%rip)
fmulp  %st,%st(1)
fstpt  -0x40(%rbp)
fldt   -0x40(%rbp)
mov    %rsp,%rax
fstpt  (%rax)
xor    %eax,%eax
call   1030 <sqrtd@plt>
mov    %eax,-0x7c(%rbp)
fildl  -0x7c(%rbp)
fstpt  -0x30(%rbp)
fldt   -0x30(%rbp)
flds   0xe40(%rip)
fmulp  %st,%st(1)
fstpt  -0x30(%rbp)
jmp    1250 <acosd+0x140>
movq   $0x1,-0x78(%rbp)
fldt   -0x30(%rbp)
fldt   0xe31(%rip)
fucomip %st(1),%st
fstp   %st(0)
jbe    1248 <acosd+0x138>
jmp    11ee <acosd+0xde>
fldt   -0x30(%rbp)
fstpt  -0x70(%rbp)
fldt   -0x20(%rbp)
fldz
fucomip %st(1),%st
fstp   %st(0)
jbe    1225 <acosd+0x115>
jmp    1208 <acosd+0xf8>
fldt   -0x70(%rbp)
fldt   0xe0f(%rip)
fadd   %st,%st(1)
fxch   %st(1)
fstpt  -0x70(%rbp)
fldt   -0x70(%rbp)
faddp  %st,%st(1)
fstpt  -0x70(%rbp)
jmp    123d <acosd+0x12d>
fldt   -0x70(%rbp)
fldt   0xdf2(%rip)
fsub   %st,%st(1)
fxch   %st(1)
fstpt  -0x70(%rbp)
fldt   -0x70(%rbp)
faddp  %st,%st(1)
fstpt  -0x70(%rbp)
fldt   -0x70(%rbp)
fstpt  -0x10(%rbp)
jmp    13e9 <acosd+0x2d9>
fldt   -0x30(%rbp)
fmul   %st,%st(0)
fstpt  -0x40(%rbp)
fldt   -0x40(%rbp)
fldt   0xdd7(%rip)
fmulp  %st,%st(1)
fstpt  -0x50(%rbp)
fldt   -0x50(%rbp)
fldt   0xdd9(%rip)
faddp  %st,%st(1)
fstpt  -0x50(%rbp)
fldt   -0x50(%rbp)
fldt   -0x40(%rbp)
fmulp  %st,%st(1)
fstpt  -0x50(%rbp)
fldt   -0x50(%rbp)
fldt   0xdd0(%rip)
faddp  %st,%st(1)
fstpt  -0x50(%rbp)
fldt   -0x50(%rbp)
fldt   -0x40(%rbp)
fmulp  %st,%st(1)
fstpt  -0x50(%rbp)
fldt   -0x50(%rbp)
fldt   0xdc7(%rip)
faddp  %st,%st(1)
fstpt  -0x50(%rbp)
fldt   -0x50(%rbp)
fldt   -0x40(%rbp)
fmulp  %st,%st(1)
fstpt  -0x50(%rbp)
fldt   -0x50(%rbp)
fldt   0xdbe(%rip)
faddp  %st,%st(1)
fstpt  -0x50(%rbp)
fldt   -0x50(%rbp)
fldt   -0x40(%rbp)
fmulp  %st,%st(1)
fstpt  -0x50(%rbp)
fldt   -0x40(%rbp)
fldt   0xdb5(%rip)
faddp  %st,%st(1)
fstpt  -0x60(%rbp)
fldt   -0x60(%rbp)
fldt   -0x40(%rbp)
fmulp  %st,%st(1)
fstpt  -0x60(%rbp)
fldt   -0x60(%rbp)
fldt   0xdac(%rip)
faddp  %st,%st(1)
fstpt  -0x60(%rbp)
fldt   -0x60(%rbp)
fldt   -0x40(%rbp)
fmulp  %st,%st(1)
fstpt  -0x60(%rbp)
fldt   -0x60(%rbp)
fldt   0xda3(%rip)
faddp  %st,%st(1)
fstpt  -0x60(%rbp)
fldt   -0x60(%rbp)
fldt   -0x40(%rbp)
fmulp  %st,%st(1)
fstpt  -0x60(%rbp)
fldt   -0x60(%rbp)
fldt   0xd9a(%rip)
faddp  %st,%st(1)
fstpt  -0x60(%rbp)
fldt   -0x60(%rbp)
fldt   -0x40(%rbp)
fmulp  %st,%st(1)
fstpt  -0x60(%rbp)
fldt   -0x60(%rbp)
fldt   0xd91(%rip)
faddp  %st,%st(1)
fstpt  -0x60(%rbp)
fldt   -0x50(%rbp)
fldt   -0x60(%rbp)
fdivrp %st,%st(1)
fstpt  -0x70(%rbp)
fldt   -0x70(%rbp)
fldt   -0x30(%rbp)
fmulp  %st,%st(1)
fstpt  -0x70(%rbp)
fldt   -0x70(%rbp)
fldt   -0x30(%rbp)
faddp  %st,%st(1)
fstpt  -0x70(%rbp)
fldt   -0x20(%rbp)
fldz
fucomip %st(1),%st
fstp   %st(0)
jbe    13ae <acosd+0x29e>
jmp    1369 <acosd+0x259>
cmpq   $0x0,-0x78(%rbp)
jne    1391 <acosd+0x281>
fldt   -0x70(%rbp)
fldt   0xd53(%rip)
fadd   %st,%st(1)
fxch   %st(1)
fstpt  -0x70(%rbp)
fldt   -0x70(%rbp)
faddp  %st,%st(1)
fstpt  -0x70(%rbp)
jmp    13a9 <acosd+0x299>
fldt   -0x70(%rbp)
fldt   0xc86(%rip)
fadd   %st,%st(1)
fxch   %st(1)
fstpt  -0x70(%rbp)
fldt   -0x70(%rbp)
faddp  %st,%st(1)
fstpt  -0x70(%rbp)
jmp    13e3 <acosd+0x2d3>
cmpq   $0x1,-0x78(%rbp)
jne    13d6 <acosd+0x2c6>
fldt   -0x70(%rbp)
fldt   0xc5e(%rip)
fsub   %st,%st(1)
fxch   %st(1)
fstpt  -0x70(%rbp)
fldt   -0x70(%rbp)
faddp  %st,%st(1)
fstpt  -0x70(%rbp)
jmp    13de <acosd+0x2ce>
fldt   -0x70(%rbp)
fchs
fstpt  -0x70(%rbp)
jmp    13e3 <acosd+0x2d3>
fldt   -0x70(%rbp)
fstpt  -0x10(%rbp)
fldt   -0x10(%rbp)
add    $0x90,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<acosd>:
sub    $0x58,%rsp
fldt   0x60(%rsp)
fldz
fucomi %st(1),%st
fld    %st(1)
fchs
fld    %st(2)
fcmovnbe %st(1),%st
fstp   %st(1)
flds   0xed4(%rip)
fxch   %st(1)
fucomi %st(1),%st
jbe    1147 <acosd+0x37>
fld1
fxch   %st(1)
fucomi %st(1),%st
jbe    115c <acosd+0x4c>
fstp   %st(1)
fstp   %st(3)
fstp   %st(2)
fstp   %st(1)
add    $0x58,%rsp
ret
fldt   0xec3(%rip)
fucomip %st(1),%st
jbe    11aa <acosd+0x9a>
fstp   %st(2)
fstp   %st(1)
fstp   %st(0)
jmp    1249 <acosd+0x139>
fsubr  %st,%st(1)
fxch   %st(1)
fmuls  0xe9a(%rip)
fld    %st(0)
fstpt  0x1c(%rsp)
fstpt  (%rsp)
xor    %eax,%eax
fstpt  0x4c(%rsp)
fstpt  0x40(%rsp)
fstpt  0x34(%rsp)
fstpt  0x28(%rsp)
call   1030 <sqrtd@plt>
fldt   0x28(%rsp)
fldt   0x1c(%rsp)
fldt   0x34(%rsp)
fldt   0x40(%rsp)
fldt   0x4c(%rsp)
mov    %eax,0x18(%rsp)
fildl  0x18(%rsp)
fmuls  0xe5c(%rip)
jmp    11ba <acosd+0xaa>
fld    %st(0)
fmul   %st(1),%st
fld    %st(1)
fxch   %st(1)
fxch   %st(4)
fxch   %st(3)
fxch   %st(2)
fxch   %st(1)
fxch   %st(3)
fucomip %st(5),%st
fstp   %st(4)
fldt   0xe6a(%rip)
fmul   %st(3),%st
fldt   0xe72(%rip)
faddp  %st,%st(1)
fmul   %st(3),%st
fldt   0xe78(%rip)
faddp  %st,%st(1)
fmul   %st(3),%st
fldt   0xe7e(%rip)
faddp  %st,%st(1)
fmul   %st(3),%st
fldt   0xe84(%rip)
faddp  %st,%st(1)
fmul   %st(3),%st
fldt   0xe8a(%rip)
fadd   %st(4),%st
fmul   %st(4),%st
fldt   0xe90(%rip)
faddp  %st,%st(1)
fmul   %st(4),%st
fldt   0xe96(%rip)
faddp  %st,%st(1)
fmul   %st(4),%st
fldt   0xe9c(%rip)
faddp  %st,%st(1)
fmulp  %st,%st(4)
fldt   0xea2(%rip)
faddp  %st,%st(4)
fdivp  %st,%st(3)
fxch   %st(2)
fmul   %st(1),%st
faddp  %st,%st(1)
jbe    123a <acosd+0x12a>
fxch   %st(2)
fucomip %st(1),%st
fstp   %st(0)
jbe    1253 <acosd+0x143>
fldt   0xe98(%rip)
jmp    1259 <acosd+0x149>
fxch   %st(2)
fucomip %st(1),%st
fstp   %st(0)
jbe    1249 <acosd+0x139>
fchs
add    $0x58,%rsp
ret
fldt   0xdd1(%rip)
fsub   %st,%st(1)
jmp    125b <acosd+0x14b>
fldt   0xdc7(%rip)
fadd   %st,%st(1)
faddp  %st,%st(1)
add    $0x58,%rsp
ret

LLVM IR (-O0):
define x86_fp80 @acosd(x86_fp80 %0) {
%2 = alloca x86_fp80
%3 = alloca x86_fp80
%4 = alloca x86_fp80
%5 = alloca x86_fp80
%6 = alloca x86_fp80
%7 = alloca x86_fp80
%8 = alloca x86_fp80
%9 = alloca i64
store x86_fp80 %0, x86_fp80* %3
%10 = load x86_fp80, x86_fp80* %3
store x86_fp80 %10, x86_fp80* %4
%11 = load x86_fp80, x86_fp80* %4
%12 = fcmp olt x86_fp80 %11, 0xK00000000000000000000
br i1 %12, label %13, label %16
13: ; preds = %1
%14 = load x86_fp80, x86_fp80* %4
%15 = fneg x86_fp80 %14
store x86_fp80 %15, x86_fp80* %4
br label %16
16: ; preds = %13, %1
%17 = load x86_fp80, x86_fp80* %4
%18 = fcmp ogt x86_fp80 %17, 0xK3FFE8000000000000000
br i1 %18, label %19, label %34
19: ; preds = %16
store i64 0, i64* %9
%20 = load x86_fp80, x86_fp80* %4
%21 = fcmp ogt x86_fp80 %20, 0xK3FFF8000000000000000
br i1 %21, label %22, label %24
22: ; preds = %19
store x86_fp80 0xK00000000000000000000, x86_fp80* %8
%23 = load x86_fp80, x86_fp80* %8
store x86_fp80 %23, x86_fp80* %2
br label %141
24: ; preds = %19
%25 = load x86_fp80, x86_fp80* %4
%26 = fsub x86_fp80 0xK3FFF8000000000000000, %25
store x86_fp80 %26, x86_fp80* %5
%27 = load x86_fp80, x86_fp80* %5
%28 = fmul x86_fp80 0xK3FFE8000000000000000, %27
store x86_fp80 %28, x86_fp80* %5
%29 = load x86_fp80, x86_fp80* %5
%30 = call i32 (x86_fp80, ...) bitcast (i32 (...)* @sqrtd to i32 (x86_fp80, ...)*)(x86_fp80 %29)
%31 = sitofp i32 %30 to x86_fp80
store x86_fp80 %31, x86_fp80* %4
%32 = load x86_fp80, x86_fp80* %4
%33 = fmul x86_fp80 %32, 0xKC0008000000000000000
store x86_fp80 %33, x86_fp80* %4
br label %57
34: ; preds = %16
store i64 1, i64* %9
%35 = load x86_fp80, x86_fp80* %4
%36 = fcmp olt x86_fp80 %35, 0xK3FE580000000001622D7
br i1 %36, label %37, label %53
37: ; preds = %34
%38 = load x86_fp80, x86_fp80* %4
store x86_fp80 %38, x86_fp80* %8
%39 = load x86_fp80, x86_fp80* %3
%40 = fcmp olt x86_fp80 %39, 0xK00000000000000000000
br i1 %40, label %41, label %46
41: ; preds = %37
%42 = load x86_fp80, x86_fp80* %8
%43 = fadd x86_fp80 0xK3FFEC90FDAA22168C235, %42
store x86_fp80 %43, x86_fp80* %8
%44 = load x86_fp80, x86_fp80* %8
%45 = fadd x86_fp80 %44, 0xK3FFEC90FDAA22168C235
store x86_fp80 %45, x86_fp80* %8
br label %51
46: ; preds = %37
%47 = load x86_fp80, x86_fp80* %8
%48 = fsub x86_fp80 0xK3FFEC90FDAA22168C235, %47
store x86_fp80 %48, x86_fp80* %8
%49 = load x86_fp80, x86_fp80* %8
%50 = fadd x86_fp80 %49, 0xK3FFEC90FDAA22168C235
store x86_fp80 %50, x86_fp80* %8
br label %51
51: ; preds = %46, %41
%52 = load x86_fp80, x86_fp80* %8
store x86_fp80 %52, x86_fp80* %2
br label %141
53: ; preds = %34
%54 = load x86_fp80, x86_fp80* %4
%55 = load x86_fp80, x86_fp80* %4
%56 = fmul x86_fp80 %54, %55
store x86_fp80 %56, x86_fp80* %5
br label %57
57: ; preds = %53, %24
%58 = load x86_fp80, x86_fp80* %5
%59 = fmul x86_fp80 0xKBFFEB25DEDAF30F3242C, %58
store x86_fp80 %59, x86_fp80* %6
%60 = load x86_fp80, x86_fp80* %6
%61 = fadd x86_fp80 %60, 0xK4002A270BB2761C93957
store x86_fp80 %61, x86_fp80* %6
%62 = load x86_fp80, x86_fp80* %6
%63 = load x86_fp80, x86_fp80* %5
%64 = fmul x86_fp80 %62, %63
store x86_fp80 %64, x86_fp80* %6
%65 = load x86_fp80, x86_fp80* %6
%66 = fadd x86_fp80 %65, 0xKC0049EC1654D36D4F820
store x86_fp80 %66, x86_fp80* %6
%67 = load x86_fp80, x86_fp80* %6
%68 = load x86_fp80, x86_fp80* %5
%69 = fmul x86_fp80 %67, %68
store x86_fp80 %69, x86_fp80* %6
%70 = load x86_fp80, x86_fp80* %6
%71 = fadd x86_fp80 %70, 0xK4004E4D539B056A451AD
store x86_fp80 %71, x86_fp80* %6
%72 = load x86_fp80, x86_fp80* %6
%73 = load x86_fp80, x86_fp80* %5
%74 = fmul x86_fp80 %72, %73
store x86_fp80 %74, x86_fp80* %6
%75 = load x86_fp80, x86_fp80* %6
%76 = fadd x86_fp80 %75, 0xKC003DAF2AD41D05311C4
store x86_fp80 %76, x86_fp80* %6
%77 = load x86_fp80, x86_fp80* %6
%78 = load x86_fp80, x86_fp80* %5
%79 = fmul x86_fp80 %77, %78
store x86_fp80 %79, x86_fp80* %6
%80 = load x86_fp80, x86_fp80* %5
%81 = fadd x86_fp80 %80, 0xKC003BE974377CC30F9E6
store x86_fp80 %81, x86_fp80* %7
%82 = load x86_fp80, x86_fp80* %7
%83 = load x86_fp80, x86_fp80* %5
%84 = fmul x86_fp80 %82, %83
store x86_fp80 %84, x86_fp80* %7
%85 = load x86_fp80, x86_fp80* %7
%86 = fadd x86_fp80 %85, 0xK400696F3E4B2C8E37CBC
store x86_fp80 %86, x86_fp80* %7
%87 = load x86_fp80, x86_fp80* %7
%88 = load x86_fp80, x86_fp80* %5
%89 = fmul x86_fp80 %87, %88
store x86_fp80 %89, x86_fp80* %7
%90 = load x86_fp80, x86_fp80* %7
%91 = fadd x86_fp80 %90, 0xKC007BEEE77E2B5423CF3
store x86_fp80 %91, x86_fp80* %7
%92 = load x86_fp80, x86_fp80* %7
%93 = load x86_fp80, x86_fp80* %5
%94 = fmul x86_fp80 %92, %93
store x86_fp80 %94, x86_fp80* %7
%95 = load x86_fp80, x86_fp80* %7
%96 = fadd x86_fp80 %95, 0xK4007D0927880F5C2170B
store x86_fp80 %96, x86_fp80* %7
%97 = load x86_fp80, x86_fp80* %7
%98 = load x86_fp80, x86_fp80* %5
%99 = fmul x86_fp80 %97, %98
store x86_fp80 %99, x86_fp80* %7
%100 = load x86_fp80, x86_fp80* %7
%101 = fadd x86_fp80 %100, 0xKC006A43601F15C3E6196
store x86_fp80 %101, x86_fp80* %7
%102 = load x86_fp80, x86_fp80* %6
%103 = load x86_fp80, x86_fp80* %7
%104 = fdiv x86_fp80 %102, %103
store x86_fp80 %104, x86_fp80* %8
%105 = load x86_fp80, x86_fp80* %8
%106 = load x86_fp80, x86_fp80* %4
%107 = fmul x86_fp80 %105, %106
store x86_fp80 %107, x86_fp80* %8
%108 = load x86_fp80, x86_fp80* %8
%109 = load x86_fp80, x86_fp80* %4
%110 = fadd x86_fp80 %108, %109
store x86_fp80 %110, x86_fp80* %8
%111 = load x86_fp80, x86_fp80* %3
%112 = fcmp olt x86_fp80 %111, 0xK00000000000000000000
br i1 %112, label %113, label %127
113: ; preds = %57
%114 = load i64, i64* %9
%115 = icmp eq i64 %114, 0
br i1 %115, label %116, label %121
116: ; preds = %113
%117 = load x86_fp80, x86_fp80* %8
%118 = fadd x86_fp80 %117, 0xK3FFFC90FDAA22168C235
store x86_fp80 %118, x86_fp80* %8
%119 = load x86_fp80, x86_fp80* %8
%120 = fadd x86_fp80 %119, 0xK3FFFC90FDAA22168C235
store x86_fp80 %120, x86_fp80* %8
br label %126
121: ; preds = %113
%122 = load x86_fp80, x86_fp80* %8
%123 = fadd x86_fp80 0xK3FFEC90FDAA22168C235, %122
store x86_fp80 %123, x86_fp80* %8
%124 = load x86_fp80, x86_fp80* %8
%125 = fadd x86_fp80 %124, 0xK3FFEC90FDAA22168C235
store x86_fp80 %125, x86_fp80* %8
br label %126
126: ; preds = %121, %116
br label %139
127: ; preds = %57
%128 = load i64, i64* %9
%129 = icmp eq i64 %128, 1
br i1 %129, label %130, label %135
130: ; preds = %127
%131 = load x86_fp80, x86_fp80* %8
%132 = fsub x86_fp80 0xK3FFEC90FDAA22168C235, %131
store x86_fp80 %132, x86_fp80* %8
%133 = load x86_fp80, x86_fp80* %8
%134 = fadd x86_fp80 %133, 0xK3FFEC90FDAA22168C235
store x86_fp80 %134, x86_fp80* %8
br label %138
135: ; preds = %127
%136 = load x86_fp80, x86_fp80* %8
%137 = fneg x86_fp80 %136
store x86_fp80 %137, x86_fp80* %8
br label %138
138: ; preds = %135, %130
br label %139
139: ; preds = %138, %126
%140 = load x86_fp80, x86_fp80* %8
store x86_fp80 %140, x86_fp80* %2
br label %141
141: ; preds = %139, %51, %22
%142 = load x86_fp80, x86_fp80* %2
ret x86_fp80 %142
}

LLVM IR (-O2):
define x86_fp80 @acosd(x86_fp80 %0) {
%2 = fcmp olt x86_fp80 %0, 0xK00000000000000000000
%3 = fneg x86_fp80 %0
%4 = select i1 %2, x86_fp80 %3, x86_fp80 %0
%5 = fcmp ogt x86_fp80 %4, 0xK3FFE8000000000000000
br i1 %5, label %6, label %14
6: ; preds = %1
%7 = fcmp ogt x86_fp80 %4, 0xK3FFF8000000000000000
br i1 %7, label %58, label %8
8: ; preds = %6
%9 = fsub x86_fp80 0xK3FFF8000000000000000, %4
%10 = fmul x86_fp80 %9, 0xK3FFE8000000000000000
%11 = tail call i32 (x86_fp80, ...) bitcast (i32 (...)* @sqrtd to i32 (x86_fp80, ...)*)(x86_fp80 %10)
%12 = sitofp i32 %11 to x86_fp80
%13 = fmul x86_fp80 %12, 0xKC0008000000000000000
br label %21
14: ; preds = %1
%15 = fcmp olt x86_fp80 %4, 0xK3FE580000000001622D7
br i1 %15, label %16, label %19
16: ; preds = %14
%17 = fsub x86_fp80 0xK3FFEC90FDAA22168C235, %0
%18 = fadd x86_fp80 %17, 0xK3FFEC90FDAA22168C235
br label %58
19: ; preds = %14
%20 = fmul x86_fp80 %4, %4
br label %21
21: ; preds = %19, %8
%22 = phi x86_fp80 [ %10, %8 ], [ %20, %19 ]
%23 = phi x86_fp80 [ %13, %8 ], [ %4, %19 ]
%24 = fmul x86_fp80 %22, 0xK3FFEB25DEDAF30F3242C
%25 = fsub x86_fp80 0xK4002A270BB2761C93957, %24
%26 = fmul x86_fp80 %22, %25
%27 = fadd x86_fp80 %26, 0xKC0049EC1654D36D4F820
%28 = fmul x86_fp80 %22, %27
%29 = fadd x86_fp80 %28, 0xK4004E4D539B056A451AD
%30 = fmul x86_fp80 %22, %29
%31 = fadd x86_fp80 %30, 0xKC003DAF2AD41D05311C4
%32 = fmul x86_fp80 %22, %31
%33 = fadd x86_fp80 %22, 0xKC003BE974377CC30F9E6
%34 = fmul x86_fp80 %22, %33
%35 = fadd x86_fp80 %34, 0xK400696F3E4B2C8E37CBC
%36 = fmul x86_fp80 %22, %35
%37 = fadd x86_fp80 %36, 0xKC007BEEE77E2B5423CF3
%38 = fmul x86_fp80 %22, %37
%39 = fadd x86_fp80 %38, 0xK4007D0927880F5C2170B
%40 = fmul x86_fp80 %22, %39
%41 = fadd x86_fp80 %40, 0xKC006A43601F15C3E6196
%42 = fdiv x86_fp80 %32, %41
%43 = fmul x86_fp80 %23, %42
%44 = fadd x86_fp80 %23, %43
br i1 %2, label %45, label %52
45: ; preds = %21
br i1 %5, label %46, label %49
46: ; preds = %45
%47 = fadd x86_fp80 %44, 0xK3FFFC90FDAA22168C235
%48 = fadd x86_fp80 %47, 0xK3FFFC90FDAA22168C235
br label %58
49: ; preds = %45
%50 = fadd x86_fp80 %44, 0xK3FFEC90FDAA22168C235
%51 = fadd x86_fp80 %50, 0xK3FFEC90FDAA22168C235
br label %58
52: ; preds = %21
br i1 %5, label %56, label %53
53: ; preds = %52
%54 = fsub x86_fp80 0xK3FFEC90FDAA22168C235, %44
%55 = fadd x86_fp80 %54, 0xK3FFEC90FDAA22168C235
br label %58
56: ; preds = %52
%57 = fneg x86_fp80 %44
br label %58
58: ; preds = %49, %46, %56, %53, %6, %16
%59 = phi x86_fp80 [ %18, %16 ], [ 0xK00000000000000000000, %6 ], [ %48, %46 ], [ %51, %49 ], [ %55, %53 ], [ %57, %56 ]
ret x86_fp80 %59
}