int main() {
  int i, j, k;
  int N = 2000;
  double A[2000][2000];
  double B[2000][2000];
  double C[2000][2000];
  double sum;
  for (i = 0; i < N; i++) {
    for (j = 0; j < N; j++) {
      A[i][j] = 1.0;
      B[i][j] = 1.0;
    }
  }
  for (i = 0; i < N; i++) {
    for (j = 0; j < N; j++) {
      sum = 0;
      for (k = 0; k < N; k++) {
        sum = sum + A[i][k] * B[k][j];
      }
      C[i][j] = sum;
    }
  }
  return -1;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x5b8d7b0,%rsp
movl   $0x0,-0x4(%rbp)
movl   $0x7d0,-0x14(%rbp)
movl   $0x0,-0x8(%rbp)
mov    -0x8(%rbp),%eax
cmp    -0x14(%rbp),%eax
jge    11ac <main+0xac>
movl   $0x0,-0xc(%rbp)
mov    -0xc(%rbp),%eax
cmp    -0x14(%rbp),%eax
jge    1199 <main+0x99>
movslq -0x8(%rbp),%rcx
lea    -0x1e84820(%rbp),%rax
imul   $0x3e80,%rcx,%rcx
add    %rcx,%rax
movslq -0xc(%rbp),%rcx
movsd  0xea0(%rip),%xmm0
movsd  %xmm0,(%rax,%rcx,8)
movslq -0x8(%rbp),%rcx
lea    -0x3d09020(%rbp),%rax
imul   $0x3e80,%rcx,%rcx
add    %rcx,%rax
movslq -0xc(%rbp),%rcx
movsd  0xe7a(%rip),%xmm0
movsd  %xmm0,(%rax,%rcx,8)
mov    -0xc(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0xc(%rbp)
jmp    1133 <main+0x33>
jmp    119e <main+0x9e>
mov    -0x8(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x8(%rbp)
jmp    1120 <main+0x20>
movl   $0x0,-0x8(%rbp)
mov    -0x8(%rbp),%eax
cmp    -0x14(%rbp),%eax
jge    1299 <main+0x199>
movl   $0x0,-0xc(%rbp)
mov    -0xc(%rbp),%eax
cmp    -0x14(%rbp),%eax
jge    1286 <main+0x186>
xorps  %xmm0,%xmm0
movsd  %xmm0,-0x5b8d828(%rbp)
fa
movl   $0x0,-0x10(%rbp)
mov    -0x10(%rbp),%eax
cmp    -0x14(%rbp),%eax
jge    1252 <main+0x152>
movsd  -0x5b8d828(%rbp),%xmm1
fa
movslq -0x8(%rbp),%rcx
lea    -0x1e84820(%rbp),%rax
imul   $0x3e80,%rcx,%rcx
add    %rcx,%rax
movslq -0x10(%rbp),%rcx
movsd  (%rax,%rcx,8),%xmm0
movslq -0x10(%rbp),%rcx
lea    -0x3d09020(%rbp),%rax
imul   $0x3e80,%rcx,%rcx
add    %rcx,%rax
movslq -0xc(%rbp),%rcx
movsd  (%rax,%rcx,8),%xmm2
mulsd  %xmm2,%xmm0
addsd  %xmm1,%xmm0
movsd  %xmm0,-0x5b8d828(%rbp)
fa
mov    -0x10(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x10(%rbp)
jmp    11e4 <main+0xe4>
movsd  -0x5b8d828(%rbp),%xmm0
fa
movslq -0x8(%rbp),%rcx
lea    -0x5b8d820(%rbp),%rax
imul   $0x3e80,%rcx,%rcx
add    %rcx,%rax
movslq -0xc(%rbp),%rcx
movsd  %xmm0,(%rax,%rcx,8)
mov    -0xc(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0xc(%rbp)
jmp    11c6 <main+0xc6>
jmp    128b <main+0x18b>
mov    -0x8(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x8(%rbp)
jmp    11b3 <main+0xb3>
mov    $0xffffffff,%eax
add    $0x5b8d7b0,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
mov    $0xffffffff,%eax
ret

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

LLVM IR (-O2):
define i32 @main() {
ret i32 -1
}