// File: /workspace/github_c_makefile_star2_O0/PoulinV[P]AxiCLASS/build/../source/primordial.c
// Function: primordial_inflation_analytic_spectra
int primordial_inflation_analytic_spectra(
                                          struct perturbations * ppt,
                                          struct primordial * ppm,
                                          struct precision * ppr,
                                          double * y_ini
                                          ) {
  double * y;
  double * dy;
  int index_k;
  double k,phi_k;
  double curvature,tensors;
  double V,dV,ddV;

  /** Summary */
  /** - allocate vectors for background/perturbed quantities */
  class_alloc(y,ppm->in_size*sizeof(double),ppm->error_message);
  class_alloc(dy,ppm->in_size*sizeof(double),ppm->error_message);

  /** - initialize the background part of the running vector */
  y[ppm->index_in_a] = y_ini[ppm->index_in_a];
  y[ppm->index_in_phi] = y_ini[ppm->index_in_phi];
  if ((ppm->primordial_spec_type == inflation_V) || (ppm->primordial_spec_type == inflation_V_end))
    y[ppm->index_in_dphi] = y_ini[ppm->index_in_dphi];

  /** - loop over Fourier wavenumbers */
  for (index_k=0; index_k < ppm->lnk_size; index_k++) {

    k = exp(ppm->lnk[index_k]);

    /* evolve background until k=aH is reached */
    class_call(primordial_inflation_evolve_background(ppm,
                                                      ppr,
                                                      y,
                                                      dy,
                                                      _aH_,
                                                      k,
                                                      _FALSE_,
                                                      forward,
                                                      conformal),
               ppm->error_message,
               ppm->error_message);

    /** - read value of phi at time when k=aH */
    phi_k = y[ppm->index_in_phi];

    /** - get potential (and its derivatives) at this value */
    class_call(primordial_inflation_check_potential(ppm,phi_k,&V,&dV,&ddV),
               ppm->error_message,
               ppm->error_message);

    /** - calculate the analytic slow-roll formula for the spectra */
    curvature = 128.*_PI_/3.*pow(V,3)/pow(dV,2);
    tensors = pow(dV/V,2)/_PI_*128.*_PI_/3.*pow(V,3)/pow(dV,2);

    /** - store the obtained result for curvature and tensor perturbations */
    ppm->lnpk[ppt->index_md_scalars][index_k] = log(curvature);
    ppm->lnpk[ppt->index_md_tensors][index_k] = log(tensors);
  }

  ppm->is_non_zero[ppt->index_md_scalars][ppt->index_ic_ad] = _TRUE_;
  ppm->is_non_zero[ppt->index_md_tensors][ppt->index_ic_ten] = _TRUE_;

  return _SUCCESS_;
}

// Assembly:
subq $0x20c8, %rsp           # imm = 0x20C8
movq %rdi, 0x20b8(%rsp)
movq %rsi, 0x20b0(%rsp)
movq %rdx, 0x20a8(%rsp)
movq %rcx, 0x20a0(%rsp)
movq 0x20b0(%rsp), %rax
movslq 0x300(%rax), %rdi
shlq $0x3, %rdi
callq 0x8460
movq %rax, 0x2098(%rsp)
cmpq $0x0, 0x2098(%rsp)
jne 0x11dc51
movq 0x20b0(%rsp), %rax
movslq 0x300(%rax), %rax
shlq $0x3, %rax
movl %eax, 0x204c(%rsp)
leaq 0x1840(%rsp), %rdi
movl 0x204c(%rsp), %ecx
leaq 0xb4402(%rip), %rsi     # 0x1d2004
leaq 0xb781d(%rip), %rdx     # 0x1d5426
movb $0x0, %al
callq 0x5b9c0
movq 0x20b0(%rsp), %rdi
addq $0x32a, %rdi            # imm = 0x32A
leaq 0x1840(%rsp), %r8
leaq 0xb4406(%rip), %rsi     # 0x1d2034
leaq 0xe0163(%rip), %rdx     # 0x1fdd98
movl $0x62e, %ecx            # imm = 0x62E
movb $0x0, %al
callq 0x5b9c0
movl $0x1, 0x20c4(%rsp)
jmp 0x11e17e
movq 0x20b0(%rsp), %rax
movslq 0x300(%rax), %rdi
shlq $0x3, %rdi
callq 0x8460
movq %rax, 0x2090(%rsp)
cmpq $0x0, 0x2090(%rsp)
jne 0x11dcfb
movq 0x20b0(%rsp), %rax
movslq 0x300(%rax), %rax
shlq $0x3, %rax
movl %eax, 0x183c(%rsp)
leaq 0x1030(%rsp), %rdi
movl 0x183c(%rsp), %ecx
leaq 0xb4358(%rip), %rsi     # 0x1d2004
leaq 0xdce02(%rip), %rdx     # 0x1faab5
movb $0x0, %al
callq 0x5b9c0
movq 0x20b0(%rsp), %rdi
addq $0x32a, %rdi            # imm = 0x32A
leaq 0x1030(%rsp), %r8
leaq 0xb435c(%rip), %rsi     # 0x1d2034
leaq 0xe00b9(%rip), %rdx     # 0x1fdd98
movl $0x62f, %ecx            # imm = 0x62F
movb $0x0, %al
callq 0x5b9c0
movl $0x1, 0x20c4(%rsp)
jmp 0x11e17e
movq 0x20a0(%rsp), %rax
movq 0x20b0(%rsp), %rcx
movslq 0x2d0(%rcx), %rcx
movsd (%rax,%rcx,8), %xmm0
movq 0x2098(%rsp), %rax
movq 0x20b0(%rsp), %rcx
movslq 0x2d0(%rcx), %rcx
movsd %xmm0, (%rax,%rcx,8)
movq 0x20a0(%rsp), %rax
movq 0x20b0(%rsp), %rcx
movslq 0x2d4(%rcx), %rcx
movsd (%rax,%rcx,8), %xmm0
movq 0x2098(%rsp), %rax
movq 0x20b0(%rsp), %rcx
movslq 0x2d4(%rcx), %rcx
movsd %xmm0, (%rax,%rcx,8)
movq 0x20b0(%rsp), %rax
cmpl $0x2, 0x18(%rax)
je 0x11dd87
movq 0x20b0(%rsp), %rax
cmpl $0x4, 0x18(%rax)
jne 0x11ddbf
movq 0x20a0(%rsp), %rax
movq 0x20b0(%rsp), %rcx
movslq 0x2d8(%rcx), %rcx
movsd (%rax,%rcx,8), %xmm0
movq 0x2098(%rsp), %rax
movq 0x20b0(%rsp), %rcx
movslq 0x2d8(%rcx), %rcx
movsd %xmm0, (%rax,%rcx,8)
movl $0x0, 0x208c(%rsp)
movl 0x208c(%rsp), %eax
movq 0x20b0(%rsp), %rcx
cmpl 0x290(%rcx), %eax
jge 0x11e105
movq 0x20b0(%rsp), %rax
movq 0x298(%rax), %rax
movslq 0x208c(%rsp), %rcx
movsd (%rax,%rcx,8), %xmm0
callq 0x8670
movsd %xmm0, 0x2080(%rsp)
movq 0x20b0(%rsp), %rdi
movq 0x20a8(%rsp), %rsi
movq 0x2098(%rsp), %rdx
movq 0x2090(%rsp), %rcx
movsd 0x2080(%rsp), %xmm0
xorl %r9d, %r9d
movl %r9d, %r8d
movl $0x1, (%rsp)
movl $0x0, 0x8(%rsp)
callq 0x11c060
cmpl $0x1, %eax
jne 0x11dec4
leaq 0x830(%rsp), %rdi
movq 0x20b0(%rsp), %rcx
addq $0x32a, %rcx            # imm = 0x32A
leaq 0xb4563(%rip), %rsi     # 0x1d23d8
leaq 0xdff42(%rip), %rdx     # 0x1fddbe
movb $0x0, %al
callq 0x5b9c0
movq 0x20b0(%rsp), %rdi
addq $0x32a, %rdi            # imm = 0x32A
leaq 0x830(%rsp), %r8
leaq 0xb4193(%rip), %rsi     # 0x1d2034
leaq 0xdfef0(%rip), %rdx     # 0x1fdd98
movl $0x647, %ecx            # imm = 0x647
movb $0x0, %al
callq 0x5b9c0
movl $0x1, 0x20c4(%rsp)
jmp 0x11e17e
movq 0x2098(%rsp), %rax
movq 0x20b0(%rsp), %rcx
movslq 0x2d4(%rcx), %rcx
movsd (%rax,%rcx,8), %xmm0
movsd %xmm0, 0x2078(%rsp)
movq 0x20b0(%rsp), %rdi
movsd 0x2078(%rsp), %xmm0
leaq 0x2060(%rsp), %rsi
leaq 0x2058(%rsp), %rdx
leaq 0x2050(%rsp), %rcx
callq 0x11e190
cmpl $0x1, %eax
jne 0x11df83
leaq 0x30(%rsp), %rdi
movq 0x20b0(%rsp), %rcx
addq $0x32a, %rcx            # imm = 0x32A
leaq 0xb44a1(%rip), %rsi     # 0x1d23d8
leaq 0xdfed8(%rip), %rdx     # 0x1fde16
movb $0x0, %al
callq 0x5b9c0
movq 0x20b0(%rsp), %rdi
addq $0x32a, %rdi            # imm = 0x32A
leaq 0x30(%rsp), %r8
leaq 0xb40d4(%rip), %rsi     # 0x1d2034
leaq 0xdfe31(%rip), %rdx     # 0x1fdd98
movl $0x64f, %ecx            # imm = 0x64F
movb $0x0, %al
callq 0x5b9c0
movl $0x1, 0x20c4(%rsp)
jmp 0x11e17e
movsd 0x2060(%rsp), %xmm0
movl $0x3, %edi
callq 0x5b970
movaps %xmm0, %xmm1
movsd 0xde447(%rip), %xmm0    # 0x1fc3e8
mulsd %xmm1, %xmm0
movsd %xmm0, 0x18(%rsp)
movsd 0x2058(%rsp), %xmm0
movl $0x2, %edi
callq 0x5b970
movaps %xmm0, %xmm1
movsd 0x18(%rsp), %xmm0
divsd %xmm1, %xmm0
movsd %xmm0, 0x2070(%rsp)
movsd 0x2058(%rsp), %xmm0
divsd 0x2060(%rsp), %xmm0
movl $0x2, %edi
callq 0x5b970
movsd 0xb6fe8(%rip), %xmm1    # 0x1d4fe0
divsd %xmm1, %xmm0
movsd 0xb8814(%rip), %xmm1    # 0x1d6818
mulsd %xmm1, %xmm0
movsd 0xb6fd0(%rip), %xmm1    # 0x1d4fe0
mulsd %xmm1, %xmm0
movsd 0xb567c(%rip), %xmm1    # 0x1d3698
divsd %xmm1, %xmm0
movsd %xmm0, 0x20(%rsp)
movsd 0x2060(%rsp), %xmm0
movl $0x3, %edi
callq 0x5b970
movaps %xmm0, %xmm1
movsd 0x20(%rsp), %xmm0
mulsd %xmm1, %xmm0
movsd %xmm0, 0x28(%rsp)
movsd 0x2058(%rsp), %xmm0
movl $0x2, %edi
callq 0x5b970
movaps %xmm0, %xmm1
movsd 0x28(%rsp), %xmm0
divsd %xmm1, %xmm0
movsd %xmm0, 0x2068(%rsp)
movsd 0x2070(%rsp), %xmm0
callq 0x82f0
movq 0x20b0(%rsp), %rax
movq 0x2a0(%rax), %rax
movq 0x20b8(%rsp), %rcx
movslq 0x848(%rcx), %rcx
movq (%rax,%rcx,8), %rax
movslq 0x208c(%rsp), %rcx
movsd %xmm0, (%rax,%rcx,8)
movsd 0x2068(%rsp), %xmm0
callq 0x82f0
movq 0x20b0(%rsp), %rax
movq 0x2a0(%rax), %rax
movq 0x20b8(%rsp), %rcx
movslq 0x84c(%rcx), %rcx
movq (%rax,%rcx,8), %rax
movslq 0x208c(%rsp), %rcx
movsd %xmm0, (%rax,%rcx,8)
movl 0x208c(%rsp), %eax
addl $0x1, %eax
movl %eax, 0x208c(%rsp)
jmp 0x11ddca
movq 0x20b0(%rsp), %rax
movq 0x2b0(%rax), %rax
movq 0x20b8(%rsp), %rcx
movslq 0x848(%rcx), %rcx
movq (%rax,%rcx,8), %rax
movq 0x20b8(%rsp), %rcx
movslq 0x858(%rcx), %rcx
movw $0x1, (%rax,%rcx,2)
movq 0x20b0(%rsp), %rax
movq 0x2b0(%rax), %rax
movq 0x20b8(%rsp), %rcx
movslq 0x84c(%rcx), %rcx
movq (%rax,%rcx,8), %rax
movq 0x20b8(%rsp), %rcx
movslq 0x86c(%rcx), %rcx
movw $0x1, (%rax,%rcx,2)
movl $0x0, 0x20c4(%rsp)
movl 0x20c4(%rsp), %eax
addq $0x20c8, %rsp           # imm = 0x20C8
retq
nopl (%rax)