// File: /workspace/github_c_makefile_star2_O0/lesgourg[P]class_public/build/../source/perturbations.c
// Function: perturbations_free
int perturbations_free(
                       struct perturbations * ppt
                       ) {

  int index_md,index_ic,index_tp;
  int filenum;

  perturbations_free_input(ppt);

  if (ppt->has_perturbations == _TRUE_) {

    for (index_md = 0; index_md < ppt->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++) {

          free(ppt->sources[index_md][index_ic*ppt->tp_size[index_md]+index_tp]);
          if (ppt->ln_tau_size > 1)
            free(ppt->ddlate_sources[index_md][index_ic*ppt->tp_size[index_md]+index_tp]);

        }
      }

      free(ppt->sources[index_md]);
      free(ppt->late_sources[index_md]);
      free(ppt->ddlate_sources[index_md]);

      free(ppt->k[index_md]);

    }

    free(ppt->tau_sampling);
    if (ppt->ln_tau_size > 1)
      free(ppt->ln_tau);

    free(ppt->tp_size);

    free(ppt->ic_size);

    free(ppt->k);

    free(ppt->k_size_cmb);

    free(ppt->k_size_cl);

    free(ppt->k_size);

    free(ppt->sources);
    free(ppt->late_sources);
    free(ppt->ddlate_sources);

    /** Stuff related to perturbations output: */

    /** - Free non-NULL pointers */
    if (ppt->k_output_values_num > 0 )
      free(ppt->index_k_output_values);

    for (filenum = 0; filenum<_MAX_NUMBER_OF_K_FILES_; filenum++){
      if (ppt->scalar_perturbations_data[filenum] != NULL)
        free(ppt->scalar_perturbations_data[filenum]);
      if (ppt->vector_perturbations_data[filenum] != NULL)
        free(ppt->vector_perturbations_data[filenum]);
      if (ppt->tensor_perturbations_data[filenum] != NULL)
        free(ppt->tensor_perturbations_data[filenum]);
    }

  }

  ppt->is_allocated = _FALSE_;
  return _SUCCESS_;

}

// Assembly:
subq $0x18, %rsp
movq %rdi, 0x10(%rsp)
movq 0x10(%rsp), %rdi
callq 0xc0dc0
movq 0x10(%rsp), %rax
movswl (%rax), %eax
cmpl $0x1, %eax
jne 0xc114c
movl $0x0, 0xc(%rsp)
movl 0xc(%rsp), %eax
movq 0x10(%rsp), %rcx
cmpl 0x808(%rcx), %eax
jge 0xc0fc3
movl $0x0, 0x8(%rsp)
movl 0x8(%rsp), %eax
movq 0x10(%rsp), %rcx
movq 0x828(%rcx), %rcx
movslq 0xc(%rsp), %rdx
cmpl (%rcx,%rdx,4), %eax
jge 0xc0f4b
movl $0x0, 0x4(%rsp)
movl 0x4(%rsp), %eax
movq 0x10(%rsp), %rcx
movq 0x930(%rcx), %rcx
movslq 0xc(%rsp), %rdx
cmpl (%rcx,%rdx,4), %eax
jge 0xc0f39
movq 0x10(%rsp), %rax
movq 0x9b8(%rax), %rax
movslq 0xc(%rsp), %rcx
movq (%rax,%rcx,8), %rax
movl 0x8(%rsp), %ecx
movq 0x10(%rsp), %rdx
movq 0x930(%rdx), %rdx
movslq 0xc(%rsp), %rsi
imull (%rdx,%rsi,4), %ecx
addl 0x4(%rsp), %ecx
movslq %ecx, %rcx
movq (%rax,%rcx,8), %rdi
callq 0x8420
movq 0x10(%rsp), %rax
cmpl $0x1, 0x9c8(%rax)
jle 0xc0f27
movq 0x10(%rsp), %rax
movq 0x9d8(%rax), %rax
movslq 0xc(%rsp), %rcx
movq (%rax,%rcx,8), %rax
movl 0x8(%rsp), %ecx
movq 0x10(%rsp), %rdx
movq 0x930(%rdx), %rdx
movslq 0xc(%rsp), %rsi
imull (%rdx,%rsi,4), %ecx
addl 0x4(%rsp), %ecx
movslq %ecx, %rcx
movq (%rax,%rcx,8), %rdi
callq 0x8420
jmp 0xc0f29
movl 0x4(%rsp), %eax
addl $0x1, %eax
movl %eax, 0x4(%rsp)
jmp 0xc0e7f
jmp 0xc0f3b
movl 0x8(%rsp), %eax
addl $0x1, %eax
movl %eax, 0x8(%rsp)
jmp 0xc0e59
movq 0x10(%rsp), %rax
movq 0x9b8(%rax), %rax
movslq 0xc(%rsp), %rcx
movq (%rax,%rcx,8), %rdi
callq 0x8420
movq 0x10(%rsp), %rax
movq 0x9d0(%rax), %rax
movslq 0xc(%rsp), %rcx
movq (%rax,%rcx,8), %rdi
callq 0x8420
movq 0x10(%rsp), %rax
movq 0x9d8(%rax), %rax
movslq 0xc(%rsp), %rcx
movq (%rax,%rcx,8), %rdi
callq 0x8420
movq 0x10(%rsp), %rax
movq 0x958(%rax), %rax
movslq 0xc(%rsp), %rcx
movq (%rax,%rcx,8), %rdi
callq 0x8420
movl 0xc(%rsp), %eax
addl $0x1, %eax
movl %eax, 0xc(%rsp)
jmp 0xc0e3c
movq 0x10(%rsp), %rax
movq 0x970(%rax), %rdi
callq 0x8420
movq 0x10(%rsp), %rax
cmpl $0x1, 0x9c8(%rax)
jle 0xc0ff3
movq 0x10(%rsp), %rax
movq 0x9c0(%rax), %rdi
callq 0x8420
movq 0x10(%rsp), %rax
movq 0x930(%rax), %rdi
callq 0x8420
movq 0x10(%rsp), %rax
movq 0x828(%rax), %rdi
callq 0x8420
movq 0x10(%rsp), %rax
movq 0x958(%rax), %rdi
callq 0x8420
movq 0x10(%rsp), %rax
movq 0x938(%rax), %rdi
callq 0x8420
movq 0x10(%rsp), %rax
movq 0x940(%rax), %rdi
callq 0x8420
movq 0x10(%rsp), %rax
movq 0x950(%rax), %rdi
callq 0x8420
movq 0x10(%rsp), %rax
movq 0x9b8(%rax), %rdi
callq 0x8420
movq 0x10(%rsp), %rax
movq 0x9d0(%rax), %rdi
callq 0x8420
movq 0x10(%rsp), %rax
movq 0x9d8(%rax), %rdi
callq 0x8420
movq 0x10(%rsp), %rax
cmpl $0x0, 0x6cc(%rax)
jle 0xc10ab
movq 0x10(%rsp), %rax
movq 0x9e0(%rax), %rdi
callq 0x8420
movl $0x0, (%rsp)
cmpl $0x1e, (%rsp)
jge 0xc114a
movq 0x10(%rsp), %rax
movslq (%rsp), %rcx
cmpq $0x0, 0x67b8(%rax,%rcx,8)
je 0xc10e6
movq 0x10(%rsp), %rax
movslq (%rsp), %rcx
movq 0x67b8(%rax,%rcx,8), %rdi
callq 0x8420
movq 0x10(%rsp), %rax
movslq (%rsp), %rcx
cmpq $0x0, 0x68a8(%rax,%rcx,8)
je 0xc1110
movq 0x10(%rsp), %rax
movslq (%rsp), %rcx
movq 0x68a8(%rax,%rcx,8), %rdi
callq 0x8420
movq 0x10(%rsp), %rax
movslq (%rsp), %rcx
cmpq $0x0, 0x6998(%rax,%rcx,8)
je 0xc113a
movq 0x10(%rsp), %rax
movslq (%rsp), %rcx
movq 0x6998(%rax,%rcx,8), %rdi
callq 0x8420
jmp 0xc113c
movl (%rsp), %eax
addl $0x1, %eax
movl %eax, (%rsp)
jmp 0xc10b2
jmp 0xc114c
movq 0x10(%rsp), %rax
movw $0x0, 0x73f2(%rax)
xorl %eax, %eax
addq $0x18, %rsp
retq
nopw %cs:(%rax,%rax)