void kernel_dgemm_nt_4x4_lib4(int kmax, double *A, double *B, double *C,
                              double *D, int alg, int tc, int td) {
  if (kmax <= 0) {
    const int bs = 4;
    double c_00 = 0, c_01 = 0, c_02 = 0, c_03 = 0, c_10 = 0, c_11 = 0, c_12 = 0,
           c_13 = 0, c_20 = 0, c_21 = 0, c_22 = 0, c_23 = 0, c_30 = 0, c_31 = 0,
           c_32 = 0, c_33 = 0;
    if (alg == 0) {
      if (td == 0) {
        goto store_n;
      } else {
        goto store_t;
      }
    } else {
      if (tc == 0) {
        c_00 = C[0 + bs * 0];
        c_10 = C[1 + bs * 0];
        c_20 = C[2 + bs * 0];
        c_30 = C[3 + bs * 0];
        c_01 = C[0 + bs * 1];
        c_11 = C[1 + bs * 1];
        c_21 = C[2 + bs * 1];
        c_31 = C[3 + bs * 1];
        c_02 = C[0 + bs * 2];
        c_12 = C[1 + bs * 2];
        c_22 = C[2 + bs * 2];
        c_32 = C[3 + bs * 2];
        c_03 = C[0 + bs * 3];
        c_13 = C[1 + bs * 3];
        c_23 = C[2 + bs * 3];
        c_33 = C[3 + bs * 3];
      } else {
        c_00 = C[0 + bs * 0];
        c_01 = C[1 + bs * 0];
        c_02 = C[2 + bs * 0];
        c_03 = C[3 + bs * 0];
        c_10 = C[0 + bs * 1];
        c_11 = C[1 + bs * 1];
        c_12 = C[2 + bs * 1];
        c_13 = C[3 + bs * 1];
        c_20 = C[0 + bs * 2];
        c_21 = C[1 + bs * 2];
        c_22 = C[2 + bs * 2];
        c_23 = C[3 + bs * 2];
        c_30 = C[0 + bs * 3];
        c_31 = C[1 + bs * 3];
        c_32 = C[2 + bs * 3];
        c_33 = C[3 + bs * 3];
      }
      if (td == 0) {
        goto store_n;
      } else {
        goto store_t;
      }
    }
  store_n:
    D[0 + bs * 0] = c_00;
    D[1 + bs * 0] = c_10;
    D[2 + bs * 0] = c_20;
    D[3 + bs * 0] = c_30;
    D[0 + bs * 1] = c_01;
    D[1 + bs * 1] = c_11;
    D[2 + bs * 1] = c_21;
    D[3 + bs * 1] = c_31;
    D[0 + bs * 2] = c_02;
    D[1 + bs * 2] = c_12;
    D[2 + bs * 2] = c_22;
    D[3 + bs * 2] = c_32;
    D[0 + bs * 3] = c_03;
    D[1 + bs * 3] = c_13;
    D[2 + bs * 3] = c_23;
    D[3 + bs * 3] = c_33;
    return;
  store_t:
    D[0 + bs * 0] = c_00;
    D[1 + bs * 0] = c_01;
    D[2 + bs * 0] = c_02;
    D[3 + bs * 0] = c_03;
    D[0 + bs * 1] = c_10;
    D[1 + bs * 1] = c_11;
    D[2 + bs * 1] = c_12;
    D[3 + bs * 1] = c_13;
    D[0 + bs * 2] = c_20;
    D[1 + bs * 2] = c_21;
    D[2 + bs * 2] = c_22;
    D[3 + bs * 2] = c_23;
    D[0 + bs * 3] = c_30;
    D[1 + bs * 3] = c_31;
    D[2 + bs * 3] = c_32;
    D[3 + bs * 3] = c_33;
    return;
  }
  int k_iter = kmax / 4;
  int k_left = kmax % 4;
  __asm__ volatile("                                \n\t"
                   "                                \n\t"
                   "movq          %2, %%rax         \n\t"
                   "movq          %3, %%rbx         \n\t"
                   "                                \n\t"
                   "                                \n\t"
                   "movaps        0(%%rax), %%xmm0  \n\t"
                   "movaps       16(%%rax), %%xmm1  \n\t"
                   "movaps        0(%%rbx), %%xmm2  \n\t"
                   "                                \n\t"
                   "                                \n\t"
                   "xorpd     %%xmm3,  %%xmm3       \n\t"
                   "movaps    %%xmm3,  %%xmm4       \n\t"
                   "movaps    %%xmm3,  %%xmm5       \n\t"
                   "movaps    %%xmm3,  %%xmm6       \n\t"
                   "movaps    %%xmm3,  %%xmm7       \n\t"
                   "movaps    %%xmm3,  %%xmm8       \n\t"
                   "movaps    %%xmm3,  %%xmm9       \n\t"
                   "movaps    %%xmm3, %%xmm10       \n\t"
                   "movaps    %%xmm3, %%xmm11       \n\t"
                   "movaps    %%xmm3, %%xmm12       \n\t"
                   "movaps    %%xmm3, %%xmm13       \n\t"
                   "movaps    %%xmm3, %%xmm14       \n\t"
                   "movaps    %%xmm3, %%xmm15       \n\t"
                   "                                \n\t"
                   "                                \n\t"
                   "                                \n\t"
                   "movl      %0, %%esi             \n\t"
                   "testl  %%esi, %%esi             \n\t"
                   "je     .SCONSIDKLEFT            \n\t"
                   "                                \n\t"
                   "                                \n\t"
                   "                                \n\t"
                   ".SLOOPKITER:                    \n\t"
                   "                                \n\t"
                   "addpd   %%xmm6, %%xmm10         \n\t"
                   "movaps       16(%%rbx), %%xmm6  \n\t"
                   "addpd   %%xmm3, %%xmm14         \n\t"
                   "movaps  %%xmm2, %%xmm3          \n\t"
                   "pshufd   $0x4e, %%xmm2, %%xmm7  \n\t"
                   "mulpd   %%xmm0, %%xmm2          \n\t"
                   "mulpd   %%xmm1, %%xmm3          \n\t"
                   "                                \n\t"
                   "addpd   %%xmm4, %%xmm11         \n\t"
                   "addpd   %%xmm5, %%xmm15         \n\t"
                   "movaps  %%xmm7, %%xmm5          \n\t"
                   "mulpd   %%xmm0, %%xmm7          \n\t"
                   "mulpd   %%xmm1, %%xmm5          \n\t"
                   "                                \n\t"
                   "addpd   %%xmm2, %%xmm8          \n\t"
                   "movaps       32(%%rbx), %%xmm2  \n\t"
                   "addpd   %%xmm3, %%xmm12         \n\t"
                   "movaps  %%xmm6, %%xmm3          \n\t"
                   "pshufd   $0x4e, %%xmm6, %%xmm4  \n\t"
                   "mulpd   %%xmm0, %%xmm6          \n\t"
                   "mulpd   %%xmm1, %%xmm3          \n\t"
                   "                                \n\t"
                   "addpd   %%xmm7, %%xmm9          \n\t"
                   "addpd   %%xmm5, %%xmm13         \n\t"
                   "movaps  %%xmm4, %%xmm5          \n\t"
                   "mulpd   %%xmm0, %%xmm4          \n\t"
                   "movaps       32(%%rax), %%xmm0  \n\t"
                   "mulpd   %%xmm1, %%xmm5          \n\t"
                   "movaps       48(%%rax), %%xmm1  \n\t"
                   "                                \n\t"
                   "                                \n\t"
                   "addpd   %%xmm6, %%xmm10         \n\t"
                   "movaps       48(%%rbx), %%xmm6  \n\t"
                   "addpd   %%xmm3, %%xmm14         \n\t"
                   "movaps  %%xmm2, %%xmm3          \n\t"
                   "pshufd   $0x4e, %%xmm2, %%xmm7  \n\t"
                   "mulpd   %%xmm0, %%xmm2          \n\t"
                   "mulpd   %%xmm1, %%xmm3          \n\t"
                   "                                \n\t"
                   "addpd   %%xmm4, %%xmm11         \n\t"
                   "addpd   %%xmm5, %%xmm15         \n\t"
                   "movaps  %%xmm7, %%xmm5          \n\t"
                   "mulpd   %%xmm0, %%xmm7          \n\t"
                   "mulpd   %%xmm1, %%xmm5          \n\t"
                   "                                \n\t"
                   "addpd   %%xmm2, %%xmm8          \n\t"
                   "movaps       64(%%rbx), %%xmm2  \n\t"
                   "addpd   %%xmm3, %%xmm12         \n\t"
                   "movaps  %%xmm6, %%xmm3          \n\t"
                   "pshufd   $0x4e, %%xmm6, %%xmm4  \n\t"
                   "mulpd   %%xmm0, %%xmm6          \n\t"
                   "mulpd   %%xmm1, %%xmm3          \n\t"
                   "                                \n\t"
                   "addpd   %%xmm7, %%xmm9          \n\t"
                   "addpd   %%xmm5, %%xmm13         \n\t"
                   "movaps  %%xmm4, %%xmm5          \n\t"
                   "mulpd   %%xmm0, %%xmm4          \n\t"
                   "movaps       64(%%rax), %%xmm0  \n\t"
                   "mulpd   %%xmm1, %%xmm5          \n\t"
                   "movaps       80(%%rax), %%xmm1  \n\t"
                   "                                \n\t"
                   "                                \n\t"
                   "addpd   %%xmm6, %%xmm10         \n\t"
                   "movaps       80(%%rbx), %%xmm6  \n\t"
                   "addpd   %%xmm3, %%xmm14         \n\t"
                   "movaps  %%xmm2, %%xmm3          \n\t"
                   "pshufd   $0x4e, %%xmm2, %%xmm7  \n\t"
                   "mulpd   %%xmm0, %%xmm2          \n\t"
                   "mulpd   %%xmm1, %%xmm3          \n\t"
                   "                                \n\t"
                   "addpd   %%xmm4, %%xmm11         \n\t"
                   "addpd   %%xmm5, %%xmm15         \n\t"
                   "movaps  %%xmm7, %%xmm5          \n\t"
                   "mulpd   %%xmm0, %%xmm7          \n\t"
                   "mulpd   %%xmm1, %%xmm5          \n\t"
                   "                                \n\t"
                   "addpd   %%xmm2, %%xmm8          \n\t"
                   "movaps       96(%%rbx), %%xmm2  \n\t"
                   "addpd   %%xmm3, %%xmm12         \n\t"
                   "movaps  %%xmm6, %%xmm3          \n\t"
                   "pshufd   $0x4e, %%xmm6, %%xmm4  \n\t"
                   "mulpd   %%xmm0, %%xmm6          \n\t"
                   "mulpd   %%xmm1, %%xmm3          \n\t"
                   "                                \n\t"
                   "addpd   %%xmm7, %%xmm9          \n\t"
                   "addpd   %%xmm5, %%xmm13         \n\t"
                   "movaps  %%xmm4, %%xmm5          \n\t"
                   "mulpd   %%xmm0, %%xmm4          \n\t"
                   "movaps       96(%%rax), %%xmm0  \n\t"
                   "mulpd   %%xmm1, %%xmm5          \n\t"
                   "movaps      112(%%rax), %%xmm1  \n\t"
                   "                                \n\t"
                   "                                \n\t"
                   "addpd   %%xmm6, %%xmm10         \n\t"
                   "movaps      112(%%rbx), %%xmm6  \n\t"
                   "addpd   %%xmm3, %%xmm14         \n\t"
                   "movaps  %%xmm2, %%xmm3          \n\t"
                   "pshufd   $0x4e, %%xmm2, %%xmm7  \n\t"
                   "mulpd   %%xmm0, %%xmm2          \n\t"
                   "mulpd   %%xmm1, %%xmm3          \n\t"
                   "                                \n\t"
                   "addq      $128, %%rax           \n\t"
                   "                                \n\t"
                   "addpd   %%xmm4, %%xmm11         \n\t"
                   "addpd   %%xmm5, %%xmm15         \n\t"
                   "movaps  %%xmm7, %%xmm5          \n\t"
                   "mulpd   %%xmm0, %%xmm7          \n\t"
                   "mulpd   %%xmm1, %%xmm5          \n\t"
                   "                                \n\t"
                   "addq      $128, %%rbx           \n\t"
                   "                                \n\t"
                   "addpd   %%xmm2, %%xmm8          \n\t"
                   "movaps         (%%rbx), %%xmm2  \n\t"
                   "addpd   %%xmm3, %%xmm12         \n\t"
                   "movaps  %%xmm6, %%xmm3          \n\t"
                   "pshufd   $0x4e, %%xmm6, %%xmm4  \n\t"
                   "mulpd   %%xmm0, %%xmm6          \n\t"
                   "mulpd   %%xmm1, %%xmm3          \n\t"
                   "                                \n\t"
                   "                                \n\t"
                   "addpd   %%xmm7, %%xmm9          \n\t"
                   "decl    %%esi                   \n\t"
                   "addpd   %%xmm5, %%xmm13         \n\t"
                   "movaps  %%xmm4, %%xmm5          \n\t"
                   "mulpd   %%xmm0, %%xmm4          \n\t"
                   "movaps         (%%rax), %%xmm0  \n\t"
                   "mulpd   %%xmm1, %%xmm5          \n\t"
                   "movaps       16(%%rax), %%xmm1  \n\t"
                   "                                \n\t"
                   "                                \n\t"
                   "jne    .SLOOPKITER              \n\t"
                   "                                \n\t"
                   "                                \n\t"
                   "                                \n\t"
                   ".SCONSIDKLEFT:                  \n\t"
                   "                                \n\t"
                   "movl      %1, %%esi             \n\t"
                   "testl  %%esi, %%esi             \n\t"
                   "je     .SPOSTACCUM              \n\t"
                   "                                \n\t"
                   "                                \n\t"
                   "                                \n\t"
                   ".SLOOPKLEFT:                    \n\t"
                   "                                \n\t"
                   "addpd   %%xmm6, %%xmm10         \n\t"
                   "movaps       16(%%rbx), %%xmm6  \n\t"
                   "addpd   %%xmm3, %%xmm14         \n\t"
                   "movaps  %%xmm2, %%xmm3          \n\t"
                   "pshufd   $0x4e, %%xmm2, %%xmm7  \n\t"
                   "mulpd   %%xmm0, %%xmm2          \n\t"
                   "mulpd   %%xmm1, %%xmm3          \n\t"
                   "                                \n\t"
                   "addpd   %%xmm4, %%xmm11         \n\t"
                   "addpd   %%xmm5, %%xmm15         \n\t"
                   "movaps  %%xmm7, %%xmm5          \n\t"
                   "mulpd   %%xmm0, %%xmm7          \n\t"
                   "mulpd   %%xmm1, %%xmm5          \n\t"
                   "                                \n\t"
                   "addpd   %%xmm2, %%xmm8          \n\t"
                   "movaps       32(%%rbx), %%xmm2  \n\t"
                   "addpd   %%xmm3, %%xmm12         \n\t"
                   "movaps  %%xmm6, %%xmm3          \n\t"
                   "pshufd   $0x4e, %%xmm6, %%xmm4  \n\t"
                   "mulpd   %%xmm0, %%xmm6          \n\t"
                   "mulpd   %%xmm1, %%xmm3          \n\t"
                   "                                \n\t"
                   "addpd   %%xmm7, %%xmm9          \n\t"
                   "addpd   %%xmm5, %%xmm13         \n\t"
                   "movaps  %%xmm4, %%xmm5          \n\t"
                   "mulpd   %%xmm0, %%xmm4          \n\t"
                   "movaps       32(%%rax), %%xmm0  \n\t"
                   "mulpd   %%xmm1, %%xmm5          \n\t"
                   "movaps       48(%%rax), %%xmm1  \n\t"
                   "                                \n\t"
                   "addq          $32, %%rax        \n\t"
                   "addq          $32, %%rbx        \n\t"
                   "                                \n\t"
                   "                                \n\t"
                   "decl    %%esi                   \n\t"
                   "jne    .SLOOPKLEFT              \n\t"
                   "                                \n\t"
                   "                                \n\t"
                   "                                \n\t"
                   ".SPOSTACCUM:                    \n\t"
                   "                                \n\t"
                   "addpd   %%xmm6, %%xmm10         \n\t"
                   "addpd   %%xmm3, %%xmm14         \n\t"
                   "addpd   %%xmm4, %%xmm11         \n\t"
                   "addpd   %%xmm5, %%xmm15         \n\t"
                   "                                \n\t"
                   "                                \n\t"
                   "                                \n\t"
                   "                                \n\t"
                   "                                \n\t"
                   "movl   %5, %%ecx                \n\t"
                   "testl  %%ecx, %%ecx             \n\t"
                   "je     .S0                      \n\t"
                   "                                \n\t"
                   "movq   %4, %%rax                \n\t"
                   "                                \n\t"
                   "movl   %7, %%edx                \n\t"
                   "testl  %%edx, %%edx             \n\t"
                   "je     .S_N                     \n\t"
                   "                                \n\t"
                   "                                \n\t"
                   "movaps   %%xmm9,  %%xmm0        \n\t"
                   "unpckhpd %%xmm8,  %%xmm0        \n\t"
                   "unpcklpd %%xmm9,  %%xmm8        \n\t"
                   "movaps   %%xmm8,  %%xmm9        \n\t"
                   "movaps   %%xmm0,  %%xmm8        \n\t"
                   "                                \n\t"
                   "movaps   %%xmm11, %%xmm0        \n\t"
                   "unpckhpd %%xmm10, %%xmm0        \n\t"
                   "unpcklpd %%xmm11, %%xmm10       \n\t"
                   "movaps   %%xmm10, %%xmm11       \n\t"
                   "movaps   %%xmm0,  %%xmm10       \n\t"
                   "                                \n\t"
                   "movaps   %%xmm13, %%xmm0        \n\t"
                   "unpckhpd %%xmm12, %%xmm0        \n\t"
                   "unpcklpd %%xmm13, %%xmm12       \n\t"
                   "movaps   %%xmm12, %%xmm13       \n\t"
                   "movaps   %%xmm0,  %%xmm12       \n\t"
                   "                                \n\t"
                   "movaps   %%xmm15, %%xmm0        \n\t"
                   "unpckhpd %%xmm14, %%xmm0        \n\t"
                   "unpcklpd %%xmm15, %%xmm14       \n\t"
                   "movaps   %%xmm14, %%xmm15       \n\t"
                   "movaps   %%xmm0,  %%xmm14       \n\t"
                   "                                \n\t"
                   "movaps  (%%rax),   %%xmm1       \n\t"
                   "movaps  16(%%rax), %%xmm3       \n\t"
                   "movaps  32(%%rax), %%xmm0       \n\t"
                   "movaps  48(%%rax), %%xmm2       \n\t"
                   "movaps  64(%%rax), %%xmm5       \n\t"
                   "movaps  80(%%rax), %%xmm7       \n\t"
                   "movaps  96(%%rax), %%xmm4       \n\t"
                   "movaps 112(%%rax), %%xmm6       \n\t"
                   "                                \n\t"
                   "cmpl	$1, %%ecx                \n\t"
                   "                                \n\t"
                   "je     .S1_T                    \n\t"
                   "                                \n\t"
                   "subpd  %%xmm8,  %%xmm0          \n\t"
                   "subpd  %%xmm9,  %%xmm1          \n\t"
                   "subpd  %%xmm10, %%xmm2          \n\t"
                   "subpd  %%xmm11, %%xmm3          \n\t"
                   "subpd  %%xmm12, %%xmm4          \n\t"
                   "subpd  %%xmm13, %%xmm5          \n\t"
                   "subpd  %%xmm14, %%xmm6          \n\t"
                   "subpd  %%xmm15, %%xmm7          \n\t"
                   "                                \n\t"
                   "jmp    .S1_T_E                  \n\t"
                   "                                \n\t"
                   ".S1_T:                          \n\t"
                   "                                \n\t"
                   "addpd  %%xmm8,  %%xmm0          \n\t"
                   "addpd  %%xmm9,  %%xmm1          \n\t"
                   "addpd  %%xmm10, %%xmm2          \n\t"
                   "addpd  %%xmm11, %%xmm3          \n\t"
                   "addpd  %%xmm12, %%xmm4          \n\t"
                   "addpd  %%xmm13, %%xmm5          \n\t"
                   "addpd  %%xmm14, %%xmm6          \n\t"
                   "addpd  %%xmm15, %%xmm7          \n\t"
                   "                                \n\t"
                   ".S1_T_E:                        \n\t"
                   "                                \n\t"
                   "movl   %8, %%edx                \n\t"
                   "testl  %%edx, %%edx             \n\t"
                   "jne    .STORE_T                 \n\t"
                   "                                \n\t"
                   "movaps   %%xmm1,  %%xmm8        \n\t"
                   "unpcklpd %%xmm0,  %%xmm1        \n\t"
                   "unpckhpd %%xmm0,  %%xmm8        \n\t"
                   "movaps   %%xmm8,  %%xmm0        \n\t"
                   "                                \n\t"
                   "movaps   %%xmm3,  %%xmm9        \n\t"
                   "unpcklpd %%xmm2,  %%xmm3        \n\t"
                   "unpckhpd %%xmm2,  %%xmm9        \n\t"
                   "movaps   %%xmm9,  %%xmm2        \n\t"
                   "                                \n\t"
                   "movaps   %%xmm5,  %%xmm8        \n\t"
                   "unpcklpd %%xmm4,  %%xmm5        \n\t"
                   "unpckhpd %%xmm4,  %%xmm8        \n\t"
                   "movaps   %%xmm8,  %%xmm4        \n\t"
                   "                                \n\t"
                   "movaps   %%xmm7,  %%xmm9        \n\t"
                   "unpcklpd %%xmm6,  %%xmm7        \n\t"
                   "unpckhpd %%xmm6,  %%xmm9        \n\t"
                   "movaps   %%xmm9,  %%xmm6        \n\t"
                   "                                \n\t"
                   "jmp    .STORE_N                 \n\t"
                   "                                \n\t"
                   "                                \n\t"
                   ".S_N:                           \n\t"
                   "                                \n\t"
                   "movaps   %%xmm8,  %%xmm0        \n\t"
                   "movsd    %%xmm9,  %%xmm8        \n\t"
                   "movsd    %%xmm0,  %%xmm9        \n\t"
                   "                                \n\t"
                   "movaps  %%xmm10,  %%xmm0        \n\t"
                   "movsd   %%xmm11, %%xmm10        \n\t"
                   "movsd    %%xmm0, %%xmm11        \n\t"
                   "                                \n\t"
                   "movaps  %%xmm12,  %%xmm0        \n\t"
                   "movsd   %%xmm13, %%xmm12        \n\t"
                   "movsd    %%xmm0, %%xmm13        \n\t"
                   "                                \n\t"
                   "movaps  %%xmm14,  %%xmm0        \n\t"
                   "movsd   %%xmm15, %%xmm14        \n\t"
                   "movsd    %%xmm0, %%xmm15        \n\t"
                   "                                \n\t"
                   "movaps  (%%rax),   %%xmm1       \n\t"
                   "movaps  16(%%rax), %%xmm5       \n\t"
                   "movaps  32(%%rax), %%xmm0       \n\t"
                   "movaps  48(%%rax), %%xmm4       \n\t"
                   "movaps  64(%%rax), %%xmm3       \n\t"
                   "movaps  80(%%rax), %%xmm7       \n\t"
                   "movaps  96(%%rax), %%xmm2       \n\t"
                   "movaps 112(%%rax), %%xmm6       \n\t"
                   "                                \n\t"
                   "cmpl	$1, %%ecx                \n\t"
                   "                                \n\t"
                   "je     .S1_N                    \n\t"
                   "                                \n\t"
                   "subpd  %%xmm8,  %%xmm0          \n\t"
                   "subpd  %%xmm9,  %%xmm1          \n\t"
                   "subpd  %%xmm10, %%xmm2          \n\t"
                   "subpd  %%xmm11, %%xmm3          \n\t"
                   "subpd  %%xmm12, %%xmm4          \n\t"
                   "subpd  %%xmm13, %%xmm5          \n\t"
                   "subpd  %%xmm14, %%xmm6          \n\t"
                   "subpd  %%xmm15, %%xmm7          \n\t"
                   "                                \n\t"
                   "jmp    .S1_N_E                  \n\t"
                   "                                \n\t"
                   ".S1_N:                          \n\t"
                   "                                \n\t"
                   "addpd  %%xmm8,  %%xmm0          \n\t"
                   "addpd  %%xmm9,  %%xmm1          \n\t"
                   "addpd  %%xmm10, %%xmm2          \n\t"
                   "addpd  %%xmm11, %%xmm3          \n\t"
                   "addpd  %%xmm12, %%xmm4          \n\t"
                   "addpd  %%xmm13, %%xmm5          \n\t"
                   "addpd  %%xmm14, %%xmm6          \n\t"
                   "addpd  %%xmm15, %%xmm7          \n\t"
                   "                                \n\t"
                   ".S1_N_E:                        \n\t"
                   "                                \n\t"
                   "movl   %8, %%edx                \n\t"
                   "testl  %%edx, %%edx             \n\t"
                   "je     .S_N_N                   \n\t"
                   "                                \n\t"
                   "movaps   %%xmm1,  %%xmm8        \n\t"
                   "unpcklpd %%xmm0,  %%xmm1        \n\t"
                   "unpckhpd %%xmm0,  %%xmm8        \n\t"
                   "movaps   %%xmm8,  %%xmm0        \n\t"
                   "                                \n\t"
                   "movaps   %%xmm3,  %%xmm9        \n\t"
                   "unpcklpd %%xmm2,  %%xmm3        \n\t"
                   "unpckhpd %%xmm2,  %%xmm9        \n\t"
                   "movaps   %%xmm9,  %%xmm2        \n\t"
                   "                                \n\t"
                   "movaps   %%xmm5,  %%xmm8        \n\t"
                   "unpcklpd %%xmm4,  %%xmm5        \n\t"
                   "unpckhpd %%xmm4,  %%xmm8        \n\t"
                   "movaps   %%xmm8,  %%xmm4        \n\t"
                   "                                \n\t"
                   "movaps   %%xmm7,  %%xmm9        \n\t"
                   "unpcklpd %%xmm6,  %%xmm7        \n\t"
                   "unpckhpd %%xmm6,  %%xmm9        \n\t"
                   "movaps   %%xmm9,  %%xmm6        \n\t"
                   "                                \n\t"
                   "jmp    .STORE_T                 \n\t"
                   "                                \n\t"
                   ".S_N_N:                         \n\t"
                   "                                \n\t"
                   "jmp    .STORE_N                 \n\t"
                   "                                \n\t"
                   "                                \n\t"
                   "                                \n\t"
                   ".S0:                            \n\t"
                   "                                \n\t"
                   "movl   %8, %%ecx                \n\t"
                   "testl  %%ecx, %%ecx             \n\t"
                   "je     .S0_N                    \n\t"
                   "                                \n\t"
                   "                                \n\t"
                   "movaps   %%xmm8,  %%xmm1        \n\t"
                   "movaps   %%xmm9,  %%xmm0        \n\t"
                   "unpckhpd %%xmm8,  %%xmm0        \n\t"
                   "unpcklpd %%xmm9,  %%xmm1        \n\t"
                   "                                \n\t"
                   "movaps   %%xmm10,  %%xmm3       \n\t"
                   "movaps   %%xmm11,  %%xmm2       \n\t"
                   "unpckhpd %%xmm10,  %%xmm2       \n\t"
                   "unpcklpd %%xmm11,  %%xmm3       \n\t"
                   "                                \n\t"
                   "movaps   %%xmm12,  %%xmm5       \n\t"
                   "movaps   %%xmm13,  %%xmm4       \n\t"
                   "unpckhpd %%xmm12,  %%xmm4       \n\t"
                   "unpcklpd %%xmm13,  %%xmm5       \n\t"
                   "                                \n\t"
                   "movaps   %%xmm14,  %%xmm7       \n\t"
                   "movaps   %%xmm15,  %%xmm6       \n\t"
                   "unpckhpd %%xmm14,  %%xmm6       \n\t"
                   "unpcklpd %%xmm15,  %%xmm7       \n\t"
                   "                                \n\t"
                   "jmp    .STORE_T                 \n\t"
                   "                                \n\t"
                   "                                \n\t"
                   ".S0_N:                          \n\t"
                   "                                \n\t"
                   "movaps   %%xmm8,  %%xmm0        \n\t"
                   "movaps   %%xmm9,  %%xmm1        \n\t"
                   "movsd    %%xmm9,  %%xmm0        \n\t"
                   "movsd    %%xmm8,  %%xmm1        \n\t"
                   "                                \n\t"
                   "movaps  %%xmm10,  %%xmm2        \n\t"
                   "movaps  %%xmm11,  %%xmm3        \n\t"
                   "movsd   %%xmm11,  %%xmm2        \n\t"
                   "movsd   %%xmm10,  %%xmm3        \n\t"
                   "                                \n\t"
                   "movaps  %%xmm12,  %%xmm4        \n\t"
                   "movaps  %%xmm13,  %%xmm5        \n\t"
                   "movsd   %%xmm13,  %%xmm4        \n\t"
                   "movsd   %%xmm12,  %%xmm5        \n\t"
                   "                                \n\t"
                   "movaps  %%xmm14,  %%xmm6        \n\t"
                   "movaps  %%xmm15,  %%xmm7        \n\t"
                   "movsd   %%xmm15,  %%xmm6        \n\t"
                   "movsd   %%xmm14,  %%xmm7        \n\t"
                   "                                \n\t"
                   "jmp    .STORE_N                 \n\t"
                   "                                \n\t"
                   "                                \n\t"
                   "                                \n\t"
                   "                                \n\t"
                   "                                \n\t"
                   "                                \n\t"
                   ".STORE_N:                       \n\t"
                   "                                \n\t"
                   "movq   %6, %%rbx                \n\t"
                   "                                \n\t"
                   "movaps  %%xmm1, (%%rbx)         \n\t"
                   "movaps  %%xmm5, 16(%%rbx)       \n\t"
                   "movaps  %%xmm0, 32(%%rbx)       \n\t"
                   "movaps  %%xmm4, 48(%%rbx)       \n\t"
                   "movaps  %%xmm3, 64(%%rbx)       \n\t"
                   "movaps  %%xmm7, 80(%%rbx)       \n\t"
                   "movaps  %%xmm2, 96(%%rbx)       \n\t"
                   "movaps  %%xmm6, 112(%%rbx)      \n\t"
                   "                                \n\t"
                   "jmp    .SDONE                   \n\t"
                   "                                \n\t"
                   "                                \n\t"
                   ".STORE_T:                       \n\t"
                   "                                \n\t"
                   "movq   %6, %%rbx                \n\t"
                   "                                \n\t"
                   "movaps  %%xmm1, (%%rbx)         \n\t"
                   "movaps  %%xmm3, 16(%%rbx)       \n\t"
                   "movaps  %%xmm0, 32(%%rbx)       \n\t"
                   "movaps  %%xmm2, 48(%%rbx)       \n\t"
                   "movaps  %%xmm5, 64(%%rbx)       \n\t"
                   "movaps  %%xmm7, 80(%%rbx)       \n\t"
                   "movaps  %%xmm4, 96(%%rbx)       \n\t"
                   "movaps  %%xmm6, 112(%%rbx)      \n\t"
                   "                                \n\t"
                   "                                \n\t"
                   ".SDONE:                         \n\t"
                   "                                \n\t"
                   :
                   : "m"(k_iter), "m"(k_left), "m"(A), "m"(B), "m"(C), "m"(alg),
                     "m"(D), "m"(tc), "m"(td)
                   : "rax", "rbx", "rcx", "rdx", "rsi", "xmm0", "xmm1", "xmm2",
                     "xmm3", "xmm4", "xmm5", "xmm6", "xmm7", "xmm8", "xmm9",
                     "xmm10", "xmm11", "xmm12", "xmm13", "xmm14", "xmm15",
                     "memory");
}


x86 assembly (clang, -O0):
<kernel_dgemm_nt_4x4_lib4>:
push   %rbp
mov    %rsp,%rbp
push   %rbx
sub    $0x38,%rsp
mov    0x18(%rbp),%eax
mov    0x10(%rbp),%eax
mov    %edi,-0xc(%rbp)
mov    %rsi,-0x18(%rbp)
mov    %rdx,-0x20(%rbp)
mov    %rcx,-0x28(%rbp)
mov    %r8,-0x30(%rbp)
mov    %r9d,-0x34(%rbp)
cmpl   $0x0,-0xc(%rbp)
jg     15e7 <kernel_dgemm_nt_4x4_lib4+0x4e7>
movl   $0x4,-0x38(%rbp)
xorps  %xmm0,%xmm0
movsd  %xmm0,-0x40(%rbp)
xorps  %xmm0,%xmm0
movsd  %xmm0,-0x48(%rbp)
xorps  %xmm0,%xmm0
movsd  %xmm0,-0x50(%rbp)
xorps  %xmm0,%xmm0
movsd  %xmm0,-0x58(%rbp)
xorps  %xmm0,%xmm0
movsd  %xmm0,-0x60(%rbp)
xorps  %xmm0,%xmm0
movsd  %xmm0,-0x68(%rbp)
xorps  %xmm0,%xmm0
movsd  %xmm0,-0x70(%rbp)
xorps  %xmm0,%xmm0
movsd  %xmm0,-0x78(%rbp)
xorps  %xmm0,%xmm0
movsd  %xmm0,-0x80(%rbp)
xorps  %xmm0,%xmm0
movsd  %xmm0,-0x88(%rbp)
ff
xorps  %xmm0,%xmm0
movsd  %xmm0,-0x90(%rbp)
ff
xorps  %xmm0,%xmm0
movsd  %xmm0,-0x98(%rbp)
ff
xorps  %xmm0,%xmm0
movsd  %xmm0,-0xa0(%rbp)
ff
xorps  %xmm0,%xmm0
movsd  %xmm0,-0xa8(%rbp)
ff
xorps  %xmm0,%xmm0
movsd  %xmm0,-0xb0(%rbp)
ff
xorps  %xmm0,%xmm0
movsd  %xmm0,-0xb8(%rbp)
ff
cmpl   $0x0,-0x34(%rbp)
jne    11ea <kernel_dgemm_nt_4x4_lib4+0xea>
cmpl   $0x0,0x18(%rbp)
jne    11e5 <kernel_dgemm_nt_4x4_lib4+0xe5>
jmp    13f5 <kernel_dgemm_nt_4x4_lib4+0x2f5>
jmp    14ee <kernel_dgemm_nt_4x4_lib4+0x3ee>
cmpl   $0x0,0x10(%rbp)
jne    12ed <kernel_dgemm_nt_4x4_lib4+0x1ed>
mov    -0x28(%rbp),%rax
movsd  (%rax),%xmm0
movsd  %xmm0,-0x40(%rbp)
mov    -0x28(%rbp),%rax
movsd  0x8(%rax),%xmm0
movsd  %xmm0,-0x60(%rbp)
mov    -0x28(%rbp),%rax
movsd  0x10(%rax),%xmm0
movsd  %xmm0,-0x80(%rbp)
mov    -0x28(%rbp),%rax
movsd  0x18(%rax),%xmm0
movsd  %xmm0,-0xa0(%rbp)
ff
mov    -0x28(%rbp),%rax
movsd  0x20(%rax),%xmm0
movsd  %xmm0,-0x48(%rbp)
mov    -0x28(%rbp),%rax
movsd  0x28(%rax),%xmm0
movsd  %xmm0,-0x68(%rbp)
mov    -0x28(%rbp),%rax
movsd  0x30(%rax),%xmm0
movsd  %xmm0,-0x88(%rbp)
ff
mov    -0x28(%rbp),%rax
movsd  0x38(%rax),%xmm0
movsd  %xmm0,-0xa8(%rbp)
ff
mov    -0x28(%rbp),%rax
movsd  0x40(%rax),%xmm0
movsd  %xmm0,-0x50(%rbp)
mov    -0x28(%rbp),%rax
movsd  0x48(%rax),%xmm0
movsd  %xmm0,-0x70(%rbp)
mov    -0x28(%rbp),%rax
movsd  0x50(%rax),%xmm0
movsd  %xmm0,-0x90(%rbp)
ff
mov    -0x28(%rbp),%rax
movsd  0x58(%rax),%xmm0
movsd  %xmm0,-0xb0(%rbp)
ff
mov    -0x28(%rbp),%rax
movsd  0x60(%rax),%xmm0
movsd  %xmm0,-0x58(%rbp)
mov    -0x28(%rbp),%rax
movsd  0x68(%rax),%xmm0
movsd  %xmm0,-0x78(%rbp)
mov    -0x28(%rbp),%rax
movsd  0x70(%rax),%xmm0
movsd  %xmm0,-0x98(%rbp)
ff
mov    -0x28(%rbp),%rax
movsd  0x78(%rax),%xmm0
movsd  %xmm0,-0xb8(%rbp)
ff
jmp    13e1 <kernel_dgemm_nt_4x4_lib4+0x2e1>
mov    -0x28(%rbp),%rax
movsd  (%rax),%xmm0
movsd  %xmm0,-0x40(%rbp)
mov    -0x28(%rbp),%rax
movsd  0x8(%rax),%xmm0
movsd  %xmm0,-0x48(%rbp)
mov    -0x28(%rbp),%rax
movsd  0x10(%rax),%xmm0
movsd  %xmm0,-0x50(%rbp)
mov    -0x28(%rbp),%rax
movsd  0x18(%rax),%xmm0
movsd  %xmm0,-0x58(%rbp)
mov    -0x28(%rbp),%rax
movsd  0x20(%rax),%xmm0
movsd  %xmm0,-0x60(%rbp)
mov    -0x28(%rbp),%rax
movsd  0x28(%rax),%xmm0
movsd  %xmm0,-0x68(%rbp)
mov    -0x28(%rbp),%rax
movsd  0x30(%rax),%xmm0
movsd  %xmm0,-0x70(%rbp)
mov    -0x28(%rbp),%rax
movsd  0x38(%rax),%xmm0
movsd  %xmm0,-0x78(%rbp)
mov    -0x28(%rbp),%rax
movsd  0x40(%rax),%xmm0
movsd  %xmm0,-0x80(%rbp)
mov    -0x28(%rbp),%rax
movsd  0x48(%rax),%xmm0
movsd  %xmm0,-0x88(%rbp)
ff
mov    -0x28(%rbp),%rax
movsd  0x50(%rax),%xmm0
movsd  %xmm0,-0x90(%rbp)
ff
mov    -0x28(%rbp),%rax
movsd  0x58(%rax),%xmm0
movsd  %xmm0,-0x98(%rbp)
ff
mov    -0x28(%rbp),%rax
movsd  0x60(%rax),%xmm0
movsd  %xmm0,-0xa0(%rbp)
ff
mov    -0x28(%rbp),%rax
movsd  0x68(%rax),%xmm0
movsd  %xmm0,-0xa8(%rbp)
ff
mov    -0x28(%rbp),%rax
movsd  0x70(%rax),%xmm0
movsd  %xmm0,-0xb0(%rbp)
ff
mov    -0x28(%rbp),%rax
movsd  0x78(%rax),%xmm0
movsd  %xmm0,-0xb8(%rbp)
ff
cmpl   $0x0,0x18(%rbp)
jne    13f0 <kernel_dgemm_nt_4x4_lib4+0x2f0>
jmp    13f5 <kernel_dgemm_nt_4x4_lib4+0x2f5>
jmp    14ee <kernel_dgemm_nt_4x4_lib4+0x3ee>
movsd  -0x40(%rbp),%xmm0
mov    -0x30(%rbp),%rax
movsd  %xmm0,(%rax)
movsd  -0x60(%rbp),%xmm0
mov    -0x30(%rbp),%rax
movsd  %xmm0,0x8(%rax)
movsd  -0x80(%rbp),%xmm0
mov    -0x30(%rbp),%rax
movsd  %xmm0,0x10(%rax)
movsd  -0xa0(%rbp),%xmm0
ff
mov    -0x30(%rbp),%rax
movsd  %xmm0,0x18(%rax)
movsd  -0x48(%rbp),%xmm0
mov    -0x30(%rbp),%rax
movsd  %xmm0,0x20(%rax)
movsd  -0x68(%rbp),%xmm0
mov    -0x30(%rbp),%rax
movsd  %xmm0,0x28(%rax)
movsd  -0x88(%rbp),%xmm0
ff
mov    -0x30(%rbp),%rax
movsd  %xmm0,0x30(%rax)
movsd  -0xa8(%rbp),%xmm0
ff
mov    -0x30(%rbp),%rax
movsd  %xmm0,0x38(%rax)
movsd  -0x50(%rbp),%xmm0
mov    -0x30(%rbp),%rax
movsd  %xmm0,0x40(%rax)
movsd  -0x70(%rbp),%xmm0
mov    -0x30(%rbp),%rax
movsd  %xmm0,0x48(%rax)
movsd  -0x90(%rbp),%xmm0
ff
mov    -0x30(%rbp),%rax
movsd  %xmm0,0x50(%rax)
movsd  -0xb0(%rbp),%xmm0
ff
mov    -0x30(%rbp),%rax
movsd  %xmm0,0x58(%rax)
movsd  -0x58(%rbp),%xmm0
mov    -0x30(%rbp),%rax
movsd  %xmm0,0x60(%rax)
movsd  -0x78(%rbp),%xmm0
mov    -0x30(%rbp),%rax
movsd  %xmm0,0x68(%rax)
movsd  -0x98(%rbp),%xmm0
ff
mov    -0x30(%rbp),%rax
movsd  %xmm0,0x70(%rax)
movsd  -0xb8(%rbp),%xmm0
ff
mov    -0x30(%rbp),%rax
movsd  %xmm0,0x78(%rax)
jmp    1c05 <.SDONE>
movsd  -0x40(%rbp),%xmm0
mov    -0x30(%rbp),%rax
movsd  %xmm0,(%rax)
movsd  -0x48(%rbp),%xmm0
mov    -0x30(%rbp),%rax
movsd  %xmm0,0x8(%rax)
movsd  -0x50(%rbp),%xmm0
mov    -0x30(%rbp),%rax
movsd  %xmm0,0x10(%rax)
movsd  -0x58(%rbp),%xmm0
mov    -0x30(%rbp),%rax
movsd  %xmm0,0x18(%rax)
movsd  -0x60(%rbp),%xmm0
mov    -0x30(%rbp),%rax
movsd  %xmm0,0x20(%rax)
movsd  -0x68(%rbp),%xmm0
mov    -0x30(%rbp),%rax
movsd  %xmm0,0x28(%rax)
movsd  -0x70(%rbp),%xmm0
mov    -0x30(%rbp),%rax
movsd  %xmm0,0x30(%rax)
movsd  -0x78(%rbp),%xmm0
mov    -0x30(%rbp),%rax
movsd  %xmm0,0x38(%rax)
movsd  -0x80(%rbp),%xmm0
mov    -0x30(%rbp),%rax
movsd  %xmm0,0x40(%rax)
movsd  -0x88(%rbp),%xmm0
ff
mov    -0x30(%rbp),%rax
movsd  %xmm0,0x48(%rax)
movsd  -0x90(%rbp),%xmm0
ff
mov    -0x30(%rbp),%rax
movsd  %xmm0,0x50(%rax)
movsd  -0x98(%rbp),%xmm0
ff
mov    -0x30(%rbp),%rax
movsd  %xmm0,0x58(%rax)
movsd  -0xa0(%rbp),%xmm0
ff
mov    -0x30(%rbp),%rax
movsd  %xmm0,0x60(%rax)
movsd  -0xa8(%rbp),%xmm0
ff
mov    -0x30(%rbp),%rax
movsd  %xmm0,0x68(%rax)
movsd  -0xb0(%rbp),%xmm0
ff
mov    -0x30(%rbp),%rax
movsd  %xmm0,0x70(%rax)
movsd  -0xb8(%rbp),%xmm0
ff
mov    -0x30(%rbp),%rax
movsd  %xmm0,0x78(%rax)
jmp    1c05 <.SDONE>
mov    -0xc(%rbp),%eax
mov    $0x4,%ecx
cltd
idiv   %ecx
mov    %eax,-0xbc(%rbp)
mov    -0xc(%rbp),%eax
mov    $0x4,%ecx
cltd
idiv   %ecx
mov    %edx,-0xc0(%rbp)
mov    -0x18(%rbp),%rax
mov    -0x20(%rbp),%rbx
movaps (%rax),%xmm0
movaps 0x10(%rax),%xmm1
movaps (%rbx),%xmm2
xorpd  %xmm3,%xmm3
movaps %xmm3,%xmm4
movaps %xmm3,%xmm5
movaps %xmm3,%xmm6
movaps %xmm3,%xmm7
movaps %xmm3,%xmm8
movaps %xmm3,%xmm9
movaps %xmm3,%xmm10
movaps %xmm3,%xmm11
movaps %xmm3,%xmm12
movaps %xmm3,%xmm13
movaps %xmm3,%xmm14
movaps %xmm3,%xmm15
mov    -0xbc(%rbp),%esi
test   %esi,%esi
je     1824 <.SCONSIDKLEFT>

x86 assembly (clang, -O2):
<kernel_dgemm_nt_4x4_lib4>:
push   %rbp
push   %r15
push   %r14
push   %r13
push   %r12
push   %rbx
mov    0x40(%rsp),%r10d
mov    0x38(%rsp),%ebp
mov    %rsi,-0x8(%rsp)
mov    %rdx,-0x10(%rsp)
mov    %rcx,-0x18(%rsp)
mov    %r8,-0x20(%rsp)
mov    %r9d,-0x2c(%rsp)
test   %edi,%edi
jle    1724 <.SDONE+0x5>
mov    %edi,%eax
shr    $0x2,%eax
mov    %eax,-0x30(%rsp)
and    $0x3,%edi
mov    %edi,-0x34(%rsp)
mov    -0x8(%rsp),%rax
mov    -0x10(%rsp),%rbx
movaps (%rax),%xmm0
movaps 0x10(%rax),%xmm1
movaps (%rbx),%xmm2
xorpd  %xmm3,%xmm3
movaps %xmm3,%xmm4
movaps %xmm3,%xmm5
movaps %xmm3,%xmm6
movaps %xmm3,%xmm7
movaps %xmm3,%xmm8
movaps %xmm3,%xmm9
movaps %xmm3,%xmm10
movaps %xmm3,%xmm11
movaps %xmm3,%xmm12
movaps %xmm3,%xmm13
movaps %xmm3,%xmm14
movaps %xmm3,%xmm15
mov    -0x30(%rsp),%esi
test   %esi,%esi
je     135f <.SCONSIDKLEFT>

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

LLVM IR (-O2):
define void @kernel_dgemm_nt_4x4_lib4(i32 %0, double* %1, double* %2, double* %3, double* %4, i32 %5, i32 %6, i32 %7) {
%9 = alloca double*
%10 = alloca double*
%11 = alloca double*
%12 = alloca double*
%13 = alloca i32
%14 = alloca i32
%15 = alloca i32
%16 = alloca i32
%17 = alloca i32
store double* %1, double** %9
store double* %2, double** %10
store double* %3, double** %11
store double* %4, double** %12
store i32 %5, i32* %13
store i32 %6, i32* %14
store i32 %7, i32* %15
%18 = icmp slt i32 %0, 1
br i1 %18, label %19, label %133
19: ; preds = %8
%20 = icmp eq i32 %5, 0
br i1 %20, label %21, label %23
21: ; preds = %19
%22 = icmp eq i32 %7, 0
br i1 %22, label %69, label %101
23: ; preds = %19
%24 = icmp eq i32 %6, 0
%25 = getelementptr inbounds double, double* %3, i64 1
%26 = getelementptr inbounds double, double* %3, i64 2
%27 = getelementptr inbounds double, double* %3, i64 3
%28 = getelementptr inbounds double, double* %3, i64 4
%29 = getelementptr inbounds double, double* %3, i64 6
%30 = getelementptr inbounds double, double* %3, i64 7
%31 = getelementptr inbounds double, double* %3, i64 8
%32 = getelementptr inbounds double, double* %3, i64 9
%33 = getelementptr inbounds double, double* %3, i64 11
%34 = getelementptr inbounds double, double* %3, i64 12
%35 = getelementptr inbounds double, double* %3, i64 13
%36 = getelementptr inbounds double, double* %3, i64 14
%37 = select i1 %24, double* %28, double* %25
%38 = select i1 %24, double* %31, double* %26
%39 = select i1 %24, double* %34, double* %27
%40 = select i1 %24, double* %25, double* %28
%41 = select i1 %24, double* %32, double* %29
%42 = select i1 %24, double* %35, double* %30
%43 = select i1 %24, double* %26, double* %31
%44 = select i1 %24, double* %29, double* %32
%45 = select i1 %24, double* %36, double* %33
%46 = select i1 %24, double* %27, double* %34
%47 = select i1 %24, double* %30, double* %35
%48 = select i1 %24, double* %33, double* %36
%49 = getelementptr inbounds double, double* %3, i64 15
%50 = load double, double* %49
%51 = load double, double* %48
%52 = load double, double* %47
%53 = load double, double* %46
%54 = load double, double* %45
%55 = getelementptr inbounds double, double* %3, i64 10
%56 = load double, double* %55
%57 = load double, double* %44
%58 = load double, double* %43
%59 = load double, double* %42
%60 = load double, double* %41
%61 = getelementptr inbounds double, double* %3, i64 5
%62 = load double, double* %61
%63 = load double, double* %40
%64 = load double, double* %39
%65 = load double, double* %38
%66 = load double, double* %37
%67 = load double, double* %3
%68 = icmp eq i32 %7, 0
br i1 %68, label %69, label %101
69: ; preds = %23, %21
%70 = phi double [ 0.000000e+00, %21 ], [ %67, %23 ]
%71 = phi double [ 0.000000e+00, %21 ], [ %66, %23 ]
%72 = phi double [ 0.000000e+00, %21 ], [ %65, %23 ]
%73 = phi double [ 0.000000e+00, %21 ], [ %64, %23 ]
%74 = phi double [ 0.000000e+00, %21 ], [ %63, %23 ]
%75 = phi double [ 0.000000e+00, %21 ], [ %62, %23 ]
%76 = phi double [ 0.000000e+00, %21 ], [ %60, %23 ]
%77 = phi double [ 0.000000e+00, %21 ], [ %59, %23 ]
%78 = phi double [ 0.000000e+00, %21 ], [ %58, %23 ]
%79 = phi double [ 0.000000e+00, %21 ], [ %57, %23 ]
%80 = phi double [ 0.000000e+00, %21 ], [ %56, %23 ]
%81 = phi double [ 0.000000e+00, %21 ], [ %54, %23 ]
%82 = phi double [ 0.000000e+00, %21 ], [ %53, %23 ]
%83 = phi double [ 0.000000e+00, %21 ], [ %52, %23 ]
%84 = phi double [ 0.000000e+00, %21 ], [ %51, %23 ]
%85 = phi double [ 0.000000e+00, %21 ], [ %50, %23 ]
store double %70, double* %4
%86 = getelementptr inbounds double, double* %4, i64 1
store double %74, double* %86
%87 = getelementptr inbounds double, double* %4, i64 2
store double %78, double* %87
%88 = getelementptr inbounds double, double* %4, i64 3
store double %82, double* %88
%89 = getelementptr inbounds double, double* %4, i64 4
store double %71, double* %89
%90 = getelementptr inbounds double, double* %4, i64 5
store double %75, double* %90
%91 = getelementptr inbounds double, double* %4, i64 6
store double %79, double* %91
%92 = getelementptr inbounds double, double* %4, i64 7
store double %83, double* %92
%93 = getelementptr inbounds double, double* %4, i64 8
store double %72, double* %93
%94 = getelementptr inbounds double, double* %4, i64 9
store double %76, double* %94
%95 = getelementptr inbounds double, double* %4, i64 10
store double %80, double* %95
%96 = getelementptr inbounds double, double* %4, i64 11
store double %84, double* %96
%97 = getelementptr inbounds double, double* %4, i64 12
store double %73, double* %97
%98 = getelementptr inbounds double, double* %4, i64 13
store double %77, double* %98
%99 = getelementptr inbounds double, double* %4, i64 14
store double %81, double* %99
%100 = getelementptr inbounds double, double* %4, i64 15
store double %85, double* %100
br label %136
101: ; preds = %23, %21
%102 = phi double [ 0.000000e+00, %21 ], [ %67, %23 ]
%103 = phi double [ 0.000000e+00, %21 ], [ %66, %23 ]
%104 = phi double [ 0.000000e+00, %21 ], [ %65, %23 ]
%105 = phi double [ 0.000000e+00, %21 ], [ %64, %23 ]
%106 = phi double [ 0.000000e+00, %21 ], [ %63, %23 ]
%107 = phi double [ 0.000000e+00, %21 ], [ %62, %23 ]
%108 = phi double [ 0.000000e+00, %21 ], [ %60, %23 ]
%109 = phi double [ 0.000000e+00, %21 ], [ %59, %23 ]
%110 = phi double [ 0.000000e+00, %21 ], [ %58, %23 ]
%111 = phi double [ 0.000000e+00, %21 ], [ %57, %23 ]
%112 = phi double [ 0.000000e+00, %21 ], [ %56, %23 ]
%113 = phi double [ 0.000000e+00, %21 ], [ %54, %23 ]
%114 = phi double [ 0.000000e+00, %21 ], [ %53, %23 ]
%115 = phi double [ 0.000000e+00, %21 ], [ %52, %23 ]
%116 = phi double [ 0.000000e+00, %21 ], [ %51, %23 ]
%117 = phi double [ 0.000000e+00, %21 ], [ %50, %23 ]
store double %102, double* %4
%118 = getelementptr inbounds double, double* %4, i64 1
store double %103, double* %118
%119 = getelementptr inbounds double, double* %4, i64 2
store double %104, double* %119
%120 = getelementptr inbounds double, double* %4, i64 3
store double %105, double* %120
%121 = getelementptr inbounds double, double* %4, i64 4
store double %106, double* %121
%122 = getelementptr inbounds double, double* %4, i64 5
store double %107, double* %122
%123 = getelementptr inbounds double, double* %4, i64 6
store double %108, double* %123
%124 = getelementptr inbounds double, double* %4, i64 7
store double %109, double* %124
%125 = getelementptr inbounds double, double* %4, i64 8
store double %110, double* %125
%126 = getelementptr inbounds double, double* %4, i64 9
store double %111, double* %126
%127 = getelementptr inbounds double, double* %4, i64 10
store double %112, double* %127
%128 = getelementptr inbounds double, double* %4, i64 11
store double %113, double* %128
%129 = getelementptr inbounds double, double* %4, i64 12
store double %114, double* %129
%130 = getelementptr inbounds double, double* %4, i64 13
store double %115, double* %130
%131 = getelementptr inbounds double, double* %4, i64 14
store double %116, double* %131
%132 = getelementptr inbounds double, double* %4, i64 15
store double %117, double* %132
br label %136
133: ; preds = %8
%134 = lshr i32 %0, 2
store i32 %134, i32* %16
%135 = and i32 %0, 3
store i32 %135, i32* %17
br label %136
136: ; preds = %69, %101, %133
ret void
}