#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*/ RealFFT(float *, long);
int /*<<< orphan*/ RealIFFT(float *, long);
double fabs(double);
long nextpow2(int);
double pow_of(float *, long, long, long);
int /*<<< orphan*/ safe_free(float *);
scalar_t__ safe_malloc(long);
double sqrt(double);
int compute_delay(long start_sample, long stop_sample, long search_range,
                  float *time_series1, float *time_series2,
                  float *max_correlation) {
  double power1, power2, normalization;
  long i;
  float *x1, *x2, *y;
  double h;
  long n = stop_sample - start_sample;
  long power_of_2 = nextpow2(2 * n);
  long best_delay;
  power1 = pow_of(time_series1, start_sample, stop_sample,
                  stop_sample - start_sample) *
           (double)n / (double)power_of_2;
  power2 = pow_of(time_series2, start_sample, stop_sample,
                  stop_sample - start_sample) *
           (double)n / (double)power_of_2;
  normalization = sqrt(power1 * power2);
  if ((power1 <= 1E-6) || (power2 <= 1E-6)) {
    *max_correlation = 0;
    return 0;
  }
  x1 = (float *)safe_malloc((power_of_2 + 2) * sizeof(float));
  ;
  x2 = (float *)safe_malloc((power_of_2 + 2) * sizeof(float));
  ;
  y = (float *)safe_malloc((power_of_2 + 2) * sizeof(float));
  ;
  for (i = 0; i < power_of_2 + 2; i++) {
    x1[i] = 0.;
    x2[i] = 0.;
    y[i] = 0.;
  }
  for (i = 0; i < n; i++) {
    x1[i] = (float)fabs(time_series1[i + start_sample]);
    x2[i] = (float)fabs(time_series2[i + start_sample]);
  }
  RealFFT(x1, power_of_2);
  RealFFT(x2, power_of_2);
  for (i = 0; i <= power_of_2 / 2; i++) {
    x1[2 * i] /= power_of_2;
    x1[2 * i + 1] /= power_of_2;
  }
  for (i = 0; i <= power_of_2 / 2; i++) {
    y[2 * i] = x1[2 * i] * x2[2 * i] + x1[2 * i + 1] * x2[2 * i + 1];
    y[2 * i + 1] = -x1[2 * i + 1] * x2[2 * i] + x1[2 * i] * x2[2 * i + 1];
  }
  RealIFFT(y, power_of_2);
  best_delay = 0;
  *max_correlation = 0;
  for (i = -search_range; i <= -1; i++) {
    h = (float)fabs(y[(i + power_of_2)]) / normalization;
    if (fabs(h) > (double)*max_correlation) {
      *max_correlation = (float)fabs(h);
      best_delay = i;
    }
  }
  for (i = 0; i < search_range; i++) {
    h = (float)fabs(y[i]) / normalization;
    if (fabs(h) > (double)*max_correlation) {
      *max_correlation = (float)fabs(h);
      best_delay = i;
    }
  }
  safe_free(x1);
  safe_free(x2);
  safe_free(y);
  return best_delay;
}


x86 assembly (clang, -O0):
<compute_delay>:
push   %rbp
mov    %rsp,%rbp
sub    $0xa0,%rsp
mov    %rdi,-0x10(%rbp)
mov    %rsi,-0x18(%rbp)
mov    %rdx,-0x20(%rbp)
mov    %rcx,-0x28(%rbp)
mov    %r8,-0x30(%rbp)
mov    %r9,-0x38(%rbp)
mov    -0x18(%rbp),%rax
sub    -0x10(%rbp),%rax
mov    %rax,-0x80(%rbp)
mov    -0x80(%rbp),%rax
shl    $0x1,%rax
mov    %eax,%edi
call   1070 <nextpow2@plt>
mov    %rax,-0x88(%rbp)
mov    -0x28(%rbp),%rdi
mov    -0x10(%rbp),%rsi
mov    -0x18(%rbp),%rdx
mov    -0x18(%rbp),%rcx
sub    -0x10(%rbp),%rcx
call   1040 <pow_of@plt>
cvtsi2sdq -0x80(%rbp),%xmm1
mulsd  %xmm1,%xmm0
cvtsi2sdq -0x88(%rbp),%xmm1
ff ff
divsd  %xmm1,%xmm0
movsd  %xmm0,-0x40(%rbp)
mov    -0x30(%rbp),%rdi
mov    -0x10(%rbp),%rsi
mov    -0x18(%rbp),%rdx
mov    -0x18(%rbp),%rcx
sub    -0x10(%rbp),%rcx
call   1040 <pow_of@plt>
cvtsi2sdq -0x80(%rbp),%xmm1
mulsd  %xmm1,%xmm0
cvtsi2sdq -0x88(%rbp),%xmm1
ff ff
divsd  %xmm1,%xmm0
movsd  %xmm0,-0x48(%rbp)
movsd  -0x40(%rbp),%xmm0
mulsd  -0x48(%rbp),%xmm0
call   1090 <sqrt@plt>
movsd  %xmm0,-0x50(%rbp)
movsd  0xdc5(%rip),%xmm0
ucomisd -0x40(%rbp),%xmm0
jae    1259 <compute_delay+0xe9>
movsd  0xdb2(%rip),%xmm0
ucomisd -0x48(%rbp),%xmm0
jb     1270 <compute_delay+0x100>
mov    -0x38(%rbp),%rax
xorps  %xmm0,%xmm0
movss  %xmm0,(%rax)
movl   $0x0,-0x4(%rbp)
jmp    1705 <compute_delay+0x595>
mov    -0x88(%rbp),%rdi
add    $0x2,%rdi
shl    $0x2,%rdi
call   1050 <safe_malloc@plt>
mov    %rax,-0x60(%rbp)
mov    -0x88(%rbp),%rdi
add    $0x2,%rdi
shl    $0x2,%rdi
call   1050 <safe_malloc@plt>
mov    %rax,-0x68(%rbp)
mov    -0x88(%rbp),%rdi
add    $0x2,%rdi
shl    $0x2,%rdi
call   1050 <safe_malloc@plt>
mov    %rax,-0x70(%rbp)
movq   $0x0,-0x58(%rbp)
mov    -0x58(%rbp),%rax
mov    -0x88(%rbp),%rcx
add    $0x2,%rcx
cmp    %rcx,%rax
jge    1319 <compute_delay+0x1a9>
mov    -0x60(%rbp),%rax
mov    -0x58(%rbp),%rcx
xorps  %xmm0,%xmm0
movss  %xmm0,(%rax,%rcx,4)
mov    -0x68(%rbp),%rax
mov    -0x58(%rbp),%rcx
xorps  %xmm0,%xmm0
movss  %xmm0,(%rax,%rcx,4)
mov    -0x70(%rbp),%rax
mov    -0x58(%rbp),%rcx
xorps  %xmm0,%xmm0
movss  %xmm0,(%rax,%rcx,4)
mov    -0x58(%rbp),%rax
add    $0x1,%rax
mov    %rax,-0x58(%rbp)
jmp    12c0 <compute_delay+0x150>
movq   $0x0,-0x58(%rbp)
mov    -0x58(%rbp),%rax
cmp    -0x80(%rbp),%rax
jge    13a2 <compute_delay+0x232>
mov    -0x28(%rbp),%rax
mov    -0x58(%rbp),%rcx
add    -0x10(%rbp),%rcx
movss  (%rax,%rcx,4),%xmm0
cvtss2sd %xmm0,%xmm0
movaps 0xcc5(%rip),%xmm1
pand   %xmm1,%xmm0
cvtsd2ss %xmm0,%xmm0
mov    -0x60(%rbp),%rax
mov    -0x58(%rbp),%rcx
movss  %xmm0,(%rax,%rcx,4)
mov    -0x30(%rbp),%rax
mov    -0x58(%rbp),%rcx
add    -0x10(%rbp),%rcx
movss  (%rax,%rcx,4),%xmm0
cvtss2sd %xmm0,%xmm0
movaps 0xc94(%rip),%xmm1
pand   %xmm1,%xmm0
cvtsd2ss %xmm0,%xmm0
mov    -0x68(%rbp),%rax
mov    -0x58(%rbp),%rcx
movss  %xmm0,(%rax,%rcx,4)
mov    -0x58(%rbp),%rax
add    $0x1,%rax
mov    %rax,-0x58(%rbp)
jmp    1321 <compute_delay+0x1b1>
mov    -0x60(%rbp),%rdi
mov    -0x88(%rbp),%rsi
call   1030 <RealFFT@plt>
mov    -0x68(%rbp),%rdi
mov    -0x88(%rbp),%rsi
call   1030 <RealFFT@plt>
movq   $0x0,-0x58(%rbp)
mov    -0x58(%rbp),%rax
mov    %rax,-0x98(%rbp)
mov    -0x88(%rbp),%rax
mov    $0x2,%ecx
cqto
idiv   %rcx
mov    %rax,%rcx
mov    -0x98(%rbp),%rax
cmp    %rcx,%rax
jg     1452 <compute_delay+0x2e2>
cvtsi2ssq -0x88(%rbp),%xmm1
mov    -0x60(%rbp),%rax
mov    -0x58(%rbp),%rcx
shl    $0x1,%rcx
movss  (%rax,%rcx,4),%xmm0
divss  %xmm1,%xmm0
movss  %xmm0,(%rax,%rcx,4)
cvtsi2ssq -0x88(%rbp),%xmm1
ff ff
mov    -0x60(%rbp),%rax
mov    -0x58(%rbp),%rcx
shl    $0x1,%rcx
movss  0x4(%rax,%rcx,4),%xmm0
divss  %xmm1,%xmm0
movss  %xmm0,0x4(%rax,%rcx,4)
mov    -0x58(%rbp),%rax
add    $0x1,%rax
mov    %rax,-0x58(%rbp)
jmp    13ca <compute_delay+0x25a>
movq   $0x0,-0x58(%rbp)
mov    -0x58(%rbp),%rax
mov    %rax,-0xa0(%rbp)
mov    -0x88(%rbp),%rax
mov    $0x2,%ecx
cqto
idiv   %rcx
mov    %rax,%rcx
mov    -0xa0(%rbp),%rax
cmp    %rcx,%rax
jg     1566 <compute_delay+0x3f6>
mov    -0x60(%rbp),%rax
mov    -0x58(%rbp),%rcx
shl    $0x1,%rcx
movss  (%rax,%rcx,4),%xmm0
mov    -0x68(%rbp),%rax
mov    -0x58(%rbp),%rcx
shl    $0x1,%rcx
movss  (%rax,%rcx,4),%xmm2
mov    -0x60(%rbp),%rax
mov    -0x58(%rbp),%rcx
shl    $0x1,%rcx
movss  0x4(%rax,%rcx,4),%xmm1
mov    -0x68(%rbp),%rax
mov    -0x58(%rbp),%rcx
shl    $0x1,%rcx
mulss  0x4(%rax,%rcx,4),%xmm1
mulss  %xmm2,%xmm0
addss  %xmm1,%xmm0
mov    -0x70(%rbp),%rax
mov    -0x58(%rbp),%rcx
shl    $0x1,%rcx
movss  %xmm0,(%rax,%rcx,4)
mov    -0x60(%rbp),%rax
mov    -0x58(%rbp),%rcx
shl    $0x1,%rcx
movss  0x4(%rax,%rcx,4),%xmm0
movd   %xmm0,%eax
xor    $0x80000000,%eax
movd   %eax,%xmm0
mov    -0x68(%rbp),%rax
mov    -0x58(%rbp),%rcx
shl    $0x1,%rcx
movss  (%rax,%rcx,4),%xmm2
mov    -0x60(%rbp),%rax
mov    -0x58(%rbp),%rcx
shl    $0x1,%rcx
movss  (%rax,%rcx,4),%xmm1
mov    -0x68(%rbp),%rax
mov    -0x58(%rbp),%rcx
shl    $0x1,%rcx
mulss  0x4(%rax,%rcx,4),%xmm1
mulss  %xmm2,%xmm0
addss  %xmm1,%xmm0
mov    -0x70(%rbp),%rax
mov    -0x58(%rbp),%rcx
shl    $0x1,%rcx
movss  %xmm0,0x4(%rax,%rcx,4)
mov    -0x58(%rbp),%rax
add    $0x1,%rax
mov    %rax,-0x58(%rbp)
jmp    145a <compute_delay+0x2ea>
mov    -0x70(%rbp),%rdi
mov    -0x88(%rbp),%rsi
call   1060 <RealIFFT@plt>
movq   $0x0,-0x90(%rbp)
mov    -0x38(%rbp),%rax
xorps  %xmm0,%xmm0
movss  %xmm0,(%rax)
xor    %eax,%eax
sub    -0x20(%rbp),%rax
mov    %rax,-0x58(%rbp)
cmpq   $0xffffffffffffffff,-0x58(%rbp)
jg     1639 <compute_delay+0x4c9>
mov    -0x70(%rbp),%rax
mov    -0x58(%rbp),%rcx
add    -0x88(%rbp),%rcx
movss  (%rax,%rcx,4),%xmm0
cvtss2sd %xmm0,%xmm0
movaps 0xa50(%rip),%xmm1
pand   %xmm1,%xmm0
cvtsd2ss %xmm0,%xmm0
cvtss2sd %xmm0,%xmm0
divsd  -0x50(%rbp),%xmm0
movsd  %xmm0,-0x78(%rbp)
movsd  -0x78(%rbp),%xmm0
movaps 0xa2e(%rip),%xmm1
pand   %xmm1,%xmm0
mov    -0x38(%rbp),%rax
movss  (%rax),%xmm1
cvtss2sd %xmm1,%xmm1
ucomisd %xmm1,%xmm0
jbe    1623 <compute_delay+0x4b3>
movsd  -0x78(%rbp),%xmm0
movaps 0xa08(%rip),%xmm1
pand   %xmm1,%xmm0
cvtsd2ss %xmm0,%xmm0
mov    -0x38(%rbp),%rax
movss  %xmm0,(%rax)
mov    -0x58(%rbp),%rax
mov    %rax,-0x90(%rbp)
jmp    1628 <compute_delay+0x4b8>
mov    -0x58(%rbp),%rax
add    $0x1,%rax
mov    %rax,-0x58(%rbp)
jmp    1596 <compute_delay+0x426>
movq   $0x0,-0x58(%rbp)
mov    -0x58(%rbp),%rax
cmp    -0x20(%rbp),%rax
jge    16e0 <compute_delay+0x570>
mov    -0x70(%rbp),%rax
mov    -0x58(%rbp),%rcx
movss  (%rax,%rcx,4),%xmm0
cvtss2sd %xmm0,%xmm0
movaps 0x9a9(%rip),%xmm1
pand   %xmm1,%xmm0
cvtsd2ss %xmm0,%xmm0
cvtss2sd %xmm0,%xmm0
divsd  -0x50(%rbp),%xmm0
movsd  %xmm0,-0x78(%rbp)
movsd  -0x78(%rbp),%xmm0
movaps 0x987(%rip),%xmm1
pand   %xmm1,%xmm0
mov    -0x38(%rbp),%rax
movss  (%rax),%xmm1
cvtss2sd %xmm1,%xmm1
ucomisd %xmm1,%xmm0
jbe    16ca <compute_delay+0x55a>
movsd  -0x78(%rbp),%xmm0
movaps 0x961(%rip),%xmm1
pand   %xmm1,%xmm0
cvtsd2ss %xmm0,%xmm0
mov    -0x38(%rbp),%rax
movss  %xmm0,(%rax)
mov    -0x58(%rbp),%rax
mov    %rax,-0x90(%rbp)
jmp    16cf <compute_delay+0x55f>
mov    -0x58(%rbp),%rax
add    $0x1,%rax
mov    %rax,-0x58(%rbp)
jmp    1641 <compute_delay+0x4d1>
mov    -0x60(%rbp),%rdi
call   1080 <safe_free@plt>
mov    -0x68(%rbp),%rdi
call   1080 <safe_free@plt>
mov    -0x70(%rbp),%rdi
call   1080 <safe_free@plt>
mov    -0x90(%rbp),%rax
mov    %eax,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0xa0,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<compute_delay>:
push   %rbp
push   %r15
push   %r14
push   %r13
push   %r12
push   %rbx
sub    $0x68,%rsp
mov    %r9,0x50(%rsp)
mov    %r8,%r12
mov    %rcx,%r13
mov    %rdx,0x60(%rsp)
mov    %rsi,%r15
mov    %rdi,%rbp
mov    %rsi,%r14
sub    %rdi,%r14
lea    (%r14,%r14,1),%edi
call   1070 <nextpow2@plt>
mov    %rax,%rbx
mov    %r13,%rdi
mov    %rbp,%rsi
mov    %r15,%rdx
mov    %r14,%rcx
call   1040 <pow_of@plt>
movaps %xmm0,0x30(%rsp)
xorps  %xmm0,%xmm0
cvtsi2sd %r14,%xmm0
movapd %xmm0,0x10(%rsp)
xorps  %xmm0,%xmm0
cvtsi2sd %rbx,%xmm0
movapd %xmm0,0x40(%rsp)
mov    %r12,%rdi
mov    %rbp,%rsi
mov    %r15,%rdx
mov    %r14,%rcx
call   1040 <pow_of@plt>
unpcklpd 0x30(%rsp),%xmm0
movapd 0x10(%rsp),%xmm1
unpcklpd %xmm1,%xmm1
mulpd  %xmm0,%xmm1
movapd 0x40(%rsp),%xmm0
unpcklpd %xmm0,%xmm0
divpd  %xmm0,%xmm1
movapd %xmm1,%xmm0
unpckhpd %xmm1,%xmm0
movapd %xmm1,0x10(%rsp)
mulsd  %xmm1,%xmm0
xorpd  %xmm1,%xmm1
ucomisd %xmm1,%xmm0
jb     122d <compute_delay+0xbd>
sqrtsd %xmm0,%xmm0
jmp    1232 <compute_delay+0xc2>
call   1090 <sqrt@plt>
movapd 0x10(%rsp),%xmm1
cmplepd 0xdbf(%rip),%xmm1
movmskpd %xmm1,%eax
test   %eax,%eax
je     125b <compute_delay+0xeb>
mov    0x50(%rsp),%rax
movl   $0x0,(%rax)
xor    %ebp,%ebp
jmp    193d <compute_delay+0x7cd>
mov    %rbp,0x28(%rsp)
mov    %r12,0x30(%rsp)
mov    %r13,0x40(%rsp)
movsd  %xmm0,0x58(%rsp)
mov    %rbx,0x10(%rsp)
mov    0x10(%rsp),%rax
lea    0x8(,%rax,4),%rbp
mov    %rbp,%rdi
call   1050 <safe_malloc@plt>
mov    %rax,%rbx
mov    %rbp,%rdi
call   1050 <safe_malloc@plt>
mov    %rax,%r12
mov    %rbp,%rdi
mov    0x10(%rsp),%rbp
call   1050 <safe_malloc@plt>
mov    %rax,%r13
cmp    $0xffffffffffffffff,%rbp
jl     145b <compute_delay+0x2eb>
lea    0x2(%rbp),%rax
cmp    $0x8,%rax
jae    12c3 <compute_delay+0x153>
xor    %ecx,%ecx
jmp    13e3 <compute_delay+0x273>
lea    (%rbx,%rax,4),%rcx
lea    (%r12,%rax,4),%rbp
lea    0x0(,%rax,4),%rsi
add    %r13,%rsi
cmp    %rbp,%rbx
setb   %r9b
cmp    %rcx,%r12
setb   %r10b
cmp    %rsi,%rbx
setb   %dl
cmp    %rcx,%r13
setb   %dil
cmp    %rsi,%r12
setb   %sil
cmp    %rbp,%r13
setb   %r8b
xor    %ecx,%ecx
test   %r10b,%r9b
jne    13de <compute_delay+0x26e>
and    %dil,%dl
jne    13de <compute_delay+0x26e>
and    %r8b,%sil
mov    0x10(%rsp),%rbp
jne    13e3 <compute_delay+0x273>
mov    %rax,%rcx
and    $0xfffffffffffffff8,%rcx
lea    -0x8(%rcx),%rsi
mov    %rsi,%rdx
shr    $0x3,%rdx
add    $0x1,%rdx
test   %rsi,%rsi
je     16eb <compute_delay+0x57b>
mov    %rdx,%rdi
and    $0xfffffffffffffffe,%rdi
xor    %esi,%esi
xorpd  %xmm0,%xmm0
nopl   (%rax)
movupd %xmm0,(%rbx,%rsi,4)
movupd %xmm0,0x10(%rbx,%rsi,4)
movupd %xmm0,(%r12,%rsi,4)
movupd %xmm0,0x10(%r12,%rsi,4)
movupd %xmm0,0x0(%r13,%rsi,4)
movupd %xmm0,0x10(%r13,%rsi,4)
movupd %xmm0,0x20(%rbx,%rsi,4)
movupd %xmm0,0x30(%rbx,%rsi,4)
movupd %xmm0,0x20(%r12,%rsi,4)
movupd %xmm0,0x30(%r12,%rsi,4)
movupd %xmm0,0x20(%r13,%rsi,4)
movupd %xmm0,0x30(%r13,%rsi,4)
add    $0x10,%rsi
add    $0xfffffffffffffffe,%rdi
jne    1350 <compute_delay+0x1e0>
test   $0x1,%dl
je     13d7 <compute_delay+0x267>
xorpd  %xmm0,%xmm0
movupd %xmm0,(%rbx,%rsi,4)
movupd %xmm0,0x10(%rbx,%rsi,4)
movupd %xmm0,(%r12,%rsi,4)
movupd %xmm0,0x10(%r12,%rsi,4)
movupd %xmm0,0x0(%r13,%rsi,4)
movupd %xmm0,0x10(%r13,%rsi,4)
cmp    %rcx,%rax
jne    13e3 <compute_delay+0x273>
jmp    145b <compute_delay+0x2eb>
mov    0x10(%rsp),%rbp
lea    0x1(%rbp),%rsi
mov    %rcx,%rdx
test   $0x1,%bpl
je     140f <compute_delay+0x29f>
movl   $0x0,(%rbx,%rcx,4)
movl   $0x0,(%r12,%rcx,4)
movl   $0x0,0x0(%r13,%rcx,4)
mov    %rcx,%rdx
or     $0x1,%rdx
cmp    %rcx,%rsi
je     145b <compute_delay+0x2eb>
cs nopw 0x0(%rax,%rax,1)
xchg   %ax,%ax
movl   $0x0,(%rbx,%rdx,4)
movl   $0x0,(%r12,%rdx,4)
movl   $0x0,0x0(%r13,%rdx,4)
movl   $0x0,0x4(%rbx,%rdx,4)
movl   $0x0,0x4(%r12,%rdx,4)
movl   $0x0,0x4(%r13,%rdx,4)
add    $0x2,%rdx
cmp    %rdx,%rax
jne    1420 <compute_delay+0x2b0>
test   %r14,%r14
jle    14b6 <compute_delay+0x346>
cmp    $0x4,%r14
jae    1500 <compute_delay+0x390>
xor    %eax,%eax
mov    0x30(%rsp),%rcx
mov    0x28(%rsp),%rsi
lea    (%rcx,%rsi,4),%rcx
mov    0x40(%rsp),%rdx
lea    (%rdx,%rsi,4),%rdx
movapd 0xb85(%rip),%xmm0
nopl   0x0(%rax,%rax,1)
movss  (%rdx,%rax,4),%xmm1
andpd  %xmm0,%xmm1
movss  %xmm1,(%rbx,%rax,4)
movss  (%rcx,%rax,4),%xmm1
andpd  %xmm0,%xmm1
movss  %xmm1,(%r12,%rax,4)
add    $0x1,%rax
cmp    %rax,%r14
jne    1490 <compute_delay+0x320>
mov    %rbx,%rdi
mov    %rbp,%rsi
call   1030 <RealFFT@plt>
mov    %r12,%rdi
mov    %rbp,%rsi
call   1030 <RealFFT@plt>
cmp    $0xffffffffffffffff,%rbp
jl     183e <compute_delay+0x6ce>
mov    %rbp,%rcx
shr    $0x3f,%rcx
xorps  %xmm0,%xmm0
cvtsi2ss %rbp,%xmm0
add    %rbp,%rcx
sar    %rcx
lea    0x1(%rcx),%rax
cmp    $0x4,%rax
jae    164b <compute_delay+0x4db>
xor    %edx,%edx
jmp    1705 <compute_delay+0x595>
lea    (%rbx,%r14,4),%rax
lea    (%r12,%r14,4),%rbp
mov    0x40(%rsp),%rcx
mov    0x28(%rsp),%rdx
lea    (%rcx,%rdx,4),%rdi
lea    (%rcx,%r15,4),%rsi
mov    0x30(%rsp),%rcx
lea    (%rcx,%rdx,4),%rdx
lea    (%rcx,%r15,4),%rcx
cmp    %rbp,%rbx
setb   0xf(%rsp)
cmp    %rax,%r12
setb   %r9b
cmp    %rsi,%rbx
setb   %r11b
cmp    %rax,%rdi
setb   %r8b
cmp    %rcx,%rbx
setb   %r15b
cmp    %rax,%rdx
setb   %r10b
cmp    %rsi,%r12
setb   %sil
cmp    %rbp,%rdi
setb   0xe(%rsp)
cmp    %rcx,%r12
setb   %dil
cmp    %rbp,%rdx
setb   %cl
xor    %eax,%eax
test   %r9b,0xf(%rsp)
jne    16fb <compute_delay+0x58b>
and    %r8b,%r11b
mov    0x10(%rsp),%rbp
jne    146c <compute_delay+0x2fc>
and    %r10b,%r15b
jne    146c <compute_delay+0x2fc>
and    0xe(%rsp),%sil
jne    146c <compute_delay+0x2fc>
and    %cl,%dil
jne    146c <compute_delay+0x2fc>
mov    %r14,%rax
and    $0xfffffffffffffffc,%rax
lea    -0x4(%rax),%rcx
mov    %rcx,%rdx
shr    $0x2,%rdx
add    $0x1,%rdx
test   %rcx,%rcx
je     169a <compute_delay+0x52a>
mov    %rdx,%rsi
and    $0xfffffffffffffffe,%rsi
mov    0x30(%rsp),%rcx
mov    0x28(%rsp),%rbp
lea    (%rcx,%rbp,4),%rdi
add    $0x10,%rdi
mov    0x40(%rsp),%rcx
lea    (%rcx,%rbp,4),%rbp
add    $0x10,%rbp
xor    %ecx,%ecx
movapd 0xa1b(%rip),%xmm0
cs nopw 0x0(%rax,%rax,1)
nop
movupd -0x10(%rbp,%rcx,4),%xmm1
andpd  %xmm0,%xmm1
movupd %xmm1,(%rbx,%rcx,4)
movupd -0x10(%rdi,%rcx,4),%xmm1
andpd  %xmm0,%xmm1
movupd %xmm1,(%r12,%rcx,4)
movupd 0x0(%rbp,%rcx,4),%xmm1
andpd  %xmm0,%xmm1
movupd %xmm1,0x10(%rbx,%rcx,4)
movupd (%rdi,%rcx,4),%xmm1
andpd  %xmm0,%xmm1
movupd %xmm1,0x10(%r12,%rcx,4)
add    $0x8,%rcx
add    $0xfffffffffffffffe,%rsi
jne    1600 <compute_delay+0x490>
jmp    169c <compute_delay+0x52c>
mov    %rax,%rdx
and    $0xfffffffffffffffc,%rdx
movaps %xmm0,%xmm1
shufps $0x0,%xmm0,%xmm1
xor    %esi,%esi
nopl   0x0(%rax,%rax,1)
movups (%rbx,%rsi,8),%xmm2
movups 0x10(%rbx,%rsi,8),%xmm3
movaps %xmm2,%xmm4
shufps $0x88,%xmm3,%xmm4
shufps $0xdd,%xmm3,%xmm2
divps  %xmm1,%xmm4
divps  %xmm1,%xmm2
movaps %xmm4,%xmm3
unpckhps %xmm2,%xmm3
unpcklps %xmm2,%xmm4
movups %xmm4,(%rbx,%rsi,8)
movups %xmm3,0x10(%rbx,%rsi,8)
add    $0x4,%rsi
cmp    %rsi,%rdx
jne    1660 <compute_delay+0x4f0>
jmp    1727 <compute_delay+0x5b7>
xor    %ecx,%ecx
test   $0x1,%dl
mov    0x10(%rsp),%rbp
je     16dd <compute_delay+0x56d>
mov    0x28(%rsp),%rdx
add    %rcx,%rdx
mov    0x40(%rsp),%rsi
movupd (%rsi,%rdx,4),%xmm0
movapd 0x950(%rip),%xmm1
andpd  %xmm1,%xmm0
movupd %xmm0,(%rbx,%rcx,4)
mov    0x30(%rsp),%rsi
movupd (%rsi,%rdx,4),%xmm0
andpd  %xmm1,%xmm0
movupd %xmm0,(%r12,%rcx,4)
cmp    %rax,%r14
jne    146c <compute_delay+0x2fc>
jmp    14b6 <compute_delay+0x346>
xor    %esi,%esi
test   $0x1,%dl
jne    13ad <compute_delay+0x23d>
jmp    13d7 <compute_delay+0x267>
mov    0x10(%rsp),%rbp
jmp    146c <compute_delay+0x2fc>
movss  (%rbx,%rdx,8),%xmm1
movss  0x4(%rbx,%rdx,8),%xmm2
divss  %xmm0,%xmm1
movss  %xmm1,(%rbx,%rdx,8)
divss  %xmm0,%xmm2
movss  %xmm2,0x4(%rbx,%rdx,8)
add    $0x1,%rdx
cmp    %rdx,%rax
jne    1705 <compute_delay+0x595>
cmp    $0xffffffffffffffff,%rbp
jl     183e <compute_delay+0x6ce>
cmp    $0x4,%rax
jae    1743 <compute_delay+0x5d3>
xor    %ecx,%ecx
jmp    17ef <compute_delay+0x67f>
lea    0x8(,%rcx,8),%rsi
add    %r13,%rsi
lea    (%rbx,%rcx,8),%rdx
add    $0x8,%rdx
lea    (%r12,%rcx,8),%rcx
add    $0x8,%rcx
cmp    %rdx,%r13
setb   %dil
cmp    %rsi,%rbx
setb   %r8b
cmp    %rcx,%r13
setb   %dl
cmp    %rsi,%r12
setb   %sil
xor    %ecx,%ecx
test   %r8b,%dil
jne    17ef <compute_delay+0x67f>
and    %sil,%dl
jne    17ef <compute_delay+0x67f>
mov    %rax,%rcx
and    $0xfffffffffffffffc,%rcx
xor    %edx,%edx
xchg   %ax,%ax
movups (%rbx,%rdx,8),%xmm0
movups 0x10(%rbx,%rdx,8),%xmm1
movaps %xmm0,%xmm2
shufps $0x88,%xmm1,%xmm2
movups (%r12,%rdx,8),%xmm3
movups 0x10(%r12,%rdx,8),%xmm4
movaps %xmm3,%xmm5
shufps $0x88,%xmm4,%xmm5
shufps $0xdd,%xmm1,%xmm0
shufps $0xdd,%xmm4,%xmm3
movaps %xmm0,%xmm1
mulps  %xmm3,%xmm1
mulps  %xmm2,%xmm3
mulps  %xmm5,%xmm2
addps  %xmm1,%xmm2
mulps  %xmm5,%xmm0
subps  %xmm0,%xmm3
movaps %xmm2,%xmm0
unpcklps %xmm3,%xmm0
unpckhps %xmm3,%xmm2
movups %xmm2,0x10(%r13,%rdx,8)
movups %xmm0,0x0(%r13,%rdx,8)
add    $0x4,%rdx
cmp    %rdx,%rcx
jne    1790 <compute_delay+0x620>
jmp    1839 <compute_delay+0x6c9>
movss  (%rbx,%rcx,8),%xmm0
movss  0x4(%rbx,%rcx,8),%xmm1
mulss  0x4(%r12,%rcx,8),%xmm1
mulss  (%r12,%rcx,8),%xmm0
addss  %xmm1,%xmm0
movss  %xmm0,0x0(%r13,%rcx,8)
movss  (%rbx,%rcx,8),%xmm0
movss  0x4(%rbx,%rcx,8),%xmm1
mulss  0x4(%r12,%rcx,8),%xmm0
mulss  (%r12,%rcx,8),%xmm1
subss  %xmm1,%xmm0
movss  %xmm0,0x4(%r13,%rcx,8)
add    $0x1,%rcx
cmp    %rcx,%rax
jne    17ef <compute_delay+0x67f>
mov    %r13,%rdi
mov    %rbp,%rsi
call   1060 <RealIFFT@plt>
mov    0x50(%rsp),%rdx
movl   $0x0,(%rdx)
mov    0x60(%rsp),%rsi
test   %rsi,%rsi
jle    1923 <compute_delay+0x7b3>
mov    %rsi,%rax
neg    %rax
lea    0x0(,%rbp,4),%rcx
add    %r13,%rcx
xorpd  %xmm0,%xmm0
xor    %ebp,%ebp
movaps 0x790(%rip),%xmm1
movapd 0x798(%rip),%xmm2
movsd  0x58(%rsp),%xmm6
jmp    1895 <compute_delay+0x725>
inc    %rax
je     18cd <compute_delay+0x75d>
movss  (%rcx,%rax,4),%xmm3
andps  %xmm1,%xmm3
cvtss2sd %xmm3,%xmm3
divsd  %xmm6,%xmm3
movapd %xmm3,%xmm4
andpd  %xmm2,%xmm4
xorps  %xmm5,%xmm5
cvtss2sd %xmm0,%xmm5
ucomisd %xmm5,%xmm4
jbe    1890 <compute_delay+0x720>
xorps  %xmm0,%xmm0
cvtsd2ss %xmm3,%xmm0
andps  %xmm1,%xmm0
movss  %xmm0,(%rdx)
mov    %rax,%rbp
jmp    1890 <compute_delay+0x720>
test   %rsi,%rsi
jle    1925 <compute_delay+0x7b5>
xor    %eax,%eax
jmp    18e9 <compute_delay+0x779>
cs nopw 0x0(%rax,%rax,1)
add    $0x1,%rax
cmp    %rax,%rsi
je     1925 <compute_delay+0x7b5>
movss  0x0(%r13,%rax,4),%xmm3
andps  %xmm1,%xmm3
cvtss2sd %xmm3,%xmm3
divsd  %xmm6,%xmm3
movapd %xmm3,%xmm4
andpd  %xmm2,%xmm4
xorps  %xmm5,%xmm5
cvtss2sd %xmm0,%xmm5
ucomisd %xmm5,%xmm4
jbe    18e0 <compute_delay+0x770>
xorps  %xmm0,%xmm0
cvtsd2ss %xmm3,%xmm0
andps  %xmm1,%xmm0
movss  %xmm0,(%rdx)
mov    %rax,%rbp
jmp    18e0 <compute_delay+0x770>
xor    %ebp,%ebp
mov    %rbx,%rdi
call   1080 <safe_free@plt>
mov    %r12,%rdi
call   1080 <safe_free@plt>
mov    %r13,%rdi
call   1080 <safe_free@plt>
mov    %ebp,%eax
add    $0x68,%rsp
pop    %rbx
pop    %r12
pop    %r13
pop    %r14
pop    %r15
pop    %rbp
ret

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

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