void cdflib_normal_cdf_values(int *n_data, double *x, double *fx) {
  enum { N_MAX = 13 };
  static const double fx_vec[N_MAX] = {
      0.500000000000000E+00, 0.539827837277029E+00, 0.579259709439103E+00,
      0.617911422188953E+00, 0.655421741610324E+00, 0.691462461274013E+00,
      0.725746882249927E+00, 0.758036347776927E+00, 0.788144601416604E+00,
      0.815939874653241E+00, 0.841344746068543E+00, 0.933192798731142E+00,
      0.977249868051821E+00};
  static const double x_vec[N_MAX] = {
      0.00E+00, 0.10E+00, 0.20E+00, 0.30E+00, 0.40E+00, 0.50E+00, 0.60E+00,
      0.70E+00, 0.80E+00, 0.90E+00, 1.00E+00, 1.50E+00, 2.00E+00};
  if (*n_data < 0) {
    *n_data = 0;
  }
  *n_data = *n_data + 1;
  if (N_MAX < *n_data) {
    *n_data = 0;
    *x = 0.0E+00;
    *fx = 0.0E+00;
  } else {
    *x = x_vec[*n_data - 1];
    *fx = fx_vec[*n_data - 1];
  }
  return;
}


x86 assembly (clang, -O0):
<cdflib_normal_cdf_values>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %rdx,-0x18(%rbp)
mov    -0x8(%rbp),%rax
cmpl   $0x0,(%rax)
jge    1127 <cdflib_normal_cdf_values+0x27>
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    $0xd,%eax
cmp    (%rcx),%eax
jge    116c <cdflib_normal_cdf_values+0x6c>
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)
jmp    11ac <cdflib_normal_cdf_values+0xac>
mov    -0x8(%rbp),%rax
mov    (%rax),%eax
sub    $0x1,%eax
movslq %eax,%rcx
lea    0xef1(%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    0xe61(%rip),%rax
movsd  (%rax,%rcx,8),%xmm0
mov    -0x18(%rbp),%rax
movsd  %xmm0,(%rax)
pop    %rbp
ret

x86 assembly (clang, -O2):
<cdflib_normal_cdf_values>:
mov    (%rdi),%eax
test   %eax,%eax
js     1125 <cdflib_normal_cdf_values+0x25>
lea    0x1(%rax),%ecx
mov    %ecx,(%rdi)
cmp    $0xd,%eax
jb     112d <cdflib_normal_cdf_values+0x2d>
movl   $0x0,(%rdi)
movq   $0x0,(%rsi)
xorps  %xmm0,%xmm0
movsd  %xmm0,(%rdx)
ret
movl   $0x1,(%rdi)
xor    %eax,%eax
mov    %eax,%eax
lea    0xf3a(%rip),%rcx
movsd  (%rcx,%rax,8),%xmm0
movsd  %xmm0,(%rsi)
lea    0xeba(%rip),%rcx
movsd  (%rcx,%rax,8),%xmm0
movsd  %xmm0,(%rdx)
ret

LLVM IR (-O0):
@cdflib_normal_cdf_values.fx_vec = internal constant [13 x double] [double 5.000000e-01, double 0x3FE1464507526871, double 0x3FE2894BA87DCE1C, double 0x3FE3C5EE2CC40B7C, double 0x3FE4F9370429B7F1, double 0x3FE62075E232AC76, double 0x3FE73951868DFF2D, double 0x3FE841D5715C32A8, double 0x3FE9387B06F34DFC, double 0x3FEA1C2DF0A46A93, double 0x3FEAEC4BD120D37E, double 0x3FEDDCB724ED3703, double 0x3FEF45A183E9B13F]
@cdflib_normal_cdf_values.x_vec = internal constant [13 x double] [double 0.000000e+00, 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 1.000000e+00, double 1.500000e+00, double 2.000000e+00]
define void @cdflib_normal_cdf_values(i32* %0, double* %1, double* %2) {
%4 = alloca i32*
%5 = alloca double*
%6 = alloca double*
store i32* %0, i32** %4
store double* %1, double** %5
store double* %2, double** %6
%7 = load i32*, i32** %4
%8 = load i32, i32* %7
%9 = icmp slt i32 %8, 0
br i1 %9, label %10, label %12
10: ; preds = %3
%11 = load i32*, i32** %4
store i32 0, i32* %11
br label %12
12: ; preds = %10, %3
%13 = load i32*, i32** %4
%14 = load i32, i32* %13
%15 = add nsw i32 %14, 1
%16 = load i32*, i32** %4
store i32 %15, i32* %16
%17 = load i32*, i32** %4
%18 = load i32, i32* %17
%19 = icmp slt i32 13, %18
br i1 %19, label %20, label %24
20: ; preds = %12
%21 = load i32*, i32** %4
store i32 0, i32* %21
%22 = load double*, double** %5
store double 0.000000e+00, double* %22
%23 = load double*, double** %6
store double 0.000000e+00, double* %23
br label %39
24: ; preds = %12
%25 = load i32*, i32** %4
%26 = load i32, i32* %25
%27 = sub nsw i32 %26, 1
%28 = sext i32 %27 to i64
%29 = getelementptr inbounds [13 x double], [13 x double]* @cdflib_normal_cdf_values.x_vec, i64 0, i64 %28
%30 = load double, double* %29
%31 = load double*, double** %5
store double %30, double* %31
%32 = load i32*, i32** %4
%33 = load i32, i32* %32
%34 = sub nsw i32 %33, 1
%35 = sext i32 %34 to i64
%36 = getelementptr inbounds [13 x double], [13 x double]* @cdflib_normal_cdf_values.fx_vec, i64 0, i64 %35
%37 = load double, double* %36
%38 = load double*, double** %6
store double %37, double* %38
br label %39
39: ; preds = %24, %20
ret void
}

LLVM IR (-O2):
@cdflib_normal_cdf_values.fx_vec = internal unnamed_addr constant [13 x double] [double 5.000000e-01, double 0x3FE1464507526871, double 0x3FE2894BA87DCE1C, double 0x3FE3C5EE2CC40B7C, double 0x3FE4F9370429B7F1, double 0x3FE62075E232AC76, double 0x3FE73951868DFF2D, double 0x3FE841D5715C32A8, double 0x3FE9387B06F34DFC, double 0x3FEA1C2DF0A46A93, double 0x3FEAEC4BD120D37E, double 0x3FEDDCB724ED3703, double 0x3FEF45A183E9B13F]
@cdflib_normal_cdf_values.x_vec = internal unnamed_addr constant [13 x double] [double 0.000000e+00, 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 1.000000e+00, double 1.500000e+00, double 2.000000e+00]
define void @cdflib_normal_cdf_values(i32* nocapture %0, double* nocapture writeonly %1, double* nocapture writeonly %2) {
%4 = load i32, i32* %0
%5 = icmp slt i32 %4, 0
br i1 %5, label %6, label %7
6: ; preds = %3
store i32 1, i32* %0
br label %11
7: ; preds = %3
%8 = add nuw nsw i32 %4, 1
store i32 %8, i32* %0
%9 = icmp ugt i32 %4, 12
br i1 %9, label %10, label %11
10: ; preds = %7
store i32 0, i32* %0
store double 0.000000e+00, double* %1
br label %18
11: ; preds = %6, %7
%12 = phi i32 [ 0, %6 ], [ %4, %7 ]
%13 = zext i32 %12 to i64
%14 = getelementptr inbounds [13 x double], [13 x double]* @cdflib_normal_cdf_values.x_vec, i64 0, i64 %13
%15 = load double, double* %14
store double %15, double* %1
%16 = getelementptr inbounds [13 x double], [13 x double]* @cdflib_normal_cdf_values.fx_vec, i64 0, i64 %13
%17 = load double, double* %16
br label %18
18: ; preds = %11, %10
%19 = phi double [ %17, %11 ], [ 0.000000e+00, %10 ]
store double %19, double* %2
ret void
}