// File: /workspace/github_c_makefile_star2_O0/genometools[P]genometools/src/match/giextract.c
// Function: giextract_encodedseq2fasta
static int giextract_encodedseq2fasta(FILE *fpout,
                                      const GtEncseq *encseq,
                                      GtUword seqnum,
                                      const Fastakeyquery *fastakeyquery,
                                      GtUword linewidth,
                                      GT_UNUSED GtError *err)
{
  const char *desc;
  GtUword desclen;
  bool haserr = false;

  desc = gt_encseq_description(encseq, &desclen, seqnum);
  gt_xfputc('>',fpout);
  if (fastakeyquery != NULL && !COMPLETE(fastakeyquery))
  {
    printf("%s "GT_WU" "GT_WU" ",fastakeyquery->fastakey,
                         fastakeyquery->frompos,
                         fastakeyquery->topos);
  }
  gt_xfwrite(desc,sizeof *desc,(size_t) desclen,fpout);
  if (!haserr)
  {
    GtUword frompos, topos, seqstartpos, seqlength ;

    gt_xfputc('\n',fpout);
    seqstartpos = gt_encseq_seqstartpos(encseq, seqnum);
    seqlength = gt_encseq_seqlength(encseq, seqnum);
    if (fastakeyquery != NULL && !COMPLETE(fastakeyquery))
    {
      frompos = fastakeyquery->frompos-1;
      topos = fastakeyquery->topos - fastakeyquery->frompos + 1;
    } else
    {
      frompos = 0;
      topos = seqlength;
    }
    gt_encseq2symbolstring(fpout,
                           encseq,
                           GT_READMODE_FORWARD,
                           seqstartpos + frompos,
                           topos,
                           linewidth);
  }
  return haserr ? -1 : 0;
}

// Assembly:
subq $0x68, %rsp
movq %rdi, 0x60(%rsp)
movq %rsi, 0x58(%rsp)
movq %rdx, 0x50(%rsp)
movq %rcx, 0x48(%rsp)
movq %r8, 0x40(%rsp)
movq %r9, 0x38(%rsp)
movb $0x0, 0x27(%rsp)
movq 0x58(%rsp), %rdi
movq 0x50(%rsp), %rdx
leaq 0x28(%rsp), %rsi
callq 0xb1b40
movq %rax, 0x30(%rsp)
movq 0x60(%rsp), %rsi
movl $0x3e, %edi
callq 0x126b70
cmpq $0x0, 0x48(%rsp)
je 0x251ea7
movq 0x48(%rsp), %rax
cmpq $0x1, 0x8(%rax)
jne 0x251e7f
movq 0x48(%rsp), %rax
cmpq $0x0, 0x10(%rax)
je 0x251ea7
movq 0x48(%rsp), %rax
movq (%rax), %rsi
movq 0x48(%rsp), %rax
movq 0x8(%rax), %rdx
movq 0x48(%rsp), %rax
movq 0x10(%rax), %rcx
leaq 0x327d4e(%rip), %rdi    # 0x579bee
movb $0x0, %al
callq 0x19070
movq 0x30(%rsp), %rdi
movq 0x28(%rsp), %rdx
movq 0x60(%rsp), %rcx
movl $0x1, %esi
callq 0x126d30
testb $0x1, 0x27(%rsp)
jne 0x251f87
movq 0x60(%rsp), %rsi
movl $0xa, %edi
callq 0x126b70
movq 0x58(%rsp), %rdi
movq 0x50(%rsp), %rsi
callq 0xb0530
movq %rax, 0x8(%rsp)
movq 0x58(%rsp), %rdi
movq 0x50(%rsp), %rsi
callq 0xb09f0
movq %rax, (%rsp)
cmpq $0x0, 0x48(%rsp)
je 0x251f50
movq 0x48(%rsp), %rax
cmpq $0x1, 0x8(%rax)
jne 0x251f21
movq 0x48(%rsp), %rax
cmpq $0x0, 0x10(%rax)
je 0x251f50
movq 0x48(%rsp), %rax
movq 0x8(%rax), %rax
subq $0x1, %rax
movq %rax, 0x18(%rsp)
movq 0x48(%rsp), %rax
movq 0x10(%rax), %rax
movq 0x48(%rsp), %rcx
subq 0x8(%rcx), %rax
addq $0x1, %rax
movq %rax, 0x10(%rsp)
jmp 0x251f62
movq $0x0, 0x18(%rsp)
movq (%rsp), %rax
movq %rax, 0x10(%rsp)
movq 0x60(%rsp), %rdi
movq 0x58(%rsp), %rsi
movq 0x8(%rsp), %rcx
addq 0x18(%rsp), %rcx
movq 0x10(%rsp), %r8
movq 0x40(%rsp), %r9
xorl %edx, %edx
callq 0x21e3b0
movb 0x27(%rsp), %dl
xorl %eax, %eax
movl $0xffffffff, %ecx       # imm = 0xFFFFFFFF
testb $0x1, %dl
cmovnel %ecx, %eax
addq $0x68, %rsp
retq
nopl (%rax)