double hyperg(a, b, x)
double a, b, x;
{
  double asum, psum, acanc, pcanc = 0;
  psum = hy1f1p(a, b, x, &pcanc);
  if (pcanc < 1.0e-15)
    goto done;
  asum = hy1f1a(a, b, x, &acanc);
  if (acanc < pcanc) {
    pcanc = acanc;
    psum = asum;
  }
done:
  if (pcanc > 1.0e-12)
    mtherr("hyperg", 6);
  return (psum);
}


x86 assembly (clang, -O0):
<hyperg>:
push   %rbp
mov    %rsp,%rbp
sub    $0x40,%rsp
movsd  %xmm0,-0x8(%rbp)
movsd  %xmm1,-0x10(%rbp)
movsd  %xmm2,-0x18(%rbp)
xorps  %xmm0,%xmm0
movsd  %xmm0,-0x38(%rbp)
movsd  -0x8(%rbp),%xmm0
movsd  -0x10(%rbp),%xmm1
movsd  -0x18(%rbp),%xmm2
lea    -0x38(%rbp),%rdi
mov    $0x3,%al
call   1030 <hy1f1p@plt>
cvtsi2sd %eax,%xmm0
movsd  %xmm0,-0x28(%rbp)
movsd  0xe86(%rip),%xmm0
ucomisd -0x38(%rbp),%xmm0
jbe    118a <hyperg+0x5a>
jmp    11da <hyperg+0xaa>
movsd  -0x8(%rbp),%xmm0
movsd  -0x10(%rbp),%xmm1
movsd  -0x18(%rbp),%xmm2
lea    -0x30(%rbp),%rdi
mov    $0x3,%al
call   1040 <hy1f1a@plt>
cvtsi2sd %eax,%xmm0
movsd  %xmm0,-0x20(%rbp)
movsd  -0x30(%rbp),%xmm1
movsd  -0x38(%rbp),%xmm0
ucomisd %xmm1,%xmm0
jbe    11d5 <hyperg+0xa5>
movsd  -0x30(%rbp),%xmm0
movsd  %xmm0,-0x38(%rbp)
movsd  -0x20(%rbp),%xmm0
movsd  %xmm0,-0x28(%rbp)
jmp    11da <hyperg+0xaa>
movsd  -0x38(%rbp),%xmm0
movsd  0xe21(%rip),%xmm1
ucomisd %xmm1,%xmm0
jbe    1204 <hyperg+0xd4>
lea    0xe18(%rip),%rdi
mov    $0x6,%esi
mov    $0x0,%al
call   1050 <mtherr@plt>
movsd  -0x28(%rbp),%xmm0
add    $0x40,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<hyperg>:
push   %rbx
sub    $0x30,%rsp
movq   $0x0,0x8(%rsp)
lea    0x8(%rsp),%rdi
movsd  %xmm0,0x10(%rsp)
movsd  %xmm1,0x18(%rsp)
movsd  %xmm2,0x20(%rsp)
mov    $0x3,%al
call   1030 <hy1f1p@plt>
mov    %eax,%ebx
movsd  0x8(%rsp),%xmm0
movsd  0xe94(%rip),%xmm1
ucomisd %xmm0,%xmm1
ja     11ae <hyperg+0x7e>
lea    0x28(%rsp),%rdi
movsd  0x10(%rsp),%xmm0
movsd  0x18(%rsp),%xmm1
movsd  0x20(%rsp),%xmm2
mov    $0x3,%al
call   1040 <hy1f1a@plt>
movsd  0x28(%rsp),%xmm1
movsd  0x8(%rsp),%xmm0
ucomisd %xmm1,%xmm0
jbe    11ae <hyperg+0x7e>
movsd  %xmm1,0x8(%rsp)
movapd %xmm1,%xmm0
mov    %eax,%ebx
ucomisd 0xe52(%rip),%xmm0
jbe    11cb <hyperg+0x9b>
lea    0xe51(%rip),%rdi
mov    $0x6,%esi
xor    %eax,%eax
call   1050 <mtherr@plt>
xorps  %xmm0,%xmm0
cvtsi2sd %ebx,%xmm0
add    $0x30,%rsp
pop    %rbx
ret

LLVM IR (-O0):
@.str = [7 x i8] c"hyperg\00"
define double @hyperg(double %0, double %1, double %2) {
%4 = alloca double
%5 = alloca double
%6 = alloca double
%7 = alloca double
%8 = alloca double
%9 = alloca double
%10 = alloca double
store double %0, double* %4
store double %1, double* %5
store double %2, double* %6
store double 0.000000e+00, double* %10
%11 = load double, double* %4
%12 = load double, double* %5
%13 = load double, double* %6
%14 = call i32 (double, double, double, double*, ...) bitcast (i32 (...)* @hy1f1p to i32 (double, double, double, double*, ...)*)(double %11, double %12, double %13, double* %10)
%15 = sitofp i32 %14 to double
store double %15, double* %8
%16 = load double, double* %10
%17 = fcmp olt double %16, 1.000000e-15
br i1 %17, label %18, label %19
18: ; preds = %3
br label %32
19: ; preds = %3
%20 = load double, double* %4
%21 = load double, double* %5
%22 = load double, double* %6
%23 = call i32 (double, double, double, double*, ...) bitcast (i32 (...)* @hy1f1a to i32 (double, double, double, double*, ...)*)(double %20, double %21, double %22, double* %9)
%24 = sitofp i32 %23 to double
store double %24, double* %7
%25 = load double, double* %9
%26 = load double, double* %10
%27 = fcmp olt double %25, %26
br i1 %27, label %28, label %31
28: ; preds = %19
%29 = load double, double* %9
store double %29, double* %10
%30 = load double, double* %7
store double %30, double* %8
br label %31
31: ; preds = %28, %19
br label %32
32: ; preds = %31, %18
%33 = load double, double* %10
%34 = fcmp ogt double %33, 0x3D719799812DEA11
br i1 %34, label %35, label %37
35: ; preds = %32
%36 = call i32 (i8*, i32, ...) bitcast (i32 (...)* @mtherr to i32 (i8*, i32, ...)*)(i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str, i64 0, i64 0), i32 6)
br label %37
37: ; preds = %35, %32
%38 = load double, double* %8
ret double %38
}

LLVM IR (-O2):
@.str = [7 x i8] c"hyperg\00"
define double @hyperg(double %0, double %1, double %2) {
%4 = alloca double
%5 = alloca double
%6 = bitcast double* %4 to i8*
%7 = bitcast double* %5 to i8*
store double 0.000000e+00, double* %5
%8 = call i32 (double, double, double, double*, ...) bitcast (i32 (...)* @hy1f1p to i32 (double, double, double, double*, ...)*)(double %0, double %1, double %2, double* %5)
%9 = load double, double* %5
%10 = fcmp olt double %9, 1.000000e-15
br i1 %10, label %17, label %11
11: ; preds = %3
%12 = call i32 (double, double, double, double*, ...) bitcast (i32 (...)* @hy1f1a to i32 (double, double, double, double*, ...)*)(double %0, double %1, double %2, double* %4)
%13 = load double, double* %4
%14 = load double, double* %5
%15 = fcmp olt double %13, %14
br i1 %15, label %16, label %17
16: ; preds = %11
store double %13, double* %5
br label %17
17: ; preds = %11, %16, %3
%18 = phi double [ %14, %11 ], [ %13, %16 ], [ %9, %3 ]
%19 = phi i32 [ %8, %11 ], [ %12, %16 ], [ %8, %3 ]
%20 = fcmp ogt double %18, 0x3D719799812DEA11
br i1 %20, label %21, label %23
21: ; preds = %17
%22 = call i32 (i8*, i32, ...) bitcast (i32 (...)* @mtherr to i32 (i8*, i32, ...)*)(i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str, i64 0, i64 0), i32 6)
br label %23
23: ; preds = %21, %17
%24 = sitofp i32 %19 to double
ret double %24
}