// File: /workspace/github_c_makefile_star2_O2/genometools[P]genometools/src/extended/match_iterator_last.c
// Function: last_prepare_fasta_seqs
static int last_prepare_fasta_seqs(const char *filename, GtEncseq *encseq,
                                   GtHashmap *desc_to_seqno,
                                   GT_UNUSED GtError *err)
{
  char *seq;
  const char *desc;
  int had_err = 0;
  GtFile *fp;
  GtStr *header = NULL;
  GtUword desclen;
  gt_assert(filename && encseq);
  gt_error_check(err);

  if (!(fp = gt_file_open(GT_FILE_MODE_UNCOMPRESSED, filename, "w", err)))
    had_err = -1;
  header = gt_str_new();
  if (!had_err) {
    GtUword i, length, startpos, endpos;
    for (i = 0; i < gt_encseq_num_of_sequences(encseq); i++) {
      char *desccpy;
      desc = gt_encseq_description(encseq, &desclen, i);
      desccpy = gt_calloc(desclen+1, sizeof (char));
      strncpy(desccpy, desc, desclen);
      startpos = gt_encseq_seqstartpos(encseq, i);
      length = gt_encseq_seqlength(encseq, i);
      gt_hashmap_add(desc_to_seqno, desccpy, (void*) i);
      endpos = startpos + length - 1;
      seq = gt_malloc(sizeof (char) * length);
      gt_str_reset(header);
      gt_str_append_cstr_nt(header, desc, desclen);
      gt_encseq_extract_decoded(encseq, seq, startpos, endpos);
      gt_fasta_show_entry(gt_str_get(header), seq, length, 80, fp);
      gt_free(seq);
    }
    gt_file_delete(fp);
  }
  gt_str_delete(header);

  return had_err;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x38, %rsp
movq %rdx, 0x28(%rsp)
testq %rdi, %rdi
je 0xfe42e
testq %rsi, %rsi
je 0xfe42e
movq %rcx, %rbx
movq %rdi, %r15
movq %rsi, 0x8(%rsp)
testq %rcx, %rcx
je 0xfe2b1
movq %rbx, %rdi
callq 0x89eb7
testb %al, %al
jne 0xfe45c
leaq 0x235656(%rip), %rdx    # 0x33390e
xorl %ebp, %ebp
xorl %edi, %edi
movq %r15, %rsi
movq %rbx, %rcx
callq 0x8cea6
movq %rax, %rbx
callq 0xacb84
movq %rax, 0x20(%rsp)
testq %rbx, %rbx
je 0xfe40d
movq %rbx, 0x18(%rsp)
xorl %r13d, %r13d
movq 0x8(%rsp), %rbx
movq %rbx, %rdi
callq 0x705a1
cmpq %rax, %r13
jae 0xfe3fe
movq %rbx, %rdi
leaq 0x10(%rsp), %rsi
movq %r13, %rdx
callq 0x75b24
movq %rax, %rbx
movq 0x10(%rsp), %rdi
incq %rdi
pushq $0x1
popq %rsi
leaq 0x2291fe(%rip), %r14    # 0x32751e
movq %r14, %rdx
movl $0xbb, %ecx
callq 0x9334a
movq %rax, %r12
movq 0x10(%rsp), %rdx
movq %rax, %rdi
movq %rbx, %rsi
callq 0x17350
movq 0x8(%rsp), %rdi
movq %r13, %rsi
callq 0x74d9c
movq %rax, %rbp
movq 0x8(%rsp), %rdi
movq %r13, %rsi
callq 0x75173
movq %rax, %r15
movq 0x28(%rsp), %rdi
movq %r12, %rsi
movq %r13, %rdx
callq 0x8f4bd
leaq (%r15,%rbp), %rax
decq %rax
movq %rax, 0x30(%rsp)
movq %r15, %rdi
movq %r14, %rsi
movl $0xc1, %edx
callq 0x93160
movq %rax, %r12
movq 0x20(%rsp), %r14
movq %r14, %rdi
callq 0xad357
movq 0x10(%rsp), %rdx
movq %r14, %rdi
movq %rbx, %rsi
movq 0x8(%rsp), %rbx
callq 0xacd9e
movq %rbx, %rdi
movq %r12, %rsi
movq %rbp, %rdx
movq 0x30(%rsp), %rcx
callq 0x7239d
movq %r14, %rdi
callq 0xad1fa
movq %rax, %rdi
movq %r12, %rsi
movq %r15, %rdx
pushq $0x50
popq %rcx
movq 0x18(%rsp), %r8
callq 0x8c0bc
movq %r12, %rdi
leaq 0x229132(%rip), %rsi    # 0x32751e
movl $0xc6, %edx
callq 0x936f9
incq %r13
jmp 0xfe2ea
movq 0x18(%rsp), %rbx
movq %rbx, %rdi
callq 0x8da06
xorl %ebp, %ebp
cmpq $0x1, %rbx
sbbl %ebp, %ebp
movq 0x20(%rsp), %rdi
callq 0xae103
movl %ebp, %eax
addq $0x38, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movq 0x339b33(%rip), %rax    # 0x437f68
movq (%rax), %rdi
leaq 0x1e6bd4(%rip), %rsi    # 0x2e5013
leaq 0x2291a0(%rip), %rdx    # 0x3275e6
leaq 0x2291ac(%rip), %rcx    # 0x3275f9
leaq 0x2290ca(%rip), %r8     # 0x32751e
movl $0xb0, %r9d
jmp 0xfe488
movq 0x339b05(%rip), %rax    # 0x437f68
movq (%rax), %rdi
leaq 0x1e6ba6(%rip), %rsi    # 0x2e5013
leaq 0x1e6d4b(%rip), %rdx    # 0x2e51bf
leaq 0x22917e(%rip), %rcx    # 0x3275f9
leaq 0x22909c(%rip), %r8     # 0x32751e
movl $0xb1, %r9d
xorl %eax, %eax
callq 0x17a50
callq 0x17390