// File: /workspace/github_c_makefile_star2_O2/PoulinV[P]AxiCLASS/build/../source/output.c
// Function: output_init
int output_init(
                struct background * pba,
                struct thermodynamics * pth,
                struct perturbations * ppt,
                struct primordial * ppm,
                struct transfer * ptr,
                struct harmonic * phr,
                struct fourier * pfo,
                struct lensing * ple,
                struct distortions * psd,
                struct output * pop
                ) {

  /** Summary: */

  /** - check that we really want to output at least one file */

  if ((ppt->has_cls == _FALSE_) && (ppt->has_pk_matter == _FALSE_) && (ppt->has_density_transfers == _FALSE_) && (ppt->has_velocity_transfers == _FALSE_) && (pop->write_background == _FALSE_) && (pop->write_thermodynamics == _FALSE_) && (pop->write_primordial == _FALSE_)) {
    if (pop->output_verbose > 0)
      printf("No output files requested. Output module skipped.\n");
    return _SUCCESS_;
  }
  else {
    if (pop->output_verbose > 0)
      printf("Writing output files in %s... \n",pop->root);
  }

  /** - deal with all anisotropy power spectra \f$ C_l\f$'s */

  if (ppt->has_cls == _TRUE_) {

    class_call(output_cl(pba,ppt,phr,ple,pop),
               pop->error_message,
               pop->error_message);
  }

  /** - deal with all Fourier matter power spectra P(k)'s */

  if (ppt->has_pk_matter == _TRUE_) {

    class_call(output_pk(pba,ppt,pfo,pop,pk_linear),
               pop->error_message,
               pop->error_message);

    if (pfo->method != nl_none) {

      class_call(output_pk(pba,ppt,pfo,pop,pk_nonlinear),
                 pop->error_message,
                 pop->error_message);

    }

    if (pfo->has_pk_numerical_nowiggle == _TRUE_) {

      class_call(output_pk(pba,ppt,pfo,pop,pk_numerical_nowiggle),
                 pop->error_message,
                 pop->error_message);
    }

    if (pfo->has_pk_analytic_nowiggle == _TRUE_) {

      class_call(output_pk(pba,ppt,pfo,pop,pk_analytic_nowiggle),
                 pop->error_message,
                 pop->error_message);
    }
  }

  /** - deal with density and matter power spectra */

  if ((ppt->has_density_transfers == _TRUE_) || (ppt->has_velocity_transfers == _TRUE_)) {

    class_call(output_tk(pba,ppt,pop),
               pop->error_message,
               pop->error_message);

  }

  /** - deal with background quantities */

  if (pop->write_background == _TRUE_) {

    class_call(output_background(pba,pop),
               pop->error_message,
               pop->error_message);

  }

  /** - deal with thermodynamics quantities */

  if (pop->write_thermodynamics == _TRUE_) {

    class_call(output_thermodynamics(pba,pth,pop),
               pop->error_message,
               pop->error_message);

  }

  /** - deal with perturbation quantities */

  if (pop->write_perturbations == _TRUE_ && ppt->has_perturbations) {

    class_call(output_perturbations(pba,ppt,pop),
               pop->error_message,
               pop->error_message);

  }

  /** - deal with primordial spectra */

  if (pop->write_primordial == _TRUE_ && ppt->has_perturbations) {

    class_call(output_primordial(ppt,ppm,pop),
               pop->error_message,
               pop->error_message);

  }

  /** - deal with heating */

  if (pop->write_exotic_injection == _TRUE_ || pop->write_noninjection == _TRUE_) {

    class_call(output_heating(&(pth->in),&(psd->ni),pop),
               pop->error_message,
               pop->error_message);
  }

  /** - deal with spectral distortions */

  if (pop->write_distortions == _TRUE_) {

    class_call(output_distortions(psd,pop),
               pop->error_message,
               pop->error_message);
  }

  return _SUCCESS_;

}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x818, %rsp            # imm = 0x818
movq %r9, %rbp
movq %rcx, %r15
movq %rdx, %r12
movq %rsi, %r14
movq %rdi, %r13
movq 0x868(%rsp), %rbx
movzwl 0xc(%rdx), %eax
testw %ax, %ax
jne 0xde729
cmpw $0x0, 0x32(%r12)
jne 0xde729
cmpw $0x0, 0x34(%r12)
jne 0xde729
cmpw $0x0, 0x36(%r12)
jne 0xde729
cmpw $0x0, 0x410(%rbx)
jne 0xde729
cmpw $0x0, 0x412(%rbx)
jne 0xde729
cmpw $0x0, 0x416(%rbx)
je 0xdec31
cmpw $0x0, 0x41e(%rbx)
jle 0xde74a
leaq 0x46ef2(%rip), %rdi     # 0x12562c
movq %rbx, %rsi
xorl %eax, %eax
callq 0x8030
movzwl 0xc(%r12), %eax
cmpw $0x1, %ax
jne 0xde7af
movq 0x858(%rsp), %rcx
movq %r13, %rdi
movq %r12, %rsi
movq %rbp, %rdx
movq %rbx, %r8
callq 0xdec4b
testl %eax, %eax
je 0xde7af
addq $0x420, %rbx            # imm = 0x420
leaq 0x6c75(%rip), %rsi      # 0xe53f0
leaq 0x46eca(%rip), %rdx     # 0x12564c
leaq 0x10(%rsp), %r14
movq %r14, %rdi
movq %rbx, %rcx
xorl %eax, %eax
callq 0x2e014
leaq 0x6899(%rip), %rsi      # 0xe5034
leaq 0x46ec9(%rip), %rdx     # 0x12566b
movq %rbx, %rdi
movl $0x8e, %ecx
jmp 0xdec10
movq %r15, 0x8(%rsp)
cmpw $0x1, 0x32(%r12)
jne 0xde956
movq 0x850(%rsp), %r15
movq %r13, %rdi
movq %r12, %rsi
movq %r15, %rdx
movq %rbx, %rcx
xorl %r8d, %r8d
callq 0xe0174
testl %eax, %eax
je 0xde823
addq $0x420, %rbx            # imm = 0x420
leaq 0x6c01(%rip), %rsi      # 0xe53f0
leaq 0x46e81(%rip), %rdx     # 0x125677
leaq 0x10(%rsp), %r14
movq %r14, %rdi
movq %rbx, %rcx
xorl %eax, %eax
callq 0x2e014
leaq 0x6825(%rip), %rsi      # 0xe5034
leaq 0x46e55(%rip), %rdx     # 0x12566b
movq %rbx, %rdi
movl $0x97, %ecx
jmp 0xdec10
cmpl $0x0, (%r15)
je 0xde890
pushq $0x1
popq %rbp
movq %r13, %rdi
movq %r12, %rsi
movq %r15, %rdx
movq %rbx, %rcx
movl %ebp, %r8d
callq 0xe0174
testl %eax, %eax
je 0xde890
addq $0x420, %rbx            # imm = 0x420
leaq 0x6b9e(%rip), %rsi      # 0xe53f0
leaq 0x46e43(%rip), %rdx     # 0x12569c
leaq 0x10(%rsp), %r14
movq %r14, %rdi
movq %rbx, %rcx
xorl %eax, %eax
callq 0x2e014
leaq 0x67c2(%rip), %rsi      # 0xe5034
leaq 0x46df2(%rip), %rdx     # 0x12566b
movq %rbx, %rdi
movl $0x9d, %ecx
movq %r14, %r8
xorl %eax, %eax
callq 0x2e014
jmp 0xdec1d
cmpw $0x1, 0x3a(%r15)
jne 0xde8f3
pushq $0x2
popq %r8
movq %r13, %rdi
movq %r12, %rsi
movq %r15, %rdx
movq %rbx, %rcx
callq 0xe0174
testl %eax, %eax
je 0xde8f3
addq $0x420, %rbx            # imm = 0x420
leaq 0x6b31(%rip), %rsi      # 0xe53f0
leaq 0x46dfe(%rip), %rdx     # 0x1256c4
leaq 0x10(%rsp), %r14
movq %r14, %rdi
movq %rbx, %rcx
xorl %eax, %eax
callq 0x2e014
leaq 0x6755(%rip), %rsi      # 0xe5034
leaq 0x46d85(%rip), %rdx     # 0x12566b
movq %rbx, %rdi
movl $0xa5, %ecx
jmp 0xdec10
cmpw $0x1, 0x38(%r15)
jne 0xde956
pushq $0x3
popq %r8
movq %r13, %rdi
movq %r12, %rsi
movq %r15, %rdx
movq %rbx, %rcx
callq 0xe0174
testl %eax, %eax
je 0xde956
addq $0x420, %rbx            # imm = 0x420
leaq 0x6ace(%rip), %rsi      # 0xe53f0
leaq 0x46dcc(%rip), %rdx     # 0x1256f5
leaq 0x10(%rsp), %r14
movq %r14, %rdi
movq %rbx, %rcx
xorl %eax, %eax
callq 0x2e014
leaq 0x66f2(%rip), %rsi      # 0xe5034
leaq 0x46d22(%rip), %rdx     # 0x12566b
movq %rbx, %rdi
movl $0xac, %ecx
jmp 0xdec10
cmpw $0x1, 0x34(%r12)
je 0xde968
cmpw $0x1, 0x36(%r12)
jne 0xde9bc
movq %r13, %rdi
movq %r12, %rsi
movq %rbx, %rdx
callq 0xe1865
testl %eax, %eax
je 0xde9bc
addq $0x420, %rbx            # imm = 0x420
leaq 0x6a68(%rip), %rsi      # 0xe53f0
leaq 0x46d96(%rip), %rdx     # 0x125725
leaq 0x10(%rsp), %r14
movq %r14, %rdi
movq %rbx, %rcx
xorl %eax, %eax
callq 0x2e014
leaq 0x668c(%rip), %rsi      # 0xe5034
leaq 0x46cbc(%rip), %rdx     # 0x12566b
movq %rbx, %rdi
movl $0xb6, %ecx
jmp 0xdec10
cmpw $0x1, 0x410(%rbx)
jne 0xdea17
movq %r13, %rdi
movq %rbx, %rsi
callq 0xe20a4
testl %eax, %eax
je 0xdea17
addq $0x420, %rbx            # imm = 0x420
leaq 0x6a0d(%rip), %rsi      # 0xe53f0
leaq 0x46d52(%rip), %rdx     # 0x12573c
leaq 0x10(%rsp), %r14
movq %r14, %rdi
movq %rbx, %rcx
xorl %eax, %eax
callq 0x2e014
leaq 0x6631(%rip), %rsi      # 0xe5034
leaq 0x46c61(%rip), %rdx     # 0x12566b
movq %rbx, %rdi
movl $0xc0, %ecx
jmp 0xdec10
cmpw $0x1, 0x412(%rbx)
jne 0xdea75
movq %r13, %rdi
movq %r14, %rsi
movq %rbx, %rdx
callq 0xe23a8
testl %eax, %eax
je 0xdea75
addq $0x420, %rbx            # imm = 0x420
leaq 0x69af(%rip), %rsi      # 0xe53f0
leaq 0x46d0f(%rip), %rdx     # 0x125757
leaq 0x10(%rsp), %r14
movq %r14, %rdi
movq %rbx, %rcx
xorl %eax, %eax
callq 0x2e014
leaq 0x65d3(%rip), %rsi      # 0xe5034
leaq 0x46c03(%rip), %rdx     # 0x12566b
movq %rbx, %rdi
movl $0xca, %ecx
jmp 0xdec10
cmpw $0x1, 0x414(%rbx)
jne 0xdead8
cmpw $0x0, (%r12)
je 0xdead8
movq %r12, %rsi
movq %rbx, %rdx
callq 0xe27c4
testl %eax, %eax
je 0xdead8
addq $0x420, %rbx            # imm = 0x420
leaq 0x694c(%rip), %rsi      # 0xe53f0
leaq 0x46ccf(%rip), %rdx     # 0x12577a
leaq 0x10(%rsp), %r14
movq %r14, %rdi
movq %rbx, %rcx
xorl %eax, %eax
callq 0x2e014
leaq 0x6570(%rip), %rsi      # 0xe5034
leaq 0x46ba0(%rip), %rdx     # 0x12566b
movq %rbx, %rdi
movl $0xd4, %ecx
jmp 0xdec10
cmpw $0x1, 0x416(%rbx)
jne 0xdeb40
cmpw $0x0, (%r12)
je 0xdeb40
movq %r12, %rdi
movq 0x8(%rsp), %rsi
movq %rbx, %rdx
callq 0xe2c02
testl %eax, %eax
je 0xdeb40
addq $0x420, %rbx            # imm = 0x420
leaq 0x68e4(%rip), %rsi      # 0xe53f0
leaq 0x46c89(%rip), %rdx     # 0x12579c
leaq 0x10(%rsp), %r14
movq %r14, %rdi
movq %rbx, %rcx
xorl %eax, %eax
callq 0x2e014
leaq 0x6508(%rip), %rsi      # 0xe5034
leaq 0x46b38(%rip), %rdx     # 0x12566b
movq %rbx, %rdi
movl $0xde, %ecx
jmp 0xdec10
movq 0x860(%rsp), %r15
cmpw $0x1, 0x418(%rbx)
je 0xdeb5c
cmpw $0x1, 0x41a(%rbx)
jne 0xdebb8
addq $0xc0, %r14
leaq 0xcf0(%r15), %rsi
movq %r14, %rdi
movq %rbx, %rdx
callq 0xe2e75
testl %eax, %eax
je 0xdebb8
addq $0x420, %rbx            # imm = 0x420
leaq 0x6869(%rip), %rsi      # 0xe53f0
leaq 0x46c2d(%rip), %rdx     # 0x1257bb
leaq 0x10(%rsp), %r14
movq %r14, %rdi
movq %rbx, %rcx
xorl %eax, %eax
callq 0x2e014
leaq 0x648d(%rip), %rsi      # 0xe5034
leaq 0x46abd(%rip), %rdx     # 0x12566b
movq %rbx, %rdi
movl $0xe8, %ecx
jmp 0xdec10
xorl %ebp, %ebp
cmpw $0x1, 0x41c(%rbx)
jne 0xdec1d
movq %r15, %rdi
movq %rbx, %rsi
callq 0xe336f
testl %eax, %eax
je 0xdec1d
addq $0x420, %rbx            # imm = 0x420
leaq 0x680f(%rip), %rsi      # 0xe53f0
leaq 0x46bfd(%rip), %rdx     # 0x1257e5
leaq 0x10(%rsp), %r14
movq %r14, %rdi
movq %rbx, %rcx
xorl %eax, %eax
callq 0x2e014
leaq 0x6433(%rip), %rsi      # 0xe5034
leaq 0x46a63(%rip), %rdx     # 0x12566b
movq %rbx, %rdi
movl $0xf1, %ecx
movq %r14, %r8
xorl %eax, %eax
callq 0x2e014
pushq $0x1
popq %rbp
movl %ebp, %eax
addq $0x818, %rsp            # imm = 0x818
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
xorl %ebp, %ebp
cmpw $0x0, 0x41e(%rbx)
jle 0xdec1d
leaq 0x48ec1(%rip), %rdi     # 0x127b05
callq 0x8540
jmp 0xdec1d