void kernel_dtrmm_nt_u_4x4_lib4(int kadd, double *A, double *B, double *C) {
  if (kadd <= 0)
    return;
  int k_iter = kadd / 4 - 1;
  int k_left = kadd % 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"
                   "movsd         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"
                   "                                \n\t"
                   "movaps       32(%%rbx), %%xmm6  \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"
                   "movaps  %%xmm7, %%xmm5          \n\t"
                   "mulpd   %%xmm0, %%xmm7          \n\t"
                   "movaps       32(%%rax), %%xmm0  \n\t"
                   "mulpd   %%xmm1, %%xmm5          \n\t"
                   "movaps       48(%%rax), %%xmm1  \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"
                   "                                \n\t"
                   "addpd   %%xmm6, %%xmm8          \n\t"
                   "movsd        80(%%rbx), %%xmm6  \n\t"
                   "addpd   %%xmm3, %%xmm12         \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, %%xmm9          \n\t"
                   "addpd   %%xmm5, %%xmm13         \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"
                   "                                \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"
                   "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"
                   "                                \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"
                   "                                \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"
                   "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"
                   "                                \n\t"
                   "                                \n\t"
                   "movq   %4, %%rbx                \n\t"
                   "                                \n\t"
                   "movaps	%%xmm9,  (%%rbx)          \n\t"
                   "movaps	%%xmm8,  32(%%rbx)        \n\t"
                   "movaps	%%xmm11, 64(%%rbx)        \n\t"
                   "movaps	%%xmm10, 96(%%rbx)        \n\t"
                   "movaps	%%xmm13, 16(%%rbx)        \n\t"
                   "movaps	%%xmm12, 48(%%rbx)        \n\t"
                   "movaps	%%xmm15, 80(%%rbx)        \n\t"
                   "movaps	%%xmm14, 112(%%rbx)       \n\t"
                   "                                \n\t"
                   "                                \n\t"
                   "                                \n\t"
                   "                                \n\t"
                   ".SDONE:                         \n\t"
                   "                                \n\t"
                   :
                   : "m"(k_iter), "m"(k_left), "m"(A), "m"(B), "m"(C)
                   : "rax", "rbx", "rsi", "xmm0", "xmm1", "xmm2", "xmm3",
                     "xmm4", "xmm5", "xmm6", "xmm7", "xmm8", "xmm9", "xmm10",
                     "xmm11", "xmm12", "xmm13", "xmm14", "xmm15", "memory");
}


x86 assembly (clang, -O0):
<kernel_dtrmm_nt_u_4x4_lib4>:
push   %rbp
mov    %rsp,%rbp
push   %rbx
mov    %edi,-0xc(%rbp)
mov    %rsi,-0x18(%rbp)
mov    %rdx,-0x20(%rbp)
mov    %rcx,-0x28(%rbp)
cmpl   $0x0,-0xc(%rbp)
jg     1123 <kernel_dtrmm_nt_u_4x4_lib4+0x23>
jmp    15a5 <.SDONE>
mov    -0xc(%rbp),%eax
mov    $0x4,%ecx
cltd
idiv   %ecx
sub    $0x1,%eax
mov    %eax,-0x2c(%rbp)
mov    -0xc(%rbp),%eax
mov    $0x4,%ecx
cltd
idiv   %ecx
mov    %edx,-0x30(%rbp)
mov    -0x18(%rbp),%rax
mov    -0x20(%rbp),%rbx
movaps (%rax),%xmm0
movaps 0x10(%rax),%xmm1
movsd  (%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
movaps 0x20(%rbx),%xmm6
movaps %xmm2,%xmm3
pshufd $0x4e,%xmm2,%xmm7
mulpd  %xmm0,%xmm2
mulpd  %xmm1,%xmm3
movaps %xmm7,%xmm5
mulpd  %xmm0,%xmm7
movaps 0x20(%rax),%xmm0
mulpd  %xmm1,%xmm5
movaps 0x30(%rax),%xmm1
addpd  %xmm2,%xmm8
movaps 0x40(%rbx),%xmm2
addpd  %xmm3,%xmm12
movaps %xmm6,%xmm3
pshufd $0x4e,%xmm6,%xmm4
mulpd  %xmm0,%xmm6
mulpd  %xmm1,%xmm3
addpd  %xmm7,%xmm9
addpd  %xmm5,%xmm13
movaps %xmm4,%xmm5
mulpd  %xmm0,%xmm4
movaps 0x40(%rax),%xmm0
mulpd  %xmm1,%xmm5
movaps 0x50(%rax),%xmm1
addpd  %xmm6,%xmm8
movsd  0x50(%rbx),%xmm6
addpd  %xmm3,%xmm12
movaps %xmm2,%xmm3
pshufd $0x4e,%xmm2,%xmm7
mulpd  %xmm0,%xmm2
mulpd  %xmm1,%xmm3
addpd  %xmm4,%xmm9
addpd  %xmm5,%xmm13
movaps %xmm7,%xmm5
mulpd  %xmm0,%xmm7
mulpd  %xmm1,%xmm5
addpd  %xmm2,%xmm8
movaps 0x60(%rbx),%xmm2
addpd  %xmm3,%xmm12
movaps %xmm6,%xmm3
pshufd $0x4e,%xmm6,%xmm4
mulpd  %xmm0,%xmm6
mulpd  %xmm1,%xmm3
addpd  %xmm7,%xmm9
addpd  %xmm5,%xmm13
movaps %xmm4,%xmm5
mulpd  %xmm0,%xmm4
movaps 0x60(%rax),%xmm0
mulpd  %xmm1,%xmm5
movaps 0x70(%rax),%xmm1
addpd  %xmm6,%xmm10
movaps 0x70(%rbx),%xmm6
addpd  %xmm3,%xmm14
movaps %xmm2,%xmm3
pshufd $0x4e,%xmm2,%xmm7
mulpd  %xmm0,%xmm2
mulpd  %xmm1,%xmm3
add    $0x80,%rax
addpd  %xmm4,%xmm11
addpd  %xmm5,%xmm15
movaps %xmm7,%xmm5
mulpd  %xmm0,%xmm7
mulpd  %xmm1,%xmm5
add    $0x80,%rbx
addpd  %xmm2,%xmm8
movaps (%rbx),%xmm2
addpd  %xmm3,%xmm12
movaps %xmm6,%xmm3
pshufd $0x4e,%xmm6,%xmm4
mulpd  %xmm0,%xmm6
mulpd  %xmm1,%xmm3
addpd  %xmm7,%xmm9
addpd  %xmm5,%xmm13
movaps %xmm4,%xmm5
mulpd  %xmm0,%xmm4
movaps (%rax),%xmm0
mulpd  %xmm1,%xmm5
movaps 0x10(%rax),%xmm1
mov    -0x2c(%rbp),%esi
test   %esi,%esi
je     14a5 <.SCONSIDKLEFT>

x86 assembly (clang, -O2):
<kernel_dtrmm_nt_u_4x4_lib4>:
push   %rbx
mov    %rsi,-0x8(%rsp)
mov    %rdx,-0x10(%rsp)
mov    %rcx,-0x18(%rsp)
test   %edi,%edi
jle    158b <.SDONE>
mov    %edi,%eax
shr    $0x2,%eax
add    $0xffffffff,%eax
mov    %eax,-0x1c(%rsp)
and    $0x3,%edi
mov    %edi,-0x20(%rsp)
mov    -0x8(%rsp),%rax
mov    -0x10(%rsp),%rbx
movaps (%rax),%xmm0
movaps 0x10(%rax),%xmm1
movsd  (%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
movaps 0x20(%rbx),%xmm6
movaps %xmm2,%xmm3
pshufd $0x4e,%xmm2,%xmm7
mulpd  %xmm0,%xmm2
mulpd  %xmm1,%xmm3
movaps %xmm7,%xmm5
mulpd  %xmm0,%xmm7
movaps 0x20(%rax),%xmm0
mulpd  %xmm1,%xmm5
movaps 0x30(%rax),%xmm1
addpd  %xmm2,%xmm8
movaps 0x40(%rbx),%xmm2
addpd  %xmm3,%xmm12
movaps %xmm6,%xmm3
pshufd $0x4e,%xmm6,%xmm4
mulpd  %xmm0,%xmm6
mulpd  %xmm1,%xmm3
addpd  %xmm7,%xmm9
addpd  %xmm5,%xmm13
movaps %xmm4,%xmm5
mulpd  %xmm0,%xmm4
movaps 0x40(%rax),%xmm0
mulpd  %xmm1,%xmm5
movaps 0x50(%rax),%xmm1
addpd  %xmm6,%xmm8
movsd  0x50(%rbx),%xmm6
addpd  %xmm3,%xmm12
movaps %xmm2,%xmm3
pshufd $0x4e,%xmm2,%xmm7
mulpd  %xmm0,%xmm2
mulpd  %xmm1,%xmm3
addpd  %xmm4,%xmm9
addpd  %xmm5,%xmm13
movaps %xmm7,%xmm5
mulpd  %xmm0,%xmm7
mulpd  %xmm1,%xmm5
addpd  %xmm2,%xmm8
movaps 0x60(%rbx),%xmm2
addpd  %xmm3,%xmm12
movaps %xmm6,%xmm3
pshufd $0x4e,%xmm6,%xmm4
mulpd  %xmm0,%xmm6
mulpd  %xmm1,%xmm3
addpd  %xmm7,%xmm9
addpd  %xmm5,%xmm13
movaps %xmm4,%xmm5
mulpd  %xmm0,%xmm4
movaps 0x60(%rax),%xmm0
mulpd  %xmm1,%xmm5
movaps 0x70(%rax),%xmm1
addpd  %xmm6,%xmm10
movaps 0x70(%rbx),%xmm6
addpd  %xmm3,%xmm14
movaps %xmm2,%xmm3
pshufd $0x4e,%xmm2,%xmm7
mulpd  %xmm0,%xmm2
mulpd  %xmm1,%xmm3
add    $0x80,%rax
addpd  %xmm4,%xmm11
addpd  %xmm5,%xmm15
movaps %xmm7,%xmm5
mulpd  %xmm0,%xmm7
mulpd  %xmm1,%xmm5
add    $0x80,%rbx
addpd  %xmm2,%xmm8
movaps (%rbx),%xmm2
addpd  %xmm3,%xmm12
movaps %xmm6,%xmm3
pshufd $0x4e,%xmm6,%xmm4
mulpd  %xmm0,%xmm6
mulpd  %xmm1,%xmm3
addpd  %xmm7,%xmm9
addpd  %xmm5,%xmm13
movaps %xmm4,%xmm5
mulpd  %xmm0,%xmm4
movaps (%rax),%xmm0
mulpd  %xmm1,%xmm5
movaps 0x10(%rax),%xmm1
mov    -0x1c(%rsp),%esi
test   %esi,%esi
je     1491 <.SCONSIDKLEFT>

LLVM IR (-O0):
define void @kernel_dtrmm_nt_u_4x4_lib4(i32 %0, double* %1, double* %2, double* %3) {
%5 = alloca i32
%6 = alloca double*
%7 = alloca double*
%8 = alloca double*
%9 = alloca i32
%10 = alloca i32
store i32 %0, i32* %5
store double* %1, double** %6
store double* %2, double** %7
store double* %3, double** %8
%11 = load i32, i32* %5
%12 = icmp sle i32 %11, 0
br i1 %12, label %13, label %14
13: ; preds = %4
br label %20
14: ; preds = %4
%15 = load i32, i32* %5
%16 = sdiv i32 %15, 4
%17 = sub nsw i32 %16, 1
store i32 %17, i32* %9
%18 = load i32, i32* %5
%19 = srem i32 %18, 4
store i32 %19, i32* %10
br label %20
20: ; preds = %14, %13
ret void
}

LLVM IR (-O2):
define void @kernel_dtrmm_nt_u_4x4_lib4(i32 %0, double* %1, double* %2, double* %3) {
%5 = alloca double*
%6 = alloca double*
%7 = alloca double*
%8 = alloca i32
%9 = alloca i32
store double* %1, double** %5
store double* %2, double** %6
store double* %3, double** %7
%10 = icmp slt i32 %0, 1
br i1 %10, label %17, label %11
11: ; preds = %4
%12 = bitcast i32* %8 to i8*
%13 = lshr i32 %0, 2
%14 = add nsw i32 %13, -1
store i32 %14, i32* %8
%15 = bitcast i32* %9 to i8*
%16 = and i32 %0, 3
store i32 %16, i32* %9
br label %17
17: ; preds = %4, %11
ret void
}