#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 */
double atan2(double, double);
int /*<<< orphan*/ free(double *);
scalar_t__ malloc(int);
int /*<<< orphan*/ realtr(double *, double *, long, int);
int /*<<< orphan*/ sing(double *, double *, long, int);
double sqrt(double);
void dft(double *data, long count, double *ampl, double *phase) {
  double *realpt, *imagpt;
  double norm;
  long halfcount, i, j;
  if (count % 2 == 0) {
    halfcount = count / 2;
    realpt = (double *)malloc(2 * (halfcount + 1) * sizeof(double));
    imagpt = (double *)(realpt + (halfcount + 1));
    for (i = 0, j = 0; i < halfcount; i++) {
      realpt[i] = data[j++];
      imagpt[i] = data[j++];
    }
    realpt[halfcount] = imagpt[halfcount] = 0.0;
    sing(realpt, imagpt, halfcount, -1);
    realtr(realpt, imagpt, halfcount, -1);
    norm = 2.0 * count;
    for (i = 1; i < halfcount; i++) {
      if (ampl)
        ampl[i] = sqrt(realpt[i] * realpt[i] + imagpt[i] * imagpt[i]) / norm;
      if (phase)
        phase[i] = -atan2(imagpt[i], realpt[i]);
    }
    if (ampl) {
      ampl[0] = realpt[0] / norm;
      ampl[halfcount] = realpt[halfcount] / norm;
    }
    if (phase) {
      phase[0] = 0.0;
      phase[halfcount] = 0.0;
    }
    free(realpt);
  } else {
    halfcount = count / 2;
    realpt = (double *)malloc(2 * (count + 1) * sizeof(double));
    imagpt = (double *)(realpt + (count + 1));
    for (i = 0; i < count; i++) {
      realpt[i] = data[i];
      imagpt[i] = 0.0;
    }
    sing(realpt, imagpt, count, -1);
    norm = count;
    for (i = 1; i <= halfcount; i++) {
      if (ampl)
        ampl[i] = sqrt(realpt[i] * realpt[i] + imagpt[i] * imagpt[i]) / norm;
      if (phase)
        phase[i] = -atan2(imagpt[i], realpt[i]);
    }
    if (ampl)
      ampl[0] = realpt[0] / norm;
    if (phase)
      phase[0] = 0.0;
    free(realpt);
  }
}


x86 assembly (clang, -O0):
<dft>:
push   %rbp
mov    %rsp,%rbp
sub    $0x50,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %rdx,-0x18(%rbp)
mov    %rcx,-0x20(%rbp)
mov    -0x10(%rbp),%rax
mov    $0x2,%ecx
cqto
idiv   %rcx
cmp    $0x0,%rdx
jne    13fb <dft+0x29b>
mov    -0x10(%rbp),%rax
mov    $0x2,%ecx
cqto
idiv   %rcx
mov    %rax,-0x40(%rbp)
mov    -0x40(%rbp),%rax
add    $0x1,%rax
shl    $0x1,%rax
shl    $0x3,%rax
mov    %eax,%edi
call   1050 <malloc@plt>
mov    %rax,-0x28(%rbp)
mov    -0x28(%rbp),%rax
mov    -0x40(%rbp),%rcx
add    $0x1,%rcx
shl    $0x3,%rcx
add    %rcx,%rax
mov    %rax,-0x30(%rbp)
movq   $0x0,-0x48(%rbp)
movq   $0x0,-0x50(%rbp)
mov    -0x48(%rbp),%rax
cmp    -0x40(%rbp),%rax
jge    124d <dft+0xed>
mov    -0x8(%rbp),%rax
mov    -0x50(%rbp),%rcx
mov    %rcx,%rdx
add    $0x1,%rdx
mov    %rdx,-0x50(%rbp)
movsd  (%rax,%rcx,8),%xmm0
mov    -0x28(%rbp),%rax
mov    -0x48(%rbp),%rcx
movsd  %xmm0,(%rax,%rcx,8)
mov    -0x8(%rbp),%rax
mov    -0x50(%rbp),%rcx
mov    %rcx,%rdx
add    $0x1,%rdx
mov    %rdx,-0x50(%rbp)
movsd  (%rax,%rcx,8),%xmm0
mov    -0x30(%rbp),%rax
mov    -0x48(%rbp),%rcx
movsd  %xmm0,(%rax,%rcx,8)
mov    -0x48(%rbp),%rax
add    $0x1,%rax
mov    %rax,-0x48(%rbp)
jmp    11e4 <dft+0x84>
mov    -0x30(%rbp),%rax
mov    -0x40(%rbp),%rcx
xorps  %xmm0,%xmm0
movsd  %xmm0,(%rax,%rcx,8)
mov    -0x28(%rbp),%rax
mov    -0x40(%rbp),%rcx
xorps  %xmm0,%xmm0
movsd  %xmm0,(%rax,%rcx,8)
mov    -0x28(%rbp),%rdi
mov    -0x30(%rbp),%rsi
mov    -0x40(%rbp),%rdx
mov    $0xffffffff,%ecx
call   1060 <sing@plt>
mov    -0x28(%rbp),%rdi
mov    -0x30(%rbp),%rsi
mov    -0x40(%rbp),%rdx
mov    $0xffffffff,%ecx
call   1070 <realtr@plt>
cvtsi2sdq -0x10(%rbp),%xmm1
movsd  0xd59(%rip),%xmm0
mulsd  %xmm1,%xmm0
movsd  %xmm0,-0x38(%rbp)
movq   $0x1,-0x48(%rbp)
mov    -0x48(%rbp),%rax
cmp    -0x40(%rbp),%rax
jge    1388 <dft+0x228>
cmpq   $0x0,-0x18(%rbp)
je     1324 <dft+0x1c4>
mov    -0x28(%rbp),%rax
mov    -0x48(%rbp),%rcx
movsd  (%rax,%rcx,8),%xmm0
mov    -0x28(%rbp),%rax
mov    -0x48(%rbp),%rcx
movsd  (%rax,%rcx,8),%xmm2
mov    -0x30(%rbp),%rax
mov    -0x48(%rbp),%rcx
movsd  (%rax,%rcx,8),%xmm1
mov    -0x30(%rbp),%rax
mov    -0x48(%rbp),%rcx
mulsd  (%rax,%rcx,8),%xmm1
mulsd  %xmm2,%xmm0
addsd  %xmm1,%xmm0
call   1080 <sqrt@plt>
divsd  -0x38(%rbp),%xmm0
mov    -0x18(%rbp),%rax
mov    -0x48(%rbp),%rcx
movsd  %xmm0,(%rax,%rcx,8)
cmpq   $0x0,-0x20(%rbp)
je     1372 <dft+0x212>
mov    -0x30(%rbp),%rax
mov    -0x48(%rbp),%rcx
movsd  (%rax,%rcx,8),%xmm0
mov    -0x28(%rbp),%rax
mov    -0x48(%rbp),%rcx
movsd  (%rax,%rcx,8),%xmm1
call   1040 <atan2@plt>
movq   %xmm0,%rax
movabs $0x8000000000000000,%rcx
xor    %rcx,%rax
movq   %rax,%xmm0
mov    -0x20(%rbp),%rax
mov    -0x48(%rbp),%rcx
movsd  %xmm0,(%rax,%rcx,8)
jmp    1377 <dft+0x217>
mov    -0x48(%rbp),%rax
add    $0x1,%rax
mov    %rax,-0x48(%rbp)
jmp    12b8 <dft+0x158>
cmpq   $0x0,-0x18(%rbp)
je     13c7 <dft+0x267>
mov    -0x28(%rbp),%rax
movsd  (%rax),%xmm0
divsd  -0x38(%rbp),%xmm0
mov    -0x18(%rbp),%rax
movsd  %xmm0,(%rax)
mov    -0x28(%rbp),%rax
mov    -0x40(%rbp),%rcx
movsd  (%rax,%rcx,8),%xmm0
divsd  -0x38(%rbp),%xmm0
mov    -0x18(%rbp),%rax
mov    -0x40(%rbp),%rcx
movsd  %xmm0,(%rax,%rcx,8)
cmpq   $0x0,-0x20(%rbp)
je     13ed <dft+0x28d>
mov    -0x20(%rbp),%rax
xorps  %xmm0,%xmm0
movsd  %xmm0,(%rax)
mov    -0x20(%rbp),%rax
mov    -0x40(%rbp),%rcx
xorps  %xmm0,%xmm0
movsd  %xmm0,(%rax,%rcx,8)
mov    -0x28(%rbp),%rdi
call   1030 <free@plt>
jmp    15c8 <dft+0x468>
mov    -0x10(%rbp),%rax
mov    $0x2,%ecx
cqto
idiv   %rcx
mov    %rax,-0x40(%rbp)
mov    -0x10(%rbp),%rax
add    $0x1,%rax
shl    $0x1,%rax
shl    $0x3,%rax
mov    %eax,%edi
call   1050 <malloc@plt>
mov    %rax,-0x28(%rbp)
mov    -0x28(%rbp),%rax
mov    -0x10(%rbp),%rcx
add    $0x1,%rcx
shl    $0x3,%rcx
add    %rcx,%rax
mov    %rax,-0x30(%rbp)
movq   $0x0,-0x48(%rbp)
mov    -0x48(%rbp),%rax
cmp    -0x10(%rbp),%rax
jge    1490 <dft+0x330>
mov    -0x8(%rbp),%rax
mov    -0x48(%rbp),%rcx
movsd  (%rax,%rcx,8),%xmm0
mov    -0x28(%rbp),%rax
mov    -0x48(%rbp),%rcx
movsd  %xmm0,(%rax,%rcx,8)
mov    -0x30(%rbp),%rax
mov    -0x48(%rbp),%rcx
xorps  %xmm0,%xmm0
movsd  %xmm0,(%rax,%rcx,8)
mov    -0x48(%rbp),%rax
add    $0x1,%rax
mov    %rax,-0x48(%rbp)
jmp    1447 <dft+0x2e7>
mov    -0x28(%rbp),%rdi
mov    -0x30(%rbp),%rsi
mov    -0x10(%rbp),%rdx
mov    $0xffffffff,%ecx
call   1060 <sing@plt>
cvtsi2sdq -0x10(%rbp),%xmm0
movsd  %xmm0,-0x38(%rbp)
movq   $0x1,-0x48(%rbp)
mov    -0x48(%rbp),%rax
cmp    -0x40(%rbp),%rax
jg     1589 <dft+0x429>
cmpq   $0x0,-0x18(%rbp)
je     1525 <dft+0x3c5>
mov    -0x28(%rbp),%rax
mov    -0x48(%rbp),%rcx
movsd  (%rax,%rcx,8),%xmm0
mov    -0x28(%rbp),%rax
mov    -0x48(%rbp),%rcx
movsd  (%rax,%rcx,8),%xmm2
mov    -0x30(%rbp),%rax
mov    -0x48(%rbp),%rcx
movsd  (%rax,%rcx,8),%xmm1
mov    -0x30(%rbp),%rax
mov    -0x48(%rbp),%rcx
mulsd  (%rax,%rcx,8),%xmm1
mulsd  %xmm2,%xmm0
addsd  %xmm1,%xmm0
call   1080 <sqrt@plt>
divsd  -0x38(%rbp),%xmm0
mov    -0x18(%rbp),%rax
mov    -0x48(%rbp),%rcx
movsd  %xmm0,(%rax,%rcx,8)
cmpq   $0x0,-0x20(%rbp)
je     1573 <dft+0x413>
mov    -0x30(%rbp),%rax
mov    -0x48(%rbp),%rcx
movsd  (%rax,%rcx,8),%xmm0
mov    -0x28(%rbp),%rax
mov    -0x48(%rbp),%rcx
movsd  (%rax,%rcx,8),%xmm1
call   1040 <atan2@plt>
movq   %xmm0,%rax
movabs $0x8000000000000000,%rcx
xor    %rcx,%rax
movq   %rax,%xmm0
mov    -0x20(%rbp),%rax
mov    -0x48(%rbp),%rcx
movsd  %xmm0,(%rax,%rcx,8)
jmp    1578 <dft+0x418>
mov    -0x48(%rbp),%rax
add    $0x1,%rax
mov    %rax,-0x48(%rbp)
jmp    14b9 <dft+0x359>
cmpq   $0x0,-0x18(%rbp)
je     15a9 <dft+0x449>
mov    -0x28(%rbp),%rax
movsd  (%rax),%xmm0
divsd  -0x38(%rbp),%xmm0
mov    -0x18(%rbp),%rax
movsd  %xmm0,(%rax)
cmpq   $0x0,-0x20(%rbp)
je     15bf <dft+0x45f>
mov    -0x20(%rbp),%rax
xorps  %xmm0,%xmm0
movsd  %xmm0,(%rax)
mov    -0x28(%rbp),%rdi
call   1030 <free@plt>
add    $0x50,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<dft>:
push   %rbp
push   %r15
push   %r14
push   %r13
push   %r12
push   %rbx
sub    $0x18,%rsp
mov    %rcx,%r14
mov    %rdx,%r15
mov    %rsi,%rbp
mov    %rdi,%r13
mov    %rsi,%rbx
shr    $0x3f,%rbx
add    %rsi,%rbx
sar    %rbx
test   $0x1,%bpl
mov    %rbx,(%rsp)
jne    129c <dft+0x13c>
lea    0x1(%rbx),%rdi
shl    $0x4,%edi
call   1050 <malloc@plt>
mov    %rax,%r12
lea    (%rax,%rbx,8),%rsi
add    $0x8,%rsi
mov    %rbp,0x10(%rsp)
cmp    $0x2,%rbp
jl     16ea <dft+0x58a>
mov    (%rsp),%rdx
cmp    $0x4,%rdx
jae    1579 <dft+0x419>
xor    %r8d,%r8d
xor    %eax,%eax
mov    %rax,%rdx
or     $0x1,%rdx
testb  $0x1,(%rsp)
je     1207 <dft+0xa7>
lea    0x0(,%r8,8),%rcx
movsd  0x0(%r13,%r8,8),%xmm0
movsd  %xmm0,(%r12,%rax,8)
add    $0x2,%r8
or     $0x8,%rcx
movsd  0x0(%r13,%rcx,1),%xmm0
movsd  %xmm0,(%rsi,%rax,8)
mov    %rdx,%rax
cmp    %rdx,(%rsp)
je     16ea <dft+0x58a>
lea    0x10(,%r8,8),%r9
add    %r13,%r9
mov    (%rsp),%rcx
mov    %rcx,%rdx
sub    %rax,%rdx
lea    (%rax,%rcx,1),%rdi
lea    (%r12,%rdi,8),%rdi
add    $0x10,%rdi
lea    (%r12,%rax,8),%rax
add    $0x8,%rax
xor    %ebx,%ebx
nopl   0x0(%rax)
lea    (%r8,%rbx,1),%rcx
movsd  -0x10(%r9,%rbx,8),%xmm0
movsd  %xmm0,-0x8(%rax,%rbx,4)
lea    0x0(,%rcx,8),%rbp
or     $0x8,%rbp
movsd  0x0(%r13,%rbp,1),%xmm0
movsd  %xmm0,-0x8(%rdi,%rbx,4)
lea    0x10(,%rcx,8),%rcx
movsd  (%r9,%rbx,8),%xmm0
movsd  %xmm0,(%rax,%rbx,4)
or     $0x8,%rcx
movsd  0x0(%r13,%rcx,1),%xmm0
movsd  %xmm0,(%rdi,%rbx,4)
add    $0x4,%rbx
add    $0xfffffffffffffffe,%rdx
jne    1240 <dft+0xe0>
jmp    16ea <dft+0x58a>
lea    0x1(%rbp),%rdi
shl    $0x4,%edi
call   1050 <malloc@plt>
mov    %rax,%r12
lea    (%rax,%rbp,8),%rsi
add    $0x8,%rsi
test   %rbp,%rbp
jle    12c5 <dft+0x165>
cmp    $0x4,%rbp
jae    12e5 <dft+0x185>
xor    %eax,%eax
jmp    13f1 <dft+0x291>
mov    %r12,%rdi
mov    %rbp,%rdx
mov    $0xffffffff,%ecx
call   1060 <sing@plt>
cvtsi2sd %rbp,%xmm0
movsd  %xmm0,0x8(%rsp)
jmp    14c7 <dft+0x367>
mov    %rbp,%rax
shl    $0x4,%rax
add    %r12,%rax
add    $0x8,%rax
lea    0x0(,%rbp,8),%rcx
add    %r13,%rcx
cmp    %rcx,%rsi
setb   %bl
cmp    %r13,%rax
seta   %dl
lea    (%r12,%rbp,8),%rax
cmp    %rcx,%r12
setb   %cl
cmp    %r13,%rax
seta   %dil
xor    %eax,%eax
test   %dl,%bl
jne    13f1 <dft+0x291>
and    %dil,%cl
jne    13f1 <dft+0x291>
mov    %rbp,%rax
and    $0xfffffffffffffffc,%rax
lea    -0x4(%rax),%rdx
mov    %rdx,%rcx
shr    $0x2,%rcx
add    $0x1,%rcx
test   %rdx,%rdx
je     184d <dft+0x6ed>
mov    %rcx,%rdi
and    $0xfffffffffffffffe,%rdi
lea    (%r12,%rbp,8),%rbx
add    $0x38,%rbx
xor    %edx,%edx
xorps  %xmm0,%xmm0
cs nopw 0x0(%rax,%rax,1)
nopl   0x0(%rax,%rax,1)
movups 0x0(%r13,%rdx,8),%xmm1
movups 0x10(%r13,%rdx,8),%xmm2
movups %xmm1,(%r12,%rdx,8)
movups %xmm2,0x10(%r12,%rdx,8)
movups %xmm0,-0x30(%rbx,%rdx,8)
movups %xmm0,-0x20(%rbx,%rdx,8)
movupd 0x20(%r13,%rdx,8),%xmm1
movups 0x30(%r13,%rdx,8),%xmm2
movupd %xmm1,0x20(%r12,%rdx,8)
movups %xmm2,0x30(%r12,%rdx,8)
movups %xmm0,-0x10(%rbx,%rdx,8)
movups %xmm0,(%rbx,%rdx,8)
add    $0x8,%rdx
add    $0xfffffffffffffffe,%rdi
jne    1370 <dft+0x210>
test   $0x1,%cl
je     13e8 <dft+0x288>
movups 0x0(%r13,%rdx,8),%xmm0
movupd 0x10(%r13,%rdx,8),%xmm1
movups %xmm0,(%r12,%rdx,8)
movupd %xmm1,0x10(%r12,%rdx,8)
xorps  %xmm0,%xmm0
movups %xmm0,(%rsi,%rdx,8)
movups %xmm0,0x10(%rsi,%rdx,8)
cmp    %rbp,%rax
je     14a3 <dft+0x343>
mov    %rax,%rcx
not    %rcx
add    %rbp,%rcx
mov    %rbp,%rdx
and    $0x3,%rdx
je     142f <dft+0x2cf>
cs nopw 0x0(%rax,%rax,1)
nopl   (%rax)
movsd  0x0(%r13,%rax,8),%xmm0
movsd  %xmm0,(%r12,%rax,8)
movq   $0x0,(%rsi,%rax,8)
add    $0x1,%rax
add    $0xffffffffffffffff,%rdx
jne    1410 <dft+0x2b0>
cmp    $0x3,%rcx
jb     14a3 <dft+0x343>
lea    (%r12,%rbp,8),%rcx
add    $0x20,%rcx
nopl   (%rax)
movsd  0x0(%r13,%rax,8),%xmm0
movsd  %xmm0,(%r12,%rax,8)
movq   $0x0,-0x18(%rcx,%rax,8)
movsd  0x8(%r13,%rax,8),%xmm0
movsd  %xmm0,0x8(%r12,%rax,8)
movq   $0x0,-0x10(%rcx,%rax,8)
movsd  0x10(%r13,%rax,8),%xmm0
movsd  %xmm0,0x10(%r12,%rax,8)
movq   $0x0,-0x8(%rcx,%rax,8)
movsd  0x18(%r13,%rax,8),%xmm0
movsd  %xmm0,0x18(%r12,%rax,8)
movq   $0x0,(%rcx,%rax,8)
add    $0x4,%rax
cmp    %rax,%rbp
jne    1440 <dft+0x2e0>
mov    %r12,%rdi
mov    %rbp,%rdx
mov    $0xffffffff,%ecx
call   1060 <sing@plt>
xorps  %xmm0,%xmm0
cvtsi2sd %rbp,%xmm0
movsd  %xmm0,0x8(%rsp)
cmp    $0x2,%rbp
jge    14eb <dft+0x38b>
test   %r15,%r15
je     14dd <dft+0x37d>
movsd  (%r12),%xmm0
divsd  0x8(%rsp),%xmm0
movsd  %xmm0,(%r15)
test   %r14,%r14
jne    1827 <dft+0x6c7>
jmp    182e <dft+0x6ce>
lea    (%r12,%rbp,8),%rbx
add    $0x10,%rbx
xor    %ebp,%ebp
mov    (%rsp),%r13
jmp    1509 <dft+0x3a9>
nopl   0x0(%rax,%rax,1)
add    $0x1,%rbp
cmp    %rbp,%r13
je     14c7 <dft+0x367>
test   %r15,%r15
je     1552 <dft+0x3f2>
movsd  0x8(%r12,%rbp,8),%xmm0
movsd  (%rbx,%rbp,8),%xmm1
mulsd  %xmm1,%xmm1
mulsd  %xmm0,%xmm0
addsd  %xmm1,%xmm0
ucomisd 0xae2(%rip),%xmm0
jb     1540 <dft+0x3e0>
sqrtsd %xmm0,%xmm0
jmp    1545 <dft+0x3e5>
cs nopw 0x0(%rax,%rax,1)
call   1080 <sqrt@plt>
divsd  0x8(%rsp),%xmm0
movsd  %xmm0,0x8(%r15,%rbp,8)
test   %r14,%r14
je     1500 <dft+0x3a0>
movsd  (%rbx,%rbp,8),%xmm0
movsd  0x8(%r12,%rbp,8),%xmm1
call   1040 <atan2@plt>
xorpd  0xa90(%rip),%xmm0
movlpd %xmm0,0x8(%r14,%rbp,8)
jmp    1500 <dft+0x3a0>
mov    %rdx,%rax
shl    $0x4,%rax
lea    (%r12,%rax,1),%rcx
add    $0x8,%rcx
add    %r13,%rax
cmp    %rax,%rsi
setb   %dil
cmp    %r13,%rcx
seta   %bl
lea    (%r12,%rdx,8),%rcx
cmp    %rax,%r12
setb   %dl
cmp    %r13,%rcx
seta   %cl
xor    %r8d,%r8d
test   %bl,%dil
jne    11cc <dft+0x6c>
mov    $0x0,%eax
and    %cl,%dl
jne    11ce <dft+0x6e>
mov    (%rsp),%rbx
mov    %rbx,%rax
and    $0xfffffffffffffffc,%rax
lea    -0x4(%rax),%rcx
mov    %rcx,%rbp
shr    $0x2,%rbp
add    $0x1,%rbp
test   %rcx,%rcx
je     185d <dft+0x6fd>
mov    %rbp,%rdx
and    $0xfffffffffffffffe,%rdx
lea    0x60(%r13),%rdi
lea    (%r12,%rbx,8),%rbx
add    $0x38,%rbx
xor    %ecx,%ecx
nopl   0x0(%rax)
movups -0x60(%rdi),%xmm0
movups -0x50(%rdi),%xmm1
movups -0x40(%rdi),%xmm2
movups -0x30(%rdi),%xmm3
movaps %xmm0,%xmm4
movlhps %xmm1,%xmm4
movaps %xmm2,%xmm5
movlhps %xmm3,%xmm5
unpckhpd %xmm1,%xmm0
unpckhpd %xmm3,%xmm2
movups %xmm4,(%r12,%rcx,8)
movups %xmm5,0x10(%r12,%rcx,8)
movups %xmm0,-0x30(%rbx,%rcx,8)
movups %xmm2,-0x20(%rbx,%rcx,8)
movupd -0x20(%rdi),%xmm0
movupd -0x10(%rdi),%xmm1
movups (%rdi),%xmm2
movups 0x10(%rdi),%xmm3
movapd %xmm0,%xmm4
unpcklpd %xmm1,%xmm4
movaps %xmm2,%xmm5
movlhps %xmm3,%xmm5
unpckhpd %xmm1,%xmm0
unpckhpd %xmm3,%xmm2
movupd %xmm4,0x20(%r12,%rcx,8)
movups %xmm5,0x30(%r12,%rcx,8)
movupd %xmm0,-0x10(%rbx,%rcx,8)
movups %xmm2,(%rbx,%rcx,8)
add    $0x8,%rcx
sub    $0xffffffffffffff80,%rdi
add    $0xfffffffffffffffe,%rdx
jne    1600 <dft+0x4a0>
test   $0x1,%bpl
je     16e0 <dft+0x580>
mov    %rcx,%rdx
shl    $0x4,%rdx
movupd 0x0(%r13,%rdx,1),%xmm0
movupd 0x10(%r13,%rdx,1),%xmm1
or     $0x20,%rdx
movups 0x0(%r13,%rdx,1),%xmm2
movups 0x10(%r13,%rdx,1),%xmm3
movapd %xmm0,%xmm4
unpcklpd %xmm1,%xmm4
movaps %xmm2,%xmm5
movlhps %xmm3,%xmm5
unpckhpd %xmm1,%xmm0
unpckhpd %xmm3,%xmm2
movupd %xmm4,(%r12,%rcx,8)
movups %xmm5,0x10(%r12,%rcx,8)
movupd %xmm0,(%rsi,%rcx,8)
movups %xmm2,0x10(%rsi,%rcx,8)
cmp    %rax,(%rsp)
jne    1844 <dft+0x6e4>
mov    (%rsp),%rbx
movq   $0x0,(%rsi,%rbx,8)
movq   $0x0,(%r12,%rbx,8)
mov    %r12,%rdi
mov    %rbx,%rdx
mov    $0xffffffff,%ecx
mov    %rsi,%rbp
call   1060 <sing@plt>
mov    %r12,%rdi
mov    %rbp,%rsi
mov    %rbx,%rdx
mov    $0xffffffff,%ecx
call   1070 <realtr@plt>
mov    0x10(%rsp),%rax
xorps  %xmm0,%xmm0
cvtsi2sd %rax,%xmm0
addsd  %xmm0,%xmm0
movsd  %xmm0,0x8(%rsp)
cmp    $0x4,%rax
jl     17e9 <dft+0x689>
mov    (%rsp),%rax
cmp    $0x3,%rax
mov    $0x2,%r13d
cmovge %rax,%r13
add    $0xffffffffffffffff,%r13
lea    (%r12,%rax,8),%rbx
add    $0x10,%rbx
xor    %ebp,%ebp
jmp    1779 <dft+0x619>
nopw   0x0(%rax,%rax,1)
add    $0x1,%rbp
cmp    %rbp,%r13
je     17e9 <dft+0x689>
test   %r15,%r15
je     17c2 <dft+0x662>
movsd  0x8(%r12,%rbp,8),%xmm0
movsd  (%rbx,%rbp,8),%xmm1
mulsd  %xmm1,%xmm1
mulsd  %xmm0,%xmm0
addsd  %xmm1,%xmm0
ucomisd 0x872(%rip),%xmm0
jb     17b0 <dft+0x650>
sqrtsd %xmm0,%xmm0
jmp    17b5 <dft+0x655>
cs nopw 0x0(%rax,%rax,1)
call   1080 <sqrt@plt>
divsd  0x8(%rsp),%xmm0
movsd  %xmm0,0x8(%r15,%rbp,8)
test   %r14,%r14
je     1770 <dft+0x610>
movsd  (%rbx,%rbp,8),%xmm0
movsd  0x8(%r12,%rbp,8),%xmm1
call   1040 <atan2@plt>
xorpd  0x820(%rip),%xmm0
movlpd %xmm0,0x8(%r14,%rbp,8)
jmp    1770 <dft+0x610>
test   %r15,%r15
mov    (%rsp),%rax
je     1817 <dft+0x6b7>
movsd  (%r12),%xmm0
movsd  0x8(%rsp),%xmm1
divsd  %xmm1,%xmm0
movsd  %xmm0,(%r15)
movsd  (%r12,%rax,8),%xmm0
divsd  %xmm1,%xmm0
movsd  %xmm0,(%r15,%rax,8)
test   %r14,%r14
je     182e <dft+0x6ce>
movq   $0x0,(%r14)
lea    (%r14,%rax,8),%r14
movq   $0x0,(%r14)
mov    %r12,%rdi
add    $0x18,%rsp
pop    %rbx
pop    %r12
pop    %r13
pop    %r14
pop    %r15
pop    %rbp
jmp    1030 <free@plt>
lea    (%rax,%rax,1),%r8
jmp    11ce <dft+0x6e>
xor    %edx,%edx
test   $0x1,%cl
jne    13c3 <dft+0x263>
jmp    13e8 <dft+0x288>
xor    %ecx,%ecx
test   $0x1,%bpl
jne    168f <dft+0x52f>
jmp    16e0 <dft+0x580>

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

LLVM IR (-O2):
define void @dft(double* nocapture %0, i64 %1, double* writeonly %2, double* writeonly %3) {
%5 = and i64 %1, 1
%6 = icmp eq i64 %5, 0
%7 = sdiv i64 %1, 2
br i1 %6, label %8, label %206
8: ; preds = %4
%9 = add nsw i64 %7, 1
%10 = trunc i64 %9 to i32
%11 = shl i32 %10, 4
%12 = tail call i64 @malloc(i32 %11)
%13 = inttoptr i64 %12 to double*
%14 = inttoptr i64 %12 to i8*
%15 = getelementptr double, double* %13, i64 %9
%16 = icmp sgt i64 %1, 1
br i1 %16, label %17, label %158
17: ; preds = %8
%18 = icmp ult i64 %7, 4
br i1 %18, label %116, label %19
19: ; preds = %17
%20 = shl nsw i64 %7, 1
%21 = or i64 %20, 1
%22 = getelementptr double, double* %13, i64 %21
%23 = getelementptr double, double* %0, i64 %20
%24 = bitcast double* %23 to i8*
%25 = getelementptr double, double* %13, i64 %7
%26 = icmp ult double* %15, %23
%27 = icmp ugt double* %22, %0
%28 = and i1 %26, %27
%29 = icmp ult i8* %14, %24
%30 = icmp ugt double* %25, %0
%31 = and i1 %29, %30
%32 = or i1 %28, %31
br i1 %32, label %116, label %33
33: ; preds = %19
%34 = and i64 %7, -4
%35 = shl nsw i64 %34, 1
%36 = add nsw i64 %34, -4
%37 = lshr exact i64 %36, 2
%38 = add nuw nsw i64 %37, 1
%39 = and i64 %38, 1
%40 = icmp eq i64 %36, 0
br i1 %40, label %90, label %41
41: ; preds = %33
%42 = and i64 %38, 9223372036854775806
br label %43
43: ; preds = %43, %41
%44 = phi i64 [ 0, %41 ], [ %87, %43 ]
%45 = phi i64 [ 0, %41 ], [ %88, %43 ]
%46 = shl i64 %44, 1
%47 = or i64 %46, 4
%48 = getelementptr inbounds double, double* %0, i64 %46
%49 = getelementptr inbounds double, double* %0, i64 %47
%50 = bitcast double* %48 to <4 x double>*
%51 = bitcast double* %49 to <4 x double>*
%52 = load <4 x double>, <4 x double>* %50
%53 = load <4 x double>, <4 x double>* %51
%54 = shufflevector <4 x double> %52, <4 x double> poison, <2 x i32> <i32 0, i32 2>
%55 = shufflevector <4 x double> %53, <4 x double> poison, <2 x i32> <i32 0, i32 2>
%56 = shufflevector <4 x double> %52, <4 x double> poison, <2 x i32> <i32 1, i32 3>
%57 = shufflevector <4 x double> %53, <4 x double> poison, <2 x i32> <i32 1, i32 3>
%58 = getelementptr inbounds double, double* %13, i64 %44
%59 = bitcast double* %58 to <2 x double>*
store <2 x double> %54, <2 x double>* %59
%60 = getelementptr inbounds double, double* %58, i64 2
%61 = bitcast double* %60 to <2 x double>*
store <2 x double> %55, <2 x double>* %61
%62 = getelementptr inbounds double, double* %15, i64 %44
%63 = bitcast double* %62 to <2 x double>*
store <2 x double> %56, <2 x double>* %63
%64 = getelementptr inbounds double, double* %62, i64 2
%65 = bitcast double* %64 to <2 x double>*
store <2 x double> %57, <2 x double>* %65
%66 = or i64 %44, 4
%67 = shl i64 %66, 1
%68 = or i64 %67, 4
%69 = getelementptr inbounds double, double* %0, i64 %67
%70 = getelementptr inbounds double, double* %0, i64 %68
%71 = bitcast double* %69 to <4 x double>*
%72 = bitcast double* %70 to <4 x double>*
%73 = load <4 x double>, <4 x double>* %71
%74 = load <4 x double>, <4 x double>* %72
%75 = shufflevector <4 x double> %73, <4 x double> poison, <2 x i32> <i32 0, i32 2>
%76 = shufflevector <4 x double> %74, <4 x double> poison, <2 x i32> <i32 0, i32 2>
%77 = shufflevector <4 x double> %73, <4 x double> poison, <2 x i32> <i32 1, i32 3>
%78 = shufflevector <4 x double> %74, <4 x double> poison, <2 x i32> <i32 1, i32 3>
%79 = getelementptr inbounds double, double* %13, i64 %66
%80 = bitcast double* %79 to <2 x double>*
store <2 x double> %75, <2 x double>* %80
%81 = getelementptr inbounds double, double* %79, i64 2
%82 = bitcast double* %81 to <2 x double>*
store <2 x double> %76, <2 x double>* %82
%83 = getelementptr inbounds double, double* %15, i64 %66
%84 = bitcast double* %83 to <2 x double>*
store <2 x double> %77, <2 x double>* %84
%85 = getelementptr inbounds double, double* %83, i64 2
%86 = bitcast double* %85 to <2 x double>*
store <2 x double> %78, <2 x double>* %86
%87 = add nuw i64 %44, 8
%88 = add i64 %45, 2
%89 = icmp eq i64 %88, %42
br i1 %89, label %90, label %43
90: ; preds = %43, %33
%91 = phi i64 [ 0, %33 ], [ %87, %43 ]
%92 = icmp eq i64 %39, 0
br i1 %92, label %114, label %93
93: ; preds = %90
%94 = shl i64 %91, 1
%95 = or i64 %94, 4
%96 = getelementptr inbounds double, double* %0, i64 %94
%97 = getelementptr inbounds double, double* %0, i64 %95
%98 = bitcast double* %96 to <4 x double>*
%99 = bitcast double* %97 to <4 x double>*
%100 = load <4 x double>, <4 x double>* %98
%101 = load <4 x double>, <4 x double>* %99
%102 = shufflevector <4 x double> %100, <4 x double> poison, <2 x i32> <i32 0, i32 2>
%103 = shufflevector <4 x double> %101, <4 x double> poison, <2 x i32> <i32 0, i32 2>
%104 = shufflevector <4 x double> %100, <4 x double> poison, <2 x i32> <i32 1, i32 3>
%105 = shufflevector <4 x double> %101, <4 x double> poison, <2 x i32> <i32 1, i32 3>
%106 = getelementptr inbounds double, double* %13, i64 %91
%107 = bitcast double* %106 to <2 x double>*
store <2 x double> %102, <2 x double>* %107
%108 = getelementptr inbounds double, double* %106, i64 2
%109 = bitcast double* %108 to <2 x double>*
store <2 x double> %103, <2 x double>* %109
%110 = getelementptr inbounds double, double* %15, i64 %91
%111 = bitcast double* %110 to <2 x double>*
store <2 x double> %104, <2 x double>* %111
%112 = getelementptr inbounds double, double* %110, i64 2
%113 = bitcast double* %112 to <2 x double>*
store <2 x double> %105, <2 x double>* %113
br label %114
114: ; preds = %90, %93
%115 = icmp eq i64 %7, %34
br i1 %115, label %158, label %116
116: ; preds = %19, %17, %114
%117 = phi i64 [ 0, %19 ], [ 0, %17 ], [ %35, %114 ]
%118 = phi i64 [ 0, %19 ], [ 0, %17 ], [ %34, %114 ]
%119 = or i64 %118, 1
%120 = and i64 %7, 1
%121 = icmp eq i64 %120, 0
br i1 %121, label %132, label %122
122: ; preds = %116
%123 = or i64 %117, 1
%124 = getelementptr inbounds double, double* %0, i64 %117
%125 = load double, double* %124
%126 = getelementptr inbounds double, double* %13, i64 %118
store double %125, double* %126
%127 = add nuw nsw i64 %117, 2
%128 = getelementptr inbounds double, double* %0, i64 %123
%129 = load double, double* %128
%130 = getelementptr inbounds double, double* %15, i64 %118
store double %129, double* %130
%131 = or i64 %118, 1
br label %132
132: ; preds = %122, %116
%133 = phi i64 [ %117, %116 ], [ %127, %122 ]
%134 = phi i64 [ %118, %116 ], [ %131, %122 ]
%135 = icmp eq i64 %7, %119
br i1 %135, label %158, label %136
136: ; preds = %132, %136
%137 = phi i64 [ %152, %136 ], [ %133, %132 ]
%138 = phi i64 [ %156, %136 ], [ %134, %132 ]
%139 = or i64 %137, 1
%140 = getelementptr inbounds double, double* %0, i64 %137
%141 = load double, double* %140
%142 = getelementptr inbounds double, double* %13, i64 %138
store double %141, double* %142
%143 = add nuw nsw i64 %137, 2
%144 = getelementptr inbounds double, double* %0, i64 %139
%145 = load double, double* %144
%146 = getelementptr inbounds double, double* %15, i64 %138
store double %145, double* %146
%147 = add nuw nsw i64 %138, 1
%148 = or i64 %143, 1
%149 = getelementptr inbounds double, double* %0, i64 %143
%150 = load double, double* %149
%151 = getelementptr inbounds double, double* %13, i64 %147
store double %150, double* %151
%152 = add nuw nsw i64 %137, 4
%153 = getelementptr inbounds double, double* %0, i64 %148
%154 = load double, double* %153
%155 = getelementptr inbounds double, double* %15, i64 %147
store double %154, double* %155
%156 = add nuw nsw i64 %138, 2
%157 = icmp eq i64 %156, %7
br i1 %157, label %158, label %136
158: ; preds = %132, %136, %114, %8
%159 = getelementptr inbounds double, double* %15, i64 %7
store double 0.000000e+00, double* %159
%160 = getelementptr inbounds double, double* %13, i64 %7
store double 0.000000e+00, double* %160
%161 = tail call i32 @sing(double* %13, double* %15, i64 %7, i32 -1)
%162 = tail call i32 @realtr(double* %13, double* %15, i64 %7, i32 -1)
%163 = sitofp i64 %1 to double
%164 = fmul double %163, 2.000000e+00
%165 = icmp sgt i64 %1, 3
br i1 %165, label %166, label %194
166: ; preds = %158
%167 = icmp eq double* %2, null
%168 = icmp eq double* %3, null
%169 = call i64 @llvm.smax.i64(i64 %7, i64 2)
br label %170
170: ; preds = %166, %191
%171 = phi i64 [ 1, %166 ], [ %192, %191 ]
br i1 %167, label %182, label %172
172: ; preds = %170
%173 = getelementptr inbounds double, double* %13, i64 %171
%174 = load double, double* %173
%175 = getelementptr inbounds double, double* %15, i64 %171
%176 = load double, double* %175
%177 = fmul double %176, %176
%178 = tail call double @llvm.fmuladd.f64(double %174, double %174, double %177)
%179 = tail call double @sqrt(double %178)
%180 = fdiv double %179, %164
%181 = getelementptr inbounds double, double* %2, i64 %171
store double %180, double* %181
br label %182
182: ; preds = %172, %170
br i1 %168, label %191, label %183
183: ; preds = %182
%184 = getelementptr inbounds double, double* %15, i64 %171
%185 = load double, double* %184
%186 = getelementptr inbounds double, double* %13, i64 %171
%187 = load double, double* %186
%188 = tail call double @atan2(double %185, double %187)
%189 = fneg double %188
%190 = getelementptr inbounds double, double* %3, i64 %171
store double %189, double* %190
br label %191
191: ; preds = %182, %183
%192 = add nuw nsw i64 %171, 1
%193 = icmp eq i64 %192, %169
br i1 %193, label %194, label %170
194: ; preds = %191, %158
%195 = icmp eq double* %2, null
br i1 %195, label %202, label %196
196: ; preds = %194
%197 = load double, double* %13
%198 = fdiv double %197, %164
store double %198, double* %2
%199 = load double, double* %160
%200 = fdiv double %199, %164
%201 = getelementptr inbounds double, double* %2, i64 %7
store double %200, double* %201
br label %202
202: ; preds = %196, %194
%203 = icmp eq double* %3, null
br i1 %203, label %382, label %204
204: ; preds = %202
store double 0.000000e+00, double* %3
%205 = getelementptr inbounds double, double* %3, i64 %7
br label %379
206: ; preds = %4
%207 = add nsw i64 %1, 1
%208 = trunc i64 %207 to i32
%209 = shl i32 %208, 4
%210 = tail call i64 @malloc(i32 %209)
%211 = inttoptr i64 %210 to double*
%212 = inttoptr i64 %210 to i8*
%213 = getelementptr double, double* %211, i64 %207
%214 = icmp sgt i64 %1, 0
br i1 %214, label %215, label %314
215: ; preds = %206
%216 = icmp ult i64 %1, 4
br i1 %216, label %295, label %217
217: ; preds = %215
%218 = shl i64 %1, 1
%219 = or i64 %218, 1
%220 = getelementptr double, double* %211, i64 %219
%221 = getelementptr double, double* %0, i64 %1
%222 = bitcast double* %221 to i8*
%223 = getelementptr double, double* %211, i64 %1
%224 = icmp ult double* %213, %221
%225 = icmp ugt double* %220, %0
%226 = and i1 %224, %225
%227 = icmp ult i8* %212, %222
%228 = icmp ugt double* %223, %0
%229 = and i1 %227, %228
%230 = or i1 %226, %229
br i1 %230, label %295, label %231
231: ; preds = %217
%232 = and i64 %1, -4
%233 = add i64 %232, -4
%234 = lshr exact i64 %233, 2
%235 = add nuw nsw i64 %234, 1
%236 = and i64 %235, 1
%237 = icmp eq i64 %233, 0
br i1 %237, label %275, label %238
238: ; preds = %231
%239 = and i64 %235, 9223372036854775806
br label %240
240: ; preds = %240, %238
%241 = phi i64 [ 0, %238 ], [ %272, %240 ]
%242 = phi i64 [ 0, %238 ], [ %273, %240 ]
%243 = getelementptr inbounds double, double* %0, i64 %241
%244 = bitcast double* %243 to <2 x double>*
%245 = load <2 x double>, <2 x double>* %244
%246 = getelementptr inbounds double, double* %243, i64 2
%247 = bitcast double* %246 to <2 x double>*
%248 = load <2 x double>, <2 x double>* %247
%249 = getelementptr inbounds double, double* %211, i64 %241
%250 = bitcast double* %249 to <2 x double>*
store <2 x double> %245, <2 x double>* %250
%251 = getelementptr inbounds double, double* %249, i64 2
%252 = bitcast double* %251 to <2 x double>*
store <2 x double> %248, <2 x double>* %252
%253 = getelementptr inbounds double, double* %213, i64 %241
%254 = bitcast double* %253 to <2 x double>*
store <2 x double> zeroinitializer, <2 x double>* %254
%255 = getelementptr inbounds double, double* %253, i64 2
%256 = bitcast double* %255 to <2 x double>*
store <2 x double> zeroinitializer, <2 x double>* %256
%257 = or i64 %241, 4
%258 = getelementptr inbounds double, double* %0, i64 %257
%259 = bitcast double* %258 to <2 x double>*
%260 = load <2 x double>, <2 x double>* %259
%261 = getelementptr inbounds double, double* %258, i64 2
%262 = bitcast double* %261 to <2 x double>*
%263 = load <2 x double>, <2 x double>* %262
%264 = getelementptr inbounds double, double* %211, i64 %257
%265 = bitcast double* %264 to <2 x double>*
store <2 x double> %260, <2 x double>* %265
%266 = getelementptr inbounds double, double* %264, i64 2
%267 = bitcast double* %266 to <2 x double>*
store <2 x double> %263, <2 x double>* %267
%268 = getelementptr inbounds double, double* %213, i64 %257
%269 = bitcast double* %268 to <2 x double>*
store <2 x double> zeroinitializer, <2 x double>* %269
%270 = getelementptr inbounds double, double* %268, i64 2
%271 = bitcast double* %270 to <2 x double>*
store <2 x double> zeroinitializer, <2 x double>* %271
%272 = add nuw i64 %241, 8
%273 = add i64 %242, 2
%274 = icmp eq i64 %273, %239
br i1 %274, label %275, label %240
275: ; preds = %240, %231
%276 = phi i64 [ 0, %231 ], [ %272, %240 ]
%277 = icmp eq i64 %236, 0
br i1 %277, label %293, label %278
278: ; preds = %275
%279 = getelementptr inbounds double, double* %0, i64 %276
%280 = bitcast double* %279 to <2 x double>*
%281 = load <2 x double>, <2 x double>* %280
%282 = getelementptr inbounds double, double* %279, i64 2
%283 = bitcast double* %282 to <2 x double>*
%284 = load <2 x double>, <2 x double>* %283
%285 = getelementptr inbounds double, double* %211, i64 %276
%286 = bitcast double* %285 to <2 x double>*
store <2 x double> %281, <2 x double>* %286
%287 = getelementptr inbounds double, double* %285, i64 2
%288 = bitcast double* %287 to <2 x double>*
store <2 x double> %284, <2 x double>* %288
%289 = getelementptr inbounds double, double* %213, i64 %276
%290 = bitcast double* %289 to <2 x double>*
store <2 x double> zeroinitializer, <2 x double>* %290
%291 = getelementptr inbounds double, double* %289, i64 2
%292 = bitcast double* %291 to <2 x double>*
store <2 x double> zeroinitializer, <2 x double>* %292
br label %293
293: ; preds = %275, %278
%294 = icmp eq i64 %232, %1
br i1 %294, label %340, label %295
295: ; preds = %217, %215, %293
%296 = phi i64 [ 0, %217 ], [ 0, %215 ], [ %232, %293 ]
%297 = xor i64 %296, -1
%298 = add i64 %297, %1
%299 = and i64 %1, 3
%300 = icmp eq i64 %299, 0
br i1 %300, label %311, label %301
301: ; preds = %295, %301
%302 = phi i64 [ %308, %301 ], [ %296, %295 ]
%303 = phi i64 [ %309, %301 ], [ 0, %295 ]
%304 = getelementptr inbounds double, double* %0, i64 %302
%305 = load double, double* %304
%306 = getelementptr inbounds double, double* %211, i64 %302
store double %305, double* %306
%307 = getelementptr inbounds double, double* %213, i64 %302
store double 0.000000e+00, double* %307
%308 = add nuw nsw i64 %302, 1
%309 = add i64 %303, 1
%310 = icmp eq i64 %309, %299
br i1 %310, label %311, label %301
311: ; preds = %301, %295
%312 = phi i64 [ %296, %295 ], [ %308, %301 ]
%313 = icmp ult i64 %298, 3
br i1 %313, label %340, label %317
314: ; preds = %206
%315 = tail call i32 @sing(double* %211, double* %213, i64 %1, i32 -1)
%316 = sitofp i64 %1 to double
br label %371
317: ; preds = %311, %317
%318 = phi i64 [ %338, %317 ], [ %312, %311 ]
%319 = getelementptr inbounds double, double* %0, i64 %318
%320 = load double, double* %319
%321 = getelementptr inbounds double, double* %211, i64 %318
store double %320, double* %321
%322 = getelementptr inbounds double, double* %213, i64 %318
store double 0.000000e+00, double* %322
%323 = add nuw nsw i64 %318, 1
%324 = getelementptr inbounds double, double* %0, i64 %323
%325 = load double, double* %324
%326 = getelementptr inbounds double, double* %211, i64 %323
store double %325, double* %326
%327 = getelementptr inbounds double, double* %213, i64 %323
store double 0.000000e+00, double* %327
%328 = add nuw nsw i64 %318, 2
%329 = getelementptr inbounds double, double* %0, i64 %328
%330 = load double, double* %329
%331 = getelementptr inbounds double, double* %211, i64 %328
store double %330, double* %331
%332 = getelementptr inbounds double, double* %213, i64 %328
store double 0.000000e+00, double* %332
%333 = add nuw nsw i64 %318, 3
%334 = getelementptr inbounds double, double* %0, i64 %333
%335 = load double, double* %334
%336 = getelementptr inbounds double, double* %211, i64 %333
store double %335, double* %336
%337 = getelementptr inbounds double, double* %213, i64 %333
store double 0.000000e+00, double* %337
%338 = add nuw nsw i64 %318, 4
%339 = icmp eq i64 %338, %1
br i1 %339, label %340, label %317
340: ; preds = %311, %317, %293
%341 = tail call i32 @sing(double* %211, double* %213, i64 %1, i32 -1)
%342 = sitofp i64 %1 to double
%343 = icmp slt i64 %1, 2
br i1 %343, label %371, label %344
344: ; preds = %340
%345 = icmp eq double* %2, null
%346 = icmp eq double* %3, null
br label %347
347: ; preds = %344, %368
%348 = phi i64 [ 1, %344 ], [ %369, %368 ]
br i1 %345, label %359, label %349
349: ; preds = %347
%350 = getelementptr inbounds double, double* %211, i64 %348
%351 = load double, double* %350
%352 = getelementptr inbounds double, double* %213, i64 %348
%353 = load double, double* %352
%354 = fmul double %353, %353
%355 = tail call double @llvm.fmuladd.f64(double %351, double %351, double %354)
%356 = tail call double @sqrt(double %355)
%357 = fdiv double %356, %342
%358 = getelementptr inbounds double, double* %2, i64 %348
store double %357, double* %358
br label %359
359: ; preds = %349, %347
br i1 %346, label %368, label %360
360: ; preds = %359
%361 = getelementptr inbounds double, double* %213, i64 %348
%362 = load double, double* %361
%363 = getelementptr inbounds double, double* %211, i64 %348
%364 = load double, double* %363
%365 = tail call double @atan2(double %362, double %364)
%366 = fneg double %365
%367 = getelementptr inbounds double, double* %3, i64 %348
store double %366, double* %367
br label %368
368: ; preds = %359, %360
%369 = add nuw nsw i64 %348, 1
%370 = icmp eq i64 %348, %7
br i1 %370, label %371, label %347
371: ; preds = %368, %314, %340
%372 = phi double [ %316, %314 ], [ %342, %340 ], [ %342, %368 ]
%373 = icmp eq double* %2, null
br i1 %373, label %377, label %374
374: ; preds = %371
%375 = load double, double* %211
%376 = fdiv double %375, %372
store double %376, double* %2
br label %377
377: ; preds = %374, %371
%378 = icmp eq double* %3, null
br i1 %378, label %382, label %379
379: ; preds = %377, %204
%380 = phi double* [ %205, %204 ], [ %3, %377 ]
%381 = phi double* [ %13, %204 ], [ %211, %377 ]
store double 0.000000e+00, double* %380
br label %382
382: ; preds = %379, %377, %202
%383 = phi double* [ %13, %202 ], [ %211, %377 ], [ %381, %379 ]
%384 = tail call i32 @free(double* %383)
ret void
}