// File: /workspace/github_c_makefile_star2_O1/genometools[P]genometools/src/extended/gff3_linesorted_out_stream.c
// Function: gt_linesorted_gff3_cmp
static int gt_linesorted_gff3_cmp(const void *val1, const void *val2,
                                  GT_UNUSED void *data)
{
  GtUword p1 = 0, p2 = 0;
  const char *s1 = *(const char**) val1,
             *s2 = *(const char**) val2,
             *reststart1 = s1, *reststart2 = s2;
  int str_cmp_result,
      GT_UNUSED rval = 0;
  char buf1[BUFSIZ], buf2[BUFSIZ];

  if (s1[0] == '#' || s2[0] == '\0')
    return 1;
  if (s2[0] == '#' || s1[0] == '\0')
    return -1;

  /* parse seqid */
  gt_linesorted_gff3_next_token_pair(&reststart1, &reststart2, buf1, BUFSIZ,
                                     buf2, BUFSIZ, GT_LINESORTED_SEP);
  str_cmp_result = strcmp(buf1, buf2);
  if (str_cmp_result != 0)
    return str_cmp_result;

  /* parse source */
  gt_linesorted_gff3_next_token_pair(&reststart1, &reststart2, buf1, BUFSIZ,
                                     buf2, BUFSIZ, GT_LINESORTED_SEP);
  /* parse type */
  gt_linesorted_gff3_next_token_pair(&reststart1, &reststart2, buf1, BUFSIZ,
                                     buf2, BUFSIZ, GT_LINESORTED_SEP);

  /* parse start */
  gt_linesorted_gff3_next_token_pair(&reststart1, &reststart2, buf1, BUFSIZ,
                                     buf2, BUFSIZ, GT_LINESORTED_SEP);
  rval = gt_parse_uword(&p1, buf1);
  gt_assert(rval == 0);
  rval = gt_parse_uword(&p2, buf2);
  gt_assert(rval == 0);

  if (p1 == p2) {
    /* parse end */
    gt_linesorted_gff3_next_token_pair(&reststart1, &reststart2, buf1, BUFSIZ,
                                       buf2, BUFSIZ, GT_LINESORTED_SEP);
    rval = gt_parse_uword(&p1, buf1);
    gt_assert(rval == 0);
    rval = gt_parse_uword(&p2, buf2);
    gt_assert(rval == 0);
    if (p1 == p2)
      return 0;
    if (p1 > p2)
      return 1;
    else
      return -1;
  }
  if (p1 > p2)
    return 1;
  else
    return -1;
}

// Assembly:
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
subq $0x4028, %rsp           # imm = 0x4028
xorl %eax, %eax
movq %rax, 0x8(%rsp)
movq %rax, (%rsp)
movq (%rdi), %rax
movq (%rsi), %rdx
movq %rax, 0x18(%rsp)
movq %rdx, 0x10(%rsp)
movb (%rax), %cl
movl $0x1, %eax
cmpb $0x23, %cl
je 0x14ded4
movzbl (%rdx), %edx
testl %edx, %edx
je 0x14ded4
cmpl $0x23, %edx
je 0x14decf
testb %cl, %cl
je 0x14decf
leaq 0x18(%rsp), %rdi
leaq 0x10(%rsp), %rsi
leaq 0x2020(%rsp), %rbx
leaq 0x20(%rsp), %r14
movq %rbx, %rdx
movq %r14, %rcx
callq 0x14def7
movq %rbx, %rdi
movq %r14, %rsi
callq 0x17a40
testl %eax, %eax
jne 0x14ded4
leaq 0x18(%rsp), %rbx
leaq 0x10(%rsp), %r14
leaq 0x2020(%rsp), %r15
leaq 0x20(%rsp), %r12
movq %rbx, %rdi
movq %r14, %rsi
movq %r15, %rdx
movq %r12, %rcx
callq 0x14def7
movq %rbx, %rdi
movq %r14, %rsi
movq %r15, %rdx
movq %r12, %rcx
callq 0x14def7
movq %rbx, %rdi
movq %r14, %rsi
movq %r15, %rdx
movq %r12, %rcx
callq 0x14def7
leaq 0x8(%rsp), %rdi
movq %r15, %rsi
callq 0x11043f
testl %eax, %eax
jne 0x14dee3
movq %rsp, %rdi
leaq 0x20(%rsp), %rsi
callq 0x11043f
testl %eax, %eax
jne 0x14dee8
movq 0x8(%rsp), %rcx
movq (%rsp), %rdx
cmpq %rdx, %rcx
jne 0x14dec2
leaq 0x18(%rsp), %rdi
leaq 0x10(%rsp), %rsi
leaq 0x2020(%rsp), %rbx
leaq 0x20(%rsp), %rcx
movq %rbx, %rdx
callq 0x14def7
leaq 0x8(%rsp), %rdi
movq %rbx, %rsi
callq 0x11043f
testl %eax, %eax
jne 0x14deed
movq %rsp, %rdi
leaq 0x20(%rsp), %rsi
callq 0x11043f
testl %eax, %eax
jne 0x14def2
movq 0x8(%rsp), %rcx
movq (%rsp), %rdx
xorl %eax, %eax
cmpq %rdx, %rcx
je 0x14ded4
xorl %eax, %eax
cmpq %rcx, %rdx
adcl $-0x1, %eax
orl $0x1, %eax
jmp 0x14ded4
movl $0xffffffff, %eax       # imm = 0xFFFFFFFF
addq $0x4028, %rsp           # imm = 0x4028
popq %rbx
popq %r12
popq %r14
popq %r15
retq
callq 0x455b0
callq 0x455e7
callq 0x4561e
callq 0x45657