void advance(const double h, const double a[restrict 3],
             const double b[restrict 1], const double u[restrict 1],
             double y[restrict 3]) {
  const double rhs[3] = {y[0], y[1], y[2] + b[0] * u[0]};
  const double cof[3][3] = {
      {h * (a[2] + a[1] * h) + 1, h * (a[2] * h + 1), h * h},
      {-a[0] * h * h, a[2] * h + 1, h},
      {-a[0] * h, -h * (a[1] + a[0] * h), 1}};
  const double det = h * (h * (a[0] * h + a[1]) + a[2]) + 1;
  for (int i = 0; i < 3; ++i) {
    y[i] = 0;
    for (int j = 0; j < 3; ++j) {
      y[i] += cof[i][j] * rhs[j];
    }
    y[i] /= det;
  }
}


x86 assembly (clang, -O0):
<advance>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
movsd  %xmm0,-0x8(%rbp)
mov    %rdi,-0x10(%rbp)
mov    %rsi,-0x18(%rbp)
mov    %rdx,-0x20(%rbp)
mov    %rcx,-0x28(%rbp)
mov    -0x28(%rbp),%rax
movsd  (%rax),%xmm0
movsd  %xmm0,-0x40(%rbp)
mov    -0x28(%rbp),%rax
movsd  0x8(%rax),%xmm0
movsd  %xmm0,-0x38(%rbp)
mov    -0x28(%rbp),%rax
movsd  0x10(%rax),%xmm1
mov    -0x18(%rbp),%rax
movsd  (%rax),%xmm0
mov    -0x20(%rbp),%rax
movsd  (%rax),%xmm2
mulsd  %xmm2,%xmm0
addsd  %xmm1,%xmm0
movsd  %xmm0,-0x30(%rbp)
movsd  -0x8(%rbp),%xmm0
mov    -0x10(%rbp),%rax
movsd  0x10(%rax),%xmm2
mov    -0x10(%rbp),%rax
movsd  0x8(%rax),%xmm1
movsd  -0x8(%rbp),%xmm3
mulsd  %xmm3,%xmm1
addsd  %xmm2,%xmm1
mulsd  %xmm1,%xmm0
movsd  0xe72(%rip),%xmm1
addsd  %xmm1,%xmm0
movsd  %xmm0,-0x90(%rbp)
ff
movsd  -0x8(%rbp),%xmm0
mov    -0x10(%rbp),%rax
movsd  0x10(%rax),%xmm1
movsd  -0x8(%rbp),%xmm2
mulsd  %xmm2,%xmm1
movsd  0xe47(%rip),%xmm2
addsd  %xmm2,%xmm1
mulsd  %xmm1,%xmm0
movsd  %xmm0,-0x88(%rbp)
ff
movsd  -0x8(%rbp),%xmm0
mulsd  -0x8(%rbp),%xmm0
movsd  %xmm0,-0x80(%rbp)
mov    -0x10(%rbp),%rax
movsd  (%rax),%xmm0
movq   %xmm0,%rax
movabs $0x8000000000000000,%rcx
xor    %rcx,%rax
movq   %rax,%xmm0
mulsd  -0x8(%rbp),%xmm0
mulsd  -0x8(%rbp),%xmm0
movsd  %xmm0,-0x78(%rbp)
mov    -0x10(%rbp),%rax
movsd  0x10(%rax),%xmm0
movsd  -0x8(%rbp),%xmm1
mulsd  %xmm1,%xmm0
movsd  0xde0(%rip),%xmm1
addsd  %xmm1,%xmm0
movsd  %xmm0,-0x70(%rbp)
movsd  -0x8(%rbp),%xmm0
movsd  %xmm0,-0x68(%rbp)
mov    -0x10(%rbp),%rax
movsd  (%rax),%xmm0
movq   %xmm0,%rax
movabs $0x8000000000000000,%rcx
xor    %rcx,%rax
movq   %rax,%xmm0
mulsd  -0x8(%rbp),%xmm0
movsd  %xmm0,-0x60(%rbp)
movsd  -0x8(%rbp),%xmm0
movq   %xmm0,%rax
movabs $0x8000000000000000,%rcx
xor    %rcx,%rax
movq   %rax,%xmm0
mov    -0x10(%rbp),%rax
movsd  0x8(%rax),%xmm2
mov    -0x10(%rbp),%rax
movsd  (%rax),%xmm1
movsd  -0x8(%rbp),%xmm3
mulsd  %xmm3,%xmm1
addsd  %xmm2,%xmm1
mulsd  %xmm1,%xmm0
movsd  %xmm0,-0x58(%rbp)
movsd  0xd59(%rip),%xmm0
movsd  %xmm0,-0x50(%rbp)
movsd  -0x8(%rbp),%xmm0
movsd  -0x8(%rbp),%xmm1
mov    -0x10(%rbp),%rax
movsd  (%rax),%xmm3
movsd  -0x8(%rbp),%xmm4
mov    -0x10(%rbp),%rax
movsd  0x8(%rax),%xmm2
mulsd  %xmm4,%xmm3
addsd  %xmm2,%xmm3
mov    -0x10(%rbp),%rax
movsd  0x10(%rax),%xmm2
mulsd  %xmm3,%xmm1
addsd  %xmm2,%xmm1
mulsd  %xmm1,%xmm0
movsd  0xd0f(%rip),%xmm1
addsd  %xmm1,%xmm0
movsd  %xmm0,-0x98(%rbp)
ff
movl   $0x0,-0x9c(%rbp)
cmpl   $0x3,-0x9c(%rbp)
jge    13d2 <advance+0x2d2>
mov    -0x28(%rbp),%rax
movslq -0x9c(%rbp),%rcx
xorps  %xmm0,%xmm0
movsd  %xmm0,(%rax,%rcx,8)
movl   $0x0,-0xa0(%rbp)
cmpl   $0x3,-0xa0(%rbp)
jge    139d <advance+0x29d>
movslq -0x9c(%rbp),%rcx
lea    -0x90(%rbp),%rax
imul   $0x18,%rcx,%rcx
add    %rcx,%rax
movslq -0xa0(%rbp),%rcx
movsd  (%rax,%rcx,8),%xmm0
movslq -0xa0(%rbp),%rax
movsd  -0x40(%rbp,%rax,8),%xmm2
mov    -0x28(%rbp),%rax
movslq -0x9c(%rbp),%rcx
movsd  (%rax,%rcx,8),%xmm1
mulsd  %xmm2,%xmm0
addsd  %xmm1,%xmm0
movsd  %xmm0,(%rax,%rcx,8)
mov    -0xa0(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0xa0(%rbp)
jmp    1331 <advance+0x231>
movsd  -0x98(%rbp),%xmm1
ff
mov    -0x28(%rbp),%rax
movslq -0x9c(%rbp),%rcx
movsd  (%rax,%rcx,8),%xmm0
divsd  %xmm1,%xmm0
movsd  %xmm0,(%rax,%rcx,8)
mov    -0x9c(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x9c(%rbp)
jmp    1307 <advance+0x207>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<advance>:
movsd  (%rcx),%xmm9
movsd  0x8(%rcx),%xmm8
movsd  (%rsi),%xmm10
mulsd  (%rdx),%xmm10
addsd  0x10(%rcx),%xmm10
movsd  0x10(%rdi),%xmm1
movsd  (%rdi),%xmm4
movsd  0x8(%rdi),%xmm5
movapd 0xedf(%rip),%xmm7
xorpd  %xmm4,%xmm7
mulsd  %xmm0,%xmm4
addsd  %xmm5,%xmm4
mulsd  %xmm0,%xmm5
addsd  %xmm1,%xmm5
mulsd  %xmm0,%xmm5
movsd  0xeae(%rip),%xmm11
addsd  %xmm11,%xmm5
movapd %xmm1,%xmm2
mulsd  %xmm0,%xmm2
addsd  %xmm11,%xmm2
movapd %xmm2,%xmm3
mulsd  %xmm0,%xmm3
movapd %xmm0,%xmm12
mulsd  %xmm0,%xmm12
mulsd  %xmm0,%xmm7
movapd %xmm7,%xmm6
mulsd  %xmm0,%xmm6
unpcklpd %xmm6,%xmm5
mulsd  %xmm0,%xmm4
addsd  %xmm4,%xmm1
mulsd  %xmm0,%xmm1
addsd  %xmm11,%xmm1
mulsd  %xmm9,%xmm7
unpcklpd %xmm9,%xmm9
mulpd  %xmm5,%xmm9
xorpd  %xmm5,%xmm5
addpd  %xmm9,%xmm5
unpcklpd %xmm2,%xmm3
mulsd  %xmm8,%xmm4
unpcklpd %xmm8,%xmm8
mulpd  %xmm3,%xmm8
addpd  %xmm5,%xmm8
unpcklpd %xmm0,%xmm12
xorpd  %xmm0,%xmm0
addsd  %xmm7,%xmm0
subsd  %xmm4,%xmm0
addsd  %xmm10,%xmm0
unpcklpd %xmm10,%xmm10
mulpd  %xmm12,%xmm10
addpd  %xmm8,%xmm10
divsd  %xmm1,%xmm0
unpcklpd %xmm1,%xmm1
divpd  %xmm1,%xmm10
movupd %xmm10,(%rcx)
movsd  %xmm0,0x10(%rcx)
ret

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

LLVM IR (-O2):
define void @advance(double %0, double* noalias nocapture %1, double* noalias nocapture %2, double* noalias nocapture %3, double* noalias nocapture %4) {
%6 = load double, double* %4
%7 = getelementptr inbounds double, double* %4, i64 1
%8 = load double, double* %7
%9 = getelementptr inbounds double, double* %4, i64 2
%10 = load double, double* %9
%11 = load double, double* %2
%12 = load double, double* %3
%13 = tail call double @llvm.fmuladd.f64(double %11, double %12, double %10)
%14 = getelementptr inbounds double, double* %1, i64 2
%15 = load double, double* %14
%16 = getelementptr inbounds double, double* %1, i64 1
%17 = load double, double* %16
%18 = tail call double @llvm.fmuladd.f64(double %17, double %0, double %15)
%19 = tail call double @llvm.fmuladd.f64(double %0, double %18, double 1.000000e+00)
%20 = tail call double @llvm.fmuladd.f64(double %15, double %0, double 1.000000e+00)
%21 = fmul double %20, %0
%22 = fmul double %0, %0
%23 = load double, double* %1
%24 = fneg double %23
%25 = fmul double %24, %0
%26 = fmul double %25, %0
%27 = fneg double %0
%28 = tail call double @llvm.fmuladd.f64(double %23, double %0, double %17)
%29 = fmul double %28, %27
%30 = tail call double @llvm.fmuladd.f64(double %0, double %28, double %15)
%31 = tail call double @llvm.fmuladd.f64(double %0, double %30, double 1.000000e+00)
%32 = insertelement <2 x double> poison, double %19, i64 0
%33 = insertelement <2 x double> %32, double %26, i64 1
%34 = insertelement <2 x double> poison, double %6, i64 0
%35 = shufflevector <2 x double> %34, <2 x double> poison, <2 x i32> zeroinitializer
%36 = call <2 x double> @llvm.fmuladd.v2f64(<2 x double> %33, <2 x double> %35, <2 x double> zeroinitializer)
%37 = insertelement <2 x double> poison, double %21, i64 0
%38 = insertelement <2 x double> %37, double %20, i64 1
%39 = insertelement <2 x double> poison, double %8, i64 0
%40 = shufflevector <2 x double> %39, <2 x double> poison, <2 x i32> zeroinitializer
%41 = call <2 x double> @llvm.fmuladd.v2f64(<2 x double> %38, <2 x double> %40, <2 x double> %36)
%42 = insertelement <2 x double> poison, double %0, i64 1
%43 = insertelement <2 x double> %42, double %22, i64 0
%44 = insertelement <2 x double> poison, double %13, i64 0
%45 = shufflevector <2 x double> %44, <2 x double> poison, <2 x i32> zeroinitializer
%46 = call <2 x double> @llvm.fmuladd.v2f64(<2 x double> %43, <2 x double> %45, <2 x double> %41)
%47 = insertelement <2 x double> poison, double %31, i64 0
%48 = shufflevector <2 x double> %47, <2 x double> poison, <2 x i32> zeroinitializer
%49 = fdiv <2 x double> %46, %48
%50 = bitcast double* %4 to <2 x double>*
store <2 x double> %49, <2 x double>* %50
%51 = tail call double @llvm.fmuladd.f64(double %25, double %6, double 0.000000e+00)
%52 = tail call double @llvm.fmuladd.f64(double %29, double %8, double %51)
%53 = fadd double %13, %52
%54 = fdiv double %53, %31
store double %54, double* %9
ret void
}