#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 sqrt(double);
double acos(double x) {
  double z, p, q, r, w, s, c, df;
  int hx, ix;
  hx = *(1 + (int *)&x);
  ix = hx & 0x7fffffff;
  if (ix >= 0x3ff00000) {
    if (((ix - 0x3ff00000) | *(int *)&x) == 0) {
      if (hx > 0) {
        return 0.0;
      } else {
        return 3.14159265358979311600e+00 + 2.0 * 6.12323399573676603587e-17;
      }
    }
    return (x - x) / (x - x);
  }
  if (ix < 0x3fe00000) {
    if (ix <= 0x3c600000) {
      return 1.57079632679489655800e+00 + 6.12323399573676603587e-17;
    }
    z = x * x;
    p = z * (1.66666666666666657415e-01 +
             z * (-3.25565818622400915405e-01 +
                  z * (2.01212532134862925881e-01 +
                       z * (-4.00555345006794114027e-02 +
                            z * (7.91534994289814532176e-04 +
                                 z * 3.47933107596021167570e-05)))));
    q = 1.00000000000000000000e+00 +
        z * (-2.40339491173441421878e+00 +
             z * (2.02094576023350569471e+00 +
                  z * (-6.88283971605453293030e-01 +
                       z * 7.70381505559019352791e-02)));
    r = p / q;
    return 1.57079632679489655800e+00 -
           (x - (6.12323399573676603587e-17 - x * r));
  } else if (hx < 0) {
    z = (1.00000000000000000000e+00 + x) * 0.5;
    p = z * (1.66666666666666657415e-01 +
             z * (-3.25565818622400915405e-01 +
                  z * (2.01212532134862925881e-01 +
                       z * (-4.00555345006794114027e-02 +
                            z * (7.91534994289814532176e-04 +
                                 z * 3.47933107596021167570e-05)))));
    q = 1.00000000000000000000e+00 +
        z * (-2.40339491173441421878e+00 +
             z * (2.02094576023350569471e+00 +
                  z * (-6.88283971605453293030e-01 +
                       z * 7.70381505559019352791e-02)));
    s = sqrt(z);
    r = p / q;
    w = r * s - 6.12323399573676603587e-17;
    return 3.14159265358979311600e+00 - 2.0 * (s + w);
  } else {
    z = (1.00000000000000000000e+00 - x) * 0.5;
    s = sqrt(z);
    df = s;
    *(int *)&df = 0;
    c = (z - df * df) / (s + df);
    p = z * (1.66666666666666657415e-01 +
             z * (-3.25565818622400915405e-01 +
                  z * (2.01212532134862925881e-01 +
                       z * (-4.00555345006794114027e-02 +
                            z * (7.91534994289814532176e-04 +
                                 z * 3.47933107596021167570e-05)))));
    q = 1.00000000000000000000e+00 +
        z * (-2.40339491173441421878e+00 +
             z * (2.02094576023350569471e+00 +
                  z * (-6.88283971605453293030e-01 +
                       z * 7.70381505559019352791e-02)));
    r = p / q;
    w = r * s + c;
    return 2.0 * (df + w);
  }
}


x86 assembly (clang, -O0):
<acos>:
push   %rbp
mov    %rsp,%rbp
sub    $0x60,%rsp
movsd  %xmm0,-0x10(%rbp)
mov    -0xc(%rbp),%eax
mov    %eax,-0x54(%rbp)
mov    -0x54(%rbp),%eax
and    $0x7fffffff,%eax
mov    %eax,-0x58(%rbp)
cmpl   $0x3ff00000,-0x58(%rbp)
jl     119a <acos+0x8a>
mov    -0x58(%rbp),%eax
sub    $0x3ff00000,%eax
or     -0x10(%rbp),%eax
cmp    $0x0,%eax
jne    1178 <acos+0x68>
cmpl   $0x0,-0x54(%rbp)
jle    1166 <acos+0x56>
xorps  %xmm0,%xmm0
movsd  %xmm0,-0x8(%rbp)
jmp    1622 <acos+0x512>
movsd  0xefa(%rip),%xmm0
movsd  %xmm0,-0x8(%rbp)
jmp    1622 <acos+0x512>
movsd  -0x10(%rbp),%xmm0
subsd  -0x10(%rbp),%xmm0
movsd  -0x10(%rbp),%xmm1
subsd  -0x10(%rbp),%xmm1
divsd  %xmm1,%xmm0
movsd  %xmm0,-0x8(%rbp)
jmp    1622 <acos+0x512>
cmpl   $0x3fe00000,-0x58(%rbp)
jge    1314 <acos+0x204>
cmpl   $0x3c600000,-0x58(%rbp)
jg     11c6 <acos+0xb6>
movsd  0xebc(%rip),%xmm0
movsd  %xmm0,-0x8(%rbp)
jmp    1622 <acos+0x512>
movsd  -0x10(%rbp),%xmm0
mulsd  -0x10(%rbp),%xmm0
movsd  %xmm0,-0x18(%rbp)
movsd  -0x18(%rbp),%xmm0
movsd  -0x18(%rbp),%xmm1
movsd  -0x18(%rbp),%xmm2
movsd  -0x18(%rbp),%xmm3
movsd  -0x18(%rbp),%xmm4
movsd  -0x18(%rbp),%xmm5
movsd  0xe55(%rip),%xmm6
mulsd  %xmm6,%xmm5
movsd  0xe51(%rip),%xmm6
addsd  %xmm6,%xmm5
mulsd  %xmm5,%xmm4
movsd  0xe31(%rip),%xmm5
addsd  %xmm5,%xmm4
mulsd  %xmm4,%xmm3
movsd  0xe19(%rip),%xmm4
addsd  %xmm4,%xmm3
mulsd  %xmm3,%xmm2
movsd  0xe01(%rip),%xmm3
addsd  %xmm3,%xmm2
mulsd  %xmm2,%xmm1
movsd  0xde9(%rip),%xmm2
addsd  %xmm2,%xmm1
mulsd  %xmm1,%xmm0
movsd  %xmm0,-0x20(%rbp)
movsd  -0x18(%rbp),%xmm0
movsd  -0x18(%rbp),%xmm1
movsd  -0x18(%rbp),%xmm2
movsd  -0x18(%rbp),%xmm3
movsd  0xdb0(%rip),%xmm4
mulsd  %xmm4,%xmm3
movsd  0xdac(%rip),%xmm4
addsd  %xmm4,%xmm3
mulsd  %xmm3,%xmm2
movsd  0xd8c(%rip),%xmm3
addsd  %xmm3,%xmm2
mulsd  %xmm2,%xmm1
movsd  0xd74(%rip),%xmm2
addsd  %xmm2,%xmm1
mulsd  %xmm1,%xmm0
movsd  0xd5c(%rip),%xmm1
addsd  %xmm1,%xmm0
movsd  %xmm0,-0x28(%rbp)
movsd  -0x20(%rbp),%xmm0
divsd  -0x28(%rbp),%xmm0
movsd  %xmm0,-0x30(%rbp)
movsd  -0x10(%rbp),%xmm1
movsd  -0x10(%rbp),%xmm0
movsd  -0x30(%rbp),%xmm2
movq   %xmm0,%rax
movabs $0x8000000000000000,%rcx
xor    %rcx,%rax
movq   %rax,%xmm0
mulsd  %xmm2,%xmm0
movsd  0xd8a(%rip),%xmm2
addsd  %xmm2,%xmm0
subsd  %xmm0,%xmm1
movsd  0xd72(%rip),%xmm0
subsd  %xmm1,%xmm0
movsd  %xmm0,-0x8(%rbp)
jmp    1622 <acos+0x512>
cmpl   $0x0,-0x54(%rbp)
jge    147d <acos+0x36d>
movsd  0xce2(%rip),%xmm0
addsd  -0x10(%rbp),%xmm0
movsd  0xd2d(%rip),%xmm1
mulsd  %xmm1,%xmm0
movsd  %xmm0,-0x18(%rbp)
movsd  -0x18(%rbp),%xmm0
movsd  -0x18(%rbp),%xmm1
movsd  -0x18(%rbp),%xmm2
movsd  -0x18(%rbp),%xmm3
movsd  -0x18(%rbp),%xmm4
movsd  -0x18(%rbp),%xmm5
movsd  0xcee(%rip),%xmm6
mulsd  %xmm6,%xmm5
movsd  0xcea(%rip),%xmm6
addsd  %xmm6,%xmm5
mulsd  %xmm5,%xmm4
movsd  0xcca(%rip),%xmm5
addsd  %xmm5,%xmm4
mulsd  %xmm4,%xmm3
movsd  0xcb2(%rip),%xmm4
addsd  %xmm4,%xmm3
mulsd  %xmm3,%xmm2
movsd  0xc9a(%rip),%xmm3
addsd  %xmm3,%xmm2
mulsd  %xmm2,%xmm1
movsd  0xc82(%rip),%xmm2
addsd  %xmm2,%xmm1
mulsd  %xmm1,%xmm0
movsd  %xmm0,-0x20(%rbp)
movsd  -0x18(%rbp),%xmm0
movsd  -0x18(%rbp),%xmm1
movsd  -0x18(%rbp),%xmm2
movsd  -0x18(%rbp),%xmm3
movsd  0xc49(%rip),%xmm4
mulsd  %xmm4,%xmm3
movsd  0xc45(%rip),%xmm4
addsd  %xmm4,%xmm3
mulsd  %xmm3,%xmm2
movsd  0xc25(%rip),%xmm3
addsd  %xmm3,%xmm2
mulsd  %xmm2,%xmm1
movsd  0xc0d(%rip),%xmm2
addsd  %xmm2,%xmm1
mulsd  %xmm1,%xmm0
movsd  0xbf5(%rip),%xmm1
addsd  %xmm1,%xmm0
movsd  %xmm0,-0x28(%rbp)
movsd  -0x18(%rbp),%xmm0
call   1030 <sqrt@plt>
movsd  %xmm0,-0x40(%rbp)
movsd  -0x20(%rbp),%xmm0
divsd  -0x28(%rbp),%xmm0
movsd  %xmm0,-0x30(%rbp)
movsd  -0x30(%rbp),%xmm0
movsd  -0x40(%rbp),%xmm1
mulsd  %xmm1,%xmm0
movsd  0xc20(%rip),%xmm1
addsd  %xmm1,%xmm0
movsd  %xmm0,-0x38(%rbp)
movsd  -0x40(%rbp),%xmm1
addsd  -0x38(%rbp),%xmm1
addsd  %xmm1,%xmm1
movsd  0xbf9(%rip),%xmm0
subsd  %xmm1,%xmm0
movsd  %xmm0,-0x8(%rbp)
jmp    1622 <acos+0x512>
movsd  0xb83(%rip),%xmm0
subsd  -0x10(%rbp),%xmm0
movsd  0xbce(%rip),%xmm1
mulsd  %xmm1,%xmm0
movsd  %xmm0,-0x18(%rbp)
movsd  -0x18(%rbp),%xmm0
call   1030 <sqrt@plt>
movsd  %xmm0,-0x40(%rbp)
movsd  -0x40(%rbp),%xmm0
movsd  %xmm0,-0x50(%rbp)
movl   $0x0,-0x50(%rbp)
movsd  -0x18(%rbp),%xmm1
movsd  -0x50(%rbp),%xmm0
movsd  -0x50(%rbp),%xmm2
movq   %xmm0,%rax
movabs $0x8000000000000000,%rcx
xor    %rcx,%rax
movq   %rax,%xmm0
mulsd  %xmm2,%xmm0
addsd  %xmm1,%xmm0
movsd  -0x40(%rbp),%xmm1
addsd  -0x50(%rbp),%xmm1
divsd  %xmm1,%xmm0
movsd  %xmm0,-0x48(%rbp)
movsd  -0x18(%rbp),%xmm0
movsd  -0x18(%rbp),%xmm1
movsd  -0x18(%rbp),%xmm2
movsd  -0x18(%rbp),%xmm3
movsd  -0x18(%rbp),%xmm4
movsd  -0x18(%rbp),%xmm5
movsd  0xb2e(%rip),%xmm6
mulsd  %xmm6,%xmm5
movsd  0xb2a(%rip),%xmm6
addsd  %xmm6,%xmm5
mulsd  %xmm5,%xmm4
movsd  0xb0a(%rip),%xmm5
addsd  %xmm5,%xmm4
mulsd  %xmm4,%xmm3
movsd  0xaf2(%rip),%xmm4
addsd  %xmm4,%xmm3
mulsd  %xmm3,%xmm2
movsd  0xada(%rip),%xmm3
addsd  %xmm3,%xmm2
mulsd  %xmm2,%xmm1
movsd  0xac2(%rip),%xmm2
addsd  %xmm2,%xmm1
mulsd  %xmm1,%xmm0
movsd  %xmm0,-0x20(%rbp)
movsd  -0x18(%rbp),%xmm0
movsd  -0x18(%rbp),%xmm1
movsd  -0x18(%rbp),%xmm2
movsd  -0x18(%rbp),%xmm3
movsd  0xa89(%rip),%xmm4
mulsd  %xmm4,%xmm3
movsd  0xa85(%rip),%xmm4
addsd  %xmm4,%xmm3
mulsd  %xmm3,%xmm2
movsd  0xa65(%rip),%xmm3
addsd  %xmm3,%xmm2
mulsd  %xmm2,%xmm1
movsd  0xa4d(%rip),%xmm2
addsd  %xmm2,%xmm1
mulsd  %xmm1,%xmm0
movsd  0xa35(%rip),%xmm1
addsd  %xmm1,%xmm0
movsd  %xmm0,-0x28(%rbp)
movsd  -0x20(%rbp),%xmm0
divsd  -0x28(%rbp),%xmm0
movsd  %xmm0,-0x30(%rbp)
movsd  -0x30(%rbp),%xmm0
movsd  -0x40(%rbp),%xmm2
movsd  -0x48(%rbp),%xmm1
mulsd  %xmm2,%xmm0
addsd  %xmm1,%xmm0
movsd  %xmm0,-0x38(%rbp)
movsd  -0x50(%rbp),%xmm1
addsd  -0x38(%rbp),%xmm1
movsd  0x9e7(%rip),%xmm0
mulsd  %xmm1,%xmm0
movsd  %xmm0,-0x8(%rbp)
movsd  -0x8(%rbp),%xmm0
add    $0x60,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<acos>:
sub    $0x18,%rsp
movq   %xmm0,%rax
mov    %rax,%rcx
shr    $0x20,%rcx
mov    %ecx,%edx
and    $0x7fffffff,%edx
cmp    $0x3ff00000,%edx
jb     1147 <acos+0x37>
add    $0xc0100000,%edx
or     %edx,%eax
je     1198 <acos+0x88>
subsd  %xmm0,%xmm0
divsd  %xmm0,%xmm0
add    $0x18,%rsp
ret
cmp    $0x3fdfffff,%edx
ja     1164 <acos+0x54>
cmp    $0x3c600001,%edx
jae    11b1 <acos+0xa1>
movsd  0xf11(%rip),%xmm0
add    $0x18,%rsp
ret
test   %rax,%rax
js     1262 <acos+0x152>
movsd  0xe8b(%rip),%xmm6
subsd  %xmm0,%xmm6
mulsd  0xe87(%rip),%xmm6
xorpd  %xmm0,%xmm0
ucomisd %xmm0,%xmm6
jb     1309 <acos+0x1f9>
sqrtsd %xmm6,%xmm1
jmp    1322 <acos+0x212>
xorpd  %xmm0,%xmm0
test   %ecx,%ecx
jg     13e9 <acos+0x2d9>
movsd  0xebc(%rip),%xmm0
add    $0x18,%rsp
ret
movapd %xmm0,%xmm2
mulsd  %xmm0,%xmm2
movsd  0xe4f(%rip),%xmm1
mulsd  %xmm2,%xmm1
addsd  0xe4b(%rip),%xmm1
mulsd  %xmm2,%xmm1
addsd  0xe47(%rip),%xmm1
mulsd  %xmm2,%xmm1
addsd  0xe43(%rip),%xmm1
mulsd  %xmm2,%xmm1
addsd  0xe3f(%rip),%xmm1
mulsd  %xmm2,%xmm1
addsd  0xe3b(%rip),%xmm1
movsd  0xe3b(%rip),%xmm3
mulsd  %xmm2,%xmm3
addsd  0xe37(%rip),%xmm3
mulsd  %xmm2,%xmm3
addsd  0xe33(%rip),%xmm3
mulsd  %xmm2,%xmm3
addsd  0xe2f(%rip),%xmm3
mulsd  %xmm2,%xmm3
addsd  0xdcb(%rip),%xmm3
mulsd  %xmm2,%xmm1
divsd  %xmm3,%xmm1
mulsd  %xmm0,%xmm1
movsd  0xe2f(%rip),%xmm2
subsd  %xmm1,%xmm2
subsd  %xmm0,%xmm2
addsd  0xe17(%rip),%xmm2
movapd %xmm2,%xmm0
add    $0x18,%rsp
ret
movsd  0xd96(%rip),%xmm1
addsd  %xmm1,%xmm0
mulsd  0xd92(%rip),%xmm0
movsd  0xd92(%rip),%xmm2
mulsd  %xmm0,%xmm2
addsd  0xd8e(%rip),%xmm2
mulsd  %xmm0,%xmm2
addsd  0xd8a(%rip),%xmm2
mulsd  %xmm0,%xmm2
addsd  0xd86(%rip),%xmm2
mulsd  %xmm0,%xmm2
addsd  0xd82(%rip),%xmm2
mulsd  %xmm0,%xmm2
addsd  0xd7e(%rip),%xmm2
movsd  0xd7e(%rip),%xmm3
mulsd  %xmm0,%xmm3
addsd  0xd7a(%rip),%xmm3
mulsd  %xmm0,%xmm2
mulsd  %xmm0,%xmm3
addsd  0xd72(%rip),%xmm3
mulsd  %xmm0,%xmm3
addsd  0xd6e(%rip),%xmm3
mulsd  %xmm0,%xmm3
addsd  %xmm1,%xmm3
xorpd  %xmm1,%xmm1
ucomisd %xmm1,%xmm0
jb     13ee <acos+0x2de>
sqrtsd %xmm0,%xmm0
jmp    140b <acos+0x2fb>
movapd %xmm6,%xmm0
movsd  %xmm6,0x8(%rsp)
call   1030 <sqrt@plt>
movsd  0x8(%rsp),%xmm6
movapd %xmm0,%xmm1
movq   %xmm1,%rax
movabs $0xffffffff00000000,%rcx
ff ff ff
and    %rax,%rcx
movsd  0xcd4(%rip),%xmm0
mulsd  %xmm6,%xmm0
addsd  0xcd0(%rip),%xmm0
movq   %rcx,%xmm2
movdqa %xmm2,%xmm4
mulsd  %xmm6,%xmm0
addsd  0xcc3(%rip),%xmm0
mulsd  %xmm2,%xmm4
movapd %xmm6,%xmm3
mulsd  %xmm6,%xmm0
addsd  0xcb7(%rip),%xmm0
subsd  %xmm4,%xmm3
movapd %xmm1,%xmm4
mulsd  %xmm6,%xmm0
addsd  0xcab(%rip),%xmm0
addsd  %xmm2,%xmm4
mulsd  %xmm6,%xmm0
addsd  0xca3(%rip),%xmm0
movsd  0xca3(%rip),%xmm5
mulsd  %xmm6,%xmm5
addsd  0xc9f(%rip),%xmm5
divsd  %xmm4,%xmm3
mulsd  %xmm6,%xmm5
addsd  0xc97(%rip),%xmm5
mulsd  %xmm6,%xmm0
mulsd  %xmm6,%xmm5
addsd  0xc8f(%rip),%xmm5
mulsd  %xmm6,%xmm5
addsd  0xc2b(%rip),%xmm5
divsd  %xmm5,%xmm0
mulsd  %xmm1,%xmm0
addsd  %xmm3,%xmm0
addsd  %xmm2,%xmm0
addsd  %xmm0,%xmm0
add    $0x18,%rsp
ret
movsd  %xmm2,0x8(%rsp)
movsd  %xmm3,0x10(%rsp)
call   1030 <sqrt@plt>
movsd  0x10(%rsp),%xmm3
movsd  0x8(%rsp),%xmm2
divsd  %xmm3,%xmm2
mulsd  %xmm0,%xmm2
addsd  0xc45(%rip),%xmm2
addsd  %xmm0,%xmm2
addsd  %xmm2,%xmm2
movsd  0xc3d(%rip),%xmm0
subsd  %xmm2,%xmm0
add    $0x18,%rsp
ret

LLVM IR (-O0):
define double @acos(double %0) {
%2 = alloca double
%3 = alloca double
%4 = alloca double
%5 = alloca double
%6 = alloca double
%7 = alloca double
%8 = alloca double
%9 = alloca double
%10 = alloca double
%11 = alloca double
%12 = alloca i32
%13 = alloca i32
store double %0, double* %3
%14 = bitcast double* %3 to i32*
%15 = getelementptr inbounds i32, i32* %14, i64 1
%16 = load i32, i32* %15
store i32 %16, i32* %12
%17 = load i32, i32* %12
%18 = and i32 %17, 2147483647
store i32 %18, i32* %13
%19 = load i32, i32* %13
%20 = icmp sge i32 %19, 1072693248
br i1 %20, label %21, label %41
21: ; preds = %1
%22 = load i32, i32* %13
%23 = sub nsw i32 %22, 1072693248
%24 = bitcast double* %3 to i32*
%25 = load i32, i32* %24
%26 = or i32 %23, %25
%27 = icmp eq i32 %26, 0
br i1 %27, label %28, label %33
28: ; preds = %21
%29 = load i32, i32* %12
%30 = icmp sgt i32 %29, 0
br i1 %30, label %31, label %32
31: ; preds = %28
store double 0.000000e+00, double* %2
br label %169
32: ; preds = %28
store double 0x400921FB54442D18, double* %2
br label %169
33: ; preds = %21
%34 = load double, double* %3
%35 = load double, double* %3
%36 = fsub double %34, %35
%37 = load double, double* %3
%38 = load double, double* %3
%39 = fsub double %37, %38
%40 = fdiv double %36, %39
store double %40, double* %2
br label %169
41: ; preds = %1
%42 = load i32, i32* %13
%43 = icmp slt i32 %42, 1071644672
br i1 %43, label %44, label %82
44: ; preds = %41
%45 = load i32, i32* %13
%46 = icmp sle i32 %45, 1012924416
br i1 %46, label %47, label %48
47: ; preds = %44
store double 0x3FF921FB54442D18, double* %2
br label %169
48: ; preds = %44
%49 = load double, double* %3
%50 = load double, double* %3
%51 = fmul double %49, %50
store double %51, double* %4
%52 = load double, double* %4
%53 = load double, double* %4
%54 = load double, double* %4
%55 = load double, double* %4
%56 = load double, double* %4
%57 = load double, double* %4
%58 = call double @llvm.fmuladd.f64(double %57, double 0x3F023DE10DFDF709, double 0x3F49EFE07501B288)
%59 = call double @llvm.fmuladd.f64(double %56, double %58, double 0xBFA48228B5688F3B)
%60 = call double @llvm.fmuladd.f64(double %55, double %59, double 0x3FC9C1550E884455)
%61 = call double @llvm.fmuladd.f64(double %54, double %60, double 0xBFD4D61203EB6F7D)
%62 = call double @llvm.fmuladd.f64(double %53, double %61, double 0x3FC5555555555555)
%63 = fmul double %52, %62
store double %63, double* %5
%64 = load double, double* %4
%65 = load double, double* %4
%66 = load double, double* %4
%67 = load double, double* %4
%68 = call double @llvm.fmuladd.f64(double %67, double 0x3FB3B8C5B12E9282, double 0xBFE6066C1B8D0159)
%69 = call double @llvm.fmuladd.f64(double %66, double %68, double 0x40002AE59C598AC8)
%70 = call double @llvm.fmuladd.f64(double %65, double %69, double 0xC0033A271C8A2D4B)
%71 = call double @llvm.fmuladd.f64(double %64, double %70, double 1.000000e+00)
store double %71, double* %6
%72 = load double, double* %5
%73 = load double, double* %6
%74 = fdiv double %72, %73
store double %74, double* %7
%75 = load double, double* %3
%76 = load double, double* %3
%77 = load double, double* %7
%78 = fneg double %76
%79 = call double @llvm.fmuladd.f64(double %78, double %77, double 0x3C91A62633145C07)
%80 = fsub double %75, %79
%81 = fsub double 0x3FF921FB54442D18, %80
store double %81, double* %2
br label %169
82: ; preds = %41
%83 = load i32, i32* %12
%84 = icmp slt i32 %83, 0
br i1 %84, label %85, label %121
85: ; preds = %82
%86 = load double, double* %3
%87 = fadd double 1.000000e+00, %86
%88 = fmul double %87, 5.000000e-01
store double %88, double* %4
%89 = load double, double* %4
%90 = load double, double* %4
%91 = load double, double* %4
%92 = load double, double* %4
%93 = load double, double* %4
%94 = load double, double* %4
%95 = call double @llvm.fmuladd.f64(double %94, double 0x3F023DE10DFDF709, double 0x3F49EFE07501B288)
%96 = call double @llvm.fmuladd.f64(double %93, double %95, double 0xBFA48228B5688F3B)
%97 = call double @llvm.fmuladd.f64(double %92, double %96, double 0x3FC9C1550E884455)
%98 = call double @llvm.fmuladd.f64(double %91, double %97, double 0xBFD4D61203EB6F7D)
%99 = call double @llvm.fmuladd.f64(double %90, double %98, double 0x3FC5555555555555)
%100 = fmul double %89, %99
store double %100, double* %5
%101 = load double, double* %4
%102 = load double, double* %4
%103 = load double, double* %4
%104 = load double, double* %4
%105 = call double @llvm.fmuladd.f64(double %104, double 0x3FB3B8C5B12E9282, double 0xBFE6066C1B8D0159)
%106 = call double @llvm.fmuladd.f64(double %103, double %105, double 0x40002AE59C598AC8)
%107 = call double @llvm.fmuladd.f64(double %102, double %106, double 0xC0033A271C8A2D4B)
%108 = call double @llvm.fmuladd.f64(double %101, double %107, double 1.000000e+00)
store double %108, double* %6
%109 = load double, double* %4
%110 = call double @sqrt(double %109)
store double %110, double* %9
%111 = load double, double* %5
%112 = load double, double* %6
%113 = fdiv double %111, %112
store double %113, double* %7
%114 = load double, double* %7
%115 = load double, double* %9
%116 = call double @llvm.fmuladd.f64(double %114, double %115, double 0xBC91A62633145C07)
store double %116, double* %8
%117 = load double, double* %9
%118 = load double, double* %8
%119 = fadd double %117, %118
%120 = call double @llvm.fmuladd.f64(double -2.000000e+00, double %119, double 0x400921FB54442D18)
store double %120, double* %2
br label %169
121: ; preds = %82
%122 = load double, double* %3
%123 = fsub double 1.000000e+00, %122
%124 = fmul double %123, 5.000000e-01
store double %124, double* %4
%125 = load double, double* %4
%126 = call double @sqrt(double %125)
store double %126, double* %9
%127 = load double, double* %9
store double %127, double* %11
%128 = bitcast double* %11 to i32*
store i32 0, i32* %128
%129 = load double, double* %4
%130 = load double, double* %11
%131 = load double, double* %11
%132 = fneg double %130
%133 = call double @llvm.fmuladd.f64(double %132, double %131, double %129)
%134 = load double, double* %9
%135 = load double, double* %11
%136 = fadd double %134, %135
%137 = fdiv double %133, %136
store double %137, double* %10
%138 = load double, double* %4
%139 = load double, double* %4
%140 = load double, double* %4
%141 = load double, double* %4
%142 = load double, double* %4
%143 = load double, double* %4
%144 = call double @llvm.fmuladd.f64(double %143, double 0x3F023DE10DFDF709, double 0x3F49EFE07501B288)
%145 = call double @llvm.fmuladd.f64(double %142, double %144, double 0xBFA48228B5688F3B)
%146 = call double @llvm.fmuladd.f64(double %141, double %145, double 0x3FC9C1550E884455)
%147 = call double @llvm.fmuladd.f64(double %140, double %146, double 0xBFD4D61203EB6F7D)
%148 = call double @llvm.fmuladd.f64(double %139, double %147, double 0x3FC5555555555555)
%149 = fmul double %138, %148
store double %149, double* %5
%150 = load double, double* %4
%151 = load double, double* %4
%152 = load double, double* %4
%153 = load double, double* %4
%154 = call double @llvm.fmuladd.f64(double %153, double 0x3FB3B8C5B12E9282, double 0xBFE6066C1B8D0159)
%155 = call double @llvm.fmuladd.f64(double %152, double %154, double 0x40002AE59C598AC8)
%156 = call double @llvm.fmuladd.f64(double %151, double %155, double 0xC0033A271C8A2D4B)
%157 = call double @llvm.fmuladd.f64(double %150, double %156, double 1.000000e+00)
store double %157, double* %6
%158 = load double, double* %5
%159 = load double, double* %6
%160 = fdiv double %158, %159
store double %160, double* %7
%161 = load double, double* %7
%162 = load double, double* %9
%163 = load double, double* %10
%164 = call double @llvm.fmuladd.f64(double %161, double %162, double %163)
store double %164, double* %8
%165 = load double, double* %11
%166 = load double, double* %8
%167 = fadd double %165, %166
%168 = fmul double 2.000000e+00, %167
store double %168, double* %2
br label %169
169: ; preds = %121, %85, %48, %47, %33, %32, %31
%170 = load double, double* %2
ret double %170
}

LLVM IR (-O2):
define double @acos(double %0) {
%2 = bitcast double %0 to i64
%3 = lshr i64 %2, 32
%4 = trunc i64 %3 to i32
%5 = and i32 %4, 2147483647
%6 = icmp ugt i32 %5, 1072693247
br i1 %6, label %7, label %18
7: ; preds = %1
%8 = add nsw i32 %5, -1072693248
%9 = trunc i64 %2 to i32
%10 = or i32 %8, %9
%11 = icmp eq i32 %10, 0
br i1 %11, label %12, label %15
12: ; preds = %7
%13 = icmp sgt i32 %4, 0
%14 = select i1 %13, double 0.000000e+00, double 0x400921FB54442D18
br label %84
15: ; preds = %7
%16 = fsub double %0, %0
%17 = fdiv double %16, %16
br label %84
18: ; preds = %1
%19 = icmp ult i32 %5, 1071644672
br i1 %19, label %20, label %39
20: ; preds = %18
%21 = icmp ult i32 %5, 1012924417
br i1 %21, label %84, label %22
22: ; preds = %20
%23 = fmul double %0, %0
%24 = tail call double @llvm.fmuladd.f64(double %23, double 0x3F023DE10DFDF709, double 0x3F49EFE07501B288)
%25 = tail call double @llvm.fmuladd.f64(double %23, double %24, double 0xBFA48228B5688F3B)
%26 = tail call double @llvm.fmuladd.f64(double %23, double %25, double 0x3FC9C1550E884455)
%27 = tail call double @llvm.fmuladd.f64(double %23, double %26, double 0xBFD4D61203EB6F7D)
%28 = tail call double @llvm.fmuladd.f64(double %23, double %27, double 0x3FC5555555555555)
%29 = fmul double %23, %28
%30 = tail call double @llvm.fmuladd.f64(double %23, double 0x3FB3B8C5B12E9282, double 0xBFE6066C1B8D0159)
%31 = tail call double @llvm.fmuladd.f64(double %23, double %30, double 0x40002AE59C598AC8)
%32 = tail call double @llvm.fmuladd.f64(double %23, double %31, double 0xC0033A271C8A2D4B)
%33 = tail call double @llvm.fmuladd.f64(double %23, double %32, double 1.000000e+00)
%34 = fdiv double %29, %33
%35 = fneg double %0
%36 = tail call double @llvm.fmuladd.f64(double %35, double %34, double 0x3C91A62633145C07)
%37 = fsub double %36, %0
%38 = fadd double %37, 0x3FF921FB54442D18
br label %84
39: ; preds = %18
%40 = icmp slt i64 %2, 0
br i1 %40, label %41, label %59
41: ; preds = %39
%42 = fadd double %0, 1.000000e+00
%43 = fmul double %42, 5.000000e-01
%44 = tail call double @llvm.fmuladd.f64(double %43, double 0x3F023DE10DFDF709, double 0x3F49EFE07501B288)
%45 = tail call double @llvm.fmuladd.f64(double %43, double %44, double 0xBFA48228B5688F3B)
%46 = tail call double @llvm.fmuladd.f64(double %43, double %45, double 0x3FC9C1550E884455)
%47 = tail call double @llvm.fmuladd.f64(double %43, double %46, double 0xBFD4D61203EB6F7D)
%48 = tail call double @llvm.fmuladd.f64(double %43, double %47, double 0x3FC5555555555555)
%49 = fmul double %43, %48
%50 = tail call double @llvm.fmuladd.f64(double %43, double 0x3FB3B8C5B12E9282, double 0xBFE6066C1B8D0159)
%51 = tail call double @llvm.fmuladd.f64(double %43, double %50, double 0x40002AE59C598AC8)
%52 = tail call double @llvm.fmuladd.f64(double %43, double %51, double 0xC0033A271C8A2D4B)
%53 = tail call double @llvm.fmuladd.f64(double %43, double %52, double 1.000000e+00)
%54 = tail call double @sqrt(double %43)
%55 = fdiv double %49, %53
%56 = tail call double @llvm.fmuladd.f64(double %55, double %54, double 0xBC91A62633145C07)
%57 = fadd double %54, %56
%58 = tail call double @llvm.fmuladd.f64(double %57, double -2.000000e+00, double 0x400921FB54442D18)
br label %84
59: ; preds = %39
%60 = fsub double 1.000000e+00, %0
%61 = fmul double %60, 5.000000e-01
%62 = tail call double @sqrt(double %61)
%63 = bitcast double %62 to i64
%64 = and i64 %63, -4294967296
%65 = bitcast i64 %64 to double
%66 = fneg double %65
%67 = tail call double @llvm.fmuladd.f64(double %66, double %65, double %61)
%68 = fadd double %62, %65
%69 = fdiv double %67, %68
%70 = tail call double @llvm.fmuladd.f64(double %61, double 0x3F023DE10DFDF709, double 0x3F49EFE07501B288)
%71 = tail call double @llvm.fmuladd.f64(double %61, double %70, double 0xBFA48228B5688F3B)
%72 = tail call double @llvm.fmuladd.f64(double %61, double %71, double 0x3FC9C1550E884455)
%73 = tail call double @llvm.fmuladd.f64(double %61, double %72, double 0xBFD4D61203EB6F7D)
%74 = tail call double @llvm.fmuladd.f64(double %61, double %73, double 0x3FC5555555555555)
%75 = fmul double %61, %74
%76 = tail call double @llvm.fmuladd.f64(double %61, double 0x3FB3B8C5B12E9282, double 0xBFE6066C1B8D0159)
%77 = tail call double @llvm.fmuladd.f64(double %61, double %76, double 0x40002AE59C598AC8)
%78 = tail call double @llvm.fmuladd.f64(double %61, double %77, double 0xC0033A271C8A2D4B)
%79 = tail call double @llvm.fmuladd.f64(double %61, double %78, double 1.000000e+00)
%80 = fdiv double %75, %79
%81 = tail call double @llvm.fmuladd.f64(double %80, double %62, double %69)
%82 = fadd double %81, %65
%83 = fmul double %82, 2.000000e+00
br label %84
84: ; preds = %20, %12, %59, %41, %22, %15
%85 = phi double [ %17, %15 ], [ %38, %22 ], [ %58, %41 ], [ %83, %59 ], [ %14, %12 ], [ 0x3FF921FB54442D18, %20 ]
ret double %85
}