#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(int, int, double *, double *, double *);
int /*<<< orphan*/ dradb3(int, int, double *, double *, double *, double *);
int /*<<< orphan*/ dradb4(int, int, double *, double *, double *, double *,
                          double *);
int /*<<< orphan*/ dradbg(int, int, int, int, double *, double *, double *,
                          double *, double *, double *);
void drftb1(int n, double *c, double *ch, double *wa, int *ifac) {
  int i, k1, l1, l2;
  int na;
  int 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    $0x80,%rsp
mov    %edi,-0x14(%rbp)
mov    %rsi,-0x20(%rbp)
mov    %rdx,-0x28(%rbp)
mov    %rcx,-0x30(%rbp)
mov    %r8,-0x38(%rbp)
mov    -0x38(%rbp),%rax
mov    0x4(%rax),%eax
mov    %eax,-0x50(%rbp)
movl   $0x0,-0x4c(%rbp)
movl   $0x1,-0x44(%rbp)
movl   $0x1,-0x58(%rbp)
movl   $0x0,-0x40(%rbp)
mov    -0x40(%rbp),%eax
cmp    -0x50(%rbp),%eax
jge    14aa <drftb1+0x36a>
mov    -0x38(%rbp),%rax
mov    -0x40(%rbp),%ecx
add    $0x2,%ecx
movslq %ecx,%rcx
mov    (%rax,%rcx,4),%eax
mov    %eax,-0x54(%rbp)
mov    -0x54(%rbp),%eax
imul   -0x44(%rbp),%eax
mov    %eax,-0x48(%rbp)
mov    -0x14(%rbp),%eax
cltd
idivl  -0x48(%rbp)
mov    %eax,-0x64(%rbp)
mov    -0x64(%rbp),%eax
imul   -0x44(%rbp),%eax
mov    %eax,-0x68(%rbp)
cmpl   $0x4,-0x54(%rbp)
je     11d3 <drftb1+0x93>
jmp    12a4 <drftb1+0x164>
mov    -0x58(%rbp),%eax
add    -0x64(%rbp),%eax
mov    %eax,-0x5c(%rbp)
mov    -0x5c(%rbp),%eax
add    -0x64(%rbp),%eax
mov    %eax,-0x60(%rbp)
cmpl   $0x0,-0x4c(%rbp)
je     1244 <drftb1+0x104>
mov    -0x64(%rbp),%edi
mov    -0x44(%rbp),%esi
mov    -0x28(%rbp),%rdx
mov    -0x20(%rbp),%rcx
mov    -0x30(%rbp),%r8
movslq -0x58(%rbp),%rax
shl    $0x3,%rax
add    %rax,%r8
add    $0xfffffffffffffff8,%r8
mov    -0x30(%rbp),%r9
movslq -0x5c(%rbp),%rax
shl    $0x3,%rax
add    %rax,%r9
add    $0xfffffffffffffff8,%r9
mov    -0x30(%rbp),%rax
movslq -0x60(%rbp),%r10
shl    $0x3,%r10
add    %r10,%rax
add    $0xfffffffffffffff8,%rax
mov    %rax,(%rsp)
call   1050 <dradb4@plt>
jmp    1294 <drftb1+0x154>
mov    -0x64(%rbp),%edi
mov    -0x44(%rbp),%esi
mov    -0x20(%rbp),%rdx
mov    -0x28(%rbp),%rcx
mov    -0x30(%rbp),%r8
movslq -0x58(%rbp),%rax
shl    $0x3,%rax
add    %rax,%r8
add    $0xfffffffffffffff8,%r8
mov    -0x30(%rbp),%r9
movslq -0x5c(%rbp),%rax
shl    $0x3,%rax
add    %rax,%r9
add    $0xfffffffffffffff8,%r9
mov    -0x30(%rbp),%rax
movslq -0x60(%rbp),%r10
shl    $0x3,%r10
add    %r10,%rax
add    $0xfffffffffffffff8,%rax
mov    %rax,(%rsp)
call   1050 <dradb4@plt>
mov    $0x1,%eax
sub    -0x4c(%rbp),%eax
mov    %eax,-0x4c(%rbp)
jmp    1486 <drftb1+0x346>
cmpl   $0x2,-0x54(%rbp)
je     12b3 <drftb1+0x173>
jmp    131e <drftb1+0x1de>
cmpl   $0x0,-0x4c(%rbp)
je     12e8 <drftb1+0x1a8>
mov    -0x64(%rbp),%edi
mov    -0x44(%rbp),%esi
mov    -0x28(%rbp),%rdx
mov    -0x20(%rbp),%rcx
mov    -0x30(%rbp),%r8
movslq -0x58(%rbp),%rax
shl    $0x3,%rax
add    %rax,%r8
add    $0xfffffffffffffff8,%r8
call   1060 <dradb2@plt>
jmp    130e <drftb1+0x1ce>
mov    -0x64(%rbp),%edi
mov    -0x44(%rbp),%esi
mov    -0x20(%rbp),%rdx
mov    -0x28(%rbp),%rcx
mov    -0x30(%rbp),%r8
movslq -0x58(%rbp),%rax
shl    $0x3,%rax
add    %rax,%r8
add    $0xfffffffffffffff8,%r8
call   1060 <dradb2@plt>
mov    $0x1,%eax
sub    -0x4c(%rbp),%eax
mov    %eax,-0x4c(%rbp)
jmp    1486 <drftb1+0x346>
cmpl   $0x3,-0x54(%rbp)
je     132d <drftb1+0x1ed>
jmp    13c7 <drftb1+0x287>
mov    -0x58(%rbp),%eax
add    -0x64(%rbp),%eax
mov    %eax,-0x5c(%rbp)
cmpl   $0x0,-0x4c(%rbp)
je     137e <drftb1+0x23e>
mov    -0x64(%rbp),%edi
mov    -0x44(%rbp),%esi
mov    -0x28(%rbp),%rdx
mov    -0x20(%rbp),%rcx
mov    -0x30(%rbp),%r8
movslq -0x58(%rbp),%rax
shl    $0x3,%rax
add    %rax,%r8
add    $0xfffffffffffffff8,%r8
mov    -0x30(%rbp),%r9
movslq -0x5c(%rbp),%rax
shl    $0x3,%rax
add    %rax,%r9
add    $0xfffffffffffffff8,%r9
call   1040 <dradb3@plt>
jmp    13b7 <drftb1+0x277>
mov    -0x64(%rbp),%edi
mov    -0x44(%rbp),%esi
mov    -0x20(%rbp),%rdx
mov    -0x28(%rbp),%rcx
mov    -0x30(%rbp),%r8
movslq -0x58(%rbp),%rax
shl    $0x3,%rax
add    %rax,%r8
add    $0xfffffffffffffff8,%r8
mov    -0x30(%rbp),%r9
movslq -0x5c(%rbp),%rax
shl    $0x3,%rax
add    %rax,%r9
add    $0xfffffffffffffff8,%r9
call   1040 <dradb3@plt>
mov    $0x1,%eax
sub    -0x4c(%rbp),%eax
mov    %eax,-0x4c(%rbp)
jmp    1486 <drftb1+0x346>
cmpl   $0x0,-0x4c(%rbp)
je     1421 <drftb1+0x2e1>
mov    -0x64(%rbp),%edi
mov    -0x54(%rbp),%esi
mov    -0x44(%rbp),%edx
mov    -0x68(%rbp),%ecx
mov    -0x28(%rbp),%r8
mov    -0x28(%rbp),%r9
mov    -0x28(%rbp),%rbx
mov    -0x20(%rbp),%r11
mov    -0x20(%rbp),%r10
mov    -0x30(%rbp),%rax
movslq -0x58(%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    146c <drftb1+0x32c>
mov    -0x64(%rbp),%edi
mov    -0x54(%rbp),%esi
mov    -0x44(%rbp),%edx
mov    -0x68(%rbp),%ecx
mov    -0x20(%rbp),%r8
mov    -0x20(%rbp),%r9
mov    -0x20(%rbp),%rbx
mov    -0x28(%rbp),%r11
mov    -0x28(%rbp),%r10
mov    -0x30(%rbp),%rax
movslq -0x58(%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>
cmpl   $0x1,-0x64(%rbp)
jne    1481 <drftb1+0x341>
mov    $0x1,%eax
sub    -0x4c(%rbp),%eax
mov    %eax,-0x4c(%rbp)
jmp    1486 <drftb1+0x346>
mov    -0x48(%rbp),%eax
mov    %eax,-0x44(%rbp)
mov    -0x54(%rbp),%eax
sub    $0x1,%eax
imul   -0x64(%rbp),%eax
add    -0x58(%rbp),%eax
mov    %eax,-0x58(%rbp)
mov    -0x40(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x40(%rbp)
jmp    1187 <drftb1+0x47>
cmpl   $0x0,-0x4c(%rbp)
jne    14b9 <drftb1+0x379>
jmp    14f4 <drftb1+0x3b4>
movl   $0x0,-0x3c(%rbp)
mov    -0x3c(%rbp),%eax
cmp    -0x14(%rbp),%eax
jge    14f4 <drftb1+0x3b4>
mov    -0x28(%rbp),%rax
movslq -0x3c(%rbp),%rcx
movsd  (%rax,%rcx,8),%xmm0
mov    -0x20(%rbp),%rax
movslq -0x3c(%rbp),%rcx
movsd  %xmm0,(%rax,%rcx,8)
mov    -0x3c(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x3c(%rbp)
jmp    14c0 <drftb1+0x380>
add    $0x80,%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    %edi,0x24(%rsp)
mov    %r8,0x30(%rsp)
mov    0x4(%r8),%eax
mov    %rax,0x28(%rsp)
test   %eax,%eax
jle    1544 <drftb1+0x404>
mov    %rdx,%r10
mov    %rsi,%r11
add    $0xfffffffffffffff8,%rcx
mov    %rcx,0x8(%rsp)
xor    %r14d,%r14d
mov    $0x1,%r13d
mov    $0x1,%r12d
xor    %esi,%esi
mov    %rdx,0x18(%rsp)
mov    %r11,0x10(%rsp)
jmp    11f3 <drftb1+0xb3>
mov    0x8(%rsp),%rsi
lea    (%rsi,%rdx,8),%r8
movslq %ecx,%rcx
lea    (%rsi,%rcx,8),%r9
cltq
lea    (%rsi,%rax,8),%rax
sub    $0x8,%rsp
mov    %r15d,%edi
mov    %ebx,%esi
mov    %r11,%rdx
mov    %r10,%rcx
push   %rax
call   1050 <dradb4@plt>
mov    0x14(%rsp),%ecx
mov    0x20(%rsp),%r11
mov    0x28(%rsp),%r10
add    $0x10,%rsp
mov    $0x1,%eax
sub    %ecx,%eax
mov    %eax,%esi
add    $0xffffffff,%ebp
imul   %r15d,%ebp
add    %ebp,%r12d
add    $0x1,%r14
cmp    %r14,0x28(%rsp)
je     13ad <drftb1+0x26d>
mov    %r13d,%ebx
mov    0x30(%rsp),%rax
mov    0x8(%rax,%r14,4),%ebp
mov    %ebp,%r13d
imul   %ebx,%r13d
mov    0x24(%rsp),%eax
cltd
idiv   %r13d
mov    %eax,%r15d
cmp    $0x2,%ebp
mov    %esi,0x4(%rsp)
je     12a0 <drftb1+0x160>
cmp    $0x3,%ebp
je     1270 <drftb1+0x130>
cmp    $0x4,%ebp
jne    12d0 <drftb1+0x190>
lea    (%r15,%r12,1),%ecx
lea    (%rcx,%r15,1),%eax
movslq %r12d,%rdx
test   %esi,%esi
je     1194 <drftb1+0x54>
mov    0x8(%rsp),%rsi
lea    (%rsi,%rdx,8),%r8
movslq %ecx,%rcx
lea    (%rsi,%rcx,8),%r9
cltq
lea    (%rsi,%rax,8),%rax
sub    $0x8,%rsp
mov    %r15d,%edi
mov    %ebx,%esi
mov    %r10,%rdx
mov    %r11,%rcx
jmp    11b9 <drftb1+0x79>
nopw   0x0(%rax,%rax,1)
lea    (%r15,%r12,1),%eax
movslq %r12d,%rcx
cltq
test   %esi,%esi
je     1303 <drftb1+0x1c3>
mov    0x8(%rsp),%rdx
lea    (%rdx,%rcx,8),%r8
lea    (%rdx,%rax,8),%r9
mov    %r15d,%edi
mov    %ebx,%esi
mov    %r10,%rdx
mov    %r11,%rcx
jmp    131b <drftb1+0x1db>
xchg   %ax,%ax
movslq %r12d,%rax
test   %esi,%esi
je     133a <drftb1+0x1fa>
mov    0x8(%rsp),%rcx
lea    (%rcx,%rax,8),%r8
mov    %r15d,%edi
mov    %ebx,%esi
mov    %r10,%rdx
mov    %r11,%rcx
jmp    134e <drftb1+0x20e>
cs nopw 0x0(%rax,%rax,1)
xchg   %ax,%ax
mov    %r15d,%ecx
imul   %ebx,%ecx
movslq %r12d,%rax
test   %esi,%esi
je     1366 <drftb1+0x226>
mov    0x8(%rsp),%rdx
lea    (%rdx,%rax,8),%rax
mov    %r15d,%edi
mov    %ebp,%esi
mov    %ebx,%edx
mov    %r10,%r8
mov    %r10,%r9
push   %rax
push   %r11
push   %r11
push   %r10
jmp    1383 <drftb1+0x243>
mov    0x8(%rsp),%rdx
lea    (%rdx,%rcx,8),%r8
lea    (%rdx,%rax,8),%r9
mov    %r15d,%edi
mov    %ebx,%esi
mov    %r11,%rdx
mov    %r10,%rcx
call   1040 <dradb3@plt>
mov    $0x1,%eax
sub    0x4(%rsp),%eax
mov    %eax,%esi
mov    0x18(%rsp),%r10
mov    0x10(%rsp),%r11
jmp    11da <drftb1+0x9a>
mov    0x8(%rsp),%rcx
lea    (%rcx,%rax,8),%r8
mov    %r15d,%edi
mov    %ebx,%esi
mov    %r11,%rdx
mov    %r10,%rcx
call   1060 <dradb2@plt>
mov    0x4(%rsp),%ecx
mov    0x10(%rsp),%r11
mov    0x18(%rsp),%r10
jmp    11d1 <drftb1+0x91>
mov    0x8(%rsp),%rdx
lea    (%rdx,%rax,8),%rax
mov    %r15d,%edi
mov    %ebp,%esi
mov    %ebx,%edx
mov    %r11,%r8
mov    %r11,%r9
push   %rax
push   %r10
push   %r10
push   %r11
call   1030 <dradbg@plt>
mov    0x24(%rsp),%esi
mov    0x30(%rsp),%r11
mov    0x38(%rsp),%r10
add    $0x20,%rsp
mov    $0x1,%eax
sub    %esi,%eax
cmp    $0x1,%r15d
cmove  %eax,%esi
jmp    11da <drftb1+0x9a>
test   %esi,%esi
je     1544 <drftb1+0x404>
cmpl   $0x0,0x24(%rsp)
jle    1544 <drftb1+0x404>
mov    0x24(%rsp),%ecx
mov    %ecx,%eax
cmp    $0x4,%ecx
jb     13e5 <drftb1+0x2a5>
lea    (%r10,%rax,8),%rcx
cmp    %r11,%rcx
jbe    1464 <drftb1+0x324>
lea    (%r11,%rax,8),%rcx
cmp    %r10,%rcx
jbe    1464 <drftb1+0x324>
xor    %ecx,%ecx
mov    %rcx,%rdx
not    %rdx
add    %rax,%rdx
mov    %rax,%rsi
and    $0x3,%rsi
je     1416 <drftb1+0x2d6>
nopl   0x0(%rax)
movsd  (%r10,%rcx,8),%xmm0
movsd  %xmm0,(%r11,%rcx,8)
add    $0x1,%rcx
add    $0xffffffffffffffff,%rsi
jne    1400 <drftb1+0x2c0>
cmp    $0x3,%rdx
jb     1544 <drftb1+0x404>
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    1420 <drftb1+0x2e0>
jmp    1544 <drftb1+0x404>
mov    %eax,%ecx
and    $0xfffffffc,%ecx
lea    -0x4(%rcx),%rdi
mov    %rdi,%rsi
shr    $0x2,%rsi
add    $0x1,%rsi
mov    %esi,%edx
and    $0x3,%edx
cmp    $0xc,%rdi
jae    1487 <drftb1+0x347>
xor    %edi,%edi
jmp    14f8 <drftb1+0x3b8>
and    $0xfffffffffffffffc,%rsi
xor    %edi,%edi
nopl   (%rax)
movups (%r10,%rdi,8),%xmm0
movups 0x10(%r10,%rdi,8),%xmm1
movups %xmm0,(%r11,%rdi,8)
movups %xmm1,0x10(%r11,%rdi,8)
movups 0x20(%r10,%rdi,8),%xmm0
movups 0x30(%r10,%rdi,8),%xmm1
movups %xmm0,0x20(%r11,%rdi,8)
movups %xmm1,0x30(%r11,%rdi,8)
movups 0x40(%r10,%rdi,8),%xmm0
movups 0x50(%r10,%rdi,8),%xmm1
movups %xmm0,0x40(%r11,%rdi,8)
movups %xmm1,0x50(%r11,%rdi,8)
movups 0x60(%r10,%rdi,8),%xmm0
movups 0x70(%r10,%rdi,8),%xmm1
movups %xmm0,0x60(%r11,%rdi,8)
movups %xmm1,0x70(%r11,%rdi,8)
add    $0x10,%rdi
add    $0xfffffffffffffffc,%rsi
jne    1490 <drftb1+0x350>
test   %rdx,%rdx
je     153b <drftb1+0x3fb>
lea    (%r11,%rdi,8),%rsi
add    $0x10,%rsi
lea    (%r10,%rdi,8),%rdi
add    $0x10,%rdi
shl    $0x5,%rdx
xor    %ebp,%ebp
cs nopw 0x0(%rax,%rax,1)
nopl   (%rax)
movups -0x10(%rdi,%rbp,1),%xmm0
movups (%rdi,%rbp,1),%xmm1
movups %xmm0,-0x10(%rsi,%rbp,1)
movups %xmm1,(%rsi,%rbp,1)
add    $0x20,%rbp
cmp    %rbp,%rdx
jne    1520 <drftb1+0x3e0>
cmp    %rax,%rcx
jne    13e7 <drftb1+0x2a7>
add    $0x38,%rsp
pop    %rbx
pop    %r12
pop    %r13
pop    %r14
pop    %r15
pop    %rbp
ret

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

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