// File: /workspace/github_c_makefile_star2_O2/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
andq $0x0, 0x8(%rsp)
andq $0x0, (%rsp)
movq (%rdi), %rax
movq (%rsi), %rdx
movq %rax, 0x18(%rsp)
movq %rdx, 0x10(%rsp)
movb (%rax), %cl
pushq $0x1
popq %rax
cmpb $0x23, %cl
je 0xe01f2
movzbl (%rdx), %edx
testl %edx, %edx
je 0xe01f2
cmpl $0x23, %edx
je 0xe01ef
testb %cl, %cl
je 0xe01ef
leaq 0x18(%rsp), %rdi
leaq 0x10(%rsp), %rsi
leaq 0x2020(%rsp), %rbx
leaq 0x20(%rsp), %r14
movq %rbx, %rdx
movq %r14, %rcx
callq 0xe02bd
movq %rbx, %rdi
movq %r14, %rsi
callq 0x179e0
testl %eax, %eax
jne 0xe01f2
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 0xe02bd
movq %rbx, %rdi
movq %r14, %rsi
movq %r15, %rdx
movq %r12, %rcx
callq 0xe02bd
movq %rbx, %rdi
movq %r14, %rsi
movq %r15, %rdx
movq %r12, %rcx
callq 0xe02bd
leaq 0x8(%rsp), %rdi
movq %r15, %rsi
callq 0x9bd05
testl %eax, %eax
jne 0xe0201
movq %rsp, %rdi
leaq 0x20(%rsp), %rsi
callq 0x9bd05
testl %eax, %eax
jne 0xe022b
movq 0x8(%rsp), %rcx
movq (%rsp), %rdx
cmpq %rdx, %rcx
jne 0xe01e2
leaq 0x18(%rsp), %rdi
leaq 0x10(%rsp), %rsi
leaq 0x2020(%rsp), %rbx
leaq 0x20(%rsp), %rcx
movq %rbx, %rdx
callq 0xe02bd
leaq 0x8(%rsp), %rdi
movq %rbx, %rsi
callq 0x9bd05
testl %eax, %eax
jne 0xe0261
movq %rsp, %rdi
leaq 0x20(%rsp), %rsi
callq 0x9bd05
testl %eax, %eax
jne 0xe028f
movq 0x8(%rsp), %rcx
movq (%rsp), %rdx
xorl %eax, %eax
cmpq %rdx, %rcx
je 0xe01f2
xorl %eax, %eax
cmpq %rcx, %rdx
adcl $-0x1, %eax
orl $0x1, %eax
jmp 0xe01f2
pushq $-0x1
popq %rax
addq $0x4028, %rsp           # imm = 0x4028
popq %rbx
popq %r12
popq %r14
popq %r15
retq
movq 0x357d60(%rip), %rax    # 0x437f68
movq (%rax), %rdi
leaq 0x204e01(%rip), %rsi    # 0x2e5013
leaq 0x23d8a6(%rip), %rdx    # 0x31dabf
leaq 0x23f992(%rip), %rcx    # 0x31fbb2
leaq 0x23f8a9(%rip), %r8     # 0x31fad0
pushq $0x79
jmp 0xe0253
movq 0x357d36(%rip), %rax    # 0x437f68
movq (%rax), %rdi
leaq 0x204dd7(%rip), %rsi    # 0x2e5013
leaq 0x23d87c(%rip), %rdx    # 0x31dabf
leaq 0x23f968(%rip), %rcx    # 0x31fbb2
leaq 0x23f87f(%rip), %r8     # 0x31fad0
pushq $0x7b
popq %r9
xorl %eax, %eax
callq 0x17a50
callq 0x17390
movq 0x357d00(%rip), %rax    # 0x437f68
movq (%rax), %rdi
leaq 0x204da1(%rip), %rsi    # 0x2e5013
leaq 0x23d846(%rip), %rdx    # 0x31dabf
leaq 0x23f932(%rip), %rcx    # 0x31fbb2
leaq 0x23f849(%rip), %r8     # 0x31fad0
movl $0x82, %r9d
jmp 0xe0255
movq 0x357cd2(%rip), %rax    # 0x437f68
movq (%rax), %rdi
leaq 0x204d73(%rip), %rsi    # 0x2e5013
leaq 0x23d818(%rip), %rdx    # 0x31dabf
leaq 0x23f904(%rip), %rcx    # 0x31fbb2
leaq 0x23f81b(%rip), %r8     # 0x31fad0
movl $0x84, %r9d
jmp 0xe0255