void solSistema(double **A, double *B, double *v) {
  int i;
  double k;
  for (i = 1; i < 5; i++) {
    k = -A[i][i - 1] / A[i - 1][i - 1];
    A[i][i] = A[i][i] + k * A[i - 1][i];
    B[i] = B[i] + k * B[i - 1];
  }
  v[5 - 1] = B[5 - 1] / A[5 - 1][5 - 1];
  for (i = 5 - 2; i >= 0; i--) {
    v[i] = (B[i] - A[i][i + 1] * v[i + 1]) / A[i][i];
  }
  for (i = 7 - 2; i > 0; i--)
    v[i] = v[i - 1];
  v[0] = 0;
  v[6] = 0;
}


x86 assembly (clang, -O0):
<solSistema>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %rdx,-0x18(%rbp)
movl   $0x1,-0x1c(%rbp)
cmpl   $0x5,-0x1c(%rbp)
jge    120e <solSistema+0x10e>
mov    -0x8(%rbp),%rax
movslq -0x1c(%rbp),%rcx
mov    (%rax,%rcx,8),%rax
mov    -0x1c(%rbp),%ecx
sub    $0x1,%ecx
movslq %ecx,%rcx
movsd  (%rax,%rcx,8),%xmm0
movq   %xmm0,%rax
movabs $0x8000000000000000,%rcx
xor    %rcx,%rax
movq   %rax,%xmm0
mov    -0x8(%rbp),%rax
mov    -0x1c(%rbp),%ecx
sub    $0x1,%ecx
movslq %ecx,%rcx
mov    (%rax,%rcx,8),%rax
mov    -0x1c(%rbp),%ecx
sub    $0x1,%ecx
movslq %ecx,%rcx
divsd  (%rax,%rcx,8),%xmm0
movsd  %xmm0,-0x28(%rbp)
mov    -0x8(%rbp),%rax
movslq -0x1c(%rbp),%rcx
mov    (%rax,%rcx,8),%rax
movslq -0x1c(%rbp),%rcx
movsd  (%rax,%rcx,8),%xmm1
movsd  -0x28(%rbp),%xmm0
mov    -0x8(%rbp),%rax
mov    -0x1c(%rbp),%ecx
sub    $0x1,%ecx
movslq %ecx,%rcx
mov    (%rax,%rcx,8),%rax
movslq -0x1c(%rbp),%rcx
movsd  (%rax,%rcx,8),%xmm2
mulsd  %xmm2,%xmm0
addsd  %xmm1,%xmm0
mov    -0x8(%rbp),%rax
movslq -0x1c(%rbp),%rcx
mov    (%rax,%rcx,8),%rax
movslq -0x1c(%rbp),%rcx
movsd  %xmm0,(%rax,%rcx,8)
mov    -0x10(%rbp),%rax
movslq -0x1c(%rbp),%rcx
movsd  (%rax,%rcx,8),%xmm1
movsd  -0x28(%rbp),%xmm0
mov    -0x10(%rbp),%rax
mov    -0x1c(%rbp),%ecx
sub    $0x1,%ecx
movslq %ecx,%rcx
movsd  (%rax,%rcx,8),%xmm2
mulsd  %xmm2,%xmm0
addsd  %xmm1,%xmm0
mov    -0x10(%rbp),%rax
movslq -0x1c(%rbp),%rcx
movsd  %xmm0,(%rax,%rcx,8)
mov    -0x1c(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x1c(%rbp)
jmp    1117 <solSistema+0x17>
mov    -0x10(%rbp),%rax
movsd  0x20(%rax),%xmm0
mov    -0x8(%rbp),%rax
mov    0x20(%rax),%rax
divsd  0x20(%rax),%xmm0
mov    -0x18(%rbp),%rax
movsd  %xmm0,0x20(%rax)
movl   $0x3,-0x1c(%rbp)
cmpl   $0x0,-0x1c(%rbp)
jl     12c6 <solSistema+0x1c6>
mov    -0x10(%rbp),%rax
movslq -0x1c(%rbp),%rcx
movsd  (%rax,%rcx,8),%xmm1
mov    -0x8(%rbp),%rax
movslq -0x1c(%rbp),%rcx
mov    (%rax,%rcx,8),%rax
mov    -0x1c(%rbp),%ecx
add    $0x1,%ecx
movslq %ecx,%rcx
movsd  (%rax,%rcx,8),%xmm0
mov    -0x18(%rbp),%rax
mov    -0x1c(%rbp),%ecx
add    $0x1,%ecx
movslq %ecx,%rcx
movsd  (%rax,%rcx,8),%xmm2
movq   %xmm0,%rax
movabs $0x8000000000000000,%rcx
xor    %rcx,%rax
movq   %rax,%xmm0
mulsd  %xmm2,%xmm0
addsd  %xmm1,%xmm0
mov    -0x8(%rbp),%rax
movslq -0x1c(%rbp),%rcx
mov    (%rax,%rcx,8),%rax
movslq -0x1c(%rbp),%rcx
divsd  (%rax,%rcx,8),%xmm0
mov    -0x18(%rbp),%rax
movslq -0x1c(%rbp),%rcx
movsd  %xmm0,(%rax,%rcx,8)
mov    -0x1c(%rbp),%eax
add    $0xffffffff,%eax
mov    %eax,-0x1c(%rbp)
jmp    1234 <solSistema+0x134>
movl   $0x5,-0x1c(%rbp)
cmpl   $0x0,-0x1c(%rbp)
jle    1304 <solSistema+0x204>
mov    -0x18(%rbp),%rax
mov    -0x1c(%rbp),%ecx
sub    $0x1,%ecx
movslq %ecx,%rcx
movsd  (%rax,%rcx,8),%xmm0
mov    -0x18(%rbp),%rax
movslq -0x1c(%rbp),%rcx
movsd  %xmm0,(%rax,%rcx,8)
mov    -0x1c(%rbp),%eax
add    $0xffffffff,%eax
mov    %eax,-0x1c(%rbp)
jmp    12cd <solSistema+0x1cd>
mov    -0x18(%rbp),%rax
xorps  %xmm0,%xmm0
movsd  %xmm0,(%rax)
mov    -0x18(%rbp),%rax
xorps  %xmm0,%xmm0
movsd  %xmm0,0x30(%rax)
pop    %rbp
ret

x86 assembly (clang, -O2):
<solSistema>:
mov    (%rdi),%r8
mov    0x8(%rdi),%r9
movsd  (%r9),%xmm1
movapd 0xeec(%rip),%xmm0
xorpd  %xmm0,%xmm1
divsd  (%r8),%xmm1
movsd  0x8(%r8),%xmm2
mulsd  %xmm1,%xmm2
addsd  0x8(%r9),%xmm2
movsd  %xmm2,0x8(%r9)
mulsd  (%rsi),%xmm1
addsd  0x8(%rsi),%xmm1
movsd  %xmm1,0x8(%rsi)
mov    0x10(%rdi),%rax
movsd  0x8(%rax),%xmm1
xorpd  %xmm0,%xmm1
divsd  0x8(%r9),%xmm1
movsd  0x10(%r9),%xmm2
mulsd  %xmm1,%xmm2
addsd  0x10(%rax),%xmm2
movsd  %xmm2,0x10(%rax)
mulsd  0x8(%rsi),%xmm1
addsd  0x10(%rsi),%xmm1
movsd  %xmm1,0x10(%rsi)
mov    0x18(%rdi),%rcx
movsd  0x10(%rcx),%xmm1
xorpd  %xmm0,%xmm1
divsd  0x10(%rax),%xmm1
movsd  0x18(%rax),%xmm2
mulsd  %xmm1,%xmm2
addsd  0x18(%rcx),%xmm2
movsd  %xmm2,0x18(%rcx)
mulsd  0x10(%rsi),%xmm1
addsd  0x18(%rsi),%xmm1
movsd  %xmm1,0x18(%rsi)
mov    0x20(%rdi),%rdi
movsd  0x18(%rdi),%xmm1
xorpd  %xmm0,%xmm1
divsd  0x18(%rcx),%xmm1
movsd  0x20(%rcx),%xmm0
mulsd  %xmm1,%xmm0
addsd  0x20(%rdi),%xmm0
movsd  %xmm0,0x20(%rdi)
mulsd  0x18(%rsi),%xmm1
addsd  0x20(%rsi),%xmm1
movsd  %xmm1,0x20(%rsi)
divsd  0x20(%rdi),%xmm1
movsd  %xmm1,0x20(%rdx)
mulsd  0x20(%rcx),%xmm1
movsd  0x18(%rsi),%xmm0
subsd  %xmm1,%xmm0
divsd  0x18(%rcx),%xmm0
movsd  %xmm0,0x18(%rdx)
mulsd  0x18(%rax),%xmm0
movsd  0x10(%rsi),%xmm1
subsd  %xmm0,%xmm1
divsd  0x10(%rax),%xmm1
movsd  %xmm1,0x10(%rdx)
mulsd  0x10(%r9),%xmm1
movsd  0x8(%rsi),%xmm0
subsd  %xmm1,%xmm0
divsd  0x8(%r9),%xmm0
movsd  %xmm0,0x8(%rdx)
movsd  (%rsi),%xmm1
mulsd  0x8(%r8),%xmm0
subsd  %xmm0,%xmm1
divsd  (%r8),%xmm1
movsd  %xmm1,(%rdx)
mov    0x20(%rdx),%rax
movups 0x10(%rdx),%xmm0
movups %xmm0,0x18(%rdx)
movups (%rdx),%xmm0
movups %xmm0,0x8(%rdx)
mov    %rax,0x28(%rdx)
movq   $0x0,(%rdx)
movq   $0x0,0x30(%rdx)
ret

LLVM IR (-O0):
define void @solSistema(double** %0, double* %1, double* %2) {
%4 = alloca double**
%5 = alloca double*
%6 = alloca double*
%7 = alloca i32
%8 = alloca double
store double** %0, double*** %4
store double* %1, double** %5
store double* %2, double** %6
store i32 1, i32* %7
br label %9
9: ; preds = %82, %3
%10 = load i32, i32* %7
%11 = icmp slt i32 %10, 5
br i1 %11, label %12, label %85
12: ; preds = %9
%13 = load double**, double*** %4
%14 = load i32, i32* %7
%15 = sext i32 %14 to i64
%16 = getelementptr inbounds double*, double** %13, i64 %15
%17 = load double*, double** %16
%18 = load i32, i32* %7
%19 = sub nsw i32 %18, 1
%20 = sext i32 %19 to i64
%21 = getelementptr inbounds double, double* %17, i64 %20
%22 = load double, double* %21
%23 = fneg double %22
%24 = load double**, double*** %4
%25 = load i32, i32* %7
%26 = sub nsw i32 %25, 1
%27 = sext i32 %26 to i64
%28 = getelementptr inbounds double*, double** %24, i64 %27
%29 = load double*, double** %28
%30 = load i32, i32* %7
%31 = sub nsw i32 %30, 1
%32 = sext i32 %31 to i64
%33 = getelementptr inbounds double, double* %29, i64 %32
%34 = load double, double* %33
%35 = fdiv double %23, %34
store double %35, double* %8
%36 = load double**, double*** %4
%37 = load i32, i32* %7
%38 = sext i32 %37 to i64
%39 = getelementptr inbounds double*, double** %36, i64 %38
%40 = load double*, double** %39
%41 = load i32, i32* %7
%42 = sext i32 %41 to i64
%43 = getelementptr inbounds double, double* %40, i64 %42
%44 = load double, double* %43
%45 = load double, double* %8
%46 = load double**, double*** %4
%47 = load i32, i32* %7
%48 = sub nsw i32 %47, 1
%49 = sext i32 %48 to i64
%50 = getelementptr inbounds double*, double** %46, i64 %49
%51 = load double*, double** %50
%52 = load i32, i32* %7
%53 = sext i32 %52 to i64
%54 = getelementptr inbounds double, double* %51, i64 %53
%55 = load double, double* %54
%56 = call double @llvm.fmuladd.f64(double %45, double %55, double %44)
%57 = load double**, double*** %4
%58 = load i32, i32* %7
%59 = sext i32 %58 to i64
%60 = getelementptr inbounds double*, double** %57, i64 %59
%61 = load double*, double** %60
%62 = load i32, i32* %7
%63 = sext i32 %62 to i64
%64 = getelementptr inbounds double, double* %61, i64 %63
store double %56, double* %64
%65 = load double*, double** %5
%66 = load i32, i32* %7
%67 = sext i32 %66 to i64
%68 = getelementptr inbounds double, double* %65, i64 %67
%69 = load double, double* %68
%70 = load double, double* %8
%71 = load double*, double** %5
%72 = load i32, i32* %7
%73 = sub nsw i32 %72, 1
%74 = sext i32 %73 to i64
%75 = getelementptr inbounds double, double* %71, i64 %74
%76 = load double, double* %75
%77 = call double @llvm.fmuladd.f64(double %70, double %76, double %69)
%78 = load double*, double** %5
%79 = load i32, i32* %7
%80 = sext i32 %79 to i64
%81 = getelementptr inbounds double, double* %78, i64 %80
store double %77, double* %81
br label %82
82: ; preds = %12
%83 = load i32, i32* %7
%84 = add nsw i32 %83, 1
store i32 %84, i32* %7
br label %9
85: ; preds = %9
%86 = load double*, double** %5
%87 = getelementptr inbounds double, double* %86, i64 4
%88 = load double, double* %87
%89 = load double**, double*** %4
%90 = getelementptr inbounds double*, double** %89, i64 4
%91 = load double*, double** %90
%92 = getelementptr inbounds double, double* %91, i64 4
%93 = load double, double* %92
%94 = fdiv double %88, %93
%95 = load double*, double** %6
%96 = getelementptr inbounds double, double* %95, i64 4
store double %94, double* %96
store i32 3, i32* %7
br label %97
97: ; preds = %138, %85
%98 = load i32, i32* %7
%99 = icmp sge i32 %98, 0
br i1 %99, label %100, label %141
100: ; preds = %97
%101 = load double*, double** %5
%102 = load i32, i32* %7
%103 = sext i32 %102 to i64
%104 = getelementptr inbounds double, double* %101, i64 %103
%105 = load double, double* %104
%106 = load double**, double*** %4
%107 = load i32, i32* %7
%108 = sext i32 %107 to i64
%109 = getelementptr inbounds double*, double** %106, i64 %108
%110 = load double*, double** %109
%111 = load i32, i32* %7
%112 = add nsw i32 %111, 1
%113 = sext i32 %112 to i64
%114 = getelementptr inbounds double, double* %110, i64 %113
%115 = load double, double* %114
%116 = load double*, double** %6
%117 = load i32, i32* %7
%118 = add nsw i32 %117, 1
%119 = sext i32 %118 to i64
%120 = getelementptr inbounds double, double* %116, i64 %119
%121 = load double, double* %120
%122 = fneg double %115
%123 = call double @llvm.fmuladd.f64(double %122, double %121, double %105)
%124 = load double**, double*** %4
%125 = load i32, i32* %7
%126 = sext i32 %125 to i64
%127 = getelementptr inbounds double*, double** %124, i64 %126
%128 = load double*, double** %127
%129 = load i32, i32* %7
%130 = sext i32 %129 to i64
%131 = getelementptr inbounds double, double* %128, i64 %130
%132 = load double, double* %131
%133 = fdiv double %123, %132
%134 = load double*, double** %6
%135 = load i32, i32* %7
%136 = sext i32 %135 to i64
%137 = getelementptr inbounds double, double* %134, i64 %136
store double %133, double* %137
br label %138
138: ; preds = %100
%139 = load i32, i32* %7
%140 = add nsw i32 %139, -1
store i32 %140, i32* %7
br label %97
141: ; preds = %97
store i32 5, i32* %7
br label %142
142: ; preds = %156, %141
%143 = load i32, i32* %7
%144 = icmp sgt i32 %143, 0
br i1 %144, label %145, label %159
145: ; preds = %142
%146 = load double*, double** %6
%147 = load i32, i32* %7
%148 = sub nsw i32 %147, 1
%149 = sext i32 %148 to i64
%150 = getelementptr inbounds double, double* %146, i64 %149
%151 = load double, double* %150
%152 = load double*, double** %6
%153 = load i32, i32* %7
%154 = sext i32 %153 to i64
%155 = getelementptr inbounds double, double* %152, i64 %154
store double %151, double* %155
br label %156
156: ; preds = %145
%157 = load i32, i32* %7
%158 = add nsw i32 %157, -1
store i32 %158, i32* %7
br label %142
159: ; preds = %142
%160 = load double*, double** %6
%161 = getelementptr inbounds double, double* %160, i64 0
store double 0.000000e+00, double* %161
%162 = load double*, double** %6
%163 = getelementptr inbounds double, double* %162, i64 6
store double 0.000000e+00, double* %163
ret void
}

LLVM IR (-O2):
define void @solSistema(double** nocapture %0, double* nocapture %1, double* nocapture %2) {
%4 = bitcast double* %2 to i8*
%5 = getelementptr inbounds double*, double** %0, i64 1
%6 = load double*, double** %5
%7 = load double, double* %6
%8 = fneg double %7
%9 = load double*, double** %0
%10 = load double, double* %9
%11 = fdiv double %8, %10
%12 = getelementptr inbounds double, double* %6, i64 1
%13 = load double, double* %12
%14 = getelementptr inbounds double, double* %9, i64 1
%15 = load double, double* %14
%16 = tail call double @llvm.fmuladd.f64(double %11, double %15, double %13)
store double %16, double* %12
%17 = getelementptr inbounds double, double* %1, i64 1
%18 = load double, double* %17
%19 = load double, double* %1
%20 = tail call double @llvm.fmuladd.f64(double %11, double %19, double %18)
store double %20, double* %17
%21 = getelementptr inbounds double*, double** %0, i64 2
%22 = load double*, double** %21
%23 = getelementptr inbounds double, double* %22, i64 1
%24 = load double, double* %23
%25 = fneg double %24
%26 = load double, double* %12
%27 = fdiv double %25, %26
%28 = getelementptr inbounds double, double* %22, i64 2
%29 = load double, double* %28
%30 = getelementptr inbounds double, double* %6, i64 2
%31 = load double, double* %30
%32 = tail call double @llvm.fmuladd.f64(double %27, double %31, double %29)
store double %32, double* %28
%33 = getelementptr inbounds double, double* %1, i64 2
%34 = load double, double* %33
%35 = load double, double* %17
%36 = tail call double @llvm.fmuladd.f64(double %27, double %35, double %34)
store double %36, double* %33
%37 = getelementptr inbounds double*, double** %0, i64 3
%38 = load double*, double** %37
%39 = getelementptr inbounds double, double* %38, i64 2
%40 = load double, double* %39
%41 = fneg double %40
%42 = load double, double* %28
%43 = fdiv double %41, %42
%44 = getelementptr inbounds double, double* %38, i64 3
%45 = load double, double* %44
%46 = getelementptr inbounds double, double* %22, i64 3
%47 = load double, double* %46
%48 = tail call double @llvm.fmuladd.f64(double %43, double %47, double %45)
store double %48, double* %44
%49 = getelementptr inbounds double, double* %1, i64 3
%50 = load double, double* %49
%51 = load double, double* %33
%52 = tail call double @llvm.fmuladd.f64(double %43, double %51, double %50)
store double %52, double* %49
%53 = getelementptr inbounds double*, double** %0, i64 4
%54 = load double*, double** %53
%55 = getelementptr inbounds double, double* %54, i64 3
%56 = load double, double* %55
%57 = fneg double %56
%58 = load double, double* %44
%59 = fdiv double %57, %58
%60 = getelementptr inbounds double, double* %54, i64 4
%61 = load double, double* %60
%62 = getelementptr inbounds double, double* %38, i64 4
%63 = load double, double* %62
%64 = tail call double @llvm.fmuladd.f64(double %59, double %63, double %61)
store double %64, double* %60
%65 = getelementptr inbounds double, double* %1, i64 4
%66 = load double, double* %65
%67 = load double, double* %49
%68 = tail call double @llvm.fmuladd.f64(double %59, double %67, double %66)
store double %68, double* %65
%69 = load double, double* %60
%70 = fdiv double %68, %69
%71 = getelementptr inbounds double, double* %2, i64 4
store double %70, double* %71
%72 = load double, double* %49
%73 = load double, double* %62
%74 = fneg double %73
%75 = tail call double @llvm.fmuladd.f64(double %74, double %70, double %72)
%76 = load double, double* %44
%77 = fdiv double %75, %76
%78 = getelementptr inbounds double, double* %2, i64 3
store double %77, double* %78
%79 = load double, double* %33
%80 = load double, double* %46
%81 = fneg double %80
%82 = tail call double @llvm.fmuladd.f64(double %81, double %77, double %79)
%83 = load double, double* %28
%84 = fdiv double %82, %83
%85 = getelementptr inbounds double, double* %2, i64 2
store double %84, double* %85
%86 = load double, double* %17
%87 = load double, double* %30
%88 = fneg double %87
%89 = tail call double @llvm.fmuladd.f64(double %88, double %84, double %86)
%90 = load double, double* %12
%91 = fdiv double %89, %90
%92 = getelementptr double, double* %2, i64 1
store double %91, double* %92
%93 = load double, double* %1
%94 = load double, double* %14
%95 = fneg double %94
%96 = tail call double @llvm.fmuladd.f64(double %95, double %91, double %93)
%97 = load double, double* %9
%98 = fdiv double %96, %97
store double %98, double* %2
%99 = bitcast double* %92 to i8*
store double 0.000000e+00, double* %2
%100 = getelementptr inbounds double, double* %2, i64 6
store double 0.000000e+00, double* %100
ret void
}