// File: /workspace/github_c_makefile_star2_O0/PoulinV[P]AxiCLASS/build/../source/transfer.c
// Function: transfer_get_q_limber_list
int transfer_get_q_limber_list(
                               struct precision * ppr,
                               struct perturbations * ppt,
                               struct transfer * ptr,
                               double K,
                               int sgnK
                               ) {

  int index_q;
  double q_min=0.,q_max=0.,k_max;
  int nu_min;
  int index_md;

  /* first and last value in flat case*/

  if (sgnK == 0) {
    q_min = ppt->k_min;

    q_max = 0.;
    for (index_md=0; index_md<ppt->md_size; index_md++) {
      q_max = MAX(q_max,ppt->k[index_md][ppt->k_size[index_md]-1]);
    }

    K=0;
  }

  /* first and last value in open case*/

  else if (sgnK == -1) {
    q_min = sqrt(ppt->k_min*ppt->k_min+K);

    k_max = 0.;
    for (index_md=0; index_md<ppt->md_size; index_md++) {
      k_max = MAX(k_max,ppt->k[index_md][ppt->k_size[index_md]-1]);
    }

    q_max = sqrt(k_max*k_max+K);
    if (ppt->has_vectors == _TRUE_)
      q_max = MIN(q_max,sqrt(k_max*k_max+2.*K));
    if (ppt->has_tensors == _TRUE_)
      q_max = MIN(q_max,sqrt(k_max*k_max+3.*K));
  }

  /* first and last value in closed case*/

  else if (sgnK == 1) {
    nu_min = 3;
    q_min = nu_min * sqrt(K);

    q_max = 0.;
    for (index_md=0; index_md<ppt->md_size; index_md++) {
      q_max = MAX(q_max,ppt->k[index_md][ppt->k_size[index_md]-1]);
    }
  }

  /* number of values */
  ptr->q_size_limber = (int)(log(q_max/q_min)/log(ppr->q_logstep_limber))+1;

  class_alloc(ptr->q_limber,
              ptr->q_size_limber*sizeof(double),
              ptr->error_message);

  /* assign the first value before starting the loop */

  ptr->q_limber[0] = q_min;
  for (index_q = 1; index_q < ptr->q_size_limber; index_q++) {
    ptr->q_limber[index_q] = ppr->q_logstep_limber *  ptr->q_limber[index_q-1];
  }

  return _SUCCESS_;

}

// Assembly:
subq $0x8a8, %rsp            # imm = 0x8A8
movq %rdi, 0x898(%rsp)
movq %rsi, 0x890(%rsp)
movq %rdx, 0x888(%rsp)
movsd %xmm0, 0x880(%rsp)
movl %ecx, 0x87c(%rsp)
xorps %xmm0, %xmm0
movsd %xmm0, 0x870(%rsp)
xorps %xmm0, %xmm0
movsd %xmm0, 0x868(%rsp)
cmpl $0x0, 0x87c(%rsp)
jne 0x13949c
movq 0x890(%rsp), %rax
movsd 0x9e0(%rax), %xmm0
movsd %xmm0, 0x870(%rsp)
xorps %xmm0, %xmm0
movsd %xmm0, 0x868(%rsp)
movl $0x0, 0x858(%rsp)
movl 0x858(%rsp), %eax
movq 0x890(%rsp), %rcx
cmpl 0x854(%rcx), %eax
jge 0x13948b
movsd 0x868(%rsp), %xmm1
movq 0x890(%rsp), %rax
movq 0x9d0(%rax), %rax
movslq 0x858(%rsp), %rcx
movq (%rax,%rcx,8), %rax
movq 0x890(%rsp), %rcx
movq 0x9c8(%rcx), %rcx
movslq 0x858(%rsp), %rdx
movl (%rcx,%rdx,4), %ecx
subl $0x1, %ecx
movslq %ecx, %rcx
movsd (%rax,%rcx,8), %xmm0
ucomisd %xmm1, %xmm0
jbe 0x139457
movq 0x890(%rsp), %rax
movq 0x9d0(%rax), %rax
movslq 0x858(%rsp), %rcx
movq (%rax,%rcx,8), %rax
movq 0x890(%rsp), %rcx
movq 0x9c8(%rcx), %rcx
movslq 0x858(%rsp), %rdx
movl (%rcx,%rdx,4), %ecx
subl $0x1, %ecx
movslq %ecx, %rcx
movsd (%rax,%rcx,8), %xmm0
movsd %xmm0, 0x48(%rsp)
jmp 0x139466
movsd 0x868(%rsp), %xmm0
movsd %xmm0, 0x48(%rsp)
movsd 0x48(%rsp), %xmm0
movsd %xmm0, 0x868(%rsp)
movl 0x858(%rsp), %eax
addl $0x1, %eax
movl %eax, 0x858(%rsp)
jmp 0x1393a5
xorps %xmm0, %xmm0
movsd %xmm0, 0x880(%rsp)
jmp 0x1398d7
cmpl $-0x1, 0x87c(%rsp)
jne 0x139788
movq 0x890(%rsp), %rax
movsd 0x9e0(%rax), %xmm0
movq 0x890(%rsp), %rax
movsd 0x9e0(%rax), %xmm2
movsd 0x880(%rsp), %xmm1
mulsd %xmm2, %xmm0
addsd %xmm1, %xmm0
callq 0x82e0
movsd %xmm0, 0x870(%rsp)
xorps %xmm0, %xmm0
movsd %xmm0, 0x860(%rsp)
movl $0x0, 0x858(%rsp)
movl 0x858(%rsp), %eax
movq 0x890(%rsp), %rcx
cmpl 0x854(%rcx), %eax
jge 0x1395e6
movsd 0x860(%rsp), %xmm1
movq 0x890(%rsp), %rax
movq 0x9d0(%rax), %rax
movslq 0x858(%rsp), %rcx
movq (%rax,%rcx,8), %rax
movq 0x890(%rsp), %rcx
movq 0x9c8(%rcx), %rcx
movslq 0x858(%rsp), %rdx
movl (%rcx,%rdx,4), %ecx
subl $0x1, %ecx
movslq %ecx, %rcx
movsd (%rax,%rcx,8), %xmm0
ucomisd %xmm1, %xmm0
jbe 0x1395b2
movq 0x890(%rsp), %rax
movq 0x9d0(%rax), %rax
movslq 0x858(%rsp), %rcx
movq (%rax,%rcx,8), %rax
movq 0x890(%rsp), %rcx
movq 0x9c8(%rcx), %rcx
movslq 0x858(%rsp), %rdx
movl (%rcx,%rdx,4), %ecx
subl $0x1, %ecx
movslq %ecx, %rcx
movsd (%rax,%rcx,8), %xmm0
movsd %xmm0, 0x40(%rsp)
jmp 0x1395c1
movsd 0x860(%rsp), %xmm0
movsd %xmm0, 0x40(%rsp)
movsd 0x40(%rsp), %xmm0
movsd %xmm0, 0x860(%rsp)
movl 0x858(%rsp), %eax
addl $0x1, %eax
movl %eax, 0x858(%rsp)
jmp 0x139500
movsd 0x860(%rsp), %xmm0
movsd 0x860(%rsp), %xmm2
movsd 0x880(%rsp), %xmm1
mulsd %xmm2, %xmm0
addsd %xmm1, %xmm0
callq 0x82e0
movsd %xmm0, 0x868(%rsp)
movq 0x890(%rsp), %rax
movswl 0x10(%rax), %eax
cmpl $0x1, %eax
jne 0x1396cd
movsd 0x868(%rsp), %xmm0
movsd %xmm0, 0x38(%rsp)
movsd 0x860(%rsp), %xmm0
movsd 0x860(%rsp), %xmm2
movsd 0x9962b(%rip), %xmm1    # 0x1d2c80
mulsd 0x880(%rsp), %xmm1
mulsd %xmm2, %xmm0
addsd %xmm1, %xmm0
callq 0x82e0
movsd 0x38(%rsp), %xmm1
ucomisd %xmm1, %xmm0
jbe 0x139688
movsd 0x868(%rsp), %xmm0
movsd %xmm0, 0x30(%rsp)
jmp 0x1396be
movsd 0x860(%rsp), %xmm0
movsd 0x860(%rsp), %xmm2
movsd 0x995de(%rip), %xmm1    # 0x1d2c80
mulsd 0x880(%rsp), %xmm1
mulsd %xmm2, %xmm0
addsd %xmm1, %xmm0
callq 0x82e0
movsd %xmm0, 0x30(%rsp)
movsd 0x30(%rsp), %xmm0
movsd %xmm0, 0x868(%rsp)
movq 0x890(%rsp), %rax
movswl 0x12(%rax), %eax
cmpl $0x1, %eax
jne 0x139783
movsd 0x868(%rsp), %xmm0
movsd %xmm0, 0x28(%rsp)
movsd 0x860(%rsp), %xmm0
movsd 0x860(%rsp), %xmm2
movsd 0x99f8d(%rip), %xmm1    # 0x1d3698
mulsd 0x880(%rsp), %xmm1
mulsd %xmm2, %xmm0
addsd %xmm1, %xmm0
callq 0x82e0
movsd 0x28(%rsp), %xmm1
ucomisd %xmm1, %xmm0
jbe 0x13973e
movsd 0x868(%rsp), %xmm0
movsd %xmm0, 0x20(%rsp)
jmp 0x139774
movsd 0x860(%rsp), %xmm0
movsd 0x860(%rsp), %xmm2
movsd 0x99f40(%rip), %xmm1    # 0x1d3698
mulsd 0x880(%rsp), %xmm1
mulsd %xmm2, %xmm0
addsd %xmm1, %xmm0
callq 0x82e0
movsd %xmm0, 0x20(%rsp)
movsd 0x20(%rsp), %xmm0
movsd %xmm0, 0x868(%rsp)
jmp 0x1398d5
cmpl $0x1, 0x87c(%rsp)
jne 0x1398d3
movl $0x3, 0x85c(%rsp)
cvtsi2sdl 0x85c(%rsp), %xmm0
movsd %xmm0, 0x18(%rsp)
movsd 0x880(%rsp), %xmm0
callq 0x82e0
movaps %xmm0, %xmm1
movsd 0x18(%rsp), %xmm0
mulsd %xmm1, %xmm0
movsd %xmm0, 0x870(%rsp)
xorps %xmm0, %xmm0
movsd %xmm0, 0x868(%rsp)
movl $0x0, 0x858(%rsp)
movl 0x858(%rsp), %eax
movq 0x890(%rsp), %rcx
cmpl 0x854(%rcx), %eax
jge 0x1398d1
movsd 0x868(%rsp), %xmm1
movq 0x890(%rsp), %rax
movq 0x9d0(%rax), %rax
movslq 0x858(%rsp), %rcx
movq (%rax,%rcx,8), %rax
movq 0x890(%rsp), %rcx
movq 0x9c8(%rcx), %rcx
movslq 0x858(%rsp), %rdx
movl (%rcx,%rdx,4), %ecx
subl $0x1, %ecx
movslq %ecx, %rcx
movsd (%rax,%rcx,8), %xmm0
ucomisd %xmm1, %xmm0
jbe 0x13989d
movq 0x890(%rsp), %rax
movq 0x9d0(%rax), %rax
movslq 0x858(%rsp), %rcx
movq (%rax,%rcx,8), %rax
movq 0x890(%rsp), %rcx
movq 0x9c8(%rcx), %rcx
movslq 0x858(%rsp), %rdx
movl (%rcx,%rdx,4), %ecx
subl $0x1, %ecx
movslq %ecx, %rcx
movsd (%rax,%rcx,8), %xmm0
movsd %xmm0, 0x10(%rsp)
jmp 0x1398ac
movsd 0x868(%rsp), %xmm0
movsd %xmm0, 0x10(%rsp)
movsd 0x10(%rsp), %xmm0
movsd %xmm0, 0x868(%rsp)
movl 0x858(%rsp), %eax
addl $0x1, %eax
movl %eax, 0x858(%rsp)
jmp 0x1397eb
jmp 0x1398d3
jmp 0x1398d5
jmp 0x1398d7
movsd 0x868(%rsp), %xmm0
divsd 0x870(%rsp), %xmm0
callq 0x82f0
movsd %xmm0, 0x8(%rsp)
movq 0x898(%rsp), %rax
movsd 0x780(%rax), %xmm0
callq 0x82f0
movaps %xmm0, %xmm1
movsd 0x8(%rsp), %xmm0
divsd %xmm1, %xmm0
cvttsd2si %xmm0, %eax
addl $0x1, %eax
movslq %eax, %rcx
movq 0x888(%rsp), %rax
movq %rcx, 0x940(%rax)
movq 0x888(%rsp), %rax
movq 0x940(%rax), %rdi
shlq $0x3, %rdi
callq 0x8460
movq %rax, %rcx
movq 0x888(%rsp), %rax
movq %rcx, 0x948(%rax)
movq 0x888(%rsp), %rax
cmpq $0x0, 0x948(%rax)
jne 0x1399e4
movq 0x888(%rsp), %rax
movq 0x940(%rax), %rax
shlq $0x3, %rax
movl %eax, 0x854(%rsp)
leaq 0x50(%rsp), %rdi
movl 0x854(%rsp), %ecx
leaq 0x9866c(%rip), %rsi     # 0x1d2004
leaq 0xc9982(%rip), %rdx     # 0x203321
movb $0x0, %al
callq 0x5b9c0
movq 0x888(%rsp), %rdi
addq $0x96a, %rdi            # imm = 0x96A
leaq 0x50(%rsp), %r8
leaq 0x98673(%rip), %rsi     # 0x1d2034
leaq 0xc9967(%rip), %rdx     # 0x20332f
movl $0x54c, %ecx            # imm = 0x54C
movb $0x0, %al
callq 0x5b9c0
movl $0x1, 0x8a4(%rsp)
jmp 0x139a8f
movsd 0x870(%rsp), %xmm0
movq 0x888(%rsp), %rax
movq 0x948(%rax), %rax
movsd %xmm0, (%rax)
movl $0x1, 0x878(%rsp)
movslq 0x878(%rsp), %rax
movq 0x888(%rsp), %rcx
cmpq 0x940(%rcx), %rax
jae 0x139a84
movq 0x898(%rsp), %rax
movsd 0x780(%rax), %xmm0
movq 0x888(%rsp), %rax
movq 0x948(%rax), %rax
movl 0x878(%rsp), %ecx
subl $0x1, %ecx
movslq %ecx, %rcx
mulsd (%rax,%rcx,8), %xmm0
movq 0x888(%rsp), %rax
movq 0x948(%rax), %rax
movslq 0x878(%rsp), %rcx
movsd %xmm0, (%rax,%rcx,8)
movl 0x878(%rsp), %eax
addl $0x1, %eax
movl %eax, 0x878(%rsp)
jmp 0x139a0b
movl $0x0, 0x8a4(%rsp)
movl 0x8a4(%rsp), %eax
addq $0x8a8, %rsp            # imm = 0x8A8
retq
nop