#define NULL ((void *)0)
typedef unsigned long size_t; // Customize by platform.
typedef long intptr_t;
typedef unsigned long uintptr_t;
typedef long scalar_t__; // Either arithmetic or pointer type.
/* By default, we understand bool (as a convenience). */
typedef int bool;
#define false 0
#define true 1

/* Forward declarations */

/* Type definitions */

/* Variables and functions */
double sinc(double);
void grid_abs_squared(unsigned int Nk, unsigned int Nq, double grid[Nk][Nq],
                      double vk, double vq, unsigned int Nuv,
                      double inpoints[Nuv], double u[Nuv], double v[Nuv],
                      unsigned int precision) {
  int i;
  int j;
  int l;
  double vk_inv = 1. / vk;
  double vq_inv = 1. / vq;
  int shift_k = Nk / 2;
  double pos_k[Nk];
  for (i = 0; i < Nk; i++)
    pos_k[i] = (i - shift_k) * vk;
  int shift_q = Nq / 2;
  double pos_q[Nq];
  for (i = 0; i < Nq; i++)
    pos_q[i] = (i - shift_q) * vq;
  int ind_k;
  int ind_q;
  int max_ind_k;
  int max_ind_q;
  int min_ind_k;
  int min_ind_q;
  double tempdouble;
  double temp_k[precision * 2 + 1];
  double temp_q[precision * 2 + 1];
  for (i = 0; i < Nuv; i++) {
    ind_k = (int)(u[i] * vk_inv);
    ind_k += Nk / 2;
    ind_q = (int)(v[i] * vq_inv);
    ind_q += Nq / 2;
    min_ind_k = ind_k - precision;
    max_ind_k = ind_k + precision + 1;
    if (min_ind_k < 0)
      min_ind_k = 0;
    if (max_ind_k < 0)
      max_ind_k = 0;
    if (min_ind_k > Nk)
      min_ind_k = Nk;
    if (max_ind_k > Nk)
      max_ind_k = Nk;
    min_ind_q = ind_q - precision;
    max_ind_q = ind_q + precision + 1;
    if (min_ind_q < 0)
      min_ind_q = 0;
    if (max_ind_q < 0)
      max_ind_q = 0;
    if (min_ind_q > Nq)
      min_ind_q = Nq;
    if (max_ind_q > Nq)
      max_ind_q = Nq;
    for (j = min_ind_k; j < max_ind_k; j++) {
      tempdouble = vk_inv * sinc((pos_k[j] - u[i]) * vk_inv);
      temp_k[j - min_ind_k] = tempdouble * tempdouble;
    }
    for (l = min_ind_q; l < max_ind_q; l++) {
      tempdouble = vq_inv * sinc((pos_q[l] - v[i]) * vq_inv);
      temp_q[l - min_ind_q] = tempdouble * tempdouble;
    }
    for (j = min_ind_k; j < max_ind_k; j++) {
      for (l = min_ind_q; l < max_ind_q; l++) {
        grid[j][l] +=
            temp_k[j - min_ind_k] * temp_q[l - min_ind_q] * inpoints[i];
      }
    }
  }
}


x86 assembly (clang, -O0):
<grid_abs_squared>:
push   %rbp
mov    %rsp,%rbp
sub    $0xf0,%rsp
mov    0x18(%rbp),%eax
mov    0x10(%rbp),%rax
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    %rdx,-0x10(%rbp)
movsd  %xmm0,-0x18(%rbp)
movsd  %xmm1,-0x20(%rbp)
mov    %ecx,-0x24(%rbp)
mov    %r8,-0x30(%rbp)
mov    %r9,-0x38(%rbp)
mov    -0x8(%rbp),%eax
mov    %rax,-0xc0(%rbp)
movsd  -0x18(%rbp),%xmm2
movsd  0xea8(%rip),%xmm0
movaps %xmm0,%xmm1
divsd  %xmm2,%xmm1
movsd  %xmm1,-0x50(%rbp)
movsd  -0x20(%rbp),%xmm1
divsd  %xmm1,%xmm0
movsd  %xmm0,-0x58(%rbp)
mov    -0x4(%rbp),%eax
shr    %eax
mov    %eax,-0x5c(%rbp)
mov    -0x4(%rbp),%eax
mov    %rsp,%rcx
mov    %rcx,-0x68(%rbp)
lea    0xf(,%rax,8),%rdx
and    $0xfffffffffffffff0,%rdx
mov    %rsp,%rcx
sub    %rdx,%rcx
mov    %rcx,-0xb8(%rbp)
mov    %rcx,%rsp
mov    %rax,-0x70(%rbp)
movl   $0x0,-0x3c(%rbp)
mov    -0x3c(%rbp),%eax
cmp    -0x4(%rbp),%eax
jae    11e4 <grid_abs_squared+0xd4>
mov    -0xb8(%rbp),%rax
mov    -0x3c(%rbp),%ecx
sub    -0x5c(%rbp),%ecx
cvtsi2sd %ecx,%xmm0
mulsd  -0x18(%rbp),%xmm0
movslq -0x3c(%rbp),%rcx
movsd  %xmm0,(%rax,%rcx,8)
mov    -0x3c(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x3c(%rbp)
jmp    11ab <grid_abs_squared+0x9b>
mov    -0x8(%rbp),%eax
shr    %eax
mov    %eax,-0x74(%rbp)
mov    -0x8(%rbp),%eax
lea    0xf(,%rax,8),%rdx
and    $0xfffffffffffffff0,%rdx
mov    %rsp,%rcx
sub    %rdx,%rcx
mov    %rcx,-0xc8(%rbp)
mov    %rcx,%rsp
mov    %rax,-0x80(%rbp)
movl   $0x0,-0x3c(%rbp)
mov    -0x3c(%rbp),%eax
cmp    -0x8(%rbp),%eax
jae    124f <grid_abs_squared+0x13f>
mov    -0xc8(%rbp),%rax
mov    -0x3c(%rbp),%ecx
sub    -0x74(%rbp),%ecx
cvtsi2sd %ecx,%xmm0
mulsd  -0x20(%rbp),%xmm0
movslq -0x3c(%rbp),%rcx
movsd  %xmm0,(%rax,%rcx,8)
mov    -0x3c(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x3c(%rbp)
jmp    1216 <grid_abs_squared+0x106>
mov    0x18(%rbp),%ecx
mov    %ecx,%eax
lea    0x1(%rax,%rax,1),%eax
lea    0xf(,%rax,8),%rdx
and    $0xfffffffffffffff0,%rdx
mov    %rsp,%rcx
sub    %rdx,%rcx
mov    %rcx,-0xd8(%rbp)
mov    %rcx,%rsp
mov    %rax,-0xa8(%rbp)
mov    0x18(%rbp),%ecx
mov    %ecx,%eax
lea    0x1(%rax,%rax,1),%eax
lea    0xf(,%rax,8),%rdx
and    $0xfffffffffffffff0,%rdx
mov    %rsp,%rcx
sub    %rdx,%rcx
mov    %rcx,-0xd0(%rbp)
mov    %rcx,%rsp
mov    %rax,-0xb0(%rbp)
movl   $0x0,-0x3c(%rbp)
mov    -0x3c(%rbp),%eax
cmp    -0x24(%rbp),%eax
jae    1617 <grid_abs_squared+0x507>
mov    -0x38(%rbp),%rax
movslq -0x3c(%rbp),%rcx
movsd  (%rax,%rcx,8),%xmm0
mulsd  -0x50(%rbp),%xmm0
cvttsd2si %xmm0,%eax
mov    %eax,-0x84(%rbp)
mov    -0x4(%rbp),%eax
shr    $0x1,%eax
add    -0x84(%rbp),%eax
mov    %eax,-0x84(%rbp)
mov    0x10(%rbp),%rax
movslq -0x3c(%rbp),%rcx
movsd  (%rax,%rcx,8),%xmm0
mulsd  -0x58(%rbp),%xmm0
cvttsd2si %xmm0,%eax
mov    %eax,-0x88(%rbp)
mov    -0x8(%rbp),%eax
shr    $0x1,%eax
add    -0x88(%rbp),%eax
mov    %eax,-0x88(%rbp)
mov    -0x84(%rbp),%eax
sub    0x18(%rbp),%eax
mov    %eax,-0x94(%rbp)
mov    -0x84(%rbp),%eax
add    0x18(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x8c(%rbp)
cmpl   $0x0,-0x94(%rbp)
jge    134e <grid_abs_squared+0x23e>
movl   $0x0,-0x94(%rbp)
cmpl   $0x0,-0x8c(%rbp)
jge    1365 <grid_abs_squared+0x255>
movl   $0x0,-0x8c(%rbp)
mov    -0x94(%rbp),%eax
cmp    -0x4(%rbp),%eax
jbe    137d <grid_abs_squared+0x26d>
mov    -0x4(%rbp),%eax
mov    %eax,-0x94(%rbp)
mov    -0x8c(%rbp),%eax
cmp    -0x4(%rbp),%eax
jbe    1395 <grid_abs_squared+0x285>
mov    -0x4(%rbp),%eax
mov    %eax,-0x8c(%rbp)
mov    -0x88(%rbp),%eax
sub    0x18(%rbp),%eax
mov    %eax,-0x98(%rbp)
mov    -0x88(%rbp),%eax
add    0x18(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x90(%rbp)
cmpl   $0x0,-0x98(%rbp)
jge    13cd <grid_abs_squared+0x2bd>
movl   $0x0,-0x98(%rbp)
cmpl   $0x0,-0x90(%rbp)
jge    13e4 <grid_abs_squared+0x2d4>
movl   $0x0,-0x90(%rbp)
mov    -0x98(%rbp),%eax
cmp    -0x8(%rbp),%eax
jbe    13fc <grid_abs_squared+0x2ec>
mov    -0x8(%rbp),%eax
mov    %eax,-0x98(%rbp)
mov    -0x90(%rbp),%eax
cmp    -0x8(%rbp),%eax
jbe    1414 <grid_abs_squared+0x304>
mov    -0x8(%rbp),%eax
mov    %eax,-0x90(%rbp)
mov    -0x94(%rbp),%eax
mov    %eax,-0x40(%rbp)
mov    -0x40(%rbp),%eax
cmp    -0x8c(%rbp),%eax
jge    14ad <grid_abs_squared+0x39d>
mov    -0xb8(%rbp),%rax
movsd  -0x50(%rbp),%xmm0
movsd  %xmm0,-0xe0(%rbp)
ff
movslq -0x40(%rbp),%rcx
movsd  (%rax,%rcx,8),%xmm0
mov    -0x38(%rbp),%rax
movslq -0x3c(%rbp),%rcx
subsd  (%rax,%rcx,8),%xmm0
mulsd  -0x50(%rbp),%xmm0
call   1030 <sinc@plt>
mov    -0xd8(%rbp),%rax
movaps %xmm0,%xmm1
movsd  -0xe0(%rbp),%xmm0
ff
mulsd  %xmm1,%xmm0
movsd  %xmm0,-0xa0(%rbp)
ff
movsd  -0xa0(%rbp),%xmm0
ff
mulsd  -0xa0(%rbp),%xmm0
ff
mov    -0x40(%rbp),%ecx
sub    -0x94(%rbp),%ecx
movslq %ecx,%rcx
movsd  %xmm0,(%rax,%rcx,8)
mov    -0x40(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x40(%rbp)
jmp    141d <grid_abs_squared+0x30d>
mov    -0x98(%rbp),%eax
mov    %eax,-0x44(%rbp)
mov    -0x44(%rbp),%eax
cmp    -0x90(%rbp),%eax
jge    1546 <grid_abs_squared+0x436>
mov    -0xc8(%rbp),%rax
movsd  -0x58(%rbp),%xmm0
movsd  %xmm0,-0xe8(%rbp)
ff
movslq -0x44(%rbp),%rcx
movsd  (%rax,%rcx,8),%xmm0
mov    0x10(%rbp),%rax
movslq -0x3c(%rbp),%rcx
subsd  (%rax,%rcx,8),%xmm0
mulsd  -0x58(%rbp),%xmm0
call   1030 <sinc@plt>
mov    -0xd0(%rbp),%rax
movaps %xmm0,%xmm1
movsd  -0xe8(%rbp),%xmm0
ff
mulsd  %xmm1,%xmm0
movsd  %xmm0,-0xa0(%rbp)
ff
movsd  -0xa0(%rbp),%xmm0
ff
mulsd  -0xa0(%rbp),%xmm0
ff
mov    -0x44(%rbp),%ecx
sub    -0x98(%rbp),%ecx
movslq %ecx,%rcx
movsd  %xmm0,(%rax,%rcx,8)
mov    -0x44(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x44(%rbp)
jmp    14b6 <grid_abs_squared+0x3a6>
mov    -0x94(%rbp),%eax
mov    %eax,-0x40(%rbp)
mov    -0x40(%rbp),%eax
cmp    -0x8c(%rbp),%eax
jge    1604 <grid_abs_squared+0x4f4>
mov    -0x98(%rbp),%eax
mov    %eax,-0x44(%rbp)
mov    -0x44(%rbp),%eax
cmp    -0x90(%rbp),%eax
jge    15f1 <grid_abs_squared+0x4e1>
mov    -0xc0(%rbp),%rdx
mov    -0xd0(%rbp),%rax
mov    -0xd8(%rbp),%rcx
mov    -0x40(%rbp),%esi
sub    -0x94(%rbp),%esi
movslq %esi,%rsi
movsd  (%rcx,%rsi,8),%xmm0
mov    -0x44(%rbp),%ecx
sub    -0x98(%rbp),%ecx
movslq %ecx,%rcx
mulsd  (%rax,%rcx,8),%xmm0
mov    -0x30(%rbp),%rax
movslq -0x3c(%rbp),%rcx
movsd  (%rax,%rcx,8),%xmm2
mov    -0x10(%rbp),%rax
movslq -0x40(%rbp),%rcx
imul   %rdx,%rcx
shl    $0x3,%rcx
add    %rcx,%rax
movslq -0x44(%rbp),%rcx
movsd  (%rax,%rcx,8),%xmm1
mulsd  %xmm2,%xmm0
addsd  %xmm1,%xmm0
movsd  %xmm0,(%rax,%rcx,8)
mov    -0x44(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x44(%rbp)
jmp    1567 <grid_abs_squared+0x457>
jmp    15f6 <grid_abs_squared+0x4e6>
mov    -0x40(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x40(%rbp)
jmp    154f <grid_abs_squared+0x43f>
jmp    1609 <grid_abs_squared+0x4f9>
mov    -0x3c(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x3c(%rbp)
jmp    12ae <grid_abs_squared+0x19e>
mov    -0x68(%rbp),%rax
mov    %rax,%rsp
mov    %rbp,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<grid_abs_squared>:
push   %rbp
mov    %rsp,%rbp
push   %r15
push   %r14
push   %r13
push   %r12
push   %rbx
sub    $0xe8,%rsp
mov    %rdx,-0x60(%rbp)
mov    %esi,-0x38(%rbp)
mov    %esi,%r10d
mov    %edi,%eax
shr    %eax
mov    %eax,-0x34(%rbp)
mov    %edi,%eax
mov    %rsp,%r11
lea    0xf(,%rax,8),%rdx
and    $0xfffffffffffffff0,%rdx
sub    %rdx,%r11
mov    %r11,%rsp
mov    %edi,-0x44(%rbp)
test   %edi,%edi
je     129d <grid_abs_squared+0x18d>
cmpl   $0x4,-0x44(%rbp)
jae    1164 <grid_abs_squared+0x54>
xor    %edx,%edx
jmp    126c <grid_abs_squared+0x15c>
mov    %eax,%edx
and    $0xfffffffc,%edx
movd   -0x34(%rbp),%xmm2
pshufd $0x50,%xmm2,%xmm3
movapd %xmm0,%xmm2
unpcklpd %xmm0,%xmm2
lea    -0x4(%rdx),%rsi
mov    %rsi,%rbx
shr    $0x2,%rbx
add    $0x1,%rbx
test   %rsi,%rsi
je     18d8 <grid_abs_squared+0x7c8>
mov    %rbx,%rdi
and    $0xfffffffffffffffe,%rdi
movdqa 0xe6e(%rip),%xmm6
xor    %esi,%esi
movdqa 0xe73(%rip),%xmm8
movdqa 0xe7a(%rip),%xmm9
movdqa 0xe81(%rip),%xmm10
movdqa 0xe88(%rip),%xmm11
nopl   0x0(%rax,%rax,1)
movdqa %xmm6,%xmm4
psubd  %xmm3,%xmm4
movdqa %xmm4,%xmm7
cvtdq2pd %xmm4,%xmm5
paddd  %xmm8,%xmm7
cvtdq2pd %xmm7,%xmm7
mulpd  %xmm2,%xmm5
mulpd  %xmm2,%xmm7
movapd %xmm5,(%r11,%rsi,8)
movdqa %xmm4,%xmm5
paddd  %xmm9,%xmm5
paddd  %xmm10,%xmm4
cvtdq2pd %xmm5,%xmm5
cvtdq2pd %xmm4,%xmm4
movapd %xmm7,0x10(%r11,%rsi,8)
mulpd  %xmm2,%xmm5
mulpd  %xmm2,%xmm4
movapd %xmm5,0x20(%r11,%rsi,8)
movapd %xmm4,0x30(%r11,%rsi,8)
add    $0x8,%rsi
paddd  %xmm11,%xmm6
add    $0xfffffffffffffffe,%rdi
jne    11d0 <grid_abs_squared+0xc0>
test   $0x1,%bl
je     1267 <grid_abs_squared+0x157>
psubd  %xmm3,%xmm6
cvtdq2pd %xmm6,%xmm3
paddd  0xdd2(%rip),%xmm6
cvtdq2pd %xmm6,%xmm4
mulpd  %xmm2,%xmm3
mulpd  %xmm2,%xmm4
movapd %xmm3,(%r11,%rsi,8)
movapd %xmm4,0x10(%r11,%rsi,8)
cmp    %rax,%rdx
je     129d <grid_abs_squared+0x18d>
mov    -0x34(%rbp),%esi
neg    %esi
cs nopw 0x0(%rax,%rax,1)
nopl   0x0(%rax,%rax,1)
lea    (%rsi,%rdx,1),%edi
xorps  %xmm2,%xmm2
cvtsi2sd %edi,%xmm2
mulsd  %xmm0,%xmm2
movsd  %xmm2,(%r11,%rdx,8)
add    $0x1,%rdx
cmp    %rdx,%rax
jne    1280 <grid_abs_squared+0x170>
mov    -0x38(%rbp),%edx
mov    %edx,%eax
shr    %eax
mov    %eax,-0x30(%rbp)
mov    %rsp,%rbx
lea    0xf(,%r10,8),%rax
and    $0xfffffffffffffff0,%rax
sub    %rax,%rbx
mov    %rbx,%rsp
test   %edx,%edx
je     13fc <grid_abs_squared+0x2ec>
cmpl   $0x4,-0x38(%rbp)
jae    12d1 <grid_abs_squared+0x1c1>
xor    %eax,%eax
jmp    13d7 <grid_abs_squared+0x2c7>
mov    %r10d,%eax
and    $0xfffffffc,%eax
movd   -0x30(%rbp),%xmm2
pshufd $0x50,%xmm2,%xmm3
movapd %xmm1,%xmm2
unpcklpd %xmm1,%xmm2
lea    -0x4(%rax),%rdx
mov    %rdx,%rsi
shr    $0x2,%rsi
add    $0x1,%rsi
test   %rdx,%rdx
je     18f0 <grid_abs_squared+0x7e0>
mov    %rsi,%rdi
and    $0xfffffffffffffffe,%rdi
movdqa 0xd00(%rip),%xmm6
xor    %edx,%edx
movdqa 0xd05(%rip),%xmm8
movdqa 0xd0c(%rip),%xmm9
movdqa 0xd13(%rip),%xmm10
movdqa 0xd1a(%rip),%xmm11
cs nopw 0x0(%rax,%rax,1)
movdqa %xmm6,%xmm4
psubd  %xmm3,%xmm4
movdqa %xmm4,%xmm7
cvtdq2pd %xmm4,%xmm5
paddd  %xmm8,%xmm7
cvtdq2pd %xmm7,%xmm7
mulpd  %xmm2,%xmm5
mulpd  %xmm2,%xmm7
movapd %xmm5,(%rbx,%rdx,8)
movdqa %xmm4,%xmm5
paddd  %xmm9,%xmm5
paddd  %xmm10,%xmm4
cvtdq2pd %xmm5,%xmm5
cvtdq2pd %xmm4,%xmm4
movapd %xmm7,0x10(%rbx,%rdx,8)
mulpd  %xmm2,%xmm5
mulpd  %xmm2,%xmm4
movapd %xmm5,0x20(%rbx,%rdx,8)
movapd %xmm4,0x30(%rbx,%rdx,8)
add    $0x8,%rdx
paddd  %xmm11,%xmm6
add    $0xfffffffffffffffe,%rdi
jne    1340 <grid_abs_squared+0x230>
test   $0x1,%sil
je     13d2 <grid_abs_squared+0x2c2>
psubd  %xmm3,%xmm6
cvtdq2pd %xmm6,%xmm3
paddd  0xc65(%rip),%xmm6
cvtdq2pd %xmm6,%xmm4
mulpd  %xmm2,%xmm3
mulpd  %xmm2,%xmm4
movapd %xmm3,(%rbx,%rdx,8)
movapd %xmm4,0x10(%rbx,%rdx,8)
cmp    %r10,%rax
je     13fc <grid_abs_squared+0x2ec>
mov    -0x30(%rbp),%edx
neg    %edx
nopl   0x0(%rax)
lea    (%rdx,%rax,1),%esi
xorps  %xmm2,%xmm2
cvtsi2sd %esi,%xmm2
mulsd  %xmm1,%xmm2
movsd  %xmm2,(%rbx,%rax,8)
add    $0x1,%rax
cmp    %rax,%r10
jne    13e0 <grid_abs_squared+0x2d0>
mov    %rbx,-0xb8(%rbp)
mov    %r11,-0x90(%rbp)
mov    %r10,-0x50(%rbp)
mov    0x18(%rbp),%eax
add    %eax,%eax
add    $0x1,%eax
lea    0xf(,%rax,8),%rax
and    $0xfffffffffffffff0,%rax
mov    %rsp,%rdx
sub    %rax,%rdx
mov    %rdx,%rsp
mov    %rsp,%r12
sub    %rax,%r12
mov    %r12,%rsp
test   %ecx,%ecx
je     18c9 <grid_abs_squared+0x7b9>
movsd  0xbbc(%rip),%xmm7
movapd %xmm7,%xmm8
divsd  %xmm0,%xmm8
divsd  %xmm1,%xmm7
mov    0x18(%rbp),%eax
add    $0x1,%eax
mov    %rax,-0xc8(%rbp)
mov    %ecx,%eax
mov    %rax,-0xc0(%rbp)
mov    -0x60(%rbp),%rax
lea    0x10(%rax),%rcx
mov    %rcx,-0xb0(%rbp)
mov    -0x50(%rbp),%rcx
lea    0x0(,%rcx,8),%rcx
mov    %rcx,-0x108(%rbp)
lea    0x8(%r12),%rcx
mov    %rcx,-0xa8(%rbp)
add    $0x8,%rax
mov    %rax,-0xa0(%rbp)
xor    %r14d,%r14d
mov    %rdx,-0x88(%rbp)
movsd  %xmm8,-0x70(%rbp)
mov    %r9,-0x78(%rbp)
mov    %r8,-0xd0(%rbp)
movsd  %xmm7,-0x98(%rbp)
ff
jmp    14e5 <grid_abs_squared+0x3d5>
cs nopw 0x0(%rax,%rax,1)
add    $0x1,%r14
cmp    -0xc0(%rbp),%r14
mov    -0x78(%rbp),%r9
je     18c9 <grid_abs_squared+0x7b9>
movsd  (%r9,%r14,8),%xmm1
movapd %xmm8,%xmm0
mulsd  %xmm1,%xmm0
cvttsd2si %xmm0,%ebx
add    -0x34(%rbp),%ebx
mov    0x10(%rbp),%rax
movsd  (%rax,%r14,8),%xmm0
mulsd  %xmm7,%xmm0
cvttsd2si %xmm0,%edi
add    -0x30(%rbp),%edi
mov    -0xc8(%rbp),%rdx
lea    (%rdx,%rbx,1),%ecx
mov    0x18(%rbp),%eax
mov    %rax,%r8
sub    %r8d,%ebx
test   %ebx,%ebx
mov    $0x0,%esi
cmovs  %esi,%ebx
test   %ecx,%ecx
cmovs  %esi,%ecx
mov    -0x44(%rbp),%eax
cmp    %eax,%ebx
cmova  %eax,%ebx
cmp    %eax,%ecx
cmova  %eax,%ecx
add    %edi,%edx
sub    %r8d,%edi
test   %edi,%edi
cmovs  %esi,%edi
test   %edx,%edx
cmovs  %esi,%edx
mov    -0x38(%rbp),%eax
cmp    %eax,%edi
cmova  %eax,%edi
mov    %rdi,-0x68(%rbp)
cmp    %eax,%edx
cmova  %eax,%edx
mov    %edx,-0x2c(%rbp)
mov    %rbx,-0x40(%rbp)
mov    %ecx,-0x58(%rbp)
cmp    %ecx,%ebx
jae    160d <grid_abs_squared+0x4fd>
mov    -0x40(%rbp),%r13d
mov    -0x58(%rbp),%r15d
mov    -0x90(%rbp),%rax
movsd  (%rax,%r13,8),%xmm0
subsd  %xmm1,%xmm0
mulsd  %xmm8,%xmm0
call   1030 <sinc@plt>
mov    -0x78(%rbp),%r9
movsd  -0x70(%rbp),%xmm1
mulsd  %xmm1,%xmm0
mulsd  %xmm0,%xmm0
mov    -0x88(%rbp),%rax
movsd  %xmm0,(%rax)
lea    0x1(%r13),%rax
cmp    %r15,%rax
je     160d <grid_abs_squared+0x4fd>
mov    %r15,%rbx
sub    %r13,%rbx
mov    -0x90(%rbp),%rax
lea    (%rax,%r13,8),%r13
mov    $0x1,%r15d
movsd  0x0(%r13,%r15,8),%xmm0
subsd  (%r9,%r14,8),%xmm0
mulsd  %xmm1,%xmm0
call   1030 <sinc@plt>
mov    -0x78(%rbp),%r9
movsd  -0x70(%rbp),%xmm1
mulsd  %xmm1,%xmm0
mulsd  %xmm0,%xmm0
mov    -0x88(%rbp),%rax
movsd  %xmm0,(%rax,%r15,8)
add    $0x1,%r15
cmp    %r15,%rbx
jne    15d0 <grid_abs_squared+0x4c0>
mov    -0x2c(%rbp),%eax
cmp    %eax,-0x68(%rbp)
movsd  -0x98(%rbp),%xmm7
ff
mov    0x10(%rbp),%rbx
jge    1678 <grid_abs_squared+0x568>
mov    -0x68(%rbp),%eax
mov    -0x2c(%rbp),%r15d
mov    -0xb8(%rbp),%rcx
lea    (%rcx,%rax,8),%rcx
mov    %rcx,-0x80(%rbp)
sub    %rax,%r15
xor    %r13d,%r13d
nopl   (%rax)
mov    -0x80(%rbp),%rax
movsd  (%rax,%r13,8),%xmm0
subsd  (%rbx,%r14,8),%xmm0
mulsd  %xmm7,%xmm0
call   1030 <sinc@plt>
movsd  -0x98(%rbp),%xmm7
ff
mulsd  %xmm7,%xmm0
mulsd  %xmm0,%xmm0
movsd  %xmm0,(%r12,%r13,8)
add    $0x1,%r13
cmp    %r13,%r15
jne    1640 <grid_abs_squared+0x530>
mov    -0x40(%rbp),%rcx
mov    -0x58(%rbp),%edx
cmp    %edx,%ecx
mov    -0xd0(%rbp),%r8
movsd  -0x70(%rbp),%xmm8
jae    14d0 <grid_abs_squared+0x3c0>
lea    (%r8,%r14,8),%rax
mov    %rax,-0xe8(%rbp)
lea    (%r8,%r14,8),%rax
add    $0x8,%rax
mov    %rax,-0xf8(%rbp)
mov    -0x68(%rbp),%r15d
mov    %ecx,%ecx
mov    %edx,%eax
mov    %rax,-0x80(%rbp)
mov    -0x2c(%rbp),%ebx
mov    -0x50(%rbp),%rsi
imul   %rcx,%rsi
lea    (%rsi,%r15,1),%rdi
mov    %rbx,%r13
sub    %r15,%r13
mov    %r13,-0x40(%rbp)
and    $0xfffffffffffffffc,%r13
mov    %rbx,%rax
neg    %rax
mov    %rax,-0x100(%rbp)
lea    0x0(,%r15,8),%rdx
mov    -0xa8(%rbp),%r10
sub    %rdx,%r10
mov    -0xa0(%rbp),%rax
lea    (%rax,%rsi,8),%r11
add    %rbx,%rsi
mov    %rsi,-0xe0(%rbp)
lea    (%r15,%r13,1),%rax
mov    %rax,-0xd8(%rbp)
mov    -0xb0(%rbp),%rax
mov    %rdi,-0xf0(%rbp)
lea    (%rax,%rdi,8),%r9
xor    %esi,%esi
mov    %rcx,-0x58(%rbp)
jmp    174f <grid_abs_squared+0x63f>
add    $0x1,%rcx
add    $0x1,%rsi
mov    -0x108(%rbp),%rax
add    %rax,%r9
add    %rax,%r11
cmp    -0x80(%rbp),%rcx
je     14d0 <grid_abs_squared+0x3c0>
mov    -0x2c(%rbp),%eax
cmp    %eax,-0x68(%rbp)
jge    1730 <grid_abs_squared+0x620>
mov    %rcx,%rdx
sub    -0x58(%rbp),%rdx
mov    -0x88(%rbp),%rax
movsd  (%rax,%rdx,8),%xmm0
mov    %r15,%rdi
cmpq   $0x4,-0x40(%rbp)
jb     1830 <grid_abs_squared+0x720>
mov    %rsi,%rdx
imul   -0x50(%rbp),%rdx
mov    -0xf0(%rbp),%rax
lea    (%rax,%rdx,1),%rdi
mov    -0x60(%rbp),%rax
lea    (%rax,%rdi,8),%rdi
cmp    -0xf8(%rbp),%rdi
jae    17bb <grid_abs_squared+0x6ab>
add    -0xe0(%rbp),%rdx
mov    -0x60(%rbp),%rax
lea    (%rax,%rdx,8),%rdx
mov    %r15,%rdi
cmp    %rdx,-0xe8(%rbp)
jb     1830 <grid_abs_squared+0x720>
movapd %xmm0,%xmm1
unpcklpd %xmm0,%xmm1
movsd  (%r8,%r14,8),%xmm2
unpcklpd %xmm2,%xmm2
xor    %edx,%edx
nop
movupd (%r12,%rdx,8),%xmm3
movupd 0x10(%r12,%rdx,8),%xmm4
mulpd  %xmm1,%xmm3
mulpd  %xmm1,%xmm4
movupd -0x10(%r9,%rdx,8),%xmm5
movupd (%r9,%rdx,8),%xmm6
mulpd  %xmm2,%xmm3
addpd  %xmm5,%xmm3
mulpd  %xmm2,%xmm4
addpd  %xmm6,%xmm4
movupd %xmm3,-0x10(%r9,%rdx,8)
movupd %xmm4,(%r9,%rdx,8)
add    $0x4,%rdx
cmp    %rdx,%r13
jne    17d0 <grid_abs_squared+0x6c0>
mov    -0xd8(%rbp),%rdi
cmp    %r13,-0x40(%rbp)
je     1730 <grid_abs_squared+0x620>
nopl   0x0(%rax)
mov    %ebx,%eax
sub    %edi,%eax
mov    %rdi,%rdx
test   $0x1,%al
je     186f <grid_abs_squared+0x75f>
mov    %rcx,%rax
imul   -0x50(%rbp),%rax
mov    -0x60(%rbp),%rdx
lea    (%rdx,%rax,8),%rax
mov    %rdi,%rdx
sub    %r15,%rdx
movsd  (%r12,%rdx,8),%xmm1
mulsd  %xmm0,%xmm1
mulsd  (%r8,%r14,8),%xmm1
addsd  (%rax,%rdi,8),%xmm1
movsd  %xmm1,(%rax,%rdi,8)
lea    0x1(%rdi),%rdx
not    %rdi
cmp    -0x100(%rbp),%rdi
je     1730 <grid_abs_squared+0x620>
nop
movsd  -0x8(%r10,%rdx,8),%xmm1
mulsd  %xmm0,%xmm1
mulsd  (%r8,%r14,8),%xmm1
addsd  -0x8(%r11,%rdx,8),%xmm1
movsd  %xmm1,-0x8(%r11,%rdx,8)
movsd  (%r10,%rdx,8),%xmm1
mulsd  %xmm0,%xmm1
mulsd  (%r8,%r14,8),%xmm1
addsd  (%r11,%rdx,8),%xmm1
movsd  %xmm1,(%r11,%rdx,8)
add    $0x2,%rdx
cmp    %rdx,%rbx
jne    1880 <grid_abs_squared+0x770>
jmp    1730 <grid_abs_squared+0x620>
lea    -0x28(%rbp),%rsp
pop    %rbx
pop    %r12
pop    %r13
pop    %r14
pop    %r15
pop    %rbp
ret
movdqa 0x730(%rip),%xmm6
xor    %esi,%esi
test   $0x1,%bl
jne    123e <grid_abs_squared+0x12e>
jmp    1267 <grid_abs_squared+0x157>
movdqa 0x718(%rip),%xmm6
xor    %edx,%edx
test   $0x1,%sil
jne    13ab <grid_abs_squared+0x29b>
jmp    13d2 <grid_abs_squared+0x2c2>

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

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