float qromb(func, a, b)
float a, b;
float (*func)();
{
  float ss, dss, trapzd();
  float s[20 + 1 + 1], h[20 + 1 + 1];
  int j;
  void polint(), nrerror();
  h[1] = 1.0;
  for (j = 1; j <= 20; j++) {
    s[j] = trapzd(func, a, b, j);
    if (j >= 5) {
      polint(&h[j - 5], &s[j - 5], 5, 0.0, &ss, &dss);
      if (fabs(dss) < 0.5e-5 * fabs(ss))
        return ss;
    }
    s[j + 1] = s[j];
    h[j + 1] = 0.25 * h[j];
  }
  nrerror("Too many steps in routine QROMB");
  return -1.;
}


x86 assembly (clang, -O0):
<qromb>:
push   %rbp
mov    %rsp,%rbp
sub    $0xf0,%rsp
movsd  %xmm1,-0xf0(%rbp)
ff
movaps %xmm0,%xmm1
movsd  -0xf0(%rbp),%xmm0
ff
cvtsd2ss %xmm1,%xmm1
cvtsd2ss %xmm0,%xmm0
mov    %rdi,-0x10(%rbp)
movss  %xmm1,-0x14(%rbp)
movss  %xmm0,-0x18(%rbp)
movss  0xe94(%rip),%xmm0
movss  %xmm0,-0xdc(%rbp)
ff
movl   $0x1,-0xe4(%rbp)
cmpl   $0x14,-0xe4(%rbp)
jg     12ca <qromb+0x19a>
mov    -0x10(%rbp),%rdi
movss  -0x14(%rbp),%xmm0
cvtss2sd %xmm0,%xmm0
movss  -0x18(%rbp),%xmm1
cvtss2sd %xmm1,%xmm1
mov    -0xe4(%rbp),%esi
mov    $0x2,%al
call   1040 <trapzd@plt>
movslq -0xe4(%rbp),%rax
movss  %xmm0,-0x80(%rbp,%rax,4)
cmpl   $0x5,-0xe4(%rbp)
jl     1260 <qromb+0x130>
mov    -0xe4(%rbp),%eax
sub    $0x5,%eax
cltq
lea    -0xe0(%rbp),%rdi
shl    $0x2,%rax
add    %rax,%rdi
mov    -0xe4(%rbp),%eax
sub    $0x5,%eax
cltq
lea    -0x80(%rbp),%rsi
shl    $0x2,%rax
add    %rax,%rsi
mov    $0x5,%edx
xorps  %xmm0,%xmm0
lea    -0x1c(%rbp),%rcx
lea    -0x20(%rbp),%r8
mov    $0x1,%al
call   1050 <polint@plt>
movss  -0x20(%rbp),%xmm0
cvtss2sd %xmm0,%xmm1
movaps 0xe02(%rip),%xmm0
pand   %xmm0,%xmm1
movss  -0x1c(%rbp),%xmm0
cvtss2sd %xmm0,%xmm2
movaps 0xdee(%rip),%xmm0
pand   %xmm0,%xmm2
movsd  0xdca(%rip),%xmm0
mulsd  %xmm2,%xmm0
ucomisd %xmm1,%xmm0
jbe    125b <qromb+0x12b>
movss  -0x1c(%rbp),%xmm0
movss  %xmm0,-0x4(%rbp)
jmp    12e5 <qromb+0x1b5>
jmp    1260 <qromb+0x130>
movslq -0xe4(%rbp),%rax
movss  -0x80(%rbp,%rax,4),%xmm0
mov    -0xe4(%rbp),%eax
add    $0x1,%eax
cltq
movss  %xmm0,-0x80(%rbp,%rax,4)
movslq -0xe4(%rbp),%rax
movss  -0xe0(%rbp,%rax,4),%xmm0
ff ff
cvtss2sd %xmm0,%xmm1
movsd  0xd76(%rip),%xmm0
mulsd  %xmm1,%xmm0
cvtsd2ss %xmm0,%xmm0
mov    -0xe4(%rbp),%eax
add    $0x1,%eax
cltq
movss  %xmm0,-0xe0(%rbp,%rax,4)
ff ff
mov    -0xe4(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0xe4(%rbp)
jmp    117e <qromb+0x4e>
lea    0xd5f(%rip),%rdi
mov    $0x0,%al
call   1030 <nrerror@plt>
movss  0xd24(%rip),%xmm0
movss  %xmm0,-0x4(%rbp)
movss  -0x4(%rbp),%xmm0
add    $0xf0,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<qromb>:
push   %rbp
push   %r15
push   %r14
push   %r13
push   %r12
push   %rbx
sub    $0xd8,%rsp
cvtsd2ss %xmm0,%xmm0
cvtsd2ss %xmm1,%xmm1
mov    %rdi,%r15
movl   $0x3f800000,0x24(%rsp)
3f
cvtss2sd %xmm0,%xmm0
movsd  %xmm0,0x18(%rsp)
xorps  %xmm0,%xmm0
cvtss2sd %xmm1,%xmm0
movsd  %xmm0,0x10(%rsp)
mov    $0x1,%ebx
mov    $0xfffffffc,%r13d
mov    $0x14,%ebp
lea    0xc(%rsp),%r14
lea    0x8(%rsp),%r12
jmp    11bf <qromb+0x8f>
nopw   0x0(%rax,%rax,1)
movss  %xmm0,0x84(%rsp,%rbx,4)
movss  0x20(%rsp,%rbx,4),%xmm0
mulss  0xe71(%rip),%xmm0
movss  %xmm0,0x24(%rsp,%rbx,4)
add    $0x1,%rbx
add    $0x1,%r13
add    $0xffffffffffffffff,%rbp
je     1255 <qromb+0x125>
mov    %r15,%rdi
movsd  0x18(%rsp),%xmm0
movsd  0x10(%rsp),%xmm1
mov    %ebx,%esi
mov    $0x2,%al
call   1040 <trapzd@plt>
movss  %xmm0,0x80(%rsp,%rbx,4)
cmp    $0x5,%rbx
jb     1190 <qromb+0x60>
mov    %r13d,%eax
shl    $0x2,%rax
lea    (%rsp,%rax,1),%rdi
add    $0x20,%rdi
lea    0x80(%rsp,%rax,1),%rsi
xorps  %xmm0,%xmm0
mov    $0x5,%edx
mov    %r14,%rcx
mov    %r12,%r8
mov    $0x1,%al
call   1050 <polint@plt>
movss  0x8(%rsp),%xmm0
movaps 0xde1(%rip),%xmm3
andps  %xmm3,%xmm0
xorps  %xmm1,%xmm1
cvtss2sd %xmm0,%xmm1
movss  0xc(%rsp),%xmm0
movaps %xmm0,%xmm2
andps  %xmm3,%xmm2
cvtss2sd %xmm2,%xmm2
mulsd  0xdcf(%rip),%xmm2
ucomisd %xmm1,%xmm2
ja     126b <qromb+0x13b>
movss  0x80(%rsp,%rbx,4),%xmm0
jmp    1190 <qromb+0x60>
lea    0xdc4(%rip),%rdi
xor    %eax,%eax
call   1030 <nrerror@plt>
movss  0xdb1(%rip),%xmm0
add    $0xd8,%rsp
pop    %rbx
pop    %r12
pop    %r13
pop    %r14
pop    %r15
pop    %rbp
ret

LLVM IR (-O0):
@.str = [32 x i8] c"Too many steps in routine QROMB\00"
define float @qromb(float (...)* %0, double %1, double %2) {
%4 = alloca float
%5 = alloca float (...)*
%6 = alloca float
%7 = alloca float
%8 = alloca float
%9 = alloca float
%10 = alloca [22 x float]
%11 = alloca [22 x float]
%12 = alloca i32
%13 = fptrunc double %1 to float
%14 = fptrunc double %2 to float
store float (...)* %0, float (...)** %5
store float %13, float* %6
store float %14, float* %7
%15 = getelementptr inbounds [22 x float], [22 x float]* %11, i64 0, i64 1
store float 1.000000e+00, float* %15
store i32 1, i32* %12
br label %16
16: ; preds = %72, %3
%17 = load i32, i32* %12
%18 = icmp sle i32 %17, 20
br i1 %18, label %19, label %75
19: ; preds = %16
%20 = load float (...)*, float (...)** %5
%21 = load float, float* %6
%22 = fpext float %21 to double
%23 = load float, float* %7
%24 = fpext float %23 to double
%25 = load i32, i32* %12
%26 = call float (float (...)*, double, double, i32, ...) bitcast (float (...)* @trapzd to float (float (...)*, double, double, i32, ...)*)(float (...)* %20, double %22, double %24, i32 %25)
%27 = load i32, i32* %12
%28 = sext i32 %27 to i64
%29 = getelementptr inbounds [22 x float], [22 x float]* %10, i64 0, i64 %28
store float %26, float* %29
%30 = load i32, i32* %12
%31 = icmp sge i32 %30, 5
br i1 %31, label %32, label %52
32: ; preds = %19
%33 = load i32, i32* %12
%34 = sub nsw i32 %33, 5
%35 = sext i32 %34 to i64
%36 = getelementptr inbounds [22 x float], [22 x float]* %11, i64 0, i64 %35
%37 = load i32, i32* %12
%38 = sub nsw i32 %37, 5
%39 = sext i32 %38 to i64
%40 = getelementptr inbounds [22 x float], [22 x float]* %10, i64 0, i64 %39
%41 = load float, float* %9
%42 = fpext float %41 to double
%43 = call double @llvm.fabs.f64(double %42)
%44 = load float, float* %8
%45 = fpext float %44 to double
%46 = call double @llvm.fabs.f64(double %45)
%47 = fmul double 5.000000e-06, %46
%48 = fcmp olt double %43, %47
br i1 %48, label %49, label %51
49: ; preds = %32
%50 = load float, float* %8
store float %50, float* %4
br label %76
51: ; preds = %32
br label %52
52: ; preds = %51, %19
%53 = load i32, i32* %12
%54 = sext i32 %53 to i64
%55 = getelementptr inbounds [22 x float], [22 x float]* %10, i64 0, i64 %54
%56 = load float, float* %55
%57 = load i32, i32* %12
%58 = add nsw i32 %57, 1
%59 = sext i32 %58 to i64
%60 = getelementptr inbounds [22 x float], [22 x float]* %10, i64 0, i64 %59
store float %56, float* %60
%61 = load i32, i32* %12
%62 = sext i32 %61 to i64
%63 = getelementptr inbounds [22 x float], [22 x float]* %11, i64 0, i64 %62
%64 = load float, float* %63
%65 = fpext float %64 to double
%66 = fmul double 2.500000e-01, %65
%67 = fptrunc double %66 to float
%68 = load i32, i32* %12
%69 = add nsw i32 %68, 1
%70 = sext i32 %69 to i64
%71 = getelementptr inbounds [22 x float], [22 x float]* %11, i64 0, i64 %70
store float %67, float* %71
br label %72
72: ; preds = %52
%73 = load i32, i32* %12
%74 = add nsw i32 %73, 1
store i32 %74, i32* %12
br label %16
75: ; preds = %16
store float -1.000000e+00, float* %4
br label %76
76: ; preds = %75, %49
%77 = load float, float* %4
ret float %77
}

LLVM IR (-O2):
@.str = [32 x i8] c"Too many steps in routine QROMB\00"
define float @qromb(float (...)* %0, double %1, double %2) {
%4 = alloca float
%5 = alloca float
%6 = alloca [22 x float]
%7 = alloca [22 x float]
%8 = fptrunc double %1 to float
%9 = fptrunc double %2 to float
%10 = bitcast float* %4 to i8*
%11 = bitcast float* %5 to i8*
%12 = bitcast [22 x float]* %6 to i8*
%13 = bitcast [22 x float]* %7 to i8*
%14 = getelementptr inbounds [22 x float], [22 x float]* %7, i64 0, i64 1
store float 1.000000e+00, float* %14
%15 = fpext float %8 to double
%16 = fpext float %9 to double
br label %17
17: ; preds = %3, %38
%18 = phi i64 [ 1, %3 ], [ %40, %38 ]
%19 = trunc i64 %18 to i32
%20 = call float (float (...)*, double, double, i32, ...) bitcast (float (...)* @trapzd to float (float (...)*, double, double, i32, ...)*)(float (...)* %0, double %15, double %16, i32 %19)
%21 = getelementptr inbounds [22 x float], [22 x float]* %6, i64 0, i64 %18
store float %20, float* %21
%22 = icmp ugt i64 %18, 4
br i1 %22, label %23, label %38
23: ; preds = %17
%24 = add nuw i64 %18, 4294967291
%25 = and i64 %24, 4294967295
%26 = getelementptr inbounds [22 x float], [22 x float]* %7, i64 0, i64 %25
%27 = getelementptr inbounds [22 x float], [22 x float]* %6, i64 0, i64 %25
%28 = load float, float* %5
%29 = call float @llvm.fabs.f32(float %28)
%30 = fpext float %29 to double
%31 = load float, float* %4
%32 = call float @llvm.fabs.f32(float %31)
%33 = fpext float %32 to double
%34 = fmul double %33, 5.000000e-06
%35 = fcmp ogt double %34, %30
br i1 %35, label %48, label %36
36: ; preds = %23
%37 = load float, float* %21
br label %38
38: ; preds = %36, %17
%39 = phi float [ %37, %36 ], [ %20, %17 ]
%40 = add nuw nsw i64 %18, 1
%41 = getelementptr inbounds [22 x float], [22 x float]* %6, i64 0, i64 %40
store float %39, float* %41
%42 = getelementptr inbounds [22 x float], [22 x float]* %7, i64 0, i64 %18
%43 = load float, float* %42
%44 = fmul float %43, 2.500000e-01
%45 = getelementptr inbounds [22 x float], [22 x float]* %7, i64 0, i64 %40
store float %44, float* %45
%46 = icmp eq i64 %40, 21
br i1 %46, label %47, label %17
47: ; preds = %38
br label %48
48: ; preds = %23, %47
%49 = phi float [ -1.000000e+00, %47 ], [ %31, %23 ]
ret float %49
}