// File: /workspace/github_c_makefile_star2_O3/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 0xe6d44
cmpw $0x0, 0x32(%r12)
jne 0xe6d44
cmpw $0x0, 0x34(%r12)
jne 0xe6d44
cmpw $0x0, 0x36(%r12)
jne 0xe6d44
cmpw $0x0, 0x410(%rbx)
jne 0xe6d44
cmpw $0x0, 0x412(%rbx)
jne 0xe6d44
cmpw $0x0, 0x416(%rbx)
je 0xe7257
cmpw $0x0, 0x41e(%rbx)
jle 0xe6d65
leaq 0x47a67(%rip), %rdi     # 0x12e7bc
movq %rbx, %rsi
xorl %eax, %eax
callq 0x8030
movzwl 0xc(%r12), %eax
cmpw $0x1, %ax
jne 0xe6dca
movq 0x858(%rsp), %rcx
movq %r13, %rdi
movq %r12, %rsi
movq %rbp, %rdx
movq %rbx, %r8
callq 0xe7271
testl %eax, %eax
je 0xe6dca
addq $0x420, %rbx            # imm = 0x420
leaq 0x765a(%rip), %rsi      # 0xee3f0
leaq 0x47a3f(%rip), %rdx     # 0x12e7dc
leaq 0x10(%rsp), %r14
movq %r14, %rdi
movq %rbx, %rcx
xorl %eax, %eax
callq 0x30af0
leaq 0x727e(%rip), %rsi      # 0xee034
leaq 0x47a3e(%rip), %rdx     # 0x12e7fb
movq %rbx, %rdi
movl $0x8e, %ecx
jmp 0xe7234
movq %r15, 0x8(%rsp)
cmpw $0x1, 0x32(%r12)
jne 0xe6f7a
movq 0x850(%rsp), %r15
movq %r13, %rdi
movq %r12, %rsi
movq %r15, %rdx
movq %rbx, %rcx
xorl %r8d, %r8d
callq 0xe8812
testl %eax, %eax
je 0xe6e3e
addq $0x420, %rbx            # imm = 0x420
leaq 0x75e6(%rip), %rsi      # 0xee3f0
leaq 0x479f6(%rip), %rdx     # 0x12e807
leaq 0x10(%rsp), %r14
movq %r14, %rdi
movq %rbx, %rcx
xorl %eax, %eax
callq 0x30af0
leaq 0x720a(%rip), %rsi      # 0xee034
leaq 0x479ca(%rip), %rdx     # 0x12e7fb
movq %rbx, %rdi
movl $0x97, %ecx
jmp 0xe7234
cmpl $0x0, (%r15)
je 0xe6eb0
movl $0x1, %ebp
movq %r13, %rdi
movq %r12, %rsi
movq %r15, %rdx
movq %rbx, %rcx
movl $0x1, %r8d
callq 0xe8812
testl %eax, %eax
je 0xe6eb0
addq $0x420, %rbx            # imm = 0x420
leaq 0x757e(%rip), %rsi      # 0xee3f0
leaq 0x479b3(%rip), %rdx     # 0x12e82c
leaq 0x10(%rsp), %r14
movq %r14, %rdi
movq %rbx, %rcx
xorl %eax, %eax
callq 0x30af0
leaq 0x71a2(%rip), %rsi      # 0xee034
leaq 0x47962(%rip), %rdx     # 0x12e7fb
movq %rbx, %rdi
movl $0x9d, %ecx
movq %r14, %r8
xorl %eax, %eax
callq 0x30af0
jmp 0xe7243
cmpw $0x1, 0x3a(%r15)
jne 0xe6f15
movq %r13, %rdi
movq %r12, %rsi
movq %r15, %rdx
movq %rbx, %rcx
movl $0x2, %r8d
callq 0xe8812
testl %eax, %eax
je 0xe6f15
addq $0x420, %rbx            # imm = 0x420
leaq 0x750f(%rip), %rsi      # 0xee3f0
leaq 0x4796c(%rip), %rdx     # 0x12e854
leaq 0x10(%rsp), %r14
movq %r14, %rdi
movq %rbx, %rcx
xorl %eax, %eax
callq 0x30af0
leaq 0x7133(%rip), %rsi      # 0xee034
leaq 0x478f3(%rip), %rdx     # 0x12e7fb
movq %rbx, %rdi
movl $0xa5, %ecx
jmp 0xe7234
cmpw $0x1, 0x38(%r15)
jne 0xe6f7a
movq %r13, %rdi
movq %r12, %rsi
movq %r15, %rdx
movq %rbx, %rcx
movl $0x3, %r8d
callq 0xe8812
testl %eax, %eax
je 0xe6f7a
addq $0x420, %rbx            # imm = 0x420
leaq 0x74aa(%rip), %rsi      # 0xee3f0
leaq 0x47938(%rip), %rdx     # 0x12e885
leaq 0x10(%rsp), %r14
movq %r14, %rdi
movq %rbx, %rcx
xorl %eax, %eax
callq 0x30af0
leaq 0x70ce(%rip), %rsi      # 0xee034
leaq 0x4788e(%rip), %rdx     # 0x12e7fb
movq %rbx, %rdi
movl $0xac, %ecx
jmp 0xe7234
cmpw $0x1, 0x34(%r12)
je 0xe6f8c
cmpw $0x1, 0x36(%r12)
jne 0xe6fe0
movq %r13, %rdi
movq %r12, %rsi
movq %rbx, %rdx
callq 0xe9f36
testl %eax, %eax
je 0xe6fe0
addq $0x420, %rbx            # imm = 0x420
leaq 0x7444(%rip), %rsi      # 0xee3f0
leaq 0x47902(%rip), %rdx     # 0x12e8b5
leaq 0x10(%rsp), %r14
movq %r14, %rdi
movq %rbx, %rcx
xorl %eax, %eax
callq 0x30af0
leaq 0x7068(%rip), %rsi      # 0xee034
leaq 0x47828(%rip), %rdx     # 0x12e7fb
movq %rbx, %rdi
movl $0xb6, %ecx
jmp 0xe7234
cmpw $0x1, 0x410(%rbx)
jne 0xe703b
movq %r13, %rdi
movq %rbx, %rsi
callq 0xea782
testl %eax, %eax
je 0xe703b
addq $0x420, %rbx            # imm = 0x420
leaq 0x73e9(%rip), %rsi      # 0xee3f0
leaq 0x478be(%rip), %rdx     # 0x12e8cc
leaq 0x10(%rsp), %r14
movq %r14, %rdi
movq %rbx, %rcx
xorl %eax, %eax
callq 0x30af0
leaq 0x700d(%rip), %rsi      # 0xee034
leaq 0x477cd(%rip), %rdx     # 0x12e7fb
movq %rbx, %rdi
movl $0xc0, %ecx
jmp 0xe7234
cmpw $0x1, 0x412(%rbx)
jne 0xe7099
movq %r13, %rdi
movq %r14, %rsi
movq %rbx, %rdx
callq 0xeaa9e
testl %eax, %eax
je 0xe7099
addq $0x420, %rbx            # imm = 0x420
leaq 0x738b(%rip), %rsi      # 0xee3f0
leaq 0x4787b(%rip), %rdx     # 0x12e8e7
leaq 0x10(%rsp), %r14
movq %r14, %rdi
movq %rbx, %rcx
xorl %eax, %eax
callq 0x30af0
leaq 0x6faf(%rip), %rsi      # 0xee034
leaq 0x4776f(%rip), %rdx     # 0x12e7fb
movq %rbx, %rdi
movl $0xca, %ecx
jmp 0xe7234
cmpw $0x1, 0x414(%rbx)
jne 0xe70fc
cmpw $0x0, (%r12)
je 0xe70fc
movq %r12, %rsi
movq %rbx, %rdx
callq 0xeaf00
testl %eax, %eax
je 0xe70fc
addq $0x420, %rbx            # imm = 0x420
leaq 0x7328(%rip), %rsi      # 0xee3f0
leaq 0x4783b(%rip), %rdx     # 0x12e90a
leaq 0x10(%rsp), %r14
movq %r14, %rdi
movq %rbx, %rcx
xorl %eax, %eax
callq 0x30af0
leaq 0x6f4c(%rip), %rsi      # 0xee034
leaq 0x4770c(%rip), %rdx     # 0x12e7fb
movq %rbx, %rdi
movl $0xd4, %ecx
jmp 0xe7234
cmpw $0x1, 0x416(%rbx)
jne 0xe7164
cmpw $0x0, (%r12)
je 0xe7164
movq %r12, %rdi
movq 0x8(%rsp), %rsi
movq %rbx, %rdx
callq 0xeb33e
testl %eax, %eax
je 0xe7164
addq $0x420, %rbx            # imm = 0x420
leaq 0x72c0(%rip), %rsi      # 0xee3f0
leaq 0x477f5(%rip), %rdx     # 0x12e92c
leaq 0x10(%rsp), %r14
movq %r14, %rdi
movq %rbx, %rcx
xorl %eax, %eax
callq 0x30af0
leaq 0x6ee4(%rip), %rsi      # 0xee034
leaq 0x476a4(%rip), %rdx     # 0x12e7fb
movq %rbx, %rdi
movl $0xde, %ecx
jmp 0xe7234
movq 0x860(%rsp), %r15
cmpw $0x1, 0x418(%rbx)
je 0xe7180
cmpw $0x1, 0x41a(%rbx)
jne 0xe71dc
addq $0xc0, %r14
leaq 0xcf0(%r15), %rsi
movq %r14, %rdi
movq %rbx, %rdx
callq 0xeb5b7
testl %eax, %eax
je 0xe71dc
addq $0x420, %rbx            # imm = 0x420
leaq 0x7245(%rip), %rsi      # 0xee3f0
leaq 0x47799(%rip), %rdx     # 0x12e94b
leaq 0x10(%rsp), %r14
movq %r14, %rdi
movq %rbx, %rcx
xorl %eax, %eax
callq 0x30af0
leaq 0x6e69(%rip), %rsi      # 0xee034
leaq 0x47629(%rip), %rdx     # 0x12e7fb
movq %rbx, %rdi
movl $0xe8, %ecx
jmp 0xe7234
xorl %ebp, %ebp
cmpw $0x1, 0x41c(%rbx)
jne 0xe7243
movq %r15, %rdi
movq %rbx, %rsi
callq 0xebab9
testl %eax, %eax
je 0xe7243
addq $0x420, %rbx            # imm = 0x420
leaq 0x71eb(%rip), %rsi      # 0xee3f0
leaq 0x47769(%rip), %rdx     # 0x12e975
leaq 0x10(%rsp), %r14
movq %r14, %rdi
movq %rbx, %rcx
xorl %eax, %eax
callq 0x30af0
leaq 0x6e0f(%rip), %rsi      # 0xee034
leaq 0x475cf(%rip), %rdx     # 0x12e7fb
movq %rbx, %rdi
movl $0xf1, %ecx
movq %r14, %r8
xorl %eax, %eax
callq 0x30af0
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 0xe7243
leaq 0x49a2b(%rip), %rdi     # 0x130c95
callq 0x8510
jmp 0xe7243