void kernel_dgemm_diag_right_1_lib4(int kmax, double *A, int sda, double *B,
                                    double *C, int sdc, double *D, int sdd,
                                    int alg) {
  if (kmax <= 0)
    return;
  const int bs = 4;
  int k;
  double a_0, a_1, a_2, a_3, b_0, c_0, c_1, c_2, c_3;
  if (alg == -1) {
    b_0 = -B[0];
  } else {
    b_0 = B[0];
  }
  if (alg == 0) {
    for (k = 0; k < kmax - 3; k += 4) {
      a_0 = A[0 + bs * 0];
      a_1 = A[1 + bs * 0];
      a_2 = A[2 + bs * 0];
      a_3 = A[3 + bs * 0];
      c_0 = a_0 * b_0;
      c_1 = a_1 * b_0;
      c_2 = a_2 * b_0;
      c_3 = a_3 * b_0;
      D[0 + bs * 0] = c_0;
      D[1 + bs * 0] = c_1;
      D[2 + bs * 0] = c_2;
      D[3 + bs * 0] = c_3;
      A += 4 * sda;
      D += 4 * sdd;
    }
    for (; k < kmax; k++) {
      a_0 = A[0 + bs * 0];
      c_0 = a_0 * b_0;
      D[0 + bs * 0] = c_0;
      A += 1;
      D += 1;
    }
  } else {
    for (k = 0; k < kmax - 3; k += 4) {
      a_0 = A[0 + bs * 0];
      a_1 = A[1 + bs * 0];
      a_2 = A[2 + bs * 0];
      a_3 = A[3 + bs * 0];
      c_0 = C[0 + bs * 0] + a_0 * b_0;
      c_1 = C[1 + bs * 0] + a_1 * b_0;
      c_2 = C[2 + bs * 0] + a_2 * b_0;
      c_3 = C[3 + bs * 0] + a_3 * b_0;
      D[0 + bs * 0] = c_0;
      D[1 + bs * 0] = c_1;
      D[2 + bs * 0] = c_2;
      D[3 + bs * 0] = c_3;
      A += 4 * sda;
      C += 4 * sdc;
      D += 4 * sdd;
    }
    for (; k < kmax; k++) {
      a_0 = A[0 + bs * 0];
      c_0 = C[0 + bs * 0] + a_0 * b_0;
      D[0 + bs * 0] = c_0;
      A += 1;
      C += 1;
      D += 1;
    }
  }
}


x86 assembly (clang, -O0):
<kernel_dgemm_diag_right_1_lib4>:
push   %rbp
mov    %rsp,%rbp
mov    0x20(%rbp),%eax
mov    0x18(%rbp),%eax
mov    0x10(%rbp),%rax
mov    %edi,-0x4(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %edx,-0x14(%rbp)
mov    %rcx,-0x20(%rbp)
mov    %r8,-0x28(%rbp)
mov    %r9d,-0x2c(%rbp)
cmpl   $0x0,-0x4(%rbp)
jg     1133 <kernel_dgemm_diag_right_1_lib4+0x33>
jmp    14c5 <kernel_dgemm_diag_right_1_lib4+0x3c5>
movl   $0x4,-0x30(%rbp)
cmpl   $0xffffffff,0x20(%rbp)
jne    116d <kernel_dgemm_diag_right_1_lib4+0x6d>
mov    -0x20(%rbp),%rax
movsd  (%rax),%xmm0
movq   %xmm0,%rax
movabs $0x8000000000000000,%rcx
xor    %rcx,%rax
movq   %rax,%xmm0
movsd  %xmm0,-0x60(%rbp)
jmp    117a <kernel_dgemm_diag_right_1_lib4+0x7a>
mov    -0x20(%rbp),%rax
movsd  (%rax),%xmm0
movsd  %xmm0,-0x60(%rbp)
cmpl   $0x0,0x20(%rbp)
jne    12e9 <kernel_dgemm_diag_right_1_lib4+0x1e9>
movl   $0x0,-0x34(%rbp)
mov    -0x34(%rbp),%eax
mov    -0x4(%rbp),%ecx
sub    $0x3,%ecx
cmp    %ecx,%eax
jge    1284 <kernel_dgemm_diag_right_1_lib4+0x184>
mov    -0x10(%rbp),%rax
movsd  (%rax),%xmm0
movsd  %xmm0,-0x40(%rbp)
mov    -0x10(%rbp),%rax
movsd  0x8(%rax),%xmm0
movsd  %xmm0,-0x48(%rbp)
mov    -0x10(%rbp),%rax
movsd  0x10(%rax),%xmm0
movsd  %xmm0,-0x50(%rbp)
mov    -0x10(%rbp),%rax
movsd  0x18(%rax),%xmm0
movsd  %xmm0,-0x58(%rbp)
movsd  -0x40(%rbp),%xmm0
mulsd  -0x60(%rbp),%xmm0
movsd  %xmm0,-0x68(%rbp)
movsd  -0x48(%rbp),%xmm0
mulsd  -0x60(%rbp),%xmm0
movsd  %xmm0,-0x70(%rbp)
movsd  -0x50(%rbp),%xmm0
mulsd  -0x60(%rbp),%xmm0
movsd  %xmm0,-0x78(%rbp)
movsd  -0x58(%rbp),%xmm0
mulsd  -0x60(%rbp),%xmm0
movsd  %xmm0,-0x80(%rbp)
movsd  -0x68(%rbp),%xmm0
mov    0x10(%rbp),%rax
movsd  %xmm0,(%rax)
movsd  -0x70(%rbp),%xmm0
mov    0x10(%rbp),%rax
movsd  %xmm0,0x8(%rax)
movsd  -0x78(%rbp),%xmm0
mov    0x10(%rbp),%rax
movsd  %xmm0,0x10(%rax)
movsd  -0x80(%rbp),%xmm0
mov    0x10(%rbp),%rax
movsd  %xmm0,0x18(%rax)
mov    -0x14(%rbp),%ecx
shl    $0x2,%ecx
mov    -0x10(%rbp),%rax
movslq %ecx,%rcx
shl    $0x3,%rcx
add    %rcx,%rax
mov    %rax,-0x10(%rbp)
mov    0x18(%rbp),%ecx
shl    $0x2,%ecx
mov    0x10(%rbp),%rax
movslq %ecx,%rcx
shl    $0x3,%rcx
add    %rcx,%rax
mov    %rax,0x10(%rbp)
mov    -0x34(%rbp),%eax
add    $0x4,%eax
mov    %eax,-0x34(%rbp)
jmp    118b <kernel_dgemm_diag_right_1_lib4+0x8b>
jmp    1289 <kernel_dgemm_diag_right_1_lib4+0x189>
mov    -0x34(%rbp),%eax
cmp    -0x4(%rbp),%eax
jge    12e4 <kernel_dgemm_diag_right_1_lib4+0x1e4>
mov    -0x10(%rbp),%rax
movsd  (%rax),%xmm0
movsd  %xmm0,-0x40(%rbp)
movsd  -0x40(%rbp),%xmm0
mulsd  -0x60(%rbp),%xmm0
movsd  %xmm0,-0x68(%rbp)
movsd  -0x68(%rbp),%xmm0
mov    0x10(%rbp),%rax
movsd  %xmm0,(%rax)
mov    -0x10(%rbp),%rax
add    $0x8,%rax
mov    %rax,-0x10(%rbp)
mov    0x10(%rbp),%rax
add    $0x8,%rax
mov    %rax,0x10(%rbp)
mov    -0x34(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x34(%rbp)
jmp    1289 <kernel_dgemm_diag_right_1_lib4+0x189>
jmp    14c5 <kernel_dgemm_diag_right_1_lib4+0x3c5>
movl   $0x0,-0x34(%rbp)
mov    -0x34(%rbp),%eax
mov    -0x4(%rbp),%ecx
sub    $0x3,%ecx
cmp    %ecx,%eax
jge    1444 <kernel_dgemm_diag_right_1_lib4+0x344>
mov    -0x10(%rbp),%rax
movsd  (%rax),%xmm0
movsd  %xmm0,-0x40(%rbp)
mov    -0x10(%rbp),%rax
movsd  0x8(%rax),%xmm0
movsd  %xmm0,-0x48(%rbp)
mov    -0x10(%rbp),%rax
movsd  0x10(%rax),%xmm0
movsd  %xmm0,-0x50(%rbp)
mov    -0x10(%rbp),%rax
movsd  0x18(%rax),%xmm0
movsd  %xmm0,-0x58(%rbp)
mov    -0x28(%rbp),%rax
movsd  (%rax),%xmm1
movsd  -0x40(%rbp),%xmm0
movsd  -0x60(%rbp),%xmm2
mulsd  %xmm2,%xmm0
addsd  %xmm1,%xmm0
movsd  %xmm0,-0x68(%rbp)
mov    -0x28(%rbp),%rax
movsd  0x8(%rax),%xmm1
movsd  -0x48(%rbp),%xmm0
movsd  -0x60(%rbp),%xmm2
mulsd  %xmm2,%xmm0
addsd  %xmm1,%xmm0
movsd  %xmm0,-0x70(%rbp)
mov    -0x28(%rbp),%rax
movsd  0x10(%rax),%xmm1
movsd  -0x50(%rbp),%xmm0
movsd  -0x60(%rbp),%xmm2
mulsd  %xmm2,%xmm0
addsd  %xmm1,%xmm0
movsd  %xmm0,-0x78(%rbp)
mov    -0x28(%rbp),%rax
movsd  0x18(%rax),%xmm1
movsd  -0x58(%rbp),%xmm0
movsd  -0x60(%rbp),%xmm2
mulsd  %xmm2,%xmm0
addsd  %xmm1,%xmm0
movsd  %xmm0,-0x80(%rbp)
movsd  -0x68(%rbp),%xmm0
mov    0x10(%rbp),%rax
movsd  %xmm0,(%rax)
movsd  -0x70(%rbp),%xmm0
mov    0x10(%rbp),%rax
movsd  %xmm0,0x8(%rax)
movsd  -0x78(%rbp),%xmm0
mov    0x10(%rbp),%rax
movsd  %xmm0,0x10(%rax)
movsd  -0x80(%rbp),%xmm0
mov    0x10(%rbp),%rax
movsd  %xmm0,0x18(%rax)
mov    -0x14(%rbp),%ecx
shl    $0x2,%ecx
mov    -0x10(%rbp),%rax
movslq %ecx,%rcx
shl    $0x3,%rcx
add    %rcx,%rax
mov    %rax,-0x10(%rbp)
mov    -0x2c(%rbp),%ecx
shl    $0x2,%ecx
mov    -0x28(%rbp),%rax
movslq %ecx,%rcx
shl    $0x3,%rcx
add    %rcx,%rax
mov    %rax,-0x28(%rbp)
mov    0x18(%rbp),%ecx
shl    $0x2,%ecx
mov    0x10(%rbp),%rax
movslq %ecx,%rcx
shl    $0x3,%rcx
add    %rcx,%rax
mov    %rax,0x10(%rbp)
mov    -0x34(%rbp),%eax
add    $0x4,%eax
mov    %eax,-0x34(%rbp)
jmp    12f0 <kernel_dgemm_diag_right_1_lib4+0x1f0>
jmp    1449 <kernel_dgemm_diag_right_1_lib4+0x349>
mov    -0x34(%rbp),%eax
cmp    -0x4(%rbp),%eax
jge    14c0 <kernel_dgemm_diag_right_1_lib4+0x3c0>
mov    -0x10(%rbp),%rax
movsd  (%rax),%xmm0
movsd  %xmm0,-0x40(%rbp)
mov    -0x28(%rbp),%rax
movsd  (%rax),%xmm1
movsd  -0x40(%rbp),%xmm0
movsd  -0x60(%rbp),%xmm2
mulsd  %xmm2,%xmm0
addsd  %xmm1,%xmm0
movsd  %xmm0,-0x68(%rbp)
movsd  -0x68(%rbp),%xmm0
mov    0x10(%rbp),%rax
movsd  %xmm0,(%rax)
mov    -0x10(%rbp),%rax
add    $0x8,%rax
mov    %rax,-0x10(%rbp)
mov    -0x28(%rbp),%rax
add    $0x8,%rax
mov    %rax,-0x28(%rbp)
mov    0x10(%rbp),%rax
add    $0x8,%rax
mov    %rax,0x10(%rbp)
mov    -0x34(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x34(%rbp)
jmp    1449 <kernel_dgemm_diag_right_1_lib4+0x349>
jmp    14c5 <kernel_dgemm_diag_right_1_lib4+0x3c5>
pop    %rbp
ret

x86 assembly (clang, -O2):
<kernel_dgemm_diag_right_1_lib4>:
push   %rbp
push   %rbx
test   %edi,%edi
jle    15d6 <kernel_dgemm_diag_right_1_lib4+0x4d6>
mov    0x28(%rsp),%ebx
mov    0x20(%rsp),%ebp
mov    0x18(%rsp),%rax
movsd  (%rcx),%xmm0
test   %ebx,%ebx
je     1296 <kernel_dgemm_diag_right_1_lib4+0x196>
cmp    $0xffffffff,%ebx
jne    1130 <kernel_dgemm_diag_right_1_lib4+0x30>
xorpd  0xed0(%rip),%xmm0
xor    %r10d,%r10d
cmp    $0x4,%edi
jb     11b5 <kernel_dgemm_diag_right_1_lib4+0xb5>
lea    -0x3(%rdi),%r10d
shl    $0x2,%edx
movslq %edx,%r11
shl    $0x2,%r9d
movslq %r9d,%rcx
shl    $0x2,%ebp
movslq %ebp,%rdx
movapd %xmm0,%xmm1
unpcklpd %xmm0,%xmm1
shl    $0x3,%r11
shl    $0x3,%rcx
shl    $0x3,%rdx
xor    %ebx,%ebx
cs nopw 0x0(%rax,%rax,1)
nop
movupd (%rsi),%xmm2
movupd 0x10(%rsi),%xmm3
mulpd  %xmm1,%xmm2
movupd (%r8),%xmm4
addpd  %xmm2,%xmm4
movupd 0x10(%r8),%xmm2
mulpd  %xmm1,%xmm3
addpd  %xmm2,%xmm3
movupd %xmm4,(%rax)
movupd %xmm3,0x10(%rax)
add    $0x4,%ebx
add    %r11,%rsi
add    %rcx,%r8
add    %rdx,%rax
cmp    %r10d,%ebx
jl     1170 <kernel_dgemm_diag_right_1_lib4+0x70>
mov    %edi,%r10d
and    $0xfffffffc,%r10d
cmp    %edi,%r10d
jge    15d6 <kernel_dgemm_diag_right_1_lib4+0x4d6>
mov    %r10d,%edx
not    %edx
add    %edi,%edx
cmp    $0x3,%edx
jae    13ad <kernel_dgemm_diag_right_1_lib4+0x2ad>
mov    %edi,%edx
sub    %r10d,%edx
mov    %r10d,%ecx
not    %ecx
add    %edi,%ecx
and    $0x3,%edx
je     1217 <kernel_dgemm_diag_right_1_lib4+0x117>
neg    %edx
xor    %ebx,%ebx
cs nopw 0x0(%rax,%rax,1)
nopl   (%rax)
movsd  (%rsi),%xmm1
mulsd  %xmm0,%xmm1
addsd  (%r8),%xmm1
movsd  %xmm1,(%rax)
add    $0x8,%rsi
add    $0x8,%r8
add    $0x8,%rax
add    $0xffffffff,%ebx
cmp    %ebx,%edx
jne    11f0 <kernel_dgemm_diag_right_1_lib4+0xf0>
sub    %ebx,%r10d
cmp    $0x3,%ecx
jb     15d6 <kernel_dgemm_diag_right_1_lib4+0x4d6>
sub    %r10d,%edi
xor    %ecx,%ecx
cs nopw 0x0(%rax,%rax,1)
nop
movsd  (%rsi,%rcx,8),%xmm1
mulsd  %xmm0,%xmm1
addsd  (%r8,%rcx,8),%xmm1
movsd  %xmm1,(%rax,%rcx,8)
movsd  0x8(%rsi,%rcx,8),%xmm1
mulsd  %xmm0,%xmm1
addsd  0x8(%r8,%rcx,8),%xmm1
movsd  %xmm1,0x8(%rax,%rcx,8)
movsd  0x10(%rsi,%rcx,8),%xmm1
mulsd  %xmm0,%xmm1
addsd  0x10(%r8,%rcx,8),%xmm1
movsd  %xmm1,0x10(%rax,%rcx,8)
movsd  0x18(%rsi,%rcx,8),%xmm1
mulsd  %xmm0,%xmm1
addsd  0x18(%r8,%rcx,8),%xmm1
movsd  %xmm1,0x18(%rax,%rcx,8)
add    $0x4,%rcx
cmp    %ecx,%edi
jne    1230 <kernel_dgemm_diag_right_1_lib4+0x130>
jmp    15d6 <kernel_dgemm_diag_right_1_lib4+0x4d6>
xor    %r9d,%r9d
cmp    $0x4,%edi
jb     12ef <kernel_dgemm_diag_right_1_lib4+0x1ef>
lea    -0x3(%rdi),%r8d
shl    $0x2,%edx
movslq %edx,%rdx
shl    $0x2,%ebp
movslq %ebp,%rbx
movapd %xmm0,%xmm1
unpcklpd %xmm0,%xmm1
shl    $0x3,%rdx
shl    $0x3,%rbx
xor    %ecx,%ecx
movupd (%rsi),%xmm2
movupd 0x10(%rsi),%xmm3
mulpd  %xmm1,%xmm2
mulpd  %xmm1,%xmm3
movupd %xmm2,(%rax)
movupd %xmm3,0x10(%rax)
add    $0x4,%ecx
add    %rdx,%rsi
add    %rbx,%rax
cmp    %r8d,%ecx
jl     12c0 <kernel_dgemm_diag_right_1_lib4+0x1c0>
mov    %edi,%r9d
and    $0xfffffffc,%r9d
cmp    %edi,%r9d
jge    15d6 <kernel_dgemm_diag_right_1_lib4+0x4d6>
mov    %r9d,%edx
not    %edx
add    %edi,%edx
cmp    $0x3,%edx
jb     153d <kernel_dgemm_diag_right_1_lib4+0x43d>
lea    (%rsi,%rdx,8),%rcx
add    $0x8,%rcx
cmp    %rcx,%rax
jae    1326 <kernel_dgemm_diag_right_1_lib4+0x226>
lea    (%rax,%rdx,8),%rcx
add    $0x8,%rcx
cmp    %rcx,%rsi
jb     153d <kernel_dgemm_diag_right_1_lib4+0x43d>
add    $0x1,%rdx
mov    %rdx,%r8
and    $0xfffffffffffffffc,%r8
movapd %xmm0,%xmm1
unpcklpd %xmm0,%xmm1
lea    -0x4(%r8),%rcx
mov    %rcx,%r10
shr    $0x2,%r10
add    $0x1,%r10
test   %rcx,%rcx
je     1503 <kernel_dgemm_diag_right_1_lib4+0x403>
mov    %r10,%rbx
and    $0xfffffffffffffffe,%rbx
xor    %ecx,%ecx
nopw   0x0(%rax,%rax,1)
movupd (%rsi,%rcx,8),%xmm2
movupd 0x10(%rsi,%rcx,8),%xmm3
mulpd  %xmm1,%xmm2
mulpd  %xmm1,%xmm3
movupd %xmm2,(%rax,%rcx,8)
movupd %xmm3,0x10(%rax,%rcx,8)
movupd 0x20(%rsi,%rcx,8),%xmm2
movupd 0x30(%rsi,%rcx,8),%xmm3
mulpd  %xmm1,%xmm2
mulpd  %xmm1,%xmm3
movupd %xmm2,0x20(%rax,%rcx,8)
movupd %xmm3,0x30(%rax,%rcx,8)
add    $0x8,%rcx
add    $0xfffffffffffffffe,%rbx
jne    1360 <kernel_dgemm_diag_right_1_lib4+0x260>
jmp    1505 <kernel_dgemm_diag_right_1_lib4+0x405>
lea    (%rax,%rdx,8),%rbp
add    $0x8,%rbp
lea    (%rsi,%rdx,8),%rcx
add    $0x8,%rcx
lea    (%r8,%rdx,8),%rbx
add    $0x8,%rbx
cmp    %rcx,%rax
setb   %r9b
cmp    %rbp,%rsi
setb   %r11b
cmp    %rbx,%rax
setb   %cl
cmp    %rbp,%r8
setb   %bl
test   %r11b,%r9b
jne    11ce <kernel_dgemm_diag_right_1_lib4+0xce>
and    %bl,%cl
jne    11ce <kernel_dgemm_diag_right_1_lib4+0xce>
add    $0x1,%rdx
mov    %rdx,%r9
and    $0xfffffffffffffffc,%r9
movapd %xmm0,%xmm1
unpcklpd %xmm0,%xmm1
lea    -0x4(%r9),%rcx
mov    %rcx,%r11
shr    $0x2,%r11
add    $0x1,%r11
test   %rcx,%rcx
je     14f9 <kernel_dgemm_diag_right_1_lib4+0x3f9>
mov    %r11,%rbx
and    $0xfffffffffffffffe,%rbx
xor    %ecx,%ecx
cs nopw 0x0(%rax,%rax,1)
xchg   %ax,%ax
movupd (%rsi,%rcx,8),%xmm2
movupd 0x10(%rsi,%rcx,8),%xmm3
movupd (%r8,%rcx,8),%xmm4
movupd 0x10(%r8,%rcx,8),%xmm5
mulpd  %xmm1,%xmm2
addpd  %xmm4,%xmm2
mulpd  %xmm1,%xmm3
addpd  %xmm5,%xmm3
movupd %xmm2,(%rax,%rcx,8)
movupd %xmm3,0x10(%rax,%rcx,8)
movupd 0x20(%rsi,%rcx,8),%xmm2
movupd 0x30(%rsi,%rcx,8),%xmm3
movupd 0x20(%r8,%rcx,8),%xmm4
movupd 0x30(%r8,%rcx,8),%xmm5
mulpd  %xmm1,%xmm2
addpd  %xmm4,%xmm2
mulpd  %xmm1,%xmm3
addpd  %xmm5,%xmm3
movupd %xmm2,0x20(%rax,%rcx,8)
movupd %xmm3,0x30(%rax,%rcx,8)
add    $0x8,%rcx
add    $0xfffffffffffffffe,%rbx
jne    1430 <kernel_dgemm_diag_right_1_lib4+0x330>
test   $0x1,%r11b
je     14dc <kernel_dgemm_diag_right_1_lib4+0x3dc>
movupd (%rsi,%rcx,8),%xmm2
movupd 0x10(%rsi,%rcx,8),%xmm3
movupd (%r8,%rcx,8),%xmm4
movupd 0x10(%r8,%rcx,8),%xmm5
mulpd  %xmm1,%xmm2
addpd  %xmm4,%xmm2
mulpd  %xmm1,%xmm3
addpd  %xmm5,%xmm3
movupd %xmm2,(%rax,%rcx,8)
movupd %xmm3,0x10(%rax,%rcx,8)
cmp    %r9,%rdx
je     15d6 <kernel_dgemm_diag_right_1_lib4+0x4d6>
add    %r9d,%r10d
lea    (%rsi,%r9,8),%rsi
lea    (%r8,%r9,8),%r8
lea    (%rax,%r9,8),%rax
jmp    11ce <kernel_dgemm_diag_right_1_lib4+0xce>
xor    %ecx,%ecx
test   $0x1,%r11b
jne    14a9 <kernel_dgemm_diag_right_1_lib4+0x3a9>
jmp    14dc <kernel_dgemm_diag_right_1_lib4+0x3dc>
xor    %ecx,%ecx
test   $0x1,%r10b
je     1529 <kernel_dgemm_diag_right_1_lib4+0x429>
movupd (%rsi,%rcx,8),%xmm2
movupd 0x10(%rsi,%rcx,8),%xmm3
mulpd  %xmm1,%xmm2
mulpd  %xmm1,%xmm3
movupd %xmm2,(%rax,%rcx,8)
movupd %xmm3,0x10(%rax,%rcx,8)
cmp    %r8,%rdx
je     15d6 <kernel_dgemm_diag_right_1_lib4+0x4d6>
add    %r8d,%r9d
lea    (%rsi,%r8,8),%rsi
lea    (%rax,%r8,8),%rax
mov    %edi,%edx
sub    %r9d,%edx
mov    %r9d,%ecx
not    %ecx
add    %edi,%ecx
and    $0x3,%edx
je     157e <kernel_dgemm_diag_right_1_lib4+0x47e>
neg    %edx
xor    %ebx,%ebx
cs nopw 0x0(%rax,%rax,1)
nopl   0x0(%rax)
movsd  (%rsi),%xmm1
mulsd  %xmm0,%xmm1
movsd  %xmm1,(%rax)
add    $0x8,%rsi
add    $0x8,%rax
add    $0xffffffff,%ebx
cmp    %ebx,%edx
jne    1560 <kernel_dgemm_diag_right_1_lib4+0x460>
sub    %ebx,%r9d
cmp    $0x3,%ecx
jb     15d6 <kernel_dgemm_diag_right_1_lib4+0x4d6>
sub    %r9d,%edi
xor    %ecx,%ecx
nopl   0x0(%rax,%rax,1)
movsd  (%rsi,%rcx,8),%xmm1
mulsd  %xmm0,%xmm1
movsd  %xmm1,(%rax,%rcx,8)
movsd  0x8(%rsi,%rcx,8),%xmm1
mulsd  %xmm0,%xmm1
movsd  %xmm1,0x8(%rax,%rcx,8)
movsd  0x10(%rsi,%rcx,8),%xmm1
mulsd  %xmm0,%xmm1
movsd  %xmm1,0x10(%rax,%rcx,8)
movsd  0x18(%rsi,%rcx,8),%xmm1
mulsd  %xmm0,%xmm1
movsd  %xmm1,0x18(%rax,%rcx,8)
add    $0x4,%rcx
cmp    %ecx,%edi
jne    1590 <kernel_dgemm_diag_right_1_lib4+0x490>
pop    %rbx
pop    %rbp
ret

LLVM IR (-O0):
define void @kernel_dgemm_diag_right_1_lib4(i32 %0, double* %1, i32 %2, double* %3, double* %4, i32 %5, double* %6, i32 %7, i32 %8) {
%10 = alloca i32
%11 = alloca double*
%12 = alloca i32
%13 = alloca double*
%14 = alloca double*
%15 = alloca i32
%16 = alloca double*
%17 = alloca i32
%18 = alloca i32
%19 = alloca i32
%20 = alloca i32
%21 = alloca double
%22 = alloca double
%23 = alloca double
%24 = alloca double
%25 = alloca double
%26 = alloca double
%27 = alloca double
%28 = alloca double
%29 = alloca double
store i32 %0, i32* %10
store double* %1, double** %11
store i32 %2, i32* %12
store double* %3, double** %13
store double* %4, double** %14
store i32 %5, i32* %15
store double* %6, double** %16
store i32 %7, i32* %17
store i32 %8, i32* %18
%30 = load i32, i32* %10
%31 = icmp sle i32 %30, 0
br i1 %31, label %32, label %33
32: ; preds = %9
br label %228
33: ; preds = %9
store i32 4, i32* %19
%34 = load i32, i32* %18
%35 = icmp eq i32 %34, -1
br i1 %35, label %36, label %41
36: ; preds = %33
%37 = load double*, double** %13
%38 = getelementptr inbounds double, double* %37, i64 0
%39 = load double, double* %38
%40 = fneg double %39
store double %40, double* %25
br label %45
41: ; preds = %33
%42 = load double*, double** %13
%43 = getelementptr inbounds double, double* %42, i64 0
%44 = load double, double* %43
store double %44, double* %25
br label %45
45: ; preds = %41, %36
%46 = load i32, i32* %18
%47 = icmp eq i32 %46, 0
br i1 %47, label %48, label %127
48: ; preds = %45
store i32 0, i32* %20
br label %49
49: ; preds = %101, %48
%50 = load i32, i32* %20
%51 = load i32, i32* %10
%52 = sub nsw i32 %51, 3
%53 = icmp slt i32 %50, %52
br i1 %53, label %54, label %104
54: ; preds = %49
%55 = load double*, double** %11
%56 = getelementptr inbounds double, double* %55, i64 0
%57 = load double, double* %56
store double %57, double* %21
%58 = load double*, double** %11
%59 = getelementptr inbounds double, double* %58, i64 1
%60 = load double, double* %59
store double %60, double* %22
%61 = load double*, double** %11
%62 = getelementptr inbounds double, double* %61, i64 2
%63 = load double, double* %62
store double %63, double* %23
%64 = load double*, double** %11
%65 = getelementptr inbounds double, double* %64, i64 3
%66 = load double, double* %65
store double %66, double* %24
%67 = load double, double* %21
%68 = load double, double* %25
%69 = fmul double %67, %68
store double %69, double* %26
%70 = load double, double* %22
%71 = load double, double* %25
%72 = fmul double %70, %71
store double %72, double* %27
%73 = load double, double* %23
%74 = load double, double* %25
%75 = fmul double %73, %74
store double %75, double* %28
%76 = load double, double* %24
%77 = load double, double* %25
%78 = fmul double %76, %77
store double %78, double* %29
%79 = load double, double* %26
%80 = load double*, double** %16
%81 = getelementptr inbounds double, double* %80, i64 0
store double %79, double* %81
%82 = load double, double* %27
%83 = load double*, double** %16
%84 = getelementptr inbounds double, double* %83, i64 1
store double %82, double* %84
%85 = load double, double* %28
%86 = load double*, double** %16
%87 = getelementptr inbounds double, double* %86, i64 2
store double %85, double* %87
%88 = load double, double* %29
%89 = load double*, double** %16
%90 = getelementptr inbounds double, double* %89, i64 3
store double %88, double* %90
%91 = load i32, i32* %12
%92 = mul nsw i32 4, %91
%93 = load double*, double** %11
%94 = sext i32 %92 to i64
%95 = getelementptr inbounds double, double* %93, i64 %94
store double* %95, double** %11
%96 = load i32, i32* %17
%97 = mul nsw i32 4, %96
%98 = load double*, double** %16
%99 = sext i32 %97 to i64
%100 = getelementptr inbounds double, double* %98, i64 %99
store double* %100, double** %16
br label %101
101: ; preds = %54
%102 = load i32, i32* %20
%103 = add nsw i32 %102, 4
store i32 %103, i32* %20
br label %49
104: ; preds = %49
br label %105
105: ; preds = %123, %104
%106 = load i32, i32* %20
%107 = load i32, i32* %10
%108 = icmp slt i32 %106, %107
br i1 %108, label %109, label %126
109: ; preds = %105
%110 = load double*, double** %11
%111 = getelementptr inbounds double, double* %110, i64 0
%112 = load double, double* %111
store double %112, double* %21
%113 = load double, double* %21
%114 = load double, double* %25
%115 = fmul double %113, %114
store double %115, double* %26
%116 = load double, double* %26
%117 = load double*, double** %16
%118 = getelementptr inbounds double, double* %117, i64 0
store double %116, double* %118
%119 = load double*, double** %11
%120 = getelementptr inbounds double, double* %119, i64 1
store double* %120, double** %11
%121 = load double*, double** %16
%122 = getelementptr inbounds double, double* %121, i64 1
store double* %122, double** %16
br label %123
123: ; preds = %109
%124 = load i32, i32* %20
%125 = add nsw i32 %124, 1
store i32 %125, i32* %20
br label %105
126: ; preds = %105
br label %228
127: ; preds = %45
store i32 0, i32* %20
br label %128
128: ; preds = %197, %127
%129 = load i32, i32* %20
%130 = load i32, i32* %10
%131 = sub nsw i32 %130, 3
%132 = icmp slt i32 %129, %131
br i1 %132, label %133, label %200
133: ; preds = %128
%134 = load double*, double** %11
%135 = getelementptr inbounds double, double* %134, i64 0
%136 = load double, double* %135
store double %136, double* %21
%137 = load double*, double** %11
%138 = getelementptr inbounds double, double* %137, i64 1
%139 = load double, double* %138
store double %139, double* %22
%140 = load double*, double** %11
%141 = getelementptr inbounds double, double* %140, i64 2
%142 = load double, double* %141
store double %142, double* %23
%143 = load double*, double** %11
%144 = getelementptr inbounds double, double* %143, i64 3
%145 = load double, double* %144
store double %145, double* %24
%146 = load double*, double** %14
%147 = getelementptr inbounds double, double* %146, i64 0
%148 = load double, double* %147
%149 = load double, double* %21
%150 = load double, double* %25
%151 = call double @llvm.fmuladd.f64(double %149, double %150, double %148)
store double %151, double* %26
%152 = load double*, double** %14
%153 = getelementptr inbounds double, double* %152, i64 1
%154 = load double, double* %153
%155 = load double, double* %22
%156 = load double, double* %25
%157 = call double @llvm.fmuladd.f64(double %155, double %156, double %154)
store double %157, double* %27
%158 = load double*, double** %14
%159 = getelementptr inbounds double, double* %158, i64 2
%160 = load double, double* %159
%161 = load double, double* %23
%162 = load double, double* %25
%163 = call double @llvm.fmuladd.f64(double %161, double %162, double %160)
store double %163, double* %28
%164 = load double*, double** %14
%165 = getelementptr inbounds double, double* %164, i64 3
%166 = load double, double* %165
%167 = load double, double* %24
%168 = load double, double* %25
%169 = call double @llvm.fmuladd.f64(double %167, double %168, double %166)
store double %169, double* %29
%170 = load double, double* %26
%171 = load double*, double** %16
%172 = getelementptr inbounds double, double* %171, i64 0
store double %170, double* %172
%173 = load double, double* %27
%174 = load double*, double** %16
%175 = getelementptr inbounds double, double* %174, i64 1
store double %173, double* %175
%176 = load double, double* %28
%177 = load double*, double** %16
%178 = getelementptr inbounds double, double* %177, i64 2
store double %176, double* %178
%179 = load double, double* %29
%180 = load double*, double** %16
%181 = getelementptr inbounds double, double* %180, i64 3
store double %179, double* %181
%182 = load i32, i32* %12
%183 = mul nsw i32 4, %182
%184 = load double*, double** %11
%185 = sext i32 %183 to i64
%186 = getelementptr inbounds double, double* %184, i64 %185
store double* %186, double** %11
%187 = load i32, i32* %15
%188 = mul nsw i32 4, %187
%189 = load double*, double** %14
%190 = sext i32 %188 to i64
%191 = getelementptr inbounds double, double* %189, i64 %190
store double* %191, double** %14
%192 = load i32, i32* %17
%193 = mul nsw i32 4, %192
%194 = load double*, double** %16
%195 = sext i32 %193 to i64
%196 = getelementptr inbounds double, double* %194, i64 %195
store double* %196, double** %16
br label %197
197: ; preds = %133
%198 = load i32, i32* %20
%199 = add nsw i32 %198, 4
store i32 %199, i32* %20
br label %128
200: ; preds = %128
br label %201
201: ; preds = %224, %200
%202 = load i32, i32* %20
%203 = load i32, i32* %10
%204 = icmp slt i32 %202, %203
br i1 %204, label %205, label %227
205: ; preds = %201
%206 = load double*, double** %11
%207 = getelementptr inbounds double, double* %206, i64 0
%208 = load double, double* %207
store double %208, double* %21
%209 = load double*, double** %14
%210 = getelementptr inbounds double, double* %209, i64 0
%211 = load double, double* %210
%212 = load double, double* %21
%213 = load double, double* %25
%214 = call double @llvm.fmuladd.f64(double %212, double %213, double %211)
store double %214, double* %26
%215 = load double, double* %26
%216 = load double*, double** %16
%217 = getelementptr inbounds double, double* %216, i64 0
store double %215, double* %217
%218 = load double*, double** %11
%219 = getelementptr inbounds double, double* %218, i64 1
store double* %219, double** %11
%220 = load double*, double** %14
%221 = getelementptr inbounds double, double* %220, i64 1
store double* %221, double** %14
%222 = load double*, double** %16
%223 = getelementptr inbounds double, double* %222, i64 1
store double* %223, double** %16
br label %224
224: ; preds = %205
%225 = load i32, i32* %20
%226 = add nsw i32 %225, 1
store i32 %226, i32* %20
br label %201
227: ; preds = %201
br label %228
228: ; preds = %32, %227, %126
ret void
}

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