void newest_ak1(int tFlag, double *uu, double *vv, double a, double a1,
                double a3, double a7, double b, double c, double d, double f,
                double g, double h, double u, double v, double K[100 + 1],
                int N, double p[100 + 1]) {
  double a4, a5, b1, b2, c1, c2, c3, c4, temp;
  (*vv) = (*uu) = 0.0;
  if (tFlag != 3) {
    if (tFlag != 2) {
      a4 = a + u * b + h * f;
      a5 = c + (u + v * f) * d;
    } else {
      a4 = (a + g) * f + h;
      a5 = (f + u) * c + v * d;
    }
    b1 = -K[N - 1] / p[N];
    b2 = -(K[N - 2] + b1 * p[N - 1]) / p[N];
    c1 = v * b2 * a1;
    c2 = b1 * a7;
    c3 = b1 * b1 * a3;
    c4 = -(c2 + c3) + c1;
    temp = -c4 + a5 + b1 * a4;
    if (temp != 0.0) {
      *uu = -((u * (c3 + c2) + v * (b1 * a1 + b2 * a7)) / temp) + u;
      *vv = v * (1.0 + c4 / temp);
    }
  }
  return;
}


x86 assembly (clang, -O0):
<newest_ak1>:
push   %rbp
mov    %rsp,%rbp
sub    $0x38,%rsp
movsd  0x28(%rbp),%xmm8
movsd  0x20(%rbp),%xmm8
movsd  0x18(%rbp),%xmm8
movsd  0x10(%rbp),%xmm8
mov    %edi,-0x4(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %rdx,-0x18(%rbp)
movsd  %xmm0,-0x20(%rbp)
movsd  %xmm1,-0x28(%rbp)
movsd  %xmm2,-0x30(%rbp)
movsd  %xmm3,-0x38(%rbp)
movsd  %xmm4,-0x40(%rbp)
movsd  %xmm5,-0x48(%rbp)
movsd  %xmm6,-0x50(%rbp)
movsd  %xmm7,-0x58(%rbp)
mov    %rcx,-0x60(%rbp)
mov    %r8d,-0x64(%rbp)
mov    %r9,-0x70(%rbp)
mov    -0x10(%rbp),%rax
xorps  %xmm0,%xmm0
movsd  %xmm0,(%rax)
mov    -0x18(%rbp),%rax
xorps  %xmm0,%xmm0
movsd  %xmm0,(%rax)
cmpl   $0x3,-0x4(%rbp)
je     1459 <newest_ak1+0x359>
cmpl   $0x2,-0x4(%rbp)
je     11ea <newest_ak1+0xea>
movsd  -0x20(%rbp),%xmm0
movsd  0x20(%rbp),%xmm1
movsd  -0x40(%rbp),%xmm2
mulsd  %xmm2,%xmm1
addsd  %xmm0,%xmm1
movsd  0x18(%rbp),%xmm0
movsd  -0x58(%rbp),%xmm2
mulsd  %xmm2,%xmm0
addsd  %xmm1,%xmm0
movsd  %xmm0,-0x78(%rbp)
movsd  -0x48(%rbp),%xmm1
movsd  0x20(%rbp),%xmm2
movsd  0x28(%rbp),%xmm0
movsd  -0x58(%rbp),%xmm3
mulsd  %xmm3,%xmm0
addsd  %xmm2,%xmm0
movsd  -0x50(%rbp),%xmm2
mulsd  %xmm2,%xmm0
addsd  %xmm1,%xmm0
movsd  %xmm0,-0x80(%rbp)
jmp    1231 <newest_ak1+0x131>
movsd  -0x20(%rbp),%xmm0
addsd  0x10(%rbp),%xmm0
movsd  -0x58(%rbp),%xmm2
movsd  0x18(%rbp),%xmm1
mulsd  %xmm2,%xmm0
addsd  %xmm1,%xmm0
movsd  %xmm0,-0x78(%rbp)
movsd  -0x58(%rbp),%xmm0
addsd  0x20(%rbp),%xmm0
movsd  -0x48(%rbp),%xmm2
movsd  0x28(%rbp),%xmm1
mulsd  -0x50(%rbp),%xmm1
mulsd  %xmm2,%xmm0
addsd  %xmm1,%xmm0
movsd  %xmm0,-0x80(%rbp)
mov    -0x60(%rbp),%rax
mov    -0x64(%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    -0x70(%rbp),%rax
movslq -0x64(%rbp),%rcx
divsd  (%rax,%rcx,8),%xmm0
movsd  %xmm0,-0x88(%rbp)
ff
mov    -0x60(%rbp),%rax
mov    -0x64(%rbp),%ecx
sub    $0x2,%ecx
movslq %ecx,%rcx
movsd  (%rax,%rcx,8),%xmm1
movsd  -0x88(%rbp),%xmm0
ff
mov    -0x70(%rbp),%rax
mov    -0x64(%rbp),%ecx
sub    $0x1,%ecx
movslq %ecx,%rcx
movsd  (%rax,%rcx,8),%xmm2
mulsd  %xmm2,%xmm0
addsd  %xmm1,%xmm0
movq   %xmm0,%rax
movabs $0x8000000000000000,%rcx
xor    %rcx,%rax
movq   %rax,%xmm0
mov    -0x70(%rbp),%rax
movslq -0x64(%rbp),%rcx
divsd  (%rax,%rcx,8),%xmm0
movsd  %xmm0,-0x90(%rbp)
ff
movsd  0x28(%rbp),%xmm0
mulsd  -0x90(%rbp),%xmm0
ff
mulsd  -0x28(%rbp),%xmm0
movsd  %xmm0,-0x98(%rbp)
ff
movsd  -0x88(%rbp),%xmm0
ff
mulsd  -0x38(%rbp),%xmm0
movsd  %xmm0,-0xa0(%rbp)
ff
movsd  -0x88(%rbp),%xmm0
ff
mulsd  -0x88(%rbp),%xmm0
ff
mulsd  -0x30(%rbp),%xmm0
movsd  %xmm0,-0xa8(%rbp)
ff
movsd  -0xa0(%rbp),%xmm0
ff
addsd  -0xa8(%rbp),%xmm0
ff
movq   %xmm0,%rax
movabs $0x8000000000000000,%rcx
xor    %rcx,%rax
movq   %rax,%xmm0
addsd  -0x98(%rbp),%xmm0
ff
movsd  %xmm0,-0xb0(%rbp)
ff
movsd  -0xb0(%rbp),%xmm0
ff
movq   %xmm0,%rax
movabs $0x8000000000000000,%rcx
xor    %rcx,%rax
movq   %rax,%xmm1
addsd  -0x80(%rbp),%xmm1
movsd  -0x88(%rbp),%xmm0
ff
movsd  -0x78(%rbp),%xmm2
mulsd  %xmm2,%xmm0
addsd  %xmm1,%xmm0
movsd  %xmm0,-0xb8(%rbp)
ff
movsd  -0xb8(%rbp),%xmm0
ff
xorps  %xmm1,%xmm1
ucomisd %xmm1,%xmm0
jne    13b3 <newest_ak1+0x2b3>
jp     13b3 <newest_ak1+0x2b3>
jmp    1454 <newest_ak1+0x354>
movsd  0x20(%rbp),%xmm0
movsd  -0xa8(%rbp),%xmm2
ff
addsd  -0xa0(%rbp),%xmm2
ff
movsd  0x28(%rbp),%xmm1
movsd  -0x88(%rbp),%xmm3
ff
movsd  -0x28(%rbp),%xmm5
movsd  -0x90(%rbp),%xmm4
ff
mulsd  -0x38(%rbp),%xmm4
mulsd  %xmm5,%xmm3
addsd  %xmm4,%xmm3
mulsd  %xmm3,%xmm1
mulsd  %xmm2,%xmm0
addsd  %xmm1,%xmm0
divsd  -0xb8(%rbp),%xmm0
ff
movq   %xmm0,%rax
movabs $0x8000000000000000,%rcx
xor    %rcx,%rax
movq   %rax,%xmm0
addsd  0x20(%rbp),%xmm0
mov    -0x10(%rbp),%rax
movsd  %xmm0,(%rax)
movsd  0x28(%rbp),%xmm0
movsd  -0xb0(%rbp),%xmm2
ff
divsd  -0xb8(%rbp),%xmm2
ff
movsd  0xbbc(%rip),%xmm1
addsd  %xmm2,%xmm1
mulsd  %xmm1,%xmm0
mov    -0x18(%rbp),%rax
movsd  %xmm0,(%rax)
jmp    1459 <newest_ak1+0x359>
add    $0x38,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<newest_ak1>:
movsd  0x20(%rsp),%xmm8
movsd  0x18(%rsp),%xmm9
movsd  0x10(%rsp),%xmm10
movq   $0x0,(%rsi)
movq   $0x0,(%rdx)
cmp    $0x2,%edi
je     112e <newest_ak1+0x2e>
cmp    $0x3,%edi
jne    1161 <newest_ak1+0x61>
ret
movsd  0x8(%rsp),%xmm4
unpcklpd %xmm7,%xmm5
unpcklpd %xmm0,%xmm7
movapd %xmm9,%xmm0
unpcklpd %xmm4,%xmm0
addpd  %xmm7,%xmm0
mulsd  %xmm8,%xmm6
mulpd  %xmm5,%xmm0
unpcklpd %xmm10,%xmm6
addpd  %xmm0,%xmm6
movapd %xmm6,%xmm5
jmp    118d <newest_ak1+0x8d>
mulsd  %xmm9,%xmm4
addsd  %xmm0,%xmm4
movapd %xmm8,%xmm0
mulsd  %xmm7,%xmm0
addsd  %xmm9,%xmm0
unpcklpd %xmm10,%xmm0
unpcklpd %xmm7,%xmm6
mulpd  %xmm0,%xmm6
unpcklpd %xmm4,%xmm5
addpd  %xmm6,%xmm5
movslq %r8d,%rax
movsd  -0x8(%rcx,%rax,8),%xmm0
movapd 0xe62(%rip),%xmm4
xorpd  %xmm4,%xmm0
movsd  (%r9,%rax,8),%xmm7
divsd  %xmm7,%xmm0
movsd  -0x8(%r9,%rax,8),%xmm6
mulsd  %xmm0,%xmm6
addsd  -0x10(%rcx,%rax,8),%xmm6
xorpd  %xmm4,%xmm6
divsd  %xmm7,%xmm6
movapd %xmm6,%xmm4
mulsd  %xmm8,%xmm4
mulsd  %xmm1,%xmm4
movapd %xmm0,%xmm10
mulsd  %xmm3,%xmm10
movapd %xmm0,%xmm7
mulsd  %xmm0,%xmm7
mulsd  %xmm2,%xmm7
addsd  %xmm10,%xmm7
subsd  %xmm7,%xmm4
movapd %xmm5,%xmm2
subsd  %xmm4,%xmm2
unpckhpd %xmm5,%xmm5
mulsd  %xmm0,%xmm5
addsd  %xmm2,%xmm5
xorpd  %xmm2,%xmm2
ucomisd %xmm2,%xmm5
jne    1215 <newest_ak1+0x115>
jnp    112d <newest_ak1+0x2d>
mulsd  %xmm3,%xmm6
mulsd  %xmm1,%xmm0
addsd  %xmm6,%xmm0
mulsd  %xmm8,%xmm0
mulsd  %xmm9,%xmm7
addsd  %xmm0,%xmm7
divsd  %xmm5,%xmm7
subsd  %xmm7,%xmm9
movsd  %xmm9,(%rsi)
divsd  %xmm5,%xmm4
addsd  0xdc7(%rip),%xmm4
mulsd  %xmm8,%xmm4
movsd  %xmm4,(%rdx)
ret

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

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