Language: C++

#include <cstdio>
#include <stdlib.h>

#include <iostream>
#include <chrono>


#define N 10000

#if _DEBUG
typedef long lli;
#else
typedef long long int  lli;
#endif

lli a[N*N];
lli b[N*N];
lli c[N*N];

int n,m,l;

void mult() {
    lli register t11, t12, t13, t21, t22, t23, t31, t32, t33;
    for(int i=0; i<n/3; i+=3)
        for(int j=0; j<l/3; j+=3)
        {
            t11 = c[i*N + j];
            t12 = c[i*N + (j+1)];
            t13 = c[i*N + (j+2)];
            t21 = c[(i+1)*N + j];
            t22 = c[(i+1)*N + (j+1)];
            t23 = c[(i+1)*N + (j+2)];
            t31 = c[(i+2)*N + j];
            t32 = c[(i+2)*N + (j+1)];
            t33 = c[(i+2)*N + (j+2)];
            for(int k=0; k<m; k++) {
                t11 += a[i*N + k] * b[k*N + j];
                t12 += a[i*N + k] * b[k*N + (j+1)];
                t13 += a[i*N + k] * b[k*N + (j+2)];
                t21 += a[(i+1)*N + k] * b[k*N + j];
                t22 += a[(i+1)*N + k] * b[k*N + (j+1)];
                t23 += a[(i+1)*N + k] * b[k*N + (j+2)];
                t31 += a[(i+2)*N + k] * b[k*N + j];
                t32 += a[(i+2)*N + k] * b[k*N + (j+1)];
                t33 += a[(i+2)*N + k] * b[k*N + (j+2)];
            }
            c[i*N + j] = t11;
            c[i*N + (j+1)] = t12;
            c[i*N + (j+2)] = t13;
            c[(i+1)*N + j] = t21;
            c[(i+1)*N + (j+1)] = t22;
            c[(i+1)*N + (j+2)] = t23;
            c[(i+2)*N + j] = t31;
            c[(i+2)*N + (j+1)] = t32;
            c[(i+2)*N + (j+2)] = t33;
        }
    for(int i=0; i<n/3; i+=3)
        for(int j=(l/3)*3; j<l; j++)
        {
            t11 = c[i*N + j];
            t21 = c[(i+1)*N + j];
            t31 = c[(i+2)*N + j];
            for(int k=0; k<m; k++) {
                t11 += a[i*N + k] * b[k*N + j];
                t21 += a[(i+1)*N + k] * b[k*N + j];
                t31 += a[(i+2)*N + k] * b[k*N + j];
            }
            c[i*N + j] = t11;
            c[(i+1)*N + j] = t21;
            c[(i+2)*N + j] = t31;
        }
    for(int i=(n/3)*3; i<n; i++)
        for(int j=(l/3)*3; j<l; j++)
        {
            t11 = c[i*N + j];
            for(int k=0; k<m; k++)
                t11 += a[i*N + k] * b[k*N + j];
            c[i*N + j] = t11;
        }

}

int main(void) {
#if _DEBUG
    for(n=2; n<N; n*=2) {
        m=l=n;
#else
        scanf("%d%d%d", &l, &m, &n);
#endif


#if _DEBUG
        for(int i=0; i<n; i++)
            for(int j=0; j<m; j++)
                a[i*N + j] = rand();
        for(int i=0; i<m; i++)
            for(int j=0; j<l; j++)
                b[i*N + j] = rand();
#else
        for(int i=0; i<n; i++)
            for(int j=0; j<m; j++)
                scanf("%lld", &a[i*N + j]);
        for(int i=0; i<m; i++)
            for(int j=0; j<l; j++)
                scanf("%lld", &b[i*N + j]);
#endif
        for(int i=0; i<n; i++)
            for(int j=0; j<l; j++)
                c[i*N + j] = 0;

        auto start = std::chrono::system_clock::now();
        mult();
        auto end = std::chrono::system_clock::now();

#if _DEBUG
        auto dur = end-start;
        auto msec = std::chrono::duration_cast<std::chrono::milliseconds>(dur).count();
        std::cout << n << ":" << msec << " milli sec" << std::endl;
    }
#else
    for(int i=0; i<n; i++)
    {
        for(int j=0; j<l-1; j++)
            printf("%lld ", c[i*N + j]);
        printf("%lld", c[i*N + l-1]);
        printf("\n");
    }
#endif
    return 0;
}

Compiler output:
a.cc: In function 'void mult()':
a.cc:23:18: warning: ISO C++17 does not allow 'register' storage class specifier [-Wregister]
   23 |     lli register t11, t12, t13, t21, t22, t23, t31, t32, t33;
      |                  ^~~
a.cc:23:23: warning: ISO C++17 does not allow 'register' storage class specifier [-Wregister]
   23 |     lli register t11, t12, t13, t21, t22, t23, t31, t32, t33;
      |                       ^~~
a.cc:23:28: warning: ISO C++17 does not allow 'register' storage class specifier [-Wregister]
   23 |     lli register t11, t12, t13, t21, t22, t23, t31, t32, t33;
      |                            ^~~
a.cc:23:33: warning: ISO C++17 does not allow 'register' storage class specifier [-Wregister]
   23 |     lli register t11, t12, t13, t21, t22, t23, t31, t32, t33;
      |                                 ^~~
a.cc:23:38: warning: ISO C++17 does not allow 'register' storage class specifier [-Wregister]
   23 |     lli register t11, t12, t13, t21, t22, t23, t31, t32, t33;
      |                                      ^~~
a.cc:23:43: warning: ISO C++17 does not allow 'register' storage class specifier [-Wregister]
   23 |     lli register t11, t12, t13, t21, t22, t23, t31, t32, t33;
      |                                           ^~~
a.cc:23:48: warning: ISO C++17 does not allow 'register' storage class specifier [-Wregister]
   23 |     lli register t11, t12, t13, t21, t22, t23, t31, t32, t33;
      |                                                ^~~
a.cc:23:53: warning: ISO C++17 does not allow 'register' storage class specifier [-Wregister]
   23 |     lli register t11, t12, t13, t21, t22, t23, t31, t32, t33;
      |                                                     ^~~
a.cc:23:58: warning: ISO C++17 does not allow 'register' storage class specifier [-Wregister]
   23 |     lli register t11, t12, t13, t21, t22, t23, t31, t32, t33;
      |                                                          ^~~
/tmp/cc1rT7tL.o: in function `mult()':
a.cc:(.text+0x493): relocation truncated to fit: R_X86_64_PC32 against symbol `m' defined in .bss section in /tmp/cc1rT7tL.o
a.cc:(.text+0x611): relocation truncated to fit: R_X86_64_PC32 against symbol `l' defined in .bss section in /tmp/cc1rT7tL.o
a.cc:(.text+0x63a): relocation truncated to fit: R_X86_64_PC32 against symbol `n' defined in .bss section in /tmp/cc1rT7tL.o
a.cc:(.text+0x66b): relocation truncated to fit: R_X86_64_PC32 against symbol `l' defined in .bss section in /tmp/cc1rT7tL.o
a.cc:(.text+0x7fe): relocation truncated to fit: R_X86_64_PC32 against symbol `m' defined in .bss section in /tmp/cc1rT7tL.o
a.cc:(.text+0x880): relocation truncated to fit: R_X86_64_PC32 against symbol `l' defined in .bss section in /tmp/cc1rT7tL.o
a.cc:(.text+0x893): relocation truncated to fit: R_X86_64_PC32 against symbol `n' defined in .bss section in /tmp/cc1rT7tL.o
a.cc:(.text+0x8b8): relocation truncated to fit: R_X86_64_PC32 against symbol `n' defined in .bss section in /tmp/cc1rT7tL.o
a.cc:(.text+0x8df): relocation truncated to fit: R_X86_64_PC32 against symbol `l' defined in .bss section in /tmp/cc1rT7tL.o
a.cc:(.text+0x983): relocation truncated to fit: R_X86_64_PC32 against symbol `m' defined in .bss section in /tmp/cc1rT7tL.o
a.cc:(.text+0x9b5): additional relocation overflows omitted from the output
collect2: error: ld returned 1 exit status