// File: /workspace/github_c_makefile_star2_O1/samtools[P]htslib/region.c
// Function: kh_resize_reg
static int compare_hts_pair_pos_t (const void *av, const void *bv)
{
    hts_pair_pos_t *a = (hts_pair_pos_t *) av;
    hts_pair_pos_t *b = (hts_pair_pos_t *) bv;
    if (a->beg < b->beg) return -1;
    if (a->beg > b->beg) return  1;
    if (a->end < b->end) return -1;
    if (a->end > b->end) return  1;

    return 0;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x48, %rsp
movq %rdi, %rbx
testl %esi, %esi
je 0x227b3
leal -0x1(%rsi), %eax
movl %eax, %ecx
shrl %ecx
orl %eax, %ecx
movl %ecx, %eax
shrl $0x2, %eax
orl %ecx, %eax
movl %eax, %ecx
shrl $0x4, %ecx
orl %eax, %ecx
movl %ecx, %eax
shrl $0x8, %eax
orl %ecx, %eax
movl %eax, %ecx
shrl $0x10, %ecx
orl %eax, %ecx
negl %esi
shrl $0x1f, %esi
addl %ecx, %esi
jmp 0x227b5
xorl %esi, %esi
cmpl $0x5, %esi
movl $0x4, %r12d
cmovael %esi, %r12d
movl $0x4, %eax
movl 0x4(%rbx), %r13d
cvtsi2sd %r12, %xmm0
mulsd 0x73840(%rip), %xmm0    # 0x96018
addsd 0x73840(%rip), %xmm0    # 0x96020
cvttsd2si %xmm0, %rcx
xorl %r14d, %r14d
cmpl %ecx, %r13d
jae 0x2289c
movq %rcx, 0x8(%rsp)
movl %r12d, %r15d
shrl $0x2, %r15d
andl $-0x4, %r15d
cmpl $0x10, %esi
cmovbl %eax, %r15d
movq %r15, %rdi
callq 0x4680
movl $0xffffffff, %ebp       # imm = 0xFFFFFFFF
testq %rax, %rax
je 0x22a76
movq %rax, %r14
movq %rax, %rdi
movl $0xaa, %esi
movq %r15, %rdx
callq 0x4260
cmpl %r12d, (%rbx)
jae 0x22872
movq 0x18(%rbx), %rdi
movl %r12d, %r15d
leaq (,%r15,4), %rsi
callq 0x4840
testq %rax, %rax
je 0x22879
movq %rax, 0x18(%rbx)
movq 0x20(%rbx), %rdi
shlq $0x3, %r15
leaq (%r15,%r15,2), %rsi
callq 0x4840
movq %rax, %r15
testq %rax, %rax
je 0x22886
movq %r15, 0x20(%rbx)
jmp 0x2288e
movq 0x8(%rsp), %rcx
jmp 0x2289c
movq %r14, %rdi
callq 0x45c0
jmp 0x22a76
movq %r14, %rdi
callq 0x45c0
testq %r15, %r15
movq 0x8(%rsp), %rcx
je 0x22a76
cmpl %ecx, %r13d
jae 0x22a74
movq %rcx, %r13
movl (%rbx), %ecx
testl %ecx, %ecx
je 0x22a28
leal -0x1(%r12), %eax
xorl %edx, %edx
movq 0x10(%rbx), %rdi
movl %edx, %r8d
shrl $0x4, %r8d
movl (%rdi,%r8,4), %r9d
leal (%rdx,%rdx), %ecx
andl $0x1e, %ecx
movl %r9d, %esi
shrl %cl, %esi
testb $0x3, %sil
je 0x228e6
incl %edx
movl (%rbx), %ecx
cmpl %ecx, %edx
jne 0x228b9
jmp 0x22a28
movq 0x18(%rbx), %rsi
movl %edx, %r10d
movl (%rsi,%r10,4), %esi
movq 0x20(%rbx), %r11
leaq (%r10,%r10,2), %r10
movq 0x10(%r11,%r10,8), %r15
movq %r15, 0x20(%rsp)
movupd (%r11,%r10,8), %xmm0
movapd %xmm0, 0x10(%rsp)
btsl %ecx, %r9d
movl %r9d, (%rdi,%r8,4)
movl %esi, %r8d
andl %eax, %r8d
movl %r8d, %edi
shrl $0x4, %edi
movl (%r14,%rdi,4), %r9d
leal (%r8,%r8), %ecx
andl $0x1e, %ecx
movl $0x2, %r10d
shll %cl, %r10d
testl %r9d, %r10d
jne 0x2296a
movl $0x1, %r11d
addl %r11d, %r8d
andl %eax, %r8d
movl %r8d, %edi
leal (%r8,%r8), %ecx
andl $0x1e, %ecx
movl $0x2, %r10d
shll %cl, %r10d
shrl $0x4, %edi
movl (%r14,%rdi,4), %r9d
incl %r11d
testl %r9d, %r10d
je 0x22942
notl %r10d
andl %r9d, %r10d
movl %r10d, (%r14,%rdi,4)
movl %r8d, %r9d
cmpl (%rbx), %r8d
jae 0x2298d
movq 0x10(%rbx), %r8
movl (%r8,%rdi,4), %r8d
shrl %cl, %r8d
testb $0x3, %r8b
je 0x229c1
movq 0x18(%rbx), %rcx
movl %esi, (%rcx,%r9,4)
movq 0x20(%rbx), %rcx
leaq (%r9,%r9,2), %rdi
movq 0x20(%rsp), %r8
movq %r8, 0x10(%rcx,%rdi,8)
movapd 0x10(%rsp), %xmm0
movupd %xmm0, (%rcx,%rdi,8)
xorl %ecx, %ecx
testb %cl, %cl
jne 0x22917
jmp 0x228d9
movq 0x18(%rbx), %r8
movl (%r8,%r9,4), %r10d
movl %esi, (%r8,%r9,4)
movq 0x20(%rbx), %rsi
leaq (%r9,%r9,2), %r8
movq 0x10(%rsi,%r8,8), %r9
movq %r9, 0x40(%rsp)
movups (%rsi,%r8,8), %xmm0
movaps %xmm0, 0x30(%rsp)
movq 0x20(%rsp), %r9
movq %r9, 0x10(%rsi,%r8,8)
movaps 0x10(%rsp), %xmm0
movups %xmm0, (%rsi,%r8,8)
movq 0x40(%rsp), %rsi
movq %rsi, 0x20(%rsp)
movapd 0x30(%rsp), %xmm0
movapd %xmm0, 0x10(%rsp)
movl $0x1, %esi
shll %cl, %esi
movq 0x10(%rbx), %rcx
orl %esi, (%rcx,%rdi,4)
movb $0x1, %cl
movl %r10d, %esi
jmp 0x229b4
cmpl %r12d, %ecx
jbe 0x22a5a
movq 0x18(%rbx), %rdi
movl %r12d, %r15d
leaq (,%r15,4), %rsi
callq 0x4840
movq %rax, 0x18(%rbx)
movq 0x20(%rbx), %rdi
shlq $0x3, %r15
leaq (%r15,%r15,2), %rsi
callq 0x4840
movq %rax, 0x20(%rbx)
movq 0x10(%rbx), %rdi
callq 0x45c0
movq %r14, 0x10(%rbx)
movl %r12d, (%rbx)
movl 0x4(%rbx), %eax
movl %eax, 0x8(%rbx)
movl %r13d, 0xc(%rbx)
xorl %ebp, %ebp
movl %ebp, %eax
addq $0x48, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq