// File: /workspace/github_c_makefile_star2_O0/ggerganov[P]font-rasterizer/./stb_truetype.h
// Function: stbtt__sort_edges_quicksort
static void stbtt__sort_edges_quicksort(stbtt__edge *p, int n)
{
   /* threshold for transitioning to insertion sort */
   while (n > 12) {
      stbtt__edge t;
      int c01,c12,c,m,i,j;

      /* compute median of three */
      m = n >> 1;
      c01 = STBTT__COMPARE(&p[0],&p[m]);
      c12 = STBTT__COMPARE(&p[m],&p[n-1]);
      /* if 0 >= mid >= end, or 0 < mid < end, then use mid */
      if (c01 != c12) {
         /* otherwise, we'll need to swap something else to middle */
         int z;
         c = STBTT__COMPARE(&p[0],&p[n-1]);
         /* 0>mid && mid<n:  0>n => n; 0<n => 0 */
         /* 0<mid && mid>n:  0>n => 0; 0<n => n */
         z = (c == c12) ? 0 : n-1;
         t = p[z];
         p[z] = p[m];
         p[m] = t;
      }
      /* now p[m] is the median-of-three */
      /* swap it to the beginning so it won't move around */
      t = p[0];
      p[0] = p[m];
      p[m] = t;

      /* partition loop */
      i=1;
      j=n-1;
      for(;;) {
         /* handling of equality is crucial here */
         /* for sentinels & efficiency with duplicates */
         for (;;++i) {
            if (!STBTT__COMPARE(&p[i], &p[0])) break;
         }
         for (;;--j) {
            if (!STBTT__COMPARE(&p[0], &p[j])) break;
         }
         /* make sure we haven't crossed */
         if (i >= j) break;
         t = p[i];
         p[i] = p[j];
         p[j] = t;

         ++i;
         --j;
      }
      /* recurse on smaller side, iterate on larger */
      if (j < (n-i)) {
         stbtt__sort_edges_quicksort(p,j);
         p = p+i;
         n = n-i;
      } else {
         stbtt__sort_edges_quicksort(p+i, n-i);
         n = j;
      }
   }
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x40, %rsp
movq %rdi, -0x8(%rbp)
movl %esi, -0xc(%rbp)
cmpl $0xc, -0xc(%rbp)
jle 0x120ef
movl -0xc(%rbp), %eax
sarl %eax
movl %eax, -0x30(%rbp)
movq -0x8(%rbp), %rax
movss 0x4(%rax), %xmm1
movq -0x8(%rbp), %rax
movslq -0x30(%rbp), %rcx
imulq $0x14, %rcx, %rcx
addq %rcx, %rax
movss 0x4(%rax), %xmm0
ucomiss %xmm1, %xmm0
seta %al
andb $0x1, %al
movzbl %al, %eax
movl %eax, -0x24(%rbp)
movq -0x8(%rbp), %rax
movslq -0x30(%rbp), %rcx
imulq $0x14, %rcx, %rcx
addq %rcx, %rax
movss 0x4(%rax), %xmm1
movq -0x8(%rbp), %rax
movl -0xc(%rbp), %ecx
subl $0x1, %ecx
movslq %ecx, %rcx
imulq $0x14, %rcx, %rcx
addq %rcx, %rax
movss 0x4(%rax), %xmm0
ucomiss %xmm1, %xmm0
seta %al
andb $0x1, %al
movzbl %al, %eax
movl %eax, -0x28(%rbp)
movl -0x24(%rbp), %eax
cmpl -0x28(%rbp), %eax
je 0x11f1b
movq -0x8(%rbp), %rax
movss 0x4(%rax), %xmm1
movq -0x8(%rbp), %rax
movl -0xc(%rbp), %ecx
subl $0x1, %ecx
movslq %ecx, %rcx
imulq $0x14, %rcx, %rcx
addq %rcx, %rax
movss 0x4(%rax), %xmm0
ucomiss %xmm1, %xmm0
seta %al
andb $0x1, %al
movzbl %al, %eax
movl %eax, -0x2c(%rbp)
movl -0x2c(%rbp), %eax
cmpl -0x28(%rbp), %eax
jne 0x11e92
xorl %eax, %eax
movl %eax, -0x40(%rbp)
jmp 0x11e9b
movl -0xc(%rbp), %eax
subl $0x1, %eax
movl %eax, -0x40(%rbp)
movl -0x40(%rbp), %eax
movl %eax, -0x3c(%rbp)
movq -0x8(%rbp), %rax
movslq -0x3c(%rbp), %rcx
imulq $0x14, %rcx, %rcx
addq %rcx, %rax
movq (%rax), %rcx
movq %rcx, -0x20(%rbp)
movq 0x8(%rax), %rcx
movq %rcx, -0x18(%rbp)
movl 0x10(%rax), %eax
movl %eax, -0x10(%rbp)
movq -0x8(%rbp), %rax
movslq -0x3c(%rbp), %rcx
imulq $0x14, %rcx, %rcx
addq %rcx, %rax
movq -0x8(%rbp), %rcx
movslq -0x30(%rbp), %rdx
imulq $0x14, %rdx, %rdx
addq %rdx, %rcx
movq (%rcx), %rdx
movq %rdx, (%rax)
movq 0x8(%rcx), %rdx
movq %rdx, 0x8(%rax)
movl 0x10(%rcx), %ecx
movl %ecx, 0x10(%rax)
movq -0x8(%rbp), %rax
movslq -0x30(%rbp), %rcx
imulq $0x14, %rcx, %rcx
addq %rcx, %rax
movq -0x20(%rbp), %rcx
movq %rcx, (%rax)
movq -0x18(%rbp), %rcx
movq %rcx, 0x8(%rax)
movl -0x10(%rbp), %ecx
movl %ecx, 0x10(%rax)
movq -0x8(%rbp), %rax
movq (%rax), %rcx
movq %rcx, -0x20(%rbp)
movq 0x8(%rax), %rcx
movq %rcx, -0x18(%rbp)
movl 0x10(%rax), %eax
movl %eax, -0x10(%rbp)
movq -0x8(%rbp), %rax
movq -0x8(%rbp), %rcx
movslq -0x30(%rbp), %rdx
imulq $0x14, %rdx, %rdx
addq %rdx, %rcx
movq (%rcx), %rdx
movq %rdx, (%rax)
movq 0x8(%rcx), %rdx
movq %rdx, 0x8(%rax)
movl 0x10(%rcx), %ecx
movl %ecx, 0x10(%rax)
movq -0x8(%rbp), %rax
movslq -0x30(%rbp), %rcx
imulq $0x14, %rcx, %rcx
addq %rcx, %rax
movq -0x20(%rbp), %rcx
movq %rcx, (%rax)
movq -0x18(%rbp), %rcx
movq %rcx, 0x8(%rax)
movl -0x10(%rbp), %ecx
movl %ecx, 0x10(%rax)
movl $0x1, -0x34(%rbp)
movl -0xc(%rbp), %eax
subl $0x1, %eax
movl %eax, -0x38(%rbp)
jmp 0x11f91
movq -0x8(%rbp), %rax
movslq -0x34(%rbp), %rcx
imulq $0x14, %rcx, %rcx
addq %rcx, %rax
movss 0x4(%rax), %xmm1
movq -0x8(%rbp), %rax
movss 0x4(%rax), %xmm0
ucomiss %xmm1, %xmm0
ja 0x11fb5
jmp 0x11fc2
jmp 0x11fb7
movl -0x34(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x34(%rbp)
jmp 0x11f91
jmp 0x11fc4
movq -0x8(%rbp), %rax
movss 0x4(%rax), %xmm1
movq -0x8(%rbp), %rax
movslq -0x38(%rbp), %rcx
imulq $0x14, %rcx, %rcx
addq %rcx, %rax
movss 0x4(%rax), %xmm0
ucomiss %xmm1, %xmm0
ja 0x11fe8
jmp 0x11ff5
jmp 0x11fea
movl -0x38(%rbp), %eax
addl $-0x1, %eax
movl %eax, -0x38(%rbp)
jmp 0x11fc4
movl -0x34(%rbp), %eax
cmpl -0x38(%rbp), %eax
jl 0x12002
jmp 0x12093
movq -0x8(%rbp), %rax
movslq -0x34(%rbp), %rcx
imulq $0x14, %rcx, %rcx
addq %rcx, %rax
movq (%rax), %rcx
movq %rcx, -0x20(%rbp)
movq 0x8(%rax), %rcx
movq %rcx, -0x18(%rbp)
movl 0x10(%rax), %eax
movl %eax, -0x10(%rbp)
movq -0x8(%rbp), %rax
movslq -0x34(%rbp), %rcx
imulq $0x14, %rcx, %rcx
addq %rcx, %rax
movq -0x8(%rbp), %rcx
movslq -0x38(%rbp), %rdx
imulq $0x14, %rdx, %rdx
addq %rdx, %rcx
movq (%rcx), %rdx
movq %rdx, (%rax)
movq 0x8(%rcx), %rdx
movq %rdx, 0x8(%rax)
movl 0x10(%rcx), %ecx
movl %ecx, 0x10(%rax)
movq -0x8(%rbp), %rax
movslq -0x38(%rbp), %rcx
imulq $0x14, %rcx, %rcx
addq %rcx, %rax
movq -0x20(%rbp), %rcx
movq %rcx, (%rax)
movq -0x18(%rbp), %rcx
movq %rcx, 0x8(%rax)
movl -0x10(%rbp), %ecx
movl %ecx, 0x10(%rax)
movl -0x34(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x34(%rbp)
movl -0x38(%rbp), %eax
addl $-0x1, %eax
movl %eax, -0x38(%rbp)
jmp 0x11f8f
movl -0x38(%rbp), %eax
movl -0xc(%rbp), %ecx
subl -0x34(%rbp), %ecx
cmpl %ecx, %eax
jge 0x120ca
movq -0x8(%rbp), %rdi
movl -0x38(%rbp), %esi
callq 0x11dc0
movq -0x8(%rbp), %rax
movslq -0x34(%rbp), %rcx
imulq $0x14, %rcx, %rcx
addq %rcx, %rax
movq %rax, -0x8(%rbp)
movl -0xc(%rbp), %eax
subl -0x34(%rbp), %eax
movl %eax, -0xc(%rbp)
jmp 0x120ea
movq -0x8(%rbp), %rdi
movslq -0x34(%rbp), %rax
imulq $0x14, %rax, %rax
addq %rax, %rdi
movl -0xc(%rbp), %esi
subl -0x34(%rbp), %esi
callq 0x11dc0
movl -0x38(%rbp), %eax
movl %eax, -0xc(%rbp)
jmp 0x11dcf
addq $0x40, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)