void cdflib_poisson_cdf_values(int *n_data, double *a, int *x, double *fx) {
  enum { N_MAX = 21 };
  static const double a_vec[N_MAX] = {
      0.02E+00, 0.10E+00, 0.10E+00, 0.50E+00, 0.50E+00, 0.50E+00, 1.00E+00,
      1.00E+00, 1.00E+00, 1.00E+00, 2.00E+00, 2.00E+00, 2.00E+00, 2.00E+00,
      5.00E+00, 5.00E+00, 5.00E+00, 5.00E+00, 5.00E+00, 5.00E+00, 5.00E+00};
  static const double fx_vec[N_MAX] = {
      0.980E+00, 0.905E+00, 0.995E+00, 0.607E+00, 0.910E+00, 0.986E+00,
      0.368E+00, 0.736E+00, 0.920E+00, 0.981E+00, 0.135E+00, 0.406E+00,
      0.677E+00, 0.857E+00, 0.007E+00, 0.040E+00, 0.125E+00, 0.265E+00,
      0.441E+00, 0.616E+00, 0.762E+00};
  static const int x_vec[N_MAX] = {0, 0, 1, 0, 1, 2, 0, 1, 2, 3, 0,
                                   1, 2, 3, 0, 1, 2, 3, 4, 5, 6};
  if (*n_data < 0) {
    *n_data = 0;
  }
  *n_data = *n_data + 1;
  if (N_MAX < *n_data) {
    *n_data = 0;
    *a = 0.0E+00;
    *x = 0;
    *fx = 0.0E+00;
  } else {
    *a = a_vec[*n_data - 1];
    *x = x_vec[*n_data - 1];
    *fx = fx_vec[*n_data - 1];
  }
  return;
}


x86 assembly (clang, -O0):
<cdflib_poisson_cdf_values>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %rdx,-0x18(%rbp)
mov    %rcx,-0x20(%rbp)
mov    -0x8(%rbp),%rax
cmpl   $0x0,(%rax)
jge    112b <cdflib_poisson_cdf_values+0x2b>
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    $0x15,%eax
cmp    (%rcx),%eax
jge    117a <cdflib_poisson_cdf_values+0x7a>
mov    -0x8(%rbp),%rax
movl   $0x0,(%rax)
mov    -0x10(%rbp),%rax
xorps  %xmm0,%xmm0
movsd  %xmm0,(%rax)
mov    -0x18(%rbp),%rax
movl   $0x0,(%rax)
mov    -0x20(%rbp),%rax
xorps  %xmm0,%xmm0
movsd  %xmm0,(%rax)
jmp    11d6 <cdflib_poisson_cdf_values+0xd6>
mov    -0x8(%rbp),%rax
mov    (%rax),%eax
sub    $0x1,%eax
movslq %eax,%rcx
lea    0xe73(%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    0xfb3(%rip),%rax
mov    (%rax,%rcx,4),%ecx
mov    -0x18(%rbp),%rax
mov    %ecx,(%rax)
mov    -0x8(%rbp),%rax
mov    (%rax),%eax
sub    $0x1,%eax
movslq %eax,%rcx
lea    0xee7(%rip),%rax
movsd  (%rax,%rcx,8),%xmm0
mov    -0x20(%rbp),%rax
movsd  %xmm0,(%rax)
pop    %rbp
ret

x86 assembly (clang, -O2):
<cdflib_poisson_cdf_values>:
mov    (%rdi),%r8d
test   %r8d,%r8d
js     112f <cdflib_poisson_cdf_values+0x2f>
lea    0x1(%r8),%eax
mov    %eax,(%rdi)
cmp    $0x15,%r8d
jb     1138 <cdflib_poisson_cdf_values+0x38>
movl   $0x0,(%rdi)
movq   $0x0,(%rsi)
movl   $0x0,(%rdx)
xorps  %xmm0,%xmm0
movsd  %xmm0,(%rcx)
ret
movl   $0x1,(%rdi)
xor    %r8d,%r8d
mov    %r8d,%r8d
lea    0xebe(%rip),%rax
movsd  (%rax,%r8,8),%xmm0
movsd  %xmm0,(%rsi)
lea    0x100d(%rip),%rax
mov    (%rax,%r8,4),%eax
mov    %eax,(%rdx)
movslq (%rdi),%rax
lea    0xf4d(%rip),%rdx
movsd  -0x8(%rdx,%rax,8),%xmm0
movsd  %xmm0,(%rcx)
ret

LLVM IR (-O0):
@cdflib_poisson_cdf_values.a_vec = internal constant [21 x double] [double 2.000000e-02, double 1.000000e-01, double 1.000000e-01, 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 2.000000e+00, double 2.000000e+00, double 2.000000e+00, double 2.000000e+00, double 5.000000e+00, double 5.000000e+00, double 5.000000e+00, double 5.000000e+00, double 5.000000e+00, double 5.000000e+00, double 5.000000e+00]
@cdflib_poisson_cdf_values.fx_vec = internal constant [21 x double] [double 0x3FEF5C28F5C28F5C, double 9.050000e-01, double 0x3FEFD70A3D70A3D7, double 0x3FE36C8B43958106, double 9.100000e-01, double 0x3FEF8D4FDF3B645A, double 3.680000e-01, double 0x3FE78D4FDF3B645A, double 9.200000e-01, double 0x3FEF645A1CAC0831, double 1.350000e-01, double 4.060000e-01, double 6.770000e-01, double 0x3FEB6C8B43958106, double 7.000000e-03, double 4.000000e-02, double 1.250000e-01, double 2.650000e-01, double 4.410000e-01, double 6.160000e-01, double 7.620000e-01]
@cdflib_poisson_cdf_values.x_vec = internal constant [21 x i32] [i32 0, i32 0, i32 1, i32 0, i32 1, i32 2, i32 0, i32 1, i32 2, i32 3, i32 0, i32 1, i32 2, i32 3, i32 0, i32 1, i32 2, i32 3, i32 4, i32 5, i32 6]
define void @cdflib_poisson_cdf_values(i32* %0, double* %1, i32* %2, double* %3) {
%5 = alloca i32*
%6 = alloca double*
%7 = alloca i32*
%8 = alloca double*
store i32* %0, i32** %5
store double* %1, double** %6
store i32* %2, i32** %7
store double* %3, double** %8
%9 = load i32*, i32** %5
%10 = load i32, i32* %9
%11 = icmp slt i32 %10, 0
br i1 %11, label %12, label %14
12: ; preds = %4
%13 = load i32*, i32** %5
store i32 0, i32* %13
br label %14
14: ; preds = %12, %4
%15 = load i32*, i32** %5
%16 = load i32, i32* %15
%17 = add nsw i32 %16, 1
%18 = load i32*, i32** %5
store i32 %17, i32* %18
%19 = load i32*, i32** %5
%20 = load i32, i32* %19
%21 = icmp slt i32 21, %20
br i1 %21, label %22, label %27
22: ; preds = %14
%23 = load i32*, i32** %5
store i32 0, i32* %23
%24 = load double*, double** %6
store double 0.000000e+00, double* %24
%25 = load i32*, i32** %7
store i32 0, i32* %25
%26 = load double*, double** %8
store double 0.000000e+00, double* %26
br label %49
27: ; preds = %14
%28 = load i32*, i32** %5
%29 = load i32, i32* %28
%30 = sub nsw i32 %29, 1
%31 = sext i32 %30 to i64
%32 = getelementptr inbounds [21 x double], [21 x double]* @cdflib_poisson_cdf_values.a_vec, i64 0, i64 %31
%33 = load double, double* %32
%34 = load double*, double** %6
store double %33, double* %34
%35 = load i32*, i32** %5
%36 = load i32, i32* %35
%37 = sub nsw i32 %36, 1
%38 = sext i32 %37 to i64
%39 = getelementptr inbounds [21 x i32], [21 x i32]* @cdflib_poisson_cdf_values.x_vec, i64 0, i64 %38
%40 = load i32, i32* %39
%41 = load i32*, i32** %7
store i32 %40, i32* %41
%42 = load i32*, i32** %5
%43 = load i32, i32* %42
%44 = sub nsw i32 %43, 1
%45 = sext i32 %44 to i64
%46 = getelementptr inbounds [21 x double], [21 x double]* @cdflib_poisson_cdf_values.fx_vec, i64 0, i64 %45
%47 = load double, double* %46
%48 = load double*, double** %8
store double %47, double* %48
br label %49
49: ; preds = %27, %22
ret void
}

LLVM IR (-O2):
@cdflib_poisson_cdf_values.a_vec = internal unnamed_addr constant [21 x double] [double 2.000000e-02, double 1.000000e-01, double 1.000000e-01, 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 2.000000e+00, double 2.000000e+00, double 2.000000e+00, double 2.000000e+00, double 5.000000e+00, double 5.000000e+00, double 5.000000e+00, double 5.000000e+00, double 5.000000e+00, double 5.000000e+00, double 5.000000e+00]
@cdflib_poisson_cdf_values.fx_vec = internal unnamed_addr constant [21 x double] [double 0x3FEF5C28F5C28F5C, double 9.050000e-01, double 0x3FEFD70A3D70A3D7, double 0x3FE36C8B43958106, double 9.100000e-01, double 0x3FEF8D4FDF3B645A, double 3.680000e-01, double 0x3FE78D4FDF3B645A, double 9.200000e-01, double 0x3FEF645A1CAC0831, double 1.350000e-01, double 4.060000e-01, double 6.770000e-01, double 0x3FEB6C8B43958106, double 7.000000e-03, double 4.000000e-02, double 1.250000e-01, double 2.650000e-01, double 4.410000e-01, double 6.160000e-01, double 7.620000e-01]
@cdflib_poisson_cdf_values.x_vec = internal unnamed_addr constant [21 x i32] [i32 0, i32 0, i32 1, i32 0, i32 1, i32 2, i32 0, i32 1, i32 2, i32 3, i32 0, i32 1, i32 2, i32 3, i32 0, i32 1, i32 2, i32 3, i32 4, i32 5, i32 6]
define void @cdflib_poisson_cdf_values(i32* nocapture %0, double* nocapture writeonly %1, i32* nocapture writeonly %2, double* nocapture writeonly %3) {
%5 = load i32, i32* %0
%6 = icmp slt i32 %5, 0
br i1 %6, label %7, label %8
7: ; preds = %4
store i32 1, i32* %0
br label %12
8: ; preds = %4
%9 = add nuw nsw i32 %5, 1
store i32 %9, i32* %0
%10 = icmp ugt i32 %5, 20
br i1 %10, label %11, label %12
11: ; preds = %8
store i32 0, i32* %0
store double 0.000000e+00, double* %1
store i32 0, i32* %2
br label %24
12: ; preds = %7, %8
%13 = phi i32 [ 0, %7 ], [ %5, %8 ]
%14 = zext i32 %13 to i64
%15 = getelementptr inbounds [21 x double], [21 x double]* @cdflib_poisson_cdf_values.a_vec, i64 0, i64 %14
%16 = load double, double* %15
store double %16, double* %1
%17 = getelementptr inbounds [21 x i32], [21 x i32]* @cdflib_poisson_cdf_values.x_vec, i64 0, i64 %14
%18 = load i32, i32* %17
store i32 %18, i32* %2
%19 = load i32, i32* %0
%20 = add nsw i32 %19, -1
%21 = sext i32 %20 to i64
%22 = getelementptr inbounds [21 x double], [21 x double]* @cdflib_poisson_cdf_values.fx_vec, i64 0, i64 %21
%23 = load double, double* %22
br label %24
24: ; preds = %12, %11
%25 = phi double [ %23, %12 ], [ 0.000000e+00, %11 ]
store double %25, double* %3
ret void
}