// File: /workspace/github_c_makefile_star2_O0/PoulinV[P]AxiCLASS/build/../source/transfer.c
// Function: transfer_select_radial_function
int transfer_select_radial_function(
                                    struct perturbations * ppt,
                                    struct transfer * ptr,
                                    int index_md,
                                    int index_tt,
                                    radial_function_type * radial_type
                                    ) {

  /* generic case leading to generic bessel function (it applies also to all nonCMB types: lcmb, density, lensing) */
  *radial_type = SCALAR_TEMPERATURE_0;

  /* other specific cases */
  if (_scalars_) {

    if (ppt->has_cl_cmb_temperature == _TRUE_) {

      if (index_tt == ptr->index_tt_t0) {
        *radial_type = SCALAR_TEMPERATURE_0;
      }
      if (index_tt == ptr->index_tt_t1) {
        *radial_type = SCALAR_TEMPERATURE_1;
      }
      if (index_tt == ptr->index_tt_t2) {
        *radial_type = SCALAR_TEMPERATURE_2;
      }

    }

    if (ppt->has_cl_cmb_polarization == _TRUE_) {

      if (index_tt == ptr->index_tt_e) {
        *radial_type = SCALAR_POLARISATION_E;
      }

    }

    if (_index_tt_in_range_(ptr->index_tt_d1,      ppt->selection_num, ppt->has_nc_rsd))
      *radial_type = SCALAR_TEMPERATURE_1;

    if (_index_tt_in_range_(ptr->index_tt_rsd,     ppt->selection_num, ppt->has_nc_rsd))
      *radial_type = NC_RSD;

    if (_index_tt_in_range_(ptr->index_tt_nc_g5,   ppt->selection_num, ppt->has_nc_gr))
      *radial_type = SCALAR_TEMPERATURE_1;

  }

  if (_vectors_) {

    if (ppt->has_cl_cmb_temperature == _TRUE_) {

      if (index_tt == ptr->index_tt_t1) {
        *radial_type = VECTOR_TEMPERATURE_1;
      }
      if (index_tt == ptr->index_tt_t2) {
        *radial_type = VECTOR_TEMPERATURE_2;
      }
    }

    if (ppt->has_cl_cmb_polarization == _TRUE_) {

      if (index_tt == ptr->index_tt_e) {
        *radial_type = VECTOR_POLARISATION_E;
      }
      if (index_tt == ptr->index_tt_b) {
        *radial_type = VECTOR_POLARISATION_B;
      }

    }
  }

  if (_tensors_) {

    if (ppt->has_cl_cmb_temperature == _TRUE_) {

      if (index_tt == ptr->index_tt_t2) {
        *radial_type = TENSOR_TEMPERATURE_2;
      }
    }

    if (ppt->has_cl_cmb_polarization == _TRUE_) {

      if (index_tt == ptr->index_tt_e) {
        *radial_type = TENSOR_POLARISATION_E;
      }
      if (index_tt == ptr->index_tt_b) {
        *radial_type = TENSOR_POLARISATION_B;
      }

    }
  }

  return _SUCCESS_;

}

// Assembly:
movq %rdi, -0x8(%rsp)
movq %rsi, -0x10(%rsp)
movl %edx, -0x14(%rsp)
movl %ecx, -0x18(%rsp)
movq %r8, -0x20(%rsp)
movq -0x20(%rsp), %rax
movl $0x0, (%rax)
movq -0x8(%rsp), %rax
movswl 0xe(%rax), %eax
cmpl $0x1, %eax
jne 0x14067a
movl -0x14(%rsp), %eax
movq -0x8(%rsp), %rcx
cmpl 0x848(%rcx), %eax
jne 0x14067a
movq -0x8(%rsp), %rax
movswl 0x28(%rax), %eax
cmpl $0x1, %eax
jne 0x14057d
movl -0x18(%rsp), %eax
movq -0x10(%rsp), %rcx
cmpl 0x8a8(%rcx), %eax
jne 0x140543
movq -0x20(%rsp), %rax
movl $0x0, (%rax)
movl -0x18(%rsp), %eax
movq -0x10(%rsp), %rcx
cmpl 0x8ac(%rcx), %eax
jne 0x14055f
movq -0x20(%rsp), %rax
movl $0x1, (%rax)
movl -0x18(%rsp), %eax
movq -0x10(%rsp), %rcx
cmpl 0x8b0(%rcx), %eax
jne 0x14057b
movq -0x20(%rsp), %rax
movl $0x2, (%rax)
jmp 0x14057d
movq -0x8(%rsp), %rax
movswl 0x2a(%rax), %eax
cmpl $0x1, %eax
jne 0x1405a9
movl -0x18(%rsp), %eax
movq -0x10(%rsp), %rcx
cmpl 0x8b4(%rcx), %eax
jne 0x1405a7
movq -0x20(%rsp), %rax
movl $0x3, (%rax)
jmp 0x1405a9
movq -0x8(%rsp), %rax
movswl 0x40(%rax), %eax
cmpl $0x1, %eax
jne 0x1405ee
movl -0x18(%rsp), %eax
movq -0x10(%rsp), %rcx
cmpl 0x8d0(%rcx), %eax
jl 0x1405ee
movl -0x18(%rsp), %eax
movq -0x10(%rsp), %rcx
movl 0x8d0(%rcx), %ecx
movq -0x8(%rsp), %rdx
addl 0x64(%rdx), %ecx
cmpl %ecx, %eax
jge 0x1405ee
movq -0x20(%rsp), %rax
movl $0x1, (%rax)
movq -0x8(%rsp), %rax
movswl 0x40(%rax), %eax
cmpl $0x1, %eax
jne 0x140633
movl -0x18(%rsp), %eax
movq -0x10(%rsp), %rcx
cmpl 0x8c8(%rcx), %eax
jl 0x140633
movl -0x18(%rsp), %eax
movq -0x10(%rsp), %rcx
movl 0x8c8(%rcx), %ecx
movq -0x8(%rsp), %rdx
addl 0x64(%rdx), %ecx
cmpl %ecx, %eax
jge 0x140633
movq -0x20(%rsp), %rax
movl $0xb, (%rax)
movq -0x8(%rsp), %rax
movswl 0x44(%rax), %eax
cmpl $0x1, %eax
jne 0x140678
movl -0x18(%rsp), %eax
movq -0x10(%rsp), %rcx
cmpl 0x8e8(%rcx), %eax
jl 0x140678
movl -0x18(%rsp), %eax
movq -0x10(%rsp), %rcx
movl 0x8e8(%rcx), %ecx
movq -0x8(%rsp), %rdx
addl 0x64(%rdx), %ecx
cmpl %ecx, %eax
jge 0x140678
movq -0x20(%rsp), %rax
movl $0x1, (%rax)
jmp 0x14067a
movq -0x8(%rsp), %rax
movswl 0x10(%rax), %eax
cmpl $0x1, %eax
jne 0x140733
movl -0x14(%rsp), %eax
movq -0x8(%rsp), %rcx
cmpl 0x850(%rcx), %eax
jne 0x140733
movq -0x8(%rsp), %rax
movswl 0x28(%rax), %eax
cmpl $0x1, %eax
jne 0x1406e9
movl -0x18(%rsp), %eax
movq -0x10(%rsp), %rcx
cmpl 0x8ac(%rcx), %eax
jne 0x1406cb
movq -0x20(%rsp), %rax
movl $0x4, (%rax)
movl -0x18(%rsp), %eax
movq -0x10(%rsp), %rcx
cmpl 0x8b0(%rcx), %eax
jne 0x1406e7
movq -0x20(%rsp), %rax
movl $0x5, (%rax)
jmp 0x1406e9
movq -0x8(%rsp), %rax
movswl 0x2a(%rax), %eax
cmpl $0x1, %eax
jne 0x140731
movl -0x18(%rsp), %eax
movq -0x10(%rsp), %rcx
cmpl 0x8b4(%rcx), %eax
jne 0x140713
movq -0x20(%rsp), %rax
movl $0x6, (%rax)
movl -0x18(%rsp), %eax
movq -0x10(%rsp), %rcx
cmpl 0x8b8(%rcx), %eax
jne 0x14072f
movq -0x20(%rsp), %rax
movl $0x7, (%rax)
jmp 0x140731
jmp 0x140733
movq -0x8(%rsp), %rax
movswl 0x12(%rax), %eax
cmpl $0x1, %eax
jne 0x1407cc
movl -0x14(%rsp), %eax
movq -0x8(%rsp), %rcx
cmpl 0x84c(%rcx), %eax
jne 0x1407cc
movq -0x8(%rsp), %rax
movswl 0x28(%rax), %eax
cmpl $0x1, %eax
jne 0x140782
movl -0x18(%rsp), %eax
movq -0x10(%rsp), %rcx
cmpl 0x8b0(%rcx), %eax
jne 0x140780
movq -0x20(%rsp), %rax
movl $0x8, (%rax)
jmp 0x140782
movq -0x8(%rsp), %rax
movswl 0x2a(%rax), %eax
cmpl $0x1, %eax
jne 0x1407ca
movl -0x18(%rsp), %eax
movq -0x10(%rsp), %rcx
cmpl 0x8b4(%rcx), %eax
jne 0x1407ac
movq -0x20(%rsp), %rax
movl $0x9, (%rax)
movl -0x18(%rsp), %eax
movq -0x10(%rsp), %rcx
cmpl 0x8b8(%rcx), %eax
jne 0x1407c8
movq -0x20(%rsp), %rax
movl $0xa, (%rax)
jmp 0x1407ca
jmp 0x1407cc
xorl %eax, %eax
retq
nop