// File: /workspace/github_c_makefile_star2_O0/genometools[P]genometools/src/external/bzip2-1.0.6/blocksort.c
// Function: fallbackSimpleSort
static 
__inline__
void fallbackSimpleSort ( UInt32* fmap, 
                          UInt32* eclass, 
                          Int32   lo, 
                          Int32   hi )
{
   Int32 i, j, tmp;
   UInt32 ec_tmp;

   if (lo == hi) return;

   if (hi - lo > 3) {
      for ( i = hi-4; i >= lo; i-- ) {
         tmp = fmap[i];
         ec_tmp = eclass[tmp];
         for ( j = i+4; j <= hi && ec_tmp > eclass[fmap[j]]; j += 4 )
            fmap[j-4] = fmap[j];
         fmap[j-4] = tmp;
      }
   }

   for ( i = hi-1; i >= lo; i-- ) {
      tmp = fmap[i];
      ec_tmp = eclass[tmp];
      for ( j = i+1; j <= hi && ec_tmp > eclass[fmap[j]]; j++ )
         fmap[j-1] = fmap[j];
      fmap[j-1] = tmp;
   }
}

// Assembly:
movq %rdi, -0x8(%rsp)
movq %rsi, -0x10(%rsp)
movl %edx, -0x14(%rsp)
movl %ecx, -0x18(%rsp)
movl -0x14(%rsp), %eax
cmpl -0x18(%rsp), %eax
jne 0x154811
jmp 0x1549c8
movl -0x18(%rsp), %eax
subl -0x14(%rsp), %eax
cmpl $0x3, %eax
jle 0x1548f6
movl -0x18(%rsp), %eax
subl $0x4, %eax
movl %eax, -0x1c(%rsp)
movl -0x1c(%rsp), %eax
cmpl -0x14(%rsp), %eax
jl 0x1548f4
movq -0x8(%rsp), %rax
movslq -0x1c(%rsp), %rcx
movl (%rax,%rcx,4), %eax
movl %eax, -0x24(%rsp)
movq -0x10(%rsp), %rax
movslq -0x24(%rsp), %rcx
movl (%rax,%rcx,4), %eax
movl %eax, -0x28(%rsp)
movl -0x1c(%rsp), %eax
addl $0x4, %eax
movl %eax, -0x20(%rsp)
movl -0x20(%rsp), %ecx
xorl %eax, %eax
cmpl -0x18(%rsp), %ecx
movb %al, -0x29(%rsp)
jg 0x154898
movl -0x28(%rsp), %eax
movq -0x10(%rsp), %rcx
movq -0x8(%rsp), %rdx
movslq -0x20(%rsp), %rsi
movl (%rdx,%rsi,4), %edx
cmpl (%rcx,%rdx,4), %eax
seta %al
movb %al, -0x29(%rsp)
movb -0x29(%rsp), %al
testb $0x1, %al
jne 0x1548a2
jmp 0x1548ce
movq -0x8(%rsp), %rax
movslq -0x20(%rsp), %rcx
movl (%rax,%rcx,4), %edx
movq -0x8(%rsp), %rax
movl -0x20(%rsp), %ecx
subl $0x4, %ecx
movslq %ecx, %rcx
movl %edx, (%rax,%rcx,4)
movl -0x20(%rsp), %eax
addl $0x4, %eax
movl %eax, -0x20(%rsp)
jmp 0x154868
movl -0x24(%rsp), %edx
movq -0x8(%rsp), %rax
movl -0x20(%rsp), %ecx
subl $0x4, %ecx
movslq %ecx, %rcx
movl %edx, (%rax,%rcx,4)
movl -0x1c(%rsp), %eax
addl $-0x1, %eax
movl %eax, -0x1c(%rsp)
jmp 0x15482d
jmp 0x1548f6
movl -0x18(%rsp), %eax
subl $0x1, %eax
movl %eax, -0x1c(%rsp)
movl -0x1c(%rsp), %eax
cmpl -0x14(%rsp), %eax
jl 0x1549c8
movq -0x8(%rsp), %rax
movslq -0x1c(%rsp), %rcx
movl (%rax,%rcx,4), %eax
movl %eax, -0x24(%rsp)
movq -0x10(%rsp), %rax
movslq -0x24(%rsp), %rcx
movl (%rax,%rcx,4), %eax
movl %eax, -0x28(%rsp)
movl -0x1c(%rsp), %eax
addl $0x1, %eax
movl %eax, -0x20(%rsp)
movl -0x20(%rsp), %ecx
xorl %eax, %eax
cmpl -0x18(%rsp), %ecx
movb %al, -0x2a(%rsp)
jg 0x15496c
movl -0x28(%rsp), %eax
movq -0x10(%rsp), %rcx
movq -0x8(%rsp), %rdx
movslq -0x20(%rsp), %rsi
movl (%rdx,%rsi,4), %edx
cmpl (%rcx,%rdx,4), %eax
seta %al
movb %al, -0x2a(%rsp)
movb -0x2a(%rsp), %al
testb $0x1, %al
jne 0x154976
jmp 0x1549a2
movq -0x8(%rsp), %rax
movslq -0x20(%rsp), %rcx
movl (%rax,%rcx,4), %edx
movq -0x8(%rsp), %rax
movl -0x20(%rsp), %ecx
subl $0x1, %ecx
movslq %ecx, %rcx
movl %edx, (%rax,%rcx,4)
movl -0x20(%rsp), %eax
addl $0x1, %eax
movl %eax, -0x20(%rsp)
jmp 0x15493c
movl -0x24(%rsp), %edx
movq -0x8(%rsp), %rax
movl -0x20(%rsp), %ecx
subl $0x1, %ecx
movslq %ecx, %rcx
movl %edx, (%rax,%rcx,4)
movl -0x1c(%rsp), %eax
addl $-0x1, %eax
movl %eax, -0x1c(%rsp)
jmp 0x154901
retq
nopl (%rax)