int sgemm_beta(long m, long n, long dummy1, float beta, float *dummy2,
               long dummy3, float *dummy4, long dummy5, float *c, long ldc) {
  long i, j;
  float *c_offset1, *c_offset;
  float ctemp1, ctemp2, ctemp3, ctemp4;
  float ctemp5, ctemp6, ctemp7, ctemp8;
  c_offset = c;
  if (beta == 0) {
    j = n;
    do {
      c_offset1 = c_offset;
      c_offset += ldc;
      i = (m >> 3);
      if (i > 0) {
        do {
          *(c_offset1 + 0) = 0;
          *(c_offset1 + 1) = 0;
          *(c_offset1 + 2) = 0;
          *(c_offset1 + 3) = 0;
          *(c_offset1 + 4) = 0;
          *(c_offset1 + 5) = 0;
          *(c_offset1 + 6) = 0;
          *(c_offset1 + 7) = 0;
          c_offset1 += 8;
          i--;
        } while (i > 0);
      }
      i = (m & 7);
      if (i > 0) {
        do {
          *c_offset1 = 0;
          c_offset1++;
          i--;
        } while (i > 0);
      }
      j--;
    } while (j > 0);
  } else {
    j = n;
    do {
      c_offset1 = c_offset;
      c_offset += ldc;
      i = (m >> 3);
      if (i > 0) {
        do {
          ctemp1 = *(c_offset1 + 0);
          ctemp2 = *(c_offset1 + 1);
          ctemp3 = *(c_offset1 + 2);
          ctemp4 = *(c_offset1 + 3);
          ctemp5 = *(c_offset1 + 4);
          ctemp6 = *(c_offset1 + 5);
          ctemp7 = *(c_offset1 + 6);
          ctemp8 = *(c_offset1 + 7);
          ctemp1 *= beta;
          ctemp2 *= beta;
          ctemp3 *= beta;
          ctemp4 *= beta;
          ctemp5 *= beta;
          ctemp6 *= beta;
          ctemp7 *= beta;
          ctemp8 *= beta;
          *(c_offset1 + 0) = ctemp1;
          *(c_offset1 + 1) = ctemp2;
          *(c_offset1 + 2) = ctemp3;
          *(c_offset1 + 3) = ctemp4;
          *(c_offset1 + 4) = ctemp5;
          *(c_offset1 + 5) = ctemp6;
          *(c_offset1 + 6) = ctemp7;
          *(c_offset1 + 7) = ctemp8;
          c_offset1 += 8;
          i--;
        } while (i > 0);
      }
      i = (m & 7);
      if (i > 0) {
        do {
          ctemp1 = *c_offset1;
          ctemp1 *= beta;
          *c_offset1 = ctemp1;
          c_offset1++;
          i--;
        } while (i > 0);
      }
      j--;
    } while (j > 0);
  }
  return 0;
}


x86 assembly (clang, -O0):
<sgemm_beta>:
push   %rbp
mov    %rsp,%rbp
mov    0x20(%rbp),%rax
mov    0x18(%rbp),%rax
mov    0x10(%rbp),%rax
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %rdx,-0x18(%rbp)
movss  %xmm0,-0x1c(%rbp)
mov    %rcx,-0x28(%rbp)
mov    %r8,-0x30(%rbp)
mov    %r9,-0x38(%rbp)
mov    0x18(%rbp),%rax
mov    %rax,-0x58(%rbp)
movss  -0x1c(%rbp),%xmm0
xorps  %xmm1,%xmm1
ucomiss %xmm1,%xmm0
jne    127a <sgemm_beta+0x17a>
jp     127a <sgemm_beta+0x17a>
mov    -0x10(%rbp),%rax
mov    %rax,-0x48(%rbp)
mov    -0x58(%rbp),%rax
mov    %rax,-0x50(%rbp)
mov    0x20(%rbp),%rax
shl    $0x2,%rax
add    -0x58(%rbp),%rax
mov    %rax,-0x58(%rbp)
mov    -0x8(%rbp),%rax
sar    $0x3,%rax
mov    %rax,-0x40(%rbp)
cmpq   $0x0,-0x40(%rbp)
jle    120f <sgemm_beta+0x10f>
jmp    1188 <sgemm_beta+0x88>
mov    -0x50(%rbp),%rax
xorps  %xmm0,%xmm0
movss  %xmm0,(%rax)
mov    -0x50(%rbp),%rax
xorps  %xmm0,%xmm0
movss  %xmm0,0x4(%rax)
mov    -0x50(%rbp),%rax
xorps  %xmm0,%xmm0
movss  %xmm0,0x8(%rax)
mov    -0x50(%rbp),%rax
xorps  %xmm0,%xmm0
movss  %xmm0,0xc(%rax)
mov    -0x50(%rbp),%rax
xorps  %xmm0,%xmm0
movss  %xmm0,0x10(%rax)
mov    -0x50(%rbp),%rax
xorps  %xmm0,%xmm0
movss  %xmm0,0x14(%rax)
mov    -0x50(%rbp),%rax
xorps  %xmm0,%xmm0
movss  %xmm0,0x18(%rax)
mov    -0x50(%rbp),%rax
xorps  %xmm0,%xmm0
movss  %xmm0,0x1c(%rax)
mov    -0x50(%rbp),%rax
add    $0x20,%rax
mov    %rax,-0x50(%rbp)
mov    -0x40(%rbp),%rax
add    $0xffffffffffffffff,%rax
mov    %rax,-0x40(%rbp)
cmpq   $0x0,-0x40(%rbp)
jg     1188 <sgemm_beta+0x88>
jmp    120f <sgemm_beta+0x10f>
mov    -0x8(%rbp),%rax
and    $0x7,%rax
mov    %rax,-0x40(%rbp)
cmpq   $0x0,-0x40(%rbp)
jle    125e <sgemm_beta+0x15e>
jmp    122b <sgemm_beta+0x12b>
mov    -0x50(%rbp),%rax
xorps  %xmm0,%xmm0
movss  %xmm0,(%rax)
mov    -0x50(%rbp),%rax
add    $0x4,%rax
mov    %rax,-0x50(%rbp)
mov    -0x40(%rbp),%rax
add    $0xffffffffffffffff,%rax
mov    %rax,-0x40(%rbp)
cmpq   $0x0,-0x40(%rbp)
jg     122b <sgemm_beta+0x12b>
jmp    125e <sgemm_beta+0x15e>
mov    -0x48(%rbp),%rax
add    $0xffffffffffffffff,%rax
mov    %rax,-0x48(%rbp)
cmpq   $0x0,-0x48(%rbp)
jg     1154 <sgemm_beta+0x54>
jmp    14bd <sgemm_beta+0x3bd>
mov    -0x10(%rbp),%rax
mov    %rax,-0x48(%rbp)
mov    -0x58(%rbp),%rax
mov    %rax,-0x50(%rbp)
mov    0x20(%rbp),%rax
shl    $0x2,%rax
add    -0x58(%rbp),%rax
mov    %rax,-0x58(%rbp)
mov    -0x8(%rbp),%rax
sar    $0x3,%rax
mov    %rax,-0x40(%rbp)
cmpq   $0x0,-0x40(%rbp)
jle    1434 <sgemm_beta+0x334>
jmp    12b6 <sgemm_beta+0x1b6>
mov    -0x50(%rbp),%rax
movss  (%rax),%xmm0
movss  %xmm0,-0x5c(%rbp)
mov    -0x50(%rbp),%rax
movss  0x4(%rax),%xmm0
movss  %xmm0,-0x60(%rbp)
mov    -0x50(%rbp),%rax
movss  0x8(%rax),%xmm0
movss  %xmm0,-0x64(%rbp)
mov    -0x50(%rbp),%rax
movss  0xc(%rax),%xmm0
movss  %xmm0,-0x68(%rbp)
mov    -0x50(%rbp),%rax
movss  0x10(%rax),%xmm0
movss  %xmm0,-0x6c(%rbp)
mov    -0x50(%rbp),%rax
movss  0x14(%rax),%xmm0
movss  %xmm0,-0x70(%rbp)
mov    -0x50(%rbp),%rax
movss  0x18(%rax),%xmm0
movss  %xmm0,-0x74(%rbp)
mov    -0x50(%rbp),%rax
movss  0x1c(%rax),%xmm0
movss  %xmm0,-0x78(%rbp)
movss  -0x1c(%rbp),%xmm0
mulss  -0x5c(%rbp),%xmm0
movss  %xmm0,-0x5c(%rbp)
movss  -0x1c(%rbp),%xmm0
mulss  -0x60(%rbp),%xmm0
movss  %xmm0,-0x60(%rbp)
movss  -0x1c(%rbp),%xmm0
mulss  -0x64(%rbp),%xmm0
movss  %xmm0,-0x64(%rbp)
movss  -0x1c(%rbp),%xmm0
mulss  -0x68(%rbp),%xmm0
movss  %xmm0,-0x68(%rbp)
movss  -0x1c(%rbp),%xmm0
mulss  -0x6c(%rbp),%xmm0
movss  %xmm0,-0x6c(%rbp)
movss  -0x1c(%rbp),%xmm0
mulss  -0x70(%rbp),%xmm0
movss  %xmm0,-0x70(%rbp)
movss  -0x1c(%rbp),%xmm0
mulss  -0x74(%rbp),%xmm0
movss  %xmm0,-0x74(%rbp)
movss  -0x1c(%rbp),%xmm0
mulss  -0x78(%rbp),%xmm0
movss  %xmm0,-0x78(%rbp)
movss  -0x5c(%rbp),%xmm0
mov    -0x50(%rbp),%rax
movss  %xmm0,(%rax)
movss  -0x60(%rbp),%xmm0
mov    -0x50(%rbp),%rax
movss  %xmm0,0x4(%rax)
movss  -0x64(%rbp),%xmm0
mov    -0x50(%rbp),%rax
movss  %xmm0,0x8(%rax)
movss  -0x68(%rbp),%xmm0
mov    -0x50(%rbp),%rax
movss  %xmm0,0xc(%rax)
movss  -0x6c(%rbp),%xmm0
mov    -0x50(%rbp),%rax
movss  %xmm0,0x10(%rax)
movss  -0x70(%rbp),%xmm0
mov    -0x50(%rbp),%rax
movss  %xmm0,0x14(%rax)
movss  -0x74(%rbp),%xmm0
mov    -0x50(%rbp),%rax
movss  %xmm0,0x18(%rax)
movss  -0x78(%rbp),%xmm0
mov    -0x50(%rbp),%rax
movss  %xmm0,0x1c(%rax)
mov    -0x50(%rbp),%rax
add    $0x20,%rax
mov    %rax,-0x50(%rbp)
mov    -0x40(%rbp),%rax
add    $0xffffffffffffffff,%rax
mov    %rax,-0x40(%rbp)
cmpq   $0x0,-0x40(%rbp)
jg     12b6 <sgemm_beta+0x1b6>
jmp    1434 <sgemm_beta+0x334>
mov    -0x8(%rbp),%rax
and    $0x7,%rax
mov    %rax,-0x40(%rbp)
cmpq   $0x0,-0x40(%rbp)
jle    14a1 <sgemm_beta+0x3a1>
jmp    1450 <sgemm_beta+0x350>
mov    -0x50(%rbp),%rax
movss  (%rax),%xmm0
movss  %xmm0,-0x5c(%rbp)
movss  -0x1c(%rbp),%xmm0
mulss  -0x5c(%rbp),%xmm0
movss  %xmm0,-0x5c(%rbp)
movss  -0x5c(%rbp),%xmm0
mov    -0x50(%rbp),%rax
movss  %xmm0,(%rax)
mov    -0x50(%rbp),%rax
add    $0x4,%rax
mov    %rax,-0x50(%rbp)
mov    -0x40(%rbp),%rax
add    $0xffffffffffffffff,%rax
mov    %rax,-0x40(%rbp)
cmpq   $0x0,-0x40(%rbp)
jg     1450 <sgemm_beta+0x350>
jmp    14a1 <sgemm_beta+0x3a1>
mov    -0x48(%rbp),%rax
add    $0xffffffffffffffff,%rax
mov    %rax,-0x48(%rbp)
cmpq   $0x0,-0x48(%rbp)
jg     1282 <sgemm_beta+0x182>
jmp    14bd <sgemm_beta+0x3bd>
xor    %eax,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<sgemm_beta>:
push   %rbp
push   %r15
push   %r14
push   %r13
push   %r12
push   %rbx
sub    $0x28,%rsp
mov    %rsi,%r15
mov    %rdi,%r13
mov    0x70(%rsp),%r10
mov    0x68(%rsp),%r12
mov    %rdi,%rax
sar    $0x3,%rax
mov    %r13d,%ebp
and    $0x7,%ebp
test   %rax,%rax
mov    $0x1,%ecx
cmovle %rax,%rcx
mov    %rax,%rdx
sub    %rcx,%rdx
add    $0x1,%rdx
xorps  %xmm1,%xmm1
ucomiss %xmm1,%xmm0
mov    %rbp,0x8(%rsp)
jne    11f2 <sgemm_beta+0xe2>
jp     11f2 <sgemm_beta+0xe2>
shl    $0x5,%rdx
mov    %rdx,0x10(%rsp)
lea    0x0(,%rbp,4),%rbx
lea    0x20(,%r13,4),%rax
and    $0xffffffffffffffe0,%rax
shl    $0x5,%rcx
sub    %rcx,%rax
mov    %rax,(%rsp)
shl    $0x2,%r10
add    $0x1,%r15
mov    %r10,%r14
jmp    11b1 <sgemm_beta+0xa1>
nopl   (%rax)
add    %r10,%r12
add    $0xffffffffffffffff,%r15
cmp    $0x1,%r15
jle    1510 <sgemm_beta+0x400>
mov    %r12,%rdi
cmp    $0x8,%r13
jl     11d9 <sgemm_beta+0xc9>
mov    %r12,%rdi
xor    %esi,%esi
mov    0x10(%rsp),%rdx
call   1030 <memset@plt>
mov    0x8(%rsp),%rbp
mov    %r14,%r10
mov    (%rsp),%rax
lea    (%r12,%rax,1),%rdi
test   %rbp,%rbp
je     11a0 <sgemm_beta+0x90>
xor    %esi,%esi
mov    %rbx,%rdx
call   1030 <memset@plt>
mov    0x8(%rsp),%rbp
mov    %r14,%r10
jmp    11a0 <sgemm_beta+0x90>
mov    %rdx,%r9
and    $0xfffffffffffffffc,%rdx
lea    0x0(,%rdx,8),%r8
mov    %rax,%r14
sub    %rdx,%r14
movaps %xmm0,%xmm9
shufps $0x0,%xmm0,%xmm9
lea    -0x3(%rbp),%rdi
mov    %r13d,%r11d
and    $0x6,%r11d
lea    -0x5(%rbp),%rcx
mov    %rcx,(%rsp)
lea    -0x7(%rbp),%rcx
mov    %rcx,0x20(%rsp)
shl    $0x2,%r10
movaps %xmm0,0x10(%rsp)
jmp    1254 <sgemm_beta+0x144>
nopw   0x0(%rax,%rax,1)
add    %r10,%r12
lea    -0x1(%r15),%rcx
cmp    $0x1,%r15
mov    %rcx,%r15
jle    1510 <sgemm_beta+0x400>
mov    %r12,%rbx
cmp    $0x8,%r13
jl     1464 <sgemm_beta+0x354>
mov    %r12,%rbx
mov    %rax,%rcx
cmp    $0x4,%r9
jb     1434 <sgemm_beta+0x324>
lea    (%r12,%r8,4),%rbx
mov    %rdx,%rcx
mov    %r12,%rbp
nopl   0x0(%rax,%rax,1)
movups 0x50(%rbp),%xmm10
movups 0x70(%rbp),%xmm11
movups 0x0(%rbp),%xmm13
movups 0x10(%rbp),%xmm12
movups 0x20(%rbp),%xmm14
movups 0x30(%rbp),%xmm5
movups 0x40(%rbp),%xmm3
movups 0x60(%rbp),%xmm1
movaps %xmm1,%xmm4
movlhps %xmm3,%xmm4
movaps %xmm13,%xmm8
unpcklps %xmm14,%xmm8
shufps $0x24,%xmm4,%xmm8
movaps %xmm3,%xmm6
unpcklps %xmm1,%xmm6
movaps %xmm14,%xmm4
shufps $0x11,%xmm13,%xmm4
shufps $0xe2,%xmm6,%xmm4
movaps %xmm1,%xmm7
unpckhpd %xmm3,%xmm7
movaps %xmm13,%xmm15
unpckhps %xmm14,%xmm15
shufps $0x24,%xmm7,%xmm15
unpckhps %xmm1,%xmm3
shufps $0x33,%xmm13,%xmm14
shufps $0xe2,%xmm3,%xmm14
movaps %xmm11,%xmm3
movlhps %xmm10,%xmm3
movaps %xmm12,%xmm6
unpcklps %xmm5,%xmm6
shufps $0x24,%xmm3,%xmm6
movaps %xmm10,%xmm3
unpcklps %xmm11,%xmm3
movaps %xmm5,%xmm7
shufps $0x11,%xmm12,%xmm7
shufps $0xe2,%xmm3,%xmm7
movaps %xmm11,%xmm2
unpckhpd %xmm10,%xmm2
movaps %xmm12,%xmm3
unpckhps %xmm5,%xmm3
shufps $0x24,%xmm2,%xmm3
unpckhps %xmm11,%xmm10
shufps $0x33,%xmm12,%xmm5
shufps $0xe2,%xmm10,%xmm5
mulps  %xmm9,%xmm8
mulps  %xmm9,%xmm4
mulps  %xmm9,%xmm15
mulps  %xmm9,%xmm14
mulps  %xmm9,%xmm6
mulps  %xmm9,%xmm7
mulps  %xmm9,%xmm3
mulps  %xmm9,%xmm5
movaps %xmm5,%xmm2
movlhps %xmm3,%xmm2
movaps %xmm6,%xmm10
unpcklps %xmm7,%xmm10
shufps $0x24,%xmm2,%xmm10
movaps %xmm14,%xmm2
movlhps %xmm15,%xmm2
movaps %xmm8,%xmm11
unpcklps %xmm4,%xmm11
shufps $0x24,%xmm2,%xmm11
movaps %xmm3,%xmm2
unpcklps %xmm5,%xmm2
movaps %xmm7,%xmm12
shufps $0x11,%xmm6,%xmm12
shufps $0xe2,%xmm2,%xmm12
movaps %xmm15,%xmm2
unpcklps %xmm14,%xmm2
movaps %xmm4,%xmm13
shufps $0x11,%xmm8,%xmm13
shufps $0xe2,%xmm2,%xmm13
movaps %xmm5,%xmm2
unpckhpd %xmm3,%xmm2
movaps %xmm6,%xmm1
unpckhps %xmm7,%xmm1
shufps $0x24,%xmm2,%xmm1
movaps %xmm14,%xmm2
unpckhpd %xmm15,%xmm2
movaps %xmm9,%xmm0
movaps %xmm8,%xmm9
unpckhps %xmm4,%xmm9
shufps $0x24,%xmm2,%xmm9
unpckhps %xmm5,%xmm3
shufps $0x33,%xmm6,%xmm7
shufps $0xe2,%xmm3,%xmm7
unpckhps %xmm14,%xmm15
shufps $0x33,%xmm8,%xmm4
shufps $0xe2,%xmm15,%xmm4
movups %xmm4,0x60(%rbp)
movups %xmm7,0x70(%rbp)
movups %xmm9,0x40(%rbp)
movaps %xmm0,%xmm9
movups %xmm1,0x50(%rbp)
movups %xmm13,0x20(%rbp)
movups %xmm12,0x30(%rbp)
movups %xmm11,0x0(%rbp)
movups %xmm10,0x10(%rbp)
sub    $0xffffffffffffff80,%rbp
add    $0xfffffffffffffffc,%rcx
jne    1280 <sgemm_beta+0x170>
mov    %r14,%rcx
cmp    %rdx,%r9
mov    0x8(%rsp),%rbp
movaps 0x10(%rsp),%xmm0
je     1464 <sgemm_beta+0x354>
add    $0x1,%rcx
nopl   0x0(%rax,%rax,1)
movups (%rbx),%xmm1
movups 0x10(%rbx),%xmm2
mulps  %xmm9,%xmm1
mulps  %xmm9,%xmm2
movups %xmm1,(%rbx)
movups %xmm2,0x10(%rbx)
add    $0x20,%rbx
add    $0xffffffffffffffff,%rcx
cmp    $0x1,%rcx
jg     1440 <sgemm_beta+0x330>
test   %rbp,%rbp
je     1240 <sgemm_beta+0x130>
movss  (%rbx),%xmm1
mulss  %xmm0,%xmm1
movss  %xmm1,(%rbx)
cmp    $0x2,%ebp
jb     1240 <sgemm_beta+0x130>
movss  0x4(%rbx),%xmm1
mulss  %xmm0,%xmm1
movss  %xmm1,0x4(%rbx)
cmp    $0xfffffffffffffffd,%rdi
ja     1240 <sgemm_beta+0x130>
movss  0x8(%rbx),%xmm1
mulss  %xmm0,%xmm1
movss  %xmm1,0x8(%rbx)
cmp    $0x2,%r11d
je     1240 <sgemm_beta+0x130>
movss  0xc(%rbx),%xmm1
mulss  %xmm0,%xmm1
movss  %xmm1,0xc(%rbx)
cmpq   $0xfffffffffffffffd,(%rsp)
ja     1240 <sgemm_beta+0x130>
movss  0x10(%rbx),%xmm1
mulss  %xmm0,%xmm1
movss  %xmm1,0x10(%rbx)
cmp    $0x4,%r11d
je     1240 <sgemm_beta+0x130>
movss  0x14(%rbx),%xmm1
mulss  %xmm0,%xmm1
movss  %xmm1,0x14(%rbx)
cmpq   $0xfffffffffffffffd,0x20(%rsp)
ja     1240 <sgemm_beta+0x130>
movss  0x18(%rbx),%xmm1
mulss  %xmm0,%xmm1
movss  %xmm1,0x18(%rbx)
jmp    1240 <sgemm_beta+0x130>
xor    %eax,%eax
add    $0x28,%rsp
pop    %rbx
pop    %r12
pop    %r13
pop    %r14
pop    %r15
pop    %rbp
ret

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

LLVM IR (-O2):
define i32 @sgemm_beta(i64 %0, i64 %1, i64 %2, float %3, float* nocapture readnone %4, i64 %5, float* nocapture readnone %6, i64 %7, float* nocapture %8, i64 %9) {
%11 = fcmp oeq float %3, 0.000000e+00
%12 = ashr i64 %0, 3
%13 = icmp sgt i64 %0, 7
%14 = and i64 %0, 7
%15 = icmp eq i64 %14, 0
%16 = add nsw i64 %12, 1
%17 = call i64 @llvm.smin.i64(i64 %12, i64 1)
%18 = sub i64 %16, %17
br i1 %11, label %40, label %19
19: ; preds = %10
%20 = icmp ult i64 %18, 4
%21 = and i64 %18, -4
%22 = shl i64 %21, 3
%23 = sub i64 %12, %21
%24 = insertelement <4 x float> poison, float %3, i64 0
%25 = shufflevector <4 x float> %24, <4 x float> poison, <4 x i32> zeroinitializer
%26 = icmp eq i64 %18, %21
%27 = insertelement <4 x float> poison, float %3, i64 0
%28 = shufflevector <4 x float> %27, <4 x float> poison, <4 x i32> zeroinitializer
%29 = icmp ugt i64 %14, 1
%30 = add nsw i64 %14, -3
%31 = icmp ult i64 %30, -2
%32 = and i64 %0, 6
%33 = icmp eq i64 %32, 2
%34 = add nsw i64 %14, -5
%35 = icmp ult i64 %34, -2
%36 = and i64 %0, 6
%37 = icmp eq i64 %36, 4
%38 = add nsw i64 %14, -7
%39 = icmp ult i64 %38, -2
br label %63
40: ; preds = %10
%41 = shl nuw i64 %18, 5
%42 = add i64 %0, 8
%43 = and i64 %42, -8
%44 = mul i64 %17, -8
%45 = add i64 %44, %43
%46 = getelementptr float, float* %8, i64 %45
%47 = shl nuw nsw i64 %14, 2
br label %48
48: ; preds = %40, %59
%49 = phi float* [ %46, %40 ], [ %62, %59 ]
%50 = phi float* [ %8, %40 ], [ %53, %59 ]
%51 = phi i64 [ %1, %40 ], [ %60, %59 ]
%52 = bitcast float* %50 to i8*
%53 = getelementptr inbounds float, float* %50, i64 %9
br i1 %13, label %54, label %56
54: ; preds = %48
%55 = bitcast float* %49 to i8*
br label %56
56: ; preds = %54, %48
%57 = phi i8* [ %55, %54 ], [ %52, %48 ]
br i1 %15, label %59, label %58
58: ; preds = %56
br label %59
59: ; preds = %58, %56
%60 = add nsw i64 %51, -1
%61 = icmp sgt i64 %51, 1
%62 = getelementptr float, float* %49, i64 %9
br i1 %61, label %48, label %155
63: ; preds = %19, %152
%64 = phi float* [ %66, %152 ], [ %8, %19 ]
%65 = phi i64 [ %153, %152 ], [ %1, %19 ]
%66 = getelementptr inbounds float, float* %64, i64 %9
br i1 %13, label %67, label %123
67: ; preds = %63
br i1 %20, label %105, label %68
68: ; preds = %67
%69 = getelementptr float, float* %64, i64 %22
br label %70
70: ; preds = %70, %68
%71 = phi i64 [ 0, %68 ], [ %102, %70 ]
%72 = shl i64 %71, 3
%73 = getelementptr float, float* %64, i64 %72
%74 = bitcast float* %73 to <32 x float>*
%75 = load <32 x float>, <32 x float>* %74
%76 = shufflevector <32 x float> %75, <32 x float> poison, <4 x i32> <i32 0, i32 8, i32 16, i32 24>
%77 = shufflevector <32 x float> %75, <32 x float> poison, <4 x i32> <i32 1, i32 9, i32 17, i32 25>
%78 = shufflevector <32 x float> %75, <32 x float> poison, <4 x i32> <i32 2, i32 10, i32 18, i32 26>
%79 = shufflevector <32 x float> %75, <32 x float> poison, <4 x i32> <i32 3, i32 11, i32 19, i32 27>
%80 = shufflevector <32 x float> %75, <32 x float> poison, <4 x i32> <i32 4, i32 12, i32 20, i32 28>
%81 = shufflevector <32 x float> %75, <32 x float> poison, <4 x i32> <i32 5, i32 13, i32 21, i32 29>
%82 = shufflevector <32 x float> %75, <32 x float> poison, <4 x i32> <i32 6, i32 14, i32 22, i32 30>
%83 = shufflevector <32 x float> %75, <32 x float> poison, <4 x i32> <i32 7, i32 15, i32 23, i32 31>
%84 = getelementptr inbounds float, float* %73, i64 7
%85 = fmul <4 x float> %76, %25
%86 = fmul <4 x float> %77, %25
%87 = fmul <4 x float> %78, %25
%88 = fmul <4 x float> %79, %25
%89 = fmul <4 x float> %80, %25
%90 = fmul <4 x float> %81, %25
%91 = fmul <4 x float> %82, %25
%92 = fmul <4 x float> %83, %25
%93 = getelementptr inbounds float, float* %84, i64 -7
%94 = bitcast float* %93 to <32 x float>*
%95 = shufflevector <4 x float> %85, <4 x float> %86, <8 x i32> <i32 0, i32 1, i32 2, i32 3, i32 4, i32 5, i32 6, i32 7>
%96 = shufflevector <4 x float> %87, <4 x float> %88, <8 x i32> <i32 0, i32 1, i32 2, i32 3, i32 4, i32 5, i32 6, i32 7>
%97 = shufflevector <4 x float> %89, <4 x float> %90, <8 x i32> <i32 0, i32 1, i32 2, i32 3, i32 4, i32 5, i32 6, i32 7>
%98 = shufflevector <4 x float> %91, <4 x float> %92, <8 x i32> <i32 0, i32 1, i32 2, i32 3, i32 4, i32 5, i32 6, i32 7>
%99 = shufflevector <8 x float> %95, <8 x float> %96, <16 x i32> <i32 0, i32 1, i32 2, i32 3, i32 4, i32 5, i32 6, i32 7, i32 8, i32 9, i32 10, i32 11, i32 12, i32 13, i32 14, i32 15>
%100 = shufflevector <8 x float> %97, <8 x float> %98, <16 x i32> <i32 0, i32 1, i32 2, i32 3, i32 4, i32 5, i32 6, i32 7, i32 8, i32 9, i32 10, i32 11, i32 12, i32 13, i32 14, i32 15>
%101 = shufflevector <16 x float> %99, <16 x float> %100, <32 x i32> <i32 0, i32 4, i32 8, i32 12, i32 16, i32 20, i32 24, i32 28, i32 1, i32 5, i32 9, i32 13, i32 17, i32 21, i32 25, i32 29, i32 2, i32 6, i32 10, i32 14, i32 18, i32 22, i32 26, i32 30, i32 3, i32 7, i32 11, i32 15, i32 19, i32 23, i32 27, i32 31>
store <32 x float> %101, <32 x float>* %94
%102 = add nuw i64 %71, 4
%103 = icmp eq i64 %102, %21
br i1 %103, label %104, label %70
104: ; preds = %70
br i1 %26, label %123, label %105
105: ; preds = %67, %104
%106 = phi float* [ %64, %67 ], [ %69, %104 ]
%107 = phi i64 [ %12, %67 ], [ %23, %104 ]
br label %108
108: ; preds = %105, %108
%109 = phi float* [ %120, %108 ], [ %106, %105 ]
%110 = phi i64 [ %121, %108 ], [ %107, %105 ]
%111 = bitcast float* %109 to <4 x float>*
%112 = load <4 x float>, <4 x float>* %111
%113 = getelementptr inbounds float, float* %109, i64 4
%114 = bitcast float* %113 to <4 x float>*
%115 = load <4 x float>, <4 x float>* %114
%116 = fmul <4 x float> %112, %28
%117 = fmul <4 x float> %115, %28
%118 = bitcast float* %109 to <4 x float>*
store <4 x float> %116, <4 x float>* %118
%119 = bitcast float* %113 to <4 x float>*
store <4 x float> %117, <4 x float>* %119
%120 = getelementptr inbounds float, float* %109, i64 8
%121 = add nsw i64 %110, -1
%122 = icmp sgt i64 %110, 1
br i1 %122, label %108, label %123
123: ; preds = %108, %104, %63
%124 = phi float* [ %64, %63 ], [ %69, %104 ], [ %120, %108 ]
br i1 %15, label %152, label %125
125: ; preds = %123
%126 = load float, float* %124
%127 = fmul float %126, %3
store float %127, float* %124
%128 = getelementptr inbounds float, float* %124, i64 1
br i1 %29, label %129, label %152
129: ; preds = %125
%130 = load float, float* %128
%131 = fmul float %130, %3
store float %131, float* %128
%132 = getelementptr inbounds float, float* %124, i64 2
br i1 %31, label %133, label %152
133: ; preds = %129
%134 = load float, float* %132
%135 = fmul float %134, %3
store float %135, float* %132
%136 = getelementptr inbounds float, float* %124, i64 3
br i1 %33, label %152, label %137
137: ; preds = %133
%138 = load float, float* %136
%139 = fmul float %138, %3
store float %139, float* %136
%140 = getelementptr inbounds float, float* %124, i64 4
br i1 %35, label %141, label %152
141: ; preds = %137
%142 = load float, float* %140
%143 = fmul float %142, %3
store float %143, float* %140
%144 = getelementptr inbounds float, float* %124, i64 5
br i1 %37, label %152, label %145
145: ; preds = %141
%146 = load float, float* %144
%147 = fmul float %146, %3
store float %147, float* %144
%148 = getelementptr inbounds float, float* %124, i64 6
br i1 %39, label %149, label %152
149: ; preds = %145
%150 = load float, float* %148
%151 = fmul float %150, %3
store float %151, float* %148
br label %152
152: ; preds = %125, %129, %133, %137, %141, %145, %149, %123
%153 = add nsw i64 %65, -1
%154 = icmp sgt i64 %65, 1
br i1 %154, label %63, label %155
155: ; preds = %152, %59
ret i32 0
}