// File: /workspace/github_c_makefile_star2_O0/genometools[P]genometools/src/mgth/metagenomethreader.c
// Function: statspair_cmp
static int statspair_cmp(const void *y, const void *z)
{
  const GtMgthStatsPair *a = (const GtMgthStatsPair*) y;
  const GtMgthStatsPair *b = (const GtMgthStatsPair*) z;
  double val_a, val_b;
  int ret;
  gt_assert(a && b && a->parsestruct && b->parsestruct);

  /* calculate result values to sort by */
  val_a = (double) (*(a->parsestruct->hits_statistics.hitsnum
                        + *(a->statpos)) /
                   ((double) a->parsestruct->hits_statistics.hitsnumber) * 100);
  val_b = (double) (*(b->parsestruct->hits_statistics.hitsnum
                        + *(b->statpos)) /
                   ((double) b->parsestruct->hits_statistics.hitsnumber) * 100);

  if ((ret = gt_double_compare(val_a, val_b) * -1) == 0) {
    /* tie breaking, we need canonical ordering!
       if two entries have the same numerical value, let strings decide */
    return strcmp(a->string, b->string);
  }
  return ret;
}

// Assembly:
subq $0x48, %rsp
movq %rdi, 0x38(%rsp)
movq %rsi, 0x30(%rsp)
movq 0x38(%rsp), %rax
movq %rax, 0x28(%rsp)
movq 0x30(%rsp), %rax
movq %rax, 0x20(%rsp)
cmpq $0x0, 0x28(%rsp)
je 0x3168ca
cmpq $0x0, 0x20(%rsp)
je 0x3168ca
movq 0x28(%rsp), %rax
cmpq $0x0, 0x10(%rax)
je 0x3168ca
movq 0x20(%rsp), %rax
cmpq $0x0, 0x10(%rax)
jne 0x316902
movq 0x3256cf(%rip), %rax    # 0x63bfa0
movq (%rax), %rdi
leaq 0x1ff738(%rip), %rsi    # 0x516013
leaq 0x27e97d(%rip), %rdx    # 0x59525f
leaq 0x27e9a1(%rip), %rcx    # 0x59528a
leaq 0x27e4be(%rip), %r8     # 0x594dae
movl $0xf2, %r9d
movb $0x0, %al
callq 0x199f0
callq 0x19370
jmp 0x316904
movq 0x28(%rsp), %rax
movq (%rax), %rdx
movq 0x10(%rax), %rax
movq 0x200(%rax), %rcx
movq (%rdx), %rdx
movq (%rcx,%rdx,8), %xmm0
movaps 0x20200a(%rip), %xmm3   # 0x518930
punpckldq %xmm3, %xmm0    # xmm0 = xmm0[0],xmm3[0],xmm0[1],xmm3[1]
movapd 0x20200e(%rip), %xmm2   # 0x518940
subpd %xmm2, %xmm0
movaps %xmm0, %xmm1
unpckhpd %xmm0, %xmm0            # xmm0 = xmm0[1,1]
addsd %xmm1, %xmm0
movq 0x210(%rax), %xmm1
punpckldq %xmm3, %xmm1    # xmm1 = xmm1[0],xmm3[0],xmm1[1],xmm3[1]
subpd %xmm2, %xmm1
movaps %xmm1, %xmm4
unpckhpd %xmm1, %xmm1            # xmm1 = xmm1[1,1]
addsd %xmm4, %xmm1
divsd %xmm1, %xmm0
movsd 0x203ed0(%rip), %xmm1   # 0x51a838
mulsd %xmm1, %xmm0
movsd %xmm0, 0x18(%rsp)
movq 0x20(%rsp), %rax
movq (%rax), %rdx
movq 0x10(%rax), %rax
movq 0x200(%rax), %rcx
movq (%rdx), %rdx
movq (%rcx,%rdx,8), %xmm0
punpckldq %xmm3, %xmm0    # xmm0 = xmm0[0],xmm3[0],xmm0[1],xmm3[1]
subpd %xmm2, %xmm0
movaps %xmm0, %xmm1
unpckhpd %xmm0, %xmm0            # xmm0 = xmm0[1,1]
addsd %xmm1, %xmm0
movq 0x210(%rax), %xmm1
punpckldq %xmm3, %xmm1    # xmm1 = xmm1[0],xmm3[0],xmm1[1],xmm3[1]
subpd %xmm2, %xmm1
movaps %xmm1, %xmm2
unpckhpd %xmm1, %xmm1            # xmm1 = xmm1[1,1]
addsd %xmm2, %xmm1
divsd %xmm1, %xmm0
movsd 0x203e71(%rip), %xmm1   # 0x51a838
mulsd %xmm1, %xmm0
movsd %xmm0, 0x10(%rsp)
movsd 0x18(%rsp), %xmm0
movsd 0x10(%rsp), %xmm1
callq 0xec290
imull $-0x1, %eax, %eax
movl %eax, 0xc(%rsp)
cmpl $0x0, %eax
jne 0x316a0b
movq 0x28(%rsp), %rax
movq 0x8(%rax), %rdi
movq 0x20(%rsp), %rax
movq 0x8(%rax), %rsi
callq 0x19980
movl %eax, 0x44(%rsp)
jmp 0x316a13
movl 0xc(%rsp), %eax
movl %eax, 0x44(%rsp)
movl 0x44(%rsp), %eax
addq $0x48, %rsp
retq
nopl (%rax)