// File: /workspace/github_c_makefile_star2_O1/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 0x44137(%rip), %r13     # 0x132860
leaq 0x44c66(%rip), %rbp     # 0x133396
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 0x9f701
cmpl $0x1, %eax
jne 0xee7bb
addq $0x32a, %r14            # imm = 0x32A
leaq 0x2c73(%rip), %rsi      # 0xf13f0
leaq 0x44c24(%rip), %rdx     # 0x1333a8
leaq 0x100(%rsp), %r15
movq %r15, %rdi
movq %r14, %rcx
xorl %eax, %eax
callq 0x30c2c
addq $0x420, %rbx            # imm = 0x420
leaq 0x288d(%rip), %rsi      # 0xf1034
leaq 0x44c23(%rip), %rdx     # 0x1333d1
movq %rbx, %rdi
movl $0x548, %ecx            # imm = 0x548
jmp 0xee852
leaq 0x900(%rsp), %rdi
callq 0x30d6e
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 0xee85a
movq %r15, %rdi
movq %r14, %rsi
movl %r13d, %edx
movq %rax, %r15
movq %rax, %rcx
callq 0x9f79d
cmpl $0x1, %eax
jne 0xee89e
addq $0x32a, %r14            # imm = 0x32A
leaq 0x2bd7(%rip), %rsi      # 0xf13f0
leaq 0x44bc3(%rip), %rdx     # 0x1333e3
leaq 0x100(%rsp), %r15
movq %r15, %rdi
movq %r14, %rcx
xorl %eax, %eax
callq 0x30c2c
addq $0x420, %rbx            # imm = 0x420
leaq 0x27f1(%rip), %rsi      # 0xf1034
leaq 0x44b87(%rip), %rdx     # 0x1333d1
movq %rbx, %rdi
movl $0x551, %ecx            # imm = 0x551
movq %r15, %r8
jmp 0xee94c
leaq 0x27a3(%rip), %rsi      # 0xf1004
leaq 0x3fae5(%rip), %rdx     # 0x12e34d
leaq 0x100(%rsp), %r14
movq %r14, %rdi
movl %ebp, %ecx
xorl %eax, %eax
callq 0x30c2c
addq $0x420, %rbx            # imm = 0x420
leaq 0x27aa(%rip), %rsi      # 0xf1034
leaq 0x44b40(%rip), %rdx     # 0x1333d1
movq %rbx, %rdi
movl $0x54b, %ecx            # imm = 0x54B
jmp 0xee949
leaq 0x5b6c(%rip), %rsi      # 0xf4411
movq %rsp, %rdi
callq 0x8400
testq %rax, %rax
je 0xee902
movq %rax, %r14
cmpw $0x1, 0x408(%rbx)
jne 0xee8d8
leaq 0x44b56(%rip), %rdi     # 0x13341c
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 0xf0579
movq %r15, %rdi
callq 0x8410
movq %r14, %rdi
callq 0x83a0
xorl %eax, %eax
jmp 0xee958
leaq 0x50cf(%rip), %rsi      # 0xf39d8
leaq 0x8866(%rip), %rdx      # 0xf7176
leaq 0x1eaed(%rip), %r8      # 0x10d404
leaq 0x100(%rsp), %r14
movq %rsp, %rcx
movq %r14, %rdi
xorl %eax, %eax
callq 0x30c2c
addq $0x420, %rbx            # imm = 0x420
leaq 0x26fa(%rip), %rsi      # 0xf1034
leaq 0x44a90(%rip), %rdx     # 0x1333d1
movq %rbx, %rdi
movl $0x553, %ecx            # imm = 0x553
movq %r14, %r8
xorl %eax, %eax
callq 0x30c2c
movl $0x1, %eax
addq $0x2848, %rsp           # imm = 0x2848
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq