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

/* Forward declarations */

/* Type definitions */
typedef int /*<<< orphan*/ __m128d;

/* Variables and functions */
int /*<<< orphan*/ _mm_add_pd(int /*<<< orphan*/, int /*<<< orphan*/);
int /*<<< orphan*/ _mm_load_pd(double *);
int /*<<< orphan*/ _mm_mul_pd(int /*<<< orphan*/, int /*<<< orphan*/);
int /*<<< orphan*/ _mm_setzero_pd();
int /*<<< orphan*/ _mm_shuffle_pd(int /*<<< orphan*/, int /*<<< orphan*/, int);
int /*<<< orphan*/ _mm_store_pd(double *, int /*<<< orphan*/);
int /*<<< orphan*/ _mm_store_sd(double *, int /*<<< orphan*/);
int /*<<< orphan*/ _mm_sub_pd(int /*<<< orphan*/, int /*<<< orphan*/);
int /*<<< orphan*/ _mm_unpackhi_pd(int /*<<< orphan*/, int /*<<< orphan*/);
int /*<<< orphan*/ _mm_unpacklo_pd(int /*<<< orphan*/, int /*<<< orphan*/);
void kernel_dgemm_nt_2x2_vs_lib4(int km, int kn, int kmax, double *A, double *B,
                                 double *C, double *D, int alg, int tc,
                                 int td) {
  const int ldc = 4;
  int k;
  __m128d c_00_11, c_01_10, a_01, b_01, b_10;
  c_00_11 = _mm_setzero_pd();
  c_01_10 = _mm_setzero_pd();
  k = 0;
  for (; k < kmax - 3; k += 4) {
    a_01 = _mm_load_pd(&A[0]);
    b_01 = _mm_load_pd(&B[0]);
    b_10 = _mm_shuffle_pd(b_01, b_01, 1);
    b_01 = _mm_mul_pd(a_01, b_01);
    c_00_11 = _mm_add_pd(c_00_11, b_01);
    b_10 = _mm_mul_pd(a_01, b_10);
    c_01_10 = _mm_add_pd(c_01_10, b_10);
    a_01 = _mm_load_pd(&A[4]);
    b_01 = _mm_load_pd(&B[4]);
    b_10 = _mm_shuffle_pd(b_01, b_01, 1);
    b_01 = _mm_mul_pd(a_01, b_01);
    c_00_11 = _mm_add_pd(c_00_11, b_01);
    b_10 = _mm_mul_pd(a_01, b_10);
    c_01_10 = _mm_add_pd(c_01_10, b_10);
    a_01 = _mm_load_pd(&A[8]);
    b_01 = _mm_load_pd(&B[8]);
    b_10 = _mm_shuffle_pd(b_01, b_01, 1);
    b_01 = _mm_mul_pd(a_01, b_01);
    c_00_11 = _mm_add_pd(c_00_11, b_01);
    b_10 = _mm_mul_pd(a_01, b_10);
    c_01_10 = _mm_add_pd(c_01_10, b_10);
    a_01 = _mm_load_pd(&A[12]);
    b_01 = _mm_load_pd(&B[12]);
    b_10 = _mm_shuffle_pd(b_01, b_01, 1);
    b_01 = _mm_mul_pd(a_01, b_01);
    c_00_11 = _mm_add_pd(c_00_11, b_01);
    b_10 = _mm_mul_pd(a_01, b_10);
    c_01_10 = _mm_add_pd(c_01_10, b_10);
    A += 16;
    B += 16;
  }
  for (; k < kmax; k++) {
    a_01 = _mm_load_pd(&A[0]);
    b_01 = _mm_load_pd(&B[0]);
    b_10 = _mm_shuffle_pd(b_01, b_01, 1);
    b_01 = _mm_mul_pd(a_01, b_01);
    c_00_11 = _mm_add_pd(c_00_11, b_01);
    b_10 = _mm_mul_pd(a_01, b_10);
    c_01_10 = _mm_add_pd(c_01_10, b_10);
    A += 4;
    B += 4;
  }
  __m128d t_0, c_0, c_1, d_0, d_1, c_00_10, c_01_11, c_00_01, c_10_11, d_00_11,
      d_01_10, d_00_10, d_01_11, d_00_01, d_10_11;
  if (alg == 0) {
    if (td == 0) {
      d_0 = _mm_shuffle_pd(c_00_11, c_01_10, 0x2);
      d_1 = _mm_shuffle_pd(c_01_10, c_00_11, 0x2);
      goto store_n;
    } else {
      d_0 = _mm_unpacklo_pd(c_00_11, c_01_10);
      d_1 = _mm_unpackhi_pd(c_01_10, c_00_11);
      goto store_t;
    }
  } else {
    if (tc == 0) {
      c_0 = _mm_shuffle_pd(c_00_11, c_01_10, 0x2);
      c_1 = _mm_shuffle_pd(c_01_10, c_00_11, 0x2);
      d_0 = _mm_load_pd(&C[0 + ldc * 0]);
      d_1 = _mm_load_pd(&C[0 + ldc * 1]);
      if (alg == 1) {
        d_0 = _mm_add_pd(d_0, c_0);
        d_1 = _mm_add_pd(d_1, c_1);
      } else {
        d_0 = _mm_sub_pd(d_0, c_0);
        d_1 = _mm_sub_pd(d_1, c_1);
      }
      if (td == 0) {
        goto store_n;
      } else {
        t_0 = d_0;
        d_0 = _mm_unpacklo_pd(d_0, d_1);
        d_1 = _mm_unpackhi_pd(t_0, d_1);
        goto store_t;
      }
    } else {
      c_0 = _mm_unpacklo_pd(c_00_11, c_01_10);
      c_1 = _mm_unpackhi_pd(c_01_10, c_00_11);
      d_0 = _mm_load_pd(&C[0 + ldc * 0]);
      d_1 = _mm_load_pd(&C[0 + ldc * 1]);
      if (alg == 1) {
        d_0 = _mm_add_pd(d_0, c_0);
        d_1 = _mm_add_pd(d_1, c_1);
      } else {
        d_0 = _mm_sub_pd(d_0, c_0);
        d_1 = _mm_sub_pd(d_1, c_1);
      }
      if (td == 0) {
        t_0 = d_0;
        d_0 = _mm_unpacklo_pd(d_0, d_1);
        d_1 = _mm_unpackhi_pd(t_0, d_1);
        goto store_n;
      } else {
        goto store_t;
      }
    }
  }
store_n:
  if (km >= 2) {
    _mm_store_pd(&D[0 + ldc * 0], d_0);
    if (kn >= 2)
      _mm_store_pd(&D[0 + ldc * 1], d_1);
  } else {
    _mm_store_sd(&D[0 + ldc * 0], d_0);
    if (kn >= 2)
      _mm_store_sd(&D[0 + ldc * 1], d_1);
  }
  return;
store_t:
  if (kn >= 2) {
    _mm_store_pd(&D[0 + ldc * 0], d_0);
    if (km >= 2)
      _mm_store_pd(&D[0 + ldc * 1], d_1);
  } else {
    _mm_store_sd(&D[0 + ldc * 0], d_0);
    if (km >= 2)
      _mm_store_sd(&D[0 + ldc * 1], d_1);
  }
  return;
}


x86 assembly (clang, -O0):
<kernel_dgemm_nt_2x2_vs_lib4>:
push   %rbp
mov    %rsp,%rbp
sub    $0x80,%rsp
mov    0x28(%rbp),%eax
mov    0x20(%rbp),%eax
mov    0x18(%rbp),%eax
mov    0x10(%rbp),%rax
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    %edx,-0xc(%rbp)
mov    %rcx,-0x18(%rbp)
mov    %r8,-0x20(%rbp)
mov    %r9,-0x28(%rbp)
movl   $0x4,-0x2c(%rbp)
mov    $0x0,%al
call   10a0 <_mm_setzero_pd@plt>
mov    %eax,-0x34(%rbp)
mov    $0x0,%al
call   10a0 <_mm_setzero_pd@plt>
mov    %eax,-0x38(%rbp)
movl   $0x0,-0x30(%rbp)
mov    -0x30(%rbp),%eax
mov    -0xc(%rbp),%ecx
sub    $0x3,%ecx
cmp    %ecx,%eax
jge    13ce <kernel_dgemm_nt_2x2_vs_lib4+0x22e>
mov    -0x18(%rbp),%rdi
call   1090 <_mm_load_pd@plt>
mov    %eax,-0x3c(%rbp)
mov    -0x20(%rbp),%rdi
call   1090 <_mm_load_pd@plt>
mov    %eax,-0x40(%rbp)
mov    -0x40(%rbp),%edi
mov    -0x40(%rbp),%esi
mov    $0x1,%edx
call   1080 <_mm_shuffle_pd@plt>
mov    %eax,-0x44(%rbp)
mov    -0x3c(%rbp),%edi
mov    -0x40(%rbp),%esi
call   10b0 <_mm_mul_pd@plt>
mov    %eax,-0x40(%rbp)
mov    -0x34(%rbp),%edi
mov    -0x40(%rbp),%esi
call   1060 <_mm_add_pd@plt>
mov    %eax,-0x34(%rbp)
mov    -0x3c(%rbp),%edi
mov    -0x44(%rbp),%esi
call   10b0 <_mm_mul_pd@plt>
mov    %eax,-0x44(%rbp)
mov    -0x38(%rbp),%edi
mov    -0x44(%rbp),%esi
call   1060 <_mm_add_pd@plt>
mov    %eax,-0x38(%rbp)
mov    -0x18(%rbp),%rdi
add    $0x20,%rdi
call   1090 <_mm_load_pd@plt>
mov    %eax,-0x3c(%rbp)
mov    -0x20(%rbp),%rdi
add    $0x20,%rdi
call   1090 <_mm_load_pd@plt>
mov    %eax,-0x40(%rbp)
mov    -0x40(%rbp),%edi
mov    -0x40(%rbp),%esi
mov    $0x1,%edx
call   1080 <_mm_shuffle_pd@plt>
mov    %eax,-0x44(%rbp)
mov    -0x3c(%rbp),%edi
mov    -0x40(%rbp),%esi
call   10b0 <_mm_mul_pd@plt>
mov    %eax,-0x40(%rbp)
mov    -0x34(%rbp),%edi
mov    -0x40(%rbp),%esi
call   1060 <_mm_add_pd@plt>
mov    %eax,-0x34(%rbp)
mov    -0x3c(%rbp),%edi
mov    -0x44(%rbp),%esi
call   10b0 <_mm_mul_pd@plt>
mov    %eax,-0x44(%rbp)
mov    -0x38(%rbp),%edi
mov    -0x44(%rbp),%esi
call   1060 <_mm_add_pd@plt>
mov    %eax,-0x38(%rbp)
mov    -0x18(%rbp),%rdi
add    $0x40,%rdi
call   1090 <_mm_load_pd@plt>
mov    %eax,-0x3c(%rbp)
mov    -0x20(%rbp),%rdi
add    $0x40,%rdi
call   1090 <_mm_load_pd@plt>
mov    %eax,-0x40(%rbp)
mov    -0x40(%rbp),%edi
mov    -0x40(%rbp),%esi
mov    $0x1,%edx
call   1080 <_mm_shuffle_pd@plt>
mov    %eax,-0x44(%rbp)
mov    -0x3c(%rbp),%edi
mov    -0x40(%rbp),%esi
call   10b0 <_mm_mul_pd@plt>
mov    %eax,-0x40(%rbp)
mov    -0x34(%rbp),%edi
mov    -0x40(%rbp),%esi
call   1060 <_mm_add_pd@plt>
mov    %eax,-0x34(%rbp)
mov    -0x3c(%rbp),%edi
mov    -0x44(%rbp),%esi
call   10b0 <_mm_mul_pd@plt>
mov    %eax,-0x44(%rbp)
mov    -0x38(%rbp),%edi
mov    -0x44(%rbp),%esi
call   1060 <_mm_add_pd@plt>
mov    %eax,-0x38(%rbp)
mov    -0x18(%rbp),%rdi
add    $0x60,%rdi
call   1090 <_mm_load_pd@plt>
mov    %eax,-0x3c(%rbp)
mov    -0x20(%rbp),%rdi
add    $0x60,%rdi
call   1090 <_mm_load_pd@plt>
mov    %eax,-0x40(%rbp)
mov    -0x40(%rbp),%edi
mov    -0x40(%rbp),%esi
mov    $0x1,%edx
call   1080 <_mm_shuffle_pd@plt>
mov    %eax,-0x44(%rbp)
mov    -0x3c(%rbp),%edi
mov    -0x40(%rbp),%esi
call   10b0 <_mm_mul_pd@plt>
mov    %eax,-0x40(%rbp)
mov    -0x34(%rbp),%edi
mov    -0x40(%rbp),%esi
call   1060 <_mm_add_pd@plt>
mov    %eax,-0x34(%rbp)
mov    -0x3c(%rbp),%edi
mov    -0x44(%rbp),%esi
call   10b0 <_mm_mul_pd@plt>
mov    %eax,-0x44(%rbp)
mov    -0x38(%rbp),%edi
mov    -0x44(%rbp),%esi
call   1060 <_mm_add_pd@plt>
mov    %eax,-0x38(%rbp)
mov    -0x18(%rbp),%rax
add    $0x80,%rax
mov    %rax,-0x18(%rbp)
mov    -0x20(%rbp),%rax
add    $0x80,%rax
mov    %rax,-0x20(%rbp)
mov    -0x30(%rbp),%eax
add    $0x4,%eax
mov    %eax,-0x30(%rbp)
jmp    11ef <kernel_dgemm_nt_2x2_vs_lib4+0x4f>
jmp    13d3 <kernel_dgemm_nt_2x2_vs_lib4+0x233>
mov    -0x30(%rbp),%eax
cmp    -0xc(%rbp),%eax
jge    1468 <kernel_dgemm_nt_2x2_vs_lib4+0x2c8>
mov    -0x18(%rbp),%rdi
call   1090 <_mm_load_pd@plt>
mov    %eax,-0x3c(%rbp)
mov    -0x20(%rbp),%rdi
call   1090 <_mm_load_pd@plt>
mov    %eax,-0x40(%rbp)
mov    -0x40(%rbp),%edi
mov    -0x40(%rbp),%esi
mov    $0x1,%edx
call   1080 <_mm_shuffle_pd@plt>
mov    %eax,-0x44(%rbp)
mov    -0x3c(%rbp),%edi
mov    -0x40(%rbp),%esi
call   10b0 <_mm_mul_pd@plt>
mov    %eax,-0x40(%rbp)
mov    -0x34(%rbp),%edi
mov    -0x40(%rbp),%esi
call   1060 <_mm_add_pd@plt>
mov    %eax,-0x34(%rbp)
mov    -0x3c(%rbp),%edi
mov    -0x44(%rbp),%esi
call   10b0 <_mm_mul_pd@plt>
mov    %eax,-0x44(%rbp)
mov    -0x38(%rbp),%edi
mov    -0x44(%rbp),%esi
call   1060 <_mm_add_pd@plt>
mov    %eax,-0x38(%rbp)
mov    -0x18(%rbp),%rax
add    $0x20,%rax
mov    %rax,-0x18(%rbp)
mov    -0x20(%rbp),%rax
add    $0x20,%rax
mov    %rax,-0x20(%rbp)
mov    -0x30(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x30(%rbp)
jmp    13d3 <kernel_dgemm_nt_2x2_vs_lib4+0x233>
cmpl   $0x0,0x18(%rbp)
jne    14c8 <kernel_dgemm_nt_2x2_vs_lib4+0x328>
cmpl   $0x0,0x28(%rbp)
jne    14a7 <kernel_dgemm_nt_2x2_vs_lib4+0x307>
mov    -0x34(%rbp),%edi
mov    -0x38(%rbp),%esi
mov    $0x2,%edx
call   1080 <_mm_shuffle_pd@plt>
mov    %eax,-0x54(%rbp)
mov    -0x38(%rbp),%edi
mov    -0x34(%rbp),%esi
mov    $0x2,%edx
call   1080 <_mm_shuffle_pd@plt>
mov    %eax,-0x58(%rbp)
jmp    1646 <kernel_dgemm_nt_2x2_vs_lib4+0x4a6>
mov    -0x34(%rbp),%edi
mov    -0x38(%rbp),%esi
call   1050 <_mm_unpacklo_pd@plt>
mov    %eax,-0x54(%rbp)
mov    -0x38(%rbp),%edi
mov    -0x34(%rbp),%esi
call   1070 <_mm_unpackhi_pd@plt>
mov    %eax,-0x58(%rbp)
jmp    16ab <kernel_dgemm_nt_2x2_vs_lib4+0x50b>
cmpl   $0x0,0x20(%rbp)
jne    1591 <kernel_dgemm_nt_2x2_vs_lib4+0x3f1>
mov    -0x34(%rbp),%edi
mov    -0x38(%rbp),%esi
mov    $0x2,%edx
call   1080 <_mm_shuffle_pd@plt>
mov    %eax,-0x4c(%rbp)
mov    -0x38(%rbp),%edi
mov    -0x34(%rbp),%esi
mov    $0x2,%edx
call   1080 <_mm_shuffle_pd@plt>
mov    %eax,-0x50(%rbp)
mov    -0x28(%rbp),%rdi
call   1090 <_mm_load_pd@plt>
mov    %eax,-0x54(%rbp)
mov    -0x28(%rbp),%rdi
add    $0x20,%rdi
call   1090 <_mm_load_pd@plt>
mov    %eax,-0x58(%rbp)
cmpl   $0x1,0x18(%rbp)
jne    153f <kernel_dgemm_nt_2x2_vs_lib4+0x39f>
mov    -0x54(%rbp),%edi
mov    -0x4c(%rbp),%esi
call   1060 <_mm_add_pd@plt>
mov    %eax,-0x54(%rbp)
mov    -0x58(%rbp),%edi
mov    -0x50(%rbp),%esi
call   1060 <_mm_add_pd@plt>
mov    %eax,-0x58(%rbp)
jmp    155b <kernel_dgemm_nt_2x2_vs_lib4+0x3bb>
mov    -0x54(%rbp),%edi
mov    -0x4c(%rbp),%esi
call   1040 <_mm_sub_pd@plt>
mov    %eax,-0x54(%rbp)
mov    -0x58(%rbp),%edi
mov    -0x50(%rbp),%esi
call   1040 <_mm_sub_pd@plt>
mov    %eax,-0x58(%rbp)
cmpl   $0x0,0x28(%rbp)
jne    156a <kernel_dgemm_nt_2x2_vs_lib4+0x3ca>
jmp    1646 <kernel_dgemm_nt_2x2_vs_lib4+0x4a6>
mov    -0x54(%rbp),%eax
mov    %eax,-0x48(%rbp)
mov    -0x54(%rbp),%edi
mov    -0x58(%rbp),%esi
call   1050 <_mm_unpacklo_pd@plt>
mov    %eax,-0x54(%rbp)
mov    -0x48(%rbp),%edi
mov    -0x58(%rbp),%esi
call   1070 <_mm_unpackhi_pd@plt>
mov    %eax,-0x58(%rbp)
jmp    16ab <kernel_dgemm_nt_2x2_vs_lib4+0x50b>
mov    -0x34(%rbp),%edi
mov    -0x38(%rbp),%esi
call   1050 <_mm_unpacklo_pd@plt>
mov    %eax,-0x4c(%rbp)
mov    -0x38(%rbp),%edi
mov    -0x34(%rbp),%esi
call   1070 <_mm_unpackhi_pd@plt>
mov    %eax,-0x50(%rbp)
mov    -0x28(%rbp),%rdi
call   1090 <_mm_load_pd@plt>
mov    %eax,-0x54(%rbp)
mov    -0x28(%rbp),%rdi
add    $0x20,%rdi
call   1090 <_mm_load_pd@plt>
mov    %eax,-0x58(%rbp)
cmpl   $0x1,0x18(%rbp)
jne    15f4 <kernel_dgemm_nt_2x2_vs_lib4+0x454>
mov    -0x54(%rbp),%edi
mov    -0x4c(%rbp),%esi
call   1060 <_mm_add_pd@plt>
mov    %eax,-0x54(%rbp)
mov    -0x58(%rbp),%edi
mov    -0x50(%rbp),%esi
call   1060 <_mm_add_pd@plt>
mov    %eax,-0x58(%rbp)
jmp    1610 <kernel_dgemm_nt_2x2_vs_lib4+0x470>
mov    -0x54(%rbp),%edi
mov    -0x4c(%rbp),%esi
call   1040 <_mm_sub_pd@plt>
mov    %eax,-0x54(%rbp)
mov    -0x58(%rbp),%edi
mov    -0x50(%rbp),%esi
call   1040 <_mm_sub_pd@plt>
mov    %eax,-0x58(%rbp)
cmpl   $0x0,0x28(%rbp)
jne    1641 <kernel_dgemm_nt_2x2_vs_lib4+0x4a1>
mov    -0x54(%rbp),%eax
mov    %eax,-0x48(%rbp)
mov    -0x54(%rbp),%edi
mov    -0x58(%rbp),%esi
call   1050 <_mm_unpacklo_pd@plt>
mov    %eax,-0x54(%rbp)
mov    -0x48(%rbp),%edi
mov    -0x58(%rbp),%esi
call   1070 <_mm_unpackhi_pd@plt>
mov    %eax,-0x58(%rbp)
jmp    1646 <kernel_dgemm_nt_2x2_vs_lib4+0x4a6>
jmp    16ab <kernel_dgemm_nt_2x2_vs_lib4+0x50b>
cmpl   $0x2,-0x4(%rbp)
jl     167b <kernel_dgemm_nt_2x2_vs_lib4+0x4db>
mov    0x10(%rbp),%rdi
mov    -0x54(%rbp),%esi
call   1030 <_mm_store_pd@plt>
cmpl   $0x2,-0x8(%rbp)
jl     1676 <kernel_dgemm_nt_2x2_vs_lib4+0x4d6>
mov    0x10(%rbp),%rdi
add    $0x20,%rdi
mov    -0x58(%rbp),%esi
call   1030 <_mm_store_pd@plt>
jmp    16a6 <kernel_dgemm_nt_2x2_vs_lib4+0x506>
mov    0x10(%rbp),%rdi
mov    -0x54(%rbp),%esi
call   10c0 <_mm_store_sd@plt>
cmpl   $0x2,-0x8(%rbp)
jl     16a1 <kernel_dgemm_nt_2x2_vs_lib4+0x501>
mov    0x10(%rbp),%rdi
add    $0x20,%rdi
mov    -0x58(%rbp),%esi
call   10c0 <_mm_store_sd@plt>
jmp    16a6 <kernel_dgemm_nt_2x2_vs_lib4+0x506>
jmp    1710 <kernel_dgemm_nt_2x2_vs_lib4+0x570>
cmpl   $0x2,-0x8(%rbp)
jl     16e0 <kernel_dgemm_nt_2x2_vs_lib4+0x540>
mov    0x10(%rbp),%rdi
mov    -0x54(%rbp),%esi
call   1030 <_mm_store_pd@plt>
cmpl   $0x2,-0x4(%rbp)
jl     16db <kernel_dgemm_nt_2x2_vs_lib4+0x53b>
mov    0x10(%rbp),%rdi
add    $0x20,%rdi
mov    -0x58(%rbp),%esi
call   1030 <_mm_store_pd@plt>
jmp    170b <kernel_dgemm_nt_2x2_vs_lib4+0x56b>
mov    0x10(%rbp),%rdi
mov    -0x54(%rbp),%esi
call   10c0 <_mm_store_sd@plt>
cmpl   $0x2,-0x4(%rbp)
jl     1706 <kernel_dgemm_nt_2x2_vs_lib4+0x566>
mov    0x10(%rbp),%rdi
add    $0x20,%rdi
mov    -0x58(%rbp),%esi
call   10c0 <_mm_store_sd@plt>
jmp    170b <kernel_dgemm_nt_2x2_vs_lib4+0x56b>
jmp    1710 <kernel_dgemm_nt_2x2_vs_lib4+0x570>
add    $0x80,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<kernel_dgemm_nt_2x2_vs_lib4>:
push   %rbp
push   %r15
push   %r14
push   %r13
push   %r12
push   %rbx
sub    $0x48,%rsp
mov    %r9,0x40(%rsp)
mov    %r8,%r13
mov    %rcx,%r12
mov    %edx,%ebx
mov    %esi,0x10(%rsp)
mov    %edi,0xc(%rsp)
mov    0x98(%rsp),%eax
mov    %eax,0x14(%rsp)
mov    0x90(%rsp),%eax
mov    %eax,0x2c(%rsp)
mov    0x88(%rsp),%eax
mov    %eax,0x30(%rsp)
mov    0x80(%rsp),%rax
mov    %rax,0x18(%rsp)
xor    %ebp,%ebp
xor    %eax,%eax
call   10a0 <_mm_setzero_pd@plt>
mov    %eax,%r15d
xor    %eax,%eax
call   10a0 <_mm_setzero_pd@plt>
mov    %eax,%r14d
cmp    $0x4,%ebx
jl     13a5 <kernel_dgemm_nt_2x2_vs_lib4+0x205>
mov    %rbx,0x20(%rsp)
lea    -0x3(%rbx),%eax
mov    %eax,0x34(%rsp)
xor    %ebp,%ebp
xchg   %ax,%ax
mov    %r14d,0x8(%rsp)
mov    %ebp,0x3c(%rsp)
mov    %r12,%rdi
call   1090 <_mm_load_pd@plt>
mov    %eax,%ebx
mov    %r13,%rdi
call   1090 <_mm_load_pd@plt>
mov    %eax,%r14d
mov    %eax,%edi
mov    %eax,%esi
mov    $0x1,%edx
call   1080 <_mm_shuffle_pd@plt>
mov    %r15d,%ebp
mov    %eax,%r15d
mov    %ebx,%edi
mov    %r14d,%esi
call   10b0 <_mm_mul_pd@plt>
mov    %ebp,%edi
mov    %eax,%esi
call   1060 <_mm_add_pd@plt>
mov    %eax,0x38(%rsp)
mov    %ebx,%edi
mov    %r15d,%esi
call   10b0 <_mm_mul_pd@plt>
mov    0x8(%rsp),%edi
mov    %eax,%esi
call   1060 <_mm_add_pd@plt>
mov    %eax,0x8(%rsp)
lea    0x20(%r12),%rdi
call   1090 <_mm_load_pd@plt>
mov    %eax,%ebx
lea    0x20(%r13),%rdi
call   1090 <_mm_load_pd@plt>
mov    %eax,%ebp
mov    %eax,%edi
mov    %eax,%esi
mov    $0x1,%edx
call   1080 <_mm_shuffle_pd@plt>
mov    %eax,%r14d
mov    %ebx,%edi
mov    %ebp,%esi
call   10b0 <_mm_mul_pd@plt>
mov    0x38(%rsp),%edi
mov    %eax,%esi
call   1060 <_mm_add_pd@plt>
mov    %eax,%r15d
mov    %ebx,%edi
mov    %r14d,%esi
call   10b0 <_mm_mul_pd@plt>
mov    0x8(%rsp),%edi
mov    %eax,%esi
call   1060 <_mm_add_pd@plt>
mov    %eax,0x8(%rsp)
lea    0x40(%r12),%rdi
call   1090 <_mm_load_pd@plt>
mov    %eax,%ebp
lea    0x40(%r13),%rdi
call   1090 <_mm_load_pd@plt>
mov    %eax,%ebx
mov    %eax,%edi
mov    %eax,%esi
mov    $0x1,%edx
call   1080 <_mm_shuffle_pd@plt>
mov    %eax,%r14d
mov    %ebp,%edi
mov    %ebx,%esi
call   10b0 <_mm_mul_pd@plt>
mov    %r15d,%edi
mov    %eax,%esi
call   1060 <_mm_add_pd@plt>
mov    %eax,%r15d
mov    %ebp,%edi
mov    %r14d,%esi
call   10b0 <_mm_mul_pd@plt>
mov    0x8(%rsp),%edi
mov    %eax,%esi
call   1060 <_mm_add_pd@plt>
mov    %eax,0x8(%rsp)
lea    0x60(%r12),%rdi
call   1090 <_mm_load_pd@plt>
mov    %eax,%ebp
lea    0x60(%r13),%rdi
call   1090 <_mm_load_pd@plt>
mov    %eax,%ebx
mov    %eax,%edi
mov    %eax,%esi
mov    $0x1,%edx
call   1080 <_mm_shuffle_pd@plt>
mov    %eax,%r14d
mov    %ebp,%edi
mov    %ebx,%esi
call   10b0 <_mm_mul_pd@plt>
mov    %r15d,%edi
mov    %eax,%esi
call   1060 <_mm_add_pd@plt>
mov    %eax,%r15d
mov    %ebp,%edi
mov    0x3c(%rsp),%ebp
mov    %r14d,%esi
call   10b0 <_mm_mul_pd@plt>
mov    0x8(%rsp),%edi
mov    %eax,%esi
call   1060 <_mm_add_pd@plt>
mov    %eax,%r14d
sub    $0xffffffffffffff80,%r12
sub    $0xffffffffffffff80,%r13
add    $0x4,%ebp
cmp    0x34(%rsp),%ebp
jl     1220 <kernel_dgemm_nt_2x2_vs_lib4+0x80>
mov    0x20(%rsp),%rbx
cmp    %ebx,%ebp
jge    141f <kernel_dgemm_nt_2x2_vs_lib4+0x27f>
sub    %ebp,%ebx
nopl   0x0(%rax,%rax,1)
mov    %r14d,0x8(%rsp)
mov    %rbx,0x20(%rsp)
mov    %r12,%rdi
call   1090 <_mm_load_pd@plt>
mov    %eax,%ebx
mov    %r13,%rdi
call   1090 <_mm_load_pd@plt>
mov    %eax,%ebp
mov    %eax,%edi
mov    %eax,%esi
mov    $0x1,%edx
call   1080 <_mm_shuffle_pd@plt>
mov    %eax,%r14d
mov    %ebx,%edi
mov    %ebp,%esi
call   10b0 <_mm_mul_pd@plt>
mov    %r15d,%edi
mov    %eax,%esi
call   1060 <_mm_add_pd@plt>
mov    %eax,%r15d
mov    %ebx,%edi
mov    0x20(%rsp),%rbx
mov    %r14d,%esi
call   10b0 <_mm_mul_pd@plt>
mov    0x8(%rsp),%edi
mov    %eax,%esi
call   1060 <_mm_add_pd@plt>
mov    %eax,%r14d
add    $0x20,%r12
add    $0x20,%r13
add    $0xffffffff,%ebx
jne    13b0 <kernel_dgemm_nt_2x2_vs_lib4+0x210>
mov    0x30(%rsp),%ebx
test   %ebx,%ebx
je     1494 <kernel_dgemm_nt_2x2_vs_lib4+0x2f4>
cmpl   $0x0,0x2c(%rsp)
je     14ce <kernel_dgemm_nt_2x2_vs_lib4+0x32e>
mov    %r15d,%edi
mov    %r14d,%esi
call   1050 <_mm_unpacklo_pd@plt>
mov    %eax,%r13d
mov    %r14d,%edi
mov    %r15d,%esi
call   1070 <_mm_unpackhi_pd@plt>
mov    %eax,%r14d
mov    0x40(%rsp),%rbp
mov    %rbp,%rdi
call   1090 <_mm_load_pd@plt>
mov    %eax,%r12d
add    $0x20,%rbp
mov    %rbp,%rdi
call   1090 <_mm_load_pd@plt>
mov    %eax,%r15d
mov    %r12d,%edi
mov    %r13d,%esi
cmp    $0x1,%ebx
jne    153a <kernel_dgemm_nt_2x2_vs_lib4+0x39a>
call   1060 <_mm_add_pd@plt>
mov    %eax,%r12d
mov    %r15d,%edi
mov    %r14d,%esi
call   1060 <_mm_add_pd@plt>
jmp    154d <kernel_dgemm_nt_2x2_vs_lib4+0x3ad>
cmpl   $0x0,0x14(%rsp)
je     158b <kernel_dgemm_nt_2x2_vs_lib4+0x3eb>
mov    %r15d,%edi
mov    %r14d,%esi
call   1050 <_mm_unpacklo_pd@plt>
mov    %eax,%r12d
mov    %r14d,%edi
mov    %r15d,%esi
call   1070 <_mm_unpackhi_pd@plt>
mov    %eax,%r15d
mov    0x18(%rsp),%rbp
mov    0x10(%rsp),%r13d
mov    0xc(%rsp),%ebx
jmp    1609 <kernel_dgemm_nt_2x2_vs_lib4+0x469>
mov    %r15d,%edi
mov    %r14d,%esi
mov    $0x2,%edx
call   1080 <_mm_shuffle_pd@plt>
mov    %r14d,%edi
mov    %eax,%r14d
mov    %r15d,%esi
mov    $0x2,%edx
call   1080 <_mm_shuffle_pd@plt>
mov    0x40(%rsp),%rbp
mov    %eax,%r15d
mov    %rbp,%rdi
call   1090 <_mm_load_pd@plt>
mov    %eax,%r13d
add    $0x20,%rbp
mov    %rbp,%rdi
call   1090 <_mm_load_pd@plt>
mov    %eax,%r12d
mov    %r13d,%edi
mov    %r14d,%esi
cmp    $0x1,%ebx
jne    15c1 <kernel_dgemm_nt_2x2_vs_lib4+0x421>
call   1060 <_mm_add_pd@plt>
mov    %eax,%r14d
mov    %r12d,%edi
mov    %r15d,%esi
call   1060 <_mm_add_pd@plt>
jmp    15d4 <kernel_dgemm_nt_2x2_vs_lib4+0x434>
call   1040 <_mm_sub_pd@plt>
mov    %eax,%r12d
mov    %r15d,%edi
mov    %r14d,%esi
call   1040 <_mm_sub_pd@plt>
mov    %eax,%r15d
mov    0x18(%rsp),%rbp
mov    0x10(%rsp),%r13d
mov    0xc(%rsp),%ebx
mov    0x14(%rsp),%eax
test   %eax,%eax
jne    1609 <kernel_dgemm_nt_2x2_vs_lib4+0x469>
mov    %r12d,%edi
mov    %r15d,%esi
call   1050 <_mm_unpacklo_pd@plt>
mov    %eax,%r14d
mov    %r12d,%edi
mov    %r15d,%esi
call   1070 <_mm_unpackhi_pd@plt>
mov    %eax,%r15d
jmp    1621 <kernel_dgemm_nt_2x2_vs_lib4+0x481>
mov    %r15d,%edi
mov    %r14d,%esi
mov    $0x2,%edx
call   1080 <_mm_shuffle_pd@plt>
mov    %r14d,%edi
mov    %eax,%r14d
mov    %r15d,%esi
mov    $0x2,%edx
call   1080 <_mm_shuffle_pd@plt>
mov    %eax,%r15d
mov    0x18(%rsp),%rbp
mov    0x10(%rsp),%r13d
mov    0xc(%rsp),%ebx
jmp    1621 <kernel_dgemm_nt_2x2_vs_lib4+0x481>
call   1040 <_mm_sub_pd@plt>
mov    %eax,%r14d
mov    %r12d,%edi
mov    %r15d,%esi
call   1040 <_mm_sub_pd@plt>
mov    %eax,%r15d
mov    0x18(%rsp),%rbp
mov    0x10(%rsp),%r13d
mov    0xc(%rsp),%ebx
mov    0x14(%rsp),%eax
test   %eax,%eax
je     1621 <kernel_dgemm_nt_2x2_vs_lib4+0x481>
mov    %r14d,%edi
mov    %r15d,%esi
call   1050 <_mm_unpacklo_pd@plt>
mov    %eax,%r12d
mov    %r14d,%edi
mov    %r15d,%esi
call   1070 <_mm_unpackhi_pd@plt>
mov    %eax,%r15d
mov    %rbp,%rdi
mov    %r12d,%esi
cmp    $0x2,%r13d
jl     1654 <kernel_dgemm_nt_2x2_vs_lib4+0x4b4>
call   1030 <_mm_store_pd@plt>
cmp    $0x2,%ebx
jge    1637 <kernel_dgemm_nt_2x2_vs_lib4+0x497>
jmp    1686 <kernel_dgemm_nt_2x2_vs_lib4+0x4e6>
mov    %rbp,%rdi
mov    %r14d,%esi
cmp    $0x2,%ebx
jl     167b <kernel_dgemm_nt_2x2_vs_lib4+0x4db>
call   1030 <_mm_store_pd@plt>
cmp    $0x2,%r13d
jl     1686 <kernel_dgemm_nt_2x2_vs_lib4+0x4e6>
add    $0x20,%rbp
mov    %rbp,%rdi
mov    %r15d,%esi
add    $0x48,%rsp
pop    %rbx
pop    %r12
pop    %r13
pop    %r14
pop    %r15
pop    %rbp
jmp    1030 <_mm_store_pd@plt>
call   10c0 <_mm_store_sd@plt>
cmp    $0x2,%ebx
jl     1686 <kernel_dgemm_nt_2x2_vs_lib4+0x4e6>
add    $0x20,%rbp
mov    %rbp,%rdi
mov    %r15d,%esi
add    $0x48,%rsp
pop    %rbx
pop    %r12
pop    %r13
pop    %r14
pop    %r15
pop    %rbp
jmp    10c0 <_mm_store_sd@plt>
call   10c0 <_mm_store_sd@plt>
cmp    $0x2,%r13d
jge    165e <kernel_dgemm_nt_2x2_vs_lib4+0x4be>
add    $0x48,%rsp
pop    %rbx
pop    %r12
pop    %r13
pop    %r14
pop    %r15
pop    %rbp
ret

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

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