void merge_matrix(int n1, int n2, double c_ll, const double *a_ll, double c_lh,
                  const double *a_lh, double c_hl, const double *a_hl,
                  double c_hh, const double *a_hh, int n, double *a) {
  int i, j;
  for (i = 0; i < n1; i++) {
    for (j = 0; j < n1; j++) {
      a[i * n + j] = c_ll * a_ll[i * n1 + j];
    }
    for (j = n1; j < n; j++) {
      a[i * n + j] = c_lh * a_lh[i * n2 + (j - n1)];
    }
  }
  for (i = n1; i < n; i++) {
    for (j = 0; j < n1; j++) {
      a[i * n + j] = c_hl * a_hl[(i - n1) * n1 + j];
    }
    for (j = n1; j < n; j++) {
      a[i * n + j] = c_hh * a_hh[(i - n1) * n2 + (j - n1)];
    }
  }
}


x86 assembly (clang, -O0):
<merge_matrix>:
push   %rbp
mov    %rsp,%rbp
mov    0x18(%rbp),%rax
mov    0x10(%rbp),%eax
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
movsd  %xmm0,-0x10(%rbp)
mov    %rdx,-0x18(%rbp)
movsd  %xmm1,-0x20(%rbp)
mov    %rcx,-0x28(%rbp)
movsd  %xmm2,-0x30(%rbp)
mov    %r8,-0x38(%rbp)
movsd  %xmm3,-0x40(%rbp)
mov    %r9,-0x48(%rbp)
movl   $0x0,-0x4c(%rbp)
mov    -0x4c(%rbp),%eax
cmp    -0x4(%rbp),%eax
jge    1203 <merge_matrix+0x103>
movl   $0x0,-0x50(%rbp)
mov    -0x50(%rbp),%eax
cmp    -0x4(%rbp),%eax
jge    119a <merge_matrix+0x9a>
movsd  -0x10(%rbp),%xmm0
mov    -0x18(%rbp),%rax
mov    -0x4c(%rbp),%ecx
imul   -0x4(%rbp),%ecx
add    -0x50(%rbp),%ecx
movslq %ecx,%rcx
mulsd  (%rax,%rcx,8),%xmm0
mov    0x18(%rbp),%rax
mov    -0x4c(%rbp),%ecx
imul   0x10(%rbp),%ecx
add    -0x50(%rbp),%ecx
movslq %ecx,%rcx
movsd  %xmm0,(%rax,%rcx,8)
mov    -0x50(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x50(%rbp)
jmp    114f <merge_matrix+0x4f>
mov    -0x4(%rbp),%eax
mov    %eax,-0x50(%rbp)
mov    -0x50(%rbp),%eax
cmp    0x10(%rbp),%eax
jge    11f0 <merge_matrix+0xf0>
movsd  -0x20(%rbp),%xmm0
mov    -0x28(%rbp),%rax
mov    -0x4c(%rbp),%ecx
imul   -0x8(%rbp),%ecx
mov    -0x50(%rbp),%edx
sub    -0x4(%rbp),%edx
add    %edx,%ecx
movslq %ecx,%rcx
mulsd  (%rax,%rcx,8),%xmm0
mov    0x18(%rbp),%rax
mov    -0x4c(%rbp),%ecx
imul   0x10(%rbp),%ecx
add    -0x50(%rbp),%ecx
movslq %ecx,%rcx
movsd  %xmm0,(%rax,%rcx,8)
mov    -0x50(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x50(%rbp)
jmp    11a0 <merge_matrix+0xa0>
jmp    11f5 <merge_matrix+0xf5>
mov    -0x4c(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x4c(%rbp)
jmp    113c <merge_matrix+0x3c>
mov    -0x4(%rbp),%eax
mov    %eax,-0x4c(%rbp)
mov    -0x4c(%rbp),%eax
cmp    0x10(%rbp),%eax
jge    12d6 <merge_matrix+0x1d6>
movl   $0x0,-0x50(%rbp)
mov    -0x50(%rbp),%eax
cmp    -0x4(%rbp),%eax
jge    126a <merge_matrix+0x16a>
movsd  -0x30(%rbp),%xmm0
mov    -0x38(%rbp),%rax
mov    -0x4c(%rbp),%ecx
sub    -0x4(%rbp),%ecx
imul   -0x4(%rbp),%ecx
add    -0x50(%rbp),%ecx
movslq %ecx,%rcx
mulsd  (%rax,%rcx,8),%xmm0
mov    0x18(%rbp),%rax
mov    -0x4c(%rbp),%ecx
imul   0x10(%rbp),%ecx
add    -0x50(%rbp),%ecx
movslq %ecx,%rcx
movsd  %xmm0,(%rax,%rcx,8)
mov    -0x50(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x50(%rbp)
jmp    121c <merge_matrix+0x11c>
mov    -0x4(%rbp),%eax
mov    %eax,-0x50(%rbp)
mov    -0x50(%rbp),%eax
cmp    0x10(%rbp),%eax
jge    12c3 <merge_matrix+0x1c3>
movsd  -0x40(%rbp),%xmm0
mov    -0x48(%rbp),%rax
mov    -0x4c(%rbp),%ecx
sub    -0x4(%rbp),%ecx
imul   -0x8(%rbp),%ecx
mov    -0x50(%rbp),%edx
sub    -0x4(%rbp),%edx
add    %edx,%ecx
movslq %ecx,%rcx
mulsd  (%rax,%rcx,8),%xmm0
mov    0x18(%rbp),%rax
mov    -0x4c(%rbp),%ecx
imul   0x10(%rbp),%ecx
add    -0x50(%rbp),%ecx
movslq %ecx,%rcx
movsd  %xmm0,(%rax,%rcx,8)
mov    -0x50(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x50(%rbp)
jmp    1270 <merge_matrix+0x170>
jmp    12c8 <merge_matrix+0x1c8>
mov    -0x4c(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x4c(%rbp)
jmp    1209 <merge_matrix+0x109>
pop    %rbp
ret

x86 assembly (clang, -O2):
<merge_matrix>:
push   %rbp
push   %r15
push   %r14
push   %r13
push   %r12
push   %rbx
sub    $0x90,%rsp
mov    %r9,0x68(%rsp)
mov    %r8,0x50(%rsp)
mov    0xd0(%rsp),%r13
mov    %edi,%ebp
movslq 0xc8(%rsp),%rbx
mov    %esi,-0x54(%rsp)
mov    %esi,%eax
mov    %rax,0x58(%rsp)
mov    %edi,-0x7c(%rsp)
test   %edi,%edi
mov    %rbp,-0x78(%rsp)
mov    %rbx,-0x38(%rsp)
jle    16c9 <merge_matrix+0x5c9>
mov    %rdx,%rdi
mov    %rbp,%rax
not    %rax
add    %rbx,%rax
mov    %rax,-0x70(%rsp)
mov    %rbp,%rax
neg    %rax
mov    %rax,0x40(%rsp)
lea    0x0(,%rbp,8),%rax
mov    %rcx,%rdx
mov    %rax,0x48(%rsp)
sub    %rax,%rdx
mov    %rdx,0x18(%rsp)
mov    %rbx,%rdx
sub    %rbp,%rdx
mov    %ebp,%eax
and    $0xfffffffc,%eax
mov    %rax,0x38(%rsp)
add    $0xfffffffffffffffc,%rax
mov    %rax,0x30(%rsp)
mov    %rax,%rsi
shr    $0x2,%rsi
add    $0x1,%rsi
lea    -0x4(%rdx),%rax
mov    %rax,0x10(%rsp)
mov    %rax,%r8
shr    $0x2,%r8
add    $0x1,%r8
movapd %xmm0,%xmm4
unpcklpd %xmm0,%xmm4
mov    %rsi,%rax
mov    %rsi,0x28(%rsp)
movabs $0x7ffffffffffffffe,%r10
ff ff 7f
and    %r10,%rsi
mov    %rsi,0x20(%rsp)
mov    %rdx,-0x28(%rsp)
mov    %rdx,%rax
and    $0xfffffffffffffffc,%rax
movapd %xmm1,%xmm5
unpcklpd %xmm1,%xmm5
mov    %r8,%rdx
mov    %r8,0x8(%rsp)
and    %r10,%r8
mov    %r8,-0x10(%rsp)
mov    %rbx,%rdx
neg    %rdx
mov    %rdx,-0x30(%rsp)
mov    $0x1,%esi
mov    -0x7c(%rsp),%edx
sub    %edx,%esi
mov    %edx,%r9d
neg    %r9d
mov    %rax,(%rsp)
add    %rbp,%rax
mov    %rax,-0x8(%rsp)
lea    0x30(%rdi),%r8
lea    0x30(%r13),%r11
lea    0x0(,%rbx,8),%rax
mov    %rax,-0x48(%rsp)
lea    0x8(%r13),%r10
lea    0x30(,%rbp,8),%r12
add    %r13,%r12
mov    $0x4,%eax
mov    %rax,-0x50(%rsp)
xor    %eax,%eax
mov    %rax,-0x40(%rsp)
mov    %rdi,%rdx
xor    %r14d,%r14d
mov    %rdi,-0x18(%rsp)
jmp    12c4 <merge_matrix+0x1c4>
nopw   0x0(%rax,%rax,1)
add    $0x1,%r15
mov    0x48(%rsp),%rax
add    %rax,%r8
mov    -0x48(%rsp),%rbx
add    %rbx,%r11
add    %rbx,%r10
add    %rax,%rdx
add    %rbx,%r13
mov    %r15,%r14
mov    %r12,%rsi
mov    %r13,%r12
mov    0x58(%rsp),%rax
add    %rax,-0x50(%rsp)
add    %rax,-0x40(%rsp)
add    %rax,%rsi
add    %rax,%r9
cmp    %rbp,%r15
mov    0xd0(%rsp),%r13
mov    %rdi,%rbx
mov    -0x18(%rsp),%rdi
je     16c9 <merge_matrix+0x5c9>
mov    %r14,%r15
imul   %rbx,%r15
mov    %r14,-0x60(%rsp)
imul   %rbp,%r14
lea    (%r15,%rbp,1),%rax
lea    0x0(,%rax,8),%rax
add    %r13,%rax
mov    %rax,-0x68(%rsp)
cmpl   $0x4,-0x7c(%rsp)
jae    1310 <merge_matrix+0x210>
xor    %ebx,%ebx
mov    %r12,%r13
mov    -0x60(%rsp),%rax
mov    %rsi,%r12
mov    %r15,%rsi
mov    %rax,%r15
jmp    1430 <merge_matrix+0x330>
nopw   0x0(%rax,%rax,1)
lea    (%r14,%rbp,1),%rax
lea    (%rdi,%rax,8),%rax
mov    %r15,-0x20(%rsp)
lea    0x0(,%r15,8),%rbx
add    %r13,%rbx
cmp    %rax,%rbx
jae    1350 <merge_matrix+0x250>
lea    (%rdi,%r14,8),%rax
cmp    -0x68(%rsp),%rax
jae    1350 <merge_matrix+0x250>
xor    %ebx,%ebx
mov    %r12,%r13
mov    -0x60(%rsp),%r15
mov    %rsi,%r12
mov    -0x20(%rsp),%rsi
jmp    1430 <merge_matrix+0x330>
nop
cmpq   $0x0,0x30(%rsp)
mov    %r12,%r13
je     13d2 <merge_matrix+0x2d2>
mov    0x20(%rsp),%rax
xor    %ebp,%ebp
mov    0xd0(%rsp),%rbx
mov    -0x60(%rsp),%r15
mov    %rsi,%r12
cs nopw 0x0(%rax,%rax,1)
nopl   0x0(%rax)
movupd -0x30(%r8,%rbp,8),%xmm6
movupd -0x20(%r8,%rbp,8),%xmm7
mulpd  %xmm4,%xmm6
mulpd  %xmm4,%xmm7
movupd %xmm6,-0x30(%r11,%rbp,8)
movupd %xmm7,-0x20(%r11,%rbp,8)
movupd -0x10(%r8,%rbp,8),%xmm6
movupd (%r8,%rbp,8),%xmm7
mulpd  %xmm4,%xmm6
mulpd  %xmm4,%xmm7
movupd %xmm6,-0x10(%r11,%rbp,8)
movupd %xmm7,(%r11,%rbp,8)
add    $0x8,%rbp
add    $0xfffffffffffffffe,%rax
jne    1380 <merge_matrix+0x280>
jmp    13e4 <merge_matrix+0x2e4>
xor    %ebp,%ebp
mov    0xd0(%rsp),%rbx
mov    -0x60(%rsp),%r15
mov    %rsi,%r12
testb  $0x1,0x28(%rsp)
mov    -0x20(%rsp),%rsi
je     1415 <merge_matrix+0x315>
lea    (%r14,%rbp,1),%rax
movupd (%rdi,%rax,8),%xmm6
movupd 0x10(%rdi,%rax,8),%xmm7
mulpd  %xmm4,%xmm6
mulpd  %xmm4,%xmm7
add    %rsi,%rbp
movupd %xmm6,(%rbx,%rbp,8)
movupd %xmm7,0x10(%rbx,%rbp,8)
mov    0x38(%rsp),%rax
mov    %rax,%rbx
mov    -0x78(%rsp),%rbp
cmp    %rbp,%rax
je     1499 <merge_matrix+0x399>
nopw   0x0(%rax,%rax,1)
mov    %rbx,%rax
test   $0x1,%bpl
je     1464 <merge_matrix+0x364>
add    %rbx,%r14
movsd  (%rdi,%r14,8),%xmm6
mulsd  %xmm0,%xmm6
lea    (%rbx,%rsi,1),%rax
mov    0xd0(%rsp),%rbp
movsd  %xmm6,0x0(%rbp,%rax,8)
mov    -0x78(%rsp),%rbp
mov    %rbx,%rax
or     $0x1,%rax
not    %rbx
cmp    0x40(%rsp),%rbx
je     1499 <merge_matrix+0x399>
xchg   %ax,%ax
movsd  (%rdx,%rax,8),%xmm6
mulsd  %xmm0,%xmm6
movsd  %xmm6,-0x8(%r10,%rax,8)
movsd  0x8(%rdx,%rax,8),%xmm6
mulsd  %xmm0,%xmm6
movsd  %xmm6,(%r10,%rax,8)
add    $0x2,%rax
cmp    %rax,%rbp
jne    1470 <merge_matrix+0x370>
mov    0xc8(%rsp),%eax
cmp    %eax,-0x7c(%rsp)
mov    -0x38(%rsp),%rdi
jge    1270 <merge_matrix+0x170>
mov    %rsi,%r14
mov    %r15d,%esi
imul   -0x54(%rsp),%esi
mov    %rbp,%rax
cmpq   $0x4,-0x28(%rsp)
jb     1630 <merge_matrix+0x530>
mov    %r15d,%ebx
imul   -0x54(%rsp),%ebx
mov    -0x70(%rsp),%rax
lea    (%rbx,%rax,1),%ebp
mov    -0x78(%rsp),%rax
cmp    %ebx,%ebp
mov    -0x78(%rsp),%rbp
jl     1630 <merge_matrix+0x530>
mov    -0x70(%rsp),%rax
shr    $0x20,%rax
mov    %rbp,%rax
jne    1630 <merge_matrix+0x530>
movslq %ebx,%rax
lea    (%rdi,%rax,1),%rbx
mov    0x18(%rsp),%rbp
lea    0x0(,%rbx,8),%rbx
add    %rbp,%rbx
cmp    %rbx,-0x68(%rsp)
jae    1544 <merge_matrix+0x444>
lea    (%r14,%rdi,1),%rbx
mov    0xd0(%rsp),%rbp
lea    0x0(,%rbx,8),%rbx
add    %rbp,%rbx
lea    (%rcx,%rax,8),%rbp
mov    -0x78(%rsp),%rax
cmp    %rbx,%rbp
jb     1630 <merge_matrix+0x530>
cmpq   $0x4,0x10(%rsp)
jae    1550 <merge_matrix+0x450>
xor    %ebp,%ebp
jmp    15c7 <merge_matrix+0x4c7>
mov    -0x10(%rsp),%rbx
xor    %ebp,%ebp
mov    -0x50(%rsp),%r15
mov    -0x40(%rsp),%rdi
cs nopw 0x0(%rax,%rax,1)
nopl   0x0(%rax,%rax,1)
lea    (%rdi,%rbp,1),%eax
cltq
movupd (%rcx,%rax,8),%xmm6
movupd 0x10(%rcx,%rax,8),%xmm7
mulpd  %xmm5,%xmm6
mulpd  %xmm5,%xmm7
movupd %xmm6,-0x30(%r13,%rbp,8)
movupd %xmm7,-0x20(%r13,%rbp,8)
lea    (%r15,%rbp,1),%eax
cltq
movupd (%rcx,%rax,8),%xmm6
movupd 0x10(%rcx,%rax,8),%xmm7
mulpd  %xmm5,%xmm6
mulpd  %xmm5,%xmm7
movupd %xmm6,-0x10(%r13,%rbp,8)
movupd %xmm7,0x0(%r13,%rbp,8)
add    $0x8,%rbp
add    $0xfffffffffffffffe,%rbx
jne    1570 <merge_matrix+0x470>
testb  $0x1,0x8(%rsp)
mov    -0x60(%rsp),%r15
je     1609 <merge_matrix+0x509>
mov    -0x78(%rsp),%rax
add    %rbp,%rax
add    %esi,%ebp
movslq %ebp,%rbx
movupd (%rcx,%rbx,8),%xmm6
movupd 0x10(%rcx,%rbx,8),%xmm7
mulpd  %xmm5,%xmm6
mulpd  %xmm5,%xmm7
add    %r14,%rax
mov    0xd0(%rsp),%rbx
movupd %xmm6,(%rbx,%rax,8)
movupd %xmm7,0x10(%rbx,%rax,8)
mov    -0x8(%rsp),%rax
mov    (%rsp),%rdi
cmp    %rdi,-0x28(%rsp)
mov    -0x78(%rsp),%rbp
mov    -0x38(%rsp),%rdi
je     1270 <merge_matrix+0x170>
nopw   0x0(%rax,%rax,1)
mov    0xc8(%rsp),%ebx
mov    %ebx,%ebp
sub    %eax,%ebp
mov    %rax,%rbx
test   $0x1,%bpl
je     166c <merge_matrix+0x56c>
sub    -0x7c(%rsp),%esi
lea    (%rax,%rsi,1),%ebx
movslq %ebx,%rbx
movsd  (%rcx,%rbx,8),%xmm6
mulsd  %xmm1,%xmm6
add    %rax,%r14
mov    0xd0(%rsp),%rbx
movsd  %xmm6,(%rbx,%r14,8)
lea    0x1(%rax),%rbx
not    %rax
cmp    -0x30(%rsp),%rax
mov    -0x78(%rsp),%rbp
mov    -0x38(%rsp),%rdi
je     1270 <merge_matrix+0x170>
cs nopw 0x0(%rax,%rax,1)
xchg   %ax,%ax
lea    (%r9,%rbx,1),%eax
cltq
movsd  (%rcx,%rax,8),%xmm6
mulsd  %xmm1,%xmm6
movsd  %xmm6,-0x8(%r10,%rbx,8)
lea    (%r12,%rbx,1),%eax
cltq
movsd  (%rcx,%rax,8),%xmm6
mulsd  %xmm1,%xmm6
movsd  %xmm6,(%r10,%rbx,8)
add    $0x2,%rbx
cmp    %rbx,%rdi
jne    1690 <merge_matrix+0x590>
jmp    1270 <merge_matrix+0x170>
mov    0xc8(%rsp),%eax
cmp    %eax,-0x7c(%rsp)
mov    0x68(%rsp),%r9
jge    1cce <merge_matrix+0xbce>
mov    -0x7c(%rsp),%r8d
movslq %r8d,%rsi
mov    %rsi,%rcx
not    %rcx
add    %rbx,%rcx
mov    %rcx,-0x30(%rsp)
lea    0x1(%rbx),%r14
imul   %rsi,%r14
lea    0x0(,%rsi,8),%rcx
lea    0x8(,%rsi,8),%rdx
imul   %rbx,%rdx
mov    %rdx,0x10(%rsp)
mov    %r9,%rdx
mov    %rcx,-0x20(%rsp)
sub    %rcx,%rdx
mov    %rdx,0x20(%rsp)
mov    %rbx,%rbp
sub    %rsi,%rbp
mov    %rbx,%rdi
imul   %rsi,%rdi
mov    -0x78(%rsp),%r10
mov    %r10d,%ecx
and    $0xfffffffc,%ecx
mov    %rcx,0x8(%rsp)
add    $0xfffffffffffffffc,%rcx
mov    %rcx,(%rsp)
mov    %rcx,%rax
shr    $0x2,%rax
add    $0x1,%rax
lea    -0x4(%rbp),%rcx
mov    %rcx,-0x10(%rsp)
mov    %rcx,%rdx
shr    $0x2,%rdx
add    $0x1,%rdx
movapd %xmm2,%xmm0
unpcklpd %xmm2,%xmm0
mov    %rax,%rcx
mov    %rax,-0x8(%rsp)
movabs $0x7ffffffffffffffe,%rcx
ff ff 7f
and    %rcx,%rax
mov    %rax,0x70(%rsp)
mov    %r10,%rax
neg    %rax
mov    %rax,0x38(%rsp)
mov    %rbp,-0x18(%rsp)
and    $0xfffffffffffffffc,%rbp
movapd %xmm3,%xmm1
unpcklpd %xmm3,%xmm1
mov    %rdx,%rax
mov    %rdx,0x88(%rsp)
and    %rdx,%rcx
mov    %rcx,0x60(%rsp)
mov    %rbx,%rax
neg    %rax
mov    %rax,-0x28(%rsp)
mov    $0x1,%r11d
sub    %r8d,%r11d
mov    %r8d,%r12d
neg    %r12d
lea    (%rdi,%r10,1),%rax
mov    %rax,0x18(%rsp)
mov    %rbp,0x80(%rsp)
lea    (%rsi,%rbp,1),%rax
mov    %rax,0x78(%rsp)
mov    0x50(%rsp),%r10
lea    0x30(%r10),%r8
mov    0xd0(%rsp),%rax
lea    0x30(%rax,%rdi,8),%r13
lea    0x0(,%rbx,8),%rcx
mov    %rcx,0x40(%rsp)
mov    %rdi,0x30(%rsp)
lea    0x8(%rax,%rdi,8),%rbp
mov    %r14,0x28(%rsp)
lea    (%rax,%r14,8),%r14
add    $0x30,%r14
mov    $0x4,%ecx
xor    %edx,%edx
mov    %rsi,-0x68(%rsp)
mov    %rsi,%r15
xor    %esi,%esi
jmp    188a <merge_matrix+0x78a>
nopl   0x0(%rax)
mov    -0x50(%rsp),%r15
add    $0x1,%r15
mov    -0x60(%rsp),%rdx
add    $0x1,%rdx
mov    -0x20(%rsp),%rax
add    %rax,%r8
mov    0x40(%rsp),%rcx
add    %rcx,%r13
add    %rcx,%rbp
add    %rax,%r10
add    %rcx,%r14
mov    0x58(%rsp),%rax
mov    -0x40(%rsp),%rcx
add    %rax,%rcx
add    %rax,%rsi
add    %rax,%r11
add    %rax,%r12
cmp    %rbx,%r15
je     1cce <merge_matrix+0xbce>
mov    %rsi,0x48(%rsp)
mov    %rcx,-0x40(%rsp)
mov    %rdx,-0x60(%rsp)
imul   %rbx,%rdx
mov    %rdx,-0x48(%rsp)
cmpl   $0x0,-0x7c(%rsp)
mov    0x50(%rsp),%rcx
mov    %r15,-0x50(%rsp)
jle    1a7a <merge_matrix+0x97a>
mov    %r15,%rdx
mov    -0x68(%rsp),%rbx
sub    %rbx,%rdx
imul   %rbx,%rdx
mov    %r15,%rsi
imul   -0x38(%rsp),%rsi
cmpl   $0x4,-0x7c(%rsp)
jae    18f0 <merge_matrix+0x7f0>
xor    %eax,%eax
mov    -0x78(%rsp),%rbx
jmp    1a10 <merge_matrix+0x910>
cs nopw 0x0(%rax,%rax,1)
nopl   0x0(%rax)
mov    %rsi,-0x70(%rsp)
mov    0x30(%rsp),%rax
mov    -0x48(%rsp),%rsi
lea    (%rax,%rsi,1),%rdi
mov    -0x60(%rsp),%rax
imul   %rbx,%rax
mov    -0x78(%rsp),%rbx
add    %rax,%rbx
mov    0xd0(%rsp),%r15
lea    (%r15,%rdi,8),%rdi
lea    (%rcx,%rbx,8),%rbx
cmp    %rbx,%rdi
mov    0xd0(%rsp),%rbx
jae    195c <merge_matrix+0x85c>
mov    0x18(%rsp),%rdi
add    %rsi,%rdi
lea    (%rbx,%rdi,8),%rdi
lea    (%rcx,%rax,8),%rax
cmp    %rdi,%rax
jae    195c <merge_matrix+0x85c>
xor    %eax,%eax
mov    -0x78(%rsp),%rbx
mov    -0x50(%rsp),%r15
mov    -0x70(%rsp),%rsi
jmp    1a10 <merge_matrix+0x910>
cmpq   $0x0,(%rsp)
je     1be1 <merge_matrix+0xae1>
mov    0x70(%rsp),%rax
xor    %edi,%edi
mov    -0x50(%rsp),%r15
mov    -0x70(%rsp),%rsi
nopl   0x0(%rax,%rax,1)
movupd -0x30(%r8,%rdi,8),%xmm4
movupd -0x20(%r8,%rdi,8),%xmm5
mulpd  %xmm0,%xmm4
mulpd  %xmm0,%xmm5
movupd %xmm4,-0x30(%r13,%rdi,8)
movupd %xmm5,-0x20(%r13,%rdi,8)
movupd -0x10(%r8,%rdi,8),%xmm4
movupd (%r8,%rdi,8),%xmm5
mulpd  %xmm0,%xmm4
mulpd  %xmm0,%xmm5
movupd %xmm4,-0x10(%r13,%rdi,8)
movupd %xmm5,0x0(%r13,%rdi,8)
add    $0x8,%rdi
add    $0xfffffffffffffffe,%rax
jne    1980 <merge_matrix+0x880>
testb  $0x1,-0x8(%rsp)
je     19fd <merge_matrix+0x8fd>
lea    (%rdi,%rdx,1),%rax
movupd (%rcx,%rax,8),%xmm4
movupd 0x10(%rcx,%rax,8),%xmm5
mulpd  %xmm0,%xmm4
mulpd  %xmm0,%xmm5
add    %rsi,%rdi
movupd %xmm4,(%rbx,%rdi,8)
movupd %xmm5,0x10(%rbx,%rdi,8)
mov    0x8(%rsp),%rdi
mov    %rdi,%rax
mov    -0x78(%rsp),%rbx
cmp    %rbx,%rdi
je     1a7a <merge_matrix+0x97a>
nop
mov    %rax,%rdi
test   $0x1,%bl
je     1a3b <merge_matrix+0x93b>
add    %rax,%rdx
movsd  (%rcx,%rdx,8),%xmm4
mulsd  %xmm2,%xmm4
add    %rax,%rsi
mov    0xd0(%rsp),%rdx
movsd  %xmm4,(%rdx,%rsi,8)
mov    %rax,%rdi
or     $0x1,%rdi
not    %rax
cmp    0x38(%rsp),%rax
mov    -0x78(%rsp),%rax
je     1a7a <merge_matrix+0x97a>
nopw   0x0(%rax,%rax,1)
movsd  (%r10,%rdi,8),%xmm4
mulsd  %xmm2,%xmm4
movsd  %xmm4,-0x8(%rbp,%rdi,8)
movsd  0x8(%r10,%rdi,8),%xmm4
mulsd  %xmm2,%xmm4
movsd  %xmm4,0x0(%rbp,%rdi,8)
add    $0x2,%rdi
cmp    %rdi,%rax
jne    1a50 <merge_matrix+0x950>
mov    %r15,%rax
sub    -0x7c(%rsp),%r15d
imul   -0x54(%rsp),%r15d
mov    %rax,%rcx
mov    -0x38(%rsp),%rbx
imul   %rbx,%rcx
mov    -0x68(%rsp),%rdx
cmpq   $0x4,-0x18(%rsp)
mov    0x48(%rsp),%rsi
jae    1b40 <merge_matrix+0xa40>
mov    0xc8(%rsp),%eax
mov    %eax,%edi
sub    %edx,%edi
mov    %rdx,%rax
test   $0x1,%dil
je     1ae7 <merge_matrix+0x9e7>
sub    -0x7c(%rsp),%r15d
lea    (%rdx,%r15,1),%eax
cltq
movsd  (%r9,%rax,8),%xmm4
mulsd  %xmm3,%xmm4
add    %rdx,%rcx
mov    0xd0(%rsp),%rax
movsd  %xmm4,(%rax,%rcx,8)
lea    0x1(%rdx),%rax
not    %rdx
cmp    -0x28(%rsp),%rdx
je     1840 <merge_matrix+0x740>
cs nopw 0x0(%rax,%rax,1)
nop
lea    (%r12,%rax,1),%ecx
movslq %ecx,%rcx
movsd  (%r9,%rcx,8),%xmm4
mulsd  %xmm3,%xmm4
movsd  %xmm4,-0x8(%rbp,%rax,8)
lea    (%r11,%rax,1),%ecx
movslq %ecx,%rcx
movsd  (%r9,%rcx,8),%xmm4
mulsd  %xmm3,%xmm4
movsd  %xmm4,0x0(%rbp,%rax,8)
add    $0x2,%rax
cmp    %rax,%rbx
jne    1b00 <merge_matrix+0xa00>
jmp    1840 <merge_matrix+0x740>
nopl   0x0(%rax)
mov    -0x60(%rsp),%rax
imul   -0x54(%rsp),%eax
mov    -0x30(%rsp),%rdx
lea    (%rax,%rdx,1),%edi
mov    -0x68(%rsp),%rdx
cmp    %eax,%edi
jl     1aaa <merge_matrix+0x9aa>
mov    -0x30(%rsp),%rdx
shr    $0x20,%rdx
mov    -0x68(%rsp),%rdx
jne    1aaa <merge_matrix+0x9aa>
mov    0x28(%rsp),%rdx
mov    %rcx,-0x70(%rsp)
mov    -0x48(%rsp),%rcx
add    %rdx,%rcx
cltq
lea    (%rbx,%rax,1),%rdi
mov    0xd0(%rsp),%rdx
lea    (%rdx,%rcx,8),%rcx
mov    0x20(%rsp),%rdx
lea    (%rdx,%rdi,8),%rdi
cmp    %rdi,%rcx
jae    1bd2 <merge_matrix+0xad2>
mov    0xd0(%rsp),%rdx
mov    -0x48(%rsp),%rcx
lea    (%rdx,%rcx,8),%rdi
mov    -0x70(%rsp),%rcx
add    0x10(%rsp),%rdi
lea    (%r9,%rax,8),%rax
mov    -0x68(%rsp),%rdx
cmp    %rax,%rdi
ja     1aaa <merge_matrix+0x9aa>
cmpq   $0x4,-0x10(%rsp)
jae    1bfd <merge_matrix+0xafd>
xor    %edx,%edx
jmp    1c69 <merge_matrix+0xb69>
xor    %edi,%edi
mov    -0x50(%rsp),%r15
mov    -0x70(%rsp),%rsi
testb  $0x1,-0x8(%rsp)
jne    19d8 <merge_matrix+0x8d8>
jmp    19fd <merge_matrix+0x8fd>
mov    0x60(%rsp),%rdi
xor    %edx,%edx
mov    -0x40(%rsp),%rcx
nopl   0x0(%rax)
lea    (%rsi,%rdx,1),%eax
cltq
movupd (%r9,%rax,8),%xmm4
movupd 0x10(%r9,%rax,8),%xmm5
mulpd  %xmm1,%xmm4
mulpd  %xmm1,%xmm5
movupd %xmm4,-0x30(%r14,%rdx,8)
movupd %xmm5,-0x20(%r14,%rdx,8)
lea    (%rcx,%rdx,1),%eax
cltq
movupd (%r9,%rax,8),%xmm4
movupd 0x10(%r9,%rax,8),%xmm5
mulpd  %xmm1,%xmm4
mulpd  %xmm1,%xmm5
movupd %xmm4,-0x10(%r14,%rdx,8)
movupd %xmm5,(%r14,%rdx,8)
add    $0x8,%rdx
add    $0xfffffffffffffffe,%rdi
jne    1c10 <merge_matrix+0xb10>
testb  $0x1,0x88(%rsp)
01
mov    -0x70(%rsp),%rcx
je     1cb1 <merge_matrix+0xbb1>
mov    -0x68(%rsp),%rax
add    %rdx,%rax
add    %r15d,%edx
movslq %edx,%rdx
movupd (%r9,%rdx,8),%xmm4
movupd 0x10(%r9,%rdx,8),%xmm5
mulpd  %xmm1,%xmm4
mulpd  %xmm1,%xmm5
add    %rcx,%rax
mov    0xd0(%rsp),%rdx
movupd %xmm4,(%rdx,%rax,8)
movupd %xmm5,0x10(%rdx,%rax,8)
mov    0x78(%rsp),%rdx
mov    0x80(%rsp),%rax
cmp    %rax,-0x18(%rsp)
je     1840 <merge_matrix+0x740>
jmp    1aaa <merge_matrix+0x9aa>
add    $0x90,%rsp
pop    %rbx
pop    %r12
pop    %r13
pop    %r14
pop    %r15
pop    %rbp
ret

LLVM IR (-O0):
define void @merge_matrix(i32 %0, i32 %1, double %2, double* %3, double %4, double* %5, double %6, double* %7, double %8, double* %9, i32 %10, double* %11) {
%13 = alloca i32
%14 = alloca i32
%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 i32
%24 = alloca double*
%25 = alloca i32
%26 = alloca i32
store i32 %0, i32* %13
store i32 %1, i32* %14
store double %2, double* %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 i32 %10, i32* %23
store double* %11, double** %24
store i32 0, i32* %25
br label %27
27: ; preds = %91, %12
%28 = load i32, i32* %25
%29 = load i32, i32* %13
%30 = icmp slt i32 %28, %29
br i1 %30, label %31, label %94
31: ; preds = %27
store i32 0, i32* %26
br label %32
32: ; preds = %56, %31
%33 = load i32, i32* %26
%34 = load i32, i32* %13
%35 = icmp slt i32 %33, %34
br i1 %35, label %36, label %59
36: ; preds = %32
%37 = load double, double* %15
%38 = load double*, double** %16
%39 = load i32, i32* %25
%40 = load i32, i32* %13
%41 = mul nsw i32 %39, %40
%42 = load i32, i32* %26
%43 = add nsw i32 %41, %42
%44 = sext i32 %43 to i64
%45 = getelementptr inbounds double, double* %38, i64 %44
%46 = load double, double* %45
%47 = fmul double %37, %46
%48 = load double*, double** %24
%49 = load i32, i32* %25
%50 = load i32, i32* %23
%51 = mul nsw i32 %49, %50
%52 = load i32, i32* %26
%53 = add nsw i32 %51, %52
%54 = sext i32 %53 to i64
%55 = getelementptr inbounds double, double* %48, i64 %54
store double %47, double* %55
br label %56
56: ; preds = %36
%57 = load i32, i32* %26
%58 = add nsw i32 %57, 1
store i32 %58, i32* %26
br label %32
59: ; preds = %32
%60 = load i32, i32* %13
store i32 %60, i32* %26
br label %61
61: ; preds = %87, %59
%62 = load i32, i32* %26
%63 = load i32, i32* %23
%64 = icmp slt i32 %62, %63
br i1 %64, label %65, label %90
65: ; preds = %61
%66 = load double, double* %17
%67 = load double*, double** %18
%68 = load i32, i32* %25
%69 = load i32, i32* %14
%70 = mul nsw i32 %68, %69
%71 = load i32, i32* %26
%72 = load i32, i32* %13
%73 = sub nsw i32 %71, %72
%74 = add nsw i32 %70, %73
%75 = sext i32 %74 to i64
%76 = getelementptr inbounds double, double* %67, i64 %75
%77 = load double, double* %76
%78 = fmul double %66, %77
%79 = load double*, double** %24
%80 = load i32, i32* %25
%81 = load i32, i32* %23
%82 = mul nsw i32 %80, %81
%83 = load i32, i32* %26
%84 = add nsw i32 %82, %83
%85 = sext i32 %84 to i64
%86 = getelementptr inbounds double, double* %79, i64 %85
store double %78, double* %86
br label %87
87: ; preds = %65
%88 = load i32, i32* %26
%89 = add nsw i32 %88, 1
store i32 %89, i32* %26
br label %61
90: ; preds = %61
br label %91
91: ; preds = %90
%92 = load i32, i32* %25
%93 = add nsw i32 %92, 1
store i32 %93, i32* %25
br label %27
94: ; preds = %27
%95 = load i32, i32* %13
store i32 %95, i32* %25
br label %96
96: ; preds = %164, %94
%97 = load i32, i32* %25
%98 = load i32, i32* %23
%99 = icmp slt i32 %97, %98
br i1 %99, label %100, label %167
100: ; preds = %96
store i32 0, i32* %26
br label %101
101: ; preds = %127, %100
%102 = load i32, i32* %26
%103 = load i32, i32* %13
%104 = icmp slt i32 %102, %103
br i1 %104, label %105, label %130
105: ; preds = %101
%106 = load double, double* %19
%107 = load double*, double** %20
%108 = load i32, i32* %25
%109 = load i32, i32* %13
%110 = sub nsw i32 %108, %109
%111 = load i32, i32* %13
%112 = mul nsw i32 %110, %111
%113 = load i32, i32* %26
%114 = add nsw i32 %112, %113
%115 = sext i32 %114 to i64
%116 = getelementptr inbounds double, double* %107, i64 %115
%117 = load double, double* %116
%118 = fmul double %106, %117
%119 = load double*, double** %24
%120 = load i32, i32* %25
%121 = load i32, i32* %23
%122 = mul nsw i32 %120, %121
%123 = load i32, i32* %26
%124 = add nsw i32 %122, %123
%125 = sext i32 %124 to i64
%126 = getelementptr inbounds double, double* %119, i64 %125
store double %118, double* %126
br label %127
127: ; preds = %105
%128 = load i32, i32* %26
%129 = add nsw i32 %128, 1
store i32 %129, i32* %26
br label %101
130: ; preds = %101
%131 = load i32, i32* %13
store i32 %131, i32* %26
br label %132
132: ; preds = %160, %130
%133 = load i32, i32* %26
%134 = load i32, i32* %23
%135 = icmp slt i32 %133, %134
br i1 %135, label %136, label %163
136: ; preds = %132
%137 = load double, double* %21
%138 = load double*, double** %22
%139 = load i32, i32* %25
%140 = load i32, i32* %13
%141 = sub nsw i32 %139, %140
%142 = load i32, i32* %14
%143 = mul nsw i32 %141, %142
%144 = load i32, i32* %26
%145 = load i32, i32* %13
%146 = sub nsw i32 %144, %145
%147 = add nsw i32 %143, %146
%148 = sext i32 %147 to i64
%149 = getelementptr inbounds double, double* %138, i64 %148
%150 = load double, double* %149
%151 = fmul double %137, %150
%152 = load double*, double** %24
%153 = load i32, i32* %25
%154 = load i32, i32* %23
%155 = mul nsw i32 %153, %154
%156 = load i32, i32* %26
%157 = add nsw i32 %155, %156
%158 = sext i32 %157 to i64
%159 = getelementptr inbounds double, double* %152, i64 %158
store double %151, double* %159
br label %160
160: ; preds = %136
%161 = load i32, i32* %26
%162 = add nsw i32 %161, 1
store i32 %162, i32* %26
br label %132
163: ; preds = %132
br label %164
164: ; preds = %163
%165 = load i32, i32* %25
%166 = add nsw i32 %165, 1
store i32 %166, i32* %25
br label %96
167: ; preds = %96
ret void
}

LLVM IR (-O2):
define void @merge_matrix(i32 %0, i32 %1, double %2, double* nocapture %3, double %4, double* nocapture %5, double %6, double* nocapture %7, double %8, double* nocapture %9, i32 %10, double* nocapture writeonly %11) {
%13 = icmp sgt i32 %0, 0
br i1 %13, label %14, label %157
14: ; preds = %12
%15 = icmp slt i32 %0, %10
%16 = zext i32 %0 to i64
%17 = sext i32 %10 to i64
%18 = zext i32 %0 to i64
%19 = xor i64 %18, -1
%20 = add nsw i64 %19, %17
%21 = sub nsw i64 0, %18
%22 = getelementptr double, double* %5, i64 %21
%23 = sub nsw i64 %17, %18
%24 = and i64 %18, 4294967292
%25 = add nsw i64 %24, -4
%26 = lshr exact i64 %25, 2
%27 = add nuw nsw i64 %26, 1
%28 = add nsw i64 %23, -4
%29 = lshr i64 %28, 2
%30 = add nuw nsw i64 %29, 1
%31 = icmp ult i32 %0, 4
%32 = and i64 %18, 4294967292
%33 = insertelement <2 x double> poison, double %2, i64 0
%34 = shufflevector <2 x double> %33, <2 x double> poison, <2 x i32> zeroinitializer
%35 = insertelement <2 x double> poison, double %2, i64 0
%36 = shufflevector <2 x double> %35, <2 x double> poison, <2 x i32> zeroinitializer
%37 = and i64 %27, 1
%38 = icmp eq i64 %25, 0
%39 = and i64 %27, 9223372036854775806
%40 = icmp eq i64 %37, 0
%41 = icmp eq i64 %32, %18
%42 = and i64 %18, 1
%43 = icmp eq i64 %42, 0
%44 = sub nsw i64 0, %18
%45 = icmp ult i64 %23, 4
%46 = trunc i64 %20 to i32
%47 = icmp ugt i64 %20, 4294967295
%48 = and i64 %23, -4
%49 = add nsw i64 %48, %16
%50 = insertelement <2 x double> poison, double %4, i64 0
%51 = shufflevector <2 x double> %50, <2 x double> poison, <2 x i32> zeroinitializer
%52 = insertelement <2 x double> poison, double %4, i64 0
%53 = shufflevector <2 x double> %52, <2 x double> poison, <2 x i32> zeroinitializer
%54 = and i64 %30, 1
%55 = icmp ult i64 %28, 4
%56 = and i64 %30, 9223372036854775806
%57 = icmp eq i64 %54, 0
%58 = icmp eq i64 %23, %48
%59 = sub nsw i64 0, %17
br label %60
60: ; preds = %345, %14
%61 = phi i64 [ 0, %14 ], [ %346, %345 ]
%62 = mul i64 %61, %17
%63 = mul i64 %61, %18
%64 = mul i64 %61, %17
%65 = add i64 %64, %18
%66 = getelementptr double, double* %11, i64 %65
%67 = add i64 %64, %17
%68 = getelementptr double, double* %11, i64 %67
%69 = trunc i64 %61 to i32
%70 = mul i32 %69, %1
%71 = sext i32 %70 to i64
%72 = getelementptr double, double* %5, i64 %71
%73 = add nsw i64 %17, %71
%74 = getelementptr double, double* %22, i64 %73
%75 = trunc i64 %61 to i32
%76 = mul i32 %75, %1
%77 = mul nsw i64 %61, %16
%78 = mul nsw i64 %61, %17
br i1 %31, label %143, label %79
79: ; preds = %60
%80 = add i64 %63, %18
%81 = getelementptr double, double* %3, i64 %80
%82 = getelementptr double, double* %3, i64 %63
%83 = add i64 %62, %18
%84 = getelementptr double, double* %11, i64 %83
%85 = getelementptr double, double* %11, i64 %62
%86 = icmp ult double* %85, %81
%87 = icmp ult double* %82, %84
%88 = and i1 %86, %87
br i1 %88, label %143, label %89
89: ; preds = %79
br i1 %38, label %125, label %90
90: ; preds = %89, %90
%91 = phi i64 [ %122, %90 ], [ 0, %89 ]
%92 = phi i64 [ %123, %90 ], [ 0, %89 ]
%93 = add nuw nsw i64 %91, %77
%94 = getelementptr inbounds double, double* %3, i64 %93
%95 = bitcast double* %94 to <2 x double>*
%96 = load <2 x double>, <2 x double>* %95
%97 = getelementptr inbounds double, double* %94, i64 2
%98 = bitcast double* %97 to <2 x double>*
%99 = load <2 x double>, <2 x double>* %98
%100 = fmul <2 x double> %96, %34
%101 = fmul <2 x double> %99, %36
%102 = add nsw i64 %91, %78
%103 = getelementptr inbounds double, double* %11, i64 %102
%104 = bitcast double* %103 to <2 x double>*
store <2 x double> %100, <2 x double>* %104
%105 = getelementptr inbounds double, double* %103, i64 2
%106 = bitcast double* %105 to <2 x double>*
store <2 x double> %101, <2 x double>* %106
%107 = or i64 %91, 4
%108 = add nuw nsw i64 %107, %77
%109 = getelementptr inbounds double, double* %3, i64 %108
%110 = bitcast double* %109 to <2 x double>*
%111 = load <2 x double>, <2 x double>* %110
%112 = getelementptr inbounds double, double* %109, i64 2
%113 = bitcast double* %112 to <2 x double>*
%114 = load <2 x double>, <2 x double>* %113
%115 = fmul <2 x double> %111, %34
%116 = fmul <2 x double> %114, %36
%117 = add nsw i64 %107, %78
%118 = getelementptr inbounds double, double* %11, i64 %117
%119 = bitcast double* %118 to <2 x double>*
store <2 x double> %115, <2 x double>* %119
%120 = getelementptr inbounds double, double* %118, i64 2
%121 = bitcast double* %120 to <2 x double>*
store <2 x double> %116, <2 x double>* %121
%122 = add nuw i64 %91, 8
%123 = add i64 %92, 2
%124 = icmp eq i64 %123, %39
br i1 %124, label %125, label %90
125: ; preds = %90, %89
%126 = phi i64 [ 0, %89 ], [ %122, %90 ]
br i1 %40, label %142, label %127
127: ; preds = %125
%128 = add nuw nsw i64 %126, %77
%129 = getelementptr inbounds double, double* %3, i64 %128
%130 = bitcast double* %129 to <2 x double>*
%131 = load <2 x double>, <2 x double>* %130
%132 = getelementptr inbounds double, double* %129, i64 2
%133 = bitcast double* %132 to <2 x double>*
%134 = load <2 x double>, <2 x double>* %133
%135 = fmul <2 x double> %131, %34
%136 = fmul <2 x double> %134, %36
%137 = add nsw i64 %126, %78
%138 = getelementptr inbounds double, double* %11, i64 %137
%139 = bitcast double* %138 to <2 x double>*
store <2 x double> %135, <2 x double>* %139
%140 = getelementptr inbounds double, double* %138, i64 2
%141 = bitcast double* %140 to <2 x double>*
store <2 x double> %136, <2 x double>* %141
br label %142
142: ; preds = %125, %127
br i1 %41, label %211, label %143
143: ; preds = %79, %60, %142
%144 = phi i64 [ 0, %79 ], [ 0, %60 ], [ %32, %142 ]
%145 = xor i64 %144, -1
br i1 %43, label %154, label %146
146: ; preds = %143
%147 = add nuw nsw i64 %144, %77
%148 = getelementptr inbounds double, double* %3, i64 %147
%149 = load double, double* %148
%150 = fmul double %149, %2
%151 = add nsw i64 %144, %78
%152 = getelementptr inbounds double, double* %11, i64 %151
store double %150, double* %152
%153 = or i64 %144, 1
br label %154
154: ; preds = %146, %143
%155 = phi i64 [ %144, %143 ], [ %153, %146 ]
%156 = icmp eq i64 %145, %44
br i1 %156, label %211, label %307
157: ; preds = %345, %12
%158 = icmp slt i32 %0, %10
br i1 %158, label %159, label %590
159: ; preds = %157
%160 = sext i32 %0 to i64
%161 = sext i32 %10 to i64
%162 = zext i32 %0 to i64
%163 = xor i64 %160, -1
%164 = add nsw i64 %163, %161
%165 = add nsw i64 %161, 1
%166 = mul i64 %165, %160
%167 = shl nsw i64 %160, 3
%168 = add nsw i64 %167, 8
%169 = mul i64 %168, %161
%170 = sub nsw i64 0, %160
%171 = getelementptr double, double* %9, i64 %170
%172 = sub nsw i64 %161, %160
%173 = mul nsw i64 %161, %160
%174 = add i64 %173, %162
%175 = and i64 %162, 4294967292
%176 = add nsw i64 %175, -4
%177 = lshr exact i64 %176, 2
%178 = add nuw nsw i64 %177, 1
%179 = add nsw i64 %172, -4
%180 = lshr i64 %179, 2
%181 = add nuw nsw i64 %180, 1
%182 = icmp ult i32 %0, 4
%183 = and i64 %162, 4294967292
%184 = insertelement <2 x double> poison, double %6, i64 0
%185 = shufflevector <2 x double> %184, <2 x double> poison, <2 x i32> zeroinitializer
%186 = insertelement <2 x double> poison, double %6, i64 0
%187 = shufflevector <2 x double> %186, <2 x double> poison, <2 x i32> zeroinitializer
%188 = and i64 %178, 1
%189 = icmp eq i64 %176, 0
%190 = and i64 %178, 9223372036854775806
%191 = icmp eq i64 %188, 0
%192 = icmp eq i64 %183, %162
%193 = and i64 %162, 1
%194 = icmp eq i64 %193, 0
%195 = sub nsw i64 0, %162
%196 = icmp ult i64 %172, 4
%197 = trunc i64 %164 to i32
%198 = icmp ugt i64 %164, 4294967295
%199 = and i64 %172, -4
%200 = add nsw i64 %199, %160
%201 = insertelement <2 x double> poison, double %8, i64 0
%202 = shufflevector <2 x double> %201, <2 x double> poison, <2 x i32> zeroinitializer
%203 = insertelement <2 x double> poison, double %8, i64 0
%204 = shufflevector <2 x double> %203, <2 x double> poison, <2 x i32> zeroinitializer
%205 = and i64 %181, 1
%206 = icmp ult i64 %179, 4
%207 = and i64 %181, 9223372036854775806
%208 = icmp eq i64 %205, 0
%209 = icmp eq i64 %172, %199
%210 = sub nsw i64 0, %161
br label %348
211: ; preds = %154, %307, %142
br i1 %15, label %212, label %345
212: ; preds = %211
%213 = trunc i64 %61 to i32
%214 = mul i32 %213, %1
%215 = sub i32 %214, %0
%216 = mul nsw i64 %61, %17
br i1 %45, label %288, label %217
217: ; preds = %212
%218 = add i32 %76, %46
%219 = icmp slt i32 %218, %76
%220 = or i1 %219, %47
br i1 %220, label %288, label %221
221: ; preds = %217
%222 = icmp ult double* %66, %74
%223 = icmp ult double* %72, %68
%224 = and i1 %222, %223
br i1 %224, label %288, label %225
225: ; preds = %221
br i1 %55, label %267, label %226
226: ; preds = %225, %226
%227 = phi i64 [ %264, %226 ], [ 0, %225 ]
%228 = phi i64 [ %265, %226 ], [ 0, %225 ]
%229 = add i64 %227, %16
%230 = trunc i64 %227 to i32
%231 = add i32 %214, %230
%232 = sext i32 %231 to i64
%233 = getelementptr inbounds double, double* %5, i64 %232
%234 = bitcast double* %233 to <2 x double>*
%235 = load <2 x double>, <2 x double>* %234
%236 = getelementptr inbounds double, double* %233, i64 2
%237 = bitcast double* %236 to <2 x double>*
%238 = load <2 x double>, <2 x double>* %237
%239 = fmul <2 x double> %235, %51
%240 = fmul <2 x double> %238, %53
%241 = add nsw i64 %229, %216
%242 = getelementptr inbounds double, double* %11, i64 %241
%243 = bitcast double* %242 to <2 x double>*
store <2 x double> %239, <2 x double>* %243
%244 = getelementptr inbounds double, double* %242, i64 2
%245 = bitcast double* %244 to <2 x double>*
store <2 x double> %240, <2 x double>* %245
%246 = or i64 %227, 4
%247 = add i64 %246, %16
%248 = trunc i64 %246 to i32
%249 = add i32 %214, %248
%250 = sext i32 %249 to i64
%251 = getelementptr inbounds double, double* %5, i64 %250
%252 = bitcast double* %251 to <2 x double>*
%253 = load <2 x double>, <2 x double>* %252
%254 = getelementptr inbounds double, double* %251, i64 2
%255 = bitcast double* %254 to <2 x double>*
%256 = load <2 x double>, <2 x double>* %255
%257 = fmul <2 x double> %253, %51
%258 = fmul <2 x double> %256, %53
%259 = add nsw i64 %247, %216
%260 = getelementptr inbounds double, double* %11, i64 %259
%261 = bitcast double* %260 to <2 x double>*
store <2 x double> %257, <2 x double>* %261
%262 = getelementptr inbounds double, double* %260, i64 2
%263 = bitcast double* %262 to <2 x double>*
store <2 x double> %258, <2 x double>* %263
%264 = add nuw i64 %227, 8
%265 = add i64 %228, 2
%266 = icmp eq i64 %265, %56
br i1 %266, label %267, label %226
267: ; preds = %226, %225
%268 = phi i64 [ 0, %225 ], [ %264, %226 ]
br i1 %57, label %287, label %269
269: ; preds = %267
%270 = add i64 %268, %16
%271 = trunc i64 %268 to i32
%272 = add i32 %214, %271
%273 = sext i32 %272 to i64
%274 = getelementptr inbounds double, double* %5, i64 %273
%275 = bitcast double* %274 to <2 x double>*
%276 = load <2 x double>, <2 x double>* %275
%277 = getelementptr inbounds double, double* %274, i64 2
%278 = bitcast double* %277 to <2 x double>*
%279 = load <2 x double>, <2 x double>* %278
%280 = fmul <2 x double> %276, %51
%281 = fmul <2 x double> %279, %53
%282 = add nsw i64 %270, %216
%283 = getelementptr inbounds double, double* %11, i64 %282
%284 = bitcast double* %283 to <2 x double>*
store <2 x double> %280, <2 x double>* %284
%285 = getelementptr inbounds double, double* %283, i64 2
%286 = bitcast double* %285 to <2 x double>*
store <2 x double> %281, <2 x double>* %286
br label %287
287: ; preds = %267, %269
br i1 %58, label %345, label %288
288: ; preds = %221, %217, %212, %287
%289 = phi i64 [ %16, %221 ], [ %16, %217 ], [ %16, %212 ], [ %49, %287 ]
%290 = sub nsw i64 %17, %289
%291 = xor i64 %289, -1
%292 = and i64 %290, 1
%293 = icmp eq i64 %292, 0
br i1 %293, label %304, label %294
294: ; preds = %288
%295 = trunc i64 %289 to i32
%296 = add i32 %215, %295
%297 = sext i32 %296 to i64
%298 = getelementptr inbounds double, double* %5, i64 %297
%299 = load double, double* %298
%300 = fmul double %299, %4
%301 = add nsw i64 %289, %216
%302 = getelementptr inbounds double, double* %11, i64 %301
store double %300, double* %302
%303 = add nuw nsw i64 %289, 1
br label %304
304: ; preds = %294, %288
%305 = phi i64 [ %289, %288 ], [ %303, %294 ]
%306 = icmp eq i64 %291, %59
br i1 %306, label %345, label %324
307: ; preds = %154, %307
%308 = phi i64 [ %322, %307 ], [ %155, %154 ]
%309 = add nuw nsw i64 %308, %77
%310 = getelementptr inbounds double, double* %3, i64 %309
%311 = load double, double* %310
%312 = fmul double %311, %2
%313 = add nsw i64 %308, %78
%314 = getelementptr inbounds double, double* %11, i64 %313
store double %312, double* %314
%315 = add nuw nsw i64 %308, 1
%316 = add nuw nsw i64 %315, %77
%317 = getelementptr inbounds double, double* %3, i64 %316
%318 = load double, double* %317
%319 = fmul double %318, %2
%320 = add nsw i64 %315, %78
%321 = getelementptr inbounds double, double* %11, i64 %320
store double %319, double* %321
%322 = add nuw nsw i64 %308, 2
%323 = icmp eq i64 %322, %18
br i1 %323, label %211, label %307
324: ; preds = %304, %324
%325 = phi i64 [ %343, %324 ], [ %305, %304 ]
%326 = trunc i64 %325 to i32
%327 = add i32 %215, %326
%328 = sext i32 %327 to i64
%329 = getelementptr inbounds double, double* %5, i64 %328
%330 = load double, double* %329
%331 = fmul double %330, %4
%332 = add nsw i64 %325, %216
%333 = getelementptr inbounds double, double* %11, i64 %332
store double %331, double* %333
%334 = add nuw nsw i64 %325, 1
%335 = trunc i64 %334 to i32
%336 = add i32 %215, %335
%337 = sext i32 %336 to i64
%338 = getelementptr inbounds double, double* %5, i64 %337
%339 = load double, double* %338
%340 = fmul double %339, %4
%341 = add nsw i64 %334, %216
%342 = getelementptr inbounds double, double* %11, i64 %341
store double %340, double* %342
%343 = add nuw nsw i64 %325, 2
%344 = icmp eq i64 %343, %17
br i1 %344, label %345, label %324
345: ; preds = %304, %324, %287, %211
%346 = add nuw nsw i64 %61, 1
%347 = icmp eq i64 %346, %18
br i1 %347, label %157, label %60
348: ; preds = %159, %585
%349 = phi i64 [ 0, %159 ], [ %589, %585 ]
%350 = phi i32 [ 0, %159 ], [ %588, %585 ]
%351 = phi i64 [ %160, %159 ], [ %586, %585 ]
%352 = mul i64 %349, %161
%353 = add i64 %173, %352
%354 = getelementptr double, double* %11, i64 %353
%355 = add i64 %174, %352
%356 = getelementptr double, double* %11, i64 %355
%357 = mul i64 %349, %160
%358 = getelementptr double, double* %7, i64 %357
%359 = add i64 %357, %162
%360 = getelementptr double, double* %7, i64 %359
%361 = mul i64 %349, %161
%362 = add i64 %166, %361
%363 = getelementptr double, double* %11, i64 %362
%364 = getelementptr double, double* %11, i64 %361
%365 = bitcast double* %364 to i8*
%366 = getelementptr i8, i8* %365, i64 %169
%367 = trunc i64 %349 to i32
%368 = mul i32 %367, %1
%369 = sext i32 %368 to i64
%370 = getelementptr double, double* %9, i64 %369
%371 = bitcast double* %370 to i8*
%372 = add nsw i64 %161, %369
%373 = getelementptr double, double* %171, i64 %372
%374 = mul i32 %350, %1
br i1 %13, label %375, label %451
375: ; preds = %348
%376 = sub nsw i64 %351, %160
%377 = mul nsw i64 %376, %160
%378 = mul nsw i64 %351, %161
br i1 %182, label %437, label %379
379: ; preds = %375
%380 = icmp ult double* %354, %360
%381 = icmp ult double* %358, %356
%382 = and i1 %380, %381
br i1 %382, label %437, label %383
383: ; preds = %379
br i1 %189, label %419, label %384
384: ; preds = %383, %384
%385 = phi i64 [ %416, %384 ], [ 0, %383 ]
%386 = phi i64 [ %417, %384 ], [ 0, %383 ]
%387 = add nsw i64 %385, %377
%388 = getelementptr inbounds double, double* %7, i64 %387
%389 = bitcast double* %388 to <2 x double>*
%390 = load <2 x double>, <2 x double>* %389
%391 = getelementptr inbounds double, double* %388, i64 2
%392 = bitcast double* %391 to <2 x double>*
%393 = load <2 x double>, <2 x double>* %392
%394 = fmul <2 x double> %390, %185
%395 = fmul <2 x double> %393, %187
%396 = add nsw i64 %385, %378
%397 = getelementptr inbounds double, double* %11, i64 %396
%398 = bitcast double* %397 to <2 x double>*
store <2 x double> %394, <2 x double>* %398
%399 = getelementptr inbounds double, double* %397, i64 2
%400 = bitcast double* %399 to <2 x double>*
store <2 x double> %395, <2 x double>* %400
%401 = or i64 %385, 4
%402 = add nsw i64 %401, %377
%403 = getelementptr inbounds double, double* %7, i64 %402
%404 = bitcast double* %403 to <2 x double>*
%405 = load <2 x double>, <2 x double>* %404
%406 = getelementptr inbounds double, double* %403, i64 2
%407 = bitcast double* %406 to <2 x double>*
%408 = load <2 x double>, <2 x double>* %407
%409 = fmul <2 x double> %405, %185
%410 = fmul <2 x double> %408, %187
%411 = add nsw i64 %401, %378
%412 = getelementptr inbounds double, double* %11, i64 %411
%413 = bitcast double* %412 to <2 x double>*
store <2 x double> %409, <2 x double>* %413
%414 = getelementptr inbounds double, double* %412, i64 2
%415 = bitcast double* %414 to <2 x double>*
store <2 x double> %410, <2 x double>* %415
%416 = add nuw i64 %385, 8
%417 = add i64 %386, 2
%418 = icmp eq i64 %417, %190
br i1 %418, label %419, label %384
419: ; preds = %384, %383
%420 = phi i64 [ 0, %383 ], [ %416, %384 ]
br i1 %191, label %436, label %421
421: ; preds = %419
%422 = add nsw i64 %420, %377
%423 = getelementptr inbounds double, double* %7, i64 %422
%424 = bitcast double* %423 to <2 x double>*
%425 = load <2 x double>, <2 x double>* %424
%426 = getelementptr inbounds double, double* %423, i64 2
%427 = bitcast double* %426 to <2 x double>*
%428 = load <2 x double>, <2 x double>* %427
%429 = fmul <2 x double> %425, %185
%430 = fmul <2 x double> %428, %187
%431 = add nsw i64 %420, %378
%432 = getelementptr inbounds double, double* %11, i64 %431
%433 = bitcast double* %432 to <2 x double>*
store <2 x double> %429, <2 x double>* %433
%434 = getelementptr inbounds double, double* %432, i64 2
%435 = bitcast double* %434 to <2 x double>*
store <2 x double> %430, <2 x double>* %435
br label %436
436: ; preds = %419, %421
br i1 %192, label %451, label %437
437: ; preds = %379, %375, %436
%438 = phi i64 [ 0, %379 ], [ 0, %375 ], [ %183, %436 ]
%439 = xor i64 %438, -1
br i1 %194, label %448, label %440
440: ; preds = %437
%441 = add nsw i64 %438, %377
%442 = getelementptr inbounds double, double* %7, i64 %441
%443 = load double, double* %442
%444 = fmul double %443, %6
%445 = add nsw i64 %438, %378
%446 = getelementptr inbounds double, double* %11, i64 %445
store double %444, double* %446
%447 = or i64 %438, 1
br label %448
448: ; preds = %440, %437
%449 = phi i64 [ %438, %437 ], [ %447, %440 ]
%450 = icmp eq i64 %439, %195
br i1 %450, label %451, label %547
451: ; preds = %448, %547, %436, %348
%452 = trunc i64 %351 to i32
%453 = sub i32 %452, %0
%454 = mul i32 %453, %1
%455 = sub i32 %454, %0
%456 = mul nsw i64 %351, %161
br i1 %196, label %528, label %457
457: ; preds = %451
%458 = add i32 %374, %197
%459 = icmp slt i32 %458, %374
%460 = or i1 %459, %198
br i1 %460, label %528, label %461
461: ; preds = %457
%462 = icmp ult double* %363, %373
%463 = icmp ugt i8* %366, %371
%464 = and i1 %462, %463
br i1 %464, label %528, label %465
465: ; preds = %461
br i1 %206, label %507, label %466
466: ; preds = %465, %466
%467 = phi i64 [ %504, %466 ], [ 0, %465 ]
%468 = phi i64 [ %505, %466 ], [ 0, %465 ]
%469 = add i64 %467, %160
%470 = trunc i64 %467 to i32
%471 = add i32 %454, %470
%472 = sext i32 %471 to i64
%473 = getelementptr inbounds double, double* %9, i64 %472
%474 = bitcast double* %473 to <2 x double>*
%475 = load <2 x double>, <2 x double>* %474
%476 = getelementptr inbounds double, double* %473, i64 2
%477 = bitcast double* %476 to <2 x double>*
%478 = load <2 x double>, <2 x double>* %477
%479 = fmul <2 x double> %475, %202
%480 = fmul <2 x double> %478, %204
%481 = add nsw i64 %469, %456
%482 = getelementptr inbounds double, double* %11, i64 %481
%483 = bitcast double* %482 to <2 x double>*
store <2 x double> %479, <2 x double>* %483
%484 = getelementptr inbounds double, double* %482, i64 2
%485 = bitcast double* %484 to <2 x double>*
store <2 x double> %480, <2 x double>* %485
%486 = or i64 %467, 4
%487 = add i64 %486, %160
%488 = trunc i64 %486 to i32
%489 = add i32 %454, %488
%490 = sext i32 %489 to i64
%491 = getelementptr inbounds double, double* %9, i64 %490
%492 = bitcast double* %491 to <2 x double>*
%493 = load <2 x double>, <2 x double>* %492
%494 = getelementptr inbounds double, double* %491, i64 2
%495 = bitcast double* %494 to <2 x double>*
%496 = load <2 x double>, <2 x double>* %495
%497 = fmul <2 x double> %493, %202
%498 = fmul <2 x double> %496, %204
%499 = add nsw i64 %487, %456
%500 = getelementptr inbounds double, double* %11, i64 %499
%501 = bitcast double* %500 to <2 x double>*
store <2 x double> %497, <2 x double>* %501
%502 = getelementptr inbounds double, double* %500, i64 2
%503 = bitcast double* %502 to <2 x double>*
store <2 x double> %498, <2 x double>* %503
%504 = add nuw i64 %467, 8
%505 = add i64 %468, 2
%506 = icmp eq i64 %505, %207
br i1 %506, label %507, label %466
507: ; preds = %466, %465
%508 = phi i64 [ 0, %465 ], [ %504, %466 ]
br i1 %208, label %527, label %509
509: ; preds = %507
%510 = add i64 %508, %160
%511 = trunc i64 %508 to i32
%512 = add i32 %454, %511
%513 = sext i32 %512 to i64
%514 = getelementptr inbounds double, double* %9, i64 %513
%515 = bitcast double* %514 to <2 x double>*
%516 = load <2 x double>, <2 x double>* %515
%517 = getelementptr inbounds double, double* %514, i64 2
%518 = bitcast double* %517 to <2 x double>*
%519 = load <2 x double>, <2 x double>* %518
%520 = fmul <2 x double> %516, %202
%521 = fmul <2 x double> %519, %204
%522 = add nsw i64 %510, %456
%523 = getelementptr inbounds double, double* %11, i64 %522
%524 = bitcast double* %523 to <2 x double>*
store <2 x double> %520, <2 x double>* %524
%525 = getelementptr inbounds double, double* %523, i64 2
%526 = bitcast double* %525 to <2 x double>*
store <2 x double> %521, <2 x double>* %526
br label %527
527: ; preds = %507, %509
br i1 %209, label %585, label %528
528: ; preds = %461, %457, %451, %527
%529 = phi i64 [ %160, %461 ], [ %160, %457 ], [ %160, %451 ], [ %200, %527 ]
%530 = sub nsw i64 %161, %529
%531 = xor i64 %529, -1
%532 = and i64 %530, 1
%533 = icmp eq i64 %532, 0
br i1 %533, label %544, label %534
534: ; preds = %528
%535 = trunc i64 %529 to i32
%536 = add i32 %455, %535
%537 = sext i32 %536 to i64
%538 = getelementptr inbounds double, double* %9, i64 %537
%539 = load double, double* %538
%540 = fmul double %539, %8
%541 = add nsw i64 %529, %456
%542 = getelementptr inbounds double, double* %11, i64 %541
store double %540, double* %542
%543 = add nsw i64 %529, 1
br label %544
544: ; preds = %534, %528
%545 = phi i64 [ %529, %528 ], [ %543, %534 ]
%546 = icmp eq i64 %531, %210
br i1 %546, label %585, label %564
547: ; preds = %448, %547
%548 = phi i64 [ %562, %547 ], [ %449, %448 ]
%549 = add nsw i64 %548, %377
%550 = getelementptr inbounds double, double* %7, i64 %549
%551 = load double, double* %550
%552 = fmul double %551, %6
%553 = add nsw i64 %548, %378
%554 = getelementptr inbounds double, double* %11, i64 %553
store double %552, double* %554
%555 = add nuw nsw i64 %548, 1
%556 = add nsw i64 %555, %377
%557 = getelementptr inbounds double, double* %7, i64 %556
%558 = load double, double* %557
%559 = fmul double %558, %6
%560 = add nsw i64 %555, %378
%561 = getelementptr inbounds double, double* %11, i64 %560
store double %559, double* %561
%562 = add nuw nsw i64 %548, 2
%563 = icmp eq i64 %562, %162
br i1 %563, label %451, label %547
564: ; preds = %544, %564
%565 = phi i64 [ %583, %564 ], [ %545, %544 ]
%566 = trunc i64 %565 to i32
%567 = add i32 %455, %566
%568 = sext i32 %567 to i64
%569 = getelementptr inbounds double, double* %9, i64 %568
%570 = load double, double* %569
%571 = fmul double %570, %8
%572 = add nsw i64 %565, %456
%573 = getelementptr inbounds double, double* %11, i64 %572
store double %571, double* %573
%574 = add nsw i64 %565, 1
%575 = trunc i64 %574 to i32
%576 = add i32 %455, %575
%577 = sext i32 %576 to i64
%578 = getelementptr inbounds double, double* %9, i64 %577
%579 = load double, double* %578
%580 = fmul double %579, %8
%581 = add nsw i64 %574, %456
%582 = getelementptr inbounds double, double* %11, i64 %581
store double %580, double* %582
%583 = add nsw i64 %565, 2
%584 = icmp eq i64 %583, %161
br i1 %584, label %585, label %564
585: ; preds = %544, %564, %527
%586 = add nsw i64 %351, 1
%587 = icmp eq i64 %586, %161
%588 = add i32 %350, 1
%589 = add i64 %349, 1
br i1 %587, label %590, label %348
590: ; preds = %585, %157
ret void
}