double hyperg(a, b, x)
double a, b, x;
{
  double asum, psum, acanc, pcanc, temp;
  temp = b - a;
  if (fabs(temp) < 0.001 * fabs(a))
    return (exp(x) * hyperg(temp, b, -x));
  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    $0x50,%rsp
movsd  %xmm0,-0x10(%rbp)
movsd  %xmm1,-0x18(%rbp)
movsd  %xmm2,-0x20(%rbp)
movsd  -0x18(%rbp),%xmm0
subsd  -0x10(%rbp),%xmm0
movsd  %xmm0,-0x48(%rbp)
movsd  -0x48(%rbp),%xmm1
movaps 0xe9e(%rip),%xmm0
pand   %xmm0,%xmm1
movsd  -0x10(%rbp),%xmm2
movaps 0xe8e(%rip),%xmm0
pand   %xmm0,%xmm2
movsd  0xe62(%rip),%xmm0
mulsd  %xmm2,%xmm0
ucomisd %xmm1,%xmm0
jbe    11fc <hyperg+0xac>
movsd  -0x20(%rbp),%xmm0
call   1050 <exp@plt>
movsd  %xmm0,-0x50(%rbp)
movsd  -0x48(%rbp),%xmm0
movsd  -0x18(%rbp),%xmm1
movsd  -0x20(%rbp),%xmm2
movq   %xmm2,%rax
movabs $0x8000000000000000,%rcx
xor    %rcx,%rax
movq   %rax,%xmm2
call   1040 <hyperg@plt>
movaps %xmm0,%xmm1
movsd  -0x50(%rbp),%xmm0
mulsd  %xmm1,%xmm0
movsd  %xmm0,-0x8(%rbp)
jmp    12bb <hyperg+0x16b>
movsd  -0x10(%rbp),%xmm0
movsd  -0x18(%rbp),%xmm1
movsd  -0x20(%rbp),%xmm2
lea    -0x40(%rbp),%rdi
mov    $0x3,%al
call   1030 <hy1f1p@plt>
cvtsi2sd %eax,%xmm0
movsd  %xmm0,-0x30(%rbp)
movsd  0xde1(%rip),%xmm0
ucomisd -0x40(%rbp),%xmm0
jbe    1237 <hyperg+0xe7>
jmp    1287 <hyperg+0x137>
movsd  -0x10(%rbp),%xmm0
movsd  -0x18(%rbp),%xmm1
movsd  -0x20(%rbp),%xmm2
lea    -0x38(%rbp),%rdi
mov    $0x3,%al
call   1060 <hy1f1a@plt>
cvtsi2sd %eax,%xmm0
movsd  %xmm0,-0x28(%rbp)
movsd  -0x38(%rbp),%xmm1
movsd  -0x40(%rbp),%xmm0
ucomisd %xmm1,%xmm0
jbe    1282 <hyperg+0x132>
movsd  -0x38(%rbp),%xmm0
movsd  %xmm0,-0x40(%rbp)
movsd  -0x28(%rbp),%xmm0
movsd  %xmm0,-0x30(%rbp)
jmp    1287 <hyperg+0x137>
movsd  -0x40(%rbp),%xmm0
movsd  0xd7c(%rip),%xmm1
ucomisd %xmm1,%xmm0
jbe    12b1 <hyperg+0x161>
lea    0xd8b(%rip),%rdi
mov    $0x6,%esi
mov    $0x0,%al
call   1070 <mtherr@plt>
movsd  -0x30(%rbp),%xmm0
movsd  %xmm0,-0x8(%rbp)
movsd  -0x8(%rbp),%xmm0
add    $0x50,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<hyperg>:
push   %rbx
sub    $0x50,%rsp
movapd %xmm1,%xmm5
subsd  %xmm0,%xmm5
movapd 0xe9b(%rip),%xmm4
movapd %xmm5,%xmm3
andpd  %xmm4,%xmm3
andpd  %xmm0,%xmm4
mulsd  0xea7(%rip),%xmm4
ucomisd %xmm3,%xmm4
movaps %xmm2,0x10(%rsp)
movsd  %xmm1,0x8(%rsp)
jbe    11c8 <hyperg+0x78>
movaps %xmm2,%xmm0
movapd %xmm5,0x40(%rsp)
call   1050 <exp@plt>
movsd  %xmm0,0x20(%rsp)
movapd 0x10(%rsp),%xmm2
xorpd  0xe64(%rip),%xmm2
movapd 0x40(%rsp),%xmm0
movsd  0x8(%rsp),%xmm1
call   1040 <hyperg@plt>
mulsd  0x20(%rsp),%xmm0
jmp    1256 <hyperg+0x106>
mov    %rsp,%rdi
movapd %xmm0,0x20(%rsp)
mov    $0x3,%al
call   1030 <hy1f1p@plt>
mov    %eax,%ebx
movsd  (%rsp),%xmm2
movsd  0xe41(%rip),%xmm1
ucomisd %xmm2,%xmm1
ja     1226 <hyperg+0xd6>
lea    0x38(%rsp),%rdi
movapd 0x20(%rsp),%xmm0
movsd  0x8(%rsp),%xmm1
movaps 0x10(%rsp),%xmm2
mov    $0x3,%al
call   1060 <hy1f1a@plt>
movsd  0x38(%rsp),%xmm1
movsd  (%rsp),%xmm2
ucomisd %xmm1,%xmm2
jbe    1226 <hyperg+0xd6>
movsd  %xmm1,(%rsp)
movapd %xmm1,%xmm2
mov    %eax,%ebx
xorps  %xmm0,%xmm0
cvtsi2sd %ebx,%xmm0
ucomisd 0xdfb(%rip),%xmm2
jbe    1256 <hyperg+0x106>
lea    0xdfa(%rip),%rdi
mov    $0x6,%esi
xor    %eax,%eax
movsd  %xmm0,0x10(%rsp)
call   1070 <mtherr@plt>
movsd  0x10(%rsp),%xmm0
add    $0x50,%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
%11 = alloca double
%12 = alloca double
store double %0, double* %5
store double %1, double* %6
store double %2, double* %7
%13 = load double, double* %6
%14 = load double, double* %5
%15 = fsub double %13, %14
store double %15, double* %12
%16 = load double, double* %12
%17 = call double @llvm.fabs.f64(double %16)
%18 = load double, double* %5
%19 = call double @llvm.fabs.f64(double %18)
%20 = fmul double 1.000000e-03, %19
%21 = fcmp olt double %17, %20
br i1 %21, label %22, label %31
22: ; preds = %3
%23 = load double, double* %7
%24 = call double @exp(double %23)
%25 = load double, double* %12
%26 = load double, double* %6
%27 = load double, double* %7
%28 = fneg double %27
%29 = call double @hyperg(double %25, double %26, double %28)
%30 = fmul double %24, %29
store double %30, double* %4
br label %60
31: ; preds = %3
%32 = load double, double* %5
%33 = load double, double* %6
%34 = load double, double* %7
%35 = call i32 (double, double, double, double*, ...) bitcast (i32 (...)* @hy1f1p to i32 (double, double, double, double*, ...)*)(double %32, double %33, double %34, double* %11)
%36 = sitofp i32 %35 to double
store double %36, double* %9
%37 = load double, double* %11
%38 = fcmp olt double %37, 1.000000e-15
br i1 %38, label %39, label %40
39: ; preds = %31
br label %53
40: ; preds = %31
%41 = load double, double* %5
%42 = load double, double* %6
%43 = load double, double* %7
%44 = call i32 (double, double, double, double*, ...) bitcast (i32 (...)* @hy1f1a to i32 (double, double, double, double*, ...)*)(double %41, double %42, double %43, double* %10)
%45 = sitofp i32 %44 to double
store double %45, double* %8
%46 = load double, double* %10
%47 = load double, double* %11
%48 = fcmp olt double %46, %47
br i1 %48, label %49, label %52
49: ; preds = %40
%50 = load double, double* %10
store double %50, double* %11
%51 = load double, double* %8
store double %51, double* %9
br label %52
52: ; preds = %49, %40
br label %53
53: ; preds = %52, %39
%54 = load double, double* %11
%55 = fcmp ogt double %54, 0x3D719799812DEA11
br i1 %55, label %56, label %58
56: ; preds = %53
%57 = 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 %58
58: ; preds = %56, %53
%59 = load double, double* %9
store double %59, double* %4
br label %60
60: ; preds = %58, %22
%61 = load double, double* %4
ret double %61
}

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*
%8 = fsub double %1, %0
%9 = tail call double @llvm.fabs.f64(double %8)
%10 = tail call double @llvm.fabs.f64(double %0)
%11 = fmul double %10, 1.000000e-03
%12 = fcmp olt double %9, %11
br i1 %12, label %13, label %18
13: ; preds = %3
%14 = tail call double @exp(double %2)
%15 = fneg double %2
%16 = tail call double @hyperg(double %8, double %1, double %15)
%17 = fmul double %14, %16
br label %35
18: ; preds = %3
%19 = call i32 (double, double, double, double*, ...) bitcast (i32 (...)* @hy1f1p to i32 (double, double, double, double*, ...)*)(double %0, double %1, double %2, double* %5)
%20 = load double, double* %5
%21 = fcmp olt double %20, 1.000000e-15
br i1 %21, label %28, label %22
22: ; preds = %18
%23 = call i32 (double, double, double, double*, ...) bitcast (i32 (...)* @hy1f1a to i32 (double, double, double, double*, ...)*)(double %0, double %1, double %2, double* %4)
%24 = load double, double* %4
%25 = load double, double* %5
%26 = fcmp olt double %24, %25
br i1 %26, label %27, label %28
27: ; preds = %22
store double %24, double* %5
br label %28
28: ; preds = %22, %27, %18
%29 = phi double [ %25, %22 ], [ %24, %27 ], [ %20, %18 ]
%30 = phi i32 [ %19, %22 ], [ %23, %27 ], [ %19, %18 ]
%31 = sitofp i32 %30 to double
%32 = fcmp ogt double %29, 0x3D719799812DEA11
br i1 %32, label %33, label %35
33: ; preds = %28
%34 = 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 %35
35: ; preds = %28, %33, %13
%36 = phi double [ %17, %13 ], [ %31, %33 ], [ %31, %28 ]
ret double %36
}