int cngdel(vfs, ffs, nfs, nstep, nreset, toler, echo)
int nfs, (*vfs[])(), (*ffs[])();
int nstep, nreset;
float toler;
{
  int i, j, ifs;
  float vb, vt, vto;
  float a_max_f(), lam;
  float linmin(), a_max_d();
  float a_pr_beta();
  float beta, betad, a_l2_f(), a_l2_g();
  int insane();
  int crazy_force();
  if (nreset < 1)
    nreset = nstep;
  a_g_zero();
  a_d_zero();
  for (i = 0; i < nstep; i++) {
    if (insane())
      return 0;
    vb = 0.;
    for (ifs = 0; ifs < nfs; ifs++)
      (*vfs[ifs])(&vb, 0.);
    a_f_zero();
    for (ifs = 0; ifs < nfs; ifs++)
      (*ffs[ifs])(0.);
    if (crazy_force())
      return 0;
    lam = a_max_f();
    beta = a_pr_beta();
    if ((i % nreset) == 0)
      beta = 0.;
    if (echo)
      printf(" vb, maxf %f %f %f \n", vb, lam, beta);
    if (lam <= toler)
      return 1;
    lam = a_max_f();
    a_ftodx(1., beta);
    a_ftogx(1., 0.);
    lam = linmin(vfs, nfs, sqrt(a_max_d()));
    if (lam < 1.e-6) {
      a_f_zero();
      for (ifs = 0; ifs < nfs; ifs++)
        (*ffs[ifs])(0.);
      lam = sqrt(a_max_f());
      if (lam < 1.)
        lam = 1.;
      a_ftodx(1. / (lam), 0.);
      lam = linmin(vfs, nfs, 1.);
      if (lam < 1.e-6)
        return 0;
    }
    a_inc_d(lam);
  }
  return 0;
}


x86 assembly (clang, -O0):
<cngdel>:
push   %rbp
mov    %rsp,%rbp
sub    $0x60,%rsp
cvtsd2ss %xmm0,%xmm0
mov    %rdi,-0x10(%rbp)
mov    %rsi,-0x18(%rbp)
mov    %edx,-0x1c(%rbp)
mov    %ecx,-0x20(%rbp)
mov    %r8d,-0x24(%rbp)
movss  %xmm0,-0x28(%rbp)
mov    %r9d,-0x2c(%rbp)
cmpl   $0x1,-0x24(%rbp)
jge    1217 <cngdel+0x37>
mov    -0x20(%rbp),%eax
mov    %eax,-0x24(%rbp)
mov    $0x0,%al
call   10a0 <a_g_zero@plt>
mov    $0x0,%al
call   10c0 <a_d_zero@plt>
movl   $0x0,-0x30(%rbp)
mov    -0x30(%rbp),%eax
cmp    -0x20(%rbp),%eax
jge    14e6 <cngdel+0x306>
mov    $0x0,%al
call   1090 <insane@plt>
cmp    $0x0,%eax
je     1254 <cngdel+0x74>
movl   $0x0,-0x4(%rbp)
jmp    14ed <cngdel+0x30d>
xorps  %xmm0,%xmm0
movss  %xmm0,-0x3c(%rbp)
movl   $0x0,-0x38(%rbp)
mov    -0x38(%rbp),%eax
cmp    -0x1c(%rbp),%eax
jge    1291 <cngdel+0xb1>
mov    -0x10(%rbp),%rcx
movslq -0x38(%rbp),%rdx
lea    -0x3c(%rbp),%rdi
xorps  %xmm0,%xmm0
mov    $0x1,%al
call   *(%rcx,%rdx,8)
mov    -0x38(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x38(%rbp)
jmp    1263 <cngdel+0x83>
mov    $0x0,%al
call   10f0 <a_f_zero@plt>
movl   $0x0,-0x38(%rbp)
mov    -0x38(%rbp),%eax
cmp    -0x1c(%rbp),%eax
jge    12c9 <cngdel+0xe9>
mov    -0x18(%rbp),%rcx
movslq -0x38(%rbp),%rdx
xorps  %xmm0,%xmm0
mov    $0x1,%al
call   *(%rcx,%rdx,8)
mov    -0x38(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x38(%rbp)
jmp    129f <cngdel+0xbf>
mov    $0x0,%al
call   1060 <crazy_force@plt>
cmp    $0x0,%eax
je     12e5 <cngdel+0x105>
movl   $0x0,-0x4(%rbp)
jmp    14ed <cngdel+0x30d>
mov    $0x0,%al
call   1030 <a_max_f@plt>
movss  %xmm0,-0x48(%rbp)
mov    $0x0,%al
call   10b0 <a_pr_beta@plt>
movss  %xmm0,-0x4c(%rbp)
mov    -0x30(%rbp),%eax
cltd
idivl  -0x24(%rbp)
cmp    $0x0,%edx
jne    1315 <cngdel+0x135>
xorps  %xmm0,%xmm0
movss  %xmm0,-0x4c(%rbp)
cmpl   $0x0,-0x2c(%rbp)
je     1348 <cngdel+0x168>
movss  -0x3c(%rbp),%xmm0
cvtss2sd %xmm0,%xmm0
movss  -0x48(%rbp),%xmm1
cvtss2sd %xmm1,%xmm1
movss  -0x4c(%rbp),%xmm2
cvtss2sd %xmm2,%xmm2
lea    0xcd3(%rip),%rdi
mov    $0x3,%al
call   1070 <printf@plt>
movss  -0x48(%rbp),%xmm1
movss  -0x28(%rbp),%xmm0
ucomiss %xmm1,%xmm0
jb     1367 <cngdel+0x187>
movl   $0x1,-0x4(%rbp)
jmp    14ed <cngdel+0x30d>
mov    $0x0,%al
call   1030 <a_max_f@plt>
movss  %xmm0,-0x48(%rbp)
movss  -0x4c(%rbp),%xmm0
cvtss2sd %xmm0,%xmm1
movsd  0xc84(%rip),%xmm0
mov    $0x2,%al
call   10d0 <a_ftodx@plt>
movsd  0xc75(%rip),%xmm0
xorps  %xmm1,%xmm1
mov    $0x2,%al
call   1080 <a_ftogx@plt>
mov    -0x10(%rbp),%rax
mov    %rax,-0x60(%rbp)
mov    -0x1c(%rbp),%eax
mov    %eax,-0x54(%rbp)
mov    $0x0,%al
call   1040 <a_max_d@plt>
cvtss2sd %xmm0,%xmm0
call   10e0 <sqrt@plt>
mov    -0x60(%rbp),%rdi
mov    -0x54(%rbp),%esi
mov    $0x1,%al
call   1050 <linmin@plt>
movss  %xmm0,-0x48(%rbp)
movss  -0x48(%rbp),%xmm0
cvtss2sd %xmm0,%xmm1
movsd  0xc21(%rip),%xmm0
ucomisd %xmm1,%xmm0
jbe    14c8 <cngdel+0x2e8>
mov    $0x0,%al
call   10f0 <a_f_zero@plt>
movl   $0x0,-0x38(%rbp)
mov    -0x38(%rbp),%eax
cmp    -0x1c(%rbp),%eax
jge    1421 <cngdel+0x241>
mov    -0x18(%rbp),%rcx
movslq -0x38(%rbp),%rdx
xorps  %xmm0,%xmm0
mov    $0x1,%al
call   *(%rcx,%rdx,8)
mov    -0x38(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x38(%rbp)
jmp    13f7 <cngdel+0x217>
mov    $0x0,%al
call   1030 <a_max_f@plt>
cvtss2sd %xmm0,%xmm0
call   10e0 <sqrt@plt>
cvtsd2ss %xmm0,%xmm0
movss  %xmm0,-0x48(%rbp)
movss  -0x48(%rbp),%xmm0
cvtss2sd %xmm0,%xmm1
movsd  0xbbd(%rip),%xmm0
ucomisd %xmm1,%xmm0
jbe    1462 <cngdel+0x282>
movss  0xbb3(%rip),%xmm0
movss  %xmm0,-0x48(%rbp)
movss  -0x48(%rbp),%xmm0
cvtss2sd %xmm0,%xmm1
movsd  0xb95(%rip),%xmm0
divsd  %xmm1,%xmm0
xorps  %xmm1,%xmm1
mov    $0x2,%al
call   10d0 <a_ftodx@plt>
mov    -0x10(%rbp),%rdi
mov    -0x1c(%rbp),%esi
movsd  0xb78(%rip),%xmm0
mov    $0x1,%al
call   1050 <linmin@plt>
movss  %xmm0,-0x48(%rbp)
movss  -0x48(%rbp),%xmm0
cvtss2sd %xmm0,%xmm1
movsd  0xb53(%rip),%xmm0
ucomisd %xmm1,%xmm0
jbe    14c3 <cngdel+0x2e3>
movl   $0x0,-0x4(%rbp)
jmp    14ed <cngdel+0x30d>
jmp    14c8 <cngdel+0x2e8>
movss  -0x48(%rbp),%xmm0
cvtss2sd %xmm0,%xmm0
mov    $0x1,%al
call   1100 <a_inc_d@plt>
mov    -0x30(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x30(%rbp)
jmp    122c <cngdel+0x4c>
movl   $0x0,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x60,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<cngdel>:
push   %rbp
push   %r15
push   %r14
push   %r13
push   %r12
push   %rbx
sub    $0x38,%rsp
mov    %r9d,0x34(%rsp)
movsd  %xmm0,0x18(%rsp)
mov    %ecx,%ebx
mov    %edx,%r14d
mov    %rsi,%rbp
mov    %rdi,%r12
test   %r8d,%r8d
cmovle %ecx,%r8d
mov    %r8d,0x30(%rsp)
movl   $0x0,0xc(%rsp)
xor    %eax,%eax
call   10a0 <a_g_zero@plt>
xor    %eax,%eax
call   10d0 <a_d_zero@plt>
mov    %ebx,0x2c(%rsp)
test   %ebx,%ebx
jle    14c1 <cngdel+0x2d1>
mov    %r14d,%ebx
movsd  0x18(%rsp),%xmm0
cvtsd2ss %xmm0,%xmm0
movss  %xmm0,0x28(%rsp)
mov    %r14d,%r13d
lea    0x24(%rsp),%r14
xor    %r15d,%r15d
mov    %ebx,0x10(%rsp)
jmp    12df <cngdel+0xef>
cs nopw 0x0(%rax,%rax,1)
call   10c0 <sqrtf@plt>
mov    0x10(%rsp),%ebx
movss  0xd97(%rip),%xmm1
maxss  %xmm0,%xmm1
cvtss2sd %xmm1,%xmm1
movsd  0xd6f(%rip),%xmm0
divsd  %xmm1,%xmm0
xorps  %xmm1,%xmm1
mov    $0x2,%al
call   10e0 <a_ftodx@plt>
mov    %r12,%rdi
mov    %ebx,%esi
movsd  0xd54(%rip),%xmm0
mov    $0x1,%al
call   1050 <linmin@plt>
cvtss2sd %xmm0,%xmm0
movsd  0xd49(%rip),%xmm1
ucomisd %xmm0,%xmm1
ja     14c1 <cngdel+0x2d1>
mov    $0x1,%al
call   1110 <a_inc_d@plt>
add    $0x1,%r15d
cmp    0x2c(%rsp),%r15d
je     14c1 <cngdel+0x2d1>
xor    %eax,%eax
call   1090 <insane@plt>
test   %eax,%eax
jne    14af <cngdel+0x2bf>
movl   $0x0,0x24(%rsp)
test   %ebx,%ebx
jle    1350 <cngdel+0x160>
xor    %ebx,%ebx
nopl   0x0(%rax)
xorps  %xmm0,%xmm0
mov    %r14,%rdi
mov    $0x1,%al
call   *(%r12,%rbx,8)
add    $0x1,%rbx
cmp    %rbx,%r13
jne    1300 <cngdel+0x110>
xor    %eax,%eax
call   1100 <a_f_zero@plt>
cmpl   $0x0,0x10(%rsp)
jle    1357 <cngdel+0x167>
xor    %ebx,%ebx
cs nopw 0x0(%rax,%rax,1)
nop
xorps  %xmm0,%xmm0
mov    $0x1,%al
call   *0x0(%rbp,%rbx,8)
add    $0x1,%rbx
cmp    %rbx,%r13
jne    1330 <cngdel+0x140>
jmp    1357 <cngdel+0x167>
cs nopw 0x0(%rax,%rax,1)
xchg   %ax,%ax
xor    %eax,%eax
call   1100 <a_f_zero@plt>
movl   $0x0,0xc(%rsp)
xor    %eax,%eax
call   1060 <crazy_force@plt>
test   %eax,%eax
jne    14c1 <cngdel+0x2d1>
xor    %eax,%eax
call   1030 <a_max_f@plt>
movss  %xmm0,0x18(%rsp)
xor    %eax,%eax
call   10b0 <a_pr_beta@plt>
mov    %r15d,%eax
cltd
idivl  0x30(%rsp)
xorps  %xmm1,%xmm1
movss  %xmm1,0x14(%rsp)
test   %edx,%edx
je     139d <cngdel+0x1ad>
movss  %xmm0,0x14(%rsp)
cmpl   $0x0,0x34(%rsp)
movss  0x18(%rsp),%xmm1
je     13dc <cngdel+0x1ec>
movss  0x24(%rsp),%xmm0
cvtss2sd %xmm0,%xmm0
movss  0x18(%rsp),%xmm1
cvtss2sd %xmm1,%xmm1
movss  0x14(%rsp),%xmm2
cvtss2sd %xmm2,%xmm2
lea    0xc51(%rip),%rdi
mov    $0x3,%al
call   1070 <printf@plt>
movss  0x18(%rsp),%xmm1
movss  0x28(%rsp),%xmm0
ucomiss %xmm1,%xmm0
mov    0x10(%rsp),%ebx
jae    14b9 <cngdel+0x2c9>
xor    %eax,%eax
call   1030 <a_max_f@plt>
movss  0x14(%rsp),%xmm0
xorps  %xmm1,%xmm1
cvtss2sd %xmm0,%xmm1
movsd  0xbf5(%rip),%xmm0
mov    $0x2,%al
call   10e0 <a_ftodx@plt>
xorps  %xmm1,%xmm1
movsd  0xbe3(%rip),%xmm0
mov    $0x2,%al
call   1080 <a_ftogx@plt>
xor    %eax,%eax
call   1040 <a_max_d@plt>
cvtss2sd %xmm0,%xmm0
ucomisd 0xbd9(%rip),%xmm0
jb     1440 <cngdel+0x250>
sqrtsd %xmm0,%xmm0
jmp    1445 <cngdel+0x255>
nop
call   10f0 <sqrt@plt>
mov    %r12,%rdi
mov    %ebx,%esi
mov    $0x1,%al
call   1050 <linmin@plt>
cvtss2sd %xmm0,%xmm0
movsd  0xbab(%rip),%xmm1
ucomisd %xmm0,%xmm1
jbe    12c9 <cngdel+0xd9>
xor    %eax,%eax
call   1100 <a_f_zero@plt>
test   %ebx,%ebx
jle    1492 <cngdel+0x2a2>
xor    %ebx,%ebx
cs nopw 0x0(%rax,%rax,1)
xchg   %ax,%ax
xorps  %xmm0,%xmm0
mov    $0x1,%al
call   *0x0(%rbp,%rbx,8)
add    $0x1,%rbx
cmp    %rbx,%r13
jne    1480 <cngdel+0x290>
xor    %eax,%eax
call   1030 <a_max_f@plt>
ucomiss 0xb7c(%rip),%xmm0
jb     1270 <cngdel+0x80>
sqrtss %xmm0,%xmm0
jmp    1275 <cngdel+0x85>
movl   $0x0,0xc(%rsp)
jmp    14c1 <cngdel+0x2d1>
movl   $0x1,0xc(%rsp)
mov    0xc(%rsp),%eax
add    $0x38,%rsp
pop    %rbx
pop    %r12
pop    %r13
pop    %r14
pop    %r15
pop    %rbp
ret

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

LLVM IR (-O2):
@.str = [21 x i8] c" vb, maxf %f %f %f \0A\00"
define i32 @cngdel(i32 (...)** %0, i32 (...)** nocapture %1, i32 %2, i32 %3, i32 %4, double %5, i32 %6) {
%8 = alloca float
%9 = fptrunc double %5 to float
%10 = bitcast float* %8 to i8*
%11 = icmp slt i32 %4, 1
%12 = select i1 %11, i32 %3, i32 %4
%13 = tail call i32 (...) @a_g_zero()
%14 = tail call i32 (...) @a_d_zero()
%15 = icmp sgt i32 %3, 0
br i1 %15, label %16, label %101
16: ; preds = %7
%17 = icmp sgt i32 %2, 0
%18 = icmp eq i32 %6, 0
%19 = zext i32 %2 to i64
%20 = zext i32 %2 to i64
%21 = zext i32 %2 to i64
br label %22
22: ; preds = %16, %96
%23 = phi i32 [ 0, %16 ], [ %99, %96 ]
%24 = call i32 (...) @insane()
%25 = icmp eq i32 %24, 0
br i1 %25, label %26, label %101
26: ; preds = %22
store float 0.000000e+00, float* %8
br i1 %17, label %29, label %27
27: ; preds = %26
%28 = call i32 (...) @a_f_zero()
br label %47
29: ; preds = %26, %29
%30 = phi i64 [ %35, %29 ], [ 0, %26 ]
%31 = getelementptr inbounds i32 (...)*, i32 (...)** %0, i64 %30
%32 = bitcast i32 (...)** %31 to i32 (float*, double, ...)**
%33 = load i32 (float*, double, ...)*, i32 (float*, double, ...)** %32
%34 = call i32 (float*, double, ...) %33(float* %8, double 0.000000e+00)
%35 = add nuw nsw i64 %30, 1
%36 = icmp eq i64 %35, %19
br i1 %36, label %37, label %29
37: ; preds = %29
%38 = call i32 (...) @a_f_zero()
br i1 %17, label %39, label %47
39: ; preds = %37, %39
%40 = phi i64 [ %45, %39 ], [ 0, %37 ]
%41 = getelementptr inbounds i32 (...)*, i32 (...)** %1, i64 %40
%42 = bitcast i32 (...)** %41 to i32 (double, ...)**
%43 = load i32 (double, ...)*, i32 (double, ...)** %42
%44 = call i32 (double, ...) %43(double 0.000000e+00)
%45 = add nuw nsw i64 %40, 1
%46 = icmp eq i64 %45, %20
br i1 %46, label %47, label %39
47: ; preds = %39, %27, %37
%48 = call i32 (...) @crazy_force()
%49 = icmp eq i32 %48, 0
br i1 %49, label %50, label %101
50: ; preds = %47
%51 = call float (...) @a_max_f()
%52 = call float (...) @a_pr_beta()
%53 = srem i32 %23, %12
%54 = icmp eq i32 %53, 0
%55 = select i1 %54, float 0.000000e+00, float %52
br i1 %18, label %62, label %56
56: ; preds = %50
%57 = load float, float* %8
%58 = fpext float %57 to double
%59 = fpext float %51 to double
%60 = fpext float %55 to double
%61 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([21 x i8], [21 x i8]* @.str, i64 0, i64 0), double %58, double %59, double %60)
br label %62
62: ; preds = %56, %50
%63 = fcmp ugt float %51, %9
br i1 %63, label %64, label %101
64: ; preds = %62
%65 = call float (...) @a_max_f()
%66 = fpext float %55 to double
%67 = call i32 (double, double, ...) bitcast (i32 (...)* @a_ftodx to i32 (double, double, ...)*)(double 1.000000e+00, double %66)
%68 = call i32 (double, double, ...) bitcast (i32 (...)* @a_ftogx to i32 (double, double, ...)*)(double 1.000000e+00, double 0.000000e+00)
%69 = call float (...) @a_max_d()
%70 = fpext float %69 to double
%71 = call double @sqrt(double %70)
%72 = call float (i32 (...)**, i32, double, ...) bitcast (float (...)* @linmin to float (i32 (...)**, i32, double, ...)*)(i32 (...)** %0, i32 %2, double %71)
%73 = fpext float %72 to double
%74 = fcmp olt double %73, 0x3EB0C6F7A0B5ED8D
br i1 %74, label %75, label %96
75: ; preds = %64
%76 = call i32 (...) @a_f_zero()
br i1 %17, label %77, label %85
77: ; preds = %75, %77
%78 = phi i64 [ %83, %77 ], [ 0, %75 ]
%79 = getelementptr inbounds i32 (...)*, i32 (...)** %1, i64 %78
%80 = bitcast i32 (...)** %79 to i32 (double, ...)**
%81 = load i32 (double, ...)*, i32 (double, ...)** %80
%82 = call i32 (double, ...) %81(double 0.000000e+00)
%83 = add nuw nsw i64 %78, 1
%84 = icmp eq i64 %83, %21
br i1 %84, label %85, label %77
85: ; preds = %77, %75
%86 = call float (...) @a_max_f()
%87 = call float @sqrtf(float %86)
%88 = fcmp olt float %87, 1.000000e+00
%89 = select i1 %88, float 1.000000e+00, float %87
%90 = fpext float %89 to double
%91 = fdiv double 1.000000e+00, %90
%92 = call i32 (double, double, ...) bitcast (i32 (...)* @a_ftodx to i32 (double, double, ...)*)(double %91, double 0.000000e+00)
%93 = call float (i32 (...)**, i32, double, ...) bitcast (float (...)* @linmin to float (i32 (...)**, i32, double, ...)*)(i32 (...)** %0, i32 %2, double 1.000000e+00)
%94 = fpext float %93 to double
%95 = fcmp olt double %94, 0x3EB0C6F7A0B5ED8D
br i1 %95, label %101, label %96
96: ; preds = %85, %64
%97 = phi double [ %94, %85 ], [ %73, %64 ]
%98 = call i32 (double, ...) bitcast (i32 (...)* @a_inc_d to i32 (double, ...)*)(double %97)
%99 = add nuw nsw i32 %23, 1
%100 = icmp eq i32 %99, %3
br i1 %100, label %101, label %22
101: ; preds = %22, %47, %62, %85, %96, %7
%102 = phi i32 [ 0, %7 ], [ 0, %96 ], [ 0, %85 ], [ 1, %62 ], [ 0, %47 ], [ 0, %22 ]
ret i32 %102
}