#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*/ calc_dotprod(int, double *, double *, double *, int,
                                double *, double *);
int /*<<< orphan*/ update_sincos(int, double *, double *, double *, double *,
                                 int);
void def_hat(int numt, int nharm, int detrend_order, double hat_matr[],
             double hat0[], double sinx[], double cosx[], double wt[],
             double cn[], double hat_hat[], double vec[], double lambda0) {
  int i, j = numt * nharm, k, j1, npar = 2 * nharm, dord1 = detrend_order + 1;
  double sx0[numt], cx0[numt], ct, st, sum;
  for (i = 0; i < numt; i++) {
    sx0[i] = (hat_matr[i] = sinx[i]) / wt[i];
    cx0[i] = (hat_matr[i + j] = cosx[i]) / wt[i];
  }
  for (j = 0; j < nharm - 1; j++) {
    update_sincos(numt, sx0, cx0, hat_matr + j * numt,
                  hat_matr + (j + nharm) * numt, numt);
    for (i = 0; i <= detrend_order; i++)
      calc_dotprod(numt, hat_matr + j * numt, hat_matr + (j + nharm) * numt, wt,
                   i, &hat0[i + j * dord1], &hat0[i + (j + nharm) * dord1]);
  }
  for (i = 0; i <= detrend_order; i++)
    calc_dotprod(numt, hat_matr + j * numt, hat_matr + (j + nharm) * numt, wt,
                 i, &hat0[i + j * dord1], &hat0[i + (j + nharm) * dord1]);
  for (j = 0; j < npar; j++) {
    for (k = j; k < npar; k++) {
      for (sum = 0, i = 0; i < numt; i++)
        sum += hat_matr[i + j * numt] * hat_matr[i + k * numt];
      for (i = 0; i <= detrend_order; i++)
        sum -= hat0[i + j * dord1] * hat0[i + k * dord1];
      hat_hat[k + j * npar] = sum;
    }
  }
  for (j = 0; j < npar; j++) {
    ct = (1. + (j % nharm));
    ct *= ct;
    for (sum = 0, i = 0; i < numt; i++)
      sum += hat_matr[i + j * numt] * cn[i];
    vec[j] = sum / ct;
    for (k = j; k < npar; k++) {
      st = (1. + (k % nharm));
      st *= st;
      hat_hat[k + j * npar] /= (ct * st);
      hat_hat[j + k * npar] = hat_hat[k + j * npar];
    }
    hat_hat[j + j * npar] += numt * lambda0;
  }
}


x86 assembly (clang, -O0):
<def_hat>:
push   %rbp
mov    %rsp,%rbp
sub    $0x90,%rsp
mov    0x30(%rbp),%rax
mov    0x28(%rbp),%rax
mov    0x20(%rbp),%rax
mov    0x18(%rbp),%rax
mov    0x10(%rbp),%rax
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    %edx,-0xc(%rbp)
mov    %rcx,-0x18(%rbp)
mov    %r8,-0x20(%rbp)
mov    %r9,-0x28(%rbp)
movsd  %xmm0,-0x30(%rbp)
mov    -0x4(%rbp),%eax
mov    -0x8(%rbp),%ecx
imul   %ecx,%eax
mov    %eax,-0x38(%rbp)
mov    -0x8(%rbp),%eax
add    %eax,%eax
mov    %eax,-0x44(%rbp)
mov    -0xc(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x48(%rbp)
mov    -0x4(%rbp),%eax
mov    %rsp,%rcx
mov    %rcx,-0x50(%rbp)
lea    0xf(,%rax,8),%rdx
and    $0xfffffffffffffff0,%rdx
mov    %rsp,%rcx
sub    %rdx,%rcx
mov    %rcx,-0x88(%rbp)
mov    %rcx,%rsp
mov    %rax,-0x58(%rbp)
mov    -0x4(%rbp),%eax
lea    0xf(,%rax,8),%rdx
and    $0xfffffffffffffff0,%rdx
mov    %rsp,%rcx
sub    %rdx,%rcx
mov    %rcx,-0x80(%rbp)
mov    %rcx,%rsp
mov    %rax,-0x60(%rbp)
movl   $0x0,-0x34(%rbp)
mov    -0x34(%rbp),%eax
cmp    -0x4(%rbp),%eax
jge    1251 <def_hat+0x131>
mov    -0x80(%rbp),%rax
mov    -0x88(%rbp),%rcx
mov    -0x28(%rbp),%rdx
movslq -0x34(%rbp),%rsi
movsd  (%rdx,%rsi,8),%xmm0
mov    -0x18(%rbp),%rdx
movslq -0x34(%rbp),%rsi
movsd  %xmm0,(%rdx,%rsi,8)
mov    0x18(%rbp),%rdx
movslq -0x34(%rbp),%rsi
divsd  (%rdx,%rsi,8),%xmm0
movslq -0x34(%rbp),%rdx
movsd  %xmm0,(%rcx,%rdx,8)
mov    0x10(%rbp),%rcx
movslq -0x34(%rbp),%rdx
movsd  (%rcx,%rdx,8),%xmm0
mov    -0x18(%rbp),%rcx
mov    -0x34(%rbp),%edx
add    -0x38(%rbp),%edx
movslq %edx,%rdx
movsd  %xmm0,(%rcx,%rdx,8)
mov    0x18(%rbp),%rcx
movslq -0x34(%rbp),%rdx
divsd  (%rcx,%rdx,8),%xmm0
movslq -0x34(%rbp),%rcx
movsd  %xmm0,(%rax,%rcx,8)
mov    -0x34(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x34(%rbp)
jmp    11c7 <def_hat+0xa7>
movl   $0x0,-0x38(%rbp)
mov    -0x38(%rbp),%eax
mov    -0x8(%rbp),%ecx
sub    $0x1,%ecx
cmp    %ecx,%eax
jge    1364 <def_hat+0x244>
mov    -0x80(%rbp),%rdx
mov    -0x88(%rbp),%rsi
mov    -0x4(%rbp),%edi
mov    -0x18(%rbp),%rcx
mov    -0x38(%rbp),%eax
imul   -0x4(%rbp),%eax
cltq
shl    $0x3,%rax
add    %rax,%rcx
mov    -0x18(%rbp),%r8
mov    -0x38(%rbp),%eax
add    -0x8(%rbp),%eax
imul   -0x4(%rbp),%eax
cltq
shl    $0x3,%rax
add    %rax,%r8
mov    -0x4(%rbp),%r9d
call   1030 <update_sincos@plt>
movl   $0x0,-0x34(%rbp)
mov    -0x34(%rbp),%eax
cmp    -0xc(%rbp),%eax
jg     1351 <def_hat+0x231>
mov    -0x4(%rbp),%edi
mov    -0x18(%rbp),%rsi
mov    -0x38(%rbp),%eax
imul   -0x4(%rbp),%eax
cltq
shl    $0x3,%rax
add    %rax,%rsi
mov    -0x18(%rbp),%rdx
mov    -0x38(%rbp),%eax
add    -0x8(%rbp),%eax
imul   -0x4(%rbp),%eax
cltq
shl    $0x3,%rax
add    %rax,%rdx
mov    0x18(%rbp),%rcx
mov    -0x34(%rbp),%r8d
mov    -0x20(%rbp),%r9
mov    -0x34(%rbp),%eax
mov    -0x38(%rbp),%r10d
imul   -0x48(%rbp),%r10d
add    %r10d,%eax
cltq
shl    $0x3,%rax
add    %rax,%r9
mov    -0x20(%rbp),%rax
mov    -0x34(%rbp),%r10d
mov    -0x38(%rbp),%r11d
add    -0x8(%rbp),%r11d
imul   -0x48(%rbp),%r11d
add    %r11d,%r10d
movslq %r10d,%r10
shl    $0x3,%r10
add    %r10,%rax
sub    $0x10,%rsp
mov    %rax,(%rsp)
call   1040 <calc_dotprod@plt>
add    $0x10,%rsp
mov    -0x34(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x34(%rbp)
jmp    12b2 <def_hat+0x192>
jmp    1356 <def_hat+0x236>
mov    -0x38(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x38(%rbp)
jmp    1258 <def_hat+0x138>
movl   $0x0,-0x34(%rbp)
mov    -0x34(%rbp),%eax
cmp    -0xc(%rbp),%eax
jg     140a <def_hat+0x2ea>
mov    -0x4(%rbp),%edi
mov    -0x18(%rbp),%rsi
mov    -0x38(%rbp),%eax
imul   -0x4(%rbp),%eax
cltq
shl    $0x3,%rax
add    %rax,%rsi
mov    -0x18(%rbp),%rdx
mov    -0x38(%rbp),%eax
add    -0x8(%rbp),%eax
imul   -0x4(%rbp),%eax
cltq
shl    $0x3,%rax
add    %rax,%rdx
mov    0x18(%rbp),%rcx
mov    -0x34(%rbp),%r8d
mov    -0x20(%rbp),%r9
mov    -0x34(%rbp),%eax
mov    -0x38(%rbp),%r10d
imul   -0x48(%rbp),%r10d
add    %r10d,%eax
cltq
shl    $0x3,%rax
add    %rax,%r9
mov    -0x20(%rbp),%rax
mov    -0x34(%rbp),%r10d
mov    -0x38(%rbp),%r11d
add    -0x8(%rbp),%r11d
imul   -0x48(%rbp),%r11d
add    %r11d,%r10d
movslq %r10d,%r10
shl    $0x3,%r10
add    %r10,%rax
sub    $0x10,%rsp
mov    %rax,(%rsp)
call   1040 <calc_dotprod@plt>
add    $0x10,%rsp
mov    -0x34(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x34(%rbp)
jmp    136b <def_hat+0x24b>
movl   $0x0,-0x38(%rbp)
mov    -0x38(%rbp),%eax
cmp    -0x44(%rbp),%eax
jge    1552 <def_hat+0x432>
mov    -0x38(%rbp),%eax
mov    %eax,-0x3c(%rbp)
mov    -0x3c(%rbp),%eax
cmp    -0x44(%rbp),%eax
jge    153f <def_hat+0x41f>
xorps  %xmm0,%xmm0
movsd  %xmm0,-0x78(%rbp)
movl   $0x0,-0x34(%rbp)
mov    -0x34(%rbp),%eax
cmp    -0x4(%rbp),%eax
jge    149a <def_hat+0x37a>
mov    -0x18(%rbp),%rax
mov    -0x34(%rbp),%ecx
mov    -0x38(%rbp),%edx
imul   -0x4(%rbp),%edx
add    %edx,%ecx
movslq %ecx,%rcx
movsd  (%rax,%rcx,8),%xmm0
mov    -0x18(%rbp),%rax
mov    -0x34(%rbp),%ecx
mov    -0x3c(%rbp),%edx
imul   -0x4(%rbp),%edx
add    %edx,%ecx
movslq %ecx,%rcx
movsd  (%rax,%rcx,8),%xmm2
movsd  -0x78(%rbp),%xmm1
mulsd  %xmm2,%xmm0
addsd  %xmm1,%xmm0
movsd  %xmm0,-0x78(%rbp)
mov    -0x34(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x34(%rbp)
jmp    143e <def_hat+0x31e>
movl   $0x0,-0x34(%rbp)
mov    -0x34(%rbp),%eax
cmp    -0xc(%rbp),%eax
jg     1514 <def_hat+0x3f4>
mov    -0x20(%rbp),%rax
mov    -0x34(%rbp),%ecx
mov    -0x38(%rbp),%edx
imul   -0x48(%rbp),%edx
add    %edx,%ecx
movslq %ecx,%rcx
movsd  (%rax,%rcx,8),%xmm0
mov    -0x20(%rbp),%rax
mov    -0x34(%rbp),%ecx
mov    -0x3c(%rbp),%edx
imul   -0x48(%rbp),%edx
add    %edx,%ecx
movslq %ecx,%rcx
movsd  (%rax,%rcx,8),%xmm2
movsd  -0x78(%rbp),%xmm1
movq   %xmm0,%rax
movabs $0x8000000000000000,%rcx
xor    %rcx,%rax
movq   %rax,%xmm0
mulsd  %xmm2,%xmm0
addsd  %xmm1,%xmm0
movsd  %xmm0,-0x78(%rbp)
mov    -0x34(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x34(%rbp)
jmp    14a1 <def_hat+0x381>
movsd  -0x78(%rbp),%xmm0
mov    0x28(%rbp),%rax
mov    -0x3c(%rbp),%ecx
mov    -0x38(%rbp),%edx
imul   -0x44(%rbp),%edx
add    %edx,%ecx
movslq %ecx,%rcx
movsd  %xmm0,(%rax,%rcx,8)
mov    -0x3c(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x3c(%rbp)
jmp    1423 <def_hat+0x303>
jmp    1544 <def_hat+0x424>
mov    -0x38(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x38(%rbp)
jmp    1411 <def_hat+0x2f1>
movl   $0x0,-0x38(%rbp)
mov    -0x38(%rbp),%eax
cmp    -0x44(%rbp),%eax
jge    16ea <def_hat+0x5ca>
mov    -0x38(%rbp),%eax
cltd
idivl  -0x8(%rbp)
cvtsi2sd %edx,%xmm1
movsd  0xa88(%rip),%xmm0
addsd  %xmm1,%xmm0
movsd  %xmm0,-0x68(%rbp)
movsd  -0x68(%rbp),%xmm0
mulsd  -0x68(%rbp),%xmm0
movsd  %xmm0,-0x68(%rbp)
xorps  %xmm0,%xmm0
movsd  %xmm0,-0x78(%rbp)
movl   $0x0,-0x34(%rbp)
mov    -0x34(%rbp),%eax
cmp    -0x4(%rbp),%eax
jge    15f0 <def_hat+0x4d0>
mov    -0x18(%rbp),%rax
mov    -0x34(%rbp),%ecx
mov    -0x38(%rbp),%edx
imul   -0x4(%rbp),%edx
add    %edx,%ecx
movslq %ecx,%rcx
movsd  (%rax,%rcx,8),%xmm0
mov    0x20(%rbp),%rax
movslq -0x34(%rbp),%rcx
movsd  (%rax,%rcx,8),%xmm2
movsd  -0x78(%rbp),%xmm1
mulsd  %xmm2,%xmm0
addsd  %xmm1,%xmm0
movsd  %xmm0,-0x78(%rbp)
mov    -0x34(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x34(%rbp)
jmp    159f <def_hat+0x47f>
movsd  -0x78(%rbp),%xmm0
divsd  -0x68(%rbp),%xmm0
mov    0x30(%rbp),%rax
movslq -0x38(%rbp),%rcx
movsd  %xmm0,(%rax,%rcx,8)
mov    -0x38(%rbp),%eax
mov    %eax,-0x3c(%rbp)
mov    -0x3c(%rbp),%eax
cmp    -0x44(%rbp),%eax
jge    16ad <def_hat+0x58d>
mov    -0x3c(%rbp),%eax
cltd
idivl  -0x8(%rbp)
cvtsi2sd %edx,%xmm1
movsd  0x9d4(%rip),%xmm0
addsd  %xmm1,%xmm0
movsd  %xmm0,-0x70(%rbp)
movsd  -0x70(%rbp),%xmm0
mulsd  -0x70(%rbp),%xmm0
movsd  %xmm0,-0x70(%rbp)
movsd  -0x68(%rbp),%xmm1
mulsd  -0x70(%rbp),%xmm1
mov    0x28(%rbp),%rax
mov    -0x3c(%rbp),%ecx
mov    -0x38(%rbp),%edx
imul   -0x44(%rbp),%edx
add    %edx,%ecx
movslq %ecx,%rcx
movsd  (%rax,%rcx,8),%xmm0
divsd  %xmm1,%xmm0
movsd  %xmm0,(%rax,%rcx,8)
mov    0x28(%rbp),%rax
mov    -0x3c(%rbp),%ecx
mov    -0x38(%rbp),%edx
imul   -0x44(%rbp),%edx
add    %edx,%ecx
movslq %ecx,%rcx
movsd  (%rax,%rcx,8),%xmm0
mov    0x28(%rbp),%rax
mov    -0x38(%rbp),%ecx
mov    -0x3c(%rbp),%edx
imul   -0x44(%rbp),%edx
add    %edx,%ecx
movslq %ecx,%rcx
movsd  %xmm0,(%rax,%rcx,8)
mov    -0x3c(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x3c(%rbp)
jmp    160d <def_hat+0x4ed>
cvtsi2sdl -0x4(%rbp),%xmm0
movsd  -0x30(%rbp),%xmm2
mov    0x28(%rbp),%rax
mov    -0x38(%rbp),%ecx
mov    -0x38(%rbp),%edx
imul   -0x44(%rbp),%edx
add    %edx,%ecx
movslq %ecx,%rcx
movsd  (%rax,%rcx,8),%xmm1
mulsd  %xmm2,%xmm0
addsd  %xmm1,%xmm0
movsd  %xmm0,(%rax,%rcx,8)
mov    -0x38(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x38(%rbp)
jmp    1559 <def_hat+0x439>
mov    -0x50(%rbp),%rax
mov    %rax,%rsp
mov    %rbp,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<def_hat>:
push   %rbp
mov    %rsp,%rbp
push   %r15
push   %r14
push   %r13
push   %r12
push   %rbx
sub    $0xa8,%rsp
movsd  %xmm0,-0xc0(%rbp)
ff
mov    %r8,-0x98(%rbp)
mov    %rcx,-0x38(%rbp)
mov    %rsi,-0x70(%rbp)
mov    0x18(%rbp),%rbx
mov    %rdx,%rax
mov    %rdx,-0xa0(%rbp)
lea    0x1(%rdx),%r12d
mov    %edi,%eax
mov    %rsp,%r13
mov    %rax,-0x58(%rbp)
lea    0xf(,%rax,8),%rax
and    $0xfffffffffffffff0,%rax
sub    %rax,%r13
mov    %r13,%rsp
mov    %rsp,%rcx
sub    %rax,%rcx
mov    %rcx,-0x80(%rbp)
mov    %rcx,%rsp
mov    %edi,-0x2c(%rbp)
test   %edi,%edi
mov    %r12d,-0x30(%rbp)
mov    %r13,-0x50(%rbp)
jle    1364 <def_hat+0x244>
mov    0x10(%rbp),%r11
mov    -0x70(%rbp),%rcx
mov    -0x2c(%rbp),%edx
imul   %edx,%ecx
movslq %ecx,%r14
cmp    $0x1,%edx
jne    11b6 <def_hat+0x96>
xor    %r15d,%r15d
jmp    12f2 <def_hat+0x1d2>
mov    -0x58(%rbp),%rax
mov    -0x38(%rbp),%r8
lea    (%r8,%rax,8),%rdi
lea    (%r8,%r14,8),%rsi
lea    (%r14,%rax,1),%rdx
lea    (%r8,%rdx,8),%rdx
lea    (%r9,%rax,8),%r10
cmp    %r8,%rdx
seta   -0x48(%rbp)
cmp    %rdi,%rsi
setb   -0x40(%rbp)
cmp    %r8,%r10
seta   %r12b
cmp    %r9,%rdi
seta   -0x68(%rbp)
lea    (%rbx,%rax,8),%rcx
cmp    %r8,%rcx
mov    %rbx,%r15
seta   %r13b
lea    (%r11,%rax,8),%rbx
cmp    %r15,%rdi
seta   -0x60(%rbp)
cmp    %r8,%rbx
seta   %r8b
cmp    %r11,%rdi
seta   %dil
cmp    %r10,%rsi
setb   %r10b
cmp    %r9,%rdx
seta   -0x90(%rbp)
cmp    %rcx,%rsi
setb   %al
cmp    %r15,%rdx
seta   -0x88(%rbp)
cmp    %rbx,%rsi
setb   %cl
cmp    %r11,%rdx
seta   %bl
xor    %r15d,%r15d
mov    -0x40(%rbp),%dl
test   %dl,-0x48(%rbp)
jne    19b2 <def_hat+0x892>
and    -0x68(%rbp),%r12b
jne    19b2 <def_hat+0x892>
and    -0x60(%rbp),%r13b
jne    19b2 <def_hat+0x892>
mov    %ebx,%edx
and    %dil,%r8b
mov    0x18(%rbp),%rbx
mov    -0x30(%rbp),%r12d
mov    -0x50(%rbp),%r13
jne    12f2 <def_hat+0x1d2>
and    -0x90(%rbp),%r10b
jne    12f2 <def_hat+0x1d2>
and    -0x88(%rbp),%al
jne    12f2 <def_hat+0x1d2>
and    %dl,%cl
jne    12f2 <def_hat+0x1d2>
mov    -0x58(%rbp),%rcx
mov    %ecx,%r15d
and    $0xfffffffe,%r15d
xor    %edx,%edx
mov    -0x38(%rbp),%rdi
mov    -0x80(%rbp),%rax
cs nopw 0x0(%rax,%rax,1)
nopl   0x0(%rax)
movupd (%r9,%rdx,8),%xmm0
movupd %xmm0,(%rdi,%rdx,8)
movupd (%rbx,%rdx,8),%xmm1
divpd  %xmm1,%xmm0
movapd %xmm0,0x0(%r13,%rdx,8)
movupd (%r11,%rdx,8),%xmm0
movupd %xmm0,(%rsi,%rdx,8)
movupd (%rbx,%rdx,8),%xmm1
divpd  %xmm1,%xmm0
movapd %xmm0,(%rax,%rdx,8)
add    $0x2,%rdx
cmp    %rdx,%r15
jne    12b0 <def_hat+0x190>
cmp    %rcx,%r15
je     1364 <def_hat+0x244>
add    %r15,%r14
mov    -0x38(%rbp),%rcx
lea    (%rcx,%r14,8),%r8
mov    -0x80(%rbp),%rax
lea    (%rax,%r15,8),%r10
lea    (%r11,%r15,8),%r11
lea    0x0(%r13,%r15,8),%rdi
lea    (%rbx,%r15,8),%rbx
lea    (%rcx,%r15,8),%rdx
lea    (%r9,%r15,8),%rcx
mov    -0x58(%rbp),%rsi
sub    %r15,%rsi
xor    %eax,%eax
cs nopw 0x0(%rax,%rax,1)
nopl   (%rax)
movsd  (%rcx,%rax,8),%xmm0
movsd  %xmm0,(%rdx,%rax,8)
divsd  (%rbx,%rax,8),%xmm0
movsd  %xmm0,(%rdi,%rax,8)
movsd  (%r11,%rax,8),%xmm0
movsd  %xmm0,(%r8,%rax,8)
divsd  (%rbx,%rax,8),%xmm0
movsd  %xmm0,(%r10,%rax,8)
add    $0x1,%rax
cmp    %rax,%rsi
jne    1330 <def_hat+0x210>
xor    %esi,%esi
mov    -0x2c(%rbp),%edi
movslq %edi,%rax
mov    %rax,-0x90(%rbp)
movslq %r12d,%rcx
mov    %rcx,%rax
mov    %rcx,-0x88(%rbp)
mov    %ecx,%r13d
cmpl   $0x2,-0x70(%rbp)
mov    %r13,-0x68(%rbp)
jl     14d3 <def_hat+0x3b3>
mov    -0x70(%rbp),%rax
lea    -0x1(%rax),%ecx
mov    %eax,%edx
mov    %rcx,-0xb8(%rbp)
mov    %ecx,%eax
mov    %rax,-0xa8(%rbp)
mov    -0x88(%rbp),%rax
mov    %rax,%rsi
mov    %rdx,%rcx
mov    %rdx,-0x78(%rbp)
imul   %rdx,%rsi
shl    $0x3,%rsi
mov    %rsi,-0xd0(%rbp)
lea    0x0(,%rax,8),%rax
mov    %rax,-0xc8(%rbp)
xor    %esi,%esi
mov    -0x98(%rbp),%rax
mov    %rax,-0x60(%rbp)
mov    -0x38(%rbp),%rbx
mov    -0x80(%rbp),%r9
mov    -0x68(%rbp),%r12
mov    -0xd0(%rbp),%r14
jmp    1432 <def_hat+0x312>
nopl   0x0(%rax,%rax,1)
mov    -0xb0(%rbp),%rsi
add    $0x1,%rsi
mov    -0x60(%rbp),%rax
add    -0xc8(%rbp),%rax
mov    %rax,-0x60(%rbp)
cmp    -0xa8(%rbp),%rsi
mov    -0x38(%rbp),%rbx
mov    -0x2c(%rbp),%edi
mov    -0x80(%rbp),%r9
je     14c8 <def_hat+0x3a8>
mov    %rsi,%rax
mov    -0x90(%rbp),%rdx
imul   %rdx,%rax
lea    (%rbx,%rax,8),%rcx
mov    -0x78(%rbp),%rax
mov    %rsi,-0xb0(%rbp)
add    %rsi,%rax
imul   %rdx,%rax
lea    (%rbx,%rax,8),%r8
mov    -0x50(%rbp),%rsi
mov    %r9,%rdx
mov    %rcx,-0x48(%rbp)
mov    %r8,-0x40(%rbp)
mov    %edi,%r9d
call   1030 <update_sincos@plt>
cmpl   $0x0,-0xa0(%rbp)
mov    0x18(%rbp),%r15
js     1400 <def_hat+0x2e0>
mov    -0x60(%rbp),%rbx
xor    %r13d,%r13d
cs nopw 0x0(%rax,%rax,1)
nop
lea    (%rbx,%r14,1),%rax
sub    $0x8,%rsp
mov    -0x2c(%rbp),%edi
mov    -0x48(%rbp),%rsi
mov    -0x40(%rbp),%rdx
mov    %r15,%rcx
mov    %r13d,%r8d
mov    %rbx,%r9
push   %rax
call   1040 <calc_dotprod@plt>
add    $0x10,%rsp
add    $0x1,%r13
add    $0x8,%rbx
cmp    %r13,%r12
jne    1490 <def_hat+0x370>
jmp    1400 <def_hat+0x2e0>
mov    -0x68(%rbp),%r13
mov    -0xb8(%rbp),%rsi
cmpl   $0x0,-0xa0(%rbp)
mov    0x18(%rbp),%r12
js     1564 <def_hat+0x444>
mov    %esi,%eax
imul   %edi,%eax
cltq
mov    -0x38(%rbp),%rdx
lea    (%rdx,%rax,8),%rax
mov    %rax,-0x48(%rbp)
mov    -0x70(%rbp),%rax
lea    (%rsi,%rax,1),%ebx
mov    %ebx,%eax
imul   %edi,%eax
cltq
lea    (%rdx,%rax,8),%rax
mov    %rax,-0x40(%rbp)
mov    -0x30(%rbp),%eax
imul   %eax,%esi
imul   %eax,%ebx
movslq %esi,%rsi
movslq %ebx,%rax
mov    -0x98(%rbp),%rdx
lea    (%rdx,%rax,8),%r14
lea    (%rdx,%rsi,8),%r15
xor    %ebx,%ebx
nopl   (%rax)
sub    $0x8,%rsp
mov    -0x48(%rbp),%rsi
mov    -0x40(%rbp),%rdx
mov    %r12,%rcx
mov    %ebx,%r8d
mov    %r15,%r9
push   %r14
call   1040 <calc_dotprod@plt>
mov    -0x2c(%rbp),%edi
add    $0x10,%rsp
add    $0x1,%rbx
add    $0x8,%r14
add    $0x8,%r15
cmp    %rbx,%r13
jne    1530 <def_hat+0x410>
mov    -0x70(%rbp),%rax
test   %eax,%eax
mov    -0x38(%rbp),%rcx
jle    19a3 <def_hat+0x883>
add    %eax,%eax
cltq
cmp    $0x2,%eax
mov    $0x1,%edx
cmovge %eax,%edx
mov    %rdx,-0xa8(%rbp)
mov    %rax,-0x78(%rbp)
mov    %eax,%eax
mov    %rax,-0x40(%rbp)
mov    -0x58(%rbp),%r9
lea    -0x1(%r9),%rax
mov    %rax,-0x60(%rbp)
and    $0xfffffffe,%r9d
mov    %r13d,%edx
and    $0xfffffffe,%edx
lea    0x8(%rcx),%r15
mov    -0x90(%rbp),%rax
lea    0x0(,%rax,8),%rax
mov    %rax,-0x48(%rbp)
mov    -0x98(%rbp),%rax
lea    0x8(%rax),%r11
mov    -0x88(%rbp),%rax
lea    0x0(,%rax,8),%r14
xor    %eax,%eax
mov    -0x2c(%rbp),%r10d
mov    -0xa0(%rbp),%rsi
jmp    160c <def_hat+0x4ec>
nopw   0x0(%rax,%rax,1)
mov    -0x50(%rbp),%rax
add    $0x1,%rax
add    -0x48(%rbp),%r15
add    %r14,%r11
cmp    -0xa8(%rbp),%rax
je     17ba <def_hat+0x69a>
mov    %rax,-0x50(%rbp)
cmp    -0x78(%rbp),%rax
jge    15f0 <def_hat+0x4d0>
mov    -0x50(%rbp),%r12
mov    %r12,%rax
imul   -0x90(%rbp),%rax
ff
mov    %rax,-0xb0(%rbp)
mov    %r12,%rax
imul   -0x88(%rbp),%rax
ff
mov    %rax,-0x80(%rbp)
mov    %r12,%r8
imul   -0x78(%rbp),%r8
mov    %r11,%rax
mov    %r15,%rbx
jmp    166e <def_hat+0x54e>
nopl   0x0(%rax,%rax,1)
lea    (%r12,%r8,1),%rcx
mov    0x28(%rbp),%rdi
movsd  %xmm0,(%rdi,%rcx,8)
add    $0x1,%r12
add    -0x48(%rbp),%rbx
add    %r14,%rax
cmp    -0x40(%rbp),%r12
je     15f0 <def_hat+0x4d0>
test   %r10d,%r10d
jle    16c0 <def_hat+0x5a0>
cmpq   $0x0,-0x60(%rbp)
je     16d0 <def_hat+0x5b0>
xorpd  %xmm1,%xmm1
xor    %edi,%edi
movsd  -0x8(%r15,%rdi,8),%xmm2
movsd  (%r15,%rdi,8),%xmm0
mulsd  -0x8(%rbx,%rdi,8),%xmm2
mulsd  (%rbx,%rdi,8),%xmm0
addsd  %xmm1,%xmm2
addsd  %xmm2,%xmm0
add    $0x2,%rdi
movapd %xmm0,%xmm1
cmp    %rdi,%r9
jne    1680 <def_hat+0x560>
testb  $0x1,-0x58(%rbp)
jne    16dc <def_hat+0x5bc>
jmp    1715 <def_hat+0x5f5>
cs nopw 0x0(%rax,%rax,1)
nop
xorpd  %xmm0,%xmm0
jmp    1715 <def_hat+0x5f5>
cs nopw 0x0(%rax,%rax,1)
xorpd  %xmm0,%xmm0
xor    %edi,%edi
testb  $0x1,-0x58(%rbp)
je     1715 <def_hat+0x5f5>
mov    %r12,%r10
imul   -0x90(%rbp),%r10
ff
mov    -0xb0(%rbp),%rcx
lea    (%rdi,%rcx,1),%r13
mov    -0x38(%rbp),%rcx
movsd  (%rcx,%r13,8),%xmm1
mov    -0x68(%rbp),%r13
add    %rdi,%r10
mov    -0x38(%rbp),%rcx
mulsd  (%rcx,%r10,8),%xmm1
mov    -0x2c(%rbp),%r10d
addsd  %xmm1,%xmm0
test   %esi,%esi
js     1650 <def_hat+0x530>
je     1770 <def_hat+0x650>
xor    %edi,%edi
cs nopw 0x0(%rax,%rax,1)
nopl   0x0(%rax,%rax,1)
movsd  -0x8(%r11,%rdi,8),%xmm1
movsd  (%r11,%rdi,8),%xmm2
mulsd  -0x8(%rax,%rdi,8),%xmm1
mulsd  (%rax,%rdi,8),%xmm2
subsd  %xmm1,%xmm0
subsd  %xmm2,%xmm0
add    $0x2,%rdi
cmp    %rdi,%rdx
jne    1730 <def_hat+0x610>
test   $0x1,%r13b
je     1650 <def_hat+0x530>
jmp    177c <def_hat+0x65c>
cs nopw 0x0(%rax,%rax,1)
nop
xor    %edi,%edi
test   $0x1,%r13b
je     1650 <def_hat+0x530>
mov    %r12,%rsi
imul   -0x88(%rbp),%rsi
ff
mov    -0x80(%rbp),%rcx
add    %rdi,%rcx
mov    -0x98(%rbp),%r13
movsd  0x0(%r13,%rcx,8),%xmm1
add    %rdi,%rsi
mulsd  0x0(%r13,%rsi,8),%xmm1
mov    -0x68(%rbp),%r13
mov    -0xa0(%rbp),%rsi
subsd  %xmm1,%xmm0
jmp    1650 <def_hat+0x530>
mov    -0x70(%rbp),%r14
test   %r14d,%r14d
mov    -0x38(%rbp),%rdi
jle    19a3 <def_hat+0x883>
xorps  %xmm0,%xmm0
cvtsi2sdl -0x2c(%rbp),%xmm0
mov    -0x78(%rbp),%rcx
cmp    $0x2,%ecx
mov    $0x1,%eax
cmovge %ecx,%eax
mov    %rax,-0x68(%rbp)
mov    -0x58(%rbp),%rax
mov    %eax,%r8d
and    $0x3,%r8d
and    $0xfffffffc,%eax
mov    %rax,-0x58(%rbp)
lea    0x18(%rdi),%rsi
lea    0x0(,%rcx,8),%r11
lea    0x8(,%rcx,8),%r9
negq   -0x40(%rbp)
xor    %r12d,%r12d
movsd  0x7e5(%rip),%xmm1
mulsd  -0xc0(%rbp),%xmm0
ff
mov    0x28(%rbp),%r10
jmp    1865 <def_hat+0x745>
nopl   0x0(%rax)
add    %r12,%r15
mov    0x28(%rbp),%rax
movsd  (%rax,%r15,8),%xmm2
addsd  %xmm0,%xmm2
movsd  %xmm2,(%rax,%r15,8)
add    $0x1,%r12
mov    -0x48(%rbp),%rax
add    %rax,%rsi
mov    %r13,%rdi
add    %rax,%rdi
add    %r9,%r10
cmp    -0x68(%rbp),%r12
je     19a3 <def_hat+0x883>
mov    %r12d,%eax
cltd
idiv   %r14d
xorps  %xmm2,%xmm2
cvtsi2sd %edx,%xmm2
addsd  %xmm1,%xmm2
cmpl   $0x0,-0x2c(%rbp)
jle    1890 <def_hat+0x770>
cmpq   $0x3,-0x60(%rbp)
mov    0x20(%rbp),%rdx
xorpd  %xmm3,%xmm3
jae    18a0 <def_hat+0x780>
xor    %eax,%eax
jmp    18f7 <def_hat+0x7d7>
xorpd  %xmm3,%xmm3
jmp    1927 <def_hat+0x807>
nopl   0x0(%rax)
xor    %eax,%eax
mov    -0x58(%rbp),%rcx
cs nopw 0x0(%rax,%rax,1)
movsd  -0x18(%rsi,%rax,8),%xmm4
movsd  -0x10(%rsi,%rax,8),%xmm5
mulsd  (%rdx,%rax,8),%xmm4
mulsd  0x8(%rdx,%rax,8),%xmm5
addsd  %xmm3,%xmm4
movsd  -0x8(%rsi,%rax,8),%xmm6
mulsd  0x10(%rdx,%rax,8),%xmm6
addsd  %xmm4,%xmm5
movsd  (%rsi,%rax,8),%xmm3
mulsd  0x18(%rdx,%rax,8),%xmm3
addsd  %xmm5,%xmm6
addsd  %xmm6,%xmm3
add    $0x4,%rax
cmp    %rax,%rcx
jne    18b0 <def_hat+0x790>
test   %r8,%r8
je     1927 <def_hat+0x807>
lea    (%rdx,%rax,8),%rcx
lea    (%rdi,%rax,8),%rax
xor    %edx,%edx
cs nopw 0x0(%rax,%rax,1)
movsd  (%rax,%rdx,8),%xmm4
mulsd  (%rcx,%rdx,8),%xmm4
addsd  %xmm4,%xmm3
add    $0x1,%rdx
cmp    %rdx,%r8
jne    1910 <def_hat+0x7f0>
mov    %rdi,%r13
mulsd  %xmm2,%xmm2
divsd  %xmm2,%xmm3
mov    0x30(%rbp),%rax
movsd  %xmm3,(%rax,%r12,8)
mov    %r12,%r15
mov    -0x78(%rbp),%rax
imul   %rax,%r15
cmp    %rax,%r12
jge    1830 <def_hat+0x710>
mov    -0x40(%rbp),%rax
lea    (%rax,%r12,1),%rbx
xor    %edi,%edi
mov    %r10,%rcx
nopl   (%rax)
lea    (%r12,%rdi,1),%eax
cltd
idiv   %r14d
xorps  %xmm3,%xmm3
cvtsi2sd %edx,%xmm3
addsd  %xmm1,%xmm3
mulsd  %xmm3,%xmm3
mulsd  %xmm2,%xmm3
movsd  (%r10,%rdi,8),%xmm4
divsd  %xmm3,%xmm4
movsd  %xmm4,(%r10,%rdi,8)
movsd  %xmm4,(%rcx)
add    %r11,%rcx
add    $0x1,%rdi
mov    %rbx,%rax
add    %rdi,%rax
jne    1960 <def_hat+0x840>
jmp    1830 <def_hat+0x710>
lea    -0x28(%rbp),%rsp
pop    %rbx
pop    %r12
pop    %r13
pop    %r14
pop    %r15
pop    %rbp
ret
mov    0x18(%rbp),%rbx
mov    -0x30(%rbp),%r12d
mov    -0x50(%rbp),%r13
jmp    12f2 <def_hat+0x1d2>

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

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