void project_r(int a, int i, int b, int j, double r[]) {
  int c, k;
  double xi, yi, xj, yj;
  xi = (&((r)[2 * ((i) + 2 * ((a) + 3 * ((i) + 2 * (a))))]))[0];
  yi = (&((r)[2 * ((i) + 2 * ((a) + 3 * ((i) + 2 * (a))))]))[1];
  xj = (&((r)[2 * ((i) + 2 * ((a) + 3 * ((j) + 2 * (b))))]))[0];
  yj = (&((r)[2 * ((i) + 2 * ((a) + 3 * ((j) + 2 * (b))))]))[1];
  for (c = a, k = i + 1; k < 2; k++) {
    double zi = (&((r)[2 * ((k) + 2 * ((c) + 3 * ((i) + 2 * (a))))]))[0];
    double ti = (&((r)[2 * ((k) + 2 * ((c) + 3 * ((i) + 2 * (a))))]))[1];
    double zj = (&((r)[2 * ((k) + 2 * ((c) + 3 * ((j) + 2 * (b))))]))[0];
    double tj = (&((r)[2 * ((k) + 2 * ((c) + 3 * ((j) + 2 * (b))))]))[1];
    (&((r)[2 * ((k) + 2 * ((c) + 3 * ((j) + 2 * (b))))]))[0] =
        xi * zj - yi * tj - xj * zi + yj * ti;
    (&((r)[2 * ((k) + 2 * ((c) + 3 * ((j) + 2 * (b))))]))[1] =
        xi * tj + yi * zj - xj * ti - yj * zi;
  }
  for (c = a + 1; c < 3; c++) {
    for (k = 0; k < 2; k++) {
      double zi = (&((r)[2 * ((k) + 2 * ((c) + 3 * ((i) + 2 * (a))))]))[0];
      double ti = (&((r)[2 * ((k) + 2 * ((c) + 3 * ((i) + 2 * (a))))]))[1];
      double zj = (&((r)[2 * ((k) + 2 * ((c) + 3 * ((j) + 2 * (b))))]))[0];
      double tj = (&((r)[2 * ((k) + 2 * ((c) + 3 * ((j) + 2 * (b))))]))[1];
      (&((r)[2 * ((k) + 2 * ((c) + 3 * ((j) + 2 * (b))))]))[0] =
          xi * zj - yi * tj - xj * zi + yj * ti;
      (&((r)[2 * ((k) + 2 * ((c) + 3 * ((j) + 2 * (b))))]))[1] =
          xi * tj + yi * zj - xj * ti - yj * zi;
    }
  }
}


x86 assembly (clang, -O0):
<project_r>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    %edx,-0xc(%rbp)
mov    %ecx,-0x10(%rbp)
mov    %r8,-0x18(%rbp)
mov    -0x18(%rbp),%rax
mov    -0x8(%rbp),%ecx
mov    -0x4(%rbp),%edx
mov    -0x8(%rbp),%esi
mov    -0x4(%rbp),%edi
shl    $0x1,%edi
add    %edi,%esi
imul   $0x3,%esi,%esi
add    %esi,%edx
shl    $0x1,%edx
add    %edx,%ecx
shl    $0x1,%ecx
movslq %ecx,%rcx
movsd  (%rax,%rcx,8),%xmm0
movsd  %xmm0,-0x28(%rbp)
mov    -0x18(%rbp),%rax
mov    -0x8(%rbp),%ecx
mov    -0x4(%rbp),%edx
mov    -0x8(%rbp),%esi
mov    -0x4(%rbp),%edi
shl    $0x1,%edi
add    %edi,%esi
imul   $0x3,%esi,%esi
add    %esi,%edx
shl    $0x1,%edx
add    %edx,%ecx
shl    $0x1,%ecx
movslq %ecx,%rcx
movsd  0x8(%rax,%rcx,8),%xmm0
movsd  %xmm0,-0x30(%rbp)
mov    -0x18(%rbp),%rax
mov    -0x8(%rbp),%ecx
mov    -0x4(%rbp),%edx
mov    -0x10(%rbp),%esi
mov    -0xc(%rbp),%edi
shl    $0x1,%edi
add    %edi,%esi
imul   $0x3,%esi,%esi
add    %esi,%edx
shl    $0x1,%edx
add    %edx,%ecx
shl    $0x1,%ecx
movslq %ecx,%rcx
movsd  (%rax,%rcx,8),%xmm0
movsd  %xmm0,-0x38(%rbp)
mov    -0x18(%rbp),%rax
mov    -0x8(%rbp),%ecx
mov    -0x4(%rbp),%edx
mov    -0x10(%rbp),%esi
mov    -0xc(%rbp),%edi
shl    $0x1,%edi
add    %edi,%esi
imul   $0x3,%esi,%esi
add    %esi,%edx
shl    $0x1,%edx
add    %edx,%ecx
shl    $0x1,%ecx
movslq %ecx,%rcx
movsd  0x8(%rax,%rcx,8),%xmm0
movsd  %xmm0,-0x40(%rbp)
mov    -0x4(%rbp),%eax
mov    %eax,-0x1c(%rbp)
mov    -0x8(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x20(%rbp)
cmpl   $0x2,-0x20(%rbp)
jge    13e8 <project_r+0x2e8>
mov    -0x18(%rbp),%rax
mov    -0x20(%rbp),%ecx
mov    -0x1c(%rbp),%edx
mov    -0x8(%rbp),%esi
mov    -0x4(%rbp),%edi
shl    $0x1,%edi
add    %edi,%esi
imul   $0x3,%esi,%esi
add    %esi,%edx
shl    $0x1,%edx
add    %edx,%ecx
shl    $0x1,%ecx
movslq %ecx,%rcx
movsd  (%rax,%rcx,8),%xmm0
movsd  %xmm0,-0x48(%rbp)
mov    -0x18(%rbp),%rax
mov    -0x20(%rbp),%ecx
mov    -0x1c(%rbp),%edx
mov    -0x8(%rbp),%esi
mov    -0x4(%rbp),%edi
shl    $0x1,%edi
add    %edi,%esi
imul   $0x3,%esi,%esi
add    %esi,%edx
shl    $0x1,%edx
add    %edx,%ecx
shl    $0x1,%ecx
movslq %ecx,%rcx
movsd  0x8(%rax,%rcx,8),%xmm0
movsd  %xmm0,-0x50(%rbp)
mov    -0x18(%rbp),%rax
mov    -0x20(%rbp),%ecx
mov    -0x1c(%rbp),%edx
mov    -0x10(%rbp),%esi
mov    -0xc(%rbp),%edi
shl    $0x1,%edi
add    %edi,%esi
imul   $0x3,%esi,%esi
add    %esi,%edx
shl    $0x1,%edx
add    %edx,%ecx
shl    $0x1,%ecx
movslq %ecx,%rcx
movsd  (%rax,%rcx,8),%xmm0
movsd  %xmm0,-0x58(%rbp)
mov    -0x18(%rbp),%rax
mov    -0x20(%rbp),%ecx
mov    -0x1c(%rbp),%edx
mov    -0x10(%rbp),%esi
mov    -0xc(%rbp),%edi
shl    $0x1,%edi
add    %edi,%esi
imul   $0x3,%esi,%esi
add    %esi,%edx
shl    $0x1,%edx
add    %edx,%ecx
shl    $0x1,%ecx
movslq %ecx,%rcx
movsd  0x8(%rax,%rcx,8),%xmm0
movsd  %xmm0,-0x60(%rbp)
movsd  -0x28(%rbp),%xmm0
movsd  -0x58(%rbp),%xmm2
movsd  -0x30(%rbp),%xmm1
mulsd  -0x60(%rbp),%xmm1
movq   %xmm1,%rax
movabs $0x8000000000000000,%rcx
xor    %rcx,%rax
movq   %rax,%xmm1
mulsd  %xmm2,%xmm0
addsd  %xmm1,%xmm0
movsd  -0x38(%rbp),%xmm1
movsd  -0x48(%rbp),%xmm2
movq   %xmm1,%rax
movabs $0x8000000000000000,%rcx
xor    %rcx,%rax
movq   %rax,%xmm1
mulsd  %xmm2,%xmm1
addsd  %xmm0,%xmm1
movsd  -0x40(%rbp),%xmm0
movsd  -0x50(%rbp),%xmm2
mulsd  %xmm2,%xmm0
addsd  %xmm1,%xmm0
mov    -0x18(%rbp),%rax
mov    -0x20(%rbp),%ecx
mov    -0x1c(%rbp),%edx
mov    -0x10(%rbp),%esi
mov    -0xc(%rbp),%edi
shl    $0x1,%edi
add    %edi,%esi
imul   $0x3,%esi,%esi
add    %esi,%edx
shl    $0x1,%edx
add    %edx,%ecx
shl    $0x1,%ecx
movslq %ecx,%rcx
movsd  %xmm0,(%rax,%rcx,8)
movsd  -0x28(%rbp),%xmm0
movsd  -0x60(%rbp),%xmm2
movsd  -0x30(%rbp),%xmm1
mulsd  -0x58(%rbp),%xmm1
mulsd  %xmm2,%xmm0
addsd  %xmm1,%xmm0
movsd  -0x38(%rbp),%xmm1
movsd  -0x50(%rbp),%xmm2
movq   %xmm1,%rax
movabs $0x8000000000000000,%rcx
xor    %rcx,%rax
movq   %rax,%xmm1
mulsd  %xmm2,%xmm1
addsd  %xmm0,%xmm1
movsd  -0x40(%rbp),%xmm0
movsd  -0x48(%rbp),%xmm2
movq   %xmm0,%rax
movabs $0x8000000000000000,%rcx
xor    %rcx,%rax
movq   %rax,%xmm0
mulsd  %xmm2,%xmm0
addsd  %xmm1,%xmm0
mov    -0x18(%rbp),%rax
mov    -0x20(%rbp),%ecx
mov    -0x1c(%rbp),%edx
mov    -0x10(%rbp),%esi
mov    -0xc(%rbp),%edi
shl    $0x1,%edi
add    %edi,%esi
imul   $0x3,%esi,%esi
add    %esi,%edx
shl    $0x1,%edx
add    %edx,%ecx
shl    $0x1,%ecx
movslq %ecx,%rcx
movsd  %xmm0,0x8(%rax,%rcx,8)
mov    -0x20(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x20(%rbp)
jmp    11e1 <project_r+0xe1>
mov    -0x4(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x1c(%rbp)
cmpl   $0x3,-0x1c(%rbp)
jge    161c <project_r+0x51c>
movl   $0x0,-0x20(%rbp)
cmpl   $0x2,-0x20(%rbp)
jge    1609 <project_r+0x509>
mov    -0x18(%rbp),%rax
mov    -0x20(%rbp),%ecx
mov    -0x1c(%rbp),%edx
mov    -0x8(%rbp),%esi
mov    -0x4(%rbp),%edi
shl    $0x1,%edi
add    %edi,%esi
imul   $0x3,%esi,%esi
add    %esi,%edx
shl    $0x1,%edx
add    %edx,%ecx
shl    $0x1,%ecx
movslq %ecx,%rcx
movsd  (%rax,%rcx,8),%xmm0
movsd  %xmm0,-0x68(%rbp)
mov    -0x18(%rbp),%rax
mov    -0x20(%rbp),%ecx
mov    -0x1c(%rbp),%edx
mov    -0x8(%rbp),%esi
mov    -0x4(%rbp),%edi
shl    $0x1,%edi
add    %edi,%esi
imul   $0x3,%esi,%esi
add    %esi,%edx
shl    $0x1,%edx
add    %edx,%ecx
shl    $0x1,%ecx
movslq %ecx,%rcx
movsd  0x8(%rax,%rcx,8),%xmm0
movsd  %xmm0,-0x70(%rbp)
mov    -0x18(%rbp),%rax
mov    -0x20(%rbp),%ecx
mov    -0x1c(%rbp),%edx
mov    -0x10(%rbp),%esi
mov    -0xc(%rbp),%edi
shl    $0x1,%edi
add    %edi,%esi
imul   $0x3,%esi,%esi
add    %esi,%edx
shl    $0x1,%edx
add    %edx,%ecx
shl    $0x1,%ecx
movslq %ecx,%rcx
movsd  (%rax,%rcx,8),%xmm0
movsd  %xmm0,-0x78(%rbp)
mov    -0x18(%rbp),%rax
mov    -0x20(%rbp),%ecx
mov    -0x1c(%rbp),%edx
mov    -0x10(%rbp),%esi
mov    -0xc(%rbp),%edi
shl    $0x1,%edi
add    %edi,%esi
imul   $0x3,%esi,%esi
add    %esi,%edx
shl    $0x1,%edx
add    %edx,%ecx
shl    $0x1,%ecx
movslq %ecx,%rcx
movsd  0x8(%rax,%rcx,8),%xmm0
movsd  %xmm0,-0x80(%rbp)
movsd  -0x28(%rbp),%xmm0
movsd  -0x78(%rbp),%xmm2
movsd  -0x30(%rbp),%xmm1
mulsd  -0x80(%rbp),%xmm1
movq   %xmm1,%rax
movabs $0x8000000000000000,%rcx
xor    %rcx,%rax
movq   %rax,%xmm1
mulsd  %xmm2,%xmm0
addsd  %xmm1,%xmm0
movsd  -0x38(%rbp),%xmm1
movsd  -0x68(%rbp),%xmm2
movq   %xmm1,%rax
movabs $0x8000000000000000,%rcx
xor    %rcx,%rax
movq   %rax,%xmm1
mulsd  %xmm2,%xmm1
addsd  %xmm0,%xmm1
movsd  -0x40(%rbp),%xmm0
movsd  -0x70(%rbp),%xmm2
mulsd  %xmm2,%xmm0
addsd  %xmm1,%xmm0
mov    -0x18(%rbp),%rax
mov    -0x20(%rbp),%ecx
mov    -0x1c(%rbp),%edx
mov    -0x10(%rbp),%esi
mov    -0xc(%rbp),%edi
shl    $0x1,%edi
add    %edi,%esi
imul   $0x3,%esi,%esi
add    %esi,%edx
shl    $0x1,%edx
add    %edx,%ecx
shl    $0x1,%ecx
movslq %ecx,%rcx
movsd  %xmm0,(%rax,%rcx,8)
movsd  -0x28(%rbp),%xmm0
movsd  -0x80(%rbp),%xmm2
movsd  -0x30(%rbp),%xmm1
mulsd  -0x78(%rbp),%xmm1
mulsd  %xmm2,%xmm0
addsd  %xmm1,%xmm0
movsd  -0x38(%rbp),%xmm1
movsd  -0x70(%rbp),%xmm2
movq   %xmm1,%rax
movabs $0x8000000000000000,%rcx
xor    %rcx,%rax
movq   %rax,%xmm1
mulsd  %xmm2,%xmm1
addsd  %xmm0,%xmm1
movsd  -0x40(%rbp),%xmm0
movsd  -0x68(%rbp),%xmm2
movq   %xmm0,%rax
movabs $0x8000000000000000,%rcx
xor    %rcx,%rax
movq   %rax,%xmm0
mulsd  %xmm2,%xmm0
addsd  %xmm1,%xmm0
mov    -0x18(%rbp),%rax
mov    -0x20(%rbp),%ecx
mov    -0x1c(%rbp),%edx
mov    -0x10(%rbp),%esi
mov    -0xc(%rbp),%edi
shl    $0x1,%edi
add    %edi,%esi
imul   $0x3,%esi,%esi
add    %esi,%edx
shl    $0x1,%edx
add    %edx,%ecx
shl    $0x1,%ecx
movslq %ecx,%rcx
movsd  %xmm0,0x8(%rax,%rcx,8)
mov    -0x20(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x20(%rbp)
jmp    1402 <project_r+0x302>
jmp    160e <project_r+0x50e>
mov    -0x1c(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x1c(%rbp)
jmp    13f1 <project_r+0x2f1>
pop    %rbp
ret

x86 assembly (clang, -O2):
<project_r>:
push   %rbp
push   %r15
push   %r14
push   %r13
push   %r12
push   %rbx
mov    %edx,%ebx
lea    (%rsi,%rdi,2),%eax
lea    (%rax,%rax,2),%eax
add    %edi,%eax
lea    (%rsi,%rax,2),%eax
add    %eax,%eax
cltq
movsd  (%r8,%rax,8),%xmm15
movsd  0x8(%r8,%rax,8),%xmm13
lea    (%rcx,%rbx,2),%eax
lea    (%rax,%rax,2),%r11d
add    %edi,%r11d
lea    (%rsi,%r11,2),%eax
add    %eax,%eax
cltq
movsd  (%r8,%rax,8),%xmm8
movsd  0x8(%r8,%rax,8),%xmm2
test   %esi,%esi
jg     1592 <project_r+0x492>
add    %r11d,%r11d
movapd 0xea5(%rip),%xmm14
movapd %xmm13,%xmm0
xorpd  %xmm14,%xmm0
movapd %xmm8,%xmm10
xorpd  %xmm14,%xmm10
xorpd  %xmm2,%xmm14
movslq %esi,%r9
mov    $0x1,%eax
sub    %r9,%rax
cmp    $0x2,%rax
jb     14f7 <project_r+0x3f7>
mov    %rax,-0x8(%rsp)
mov    %r9,%r10
neg    %r10
lea    (%r11,%rsi,1),%eax
lea    (%rax,%rax,1),%r12d
add    $0x2,%r12d
mov    %r10d,%r15d
add    %r15d,%r15d
setb   %r14b
mov    %rax,-0x40(%rsp)
lea    (%r15,%rax,2),%ebp
add    $0x2,%ebp
mov    $0x10,%edx
mov    %r10,%rax
mul    %rdx
seto   %r13b
cmp    %r12d,%ebp
jl     14f7 <project_r+0x3f7>
test   %r14b,%r14b
jne    14f7 <project_r+0x3f7>
shr    $0x20,%r10
jne    14f7 <project_r+0x3f7>
mov    %r12d,%edx
mov    %r9,-0x58(%rsp)
mov    %rbx,-0x70(%rsp)
mov    %rcx,-0x68(%rsp)
mov    %edi,%ecx
shl    $0x4,%ecx
sub    %edi,%ecx
sub    %edi,%ecx
lea    0x0(,%rsi,8),%r12d
sub    %esi,%r12d
add    %ecx,%r12d
lea    (%r12,%r12,1),%r9d
add    $0x2,%r9d
lea    (%r15,%r12,2),%ecx
add    $0x2,%ecx
cmp    %r9d,%ecx
jl     16b0 <project_r+0x5b0>
test   %r14b,%r14b
jne    16b0 <project_r+0x5b0>
test   %r10,%r10
jne    16b0 <project_r+0x5b0>
movslq %r9d,%rcx
lea    (%r8,%rcx,8),%rbx
lea    (%r8,%rcx,8),%rcx
add    $0x8,%rcx
lea    (%rax,%rbx,1),%rbp
add    $0x8,%rbp
cmp    %rcx,%rbp
jb     16b0 <project_r+0x5b0>
test   %r13b,%r13b
mov    -0x58(%rsp),%r9
jne    14ed <project_r+0x3ed>
movslq %edx,%rcx
lea    (%r8,%rcx,8),%rbp
lea    (%r8,%rcx,8),%rcx
add    $0x8,%rcx
lea    (%rax,%rbp,1),%rdx
add    $0x8,%rdx
cmp    %rcx,%rdx
jb     14ed <project_r+0x3ed>
test   %r13b,%r13b
jne    14ed <project_r+0x3ed>
lea    (%rax,%rbp,1),%rcx
cmp    %rbp,%rcx
jb     14ed <project_r+0x3ed>
test   %r13b,%r13b
jne    14ed <project_r+0x3ed>
add    %rbx,%rax
cmp    %rbx,%rax
jb     14ed <project_r+0x3ed>
test   %r13b,%r13b
jne    14ed <project_r+0x3ed>
mov    -0x40(%rsp),%rax
add    %eax,%eax
add    $0x2,%eax
movslq %eax,%rcx
lea    (%r8,%rcx,8),%rdx
lea    0x1(%rcx),%rax
lea    (%r9,%r9,1),%rbx
sub    %rbx,%rax
lea    (%r8,%rax,8),%rax
lea    (%r8,%rcx,8),%r9
add    $0x8,%r9
sub    %rbx,%rcx
lea    (%r8,%rcx,8),%r13
add    $0x10,%r13
lea    0x2(%r12,%r12,1),%ecx
movslq %ecx,%rcx
lea    (%r8,%rcx,8),%r14
lea    0x1(%rcx),%rbp
sub    %rbx,%rbp
lea    (%r8,%rbp,8),%rbp
lea    (%r8,%rcx,8),%r15
add    $0x8,%r15
sub    %rbx,%rcx
lea    (%r8,%rcx,8),%rcx
add    $0x10,%rcx
cmp    %r13,%rdx
setb   -0x18(%rsp)
cmp    %rax,%r9
setb   -0x28(%rsp)
cmp    %rbp,%rdx
setb   %bl
cmp    %rax,%r14
setb   -0x38(%rsp)
cmp    %rcx,%rdx
setb   %r10b
cmp    %rax,%r15
setb   -0x59(%rsp)
cmp    %rbp,%r9
setb   %dl
cmp    %r13,%r14
setb   %r14b
cmp    %rcx,%r9
setb   %al
cmp    %r13,%r15
setb   %bpl
mov    -0x28(%rsp),%cl
test   %cl,-0x18(%rsp)
jne    16b0 <project_r+0x5b0>
and    -0x38(%rsp),%bl
mov    -0x58(%rsp),%r9
jne    14ed <project_r+0x3ed>
and    -0x59(%rsp),%r10b
jne    14ed <project_r+0x3ed>
and    %r14b,%dl
jne    14ed <project_r+0x3ed>
and    %bpl,%al
jne    14ed <project_r+0x3ed>
movapd %xmm8,-0x18(%rsp)
mov    -0x8(%rsp),%rcx
mov    %rcx,%r10
and    $0xfffffffffffffffe,%r10
add    %r10,%r9
movapd %xmm0,-0x38(%rsp)
unpcklpd %xmm0,%xmm0
movapd %xmm0,-0x58(%rsp)
movapd %xmm15,%xmm0
unpcklpd %xmm15,%xmm0
movapd %xmm10,%xmm11
unpcklpd %xmm10,%xmm11
movapd %xmm2,%xmm12
unpcklpd %xmm2,%xmm12
movapd %xmm13,%xmm1
unpcklpd %xmm13,%xmm1
movapd %xmm14,-0x28(%rsp)
unpcklpd %xmm14,%xmm14
lea    (%r12,%r12,1),%edx
add    $0x2,%edx
mov    -0x40(%rsp),%rax
add    %eax,%eax
add    $0x2,%eax
mov    %r10,%rbx
cs nopw 0x0(%rax,%rax,1)
nopl   0x0(%rax)
movslq %edx,%rdx
movupd (%r8,%rdx,8),%xmm7
movupd 0x10(%r8,%rdx,8),%xmm6
movapd %xmm7,%xmm3
unpcklpd %xmm6,%xmm3
unpckhpd %xmm6,%xmm7
cltq
movupd (%r8,%rax,8),%xmm6
movupd 0x10(%r8,%rax,8),%xmm8
movapd %xmm6,%xmm9
unpcklpd %xmm8,%xmm9
unpckhpd %xmm8,%xmm6
movapd %xmm0,%xmm5
mulpd  %xmm6,%xmm5
mulpd  -0x58(%rsp),%xmm6
movapd %xmm0,%xmm4
mulpd  %xmm9,%xmm4
addpd  %xmm6,%xmm4
movapd %xmm11,%xmm6
mulpd  %xmm3,%xmm6
addpd  %xmm4,%xmm6
movapd %xmm12,%xmm4
mulpd  %xmm7,%xmm4
addpd  %xmm6,%xmm4
mulpd  %xmm1,%xmm9
addpd  %xmm5,%xmm9
mulpd  %xmm11,%xmm7
addpd  %xmm9,%xmm7
mulpd  %xmm14,%xmm3
addpd  %xmm7,%xmm3
movapd %xmm4,%xmm5
unpckhpd %xmm3,%xmm5
unpcklpd %xmm3,%xmm4
movupd %xmm4,(%r8,%rax,8)
movupd %xmm5,0x10(%r8,%rax,8)
add    $0x4,%edx
add    $0x4,%eax
add    $0xfffffffffffffffe,%rbx
jne    1410 <project_r+0x310>
cmp    %r10,%rcx
mov    -0x68(%rsp),%rcx
mov    -0x70(%rsp),%rbx
movapd -0x18(%rsp),%xmm8
movapd -0x28(%rsp),%xmm14
movapd -0x38(%rsp),%xmm0
jne    14f7 <project_r+0x3f7>
jmp    1592 <project_r+0x492>
mov    -0x68(%rsp),%rcx
mov    -0x70(%rsp),%rbx
movapd %xmm13,%xmm3
unpcklpd %xmm0,%xmm3
movapd %xmm15,%xmm5
unpcklpd %xmm15,%xmm5
unpcklpd %xmm10,%xmm10
movapd %xmm2,%xmm6
unpcklpd %xmm14,%xmm6
lea    -0x1(%r9),%rax
mov    %edi,%ebp
shl    $0x4,%ebp
sub    %edi,%ebp
sub    %edi,%ebp
lea    (%rsi,%rsi,2),%edx
lea    0x0(%rbp,%rdx,2),%edx
add    %r9d,%edx
add    %edx,%edx
add    $0x2,%edx
add    %r9d,%r11d
lea    (%r11,%r11,1),%ebp
add    $0x2,%ebp
xchg   %ax,%ax
movslq %edx,%rdx
movupd (%r8,%rdx,8),%xmm4
movapd %xmm4,%xmm7
shufpd $0x1,%xmm4,%xmm7
mulpd  %xmm6,%xmm7
movslq %ebp,%rbp
movupd (%r8,%rbp,8),%xmm0
movapd %xmm0,%xmm1
mulpd  %xmm3,%xmm1
shufpd $0x1,%xmm1,%xmm1
mulpd  %xmm5,%xmm0
addpd  %xmm1,%xmm0
mulpd  %xmm10,%xmm4
addpd  %xmm0,%xmm4
addpd  %xmm7,%xmm4
movupd %xmm4,(%r8,%rbp,8)
add    $0x2,%edx
add    $0x2,%ebp
inc    %rax
jne    1540 <project_r+0x440>
cmp    $0x1,%edi
jg     16a5 <project_r+0x5a5>
movapd 0xa5d(%rip),%xmm3
movapd %xmm13,%xmm4
xorpd  %xmm3,%xmm4
xorpd  %xmm3,%xmm8
xorpd  %xmm2,%xmm3
movslq %edi,%rax
unpcklpd %xmm3,%xmm2
pshufd $0x44,%xmm8,%xmm3
unpcklpd %xmm15,%xmm15
unpcklpd %xmm4,%xmm13
lea    (%rbx,%rbx,2),%ebp
lea    (%rcx,%rcx,2),%edx
shl    $0x2,%edx
lea    (%rdx,%rbp,8),%ecx
lea    (%rcx,%rdi,4),%ecx
add    $0x6,%ecx
lea    (%rdi,%rdi,8),%edx
lea    (%rdx,%rdx,2),%edx
add    %edi,%edx
lea    (%rsi,%rsi,2),%esi
lea    (%rdx,%rsi,4),%edx
add    $0x6,%edx
add    $0xfffffffffffffffe,%rax
cs nopw 0x0(%rax,%rax,1)
nopl   (%rax)
lea    -0x2(%rdx),%esi
movslq %esi,%rsi
movupd (%r8,%rsi,8),%xmm0
lea    -0x2(%rcx),%esi
movslq %esi,%rsi
movupd (%r8,%rsi,8),%xmm1
movapd %xmm1,%xmm4
mulpd  %xmm13,%xmm4
shufpd $0x1,%xmm4,%xmm4
mulpd  %xmm15,%xmm1
addpd  %xmm4,%xmm1
movdqa %xmm3,%xmm4
mulpd  %xmm0,%xmm4
shufpd $0x1,%xmm0,%xmm0
addpd  %xmm1,%xmm4
mulpd  %xmm2,%xmm0
addpd  %xmm4,%xmm0
movupd %xmm0,(%r8,%rsi,8)
movslq %edx,%rdx
movupd (%r8,%rdx,8),%xmm0
movslq %ecx,%rcx
movupd (%r8,%rcx,8),%xmm1
movapd %xmm1,%xmm4
mulpd  %xmm13,%xmm4
shufpd $0x1,%xmm4,%xmm4
mulpd  %xmm15,%xmm1
addpd  %xmm4,%xmm1
movdqa %xmm3,%xmm4
mulpd  %xmm0,%xmm4
shufpd $0x1,%xmm0,%xmm0
addpd  %xmm1,%xmm4
mulpd  %xmm2,%xmm0
addpd  %xmm4,%xmm0
movupd %xmm0,(%r8,%rcx,8)
add    $0x4,%ecx
add    $0x4,%edx
inc    %rax
jne    1600 <project_r+0x500>
pop    %rbx
pop    %r12
pop    %r13
pop    %r14
pop    %r15
pop    %rbp
ret
mov    -0x68(%rsp),%rcx
mov    -0x70(%rsp),%rbx
mov    -0x58(%rsp),%r9
jmp    14f7 <project_r+0x3f7>

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

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