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

  for (index_md = 0; index_md < ptr->md_size; index_md++) {
    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_theta_m == _TRUE_) && (index_tp == ppt->index_tp_theta_m)) ||
             ((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)) ||
             ((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)))) {

          free(sources[index_md][index_ic * ppt->tp_size[index_md] + index_tp]);
        }
      }
    }
    free(sources[index_md]);
  }
  free(sources);

  return _SUCCESS_;
}

// Assembly:
subq $0x38, %rsp
movq %rdi, 0x30(%rsp)
movq %rsi, 0x28(%rsp)
movq %rdx, 0x20(%rsp)
movq %rcx, 0x18(%rsp)
movl $0x0, 0x14(%rsp)
movl 0x14(%rsp), %eax
movq 0x20(%rsp), %rcx
cmpl 0x8a4(%rcx), %eax
jge 0x137964
movl $0x0, 0x10(%rsp)
movl 0x10(%rsp), %eax
movq 0x30(%rsp), %rcx
movq 0x870(%rcx), %rcx
movslq 0x14(%rsp), %rdx
cmpl (%rcx,%rdx,4), %eax
jge 0x137941
movl $0x0, 0xc(%rsp)
movl 0xc(%rsp), %eax
movq 0x30(%rsp), %rcx
movq 0x998(%rcx), %rcx
movslq 0x14(%rsp), %rdx
cmpl (%rcx,%rdx,4), %eax
jge 0x13792f
movq 0x28(%rsp), %rax
cmpl $0x0, (%rax)
je 0x13791d
movq 0x30(%rsp), %rax
movswl 0xe(%rax), %eax
cmpl $0x1, %eax
jne 0x13791d
movl 0x14(%rsp), %eax
movq 0x30(%rsp), %rcx
cmpl 0x848(%rcx), %eax
jne 0x13791d
movq 0x30(%rsp), %rax
movswl 0x87c(%rax), %eax
cmpl $0x1, %eax
jne 0x1377ec
movl 0xc(%rsp), %eax
movq 0x30(%rsp), %rcx
cmpl 0x8d8(%rcx), %eax
je 0x1378e6
movq 0x30(%rsp), %rax
movswl 0x898(%rax), %eax
cmpl $0x1, %eax
jne 0x137812
movl 0xc(%rsp), %eax
movq 0x30(%rsp), %rcx
cmpl 0x934(%rcx), %eax
je 0x1378e6
movq 0x30(%rsp), %rax
movswl 0x87e(%rax), %eax
cmpl $0x1, %eax
jne 0x137838
movl 0xc(%rsp), %eax
movq 0x30(%rsp), %rcx
cmpl 0x8dc(%rcx), %eax
je 0x1378e6
movq 0x30(%rsp), %rax
movswl 0x89a(%rax), %eax
cmpl $0x1, %eax
jne 0x13785e
movl 0xc(%rsp), %eax
movq 0x30(%rsp), %rcx
cmpl 0x938(%rcx), %eax
je 0x1378e6
movq 0x30(%rsp), %rax
movswl 0x8b4(%rax), %eax
cmpl $0x1, %eax
jne 0x137880
movl 0xc(%rsp), %eax
movq 0x30(%rsp), %rcx
cmpl 0x970(%rcx), %eax
je 0x1378e6
movq 0x30(%rsp), %rax
movswl 0x8b6(%rax), %eax
cmpl $0x1, %eax
jne 0x1378a2
movl 0xc(%rsp), %eax
movq 0x30(%rsp), %rcx
cmpl 0x974(%rcx), %eax
je 0x1378e6
movq 0x30(%rsp), %rax
movswl 0x8b8(%rax), %eax
cmpl $0x1, %eax
jne 0x1378c4
movl 0xc(%rsp), %eax
movq 0x30(%rsp), %rcx
cmpl 0x978(%rcx), %eax
je 0x1378e6
movq 0x30(%rsp), %rax
movswl 0x8ba(%rax), %eax
cmpl $0x1, %eax
jne 0x13791d
movl 0xc(%rsp), %eax
movq 0x30(%rsp), %rcx
cmpl 0x97c(%rcx), %eax
jne 0x13791d
movq 0x18(%rsp), %rax
movslq 0x14(%rsp), %rcx
movq (%rax,%rcx,8), %rax
movl 0x10(%rsp), %ecx
movq 0x30(%rsp), %rdx
movq 0x998(%rdx), %rdx
movslq 0x14(%rsp), %rsi
imull (%rdx,%rsi,4), %ecx
addl 0xc(%rsp), %ecx
movslq %ecx, %rcx
movq (%rax,%rcx,8), %rdi
callq 0x8420
jmp 0x13791f
movl 0xc(%rsp), %eax
addl $0x1, %eax
movl %eax, 0xc(%rsp)
jmp 0x137773
jmp 0x137931
movl 0x10(%rsp), %eax
addl $0x1, %eax
movl %eax, 0x10(%rsp)
jmp 0x13774d
movq 0x18(%rsp), %rax
movslq 0x14(%rsp), %rcx
movq (%rax,%rcx,8), %rdi
callq 0x8420
movl 0x14(%rsp), %eax
addl $0x1, %eax
movl %eax, 0x14(%rsp)
jmp 0x137730
movq 0x18(%rsp), %rdi
callq 0x8420
xorl %eax, %eax
addq $0x38, %rsp
retq
nopw %cs:(%rax,%rax)