// File: /workspace/github_c_makefile_star2_O0/genometools[P]genometools/src/extended/regular_seqid.c
// Function: gt_regular_seqid_save
void gt_regular_seqid_save(GtStr *seqid, GtStr *description)
{
  GtUword i, len;
  unsigned char *desc, cc;

  gt_assert(seqid && description);

  len  = gt_str_length(description);
  desc = (GtUchar*) gt_str_get(description);

  i = 0;

  if ((len >= 2) && (desc[0] == 'g') && (desc[1] == 'i') && (desc[2] == '|')) {
    /* skip 'gi|' */
    i = 3;
  }
  else if ((len >= 2) && (desc[0] == 'S') && (desc[1] == 'Q') &&
           (desc[2] == ';')) {
    /* skip 'SQ;' */
    i = 3;
  }
  else if ((len >= 3) && (desc[0] == '(') && (desc[1] == 'g') &&
           (desc[2] == 'i') && (desc[3] == '|')) {
    /* skip '(gi|' */
    i = 4;
  }
  else if ((len >= 3) && (desc[0] == 'r') && (desc[1] == 'e') &&
           (desc[2] == 'f') && (desc[3] == '|')) {
    /* skip 'ref|' */
    i = 4;
  }

  for (/* init already done */ ; i < len; i++) {
    cc = desc[i];
    if (cc == ':' || cc == '|' || cc == '\t' || cc == ' ')
      break;
    gt_str_append_char(seqid, desc[i]);
  }
}

// Assembly:
subq $0x38, %rsp
movq %rdi, 0x30(%rsp)
movq %rsi, 0x28(%rsp)
cmpq $0x0, 0x30(%rsp)
je 0x1cb2fe
cmpq $0x0, 0x28(%rsp)
jne 0x1cb336
movq 0x470c9b(%rip), %rax    # 0x63bfa0
movq (%rax), %rdi
leaq 0x34ad04(%rip), %rsi    # 0x516013
leaq 0x3979e6(%rip), %rdx    # 0x562cfc
leaq 0x3979f4(%rip), %rcx    # 0x562d11
leaq 0x397a03(%rip), %r8     # 0x562d27
movl $0x1a, %r9d
movb $0x0, %al
callq 0x199f0
callq 0x19370
jmp 0x1cb338
movq 0x28(%rsp), %rdi
callq 0x11dfa0
movq %rax, 0x18(%rsp)
movq 0x28(%rsp), %rdi
callq 0x11dee0
movq %rax, 0x10(%rsp)
movq $0x0, 0x20(%rsp)
cmpq $0x2, 0x18(%rsp)
jb 0x1cb39e
movq 0x10(%rsp), %rax
movzbl (%rax), %eax
cmpl $0x67, %eax
jne 0x1cb39e
movq 0x10(%rsp), %rax
movzbl 0x1(%rax), %eax
cmpl $0x69, %eax
jne 0x1cb39e
movq 0x10(%rsp), %rax
movzbl 0x2(%rax), %eax
cmpl $0x7c, %eax
jne 0x1cb39e
movq $0x3, 0x20(%rsp)
jmp 0x1cb475
cmpq $0x2, 0x18(%rsp)
jb 0x1cb3dd
movq 0x10(%rsp), %rax
movzbl (%rax), %eax
cmpl $0x53, %eax
jne 0x1cb3dd
movq 0x10(%rsp), %rax
movzbl 0x1(%rax), %eax
cmpl $0x51, %eax
jne 0x1cb3dd
movq 0x10(%rsp), %rax
movzbl 0x2(%rax), %eax
cmpl $0x3b, %eax
jne 0x1cb3dd
movq $0x3, 0x20(%rsp)
jmp 0x1cb473
cmpq $0x3, 0x18(%rsp)
jb 0x1cb427
movq 0x10(%rsp), %rax
movzbl (%rax), %eax
cmpl $0x28, %eax
jne 0x1cb427
movq 0x10(%rsp), %rax
movzbl 0x1(%rax), %eax
cmpl $0x67, %eax
jne 0x1cb427
movq 0x10(%rsp), %rax
movzbl 0x2(%rax), %eax
cmpl $0x69, %eax
jne 0x1cb427
movq 0x10(%rsp), %rax
movzbl 0x3(%rax), %eax
cmpl $0x7c, %eax
jne 0x1cb427
movq $0x4, 0x20(%rsp)
jmp 0x1cb471
cmpq $0x3, 0x18(%rsp)
jb 0x1cb46f
movq 0x10(%rsp), %rax
movzbl (%rax), %eax
cmpl $0x72, %eax
jne 0x1cb46f
movq 0x10(%rsp), %rax
movzbl 0x1(%rax), %eax
cmpl $0x65, %eax
jne 0x1cb46f
movq 0x10(%rsp), %rax
movzbl 0x2(%rax), %eax
cmpl $0x66, %eax
jne 0x1cb46f
movq 0x10(%rsp), %rax
movzbl 0x3(%rax), %eax
cmpl $0x7c, %eax
jne 0x1cb46f
movq $0x4, 0x20(%rsp)
jmp 0x1cb471
jmp 0x1cb473
jmp 0x1cb475
jmp 0x1cb477
movq 0x20(%rsp), %rax
cmpq 0x18(%rsp), %rax
jae 0x1cb4e6
movq 0x10(%rsp), %rax
movq 0x20(%rsp), %rcx
movb (%rax,%rcx), %al
movb %al, 0xf(%rsp)
movzbl 0xf(%rsp), %eax
cmpl $0x3a, %eax
je 0x1cb4bc
movzbl 0xf(%rsp), %eax
cmpl $0x7c, %eax
je 0x1cb4bc
movzbl 0xf(%rsp), %eax
cmpl $0x9, %eax
je 0x1cb4bc
movzbl 0xf(%rsp), %eax
cmpl $0x20, %eax
jne 0x1cb4be
jmp 0x1cb4e6
movq 0x30(%rsp), %rdi
movq 0x10(%rsp), %rax
movq 0x20(%rsp), %rcx
movsbl (%rax,%rcx), %esi
callq 0x11da70
movq 0x20(%rsp), %rax
addq $0x1, %rax
movq %rax, 0x20(%rsp)
jmp 0x1cb477
addq $0x38, %rsp
retq
nopl (%rax,%rax)