int kff_synthese_bk_ng(int anz_mer, double **leg_func, double *cos_la,
                       double *sin_la, int mindeg, int maxdeg, char spiegel,
                       double **c_lm, double **s_lm, double *f) {
  int l;
  int m;
  int k;
  int tri_ind;
  int sig_alt;
  int sig_alt_st;
  double cfac;
  double sfac;
  for (k = 0; k < anz_mer; k++)
    f[k] = 0.0;
  if (spiegel == 'S') {
    if (mindeg % 2 == 0)
      sig_alt_st = -1;
    else
      sig_alt_st = 1;
    for (l = mindeg; l <= maxdeg; l++) {
      sig_alt_st = -sig_alt_st;
      sig_alt = sig_alt_st;
      for (m = 0; m <= l; m++) {
        if (sig_alt > 0) {
          cfac = leg_func[l][m] * c_lm[l][m];
          sfac = leg_func[l][m] * s_lm[l][m];
        } else {
          cfac = -leg_func[l][m] * c_lm[l][m];
          sfac = -leg_func[l][m] * s_lm[l][m];
        }
        for (k = 0, tri_ind = 0; k < anz_mer; k++) {
          f[k] += (cfac * cos_la[tri_ind] + sfac * sin_la[tri_ind]);
          tri_ind += m;
          tri_ind %= anz_mer;
        }
        sig_alt = -sig_alt;
      }
    }
  } else {
    for (l = mindeg; l <= maxdeg; l++) {
      for (m = 0; m <= l; m++) {
        cfac = leg_func[l][m] * c_lm[l][m];
        sfac = leg_func[l][m] * s_lm[l][m];
        for (k = 0, tri_ind = 0; k < anz_mer; k++) {
          f[k] += (cfac * cos_la[tri_ind] + sfac * sin_la[tri_ind]);
          tri_ind += m;
          tri_ind %= anz_mer;
        }
      }
    }
  }
  return 0;
}


x86 assembly (clang, -O0):
<kff_synthese_bk_ng>:
push   %rbp
mov    %rsp,%rbp
mov    0x28(%rbp),%rax
mov    0x20(%rbp),%rax
mov    0x18(%rbp),%rax
mov    0x10(%rbp),%al
mov    %edi,-0x4(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %rdx,-0x18(%rbp)
mov    %rcx,-0x20(%rbp)
mov    %r8d,-0x24(%rbp)
mov    %r9d,-0x28(%rbp)
movl   $0x0,-0x34(%rbp)
mov    -0x34(%rbp),%eax
cmp    -0x4(%rbp),%eax
jge    115b <kff_synthese_bk_ng+0x5b>
mov    0x28(%rbp),%rax
movslq -0x34(%rbp),%rcx
xorps  %xmm0,%xmm0
movsd  %xmm0,(%rax,%rcx,8)
mov    -0x34(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x34(%rbp)
jmp    1131 <kff_synthese_bk_ng+0x31>
movsbl 0x10(%rbp),%eax
cmp    $0x53,%eax
jne    1364 <kff_synthese_bk_ng+0x264>
mov    -0x24(%rbp),%eax
mov    $0x2,%ecx
cltd
idiv   %ecx
cmp    $0x0,%edx
jne    1188 <kff_synthese_bk_ng+0x88>
movl   $0xffffffff,-0x40(%rbp)
jmp    118f <kff_synthese_bk_ng+0x8f>
movl   $0x1,-0x40(%rbp)
mov    -0x24(%rbp),%eax
mov    %eax,-0x2c(%rbp)
mov    -0x2c(%rbp),%eax
cmp    -0x28(%rbp),%eax
jg     135f <kff_synthese_bk_ng+0x25f>
xor    %eax,%eax
sub    -0x40(%rbp),%eax
mov    %eax,-0x40(%rbp)
mov    -0x40(%rbp),%eax
mov    %eax,-0x3c(%rbp)
movl   $0x0,-0x30(%rbp)
mov    -0x30(%rbp),%eax
cmp    -0x2c(%rbp),%eax
jg     134c <kff_synthese_bk_ng+0x24c>
cmpl   $0x0,-0x3c(%rbp)
jle    122f <kff_synthese_bk_ng+0x12f>
mov    -0x10(%rbp),%rax
movslq -0x2c(%rbp),%rcx
mov    (%rax,%rcx,8),%rax
movslq -0x30(%rbp),%rcx
movsd  (%rax,%rcx,8),%xmm0
mov    0x18(%rbp),%rax
movslq -0x2c(%rbp),%rcx
mov    (%rax,%rcx,8),%rax
movslq -0x30(%rbp),%rcx
mulsd  (%rax,%rcx,8),%xmm0
movsd  %xmm0,-0x48(%rbp)
mov    -0x10(%rbp),%rax
movslq -0x2c(%rbp),%rcx
mov    (%rax,%rcx,8),%rax
movslq -0x30(%rbp),%rcx
movsd  (%rax,%rcx,8),%xmm0
mov    0x20(%rbp),%rax
movslq -0x2c(%rbp),%rcx
mov    (%rax,%rcx,8),%rax
movslq -0x30(%rbp),%rcx
mulsd  (%rax,%rcx,8),%xmm0
movsd  %xmm0,-0x50(%rbp)
jmp    12bb <kff_synthese_bk_ng+0x1bb>
mov    -0x10(%rbp),%rax
movslq -0x2c(%rbp),%rcx
mov    (%rax,%rcx,8),%rax
movslq -0x30(%rbp),%rcx
movsd  (%rax,%rcx,8),%xmm0
movq   %xmm0,%rax
movabs $0x8000000000000000,%rcx
xor    %rcx,%rax
movq   %rax,%xmm0
mov    0x18(%rbp),%rax
movslq -0x2c(%rbp),%rcx
mov    (%rax,%rcx,8),%rax
movslq -0x30(%rbp),%rcx
mulsd  (%rax,%rcx,8),%xmm0
movsd  %xmm0,-0x48(%rbp)
mov    -0x10(%rbp),%rax
movslq -0x2c(%rbp),%rcx
mov    (%rax,%rcx,8),%rax
movslq -0x30(%rbp),%rcx
movsd  (%rax,%rcx,8),%xmm0
movq   %xmm0,%rax
movabs $0x8000000000000000,%rcx
xor    %rcx,%rax
movq   %rax,%xmm0
mov    0x20(%rbp),%rax
movslq -0x2c(%rbp),%rcx
mov    (%rax,%rcx,8),%rax
movslq -0x30(%rbp),%rcx
mulsd  (%rax,%rcx,8),%xmm0
movsd  %xmm0,-0x50(%rbp)
movl   $0x0,-0x34(%rbp)
movl   $0x0,-0x38(%rbp)
mov    -0x34(%rbp),%eax
cmp    -0x4(%rbp),%eax
jge    1336 <kff_synthese_bk_ng+0x236>
movsd  -0x48(%rbp),%xmm0
mov    -0x18(%rbp),%rax
movslq -0x38(%rbp),%rcx
movsd  (%rax,%rcx,8),%xmm2
movsd  -0x50(%rbp),%xmm1
mov    -0x20(%rbp),%rax
movslq -0x38(%rbp),%rcx
mulsd  (%rax,%rcx,8),%xmm1
mulsd  %xmm2,%xmm0
addsd  %xmm1,%xmm0
mov    0x28(%rbp),%rax
movslq -0x34(%rbp),%rcx
addsd  (%rax,%rcx,8),%xmm0
movsd  %xmm0,(%rax,%rcx,8)
mov    -0x30(%rbp),%eax
add    -0x38(%rbp),%eax
mov    %eax,-0x38(%rbp)
mov    -0x4(%rbp),%ecx
mov    -0x38(%rbp),%eax
cltd
idiv   %ecx
mov    %edx,-0x38(%rbp)
mov    -0x34(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x34(%rbp)
jmp    12c9 <kff_synthese_bk_ng+0x1c9>
xor    %eax,%eax
sub    -0x3c(%rbp),%eax
mov    %eax,-0x3c(%rbp)
mov    -0x30(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x30(%rbp)
jmp    11b6 <kff_synthese_bk_ng+0xb6>
jmp    1351 <kff_synthese_bk_ng+0x251>
mov    -0x2c(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x2c(%rbp)
jmp    1195 <kff_synthese_bk_ng+0x95>
jmp    148d <kff_synthese_bk_ng+0x38d>
mov    -0x24(%rbp),%eax
mov    %eax,-0x2c(%rbp)
mov    -0x2c(%rbp),%eax
cmp    -0x28(%rbp),%eax
jg     1488 <kff_synthese_bk_ng+0x388>
movl   $0x0,-0x30(%rbp)
mov    -0x30(%rbp),%eax
cmp    -0x2c(%rbp),%eax
jg     1475 <kff_synthese_bk_ng+0x375>
mov    -0x10(%rbp),%rax
movslq -0x2c(%rbp),%rcx
mov    (%rax,%rcx,8),%rax
movslq -0x30(%rbp),%rcx
movsd  (%rax,%rcx,8),%xmm0
mov    0x18(%rbp),%rax
movslq -0x2c(%rbp),%rcx
mov    (%rax,%rcx,8),%rax
movslq -0x30(%rbp),%rcx
mulsd  (%rax,%rcx,8),%xmm0
movsd  %xmm0,-0x48(%rbp)
mov    -0x10(%rbp),%rax
movslq -0x2c(%rbp),%rcx
mov    (%rax,%rcx,8),%rax
movslq -0x30(%rbp),%rcx
movsd  (%rax,%rcx,8),%xmm0
mov    0x20(%rbp),%rax
movslq -0x2c(%rbp),%rcx
mov    (%rax,%rcx,8),%rax
movslq -0x30(%rbp),%rcx
mulsd  (%rax,%rcx,8),%xmm0
movsd  %xmm0,-0x50(%rbp)
movl   $0x0,-0x34(%rbp)
movl   $0x0,-0x38(%rbp)
mov    -0x34(%rbp),%eax
cmp    -0x4(%rbp),%eax
jge    1462 <kff_synthese_bk_ng+0x362>
movsd  -0x48(%rbp),%xmm0
mov    -0x18(%rbp),%rax
movslq -0x38(%rbp),%rcx
movsd  (%rax,%rcx,8),%xmm2
movsd  -0x50(%rbp),%xmm1
mov    -0x20(%rbp),%rax
movslq -0x38(%rbp),%rcx
mulsd  (%rax,%rcx,8),%xmm1
mulsd  %xmm2,%xmm0
addsd  %xmm1,%xmm0
mov    0x28(%rbp),%rax
movslq -0x34(%rbp),%rcx
addsd  (%rax,%rcx,8),%xmm0
movsd  %xmm0,(%rax,%rcx,8)
mov    -0x30(%rbp),%eax
add    -0x38(%rbp),%eax
mov    %eax,-0x38(%rbp)
mov    -0x4(%rbp),%ecx
mov    -0x38(%rbp),%eax
cltd
idiv   %ecx
mov    %edx,-0x38(%rbp)
mov    -0x34(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x34(%rbp)
jmp    13f5 <kff_synthese_bk_ng+0x2f5>
jmp    1467 <kff_synthese_bk_ng+0x367>
mov    -0x30(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x30(%rbp)
jmp    137d <kff_synthese_bk_ng+0x27d>
jmp    147a <kff_synthese_bk_ng+0x37a>
mov    -0x2c(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x2c(%rbp)
jmp    136a <kff_synthese_bk_ng+0x26a>
jmp    148d <kff_synthese_bk_ng+0x38d>
xor    %eax,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<kff_synthese_bk_ng>:
push   %rbp
push   %r15
push   %r14
push   %r13
push   %r12
push   %rbx
sub    $0x28,%rsp
mov    %r9d,0x4(%rsp)
mov    %rcx,%r12
mov    %rdx,%r13
mov    %rsi,0x18(%rsp)
mov    %edi,%ebx
mov    0x78(%rsp),%rbp
mov    0x60(%rsp),%r14b
test   %edi,%edi
jle    1154 <kff_synthese_bk_ng+0x44>
mov    %ebx,%edx
shl    $0x3,%rdx
mov    %rbp,%rdi
xor    %esi,%esi
mov    %r8d,%r15d
call   1030 <memset@plt>
mov    %r15d,%r8d
mov    0x70(%rsp),%r9
mov    0x68(%rsp),%r15
cmp    $0x53,%r14b
jne    129e <kff_synthese_bk_ng+0x18e>
cmp    0x4(%rsp),%r8d
jg     12a5 <kff_synthese_bk_ng+0x195>
movslq %r8d,%rdi
and    $0x1,%r8d
cmp    $0x1,%r8d
sbb    %eax,%eax
or     $0x1,%eax
neg    %r8d
sbb    %ecx,%ecx
or     $0x1,%ecx
mov    %ecx,0x8(%rsp)
addl   $0x1,0x4(%rsp)
mov    %ebx,%ecx
movapd 0xe62(%rip),%xmm0
jmp    11be <kff_synthese_bk_ng+0xae>
mov    0x20(%rsp),%rsi
mov    %rsi,%rdi
mov    0x8(%rsp),%eax
mov    0x14(%rsp),%edx
mov    %edx,0x8(%rsp)
cmp    %esi,0x4(%rsp)
je     12a5 <kff_synthese_bk_ng+0x195>
mov    %eax,0x14(%rsp)
lea    0x1(%rdi),%rax
mov    %rax,0x20(%rsp)
test   %rdi,%rdi
js     11a0 <kff_synthese_bk_ng+0x90>
mov    0x20(%rsp),%esi
mov    0x18(%rsp),%rax
mov    (%rax,%rdi,8),%r14
xor    %r10d,%r10d
mov    0x8(%rsp),%r8d
jmp    11fc <kff_synthese_bk_ng+0xec>
nopw   0x0(%rax,%rax,1)
neg    %r8d
add    $0x1,%r10
cmp    %rsi,%r10
je     11a0 <kff_synthese_bk_ng+0x90>
movsd  (%r14,%r10,8),%xmm1
test   %r8d,%r8d
jle    1230 <kff_synthese_bk_ng+0x120>
mov    (%r15,%rdi,8),%rax
movsd  (%rax,%r10,8),%xmm2
mulsd  %xmm1,%xmm2
mov    (%r9,%rdi,8),%rax
movsd  (%rax,%r10,8),%xmm3
test   %ebx,%ebx
jg     1254 <kff_synthese_bk_ng+0x144>
jmp    11f0 <kff_synthese_bk_ng+0xe0>
cs nopw 0x0(%rax,%rax,1)
nop
xorpd  %xmm0,%xmm1
mov    (%r15,%rdi,8),%rax
movapd %xmm1,%xmm2
mulsd  (%rax,%r10,8),%xmm2
mov    (%r9,%rdi,8),%rax
movapd %xmm1,%xmm3
movsd  (%rax,%r10,8),%xmm1
test   %ebx,%ebx
jle    11f0 <kff_synthese_bk_ng+0xe0>
mulsd  %xmm3,%xmm1
xor    %r11d,%r11d
xor    %edx,%edx
nopl   (%rax)
movslq %edx,%rax
movsd  (%r12,%rax,8),%xmm3
mulsd  %xmm1,%xmm3
movsd  0x0(%r13,%rax,8),%xmm4
mulsd  %xmm2,%xmm4
addsd  %xmm3,%xmm4
addsd  0x0(%rbp,%r11,8),%xmm4
movsd  %xmm4,0x0(%rbp,%r11,8)
add    %r10d,%eax
cltd
idiv   %ebx
add    $0x1,%r11
cmp    %r11,%rcx
jne    1260 <kff_synthese_bk_ng+0x150>
jmp    11f0 <kff_synthese_bk_ng+0xe0>
cmp    0x4(%rsp),%r8d
jle    12b6 <kff_synthese_bk_ng+0x1a6>
xor    %eax,%eax
add    $0x28,%rsp
pop    %rbx
pop    %r12
pop    %r13
pop    %r14
pop    %r15
pop    %rbp
ret
movslq %r8d,%rax
addl   $0x1,0x4(%rsp)
mov    %ebx,%ecx
jmp    12de <kff_synthese_bk_ng+0x1ce>
cs nopw 0x0(%rax,%rax,1)
nopl   0x0(%rax)
mov    0x8(%rsp),%rdx
mov    %rdx,%rax
cmp    %edx,0x4(%rsp)
je     12a5 <kff_synthese_bk_ng+0x195>
lea    0x1(%rax),%rdx
mov    %rdx,0x8(%rsp)
test   %rax,%rax
js     12d0 <kff_synthese_bk_ng+0x1c0>
mov    0x18(%rsp),%rdx
mov    (%rdx,%rax,8),%r10
mov    (%r15,%rax,8),%r11
mov    (%r9,%rax,8),%r14
mov    0x8(%rsp),%esi
xor    %edi,%edi
jmp    1319 <kff_synthese_bk_ng+0x209>
cs nopw 0x0(%rax,%rax,1)
nop
add    $0x1,%rdi
cmp    %rsi,%rdi
je     12d0 <kff_synthese_bk_ng+0x1c0>
test   %ebx,%ebx
jle    1310 <kff_synthese_bk_ng+0x200>
movsd  (%r10,%rdi,8),%xmm0
movsd  (%r11,%rdi,8),%xmm1
mulsd  %xmm0,%xmm1
mulsd  (%r14,%rdi,8),%xmm0
xor    %r8d,%r8d
xor    %edx,%edx
nopl   0x0(%rax,%rax,1)
movslq %edx,%rax
movsd  (%r12,%rax,8),%xmm2
mulsd  %xmm0,%xmm2
movsd  0x0(%r13,%rax,8),%xmm3
mulsd  %xmm1,%xmm3
addsd  %xmm2,%xmm3
addsd  0x0(%rbp,%r8,8),%xmm3
movsd  %xmm3,0x0(%rbp,%r8,8)
add    %edi,%eax
cltd
idiv   %ebx
add    $0x1,%r8
cmp    %r8,%rcx
jne    1340 <kff_synthese_bk_ng+0x230>
jmp    1310 <kff_synthese_bk_ng+0x200>

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

LLVM IR (-O2):
define i32 @kff_synthese_bk_ng(i32 %0, double** nocapture %1, double* nocapture %2, double* nocapture %3, i32 %4, i32 %5, i8 signext %6, double** nocapture %7, double** nocapture %8, double* nocapture %9) {
%11 = icmp sgt i32 %0, 0
br i1 %11, label %12, label %16
12: ; preds = %10
%13 = bitcast double* %9 to i8*
%14 = zext i32 %0 to i64
%15 = shl nuw nsw i64 %14, 3
br label %16
16: ; preds = %12, %10
%17 = icmp eq i8 %6, 83
br i1 %17, label %24, label %18
18: ; preds = %16
%19 = icmp sgt i32 %4, %5
br i1 %19, label %151, label %20
20: ; preds = %18
%21 = sext i32 %4 to i64
%22 = add i32 %5, 1
%23 = zext i32 %0 to i64
br label %102
24: ; preds = %16
%25 = and i32 %4, 1
%26 = icmp eq i32 %25, 0
%27 = icmp sgt i32 %4, %5
br i1 %27, label %151, label %28
28: ; preds = %24
%29 = select i1 %26, i32 -1, i32 1
%30 = select i1 %26, i32 1, i32 -1
%31 = sext i32 %4 to i64
%32 = add i32 %5, 1
%33 = zext i32 %0 to i64
br label %34
34: ; preds = %28, %98
%35 = phi i64 [ %31, %28 ], [ %99, %98 ]
%36 = phi i32 [ %4, %28 ], [ %39, %98 ]
%37 = phi i32 [ %29, %28 ], [ %38, %98 ]
%38 = phi i32 [ %30, %28 ], [ %37, %98 ]
%39 = add i32 %36, 1
%40 = icmp slt i64 %35, 0
br i1 %40, label %98, label %41
41: ; preds = %34
%42 = getelementptr inbounds double*, double** %1, i64 %35
%43 = getelementptr inbounds double*, double** %7, i64 %35
%44 = getelementptr inbounds double*, double** %8, i64 %35
%45 = zext i32 %39 to i64
%46 = load double*, double** %42
br label %47
47: ; preds = %41, %94
%48 = phi i64 [ 0, %41 ], [ %96, %94 ]
%49 = phi i32 [ %38, %41 ], [ %95, %94 ]
%50 = icmp sgt i32 %49, 0
%51 = getelementptr inbounds double, double* %46, i64 %48
%52 = load double, double* %51
br i1 %50, label %53, label %61
53: ; preds = %47
%54 = load double*, double** %43
%55 = getelementptr inbounds double, double* %54, i64 %48
%56 = load double, double* %55
%57 = fmul double %52, %56
%58 = load double*, double** %44
%59 = getelementptr inbounds double, double* %58, i64 %48
%60 = load double, double* %59
br label %70
61: ; preds = %47
%62 = fneg double %52
%63 = load double*, double** %43
%64 = getelementptr inbounds double, double* %63, i64 %48
%65 = load double, double* %64
%66 = fmul double %65, %62
%67 = load double*, double** %44
%68 = getelementptr inbounds double, double* %67, i64 %48
%69 = load double, double* %68
br label %70
70: ; preds = %61, %53
%71 = phi double [ %62, %61 ], [ %60, %53 ]
%72 = phi double [ %69, %61 ], [ %52, %53 ]
%73 = phi double [ %66, %61 ], [ %57, %53 ]
%74 = fmul double %72, %71
br i1 %11, label %75, label %94
75: ; preds = %70
%76 = trunc i64 %48 to i32
br label %77
77: ; preds = %75, %77
%78 = phi i64 [ 0, %75 ], [ %92, %77 ]
%79 = phi i32 [ 0, %75 ], [ %91, %77 ]
%80 = sext i32 %79 to i64
%81 = getelementptr inbounds double, double* %2, i64 %80
%82 = load double, double* %81
%83 = getelementptr inbounds double, double* %3, i64 %80
%84 = load double, double* %83
%85 = fmul double %74, %84
%86 = tail call double @llvm.fmuladd.f64(double %73, double %82, double %85)
%87 = getelementptr inbounds double, double* %9, i64 %78
%88 = load double, double* %87
%89 = fadd double %88, %86
store double %89, double* %87
%90 = add nsw i32 %79, %76
%91 = srem i32 %90, %0
%92 = add nuw nsw i64 %78, 1
%93 = icmp eq i64 %92, %33
br i1 %93, label %94, label %77
94: ; preds = %77, %70
%95 = sub nsw i32 0, %49
%96 = add nuw nsw i64 %48, 1
%97 = icmp eq i64 %96, %45
br i1 %97, label %98, label %47
98: ; preds = %94, %34
%99 = add nsw i64 %35, 1
%100 = trunc i64 %99 to i32
%101 = icmp eq i32 %32, %100
br i1 %101, label %151, label %34
102: ; preds = %20, %147
%103 = phi i64 [ %21, %20 ], [ %148, %147 ]
%104 = phi i32 [ %4, %20 ], [ %105, %147 ]
%105 = add i32 %104, 1
%106 = icmp slt i64 %103, 0
br i1 %106, label %147, label %107
107: ; preds = %102
%108 = getelementptr inbounds double*, double** %1, i64 %103
%109 = load double*, double** %108
%110 = getelementptr inbounds double*, double** %7, i64 %103
%111 = load double*, double** %110
%112 = getelementptr inbounds double*, double** %8, i64 %103
%113 = load double*, double** %112
%114 = zext i32 %105 to i64
br label %115
115: ; preds = %107, %144
%116 = phi i64 [ 0, %107 ], [ %145, %144 ]
%117 = getelementptr inbounds double, double* %109, i64 %116
%118 = load double, double* %117
%119 = getelementptr inbounds double, double* %111, i64 %116
%120 = load double, double* %119
%121 = fmul double %118, %120
%122 = getelementptr inbounds double, double* %113, i64 %116
%123 = load double, double* %122
%124 = fmul double %118, %123
br i1 %11, label %125, label %144
125: ; preds = %115
%126 = trunc i64 %116 to i32
br label %127
127: ; preds = %125, %127
%128 = phi i64 [ 0, %125 ], [ %142, %127 ]
%129 = phi i32 [ 0, %125 ], [ %141, %127 ]
%130 = sext i32 %129 to i64
%131 = getelementptr inbounds double, double* %2, i64 %130
%132 = load double, double* %131
%133 = getelementptr inbounds double, double* %3, i64 %130
%134 = load double, double* %133
%135 = fmul double %124, %134
%136 = tail call double @llvm.fmuladd.f64(double %121, double %132, double %135)
%137 = getelementptr inbounds double, double* %9, i64 %128
%138 = load double, double* %137
%139 = fadd double %138, %136
store double %139, double* %137
%140 = add nsw i32 %129, %126
%141 = srem i32 %140, %0
%142 = add nuw nsw i64 %128, 1
%143 = icmp eq i64 %142, %23
br i1 %143, label %144, label %127
144: ; preds = %127, %115
%145 = add nuw nsw i64 %116, 1
%146 = icmp eq i64 %145, %114
br i1 %146, label %147, label %115
147: ; preds = %144, %102
%148 = add nsw i64 %103, 1
%149 = trunc i64 %148 to i32
%150 = icmp eq i32 %22, %149
br i1 %150, label %151, label %102
151: ; preds = %147, %98, %18, %24
ret i32 0
}