// File: /workspace/github_c_makefile_star2_O3/PoulinV[P]AxiCLASS/build/../source/output.c
// Function: output_primordial
int output_primordial(
                      struct perturbations * ppt,
                      struct primordial * ppm,
                      struct output * pop
                      ) {
  FileName file_name;
  FILE * out;
  char titles[_MAXTITLESTRINGLENGTH_]={0};
  double * data;
  int size_data, number_of_titles;

  class_sprintf(file_name,"%s%s",pop->root,"primordial_Pk.dat");

  class_call(primordial_output_titles(ppt,ppm,titles),
             ppm->error_message,
             pop->error_message);
  number_of_titles = get_number_of_titles(titles);
  size_data = number_of_titles*ppm->lnk_size;
  class_alloc(data,sizeof(double)*size_data,pop->error_message);
  class_call(primordial_output_data(ppt,
                                    ppm,
                                    number_of_titles,
                                    data),
             ppm->error_message,
             pop->error_message);

  class_open(out,file_name,"w",pop->error_message);
  if (pop->write_header == _TRUE_) {
    fprintf(out,"# Dimensionless primordial spectrum, equal to [k^3/2pi^2] P(k) \n");
  }

  output_print_data(out,
                    titles,
                    data,
                    size_data);

  free(data);
  fclose(out);

  return _SUCCESS_;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x2848, %rsp           # imm = 0x2848
movq %rdx, %rbx
movq %rsi, %r14
movq %rdi, %r15
leaq 0x900(%rsp), %r12
movl $0x1f40, %edx           # imm = 0x1F40
movq %r12, %rdi
xorl %esi, %esi
callq 0x8200
leaq 0x4451a(%rip), %r13     # 0x12f890
leaq 0x45049(%rip), %rbp     # 0x1303c6
xorl %edi, %edi
xorl %esi, %esi
movq %r13, %rdx
movq %rbx, %rcx
movq %rbp, %r8
xorl %eax, %eax
callq 0x8550
incl %eax
movslq %eax, %rsi
movq %rsp, %rdi
movq %r13, %rdx
movq %rbx, %rcx
movq %rbp, %r8
xorl %eax, %eax
callq 0x8550
movq %r15, %rdi
movq %r14, %rsi
movq %r12, %rdx
callq 0x9c7dd
cmpl $0x1, %eax
jne 0xeb408
addq $0x32a, %r14            # imm = 0x32A
leaq 0x3026(%rip), %rsi      # 0xee3f0
leaq 0x45007(%rip), %rdx     # 0x1303d8
leaq 0x100(%rsp), %r15
movq %r15, %rdi
movq %r14, %rcx
xorl %eax, %eax
callq 0x30af0
addq $0x420, %rbx            # imm = 0x420
leaq 0x2c40(%rip), %rsi      # 0xee034
leaq 0x45006(%rip), %rdx     # 0x130401
movq %rbx, %rdi
movl $0x548, %ecx            # imm = 0x548
jmp 0xeb49f
leaq 0x900(%rsp), %rdi
callq 0x30c32
movl %eax, %r13d
movslq 0x290(%r14), %rax
movslq %r13d, %r12
imulq %rax, %r12
leaq (,%r12,8), %rbp
movq %rbp, %rdi
callq 0x8460
testq %rax, %rax
je 0xeb4a7
movq %r15, %rdi
movq %r14, %rsi
movl %r13d, %edx
movq %rax, %r15
movq %rax, %rcx
callq 0x9c879
cmpl $0x1, %eax
jne 0xeb4eb
addq $0x32a, %r14            # imm = 0x32A
leaq 0x2f8a(%rip), %rsi      # 0xee3f0
leaq 0x44fa6(%rip), %rdx     # 0x130413
leaq 0x100(%rsp), %r15
movq %r15, %rdi
movq %r14, %rcx
xorl %eax, %eax
callq 0x30af0
addq $0x420, %rbx            # imm = 0x420
leaq 0x2ba4(%rip), %rsi      # 0xee034
leaq 0x44f6a(%rip), %rdx     # 0x130401
movq %rbx, %rdi
movl $0x551, %ecx            # imm = 0x551
movq %r15, %r8
jmp 0xeb599
leaq 0x2b56(%rip), %rsi      # 0xee004
leaq 0x3fec8(%rip), %rdx     # 0x12b37d
leaq 0x100(%rsp), %r14
movq %r14, %rdi
movl %ebp, %ecx
xorl %eax, %eax
callq 0x30af0
addq $0x420, %rbx            # imm = 0x420
leaq 0x2b5d(%rip), %rsi      # 0xee034
leaq 0x44f23(%rip), %rdx     # 0x130401
movq %rbx, %rdi
movl $0x54b, %ecx            # imm = 0x54B
jmp 0xeb596
leaq 0x5f2f(%rip), %rsi      # 0xf1421
movq %rsp, %rdi
callq 0x8400
testq %rax, %rax
je 0xeb54f
movq %rax, %r14
cmpw $0x1, 0x408(%rbx)
jne 0xeb525
leaq 0x44f39(%rip), %rdi     # 0x13044c
movl $0x40, %esi
movl $0x1, %edx
movq %r14, %rcx
callq 0x86d0
leaq 0x900(%rsp), %rsi
movq %r14, %rdi
movq %r15, %rdx
movl %r12d, %ecx
callq 0xed1c2
movq %r15, %rdi
callq 0x8410
movq %r14, %rdi
callq 0x83a0
xorl %eax, %eax
jmp 0xeb5a5
leaq 0x5492(%rip), %rsi      # 0xf09e8
leaq 0x8c41(%rip), %rdx      # 0xf419e
leaq 0x1eec8(%rip), %r8      # 0x10a42c
leaq 0x100(%rsp), %r14
movq %rsp, %rcx
movq %r14, %rdi
xorl %eax, %eax
callq 0x30af0
addq $0x420, %rbx            # imm = 0x420
leaq 0x2aad(%rip), %rsi      # 0xee034
leaq 0x44e73(%rip), %rdx     # 0x130401
movq %rbx, %rdi
movl $0x553, %ecx            # imm = 0x553
movq %r14, %r8
xorl %eax, %eax
callq 0x30af0
movl $0x1, %eax
addq $0x2848, %rsp           # imm = 0x2848
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq