void ft(double *real, double *imag, int n, int sign) {
  int j, k;
  static double *work_r = 0, *work_i = 0;
  double sum_r, sum_i, norm;
  double w_r, w_i, ww_r, ww_i, temp_r;
  if (!work_r) {
    work_r = (double *)Malloc(
        __func__,
        "/scratch/repos/new/home/jordi_armengol_estape/c-scraper/outputs/"
        "2022-01-22/02-19-57/repos/AZed/cdo/refs/heads/master/src/statistic.c",
        556, (n * sizeof(double)));
  }
  if (!work_i) {
    work_i = (double *)Malloc(
        __func__,
        "/scratch/repos/new/home/jordi_armengol_estape/c-scraper/outputs/"
        "2022-01-22/02-19-57/repos/AZed/cdo/refs/heads/master/src/statistic.c",
        561, (n * sizeof(double)));
  }
  for (k = 0; k < n; k++) {
    w_r = cos(2 * 3.14159265358979323846 * k / n);
    w_i = sin(2 * 3.14159265358979323846 * k / n) * sign;
    ww_r = 1;
    ww_i = 0;
    sum_r = 0;
    sum_i = 0;
    for (j = 0; j < n; j++) {
      sum_r += real[j] * ww_r - imag[j] * ww_i;
      sum_i += real[j] * ww_i + imag[j] * ww_r;
      temp_r = ww_r;
      ww_r = ww_r * w_r - ww_i * w_i;
      ww_i = temp_r * w_i + ww_i * w_r;
    }
    work_r[k] = sum_r;
    work_i[k] = sum_i;
  }
  norm = 1. / sqrt(n);
  for (k = 0; k < n; k++) {
    real[k] = work_r[k] * norm;
    imag[k] = work_i[k] * norm;
  }
}


x86 assembly (clang, -O0):
<ft>:
push   %rbp
mov    %rsp,%rbp
sub    $0x60,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %edx,-0x14(%rbp)
mov    %ecx,-0x18(%rbp)
cmpq   $0x0,0x2eea(%rip)
jne    118f <ft+0x4f>
movslq -0x14(%rbp),%rcx
shl    $0x3,%rcx
lea    0xe9d(%rip),%rdi
lea    0xe99(%rip),%rsi
mov    $0x22c,%edx
mov    $0x0,%al
call   1030 <Malloc@plt>
cltq
mov    %rax,0x2eb9(%rip)
cmpq   $0x0,0x2eb9(%rip)
jne    11c8 <ft+0x88>
movslq -0x14(%rbp),%rcx
shl    $0x3,%rcx
lea    0xe64(%rip),%rdi
lea    0xe60(%rip),%rsi
mov    $0x231,%edx
mov    $0x0,%al
call   1030 <Malloc@plt>
cltq
mov    %rax,0x2e88(%rip)
movl   $0x0,-0x20(%rbp)
mov    -0x20(%rbp),%eax
cmp    -0x14(%rbp),%eax
jge    1390 <ft+0x250>
cvtsi2sdl -0x20(%rbp),%xmm1
movsd  0xe20(%rip),%xmm0
mulsd  %xmm1,%xmm0
cvtsi2sdl -0x14(%rbp),%xmm1
divsd  %xmm1,%xmm0
call   1050 <cos@plt>
movsd  %xmm0,-0x40(%rbp)
cvtsi2sdl -0x20(%rbp),%xmm1
movsd  0xdfc(%rip),%xmm0
mulsd  %xmm1,%xmm0
cvtsi2sdl -0x14(%rbp),%xmm1
divsd  %xmm1,%xmm0
call   1040 <sin@plt>
cvtsi2sdl -0x18(%rbp),%xmm1
mulsd  %xmm1,%xmm0
movsd  %xmm0,-0x48(%rbp)
movsd  0xdcc(%rip),%xmm0
movsd  %xmm0,-0x50(%rbp)
xorps  %xmm0,%xmm0
movsd  %xmm0,-0x58(%rbp)
xorps  %xmm0,%xmm0
movsd  %xmm0,-0x28(%rbp)
xorps  %xmm0,%xmm0
movsd  %xmm0,-0x30(%rbp)
movl   $0x0,-0x1c(%rbp)
mov    -0x1c(%rbp),%eax
cmp    -0x14(%rbp),%eax
jge    1358 <ft+0x218>
mov    -0x8(%rbp),%rax
movslq -0x1c(%rbp),%rcx
movsd  (%rax,%rcx,8),%xmm0
movsd  -0x50(%rbp),%xmm2
mov    -0x10(%rbp),%rax
movslq -0x1c(%rbp),%rcx
movsd  (%rax,%rcx,8),%xmm1
mulsd  -0x58(%rbp),%xmm1
movq   %xmm1,%rax
movabs $0x8000000000000000,%rcx
xor    %rcx,%rax
movq   %rax,%xmm1
mulsd  %xmm2,%xmm0
addsd  %xmm1,%xmm0
addsd  -0x28(%rbp),%xmm0
movsd  %xmm0,-0x28(%rbp)
mov    -0x8(%rbp),%rax
movslq -0x1c(%rbp),%rcx
movsd  (%rax,%rcx,8),%xmm0
movsd  -0x58(%rbp),%xmm2
mov    -0x10(%rbp),%rax
movslq -0x1c(%rbp),%rcx
movsd  (%rax,%rcx,8),%xmm1
mulsd  -0x50(%rbp),%xmm1
mulsd  %xmm2,%xmm0
addsd  %xmm1,%xmm0
addsd  -0x30(%rbp),%xmm0
movsd  %xmm0,-0x30(%rbp)
movsd  -0x50(%rbp),%xmm0
movsd  %xmm0,-0x60(%rbp)
movsd  -0x50(%rbp),%xmm0
movsd  -0x40(%rbp),%xmm2
movsd  -0x58(%rbp),%xmm1
mulsd  -0x48(%rbp),%xmm1
movq   %xmm1,%rax
movabs $0x8000000000000000,%rcx
xor    %rcx,%rax
movq   %rax,%xmm1
mulsd  %xmm2,%xmm0
addsd  %xmm1,%xmm0
movsd  %xmm0,-0x50(%rbp)
movsd  -0x60(%rbp),%xmm0
movsd  -0x48(%rbp),%xmm2
movsd  -0x58(%rbp),%xmm1
mulsd  -0x40(%rbp),%xmm1
mulsd  %xmm2,%xmm0
addsd  %xmm1,%xmm0
movsd  %xmm0,-0x58(%rbp)
mov    -0x1c(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x1c(%rbp)
jmp    1258 <ft+0x118>
movsd  -0x28(%rbp),%xmm0
mov    0x2ce4(%rip),%rax
movslq -0x20(%rbp),%rcx
movsd  %xmm0,(%rax,%rcx,8)
movsd  -0x30(%rbp),%xmm0
mov    0x2cd7(%rip),%rax
movslq -0x20(%rbp),%rcx
movsd  %xmm0,(%rax,%rcx,8)
mov    -0x20(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x20(%rbp)
jmp    11cf <ft+0x8f>
cvtsi2sdl -0x14(%rbp),%xmm0
call   1060 <sqrt@plt>
movaps %xmm0,%xmm1
movsd  0xc5b(%rip),%xmm0
divsd  %xmm1,%xmm0
movsd  %xmm0,-0x38(%rbp)
movl   $0x0,-0x20(%rbp)
mov    -0x20(%rbp),%eax
cmp    -0x14(%rbp),%eax
jge    1413 <ft+0x2d3>
mov    0x2c80(%rip),%rax
movslq -0x20(%rbp),%rcx
movsd  (%rax,%rcx,8),%xmm0
mulsd  -0x38(%rbp),%xmm0
mov    -0x8(%rbp),%rax
movslq -0x20(%rbp),%rcx
movsd  %xmm0,(%rax,%rcx,8)
mov    0x2c66(%rip),%rax
movslq -0x20(%rbp),%rcx
movsd  (%rax,%rcx,8),%xmm0
mulsd  -0x38(%rbp),%xmm0
mov    -0x10(%rbp),%rax
movslq -0x20(%rbp),%rcx
movsd  %xmm0,(%rax,%rcx,8)
mov    -0x20(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x20(%rbp)
jmp    13b5 <ft+0x275>
add    $0x60,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<ft>:
push   %rbp
push   %r15
push   %r14
push   %r13
push   %r12
push   %rbx
sub    $0x28,%rsp
mov    %ecx,%r15d
mov    %edx,%r12d
mov    %rsi,%r14
mov    %rdi,%r13
cmpq   $0x0,0x2ee6(%rip)
je     12bc <ft+0x17c>
cmpq   $0x0,0x2ee0(%rip)
je     12f4 <ft+0x1b4>
cvtsi2sd %r12d,%xmm0
test   %r12d,%r12d
jle    1323 <ft+0x1e3>
cvtsi2sd %r15d,%xmm1
movsd  %xmm1,0x10(%rsp)
mov    %r12d,%ebp
xor    %ebx,%ebx
movsd  %xmm0,0x18(%rsp)
nopw   0x0(%rax,%rax,1)
xorps  %xmm1,%xmm1
cvtsi2sd %ebx,%xmm1
mulsd  0xe51(%rip),%xmm1
divsd  %xmm0,%xmm1
movsd  %xmm1,0x20(%rsp)
movapd %xmm1,%xmm0
call   1050 <cos@plt>
movapd %xmm0,(%rsp)
movsd  0x20(%rsp),%xmm0
call   1040 <sin@plt>
movapd 0xe36(%rip),%xmm2
mulsd  0x10(%rsp),%xmm0
movapd (%rsp),%xmm1
movapd %xmm1,%xmm8
unpcklpd %xmm0,%xmm8
unpcklpd %xmm1,%xmm0
xorpd  %xmm1,%xmm1
xor    %eax,%eax
movsd  0xe07(%rip),%xmm3
cs nopw 0x0(%rax,%rax,1)
nopl   0x0(%rax,%rax,1)
movsd  (%r14,%rax,8),%xmm4
movapd %xmm4,%xmm5
xorpd  %xmm2,%xmm5
movapd %xmm3,%xmm6
unpckhpd %xmm3,%xmm6
movapd %xmm3,%xmm7
shufpd $0x1,%xmm3,%xmm7
unpcklpd %xmm4,%xmm5
mulpd  %xmm7,%xmm5
movsd  0x0(%r13,%rax,8),%xmm4
unpcklpd %xmm4,%xmm4
mulpd  %xmm3,%xmm4
addpd  %xmm5,%xmm4
addpd  %xmm4,%xmm1
xorpd  %xmm2,%xmm6
shufpd $0x2,%xmm3,%xmm6
mulpd  %xmm0,%xmm6
unpcklpd %xmm3,%xmm3
mulpd  %xmm8,%xmm3
addpd  %xmm6,%xmm3
add    $0x1,%rax
cmp    %rax,%rbp
jne    1210 <ft+0xd0>
mov    0x2dd0(%rip),%rax
movlpd %xmm1,(%rax,%rbx,8)
mov    0x2dcc(%rip),%rax
movhpd %xmm1,(%rax,%rbx,8)
add    $0x1,%rbx
cmp    %rbp,%rbx
movsd  0x18(%rsp),%xmm0
jne    11a0 <ft+0x60>
xorpd  %xmm1,%xmm1
ucomisd %xmm1,%xmm0
jb     1344 <ft+0x204>
sqrtsd %xmm0,%xmm0
test   %r12d,%r12d
jg     1352 <ft+0x212>
jmp    15a2 <ft+0x462>
movslq %r12d,%rcx
shl    $0x3,%rcx
lea    0xd56(%rip),%rdi
lea    0xd52(%rip),%rsi
mov    $0x22c,%edx
xor    %eax,%eax
call   1030 <Malloc@plt>
cltq
mov    %rax,0x2d62(%rip)
cmpq   $0x0,0x2d62(%rip)
jne    1176 <ft+0x36>
movslq %r12d,%rcx
shl    $0x3,%rcx
lea    0xd1e(%rip),%rdi
lea    0xd1a(%rip),%rsi
mov    $0x231,%edx
xor    %eax,%eax
call   1030 <Malloc@plt>
cltq
mov    %rax,0x2d32(%rip)
jmp    1176 <ft+0x36>
xorpd  %xmm1,%xmm1
ucomisd %xmm1,%xmm0
jae    15a2 <ft+0x462>
add    $0x28,%rsp
pop    %rbx
pop    %r12
pop    %r13
pop    %r14
pop    %r15
pop    %rbp
jmp    1060 <sqrt@plt>
call   1060 <sqrt@plt>
test   %r12d,%r12d
jle    15a2 <ft+0x462>
movsd  0xcae(%rip),%xmm1
divsd  %xmm0,%xmm1
mov    0x2ce3(%rip),%rax
mov    0x2ce4(%rip),%rcx
cmp    $0x4,%r12d
jae    13ff <ft+0x2bf>
xor    %edx,%edx
mov    %rdx,%rsi
not    %rsi
test   $0x1,%bpl
je     13a7 <ft+0x267>
movsd  (%rax,%rdx,8),%xmm0
mulsd  %xmm1,%xmm0
movsd  %xmm0,0x0(%r13,%rdx,8)
movsd  (%rcx,%rdx,8),%xmm0
mulsd  %xmm1,%xmm0
movsd  %xmm0,(%r14,%rdx,8)
or     $0x1,%rdx
add    %rbp,%rsi
je     15a2 <ft+0x462>
movsd  (%rax,%rdx,8),%xmm0
mulsd  %xmm1,%xmm0
movsd  %xmm0,0x0(%r13,%rdx,8)
movsd  (%rcx,%rdx,8),%xmm0
mulsd  %xmm1,%xmm0
movsd  %xmm0,(%r14,%rdx,8)
movsd  0x8(%rax,%rdx,8),%xmm0
mulsd  %xmm1,%xmm0
movsd  %xmm0,0x8(%r13,%rdx,8)
movsd  0x8(%rcx,%rdx,8),%xmm0
mulsd  %xmm1,%xmm0
movsd  %xmm0,0x8(%r14,%rdx,8)
add    $0x2,%rdx
cmp    %rdx,%rbp
jne    13b0 <ft+0x270>
jmp    15a2 <ft+0x462>
lea    (%r14,%rbp,8),%rdx
cmp    %r13,%rdx
seta   (%rsp)
lea    0x0(,%rbp,8),%rdi
add    %r13,%rdi
cmp    %r14,%rdi
seta   %r15b
lea    (%rax,%rbp,8),%rsi
cmp    %r13,%rsi
seta   %r12b
lea    (%rcx,%rbp,8),%rbx
cmp    %rdi,%rax
setb   %r9b
cmp    %r13,%rbx
seta   %r11b
cmp    %rdi,%rcx
setb   %r10b
cmp    %r14,%rsi
seta   %dil
cmp    %rdx,%rax
setb   %sil
cmp    %r14,%rbx
seta   %r8b
cmp    %rdx,%rcx
setb   %bl
xor    %edx,%edx
test   %r15b,(%rsp)
jne    1378 <ft+0x238>
and    %r9b,%r12b
jne    1378 <ft+0x238>
and    %r10b,%r11b
jne    1378 <ft+0x238>
and    %sil,%dil
jne    1378 <ft+0x238>
and    %bl,%r8b
jne    1378 <ft+0x238>
mov    %ebp,%edx
and    $0xfffffffc,%edx
movapd %xmm1,%xmm0
unpcklpd %xmm1,%xmm0
lea    -0x4(%rdx),%rsi
mov    %rsi,%rbx
shr    $0x2,%rbx
add    $0x1,%rbx
test   %rsi,%rsi
je     15b1 <ft+0x471>
mov    %rbx,%rdi
and    $0xfffffffffffffffe,%rdi
xor    %esi,%esi
nopl   0x0(%rax)
movupd (%rax,%rsi,8),%xmm2
movupd 0x10(%rax,%rsi,8),%xmm3
mulpd  %xmm0,%xmm2
mulpd  %xmm0,%xmm3
movupd %xmm2,0x0(%r13,%rsi,8)
movupd %xmm3,0x10(%r13,%rsi,8)
movupd (%rcx,%rsi,8),%xmm2
movupd 0x10(%rcx,%rsi,8),%xmm3
mulpd  %xmm0,%xmm2
mulpd  %xmm0,%xmm3
movupd %xmm2,(%r14,%rsi,8)
movupd %xmm3,0x10(%r14,%rsi,8)
movupd 0x20(%rax,%rsi,8),%xmm2
movupd 0x30(%rax,%rsi,8),%xmm3
mulpd  %xmm0,%xmm2
mulpd  %xmm0,%xmm3
movupd %xmm2,0x20(%r13,%rsi,8)
movupd %xmm3,0x30(%r13,%rsi,8)
movupd 0x20(%rcx,%rsi,8),%xmm2
movupd 0x30(%rcx,%rsi,8),%xmm3
mulpd  %xmm0,%xmm2
mulpd  %xmm0,%xmm3
movupd %xmm2,0x20(%r14,%rsi,8)
movupd %xmm3,0x30(%r14,%rsi,8)
add    $0x8,%rsi
add    $0xfffffffffffffffe,%rdi
jne    14c0 <ft+0x380>
test   $0x1,%bl
je     1599 <ft+0x459>
movupd (%rax,%rsi,8),%xmm2
movupd 0x10(%rax,%rsi,8),%xmm3
mulpd  %xmm0,%xmm2
mulpd  %xmm0,%xmm3
movupd %xmm2,0x0(%r13,%rsi,8)
movupd %xmm3,0x10(%r13,%rsi,8)
movupd (%rcx,%rsi,8),%xmm2
movupd 0x10(%rcx,%rsi,8),%xmm3
mulpd  %xmm0,%xmm2
mulpd  %xmm0,%xmm3
movupd %xmm2,(%r14,%rsi,8)
movupd %xmm3,0x10(%r14,%rsi,8)
cmp    %rbp,%rdx
jne    1378 <ft+0x238>
add    $0x28,%rsp
pop    %rbx
pop    %r12
pop    %r13
pop    %r14
pop    %r15
pop    %rbp
ret
xor    %esi,%esi
test   $0x1,%bl
jne    1558 <ft+0x418>
jmp    1599 <ft+0x459>

LLVM IR (-O0):
@ft.work_r = internal global double* null
@ft.work_i = internal global double* null
@__func__.ft = [3 x i8] c"ft\00"
@.str = [133 x i8] c"/scratch/repos/new/home/jordi_armengol_estape/c-scraper/outputs/2022-01-22/02-19-57/repos/AZed/cdo/refs/heads/master/src/statistic.c\00"
define void @ft(double* %0, double* %1, i32 %2, i32 %3) {
%5 = alloca double*
%6 = alloca double*
%7 = alloca i32
%8 = alloca i32
%9 = alloca i32
%10 = alloca i32
%11 = alloca double
%12 = alloca double
%13 = alloca double
%14 = alloca double
%15 = alloca double
%16 = alloca double
%17 = alloca double
%18 = alloca double
store double* %0, double** %5
store double* %1, double** %6
store i32 %2, i32* %7
store i32 %3, i32* %8
%19 = load double*, double** @ft.work_r
%20 = icmp ne double* %19, null
br i1 %20, label %28, label %21
21: ; preds = %4
%22 = load i32, i32* %7
%23 = sext i32 %22 to i64
%24 = mul i64 %23, 8
%25 = call i32 (i8*, i8*, i32, i64, ...) bitcast (i32 (...)* @Malloc to i32 (i8*, i8*, i32, i64, ...)*)(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @__func__.ft, i64 0, i64 0), i8* getelementptr inbounds ([133 x i8], [133 x i8]* @.str, i64 0, i64 0), i32 556, i64 %24)
%26 = sext i32 %25 to i64
%27 = inttoptr i64 %26 to double*
store double* %27, double** @ft.work_r
br label %28
28: ; preds = %21, %4
%29 = load double*, double** @ft.work_i
%30 = icmp ne double* %29, null
br i1 %30, label %38, label %31
31: ; preds = %28
%32 = load i32, i32* %7
%33 = sext i32 %32 to i64
%34 = mul i64 %33, 8
%35 = call i32 (i8*, i8*, i32, i64, ...) bitcast (i32 (...)* @Malloc to i32 (i8*, i8*, i32, i64, ...)*)(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @__func__.ft, i64 0, i64 0), i8* getelementptr inbounds ([133 x i8], [133 x i8]* @.str, i64 0, i64 0), i32 561, i64 %34)
%36 = sext i32 %35 to i64
%37 = inttoptr i64 %36 to double*
store double* %37, double** @ft.work_i
br label %38
38: ; preds = %31, %28
store i32 0, i32* %10
br label %39
39: ; preds = %127, %38
%40 = load i32, i32* %10
%41 = load i32, i32* %7
%42 = icmp slt i32 %40, %41
br i1 %42, label %43, label %130
43: ; preds = %39
%44 = load i32, i32* %10
%45 = sitofp i32 %44 to double
%46 = fmul double 0x401921FB54442D18, %45
%47 = load i32, i32* %7
%48 = sitofp i32 %47 to double
%49 = fdiv double %46, %48
%50 = call double @cos(double %49)
store double %50, double* %14
%51 = load i32, i32* %10
%52 = sitofp i32 %51 to double
%53 = fmul double 0x401921FB54442D18, %52
%54 = load i32, i32* %7
%55 = sitofp i32 %54 to double
%56 = fdiv double %53, %55
%57 = call double @sin(double %56)
%58 = load i32, i32* %8
%59 = sitofp i32 %58 to double
%60 = fmul double %57, %59
store double %60, double* %15
store double 1.000000e+00, double* %16
store double 0.000000e+00, double* %17
store double 0.000000e+00, double* %11
store double 0.000000e+00, double* %12
store i32 0, i32* %9
br label %61
61: ; preds = %113, %43
%62 = load i32, i32* %9
%63 = load i32, i32* %7
%64 = icmp slt i32 %62, %63
br i1 %64, label %65, label %116
65: ; preds = %61
%66 = load double*, double** %5
%67 = load i32, i32* %9
%68 = sext i32 %67 to i64
%69 = getelementptr inbounds double, double* %66, i64 %68
%70 = load double, double* %69
%71 = load double, double* %16
%72 = load double*, double** %6
%73 = load i32, i32* %9
%74 = sext i32 %73 to i64
%75 = getelementptr inbounds double, double* %72, i64 %74
%76 = load double, double* %75
%77 = load double, double* %17
%78 = fmul double %76, %77
%79 = fneg double %78
%80 = call double @llvm.fmuladd.f64(double %70, double %71, double %79)
%81 = load double, double* %11
%82 = fadd double %81, %80
store double %82, double* %11
%83 = load double*, double** %5
%84 = load i32, i32* %9
%85 = sext i32 %84 to i64
%86 = getelementptr inbounds double, double* %83, i64 %85
%87 = load double, double* %86
%88 = load double, double* %17
%89 = load double*, double** %6
%90 = load i32, i32* %9
%91 = sext i32 %90 to i64
%92 = getelementptr inbounds double, double* %89, i64 %91
%93 = load double, double* %92
%94 = load double, double* %16
%95 = fmul double %93, %94
%96 = call double @llvm.fmuladd.f64(double %87, double %88, double %95)
%97 = load double, double* %12
%98 = fadd double %97, %96
store double %98, double* %12
%99 = load double, double* %16
store double %99, double* %18
%100 = load double, double* %16
%101 = load double, double* %14
%102 = load double, double* %17
%103 = load double, double* %15
%104 = fmul double %102, %103
%105 = fneg double %104
%106 = call double @llvm.fmuladd.f64(double %100, double %101, double %105)
store double %106, double* %16
%107 = load double, double* %18
%108 = load double, double* %15
%109 = load double, double* %17
%110 = load double, double* %14
%111 = fmul double %109, %110
%112 = call double @llvm.fmuladd.f64(double %107, double %108, double %111)
store double %112, double* %17
br label %113
113: ; preds = %65
%114 = load i32, i32* %9
%115 = add nsw i32 %114, 1
store i32 %115, i32* %9
br label %61
116: ; preds = %61
%117 = load double, double* %11
%118 = load double*, double** @ft.work_r
%119 = load i32, i32* %10
%120 = sext i32 %119 to i64
%121 = getelementptr inbounds double, double* %118, i64 %120
store double %117, double* %121
%122 = load double, double* %12
%123 = load double*, double** @ft.work_i
%124 = load i32, i32* %10
%125 = sext i32 %124 to i64
%126 = getelementptr inbounds double, double* %123, i64 %125
store double %122, double* %126
br label %127
127: ; preds = %116
%128 = load i32, i32* %10
%129 = add nsw i32 %128, 1
store i32 %129, i32* %10
br label %39
130: ; preds = %39
%131 = load i32, i32* %7
%132 = sitofp i32 %131 to double
%133 = call double @sqrt(double %132)
%134 = fdiv double 1.000000e+00, %133
store double %134, double* %13
store i32 0, i32* %10
br label %135
135: ; preds = %162, %130
%136 = load i32, i32* %10
%137 = load i32, i32* %7
%138 = icmp slt i32 %136, %137
br i1 %138, label %139, label %165
139: ; preds = %135
%140 = load double*, double** @ft.work_r
%141 = load i32, i32* %10
%142 = sext i32 %141 to i64
%143 = getelementptr inbounds double, double* %140, i64 %142
%144 = load double, double* %143
%145 = load double, double* %13
%146 = fmul double %144, %145
%147 = load double*, double** %5
%148 = load i32, i32* %10
%149 = sext i32 %148 to i64
%150 = getelementptr inbounds double, double* %147, i64 %149
store double %146, double* %150
%151 = load double*, double** @ft.work_i
%152 = load i32, i32* %10
%153 = sext i32 %152 to i64
%154 = getelementptr inbounds double, double* %151, i64 %153
%155 = load double, double* %154
%156 = load double, double* %13
%157 = fmul double %155, %156
%158 = load double*, double** %6
%159 = load i32, i32* %10
%160 = sext i32 %159 to i64
%161 = getelementptr inbounds double, double* %158, i64 %160
store double %157, double* %161
br label %162
162: ; preds = %139
%163 = load i32, i32* %10
%164 = add nsw i32 %163, 1
store i32 %164, i32* %10
br label %135
165: ; preds = %135
ret void
}

LLVM IR (-O2):
@ft.work_r = internal unnamed_addr global double* null
@ft.work_i = internal unnamed_addr global double* null
@__func__.ft = [3 x i8] c"ft\00"
@.str = [133 x i8] c"/scratch/repos/new/home/jordi_armengol_estape/c-scraper/outputs/2022-01-22/02-19-57/repos/AZed/cdo/refs/heads/master/src/statistic.c\00"
define void @ft(double* nocapture %0, double* nocapture %1, i32 %2, i32 %3) {
%5 = load double*, double** @ft.work_r
%6 = icmp eq double* %5, null
br i1 %6, label %7, label %13
7: ; preds = %4
%8 = sext i32 %2 to i64
%9 = shl nsw i64 %8, 3
%10 = tail call i32 (i8*, i8*, i32, i64, ...) bitcast (i32 (...)* @Malloc to i32 (i8*, i8*, i32, i64, ...)*)(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @__func__.ft, i64 0, i64 0), i8* getelementptr inbounds ([133 x i8], [133 x i8]* @.str, i64 0, i64 0), i32 556, i64 %9)
%11 = sext i32 %10 to i64
%12 = inttoptr i64 %11 to double*
store double* %12, double** @ft.work_r
br label %13
13: ; preds = %7, %4
%14 = load double*, double** @ft.work_i
%15 = icmp eq double* %14, null
br i1 %15, label %16, label %22
16: ; preds = %13
%17 = sext i32 %2 to i64
%18 = shl nsw i64 %17, 3
%19 = tail call i32 (i8*, i8*, i32, i64, ...) bitcast (i32 (...)* @Malloc to i32 (i8*, i8*, i32, i64, ...)*)(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @__func__.ft, i64 0, i64 0), i8* getelementptr inbounds ([133 x i8], [133 x i8]* @.str, i64 0, i64 0), i32 561, i64 %18)
%20 = sext i32 %19 to i64
%21 = inttoptr i64 %20 to double*
store double* %21, double** @ft.work_i
br label %22
22: ; preds = %16, %13
%23 = icmp sgt i32 %2, 0
%24 = sitofp i32 %2 to double
br i1 %23, label %27, label %25
25: ; preds = %22
%26 = tail call double @sqrt(double %24)
br label %247
27: ; preds = %22
%28 = sitofp i32 %3 to double
%29 = zext i32 %2 to i64
br label %30
30: ; preds = %68, %27
%31 = phi i64 [ 0, %27 ], [ %75, %68 ]
%32 = trunc i64 %31 to i32
%33 = sitofp i32 %32 to double
%34 = fmul double %33, 0x401921FB54442D18
%35 = fdiv double %34, %24
%36 = tail call double @cos(double %35)
%37 = tail call double @sin(double %35)
%38 = fmul double %37, %28
%39 = insertelement <2 x double> poison, double %36, i64 0
%40 = insertelement <2 x double> %39, double %38, i64 1
%41 = insertelement <2 x double> poison, double %38, i64 0
%42 = insertelement <2 x double> %41, double %36, i64 1
br label %43
43: ; preds = %30, %43
%44 = phi i64 [ 0, %30 ], [ %66, %43 ]
%45 = phi <2 x double> [ zeroinitializer, %30 ], [ %60, %43 ]
%46 = phi <2 x double> [ <double 1.000000e+00, double 0.000000e+00>, %30 ], [ %65, %43 ]
%47 = getelementptr inbounds double, double* %0, i64 %44
%48 = load double, double* %47
%49 = getelementptr inbounds double, double* %1, i64 %44
%50 = load double, double* %49
%51 = fneg double %50
%52 = extractelement <2 x double> %46, i64 1
%53 = shufflevector <2 x double> %46, <2 x double> undef, <2 x i32> <i32 1, i32 0>
%54 = insertelement <2 x double> poison, double %51, i64 0
%55 = insertelement <2 x double> %54, double %50, i64 1
%56 = fmul <2 x double> %53, %55
%57 = insertelement <2 x double> poison, double %48, i64 0
%58 = shufflevector <2 x double> %57, <2 x double> poison, <2 x i32> zeroinitializer
%59 = call <2 x double> @llvm.fmuladd.v2f64(<2 x double> %58, <2 x double> %46, <2 x double> %56)
%60 = fadd <2 x double> %45, %59
%61 = fneg double %52
%62 = insertelement <2 x double> %46, double %61, i64 0
%63 = fmul <2 x double> %42, %62
%64 = shufflevector <2 x double> %46, <2 x double> undef, <2 x i32> zeroinitializer
%65 = call <2 x double> @llvm.fmuladd.v2f64(<2 x double> %64, <2 x double> %40, <2 x double> %63)
%66 = add nuw nsw i64 %44, 1
%67 = icmp eq i64 %66, %29
br i1 %67, label %68, label %43
68: ; preds = %43
%69 = load double*, double** @ft.work_r
%70 = getelementptr inbounds double, double* %69, i64 %31
%71 = extractelement <2 x double> %60, i64 0
store double %71, double* %70
%72 = load double*, double** @ft.work_i
%73 = getelementptr inbounds double, double* %72, i64 %31
%74 = extractelement <2 x double> %60, i64 1
store double %74, double* %73
%75 = add nuw nsw i64 %31, 1
%76 = icmp eq i64 %75, %29
br i1 %76, label %77, label %30
77: ; preds = %68
%78 = tail call double @sqrt(double %24)
%79 = fdiv double 1.000000e+00, %78
br i1 %23, label %80, label %247
80: ; preds = %77
%81 = load double*, double** @ft.work_r
%82 = load double*, double** @ft.work_i
%83 = zext i32 %2 to i64
%84 = icmp ult i32 %2, 4
br i1 %84, label %207, label %85
85: ; preds = %80
%86 = getelementptr double, double* %0, i64 %29
%87 = getelementptr double, double* %1, i64 %29
%88 = getelementptr double, double* %81, i64 %29
%89 = getelementptr double, double* %82, i64 %29
%90 = icmp ugt double* %87, %0
%91 = icmp ugt double* %86, %1
%92 = and i1 %90, %91
%93 = icmp ugt double* %88, %0
%94 = icmp ult double* %81, %86
%95 = and i1 %93, %94
%96 = or i1 %92, %95
%97 = icmp ugt double* %89, %0
%98 = icmp ult double* %82, %86
%99 = and i1 %97, %98
%100 = or i1 %96, %99
%101 = icmp ugt double* %88, %1
%102 = icmp ult double* %81, %87
%103 = and i1 %101, %102
%104 = or i1 %100, %103
%105 = icmp ugt double* %89, %1
%106 = icmp ult double* %82, %87
%107 = and i1 %105, %106
%108 = or i1 %104, %107
br i1 %108, label %207, label %109
109: ; preds = %85
%110 = and i64 %29, 4294967292
%111 = insertelement <2 x double> poison, double %79, i64 0
%112 = shufflevector <2 x double> %111, <2 x double> poison, <2 x i32> zeroinitializer
%113 = insertelement <2 x double> poison, double %79, i64 0
%114 = shufflevector <2 x double> %113, <2 x double> poison, <2 x i32> zeroinitializer
%115 = add nsw i64 %110, -4
%116 = lshr exact i64 %115, 2
%117 = add nuw nsw i64 %116, 1
%118 = and i64 %117, 1
%119 = icmp eq i64 %115, 0
br i1 %119, label %177, label %120
120: ; preds = %109
%121 = and i64 %117, 9223372036854775806
br label %122
122: ; preds = %122, %120
%123 = phi i64 [ 0, %120 ], [ %174, %122 ]
%124 = phi i64 [ 0, %120 ], [ %175, %122 ]
%125 = getelementptr inbounds double, double* %81, i64 %123
%126 = bitcast double* %125 to <2 x double>*
%127 = load <2 x double>, <2 x double>* %126
%128 = getelementptr inbounds double, double* %125, i64 2
%129 = bitcast double* %128 to <2 x double>*
%130 = load <2 x double>, <2 x double>* %129
%131 = fmul <2 x double> %112, %127
%132 = fmul <2 x double> %114, %130
%133 = getelementptr inbounds double, double* %0, i64 %123
%134 = bitcast double* %133 to <2 x double>*
store <2 x double> %131, <2 x double>* %134
%135 = getelementptr inbounds double, double* %133, i64 2
%136 = bitcast double* %135 to <2 x double>*
store <2 x double> %132, <2 x double>* %136
%137 = getelementptr inbounds double, double* %82, i64 %123
%138 = bitcast double* %137 to <2 x double>*
%139 = load <2 x double>, <2 x double>* %138
%140 = getelementptr inbounds double, double* %137, i64 2
%141 = bitcast double* %140 to <2 x double>*
%142 = load <2 x double>, <2 x double>* %141
%143 = fmul <2 x double> %112, %139
%144 = fmul <2 x double> %114, %142
%145 = getelementptr inbounds double, double* %1, i64 %123
%146 = bitcast double* %145 to <2 x double>*
store <2 x double> %143, <2 x double>* %146
%147 = getelementptr inbounds double, double* %145, i64 2
%148 = bitcast double* %147 to <2 x double>*
store <2 x double> %144, <2 x double>* %148
%149 = or i64 %123, 4
%150 = getelementptr inbounds double, double* %81, i64 %149
%151 = bitcast double* %150 to <2 x double>*
%152 = load <2 x double>, <2 x double>* %151
%153 = getelementptr inbounds double, double* %150, i64 2
%154 = bitcast double* %153 to <2 x double>*
%155 = load <2 x double>, <2 x double>* %154
%156 = fmul <2 x double> %112, %152
%157 = fmul <2 x double> %114, %155
%158 = getelementptr inbounds double, double* %0, i64 %149
%159 = bitcast double* %158 to <2 x double>*
store <2 x double> %156, <2 x double>* %159
%160 = getelementptr inbounds double, double* %158, i64 2
%161 = bitcast double* %160 to <2 x double>*
store <2 x double> %157, <2 x double>* %161
%162 = getelementptr inbounds double, double* %82, i64 %149
%163 = bitcast double* %162 to <2 x double>*
%164 = load <2 x double>, <2 x double>* %163
%165 = getelementptr inbounds double, double* %162, i64 2
%166 = bitcast double* %165 to <2 x double>*
%167 = load <2 x double>, <2 x double>* %166
%168 = fmul <2 x double> %112, %164
%169 = fmul <2 x double> %114, %167
%170 = getelementptr inbounds double, double* %1, i64 %149
%171 = bitcast double* %170 to <2 x double>*
store <2 x double> %168, <2 x double>* %171
%172 = getelementptr inbounds double, double* %170, i64 2
%173 = bitcast double* %172 to <2 x double>*
store <2 x double> %169, <2 x double>* %173
%174 = add nuw i64 %123, 8
%175 = add i64 %124, 2
%176 = icmp eq i64 %175, %121
br i1 %176, label %177, label %122
177: ; preds = %122, %109
%178 = phi i64 [ 0, %109 ], [ %174, %122 ]
%179 = icmp eq i64 %118, 0
br i1 %179, label %205, label %180
180: ; preds = %177
%181 = getelementptr inbounds double, double* %81, i64 %178
%182 = bitcast double* %181 to <2 x double>*
%183 = load <2 x double>, <2 x double>* %182
%184 = getelementptr inbounds double, double* %181, i64 2
%185 = bitcast double* %184 to <2 x double>*
%186 = load <2 x double>, <2 x double>* %185
%187 = fmul <2 x double> %112, %183
%188 = fmul <2 x double> %114, %186
%189 = getelementptr inbounds double, double* %0, i64 %178
%190 = bitcast double* %189 to <2 x double>*
store <2 x double> %187, <2 x double>* %190
%191 = getelementptr inbounds double, double* %189, i64 2
%192 = bitcast double* %191 to <2 x double>*
store <2 x double> %188, <2 x double>* %192
%193 = getelementptr inbounds double, double* %82, i64 %178
%194 = bitcast double* %193 to <2 x double>*
%195 = load <2 x double>, <2 x double>* %194
%196 = getelementptr inbounds double, double* %193, i64 2
%197 = bitcast double* %196 to <2 x double>*
%198 = load <2 x double>, <2 x double>* %197
%199 = fmul <2 x double> %112, %195
%200 = fmul <2 x double> %114, %198
%201 = getelementptr inbounds double, double* %1, i64 %178
%202 = bitcast double* %201 to <2 x double>*
store <2 x double> %199, <2 x double>* %202
%203 = getelementptr inbounds double, double* %201, i64 2
%204 = bitcast double* %203 to <2 x double>*
store <2 x double> %200, <2 x double>* %204
br label %205
205: ; preds = %177, %180
%206 = icmp eq i64 %110, %29
br i1 %206, label %247, label %207
207: ; preds = %85, %80, %205
%208 = phi i64 [ 0, %85 ], [ 0, %80 ], [ %110, %205 ]
%209 = xor i64 %208, -1
%210 = and i64 %29, 1
%211 = icmp eq i64 %210, 0
br i1 %211, label %222, label %212
212: ; preds = %207
%213 = getelementptr inbounds double, double* %81, i64 %208
%214 = load double, double* %213
%215 = fmul double %79, %214
%216 = getelementptr inbounds double, double* %0, i64 %208
store double %215, double* %216
%217 = getelementptr inbounds double, double* %82, i64 %208
%218 = load double, double* %217
%219 = fmul double %79, %218
%220 = getelementptr inbounds double, double* %1, i64 %208
store double %219, double* %220
%221 = or i64 %208, 1
br label %222
222: ; preds = %212, %207
%223 = phi i64 [ %208, %207 ], [ %221, %212 ]
%224 = sub nsw i64 0, %29
%225 = icmp eq i64 %209, %224
br i1 %225, label %247, label %226
226: ; preds = %222, %226
%227 = phi i64 [ %245, %226 ], [ %223, %222 ]
%228 = getelementptr inbounds double, double* %81, i64 %227
%229 = load double, double* %228
%230 = fmul double %79, %229
%231 = getelementptr inbounds double, double* %0, i64 %227
store double %230, double* %231
%232 = getelementptr inbounds double, double* %82, i64 %227
%233 = load double, double* %232
%234 = fmul double %79, %233
%235 = getelementptr inbounds double, double* %1, i64 %227
store double %234, double* %235
%236 = add nuw nsw i64 %227, 1
%237 = getelementptr inbounds double, double* %81, i64 %236
%238 = load double, double* %237
%239 = fmul double %79, %238
%240 = getelementptr inbounds double, double* %0, i64 %236
store double %239, double* %240
%241 = getelementptr inbounds double, double* %82, i64 %236
%242 = load double, double* %241
%243 = fmul double %79, %242
%244 = getelementptr inbounds double, double* %1, i64 %236
store double %243, double* %244
%245 = add nuw nsw i64 %227, 2
%246 = icmp eq i64 %245, %83
br i1 %246, label %247, label %226
247: ; preds = %222, %226, %205, %25, %77
ret void
}