// File: /workspace/github_c_makefile_star2_O0/PoulinV[P]AxiCLASS/build/../source/transfer.c
// Function: transfer_perturbation_copy_sources_and_nl_corrections
int transfer_perturbation_copy_sources_and_nl_corrections(
                                                          struct perturbations * ppt,
                                                          struct fourier * pfo,
                                                          struct transfer * ptr,
                                                          double *** sources
                                                          ) {
  int index_md;
  int index_ic;
  int index_tp;
  int index_k;
  int index_tau;

  for (index_md = 0; index_md < ptr->md_size; index_md++) {

    class_alloc(sources[index_md],
                ppt->ic_size[index_md]*ppt->tp_size[index_md]*sizeof(double*),
                ptr->error_message);

    for (index_ic = 0; index_ic < ppt->ic_size[index_md]; index_ic++) {

      for (index_tp = 0; index_tp < ppt->tp_size[index_md]; index_tp++) {

        if ((pfo->method != nl_none) && (_scalars_) &&
            (((ppt->has_source_delta_m == _TRUE_) && (index_tp == ppt->index_tp_delta_m)) ||
             ((ppt->has_source_delta_cb == _TRUE_) && (index_tp == ppt->index_tp_delta_cb)) ||
             ((ppt->has_source_theta_m == _TRUE_) && (index_tp == ppt->index_tp_theta_m)) ||
             ((ppt->has_source_theta_cb == _TRUE_) && (index_tp == ppt->index_tp_theta_cb)) ||
             ((ppt->has_source_phi == _TRUE_) && (index_tp == ppt->index_tp_phi)) ||
             ((ppt->has_source_phi_prime == _TRUE_) && (index_tp == ppt->index_tp_phi_prime)) ||
             ((ppt->has_source_phi_plus_psi == _TRUE_) && (index_tp == ppt->index_tp_phi_plus_psi)) ||
             ((ppt->has_source_psi == _TRUE_) && (index_tp == ppt->index_tp_psi)))) {

          class_alloc(sources[index_md][index_ic * ppt->tp_size[index_md] + index_tp],
                      ppt->k_size[index_md]*ppt->tau_size*sizeof(double),
                      ptr->error_message);

          for (index_tau=0; index_tau<ppt->tau_size; index_tau++) {
            for (index_k=0; index_k<ppt->k_size[index_md]; index_k++) {
              if (((ppt->has_source_delta_cb == _TRUE_) && (index_tp == ppt->index_tp_delta_cb)) ||
                  ((ppt->has_source_theta_cb == _TRUE_) && (index_tp == ppt->index_tp_theta_cb))){
                sources[index_md]
                  [index_ic * ppt->tp_size[index_md] + index_tp]
                  [index_tau * ppt->k_size[index_md] + index_k] =
                  ppt->sources[index_md]
                  [index_ic * ppt->tp_size[index_md] + index_tp]
                  [index_tau * ppt->k_size[index_md] + index_k]
                  * pfo->nl_corr_density[pfo->index_pk_cb][index_tau * ppt->k_size[index_md] + index_k];
              }
              else{
                sources[index_md]
                  [index_ic * ppt->tp_size[index_md] + index_tp]
                  [index_tau * ppt->k_size[index_md] + index_k] =
                  ppt->sources[index_md]
                  [index_ic * ppt->tp_size[index_md] + index_tp]
                  [index_tau * ppt->k_size[index_md] + index_k]
                  * pfo->nl_corr_density[pfo->index_pk_m][index_tau * ppt->k_size[index_md] + index_k];
              }
            }
          }
        }
        else {
          sources[index_md][index_ic * ppt->tp_size[index_md] + index_tp] =
            ppt->sources[index_md][index_ic * ppt->tp_size[index_md] + index_tp];
        }
      }
    }
  }

  return _SUCCESS_;

}

// Assembly:
subq $0x1058, %rsp           # imm = 0x1058
movq %rdi, 0x1048(%rsp)
movq %rsi, 0x1040(%rsp)
movq %rdx, 0x1038(%rsp)
movq %rcx, 0x1030(%rsp)
movl $0x0, 0x102c(%rsp)
movl 0x102c(%rsp), %eax
movq 0x1038(%rsp), %rcx
cmpl 0x8a4(%rcx), %eax
jge 0x1327e1
movq 0x1048(%rsp), %rax
movq 0x870(%rax), %rax
movslq 0x102c(%rsp), %rcx
movl (%rax,%rcx,4), %eax
movq 0x1048(%rsp), %rcx
movq 0x998(%rcx), %rcx
movslq 0x102c(%rsp), %rdx
imull (%rcx,%rdx,4), %eax
movslq %eax, %rdi
shlq $0x3, %rdi
callq 0x8460
movq %rax, %rdx
movq 0x1030(%rsp), %rax
movslq 0x102c(%rsp), %rcx
movq %rdx, (%rax,%rcx,8)
movq 0x1030(%rsp), %rax
movslq 0x102c(%rsp), %rcx
cmpq $0x0, (%rax,%rcx,8)
jne 0x132027
movq 0x1048(%rsp), %rax
movq 0x870(%rax), %rax
movslq 0x102c(%rsp), %rcx
movl (%rax,%rcx,4), %eax
movq 0x1048(%rsp), %rcx
movq 0x998(%rcx), %rcx
movslq 0x102c(%rsp), %rdx
imull (%rcx,%rdx,4), %eax
cltq
shlq $0x3, %rax
movl %eax, 0x1018(%rsp)
leaq 0x810(%rsp), %rdi
movl 0x1018(%rsp), %ecx
leaq 0xa002c(%rip), %rsi     # 0x1d2004
leaq 0xc6555(%rip), %rdx     # 0x1f8534
movb $0x0, %al
callq 0x5b9c0
movq 0x1038(%rsp), %rdi
addq $0x96a, %rdi            # imm = 0x96A
leaq 0x810(%rsp), %r8
leaq 0xa0030(%rip), %rsi     # 0x1d2034
leaq 0xd0f55(%rip), %rdx     # 0x202f60
movl $0x29e, %ecx            # imm = 0x29E
movb $0x0, %al
callq 0x5b9c0
movl $0x1, 0x1054(%rsp)
jmp 0x1327ec
movl $0x0, 0x1028(%rsp)
movl 0x1028(%rsp), %eax
movq 0x1048(%rsp), %rcx
movq 0x870(%rcx), %rcx
movslq 0x102c(%rsp), %rdx
cmpl (%rcx,%rdx,4), %eax
jge 0x1327c9
movl $0x0, 0x1024(%rsp)
movl 0x1024(%rsp), %eax
movq 0x1048(%rsp), %rcx
movq 0x998(%rcx), %rcx
movslq 0x102c(%rsp), %rdx
cmpl (%rcx,%rdx,4), %eax
jge 0x1327b1
movq 0x1040(%rsp), %rax
cmpl $0x0, (%rax)
je 0x13270a
movq 0x1048(%rsp), %rax
movswl 0xe(%rax), %eax
cmpl $0x1, %eax
jne 0x13270a
movl 0x102c(%rsp), %eax
movq 0x1048(%rsp), %rcx
cmpl 0x848(%rcx), %eax
jne 0x13270a
movq 0x1048(%rsp), %rax
movswl 0x87c(%rax), %eax
cmpl $0x1, %eax
jne 0x1320fb
movl 0x1024(%rsp), %eax
movq 0x1048(%rsp), %rcx
cmpl 0x8d8(%rcx), %eax
je 0x132240
movq 0x1048(%rsp), %rax
movswl 0x87e(%rax), %eax
cmpl $0x1, %eax
jne 0x13212a
movl 0x1024(%rsp), %eax
movq 0x1048(%rsp), %rcx
cmpl 0x8dc(%rcx), %eax
je 0x132240
movq 0x1048(%rsp), %rax
movswl 0x898(%rax), %eax
cmpl $0x1, %eax
jne 0x132159
movl 0x1024(%rsp), %eax
movq 0x1048(%rsp), %rcx
cmpl 0x934(%rcx), %eax
je 0x132240
movq 0x1048(%rsp), %rax
movswl 0x89a(%rax), %eax
cmpl $0x1, %eax
jne 0x132188
movl 0x1024(%rsp), %eax
movq 0x1048(%rsp), %rcx
cmpl 0x938(%rcx), %eax
je 0x132240
movq 0x1048(%rsp), %rax
movswl 0x8b4(%rax), %eax
cmpl $0x1, %eax
jne 0x1321b7
movl 0x1024(%rsp), %eax
movq 0x1048(%rsp), %rcx
cmpl 0x970(%rcx), %eax
je 0x132240
movq 0x1048(%rsp), %rax
movswl 0x8b6(%rax), %eax
cmpl $0x1, %eax
jne 0x1321e2
movl 0x1024(%rsp), %eax
movq 0x1048(%rsp), %rcx
cmpl 0x974(%rcx), %eax
je 0x132240
movq 0x1048(%rsp), %rax
movswl 0x8b8(%rax), %eax
cmpl $0x1, %eax
jne 0x13220d
movl 0x1024(%rsp), %eax
movq 0x1048(%rsp), %rcx
cmpl 0x978(%rcx), %eax
je 0x132240
movq 0x1048(%rsp), %rax
movswl 0x8ba(%rax), %eax
cmpl $0x1, %eax
jne 0x13270a
movl 0x1024(%rsp), %eax
movq 0x1048(%rsp), %rcx
cmpl 0x97c(%rcx), %eax
jne 0x13270a
movq 0x1048(%rsp), %rax
movq 0x9c8(%rax), %rax
movslq 0x102c(%rsp), %rcx
movl (%rax,%rcx,4), %eax
movq 0x1048(%rsp), %rcx
imull 0x9f8(%rcx), %eax
movslq %eax, %rdi
shlq $0x3, %rdi
callq 0x8460
movq %rax, %rdx
movq 0x1030(%rsp), %rax
movslq 0x102c(%rsp), %rcx
movq (%rax,%rcx,8), %rax
movl 0x1028(%rsp), %ecx
movq 0x1048(%rsp), %rsi
movq 0x998(%rsi), %rsi
movslq 0x102c(%rsp), %rdi
imull (%rsi,%rdi,4), %ecx
addl 0x1024(%rsp), %ecx
movslq %ecx, %rcx
movq %rdx, (%rax,%rcx,8)
movq 0x1030(%rsp), %rax
movslq 0x102c(%rsp), %rcx
movq (%rax,%rcx,8), %rax
movl 0x1028(%rsp), %ecx
movq 0x1048(%rsp), %rdx
movq 0x998(%rdx), %rdx
movslq 0x102c(%rsp), %rsi
imull (%rdx,%rsi,4), %ecx
addl 0x1024(%rsp), %ecx
movslq %ecx, %rcx
cmpq $0x0, (%rax,%rcx,8)
jne 0x132398
movq 0x1048(%rsp), %rax
movq 0x9c8(%rax), %rax
movslq 0x102c(%rsp), %rcx
movl (%rax,%rcx,4), %eax
movq 0x1048(%rsp), %rcx
imull 0x9f8(%rcx), %eax
cltq
shlq $0x3, %rax
movl %eax, 0x80c(%rsp)
movq %rsp, %rdi
movl 0x80c(%rsp), %ecx
leaq 0x9fcb6(%rip), %rsi     # 0x1d2004
leaq 0xd0c41(%rip), %rdx     # 0x202f96
movb $0x0, %al
callq 0x5b9c0
movq 0x1038(%rsp), %rdi
addq $0x96a, %rdi            # imm = 0x96A
movq %rsp, %r8
leaq 0x9fcbf(%rip), %rsi     # 0x1d2034
leaq 0xd0be4(%rip), %rdx     # 0x202f60
movl $0x2b0, %ecx            # imm = 0x2B0
movb $0x0, %al
callq 0x5b9c0
movl $0x1, 0x1054(%rsp)
jmp 0x1327ec
movl $0x0, 0x101c(%rsp)
movl 0x101c(%rsp), %eax
movq 0x1048(%rsp), %rcx
cmpl 0x9f8(%rcx), %eax
jge 0x132705
movl $0x0, 0x1020(%rsp)
movl 0x1020(%rsp), %eax
movq 0x1048(%rsp), %rcx
movq 0x9c8(%rcx), %rcx
movslq 0x102c(%rsp), %rdx
cmpl (%rcx,%rdx,4), %eax
jge 0x1326ed
movq 0x1048(%rsp), %rax
movswl 0x87e(%rax), %eax
cmpl $0x1, %eax
jne 0x13241b
movl 0x1024(%rsp), %eax
movq 0x1048(%rsp), %rcx
cmpl 0x8dc(%rcx), %eax
je 0x13244e
movq 0x1048(%rsp), %rax
movswl 0x89a(%rax), %eax
cmpl $0x1, %eax
jne 0x132594
movl 0x1024(%rsp), %eax
movq 0x1048(%rsp), %rcx
cmpl 0x938(%rcx), %eax
jne 0x132594
movq 0x1048(%rsp), %rax
movq 0xa38(%rax), %rax
movslq 0x102c(%rsp), %rcx
movq (%rax,%rcx,8), %rax
movl 0x1028(%rsp), %ecx
movq 0x1048(%rsp), %rdx
movq 0x998(%rdx), %rdx
movslq 0x102c(%rsp), %rsi
imull (%rdx,%rsi,4), %ecx
addl 0x1024(%rsp), %ecx
movslq %ecx, %rcx
movq (%rax,%rcx,8), %rax
movl 0x101c(%rsp), %ecx
movq 0x1048(%rsp), %rdx
movq 0x9c8(%rdx), %rdx
movslq 0x102c(%rsp), %rsi
imull (%rdx,%rsi,4), %ecx
addl 0x1020(%rsp), %ecx
movslq %ecx, %rcx
movsd (%rax,%rcx,8), %xmm0
movq 0x1040(%rsp), %rax
movq 0x150(%rax), %rax
movq 0x1040(%rsp), %rcx
movslq 0x58(%rcx), %rcx
movq (%rax,%rcx,8), %rax
movl 0x101c(%rsp), %ecx
movq 0x1048(%rsp), %rdx
movq 0x9c8(%rdx), %rdx
movslq 0x102c(%rsp), %rsi
imull (%rdx,%rsi,4), %ecx
addl 0x1020(%rsp), %ecx
movslq %ecx, %rcx
mulsd (%rax,%rcx,8), %xmm0
movq 0x1030(%rsp), %rax
movslq 0x102c(%rsp), %rcx
movq (%rax,%rcx,8), %rax
movl 0x1028(%rsp), %ecx
movq 0x1048(%rsp), %rdx
movq 0x998(%rdx), %rdx
movslq 0x102c(%rsp), %rsi
imull (%rdx,%rsi,4), %ecx
addl 0x1024(%rsp), %ecx
movslq %ecx, %rcx
movq (%rax,%rcx,8), %rax
movl 0x101c(%rsp), %ecx
movq 0x1048(%rsp), %rdx
movq 0x9c8(%rdx), %rdx
movslq 0x102c(%rsp), %rsi
imull (%rdx,%rsi,4), %ecx
addl 0x1020(%rsp), %ecx
movslq %ecx, %rcx
movsd %xmm0, (%rax,%rcx,8)
jmp 0x1326d5
movq 0x1048(%rsp), %rax
movq 0xa38(%rax), %rax
movslq 0x102c(%rsp), %rcx
movq (%rax,%rcx,8), %rax
movl 0x1028(%rsp), %ecx
movq 0x1048(%rsp), %rdx
movq 0x998(%rdx), %rdx
movslq 0x102c(%rsp), %rsi
imull (%rdx,%rsi,4), %ecx
addl 0x1024(%rsp), %ecx
movslq %ecx, %rcx
movq (%rax,%rcx,8), %rax
movl 0x101c(%rsp), %ecx
movq 0x1048(%rsp), %rdx
movq 0x9c8(%rdx), %rdx
movslq 0x102c(%rsp), %rsi
imull (%rdx,%rsi,4), %ecx
addl 0x1020(%rsp), %ecx
movslq %ecx, %rcx
movsd (%rax,%rcx,8), %xmm0
movq 0x1040(%rsp), %rax
movq 0x150(%rax), %rax
movq 0x1040(%rsp), %rcx
movslq 0x54(%rcx), %rcx
movq (%rax,%rcx,8), %rax
movl 0x101c(%rsp), %ecx
movq 0x1048(%rsp), %rdx
movq 0x9c8(%rdx), %rdx
movslq 0x102c(%rsp), %rsi
imull (%rdx,%rsi,4), %ecx
addl 0x1020(%rsp), %ecx
movslq %ecx, %rcx
mulsd (%rax,%rcx,8), %xmm0
movq 0x1030(%rsp), %rax
movslq 0x102c(%rsp), %rcx
movq (%rax,%rcx,8), %rax
movl 0x1028(%rsp), %ecx
movq 0x1048(%rsp), %rdx
movq 0x998(%rdx), %rdx
movslq 0x102c(%rsp), %rsi
imull (%rdx,%rsi,4), %ecx
addl 0x1024(%rsp), %ecx
movslq %ecx, %rcx
movq (%rax,%rcx,8), %rax
movl 0x101c(%rsp), %ecx
movq 0x1048(%rsp), %rdx
movq 0x9c8(%rdx), %rdx
movslq 0x102c(%rsp), %rsi
imull (%rdx,%rsi,4), %ecx
addl 0x1020(%rsp), %ecx
movslq %ecx, %rcx
movsd %xmm0, (%rax,%rcx,8)
jmp 0x1326d7
movl 0x1020(%rsp), %eax
addl $0x1, %eax
movl %eax, 0x1020(%rsp)
jmp 0x1323c9
jmp 0x1326ef
movl 0x101c(%rsp), %eax
addl $0x1, %eax
movl %eax, 0x101c(%rsp)
jmp 0x1323a3
jmp 0x132799
movq 0x1048(%rsp), %rax
movq 0xa38(%rax), %rax
movslq 0x102c(%rsp), %rcx
movq (%rax,%rcx,8), %rax
movl 0x1028(%rsp), %ecx
movq 0x1048(%rsp), %rdx
movq 0x998(%rdx), %rdx
movslq 0x102c(%rsp), %rsi
imull (%rdx,%rsi,4), %ecx
addl 0x1024(%rsp), %ecx
movslq %ecx, %rcx
movq (%rax,%rcx,8), %rdx
movq 0x1030(%rsp), %rax
movslq 0x102c(%rsp), %rcx
movq (%rax,%rcx,8), %rax
movl 0x1028(%rsp), %ecx
movq 0x1048(%rsp), %rsi
movq 0x998(%rsi), %rsi
movslq 0x102c(%rsp), %rdi
imull (%rsi,%rdi,4), %ecx
addl 0x1024(%rsp), %ecx
movslq %ecx, %rcx
movq %rdx, (%rax,%rcx,8)
jmp 0x13279b
movl 0x1024(%rsp), %eax
addl $0x1, %eax
movl %eax, 0x1024(%rsp)
jmp 0x132064
jmp 0x1327b3
movl 0x1028(%rsp), %eax
addl $0x1, %eax
movl %eax, 0x1028(%rsp)
jmp 0x132032
jmp 0x1327cb
movl 0x102c(%rsp), %eax
addl $0x1, %eax
movl %eax, 0x102c(%rsp)
jmp 0x131ef2
movl $0x0, 0x1054(%rsp)
movl 0x1054(%rsp), %eax
addq $0x1058, %rsp           # imm = 0x1058
retq
nopl (%rax,%rax)