void lp_autoguess(eci, accept_level, prob_cutoff) register struct ecinfox *eci;
float accept_level;
float prob_cutoff;
{
  register int c;
  int ntried;
  register int classpos;
  int repeat;
  for (repeat = 0; repeat < 1; repeat++) {
    ntried = 0;
    for (ntried = 0; ntried < 256; ntried++) {
      classpos = lp_best_pos(eci, 2);
      if (classpos == (-1))
        break;
      c = lp_best_char(eci, classpos,
                       accept_level - ((repeat == 0) ? 0.0 : 0.0), prob_cutoff);
      if (c != (-1)) {
        lp_accept(eci, classpos, c);
      }
    }
  }
}


x86 assembly (clang, -O0):
<lp_autoguess>:
push   %rbp
mov    %rsp,%rbp
sub    $0x50,%rsp
movsd  %xmm1,-0x28(%rbp)
movaps %xmm0,%xmm1
movsd  -0x28(%rbp),%xmm0
cvtsd2ss %xmm1,%xmm1
cvtsd2ss %xmm0,%xmm0
mov    %rdi,-0x8(%rbp)
movss  %xmm1,-0xc(%rbp)
movss  %xmm0,-0x10(%rbp)
movl   $0x0,-0x20(%rbp)
cmpl   $0x1,-0x20(%rbp)
jge    1251 <lp_autoguess+0x121>
movl   $0x0,-0x18(%rbp)
movl   $0x0,-0x18(%rbp)
cmpl   $0x100,-0x18(%rbp)
jge    123e <lp_autoguess+0x10e>
mov    -0x8(%rbp),%rdi
mov    $0x2,%esi
mov    $0x0,%al
call   1040 <lp_best_pos@plt>
mov    %eax,-0x1c(%rbp)
cmpl   $0xffffffff,-0x1c(%rbp)
jne    11a9 <lp_autoguess+0x79>
jmp    123e <lp_autoguess+0x10e>
mov    -0x8(%rbp),%rax
mov    %rax,-0x50(%rbp)
mov    -0x1c(%rbp),%eax
mov    %eax,-0x44(%rbp)
movss  -0xc(%rbp),%xmm0
cvtss2sd %xmm0,%xmm0
movsd  %xmm0,-0x40(%rbp)
mov    -0x20(%rbp),%eax
xorps  %xmm0,%xmm0
movsd  %xmm0,-0x38(%rbp)
cmp    $0x0,%eax
movsd  %xmm0,-0x30(%rbp)
je     11e8 <lp_autoguess+0xb8>
movsd  -0x38(%rbp),%xmm0
movsd  %xmm0,-0x30(%rbp)
mov    -0x44(%rbp),%esi
mov    -0x50(%rbp),%rdi
movsd  -0x40(%rbp),%xmm0
movsd  -0x30(%rbp),%xmm1
subsd  %xmm1,%xmm0
movss  -0x10(%rbp),%xmm1
cvtss2sd %xmm1,%xmm1
mov    $0x2,%al
call   1050 <lp_best_char@plt>
mov    %eax,-0x14(%rbp)
cmpl   $0xffffffff,-0x14(%rbp)
je     122b <lp_autoguess+0xfb>
mov    -0x8(%rbp),%rdi
mov    -0x1c(%rbp),%esi
mov    -0x14(%rbp),%edx
mov    $0x0,%al
call   1030 <lp_accept@plt>
jmp    1230 <lp_autoguess+0x100>
mov    -0x18(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x18(%rbp)
jmp    117a <lp_autoguess+0x4a>
jmp    1243 <lp_autoguess+0x113>
mov    -0x20(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x20(%rbp)
jmp    1162 <lp_autoguess+0x32>
add    $0x50,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<lp_autoguess>:
push   %rbp
push   %r14
push   %rbx
sub    $0x10,%rsp
cvtsd2ss %xmm0,%xmm0
cvtsd2ss %xmm1,%xmm1
mov    %rdi,%r14
cvtss2sd %xmm0,%xmm0
movsd  %xmm0,0x8(%rsp)
xorps  %xmm0,%xmm0
cvtss2sd %xmm1,%xmm0
movsd  %xmm0,(%rsp)
mov    $0x100,%ebx
jmp    1165 <lp_autoguess+0x35>
add    $0xffffffff,%ebx
je     11a7 <lp_autoguess+0x77>
mov    %r14,%rdi
mov    $0x2,%esi
xor    %eax,%eax
call   1040 <lp_best_pos@plt>
cmp    $0xffffffff,%eax
je     11a7 <lp_autoguess+0x77>
mov    %eax,%ebp
mov    %r14,%rdi
mov    %eax,%esi
movsd  0x8(%rsp),%xmm0
movsd  (%rsp),%xmm1
mov    $0x2,%al
call   1050 <lp_best_char@plt>
cmp    $0xffffffff,%eax
je     1160 <lp_autoguess+0x30>
mov    %r14,%rdi
mov    %ebp,%esi
mov    %eax,%edx
xor    %eax,%eax
call   1030 <lp_accept@plt>
jmp    1160 <lp_autoguess+0x30>
add    $0x10,%rsp
pop    %rbx
pop    %r14
pop    %rbp
ret

LLVM IR (-O0):
%struct.ecinfox = type opaque
define void @lp_autoguess(%struct.ecinfox* %0, double %1, double %2) {
%4 = alloca %struct.ecinfox*
%5 = alloca float
%6 = alloca float
%7 = alloca i32
%8 = alloca i32
%9 = alloca i32
%10 = alloca i32
%11 = fptrunc double %1 to float
%12 = fptrunc double %2 to float
store %struct.ecinfox* %0, %struct.ecinfox** %4
store float %11, float* %5
store float %12, float* %6
store i32 0, i32* %10
br label %13
13: ; preds = %51, %3
%14 = load i32, i32* %10
%15 = icmp slt i32 %14, 1
br i1 %15, label %16, label %54
16: ; preds = %13
store i32 0, i32* %8
store i32 0, i32* %8
br label %17
17: ; preds = %47, %16
%18 = load i32, i32* %8
%19 = icmp slt i32 %18, 256
br i1 %19, label %20, label %50
20: ; preds = %17
%21 = load %struct.ecinfox*, %struct.ecinfox** %4
%22 = call i32 (%struct.ecinfox*, i32, ...) bitcast (i32 (...)* @lp_best_pos to i32 (%struct.ecinfox*, i32, ...)*)(%struct.ecinfox* %21, i32 2)
store i32 %22, i32* %9
%23 = load i32, i32* %9
%24 = icmp eq i32 %23, -1
br i1 %24, label %25, label %26
25: ; preds = %20
br label %50
26: ; preds = %20
%27 = load %struct.ecinfox*, %struct.ecinfox** %4
%28 = load i32, i32* %9
%29 = load float, float* %5
%30 = fpext float %29 to double
%31 = load i32, i32* %10
%32 = icmp eq i32 %31, 0
%33 = zext i1 %32 to i64
%34 = select i1 %32, double 0.000000e+00, double 0.000000e+00
%35 = fsub double %30, %34
%36 = load float, float* %6
%37 = fpext float %36 to double
%38 = call i32 (%struct.ecinfox*, i32, double, double, ...) bitcast (i32 (...)* @lp_best_char to i32 (%struct.ecinfox*, i32, double, double, ...)*)(%struct.ecinfox* %27, i32 %28, double %35, double %37)
store i32 %38, i32* %7
%39 = load i32, i32* %7
%40 = icmp ne i32 %39, -1
br i1 %40, label %41, label %46
41: ; preds = %26
%42 = load %struct.ecinfox*, %struct.ecinfox** %4
%43 = load i32, i32* %9
%44 = load i32, i32* %7
%45 = call i32 (%struct.ecinfox*, i32, i32, ...) bitcast (i32 (...)* @lp_accept to i32 (%struct.ecinfox*, i32, i32, ...)*)(%struct.ecinfox* %42, i32 %43, i32 %44)
br label %46
46: ; preds = %41, %26
br label %47
47: ; preds = %46
%48 = load i32, i32* %8
%49 = add nsw i32 %48, 1
store i32 %49, i32* %8
br label %17
50: ; preds = %25, %17
br label %51
51: ; preds = %50
%52 = load i32, i32* %10
%53 = add nsw i32 %52, 1
store i32 %53, i32* %10
br label %13
54: ; preds = %13
ret void
}

LLVM IR (-O2):
%struct.ecinfox = type opaque
define void @lp_autoguess(%struct.ecinfox* %0, double %1, double %2) {
%4 = fptrunc double %1 to float
%5 = fptrunc double %2 to float
%6 = fpext float %4 to double
%7 = fpext float %5 to double
br label %8
8: ; preds = %3, %17
%9 = phi i32 [ 0, %3 ], [ %18, %17 ]
%10 = tail call i32 (%struct.ecinfox*, i32, ...) bitcast (i32 (...)* @lp_best_pos to i32 (%struct.ecinfox*, i32, ...)*)(%struct.ecinfox* %0, i32 2)
%11 = icmp eq i32 %10, -1
br i1 %11, label %20, label %12
12: ; preds = %8
%13 = tail call i32 (%struct.ecinfox*, i32, double, double, ...) bitcast (i32 (...)* @lp_best_char to i32 (%struct.ecinfox*, i32, double, double, ...)*)(%struct.ecinfox* %0, i32 %10, double %6, double %7)
%14 = icmp eq i32 %13, -1
br i1 %14, label %17, label %15
15: ; preds = %12
%16 = tail call i32 (%struct.ecinfox*, i32, i32, ...) bitcast (i32 (...)* @lp_accept to i32 (%struct.ecinfox*, i32, i32, ...)*)(%struct.ecinfox* %0, i32 %10, i32 %13)
br label %17
17: ; preds = %12, %15
%18 = add nuw nsw i32 %9, 1
%19 = icmp eq i32 %18, 256
br i1 %19, label %20, label %8
20: ; preds = %17, %8
ret void
}