// File: /workspace/github_c_makefile_star2_O1/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
cmpw $0x0, 0xc(%rdx)
jne 0xea166
cmpw $0x0, 0x32(%r12)
jne 0xea166
cmpw $0x0, 0x34(%r12)
jne 0xea166
cmpw $0x0, 0x36(%r12)
jne 0xea166
cmpw $0x0, 0x410(%rbx)
jne 0xea166
cmpw $0x0, 0x412(%rbx)
jne 0xea166
cmpw $0x0, 0x416(%rbx)
je 0xea676
cmpw $0x0, 0x41e(%rbx)
jle 0xea181
leaq 0x47615(%rip), %rdi     # 0x13178c
movq %rbx, %rsi
xorl %eax, %eax
callq 0x8030
cmpw $0x1, 0xc(%r12)
jne 0xea1e9
movq 0x858(%rsp), %rcx
movq %r13, %rdi
movq %r12, %rsi
movq %rbp, %rdx
movq %rbx, %r8
callq 0xea690
testl %eax, %eax
je 0xea1e9
addq $0x420, %rbx            # imm = 0x420
leaq 0x723b(%rip), %rsi      # 0xf13f0
leaq 0x475f0(%rip), %rdx     # 0x1317ac
leaq 0x10(%rsp), %r14
movq %r14, %rdi
movq %rbx, %rcx
xorl %eax, %eax
callq 0x30c2c
leaq 0x6e5f(%rip), %rsi      # 0xf1034
leaq 0x475ef(%rip), %rdx     # 0x1317cb
movq %rbx, %rdi
movl $0x8e, %ecx
jmp 0xea653
movq %r15, 0x8(%rsp)
cmpw $0x1, 0x32(%r12)
jne 0xea399
movq 0x850(%rsp), %r15
movq %r13, %rdi
movq %r12, %rsi
movq %r15, %rdx
movq %rbx, %rcx
xorl %r8d, %r8d
callq 0xebbd9
testl %eax, %eax
je 0xea25d
addq $0x420, %rbx            # imm = 0x420
leaq 0x71c7(%rip), %rsi      # 0xf13f0
leaq 0x475a7(%rip), %rdx     # 0x1317d7
leaq 0x10(%rsp), %r14
movq %r14, %rdi
movq %rbx, %rcx
xorl %eax, %eax
callq 0x30c2c
leaq 0x6deb(%rip), %rsi      # 0xf1034
leaq 0x4757b(%rip), %rdx     # 0x1317cb
movq %rbx, %rdi
movl $0x97, %ecx
jmp 0xea653
cmpl $0x0, (%r15)
je 0xea2cf
movl $0x1, %ebp
movq %r13, %rdi
movq %r12, %rsi
movq %r15, %rdx
movq %rbx, %rcx
movl $0x1, %r8d
callq 0xebbd9
testl %eax, %eax
je 0xea2cf
addq $0x420, %rbx            # imm = 0x420
leaq 0x715f(%rip), %rsi      # 0xf13f0
leaq 0x47564(%rip), %rdx     # 0x1317fc
leaq 0x10(%rsp), %r14
movq %r14, %rdi
movq %rbx, %rcx
xorl %eax, %eax
callq 0x30c2c
leaq 0x6d83(%rip), %rsi      # 0xf1034
leaq 0x47513(%rip), %rdx     # 0x1317cb
movq %rbx, %rdi
movl $0x9d, %ecx
movq %r14, %r8
xorl %eax, %eax
callq 0x30c2c
jmp 0xea662
cmpw $0x1, 0x3a(%r15)
jne 0xea334
movq %r13, %rdi
movq %r12, %rsi
movq %r15, %rdx
movq %rbx, %rcx
movl $0x2, %r8d
callq 0xebbd9
testl %eax, %eax
je 0xea334
addq $0x420, %rbx            # imm = 0x420
leaq 0x70f0(%rip), %rsi      # 0xf13f0
leaq 0x4751d(%rip), %rdx     # 0x131824
leaq 0x10(%rsp), %r14
movq %r14, %rdi
movq %rbx, %rcx
xorl %eax, %eax
callq 0x30c2c
leaq 0x6d14(%rip), %rsi      # 0xf1034
leaq 0x474a4(%rip), %rdx     # 0x1317cb
movq %rbx, %rdi
movl $0xa5, %ecx
jmp 0xea653
cmpw $0x1, 0x38(%r15)
jne 0xea399
movq %r13, %rdi
movq %r12, %rsi
movq %r15, %rdx
movq %rbx, %rcx
movl $0x3, %r8d
callq 0xebbd9
testl %eax, %eax
je 0xea399
addq $0x420, %rbx            # imm = 0x420
leaq 0x708b(%rip), %rsi      # 0xf13f0
leaq 0x474e9(%rip), %rdx     # 0x131855
leaq 0x10(%rsp), %r14
movq %r14, %rdi
movq %rbx, %rcx
xorl %eax, %eax
callq 0x30c2c
leaq 0x6caf(%rip), %rsi      # 0xf1034
leaq 0x4743f(%rip), %rdx     # 0x1317cb
movq %rbx, %rdi
movl $0xac, %ecx
jmp 0xea653
cmpw $0x1, 0x34(%r12)
je 0xea3ab
cmpw $0x1, 0x36(%r12)
jne 0xea3ff
movq %r13, %rdi
movq %r12, %rsi
movq %rbx, %rdx
callq 0xed2f2
testl %eax, %eax
je 0xea3ff
addq $0x420, %rbx            # imm = 0x420
leaq 0x7025(%rip), %rsi      # 0xf13f0
leaq 0x474b3(%rip), %rdx     # 0x131885
leaq 0x10(%rsp), %r14
movq %r14, %rdi
movq %rbx, %rcx
xorl %eax, %eax
callq 0x30c2c
leaq 0x6c49(%rip), %rsi      # 0xf1034
leaq 0x473d9(%rip), %rdx     # 0x1317cb
movq %rbx, %rdi
movl $0xb6, %ecx
jmp 0xea653
cmpw $0x1, 0x410(%rbx)
jne 0xea45a
movq %r13, %rdi
movq %rbx, %rsi
callq 0xedb39
testl %eax, %eax
je 0xea45a
addq $0x420, %rbx            # imm = 0x420
leaq 0x6fca(%rip), %rsi      # 0xf13f0
leaq 0x4746f(%rip), %rdx     # 0x13189c
leaq 0x10(%rsp), %r14
movq %r14, %rdi
movq %rbx, %rcx
xorl %eax, %eax
callq 0x30c2c
leaq 0x6bee(%rip), %rsi      # 0xf1034
leaq 0x4737e(%rip), %rdx     # 0x1317cb
movq %rbx, %rdi
movl $0xc0, %ecx
jmp 0xea653
cmpw $0x1, 0x412(%rbx)
jne 0xea4b8
movq %r13, %rdi
movq %r14, %rsi
movq %rbx, %rdx
callq 0xede55
testl %eax, %eax
je 0xea4b8
addq $0x420, %rbx            # imm = 0x420
leaq 0x6f6c(%rip), %rsi      # 0xf13f0
leaq 0x4742c(%rip), %rdx     # 0x1318b7
leaq 0x10(%rsp), %r14
movq %r14, %rdi
movq %rbx, %rcx
xorl %eax, %eax
callq 0x30c2c
leaq 0x6b90(%rip), %rsi      # 0xf1034
leaq 0x47320(%rip), %rdx     # 0x1317cb
movq %rbx, %rdi
movl $0xca, %ecx
jmp 0xea653
cmpw $0x1, 0x414(%rbx)
jne 0xea51b
cmpw $0x0, (%r12)
je 0xea51b
movq %r12, %rsi
movq %rbx, %rdx
callq 0xee2b7
testl %eax, %eax
je 0xea51b
addq $0x420, %rbx            # imm = 0x420
leaq 0x6f09(%rip), %rsi      # 0xf13f0
leaq 0x473ec(%rip), %rdx     # 0x1318da
leaq 0x10(%rsp), %r14
movq %r14, %rdi
movq %rbx, %rcx
xorl %eax, %eax
callq 0x30c2c
leaq 0x6b2d(%rip), %rsi      # 0xf1034
leaq 0x472bd(%rip), %rdx     # 0x1317cb
movq %rbx, %rdi
movl $0xd4, %ecx
jmp 0xea653
cmpw $0x1, 0x416(%rbx)
jne 0xea583
cmpw $0x0, (%r12)
je 0xea583
movq %r12, %rdi
movq 0x8(%rsp), %rsi
movq %rbx, %rdx
callq 0xee6f1
testl %eax, %eax
je 0xea583
addq $0x420, %rbx            # imm = 0x420
leaq 0x6ea1(%rip), %rsi      # 0xf13f0
leaq 0x473a6(%rip), %rdx     # 0x1318fc
leaq 0x10(%rsp), %r14
movq %r14, %rdi
movq %rbx, %rcx
xorl %eax, %eax
callq 0x30c2c
leaq 0x6ac5(%rip), %rsi      # 0xf1034
leaq 0x47255(%rip), %rdx     # 0x1317cb
movq %rbx, %rdi
movl $0xde, %ecx
jmp 0xea653
movq 0x860(%rsp), %r15
cmpw $0x1, 0x418(%rbx)
je 0xea59f
cmpw $0x1, 0x41a(%rbx)
jne 0xea5fb
addq $0xc0, %r14
leaq 0xcf0(%r15), %rsi
movq %r14, %rdi
movq %rbx, %rdx
callq 0xee96a
testl %eax, %eax
je 0xea5fb
addq $0x420, %rbx            # imm = 0x420
leaq 0x6e26(%rip), %rsi      # 0xf13f0
leaq 0x4734a(%rip), %rdx     # 0x13191b
leaq 0x10(%rsp), %r14
movq %r14, %rdi
movq %rbx, %rcx
xorl %eax, %eax
callq 0x30c2c
leaq 0x6a4a(%rip), %rsi      # 0xf1034
leaq 0x471da(%rip), %rdx     # 0x1317cb
movq %rbx, %rdi
movl $0xe8, %ecx
jmp 0xea653
xorl %ebp, %ebp
cmpw $0x1, 0x41c(%rbx)
jne 0xea662
movq %r15, %rdi
movq %rbx, %rsi
callq 0xeee6c
testl %eax, %eax
je 0xea662
addq $0x420, %rbx            # imm = 0x420
leaq 0x6dcc(%rip), %rsi      # 0xf13f0
leaq 0x4731a(%rip), %rdx     # 0x131945
leaq 0x10(%rsp), %r14
movq %r14, %rdi
movq %rbx, %rcx
xorl %eax, %eax
callq 0x30c2c
leaq 0x69f0(%rip), %rsi      # 0xf1034
leaq 0x47180(%rip), %rdx     # 0x1317cb
movq %rbx, %rdi
movl $0xf1, %ecx
movq %r14, %r8
xorl %eax, %eax
callq 0x30c2c
movl $0x1, %ebp
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 0xea662
leaq 0x495dc(%rip), %rdi     # 0x133c65
callq 0x8510
jmp 0xea662