int main() {
  static int n, i, j;
  static double **a, Emin, sum;
  n = 400;
  a = (double **)malloc(sizeof(double *) * (n + 1));
  for (i = 0; i < (n + 1); i++) {
    a[i] = (double *)malloc(sizeof(double) * (n + 1));
  }
  for (i = 1; i <= n; i++) {
    for (j = i; j <= n; j++) {
      a[i][j] = (double)i + (double)j;
      a[j][i] = a[i][j];
    }
  }
  sum = 0.0;
  for (i = 1; i <= n; i++) {
    for (j = 1; j <= n; j++) {
      sum += fabs(a[i][j]);
    }
  }
  printf("sum=%18.15f\n", sum);
  Emin = find_Emin(n, a);
  printf("Emin=%18.15f\n", Emin);
  for (i = 0; i < (n + 1); i++) {
    free(a[i]);
  }
  free(a);
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
movl   $0x190,0x2eef(%rip)
mov    0x2ee9(%rip),%eax
add    $0x1,%eax
movslq %eax,%rdi
shl    $0x3,%rdi
call   1050 <malloc@plt>
mov    %rax,0x2ee3(%rip)
movl   $0x0,0x2ecd(%rip)
mov    0x2ec7(%rip),%eax
mov    0x2ebd(%rip),%ecx
add    $0x1,%ecx
cmp    %ecx,%eax
jge    11d4 <main+0x94>
mov    0x2eac(%rip),%eax
add    $0x1,%eax
movslq %eax,%rdi
shl    $0x3,%rdi
call   1050 <malloc@plt>
mov    %rax,%rdx
mov    0x2ea3(%rip),%rax
movslq 0x2e90(%rip),%rcx
mov    %rdx,(%rax,%rcx,8)
mov    0x2e86(%rip),%eax
add    $0x1,%eax
mov    %eax,0x2e7d(%rip)
jmp    117f <main+0x3f>
movl   $0x1,0x2e6e(%rip)
mov    0x2e68(%rip),%eax
cmp    0x2e5e(%rip),%eax
jg     12a9 <main+0x169>
mov    0x2e56(%rip),%eax
mov    %eax,0x2e54(%rip)
mov    0x2e4e(%rip),%eax
cmp    0x2e40(%rip),%eax
jg     1290 <main+0x150>
cvtsi2sdl 0x2e36(%rip),%xmm0
cvtsi2sdl 0x2e32(%rip),%xmm1
addsd  %xmm1,%xmm0
mov    0x2e2f(%rip),%rax
movslq 0x2e1c(%rip),%rcx
mov    (%rax,%rcx,8),%rax
movslq 0x2e15(%rip),%rcx
movsd  %xmm0,(%rax,%rcx,8)
mov    0x2e11(%rip),%rax
movslq 0x2dfe(%rip),%rcx
mov    (%rax,%rcx,8),%rax
movslq 0x2df7(%rip),%rcx
movsd  (%rax,%rcx,8),%xmm0
mov    0x2df3(%rip),%rax
movslq 0x2de4(%rip),%rcx
mov    (%rax,%rcx,8),%rax
movslq 0x2dd5(%rip),%rcx
movsd  %xmm0,(%rax,%rcx,8)
mov    0x2dce(%rip),%eax
add    $0x1,%eax
mov    %eax,0x2dc5(%rip)
jmp    11fc <main+0xbc>
jmp    1295 <main+0x155>
mov    0x2db1(%rip),%eax
add    $0x1,%eax
mov    %eax,0x2da8(%rip)
jmp    11de <main+0x9e>
xorps  %xmm0,%xmm0
movsd  %xmm0,0x2db4(%rip)
movl   $0x1,0x2d8e(%rip)
mov    0x2d88(%rip),%eax
cmp    0x2d7e(%rip),%eax
jg     1352 <main+0x212>
movl   $0x1,0x2d76(%rip)
mov    0x2d70(%rip),%eax
cmp    0x2d62(%rip),%eax
jg     1339 <main+0x1f9>
mov    0x2d65(%rip),%rax
movslq 0x2d52(%rip),%rcx
mov    (%rax,%rcx,8),%rax
movslq 0x2d4b(%rip),%rcx
movsd  (%rax,%rcx,8),%xmm0
movaps 0xcef(%rip),%xmm1
pand   %xmm1,%xmm0
addsd  0x2d4b(%rip),%xmm0
movsd  %xmm0,0x2d43(%rip)
mov    0x2d25(%rip),%eax
add    $0x1,%eax
mov    %eax,0x2d1c(%rip)
jmp    12da <main+0x19a>
jmp    133e <main+0x1fe>
mov    0x2d08(%rip),%eax
add    $0x1,%eax
mov    %eax,0x2cff(%rip)
jmp    12be <main+0x17e>
movsd  0x2d0e(%rip),%xmm0
lea    0xcaf(%rip),%rdi
mov    $0x1,%al
call   1040 <printf@plt>
mov    0x2cda(%rip),%edi
mov    0x2ce3(%rip),%rsi
mov    $0x0,%al
call   1060 <find_Emin@plt>
cvtsi2sd %eax,%xmm0
movsd  %xmm0,0x2cd8(%rip)
movsd  0x2cd0(%rip),%xmm0
lea    0xc86(%rip),%rdi
mov    $0x1,%al
call   1040 <printf@plt>
movl   $0x0,0x2ca4(%rip)
mov    0x2c9e(%rip),%eax
mov    0x2c94(%rip),%ecx
add    $0x1,%ecx
cmp    %ecx,%eax
jge    13ea <main+0x2aa>
mov    0x2c92(%rip),%rax
movslq 0x2c7f(%rip),%rcx
mov    (%rax,%rcx,8),%rdi
call   1030 <free@plt>
mov    0x2c70(%rip),%eax
add    $0x1,%eax
mov    %eax,0x2c67(%rip)
jmp    13a8 <main+0x268>
mov    0x2c67(%rip),%rdi
call   1030 <free@plt>
mov    -0x4(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %r15
push   %r14
push   %rbx
movb   $0x1,0x2efc(%rip)
mov    $0xc88,%edi
call   1050 <malloc@plt>
mov    %rax,%r14
mov    %rax,0x2ef0(%rip)
xor    %ebx,%ebx
cs nopw 0x0(%rax,%rax,1)
nopl   0x0(%rax)
mov    $0xc88,%edi
call   1050 <malloc@plt>
mov    %rax,(%r14,%rbx,8)
add    $0x1,%rbx
cmp    $0x191,%rbx
jne    1170 <main+0x30>
mov    $0x1,%eax
jmp    11ac <main+0x6c>
cs nopw 0x0(%rax,%rax,1)
nopl   0x0(%rax)
add    $0x1,%rax
cmp    $0x191,%rax
je     1208 <main+0xc8>
xorps  %xmm0,%xmm0
cvtsi2sd %eax,%xmm0
mov    (%r14,%rax,8),%rcx
movapd %xmm0,%xmm1
addsd  %xmm0,%xmm1
movsd  %xmm1,(%rcx,%rax,8)
lea    0x1(%rax),%rdx
cmp    $0x191,%rdx
je     11a0 <main+0x60>
cs nopw 0x0(%rax,%rax,1)
nopl   0x0(%rax,%rax,1)
mov    (%r14,%rdx,8),%rsi
xorps  %xmm1,%xmm1
cvtsi2sd %edx,%xmm1
addsd  %xmm0,%xmm1
movsd  %xmm1,(%rcx,%rdx,8)
movsd  %xmm1,(%rsi,%rax,8)
add    $0x1,%rdx
cmp    $0x191,%rdx
jne    11e0 <main+0xa0>
jmp    11a0 <main+0x60>
xorpd  %xmm0,%xmm0
mov    $0x1,%eax
movapd 0xde7(%rip),%xmm1
nopl   0x0(%rax)
mov    (%r14,%rax,8),%rcx
mov    $0x5,%edx
nopl   0x0(%rax)
movsd  -0x20(%rcx,%rdx,8),%xmm2
movsd  -0x18(%rcx,%rdx,8),%xmm3
movsd  -0x10(%rcx,%rdx,8),%xmm4
movsd  -0x8(%rcx,%rdx,8),%xmm5
andpd  %xmm1,%xmm2
addsd  %xmm0,%xmm2
andpd  %xmm1,%xmm3
addsd  %xmm2,%xmm3
andpd  %xmm1,%xmm4
addsd  %xmm3,%xmm4
andpd  %xmm1,%xmm5
addsd  %xmm4,%xmm5
movsd  (%rcx,%rdx,8),%xmm0
andpd  %xmm1,%xmm0
addsd  %xmm5,%xmm0
add    $0x5,%rdx
cmp    $0x195,%rdx
jne    1230 <main+0xf0>
add    $0x1,%rax
cmp    $0x191,%rax
jne    1220 <main+0xe0>
lea    0xd7b(%rip),%rdi
mov    $0x1,%al
call   1040 <printf@plt>
xor    %ebx,%ebx
cmpb   $0x0,0x2da3(%rip)
mov    $0x190,%edi
cmove  %ebx,%edi
mov    0x2d9c(%rip),%rsi
xor    %eax,%eax
call   1060 <find_Emin@plt>
xorps  %xmm0,%xmm0
cvtsi2sd %eax,%xmm0
lea    0xd54(%rip),%rdi
mov    $0x1,%al
call   1040 <printf@plt>
mov    0x2d79(%rip),%r14
cmpb   $0x0,0x2d6a(%rip)
mov    $0x191,%eax
mov    $0x1,%r15d
cmovne %rax,%r15
nopl   (%rax)
mov    (%r14,%rbx,8),%rdi
call   1030 <free@plt>
add    $0x1,%rbx
cmp    %rbx,%r15
jne    12f0 <main+0x1b0>
mov    %r14,%rdi
call   1030 <free@plt>
xor    %eax,%eax
pop    %rbx
pop    %r14
pop    %r15
ret

LLVM IR (-O0):
@main.n = internal global i32 0
@main.i = internal global i32 0
@main.j = internal global i32 0
@main.a = internal global double** null
@main.Emin = internal global double 0.000000e+00
@main.sum = internal global double 0.000000e+00
@.str = [13 x i8] c"sum=%18.15f\0A\00"
@.str.1 = [14 x i8] c"Emin=%18.15f\0A\00"
define i32 @main() {
%1 = alloca i32
store i32 0, i32* %1
store i32 400, i32* @main.n
%2 = load i32, i32* @main.n
%3 = add nsw i32 %2, 1
%4 = sext i32 %3 to i64
%5 = mul i64 8, %4
%6 = call i8* @malloc(i64 %5)
%7 = bitcast i8* %6 to double**
store double** %7, double*** @main.a
store i32 0, i32* @main.i
br label %8
8: ; preds = %24, %0
%9 = load i32, i32* @main.i
%10 = load i32, i32* @main.n
%11 = add nsw i32 %10, 1
%12 = icmp slt i32 %9, %11
br i1 %12, label %13, label %27
13: ; preds = %8
%14 = load i32, i32* @main.n
%15 = add nsw i32 %14, 1
%16 = sext i32 %15 to i64
%17 = mul i64 8, %16
%18 = call i8* @malloc(i64 %17)
%19 = bitcast i8* %18 to double*
%20 = load double**, double*** @main.a
%21 = load i32, i32* @main.i
%22 = sext i32 %21 to i64
%23 = getelementptr inbounds double*, double** %20, i64 %22
store double* %19, double** %23
br label %24
24: ; preds = %13
%25 = load i32, i32* @main.i
%26 = add nsw i32 %25, 1
store i32 %26, i32* @main.i
br label %8
27: ; preds = %8
store i32 1, i32* @main.i
br label %28
28: ; preds = %73, %27
%29 = load i32, i32* @main.i
%30 = load i32, i32* @main.n
%31 = icmp sle i32 %29, %30
br i1 %31, label %32, label %76
32: ; preds = %28
%33 = load i32, i32* @main.i
store i32 %33, i32* @main.j
br label %34
34: ; preds = %69, %32
%35 = load i32, i32* @main.j
%36 = load i32, i32* @main.n
%37 = icmp sle i32 %35, %36
br i1 %37, label %38, label %72
38: ; preds = %34
%39 = load i32, i32* @main.i
%40 = sitofp i32 %39 to double
%41 = load i32, i32* @main.j
%42 = sitofp i32 %41 to double
%43 = fadd double %40, %42
%44 = load double**, double*** @main.a
%45 = load i32, i32* @main.i
%46 = sext i32 %45 to i64
%47 = getelementptr inbounds double*, double** %44, i64 %46
%48 = load double*, double** %47
%49 = load i32, i32* @main.j
%50 = sext i32 %49 to i64
%51 = getelementptr inbounds double, double* %48, i64 %50
store double %43, double* %51
%52 = load double**, double*** @main.a
%53 = load i32, i32* @main.i
%54 = sext i32 %53 to i64
%55 = getelementptr inbounds double*, double** %52, i64 %54
%56 = load double*, double** %55
%57 = load i32, i32* @main.j
%58 = sext i32 %57 to i64
%59 = getelementptr inbounds double, double* %56, i64 %58
%60 = load double, double* %59
%61 = load double**, double*** @main.a
%62 = load i32, i32* @main.j
%63 = sext i32 %62 to i64
%64 = getelementptr inbounds double*, double** %61, i64 %63
%65 = load double*, double** %64
%66 = load i32, i32* @main.i
%67 = sext i32 %66 to i64
%68 = getelementptr inbounds double, double* %65, i64 %67
store double %60, double* %68
br label %69
69: ; preds = %38
%70 = load i32, i32* @main.j
%71 = add nsw i32 %70, 1
store i32 %71, i32* @main.j
br label %34
72: ; preds = %34
br label %73
73: ; preds = %72
%74 = load i32, i32* @main.i
%75 = add nsw i32 %74, 1
store i32 %75, i32* @main.i
br label %28
76: ; preds = %28
store double 0.000000e+00, double* @main.sum
store i32 1, i32* @main.i
br label %77
77: ; preds = %103, %76
%78 = load i32, i32* @main.i
%79 = load i32, i32* @main.n
%80 = icmp sle i32 %78, %79
br i1 %80, label %81, label %106
81: ; preds = %77
store i32 1, i32* @main.j
br label %82
82: ; preds = %99, %81
%83 = load i32, i32* @main.j
%84 = load i32, i32* @main.n
%85 = icmp sle i32 %83, %84
br i1 %85, label %86, label %102
86: ; preds = %82
%87 = load double**, double*** @main.a
%88 = load i32, i32* @main.i
%89 = sext i32 %88 to i64
%90 = getelementptr inbounds double*, double** %87, i64 %89
%91 = load double*, double** %90
%92 = load i32, i32* @main.j
%93 = sext i32 %92 to i64
%94 = getelementptr inbounds double, double* %91, i64 %93
%95 = load double, double* %94
%96 = call double @llvm.fabs.f64(double %95)
%97 = load double, double* @main.sum
%98 = fadd double %97, %96
store double %98, double* @main.sum
br label %99
99: ; preds = %86
%100 = load i32, i32* @main.j
%101 = add nsw i32 %100, 1
store i32 %101, i32* @main.j
br label %82
102: ; preds = %82
br label %103
103: ; preds = %102
%104 = load i32, i32* @main.i
%105 = add nsw i32 %104, 1
store i32 %105, i32* @main.i
br label %77
106: ; preds = %77
%107 = load double, double* @main.sum
%108 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([13 x i8], [13 x i8]* @.str, i64 0, i64 0), double %107)
%109 = load i32, i32* @main.n
%110 = load double**, double*** @main.a
%111 = call i32 (i32, double**, ...) bitcast (i32 (...)* @find_Emin to i32 (i32, double**, ...)*)(i32 %109, double** %110)
%112 = sitofp i32 %111 to double
store double %112, double* @main.Emin
%113 = load double, double* @main.Emin
%114 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([14 x i8], [14 x i8]* @.str.1, i64 0, i64 0), double %113)
store i32 0, i32* @main.i
br label %115
115: ; preds = %127, %106
%116 = load i32, i32* @main.i
%117 = load i32, i32* @main.n
%118 = add nsw i32 %117, 1
%119 = icmp slt i32 %116, %118
br i1 %119, label %120, label %130
120: ; preds = %115
%121 = load double**, double*** @main.a
%122 = load i32, i32* @main.i
%123 = sext i32 %122 to i64
%124 = getelementptr inbounds double*, double** %121, i64 %123
%125 = load double*, double** %124
%126 = bitcast double* %125 to i8*
br label %127
127: ; preds = %120
%128 = load i32, i32* @main.i
%129 = add nsw i32 %128, 1
store i32 %129, i32* @main.i
br label %115
130: ; preds = %115
%131 = load double**, double*** @main.a
%132 = bitcast double** %131 to i8*
%133 = load i32, i32* %1
ret i32 %133
}

LLVM IR (-O2):
@main.n = internal unnamed_addr global i1 false
@main.a = internal unnamed_addr global double** null
@.str = [13 x i8] c"sum=%18.15f\0A\00"
@.str.1 = [14 x i8] c"Emin=%18.15f\0A\00"
define i32 @main() {
store i1 true, i1* @main.n
%1 = tail call dereferenceable_or_null(3208) i8* @malloc(i64 3208)
store i8* %1, i8** bitcast (double*** @main.a to i8**)
%2 = bitcast i8* %1 to double**
br label %3
3: ; preds = %0, %3
%4 = phi i64 [ 0, %0 ], [ %8, %3 ]
%5 = tail call dereferenceable_or_null(3208) i8* @malloc(i64 3208)
%6 = getelementptr inbounds double*, double** %2, i64 %4
%7 = bitcast double** %6 to i8**
store i8* %5, i8** %7
%8 = add nuw nsw i64 %4, 1
%9 = icmp eq i64 %8, 401
br i1 %9, label %10, label %3
10: ; preds = %3, %33
%11 = phi i64 [ %34, %33 ], [ 1, %3 ]
%12 = trunc i64 %11 to i32
%13 = sitofp i32 %12 to double
%14 = getelementptr inbounds double*, double** %2, i64 %11
%15 = load double*, double** %14
%16 = trunc i64 %11 to i32
%17 = sitofp i32 %16 to double
%18 = fadd double %13, %17
%19 = getelementptr inbounds double, double* %15, i64 %11
store double %18, double* %19
%20 = add nuw nsw i64 %11, 1
%21 = icmp eq i64 %20, 401
br i1 %21, label %33, label %22
22: ; preds = %10, %22
%23 = phi i64 [ %31, %22 ], [ %20, %10 ]
%24 = getelementptr inbounds double*, double** %2, i64 %23
%25 = load double*, double** %24
%26 = trunc i64 %23 to i32
%27 = sitofp i32 %26 to double
%28 = fadd double %13, %27
%29 = getelementptr inbounds double, double* %15, i64 %23
store double %28, double* %29
%30 = getelementptr inbounds double, double* %25, i64 %11
store double %28, double* %30
%31 = add nuw nsw i64 %23, 1
%32 = icmp eq i64 %31, 401
br i1 %32, label %33, label %22
33: ; preds = %22, %10
%34 = add nuw nsw i64 %11, 1
%35 = icmp eq i64 %34, 401
br i1 %35, label %36, label %10
36: ; preds = %33, %70
%37 = phi i64 [ %71, %70 ], [ 1, %33 ]
%38 = phi double [ %67, %70 ], [ 0.000000e+00, %33 ]
%39 = getelementptr inbounds double*, double** %2, i64 %37
%40 = load double*, double** %39
br label %41
41: ; preds = %41, %36
%42 = phi i64 [ 1, %36 ], [ %68, %41 ]
%43 = phi double [ %38, %36 ], [ %67, %41 ]
%44 = getelementptr inbounds double, double* %40, i64 %42
%45 = load double, double* %44
%46 = tail call double @llvm.fabs.f64(double %45)
%47 = fadd double %43, %46
%48 = add nuw nsw i64 %42, 1
%49 = getelementptr inbounds double, double* %40, i64 %48
%50 = load double, double* %49
%51 = tail call double @llvm.fabs.f64(double %50)
%52 = fadd double %47, %51
%53 = add nuw nsw i64 %42, 2
%54 = getelementptr inbounds double, double* %40, i64 %53
%55 = load double, double* %54
%56 = tail call double @llvm.fabs.f64(double %55)
%57 = fadd double %52, %56
%58 = add nuw nsw i64 %42, 3
%59 = getelementptr inbounds double, double* %40, i64 %58
%60 = load double, double* %59
%61 = tail call double @llvm.fabs.f64(double %60)
%62 = fadd double %57, %61
%63 = add nuw nsw i64 %42, 4
%64 = getelementptr inbounds double, double* %40, i64 %63
%65 = load double, double* %64
%66 = tail call double @llvm.fabs.f64(double %65)
%67 = fadd double %62, %66
%68 = add nuw nsw i64 %42, 5
%69 = icmp eq i64 %68, 401
br i1 %69, label %70, label %41
70: ; preds = %41
%71 = add nuw nsw i64 %37, 1
%72 = icmp eq i64 %71, 401
br i1 %72, label %73, label %36
73: ; preds = %70
%74 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([13 x i8], [13 x i8]* @.str, i64 0, i64 0), double %67)
%75 = load i1, i1* @main.n
%76 = select i1 %75, i32 400, i32 0
%77 = load double**, double*** @main.a
%78 = tail call i32 (i32, double**, ...) bitcast (i32 (...)* @find_Emin to i32 (i32, double**, ...)*)(i32 %76, double** %77)
%79 = sitofp i32 %78 to double
%80 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([14 x i8], [14 x i8]* @.str.1, i64 0, i64 0), double %79)
%81 = load i1, i1* @main.n
%82 = load double**, double*** @main.a
%83 = select i1 %81, i64 401, i64 1
br label %84
84: ; preds = %73, %84
%85 = phi i64 [ 0, %73 ], [ %89, %84 ]
%86 = getelementptr inbounds double*, double** %82, i64 %85
%87 = bitcast double** %86 to i8**
%88 = load i8*, i8** %87
tail call void @free(i8* %88)
%89 = add nuw nsw i64 %85, 1
%90 = icmp eq i64 %89, %83
br i1 %90, label %91, label %84
91: ; preds = %84
%92 = bitcast double** %82 to i8*
tail call void @free(i8* %92)
ret i32 0
}