// File: /workspace/github_c_makefile_star2_O0/genometools[P]genometools/src/ltr/ltrdigest_file_out_stream.c
// Function: gt_ltrdigest_file_out_stream_write_metadata
int gt_ltrdigest_file_out_stream_write_metadata(GtLTRdigestFileOutStream *ls,
                                         int tests_to_run,
                                         const char *trnafilename,
                                         const char *gfffilename,
                                         GtRange ppt_len,
                                         GtRange ubox_len,
                                         unsigned int ppt_radius,
                                         GtRange alilen,
                                         unsigned int max_edist,
                                         GtRange offsetlen,
                                         GtRange trnaoffsetlen,
                                         unsigned int pbs_radius,
                                         GtStrArray *hmm_files,
                                         unsigned int chain_max_gap_length,
                                         double evalue_cutoff,
                                         GtError *err)
{
  int buflen = 1024;
  GtFile *metadata_file;
  char *buffer,
       fn[GT_MAXFILENAMELEN];

  (void) snprintf(fn, (size_t) (GT_MAXFILENAMELEN-1),
                  "%s_conditions.csv", ls->fileprefix);
  metadata_file = gt_file_open(GT_FILE_MODE_UNCOMPRESSED, fn, "w+", err);
  if (!metadata_file)
    return -1;

  buffer = gt_calloc((size_t) (buflen+1), sizeof (char));
  /* get working directory */
  while (getcwd(buffer, (size_t) buflen) == NULL) {
    buflen += 1024;
    buffer = gt_realloc(buffer, (buflen+1) * sizeof (char));
  }
  gt_assert(buffer && strlen(buffer) > 0);

  /* append working dir to relative paths if necessary */
  if (gfffilename == NULL) {
    gt_file_xprintf(metadata_file,
                       "GFF3 input used\t<stdin>\n");
  } else {
    if (gfffilename[0] != GT_PATH_SEPARATOR)
      gt_file_xprintf(metadata_file,
                         "GFF3 input used\t%s/%s\n", buffer, gfffilename);
    else
      gt_file_xprintf(metadata_file,
                         "GFF3 input used\t%s\n", gfffilename);
  }

  if (tests_to_run & GT_LTRDIGEST_RUN_PPT)
  {
    gt_file_xprintf(metadata_file,
                       "PPT length\t"GT_WU"-"GT_WU"nt\t8-30nt\n",
                       ppt_len.start,
                       ppt_len.end);
    gt_file_xprintf(metadata_file,
                       "U-box length\t"GT_WU"-"GT_WU"nt\t3-30nt\n",
                       ubox_len.start,
                       ubox_len.end);
    gt_file_xprintf(metadata_file,
                       "PPT search radius\t%u\t30\n", ppt_radius);
  }

  if (tests_to_run & GT_LTRDIGEST_RUN_PBS)
  {
    if (trnafilename[0] != GT_PATH_SEPARATOR)
      gt_file_xprintf(metadata_file,
                         "tRNA library for PBS detection\t%s/%s\n",
                         buffer, trnafilename);
    else
      gt_file_xprintf(metadata_file,
                         "tRNA library for PBS detection\t%s\n",
                         trnafilename);
    gt_file_xprintf(metadata_file,
                       "allowed PBS/tRNA alignment length"
                       " range\t"GT_WU"-"GT_WU"nt\t11-30nt\n",
                       alilen.start,
                       alilen.end);
    gt_file_xprintf(metadata_file,
                       "PBS/tRNA maximum unit edit distance\t%u\t1\n",
                       max_edist);
    gt_file_xprintf(metadata_file,
                       "allowed PBS offset from 5' LTR range"
                       "\t"GT_WU"-"GT_WU"nt\t0-5nt\n",
                       offsetlen.start,
                       offsetlen.end);
    gt_file_xprintf(metadata_file,
                       "allowed PBS offset from 3' tRNA end"
                       " range\t"GT_WU"-"GT_WU"nt\t0-5nt\n",
                       trnaoffsetlen.start,
                       trnaoffsetlen.end);
    gt_file_xprintf(metadata_file,
                       "PBS search radius\t%d\t30\n", pbs_radius);
  }

  if (tests_to_run & GT_LTRDIGEST_RUN_PDOM)
  {
    GtUword i;
    gt_file_xprintf(metadata_file,
                       "Protein domain models\t"GT_WU" (",
                       gt_str_array_size(hmm_files));
    for (i=0;i<gt_str_array_size(hmm_files);i++)
    {
      gt_file_xprintf(metadata_file, "%s", gt_str_array_get(hmm_files, i));
      if (i != gt_str_array_size(hmm_files)-1)
        gt_file_xprintf(metadata_file, ", ");
    }
    gt_file_xprintf(metadata_file, ")\n");
    gt_file_xprintf(metadata_file,
                       "pHMM e-value cutoff \t%g\t%g\n",
                       evalue_cutoff, 0.000001);
    gt_file_xprintf(metadata_file,
                       "maximal allowed gap length between fragments to chain"
                       " \t%u\t%u\n",
                       chain_max_gap_length, 50);
  }

  gt_file_xprintf(metadata_file, "\n");
  if (metadata_file != NULL)
    gt_file_delete(metadata_file);
  gt_free(buffer);
  return 0;
}

// Assembly:
subq $0x1a8, %rsp            # imm = 0x1A8
movq 0x218(%rsp), %rax
movl 0x210(%rsp), %eax
movq 0x208(%rsp), %rax
movl 0x200(%rsp), %eax
leaq 0x1f0(%rsp), %rax
movq %rax, 0x28(%rsp)
leaq 0x1e0(%rsp), %rax
movq %rax, 0x30(%rsp)
movl 0x1d8(%rsp), %eax
leaq 0x1c8(%rsp), %rax
movq %rax, 0x38(%rsp)
movl 0x1c0(%rsp), %eax
leaq 0x1b0(%rsp), %rax
movq %rax, 0x40(%rsp)
movq %r8, 0x190(%rsp)
movq %r9, 0x198(%rsp)
movq %rdi, 0x188(%rsp)
movl %esi, 0x184(%rsp)
movq %rdx, 0x178(%rsp)
movq %rcx, 0x170(%rsp)
movsd %xmm0, 0x168(%rsp)
movl $0x400, 0x164(%rsp) # imm = 0x400
leaq 0x50(%rsp), %rdi
movq 0x188(%rsp), %rax
movq 0x20(%rax), %rcx
movl $0xff, %esi
leaq 0x28dcc1(%rip), %rdx    # 0x592c18
movb $0x0, %al
callq 0x19b90
leaq 0x50(%rsp), %rsi
movq 0x218(%rsp), %rcx
xorl %edi, %edi
leaq 0x211730(%rip), %rdx    # 0x5166a4
callq 0xdd3f0
movq %rax, 0x158(%rsp)
cmpq $0x0, 0x158(%rsp)
jne 0x304f9c
movl $0xffffffff, 0x1a4(%rsp) # imm = 0xFFFFFFFF
jmp 0x305428
movl 0x164(%rsp), %eax
addl $0x1, %eax
movslq %eax, %rdi
movl $0x1, %esi
leaq 0x28db2c(%rip), %rdx    # 0x592ae1
movl $0x2c9, %ecx            # imm = 0x2C9
callq 0xe83c0
movq %rax, 0x150(%rsp)
movq 0x150(%rsp), %rdi
movslq 0x164(%rsp), %rsi
callq 0x19320
cmpq $0x0, %rax
jne 0x305029
movl 0x164(%rsp), %eax
addl $0x400, %eax            # imm = 0x400
movl %eax, 0x164(%rsp)
movq 0x150(%rsp), %rdi
movl 0x164(%rsp), %eax
addl $0x1, %eax
movslq %eax, %rsi
shlq $0x0, %rsi
leaq 0x28dacc(%rip), %rdx    # 0x592ae1
movl $0x2cd, %ecx            # imm = 0x2CD
callq 0xe8540
movq %rax, 0x150(%rsp)
jmp 0x304fc7
jmp 0x30502b
cmpq $0x0, 0x150(%rsp)
je 0x305049
movq 0x150(%rsp), %rdi
callq 0x192b0
cmpq $0x0, %rax
ja 0x305081
movq 0x336f50(%rip), %rax    # 0x63bfa0
movq (%rax), %rdi
leaq 0x210fb9(%rip), %rsi    # 0x516013
leaq 0x28dbc9(%rip), %rdx    # 0x592c2a
leaq 0x28dbdf(%rip), %rcx    # 0x592c47
leaq 0x28da72(%rip), %r8     # 0x592ae1
movl $0x2cf, %r9d            # imm = 0x2CF
movb $0x0, %al
callq 0x199f0
callq 0x19370
jmp 0x305083
cmpq $0x0, 0x170(%rsp)
jne 0x3050a6
movq 0x158(%rsp), %rdi
leaq 0x28dbd6(%rip), %rsi    # 0x592c73
movb $0x0, %al
callq 0xddca0
jmp 0x3050fe
movq 0x170(%rsp), %rax
movsbl (%rax), %eax
cmpl $0x2f, %eax
je 0x3050de
movq 0x158(%rsp), %rdi
movq 0x150(%rsp), %rdx
movq 0x170(%rsp), %rcx
leaq 0x28dbb7(%rip), %rsi    # 0x592c8c
movb $0x0, %al
callq 0xddca0
jmp 0x3050fc
movq 0x158(%rsp), %rdi
movq 0x170(%rsp), %rdx
leaq 0x28dbae(%rip), %rsi    # 0x592ca3
movb $0x0, %al
callq 0xddca0
jmp 0x3050fe
movl 0x184(%rsp), %eax
andl $0x1, %eax
cmpl $0x0, %eax
je 0x305172
movq 0x158(%rsp), %rdi
movq 0x190(%rsp), %rdx
movq 0x198(%rsp), %rcx
leaq 0x28db8b(%rip), %rsi    # 0x592cb7
movb $0x0, %al
callq 0xddca0
movq 0x40(%rsp), %rax
movq 0x158(%rsp), %rdi
movq (%rax), %rdx
movq 0x8(%rax), %rcx
leaq 0x28db86(%rip), %rsi    # 0x592cd4
movb $0x0, %al
callq 0xddca0
movq 0x158(%rsp), %rdi
movl 0x1c0(%rsp), %edx
leaq 0x28db88(%rip), %rsi    # 0x592cf3
movb $0x0, %al
callq 0xddca0
movl 0x184(%rsp), %eax
andl $0x2, %eax
cmpl $0x0, %eax
je 0x30527b
movq 0x178(%rsp), %rax
movsbl (%rax), %eax
cmpl $0x2f, %eax
je 0x3051bd
movq 0x158(%rsp), %rdi
movq 0x150(%rsp), %rdx
movq 0x178(%rsp), %rcx
leaq 0x28db58(%rip), %rsi    # 0x592d0c
movb $0x0, %al
callq 0xddca0
jmp 0x3051db
movq 0x158(%rsp), %rdi
movq 0x178(%rsp), %rdx
leaq 0x28db5e(%rip), %rsi    # 0x592d32
movb $0x0, %al
callq 0xddca0
movq 0x38(%rsp), %rax
movq 0x158(%rsp), %rdi
movq (%rax), %rdx
movq 0x8(%rax), %rcx
leaq 0x28db5f(%rip), %rsi    # 0x592d55
movb $0x0, %al
callq 0xddca0
movq 0x158(%rsp), %rdi
movl 0x1d8(%rsp), %edx
leaq 0x28db7d(%rip), %rsi    # 0x592d90
movb $0x0, %al
callq 0xddca0
movq 0x30(%rsp), %rax
movq 0x158(%rsp), %rdi
movq (%rax), %rdx
movq 0x8(%rax), %rcx
leaq 0x28db85(%rip), %rsi    # 0x592dba
movb $0x0, %al
callq 0xddca0
movq 0x28(%rsp), %rax
movq 0x158(%rsp), %rdi
movq (%rax), %rdx
movq 0x8(%rax), %rcx
leaq 0x28db99(%rip), %rsi    # 0x592df0
movb $0x0, %al
callq 0xddca0
movq 0x158(%rsp), %rdi
movl 0x200(%rsp), %edx
leaq 0x28dbb7(%rip), %rsi    # 0x592e2b
movb $0x0, %al
callq 0xddca0
movl 0x184(%rsp), %eax
andl $0x4, %eax
cmpl $0x0, %eax
je 0x3053d6
movq 0x158(%rsp), %rax
movq %rax, 0x20(%rsp)
movq 0x208(%rsp), %rdi
callq 0x11fcc0
movq 0x20(%rsp), %rdi
movq %rax, %rdx
leaq 0x28db8d(%rip), %rsi    # 0x592e44
movb $0x0, %al
callq 0xddca0
movq $0x0, 0x48(%rsp)
movq 0x48(%rsp), %rax
movq %rax, 0x18(%rsp)
movq 0x208(%rsp), %rdi
callq 0x11fcc0
movq %rax, %rcx
movq 0x18(%rsp), %rax
cmpq %rcx, %rax
jae 0x305377
movq 0x158(%rsp), %rax
movq %rax, 0x8(%rsp)
movq 0x208(%rsp), %rdi
movq 0x48(%rsp), %rsi
callq 0x11f8c0
movq 0x8(%rsp), %rdi
movq %rax, %rdx
leaq 0x296d04(%rip), %rsi    # 0x59c021
movb $0x0, %al
callq 0xddca0
movq 0x48(%rsp), %rax
movq %rax, 0x10(%rsp)
movq 0x208(%rsp), %rdi
callq 0x11fcc0
movq %rax, %rcx
movq 0x10(%rsp), %rax
subq $0x1, %rcx
cmpq %rcx, %rax
je 0x305362
movq 0x158(%rsp), %rdi
leaq 0x272a6e(%rip), %rsi    # 0x577dc9
movb $0x0, %al
callq 0xddca0
jmp 0x305364
movq 0x48(%rsp), %rax
addq $0x1, %rax
movq %rax, 0x48(%rsp)
jmp 0x3052c7
movq 0x158(%rsp), %rdi
leaq 0x2365a1(%rip), %rsi    # 0x53b927
movb $0x0, %al
callq 0xddca0
movq 0x158(%rsp), %rdi
movsd 0x168(%rsp), %xmm0
leaq 0x28dabb(%rip), %rsi    # 0x592e60
movsd 0x22935b(%rip), %xmm1   # 0x52e708
movb $0x2, %al
callq 0xddca0
movq 0x158(%rsp), %rdi
movl 0x210(%rsp), %edx
leaq 0x28dab2(%rip), %rsi    # 0x592e7c
movl $0x32, %ecx
movb $0x0, %al
callq 0xddca0
movq 0x158(%rsp), %rdi
leaq 0x28de8e(%rip), %rsi    # 0x593273
movb $0x0, %al
callq 0xddca0
cmpq $0x0, 0x158(%rsp)
je 0x305404
movq 0x158(%rsp), %rdi
callq 0xde430
movq 0x150(%rsp), %rdi
leaq 0x28d6ce(%rip), %rsi    # 0x592ae1
movl $0x325, %edx            # imm = 0x325
callq 0xe88c0
movl $0x0, 0x1a4(%rsp)
movl 0x1a4(%rsp), %eax
addq $0x1a8, %rsp            # imm = 0x1A8
retq
nopw (%rax,%rax)