// File: /workspace/github_c_makefile_star2_O0/PoulinV[P]AxiCLASS/build/../source/distortions.c
// Function: distortions_interpolate_br_data
int distortions_interpolate_br_data(struct distortions* psd,
                                    double z,
                                    double * f_g,
                                    double * f_y,
                                    double * f_mu,
                                    double * f_E,
                                    int * last_index){

  /** Define local variables */
  int index = *last_index;
  int index_k;
  double h,a,b;

  /** Find z position */
  class_call(array_spline_hunt(psd->br_exact_z,
                               psd->br_exact_Nz,
                               z,
                               &index,
                               &h,&a,&b,
                               psd->error_message),
             psd->error_message,
             psd->error_message);

  /** Evaluate corresponding values for the branching ratios */
  *f_g = 4*array_spline_eval(psd->f_g_exact,
                             psd->ddf_g_exact,
                             index,
                             index+1,
                             h,a,b);
  *f_y = 4*array_spline_eval(psd->f_y_exact,
                             psd->ddf_y_exact,
                             index,
                             index+1,
                             h,a,b);
  *f_mu = 1./1.401*array_spline_eval(psd->f_mu_exact,
                                     psd->ddf_mu_exact,
                                     index,
                                     index+1,
                                     h,a,b);

  for (index_k=0; index_k<psd->sd_PCA_size; ++index_k){
    f_E[index_k] = array_spline_eval(psd->E_vec+index_k*psd->br_exact_Nz,
                                     psd->ddE_vec+index_k*psd->br_exact_Nz,
                                     index,
                                     index+1,
                                     h,a,b);
  }

  *last_index = index;

  return _SUCCESS_;
}

// Assembly:
subq $0x878, %rsp            # imm = 0x878
movq %rdi, 0x868(%rsp)
movsd %xmm0, 0x860(%rsp)
movq %rsi, 0x858(%rsp)
movq %rdx, 0x850(%rsp)
movq %rcx, 0x848(%rsp)
movq %r8, 0x840(%rsp)
movq %r9, 0x838(%rsp)
movq 0x838(%rsp), %rax
movl (%rax), %eax
movl %eax, 0x834(%rsp)
movq 0x868(%rsp), %rax
movq 0xc18(%rax), %rdi
movq 0x868(%rsp), %rax
movl 0xc20(%rax), %esi
movsd 0x860(%rsp), %xmm0
movq 0x868(%rsp), %rax
addq $0x1602, %rax           # imm = 0x1602
leaq 0x834(%rsp), %rdx
leaq 0x828(%rsp), %rcx
leaq 0x820(%rsp), %r8
leaq 0x818(%rsp), %r9
movq %rax, (%rsp)
callq 0x27de0
cmpl $0x1, %eax
jne 0x1955ea
leaq 0x10(%rsp), %rdi
movq 0x868(%rsp), %rcx
addq $0x1602, %rcx           # imm = 0x1602
leaq 0x3ce3a(%rip), %rsi     # 0x1d23d8
leaq 0x76bb0(%rip), %rdx     # 0x20c155
movb $0x0, %al
callq 0x5b9c0
movq 0x868(%rsp), %rdi
addq $0x1602, %rdi           # imm = 0x1602
leaq 0x10(%rsp), %r8
leaq 0x3ca6d(%rip), %rsi     # 0x1d2034
leaq 0x76be5(%rip), %rdx     # 0x20c1b3
movl $0x62f, %ecx            # imm = 0x62F
movb $0x0, %al
callq 0x5b9c0
movl $0x1, 0x874(%rsp)
jmp 0x195c2c
movsd 0x820(%rsp), %xmm1
movq 0x868(%rsp), %rax
movq 0xc28(%rax), %rax
movslq 0x834(%rsp), %rcx
movsd (%rax,%rcx,8), %xmm2
movsd 0x818(%rsp), %xmm0
movq 0x868(%rsp), %rax
movq 0xc28(%rax), %rax
movl 0x834(%rsp), %ecx
addl $0x1, %ecx
movslq %ecx, %rcx
mulsd (%rax,%rcx,8), %xmm0
mulsd %xmm2, %xmm1
addsd %xmm0, %xmm1
movsd 0x820(%rsp), %xmm0
mulsd 0x820(%rsp), %xmm0
movsd 0x820(%rsp), %xmm3
movsd 0x820(%rsp), %xmm2
movq %xmm2, %rax
movabsq $-0x8000000000000000, %rcx # imm = 0x8000000000000000
xorq %rcx, %rax
movq %rax, %xmm2
mulsd %xmm3, %xmm0
addsd %xmm2, %xmm0
movq 0x868(%rsp), %rax
movq 0xc30(%rax), %rax
movslq 0x834(%rsp), %rcx
movsd (%rax,%rcx,8), %xmm3
movsd 0x818(%rsp), %xmm2
mulsd 0x818(%rsp), %xmm2
movsd 0x818(%rsp), %xmm5
movsd 0x818(%rsp), %xmm4
movq %xmm4, %rax
movabsq $-0x8000000000000000, %rcx # imm = 0x8000000000000000
xorq %rcx, %rax
movq %rax, %xmm4
mulsd %xmm5, %xmm2
addsd %xmm4, %xmm2
movq 0x868(%rsp), %rax
movq 0xc30(%rax), %rax
movl 0x834(%rsp), %ecx
addl $0x1, %ecx
movslq %ecx, %rcx
mulsd (%rax,%rcx,8), %xmm2
mulsd %xmm3, %xmm0
addsd %xmm2, %xmm0
mulsd 0x828(%rsp), %xmm0
mulsd 0x828(%rsp), %xmm0
movsd 0x3df62(%rip), %xmm2    # 0x1d3688
divsd %xmm2, %xmm0
addsd %xmm0, %xmm1
movsd 0x3fd92(%rip), %xmm0    # 0x1d54c8
mulsd %xmm1, %xmm0
movq 0x858(%rsp), %rax
movsd %xmm0, (%rax)
movsd 0x820(%rsp), %xmm1
movq 0x868(%rsp), %rax
movq 0xc38(%rax), %rax
movslq 0x834(%rsp), %rcx
movsd (%rax,%rcx,8), %xmm2
movsd 0x818(%rsp), %xmm0
movq 0x868(%rsp), %rax
movq 0xc38(%rax), %rax
movl 0x834(%rsp), %ecx
addl $0x1, %ecx
movslq %ecx, %rcx
mulsd (%rax,%rcx,8), %xmm0
mulsd %xmm2, %xmm1
addsd %xmm0, %xmm1
movsd 0x820(%rsp), %xmm0
mulsd 0x820(%rsp), %xmm0
movsd 0x820(%rsp), %xmm3
movsd 0x820(%rsp), %xmm2
movq %xmm2, %rax
movabsq $-0x8000000000000000, %rcx # imm = 0x8000000000000000
xorq %rcx, %rax
movq %rax, %xmm2
mulsd %xmm3, %xmm0
addsd %xmm2, %xmm0
movq 0x868(%rsp), %rax
movq 0xc40(%rax), %rax
movslq 0x834(%rsp), %rcx
movsd (%rax,%rcx,8), %xmm3
movsd 0x818(%rsp), %xmm2
mulsd 0x818(%rsp), %xmm2
movsd 0x818(%rsp), %xmm5
movsd 0x818(%rsp), %xmm4
movq %xmm4, %rax
movabsq $-0x8000000000000000, %rcx # imm = 0x8000000000000000
xorq %rcx, %rax
movq %rax, %xmm4
mulsd %xmm5, %xmm2
addsd %xmm4, %xmm2
movq 0x868(%rsp), %rax
movq 0xc40(%rax), %rax
movl 0x834(%rsp), %ecx
addl $0x1, %ecx
movslq %ecx, %rcx
mulsd (%rax,%rcx,8), %xmm2
mulsd %xmm3, %xmm0
addsd %xmm2, %xmm0
mulsd 0x828(%rsp), %xmm0
mulsd 0x828(%rsp), %xmm0
movsd 0x3de06(%rip), %xmm2    # 0x1d3688
divsd %xmm2, %xmm0
addsd %xmm0, %xmm1
movsd 0x3fc36(%rip), %xmm0    # 0x1d54c8
mulsd %xmm1, %xmm0
movq 0x850(%rsp), %rax
movsd %xmm0, (%rax)
movsd 0x820(%rsp), %xmm1
movq 0x868(%rsp), %rax
movq 0xc48(%rax), %rax
movslq 0x834(%rsp), %rcx
movsd (%rax,%rcx,8), %xmm2
movsd 0x818(%rsp), %xmm0
movq 0x868(%rsp), %rax
movq 0xc48(%rax), %rax
movl 0x834(%rsp), %ecx
addl $0x1, %ecx
movslq %ecx, %rcx
mulsd (%rax,%rcx,8), %xmm0
mulsd %xmm2, %xmm1
addsd %xmm0, %xmm1
movsd 0x820(%rsp), %xmm0
mulsd 0x820(%rsp), %xmm0
movsd 0x820(%rsp), %xmm3
movsd 0x820(%rsp), %xmm2
movq %xmm2, %rax
movabsq $-0x8000000000000000, %rcx # imm = 0x8000000000000000
xorq %rcx, %rax
movq %rax, %xmm2
mulsd %xmm3, %xmm0
addsd %xmm2, %xmm0
movq 0x868(%rsp), %rax
movq 0xc50(%rax), %rax
movslq 0x834(%rsp), %rcx
movsd (%rax,%rcx,8), %xmm3
movsd 0x818(%rsp), %xmm2
mulsd 0x818(%rsp), %xmm2
movsd 0x818(%rsp), %xmm5
movsd 0x818(%rsp), %xmm4
movq %xmm4, %rax
movabsq $-0x8000000000000000, %rcx # imm = 0x8000000000000000
xorq %rcx, %rax
movq %rax, %xmm4
mulsd %xmm5, %xmm2
addsd %xmm4, %xmm2
movq 0x868(%rsp), %rax
movq 0xc50(%rax), %rax
movl 0x834(%rsp), %ecx
addl $0x1, %ecx
movslq %ecx, %rcx
mulsd (%rax,%rcx,8), %xmm2
mulsd %xmm3, %xmm0
addsd %xmm2, %xmm0
mulsd 0x828(%rsp), %xmm0
mulsd 0x828(%rsp), %xmm0
movsd 0x3dcaa(%rip), %xmm2    # 0x1d3688
divsd %xmm2, %xmm0
addsd %xmm0, %xmm1
movsd 0x7496a(%rip), %xmm0    # 0x20a358
mulsd %xmm1, %xmm0
movq 0x848(%rsp), %rax
movsd %xmm0, (%rax)
movl $0x0, 0x830(%rsp)
movl 0x830(%rsp), %eax
movq 0x868(%rsp), %rcx
cmpl 0x4(%rcx), %eax
jge 0x195c10
movsd 0x820(%rsp), %xmm0
movq 0x868(%rsp), %rax
movq 0xc58(%rax), %rax
movl 0x830(%rsp), %ecx
movq 0x868(%rsp), %rdx
imull 0xc20(%rdx), %ecx
movslq %ecx, %rcx
shlq $0x3, %rcx
addq %rcx, %rax
movslq 0x834(%rsp), %rcx
movsd (%rax,%rcx,8), %xmm2
movsd 0x818(%rsp), %xmm1
movq 0x868(%rsp), %rax
movq 0xc58(%rax), %rax
movl 0x830(%rsp), %ecx
movq 0x868(%rsp), %rdx
imull 0xc20(%rdx), %ecx
movslq %ecx, %rcx
shlq $0x3, %rcx
addq %rcx, %rax
movl 0x834(%rsp), %ecx
addl $0x1, %ecx
movslq %ecx, %rcx
mulsd (%rax,%rcx,8), %xmm1
mulsd %xmm2, %xmm0
addsd %xmm1, %xmm0
movsd 0x820(%rsp), %xmm1
mulsd 0x820(%rsp), %xmm1
movsd 0x820(%rsp), %xmm3
movsd 0x820(%rsp), %xmm2
movq %xmm2, %rax
movabsq $-0x8000000000000000, %rcx # imm = 0x8000000000000000
xorq %rcx, %rax
movq %rax, %xmm2
mulsd %xmm3, %xmm1
addsd %xmm2, %xmm1
movq 0x868(%rsp), %rax
movq 0xc60(%rax), %rax
movl 0x830(%rsp), %ecx
movq 0x868(%rsp), %rdx
imull 0xc20(%rdx), %ecx
movslq %ecx, %rcx
shlq $0x3, %rcx
addq %rcx, %rax
movslq 0x834(%rsp), %rcx
movsd (%rax,%rcx,8), %xmm3
movsd 0x818(%rsp), %xmm2
mulsd 0x818(%rsp), %xmm2
movsd 0x818(%rsp), %xmm5
movsd 0x818(%rsp), %xmm4
movq %xmm4, %rax
movabsq $-0x8000000000000000, %rcx # imm = 0x8000000000000000
xorq %rcx, %rax
movq %rax, %xmm4
mulsd %xmm5, %xmm2
addsd %xmm4, %xmm2
movq 0x868(%rsp), %rax
movq 0xc60(%rax), %rax
movl 0x830(%rsp), %ecx
movq 0x868(%rsp), %rdx
imull 0xc20(%rdx), %ecx
movslq %ecx, %rcx
shlq $0x3, %rcx
addq %rcx, %rax
movl 0x834(%rsp), %ecx
addl $0x1, %ecx
movslq %ecx, %rcx
mulsd (%rax,%rcx,8), %xmm2
mulsd %xmm3, %xmm1
addsd %xmm2, %xmm1
mulsd 0x828(%rsp), %xmm1
mulsd 0x828(%rsp), %xmm1
movsd 0x3daab(%rip), %xmm2    # 0x1d3688
divsd %xmm2, %xmm1
addsd %xmm1, %xmm0
movq 0x840(%rsp), %rax
movslq 0x830(%rsp), %rcx
movsd %xmm0, (%rax,%rcx,8)
movl 0x830(%rsp), %eax
addl $0x1, %eax
movl %eax, 0x830(%rsp)
jmp 0x195a09
movl 0x834(%rsp), %ecx
movq 0x838(%rsp), %rax
movl %ecx, (%rax)
movl $0x0, 0x874(%rsp)
movl 0x874(%rsp), %eax
addq $0x878, %rsp            # imm = 0x878
retq
nopl (%rax,%rax)