void cdflib_psi_values(int *n_data, double *x, double *fx) {
  enum { N_MAX = 11 };
  static const double fx_vec[N_MAX] = {
      -0.5772156649E+00, -0.4237549404E+00, -0.2890398966E+00,
      -0.1691908889E+00, -0.0613845446E+00, -0.0364899740E+00,
      0.1260474528E+00,  0.2085478749E+00,  0.2849914333E+00,
      0.3561841612E+00,  0.4227843351E+00};
  static const double x_vec[N_MAX] = {1.0E+00, 1.1E+00, 1.2E+00, 1.3E+00,
                                      1.4E+00, 1.5E+00, 1.6E+00, 1.7E+00,
                                      1.8E+00, 1.9E+00, 2.0E+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_psi_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_psi_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    $0xb,%eax
cmp    (%rcx),%eax
jge    116c <cdflib_psi_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_psi_values+0xac>
mov    -0x8(%rbp),%rax
mov    (%rax),%eax
sub    $0x1,%eax
movslq %eax,%rcx
lea    0xee1(%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_psi_values>:
mov    (%rdi),%eax
test   %eax,%eax
js     1125 <cdflib_psi_values+0x25>
lea    0x1(%rax),%ecx
mov    %ecx,(%rdi)
cmp    $0xb,%eax
jb     112d <cdflib_psi_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    0xf2a(%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_psi_values.fx_vec = internal constant [11 x double] [double 0xBFE2788CFC6F802A, double 0xBFDB1ECD0AA254DB, double 0xBFD27FA131C8B7DB, double 0xBFC5A80C0B4DA758, double 0xBFAF6DCB8712DE73, double 0xBFA2AED059EC7CE3, double 0x3FC02252ABC292C1, double 0x3FCAB1B25F2C4327, double 0x3FD23D4CB56A797E, double 0x3FD6CBB8A6ED42A3, double 0x3FDB0EE60720FFAC]
@cdflib_psi_values.x_vec = internal constant [11 x double] [double 1.000000e+00, double 1.100000e+00, double 1.200000e+00, double 1.300000e+00, double 1.400000e+00, double 1.500000e+00, double 1.600000e+00, double 1.700000e+00, double 1.800000e+00, double 1.900000e+00, double 2.000000e+00]
define void @cdflib_psi_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 11, %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 [11 x double], [11 x double]* @cdflib_psi_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 [11 x double], [11 x double]* @cdflib_psi_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_psi_values.fx_vec = internal unnamed_addr constant [11 x double] [double 0xBFE2788CFC6F802A, double 0xBFDB1ECD0AA254DB, double 0xBFD27FA131C8B7DB, double 0xBFC5A80C0B4DA758, double 0xBFAF6DCB8712DE73, double 0xBFA2AED059EC7CE3, double 0x3FC02252ABC292C1, double 0x3FCAB1B25F2C4327, double 0x3FD23D4CB56A797E, double 0x3FD6CBB8A6ED42A3, double 0x3FDB0EE60720FFAC]
@cdflib_psi_values.x_vec = internal unnamed_addr constant [11 x double] [double 1.000000e+00, double 1.100000e+00, double 1.200000e+00, double 1.300000e+00, double 1.400000e+00, double 1.500000e+00, double 1.600000e+00, double 1.700000e+00, double 1.800000e+00, double 1.900000e+00, double 2.000000e+00]
define void @cdflib_psi_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, 10
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 [11 x double], [11 x double]* @cdflib_psi_values.x_vec, i64 0, i64 %13
%15 = load double, double* %14
store double %15, double* %1
%16 = getelementptr inbounds [11 x double], [11 x double]* @cdflib_psi_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
}