// File: /workspace/github_c_makefile_star2_O0/PoulinV[P]AxiCLASS/build/../source/output.c
// Function: output_open_pk_file
int output_open_pk_file(
                        struct background * pba,
                        struct fourier * pfo,
                        struct output * pop,
                        FILE * * pkfile,
                        FileName filename,
                        char * first_line,
                        double z
                        ) {

  int colnum = 1;
  class_open(*pkfile,filename,"w",pop->error_message);

  if (pop->write_header == _TRUE_) {
    fprintf(*pkfile,"# Matter power spectrum P(k) %sat redshift z=%g\n",first_line,z);
    fprintf(*pkfile,"# for k=%g to %g h/Mpc,\n",
            exp(pfo->ln_k[0])/pba->h,
            exp(pfo->ln_k[pfo->k_size-1])/pba->h);
    fprintf(*pkfile,"# number of wavenumbers equal to %d\n",pfo->k_size);

    fprintf(*pkfile,"#");
    class_fprintf_columntitle(*pkfile,"k (h/Mpc)",_TRUE_,colnum);
    class_fprintf_columntitle(*pkfile,"P (Mpc/h)^3",_TRUE_,colnum);

    fprintf(*pkfile,"\n");
  }

  return _SUCCESS_;
}

// Assembly:
subq $0x868, %rsp            # imm = 0x868
movq %rdi, 0x858(%rsp)
movq %rsi, 0x850(%rsp)
movq %rdx, 0x848(%rsp)
movq %rcx, 0x840(%rsp)
movq %r8, 0x838(%rsp)
movq %r9, 0x830(%rsp)
movsd %xmm0, 0x828(%rsp)
movl $0x1, 0x824(%rsp)
movq 0x838(%rsp), %rdi
leaq 0x42ef(%rip), %rsi      # 0x1d5429
callq 0x8410
movq %rax, %rcx
movq 0x840(%rsp), %rax
movq %rcx, (%rax)
movq 0x840(%rsp), %rax
cmpq $0x0, (%rax)
jne 0x1d11c2
leaq 0x20(%rsp), %rdi
movq 0x838(%rsp), %rcx
leaq 0x3861(%rip), %rsi      # 0x1d49d0
leaq 0x4433b(%rip), %rdx     # 0x2154b1
leaq 0x1d3cb(%rip), %r8      # 0x1ee548
movb $0x0, %al
callq 0x5b9c0
movq 0x848(%rsp), %rdi
addq $0x420, %rdi            # imm = 0x420
leaq 0x20(%rsp), %r8
leaq 0xe95(%rip), %rsi       # 0x1d2034
leaq 0x44313(%rip), %rdx     # 0x2154b9
movl $0x754, %ecx            # imm = 0x754
movb $0x0, %al
callq 0x5b9c0
movl $0x1, 0x864(%rsp)
jmp 0x1d1389
movq 0x848(%rsp), %rax
movswl 0x408(%rax), %eax
cmpl $0x1, %eax
jne 0x1d137e
movq 0x840(%rsp), %rax
movq (%rax), %rdi
movq 0x830(%rsp), %rdx
movsd 0x828(%rsp), %xmm0
leaq 0x442d0(%rip), %rsi     # 0x2154cd
movb $0x1, %al
callq 0x84e0
movq 0x840(%rsp), %rax
movq (%rax), %rax
movq %rax, 0x10(%rsp)
movq 0x850(%rsp), %rax
movq 0x80(%rax), %rax
movsd (%rax), %xmm0
callq 0x8670
movq 0x858(%rsp), %rax
divsd 0x8(%rax), %xmm0
movsd %xmm0, 0x18(%rsp)
movq 0x850(%rsp), %rax
movq 0x80(%rax), %rax
movq 0x850(%rsp), %rcx
movl 0x6c(%rcx), %ecx
subl $0x1, %ecx
movslq %ecx, %rcx
movsd (%rax,%rcx,8), %xmm0
callq 0x8670
movq 0x10(%rsp), %rdi
movaps %xmm0, %xmm1
movsd 0x18(%rsp), %xmm0
movq 0x858(%rsp), %rax
divsd 0x8(%rax), %xmm1
leaq 0x42eba(%rip), %rsi     # 0x214145
movb $0x2, %al
callq 0x84e0
movq 0x840(%rsp), %rax
movq (%rax), %rdi
movq 0x850(%rsp), %rax
movl 0x6c(%rax), %edx
leaq 0x42eaf(%rip), %rsi     # 0x21415e
movb $0x0, %al
callq 0x84e0
movq 0x840(%rsp), %rax
movq (%rax), %rdi
leaq 0x43188(%rip), %rsi     # 0x214450
movb $0x0, %al
callq 0x84e0
movq 0x840(%rsp), %rax
movq (%rax), %rdi
movl 0x824(%rsp), %r8d
movl %r8d, %eax
addl $0x1, %eax
movl %eax, 0x824(%rsp)
leaq 0x43e6c(%rip), %rsi     # 0x215162
movl $0x3, %edx
leaq 0x1fa3d(%rip), %rcx     # 0x1f0d3f
movl $0x12, %r9d
leaq 0x25c45(%rip), %rax     # 0x1f6f54
movq %rax, (%rsp)
movb $0x0, %al
callq 0x84e0
movq 0x840(%rsp), %rax
movq (%rax), %rdi
movl 0x824(%rsp), %r8d
movl %r8d, %eax
addl $0x1, %eax
movl %eax, 0x824(%rsp)
leaq 0x43e21(%rip), %rsi     # 0x215162
movl $0x3, %edx
leaq 0x1f9f2(%rip), %rcx     # 0x1f0d3f
movl $0x12, %r9d
leaq 0x441a4(%rip), %rax     # 0x2154fe
movq %rax, (%rsp)
movb $0x0, %al
callq 0x84e0
movq 0x840(%rsp), %rax
movq (%rax), %rdi
leaq 0x1eecd(%rip), %rsi     # 0x1f0244
movb $0x0, %al
callq 0x84e0
movl $0x0, 0x864(%rsp)
movl 0x864(%rsp), %eax
addq $0x868, %rsp            # imm = 0x868
retq
nopl (%rax,%rax)