double pow(y, x)
double y, x;
{
  typedef union {
    double d;
    unsigned u[4];
  } DBL;
  double z, w, p, p2, q, re;
  unsigned ex;
  int iz;
  DBL *yp, *zp, *wp;
  yp = (DBL *)&y;
  if (yp->d <= 0.0)
    y = -y;
  z = 0.0;
  zp = (DBL *)&z;
  zp->u[3] = yp->u[3] & ~0100017;
  iz = (zp->u[3] >> 4) - 1023;
  if ((yp->d - zp->d) == 0.0)
    z = (double)iz;
  else {
    yp->u[3] -= ++iz << 4;
    yp->d *= 1.4142135623730950488;
    p = (yp->d - 1.0) / (yp->d + 1.0);
    p2 = p * p;
    z = p * (2.000000000046727 +
             p2 * (0.666666635059382 +
                   p2 * (0.4000059794795 +
                         p2 * (0.28525381498 + p2 * 0.2376245609))));
    z = z * 1.442695040888634 + (double)iz - 0.5;
  }
  z *= x;
  w = 0.0;
  wp = (DBL *)&w;
  if (zp->d > 1023.0 || zp->d < -1023.0)
    return (1E307);
  iz = (int)zp->d;
  wp->u[3] += iz + 1023 << 4;
  wp->u[3] &= ~0100017;
  if ((zp->d -= (double)iz) == 0.0)
    return (wp->d);
  while (zp->d < 0.0) {
    wp->u[3] -= 1 << 4;
    wp->u[3] &= ~0100017;
    zp->d++;
  }
  if (zp->d >= 0.5) {
    zp->d -= 0.5;
    re = 1.41421356237309504880;
  } else
    re = 1.0;
  p2 = zp->d * zp->d;
  p = zp->d * (7.2152891511493 + p2 * 0.0576900723731);
  q = 20.8189237930062 + p2;
  zp->d = re * wp->d * (q + p) / (q - p);
  return (zp->d);
}


x86 assembly (clang, -O0):
<pow>:
push   %rbp
mov    %rsp,%rbp
movsd  %xmm0,-0x10(%rbp)
movsd  %xmm1,-0x18(%rbp)
lea    -0x10(%rbp),%rax
mov    %rax,-0x58(%rbp)
mov    -0x58(%rbp),%rax
xorps  %xmm0,%xmm0
ucomisd (%rax),%xmm0
jb     1148 <pow+0x48>
movsd  -0x10(%rbp),%xmm0
movq   %xmm0,%rax
movabs $0x8000000000000000,%rcx
xor    %rcx,%rax
movq   %rax,%xmm0
movsd  %xmm0,-0x10(%rbp)
xorps  %xmm0,%xmm0
movsd  %xmm0,-0x20(%rbp)
lea    -0x20(%rbp),%rax
mov    %rax,-0x60(%rbp)
mov    -0x58(%rbp),%rax
mov    0xc(%rax),%ecx
and    $0xffff7ff0,%ecx
mov    -0x60(%rbp),%rax
mov    %ecx,0xc(%rax)
mov    -0x60(%rbp),%rax
mov    0xc(%rax),%eax
shr    $0x4,%eax
sub    $0x3ff,%eax
mov    %eax,-0x50(%rbp)
mov    -0x58(%rbp),%rax
movsd  (%rax),%xmm0
mov    -0x60(%rbp),%rax
subsd  (%rax),%xmm0
xorps  %xmm1,%xmm1
ucomisd %xmm1,%xmm0
jne    11b0 <pow+0xb0>
jp     11b0 <pow+0xb0>
cvtsi2sdl -0x50(%rbp),%xmm0
movsd  %xmm0,-0x20(%rbp)
jmp    12ad <pow+0x1ad>
mov    -0x50(%rbp),%edx
add    $0x1,%edx
mov    %edx,-0x50(%rbp)
shl    $0x4,%edx
mov    -0x58(%rbp),%rax
mov    0xc(%rax),%ecx
sub    %edx,%ecx
mov    %ecx,0xc(%rax)
mov    -0x58(%rbp),%rax
movsd  0xe6c(%rip),%xmm0
mulsd  (%rax),%xmm0
movsd  %xmm0,(%rax)
mov    -0x58(%rbp),%rax
movsd  (%rax),%xmm0
movsd  0xe4c(%rip),%xmm1
subsd  %xmm1,%xmm0
mov    -0x58(%rbp),%rax
movsd  0xe3c(%rip),%xmm1
addsd  (%rax),%xmm1
divsd  %xmm1,%xmm0
movsd  %xmm0,-0x30(%rbp)
movsd  -0x30(%rbp),%xmm0
mulsd  -0x30(%rbp),%xmm0
movsd  %xmm0,-0x38(%rbp)
movsd  -0x30(%rbp),%xmm0
movsd  -0x38(%rbp),%xmm1
movsd  -0x38(%rbp),%xmm2
movsd  -0x38(%rbp),%xmm3
movsd  -0x38(%rbp),%xmm4
movsd  0xdef(%rip),%xmm5
mulsd  %xmm5,%xmm4
movsd  0xdeb(%rip),%xmm5
addsd  %xmm5,%xmm4
mulsd  %xmm4,%xmm3
movsd  0xdcb(%rip),%xmm4
addsd  %xmm4,%xmm3
mulsd  %xmm3,%xmm2
movsd  0xdb3(%rip),%xmm3
addsd  %xmm3,%xmm2
mulsd  %xmm2,%xmm1
movsd  0xd9b(%rip),%xmm2
addsd  %xmm2,%xmm1
mulsd  %xmm1,%xmm0
movsd  %xmm0,-0x20(%rbp)
movsd  -0x20(%rbp),%xmm0
cvtsi2sdl -0x50(%rbp),%xmm1
movsd  0xd74(%rip),%xmm2
mulsd  %xmm2,%xmm0
addsd  %xmm1,%xmm0
movsd  0xd5c(%rip),%xmm1
subsd  %xmm1,%xmm0
movsd  %xmm0,-0x20(%rbp)
movsd  -0x18(%rbp),%xmm0
mulsd  -0x20(%rbp),%xmm0
movsd  %xmm0,-0x20(%rbp)
xorps  %xmm0,%xmm0
movsd  %xmm0,-0x28(%rbp)
lea    -0x28(%rbp),%rax
mov    %rax,-0x68(%rbp)
mov    -0x60(%rbp),%rax
movsd  (%rax),%xmm0
movsd  0xd6c(%rip),%xmm1
ucomisd %xmm1,%xmm0
ja     12fc <pow+0x1fc>
mov    -0x60(%rbp),%rax
movsd  0xd5e(%rip),%xmm0
ucomisd (%rax),%xmm0
jbe    130e <pow+0x20e>
movsd  0xd6c(%rip),%xmm0
movsd  %xmm0,-0x8(%rbp)
jmp    14a9 <pow+0x3a9>
mov    -0x60(%rbp),%rax
cvttsd2si (%rax),%eax
mov    %eax,-0x50(%rbp)
mov    -0x50(%rbp),%ecx
add    $0x3ff,%ecx
shl    $0x4,%ecx
mov    -0x68(%rbp),%rax
add    0xc(%rax),%ecx
mov    %ecx,0xc(%rax)
mov    -0x68(%rbp),%rax
mov    0xc(%rax),%ecx
and    $0xffff7ff0,%ecx
mov    %ecx,0xc(%rax)
cvtsi2sdl -0x50(%rbp),%xmm1
mov    -0x60(%rbp),%rax
movsd  (%rax),%xmm0
subsd  %xmm1,%xmm0
movsd  %xmm0,(%rax)
xorps  %xmm1,%xmm1
ucomisd %xmm1,%xmm0
jne    1379 <pow+0x279>
jp     1379 <pow+0x279>
mov    -0x68(%rbp),%rax
movsd  (%rax),%xmm0
movsd  %xmm0,-0x8(%rbp)
jmp    14a9 <pow+0x3a9>
jmp    137e <pow+0x27e>
mov    -0x60(%rbp),%rax
xorps  %xmm0,%xmm0
ucomisd (%rax),%xmm0
jbe    13c5 <pow+0x2c5>
mov    -0x68(%rbp),%rax
mov    0xc(%rax),%ecx
sub    $0x10,%ecx
mov    %ecx,0xc(%rax)
mov    -0x68(%rbp),%rax
mov    0xc(%rax),%ecx
and    $0xffff7ff0,%ecx
mov    %ecx,0xc(%rax)
mov    -0x60(%rbp),%rax
movsd  0xc80(%rip),%xmm0
addsd  (%rax),%xmm0
movsd  %xmm0,(%rax)
jmp    137e <pow+0x27e>
mov    -0x60(%rbp),%rax
movsd  (%rax),%xmm0
movsd  0xc2b(%rip),%xmm1
ucomisd %xmm1,%xmm0
jb     1409 <pow+0x309>
mov    -0x60(%rbp),%rax
movsd  (%rax),%xmm0
movsd  0xc11(%rip),%xmm1
subsd  %xmm1,%xmm0
movsd  %xmm0,(%rax)
movsd  0xc41(%rip),%xmm0
movsd  %xmm0,-0x48(%rbp)
jmp    1416 <pow+0x316>
movsd  0xc27(%rip),%xmm0
movsd  %xmm0,-0x48(%rbp)
mov    -0x60(%rbp),%rax
movsd  (%rax),%xmm0
mov    -0x60(%rbp),%rax
mulsd  (%rax),%xmm0
movsd  %xmm0,-0x38(%rbp)
mov    -0x60(%rbp),%rax
movsd  (%rax),%xmm0
movsd  -0x38(%rbp),%xmm1
movsd  0xc20(%rip),%xmm2
mulsd  %xmm2,%xmm1
movsd  0xc1c(%rip),%xmm2
addsd  %xmm2,%xmm1
mulsd  %xmm1,%xmm0
movsd  %xmm0,-0x30(%rbp)
movsd  0xbf7(%rip),%xmm0
addsd  -0x38(%rbp),%xmm0
movsd  %xmm0,-0x40(%rbp)
movsd  -0x48(%rbp),%xmm0
mov    -0x68(%rbp),%rax
mulsd  (%rax),%xmm0
movsd  -0x40(%rbp),%xmm1
addsd  -0x30(%rbp),%xmm1
mulsd  %xmm1,%xmm0
movsd  -0x40(%rbp),%xmm1
subsd  -0x30(%rbp),%xmm1
divsd  %xmm1,%xmm0
mov    -0x60(%rbp),%rax
movsd  %xmm0,(%rax)
mov    -0x60(%rbp),%rax
movsd  (%rax),%xmm0
movsd  %xmm0,-0x8(%rbp)
movsd  -0x8(%rbp),%xmm0
pop    %rbp
ret

x86 assembly (clang, -O2):
<pow>:
xorps  %xmm0,%xmm0
ret

LLVM IR (-O0):
%union.DBL = type { double, [8 x i8] }
define double @pow(double %0, double %1) {
%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
%14 = alloca %union.DBL*
%15 = alloca %union.DBL*
%16 = alloca %union.DBL*
store double %0, double* %4
store double %1, double* %5
%17 = bitcast double* %4 to %union.DBL*
store %union.DBL* %17, %union.DBL** %14
%18 = load %union.DBL*, %union.DBL** %14
%19 = bitcast %union.DBL* %18 to double*
%20 = load double, double* %19
%21 = fcmp ole double %20, 0.000000e+00
br i1 %21, label %22, label %25
22: ; preds = %2
%23 = load double, double* %4
%24 = fneg double %23
store double %24, double* %4
br label %25
25: ; preds = %22, %2
store double 0.000000e+00, double* %6
%26 = bitcast double* %6 to %union.DBL*
store %union.DBL* %26, %union.DBL** %15
%27 = load %union.DBL*, %union.DBL** %14
%28 = bitcast %union.DBL* %27 to [4 x i32]*
%29 = getelementptr inbounds [4 x i32], [4 x i32]* %28, i64 0, i64 3
%30 = load i32, i32* %29
%31 = and i32 %30, -32784
%32 = load %union.DBL*, %union.DBL** %15
%33 = bitcast %union.DBL* %32 to [4 x i32]*
%34 = getelementptr inbounds [4 x i32], [4 x i32]* %33, i64 0, i64 3
store i32 %31, i32* %34
%35 = load %union.DBL*, %union.DBL** %15
%36 = bitcast %union.DBL* %35 to [4 x i32]*
%37 = getelementptr inbounds [4 x i32], [4 x i32]* %36, i64 0, i64 3
%38 = load i32, i32* %37
%39 = lshr i32 %38, 4
%40 = sub i32 %39, 1023
store i32 %40, i32* %13
%41 = load %union.DBL*, %union.DBL** %14
%42 = bitcast %union.DBL* %41 to double*
%43 = load double, double* %42
%44 = load %union.DBL*, %union.DBL** %15
%45 = bitcast %union.DBL* %44 to double*
%46 = load double, double* %45
%47 = fsub double %43, %46
%48 = fcmp oeq double %47, 0.000000e+00
br i1 %48, label %49, label %52
49: ; preds = %25
%50 = load i32, i32* %13
%51 = sitofp i32 %50 to double
store double %51, double* %6
br label %92
52: ; preds = %25
%53 = load i32, i32* %13
%54 = add nsw i32 %53, 1
store i32 %54, i32* %13
%55 = shl i32 %54, 4
%56 = load %union.DBL*, %union.DBL** %14
%57 = bitcast %union.DBL* %56 to [4 x i32]*
%58 = getelementptr inbounds [4 x i32], [4 x i32]* %57, i64 0, i64 3
%59 = load i32, i32* %58
%60 = sub i32 %59, %55
store i32 %60, i32* %58
%61 = load %union.DBL*, %union.DBL** %14
%62 = bitcast %union.DBL* %61 to double*
%63 = load double, double* %62
%64 = fmul double %63, 0x3FF6A09E667F3BCD
store double %64, double* %62
%65 = load %union.DBL*, %union.DBL** %14
%66 = bitcast %union.DBL* %65 to double*
%67 = load double, double* %66
%68 = fsub double %67, 1.000000e+00
%69 = load %union.DBL*, %union.DBL** %14
%70 = bitcast %union.DBL* %69 to double*
%71 = load double, double* %70
%72 = fadd double %71, 1.000000e+00
%73 = fdiv double %68, %72
store double %73, double* %8
%74 = load double, double* %8
%75 = load double, double* %8
%76 = fmul double %74, %75
store double %76, double* %9
%77 = load double, double* %8
%78 = load double, double* %9
%79 = load double, double* %9
%80 = load double, double* %9
%81 = load double, double* %9
%82 = call double @llvm.fmuladd.f64(double %81, double 0x3FCE6A7B4AE55BAE, double 0x3FD2419937997E52)
%83 = call double @llvm.fmuladd.f64(double %80, double %82, double 0x3FD999B2AE0468DA)
%84 = call double @llvm.fmuladd.f64(double %79, double %83, double 0x3FE55555445D42DE)
%85 = call double @llvm.fmuladd.f64(double %78, double %84, double 0x4000000000019B04)
%86 = fmul double %77, %85
store double %86, double* %6
%87 = load double, double* %6
%88 = load i32, i32* %13
%89 = sitofp i32 %88 to double
%90 = call double @llvm.fmuladd.f64(double %87, double 0x3FF71547652B7D33, double %89)
%91 = fsub double %90, 5.000000e-01
store double %91, double* %6
br label %92
92: ; preds = %52, %49
%93 = load double, double* %5
%94 = load double, double* %6
%95 = fmul double %94, %93
store double %95, double* %6
store double 0.000000e+00, double* %7
%96 = bitcast double* %7 to %union.DBL*
store %union.DBL* %96, %union.DBL** %16
%97 = load %union.DBL*, %union.DBL** %15
%98 = bitcast %union.DBL* %97 to double*
%99 = load double, double* %98
%100 = fcmp ogt double %99, 1.023000e+03
br i1 %100, label %106, label %101
101: ; preds = %92
%102 = load %union.DBL*, %union.DBL** %15
%103 = bitcast %union.DBL* %102 to double*
%104 = load double, double* %103
%105 = fcmp olt double %104, -1.023000e+03
br i1 %105, label %106, label %107
106: ; preds = %101, %92
store double 0x7FAC7B1F3CAC7433, double* %3
br label %202
107: ; preds = %101
%108 = load %union.DBL*, %union.DBL** %15
%109 = bitcast %union.DBL* %108 to double*
%110 = load double, double* %109
%111 = fptosi double %110 to i32
store i32 %111, i32* %13
%112 = load i32, i32* %13
%113 = add nsw i32 %112, 1023
%114 = shl i32 %113, 4
%115 = load %union.DBL*, %union.DBL** %16
%116 = bitcast %union.DBL* %115 to [4 x i32]*
%117 = getelementptr inbounds [4 x i32], [4 x i32]* %116, i64 0, i64 3
%118 = load i32, i32* %117
%119 = add i32 %118, %114
store i32 %119, i32* %117
%120 = load %union.DBL*, %union.DBL** %16
%121 = bitcast %union.DBL* %120 to [4 x i32]*
%122 = getelementptr inbounds [4 x i32], [4 x i32]* %121, i64 0, i64 3
%123 = load i32, i32* %122
%124 = and i32 %123, -32784
store i32 %124, i32* %122
%125 = load i32, i32* %13
%126 = sitofp i32 %125 to double
%127 = load %union.DBL*, %union.DBL** %15
%128 = bitcast %union.DBL* %127 to double*
%129 = load double, double* %128
%130 = fsub double %129, %126
store double %130, double* %128
%131 = fcmp oeq double %130, 0.000000e+00
br i1 %131, label %132, label %136
132: ; preds = %107
%133 = load %union.DBL*, %union.DBL** %16
%134 = bitcast %union.DBL* %133 to double*
%135 = load double, double* %134
store double %135, double* %3
br label %202
136: ; preds = %107
br label %137
137: ; preds = %142, %136
%138 = load %union.DBL*, %union.DBL** %15
%139 = bitcast %union.DBL* %138 to double*
%140 = load double, double* %139
%141 = fcmp olt double %140, 0.000000e+00
br i1 %141, label %142, label %157
142: ; preds = %137
%143 = load %union.DBL*, %union.DBL** %16
%144 = bitcast %union.DBL* %143 to [4 x i32]*
%145 = getelementptr inbounds [4 x i32], [4 x i32]* %144, i64 0, i64 3
%146 = load i32, i32* %145
%147 = sub i32 %146, 16
store i32 %147, i32* %145
%148 = load %union.DBL*, %union.DBL** %16
%149 = bitcast %union.DBL* %148 to [4 x i32]*
%150 = getelementptr inbounds [4 x i32], [4 x i32]* %149, i64 0, i64 3
%151 = load i32, i32* %150
%152 = and i32 %151, -32784
store i32 %152, i32* %150
%153 = load %union.DBL*, %union.DBL** %15
%154 = bitcast %union.DBL* %153 to double*
%155 = load double, double* %154
%156 = fadd double %155, 1.000000e+00
store double %156, double* %154
br label %137
157: ; preds = %137
%158 = load %union.DBL*, %union.DBL** %15
%159 = bitcast %union.DBL* %158 to double*
%160 = load double, double* %159
%161 = fcmp oge double %160, 5.000000e-01
br i1 %161, label %162, label %167
162: ; preds = %157
%163 = load %union.DBL*, %union.DBL** %15
%164 = bitcast %union.DBL* %163 to double*
%165 = load double, double* %164
%166 = fsub double %165, 5.000000e-01
store double %166, double* %164
store double 0x3FF6A09E667F3BCD, double* %11
br label %168
167: ; preds = %157
store double 1.000000e+00, double* %11
br label %168
168: ; preds = %167, %162
%169 = load %union.DBL*, %union.DBL** %15
%170 = bitcast %union.DBL* %169 to double*
%171 = load double, double* %170
%172 = load %union.DBL*, %union.DBL** %15
%173 = bitcast %union.DBL* %172 to double*
%174 = load double, double* %173
%175 = fmul double %171, %174
store double %175, double* %9
%176 = load %union.DBL*, %union.DBL** %15
%177 = bitcast %union.DBL* %176 to double*
%178 = load double, double* %177
%179 = load double, double* %9
%180 = call double @llvm.fmuladd.f64(double %179, double 0x3FAD898D9C4AECC3, double 0x401CDC74C25D7AB8)
%181 = fmul double %178, %180
store double %181, double* %8
%182 = load double, double* %9
%183 = fadd double 0x4034D1A4FD5CE0BE, %182
store double %183, double* %10
%184 = load double, double* %11
%185 = load %union.DBL*, %union.DBL** %16
%186 = bitcast %union.DBL* %185 to double*
%187 = load double, double* %186
%188 = fmul double %184, %187
%189 = load double, double* %10
%190 = load double, double* %8
%191 = fadd double %189, %190
%192 = fmul double %188, %191
%193 = load double, double* %10
%194 = load double, double* %8
%195 = fsub double %193, %194
%196 = fdiv double %192, %195
%197 = load %union.DBL*, %union.DBL** %15
%198 = bitcast %union.DBL* %197 to double*
store double %196, double* %198
%199 = load %union.DBL*, %union.DBL** %15
%200 = bitcast %union.DBL* %199 to double*
%201 = load double, double* %200
store double %201, double* %3
br label %202
202: ; preds = %168, %132, %106
%203 = load double, double* %3
ret double %203
}

LLVM IR (-O2):
%union.DBL = type { double, [8 x i8] }
define double @pow(double %0, double %1) {
ret double 0.000000e+00
}