// File: /workspace/github_c_makefile_star2_O3/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 0xa0698(%rip), %rsi     # 0xf9763
leaq 0x1420(%rsp), %rdx
leaq 0x4(%rsp), %rcx
movq %r9, %r8
callq 0x1ec7f
cmpl $0x1, %eax
jne 0x59126
leaq 0x95304(%rip), %rsi     # 0xee3f0
leaq 0xaea8d(%rip), %rdx     # 0x107b80
leaq 0x420(%rsp), %r14
movq %r14, %rdi
movq %rbx, %rcx
xorl %eax, %eax
callq 0x30af0
leaq 0x94f25(%rip), %rsi     # 0xee034
leaq 0xaeaa3(%rip), %rdx     # 0x107bb9
movq %rbx, %rdi
movl $0x1aca, %ecx           # imm = 0x1ACA
movq %r14, %r8
jmp 0x5925f
cmpl $0x1, 0x4(%rsp)
jne 0x59196
leaq 0x1420(%rsp), %rdi
movl $0x79, %esi
callq 0x30ca3
testl %eax, %eax
jne 0x59159
leaq 0x1420(%rsp), %rdi
movl $0x59, %esi
callq 0x30ca3
testl %eax, %eax
je 0x59196
cmpw $0x1, 0xe(%r14)
jne 0x59211
cmpw $0x1, 0x28(%r14)
je 0x59179
cmpw $0x1, 0x2a(%r14)
jne 0x59211
cmpw $0x1, 0x2c(%r14)
jne 0x59211
movw $0x1, (%r12)
movl 0x8e0(%rbp), %eax
addl %eax, 0x48(%r14)
cmpw $0x1, 0xe(%r14)
jne 0x594e9
cmpw $0x1, 0x2c(%r14)
jne 0x594e9
leaq 0xaeaf9(%rip), %rsi     # 0x107cae
leaq 0x18(%rsp), %rdx
leaq 0x4(%rsp), %rcx
movq %r15, %rdi
movq %rbx, %r8
callq 0x1e8ed
cmpl $0x1, %eax
jne 0x5927d
leaq 0x95216(%rip), %rsi     # 0xee3f0
leaq 0xaead1(%rip), %rdx     # 0x107cb2
leaq 0x420(%rsp), %r14
movq %r14, %rdi
movq %rbx, %rcx
xorl %eax, %eax
callq 0x30af0
leaq 0x94e37(%rip), %rsi     # 0xee034
leaq 0xae9b5(%rip), %rdx     # 0x107bb9
movq %rbx, %rdi
movl $0x1ade, %ecx           # imm = 0x1ADE
jmp 0x5911e
leaq 0xae9bf(%rip), %rsi     # 0x107bd7
leaq 0x420(%rsp), %r14
movq %r14, %rdi
xorl %eax, %eax
callq 0x30af0
leaq 0x95354(%rip), %rsi     # 0xee585
leaq 0xc20(%rsp), %r15
movq %r15, %rdi
movq %r14, %rdx
xorl %eax, %eax
callq 0x30af0
leaq 0x94de7(%rip), %rsi     # 0xee034
leaq 0xae965(%rip), %rdx     # 0x107bb9
movq %rbx, %rdi
movl $0x1ad3, %ecx           # imm = 0x1AD3
movq %r15, %r8
xorl %eax, %eax
callq 0x30af0
movl $0x1, %eax
addq $0x1828, %rsp           # imm = 0x1828
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
leaq 0xaea62(%rip), %rsi     # 0x107ce6
leaq 0x10(%rsp), %rdx
leaq 0x8(%rsp), %rcx
movq %r15, %rdi
movq %rbx, %r8
callq 0x1e8ed
cmpl $0x1, %eax
jne 0x592dc
leaq 0x9514b(%rip), %rsi     # 0xee3f0
leaq 0xaea47(%rip), %rdx     # 0x107cf3
leaq 0x420(%rsp), %r14
movq %r14, %rdi
movq %rbx, %rcx
xorl %eax, %eax
callq 0x30af0
leaq 0x94d6c(%rip), %rsi     # 0xee034
leaq 0xae8ea(%rip), %rdx     # 0x107bb9
movq %rbx, %rdi
movl $0x1ae1, %ecx           # imm = 0x1AE1
jmp 0x5911e
movl 0x4(%rsp), %ecx
movl %ecx, %edx
xorl $0x1, %edx
movl 0x8(%rsp), %eax
movl %eax, %esi
xorl $0x1, %esi
orl %edx, %esi
jne 0x59342
leaq 0xaea37(%rip), %rsi     # 0x107d30
leaq 0x420(%rsp), %r14
movq %r14, %rdi
xorl %eax, %eax
callq 0x30af0
leaq 0x95273(%rip), %rsi     # 0xee585
leaq 0xc20(%rsp), %r15
movq %r15, %rdi
movq %r14, %rdx
xorl %eax, %eax
callq 0x30af0
leaq 0x94d06(%rip), %rsi     # 0xee034
leaq 0xae884(%rip), %rdx     # 0x107bb9
movq %rbx, %rdi
movl $0x1ae4, %ecx           # imm = 0x1AE4
jmp 0x5925c
cmpl $0x1, %ecx
jne 0x5936c
movsd 0x18(%rsp), %xmm0
xorpd %xmm1, %xmm1
ucomisd %xmm1, %xmm0
jb 0x5935d
sqrtsd %xmm0, %xmm0
jmp 0x59362
callq 0x82b0
movsd %xmm0, (%r13)
movl 0x8(%rsp), %eax
cmpl $0x1, %eax
jne 0x5937d
movsd 0x10(%rsp), %xmm0
movsd %xmm0, (%r13)
leaq 0xae9e3(%rip), %rsi     # 0x107d67
leaq 0xc20(%rsp), %rdx
leaq 0x20(%rsp), %rcx
movq %r15, %rdi
movq %rbx, %r8
callq 0x1e8ed
cmpl $0x1, %eax
jne 0x593df
leaq 0x95048(%rip), %rsi     # 0xee3f0
leaq 0xae9c2(%rip), %rdx     # 0x107d71
leaq 0x420(%rsp), %r14
movq %r14, %rdi
movq %rbx, %rcx
xorl %eax, %eax
callq 0x30af0
leaq 0x94c69(%rip), %rsi     # 0xee034
leaq 0xae7e7(%rip), %rdx     # 0x107bb9
movq %rbx, %rdi
movl $0x1aee, %ecx           # imm = 0x1AEE
jmp 0x5911e
cmpl $0x1, 0x20(%rsp)
jne 0x593f5
movsd 0xc20(%rsp), %xmm0
movsd %xmm0, 0x8(%r13)
leaq 0xae9b7(%rip), %rsi     # 0x107db3
leaq 0xc20(%rsp), %rdx
leaq 0x20(%rsp), %rcx
movq %r15, %rdi
movq %rbx, %r8
callq 0x1e8ed
cmpl $0x1, %eax
jne 0x59457
leaq 0x94fd0(%rip), %rsi     # 0xee3f0
leaq 0xae997(%rip), %rdx     # 0x107dbe
leaq 0x420(%rsp), %r14
movq %r14, %rdi
movq %rbx, %rcx
xorl %eax, %eax
callq 0x30af0
leaq 0x94bf1(%rip), %rsi     # 0xee034
leaq 0xae76f(%rip), %rdx     # 0x107bb9
movq %rbx, %rdi
movl $0x1aef, %ecx           # imm = 0x1AEF
jmp 0x5911e
cmpl $0x1, 0x20(%rsp)
jne 0x5946d
movsd 0xc20(%rsp), %xmm0
movsd %xmm0, 0x10(%r13)
leaq 0xae98d(%rip), %rsi     # 0x107e01
leaq 0xc20(%rsp), %rdx
leaq 0x20(%rsp), %rcx
movq %r15, %rdi
movq %rbx, %r8
callq 0x1e8ed
cmpl $0x1, %eax
jne 0x594cf
leaq 0x94f58(%rip), %rsi     # 0xee3f0
leaq 0xae970(%rip), %rdx     # 0x107e0f
leaq 0x420(%rsp), %r14
movq %r14, %rdi
movq %rbx, %rcx
xorl %eax, %eax
callq 0x30af0
leaq 0x94b79(%rip), %rsi     # 0xee034
leaq 0xae6f7(%rip), %rdx     # 0x107bb9
movq %rbx, %rdi
movl $0x1af1, %ecx           # imm = 0x1AF1
jmp 0x5911e
cmpl $0x1, 0x20(%rsp)
jne 0x594e9
movsd 0xc20(%rsp), %xmm0
movsd %xmm0, 0x88(%r12)
leaq 0xae965(%rip), %rsi     # 0x107e55
leaq 0x20(%rsp), %rdx
leaq 0xc(%rsp), %rcx
movq %r15, %rdi
movq %rbx, %r8
callq 0x1ec7f
cmpl $0x1, %eax
jne 0x59548
leaq 0x94edf(%rip), %rsi     # 0xee3f0
leaq 0xae953(%rip), %rdx     # 0x107e6b
leaq 0x420(%rsp), %r14
movq %r14, %rdi
movq %rbx, %rcx
xorl %eax, %eax
callq 0x30af0
leaq 0x94b00(%rip), %rsi     # 0xee034
leaq 0xae67e(%rip), %rdx     # 0x107bb9
movq %rbx, %rdi
movl $0x1af8, %ecx           # imm = 0x1AF8
jmp 0x5911e
cmpl $0x1, 0xc(%rsp)
jne 0x595a6
leaq 0x20(%rsp), %rdi
movl $0x79, %esi
callq 0x30ca3
movw $0x1, %bp
testl %eax, %eax
jne 0x595a1
leaq 0x20(%rsp), %rdi
movl $0x59, %esi
callq 0x30ca3
testl %eax, %eax
jne 0x595a1
leaq 0x20(%rsp), %rdi
movl $0x6e, %esi
callq 0x30ca3
testl %eax, %eax
jne 0x5959f
leaq 0x20(%rsp), %rdi
movl $0x4e, %esi
callq 0x30ca3
testl %eax, %eax
je 0x595ad
xorl %ebp, %ebp
movw %bp, 0x60(%r14)
xorl %eax, %eax
jmp 0x5926b
leaq 0x99bd0(%rip), %rsi     # 0xf3184
leaq 0xae89a(%rip), %rcx     # 0x107e55
leaq 0x420(%rsp), %r14
leaq 0x20(%rsp), %rdx
movq %r14, %rdi
xorl %eax, %eax
callq 0x30af0
leaq 0x94fac(%rip), %rsi     # 0xee585
leaq 0xc20(%rsp), %r15
movq %r15, %rdi
movq %r14, %rdx
xorl %eax, %eax
callq 0x30af0
leaq 0x94a3f(%rip), %rsi     # 0xee034
leaq 0xae5bd(%rip), %rdx     # 0x107bb9
movq %rbx, %rdi
movl $0x1af8, %ecx           # imm = 0x1AF8
jmp 0x5925c