void ForwardElimination(double *A, int N) {
  register int i = 0;
  register double *d, *tl, *t0, *z, *b;
  register double m, m2;
  d = &A[0];
  t0 = &A[1];
  tl = &A[2];
  b = &A[3];
  z = b;
  m2 = *t0;
  *d /= m2;
  *b /= m2;
  b = b + 4;
  t0 = t0 + 4;
  for (i = 1; i < (N - 1); i++) {
    m = *tl;
    tl += 4;
    m2 = (*t0) - (*d) * m;
    t0 += 4;
    d += 4;
    *d /= m2;
    *b = (*b - m * (*z)) / m2;
    b += 4;
    z += 4;
  }
  m = *tl;
  m2 = (*t0) - (*d) * m;
  *b = (*b - m * (*z)) / m2;
}


x86 assembly (clang, -O0):
<ForwardElimination>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
movl   $0x0,-0x10(%rbp)
mov    -0x8(%rbp),%rax
mov    %rax,-0x18(%rbp)
mov    -0x8(%rbp),%rax
add    $0x8,%rax
mov    %rax,-0x28(%rbp)
mov    -0x8(%rbp),%rax
add    $0x10,%rax
mov    %rax,-0x20(%rbp)
mov    -0x8(%rbp),%rax
add    $0x18,%rax
mov    %rax,-0x38(%rbp)
mov    -0x38(%rbp),%rax
mov    %rax,-0x30(%rbp)
mov    -0x28(%rbp),%rax
movsd  (%rax),%xmm0
movsd  %xmm0,-0x48(%rbp)
movsd  -0x48(%rbp),%xmm1
mov    -0x18(%rbp),%rax
movsd  (%rax),%xmm0
divsd  %xmm1,%xmm0
movsd  %xmm0,(%rax)
movsd  -0x48(%rbp),%xmm1
mov    -0x38(%rbp),%rax
movsd  (%rax),%xmm0
divsd  %xmm1,%xmm0
movsd  %xmm0,(%rax)
mov    -0x38(%rbp),%rax
add    $0x20,%rax
mov    %rax,-0x38(%rbp)
mov    -0x28(%rbp),%rax
add    $0x20,%rax
mov    %rax,-0x28(%rbp)
movl   $0x1,-0x10(%rbp)
mov    -0x10(%rbp),%eax
mov    -0xc(%rbp),%ecx
sub    $0x1,%ecx
cmp    %ecx,%eax
jge    1293 <ForwardElimination+0x193>
mov    -0x20(%rbp),%rax
movsd  (%rax),%xmm0
movsd  %xmm0,-0x40(%rbp)
mov    -0x20(%rbp),%rax
add    $0x20,%rax
mov    %rax,-0x20(%rbp)
mov    -0x28(%rbp),%rax
movsd  (%rax),%xmm1
mov    -0x18(%rbp),%rax
movsd  (%rax),%xmm0
movsd  -0x40(%rbp),%xmm2
movq   %xmm0,%rax
movabs $0x8000000000000000,%rcx
xor    %rcx,%rax
movq   %rax,%xmm0
mulsd  %xmm2,%xmm0
addsd  %xmm1,%xmm0
movsd  %xmm0,-0x48(%rbp)
mov    -0x28(%rbp),%rax
add    $0x20,%rax
mov    %rax,-0x28(%rbp)
mov    -0x18(%rbp),%rax
add    $0x20,%rax
mov    %rax,-0x18(%rbp)
movsd  -0x48(%rbp),%xmm1
mov    -0x18(%rbp),%rax
movsd  (%rax),%xmm0
divsd  %xmm1,%xmm0
movsd  %xmm0,(%rax)
mov    -0x38(%rbp),%rax
movsd  (%rax),%xmm1
movsd  -0x40(%rbp),%xmm0
mov    -0x30(%rbp),%rax
movsd  (%rax),%xmm2
movq   %xmm0,%rax
movabs $0x8000000000000000,%rcx
xor    %rcx,%rax
movq   %rax,%xmm0
mulsd  %xmm2,%xmm0
addsd  %xmm1,%xmm0
divsd  -0x48(%rbp),%xmm0
mov    -0x38(%rbp),%rax
movsd  %xmm0,(%rax)
mov    -0x38(%rbp),%rax
add    $0x20,%rax
mov    %rax,-0x38(%rbp)
mov    -0x30(%rbp),%rax
add    $0x20,%rax
mov    %rax,-0x30(%rbp)
mov    -0x10(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x10(%rbp)
jmp    119c <ForwardElimination+0x9c>
mov    -0x20(%rbp),%rax
movsd  (%rax),%xmm0
movsd  %xmm0,-0x40(%rbp)
mov    -0x28(%rbp),%rax
movsd  (%rax),%xmm1
mov    -0x18(%rbp),%rax
movsd  (%rax),%xmm0
movsd  -0x40(%rbp),%xmm2
movq   %xmm0,%rax
movabs $0x8000000000000000,%rcx
xor    %rcx,%rax
movq   %rax,%xmm0
mulsd  %xmm2,%xmm0
addsd  %xmm1,%xmm0
movsd  %xmm0,-0x48(%rbp)
mov    -0x38(%rbp),%rax
movsd  (%rax),%xmm1
movsd  -0x40(%rbp),%xmm0
mov    -0x30(%rbp),%rax
movsd  (%rax),%xmm2
movq   %xmm0,%rax
movabs $0x8000000000000000,%rcx
xor    %rcx,%rax
movq   %rax,%xmm0
mulsd  %xmm2,%xmm0
addsd  %xmm1,%xmm0
divsd  -0x48(%rbp),%xmm0
mov    -0x38(%rbp),%rax
movsd  %xmm0,(%rax)
pop    %rbp
ret

x86 assembly (clang, -O2):
<ForwardElimination>:
lea    0x10(%rdi),%rcx
movsd  (%rdi),%xmm0
movhpd 0x18(%rdi),%xmm0
movsd  0x8(%rdi),%xmm1
unpcklpd %xmm1,%xmm1
divpd  %xmm1,%xmm0
movlpd %xmm0,(%rdi)
movhpd %xmm0,0x18(%rdi)
lea    0x38(%rdi),%rax
add    $0x28,%rdi
cmp    $0x3,%esi
jl     1192 <ForwardElimination+0x92>
add    $0xfffffffe,%esi
xor    %edx,%edx
cs nopw 0x0(%rax,%rax,1)
nop
movsd  0x18(%rcx),%xmm1
movsd  (%rcx),%xmm2
movsd  0x10(%rcx),%xmm3
mulsd  %xmm2,%xmm0
subsd  %xmm0,%xmm1
movapd %xmm3,%xmm0
divsd  %xmm1,%xmm0
movsd  %xmm0,0x10(%rcx)
movsd  0x28(%rcx),%xmm3
mulsd  0x8(%rcx),%xmm2
subsd  %xmm2,%xmm3
divsd  %xmm1,%xmm3
movsd  %xmm3,0x28(%rcx)
add    $0x20,%rcx
add    $0xffffffffffffffe0,%rdx
add    $0xffffffff,%esi
jne    1140 <ForwardElimination+0x40>
movhpd 0x8(%rcx),%xmm0
sub    %rdx,%rax
sub    %rdx,%rdi
movsd  (%rcx),%xmm1
movsd  (%rdi),%xmm2
movapd %xmm0,%xmm3
mulsd  %xmm1,%xmm3
subsd  %xmm3,%xmm2
movsd  (%rax),%xmm3
unpckhpd %xmm0,%xmm0
mulsd  %xmm1,%xmm0
subsd  %xmm0,%xmm3
divsd  %xmm2,%xmm3
movsd  %xmm3,(%rax)
ret

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

LLVM IR (-O2):
define void @ForwardElimination(double* nocapture %0, i32 %1) {
%3 = getelementptr inbounds double, double* %0, i64 1
%4 = getelementptr inbounds double, double* %0, i64 2
%5 = getelementptr inbounds double, double* %0, i64 3
%6 = load double, double* %3
%7 = load double, double* %0
%8 = load double, double* %5
%9 = insertelement <2 x double> poison, double %7, i64 0
%10 = insertelement <2 x double> %9, double %8, i64 1
%11 = insertelement <2 x double> poison, double %6, i64 0
%12 = shufflevector <2 x double> %11, <2 x double> poison, <2 x i32> zeroinitializer
%13 = fdiv <2 x double> %10, %12
%14 = extractelement <2 x double> %13, i64 0
store double %14, double* %0
%15 = extractelement <2 x double> %13, i64 1
store double %15, double* %5
%16 = getelementptr inbounds double, double* %0, i64 7
%17 = getelementptr inbounds double, double* %0, i64 5
%18 = add i32 %1, -1
%19 = icmp sgt i32 %1, 2
br i1 %19, label %20, label %51
20: ; preds = %2, %20
%21 = phi double [ %46, %20 ], [ %14, %2 ]
%22 = phi double* [ %42, %20 ], [ %16, %2 ]
%23 = phi double* [ %43, %20 ], [ %5, %2 ]
%24 = phi double* [ %33, %20 ], [ %17, %2 ]
%25 = phi double* [ %29, %20 ], [ %4, %2 ]
%26 = phi double* [ %34, %20 ], [ %0, %2 ]
%27 = phi i32 [ %44, %20 ], [ 1, %2 ]
%28 = load double, double* %25
%29 = getelementptr inbounds double, double* %25, i64 4
%30 = load double, double* %24
%31 = fneg double %21
%32 = tail call double @llvm.fmuladd.f64(double %31, double %28, double %30)
%33 = getelementptr inbounds double, double* %24, i64 4
%34 = getelementptr inbounds double, double* %26, i64 4
%35 = load double, double* %34
%36 = fdiv double %35, %32
store double %36, double* %34
%37 = load double, double* %22
%38 = load double, double* %23
%39 = fneg double %28
%40 = tail call double @llvm.fmuladd.f64(double %39, double %38, double %37)
%41 = fdiv double %40, %32
store double %41, double* %22
%42 = getelementptr inbounds double, double* %22, i64 4
%43 = getelementptr inbounds double, double* %23, i64 4
%44 = add nuw nsw i32 %27, 1
%45 = icmp eq i32 %44, %18
%46 = load double, double* %34
br i1 %45, label %47, label %20
47: ; preds = %20
%48 = load double, double* %43
%49 = insertelement <2 x double> poison, double %46, i64 0
%50 = insertelement <2 x double> %49, double %48, i64 1
br label %51
51: ; preds = %47, %2
%52 = phi double* [ %4, %2 ], [ %29, %47 ]
%53 = phi double* [ %17, %2 ], [ %33, %47 ]
%54 = phi double* [ %16, %2 ], [ %42, %47 ]
%55 = phi <2 x double> [ %13, %2 ], [ %50, %47 ]
%56 = load double, double* %52
%57 = load double, double* %53
%58 = extractelement <2 x double> %55, i64 0
%59 = fneg double %58
%60 = tail call double @llvm.fmuladd.f64(double %59, double %56, double %57)
%61 = load double, double* %54
%62 = fneg double %56
%63 = extractelement <2 x double> %55, i64 1
%64 = tail call double @llvm.fmuladd.f64(double %62, double %63, double %61)
%65 = fdiv double %64, %60
store double %65, double* %54
ret void
}