void _inner_axpy_trans_nr(double *b0, const double *Ar, const double *Br,
                          double alpha, int nC, int ldB) {
  register int i;
  register double f0;
  f0 = alpha * Br[0];
  for (i = 0; i < nC; i++) {
    b0[0] += f0 * Ar[0];
    b0 += ldB;
    Ar++;
  }
}


x86 assembly (clang, -O0):
<_inner_axpy_trans_nr>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %rdx,-0x18(%rbp)
movsd  %xmm0,-0x20(%rbp)
mov    %ecx,-0x24(%rbp)
mov    %r8d,-0x28(%rbp)
movsd  -0x20(%rbp),%xmm0
mov    -0x18(%rbp),%rax
mulsd  (%rax),%xmm0
movsd  %xmm0,-0x38(%rbp)
movl   $0x0,-0x2c(%rbp)
mov    -0x2c(%rbp),%eax
cmp    -0x24(%rbp),%eax
jge    1191 <_inner_axpy_trans_nr+0x91>
movsd  -0x38(%rbp),%xmm0
mov    -0x10(%rbp),%rax
movsd  (%rax),%xmm2
mov    -0x8(%rbp),%rax
movsd  (%rax),%xmm1
mulsd  %xmm2,%xmm0
addsd  %xmm1,%xmm0
movsd  %xmm0,(%rax)
mov    -0x28(%rbp),%ecx
mov    -0x8(%rbp),%rax
movslq %ecx,%rcx
shl    $0x3,%rcx
add    %rcx,%rax
mov    %rax,-0x8(%rbp)
mov    -0x10(%rbp),%rax
add    $0x8,%rax
mov    %rax,-0x10(%rbp)
mov    -0x2c(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x2c(%rbp)
jmp    1135 <_inner_axpy_trans_nr+0x35>
pop    %rbp
ret

x86 assembly (clang, -O2):
<_inner_axpy_trans_nr>:
test   %ecx,%ecx
jle    11dc <_inner_axpy_trans_nr+0xdc>
mulsd  (%rdx),%xmm0
movslq %r8d,%r9
lea    -0x1(%rcx),%eax
cmp    $0x3,%eax
jb     11ac <_inner_axpy_trans_nr+0xac>
mov    %ecx,%r10d
and    $0xfffffffc,%r10d
mov    %r9,%r8
shl    $0x5,%r8
lea    0x0(,%r9,8),%rax
cs nopw 0x0(%rax,%rax,1)
nopl   0x0(%rax,%rax,1)
mov    %rdi,%rdx
movsd  (%rsi),%xmm1
mulsd  %xmm0,%xmm1
addsd  (%rdi),%xmm1
movsd  %xmm1,(%rdi)
add    %rax,%rdi
movsd  0x8(%rsi),%xmm1
mulsd  %xmm0,%xmm1
addsd  (%rdx,%rax,1),%xmm1
movsd  %xmm1,(%rdx,%rax,1)
lea    (%rdi,%rax,1),%r11
movsd  0x10(%rsi),%xmm1
mulsd  %xmm0,%xmm1
addsd  (%rax,%rdi,1),%xmm1
movsd  %xmm1,(%rax,%rdi,1)
lea    (%r11,%rax,1),%rdi
movsd  0x18(%rsi),%xmm1
mulsd  %xmm0,%xmm1
addsd  (%rax,%r11,1),%xmm1
movsd  %xmm1,(%rax,%r11,1)
add    $0x20,%rsi
add    %rax,%rdi
add    $0xfffffffc,%r10d
jne    1140 <_inner_axpy_trans_nr+0x40>
add    %r8,%rdx
mov    %rdx,%rdi
test   $0x3,%cl
je     11dc <_inner_axpy_trans_nr+0xdc>
shl    $0x3,%r9
and    $0x3,%ecx
xor    %eax,%eax
nopw   0x0(%rax,%rax,1)
movsd  (%rsi,%rax,8),%xmm1
mulsd  %xmm0,%xmm1
addsd  (%rdi),%xmm1
movsd  %xmm1,(%rdi)
add    %r9,%rdi
add    $0x1,%rax
cmp    %eax,%ecx
jne    11c0 <_inner_axpy_trans_nr+0xc0>
ret

LLVM IR (-O0):
define void @_inner_axpy_trans_nr(double* %0, double* %1, double* %2, double %3, i32 %4, i32 %5) {
%7 = alloca double*
%8 = alloca double*
%9 = alloca double*
%10 = alloca double
%11 = alloca i32
%12 = alloca i32
%13 = alloca i32
%14 = alloca double
store double* %0, double** %7
store double* %1, double** %8
store double* %2, double** %9
store double %3, double* %10
store i32 %4, i32* %11
store i32 %5, i32* %12
%15 = load double, double* %10
%16 = load double*, double** %9
%17 = getelementptr inbounds double, double* %16, i64 0
%18 = load double, double* %17
%19 = fmul double %15, %18
store double %19, double* %14
store i32 0, i32* %13
br label %20
20: ; preds = %39, %6
%21 = load i32, i32* %13
%22 = load i32, i32* %11
%23 = icmp slt i32 %21, %22
br i1 %23, label %24, label %42
24: ; preds = %20
%25 = load double, double* %14
%26 = load double*, double** %8
%27 = getelementptr inbounds double, double* %26, i64 0
%28 = load double, double* %27
%29 = load double*, double** %7
%30 = getelementptr inbounds double, double* %29, i64 0
%31 = load double, double* %30
%32 = call double @llvm.fmuladd.f64(double %25, double %28, double %31)
store double %32, double* %30
%33 = load i32, i32* %12
%34 = load double*, double** %7
%35 = sext i32 %33 to i64
%36 = getelementptr inbounds double, double* %34, i64 %35
store double* %36, double** %7
%37 = load double*, double** %8
%38 = getelementptr inbounds double, double* %37, i32 1
store double* %38, double** %8
br label %39
39: ; preds = %24
%40 = load i32, i32* %13
%41 = add nsw i32 %40, 1
store i32 %41, i32* %13
br label %20
42: ; preds = %20
ret void
}

LLVM IR (-O2):
define void @_inner_axpy_trans_nr(double* nocapture %0, double* nocapture %1, double* nocapture %2, double %3, i32 %4, i32 %5) {
%7 = load double, double* %2
%8 = fmul double %7, %3
%9 = icmp sgt i32 %4, 0
br i1 %9, label %10, label %58
10: ; preds = %6
%11 = sext i32 %5 to i64
%12 = add i32 %4, -1
%13 = and i32 %4, 3
%14 = icmp ult i32 %12, 3
br i1 %14, label %43, label %15
15: ; preds = %10
%16 = and i32 %4, -4
br label %17
17: ; preds = %17, %15
%18 = phi double* [ %0, %15 ], [ %39, %17 ]
%19 = phi double* [ %1, %15 ], [ %40, %17 ]
%20 = phi i32 [ 0, %15 ], [ %41, %17 ]
%21 = load double, double* %19
%22 = load double, double* %18
%23 = tail call double @llvm.fmuladd.f64(double %8, double %21, double %22)
store double %23, double* %18
%24 = getelementptr inbounds double, double* %18, i64 %11
%25 = getelementptr inbounds double, double* %19, i64 1
%26 = load double, double* %25
%27 = load double, double* %24
%28 = tail call double @llvm.fmuladd.f64(double %8, double %26, double %27)
store double %28, double* %24
%29 = getelementptr inbounds double, double* %24, i64 %11
%30 = getelementptr inbounds double, double* %19, i64 2
%31 = load double, double* %30
%32 = load double, double* %29
%33 = tail call double @llvm.fmuladd.f64(double %8, double %31, double %32)
store double %33, double* %29
%34 = getelementptr inbounds double, double* %29, i64 %11
%35 = getelementptr inbounds double, double* %19, i64 3
%36 = load double, double* %35
%37 = load double, double* %34
%38 = tail call double @llvm.fmuladd.f64(double %8, double %36, double %37)
store double %38, double* %34
%39 = getelementptr inbounds double, double* %34, i64 %11
%40 = getelementptr inbounds double, double* %19, i64 4
%41 = add i32 %20, 4
%42 = icmp eq i32 %41, %16
br i1 %42, label %43, label %17
43: ; preds = %17, %10
%44 = phi double* [ %0, %10 ], [ %39, %17 ]
%45 = phi double* [ %1, %10 ], [ %40, %17 ]
%46 = icmp eq i32 %13, 0
br i1 %46, label %58, label %47
47: ; preds = %43, %47
%48 = phi double* [ %54, %47 ], [ %44, %43 ]
%49 = phi double* [ %55, %47 ], [ %45, %43 ]
%50 = phi i32 [ %56, %47 ], [ 0, %43 ]
%51 = load double, double* %49
%52 = load double, double* %48
%53 = tail call double @llvm.fmuladd.f64(double %8, double %51, double %52)
store double %53, double* %48
%54 = getelementptr inbounds double, double* %48, i64 %11
%55 = getelementptr inbounds double, double* %49, i64 1
%56 = add i32 %50, 1
%57 = icmp eq i32 %56, %13
br i1 %57, label %58, label %47
58: ; preds = %43, %47, %6
ret void
}