int fresnl(xxa, ssa, cca)
double xxa, *ssa, *cca;
{
  double f, g, cc, ss, c, s, t, u;
  double x, x2;
  double polevl(), p1evl();
  double PII = 3.14159265358979323844;
  double PIO2 = 1.57079632679489661922;
  static double sn[6] = {
      -2.99181919401019853726E3,  7.08840045257738576863E5,
      -6.29741486205862506537E7,  2.54890880573376359104E9,
      -4.42979518059697779103E10, 3.18016297876567817986E11,
  };
  static double sd[6] = {
      2.81376268889994315696E2,  4.55847810806532581675E4,
      5.17343888770096400730E6,  4.19320245898111231129E8,
      2.24411795645340920940E10, 6.07366389490084639049E11,
  };
  static double cn[6] = {
      -4.98843114573573548651E-8, 9.50428062829859605134E-6,
      -6.45191435683965050962E-4, 1.88843319396703850064E-2,
      -2.05525900955013891793E-1, 9.99999999999999998822E-1,
  };
  static double cd[7] = {
      3.99982968972495980367E-12, 9.15439215774657478799E-10,
      1.25001862479598821474E-7,  1.22262789024179030997E-5,
      8.68029542941784300606E-4,  4.12142090722199792936E-2,
      1.00000000000000000118E0,
  };
  static double fn[10] = {
      4.21543555043677546506E-1,  1.43407919780758885261E-1,
      1.15220955073585758835E-2,  3.45017939782574027900E-4,
      4.63613749287867322088E-6,  3.05568983790257605827E-8,
      1.02304514164907233465E-10, 1.72010743268161828879E-13,
      1.34283276233062758925E-16, 3.76329711269987889006E-20,
  };
  static double fd[10] = {
      7.51586398353378947175E-1,  1.16888925859191382142E-1,
      6.44051526508858611005E-3,  1.55934409164153020873E-4,
      1.84627567348930545870E-6,  1.12699224763999035261E-8,
      3.60140029589371370404E-11, 5.88754533621578410010E-14,
      4.52001434074129701496E-17, 1.25443237090011264384E-20,
  };
  static double gn[11] = {
      5.04442073643383265887E-1,  1.97102833525523411709E-1,
      1.87648584092575249293E-2,  6.84079380915393090172E-4,
      1.15138826111884280931E-5,  9.82852443688422223854E-8,
      4.45344415861750144738E-10, 1.08268041139020870318E-12,
      1.37555460633261799868E-15, 8.36354435630677421531E-19,
      1.86958710162783235106E-22,
  };
  static double gd[11] = {
      1.47495759925128324529E0,   3.37748989120019970451E-1,
      2.53603741420338795122E-2,  8.14679107184306179049E-4,
      1.27545075667729118702E-5,  1.04314589657571990585E-7,
      4.60680728146520428211E-10, 1.10273215066240270757E-12,
      1.38796531259578871258E-15, 8.39158816283118707363E-19,
      1.86958710162783236342E-22,
  };
  x = fabs(xxa);
  x2 = x * x;
  if (x2 < 2.5625) {
    t = x2 * x2;
    ss = x * x2 * polevl(t, sn, 5) / p1evl(t, sd, 6);
    cc = x * polevl(t, cn, 5) / polevl(t, cd, 6);
    goto done;
  }
  if (x > 36974.0) {
    cc = 0.5;
    ss = 0.5;
    goto done;
  }
  x2 = x * x;
  t = PII * x2;
  u = 1.0 / (t * t);
  t = 1.0 / t;
  f = 1.0 - u * polevl(u, fn, 9) / p1evl(u, fd, 10);
  g = t * polevl(u, gn, 10) / p1evl(u, gd, 11);
  t = PIO2 * x2;
  c = cos(t);
  s = sin(t);
  t = PII * x;
  cc = 0.5 + (f * s - g * c) / t;
  ss = 0.5 - (f * c + g * s) / t;
done:
  if (xxa < 0.0) {
    cc = -cc;
    ss = -ss;
  }
  *cca = cc;
  *ssa = ss;
  return (0);
}


x86 assembly (clang, -O0):
<fresnl>:
push   %rbp
mov    %rsp,%rbp
sub    $0xc0,%rsp
movsd  %xmm0,-0x8(%rbp)
mov    %rdi,-0x10(%rbp)
mov    %rsi,-0x18(%rbp)
movsd  0xeb0(%rip),%xmm0
movsd  %xmm0,-0x70(%rbp)
movsd  0xe9b(%rip),%xmm0
movsd  %xmm0,-0x78(%rbp)
movsd  -0x8(%rbp),%xmm0
movaps 0xeb2(%rip),%xmm1
pand   %xmm1,%xmm0
movsd  %xmm0,-0x60(%rbp)
movsd  -0x60(%rbp),%xmm0
mulsd  -0x60(%rbp),%xmm0
movsd  %xmm0,-0x68(%rbp)
movsd  0xe62(%rip),%xmm0
ucomisd -0x68(%rbp),%xmm0
jbe    128c <fresnl+0x14c>
movsd  -0x68(%rbp),%xmm0
mulsd  -0x68(%rbp),%xmm0
movsd  %xmm0,-0x50(%rbp)
movsd  -0x60(%rbp),%xmm0
mulsd  -0x68(%rbp),%xmm0
movsd  %xmm0,-0x98(%rbp)
ff
movsd  -0x50(%rbp),%xmm0
lea    0x2e7a(%rip),%rdi
mov    $0x5,%esi
mov    $0x1,%al
call   1030 <polevl@plt>
movaps %xmm0,%xmm1
movsd  -0x98(%rbp),%xmm0
ff
mulsd  %xmm1,%xmm0
movsd  %xmm0,-0x90(%rbp)
ff
movsd  -0x50(%rbp),%xmm0
lea    0x2e7b(%rip),%rdi
mov    $0x6,%esi
mov    $0x1,%al
call   1060 <p1evl@plt>
movaps %xmm0,%xmm1
movsd  -0x90(%rbp),%xmm0
ff
divsd  %xmm1,%xmm0
movsd  %xmm0,-0x38(%rbp)
movsd  -0x60(%rbp),%xmm0
movsd  %xmm0,-0x88(%rbp)
ff
movsd  -0x50(%rbp),%xmm0
lea    0x2e72(%rip),%rdi
mov    $0x5,%esi
mov    $0x1,%al
call   1030 <polevl@plt>
movaps %xmm0,%xmm1
movsd  -0x88(%rbp),%xmm0
ff
mulsd  %xmm1,%xmm0
movsd  %xmm0,-0x80(%rbp)
movsd  -0x50(%rbp),%xmm0
lea    0x2e76(%rip),%rdi
mov    $0x6,%esi
mov    $0x1,%al
call   1030 <polevl@plt>
movaps %xmm0,%xmm1
movsd  -0x80(%rbp),%xmm0
divsd  %xmm1,%xmm0
movsd  %xmm0,-0x30(%rbp)
jmp    149d <fresnl+0x35d>
movsd  -0x60(%rbp),%xmm0
movsd  0xd7f(%rip),%xmm1
ucomisd %xmm1,%xmm0
jbe    12c2 <fresnl+0x182>
movsd  0xd75(%rip),%xmm0
movsd  %xmm0,-0x30(%rbp)
movsd  0xd68(%rip),%xmm0
movsd  %xmm0,-0x38(%rbp)
jmp    149d <fresnl+0x35d>
movsd  -0x60(%rbp),%xmm0
mulsd  -0x60(%rbp),%xmm0
movsd  %xmm0,-0x68(%rbp)
movsd  -0x70(%rbp),%xmm0
mulsd  -0x68(%rbp),%xmm0
movsd  %xmm0,-0x50(%rbp)
movsd  -0x50(%rbp),%xmm1
mulsd  -0x50(%rbp),%xmm1
movsd  0xd36(%rip),%xmm0
divsd  %xmm1,%xmm0
movsd  %xmm0,-0x58(%rbp)
movsd  0xd25(%rip),%xmm0
divsd  -0x50(%rbp),%xmm0
movsd  %xmm0,-0x50(%rbp)
movsd  -0x58(%rbp),%xmm0
movsd  %xmm0,-0xb8(%rbp)
ff
movsd  -0x58(%rbp),%xmm0
lea    0x2dfa(%rip),%rdi
mov    $0x9,%esi
mov    $0x1,%al
call   1030 <polevl@plt>
movaps %xmm0,%xmm1
movsd  -0xb8(%rbp),%xmm0
ff
mulsd  %xmm1,%xmm0
movsd  %xmm0,-0xb0(%rbp)
ff
movsd  -0x58(%rbp),%xmm0
lea    0x2e1b(%rip),%rdi
mov    $0xa,%esi
mov    $0x1,%al
call   1060 <p1evl@plt>
movsd  -0xb0(%rbp),%xmm1
ff
divsd  %xmm0,%xmm1
movsd  0xcb3(%rip),%xmm0
subsd  %xmm1,%xmm0
movsd  %xmm0,-0x20(%rbp)
movsd  -0x50(%rbp),%xmm0
movsd  %xmm0,-0xa8(%rbp)
ff
movsd  -0x58(%rbp),%xmm0
lea    0x2e29(%rip),%rdi
mov    $0xa,%esi
mov    $0x1,%al
call   1030 <polevl@plt>
movaps %xmm0,%xmm1
movsd  -0xa8(%rbp),%xmm0
ff
mulsd  %xmm1,%xmm0
movsd  %xmm0,-0xa0(%rbp)
ff
movsd  -0x58(%rbp),%xmm0
lea    0x2e5a(%rip),%rdi
mov    $0xb,%esi
mov    $0x1,%al
call   1060 <p1evl@plt>
movaps %xmm0,%xmm1
movsd  -0xa0(%rbp),%xmm0
ff
divsd  %xmm1,%xmm0
movsd  %xmm0,-0x28(%rbp)
movsd  -0x78(%rbp),%xmm0
mulsd  -0x68(%rbp),%xmm0
movsd  %xmm0,-0x50(%rbp)
movsd  -0x50(%rbp),%xmm0
call   1050 <cos@plt>
movsd  %xmm0,-0x40(%rbp)
movsd  -0x50(%rbp),%xmm0
call   1040 <sin@plt>
movsd  %xmm0,-0x48(%rbp)
movsd  -0x70(%rbp),%xmm0
mulsd  -0x60(%rbp),%xmm0
movsd  %xmm0,-0x50(%rbp)
movsd  -0x20(%rbp),%xmm1
movsd  -0x48(%rbp),%xmm2
movsd  -0x28(%rbp),%xmm0
mulsd  -0x40(%rbp),%xmm0
movq   %xmm0,%rax
movabs $0x8000000000000000,%rcx
xor    %rcx,%rax
movq   %rax,%xmm0
mulsd  %xmm2,%xmm1
addsd  %xmm0,%xmm1
divsd  -0x50(%rbp),%xmm1
movsd  0xbbe(%rip),%xmm0
addsd  %xmm1,%xmm0
movsd  %xmm0,-0x30(%rbp)
movsd  -0x20(%rbp),%xmm1
movsd  -0x40(%rbp),%xmm2
movsd  -0x28(%rbp),%xmm0
mulsd  -0x48(%rbp),%xmm0
mulsd  %xmm2,%xmm1
addsd  %xmm0,%xmm1
divsd  -0x50(%rbp),%xmm1
movsd  0xb8c(%rip),%xmm0
subsd  %xmm1,%xmm0
movsd  %xmm0,-0x38(%rbp)
xorps  %xmm0,%xmm0
ucomisd -0x8(%rbp),%xmm0
jbe    14ed <fresnl+0x3ad>
movsd  -0x30(%rbp),%xmm0
movq   %xmm0,%rax
movabs $0x8000000000000000,%rcx
xor    %rcx,%rax
movq   %rax,%xmm0
movsd  %xmm0,-0x30(%rbp)
movsd  -0x38(%rbp),%xmm0
movq   %xmm0,%rax
movabs $0x8000000000000000,%rcx
xor    %rcx,%rax
movq   %rax,%xmm0
movsd  %xmm0,-0x38(%rbp)
movsd  -0x30(%rbp),%xmm0
mov    -0x18(%rbp),%rax
movsd  %xmm0,(%rax)
movsd  -0x38(%rbp),%xmm0
mov    -0x10(%rbp),%rax
movsd  %xmm0,(%rax)
xor    %eax,%eax
add    $0xc0,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<fresnl>:
push   %r14
push   %rbx
sub    $0x68,%rsp
mov    %rsi,%r14
mov    %rdi,%rbx
movapd %xmm0,%xmm4
movapd 0xea7(%rip),%xmm1
andpd  %xmm0,%xmm1
movapd %xmm0,%xmm2
mulsd  %xmm0,%xmm2
movsd  0xed3(%rip),%xmm0
ucomisd %xmm2,%xmm0
jbe    1244 <fresnl+0x104>
movapd %xmm1,%xmm0
mulsd  %xmm2,%xmm0
movapd %xmm0,0x10(%rsp)
mulsd  %xmm2,%xmm2
movapd %xmm2,0x20(%rsp)
lea    0x2eba(%rip),%rdi
movapd %xmm2,%xmm0
mov    $0x5,%esi
mov    $0x1,%al
movapd %xmm4,0x50(%rsp)
movapd %xmm1,0x40(%rsp)
call   1030 <polevl@plt>
movapd %xmm0,0x30(%rsp)
lea    0x2ec1(%rip),%rdi
movaps 0x20(%rsp),%xmm0
mov    $0x6,%esi
mov    $0x1,%al
call   1060 <p1evl@plt>
movaps %xmm0,(%rsp)
lea    0x2ed5(%rip),%rdi
movapd 0x20(%rsp),%xmm0
mov    $0x5,%esi
mov    $0x1,%al
call   1030 <polevl@plt>
movapd 0x10(%rsp),%xmm1
unpcklpd 0x40(%rsp),%xmm1
movapd 0x30(%rsp),%xmm2
unpcklpd %xmm0,%xmm2
mulpd  %xmm1,%xmm2
movapd %xmm2,0x30(%rsp)
lea    0x2ecc(%rip),%rdi
movapd 0x20(%rsp),%xmm0
mov    $0x6,%esi
mov    $0x1,%al
call   1030 <polevl@plt>
movapd 0x30(%rsp),%xmm5
movapd 0x50(%rsp),%xmm4
movapd (%rsp),%xmm1
unpcklpd %xmm0,%xmm1
divpd  %xmm1,%xmm5
jmp    13df <fresnl+0x29f>
ucomisd 0xdfc(%rip),%xmm1
jbe    125b <fresnl+0x11b>
movapd 0xdba(%rip),%xmm5
jmp    13df <fresnl+0x29f>
movapd %xmm2,%xmm0
mulsd  0xde9(%rip),%xmm0
movsd  0xde9(%rip),%xmm3
movapd %xmm3,0x30(%rsp)
movapd %xmm3,%xmm5
divsd  %xmm0,%xmm5
movsd  %xmm5,0x10(%rsp)
mulsd  %xmm0,%xmm0
divsd  %xmm0,%xmm3
movsd  %xmm3,(%rsp)
lea    0x2e89(%rip),%rdi
movapd %xmm3,%xmm0
mov    $0x9,%esi
mov    $0x1,%al
movapd %xmm4,0x50(%rsp)
movapd %xmm1,0x40(%rsp)
movapd %xmm2,0x20(%rsp)
call   1030 <polevl@plt>
movapd %xmm0,%xmm1
movsd  (%rsp),%xmm0
mulsd  %xmm0,%xmm1
movsd  %xmm1,0x60(%rsp)
lea    0x2e9d(%rip),%rdi
mov    $0xa,%esi
mov    $0x1,%al
call   1060 <p1evl@plt>
movsd  0x60(%rsp),%xmm1
divsd  %xmm0,%xmm1
movapd 0x30(%rsp),%xmm0
subsd  %xmm1,%xmm0
movapd %xmm0,0x30(%rsp)
lea    0x2ec0(%rip),%rdi
movsd  (%rsp),%xmm0
mov    $0xa,%esi
mov    $0x1,%al
call   1030 <polevl@plt>
mulsd  0x10(%rsp),%xmm0
movapd %xmm0,0x10(%rsp)
lea    0x2efc(%rip),%rdi
movsd  (%rsp),%xmm0
mov    $0xb,%esi
mov    $0x1,%al
call   1060 <p1evl@plt>
movapd 0x10(%rsp),%xmm1
divsd  %xmm0,%xmm1
movapd %xmm1,0x10(%rsp)
movapd 0x20(%rsp),%xmm0
mulsd  0xd0d(%rip),%xmm0
movapd %xmm0,0x20(%rsp)
call   1050 <cos@plt>
movapd %xmm0,(%rsp)
movapd 0x20(%rsp),%xmm0
call   1040 <sin@plt>
movapd 0x30(%rsp),%xmm5
movapd 0x50(%rsp),%xmm4
movapd 0x40(%rsp),%xmm2
mulsd  0xcc8(%rip),%xmm2
movapd 0xc90(%rip),%xmm1
movapd 0x10(%rsp),%xmm3
xorpd  %xmm3,%xmm1
movapd (%rsp),%xmm6
unpcklpd %xmm6,%xmm3
unpcklpd %xmm0,%xmm6
unpcklpd %xmm1,%xmm0
mulpd  %xmm3,%xmm0
unpcklpd %xmm5,%xmm5
mulpd  %xmm6,%xmm5
addpd  %xmm0,%xmm5
movapd %xmm2,%xmm0
unpcklpd %xmm2,%xmm0
divpd  %xmm0,%xmm5
movsd  0xc99(%rip),%xmm0
subpd  %xmm5,%xmm0
addpd  0xc55(%rip),%xmm5
movsd  %xmm0,%xmm5
xorpd  %xmm2,%xmm2
ucomisd %xmm4,%xmm2
movapd %xmm5,%xmm0
unpckhpd %xmm5,%xmm0
movapd 0xc29(%rip),%xmm1
movapd %xmm5,%xmm3
xorpd  %xmm1,%xmm3
cmpltsd %xmm2,%xmm4
andpd  %xmm4,%xmm3
andnpd %xmm5,%xmm4
orpd   %xmm3,%xmm4
jbe    1416 <fresnl+0x2d6>
xorpd  %xmm1,%xmm0
movsd  %xmm0,(%r14)
movlpd %xmm4,(%rbx)
xor    %eax,%eax
add    $0x68,%rsp
pop    %rbx
pop    %r14
ret

LLVM IR (-O0):
@fresnl.sn = internal global [6 x double] [double 0xC0A75FA36D65B5C3, double 0x4125A1D0172C05B6, double 0xC18E074624F6F5ED, double 0x41E2FDA860B77AFE, double 0xC224A0BA347BF087, double 0x425282CFE6E52457]
@fresnl.sd = internal global [6 x double] [double 0x4071960532871072, double 0x40E64218FE9CDAA9, double 0x4153BC2FB8D017B4, double 0x41B8FE51B5E5EA9E, double 0x4214E664E6B222E9, double 0x4261AD3B73DE42B5]
@fresnl.cn = internal global [6 x double] [double 0xBE6AC80C2CFB62D3, double 0x3EE3EE9262100F74, double 0xBF4524420ED68786, double 0x3F93566A1059CC13, double 0xBFCA4EAC378A9690, double 1.000000e+00]
@fresnl.cd = internal global [7 x double] [double 0x3D9197686A7FC6B3, double 0x3E0F7449DB0375B9, double 0x3E80C70802A45191, double 0x3EE9A3EEFA2A1D32, double 0x3F4C718F3FDBD99D, double 0x3FA51A076030FE74, double 1.000000e+00]
@fresnl.fn = internal global [10 x double] [double 0x3FDAFA91D1B02391, double 0x3FC25B30D2B90E5E, double 0x3F8798E57B157DAD, double 0x3F369C70C4950EFC, double 0x3ED37203C5357795, double 0x3E6067B5484E87A1, double 0x3DDC1F0A4998A7BB, double 0x3D4835571459FDF7, double 0x3CA35A2DAF8FA9E4, double 0x3BE636EF0E0B05F6]
@fresnl.fd = internal global [10 x double] [double 0x3FE80CFEEB217A65, double 0x3FBDEC6EC1D46D7D, double 0x3F7A615EA6ED56F3, double 0x3F24704A6017BD60, double 0x3EBEF9B1923264F5, double 0x3E4833B495525916, double 0x3DC3CC8533D3A061, double 0x3D30926C6B9F0790, double 0x3C8A0E5D2352F48D, double 0x3BCD9E9412B96141]
@fresnl.gn = internal global [11 x double] [double 0x3FE02463B420CACA, double 0x3FC93AAA67F87481, double 0x3F93371854BA3214, double 0x3F466A7948D1B33B, double 0x3EE82577F9FAABF3, double 0x3E7A621C4DEA6091, double 0x3DFE9A94F200EB09, double 0x3D730BF5876689CB, double 0x3CD8C7A03DF8A964, double 0x3C2EDB24F17358A6, double 0x3B6C409D624FBE2B]
@fresnl.gd = internal global [11 x double] [double 0x3FF7996D23BC55C1, double 0x3FD59DADEFA1C34F, double 0x3F99F811E637AA09, double 0x3F4AB2060FA0AE28, double 0x3EEABF862C0A067B, double 0x3E7C0071AB1C7428, double 0x3DFFA8618E3CF1C6, double 0x3D7366439C3DEF2B, double 0x3CD900DC37C81936, double 0x3C2EF5A184FF8364, double 0x3B6C409D624FBE2B]
define i32 @fresnl(double %0, double* %1, double* %2) {
%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 double
%13 = alloca double
%14 = alloca double
%15 = alloca double
%16 = alloca double
%17 = alloca double
%18 = alloca double
store double %0, double* %4
store double* %1, double** %5
store double* %2, double** %6
store double 0x400921FB54442D18, double* %17
store double 0x3FF921FB54442D18, double* %18
%19 = load double, double* %4
%20 = call double @llvm.fabs.f64(double %19)
store double %20, double* %15
%21 = load double, double* %15
%22 = load double, double* %15
%23 = fmul double %21, %22
store double %23, double* %16
%24 = load double, double* %16
%25 = fcmp olt double %24, 2.562500e+00
br i1 %25, label %26, label %46
26: ; preds = %3
%27 = load double, double* %16
%28 = load double, double* %16
%29 = fmul double %27, %28
store double %29, double* %13
%30 = load double, double* %15
%31 = load double, double* %16
%32 = fmul double %30, %31
%33 = load double, double* %13
%34 = call double (double, double*, i32, ...) bitcast (double (...)* @polevl to double (double, double*, i32, ...)*)(double %33, double* getelementptr inbounds ([6 x double], [6 x double]* @fresnl.sn, i64 0, i64 0), i32 5)
%35 = fmul double %32, %34
%36 = load double, double* %13
%37 = call double (double, double*, i32, ...) bitcast (double (...)* @p1evl to double (double, double*, i32, ...)*)(double %36, double* getelementptr inbounds ([6 x double], [6 x double]* @fresnl.sd, i64 0, i64 0), i32 6)
%38 = fdiv double %35, %37
store double %38, double* %10
%39 = load double, double* %15
%40 = load double, double* %13
%41 = call double (double, double*, i32, ...) bitcast (double (...)* @polevl to double (double, double*, i32, ...)*)(double %40, double* getelementptr inbounds ([6 x double], [6 x double]* @fresnl.cn, i64 0, i64 0), i32 5)
%42 = fmul double %39, %41
%43 = load double, double* %13
%44 = call double (double, double*, i32, ...) bitcast (double (...)* @polevl to double (double, double*, i32, ...)*)(double %43, double* getelementptr inbounds ([7 x double], [7 x double]* @fresnl.cd, i64 0, i64 0), i32 6)
%45 = fdiv double %42, %44
store double %45, double* %9
br label %107
46: ; preds = %3
%47 = load double, double* %15
%48 = fcmp ogt double %47, 3.697400e+04
br i1 %48, label %49, label %50
49: ; preds = %46
store double 5.000000e-01, double* %9
store double 5.000000e-01, double* %10
br label %107
50: ; preds = %46
%51 = load double, double* %15
%52 = load double, double* %15
%53 = fmul double %51, %52
store double %53, double* %16
%54 = load double, double* %17
%55 = load double, double* %16
%56 = fmul double %54, %55
store double %56, double* %13
%57 = load double, double* %13
%58 = load double, double* %13
%59 = fmul double %57, %58
%60 = fdiv double 1.000000e+00, %59
store double %60, double* %14
%61 = load double, double* %13
%62 = fdiv double 1.000000e+00, %61
store double %62, double* %13
%63 = load double, double* %14
%64 = load double, double* %14
%65 = call double (double, double*, i32, ...) bitcast (double (...)* @polevl to double (double, double*, i32, ...)*)(double %64, double* getelementptr inbounds ([10 x double], [10 x double]* @fresnl.fn, i64 0, i64 0), i32 9)
%66 = fmul double %63, %65
%67 = load double, double* %14
%68 = call double (double, double*, i32, ...) bitcast (double (...)* @p1evl to double (double, double*, i32, ...)*)(double %67, double* getelementptr inbounds ([10 x double], [10 x double]* @fresnl.fd, i64 0, i64 0), i32 10)
%69 = fdiv double %66, %68
%70 = fsub double 1.000000e+00, %69
store double %70, double* %7
%71 = load double, double* %13
%72 = load double, double* %14
%73 = call double (double, double*, i32, ...) bitcast (double (...)* @polevl to double (double, double*, i32, ...)*)(double %72, double* getelementptr inbounds ([11 x double], [11 x double]* @fresnl.gn, i64 0, i64 0), i32 10)
%74 = fmul double %71, %73
%75 = load double, double* %14
%76 = call double (double, double*, i32, ...) bitcast (double (...)* @p1evl to double (double, double*, i32, ...)*)(double %75, double* getelementptr inbounds ([11 x double], [11 x double]* @fresnl.gd, i64 0, i64 0), i32 11)
%77 = fdiv double %74, %76
store double %77, double* %8
%78 = load double, double* %18
%79 = load double, double* %16
%80 = fmul double %78, %79
store double %80, double* %13
%81 = load double, double* %13
%82 = call double @cos(double %81)
store double %82, double* %11
%83 = load double, double* %13
%84 = call double @sin(double %83)
store double %84, double* %12
%85 = load double, double* %17
%86 = load double, double* %15
%87 = fmul double %85, %86
store double %87, double* %13
%88 = load double, double* %7
%89 = load double, double* %12
%90 = load double, double* %8
%91 = load double, double* %11
%92 = fmul double %90, %91
%93 = fneg double %92
%94 = call double @llvm.fmuladd.f64(double %88, double %89, double %93)
%95 = load double, double* %13
%96 = fdiv double %94, %95
%97 = fadd double 5.000000e-01, %96
store double %97, double* %9
%98 = load double, double* %7
%99 = load double, double* %11
%100 = load double, double* %8
%101 = load double, double* %12
%102 = fmul double %100, %101
%103 = call double @llvm.fmuladd.f64(double %98, double %99, double %102)
%104 = load double, double* %13
%105 = fdiv double %103, %104
%106 = fsub double 5.000000e-01, %105
store double %106, double* %10
br label %107
107: ; preds = %50, %49, %26
%108 = load double, double* %4
%109 = fcmp olt double %108, 0.000000e+00
br i1 %109, label %110, label %115
110: ; preds = %107
%111 = load double, double* %9
%112 = fneg double %111
store double %112, double* %9
%113 = load double, double* %10
%114 = fneg double %113
store double %114, double* %10
br label %115
115: ; preds = %110, %107
%116 = load double, double* %9
%117 = load double*, double** %6
store double %116, double* %117
%118 = load double, double* %10
%119 = load double*, double** %5
store double %118, double* %119
ret i32 0
}

LLVM IR (-O2):
@fresnl.sn = internal global [6 x double] [double 0xC0A75FA36D65B5C3, double 0x4125A1D0172C05B6, double 0xC18E074624F6F5ED, double 0x41E2FDA860B77AFE, double 0xC224A0BA347BF087, double 0x425282CFE6E52457]
@fresnl.sd = internal global [6 x double] [double 0x4071960532871072, double 0x40E64218FE9CDAA9, double 0x4153BC2FB8D017B4, double 0x41B8FE51B5E5EA9E, double 0x4214E664E6B222E9, double 0x4261AD3B73DE42B5]
@fresnl.cn = internal global [6 x double] [double 0xBE6AC80C2CFB62D3, double 0x3EE3EE9262100F74, double 0xBF4524420ED68786, double 0x3F93566A1059CC13, double 0xBFCA4EAC378A9690, double 1.000000e+00]
@fresnl.cd = internal global [7 x double] [double 0x3D9197686A7FC6B3, double 0x3E0F7449DB0375B9, double 0x3E80C70802A45191, double 0x3EE9A3EEFA2A1D32, double 0x3F4C718F3FDBD99D, double 0x3FA51A076030FE74, double 1.000000e+00]
@fresnl.fn = internal global [10 x double] [double 0x3FDAFA91D1B02391, double 0x3FC25B30D2B90E5E, double 0x3F8798E57B157DAD, double 0x3F369C70C4950EFC, double 0x3ED37203C5357795, double 0x3E6067B5484E87A1, double 0x3DDC1F0A4998A7BB, double 0x3D4835571459FDF7, double 0x3CA35A2DAF8FA9E4, double 0x3BE636EF0E0B05F6]
@fresnl.fd = internal global [10 x double] [double 0x3FE80CFEEB217A65, double 0x3FBDEC6EC1D46D7D, double 0x3F7A615EA6ED56F3, double 0x3F24704A6017BD60, double 0x3EBEF9B1923264F5, double 0x3E4833B495525916, double 0x3DC3CC8533D3A061, double 0x3D30926C6B9F0790, double 0x3C8A0E5D2352F48D, double 0x3BCD9E9412B96141]
@fresnl.gn = internal global [11 x double] [double 0x3FE02463B420CACA, double 0x3FC93AAA67F87481, double 0x3F93371854BA3214, double 0x3F466A7948D1B33B, double 0x3EE82577F9FAABF3, double 0x3E7A621C4DEA6091, double 0x3DFE9A94F200EB09, double 0x3D730BF5876689CB, double 0x3CD8C7A03DF8A964, double 0x3C2EDB24F17358A6, double 0x3B6C409D624FBE2B]
@fresnl.gd = internal global [11 x double] [double 0x3FF7996D23BC55C1, double 0x3FD59DADEFA1C34F, double 0x3F99F811E637AA09, double 0x3F4AB2060FA0AE28, double 0x3EEABF862C0A067B, double 0x3E7C0071AB1C7428, double 0x3DFFA8618E3CF1C6, double 0x3D7366439C3DEF2B, double 0x3CD900DC37C81936, double 0x3C2EF5A184FF8364, double 0x3B6C409D624FBE2B]
define i32 @fresnl(double %0, double* nocapture writeonly %1, double* nocapture writeonly %2) {
%4 = tail call double @llvm.fabs.f64(double %0)
%5 = fmul double %0, %0
%6 = fcmp olt double %5, 2.562500e+00
br i1 %6, label %7, label %22
7: ; preds = %3
%8 = fmul double %5, %5
%9 = fmul double %4, %5
%10 = tail call double (double, double*, i32, ...) bitcast (double (...)* @polevl to double (double, double*, i32, ...)*)(double %8, double* getelementptr inbounds ([6 x double], [6 x double]* @fresnl.sn, i64 0, i64 0), i32 5)
%11 = tail call double (double, double*, i32, ...) bitcast (double (...)* @p1evl to double (double, double*, i32, ...)*)(double %8, double* getelementptr inbounds ([6 x double], [6 x double]* @fresnl.sd, i64 0, i64 0), i32 6)
%12 = tail call double (double, double*, i32, ...) bitcast (double (...)* @polevl to double (double, double*, i32, ...)*)(double %8, double* getelementptr inbounds ([6 x double], [6 x double]* @fresnl.cn, i64 0, i64 0), i32 5)
%13 = insertelement <2 x double> poison, double %9, i64 0
%14 = insertelement <2 x double> %13, double %4, i64 1
%15 = insertelement <2 x double> poison, double %10, i64 0
%16 = insertelement <2 x double> %15, double %12, i64 1
%17 = fmul <2 x double> %14, %16
%18 = tail call double (double, double*, i32, ...) bitcast (double (...)* @polevl to double (double, double*, i32, ...)*)(double %8, double* getelementptr inbounds ([7 x double], [7 x double]* @fresnl.cd, i64 0, i64 0), i32 6)
%19 = insertelement <2 x double> poison, double %11, i64 0
%20 = insertelement <2 x double> %19, double %18, i64 1
%21 = fdiv <2 x double> %17, %20
br label %59
22: ; preds = %3
%23 = fcmp ogt double %4, 3.697400e+04
br i1 %23, label %59, label %24
24: ; preds = %22
%25 = fmul double %5, 0x400921FB54442D18
%26 = fmul double %25, %25
%27 = fdiv double 1.000000e+00, %26
%28 = fdiv double 1.000000e+00, %25
%29 = tail call double (double, double*, i32, ...) bitcast (double (...)* @polevl to double (double, double*, i32, ...)*)(double %27, double* getelementptr inbounds ([10 x double], [10 x double]* @fresnl.fn, i64 0, i64 0), i32 9)
%30 = fmul double %27, %29
%31 = tail call double (double, double*, i32, ...) bitcast (double (...)* @p1evl to double (double, double*, i32, ...)*)(double %27, double* getelementptr inbounds ([10 x double], [10 x double]* @fresnl.fd, i64 0, i64 0), i32 10)
%32 = fdiv double %30, %31
%33 = fsub double 1.000000e+00, %32
%34 = tail call double (double, double*, i32, ...) bitcast (double (...)* @polevl to double (double, double*, i32, ...)*)(double %27, double* getelementptr inbounds ([11 x double], [11 x double]* @fresnl.gn, i64 0, i64 0), i32 10)
%35 = fmul double %28, %34
%36 = tail call double (double, double*, i32, ...) bitcast (double (...)* @p1evl to double (double, double*, i32, ...)*)(double %27, double* getelementptr inbounds ([11 x double], [11 x double]* @fresnl.gd, i64 0, i64 0), i32 11)
%37 = fdiv double %35, %36
%38 = fmul double %5, 0x3FF921FB54442D18
%39 = tail call double @cos(double %38)
%40 = tail call double @sin(double %38)
%41 = fmul double %4, 0x400921FB54442D18
%42 = fneg double %37
%43 = insertelement <2 x double> poison, double %37, i64 0
%44 = insertelement <2 x double> %43, double %39, i64 1
%45 = insertelement <2 x double> poison, double %40, i64 0
%46 = insertelement <2 x double> %45, double %42, i64 1
%47 = fmul <2 x double> %44, %46
%48 = insertelement <2 x double> poison, double %33, i64 0
%49 = shufflevector <2 x double> %48, <2 x double> poison, <2 x i32> zeroinitializer
%50 = insertelement <2 x double> poison, double %39, i64 0
%51 = insertelement <2 x double> %50, double %40, i64 1
%52 = call <2 x double> @llvm.fmuladd.v2f64(<2 x double> %49, <2 x double> %51, <2 x double> %47)
%53 = insertelement <2 x double> poison, double %41, i64 0
%54 = shufflevector <2 x double> %53, <2 x double> poison, <2 x i32> zeroinitializer
%55 = fdiv <2 x double> %52, %54
%56 = fsub <2 x double> <double 5.000000e-01, double poison>, %55
%57 = fadd <2 x double> %55, <double poison, double 5.000000e-01>
%58 = shufflevector <2 x double> %56, <2 x double> %57, <2 x i32> <i32 0, i32 3>
br label %59
59: ; preds = %22, %24, %7
%60 = phi <2 x double> [ %21, %7 ], [ %58, %24 ], [ <double 5.000000e-01, double 5.000000e-01>, %22 ]
%61 = fcmp olt double %0, 0.000000e+00
%62 = extractelement <2 x double> %60, i64 1
%63 = fneg double %62
%64 = extractelement <2 x double> %60, i64 0
%65 = fneg double %64
%66 = select i1 %61, double %65, double %64
%67 = select i1 %61, double %63, double %62
store double %67, double* %2
store double %66, double* %1
ret i32 0
}