void Friction(double F[7], const double q[7], const double qdot[7]) {
  F[0] =
      ((qdot[0]) < -0.0001 ? (-1)
                           : ((qdot[0]) > 0.0001 ? (1) : (qdot[0] / 0.0001))) *
          0 +
      10 * qdot[0];
  F[1] =
      ((qdot[1]) < -0.0001 ? (-1)
                           : ((qdot[1]) > 0.0001 ? (1) : (qdot[1] / 0.0001))) *
          0 +
      10 * qdot[1];
  F[2] =
      ((qdot[2]) < -0.0001 ? (-1)
                           : ((qdot[2]) > 0.0001 ? (1) : (qdot[2] / 0.0001))) *
          0 +
      5 * qdot[2];
  F[3] =
      ((qdot[3]) < -0.0001 ? (-1)
                           : ((qdot[3]) > 0.0001 ? (1) : (qdot[3] / 0.0001))) *
          0 +
      5 * qdot[3];
  F[4] =
      ((qdot[4]) < -0.0001 ? (-1)
                           : ((qdot[4]) > 0.0001 ? (1) : (qdot[4] / 0.0001))) *
          0 +
      2 * qdot[4];
  F[5] =
      ((qdot[5]) < -0.0001 ? (-1)
                           : ((qdot[5]) > 0.0001 ? (1) : (qdot[5] / 0.0001))) *
          0 +
      2 * qdot[5];
  F[6] =
      ((qdot[6]) < -0.0001 ? (-1)
                           : ((qdot[6]) > 0.0001 ? (1) : (qdot[6] / 0.0001))) *
          0 +
      2 * qdot[6];
}


x86 assembly (clang, -O0):
<Friction>:
push   %rbp
mov    %rsp,%rbp
push   %rax
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %rdx,-0x18(%rbp)
mov    -0x18(%rbp),%rax
movsd  0xee3(%rip),%xmm0
ucomisd (%rax),%xmm0
jbe    1139 <Friction+0x39>
movsd  0xee9(%rip),%xmm0
movsd  %xmm0,-0x20(%rbp)
jmp    1188 <Friction+0x88>
mov    -0x18(%rbp),%rax
movsd  (%rax),%xmm0
movsd  0xebf(%rip),%xmm1
ucomisd %xmm1,%xmm0
jbe    1165 <Friction+0x65>
movsd  0xeb5(%rip),%xmm0
movsd  %xmm0,-0x28(%rbp)
jmp    117e <Friction+0x7e>
mov    -0x18(%rbp),%rax
movsd  (%rax),%xmm0
movsd  0xe93(%rip),%xmm1
divsd  %xmm1,%xmm0
movsd  %xmm0,-0x28(%rbp)
movsd  -0x28(%rbp),%xmm0
movsd  %xmm0,-0x20(%rbp)
movsd  -0x20(%rbp),%xmm0
mov    -0x18(%rbp),%rax
movsd  0xe87(%rip),%xmm1
mulsd  (%rax),%xmm1
xorps  %xmm2,%xmm2
mulsd  %xmm2,%xmm0
addsd  %xmm1,%xmm0
mov    -0x8(%rbp),%rax
movsd  %xmm0,(%rax)
mov    -0x18(%rbp),%rax
movsd  0xe44(%rip),%xmm0
ucomisd 0x8(%rax),%xmm0
jbe    11d9 <Friction+0xd9>
movsd  0xe49(%rip),%xmm0
movsd  %xmm0,-0x30(%rbp)
jmp    122a <Friction+0x12a>
mov    -0x18(%rbp),%rax
movsd  0x8(%rax),%xmm0
movsd  0xe1e(%rip),%xmm1
ucomisd %xmm1,%xmm0
jbe    1206 <Friction+0x106>
movsd  0xe14(%rip),%xmm0
movsd  %xmm0,-0x38(%rbp)
jmp    1220 <Friction+0x120>
mov    -0x18(%rbp),%rax
movsd  0x8(%rax),%xmm0
movsd  0xdf1(%rip),%xmm1
divsd  %xmm1,%xmm0
movsd  %xmm0,-0x38(%rbp)
movsd  -0x38(%rbp),%xmm0
movsd  %xmm0,-0x30(%rbp)
movsd  -0x30(%rbp),%xmm0
mov    -0x18(%rbp),%rax
movsd  0xde5(%rip),%xmm1
mulsd  0x8(%rax),%xmm1
xorps  %xmm2,%xmm2
mulsd  %xmm2,%xmm0
addsd  %xmm1,%xmm0
mov    -0x8(%rbp),%rax
movsd  %xmm0,0x8(%rax)
mov    -0x18(%rbp),%rax
movsd  0xda0(%rip),%xmm0
ucomisd 0x10(%rax),%xmm0
jbe    127d <Friction+0x17d>
movsd  0xda5(%rip),%xmm0
movsd  %xmm0,-0x40(%rbp)
jmp    12ce <Friction+0x1ce>
mov    -0x18(%rbp),%rax
movsd  0x10(%rax),%xmm0
movsd  0xd7a(%rip),%xmm1
ucomisd %xmm1,%xmm0
jbe    12aa <Friction+0x1aa>
movsd  0xd70(%rip),%xmm0
movsd  %xmm0,-0x48(%rbp)
jmp    12c4 <Friction+0x1c4>
mov    -0x18(%rbp),%rax
movsd  0x10(%rax),%xmm0
movsd  0xd4d(%rip),%xmm1
divsd  %xmm1,%xmm0
movsd  %xmm0,-0x48(%rbp)
movsd  -0x48(%rbp),%xmm0
movsd  %xmm0,-0x40(%rbp)
movsd  -0x40(%rbp),%xmm0
mov    -0x18(%rbp),%rax
movsd  0xd49(%rip),%xmm1
mulsd  0x10(%rax),%xmm1
xorps  %xmm2,%xmm2
mulsd  %xmm2,%xmm0
addsd  %xmm1,%xmm0
mov    -0x8(%rbp),%rax
movsd  %xmm0,0x10(%rax)
mov    -0x18(%rbp),%rax
movsd  0xcfc(%rip),%xmm0
ucomisd 0x18(%rax),%xmm0
jbe    1321 <Friction+0x221>
movsd  0xd01(%rip),%xmm0
movsd  %xmm0,-0x50(%rbp)
jmp    1372 <Friction+0x272>
mov    -0x18(%rbp),%rax
movsd  0x18(%rax),%xmm0
movsd  0xcd6(%rip),%xmm1
ucomisd %xmm1,%xmm0
jbe    134e <Friction+0x24e>
movsd  0xccc(%rip),%xmm0
movsd  %xmm0,-0x58(%rbp)
jmp    1368 <Friction+0x268>
mov    -0x18(%rbp),%rax
movsd  0x18(%rax),%xmm0
movsd  0xca9(%rip),%xmm1
divsd  %xmm1,%xmm0
movsd  %xmm0,-0x58(%rbp)
movsd  -0x58(%rbp),%xmm0
movsd  %xmm0,-0x50(%rbp)
movsd  -0x50(%rbp),%xmm0
mov    -0x18(%rbp),%rax
movsd  0xca5(%rip),%xmm1
mulsd  0x18(%rax),%xmm1
xorps  %xmm2,%xmm2
mulsd  %xmm2,%xmm0
addsd  %xmm1,%xmm0
mov    -0x8(%rbp),%rax
movsd  %xmm0,0x18(%rax)
mov    -0x18(%rbp),%rax
movsd  0xc58(%rip),%xmm0
ucomisd 0x20(%rax),%xmm0
jbe    13c5 <Friction+0x2c5>
movsd  0xc5d(%rip),%xmm0
movsd  %xmm0,-0x60(%rbp)
jmp    1416 <Friction+0x316>
mov    -0x18(%rbp),%rax
movsd  0x20(%rax),%xmm0
movsd  0xc32(%rip),%xmm1
ucomisd %xmm1,%xmm0
jbe    13f2 <Friction+0x2f2>
movsd  0xc28(%rip),%xmm0
movsd  %xmm0,-0x68(%rbp)
jmp    140c <Friction+0x30c>
mov    -0x18(%rbp),%rax
movsd  0x20(%rax),%xmm0
movsd  0xc05(%rip),%xmm1
divsd  %xmm1,%xmm0
movsd  %xmm0,-0x68(%rbp)
movsd  -0x68(%rbp),%xmm0
movsd  %xmm0,-0x60(%rbp)
movsd  -0x60(%rbp),%xmm0
mov    -0x18(%rbp),%rax
movsd  0xc09(%rip),%xmm1
mulsd  0x20(%rax),%xmm1
xorps  %xmm2,%xmm2
mulsd  %xmm2,%xmm0
addsd  %xmm1,%xmm0
mov    -0x8(%rbp),%rax
movsd  %xmm0,0x20(%rax)
mov    -0x18(%rbp),%rax
movsd  0xbb4(%rip),%xmm0
ucomisd 0x28(%rax),%xmm0
jbe    1469 <Friction+0x369>
movsd  0xbb9(%rip),%xmm0
movsd  %xmm0,-0x70(%rbp)
jmp    14ba <Friction+0x3ba>
mov    -0x18(%rbp),%rax
movsd  0x28(%rax),%xmm0
movsd  0xb8e(%rip),%xmm1
ucomisd %xmm1,%xmm0
jbe    1496 <Friction+0x396>
movsd  0xb84(%rip),%xmm0
movsd  %xmm0,-0x78(%rbp)
jmp    14b0 <Friction+0x3b0>
mov    -0x18(%rbp),%rax
movsd  0x28(%rax),%xmm0
movsd  0xb61(%rip),%xmm1
divsd  %xmm1,%xmm0
movsd  %xmm0,-0x78(%rbp)
movsd  -0x78(%rbp),%xmm0
movsd  %xmm0,-0x70(%rbp)
movsd  -0x70(%rbp),%xmm0
mov    -0x18(%rbp),%rax
movsd  0xb65(%rip),%xmm1
mulsd  0x28(%rax),%xmm1
xorps  %xmm2,%xmm2
mulsd  %xmm2,%xmm0
addsd  %xmm1,%xmm0
mov    -0x8(%rbp),%rax
movsd  %xmm0,0x28(%rax)
mov    -0x18(%rbp),%rax
movsd  0xb10(%rip),%xmm0
ucomisd 0x30(%rax),%xmm0
jbe    150d <Friction+0x40d>
movsd  0xb15(%rip),%xmm0
movsd  %xmm0,-0x80(%rbp)
jmp    1567 <Friction+0x467>
mov    -0x18(%rbp),%rax
movsd  0x30(%rax),%xmm0
movsd  0xaea(%rip),%xmm1
ucomisd %xmm1,%xmm0
jbe    153d <Friction+0x43d>
movsd  0xae0(%rip),%xmm0
movsd  %xmm0,-0x88(%rbp)
ff
jmp    155a <Friction+0x45a>
mov    -0x18(%rbp),%rax
movsd  0x30(%rax),%xmm0
movsd  0xaba(%rip),%xmm1
divsd  %xmm1,%xmm0
movsd  %xmm0,-0x88(%rbp)
ff
movsd  -0x88(%rbp),%xmm0
ff
movsd  %xmm0,-0x80(%rbp)
movsd  -0x80(%rbp),%xmm0
mov    -0x18(%rbp),%rax
movsd  0xab8(%rip),%xmm1
mulsd  0x30(%rax),%xmm1
xorps  %xmm2,%xmm2
mulsd  %xmm2,%xmm0
addsd  %xmm1,%xmm0
mov    -0x8(%rbp),%rax
movsd  %xmm0,0x30(%rax)
add    $0x8,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<Friction>:
movsd  (%rdx),%xmm3
movsd  0xef4(%rip),%xmm0
movsd  0xef4(%rip),%xmm1
ucomisd %xmm3,%xmm1
movapd %xmm0,%xmm4
ja     113e <Friction+0x3e>
ucomisd 0xef2(%rip),%xmm3
jbe    1132 <Friction+0x32>
movsd  0xee0(%rip),%xmm4
jmp    113e <Friction+0x3e>
movapd %xmm3,%xmm4
divsd  0xeda(%rip),%xmm4
mulsd  0xeda(%rip),%xmm3
xorpd  %xmm2,%xmm2
mulsd  %xmm2,%xmm4
addsd  %xmm3,%xmm4
movsd  %xmm4,(%rdi)
movsd  0x8(%rdx),%xmm3
ucomisd %xmm3,%xmm1
movapd %xmm0,%xmm4
ja     1185 <Friction+0x85>
ucomisd 0xeab(%rip),%xmm3
jbe    1179 <Friction+0x79>
movsd  0xe99(%rip),%xmm4
jmp    1185 <Friction+0x85>
movapd %xmm3,%xmm4
divsd  0xe93(%rip),%xmm4
mulsd  0xe93(%rip),%xmm3
mulsd  %xmm2,%xmm4
addsd  %xmm3,%xmm4
movsd  %xmm4,0x8(%rdi)
movsd  0x10(%rdx),%xmm3
ucomisd %xmm3,%xmm1
movapd %xmm0,%xmm4
ja     11c9 <Friction+0xc9>
ucomisd 0xe67(%rip),%xmm3
jbe    11bd <Friction+0xbd>
movsd  0xe55(%rip),%xmm4
jmp    11c9 <Friction+0xc9>
movapd %xmm3,%xmm4
divsd  0xe4f(%rip),%xmm4
mulsd  0xe57(%rip),%xmm3
xorpd  %xmm2,%xmm2
mulsd  %xmm2,%xmm4
addsd  %xmm3,%xmm4
movsd  %xmm4,0x10(%rdi)
movsd  0x18(%rdx),%xmm3
ucomisd %xmm3,%xmm1
movapd %xmm0,%xmm4
ja     1211 <Friction+0x111>
ucomisd 0xe1f(%rip),%xmm3
jbe    1205 <Friction+0x105>
movsd  0xe0d(%rip),%xmm4
jmp    1211 <Friction+0x111>
movapd %xmm3,%xmm4
divsd  0xe07(%rip),%xmm4
mulsd  0xe0f(%rip),%xmm3
mulsd  %xmm2,%xmm4
addsd  %xmm3,%xmm4
movsd  %xmm4,0x18(%rdi)
movsd  0x20(%rdx),%xmm3
ucomisd %xmm3,%xmm1
movapd %xmm0,%xmm4
ja     1255 <Friction+0x155>
ucomisd 0xddb(%rip),%xmm3
jbe    1249 <Friction+0x149>
movsd  0xdc9(%rip),%xmm4
jmp    1255 <Friction+0x155>
movapd %xmm3,%xmm4
divsd  0xdc3(%rip),%xmm4
addsd  %xmm3,%xmm3
xorpd  %xmm2,%xmm2
mulsd  %xmm2,%xmm4
addsd  %xmm3,%xmm4
movsd  %xmm4,0x20(%rdi)
movsd  0x28(%rdx),%xmm3
ucomisd %xmm3,%xmm1
movapd %xmm0,%xmm4
ja     1299 <Friction+0x199>
ucomisd 0xd97(%rip),%xmm3
jbe    128d <Friction+0x18d>
movsd  0xd85(%rip),%xmm4
jmp    1299 <Friction+0x199>
movapd %xmm3,%xmm4
divsd  0xd7f(%rip),%xmm4
addsd  %xmm3,%xmm3
mulsd  %xmm2,%xmm4
addsd  %xmm3,%xmm4
movsd  %xmm4,0x28(%rdi)
movsd  0x30(%rdx),%xmm2
ucomisd %xmm2,%xmm1
ja     12d5 <Friction+0x1d5>
ucomisd 0xd5b(%rip),%xmm2
jbe    12c9 <Friction+0x1c9>
movsd  0xd49(%rip),%xmm0
jmp    12d5 <Friction+0x1d5>
movapd %xmm2,%xmm0
divsd  0xd43(%rip),%xmm0
addsd  %xmm2,%xmm2
xorpd  %xmm1,%xmm1
mulsd  %xmm0,%xmm1
addsd  %xmm2,%xmm1
movsd  %xmm1,0x30(%rdi)
ret

LLVM IR (-O0):
define void @Friction(double* %0, double* %1, double* %2) {
%4 = alloca double*
%5 = alloca double*
%6 = alloca double*
store double* %0, double** %4
store double* %1, double** %5
store double* %2, double** %6
%7 = load double*, double** %6
%8 = getelementptr inbounds double, double* %7, i64 0
%9 = load double, double* %8
%10 = fcmp olt double %9, -1.000000e-04
br i1 %10, label %11, label %12
11: ; preds = %3
br label %25
12: ; preds = %3
%13 = load double*, double** %6
%14 = getelementptr inbounds double, double* %13, i64 0
%15 = load double, double* %14
%16 = fcmp ogt double %15, 1.000000e-04
br i1 %16, label %17, label %18
17: ; preds = %12
br label %23
18: ; preds = %12
%19 = load double*, double** %6
%20 = getelementptr inbounds double, double* %19, i64 0
%21 = load double, double* %20
%22 = fdiv double %21, 1.000000e-04
br label %23
23: ; preds = %18, %17
%24 = phi double [ 1.000000e+00, %17 ], [ %22, %18 ]
br label %25
25: ; preds = %23, %11
%26 = phi double [ -1.000000e+00, %11 ], [ %24, %23 ]
%27 = load double*, double** %6
%28 = getelementptr inbounds double, double* %27, i64 0
%29 = load double, double* %28
%30 = fmul double 1.000000e+01, %29
%31 = call double @llvm.fmuladd.f64(double %26, double 0.000000e+00, double %30)
%32 = load double*, double** %4
%33 = getelementptr inbounds double, double* %32, i64 0
store double %31, double* %33
%34 = load double*, double** %6
%35 = getelementptr inbounds double, double* %34, i64 1
%36 = load double, double* %35
%37 = fcmp olt double %36, -1.000000e-04
br i1 %37, label %38, label %39
38: ; preds = %25
br label %52
39: ; preds = %25
%40 = load double*, double** %6
%41 = getelementptr inbounds double, double* %40, i64 1
%42 = load double, double* %41
%43 = fcmp ogt double %42, 1.000000e-04
br i1 %43, label %44, label %45
44: ; preds = %39
br label %50
45: ; preds = %39
%46 = load double*, double** %6
%47 = getelementptr inbounds double, double* %46, i64 1
%48 = load double, double* %47
%49 = fdiv double %48, 1.000000e-04
br label %50
50: ; preds = %45, %44
%51 = phi double [ 1.000000e+00, %44 ], [ %49, %45 ]
br label %52
52: ; preds = %50, %38
%53 = phi double [ -1.000000e+00, %38 ], [ %51, %50 ]
%54 = load double*, double** %6
%55 = getelementptr inbounds double, double* %54, i64 1
%56 = load double, double* %55
%57 = fmul double 1.000000e+01, %56
%58 = call double @llvm.fmuladd.f64(double %53, double 0.000000e+00, double %57)
%59 = load double*, double** %4
%60 = getelementptr inbounds double, double* %59, i64 1
store double %58, double* %60
%61 = load double*, double** %6
%62 = getelementptr inbounds double, double* %61, i64 2
%63 = load double, double* %62
%64 = fcmp olt double %63, -1.000000e-04
br i1 %64, label %65, label %66
65: ; preds = %52
br label %79
66: ; preds = %52
%67 = load double*, double** %6
%68 = getelementptr inbounds double, double* %67, i64 2
%69 = load double, double* %68
%70 = fcmp ogt double %69, 1.000000e-04
br i1 %70, label %71, label %72
71: ; preds = %66
br label %77
72: ; preds = %66
%73 = load double*, double** %6
%74 = getelementptr inbounds double, double* %73, i64 2
%75 = load double, double* %74
%76 = fdiv double %75, 1.000000e-04
br label %77
77: ; preds = %72, %71
%78 = phi double [ 1.000000e+00, %71 ], [ %76, %72 ]
br label %79
79: ; preds = %77, %65
%80 = phi double [ -1.000000e+00, %65 ], [ %78, %77 ]
%81 = load double*, double** %6
%82 = getelementptr inbounds double, double* %81, i64 2
%83 = load double, double* %82
%84 = fmul double 5.000000e+00, %83
%85 = call double @llvm.fmuladd.f64(double %80, double 0.000000e+00, double %84)
%86 = load double*, double** %4
%87 = getelementptr inbounds double, double* %86, i64 2
store double %85, double* %87
%88 = load double*, double** %6
%89 = getelementptr inbounds double, double* %88, i64 3
%90 = load double, double* %89
%91 = fcmp olt double %90, -1.000000e-04
br i1 %91, label %92, label %93
92: ; preds = %79
br label %106
93: ; preds = %79
%94 = load double*, double** %6
%95 = getelementptr inbounds double, double* %94, i64 3
%96 = load double, double* %95
%97 = fcmp ogt double %96, 1.000000e-04
br i1 %97, label %98, label %99
98: ; preds = %93
br label %104
99: ; preds = %93
%100 = load double*, double** %6
%101 = getelementptr inbounds double, double* %100, i64 3
%102 = load double, double* %101
%103 = fdiv double %102, 1.000000e-04
br label %104
104: ; preds = %99, %98
%105 = phi double [ 1.000000e+00, %98 ], [ %103, %99 ]
br label %106
106: ; preds = %104, %92
%107 = phi double [ -1.000000e+00, %92 ], [ %105, %104 ]
%108 = load double*, double** %6
%109 = getelementptr inbounds double, double* %108, i64 3
%110 = load double, double* %109
%111 = fmul double 5.000000e+00, %110
%112 = call double @llvm.fmuladd.f64(double %107, double 0.000000e+00, double %111)
%113 = load double*, double** %4
%114 = getelementptr inbounds double, double* %113, i64 3
store double %112, double* %114
%115 = load double*, double** %6
%116 = getelementptr inbounds double, double* %115, i64 4
%117 = load double, double* %116
%118 = fcmp olt double %117, -1.000000e-04
br i1 %118, label %119, label %120
119: ; preds = %106
br label %133
120: ; preds = %106
%121 = load double*, double** %6
%122 = getelementptr inbounds double, double* %121, i64 4
%123 = load double, double* %122
%124 = fcmp ogt double %123, 1.000000e-04
br i1 %124, label %125, label %126
125: ; preds = %120
br label %131
126: ; preds = %120
%127 = load double*, double** %6
%128 = getelementptr inbounds double, double* %127, i64 4
%129 = load double, double* %128
%130 = fdiv double %129, 1.000000e-04
br label %131
131: ; preds = %126, %125
%132 = phi double [ 1.000000e+00, %125 ], [ %130, %126 ]
br label %133
133: ; preds = %131, %119
%134 = phi double [ -1.000000e+00, %119 ], [ %132, %131 ]
%135 = load double*, double** %6
%136 = getelementptr inbounds double, double* %135, i64 4
%137 = load double, double* %136
%138 = fmul double 2.000000e+00, %137
%139 = call double @llvm.fmuladd.f64(double %134, double 0.000000e+00, double %138)
%140 = load double*, double** %4
%141 = getelementptr inbounds double, double* %140, i64 4
store double %139, double* %141
%142 = load double*, double** %6
%143 = getelementptr inbounds double, double* %142, i64 5
%144 = load double, double* %143
%145 = fcmp olt double %144, -1.000000e-04
br i1 %145, label %146, label %147
146: ; preds = %133
br label %160
147: ; preds = %133
%148 = load double*, double** %6
%149 = getelementptr inbounds double, double* %148, i64 5
%150 = load double, double* %149
%151 = fcmp ogt double %150, 1.000000e-04
br i1 %151, label %152, label %153
152: ; preds = %147
br label %158
153: ; preds = %147
%154 = load double*, double** %6
%155 = getelementptr inbounds double, double* %154, i64 5
%156 = load double, double* %155
%157 = fdiv double %156, 1.000000e-04
br label %158
158: ; preds = %153, %152
%159 = phi double [ 1.000000e+00, %152 ], [ %157, %153 ]
br label %160
160: ; preds = %158, %146
%161 = phi double [ -1.000000e+00, %146 ], [ %159, %158 ]
%162 = load double*, double** %6
%163 = getelementptr inbounds double, double* %162, i64 5
%164 = load double, double* %163
%165 = fmul double 2.000000e+00, %164
%166 = call double @llvm.fmuladd.f64(double %161, double 0.000000e+00, double %165)
%167 = load double*, double** %4
%168 = getelementptr inbounds double, double* %167, i64 5
store double %166, double* %168
%169 = load double*, double** %6
%170 = getelementptr inbounds double, double* %169, i64 6
%171 = load double, double* %170
%172 = fcmp olt double %171, -1.000000e-04
br i1 %172, label %173, label %174
173: ; preds = %160
br label %187
174: ; preds = %160
%175 = load double*, double** %6
%176 = getelementptr inbounds double, double* %175, i64 6
%177 = load double, double* %176
%178 = fcmp ogt double %177, 1.000000e-04
br i1 %178, label %179, label %180
179: ; preds = %174
br label %185
180: ; preds = %174
%181 = load double*, double** %6
%182 = getelementptr inbounds double, double* %181, i64 6
%183 = load double, double* %182
%184 = fdiv double %183, 1.000000e-04
br label %185
185: ; preds = %180, %179
%186 = phi double [ 1.000000e+00, %179 ], [ %184, %180 ]
br label %187
187: ; preds = %185, %173
%188 = phi double [ -1.000000e+00, %173 ], [ %186, %185 ]
%189 = load double*, double** %6
%190 = getelementptr inbounds double, double* %189, i64 6
%191 = load double, double* %190
%192 = fmul double 2.000000e+00, %191
%193 = call double @llvm.fmuladd.f64(double %188, double 0.000000e+00, double %192)
%194 = load double*, double** %4
%195 = getelementptr inbounds double, double* %194, i64 6
store double %193, double* %195
ret void
}

LLVM IR (-O2):
define void @Friction(double* nocapture writeonly %0, double* nocapture readnone %1, double* nocapture %2) {
%4 = load double, double* %2
%5 = fcmp olt double %4, -1.000000e-04
br i1 %5, label %10, label %6
6: ; preds = %3
%7 = fcmp ogt double %4, 1.000000e-04
br i1 %7, label %10, label %8
8: ; preds = %6
%9 = fdiv double %4, 1.000000e-04
br label %10
10: ; preds = %8, %6, %3
%11 = phi double [ -1.000000e+00, %3 ], [ %9, %8 ], [ 1.000000e+00, %6 ]
%12 = fmul double %4, 1.000000e+01
%13 = tail call double @llvm.fmuladd.f64(double %11, double 0.000000e+00, double %12)
store double %13, double* %0
%14 = getelementptr inbounds double, double* %2, i64 1
%15 = load double, double* %14
%16 = fcmp olt double %15, -1.000000e-04
br i1 %16, label %21, label %17
17: ; preds = %10
%18 = fcmp ogt double %15, 1.000000e-04
br i1 %18, label %21, label %19
19: ; preds = %17
%20 = fdiv double %15, 1.000000e-04
br label %21
21: ; preds = %19, %17, %10
%22 = phi double [ -1.000000e+00, %10 ], [ %20, %19 ], [ 1.000000e+00, %17 ]
%23 = fmul double %15, 1.000000e+01
%24 = tail call double @llvm.fmuladd.f64(double %22, double 0.000000e+00, double %23)
%25 = getelementptr inbounds double, double* %0, i64 1
store double %24, double* %25
%26 = getelementptr inbounds double, double* %2, i64 2
%27 = load double, double* %26
%28 = fcmp olt double %27, -1.000000e-04
br i1 %28, label %33, label %29
29: ; preds = %21
%30 = fcmp ogt double %27, 1.000000e-04
br i1 %30, label %33, label %31
31: ; preds = %29
%32 = fdiv double %27, 1.000000e-04
br label %33
33: ; preds = %31, %29, %21
%34 = phi double [ -1.000000e+00, %21 ], [ %32, %31 ], [ 1.000000e+00, %29 ]
%35 = fmul double %27, 5.000000e+00
%36 = tail call double @llvm.fmuladd.f64(double %34, double 0.000000e+00, double %35)
%37 = getelementptr inbounds double, double* %0, i64 2
store double %36, double* %37
%38 = getelementptr inbounds double, double* %2, i64 3
%39 = load double, double* %38
%40 = fcmp olt double %39, -1.000000e-04
br i1 %40, label %45, label %41
41: ; preds = %33
%42 = fcmp ogt double %39, 1.000000e-04
br i1 %42, label %45, label %43
43: ; preds = %41
%44 = fdiv double %39, 1.000000e-04
br label %45
45: ; preds = %43, %41, %33
%46 = phi double [ -1.000000e+00, %33 ], [ %44, %43 ], [ 1.000000e+00, %41 ]
%47 = fmul double %39, 5.000000e+00
%48 = tail call double @llvm.fmuladd.f64(double %46, double 0.000000e+00, double %47)
%49 = getelementptr inbounds double, double* %0, i64 3
store double %48, double* %49
%50 = getelementptr inbounds double, double* %2, i64 4
%51 = load double, double* %50
%52 = fcmp olt double %51, -1.000000e-04
br i1 %52, label %57, label %53
53: ; preds = %45
%54 = fcmp ogt double %51, 1.000000e-04
br i1 %54, label %57, label %55
55: ; preds = %53
%56 = fdiv double %51, 1.000000e-04
br label %57
57: ; preds = %55, %53, %45
%58 = phi double [ -1.000000e+00, %45 ], [ %56, %55 ], [ 1.000000e+00, %53 ]
%59 = fmul double %51, 2.000000e+00
%60 = tail call double @llvm.fmuladd.f64(double %58, double 0.000000e+00, double %59)
%61 = getelementptr inbounds double, double* %0, i64 4
store double %60, double* %61
%62 = getelementptr inbounds double, double* %2, i64 5
%63 = load double, double* %62
%64 = fcmp olt double %63, -1.000000e-04
br i1 %64, label %69, label %65
65: ; preds = %57
%66 = fcmp ogt double %63, 1.000000e-04
br i1 %66, label %69, label %67
67: ; preds = %65
%68 = fdiv double %63, 1.000000e-04
br label %69
69: ; preds = %67, %65, %57
%70 = phi double [ -1.000000e+00, %57 ], [ %68, %67 ], [ 1.000000e+00, %65 ]
%71 = fmul double %63, 2.000000e+00
%72 = tail call double @llvm.fmuladd.f64(double %70, double 0.000000e+00, double %71)
%73 = getelementptr inbounds double, double* %0, i64 5
store double %72, double* %73
%74 = getelementptr inbounds double, double* %2, i64 6
%75 = load double, double* %74
%76 = fcmp olt double %75, -1.000000e-04
br i1 %76, label %81, label %77
77: ; preds = %69
%78 = fcmp ogt double %75, 1.000000e-04
br i1 %78, label %81, label %79
79: ; preds = %77
%80 = fdiv double %75, 1.000000e-04
br label %81
81: ; preds = %79, %77, %69
%82 = phi double [ -1.000000e+00, %69 ], [ %80, %79 ], [ 1.000000e+00, %77 ]
%83 = fmul double %75, 2.000000e+00
%84 = tail call double @llvm.fmuladd.f64(double %82, double 0.000000e+00, double %83)
%85 = getelementptr inbounds double, double* %0, i64 6
store double %84, double* %85
ret void
}