void cdflib_beta_inc_values(int *n_data, double *a, double *b, double *x,
                            double *fx) {
  enum { N_MAX = 30 };
  static const double a_vec[N_MAX] = {
      0.5E+00,  0.5E+00,  0.5E+00,  1.0E+00,  1.0E+00,  1.0E+00,
      1.0E+00,  1.0E+00,  2.0E+00,  2.0E+00,  2.0E+00,  2.0E+00,
      2.0E+00,  2.0E+00,  2.0E+00,  2.0E+00,  2.0E+00,  5.5E+00,
      10.0E+00, 10.0E+00, 10.0E+00, 10.0E+00, 20.0E+00, 20.0E+00,
      20.0E+00, 20.0E+00, 20.0E+00, 30.0E+00, 30.0E+00, 40.0E+00};
  static const double b_vec[N_MAX] = {
      0.5E+00,  0.5E+00,  0.5E+00,  0.5E+00,  0.5E+00,  0.5E+00,
      0.5E+00,  1.0E+00,  2.0E+00,  2.0E+00,  2.0E+00,  2.0E+00,
      2.0E+00,  2.0E+00,  2.0E+00,  2.0E+00,  2.0E+00,  5.0E+00,
      0.5E+00,  5.0E+00,  5.0E+00,  10.0E+00, 5.0E+00,  10.0E+00,
      10.0E+00, 20.0E+00, 20.0E+00, 10.0E+00, 10.0E+00, 20.0E+00};
  static const double fx_vec[N_MAX] = {
      0.0637686E+00, 0.2048328E+00, 1.0000000E+00, 0.0E+00,
      0.0050126E+00, 0.0513167E+00, 0.2928932E+00, 0.5000000E+00,
      0.028E+00,     0.104E+00,     0.216E+00,     0.352E+00,
      0.500E+00,     0.648E+00,     0.784E+00,     0.896E+00,
      0.972E+00,     0.4361909E+00, 0.1516409E+00, 0.0897827E+00,
      1.0000000E+00, 0.5000000E+00, 0.4598773E+00, 0.2146816E+00,
      0.9507365E+00, 0.5000000E+00, 0.8979414E+00, 0.2241297E+00,
      0.7586405E+00, 0.7001783E+00};
  static const double x_vec[N_MAX] = {
      0.01E+00, 0.10E+00, 1.00E+00, 0.0E+00,  0.01E+00, 0.10E+00,
      0.50E+00, 0.50E+00, 0.1E+00,  0.2E+00,  0.3E+00,  0.4E+00,
      0.5E+00,  0.6E+00,  0.7E+00,  0.8E+00,  0.9E+00,  0.50E+00,
      0.90E+00, 0.50E+00, 1.00E+00, 0.50E+00, 0.80E+00, 0.60E+00,
      0.80E+00, 0.50E+00, 0.60E+00, 0.70E+00, 0.80E+00, 0.70E+00};
  if (*n_data < 0) {
    *n_data = 0;
  }
  *n_data = *n_data + 1;
  if (N_MAX < *n_data) {
    *n_data = 0;
    *a = 0.0E+00;
    *b = 0.0E+00;
    *x = 0.0E+00;
    *fx = 0.0E+00;
  } else {
    *a = a_vec[*n_data - 1];
    *b = b_vec[*n_data - 1];
    *x = x_vec[*n_data - 1];
    *fx = fx_vec[*n_data - 1];
  }
  return;
}


x86 assembly (clang, -O0):
<cdflib_beta_inc_values>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %rdx,-0x18(%rbp)
mov    %rcx,-0x20(%rbp)
mov    %r8,-0x28(%rbp)
mov    -0x8(%rbp),%rax
cmpl   $0x0,(%rax)
jge    112f <cdflib_beta_inc_values+0x2f>
mov    -0x8(%rbp),%rax
movl   $0x0,(%rax)
mov    -0x8(%rbp),%rax
mov    (%rax),%ecx
add    $0x1,%ecx
mov    -0x8(%rbp),%rax
mov    %ecx,(%rax)
mov    -0x8(%rbp),%rcx
mov    $0x1e,%eax
cmp    (%rcx),%eax
jge    118a <cdflib_beta_inc_values+0x8a>
mov    -0x8(%rbp),%rax
movl   $0x0,(%rax)
mov    -0x10(%rbp),%rax
xorps  %xmm0,%xmm0
movsd  %xmm0,(%rax)
mov    -0x18(%rbp),%rax
xorps  %xmm0,%xmm0
movsd  %xmm0,(%rax)
mov    -0x20(%rbp),%rax
xorps  %xmm0,%xmm0
movsd  %xmm0,(%rax)
mov    -0x28(%rbp),%rax
xorps  %xmm0,%xmm0
movsd  %xmm0,(%rax)
jmp    120a <cdflib_beta_inc_values+0x10a>
mov    -0x8(%rbp),%rax
mov    (%rax),%eax
sub    $0x1,%eax
movslq %eax,%rcx
lea    0xe63(%rip),%rax
movsd  (%rax,%rcx,8),%xmm0
mov    -0x10(%rbp),%rax
movsd  %xmm0,(%rax)
mov    -0x8(%rbp),%rax
mov    (%rax),%eax
sub    $0x1,%eax
movslq %eax,%rcx
lea    0xf33(%rip),%rax
movsd  (%rax,%rcx,8),%xmm0
mov    -0x18(%rbp),%rax
movsd  %xmm0,(%rax)
mov    -0x8(%rbp),%rax
mov    (%rax),%eax
sub    $0x1,%eax
movslq %eax,%rcx
lea    0x10f3(%rip),%rax
movsd  (%rax,%rcx,8),%xmm0
mov    -0x20(%rbp),%rax
movsd  %xmm0,(%rax)
mov    -0x8(%rbp),%rax
mov    (%rax),%eax
sub    $0x1,%eax
movslq %eax,%rcx
lea    0xfe3(%rip),%rax
movsd  (%rax,%rcx,8),%xmm0
mov    -0x28(%rbp),%rax
movsd  %xmm0,(%rax)
pop    %rbp
ret

x86 assembly (clang, -O2):
<cdflib_beta_inc_values>:
mov    (%rdi),%r9d
test   %r9d,%r9d
js     1138 <cdflib_beta_inc_values+0x38>
lea    0x1(%r9),%eax
mov    %eax,(%rdi)
cmp    $0x1e,%r9d
jb     1141 <cdflib_beta_inc_values+0x41>
movl   $0x0,(%rdi)
movq   $0x0,(%rsi)
movq   $0x0,(%rdx)
movq   $0x0,(%rcx)
xorps  %xmm0,%xmm0
movsd  %xmm0,(%r8)
ret
movl   $0x1,(%rdi)
xor    %r9d,%r9d
mov    %r9d,%eax
lea    0xeb5(%rip),%rdi
movsd  (%rdi,%rax,8),%xmm0
movsd  %xmm0,(%rsi)
lea    0xf95(%rip),%rsi
movsd  (%rsi,%rax,8),%xmm0
movsd  %xmm0,(%rdx)
lea    0x1165(%rip),%rdx
movsd  (%rdx,%rax,8),%xmm0
movsd  %xmm0,(%rcx)
lea    0x1065(%rip),%rcx
movsd  (%rcx,%rax,8),%xmm0
movsd  %xmm0,(%r8)
ret

LLVM IR (-O0):
@cdflib_beta_inc_values.a_vec = internal constant [30 x double] [double 5.000000e-01, double 5.000000e-01, double 5.000000e-01, double 1.000000e+00, double 1.000000e+00, double 1.000000e+00, double 1.000000e+00, double 1.000000e+00, double 2.000000e+00, double 2.000000e+00, double 2.000000e+00, double 2.000000e+00, double 2.000000e+00, double 2.000000e+00, double 2.000000e+00, double 2.000000e+00, double 2.000000e+00, double 5.500000e+00, double 1.000000e+01, double 1.000000e+01, double 1.000000e+01, double 1.000000e+01, double 2.000000e+01, double 2.000000e+01, double 2.000000e+01, double 2.000000e+01, double 2.000000e+01, double 3.000000e+01, double 3.000000e+01, double 4.000000e+01]
@cdflib_beta_inc_values.b_vec = internal constant [30 x double] [double 5.000000e-01, double 5.000000e-01, double 5.000000e-01, double 5.000000e-01, double 5.000000e-01, double 5.000000e-01, double 5.000000e-01, double 1.000000e+00, double 2.000000e+00, double 2.000000e+00, double 2.000000e+00, double 2.000000e+00, double 2.000000e+00, double 2.000000e+00, double 2.000000e+00, double 2.000000e+00, double 2.000000e+00, double 5.000000e+00, double 5.000000e-01, double 5.000000e+00, double 5.000000e+00, double 1.000000e+01, double 5.000000e+00, double 1.000000e+01, double 1.000000e+01, double 2.000000e+01, double 2.000000e+01, double 1.000000e+01, double 1.000000e+01, double 2.000000e+01]
@cdflib_beta_inc_values.fx_vec = internal constant [30 x double] [double 0x3FB053239382FF23, double 0x3FCA37F61092F53B, double 1.000000e+00, double 0.000000e+00, double 5.012600e-03, double 5.131670e-02, double 0x3FD2BEC31ECE2161, double 5.000000e-01, double 2.800000e-02, double 1.040000e-01, double 2.160000e-01, double 3.520000e-01, double 5.000000e-01, double 6.480000e-01, double 7.840000e-01, double 8.960000e-01, double 0x3FEF1A9FBE76C8B4, double 0x3FDBEA8D3C940505, double 0x3FC368F8111E3575, double 0x3FB6FBFFC03F1FD0, double 1.000000e+00, double 5.000000e-01, double 0x3FDD6EA132EB0ED7, double 0x3FCB7AAFC986C72F, double 0x3FEE6C6EF3D3A1D3, double 5.000000e-01, double 0x3FECBBEF9A572EBB, double 0x3FCCB04831C7F928, double 0x3FE846C8711D798E, double 0x3FE667DC527BCDD7]
@cdflib_beta_inc_values.x_vec = internal constant [30 x double] [double 1.000000e-02, double 1.000000e-01, double 1.000000e+00, double 0.000000e+00, double 1.000000e-02, double 1.000000e-01, double 5.000000e-01, double 5.000000e-01, double 1.000000e-01, double 2.000000e-01, double 3.000000e-01, double 4.000000e-01, double 5.000000e-01, double 6.000000e-01, double 0x3FE6666666666666, double 8.000000e-01, double 9.000000e-01, double 5.000000e-01, double 9.000000e-01, double 5.000000e-01, double 1.000000e+00, double 5.000000e-01, double 8.000000e-01, double 6.000000e-01, double 8.000000e-01, double 5.000000e-01, double 6.000000e-01, double 0x3FE6666666666666, double 8.000000e-01, double 0x3FE6666666666666]
define void @cdflib_beta_inc_values(i32* %0, double* %1, double* %2, double* %3, double* %4) {
%6 = alloca i32*
%7 = alloca double*
%8 = alloca double*
%9 = alloca double*
%10 = alloca double*
store i32* %0, i32** %6
store double* %1, double** %7
store double* %2, double** %8
store double* %3, double** %9
store double* %4, double** %10
%11 = load i32*, i32** %6
%12 = load i32, i32* %11
%13 = icmp slt i32 %12, 0
br i1 %13, label %14, label %16
14: ; preds = %5
%15 = load i32*, i32** %6
store i32 0, i32* %15
br label %16
16: ; preds = %14, %5
%17 = load i32*, i32** %6
%18 = load i32, i32* %17
%19 = add nsw i32 %18, 1
%20 = load i32*, i32** %6
store i32 %19, i32* %20
%21 = load i32*, i32** %6
%22 = load i32, i32* %21
%23 = icmp slt i32 30, %22
br i1 %23, label %24, label %30
24: ; preds = %16
%25 = load i32*, i32** %6
store i32 0, i32* %25
%26 = load double*, double** %7
store double 0.000000e+00, double* %26
%27 = load double*, double** %8
store double 0.000000e+00, double* %27
%28 = load double*, double** %9
store double 0.000000e+00, double* %28
%29 = load double*, double** %10
store double 0.000000e+00, double* %29
br label %59
30: ; preds = %16
%31 = load i32*, i32** %6
%32 = load i32, i32* %31
%33 = sub nsw i32 %32, 1
%34 = sext i32 %33 to i64
%35 = getelementptr inbounds [30 x double], [30 x double]* @cdflib_beta_inc_values.a_vec, i64 0, i64 %34
%36 = load double, double* %35
%37 = load double*, double** %7
store double %36, double* %37
%38 = load i32*, i32** %6
%39 = load i32, i32* %38
%40 = sub nsw i32 %39, 1
%41 = sext i32 %40 to i64
%42 = getelementptr inbounds [30 x double], [30 x double]* @cdflib_beta_inc_values.b_vec, i64 0, i64 %41
%43 = load double, double* %42
%44 = load double*, double** %8
store double %43, double* %44
%45 = load i32*, i32** %6
%46 = load i32, i32* %45
%47 = sub nsw i32 %46, 1
%48 = sext i32 %47 to i64
%49 = getelementptr inbounds [30 x double], [30 x double]* @cdflib_beta_inc_values.x_vec, i64 0, i64 %48
%50 = load double, double* %49
%51 = load double*, double** %9
store double %50, double* %51
%52 = load i32*, i32** %6
%53 = load i32, i32* %52
%54 = sub nsw i32 %53, 1
%55 = sext i32 %54 to i64
%56 = getelementptr inbounds [30 x double], [30 x double]* @cdflib_beta_inc_values.fx_vec, i64 0, i64 %55
%57 = load double, double* %56
%58 = load double*, double** %10
store double %57, double* %58
br label %59
59: ; preds = %30, %24
ret void
}

LLVM IR (-O2):
@cdflib_beta_inc_values.a_vec = internal unnamed_addr constant [30 x double] [double 5.000000e-01, double 5.000000e-01, double 5.000000e-01, double 1.000000e+00, double 1.000000e+00, double 1.000000e+00, double 1.000000e+00, double 1.000000e+00, double 2.000000e+00, double 2.000000e+00, double 2.000000e+00, double 2.000000e+00, double 2.000000e+00, double 2.000000e+00, double 2.000000e+00, double 2.000000e+00, double 2.000000e+00, double 5.500000e+00, double 1.000000e+01, double 1.000000e+01, double 1.000000e+01, double 1.000000e+01, double 2.000000e+01, double 2.000000e+01, double 2.000000e+01, double 2.000000e+01, double 2.000000e+01, double 3.000000e+01, double 3.000000e+01, double 4.000000e+01]
@cdflib_beta_inc_values.b_vec = internal unnamed_addr constant [30 x double] [double 5.000000e-01, double 5.000000e-01, double 5.000000e-01, double 5.000000e-01, double 5.000000e-01, double 5.000000e-01, double 5.000000e-01, double 1.000000e+00, double 2.000000e+00, double 2.000000e+00, double 2.000000e+00, double 2.000000e+00, double 2.000000e+00, double 2.000000e+00, double 2.000000e+00, double 2.000000e+00, double 2.000000e+00, double 5.000000e+00, double 5.000000e-01, double 5.000000e+00, double 5.000000e+00, double 1.000000e+01, double 5.000000e+00, double 1.000000e+01, double 1.000000e+01, double 2.000000e+01, double 2.000000e+01, double 1.000000e+01, double 1.000000e+01, double 2.000000e+01]
@cdflib_beta_inc_values.fx_vec = internal unnamed_addr constant [30 x double] [double 0x3FB053239382FF23, double 0x3FCA37F61092F53B, double 1.000000e+00, double 0.000000e+00, double 5.012600e-03, double 5.131670e-02, double 0x3FD2BEC31ECE2161, double 5.000000e-01, double 2.800000e-02, double 1.040000e-01, double 2.160000e-01, double 3.520000e-01, double 5.000000e-01, double 6.480000e-01, double 7.840000e-01, double 8.960000e-01, double 0x3FEF1A9FBE76C8B4, double 0x3FDBEA8D3C940505, double 0x3FC368F8111E3575, double 0x3FB6FBFFC03F1FD0, double 1.000000e+00, double 5.000000e-01, double 0x3FDD6EA132EB0ED7, double 0x3FCB7AAFC986C72F, double 0x3FEE6C6EF3D3A1D3, double 5.000000e-01, double 0x3FECBBEF9A572EBB, double 0x3FCCB04831C7F928, double 0x3FE846C8711D798E, double 0x3FE667DC527BCDD7]
@cdflib_beta_inc_values.x_vec = internal unnamed_addr constant [30 x double] [double 1.000000e-02, double 1.000000e-01, double 1.000000e+00, double 0.000000e+00, double 1.000000e-02, double 1.000000e-01, double 5.000000e-01, double 5.000000e-01, double 1.000000e-01, double 2.000000e-01, double 3.000000e-01, double 4.000000e-01, double 5.000000e-01, double 6.000000e-01, double 0x3FE6666666666666, double 8.000000e-01, double 9.000000e-01, double 5.000000e-01, double 9.000000e-01, double 5.000000e-01, double 1.000000e+00, double 5.000000e-01, double 8.000000e-01, double 6.000000e-01, double 8.000000e-01, double 5.000000e-01, double 6.000000e-01, double 0x3FE6666666666666, double 8.000000e-01, double 0x3FE6666666666666]
define void @cdflib_beta_inc_values(i32* nocapture %0, double* nocapture writeonly %1, double* nocapture writeonly %2, double* nocapture writeonly %3, double* nocapture writeonly %4) {
%6 = load i32, i32* %0
%7 = icmp slt i32 %6, 0
br i1 %7, label %8, label %9
8: ; preds = %5
store i32 1, i32* %0
br label %13
9: ; preds = %5
%10 = add nuw nsw i32 %6, 1
store i32 %10, i32* %0
%11 = icmp ugt i32 %6, 29
br i1 %11, label %12, label %13
12: ; preds = %9
store i32 0, i32* %0
store double 0.000000e+00, double* %1
store double 0.000000e+00, double* %2
store double 0.000000e+00, double* %3
br label %24
13: ; preds = %8, %9
%14 = phi i32 [ 0, %8 ], [ %6, %9 ]
%15 = zext i32 %14 to i64
%16 = getelementptr inbounds [30 x double], [30 x double]* @cdflib_beta_inc_values.a_vec, i64 0, i64 %15
%17 = load double, double* %16
store double %17, double* %1
%18 = getelementptr inbounds [30 x double], [30 x double]* @cdflib_beta_inc_values.b_vec, i64 0, i64 %15
%19 = load double, double* %18
store double %19, double* %2
%20 = getelementptr inbounds [30 x double], [30 x double]* @cdflib_beta_inc_values.x_vec, i64 0, i64 %15
%21 = load double, double* %20
store double %21, double* %3
%22 = getelementptr inbounds [30 x double], [30 x double]* @cdflib_beta_inc_values.fx_vec, i64 0, i64 %15
%23 = load double, double* %22
br label %24
24: ; preds = %13, %12
%25 = phi double [ %23, %13 ], [ 0.000000e+00, %12 ]
store double %25, double* %4
ret void
}