// File: /workspace/github_c_makefile_star2_O2/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
xorl %ebp, %ebp
movl $0x0, %eax
testl %esi, %esi
je 0x1d364
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
movl %esi, %eax
cmpl $0x5, %eax
pushq $0x4
popq %rcx
movl %ecx, %r12d
cmovael %eax, %r12d
cvtsi2sd %r12, %xmm0
mulsd 0x57c9a(%rip), %xmm0    # 0x75018
addsd 0x57c9a(%rip), %xmm0    # 0x75020
cvttsd2si %xmm0, %r13
cmpl %r13d, 0x4(%rbx)
jae 0x1d5bc
movl %r12d, %r15d
shrl $0x2, %r15d
andl $-0x4, %r15d
cmpl $0x10, %eax
cmovbl %ecx, %r15d
movq %r15, %rdi
callq 0x4680
pushq $-0x1
popq %rbp
testq %rax, %rax
je 0x1d5bc
movq %rax, %r14
movq %rax, %rdi
movl $0xaa, %esi
movq %r15, %rdx
callq 0x4260
movl %r12d, %r15d
cmpl %r12d, (%rbx)
movq %r15, 0x20(%rsp)
jae 0x1d413
movq 0x18(%rbx), %rdi
leaq (,%r15,4), %rsi
callq 0x4840
testq %rax, %rax
je 0x1d5b4
movq %rax, 0x18(%rbx)
movq 0x20(%rbx), %rdi
imulq $0x18, %r15, %rsi
callq 0x4840
testq %rax, %rax
je 0x1d5b4
movq %rax, 0x20(%rbx)
movq %r13, 0x28(%rsp)
leal -0x1(%r12), %edx
xorl %eax, %eax
pushq $0x2
popq %r13
pushq $0x1
popq %rdi
cmpl (%rbx), %eax
je 0x1d562
movq 0x10(%rbx), %r8
movl %eax, %r10d
shrl $0x4, %r10d
movl (%r8,%r10,4), %r11d
leal (%rax,%rax), %ecx
andl $0x1e, %ecx
movl %r11d, %esi
shrl %cl, %esi
testb $0x3, %sil
jne 0x1d55b
movq 0x18(%rbx), %rsi
movl %eax, %r15d
movl (%rsi,%r15,4), %r9d
movq 0x20(%rbx), %rsi
imulq $0x18, %r15, %r15
movq 0x10(%rsi,%r15), %rbp
movq %rbp, 0x10(%rsp)
movupd (%rsi,%r15), %xmm0
movapd %xmm0, (%rsp)
btsl %ecx, %r11d
movl %r11d, (%r8,%r10,4)
xorl %ebp, %ebp
movl %r9d, %r11d
andl %edx, %r11d
movl %r11d, %r10d
shrl $0x4, %r10d
movl (%r14,%r10,4), %r15d
leal (%r11,%r11), %ecx
andl $0x1e, %ecx
movl %r13d, %esi
shll %cl, %esi
testl %r15d, %esi
jne 0x1d4b4
addl %ebp, %r11d
incl %r11d
movl %ebp, %ecx
incl %ecx
movl %ecx, %ebp
jmp 0x1d487
notl %esi
andl %esi, %r15d
movl %r15d, (%r14,%r10,4)
movl %r11d, %ebp
cmpl (%rbx), %r11d
jae 0x1d537
movl (%r8,%r10,4), %esi
shrl %cl, %esi
movq 0x18(%rbx), %r8
testb $0x3, %sil
jne 0x1d53b
movl (%r8,%rbp,4), %esi
movl %r9d, (%r8,%rbp,4)
movq 0x20(%rbx), %r8
imulq $0x18, %rbp, %r9
movq 0x10(%r8,%r9), %r11
movq %r11, 0x40(%rsp)
movups (%r8,%r9), %xmm0
movaps %xmm0, 0x30(%rsp)
movq 0x10(%rsp), %r11
movq %r11, 0x10(%r8,%r9)
movaps (%rsp), %xmm0
movups %xmm0, (%r8,%r9)
movq 0x40(%rsp), %r8
movq %r8, 0x10(%rsp)
movapd 0x30(%rsp), %xmm0
movapd %xmm0, (%rsp)
movl %edi, %r9d
shll %cl, %r9d
movq 0x10(%rbx), %r8
orl %r9d, (%r8,%r10,4)
movl %esi, %r9d
jmp 0x1d482
movq 0x18(%rbx), %r8
movl %r9d, (%r8,%rbp,4)
movq 0x20(%rbx), %rcx
imulq $0x18, %rbp, %rsi
movq 0x10(%rsp), %r8
movq %r8, 0x10(%rcx,%rsi)
movapd (%rsp), %xmm0
movupd %xmm0, (%rcx,%rsi)
incl %eax
jmp 0x1d426
cmpl %r12d, %eax
jbe 0x1d592
movq 0x18(%rbx), %rdi
movq 0x20(%rsp), %r15
leaq (,%r15,4), %rsi
callq 0x4840
movq %rax, 0x18(%rbx)
movq 0x20(%rbx), %rdi
imulq $0x18, %r15, %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)
movq 0x28(%rsp), %rax
movl %eax, 0xc(%rbx)
xorl %ebp, %ebp
jmp 0x1d5bc
movq %r14, %rdi
callq 0x45c0
movl %ebp, %eax
addq $0x48, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq