long double cotd(long double x) {
  long int n;
  long double xn;
  long double f, g;
  long double x_int, x_fract;
  long double result;
  long double xnum, xden;
  if ((x > ((421657424.0L))) || (x < -((421657424.0L))) || (x == 0.0L)) {
    return 0.0L;
  }
  x_int = ((long double)(((long)(x))));
  x_fract = ((long double)(x) - (long double)(x_int));
  if (x > 0.0) {
    n = ((long)((
        (long double)(((long double)(x) *
                       (long double)((0.63661977236758134307553505349006L)))) +
        (long double)(0.5))));
  } else {
    n = ((long)((
        (long double)(((long double)(x) *
                       (long double)((0.63661977236758134307553505349006L)))) +
        (long double)(-0.5))));
  }
  xn = ((long double)(n));
  f = ((long double)(x_int) -
       (long double)(((long double)(xn) * (long double)((1.57080078125L)))));
  f = ((long double)(f) + (long double)(x_fract));
  f = ((long double)(f) -
       (long double)(((long double)(xn) *
                      (long double)((-4.45445516561449039727449417114e-6L)))));
  f = ((long double)(f) -
       (long double)(((long double)(xn) *
                      (long double)((6.2233721718966133922584676705e-14L)))));
  if (f < 0.0L) {
    g = -f;
  } else {
    g = f;
  }
  if (g < (+1.490116119385e-8L)) {
    if (n & 0x0001) {
      result = -f;
    } else {
      result = ((long double)(1.0L) / (long double)(f));
    }
    return result;
  }
  g = ((long double)(f) * (long double)(f));
  xnum = ((long double)(g) * (long double)((-1.7861707342254424711e-5L)));
  xnum = ((long double)(xnum) + (long double)((+3.4248878235890589960e-3L)));
  xnum = ((long double)(xnum) * (long double)(g));
  xnum = ((long double)(xnum) + (long double)((-1.3338350006421960681e-1L)));
  xnum = ((long double)(xnum) * (long double)(g));
  xnum = ((long double)(xnum) * (long double)(f));
  xnum = ((long double)(xnum) + (long double)(f));
  xden = ((long double)(g) * (long double)((+4.9819433993786512270e-7L)));
  xden = ((long double)(xden) + (long double)((-3.1181531907010027307e-4L)));
  xden = ((long double)(xden) * (long double)(g));
  xden = ((long double)(xden) + (long double)((+2.5663832289440112864e-2L)));
  xden = ((long double)(xden) * (long double)(g));
  xden = ((long double)(xden) + (long double)((-4.6671683339755294240e-1L)));
  xden = ((long double)(xden) * (long double)(g));
  xden = ((long double)(xden) + (long double)((+1.0000000000000000000L)));
  if (n & 0x0001) {
    xnum = -xnum;
  } else {
    result = xden;
    xden = xnum;
    xnum = result;
  }
  result = ((long double)(xnum) / (long double)(xden));
  return result;
}


x86 assembly (clang, -O0):
<cotd>:
push   %rbp
mov    %rsp,%rbp
sub    $0x70,%rsp
fldt   0x10(%rbp)
fstpt  -0x20(%rbp)
fldt   -0x20(%rbp)
fldl   0xee9(%rip)
fxch   %st(1)
fucomip %st(1),%st
fstp   %st(0)
ja     115c <cotd+0x5c>
jmp    1128 <cotd+0x28>
fldt   -0x20(%rbp)
fldl   0xed7(%rip)
fucomip %st(1),%st
fstp   %st(0)
ja     115c <cotd+0x5c>
jmp    1140 <cotd+0x40>
fldt   -0x20(%rbp)
fldz
fxch   %st(1)
fucomip %st(1),%st
fstp   %st(0)
jne    1166 <cotd+0x66>
jp     1166 <cotd+0x66>
jmp    115c <cotd+0x5c>
fldz
fstpt  -0x10(%rbp)
jmp    14b2 <cotd+0x3b2>
fldt   -0x20(%rbp)
fnstcw -0xda(%rbp)
movzwl -0xda(%rbp),%eax
or     $0xc00,%eax
mov    %ax,-0xdc(%rbp)
fldcw  -0xdc(%rbp)
fistpll -0xc0(%rbp)
fldcw  -0xda(%rbp)
mov    -0xc0(%rbp),%rax
mov    %rax,-0xb8(%rbp)
fildll -0xb8(%rbp)
fstpt  -0x70(%rbp)
fldt   -0x20(%rbp)
fldt   -0x70(%rbp)
fsubrp %st,%st(1)
fstpt  -0x80(%rbp)
fldt   -0x20(%rbp)
fldz
fxch   %st(1)
fucomip %st(1),%st
fstp   %st(0)
jbe    121a <cotd+0x11a>
jmp    11cc <cotd+0xcc>
fldt   -0x20(%rbp)
fldt   0xe4b(%rip)
fmulp  %st,%st(1)
flds   0xee7(%rip)
faddp  %st,%st(1)
fnstcw -0xde(%rbp)
movzwl -0xde(%rbp),%eax
or     $0xc00,%eax
mov    %ax,-0xe0(%rbp)
fldcw  -0xe0(%rbp)
fistpll -0xd0(%rbp)
fldcw  -0xde(%rbp)
mov    -0xd0(%rbp),%rax
mov    %rax,-0x28(%rbp)
jmp    1263 <cotd+0x163>
fldt   -0x20(%rbp)
fldt   0xdfd(%rip)
fmulp  %st,%st(1)
flds   0xe95(%rip)
faddp  %st,%st(1)
fnstcw -0xe2(%rbp)
movzwl -0xe2(%rbp),%eax
or     $0xc00,%eax
mov    %ax,-0xe4(%rbp)
fldcw  -0xe4(%rbp)
fistpll -0xc8(%rbp)
fldcw  -0xe2(%rbp)
mov    -0xc8(%rbp),%rax
mov    %rax,-0x28(%rbp)
mov    -0x28(%rbp),%rax
mov    %rax,-0xd8(%rbp)
fildll -0xd8(%rbp)
fstpt  -0x40(%rbp)
fldt   -0x70(%rbp)
fldt   -0x40(%rbp)
flds   0xe45(%rip)
fmulp  %st,%st(1)
faddp  %st,%st(1)
fstpt  -0x50(%rbp)
fldt   -0x50(%rbp)
fldt   -0x80(%rbp)
faddp  %st,%st(1)
fstpt  -0x50(%rbp)
fldt   -0x50(%rbp)
fldt   -0x40(%rbp)
fldl   0xd6f(%rip)
fmulp  %st,%st(1)
faddp  %st,%st(1)
fstpt  -0x50(%rbp)
fldt   -0x50(%rbp)
fldt   -0x40(%rbp)
fldt   0xd7c(%rip)
fmulp  %st,%st(1)
faddp  %st,%st(1)
fstpt  -0x50(%rbp)
fldt   -0x50(%rbp)
fldz
fucomip %st(1),%st
fstp   %st(0)
jbe    12dc <cotd+0x1dc>
jmp    12cf <cotd+0x1cf>
fldt   -0x50(%rbp)
fchs
fstpt  -0x60(%rbp)
jmp    12e2 <cotd+0x1e2>
fldt   -0x50(%rbp)
fstpt  -0x60(%rbp)
fldt   -0x60(%rbp)
fldt   0xd55(%rip)
fucomip %st(1),%st
fstp   %st(0)
jbe    1337 <cotd+0x237>
jmp    12fa <cotd+0x1fa>
mov    -0x28(%rbp),%rax
and    $0x1,%rax
cmp    $0x0,%rax
je     131c <cotd+0x21c>
fldt   -0x50(%rbp)
fchs
fstpt  -0x90(%rbp)
jmp    1329 <cotd+0x229>
fldt   -0x50(%rbp)
fld1
fdivp  %st,%st(1)
fstpt  -0x90(%rbp)
fldt   -0x90(%rbp)
fstpt  -0x10(%rbp)
jmp    14b2 <cotd+0x3b2>
fldt   -0x50(%rbp)
fmul   %st,%st(0)
fstpt  -0x60(%rbp)
fldt   -0x60(%rbp)
fldt   0xd08(%rip)
fmulp  %st,%st(1)
fstpt  -0xa0(%rbp)
fldt   -0xa0(%rbp)
fldt   0xd04(%rip)
faddp  %st,%st(1)
fstpt  -0xa0(%rbp)
fldt   -0xa0(%rbp)
fldt   -0x60(%rbp)
fmulp  %st,%st(1)
fstpt  -0xa0(%rbp)
fldt   -0xa0(%rbp)
fldt   0xcef(%rip)
faddp  %st,%st(1)
fstpt  -0xa0(%rbp)
fldt   -0xa0(%rbp)
fldt   -0x60(%rbp)
fmulp  %st,%st(1)
fstpt  -0xa0(%rbp)
fldt   -0xa0(%rbp)
fldt   -0x50(%rbp)
fmulp  %st,%st(1)
fstpt  -0xa0(%rbp)
fldt   -0xa0(%rbp)
fldt   -0x50(%rbp)
faddp  %st,%st(1)
fstpt  -0xa0(%rbp)
fldt   -0x60(%rbp)
fldt   0xcbb(%rip)
fmulp  %st,%st(1)
fstpt  -0xb0(%rbp)
fldt   -0xb0(%rbp)
fldt   0xcb7(%rip)
faddp  %st,%st(1)
fstpt  -0xb0(%rbp)
fldt   -0xb0(%rbp)
fldt   -0x60(%rbp)
fmulp  %st,%st(1)
fstpt  -0xb0(%rbp)
fldt   -0xb0(%rbp)
fldt   0xca2(%rip)
faddp  %st,%st(1)
fstpt  -0xb0(%rbp)
fldt   -0xb0(%rbp)
fldt   -0x60(%rbp)
fmulp  %st,%st(1)
fstpt  -0xb0(%rbp)
fldt   -0xb0(%rbp)
fldt   0xc8d(%rip)
faddp  %st,%st(1)
fstpt  -0xb0(%rbp)
fldt   -0xb0(%rbp)
fldt   -0x60(%rbp)
fmulp  %st,%st(1)
fstpt  -0xb0(%rbp)
fldt   -0xb0(%rbp)
fld1
faddp  %st,%st(1)
fstpt  -0xb0(%rbp)
mov    -0x28(%rbp),%rax
and    $0x1,%rax
cmp    $0x0,%rax
je     1471 <cotd+0x371>
fldt   -0xa0(%rbp)
fchs
fstpt  -0xa0(%rbp)
jmp    1495 <cotd+0x395>
fldt   -0xb0(%rbp)
fstpt  -0x90(%rbp)
fldt   -0xa0(%rbp)
fstpt  -0xb0(%rbp)
fldt   -0x90(%rbp)
fstpt  -0xa0(%rbp)
fldt   -0xa0(%rbp)
fldt   -0xb0(%rbp)
fdivrp %st,%st(1)
fstpt  -0x90(%rbp)
fldt   -0x90(%rbp)
fstpt  -0x10(%rbp)
fldt   -0x10(%rbp)
add    $0x70,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<cotd>:
fldt   0x8(%rsp)
fldz
fxch   %st(1)
fucomi %st(1),%st
jne    1112 <cotd+0x12>
jnp    11ff <cotd+0xff>
fldl   0xee8(%rip)
fxch   %st(1)
fucomi %st(1),%st
fstp   %st(1)
ja     11ff <cotd+0xff>
fldl   0xede(%rip)
fucomip %st(1),%st
ja     1265 <cotd+0x165>
fstp   %st(1)
fnstcw -0x26(%rsp)
movzwl -0x26(%rsp),%eax
or     $0xc00,%eax
mov    %ax,-0x22(%rsp)
fldcw  -0x22(%rsp)
fld    %st(0)
fistpll -0x20(%rsp)
fldcw  -0x26(%rsp)
fldz
xor    %eax,%eax
fxch   %st(1)
fucomi %st(1),%st
seta   %al
mov    -0x20(%rsp),%rcx
mov    %rcx,-0x18(%rsp)
fildll -0x18(%rsp)
fld    %st(1)
fsub   %st(1),%st
fldt   0xea8(%rip)
fmulp  %st,%st(3)
shl    $0x4,%rax
lea    0xf3b(%rip),%rcx
fldt   (%rax,%rcx,1)
faddp  %st,%st(3)
fnstcw -0x28(%rsp)
movzwl -0x28(%rsp),%eax
or     $0xc00,%eax
mov    %ax,-0x24(%rsp)
fldcw  -0x24(%rsp)
fxch   %st(2)
fistpll -0x10(%rsp)
fldcw  -0x28(%rsp)
mov    -0x10(%rsp),%rax
mov    %rax,-0x8(%rsp)
fildll -0x8(%rsp)
fld    %st(0)
fmuls  0xf1f(%rip)
faddp  %st,%st(2)
fxch   %st(2)
faddp  %st,%st(1)
fld    %st(1)
fmull  0xe41(%rip)
faddp  %st,%st(1)
fldt   0xe59(%rip)
fmulp  %st,%st(2)
faddp  %st,%st(1)
fxch   %st(1)
fucomip %st(1),%st
fld    %st(0)
fchs
fld    %st(1)
fcmovnbe %st(1),%st
fldt   0xe53(%rip)
fucomip %st(1),%st
fstp   %st(0)
jbe    1203 <cotd+0x103>
test   $0x1,%al
fxch   %st(1)
jne    1265 <cotd+0x165>
fstp   %st(1)
fld1
jmp    1261 <cotd+0x161>
fstp   %st(0)
jmp    1263 <cotd+0x163>
fstp   %st(0)
fld    %st(0)
fmul   %st(1),%st
fldt   0xe41(%rip)
fmul   %st(1),%st
fldt   0xe49(%rip)
faddp  %st,%st(1)
fmul   %st(1),%st
fldt   0xe4f(%rip)
faddp  %st,%st(1)
fmul   %st(1),%st
fmul   %st(2),%st
faddp  %st,%st(2)
fldt   0xe51(%rip)
fmul   %st(1),%st
fldt   0xe59(%rip)
faddp  %st,%st(1)
fmul   %st(1),%st
fldt   0xe5f(%rip)
faddp  %st,%st(1)
fmul   %st(1),%st
fldt   0xe65(%rip)
faddp  %st,%st(1)
fmulp  %st,%st(1)
fld1
faddp  %st,%st(1)
test   $0x1,%al
fld    %st(1)
fchs
fcmove %st(1),%st
fxch   %st(1)
fcmove %st(2),%st
fstp   %st(2)
fdivp  %st,%st(1)
fldz
fstp   %st(0)
ret

LLVM IR (-O0):
define x86_fp80 @cotd(x86_fp80 %0) {
%2 = alloca x86_fp80
%3 = alloca x86_fp80
%4 = alloca i64
%5 = alloca x86_fp80
%6 = alloca x86_fp80
%7 = alloca x86_fp80
%8 = alloca x86_fp80
%9 = alloca x86_fp80
%10 = alloca x86_fp80
%11 = alloca x86_fp80
%12 = alloca x86_fp80
store x86_fp80 %0, x86_fp80* %3
%13 = load x86_fp80, x86_fp80* %3
%14 = fcmp ogt x86_fp80 %13, 0xK401BC90FDA8000000000
br i1 %14, label %21, label %15
15: ; preds = %1
%16 = load x86_fp80, x86_fp80* %3
%17 = fcmp olt x86_fp80 %16, 0xKC01BC90FDA8000000000
br i1 %17, label %21, label %18
18: ; preds = %15
%19 = load x86_fp80, x86_fp80* %3
%20 = fcmp oeq x86_fp80 %19, 0xK00000000000000000000
br i1 %20, label %21, label %22
21: ; preds = %18, %15, %1
store x86_fp80 0xK00000000000000000000, x86_fp80* %2
br label %135
22: ; preds = %18
%23 = load x86_fp80, x86_fp80* %3
%24 = fptosi x86_fp80 %23 to i64
%25 = sitofp i64 %24 to x86_fp80
store x86_fp80 %25, x86_fp80* %8
%26 = load x86_fp80, x86_fp80* %3
%27 = load x86_fp80, x86_fp80* %8
%28 = fsub x86_fp80 %26, %27
store x86_fp80 %28, x86_fp80* %9
%29 = load x86_fp80, x86_fp80* %3
%30 = fcmp ogt x86_fp80 %29, 0xK00000000000000000000
br i1 %30, label %31, label %35
31: ; preds = %22
%32 = load x86_fp80, x86_fp80* %3
%33 = call x86_fp80 @llvm.fmuladd.f80(x86_fp80 %32, x86_fp80 0xK3FFEA2F9836E4E44152A, x86_fp80 0xK3FFE8000000000000000)
%34 = fptosi x86_fp80 %33 to i64
store i64 %34, i64* %4
br label %39
35: ; preds = %22
%36 = load x86_fp80, x86_fp80* %3
%37 = call x86_fp80 @llvm.fmuladd.f80(x86_fp80 %36, x86_fp80 0xK3FFEA2F9836E4E44152A, x86_fp80 0xKBFFE8000000000000000)
%38 = fptosi x86_fp80 %37 to i64
store i64 %38, i64* %4
br label %39
39: ; preds = %35, %31
%40 = load i64, i64* %4
%41 = sitofp i64 %40 to x86_fp80
store x86_fp80 %41, x86_fp80* %5
%42 = load x86_fp80, x86_fp80* %8
%43 = load x86_fp80, x86_fp80* %5
%44 = fneg x86_fp80 %43
%45 = call x86_fp80 @llvm.fmuladd.f80(x86_fp80 %44, x86_fp80 0xK3FFFC910000000000000, x86_fp80 %42)
store x86_fp80 %45, x86_fp80* %6
%46 = load x86_fp80, x86_fp80* %6
%47 = load x86_fp80, x86_fp80* %9
%48 = fadd x86_fp80 %46, %47
store x86_fp80 %48, x86_fp80* %6
%49 = load x86_fp80, x86_fp80* %6
%50 = load x86_fp80, x86_fp80* %5
%51 = fneg x86_fp80 %50
%52 = call x86_fp80 @llvm.fmuladd.f80(x86_fp80 %51, x86_fp80 0xKBFED95777A8000000000, x86_fp80 %49)
store x86_fp80 %52, x86_fp80* %6
%53 = load x86_fp80, x86_fp80* %6
%54 = load x86_fp80, x86_fp80* %5
%55 = fneg x86_fp80 %54
%56 = call x86_fp80 @llvm.fmuladd.f80(x86_fp80 %55, x86_fp80 0xK3FD38C234C4C6628B80E, x86_fp80 %53)
store x86_fp80 %56, x86_fp80* %6
%57 = load x86_fp80, x86_fp80* %6
%58 = fcmp olt x86_fp80 %57, 0xK00000000000000000000
br i1 %58, label %59, label %62
59: ; preds = %39
%60 = load x86_fp80, x86_fp80* %6
%61 = fneg x86_fp80 %60
store x86_fp80 %61, x86_fp80* %7
br label %64
62: ; preds = %39
%63 = load x86_fp80, x86_fp80* %6
store x86_fp80 %63, x86_fp80* %7
br label %64
64: ; preds = %62, %59
%65 = load x86_fp80, x86_fp80* %7
%66 = fcmp olt x86_fp80 %65, 0xK3FE580000000001622D7
br i1 %66, label %67, label %79
67: ; preds = %64
%68 = load i64, i64* %4
%69 = and i64 %68, 1
%70 = icmp ne i64 %69, 0
br i1 %70, label %71, label %74
71: ; preds = %67
%72 = load x86_fp80, x86_fp80* %6
%73 = fneg x86_fp80 %72
store x86_fp80 %73, x86_fp80* %10
br label %77
74: ; preds = %67
%75 = load x86_fp80, x86_fp80* %6
%76 = fdiv x86_fp80 0xK3FFF8000000000000000, %75
store x86_fp80 %76, x86_fp80* %10
br label %77
77: ; preds = %74, %71
%78 = load x86_fp80, x86_fp80* %10
store x86_fp80 %78, x86_fp80* %2
br label %135
79: ; preds = %64
%80 = load x86_fp80, x86_fp80* %6
%81 = load x86_fp80, x86_fp80* %6
%82 = fmul x86_fp80 %80, %81
store x86_fp80 %82, x86_fp80* %7
%83 = load x86_fp80, x86_fp80* %7
%84 = fmul x86_fp80 %83, 0xKBFEF95D5B975163918EF
store x86_fp80 %84, x86_fp80* %11
%85 = load x86_fp80, x86_fp80* %11
%86 = fadd x86_fp80 %85, 0xK3FF6E0741531DD56F650
store x86_fp80 %86, x86_fp80* %11
%87 = load x86_fp80, x86_fp80* %11
%88 = load x86_fp80, x86_fp80* %7
%89 = fmul x86_fp80 %87, %88
store x86_fp80 %89, x86_fp80* %11
%90 = load x86_fp80, x86_fp80* %11
%91 = fadd x86_fp80 %90, 0xKBFFC8895AF2A6847FCD5
store x86_fp80 %91, x86_fp80* %11
%92 = load x86_fp80, x86_fp80* %11
%93 = load x86_fp80, x86_fp80* %7
%94 = fmul x86_fp80 %92, %93
store x86_fp80 %94, x86_fp80* %11
%95 = load x86_fp80, x86_fp80* %11
%96 = load x86_fp80, x86_fp80* %6
%97 = fmul x86_fp80 %95, %96
store x86_fp80 %97, x86_fp80* %11
%98 = load x86_fp80, x86_fp80* %11
%99 = load x86_fp80, x86_fp80* %6
%100 = fadd x86_fp80 %98, %99
store x86_fp80 %100, x86_fp80* %11
%101 = load x86_fp80, x86_fp80* %7
%102 = fmul x86_fp80 %101, 0xK3FEA85BBA783B3C748A9
store x86_fp80 %102, x86_fp80* %12
%103 = load x86_fp80, x86_fp80* %12
%104 = fadd x86_fp80 %103, 0xKBFF3A37B24C84A42092E
store x86_fp80 %104, x86_fp80* %12
%105 = load x86_fp80, x86_fp80* %12
%106 = load x86_fp80, x86_fp80* %7
%107 = fmul x86_fp80 %105, %106
store x86_fp80 %107, x86_fp80* %12
%108 = load x86_fp80, x86_fp80* %12
%109 = fadd x86_fp80 %108, 0xK3FF9D23CF50BF10ACA84
store x86_fp80 %109, x86_fp80* %12
%110 = load x86_fp80, x86_fp80* %12
%111 = load x86_fp80, x86_fp80* %7
%112 = fmul x86_fp80 %110, %111
store x86_fp80 %112, x86_fp80* %12
%113 = load x86_fp80, x86_fp80* %12
%114 = fadd x86_fp80 %113, 0xKBFFDEEF5823FDECEA969
store x86_fp80 %114, x86_fp80* %12
%115 = load x86_fp80, x86_fp80* %12
%116 = load x86_fp80, x86_fp80* %7
%117 = fmul x86_fp80 %115, %116
store x86_fp80 %117, x86_fp80* %12
%118 = load x86_fp80, x86_fp80* %12
%119 = fadd x86_fp80 %118, 0xK3FFF8000000000000000
store x86_fp80 %119, x86_fp80* %12
%120 = load i64, i64* %4
%121 = and i64 %120, 1
%122 = icmp ne i64 %121, 0
br i1 %122, label %123, label %126
123: ; preds = %79
%124 = load x86_fp80, x86_fp80* %11
%125 = fneg x86_fp80 %124
store x86_fp80 %125, x86_fp80* %11
br label %130
126: ; preds = %79
%127 = load x86_fp80, x86_fp80* %12
store x86_fp80 %127, x86_fp80* %10
%128 = load x86_fp80, x86_fp80* %11
store x86_fp80 %128, x86_fp80* %12
%129 = load x86_fp80, x86_fp80* %10
store x86_fp80 %129, x86_fp80* %11
br label %130
130: ; preds = %126, %123
%131 = load x86_fp80, x86_fp80* %11
%132 = load x86_fp80, x86_fp80* %12
%133 = fdiv x86_fp80 %131, %132
store x86_fp80 %133, x86_fp80* %10
%134 = load x86_fp80, x86_fp80* %10
store x86_fp80 %134, x86_fp80* %2
br label %135
135: ; preds = %130, %77, %21
%136 = load x86_fp80, x86_fp80* %2
ret x86_fp80 %136
}

LLVM IR (-O2):
define x86_fp80 @cotd(x86_fp80 %0) {
%2 = fcmp ogt x86_fp80 %0, 0xK401BC90FDA8000000000
%3 = fcmp olt x86_fp80 %0, 0xKC01BC90FDA8000000000
%4 = or i1 %2, %3
%5 = fcmp oeq x86_fp80 %0, 0xK00000000000000000000
%6 = or i1 %5, %4
br i1 %6, label %54, label %7
7: ; preds = %1
%8 = fptosi x86_fp80 %0 to i64
%9 = sitofp i64 %8 to x86_fp80
%10 = fsub x86_fp80 %0, %9
%11 = fcmp ogt x86_fp80 %0, 0xK00000000000000000000
%12 = tail call x86_fp80 @llvm.fmuladd.f80(x86_fp80 %0, x86_fp80 0xK3FFEA2F9836E4E44152A, x86_fp80 0xK3FFE8000000000000000)
%13 = tail call x86_fp80 @llvm.fmuladd.f80(x86_fp80 %0, x86_fp80 0xK3FFEA2F9836E4E44152A, x86_fp80 0xKBFFE8000000000000000)
%14 = select i1 %11, x86_fp80 %12, x86_fp80 %13
%15 = fptosi x86_fp80 %14 to i64
%16 = sitofp i64 %15 to x86_fp80
%17 = fneg x86_fp80 %16
%18 = tail call x86_fp80 @llvm.fmuladd.f80(x86_fp80 %17, x86_fp80 0xK3FFFC910000000000000, x86_fp80 %9)
%19 = fadd x86_fp80 %10, %18
%20 = tail call x86_fp80 @llvm.fmuladd.f80(x86_fp80 %17, x86_fp80 0xKBFED95777A8000000000, x86_fp80 %19)
%21 = tail call x86_fp80 @llvm.fmuladd.f80(x86_fp80 %17, x86_fp80 0xK3FD38C234C4C6628B80E, x86_fp80 %20)
%22 = fcmp olt x86_fp80 %21, 0xK00000000000000000000
%23 = fneg x86_fp80 %21
%24 = select i1 %22, x86_fp80 %23, x86_fp80 %21
%25 = fcmp olt x86_fp80 %24, 0xK3FE580000000001622D7
br i1 %25, label %26, label %31
26: ; preds = %7
%27 = and i64 %15, 1
%28 = icmp eq i64 %27, 0
br i1 %28, label %29, label %54
29: ; preds = %26
%30 = fdiv x86_fp80 0xK3FFF8000000000000000, %21
br label %54
31: ; preds = %7
%32 = fmul x86_fp80 %21, %21
%33 = fmul x86_fp80 %32, 0xK3FEF95D5B975163918EF
%34 = fsub x86_fp80 0xK3FF6E0741531DD56F650, %33
%35 = fmul x86_fp80 %32, %34
%36 = fadd x86_fp80 %35, 0xKBFFC8895AF2A6847FCD5
%37 = fmul x86_fp80 %32, %36
%38 = fmul x86_fp80 %21, %37
%39 = fadd x86_fp80 %21, %38
%40 = fmul x86_fp80 %32, 0xK3FEA85BBA783B3C748A9
%41 = fadd x86_fp80 %40, 0xKBFF3A37B24C84A42092E
%42 = fmul x86_fp80 %32, %41
%43 = fadd x86_fp80 %42, 0xK3FF9D23CF50BF10ACA84
%44 = fmul x86_fp80 %32, %43
%45 = fadd x86_fp80 %44, 0xKBFFDEEF5823FDECEA969
%46 = fmul x86_fp80 %32, %45
%47 = fadd x86_fp80 %46, 0xK3FFF8000000000000000
%48 = and i64 %15, 1
%49 = icmp eq i64 %48, 0
%50 = fneg x86_fp80 %39
%51 = select i1 %49, x86_fp80 %47, x86_fp80 %50
%52 = select i1 %49, x86_fp80 %39, x86_fp80 %47
%53 = fdiv x86_fp80 %51, %52
br label %54
54: ; preds = %26, %29, %1, %31
%55 = phi x86_fp80 [ %53, %31 ], [ 0xK00000000000000000000, %1 ], [ %30, %29 ], [ %23, %26 ]
ret x86_fp80 %55
}