#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*/ dradb2(long, long, double *, double *, double const *);
int /*<<< orphan*/ dradb3(long, long, double *, double *, double const *,
                          double const *);
int /*<<< orphan*/ dradb4(long, long, double *, double *, double const *,
                          double const *, double const *);
int /*<<< orphan*/ dradbg(long, long, long, long, double *, double *, double *,
                          double *, double *, double const *);
void drftb1(long n, double *c, double *ch, const double *wa, const long *ifac) {
  long i, k1, l1, l2;
  long na;
  long nf, ip, iw, ix2, ix3, ido, idl1;
  nf = ifac[1];
  na = 0;
  l1 = 1;
  iw = 1;
  for (k1 = 0; k1 < nf; k1++) {
    ip = ifac[k1 + 2];
    l2 = ip * l1;
    ido = n / l2;
    idl1 = ido * l1;
    if (ip != 4)
      goto L103;
    ix2 = iw + ido;
    ix3 = ix2 + ido;
    if (na != 0)
      dradb4(ido, l1, ch, c, wa + iw - 1, wa + ix2 - 1, wa + ix3 - 1);
    else
      dradb4(ido, l1, c, ch, wa + iw - 1, wa + ix2 - 1, wa + ix3 - 1);
    na = 1 - na;
    goto L115;
  L103:
    if (ip != 2)
      goto L106;
    if (na != 0)
      dradb2(ido, l1, ch, c, wa + iw - 1);
    else
      dradb2(ido, l1, c, ch, wa + iw - 1);
    na = 1 - na;
    goto L115;
  L106:
    if (ip != 3)
      goto L109;
    ix2 = iw + ido;
    if (na != 0)
      dradb3(ido, l1, ch, c, wa + iw - 1, wa + ix2 - 1);
    else
      dradb3(ido, l1, c, ch, wa + iw - 1, wa + ix2 - 1);
    na = 1 - na;
    goto L115;
  L109:
    if (na != 0)
      dradbg(ido, ip, l1, idl1, ch, ch, ch, c, c, wa + iw - 1);
    else
      dradbg(ido, ip, l1, idl1, c, c, c, ch, ch, wa + iw - 1);
    if (ido == 1)
      na = 1 - na;
  L115:
    l1 = l2;
    iw += (ip - 1) * ido;
  }
  if (na == 0)
    return;
  for (i = 0; i < n; i++)
    c[i] = ch[i];
}


x86 assembly (clang, -O0):
<drftb1>:
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,-0x68(%rbp)
movq   $0x0,-0x60(%rbp)
movq   $0x1,-0x50(%rbp)
movq   $0x1,-0x78(%rbp)
movq   $0x0,-0x48(%rbp)
mov    -0x48(%rbp),%rax
cmp    -0x68(%rbp),%rax
jge    1531 <drftb1+0x3f1>
mov    -0x38(%rbp),%rax
mov    -0x48(%rbp),%rcx
mov    0x10(%rax,%rcx,8),%rax
mov    %rax,-0x70(%rbp)
mov    -0x70(%rbp),%rax
imul   -0x50(%rbp),%rax
mov    %rax,-0x58(%rbp)
mov    -0x18(%rbp),%rax
cqto
idivq  -0x58(%rbp)
mov    %rax,-0x90(%rbp)
mov    -0x90(%rbp),%rax
imul   -0x50(%rbp),%rax
mov    %rax,-0x98(%rbp)
cmpq   $0x4,-0x70(%rbp)
je     11ee <drftb1+0xae>
jmp    12e1 <drftb1+0x1a1>
mov    -0x78(%rbp),%rax
add    -0x90(%rbp),%rax
mov    %rax,-0x80(%rbp)
mov    -0x80(%rbp),%rax
add    -0x90(%rbp),%rax
mov    %rax,-0x88(%rbp)
cmpq   $0x0,-0x60(%rbp)
je     1277 <drftb1+0x137>
mov    -0x90(%rbp),%rdi
mov    -0x50(%rbp),%rsi
mov    -0x28(%rbp),%rdx
mov    -0x20(%rbp),%rcx
mov    -0x30(%rbp),%r8
mov    -0x78(%rbp),%rax
shl    $0x3,%rax
add    %rax,%r8
add    $0xfffffffffffffff8,%r8
mov    -0x30(%rbp),%r9
mov    -0x80(%rbp),%rax
shl    $0x3,%rax
add    %rax,%r9
add    $0xfffffffffffffff8,%r9
mov    -0x30(%rbp),%rax
mov    -0x88(%rbp),%r10
shl    $0x3,%r10
add    %r10,%rax
add    $0xfffffffffffffff8,%rax
mov    %rax,(%rsp)
call   1050 <dradb4@plt>
jmp    12cf <drftb1+0x18f>
mov    -0x90(%rbp),%rdi
mov    -0x50(%rbp),%rsi
mov    -0x20(%rbp),%rdx
mov    -0x28(%rbp),%rcx
mov    -0x30(%rbp),%r8
mov    -0x78(%rbp),%rax
shl    $0x3,%rax
add    %rax,%r8
add    $0xfffffffffffffff8,%r8
mov    -0x30(%rbp),%r9
mov    -0x80(%rbp),%rax
shl    $0x3,%rax
add    %rax,%r9
add    $0xfffffffffffffff8,%r9
mov    -0x30(%rbp),%rax
mov    -0x88(%rbp),%r10
shl    $0x3,%r10
add    %r10,%rax
add    $0xfffffffffffffff8,%rax
mov    %rax,(%rsp)
call   1050 <dradb4@plt>
mov    $0x1,%eax
sub    -0x60(%rbp),%rax
mov    %rax,-0x60(%rbp)
jmp    1500 <drftb1+0x3c0>
cmpq   $0x2,-0x70(%rbp)
je     12f1 <drftb1+0x1b1>
jmp    1369 <drftb1+0x229>
cmpq   $0x0,-0x60(%rbp)
je     132c <drftb1+0x1ec>
mov    -0x90(%rbp),%rdi
mov    -0x50(%rbp),%rsi
mov    -0x28(%rbp),%rdx
mov    -0x20(%rbp),%rcx
mov    -0x30(%rbp),%r8
mov    -0x78(%rbp),%rax
shl    $0x3,%rax
add    %rax,%r8
add    $0xfffffffffffffff8,%r8
call   1060 <dradb2@plt>
jmp    1357 <drftb1+0x217>
mov    -0x90(%rbp),%rdi
mov    -0x50(%rbp),%rsi
mov    -0x20(%rbp),%rdx
mov    -0x28(%rbp),%rcx
mov    -0x30(%rbp),%r8
mov    -0x78(%rbp),%rax
shl    $0x3,%rax
add    %rax,%r8
add    $0xfffffffffffffff8,%r8
call   1060 <dradb2@plt>
mov    $0x1,%eax
sub    -0x60(%rbp),%rax
mov    %rax,-0x60(%rbp)
jmp    1500 <drftb1+0x3c0>
cmpq   $0x3,-0x70(%rbp)
je     1379 <drftb1+0x239>
jmp    1426 <drftb1+0x2e6>
mov    -0x78(%rbp),%rax
add    -0x90(%rbp),%rax
mov    %rax,-0x80(%rbp)
cmpq   $0x0,-0x60(%rbp)
je     13d6 <drftb1+0x296>
mov    -0x90(%rbp),%rdi
mov    -0x50(%rbp),%rsi
mov    -0x28(%rbp),%rdx
mov    -0x20(%rbp),%rcx
mov    -0x30(%rbp),%r8
mov    -0x78(%rbp),%rax
shl    $0x3,%rax
add    %rax,%r8
add    $0xfffffffffffffff8,%r8
mov    -0x30(%rbp),%r9
mov    -0x80(%rbp),%rax
shl    $0x3,%rax
add    %rax,%r9
add    $0xfffffffffffffff8,%r9
call   1040 <dradb3@plt>
jmp    1414 <drftb1+0x2d4>
mov    -0x90(%rbp),%rdi
mov    -0x50(%rbp),%rsi
mov    -0x20(%rbp),%rdx
mov    -0x28(%rbp),%rcx
mov    -0x30(%rbp),%r8
mov    -0x78(%rbp),%rax
shl    $0x3,%rax
add    %rax,%r8
add    $0xfffffffffffffff8,%r8
mov    -0x30(%rbp),%r9
mov    -0x80(%rbp),%rax
shl    $0x3,%rax
add    %rax,%r9
add    $0xfffffffffffffff8,%r9
call   1040 <dradb3@plt>
mov    $0x1,%eax
sub    -0x60(%rbp),%rax
mov    %rax,-0x60(%rbp)
jmp    1500 <drftb1+0x3c0>
cmpq   $0x0,-0x60(%rbp)
je     148b <drftb1+0x34b>
mov    -0x90(%rbp),%rdi
mov    -0x70(%rbp),%rsi
mov    -0x50(%rbp),%rdx
mov    -0x98(%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    -0x78(%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   1030 <dradbg@plt>
jmp    14e0 <drftb1+0x3a0>
mov    -0x90(%rbp),%rdi
mov    -0x70(%rbp),%rsi
mov    -0x50(%rbp),%rdx
mov    -0x98(%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    -0x78(%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   1030 <dradbg@plt>
cmpq   $0x1,-0x90(%rbp)
01
jne    14fb <drftb1+0x3bb>
mov    $0x1,%eax
sub    -0x60(%rbp),%rax
mov    %rax,-0x60(%rbp)
jmp    1500 <drftb1+0x3c0>
mov    -0x58(%rbp),%rax
mov    %rax,-0x50(%rbp)
mov    -0x70(%rbp),%rax
sub    $0x1,%rax
imul   -0x90(%rbp),%rax
ff
add    -0x78(%rbp),%rax
mov    %rax,-0x78(%rbp)
mov    -0x48(%rbp),%rax
add    $0x1,%rax
mov    %rax,-0x48(%rbp)
jmp    118e <drftb1+0x4e>
cmpq   $0x0,-0x60(%rbp)
jne    1541 <drftb1+0x401>
jmp    1582 <drftb1+0x442>
movq   $0x0,-0x40(%rbp)
mov    -0x40(%rbp),%rax
cmp    -0x18(%rbp),%rax
jge    1582 <drftb1+0x442>
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    1549 <drftb1+0x409>
add    $0xb0,%rsp
pop    %rbx
pop    %r14
pop    %rbp
ret

x86 assembly (clang, -O2):
<drftb1>:
push   %rbp
push   %r15
push   %r14
push   %r13
push   %r12
push   %rbx
sub    $0x38,%rsp
mov    %rdx,%r10
mov    %r8,0x30(%rsp)
mov    0x8(%r8),%rdx
mov    %rdx,0x28(%rsp)
test   %rdx,%rdx
jle    1574 <drftb1+0x434>
mov    %rsi,%r11
mov    %rdi,%rax
add    $0xfffffffffffffff8,%rcx
mov    %rcx,(%rsp)
mov    $0x1,%r14d
xor    %r13d,%r13d
mov    $0x1,%r15d
xor    %esi,%esi
mov    %r10,0x18(%rsp)
mov    %r11,0x10(%rsp)
mov    %rdi,0x8(%rsp)
jmp    11fb <drftb1+0xbb>
mov    (%rsp),%rdx
lea    (%rdx,%r15,8),%r8
lea    (%rdx,%rcx,8),%r9
lea    (%rdx,%rax,8),%rax
sub    $0x8,%rsp
mov    %r12,%rdi
mov    %rbx,%rsi
mov    %r11,%rdx
mov    %r10,%rcx
push   %rax
call   1050 <dradb4@plt>
mov    0x30(%rsp),%rdx
mov    0x18(%rsp),%rax
mov    0x20(%rsp),%r11
mov    0x28(%rsp),%r10
add    $0x10,%rsp
mov    $0x1,%ecx
sub    %rdx,%rcx
mov    %rcx,%rsi
add    $0xffffffffffffffff,%rbp
imul   %r12,%rbp
add    %rbp,%r15
add    $0x1,%r13
cmp    %r13,0x28(%rsp)
je     13e3 <drftb1+0x2a3>
mov    %r14,%rbx
mov    0x30(%rsp),%rcx
mov    0x10(%rcx,%r13,8),%rbp
mov    %rbp,%r14
imul   %rbx,%r14
mov    %rax,%rcx
or     %r14,%rcx
shr    $0x20,%rcx
je     1230 <drftb1+0xf0>
cqto
idiv   %r14
mov    %rax,%r12
jmp    1238 <drftb1+0xf8>
cs nopw 0x0(%rax,%rax,1)
nop
xor    %edx,%edx
div    %r14d
mov    %eax,%r12d
cmp    $0x2,%rbp
mov    %rsi,0x20(%rsp)
je     12c0 <drftb1+0x180>
cmp    $0x3,%rbp
je     1290 <drftb1+0x150>
cmp    $0x4,%rbp
jne    12f0 <drftb1+0x1b0>
lea    (%r12,%r15,1),%rcx
lea    (%rcx,%r12,1),%rax
test   %rsi,%rsi
je     1198 <drftb1+0x58>
mov    (%rsp),%rdx
lea    (%rdx,%r15,8),%r8
lea    (%rdx,%rcx,8),%r9
lea    (%rdx,%rax,8),%rax
sub    $0x8,%rsp
mov    %r12,%rdi
mov    %rbx,%rsi
mov    %r10,%rdx
mov    %r11,%rcx
jmp    11b8 <drftb1+0x78>
nopl   0x0(%rax)
lea    (%r12,%r15,1),%rax
test   %rsi,%rsi
je     1323 <drftb1+0x1e3>
mov    (%rsp),%rcx
lea    (%rcx,%r15,8),%r8
lea    (%rcx,%rax,8),%r9
mov    %r12,%rdi
mov    %rbx,%rsi
mov    %r10,%rdx
mov    %r11,%rcx
jmp    133b <drftb1+0x1fb>
nopw   0x0(%rax,%rax,1)
test   %rsi,%rsi
je     1361 <drftb1+0x221>
mov    (%rsp),%rax
lea    (%rax,%r15,8),%r8
mov    %r12,%rdi
mov    %rbx,%rsi
mov    %r10,%rdx
mov    %r11,%rcx
jmp    1375 <drftb1+0x235>
cs nopw 0x0(%rax,%rax,1)
nopl   0x0(%rax)
mov    %r12,%rcx
imul   %rbx,%rcx
test   %rsi,%rsi
je     1393 <drftb1+0x253>
mov    (%rsp),%rax
lea    (%rax,%r15,8),%rax
mov    %r12,%rdi
mov    %rbp,%rsi
mov    %rbx,%rdx
mov    %r10,%r8
mov    %r10,%r9
push   %rax
push   %r11
push   %r11
push   %r10
jmp    13b1 <drftb1+0x271>
mov    (%rsp),%rcx
lea    (%rcx,%r15,8),%r8
lea    (%rcx,%rax,8),%r9
mov    %r12,%rdi
mov    %rbx,%rsi
mov    %r11,%rdx
mov    %r10,%rcx
call   1040 <dradb3@plt>
mov    $0x1,%eax
sub    0x20(%rsp),%rax
mov    %rax,%rsi
mov    0x18(%rsp),%r10
mov    0x10(%rsp),%r11
mov    0x8(%rsp),%rax
jmp    11e1 <drftb1+0xa1>
mov    (%rsp),%rax
lea    (%rax,%r15,8),%r8
mov    %r12,%rdi
mov    %rbx,%rsi
mov    %r11,%rdx
mov    %r10,%rcx
call   1060 <dradb2@plt>
mov    0x20(%rsp),%rdx
mov    0x8(%rsp),%rax
mov    0x10(%rsp),%r11
mov    0x18(%rsp),%r10
jmp    11d6 <drftb1+0x96>
mov    (%rsp),%rax
lea    (%rax,%r15,8),%rax
mov    %r12,%rdi
mov    %rbp,%rsi
mov    %rbx,%rdx
mov    %r11,%r8
mov    %r11,%r9
push   %rax
push   %r10
push   %r10
push   %r11
call   1030 <dradbg@plt>
mov    0x40(%rsp),%rsi
mov    0x28(%rsp),%rax
mov    0x30(%rsp),%r11
mov    0x38(%rsp),%r10
add    $0x20,%rsp
mov    $0x1,%ecx
sub    %rsi,%rcx
cmp    $0x1,%r12
cmove  %rcx,%rsi
jmp    11e1 <drftb1+0xa1>
test   %rsi,%rsi
je     1574 <drftb1+0x434>
test   %rax,%rax
jle    1574 <drftb1+0x434>
cmp    $0x4,%rax
jb     1415 <drftb1+0x2d5>
lea    (%r10,%rax,8),%rcx
cmp    %r11,%rcx
jbe    1494 <drftb1+0x354>
lea    (%r11,%rax,8),%rcx
cmp    %r10,%rcx
jbe    1494 <drftb1+0x354>
xor    %ecx,%ecx
mov    %rcx,%rsi
not    %rsi
add    %rax,%rsi
mov    %rax,%rdx
and    $0x3,%rdx
je     1446 <drftb1+0x306>
nopl   0x0(%rax)
movsd  (%r10,%rcx,8),%xmm0
movsd  %xmm0,(%r11,%rcx,8)
add    $0x1,%rcx
add    $0xffffffffffffffff,%rdx
jne    1430 <drftb1+0x2f0>
cmp    $0x3,%rsi
jb     1574 <drftb1+0x434>
movsd  (%r10,%rcx,8),%xmm0
movsd  %xmm0,(%r11,%rcx,8)
movsd  0x8(%r10,%rcx,8),%xmm0
movsd  %xmm0,0x8(%r11,%rcx,8)
movsd  0x10(%r10,%rcx,8),%xmm0
movsd  %xmm0,0x10(%r11,%rcx,8)
movsd  0x18(%r10,%rcx,8),%xmm0
movsd  %xmm0,0x18(%r11,%rcx,8)
add    $0x4,%rcx
cmp    %rcx,%rax
jne    1450 <drftb1+0x310>
jmp    1574 <drftb1+0x434>
mov    %rax,%rcx
and    $0xfffffffffffffffc,%rcx
lea    -0x4(%rcx),%rsi
mov    %rsi,%rdx
shr    $0x2,%rdx
add    $0x1,%rdx
mov    %edx,%ebp
and    $0x3,%ebp
cmp    $0xc,%rsi
jae    14b9 <drftb1+0x379>
xor    %esi,%esi
jmp    1528 <drftb1+0x3e8>
and    $0xfffffffffffffffc,%rdx
xor    %esi,%esi
nop
movups (%r10,%rsi,8),%xmm0
movups 0x10(%r10,%rsi,8),%xmm1
movups %xmm0,(%r11,%rsi,8)
movups %xmm1,0x10(%r11,%rsi,8)
movups 0x20(%r10,%rsi,8),%xmm0
movups 0x30(%r10,%rsi,8),%xmm1
movups %xmm0,0x20(%r11,%rsi,8)
movups %xmm1,0x30(%r11,%rsi,8)
movups 0x40(%r10,%rsi,8),%xmm0
movups 0x50(%r10,%rsi,8),%xmm1
movups %xmm0,0x40(%r11,%rsi,8)
movups %xmm1,0x50(%r11,%rsi,8)
movups 0x60(%r10,%rsi,8),%xmm0
movups 0x70(%r10,%rsi,8),%xmm1
movups %xmm0,0x60(%r11,%rsi,8)
movups %xmm1,0x70(%r11,%rsi,8)
add    $0x10,%rsi
add    $0xfffffffffffffffc,%rdx
jne    14c0 <drftb1+0x380>
test   %rbp,%rbp
je     156b <drftb1+0x42b>
lea    (%r11,%rsi,8),%rdx
add    $0x10,%rdx
lea    (%r10,%rsi,8),%rsi
add    $0x10,%rsi
shl    $0x5,%rbp
xor    %edi,%edi
cs nopw 0x0(%rax,%rax,1)
nopl   (%rax)
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,%rbp
jne    1550 <drftb1+0x410>
cmp    %rax,%rcx
jne    1417 <drftb1+0x2d7>
add    $0x38,%rsp
pop    %rbx
pop    %r12
pop    %r13
pop    %r14
pop    %r15
pop    %rbp
ret

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

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