#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 */
int /*<<< orphan*/ dradf2(long, long, double *, double *, double const *);
int /*<<< orphan*/ dradf4(long, long, double *, double *, double const *,
                          double const *, double const *);
int /*<<< orphan*/ dradfg(long, long, long, long, double *, double *, double *,
                          double *, double *, double const *);
void drftf1(long n, double *c, double *ch, const double *wa, const long *ifac) {
  long i, k1, l1, l2;
  long na, kh, nf;
  long ip, iw, ido, idl1, ix2, ix3;
  nf = ifac[1];
  na = 1;
  l2 = n;
  iw = n;
  for (k1 = 0; k1 < nf; k1++) {
    kh = nf - k1;
    ip = ifac[kh + 1];
    l1 = l2 / ip;
    ido = n / l2;
    idl1 = ido * l1;
    iw -= (ip - 1) * ido;
    na = 1 - na;
    if (ip != 4)
      goto L102;
    ix2 = iw + ido;
    ix3 = ix2 + ido;
    if (na != 0)
      dradf4(ido, l1, ch, c, wa + iw - 1, wa + ix2 - 1, wa + ix3 - 1);
    else
      dradf4(ido, l1, c, ch, wa + iw - 1, wa + ix2 - 1, wa + ix3 - 1);
    goto L110;
  L102:
    if (ip != 2)
      goto L104;
    if (na != 0)
      goto L103;
    dradf2(ido, l1, c, ch, wa + iw - 1);
    goto L110;
  L103:
    dradf2(ido, l1, ch, c, wa + iw - 1);
    goto L110;
  L104:
    if (ido == 1)
      na = 1 - na;
    if (na != 0)
      goto L109;
    dradfg(ido, ip, l1, idl1, c, c, c, ch, ch, wa + iw - 1);
    na = 1;
    goto L110;
  L109:
    dradfg(ido, ip, l1, idl1, ch, ch, ch, c, c, wa + iw - 1);
    na = 0;
  L110:
    l2 = l1;
  }
  if (na == 1)
    return;
  for (i = 0; i < n; i++)
    c[i] = ch[i];
}


x86 assembly (clang, -O0):
<drftf1>:
push   %rbp
mov    %rsp,%rbp
push   %r14
push   %rbx
sub    $0xb0,%rsp
mov    %rdi,-0x18(%rbp)
mov    %rsi,-0x20(%rbp)
mov    %rdx,-0x28(%rbp)
mov    %rcx,-0x30(%rbp)
mov    %r8,-0x38(%rbp)
mov    -0x38(%rbp),%rax
mov    0x8(%rax),%rax
mov    %rax,-0x70(%rbp)
movq   $0x1,-0x60(%rbp)
mov    -0x18(%rbp),%rax
mov    %rax,-0x58(%rbp)
mov    -0x18(%rbp),%rax
mov    %rax,-0x80(%rbp)
movq   $0x0,-0x48(%rbp)
mov    -0x48(%rbp),%rax
cmp    -0x70(%rbp),%rax
jge    1488 <drftf1+0x358>
mov    -0x70(%rbp),%rax
sub    -0x48(%rbp),%rax
mov    %rax,-0x68(%rbp)
mov    -0x38(%rbp),%rax
mov    -0x68(%rbp),%rcx
mov    0x8(%rax,%rcx,8),%rax
mov    %rax,-0x78(%rbp)
mov    -0x58(%rbp),%rax
cqto
idivq  -0x78(%rbp)
mov    %rax,-0x50(%rbp)
mov    -0x18(%rbp),%rax
cqto
idivq  -0x58(%rbp)
mov    %rax,-0x88(%rbp)
mov    -0x88(%rbp),%rax
imul   -0x50(%rbp),%rax
mov    %rax,-0x90(%rbp)
mov    -0x78(%rbp),%rcx
sub    $0x1,%rcx
imul   -0x88(%rbp),%rcx
ff
mov    -0x80(%rbp),%rax
sub    %rcx,%rax
mov    %rax,-0x80(%rbp)
mov    $0x1,%eax
sub    -0x60(%rbp),%rax
mov    %rax,-0x60(%rbp)
cmpq   $0x4,-0x78(%rbp)
je     1213 <drftf1+0xe3>
jmp    1305 <drftf1+0x1d5>
mov    -0x80(%rbp),%rax
add    -0x88(%rbp),%rax
mov    %rax,-0x98(%rbp)
mov    -0x98(%rbp),%rax
add    -0x88(%rbp),%rax
mov    %rax,-0xa0(%rbp)
cmpq   $0x0,-0x60(%rbp)
je     12a5 <drftf1+0x175>
mov    -0x88(%rbp),%rdi
mov    -0x50(%rbp),%rsi
mov    -0x28(%rbp),%rdx
mov    -0x20(%rbp),%rcx
mov    -0x30(%rbp),%r8
mov    -0x80(%rbp),%rax
shl    $0x3,%rax
add    %rax,%r8
add    $0xfffffffffffffff8,%r8
mov    -0x30(%rbp),%r9
mov    -0x98(%rbp),%rax
shl    $0x3,%rax
add    %rax,%r9
add    $0xfffffffffffffff8,%r9
mov    -0x30(%rbp),%rax
mov    -0xa0(%rbp),%r10
shl    $0x3,%r10
add    %r10,%rax
add    $0xfffffffffffffff8,%rax
mov    %rax,(%rsp)
call   1050 <dradf4@plt>
jmp    1300 <drftf1+0x1d0>
mov    -0x88(%rbp),%rdi
mov    -0x50(%rbp),%rsi
mov    -0x20(%rbp),%rdx
mov    -0x28(%rbp),%rcx
mov    -0x30(%rbp),%r8
mov    -0x80(%rbp),%rax
shl    $0x3,%rax
add    %rax,%r8
add    $0xfffffffffffffff8,%r8
mov    -0x30(%rbp),%r9
mov    -0x98(%rbp),%rax
shl    $0x3,%rax
add    %rax,%r9
add    $0xfffffffffffffff8,%r9
mov    -0x30(%rbp),%rax
mov    -0xa0(%rbp),%r10
shl    $0x3,%r10
add    %r10,%rax
add    $0xfffffffffffffff8,%rax
mov    %rax,(%rsp)
call   1050 <dradf4@plt>
jmp    146f <drftf1+0x33f>
cmpq   $0x2,-0x78(%rbp)
je     1315 <drftf1+0x1e5>
jmp    1385 <drftf1+0x255>
cmpq   $0x0,-0x60(%rbp)
je     1325 <drftf1+0x1f5>
jmp    1355 <drftf1+0x225>
mov    -0x88(%rbp),%rdi
mov    -0x50(%rbp),%rsi
mov    -0x20(%rbp),%rdx
mov    -0x28(%rbp),%rcx
mov    -0x30(%rbp),%r8
mov    -0x80(%rbp),%rax
shl    $0x3,%rax
add    %rax,%r8
add    $0xfffffffffffffff8,%r8
call   1030 <dradf2@plt>
jmp    146f <drftf1+0x33f>
mov    -0x88(%rbp),%rdi
mov    -0x50(%rbp),%rsi
mov    -0x28(%rbp),%rdx
mov    -0x20(%rbp),%rcx
mov    -0x30(%rbp),%r8
mov    -0x80(%rbp),%rax
shl    $0x3,%rax
add    %rax,%r8
add    $0xfffffffffffffff8,%r8
call   1030 <dradf2@plt>
jmp    146f <drftf1+0x33f>
cmpq   $0x1,-0x88(%rbp)
01
jne    13a0 <drftf1+0x270>
mov    $0x1,%eax
sub    -0x60(%rbp),%rax
mov    %rax,-0x60(%rbp)
cmpq   $0x0,-0x60(%rbp)
je     13b0 <drftf1+0x280>
jmp    1412 <drftf1+0x2e2>
mov    -0x88(%rbp),%rdi
mov    -0x78(%rbp),%rsi
mov    -0x50(%rbp),%rdx
mov    -0x90(%rbp),%rcx
mov    -0x20(%rbp),%r8
mov    -0x20(%rbp),%r9
mov    -0x20(%rbp),%rbx
mov    -0x28(%rbp),%r11
mov    -0x28(%rbp),%r10
mov    -0x30(%rbp),%rax
mov    -0x80(%rbp),%r14
shl    $0x3,%r14
add    %r14,%rax
add    $0xfffffffffffffff8,%rax
mov    %rbx,(%rsp)
mov    %r11,0x8(%rsp)
mov    %r10,0x10(%rsp)
mov    %rax,0x18(%rsp)
call   1040 <dradfg@plt>
movq   $0x1,-0x60(%rbp)
jmp    146f <drftf1+0x33f>
mov    -0x88(%rbp),%rdi
mov    -0x78(%rbp),%rsi
mov    -0x50(%rbp),%rdx
mov    -0x90(%rbp),%rcx
mov    -0x28(%rbp),%r8
mov    -0x28(%rbp),%r9
mov    -0x28(%rbp),%rbx
mov    -0x20(%rbp),%r11
mov    -0x20(%rbp),%r10
mov    -0x30(%rbp),%rax
mov    -0x80(%rbp),%r14
shl    $0x3,%r14
add    %r14,%rax
add    $0xfffffffffffffff8,%rax
mov    %rbx,(%rsp)
mov    %r11,0x8(%rsp)
mov    %r10,0x10(%rsp)
mov    %rax,0x18(%rsp)
call   1040 <dradfg@plt>
movq   $0x0,-0x60(%rbp)
mov    -0x50(%rbp),%rax
mov    %rax,-0x58(%rbp)
mov    -0x48(%rbp),%rax
add    $0x1,%rax
mov    %rax,-0x48(%rbp)
jmp    117e <drftf1+0x4e>
cmpq   $0x1,-0x60(%rbp)
jne    1498 <drftf1+0x368>
jmp    14d9 <drftf1+0x3a9>
movq   $0x0,-0x40(%rbp)
mov    -0x40(%rbp),%rax
cmp    -0x18(%rbp),%rax
jge    14d9 <drftf1+0x3a9>
mov    -0x28(%rbp),%rax
mov    -0x40(%rbp),%rcx
movsd  (%rax,%rcx,8),%xmm0
mov    -0x20(%rbp),%rax
mov    -0x40(%rbp),%rcx
movsd  %xmm0,(%rax,%rcx,8)
mov    -0x40(%rbp),%rax
add    $0x1,%rax
mov    %rax,-0x40(%rbp)
jmp    14a0 <drftf1+0x370>
add    $0xb0,%rsp
pop    %rbx
pop    %r14
pop    %rbp
ret

x86 assembly (clang, -O2):
<drftf1>:
push   %rbp
push   %r15
push   %r14
push   %r13
push   %r12
push   %rbx
sub    $0x28,%rsp
mov    %r8,0x20(%rsp)
mov    0x8(%r8),%r12
test   %r12,%r12
jle    14e4 <drftf1+0x3b4>
mov    %rcx,%rbx
mov    %rdx,%r13
mov    %rsi,%r10
mov    %rdi,%r14
add    $0xfffffffffffffff8,%rbx
mov    $0x1,%edi
mov    %r14,%rbp
mov    %r14,%r15
mov    %r14,0x18(%rsp)
mov    %rbx,0x10(%rsp)
mov    %rsi,0x8(%rsp)
jmp    11a5 <drftf1+0x75>
mov    %rax,%rdi
mov    %rbp,%rsi
mov    %r10,%rdx
mov    %r13,%rcx
call   1030 <dradf2@plt>
mov    0x8(%rsp),%r10
mov    0x10(%rsp),%rbx
mov    $0x1,%al
xor    %edi,%edi
add    $0xffffffffffffffff,%r12
je     1340 <drftf1+0x210>
mov    %rbp,%rcx
mov    0x20(%rsp),%rax
mov    0x8(%rax,%r12,8),%rsi
mov    %rbp,%rax
or     %rsi,%rax
shr    $0x20,%rax
je     11d0 <drftf1+0xa0>
mov    %rcx,%rax
cqto
idiv   %rsi
mov    %rax,%rbp
jmp    11d8 <drftf1+0xa8>
nopl   0x0(%rax,%rax,1)
mov    %ecx,%eax
xor    %edx,%edx
div    %esi
mov    %eax,%ebp
mov    %r14,%rax
or     %rcx,%rax
shr    $0x20,%rax
je     11f0 <drftf1+0xc0>
mov    %r14,%rax
cqto
idiv   %rcx
jmp    11f7 <drftf1+0xc7>
xchg   %ax,%ax
mov    %r14d,%eax
xor    %edx,%edx
div    %ecx
lea    -0x1(%rsi),%rcx
imul   %rax,%rcx
sub    %rcx,%r15
cmp    $0x2,%rsi
je     1260 <drftf1+0x130>
cmp    $0x4,%rsi
jne    1290 <drftf1+0x160>
lea    (%r15,%rax,1),%rdx
lea    (%rdx,%rax,1),%rcx
lea    (%rbx,%r15,8),%r8
lea    (%rbx,%rdx,8),%r9
lea    (%rbx,%rcx,8),%rbx
sub    $0x8,%rsp
cmp    $0x1,%rdi
jne    12e0 <drftf1+0x1b0>
mov    %rax,%rdi
mov    %rbp,%rsi
mov    %r10,%rdx
mov    %r13,%rcx
push   %rbx
mov    0x28(%rsp),%r14
call   1050 <dradf4@plt>
mov    0x18(%rsp),%r10
mov    0x20(%rsp),%rbx
add    $0x10,%rsp
jmp    1197 <drftf1+0x67>
xchg   %ax,%ax
lea    (%rbx,%r15,8),%r8
cmp    $0x1,%rdi
je     117c <drftf1+0x4c>
mov    %rax,%rdi
mov    %rbp,%rsi
mov    %r13,%rdx
mov    %r10,%rcx
call   1030 <dradf2@plt>
mov    0x8(%rsp),%r10
mov    0x10(%rsp),%rbx
jmp    132f <drftf1+0x1ff>
xchg   %ax,%ax
mov    %rax,%rcx
imul   %rbp,%rcx
mov    $0x1,%edx
sub    %rdi,%rdx
cmp    $0x1,%rax
cmove  %rdi,%rdx
lea    (%rbx,%r15,8),%rbx
mov    %rax,%rdi
test   %rdx,%rdx
je     1307 <drftf1+0x1d7>
mov    %rbp,%rdx
mov    %r13,%r8
mov    %r13,%r9
push   %rbx
mov    0x20(%rsp),%r14
push   %r10
push   %r10
push   %r13
call   1040 <dradfg@plt>
mov    0x28(%rsp),%r10
mov    0x30(%rsp),%rbx
add    $0x20,%rsp
jmp    1197 <drftf1+0x67>
mov    %rax,%rdi
mov    %rbp,%rsi
mov    %r13,%rdx
mov    %r10,%rcx
push   %rbx
mov    0x28(%rsp),%r14
call   1050 <dradf4@plt>
mov    0x18(%rsp),%r10
mov    0x20(%rsp),%rbx
add    $0x10,%rsp
jmp    132f <drftf1+0x1ff>
mov    %rbp,%rdx
mov    %r10,%r8
mov    %r10,%r9
push   %rbx
mov    0x20(%rsp),%r14
push   %r13
push   %r13
push   %r10
call   1040 <dradfg@plt>
mov    0x28(%rsp),%r10
mov    0x30(%rsp),%rbx
add    $0x20,%rsp
mov    $0x1,%edi
xor    %eax,%eax
add    $0xffffffffffffffff,%r12
jne    11a5 <drftf1+0x75>
test   %r14,%r14
setle  %cl
xor    $0x1,%al
or     %cl,%al
jne    14e4 <drftf1+0x3b4>
cmp    $0x4,%r14
jb     1377 <drftf1+0x247>
lea    0x0(,%r14,8),%rax
add    %r13,%rax
cmp    %r10,%rax
jbe    1405 <drftf1+0x2d5>
lea    (%r10,%r14,8),%rax
cmp    %r13,%rax
jbe    1405 <drftf1+0x2d5>
xor    %eax,%eax
mov    %rax,%rcx
not    %rcx
add    %r14,%rcx
mov    %r14,%rdx
and    $0x3,%rdx
je     13a7 <drftf1+0x277>
nopl   0x0(%rax,%rax,1)
movsd  0x0(%r13,%rax,8),%xmm0
movsd  %xmm0,(%r10,%rax,8)
add    $0x1,%rax
add    $0xffffffffffffffff,%rdx
jne    1390 <drftf1+0x260>
cmp    $0x3,%rcx
jb     14e4 <drftf1+0x3b4>
cs nopw 0x0(%rax,%rax,1)
nopl   0x0(%rax,%rax,1)
movsd  0x0(%r13,%rax,8),%xmm0
movsd  %xmm0,(%r10,%rax,8)
movsd  0x8(%r13,%rax,8),%xmm0
movsd  %xmm0,0x8(%r10,%rax,8)
movsd  0x10(%r13,%rax,8),%xmm0
movsd  %xmm0,0x10(%r10,%rax,8)
movsd  0x18(%r13,%rax,8),%xmm0
movsd  %xmm0,0x18(%r10,%rax,8)
add    $0x4,%rax
cmp    %rax,%r14
jne    13c0 <drftf1+0x290>
jmp    14e4 <drftf1+0x3b4>
mov    %r14,%rax
and    $0xfffffffffffffffc,%rax
lea    -0x4(%rax),%rsi
mov    %rsi,%rdx
shr    $0x2,%rdx
add    $0x1,%rdx
mov    %edx,%ecx
and    $0x3,%ecx
cmp    $0xc,%rsi
jae    142a <drftf1+0x2fa>
xor    %esi,%esi
jmp    1499 <drftf1+0x369>
and    $0xfffffffffffffffc,%rdx
xor    %esi,%esi
movups 0x0(%r13,%rsi,8),%xmm0
movups 0x10(%r13,%rsi,8),%xmm1
movups %xmm0,(%r10,%rsi,8)
movups %xmm1,0x10(%r10,%rsi,8)
movups 0x20(%r13,%rsi,8),%xmm0
movups 0x30(%r13,%rsi,8),%xmm1
movups %xmm0,0x20(%r10,%rsi,8)
movups %xmm1,0x30(%r10,%rsi,8)
movups 0x40(%r13,%rsi,8),%xmm0
movups 0x50(%r13,%rsi,8),%xmm1
movups %xmm0,0x40(%r10,%rsi,8)
movups %xmm1,0x50(%r10,%rsi,8)
movups 0x60(%r13,%rsi,8),%xmm0
movups 0x70(%r13,%rsi,8),%xmm1
movups %xmm0,0x60(%r10,%rsi,8)
movups %xmm1,0x70(%r10,%rsi,8)
add    $0x10,%rsi
add    $0xfffffffffffffffc,%rdx
jne    1430 <drftf1+0x300>
test   %rcx,%rcx
je     14db <drftf1+0x3ab>
lea    (%r10,%rsi,8),%rdx
add    $0x10,%rdx
lea    0x10(,%rsi,8),%rsi
add    %r13,%rsi
shl    $0x5,%rcx
xor    %edi,%edi
nopw   0x0(%rax,%rax,1)
movups -0x10(%rsi,%rdi,1),%xmm0
movups (%rsi,%rdi,1),%xmm1
movups %xmm0,-0x10(%rdx,%rdi,1)
movups %xmm1,(%rdx,%rdi,1)
add    $0x20,%rdi
cmp    %rdi,%rcx
jne    14c0 <drftf1+0x390>
cmp    %r14,%rax
jne    1379 <drftf1+0x249>
add    $0x28,%rsp
pop    %rbx
pop    %r12
pop    %r13
pop    %r14
pop    %r15
pop    %rbp
ret

LLVM IR (-O0):
define void @drftf1(i64 %0, double* %1, double* %2, double* %3, i64* %4) {
%6 = alloca i64
%7 = alloca double*
%8 = alloca double*
%9 = alloca double*
%10 = alloca i64*
%11 = alloca i64
%12 = alloca i64
%13 = alloca i64
%14 = alloca i64
%15 = alloca i64
%16 = alloca i64
%17 = alloca i64
%18 = alloca i64
%19 = alloca i64
%20 = alloca i64
%21 = alloca i64
%22 = alloca i64
%23 = alloca i64
store i64 %0, i64* %6
store double* %1, double** %7
store double* %2, double** %8
store double* %3, double** %9
store i64* %4, i64** %10
%24 = load i64*, i64** %10
%25 = getelementptr inbounds i64, i64* %24, i64 1
%26 = load i64, i64* %25
store i64 %26, i64* %17
store i64 1, i64* %15
%27 = load i64, i64* %6
store i64 %27, i64* %14
%28 = load i64, i64* %6
store i64 %28, i64* %19
store i64 0, i64* %12
br label %29
29: ; preds = %178, %5
%30 = load i64, i64* %12
%31 = load i64, i64* %17
%32 = icmp slt i64 %30, %31
br i1 %32, label %33, label %181
33: ; preds = %29
%34 = load i64, i64* %17
%35 = load i64, i64* %12
%36 = sub nsw i64 %34, %35
store i64 %36, i64* %16
%37 = load i64*, i64** %10
%38 = load i64, i64* %16
%39 = add nsw i64 %38, 1
%40 = getelementptr inbounds i64, i64* %37, i64 %39
%41 = load i64, i64* %40
store i64 %41, i64* %18
%42 = load i64, i64* %14
%43 = load i64, i64* %18
%44 = sdiv i64 %42, %43
store i64 %44, i64* %13
%45 = load i64, i64* %6
%46 = load i64, i64* %14
%47 = sdiv i64 %45, %46
store i64 %47, i64* %20
%48 = load i64, i64* %20
%49 = load i64, i64* %13
%50 = mul nsw i64 %48, %49
store i64 %50, i64* %21
%51 = load i64, i64* %18
%52 = sub nsw i64 %51, 1
%53 = load i64, i64* %20
%54 = mul nsw i64 %52, %53
%55 = load i64, i64* %19
%56 = sub nsw i64 %55, %54
store i64 %56, i64* %19
%57 = load i64, i64* %15
%58 = sub nsw i64 1, %57
store i64 %58, i64* %15
%59 = load i64, i64* %18
%60 = icmp ne i64 %59, 4
br i1 %60, label %61, label %62
61: ; preds = %33
br label %108
62: ; preds = %33
%63 = load i64, i64* %19
%64 = load i64, i64* %20
%65 = add nsw i64 %63, %64
store i64 %65, i64* %22
%66 = load i64, i64* %22
%67 = load i64, i64* %20
%68 = add nsw i64 %66, %67
store i64 %68, i64* %23
%69 = load i64, i64* %15
%70 = icmp ne i64 %69, 0
br i1 %70, label %71, label %89
71: ; preds = %62
%72 = load i64, i64* %20
%73 = load i64, i64* %13
%74 = load double*, double** %8
%75 = load double*, double** %7
%76 = load double*, double** %9
%77 = load i64, i64* %19
%78 = getelementptr inbounds double, double* %76, i64 %77
%79 = getelementptr inbounds double, double* %78, i64 -1
%80 = load double*, double** %9
%81 = load i64, i64* %22
%82 = getelementptr inbounds double, double* %80, i64 %81
%83 = getelementptr inbounds double, double* %82, i64 -1
%84 = load double*, double** %9
%85 = load i64, i64* %23
%86 = getelementptr inbounds double, double* %84, i64 %85
%87 = getelementptr inbounds double, double* %86, i64 -1
%88 = call i32 @dradf4(i64 %72, i64 %73, double* %74, double* %75, double* %79, double* %83, double* %87)
br label %107
89: ; preds = %62
%90 = load i64, i64* %20
%91 = load i64, i64* %13
%92 = load double*, double** %7
%93 = load double*, double** %8
%94 = load double*, double** %9
%95 = load i64, i64* %19
%96 = getelementptr inbounds double, double* %94, i64 %95
%97 = getelementptr inbounds double, double* %96, i64 -1
%98 = load double*, double** %9
%99 = load i64, i64* %22
%100 = getelementptr inbounds double, double* %98, i64 %99
%101 = getelementptr inbounds double, double* %100, i64 -1
%102 = load double*, double** %9
%103 = load i64, i64* %23
%104 = getelementptr inbounds double, double* %102, i64 %103
%105 = getelementptr inbounds double, double* %104, i64 -1
%106 = call i32 @dradf4(i64 %90, i64 %91, double* %92, double* %93, double* %97, double* %101, double* %105)
br label %107
107: ; preds = %89, %71
br label %176
108: ; preds = %61
%109 = load i64, i64* %18
%110 = icmp ne i64 %109, 2
br i1 %110, label %111, label %112
111: ; preds = %108
br label %136
112: ; preds = %108
%113 = load i64, i64* %15
%114 = icmp ne i64 %113, 0
br i1 %114, label %115, label %116
115: ; preds = %112
br label %126
116: ; preds = %112
%117 = load i64, i64* %20
%118 = load i64, i64* %13
%119 = load double*, double** %7
%120 = load double*, double** %8
%121 = load double*, double** %9
%122 = load i64, i64* %19
%123 = getelementptr inbounds double, double* %121, i64 %122
%124 = getelementptr inbounds double, double* %123, i64 -1
%125 = call i32 @dradf2(i64 %117, i64 %118, double* %119, double* %120, double* %124)
br label %176
126: ; preds = %115
%127 = load i64, i64* %20
%128 = load i64, i64* %13
%129 = load double*, double** %8
%130 = load double*, double** %7
%131 = load double*, double** %9
%132 = load i64, i64* %19
%133 = getelementptr inbounds double, double* %131, i64 %132
%134 = getelementptr inbounds double, double* %133, i64 -1
%135 = call i32 @dradf2(i64 %127, i64 %128, double* %129, double* %130, double* %134)
br label %176
136: ; preds = %111
%137 = load i64, i64* %20
%138 = icmp eq i64 %137, 1
br i1 %138, label %139, label %142
139: ; preds = %136
%140 = load i64, i64* %15
%141 = sub nsw i64 1, %140
store i64 %141, i64* %15
br label %142
142: ; preds = %139, %136
%143 = load i64, i64* %15
%144 = icmp ne i64 %143, 0
br i1 %144, label %145, label %146
145: ; preds = %142
br label %161
146: ; preds = %142
%147 = load i64, i64* %20
%148 = load i64, i64* %18
%149 = load i64, i64* %13
%150 = load i64, i64* %21
%151 = load double*, double** %7
%152 = load double*, double** %7
%153 = load double*, double** %7
%154 = load double*, double** %8
%155 = load double*, double** %8
%156 = load double*, double** %9
%157 = load i64, i64* %19
%158 = getelementptr inbounds double, double* %156, i64 %157
%159 = getelementptr inbounds double, double* %158, i64 -1
%160 = call i32 @dradfg(i64 %147, i64 %148, i64 %149, i64 %150, double* %151, double* %152, double* %153, double* %154, double* %155, double* %159)
store i64 1, i64* %15
br label %176
161: ; preds = %145
%162 = load i64, i64* %20
%163 = load i64, i64* %18
%164 = load i64, i64* %13
%165 = load i64, i64* %21
%166 = load double*, double** %8
%167 = load double*, double** %8
%168 = load double*, double** %8
%169 = load double*, double** %7
%170 = load double*, double** %7
%171 = load double*, double** %9
%172 = load i64, i64* %19
%173 = getelementptr inbounds double, double* %171, i64 %172
%174 = getelementptr inbounds double, double* %173, i64 -1
%175 = call i32 @dradfg(i64 %162, i64 %163, i64 %164, i64 %165, double* %166, double* %167, double* %168, double* %169, double* %170, double* %174)
store i64 0, i64* %15
br label %176
176: ; preds = %161, %146, %126, %116, %107
%177 = load i64, i64* %13
store i64 %177, i64* %14
br label %178
178: ; preds = %176
%179 = load i64, i64* %12
%180 = add nsw i64 %179, 1
store i64 %180, i64* %12
br label %29
181: ; preds = %29
%182 = load i64, i64* %15
%183 = icmp eq i64 %182, 1
br i1 %183, label %184, label %185
184: ; preds = %181
br label %201
185: ; preds = %181
store i64 0, i64* %11
br label %186
186: ; preds = %198, %185
%187 = load i64, i64* %11
%188 = load i64, i64* %6
%189 = icmp slt i64 %187, %188
br i1 %189, label %190, label %201
190: ; preds = %186
%191 = load double*, double** %8
%192 = load i64, i64* %11
%193 = getelementptr inbounds double, double* %191, i64 %192
%194 = load double, double* %193
%195 = load double*, double** %7
%196 = load i64, i64* %11
%197 = getelementptr inbounds double, double* %195, i64 %196
store double %194, double* %197
br label %198
198: ; preds = %190
%199 = load i64, i64* %11
%200 = add nsw i64 %199, 1
store i64 %200, i64* %11
br label %186
201: ; preds = %184, %186
ret void
}

LLVM IR (-O2):
define void @drftf1(i64 %0, double* %1, double* %2, double* %3, i64* nocapture %4) {
%6 = getelementptr inbounds i64, i64* %4, i64 1
%7 = load i64, i64* %6
%8 = icmp sgt i64 %7, 0
br i1 %8, label %9, label %200
9: ; preds = %5
%10 = add nuw i64 %7, 1
%11 = getelementptr inbounds double, double* %3, i64 -1
%12 = getelementptr inbounds double, double* %3, i64 -1
%13 = getelementptr inbounds double, double* %3, i64 -1
%14 = getelementptr inbounds double, double* %3, i64 -1
%15 = getelementptr inbounds double, double* %3, i64 -1
%16 = getelementptr inbounds double, double* %3, i64 -1
%17 = getelementptr inbounds double, double* %3, i64 -1
%18 = getelementptr inbounds double, double* %3, i64 -1
%19 = getelementptr inbounds double, double* %3, i64 -1
%20 = getelementptr inbounds double, double* %3, i64 -1
br label %21
21: ; preds = %9, %68
%22 = phi i64 [ 0, %9 ], [ %71, %68 ]
%23 = phi i64 [ %0, %9 ], [ %29, %68 ]
%24 = phi i64 [ 1, %9 ], [ %70, %68 ]
%25 = phi i64 [ %0, %9 ], [ %34, %68 ]
%26 = sub i64 %10, %22
%27 = getelementptr inbounds i64, i64* %4, i64 %26
%28 = load i64, i64* %27
%29 = sdiv i64 %23, %28
%30 = sdiv i64 %0, %23
%31 = mul nsw i64 %30, %29
%32 = add nsw i64 %28, -1
%33 = mul nsw i64 %30, %32
%34 = sub nsw i64 %25, %33
switch i64 %28, label %57 [
i64 4, label %35
i64 2, label %49
]
35: ; preds = %21
%36 = add nsw i64 %34, %30
%37 = add nsw i64 %36, %30
%38 = icmp eq i64 %24, 1
br i1 %38, label %44, label %39
39: ; preds = %35
%40 = getelementptr inbounds double, double* %13, i64 %34
%41 = getelementptr inbounds double, double* %14, i64 %36
%42 = getelementptr inbounds double, double* %15, i64 %37
%43 = tail call i32 @dradf4(i64 %30, i64 %29, double* %2, double* %1, double* %40, double* %41, double* %42)
br label %68
44: ; preds = %35
%45 = getelementptr inbounds double, double* %16, i64 %34
%46 = getelementptr inbounds double, double* %17, i64 %36
%47 = getelementptr inbounds double, double* %18, i64 %37
%48 = tail call i32 @dradf4(i64 %30, i64 %29, double* %1, double* %2, double* %45, double* %46, double* %47)
br label %68
49: ; preds = %21
%50 = icmp eq i64 %24, 1
br i1 %50, label %51, label %54
51: ; preds = %49
%52 = getelementptr inbounds double, double* %12, i64 %34
%53 = tail call i32 @dradf2(i64 %30, i64 %29, double* %1, double* %2, double* %52)
br label %68
54: ; preds = %49
%55 = getelementptr inbounds double, double* %11, i64 %34
%56 = tail call i32 @dradf2(i64 %30, i64 %29, double* %2, double* %1, double* %55)
br label %68
57: ; preds = %21
%58 = sub nuw nsw i64 1, %24
%59 = icmp eq i64 %30, 1
%60 = select i1 %59, i64 %24, i64 %58
%61 = icmp eq i64 %60, 0
br i1 %61, label %62, label %65
62: ; preds = %57
%63 = getelementptr inbounds double, double* %20, i64 %34
%64 = tail call i32 @dradfg(i64 %30, i64 %28, i64 %29, i64 %31, double* %1, double* %1, double* %1, double* %2, double* %2, double* %63)
br label %68
65: ; preds = %57
%66 = getelementptr inbounds double, double* %19, i64 %34
%67 = tail call i32 @dradfg(i64 %30, i64 %28, i64 %29, i64 %31, double* %2, double* %2, double* %2, double* %1, double* %1, double* %66)
br label %68
68: ; preds = %39, %44, %65, %62, %54, %51
%69 = phi i1 [ false, %39 ], [ true, %44 ], [ true, %65 ], [ false, %62 ], [ false, %54 ], [ true, %51 ]
%70 = phi i64 [ 1, %39 ], [ 0, %44 ], [ 0, %65 ], [ 1, %62 ], [ 1, %54 ], [ 0, %51 ]
%71 = add nuw nsw i64 %22, 1
%72 = icmp eq i64 %71, %7
br i1 %72, label %73, label %21
73: ; preds = %68
%74 = icmp sgt i64 %0, 0
%75 = and i1 %69, %74
br i1 %75, label %76, label %200
76: ; preds = %73
%77 = icmp ult i64 %0, 4
br i1 %77, label %163, label %78
78: ; preds = %76
%79 = getelementptr double, double* %1, i64 %0
%80 = getelementptr double, double* %2, i64 %0
%81 = icmp ugt double* %80, %1
%82 = icmp ugt double* %79, %2
%83 = and i1 %81, %82
br i1 %83, label %163, label %84
84: ; preds = %78
%85 = and i64 %0, -4
%86 = add i64 %85, -4
%87 = lshr exact i64 %86, 2
%88 = add nuw nsw i64 %87, 1
%89 = and i64 %88, 3
%90 = icmp ult i64 %86, 12
br i1 %90, label %142, label %91
91: ; preds = %84
%92 = and i64 %88, 9223372036854775804
br label %93
93: ; preds = %93, %91
%94 = phi i64 [ 0, %91 ], [ %139, %93 ]
%95 = phi i64 [ 0, %91 ], [ %140, %93 ]
%96 = getelementptr inbounds double, double* %2, i64 %94
%97 = bitcast double* %96 to <2 x double>*
%98 = load <2 x double>, <2 x double>* %97
%99 = getelementptr inbounds double, double* %96, i64 2
%100 = bitcast double* %99 to <2 x double>*
%101 = load <2 x double>, <2 x double>* %100
%102 = getelementptr inbounds double, double* %1, i64 %94
%103 = bitcast double* %102 to <2 x double>*
store <2 x double> %98, <2 x double>* %103
%104 = getelementptr inbounds double, double* %102, i64 2
%105 = bitcast double* %104 to <2 x double>*
store <2 x double> %101, <2 x double>* %105
%106 = or i64 %94, 4
%107 = getelementptr inbounds double, double* %2, i64 %106
%108 = bitcast double* %107 to <2 x double>*
%109 = load <2 x double>, <2 x double>* %108
%110 = getelementptr inbounds double, double* %107, i64 2
%111 = bitcast double* %110 to <2 x double>*
%112 = load <2 x double>, <2 x double>* %111
%113 = getelementptr inbounds double, double* %1, i64 %106
%114 = bitcast double* %113 to <2 x double>*
store <2 x double> %109, <2 x double>* %114
%115 = getelementptr inbounds double, double* %113, i64 2
%116 = bitcast double* %115 to <2 x double>*
store <2 x double> %112, <2 x double>* %116
%117 = or i64 %94, 8
%118 = getelementptr inbounds double, double* %2, i64 %117
%119 = bitcast double* %118 to <2 x double>*
%120 = load <2 x double>, <2 x double>* %119
%121 = getelementptr inbounds double, double* %118, i64 2
%122 = bitcast double* %121 to <2 x double>*
%123 = load <2 x double>, <2 x double>* %122
%124 = getelementptr inbounds double, double* %1, i64 %117
%125 = bitcast double* %124 to <2 x double>*
store <2 x double> %120, <2 x double>* %125
%126 = getelementptr inbounds double, double* %124, i64 2
%127 = bitcast double* %126 to <2 x double>*
store <2 x double> %123, <2 x double>* %127
%128 = or i64 %94, 12
%129 = getelementptr inbounds double, double* %2, i64 %128
%130 = bitcast double* %129 to <2 x double>*
%131 = load <2 x double>, <2 x double>* %130
%132 = getelementptr inbounds double, double* %129, i64 2
%133 = bitcast double* %132 to <2 x double>*
%134 = load <2 x double>, <2 x double>* %133
%135 = getelementptr inbounds double, double* %1, i64 %128
%136 = bitcast double* %135 to <2 x double>*
store <2 x double> %131, <2 x double>* %136
%137 = getelementptr inbounds double, double* %135, i64 2
%138 = bitcast double* %137 to <2 x double>*
store <2 x double> %134, <2 x double>* %138
%139 = add nuw i64 %94, 16
%140 = add nuw i64 %95, 4
%141 = icmp eq i64 %140, %92
br i1 %141, label %142, label %93
142: ; preds = %93, %84
%143 = phi i64 [ 0, %84 ], [ %139, %93 ]
%144 = icmp eq i64 %89, 0
br i1 %144, label %161, label %145
145: ; preds = %142, %145
%146 = phi i64 [ %158, %145 ], [ %143, %142 ]
%147 = phi i64 [ %159, %145 ], [ 0, %142 ]
%148 = getelementptr inbounds double, double* %2, i64 %146
%149 = bitcast double* %148 to <2 x double>*
%150 = load <2 x double>, <2 x double>* %149
%151 = getelementptr inbounds double, double* %148, i64 2
%152 = bitcast double* %151 to <2 x double>*
%153 = load <2 x double>, <2 x double>* %152
%154 = getelementptr inbounds double, double* %1, i64 %146
%155 = bitcast double* %154 to <2 x double>*
store <2 x double> %150, <2 x double>* %155
%156 = getelementptr inbounds double, double* %154, i64 2
%157 = bitcast double* %156 to <2 x double>*
store <2 x double> %153, <2 x double>* %157
%158 = add nuw i64 %146, 4
%159 = add i64 %147, 1
%160 = icmp eq i64 %159, %89
br i1 %160, label %161, label %145
161: ; preds = %145, %142
%162 = icmp eq i64 %85, %0
br i1 %162, label %200, label %163
163: ; preds = %78, %76, %161
%164 = phi i64 [ 0, %78 ], [ 0, %76 ], [ %85, %161 ]
%165 = xor i64 %164, -1
%166 = add i64 %165, %0
%167 = and i64 %0, 3
%168 = icmp eq i64 %167, 0
br i1 %168, label %178, label %169
169: ; preds = %163, %169
%170 = phi i64 [ %175, %169 ], [ %164, %163 ]
%171 = phi i64 [ %176, %169 ], [ 0, %163 ]
%172 = getelementptr inbounds double, double* %2, i64 %170
%173 = load double, double* %172
%174 = getelementptr inbounds double, double* %1, i64 %170
store double %173, double* %174
%175 = add nuw nsw i64 %170, 1
%176 = add i64 %171, 1
%177 = icmp eq i64 %176, %167
br i1 %177, label %178, label %169
178: ; preds = %169, %163
%179 = phi i64 [ %164, %163 ], [ %175, %169 ]
%180 = icmp ult i64 %166, 3
br i1 %180, label %200, label %181
181: ; preds = %178, %181
%182 = phi i64 [ %198, %181 ], [ %179, %178 ]
%183 = getelementptr inbounds double, double* %2, i64 %182
%184 = load double, double* %183
%185 = getelementptr inbounds double, double* %1, i64 %182
store double %184, double* %185
%186 = add nuw nsw i64 %182, 1
%187 = getelementptr inbounds double, double* %2, i64 %186
%188 = load double, double* %187
%189 = getelementptr inbounds double, double* %1, i64 %186
store double %188, double* %189
%190 = add nuw nsw i64 %182, 2
%191 = getelementptr inbounds double, double* %2, i64 %190
%192 = load double, double* %191
%193 = getelementptr inbounds double, double* %1, i64 %190
store double %192, double* %193
%194 = add nuw nsw i64 %182, 3
%195 = getelementptr inbounds double, double* %2, i64 %194
%196 = load double, double* %195
%197 = getelementptr inbounds double, double* %1, i64 %194
store double %196, double* %197
%198 = add nuw nsw i64 %182, 4
%199 = icmp eq i64 %198, %0
br i1 %199, label %200, label %181
200: ; preds = %178, %181, %161, %5, %73
ret void
}