// File: /workspace/github_c_makefile_star2_O0/genometools[P]genometools/src/tools/gt_splitfasta.c
// Function: split_description
static int split_description(const char *filename, GtStr *splitdesc,
                             GtUword width, bool force, GtError *err)
{
  GtUword i;
  GtBioseq *bioseq;
  GtStr *descname;
  int had_err = 0;
  gt_error_check(err);
  gt_assert(filename && splitdesc && gt_str_length(splitdesc));

  descname = gt_str_new();
  if (!(bioseq = gt_bioseq_new(filename, err)))
    had_err = -1;

  for (i = 0; !had_err && i < gt_bioseq_number_of_sequences(bioseq); i++) {
    GtFile *outfp;
    char *seq;
    gt_str_reset(descname);
    gt_str_append_str(descname, splitdesc);
    gt_str_append_char(descname, GT_PATH_SEPARATOR);
    gt_str_append_cstr(descname, gt_bioseq_get_description(bioseq, i));
    gt_str_append_cstr(descname, gt_file_suffix(filename));
    if (!(outfp = gt_output_file_xopen_forcecheck(gt_str_get(descname), "w",
                                                 force, err))) {
      had_err = -1;
      break;
    }
    seq = gt_bioseq_get_sequence(bioseq, i);
    gt_fasta_show_entry(gt_bioseq_get_description(bioseq, i), seq,
                        gt_bioseq_get_sequence_length(bioseq, i), width,
                        outfp);
    gt_free(seq);
    gt_file_delete(outfp);
  }

  gt_bioseq_delete(bioseq);
  gt_str_delete(descname);

  return had_err;
}

// Assembly:
subq $0x88, %rsp
movb %cl, %al
movq %rdi, 0x80(%rsp)
movq %rsi, 0x78(%rsp)
movq %rdx, 0x70(%rsp)
andb $0x1, %al
movb %al, 0x6f(%rsp)
movq %r8, 0x60(%rsp)
movl $0x0, 0x44(%rsp)
cmpq $0x0, 0x60(%rsp)
je 0x7752e
movq 0x60(%rsp), %rdi
callq 0xd8a60
testb $0x1, %al
jne 0x774f6
jmp 0x7752e
movq 0x5c4aa3(%rip), %rax    # 0x63bfa0
movq (%rax), %rdi
leaq 0x49eb0c(%rip), %rsi    # 0x516013
leaq 0x49ecb1(%rip), %rdx    # 0x5161bf
leaq 0x4b5a93(%rip), %rcx    # 0x52cfa8
leaq 0x4b5951(%rip), %r8     # 0x52ce6d
movl $0x6f, %r9d
movb $0x0, %al
callq 0x199f0
callq 0x19370
jmp 0x77530
jmp 0x77532
cmpq $0x0, 0x80(%rsp)
je 0x77555
cmpq $0x0, 0x78(%rsp)
je 0x77555
movq 0x78(%rsp), %rdi
callq 0x11dfa0
cmpq $0x0, %rax
jne 0x7758d
movq 0x5c4a44(%rip), %rax    # 0x63bfa0
movq (%rax), %rdi
leaq 0x49eaad(%rip), %rsi    # 0x516013
leaq 0x4b5a4d(%rip), %rdx    # 0x52cfba
leaq 0x4b5a34(%rip), %rcx    # 0x52cfa8
leaq 0x4b58f2(%rip), %r8     # 0x52ce6d
movl $0x70, %r9d
movb $0x0, %al
callq 0x199f0
callq 0x19370
jmp 0x7758f
callq 0x11d4a0
movq %rax, 0x48(%rsp)
movq 0x80(%rsp), %rdi
movq 0x60(%rsp), %rsi
callq 0x84600
movq %rax, 0x50(%rsp)
cmpq $0x0, %rax
jne 0x775be
movl $0xffffffff, 0x44(%rsp) # imm = 0xFFFFFFFF
movq $0x0, 0x58(%rsp)
xorl %eax, %eax
cmpl $0x0, 0x44(%rsp)
movb %al, 0x2f(%rsp)
jne 0x775fa
movq 0x58(%rsp), %rax
movq %rax, 0x20(%rsp)
movq 0x50(%rsp), %rdi
callq 0x85910
movq %rax, %rcx
movq 0x20(%rsp), %rax
cmpq %rcx, %rax
setb %al
movb %al, 0x2f(%rsp)
movb 0x2f(%rsp), %al
testb $0x1, %al
jne 0x77607
jmp 0x77746
movq 0x48(%rsp), %rdi
callq 0x11e110
movq 0x48(%rsp), %rdi
movq 0x78(%rsp), %rsi
callq 0x11d750
movq 0x48(%rsp), %rdi
movl $0x2f, %esi
callq 0x11da70
movq 0x48(%rsp), %rax
movq %rax, 0x10(%rsp)
movq 0x50(%rsp), %rdi
movq 0x58(%rsp), %rsi
callq 0x84ea0
movq 0x10(%rsp), %rdi
movq %rax, %rsi
callq 0x11d550
movq 0x48(%rsp), %rax
movq %rax, 0x18(%rsp)
movq 0x80(%rsp), %rdi
callq 0xdeb50
movq 0x18(%rsp), %rdi
movq %rax, %rsi
callq 0x11d550
movq 0x48(%rsp), %rdi
callq 0x11dee0
movq %rax, %rdi
movb 0x6f(%rsp), %al
movq 0x60(%rsp), %rcx
leaq 0x4ee82f(%rip), %rsi    # 0x565ec5
andb $0x1, %al
movzbl %al, %edx
callq 0xf8250
movq %rax, 0x38(%rsp)
cmpq $0x0, %rax
jne 0x776b8
movl $0xffffffff, 0x44(%rsp) # imm = 0xFFFFFFFF
jmp 0x77746
movq 0x50(%rsp), %rdi
movq 0x58(%rsp), %rsi
callq 0x84cc0
movq %rax, 0x30(%rsp)
movq 0x50(%rsp), %rdi
movq 0x58(%rsp), %rsi
callq 0x84ea0
movq %rax, (%rsp)
movq 0x30(%rsp), %rax
movq %rax, 0x8(%rsp)
movq 0x50(%rsp), %rdi
movq 0x58(%rsp), %rsi
callq 0x84e30
movq (%rsp), %rdi
movq 0x8(%rsp), %rsi
movq %rax, %rdx
movq 0x70(%rsp), %rcx
movq 0x38(%rsp), %r8
callq 0xdbd10
movq 0x30(%rsp), %rdi
leaq 0x4b574e(%rip), %rsi    # 0x52ce6d
movl $0x87, %edx
callq 0xe88c0
movq 0x38(%rsp), %rdi
callq 0xde430
movq 0x58(%rsp), %rax
addq $0x1, %rax
movq %rax, 0x58(%rsp)
jmp 0x775c7
movq 0x50(%rsp), %rdi
callq 0x84960
movq 0x48(%rsp), %rdi
callq 0x11f560
movl 0x44(%rsp), %eax
addq $0x88, %rsp
retq
nopw %cs:(%rax,%rax)