void matmlt(matp, matq, matr, nby3) double matp[4][4];
double matq[10][4], matr[10][4];
int nby3;
{
  register int l, m, j;
  for (l = 1; l <= nby3; l++) {
    for (m = 1; m <= 3; m++) {
      matr[l][m] = 0.0;
      for (j = 1; j <= 3; j++) {
        matr[l][m] = matr[l][m] + (matq[l][j] * matp[j][m]);
      }
    }
  }
}


x86 assembly (clang, -O0):
<matmlt>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %rdx,-0x18(%rbp)
mov    %ecx,-0x1c(%rbp)
movl   $0x1,-0x20(%rbp)
mov    -0x20(%rbp),%eax
cmp    -0x1c(%rbp),%eax
jg     11ff <matmlt+0xff>
movl   $0x1,-0x24(%rbp)
cmpl   $0x3,-0x24(%rbp)
jg     11ec <matmlt+0xec>
mov    -0x18(%rbp),%rax
movslq -0x20(%rbp),%rcx
shl    $0x5,%rcx
add    %rcx,%rax
movslq -0x24(%rbp),%rcx
xorps  %xmm0,%xmm0
movsd  %xmm0,(%rax,%rcx,8)
movl   $0x1,-0x28(%rbp)
cmpl   $0x3,-0x28(%rbp)
jg     11d9 <matmlt+0xd9>
mov    -0x18(%rbp),%rax
movslq -0x20(%rbp),%rcx
shl    $0x5,%rcx
add    %rcx,%rax
movslq -0x24(%rbp),%rcx
movsd  (%rax,%rcx,8),%xmm1
mov    -0x10(%rbp),%rax
movslq -0x20(%rbp),%rcx
shl    $0x5,%rcx
add    %rcx,%rax
movslq -0x28(%rbp),%rcx
movsd  (%rax,%rcx,8),%xmm0
mov    -0x8(%rbp),%rax
movslq -0x28(%rbp),%rcx
shl    $0x5,%rcx
add    %rcx,%rax
movslq -0x24(%rbp),%rcx
movsd  (%rax,%rcx,8),%xmm2
mulsd  %xmm2,%xmm0
addsd  %xmm1,%xmm0
mov    -0x18(%rbp),%rax
movslq -0x20(%rbp),%rcx
shl    $0x5,%rcx
add    %rcx,%rax
movslq -0x24(%rbp),%rcx
movsd  %xmm0,(%rax,%rcx,8)
mov    -0x28(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x28(%rbp)
jmp    1159 <matmlt+0x59>
jmp    11de <matmlt+0xde>
mov    -0x24(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x24(%rbp)
jmp    112d <matmlt+0x2d>
jmp    11f1 <matmlt+0xf1>
mov    -0x20(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x20(%rbp)
jmp    111a <matmlt+0x1a>
pop    %rbp
ret

x86 assembly (clang, -O2):
<matmlt>:
test   %ecx,%ecx
jle    1205 <matmlt+0x105>
mov    %ecx,%eax
shl    $0x5,%rax
xor    %ecx,%ecx
xorpd  %xmm0,%xmm0
cs nopw 0x0(%rax,%rax,1)
xchg   %ax,%ax
movq   $0x0,0x28(%rdx,%rcx,1)
movsd  0x28(%rsi,%rcx,1),%xmm1
mulsd  0x28(%rdi),%xmm1
addsd  %xmm0,%xmm1
movsd  %xmm1,0x28(%rdx,%rcx,1)
movsd  0x30(%rsi,%rcx,1),%xmm2
mulsd  0x48(%rdi),%xmm2
addsd  %xmm1,%xmm2
movsd  %xmm2,0x28(%rdx,%rcx,1)
movsd  0x38(%rsi,%rcx,1),%xmm1
mulsd  0x68(%rdi),%xmm1
addsd  %xmm2,%xmm1
movsd  %xmm1,0x28(%rdx,%rcx,1)
movq   $0x0,0x30(%rdx,%rcx,1)
movsd  0x28(%rsi,%rcx,1),%xmm1
mulsd  0x30(%rdi),%xmm1
addsd  %xmm0,%xmm1
movsd  %xmm1,0x30(%rdx,%rcx,1)
movsd  0x30(%rsi,%rcx,1),%xmm2
mulsd  0x50(%rdi),%xmm2
addsd  %xmm1,%xmm2
movsd  %xmm2,0x30(%rdx,%rcx,1)
movsd  0x38(%rsi,%rcx,1),%xmm1
mulsd  0x70(%rdi),%xmm1
addsd  %xmm2,%xmm1
movsd  %xmm1,0x30(%rdx,%rcx,1)
movq   $0x0,0x38(%rdx,%rcx,1)
movsd  0x28(%rsi,%rcx,1),%xmm1
mulsd  0x38(%rdi),%xmm1
addsd  %xmm0,%xmm1
movsd  %xmm1,0x38(%rdx,%rcx,1)
movsd  0x30(%rsi,%rcx,1),%xmm2
mulsd  0x58(%rdi),%xmm2
addsd  %xmm1,%xmm2
movsd  %xmm2,0x38(%rdx,%rcx,1)
movsd  0x38(%rsi,%rcx,1),%xmm1
mulsd  0x78(%rdi),%xmm1
addsd  %xmm2,%xmm1
movsd  %xmm1,0x38(%rdx,%rcx,1)
add    $0x20,%rcx
cmp    %rcx,%rax
jne    1120 <matmlt+0x20>
ret

LLVM IR (-O0):
define void @matmlt([4 x double]* %0, [4 x double]* %1, [4 x double]* %2, i32 %3) {
%5 = alloca [4 x double]*
%6 = alloca [4 x double]*
%7 = alloca [4 x double]*
%8 = alloca i32
%9 = alloca i32
%10 = alloca i32
%11 = alloca i32
store [4 x double]* %0, [4 x double]** %5
store [4 x double]* %1, [4 x double]** %6
store [4 x double]* %2, [4 x double]** %7
store i32 %3, i32* %8
store i32 1, i32* %9
br label %12
12: ; preds = %72, %4
%13 = load i32, i32* %9
%14 = load i32, i32* %8
%15 = icmp sle i32 %13, %14
br i1 %15, label %16, label %75
16: ; preds = %12
store i32 1, i32* %10
br label %17
17: ; preds = %68, %16
%18 = load i32, i32* %10
%19 = icmp sle i32 %18, 3
br i1 %19, label %20, label %71
20: ; preds = %17
%21 = load [4 x double]*, [4 x double]** %7
%22 = load i32, i32* %9
%23 = sext i32 %22 to i64
%24 = getelementptr inbounds [4 x double], [4 x double]* %21, i64 %23
%25 = load i32, i32* %10
%26 = sext i32 %25 to i64
%27 = getelementptr inbounds [4 x double], [4 x double]* %24, i64 0, i64 %26
store double 0.000000e+00, double* %27
store i32 1, i32* %11
br label %28
28: ; preds = %64, %20
%29 = load i32, i32* %11
%30 = icmp sle i32 %29, 3
br i1 %30, label %31, label %67
31: ; preds = %28
%32 = load [4 x double]*, [4 x double]** %7
%33 = load i32, i32* %9
%34 = sext i32 %33 to i64
%35 = getelementptr inbounds [4 x double], [4 x double]* %32, i64 %34
%36 = load i32, i32* %10
%37 = sext i32 %36 to i64
%38 = getelementptr inbounds [4 x double], [4 x double]* %35, i64 0, i64 %37
%39 = load double, double* %38
%40 = load [4 x double]*, [4 x double]** %6
%41 = load i32, i32* %9
%42 = sext i32 %41 to i64
%43 = getelementptr inbounds [4 x double], [4 x double]* %40, i64 %42
%44 = load i32, i32* %11
%45 = sext i32 %44 to i64
%46 = getelementptr inbounds [4 x double], [4 x double]* %43, i64 0, i64 %45
%47 = load double, double* %46
%48 = load [4 x double]*, [4 x double]** %5
%49 = load i32, i32* %11
%50 = sext i32 %49 to i64
%51 = getelementptr inbounds [4 x double], [4 x double]* %48, i64 %50
%52 = load i32, i32* %10
%53 = sext i32 %52 to i64
%54 = getelementptr inbounds [4 x double], [4 x double]* %51, i64 0, i64 %53
%55 = load double, double* %54
%56 = call double @llvm.fmuladd.f64(double %47, double %55, double %39)
%57 = load [4 x double]*, [4 x double]** %7
%58 = load i32, i32* %9
%59 = sext i32 %58 to i64
%60 = getelementptr inbounds [4 x double], [4 x double]* %57, i64 %59
%61 = load i32, i32* %10
%62 = sext i32 %61 to i64
%63 = getelementptr inbounds [4 x double], [4 x double]* %60, i64 0, i64 %62
store double %56, double* %63
br label %64
64: ; preds = %31
%65 = load i32, i32* %11
%66 = add nsw i32 %65, 1
store i32 %66, i32* %11
br label %28
67: ; preds = %28
br label %68
68: ; preds = %67
%69 = load i32, i32* %10
%70 = add nsw i32 %69, 1
store i32 %70, i32* %10
br label %17
71: ; preds = %17
br label %72
72: ; preds = %71
%73 = load i32, i32* %9
%74 = add nsw i32 %73, 1
store i32 %74, i32* %9
br label %12
75: ; preds = %12
ret void
}

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