void drive(int N, long double *c, long double *t, long double *v) {
  long int i, j, l;
  __float128 ti, x, vi, P, Pm1, Pm2, n, one, two, Pp, Ppm1, Ppm2;
  one = ((__float128)1);
  two = ((__float128)2);
  for (i = 0; i < N; i++) {
    ti = ((__float128)t[i]);
    x = cosq(ti);
    for (l = 0; l < 2; l++) {
      Pm2 = one;
      Pm1 = x;
      Ppm2 = 0;
      Ppm1 = one;
      for (j = 2; j <= N; j++) {
        n = ((__float128)j);
        P = (two - one / n) * Pm1 * x - (1. - one / n) * Pm2;
        Pp = (two - one / n) * (Pm1 + Ppm1 * x) - (1. - one / n) * Ppm2;
        Pm2 = Pm1;
        Pm1 = P;
        Ppm2 = Ppm1;
        Ppm1 = Pp;
      }
      x -= P / Pp;
    }
    Pm2 = one;
    Pm1 = x;
    vi = ((__float128)c[0]) + x * ((__float128)c[1]);
    for (j = 2; j < N; j++) {
      n = ((__float128)j);
      P = two * Pm1 * x - Pm2;
      vi += P * ((__float128)c[j]);
      Pm2 = Pm1;
      Pm1 = P;
    }
    v[i] = vi;
  }
  return;
}


x86 assembly (clang, -O0):
<drive>:
push   %rbp
mov    %rsp,%rbp
sub    $0x230,%rsp
mov    %edi,-0x4(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %rdx,-0x18(%rbp)
mov    %rcx,-0x20(%rbp)
movaps 0x4ecf(%rip),%xmm0
movaps %xmm0,-0xc0(%rbp)
movaps 0x4ed1(%rip),%xmm0
movaps %xmm0,-0xd0(%rbp)
movq   $0x0,-0x28(%rbp)
mov    -0x28(%rbp),%rax
movslq -0x4(%rbp),%rcx
cmp    %rcx,%rax
jge    1558 <drive+0x448>
mov    -0x18(%rbp),%rax
mov    -0x28(%rbp),%rcx
shl    $0x4,%rcx
fldt   (%rax,%rcx,1)
mov    %rsp,%rax
fstpt  (%rax)
call   5440 <__extendxftf2>
movaps %xmm0,-0x50(%rbp)
movaps -0x50(%rbp),%xmm0
mov    $0x1,%al
call   1030 <cosq@plt>
mov    %eax,%edi
call   52b0 <__floatsitf>
movaps %xmm0,-0x60(%rbp)
movq   $0x0,-0x38(%rbp)
cmpq   $0x2,-0x38(%rbp)
jge    13df <drive+0x2cf>
movaps -0xc0(%rbp),%xmm0
movaps %xmm0,-0xa0(%rbp)
movaps -0x60(%rbp),%xmm0
movaps %xmm0,-0x90(%rbp)
xorps  %xmm0,%xmm0
movaps %xmm0,-0x100(%rbp)
movaps -0xc0(%rbp),%xmm0
movaps %xmm0,-0xf0(%rbp)
movq   $0x2,-0x30(%rbp)
mov    -0x30(%rbp),%rax
movslq -0x4(%rbp),%rcx
cmp    %rcx,%rax
jg     13ae <drive+0x29e>
mov    -0x30(%rbp),%rdi
call   5350 <__floatditf>
movaps %xmm0,-0xb0(%rbp)
movaps -0xd0(%rbp),%xmm0
movaps %xmm0,-0x1c0(%rbp)
movaps -0xc0(%rbp),%xmm0
movaps -0xb0(%rbp),%xmm1
call   2950 <__divtf3>
movaps %xmm0,%xmm1
movaps -0x1c0(%rbp),%xmm0
movaps %xmm1,-0x1b0(%rbp)
call   3f70 <__subtf3>
movaps -0x90(%rbp),%xmm1
call   34a0 <__multf3>
movaps -0x1b0(%rbp),%xmm1
movaps %xmm0,-0x190(%rbp)
movaps -0x60(%rbp),%xmm0
movaps %xmm0,-0x1a0(%rbp)
movaps 0x4d9e(%rip),%xmm0
movaps %xmm0,-0x140(%rbp)
call   3f70 <__subtf3>
movaps -0xa0(%rbp),%xmm1
call   34a0 <__multf3>
movaps -0x1a0(%rbp),%xmm1
movaps %xmm0,%xmm2
movaps -0x190(%rbp),%xmm0
movaps %xmm2,-0x180(%rbp)
call   34a0 <__multf3>
movaps -0x180(%rbp),%xmm1
call   3f70 <__subtf3>
movaps %xmm0,-0x80(%rbp)
movaps -0xd0(%rbp),%xmm0
movaps %xmm0,-0x170(%rbp)
movaps -0xc0(%rbp),%xmm0
movaps -0xb0(%rbp),%xmm1
call   2950 <__divtf3>
movaps %xmm0,%xmm1
movaps -0x170(%rbp),%xmm0
movaps %xmm1,-0x150(%rbp)
call   3f70 <__subtf3>
movaps %xmm0,-0x120(%rbp)
movaps -0x90(%rbp),%xmm0
movaps %xmm0,-0x160(%rbp)
movaps -0xf0(%rbp),%xmm0
movaps -0x60(%rbp),%xmm1
call   34a0 <__multf3>
movaps -0x160(%rbp),%xmm1
call   1570 <__addtf3>
movaps -0x150(%rbp),%xmm1
movaps %xmm0,%xmm2
movaps -0x140(%rbp),%xmm0
movaps %xmm2,-0x130(%rbp)
call   3f70 <__subtf3>
movaps -0x100(%rbp),%xmm1
call   34a0 <__multf3>
movaps -0x130(%rbp),%xmm1
movaps %xmm0,%xmm2
movaps -0x120(%rbp),%xmm0
movaps %xmm2,-0x110(%rbp)
call   34a0 <__multf3>
movaps -0x110(%rbp),%xmm1
call   3f70 <__subtf3>
movaps %xmm0,-0xe0(%rbp)
movaps -0x90(%rbp),%xmm0
movaps %xmm0,-0xa0(%rbp)
movaps -0x80(%rbp),%xmm0
movaps %xmm0,-0x90(%rbp)
movaps -0xf0(%rbp),%xmm0
movaps %xmm0,-0x100(%rbp)
movaps -0xe0(%rbp),%xmm0
movaps %xmm0,-0xf0(%rbp)
mov    -0x30(%rbp),%rax
add    $0x1,%rax
mov    %rax,-0x30(%rbp)
jmp    11de <drive+0xce>
movaps -0x80(%rbp),%xmm0
movaps -0xe0(%rbp),%xmm1
call   2950 <__divtf3>
movaps %xmm0,%xmm1
movaps -0x60(%rbp),%xmm0
call   3f70 <__subtf3>
movaps %xmm0,-0x60(%rbp)
mov    -0x38(%rbp),%rax
add    $0x1,%rax
mov    %rax,-0x38(%rbp)
jmp    119a <drive+0x8a>
movaps -0xc0(%rbp),%xmm0
movaps %xmm0,-0xa0(%rbp)
movaps -0x60(%rbp),%xmm0
movaps %xmm0,-0x90(%rbp)
mov    -0x10(%rbp),%rax
mov    %rax,-0x1e8(%rbp)
fldt   (%rax)
mov    %rsp,%rax
fstpt  (%rax)
call   5440 <__extendxftf2>
mov    -0x1e8(%rbp),%rax
movaps %xmm0,-0x1d0(%rbp)
movaps -0x60(%rbp),%xmm0
movaps %xmm0,-0x1e0(%rbp)
fldt   0x10(%rax)
mov    %rsp,%rax
fstpt  (%rax)
call   5440 <__extendxftf2>
movaps %xmm0,%xmm1
movaps -0x1e0(%rbp),%xmm0
call   34a0 <__multf3>
movaps -0x1d0(%rbp),%xmm1
call   1570 <__addtf3>
movaps %xmm0,-0x70(%rbp)
movq   $0x2,-0x30(%rbp)
mov    -0x30(%rbp),%rax
movslq -0x4(%rbp),%rcx
cmp    %rcx,%rax
jge    152f <drive+0x41f>
mov    -0x30(%rbp),%rdi
call   5350 <__floatditf>
movaps %xmm0,-0xb0(%rbp)
movaps -0xd0(%rbp),%xmm0
movaps -0x90(%rbp),%xmm1
call   34a0 <__multf3>
movaps -0x60(%rbp),%xmm1
movaps -0xa0(%rbp),%xmm2
movaps %xmm2,-0x220(%rbp)
call   34a0 <__multf3>
movaps -0x220(%rbp),%xmm1
call   3f70 <__subtf3>
movaps %xmm0,-0x80(%rbp)
movaps -0x80(%rbp),%xmm0
movaps %xmm0,-0x210(%rbp)
mov    -0x10(%rbp),%rax
mov    -0x30(%rbp),%rcx
shl    $0x4,%rcx
fldt   (%rax,%rcx,1)
mov    %rsp,%rax
fstpt  (%rax)
call   5440 <__extendxftf2>
movaps %xmm0,%xmm1
movaps -0x210(%rbp),%xmm0
movaps -0x70(%rbp),%xmm2
movaps %xmm2,-0x200(%rbp)
call   34a0 <__multf3>
movaps -0x200(%rbp),%xmm1
call   1570 <__addtf3>
movaps %xmm0,-0x70(%rbp)
movaps -0x90(%rbp),%xmm0
movaps %xmm0,-0xa0(%rbp)
movaps -0x80(%rbp),%xmm0
movaps %xmm0,-0x90(%rbp)
mov    -0x30(%rbp),%rax
add    $0x1,%rax
mov    %rax,-0x30(%rbp)
jmp    145c <drive+0x34c>
movaps -0x70(%rbp),%xmm0
call   5620 <__trunctfxf2>
mov    -0x20(%rbp),%rax
mov    -0x28(%rbp),%rcx
shl    $0x4,%rcx
fstpt  (%rax,%rcx,1)
mov    -0x28(%rbp),%rax
add    $0x1,%rax
mov    %rax,-0x28(%rbp)
jmp    114e <drive+0x3e>
add    $0x230,%rsp
pop    %rbp
ret
cs nopw 0x0(%rax,%rax,1)
nopl   0x0(%rax,%rax,1)

x86 assembly (clang, -O2):
<drive>:
push   %rbp
push   %r15
push   %r14
push   %r13
push   %r12
push   %rbx
sub    $0xd8,%rsp
mov    %rcx,0xd0(%rsp)
mov    %rdx,0xc8(%rsp)
mov    %rsi,0x88(%rsp)
test   %edi,%edi
jle    16e6 <drive+0x5d6>
mov    %edi,%ebp
movslq %edi,%rcx
cmp    $0x3,%rcx
mov    $0x2,%edx
cmovge %rcx,%rdx
mov    %rcx,%rax
mov    %rcx,0x98(%rsp)
lea    -0x2(%rcx),%r13
add    $0xffffffffffffffff,%rdx
mov    %rdx,0x90(%rsp)
mov    0x88(%rsp),%rax
add    $0x30,%rax
mov    %rax,0xc0(%rsp)
and    $0xfffffffffffffffe,%r13
neg    %r13
xor    %r14d,%r14d
jmp    11b6 <drive+0xa6>
xchg   %ax,%ax
movaps %xmm1,%xmm0
call   56c0 <__trunctfxf2>
mov    0xd0(%rsp),%rax
fstpt  (%rax,%r15,1)
add    $0x1,%r14
cmp    0x98(%rsp),%r14
je     16e6 <drive+0x5d6>
mov    %r14,%r15
shl    $0x4,%r15
mov    0xc8(%rsp),%rax
fldt   (%rax,%r15,1)
fstpt  (%rsp)
call   54e0 <__extendxftf2>
mov    $0x1,%al
call   1030 <cosq@plt>
mov    %eax,%edi
call   5440 <__floatsitf>
movaps %xmm0,0x30(%rsp)
cmp    $0x1,%ebp
jne    1220 <drive+0x110>
movaps 0x10(%rsp),%xmm0
movaps 0x50(%rsp),%xmm1
call   2ae0 <__divtf3>
movaps %xmm0,%xmm1
movaps %xmm0,0x20(%rsp)
movaps 0x30(%rsp),%xmm0
call   4100 <__subtf3>
movaps 0x20(%rsp),%xmm1
movaps %xmm0,%xmm2
jmp    1517 <drive+0x407>
nopw   0x0(%rax,%rax,1)
xorps  %xmm4,%xmm4
mov    0x90(%rsp),%rbx
movaps 0x4dde(%rip),%xmm2
movaps %xmm2,%xmm1
movaps 0x4dc4(%rip),%xmm3
movaps %xmm2,%xmm0
movaps 0x30(%rsp),%xmm2
cs nopw 0x0(%rax,%rax,1)
xchg   %ax,%ax
movaps %xmm0,0x10(%rsp)
movaps %xmm4,0x50(%rsp)
movaps %xmm3,0xb0(%rsp)
movaps %xmm2,0x20(%rsp)
movaps %xmm1,0x40(%rsp)
movaps 0x4d9d(%rip),%xmm0
movaps %xmm3,%xmm1
call   2ae0 <__divtf3>
movaps %xmm0,%xmm1
movaps %xmm0,0x70(%rsp)
movaps 0x4d76(%rip),%xmm0
call   4100 <__subtf3>
movaps %xmm0,%xmm1
movaps %xmm0,0xa0(%rsp)
movaps 0x20(%rsp),%xmm0
call   3630 <__multf3>
movaps %xmm0,0x60(%rsp)
movaps 0x4d60(%rip),%xmm0
movaps 0x70(%rsp),%xmm1
call   4100 <__subtf3>
movaps %xmm0,%xmm1
movaps %xmm0,0x70(%rsp)
movaps 0x10(%rsp),%xmm0
call   3630 <__multf3>
movaps %xmm0,0x10(%rsp)
movaps 0x60(%rsp),%xmm0
movaps 0x30(%rsp),%xmm1
call   3630 <__multf3>
movaps 0x10(%rsp),%xmm1
call   4100 <__subtf3>
movaps %xmm0,0x10(%rsp)
movaps 0x40(%rsp),%xmm0
movaps 0x30(%rsp),%xmm1
call   3630 <__multf3>
movaps 0x20(%rsp),%xmm1
call   1700 <__addtf3>
movaps %xmm0,0x60(%rsp)
movaps 0x50(%rsp),%xmm0
movaps 0x70(%rsp),%xmm1
call   3630 <__multf3>
movaps %xmm0,0x50(%rsp)
movaps 0xa0(%rsp),%xmm0
movaps 0x60(%rsp),%xmm1
call   3630 <__multf3>
movaps 0x50(%rsp),%xmm1
call   4100 <__subtf3>
movaps %xmm0,0x50(%rsp)
movaps 0xb0(%rsp),%xmm0
movaps 0x4cbf(%rip),%xmm1
call   1700 <__addtf3>
movaps 0x50(%rsp),%xmm1
movaps 0x10(%rsp),%xmm2
movaps %xmm0,%xmm3
movaps 0x40(%rsp),%xmm4
movaps 0x20(%rsp),%xmm0
add    $0xffffffffffffffff,%rbx
jne    1250 <drive+0x140>
movaps %xmm2,%xmm0
call   2ae0 <__divtf3>
movaps %xmm0,%xmm1
movaps 0x30(%rsp),%xmm0
movaps %xmm1,0x20(%rsp)
call   4100 <__subtf3>
movaps %xmm0,%xmm2
cmp    $0x1,%ebp
jne    13b0 <drive+0x2a0>
movaps 0x20(%rsp),%xmm1
jmp    1517 <drive+0x407>
cs nopw 0x0(%rax,%rax,1)
nopl   (%rax)
xorps  %xmm5,%xmm5
mov    0x90(%rsp),%rbx
movaps 0x4c4e(%rip),%xmm3
movaps %xmm3,%xmm1
movaps 0x4c34(%rip),%xmm4
movaps %xmm2,0x30(%rsp)
cs nopw 0x0(%rax,%rax,1)
nopl   0x0(%rax,%rax,1)
movaps %xmm3,0x10(%rsp)
movaps %xmm5,0x50(%rsp)
movaps %xmm4,0xb0(%rsp)
movaps %xmm2,0x20(%rsp)
movaps %xmm1,0x40(%rsp)
movaps 0x4c0d(%rip),%xmm0
movaps %xmm4,%xmm1
call   2ae0 <__divtf3>
movaps %xmm0,%xmm1
movaps %xmm0,0x70(%rsp)
movaps 0x4be6(%rip),%xmm0
call   4100 <__subtf3>
movaps %xmm0,%xmm1
movaps %xmm0,0xa0(%rsp)
movaps 0x20(%rsp),%xmm0
call   3630 <__multf3>
movaps %xmm0,0x60(%rsp)
movaps 0x4bd0(%rip),%xmm0
movaps 0x70(%rsp),%xmm1
call   4100 <__subtf3>
movaps %xmm0,%xmm1
movaps %xmm0,0x70(%rsp)
movaps 0x10(%rsp),%xmm0
call   3630 <__multf3>
movaps %xmm0,0x10(%rsp)
movaps 0x60(%rsp),%xmm0
movaps 0x30(%rsp),%xmm1
call   3630 <__multf3>
movaps 0x10(%rsp),%xmm1
call   4100 <__subtf3>
movaps %xmm0,0x10(%rsp)
movaps 0x40(%rsp),%xmm0
movaps 0x30(%rsp),%xmm1
call   3630 <__multf3>
movaps 0x20(%rsp),%xmm1
call   1700 <__addtf3>
movaps %xmm0,0x60(%rsp)
movaps 0x50(%rsp),%xmm0
movaps 0x70(%rsp),%xmm1
call   3630 <__multf3>
movaps %xmm0,0x50(%rsp)
movaps 0xa0(%rsp),%xmm0
movaps 0x60(%rsp),%xmm1
call   3630 <__multf3>
movaps 0x50(%rsp),%xmm1
call   4100 <__subtf3>
movaps %xmm0,0x50(%rsp)
movaps 0xb0(%rsp),%xmm0
movaps 0x4b2f(%rip),%xmm1
call   1700 <__addtf3>
movaps 0x50(%rsp),%xmm1
movaps 0x10(%rsp),%xmm2
movaps %xmm0,%xmm4
movaps 0x40(%rsp),%xmm5
movaps 0x20(%rsp),%xmm3
add    $0xffffffffffffffff,%rbx
jne    13e0 <drive+0x2d0>
movaps %xmm2,%xmm0
call   2ae0 <__divtf3>
movaps %xmm0,%xmm1
movaps 0x30(%rsp),%xmm2
movaps %xmm2,%xmm0
call   4100 <__subtf3>
movaps %xmm0,0x40(%rsp)
mov    0x88(%rsp),%rbx
fldt   (%rbx)
fstpt  (%rsp)
call   54e0 <__extendxftf2>
movaps %xmm0,0x20(%rsp)
fldt   0x10(%rbx)
fstpt  (%rsp)
call   54e0 <__extendxftf2>
movaps %xmm0,%xmm1
movaps 0x40(%rsp),%xmm0
call   3630 <__multf3>
movaps 0x20(%rsp),%xmm1
call   1700 <__addtf3>
movaps %xmm0,%xmm1
cmp    $0x3,%ebp
jb     1190 <drive+0x80>
mov    $0x2,%r12d
jne    1590 <drive+0x480>
movaps 0x4a98(%rip),%xmm0
movaps %xmm0,0x20(%rsp)
movaps 0x40(%rsp),%xmm0
movaps %xmm0,0x10(%rsp)
jmp    1676 <drive+0x566>
nopl   0x0(%rax)
mov    $0x2,%r12d
mov    0xc0(%rsp),%rbx
movaps 0x4a6b(%rip),%xmm0
movaps %xmm0,0x20(%rsp)
movaps 0x40(%rsp),%xmm0
movaps %xmm0,0x10(%rsp)
cs nopw 0x0(%rax,%rax,1)
xchg   %ax,%ax
movaps %xmm1,0x30(%rsp)
movaps 0x10(%rsp),%xmm0
movaps %xmm0,%xmm1
call   1700 <__addtf3>
movaps 0x40(%rsp),%xmm1
call   3630 <__multf3>
movaps 0x20(%rsp),%xmm1
call   4100 <__subtf3>
movaps %xmm0,0x20(%rsp)
fldt   -0x10(%rbx)
fstpt  (%rsp)
call   54e0 <__extendxftf2>
movaps %xmm0,%xmm1
movaps 0x20(%rsp),%xmm0
call   3630 <__multf3>
movaps 0x30(%rsp),%xmm1
call   1700 <__addtf3>
movaps %xmm0,0x30(%rsp)
movaps 0x20(%rsp),%xmm0
movaps %xmm0,%xmm1
call   1700 <__addtf3>
movaps 0x40(%rsp),%xmm1
call   3630 <__multf3>
movaps 0x10(%rsp),%xmm1
call   4100 <__subtf3>
movaps %xmm0,0x10(%rsp)
fldt   (%rbx)
fstpt  (%rsp)
call   54e0 <__extendxftf2>
movaps %xmm0,%xmm1
movaps 0x10(%rsp),%xmm0
call   3630 <__multf3>
movaps 0x30(%rsp),%xmm1
call   1700 <__addtf3>
movaps %xmm0,%xmm1
add    $0x20,%rbx
lea    (%r12,%r13,1),%rax
add    $0x2,%rax
add    $0x2,%r12
cmp    $0x2,%rax
jne    15c0 <drive+0x4b0>
testb  $0x1,0x98(%rsp)
01
je     1190 <drive+0x80>
movaps 0x10(%rsp),%xmm0
movaps %xmm1,0x30(%rsp)
movaps %xmm0,%xmm1
call   1700 <__addtf3>
movaps 0x40(%rsp),%xmm1
call   3630 <__multf3>
movaps 0x20(%rsp),%xmm1
call   4100 <__subtf3>
movaps %xmm0,0x10(%rsp)
shl    $0x4,%r12
mov    0x88(%rsp),%rax
fldt   (%rax,%r12,1)
fstpt  (%rsp)
call   54e0 <__extendxftf2>
movaps %xmm0,%xmm1
movaps 0x10(%rsp),%xmm0
call   3630 <__multf3>
movaps 0x30(%rsp),%xmm1
call   1700 <__addtf3>
movaps %xmm0,%xmm1
jmp    1190 <drive+0x80>
add    $0xd8,%rsp
pop    %rbx
pop    %r12
pop    %r13
pop    %r14
pop    %r15
pop    %rbp
ret
nopl   0x0(%rax,%rax,1)

LLVM IR (-O0):
define void @drive(i32 %0, x86_fp80* %1, x86_fp80* %2, x86_fp80* %3) {
%5 = alloca i32
%6 = alloca x86_fp80*
%7 = alloca x86_fp80*
%8 = alloca x86_fp80*
%9 = alloca i64
%10 = alloca i64
%11 = alloca i64
%12 = alloca fp128
%13 = alloca fp128
%14 = alloca fp128
%15 = alloca fp128
%16 = alloca fp128
%17 = alloca fp128
%18 = alloca fp128
%19 = alloca fp128
%20 = alloca fp128
%21 = alloca fp128
%22 = alloca fp128
%23 = alloca fp128
store i32 %0, i32* %5
store x86_fp80* %1, x86_fp80** %6
store x86_fp80* %2, x86_fp80** %7
store x86_fp80* %3, x86_fp80** %8
store fp128 0xL00000000000000003FFF000000000000, fp128* %19
store fp128 0xL00000000000000004000000000000000, fp128* %20
store i64 0, i64* %9
br label %24
24: ; preds = %149, %4
%25 = load i64, i64* %9
%26 = load i32, i32* %5
%27 = sext i32 %26 to i64
%28 = icmp slt i64 %25, %27
br i1 %28, label %29, label %152
29: ; preds = %24
%30 = load x86_fp80*, x86_fp80** %7
%31 = load i64, i64* %9
%32 = getelementptr inbounds x86_fp80, x86_fp80* %30, i64 %31
%33 = load x86_fp80, x86_fp80* %32
%34 = fpext x86_fp80 %33 to fp128
store fp128 %34, fp128* %12
%35 = load fp128, fp128* %12
%36 = call i32 (fp128, ...) bitcast (i32 (...)* @cosq to i32 (fp128, ...)*)(fp128 %35)
%37 = sitofp i32 %36 to fp128
store fp128 %37, fp128* %13
store i64 0, i64* %11
br label %38
38: ; preds = %99, %29
%39 = load i64, i64* %11
%40 = icmp slt i64 %39, 2
br i1 %40, label %41, label %102
41: ; preds = %38
%42 = load fp128, fp128* %19
store fp128 %42, fp128* %17
%43 = load fp128, fp128* %13
store fp128 %43, fp128* %16
store fp128 0xL00000000000000000000000000000000, fp128* %23
%44 = load fp128, fp128* %19
store fp128 %44, fp128* %22
store i64 2, i64* %10
br label %45
45: ; preds = %90, %41
%46 = load i64, i64* %10
%47 = load i32, i32* %5
%48 = sext i32 %47 to i64
%49 = icmp sle i64 %46, %48
br i1 %49, label %50, label %93
50: ; preds = %45
%51 = load i64, i64* %10
%52 = sitofp i64 %51 to fp128
store fp128 %52, fp128* %18
%53 = load fp128, fp128* %20
%54 = load fp128, fp128* %19
%55 = load fp128, fp128* %18
%56 = fdiv fp128 %54, %55
%57 = fsub fp128 %53, %56
%58 = load fp128, fp128* %16
%59 = fmul fp128 %57, %58
%60 = load fp128, fp128* %13
%61 = load fp128, fp128* %19
%62 = load fp128, fp128* %18
%63 = fdiv fp128 %61, %62
%64 = fsub fp128 0xL00000000000000003FFF000000000000, %63
%65 = load fp128, fp128* %17
%66 = fmul fp128 %64, %65
%67 = fneg fp128 %66
%68 = call fp128 @llvm.fmuladd.f128(fp128 %59, fp128 %60, fp128 %67)
store fp128 %68, fp128* %15
%69 = load fp128, fp128* %20
%70 = load fp128, fp128* %19
%71 = load fp128, fp128* %18
%72 = fdiv fp128 %70, %71
%73 = fsub fp128 %69, %72
%74 = load fp128, fp128* %16
%75 = load fp128, fp128* %22
%76 = load fp128, fp128* %13
%77 = call fp128 @llvm.fmuladd.f128(fp128 %75, fp128 %76, fp128 %74)
%78 = load fp128, fp128* %19
%79 = load fp128, fp128* %18
%80 = fdiv fp128 %78, %79
%81 = fsub fp128 0xL00000000000000003FFF000000000000, %80
%82 = load fp128, fp128* %23
%83 = fmul fp128 %81, %82
%84 = fneg fp128 %83
%85 = call fp128 @llvm.fmuladd.f128(fp128 %73, fp128 %77, fp128 %84)
store fp128 %85, fp128* %21
%86 = load fp128, fp128* %16
store fp128 %86, fp128* %17
%87 = load fp128, fp128* %15
store fp128 %87, fp128* %16
%88 = load fp128, fp128* %22
store fp128 %88, fp128* %23
%89 = load fp128, fp128* %21
store fp128 %89, fp128* %22
br label %90
90: ; preds = %50
%91 = load i64, i64* %10
%92 = add nsw i64 %91, 1
store i64 %92, i64* %10
br label %45
93: ; preds = %45
%94 = load fp128, fp128* %15
%95 = load fp128, fp128* %21
%96 = fdiv fp128 %94, %95
%97 = load fp128, fp128* %13
%98 = fsub fp128 %97, %96
store fp128 %98, fp128* %13
br label %99
99: ; preds = %93
%100 = load i64, i64* %11
%101 = add nsw i64 %100, 1
store i64 %101, i64* %11
br label %38
102: ; preds = %38
%103 = load fp128, fp128* %19
store fp128 %103, fp128* %17
%104 = load fp128, fp128* %13
store fp128 %104, fp128* %16
%105 = load x86_fp80*, x86_fp80** %6
%106 = getelementptr inbounds x86_fp80, x86_fp80* %105, i64 0
%107 = load x86_fp80, x86_fp80* %106
%108 = fpext x86_fp80 %107 to fp128
%109 = load fp128, fp128* %13
%110 = load x86_fp80*, x86_fp80** %6
%111 = getelementptr inbounds x86_fp80, x86_fp80* %110, i64 1
%112 = load x86_fp80, x86_fp80* %111
%113 = fpext x86_fp80 %112 to fp128
%114 = call fp128 @llvm.fmuladd.f128(fp128 %109, fp128 %113, fp128 %108)
store fp128 %114, fp128* %14
store i64 2, i64* %10
br label %115
115: ; preds = %140, %102
%116 = load i64, i64* %10
%117 = load i32, i32* %5
%118 = sext i32 %117 to i64
%119 = icmp slt i64 %116, %118
br i1 %119, label %120, label %143
120: ; preds = %115
%121 = load i64, i64* %10
%122 = sitofp i64 %121 to fp128
store fp128 %122, fp128* %18
%123 = load fp128, fp128* %20
%124 = load fp128, fp128* %16
%125 = fmul fp128 %123, %124
%126 = load fp128, fp128* %13
%127 = load fp128, fp128* %17
%128 = fneg fp128 %127
%129 = call fp128 @llvm.fmuladd.f128(fp128 %125, fp128 %126, fp128 %128)
store fp128 %129, fp128* %15
%130 = load fp128, fp128* %15
%131 = load x86_fp80*, x86_fp80** %6
%132 = load i64, i64* %10
%133 = getelementptr inbounds x86_fp80, x86_fp80* %131, i64 %132
%134 = load x86_fp80, x86_fp80* %133
%135 = fpext x86_fp80 %134 to fp128
%136 = load fp128, fp128* %14
%137 = call fp128 @llvm.fmuladd.f128(fp128 %130, fp128 %135, fp128 %136)
store fp128 %137, fp128* %14
%138 = load fp128, fp128* %16
store fp128 %138, fp128* %17
%139 = load fp128, fp128* %15
store fp128 %139, fp128* %16
br label %140
140: ; preds = %120
%141 = load i64, i64* %10
%142 = add nsw i64 %141, 1
store i64 %142, i64* %10
br label %115
143: ; preds = %115
%144 = load fp128, fp128* %14
%145 = fptrunc fp128 %144 to x86_fp80
%146 = load x86_fp80*, x86_fp80** %8
%147 = load i64, i64* %9
%148 = getelementptr inbounds x86_fp80, x86_fp80* %146, i64 %147
store x86_fp80 %145, x86_fp80* %148
br label %149
149: ; preds = %143
%150 = load i64, i64* %9
%151 = add nsw i64 %150, 1
store i64 %151, i64* %9
br label %24
152: ; preds = %24
ret void
}

LLVM IR (-O2):
define void @drive(i32 %0, x86_fp80* nocapture %1, x86_fp80* nocapture %2, x86_fp80* nocapture writeonly %3) {
%5 = sext i32 %0 to i64
%6 = icmp sgt i32 %0, 0
br i1 %6, label %7, label %130
7: ; preds = %4
%8 = icmp eq i32 %0, 1
%9 = getelementptr inbounds x86_fp80, x86_fp80* %1, i64 1
%10 = icmp ugt i32 %0, 2
%11 = call i64 @llvm.smax.i64(i64 %5, i64 2)
%12 = add nsw i64 %5, -2
%13 = and i64 %5, 1
%14 = icmp eq i32 %0, 3
%15 = and i64 %12, -2
%16 = icmp eq i64 %13, 0
br label %17
17: ; preds = %7, %123
%18 = phi fp128 [ undef, %7 ], [ %76, %123 ]
%19 = phi i64 [ 0, %7 ], [ %128, %123 ]
%20 = phi fp128 [ undef, %7 ], [ %125, %123 ]
%21 = getelementptr inbounds x86_fp80, x86_fp80* %2, i64 %19
%22 = load x86_fp80, x86_fp80* %21
%23 = fpext x86_fp80 %22 to fp128
%24 = tail call i32 (fp128, ...) bitcast (i32 (...)* @cosq to i32 (fp128, ...)*)(fp128 %23)
%25 = sitofp i32 %24 to fp128
br i1 %8, label %26, label %29
26: ; preds = %17
%27 = fdiv fp128 %20, %18
%28 = fsub fp128 %25, %27
br label %72
29: ; preds = %17, %29
%30 = phi fp128 [ %31, %29 ], [ 0xL00000000000000000000000000000000, %17 ]
%31 = phi fp128 [ %45, %29 ], [ 0xL00000000000000003FFF000000000000, %17 ]
%32 = phi i64 [ %46, %29 ], [ 2, %17 ]
%33 = phi fp128 [ %34, %29 ], [ 0xL00000000000000003FFF000000000000, %17 ]
%34 = phi fp128 [ %42, %29 ], [ %25, %17 ]
%35 = sitofp i64 %32 to fp128
%36 = fdiv fp128 0xL00000000000000003FFF000000000000, %35
%37 = fsub fp128 0xL00000000000000004000000000000000, %36
%38 = fmul fp128 %34, %37
%39 = fsub fp128 0xL00000000000000003FFF000000000000, %36
%40 = fneg fp128 %39
%41 = fmul fp128 %33, %40
%42 = tail call fp128 @llvm.fmuladd.f128(fp128 %38, fp128 %25, fp128 %41)
%43 = tail call fp128 @llvm.fmuladd.f128(fp128 %31, fp128 %25, fp128 %34)
%44 = fmul fp128 %30, %40
%45 = tail call fp128 @llvm.fmuladd.f128(fp128 %37, fp128 %43, fp128 %44)
%46 = add nuw nsw i64 %32, 1
%47 = icmp eq i64 %32, %11
br i1 %47, label %48, label %29
48: ; preds = %29
%49 = fdiv fp128 %42, %45
%50 = fsub fp128 %25, %49
br i1 %8, label %72, label %51
51: ; preds = %48, %51
%52 = phi fp128 [ %53, %51 ], [ 0xL00000000000000000000000000000000, %48 ]
%53 = phi fp128 [ %67, %51 ], [ 0xL00000000000000003FFF000000000000, %48 ]
%54 = phi i64 [ %68, %51 ], [ 2, %48 ]
%55 = phi fp128 [ %56, %51 ], [ 0xL00000000000000003FFF000000000000, %48 ]
%56 = phi fp128 [ %64, %51 ], [ %50, %48 ]
%57 = sitofp i64 %54 to fp128
%58 = fdiv fp128 0xL00000000000000003FFF000000000000, %57
%59 = fsub fp128 0xL00000000000000004000000000000000, %58
%60 = fmul fp128 %56, %59
%61 = fsub fp128 0xL00000000000000003FFF000000000000, %58
%62 = fneg fp128 %61
%63 = fmul fp128 %55, %62
%64 = tail call fp128 @llvm.fmuladd.f128(fp128 %60, fp128 %50, fp128 %63)
%65 = tail call fp128 @llvm.fmuladd.f128(fp128 %53, fp128 %50, fp128 %56)
%66 = fmul fp128 %52, %62
%67 = tail call fp128 @llvm.fmuladd.f128(fp128 %59, fp128 %65, fp128 %66)
%68 = add nuw nsw i64 %54, 1
%69 = icmp eq i64 %54, %11
br i1 %69, label %70, label %51
70: ; preds = %51
%71 = fdiv fp128 %64, %67
br label %72
72: ; preds = %26, %70, %48
%73 = phi fp128 [ %50, %70 ], [ %50, %48 ], [ %28, %26 ]
%74 = phi fp128 [ %71, %70 ], [ %49, %48 ], [ %27, %26 ]
%75 = phi fp128 [ %64, %70 ], [ %42, %48 ], [ %20, %26 ]
%76 = phi fp128 [ %67, %70 ], [ %45, %48 ], [ %18, %26 ]
%77 = fsub fp128 %73, %74
%78 = load x86_fp80, x86_fp80* %1
%79 = fpext x86_fp80 %78 to fp128
%80 = load x86_fp80, x86_fp80* %9
%81 = fpext x86_fp80 %80 to fp128
%82 = tail call fp128 @llvm.fmuladd.f128(fp128 %77, fp128 %81, fp128 %79)
br i1 %10, label %83, label %123
83: ; preds = %72
br i1 %14, label %108, label %84
84: ; preds = %83, %84
%85 = phi i64 [ %105, %84 ], [ 2, %83 ]
%86 = phi fp128 [ %92, %84 ], [ 0xL00000000000000003FFF000000000000, %83 ]
%87 = phi fp128 [ %100, %84 ], [ %77, %83 ]
%88 = phi fp128 [ %104, %84 ], [ %82, %83 ]
%89 = phi i64 [ %106, %84 ], [ 0, %83 ]
%90 = fmul fp128 %87, 0xL00000000000000004000000000000000
%91 = fneg fp128 %86
%92 = tail call fp128 @llvm.fmuladd.f128(fp128 %90, fp128 %77, fp128 %91)
%93 = getelementptr inbounds x86_fp80, x86_fp80* %1, i64 %85
%94 = load x86_fp80, x86_fp80* %93
%95 = fpext x86_fp80 %94 to fp128
%96 = tail call fp128 @llvm.fmuladd.f128(fp128 %92, fp128 %95, fp128 %88)
%97 = or i64 %85, 1
%98 = fmul fp128 %92, 0xL00000000000000004000000000000000
%99 = fneg fp128 %87
%100 = tail call fp128 @llvm.fmuladd.f128(fp128 %98, fp128 %77, fp128 %99)
%101 = getelementptr inbounds x86_fp80, x86_fp80* %1, i64 %97
%102 = load x86_fp80, x86_fp80* %101
%103 = fpext x86_fp80 %102 to fp128
%104 = tail call fp128 @llvm.fmuladd.f128(fp128 %100, fp128 %103, fp128 %96)
%105 = add nuw nsw i64 %85, 2
%106 = add i64 %89, 2
%107 = icmp eq i64 %106, %15
br i1 %107, label %108, label %84
108: ; preds = %84, %83
%109 = phi fp128 [ undef, %83 ], [ %100, %84 ]
%110 = phi fp128 [ undef, %83 ], [ %104, %84 ]
%111 = phi i64 [ 2, %83 ], [ %105, %84 ]
%112 = phi fp128 [ 0xL00000000000000003FFF000000000000, %83 ], [ %92, %84 ]
%113 = phi fp128 [ %77, %83 ], [ %100, %84 ]
%114 = phi fp128 [ %82, %83 ], [ %104, %84 ]
br i1 %16, label %123, label %115
115: ; preds = %108
%116 = fmul fp128 %113, 0xL00000000000000004000000000000000
%117 = fneg fp128 %112
%118 = tail call fp128 @llvm.fmuladd.f128(fp128 %116, fp128 %77, fp128 %117)
%119 = getelementptr inbounds x86_fp80, x86_fp80* %1, i64 %111
%120 = load x86_fp80, x86_fp80* %119
%121 = fpext x86_fp80 %120 to fp128
%122 = tail call fp128 @llvm.fmuladd.f128(fp128 %118, fp128 %121, fp128 %114)
br label %123
123: ; preds = %115, %108, %72
%124 = phi fp128 [ %82, %72 ], [ %110, %108 ], [ %122, %115 ]
%125 = phi fp128 [ %75, %72 ], [ %109, %108 ], [ %118, %115 ]
%126 = fptrunc fp128 %124 to x86_fp80
%127 = getelementptr inbounds x86_fp80, x86_fp80* %3, i64 %19
store x86_fp80 %126, x86_fp80* %127
%128 = add nuw nsw i64 %19, 1
%129 = icmp eq i64 %128, %5
br i1 %129, label %130, label %17
130: ; preds = %123, %4
ret void
}