// File: /workspace/github_c_makefile_star2_O1/PoulinV[P]AxiCLASS/build/../source/input.c
// Function: input_read_parameters_lensing
int input_read_parameters_lensing(struct file_content * pfc,
                                  struct precision * ppr,
                                  struct perturbations * ppt,
                                  struct transfer * ptr,
                                  struct lensing *ple,
                                  ErrorMsg errmsg){

  /** Summary: */

  /** Define local variables */
  int flag1,flag2;
  double param1,param2;
  char string1[_ARGUMENT_LENGTH_MAX_];

  /** 1) Lensed spectra? */
  /* Read */
  class_call(parser_read_string(pfc,"lensing",&string1,&flag1,errmsg),
             errmsg,
             errmsg);
  /* Complete set of parameters */
  if ((flag1 == _TRUE_) && (string_begins_with(string1,'y') || string_begins_with(string1,'Y'))){
    if ((ppt->has_scalars == _TRUE_) && ((ppt->has_cl_cmb_temperature == _TRUE_) || (ppt->has_cl_cmb_polarization == _TRUE_)) && (ppt->has_cl_cmb_lensing_potential == _TRUE_)){
      ple->has_lensed_cls = _TRUE_;
      /* Slightly increase precision by delta_l_max for more precise lensed Cl's*/
      ppt->l_scalar_max += ppr->delta_l_max;
    }
    else {
      class_stop(errmsg,"you asked for lensed CMB Cls, but this requires a minimal number of options: 'modes' should include 's', 'output' should include 'tCl' and/or 'pCl', and also, importantly, 'lCl', the CMB lensing potential spectrum.");
    }
  }


  /** 2) Should the lensed spectra be rescaled (either with just A_L, or otherwise with amplitude, and tilt and pivot scale in k space) */
  /* Read */
  if ((ppt->has_scalars == _TRUE_) && (ppt->has_cl_cmb_lensing_potential == _TRUE_)) {

   class_call(parser_read_double(pfc,"A_L",&param1,&flag1,errmsg),
               errmsg,
               errmsg);
    class_call(parser_read_double(pfc,"lcmb_rescale",&param2,&flag2,errmsg),
               errmsg,
               errmsg);

    if ((flag1 == _TRUE_) && (flag2 == _TRUE_)) {
      class_stop(errmsg,"You cannot pass both A_l and lcdmb_rescale, choose one");
    }
    else {
      if (flag1 == _TRUE_) {
        ptr->lcmb_rescale = sqrt(param1);
      }
      if (flag2 == _TRUE_) {
        ptr->lcmb_rescale = param2;
      }
    }
    class_read_double("lcmb_tilt",ptr->lcmb_tilt);
    class_read_double("lcmb_pivot",ptr->lcmb_pivot);
    /* only rescale in TTTEEE, not in lensing*/
    class_read_double("A_lens_TTTEEE",ple->A_lens_TTTEEE);


  }

  /** 3) In general, do we want to use the full Limber scheme introduced in v3.2.2? With this full Limber scheme, the calculation of the CMB lensing potential spectrum C_l^phiphi for l > ppr->l_switch_limber is based on a new integration scheme. Compared to the previous scheme, which can be recovered by switching this parameter to _FALSE_, the new scheme uses a larger k_max and a coarser k-grid (or q-grid) than the CMB transfer function. The new scheme is used by default, because the old one is inaccurate at large l due to the too small k_max. */

  class_read_flag("want_lcmb_full_limber",ppt->want_lcmb_full_limber);

  return _SUCCESS_;

}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x1828, %rsp           # imm = 0x1828
movq %r9, %rbx
movq %r8, %r12
movq %rcx, %r13
movq %rdx, %r14
movq %rsi, %rbp
movq %rdi, %r15
leaq 0xa11de(%rip), %rsi     # 0xfc73b
leaq 0x1420(%rsp), %rdx
leaq 0x4(%rsp), %rcx
movq %r9, %r8
callq 0x1ec10
cmpl $0x1, %eax
jne 0x5b5b8
leaq 0x95e72(%rip), %rsi     # 0xf13f0
leaq 0xaf5d3(%rip), %rdx     # 0x10ab58
leaq 0x420(%rsp), %r14
movq %r14, %rdi
movq %rbx, %rcx
xorl %eax, %eax
callq 0x30c2c
leaq 0x95a93(%rip), %rsi     # 0xf1034
leaq 0xaf5e9(%rip), %rdx     # 0x10ab91
movq %rbx, %rdi
movl $0x1aca, %ecx           # imm = 0x1ACA
movq %r14, %r8
jmp 0x5b6f1
cmpl $0x1, 0x4(%rsp)
jne 0x5b628
leaq 0x1420(%rsp), %rdi
movl $0x79, %esi
callq 0x30ddf
testl %eax, %eax
jne 0x5b5eb
leaq 0x1420(%rsp), %rdi
movl $0x59, %esi
callq 0x30ddf
testl %eax, %eax
je 0x5b628
cmpw $0x1, 0xe(%r14)
jne 0x5b6a3
cmpw $0x1, 0x28(%r14)
je 0x5b60b
cmpw $0x1, 0x2a(%r14)
jne 0x5b6a3
cmpw $0x1, 0x2c(%r14)
jne 0x5b6a3
movw $0x1, (%r12)
movl 0x8e0(%rbp), %eax
addl %eax, 0x48(%r14)
cmpw $0x1, 0xe(%r14)
jne 0x5b9bc
cmpw $0x1, 0x2c(%r14)
jne 0x5b9bc
leaq 0xaf63f(%rip), %rsi     # 0x10ac86
leaq 0x18(%rsp), %rdx
leaq 0x4(%rsp), %rcx
movq %r15, %rdi
movq %rbx, %r8
callq 0x1e87c
cmpl $0x1, %eax
jne 0x5b711
leaq 0x95d84(%rip), %rsi     # 0xf13f0
leaq 0xaf617(%rip), %rdx     # 0x10ac8a
leaq 0x420(%rsp), %r14
movq %r14, %rdi
movq %rbx, %rcx
xorl %eax, %eax
callq 0x30c2c
leaq 0x959a5(%rip), %rsi     # 0xf1034
leaq 0xaf4fb(%rip), %rdx     # 0x10ab91
movq %rbx, %rdi
movl $0x1ade, %ecx           # imm = 0x1ADE
jmp 0x5b5b0
leaq 0xaf505(%rip), %rsi     # 0x10abaf
leaq 0x420(%rsp), %r14
movq %r14, %rdi
xorl %eax, %eax
callq 0x30c2c
leaq 0x95ec2(%rip), %rsi     # 0xf1585
leaq 0xc20(%rsp), %r15
movq %r15, %rdi
movq %r14, %rdx
xorl %eax, %eax
callq 0x30c2c
leaq 0x95955(%rip), %rsi     # 0xf1034
leaq 0xaf4ab(%rip), %rdx     # 0x10ab91
movq %rbx, %rdi
movl $0x1ad3, %ecx           # imm = 0x1AD3
movq %r15, %r8
xorl %eax, %eax
callq 0x30c2c
movl $0x1, %ebp
movl %ebp, %eax
addq $0x1828, %rsp           # imm = 0x1828
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
leaq 0xaf5a6(%rip), %rsi     # 0x10acbe
leaq 0x10(%rsp), %rdx
leaq 0x8(%rsp), %rcx
movq %r15, %rdi
movq %rbx, %r8
callq 0x1e87c
cmpl $0x1, %eax
jne 0x5b770
leaq 0x95cb7(%rip), %rsi     # 0xf13f0
leaq 0xaf58b(%rip), %rdx     # 0x10accb
leaq 0x420(%rsp), %r14
movq %r14, %rdi
movq %rbx, %rcx
xorl %eax, %eax
callq 0x30c2c
leaq 0x958d8(%rip), %rsi     # 0xf1034
leaq 0xaf42e(%rip), %rdx     # 0x10ab91
movq %rbx, %rdi
movl $0x1ae1, %ecx           # imm = 0x1AE1
jmp 0x5b5b0
movl 0x4(%rsp), %eax
cmpl $0x1, %eax
jne 0x5b7d0
cmpl $0x1, 0x8(%rsp)
jne 0x5b7d0
leaq 0xaf581(%rip), %rsi     # 0x10ad08
leaq 0x420(%rsp), %r14
movq %r14, %rdi
xorl %eax, %eax
callq 0x30c2c
leaq 0x95de5(%rip), %rsi     # 0xf1585
leaq 0xc20(%rsp), %r15
movq %r15, %rdi
movq %r14, %rdx
xorl %eax, %eax
callq 0x30c2c
leaq 0x95878(%rip), %rsi     # 0xf1034
leaq 0xaf3ce(%rip), %rdx     # 0x10ab91
movq %rbx, %rdi
movl $0x1ae4, %ecx           # imm = 0x1AE4
jmp 0x5b6ee
cmpl $0x1, %eax
jne 0x5b7f6
movsd 0x18(%rsp), %xmm0
xorpd %xmm1, %xmm1
ucomisd %xmm1, %xmm0
jb 0x5b7eb
sqrtsd %xmm0, %xmm0
jmp 0x5b7f0
callq 0x82b0
movsd %xmm0, (%r13)
cmpl $0x1, 0x8(%rsp)
jne 0x5b809
movsd 0x10(%rsp), %xmm0
movsd %xmm0, (%r13)
leaq 0xaf52f(%rip), %rsi     # 0x10ad3f
leaq 0xc20(%rsp), %rdx
leaq 0x20(%rsp), %rcx
movq %r15, %rdi
movq %rbx, %r8
callq 0x1e87c
cmpl $0x1, %eax
jne 0x5b878
leaq 0x95bbc(%rip), %rsi     # 0xf13f0
leaq 0xaf50e(%rip), %rdx     # 0x10ad49
leaq 0x420(%rsp), %rdi
movq %rbx, %rcx
movl %eax, %ebp
xorl %eax, %eax
callq 0x30c2c
leaq 0x957de(%rip), %rsi     # 0xf1034
leaq 0xaf334(%rip), %rdx     # 0x10ab91
movq %rbx, %rdi
movl $0x1aee, %ecx           # imm = 0x1AEE
leaq 0x420(%rsp), %r8
xorl %eax, %eax
callq 0x30c2c
movl %ebp, %eax
jmp 0x5b88e
cmpl $0x1, 0x20(%rsp)
jne 0x5b88e
movsd 0xc20(%rsp), %xmm0
movsd %xmm0, 0x8(%r13)
movl $0x1, %ebp
cmpl $0x1, %eax
je 0x5b6fd
leaq 0xaf4e8(%rip), %rsi     # 0x10ad8b
leaq 0xc20(%rsp), %rdx
leaq 0x20(%rsp), %rcx
movq %r15, %rdi
movq %rbx, %r8
callq 0x1e87c
cmpl $0x1, %eax
jne 0x5b90d
leaq 0x95b29(%rip), %rsi     # 0xf13f0
leaq 0xaf4c8(%rip), %rdx     # 0x10ad96
leaq 0x420(%rsp), %rdi
movq %rbx, %rcx
movl %eax, %r13d
xorl %eax, %eax
callq 0x30c2c
leaq 0x9574a(%rip), %rsi     # 0xf1034
leaq 0xaf2a0(%rip), %rdx     # 0x10ab91
movq %rbx, %rdi
movl $0x1aef, %ecx           # imm = 0x1AEF
leaq 0x420(%rsp), %r8
xorl %eax, %eax
callq 0x30c2c
movl %r13d, %eax
jmp 0x5b923
cmpl $0x1, 0x20(%rsp)
jne 0x5b923
movsd 0xc20(%rsp), %xmm0
movsd %xmm0, 0x10(%r13)
cmpl $0x1, %eax
je 0x5b6fd
leaq 0xaf4a6(%rip), %rsi     # 0x10add9
leaq 0xc20(%rsp), %rdx
leaq 0x20(%rsp), %rcx
movq %r15, %rdi
movq %rbx, %r8
callq 0x1e87c
movl %eax, %r13d
cmpl $0x1, %eax
jne 0x5b998
leaq 0x95a96(%rip), %rsi     # 0xf13f0
leaq 0xaf486(%rip), %rdx     # 0x10ade7
leaq 0x420(%rsp), %r12
movq %r12, %rdi
movq %rbx, %rcx
xorl %eax, %eax
callq 0x30c2c
leaq 0x956b7(%rip), %rsi     # 0xf1034
leaq 0xaf20d(%rip), %rdx     # 0x10ab91
movq %rbx, %rdi
movl $0x1af1, %ecx           # imm = 0x1AF1
movq %r12, %r8
xorl %eax, %eax
callq 0x30c2c
jmp 0x5b9b2
cmpl $0x1, 0x20(%rsp)
jne 0x5b9b2
movsd 0xc20(%rsp), %xmm0
movsd %xmm0, 0x88(%r12)
cmpl $0x1, %r13d
je 0x5b6fd
leaq 0xaf46a(%rip), %rsi     # 0x10ae2d
leaq 0x20(%rsp), %rdx
leaq 0xc(%rsp), %rcx
movq %r15, %rdi
movq %rbx, %r8
callq 0x1ec10
cmpl $0x1, %eax
jne 0x5ba1b
leaq 0x95a0c(%rip), %rsi     # 0xf13f0
leaq 0xaf458(%rip), %rdx     # 0x10ae43
leaq 0x420(%rsp), %r14
movq %r14, %rdi
movq %rbx, %rcx
xorl %eax, %eax
callq 0x30c2c
leaq 0x9562d(%rip), %rsi     # 0xf1034
leaq 0xaf183(%rip), %rdx     # 0x10ab91
movq %rbx, %rdi
movl $0x1af8, %ecx           # imm = 0x1AF8
jmp 0x5b5b0
xorl %ebp, %ebp
cmpl $0x1, 0xc(%rsp)
jne 0x5b6fd
leaq 0x20(%rsp), %rdi
movl $0x79, %esi
callq 0x30ddf
testl %eax, %eax
jne 0x5ba4e
leaq 0x20(%rsp), %rdi
movl $0x59, %esi
callq 0x30ddf
testl %eax, %eax
je 0x5ba5a
movw $0x1, 0x60(%r14)
jmp 0x5b6fd
leaq 0x20(%rsp), %rdi
movl $0x6e, %esi
callq 0x30ddf
testl %eax, %eax
jne 0x5ba80
leaq 0x20(%rsp), %rdi
movl $0x4e, %esi
callq 0x30ddf
testl %eax, %eax
je 0x5ba8c
movw $0x0, 0x60(%r14)
jmp 0x5b6fd
leaq 0x9a6c9(%rip), %rsi     # 0xf615c
leaq 0xaf393(%rip), %rcx     # 0x10ae2d
leaq 0x420(%rsp), %r14
leaq 0x20(%rsp), %rdx
movq %r14, %rdi
xorl %eax, %eax
callq 0x30c2c
leaq 0x95acd(%rip), %rsi     # 0xf1585
leaq 0xc20(%rsp), %r15
movq %r15, %rdi
movq %r14, %rdx
xorl %eax, %eax
callq 0x30c2c
leaq 0x95560(%rip), %rsi     # 0xf1034
leaq 0xaf0b6(%rip), %rdx     # 0x10ab91
movq %rbx, %rdi
movl $0x1af8, %ecx           # imm = 0x1AF8
jmp 0x5b6ee