LLM4Binary/decompile-bench-makefile huggingface dataset:
// File: Baobaobear[P]sort/sorttest.cpp
// Function: data_shuffle_shellsort(baobao::TestClass*, unsigned long)
static void data_shuffle_shellsort(sort_element_t arr[], size_t n)
{
    baobao::random_shuffle(arr, arr + n);

    sort_element_t *beg = arr, *end = arr + n;
    size_t incre = 1;
    while (incre < (size_t)(end - beg) / 3)
        incre = incre * 3 + 1; // A003462, Pratt, 1971, Knuth, 1973
    for (; incre >= 10; incre /= 3)
    {
        sort_element_t *bound = beg + incre;
        for (sort_element_t *i = bound; i < end; ++i)
        {
            sort_element_t *p = i;
            sort_element_t val = *i;
            for (; p >= bound && val < *(p - incre); p -= incre)
                *p = *(p - incre);
            *p = val;
        }
    }
}

// Assembly:
subq $0x78, %rsp
movq %rdi, 0x70(%rsp)
movq %rsi, 0x68(%rsp)
movq 0x70(%rsp), %rdi
movq 0x70(%rsp), %rsi
movq 0x68(%rsp), %rax
shlq $0x5, %rax
addq %rax, %rsi
callq 0x85d0
movq 0x70(%rsp), %rax
movq %rax, 0x60(%rsp)
movq 0x70(%rsp), %rax
movq 0x68(%rsp), %rcx
shlq $0x5, %rcx
addq %rcx, %rax
movq %rax, 0x58(%rsp)
movq $0x1, 0x50(%rsp)
movq 0x50(%rsp), %rax
movq %rax, 0x10(%rsp)
movq 0x58(%rsp), %rax
movq 0x60(%rsp), %rcx
subq %rcx, %rax
sarq $0x5, %rax
movl $0x3, %ecx
xorl %edx, %edx
divq %rcx
movq %rax, %rcx
movq 0x10(%rsp), %rax
cmpq %rcx, %rax
jae 0x5735
imulq $0x3, 0x50(%rsp), %rax
addq $0x1, %rax
movq %rax, 0x50(%rsp)
jmp 0x56f2
jmp 0x5737
cmpq $0xa, 0x50(%rsp)
jb 0x5840
movq 0x60(%rsp), %rax
movq 0x50(%rsp), %rcx
shlq $0x5, %rcx
addq %rcx, %rax
movq %rax, 0x48(%rsp)
movq 0x48(%rsp), %rax
movq %rax, 0x40(%rsp)
movq 0x40(%rsp), %rax
cmpq 0x58(%rsp), %rax
jae 0x5825
movq 0x40(%rsp), %rax
movq %rax, 0x38(%rsp)
movq 0x40(%rsp), %rsi
leaq 0x18(%rsp), %rdi
callq 0x86a0
movq 0x38(%rsp), %rcx
xorl %eax, %eax
cmpq 0x48(%rsp), %rcx
movb %al, 0xf(%rsp)
jb 0x57bf
movq 0x38(%rsp), %rsi
xorl %eax, %eax
subq 0x50(%rsp), %rax
shlq $0x5, %rax
addq %rax, %rsi
leaq 0x18(%rsp), %rdi
callq 0x5a00
movb %al, 0xf(%rsp)
movb 0xf(%rsp), %al
testb $0x1, %al
jne 0x57c9
jmp 0x5803
movq 0x38(%rsp), %rsi
xorl %eax, %eax
subq 0x50(%rsp), %rax
shlq $0x5, %rax
addq %rax, %rsi
movq 0x38(%rsp), %rdi
callq 0x8710
movq 0x50(%rsp), %rdx
movq 0x38(%rsp), %rax
xorl %ecx, %ecx
subq %rdx, %rcx
shlq $0x5, %rcx
addq %rcx, %rax
movq %rax, 0x38(%rsp)
jmp 0x578c
movq 0x38(%rsp), %rdi
leaq 0x18(%rsp), %rsi
callq 0x8710
movq 0x40(%rsp), %rax
addq $0x20, %rax
movq %rax, 0x40(%rsp)
jmp 0x5763
jmp 0x5827
movq 0x50(%rsp), %rax
movl $0x3, %ecx
xorl %edx, %edx
divq %rcx
movq %rax, 0x50(%rsp)
jmp 0x5737
addq $0x78, %rsp
retq
nopw %cs:(%rax,%rax)
// File: Baobaobear[P]sort/./sortlib.hpp
// Function: baobao::util::uint32_distributor<baobao::util::taus88>::distribution(unsigned int)
uint32_t distribution(uint32_t n) {
        if (n <= 0)
            return 0;
        if (n <= 0xffff)
        {
            if (n <= 0xff)
                return i8(n);
            else
                return i16(n);
        }
        else
            return i32(n);
    }

// Assembly:
subq $0x28, %rsp
movq %rdi, 0x18(%rsp)
movl %esi, 0x14(%rsp)
movq 0x18(%rsp), %rax
movq %rax, 0x8(%rsp)
cmpl $0x0, 0x14(%rsp)
ja 0x59a8
movl $0x0, 0x24(%rsp)
jmp 0x59f6
cmpl $0xffff, 0x14(%rsp)     # imm = 0xFFFF
ja 0x59e4
cmpl $0xff, 0x14(%rsp)
ja 0x59d0
movq 0x8(%rsp), %rdi
movl 0x14(%rsp), %esi
callq 0x9f70
movl %eax, 0x24(%rsp)
jmp 0x59f6
movq 0x8(%rsp), %rdi
movl 0x14(%rsp), %esi
callq 0xa0b0
movl %eax, 0x24(%rsp)
jmp 0x59f6
movq 0x8(%rsp), %rdi
movl 0x14(%rsp), %esi
callq 0xa1f0
movl %eax, 0x24(%rsp)
movl 0x24(%rsp), %eax
addq $0x28, %rsp
retq
nop
// File: Baobaobear[P]sort/./sortlib.hpp
// Function: void baobao::internal::q_insert_sort<baobao::internal::indirect_sort_iter_warp<baobao::TestClass*>*, baobao::internal::indirect_sort_comp_warp<baobao::TestClass*, std::less<baobao::TestClass>>>(baobao::internal::indirect_sort_iter_warp<baobao::TestClass*>*, baobao::internal::indirect_sort_iter_warp<baobao::TestClass*>*, baobao::internal::indirect_sort_comp_warp<baobao::TestClass*, std::less<baobao::TestClass>>)
void q_insert_sort(RandomAccessIterator beg, RandomAccessIterator end, Comp compare)
{
    const int incre = 13;
    for (RandomAccessIterator i = beg + incre, j = beg; i < end; ++i, ++j)
    {
        if (compare(*i, *j))
        {
            std::swap(*i, *j);
        }
    }

    for (RandomAccessIterator i = beg + 1; i < end; ++i)
    {
        if (compare(*i, *(i - 1)))
        {
            typename std::iterator_traits<RandomAccessIterator>::value_type val = *i;
            RandomAccessIterator j = i - 1;
            *i = *j;
            for (;j != beg && compare(val, *(j - 1)); --j)
            {
                *j = *(j - 1);
            }
            *j = val;
        }
    }
}

// Assembly:
subq $0x68, %rsp
movq %rdx, 0x10(%rsp)
movq %rdi, 0x60(%rsp)
movq %rsi, 0x58(%rsp)
movq %rdx, 0x50(%rsp)
movl $0xd, 0x4c(%rsp)
movq 0x60(%rsp), %rax
addq $0xd0, %rax
movq %rax, 0x40(%rsp)
movq 0x60(%rsp), %rax
movq %rax, 0x38(%rsp)
movq 0x40(%rsp), %rax
cmpq 0x58(%rsp), %rax
jae 0x1370f
movq 0x10(%rsp), %rdi
movq 0x40(%rsp), %rsi
movq 0x38(%rsp), %rdx
callq 0x144a0
testb $0x1, %al
jne 0x136e0
jmp 0x136ef
movq 0x40(%rsp), %rdi
movq 0x38(%rsp), %rsi
callq 0x14880
jmp 0x136f1
movq 0x40(%rsp), %rax
addq $0x10, %rax
movq %rax, 0x40(%rsp)
movq 0x38(%rsp), %rax
addq $0x10, %rax
movq %rax, 0x38(%rsp)
jmp 0x136ba
movq 0x60(%rsp), %rax
addq $0x10, %rax
movq %rax, 0x30(%rsp)
movq 0x30(%rsp), %rax
cmpq 0x58(%rsp), %rax
jae 0x13816
movq 0x10(%rsp), %rdi
movq 0x30(%rsp), %rsi
movq 0x30(%rsp), %rdx
addq $-0x10, %rdx
callq 0x144a0
testb $0x1, %al
jne 0x1374e
jmp 0x13801
movq 0x30(%rsp), %rax
movq (%rax), %rcx
movq %rcx, 0x20(%rsp)
movq 0x8(%rax), %rax
movq %rax, 0x28(%rsp)
movq 0x30(%rsp), %rax
addq $-0x10, %rax
movq %rax, 0x18(%rsp)
movq 0x18(%rsp), %rcx
movq 0x30(%rsp), %rax
movq (%rcx), %rdx
movq %rdx, (%rax)
movq 0x8(%rcx), %rcx
movq %rcx, 0x8(%rax)
movq 0x18(%rsp), %rcx
xorl %eax, %eax
cmpq 0x60(%rsp), %rcx
movb %al, 0xf(%rsp)
je 0x137b8
movq 0x10(%rsp), %rdi
movq 0x18(%rsp), %rdx
addq $-0x10, %rdx
leaq 0x20(%rsp), %rsi
callq 0x144a0
movb %al, 0xf(%rsp)
movb 0xf(%rsp), %al
testb $0x1, %al
jne 0x137c2
jmp 0x137eb
movq 0x18(%rsp), %rcx
movq 0x18(%rsp), %rax
movq -0x10(%rcx), %rdx
movq %rdx, (%rax)
movq -0x8(%rcx), %rcx
movq %rcx, 0x8(%rax)
movq 0x18(%rsp), %rax
addq $-0x10, %rax
movq %rax, 0x18(%rsp)
jmp 0x1378a
movq 0x18(%rsp), %rax
movq 0x20(%rsp), %rcx
movq %rcx, (%rax)
movq 0x28(%rsp), %rcx
movq %rcx, 0x8(%rax)
jmp 0x13803
movq 0x30(%rsp), %rax
addq $0x10, %rax
movq %rax, 0x30(%rsp)
jmp 0x1371d
addq $0x68, %rsp
retq
nopl (%rax,%rax)
// File: Baobaobear[P]sort/./sorttest.hpp
// Function: bool baobao::check_sorted<__gnu_cxx::__normal_iterator<baobao::TestClass*, std::vector<baobao::TestClass, std::allocator<baobao::TestClass>>>, std::less<baobao::TestClass>>(__gnu_cxx::__normal_iterator<baobao::TestClass*, std::vector<baobao::TestClass, std::allocator<baobao::TestClass>>>, __gnu_cxx::__normal_iterator<baobao::TestClass*, std::vector<baobao::TestClass, std::allocator<baobao::TestClass>>>, std::less<baobao::TestClass>)
bool check_sorted(RandomAccessIterator beg, RandomAccessIterator end, Comp compare)
{
    for (RandomAccessIterator i = beg + 1; i != end; ++i)
        if (compare(*i, *(i - 1)))
            return false;
    return true;
}

// Assembly:
subq $0x38, %rsp
movq %rdi, 0x28(%rsp)
movq %rsi, 0x20(%rsp)
leaq 0x28(%rsp), %rdi
movl $0x1, %esi
callq 0x6570
movq %rax, 0x10(%rsp)
leaq 0x10(%rsp), %rdi
leaq 0x20(%rsp), %rsi
callq 0x217b0
testb $0x1, %al
jne 0x69c7
jmp 0x6a1f
leaq 0x10(%rsp), %rdi
callq 0x65b0
movq %rax, (%rsp)
leaq 0x10(%rsp), %rdi
movl $0x1, %esi
callq 0x6a60
movq %rax, 0x8(%rsp)
leaq 0x8(%rsp), %rdi
callq 0x65b0
movq (%rsp), %rsi
movq %rax, %rdx
leaq 0x1f(%rsp), %rdi
callq 0xcd80
testb $0x1, %al
jne 0x6a0a
jmp 0x6a11
movb $0x0, 0x37(%rsp)
jmp 0x6a24
jmp 0x6a13
leaq 0x10(%rsp), %rdi
callq 0x217f0
jmp 0x69b2
movb $0x1, 0x37(%rsp)
movb 0x37(%rsp), %al
andb $0x1, %al
addq $0x38, %rsp
retq
nop
// File: Baobaobear[P]sort/./sorttest.hpp
// Function: bool baobao::check_sorted_stable<__gnu_cxx::__normal_iterator<baobao::TestClass*, std::vector<baobao::TestClass, std::allocator<baobao::TestClass>>>, std::less<baobao::TestClass>>(__gnu_cxx::__normal_iterator<baobao::TestClass*, std::vector<baobao::TestClass, std::allocator<baobao::TestClass>>>, __gnu_cxx::__normal_iterator<baobao::TestClass*, std::vector<baobao::TestClass, std::allocator<baobao::TestClass>>>, std::less<baobao::TestClass>)
bool check_sorted_stable(RandomAccessIterator beg, RandomAccessIterator end, Comp compare)
{
    for (RandomAccessIterator i = beg + 1; i != end; ++i)
    {
        if (compare(*i, *(i - 1)))
            return false;
        if (!compare(*(i - 1), *i))
        {
            if ((*(i - 1)).index > (*i).index)
            {
                return false;
            }
        }
    }
    return true;
}

// Assembly:
subq $0x58, %rsp
movq %rdi, 0x48(%rsp)
movq %rsi, 0x40(%rsp)
leaq 0x48(%rsp), %rdi
movl $0x1, %esi
callq 0x6570
movq %rax, 0x30(%rsp)
leaq 0x30(%rsp), %rdi
leaq 0x40(%rsp), %rsi
callq 0x217b0
testb $0x1, %al
jne 0x6aea
jmp 0x6bd5
leaq 0x30(%rsp), %rdi
callq 0x65b0
movq %rax, 0x10(%rsp)
leaq 0x30(%rsp), %rdi
movl $0x1, %esi
callq 0x6a60
movq %rax, 0x28(%rsp)
leaq 0x28(%rsp), %rdi
callq 0x65b0
movq 0x10(%rsp), %rsi
movq %rax, %rdx
leaq 0x3f(%rsp), %rdi
callq 0xcd80
testb $0x1, %al
jne 0x6b2f
jmp 0x6b39
movb $0x0, 0x57(%rsp)
jmp 0x6bda
leaq 0x30(%rsp), %rdi
movl $0x1, %esi
callq 0x6a60
movq %rax, 0x20(%rsp)
leaq 0x20(%rsp), %rdi
callq 0x65b0
movq %rax, 0x8(%rsp)
leaq 0x30(%rsp), %rdi
callq 0x65b0
movq 0x8(%rsp), %rsi
movq %rax, %rdx
leaq 0x3f(%rsp), %rdi
callq 0xcd80
xorb $-0x1, %al
testb $0x1, %al
jne 0x6b80
jmp 0x6bc4
leaq 0x30(%rsp), %rdi
movl $0x1, %esi
callq 0x6a60
movq %rax, 0x18(%rsp)
leaq 0x18(%rsp), %rdi
callq 0x65b0
movl 0x4(%rax), %eax
movl %eax, 0x4(%rsp)
leaq 0x30(%rsp), %rdi
callq 0x65b0
movq %rax, %rcx
movl 0x4(%rsp), %eax
cmpl 0x4(%rcx), %eax
jle 0x6bc2
movb $0x0, 0x57(%rsp)
jmp 0x6bda
jmp 0x6bc4
jmp 0x6bc6
leaq 0x30(%rsp), %rdi
callq 0x217f0
jmp 0x6ad2
movb $0x1, 0x57(%rsp)
movb 0x57(%rsp), %al
andb $0x1, %al
addq $0x58, %rsp
retq
nopw %cs:(%rax,%rax)
nop
// File: Baobaobear[P]sort/./sortlib.hpp
// Function: baobao::util::taus88::init(unsigned int, unsigned int, unsigned int)
void init (uint32_t seed1, uint32_t seed2, uint32_t seed3)
    {
        s[0] = seed1;
        s[1] = seed2;
        s[2] = seed3;
        for (int i = 0; i < init_iter; ++i) (*this)();
    }

// Assembly:
subq $0x28, %rsp
movq %rdi, 0x20(%rsp)
movl %esi, 0x1c(%rsp)
movl %edx, 0x18(%rsp)
movl %ecx, 0x14(%rsp)
movq 0x20(%rsp), %rax
movq %rax, 0x8(%rsp)
movl 0x1c(%rsp), %ecx
movl %ecx, (%rax)
movl 0x18(%rsp), %ecx
movl %ecx, 0x4(%rax)
movl 0x14(%rsp), %ecx
movl %ecx, 0x8(%rax)
movl $0x0, 0x10(%rsp)
cmpl $0x10, 0x10(%rsp)
jge 0x74e9
movq 0x8(%rsp), %rdi
callq 0x74f0
movl 0x10(%rsp), %eax
addl $0x1, %eax
movl %eax, 0x10(%rsp)
jmp 0x74cb
addq $0x28, %rsp
retq
nop
// File: Baobaobear[P]sort/./sortlib.hpp
// Function: baobao::util::taus88::operator()()
uint32_t operator()() {
        s[0] = tausworthe(s[0], 12, 13, 19, 4294967294UL);
        s[1] = tausworthe(s[1], 4, 2, 25, 4294967288UL);
        s[2] = tausworthe(s[2], 17, 3, 11, 4294967280UL);
        return (s[0] ^ s[1] ^ s[2]);
    }

// Assembly:
subq $0x18, %rsp
movq %rdi, 0x10(%rsp)
movq 0x10(%rsp), %rdi
movq %rdi, 0x8(%rsp)
movl (%rdi), %esi
movl $0xc, %edx
movl $0xd, %ecx
movl $0x13, %r8d
movl $0xfffffffe, %r9d       # imm = 0xFFFFFFFE
callq 0x7580
movq 0x8(%rsp), %rdi
movl %eax, (%rdi)
movl 0x4(%rdi), %esi
movl $0x4, %edx
movl $0x2, %ecx
movl $0x19, %r8d
movl $0xfffffff8, %r9d       # imm = 0xFFFFFFF8
callq 0x7580
movq 0x8(%rsp), %rdi
movl %eax, 0x4(%rdi)
movl 0x8(%rdi), %esi
movl $0x11, %edx
movl $0x3, %ecx
movl $0xb, %r8d
movl $0xfffffff0, %r9d       # imm = 0xFFFFFFF0
callq 0x7580
movq 0x8(%rsp), %rcx
movl %eax, 0x8(%rcx)
movl (%rcx), %eax
xorl 0x4(%rcx), %eax
xorl 0x8(%rcx), %eax
addq $0x18, %rsp
retq
// File: Baobaobear[P]sort/./sorttest.hpp
// Function: void baobao::random_shuffle<baobao::TestClass*>(baobao::TestClass*, baobao::TestClass*)
void random_shuffle(RandomAccessIterator beg, RandomAccessIterator end)
{
    typename std::iterator_traits<RandomAccessIterator>::difference_type n;
    n = end - beg;
    while (--n >= 1)
    {
        std::swap(*(beg + n), *(beg + random_int((uint32_t)n)));
    }
}

// Assembly:
subq $0x28, %rsp
movq %rdi, 0x20(%rsp)
movq %rsi, 0x18(%rsp)
movq 0x18(%rsp), %rax
movq 0x20(%rsp), %rcx
subq %rcx, %rax
sarq $0x5, %rax
movq %rax, 0x10(%rsp)
movq 0x10(%rsp), %rax
addq $-0x1, %rax
movq %rax, 0x10(%rsp)
cmpq $0x1, %rax
jl 0x864c
movq 0x20(%rsp), %rax
movq 0x10(%rsp), %rcx
shlq $0x5, %rcx
addq %rcx, %rax
movq %rax, 0x8(%rsp)
movq 0x20(%rsp), %rax
movq %rax, (%rsp)
movq 0x10(%rsp), %rax
movl %eax, %edi
callq 0x24a0
movq (%rsp), %rsi
movq 0x8(%rsp), %rdi
movl %eax, %eax
shlq $0x5, %rax
addq %rax, %rsi
callq 0x8660
jmp 0x85f4
addq $0x28, %rsp
retq
nopw %cs:(%rax,%rax)
nopl (%rax,%rax)
// File: Baobaobear[P]sort/./sorttest.hpp
// Function: baobao::TestClass::operator=(baobao::TestClass const&)
TestClass& operator = (const TestClass& v)
    {
        val = v.val;
        index = v.index;
        for (int i = 0; i < data_len; ++i)
        {
            data[i] = v.data[i];
        }
        return *this;
    }

// Assembly:
movq %rdi, -0x8(%rsp)
movq %rsi, -0x10(%rsp)
movq -0x8(%rsp), %rax
movq %rax, -0x20(%rsp)
movq -0x10(%rsp), %rcx
movl (%rcx), %ecx
movl %ecx, (%rax)
movq -0x10(%rsp), %rcx
movl 0x4(%rcx), %ecx
movl %ecx, 0x4(%rax)
movl $0x0, -0x14(%rsp)
cmpl $0x6, -0x14(%rsp)
jge 0x8770
movq -0x20(%rsp), %rax
movq -0x10(%rsp), %rcx
movslq -0x14(%rsp), %rdx
movl 0x8(%rcx,%rdx,4), %edx
movslq -0x14(%rsp), %rcx
movl %edx, 0x8(%rax,%rcx,4)
movl -0x14(%rsp), %eax
addl $0x1, %eax
movl %eax, -0x14(%rsp)
jmp 0x8740
movq -0x20(%rsp), %rax
retq
nopw %cs:(%rax,%rax)
// File: Baobaobear[P]sort/./sortlib.hpp
// Function: baobao::util::uint32_distributor<baobao::util::taus88>::i8(unsigned int)
uint32_t i8(uint32_t n) {
        ++n;
        if (r8s == 0) {
            r8 = eg(); r8s = 4;
        }
        if ((n & -n) == n) {
            --r8s;
            uint32_t r = r8 & 0xff;
            r8 >>= 8;
            return r & (n - 1);
        }
        uint32_t m = n;
        while (m & (m - 1)) m += m & -m;
        --m;
        for (;;) {
            --r8s;
            uint32_t r = r8 & 0xff;
            r8 >>= 8;
            r &= m;
            if (r < n) return r;
            if (r8s == 0) {
                r8 = eg(); r8s = 4;
            }
        }
    }

// Assembly:
subq $0x28, %rsp
movq %rdi, 0x18(%rsp)
movl %esi, 0x14(%rsp)
movq 0x18(%rsp), %rax
movq %rax, (%rsp)
movl 0x14(%rsp), %ecx
addl $0x1, %ecx
movl %ecx, 0x14(%rsp)
cmpl $0x0, 0x14(%rax)
jne 0x9fb3
movq (%rsp), %rax
movq (%rax), %rdi
callq 0x74f0
movl %eax, %ecx
movq (%rsp), %rax
movl %ecx, 0x10(%rax)
movl $0x4, 0x14(%rax)
movl 0x14(%rsp), %eax
xorl %ecx, %ecx
subl 0x14(%rsp), %ecx
andl %ecx, %eax
cmpl 0x14(%rsp), %eax
jne 0x9ffe
movq (%rsp), %rax
movl 0x14(%rax), %ecx
addl $-0x1, %ecx
movl %ecx, 0x14(%rax)
movl 0x10(%rax), %ecx
andl $0xff, %ecx
movl %ecx, 0x10(%rsp)
movl 0x10(%rax), %ecx
shrl $0x8, %ecx
movl %ecx, 0x10(%rax)
movl 0x10(%rsp), %eax
movl 0x14(%rsp), %ecx
subl $0x1, %ecx
andl %ecx, %eax
movl %eax, 0x24(%rsp)
jmp 0xa0a4
movl 0x14(%rsp), %eax
movl %eax, 0xc(%rsp)
movl 0xc(%rsp), %eax
movl 0xc(%rsp), %ecx
subl $0x1, %ecx
andl %ecx, %eax
cmpl $0x0, %eax
je 0xa02e
movl 0xc(%rsp), %eax
xorl %ecx, %ecx
subl 0xc(%rsp), %ecx
andl %ecx, %eax
addl 0xc(%rsp), %eax
movl %eax, 0xc(%rsp)
jmp 0xa006
movl 0xc(%rsp), %eax
addl $-0x1, %eax
movl %eax, 0xc(%rsp)
movq (%rsp), %rax
movl 0x14(%rax), %ecx
addl $-0x1, %ecx
movl %ecx, 0x14(%rax)
movl 0x10(%rax), %ecx
andl $0xff, %ecx
movl %ecx, 0x8(%rsp)
movl 0x10(%rax), %ecx
shrl $0x8, %ecx
movl %ecx, 0x10(%rax)
movl 0xc(%rsp), %eax
andl 0x8(%rsp), %eax
movl %eax, 0x8(%rsp)
movl 0x8(%rsp), %eax
cmpl 0x14(%rsp), %eax
jae 0xa07c
movl 0x8(%rsp), %eax
movl %eax, 0x24(%rsp)
jmp 0xa0a4
movq (%rsp), %rax
cmpl $0x0, 0x14(%rax)
jne 0xa0a2
movq (%rsp), %rax
movq (%rax), %rdi
callq 0x74f0
movl %eax, %ecx
movq (%rsp), %rax
movl %ecx, 0x10(%rax)
movl $0x4, 0x14(%rax)
jmp 0xa039
movl 0x24(%rsp), %eax
addq $0x28, %rsp
retq
nopl (%rax)
// File: Baobaobear[P]sort/./sortlib.hpp
// Function: baobao::util::uint32_distributor<baobao::util::taus88>::i16(unsigned int)
uint32_t i16(uint32_t n) {
        ++n;
        if (r16s == 0) {
            r16 = eg(); r16s = 2;
        }
        if ((n & -n) == n) {
            --r16s;
            uint32_t r = r16 & 0xffff;
            r16 >>= 16;
            return r & (n - 1);
        }
        uint32_t m = n;
        while (m & (m - 1)) m += m & -m;
        --m;
        for (;;) {
            --r16s;
            uint32_t r = r16 & 0xffff;
            r16 >>= 16;
            r &= m;
            if (r < n) return r;
            if (r16s == 0) {
                r16 = eg(); r16s = 2;
            }
        }
    }

// Assembly:
subq $0x28, %rsp
movq %rdi, 0x18(%rsp)
movl %esi, 0x14(%rsp)
movq 0x18(%rsp), %rax
movq %rax, (%rsp)
movl 0x14(%rsp), %ecx
addl $0x1, %ecx
movl %ecx, 0x14(%rsp)
cmpl $0x0, 0xc(%rax)
jne 0xa0f3
movq (%rsp), %rax
movq (%rax), %rdi
callq 0x74f0
movl %eax, %ecx
movq (%rsp), %rax
movl %ecx, 0x8(%rax)
movl $0x2, 0xc(%rax)
movl 0x14(%rsp), %eax
xorl %ecx, %ecx
subl 0x14(%rsp), %ecx
andl %ecx, %eax
cmpl 0x14(%rsp), %eax
jne 0xa13e
movq (%rsp), %rax
movl 0xc(%rax), %ecx
addl $-0x1, %ecx
movl %ecx, 0xc(%rax)
movl 0x8(%rax), %ecx
andl $0xffff, %ecx           # imm = 0xFFFF
movl %ecx, 0x10(%rsp)
movl 0x8(%rax), %ecx
shrl $0x10, %ecx
movl %ecx, 0x8(%rax)
movl 0x10(%rsp), %eax
movl 0x14(%rsp), %ecx
subl $0x1, %ecx
andl %ecx, %eax
movl %eax, 0x24(%rsp)
jmp 0xa1e4
movl 0x14(%rsp), %eax
movl %eax, 0xc(%rsp)
movl 0xc(%rsp), %eax
movl 0xc(%rsp), %ecx
subl $0x1, %ecx
andl %ecx, %eax
cmpl $0x0, %eax
je 0xa16e
movl 0xc(%rsp), %eax
xorl %ecx, %ecx
subl 0xc(%rsp), %ecx
andl %ecx, %eax
addl 0xc(%rsp), %eax
movl %eax, 0xc(%rsp)
jmp 0xa146
movl 0xc(%rsp), %eax
addl $-0x1, %eax
movl %eax, 0xc(%rsp)
movq (%rsp), %rax
movl 0xc(%rax), %ecx
addl $-0x1, %ecx
movl %ecx, 0xc(%rax)
movl 0x8(%rax), %ecx
andl $0xffff, %ecx           # imm = 0xFFFF
movl %ecx, 0x8(%rsp)
movl 0x8(%rax), %ecx
shrl $0x10, %ecx
movl %ecx, 0x8(%rax)
movl 0xc(%rsp), %eax
andl 0x8(%rsp), %eax
movl %eax, 0x8(%rsp)
movl 0x8(%rsp), %eax
cmpl 0x14(%rsp), %eax
jae 0xa1bc
movl 0x8(%rsp), %eax
movl %eax, 0x24(%rsp)
jmp 0xa1e4
movq (%rsp), %rax
cmpl $0x0, 0xc(%rax)
jne 0xa1e2
movq (%rsp), %rax
movq (%rax), %rdi
callq 0x74f0
movl %eax, %ecx
movq (%rsp), %rax
movl %ecx, 0x8(%rax)
movl $0x2, 0xc(%rax)
jmp 0xa179
movl 0x24(%rsp), %eax
addq $0x28, %rsp
retq
nopl (%rax)
// File: Baobaobear[P]sort/./sortlib.hpp
// Function: baobao::util::uint32_distributor<baobao::util::taus88>::i32(unsigned int)
uint32_t i32(uint32_t n) {
        ++n;
        if ((n & -n) == n) {
            uint32_t r = (uint32_t)eg();
            return r & (n - 1);
        }
        uint32_t m = n;
        while (m & (m - 1)) m += m & -m;
        --m;
        for (;;) {
            uint32_t r = (uint32_t)eg();
            r &= m;
            if (r < n) return r;
        }
    }

// Assembly:
subq $0x28, %rsp
movq %rdi, 0x18(%rsp)
movl %esi, 0x14(%rsp)
movq 0x18(%rsp), %rax
movq %rax, (%rsp)
movl 0x14(%rsp), %eax
addl $0x1, %eax
movl %eax, 0x14(%rsp)
movl 0x14(%rsp), %eax
xorl %ecx, %ecx
subl 0x14(%rsp), %ecx
andl %ecx, %eax
cmpl 0x14(%rsp), %eax
jne 0xa246
movq (%rsp), %rax
movq (%rax), %rdi
callq 0x74f0
movl %eax, 0x10(%rsp)
movl 0x10(%rsp), %eax
movl 0x14(%rsp), %ecx
subl $0x1, %ecx
andl %ecx, %eax
movl %eax, 0x24(%rsp)
jmp 0xa2b3
movl 0x14(%rsp), %eax
movl %eax, 0xc(%rsp)
movl 0xc(%rsp), %eax
movl 0xc(%rsp), %ecx
subl $0x1, %ecx
andl %ecx, %eax
cmpl $0x0, %eax
je 0xa276
movl 0xc(%rsp), %eax
xorl %ecx, %ecx
subl 0xc(%rsp), %ecx
andl %ecx, %eax
addl 0xc(%rsp), %eax
movl %eax, 0xc(%rsp)
jmp 0xa24e
movl 0xc(%rsp), %eax
addl $-0x1, %eax
movl %eax, 0xc(%rsp)
movq (%rsp), %rax
movq (%rax), %rdi
callq 0x74f0
movl %eax, 0x8(%rsp)
movl 0xc(%rsp), %eax
andl 0x8(%rsp), %eax
movl %eax, 0x8(%rsp)
movl 0x8(%rsp), %eax
cmpl 0x14(%rsp), %eax
jae 0xa2b1
movl 0x8(%rsp), %eax
movl %eax, 0x24(%rsp)
jmp 0xa2b3
jmp 0xa281
movl 0x24(%rsp), %eax
addq $0x28, %rsp
retq
nopl (%rax)
// File: Baobaobear[P]sort/./sortlib.hpp
// Function: void baobao::internal::insert_sort<baobao::internal::indirect_sort_iter_warp<baobao::TestClass*>*, baobao::internal::indirect_sort_comp_warp<baobao::TestClass*, std::less<baobao::TestClass>>>(baobao::internal::indirect_sort_iter_warp<baobao::TestClass*>*, baobao::internal::indirect_sort_iter_warp<baobao::TestClass*>*, baobao::internal::indirect_sort_comp_warp<baobao::TestClass*, std::less<baobao::TestClass>>)
void insert_sort(RandomAccessIterator beg, RandomAccessIterator end, Comp compare)
{
    for (RandomAccessIterator i = beg + 1; i < end; ++i)
    {
        if (compare(*i, *(i - 1)))
        {
            typename std::iterator_traits<RandomAccessIterator>::value_type val = *i;
            RandomAccessIterator j = i - 1;
            *i = *j;
            for (;j != beg && compare(val, *(j - 1)); --j)
            {
                *j = *(j - 1);
            }
            *j = val;
        }
    }
}

// Assembly:
subq $0x48, %rsp
movq %rdx, 0x8(%rsp)
movq %rdi, 0x40(%rsp)
movq %rsi, 0x38(%rsp)
movq %rdx, 0x30(%rsp)
movq 0x40(%rsp), %rax
addq $0x10, %rax
movq %rax, 0x28(%rsp)
movq 0x28(%rsp), %rax
cmpq 0x38(%rsp), %rax
jae 0x149ef
movq 0x8(%rsp), %rdi
movq 0x28(%rsp), %rsi
movq 0x28(%rsp), %rdx
addq $-0x10, %rdx
callq 0x144a0
testb $0x1, %al
jne 0x14927
jmp 0x149da
movq 0x28(%rsp), %rax
movq (%rax), %rcx
movq %rcx, 0x18(%rsp)
movq 0x8(%rax), %rax
movq %rax, 0x20(%rsp)
movq 0x28(%rsp), %rax
addq $-0x10, %rax
movq %rax, 0x10(%rsp)
movq 0x10(%rsp), %rcx
movq 0x28(%rsp), %rax
movq (%rcx), %rdx
movq %rdx, (%rax)
movq 0x8(%rcx), %rcx
movq %rcx, 0x8(%rax)
movq 0x10(%rsp), %rcx
xorl %eax, %eax
cmpq 0x40(%rsp), %rcx
movb %al, 0x7(%rsp)
je 0x14991
movq 0x8(%rsp), %rdi
movq 0x10(%rsp), %rdx
addq $-0x10, %rdx
leaq 0x18(%rsp), %rsi
callq 0x144a0
movb %al, 0x7(%rsp)
movb 0x7(%rsp), %al
testb $0x1, %al
jne 0x1499b
jmp 0x149c4
movq 0x10(%rsp), %rcx
movq 0x10(%rsp), %rax
movq -0x10(%rcx), %rdx
movq %rdx, (%rax)
movq -0x8(%rcx), %rcx
movq %rcx, 0x8(%rax)
movq 0x10(%rsp), %rax
addq $-0x10, %rax
movq %rax, 0x10(%rsp)
jmp 0x14963
movq 0x10(%rsp), %rax
movq 0x18(%rsp), %rcx
movq %rcx, (%rax)
movq 0x20(%rsp), %rcx
movq %rcx, 0x8(%rax)
jmp 0x149dc
movq 0x28(%rsp), %rax
addq $0x10, %rax
movq %rax, 0x28(%rsp)
jmp 0x148f6
addq $0x48, %rsp
retq
nopw %cs:(%rax,%rax)
nop
// File: Baobaobear[P]sort/./sortlib.hpp
// Function: void baobao::internal::heap_sort_p<baobao::TestClass*, std::less<baobao::TestClass>>(baobao::TestClass*, baobao::TestClass*, std::less<baobao::TestClass>)
void heap_sort_p(RandomAccessIterator beg, RandomAccessIterator end, Comp compare)
{
    if (end - beg > 1)
    {
        for (RandomAccessIterator i = beg + (end - beg) / 2; i >= beg; --i)
            max_heapify_p(beg, i, end - 1, compare);
        for (--end; end > beg; )
        {
            std::swap(*beg, *end--);
            max_heapify_p(beg, beg, end, compare);
        }
    }
}

// Assembly:
subq $0x38, %rsp
movq %rdi, 0x28(%rsp)
movq %rsi, 0x20(%rsp)
movq 0x20(%rsp), %rax
movq 0x28(%rsp), %rcx
subq %rcx, %rax
sarq $0x5, %rax
cmpq $0x1, %rax
jle 0xcec3
movq 0x28(%rsp), %rax
movq %rax, 0x8(%rsp)
movq 0x20(%rsp), %rax
movq 0x28(%rsp), %rcx
subq %rcx, %rax
sarq $0x5, %rax
movl $0x2, %ecx
cqto
idivq %rcx
movq %rax, %rcx
movq 0x8(%rsp), %rax
shlq $0x5, %rcx
addq %rcx, %rax
movq %rax, 0x18(%rsp)
movq 0x18(%rsp), %rax
cmpq 0x28(%rsp), %rax
jb 0xce76
movq 0x28(%rsp), %rdi
movq 0x18(%rsp), %rsi
movq 0x20(%rsp), %rdx
addq $-0x20, %rdx
callq 0xced0
movq 0x18(%rsp), %rax
addq $-0x20, %rax
movq %rax, 0x18(%rsp)
jmp 0xce42
movq 0x20(%rsp), %rax
addq $-0x20, %rax
movq %rax, 0x20(%rsp)
movq 0x20(%rsp), %rax
cmpq 0x28(%rsp), %rax
jbe 0xcec1
movq 0x28(%rsp), %rdi
movq 0x20(%rsp), %rsi
movq %rsi, %rax
addq $-0x20, %rax
movq %rax, 0x20(%rsp)
callq 0x8660
movq 0x28(%rsp), %rdi
movq 0x28(%rsp), %rsi
movq 0x20(%rsp), %rdx
callq 0xced0
jmp 0xce84
jmp 0xcec3
addq $0x38, %rsp
retq
nopl (%rax,%rax)
// File: Baobaobear[P]sort/./sortlib.hpp
// Function: void baobao::internal::max_heapify_p<baobao::TestClass*, std::less<baobao::TestClass>>(baobao::TestClass*, baobao::TestClass*, baobao::TestClass*, std::less<baobao::TestClass>)
void max_heapify_p(RandomAccessIterator first, RandomAccessIterator target, RandomAccessIterator last, Comp compare)
{
    typename std::iterator_traits<RandomAccessIterator>::value_type temp = *target;
    --first;
    RandomAccessIterator son;
    for (; (son = target + (target - first)) <= last; target = son)
    {
        if (son < last && compare(*son, *(son + 1)))
            ++son;
        if (compare(temp, *son))
            *target = *son;
        else
            break;
    }
    *target = temp;
}

// Assembly:
subq $0x48, %rsp
movq %rdi, 0x38(%rsp)
movq %rsi, 0x30(%rsp)
movq %rdx, 0x28(%rsp)
movq 0x30(%rsp), %rsi
leaq 0x8(%rsp), %rdi
callq 0x86a0
movq 0x38(%rsp), %rax
addq $-0x20, %rax
movq %rax, 0x38(%rsp)
movq 0x30(%rsp), %rax
movq 0x30(%rsp), %rcx
movq 0x38(%rsp), %rdx
subq %rdx, %rcx
sarq $0x5, %rcx
shlq $0x5, %rcx
addq %rcx, %rax
movq %rax, (%rsp)
cmpq 0x28(%rsp), %rax
ja 0xcf96
movq (%rsp), %rax
cmpq 0x28(%rsp), %rax
jae 0xcf5b
movq (%rsp), %rsi
movq (%rsp), %rdx
addq $0x20, %rdx
leaq 0x47(%rsp), %rdi
callq 0xcd80
testb $0x1, %al
jne 0xcf4f
jmp 0xcf5b
movq (%rsp), %rax
addq $0x20, %rax
movq %rax, (%rsp)
movq (%rsp), %rdx
leaq 0x47(%rsp), %rdi
leaq 0x8(%rsp), %rsi
callq 0xcd80
testb $0x1, %al
jne 0xcf74
jmp 0xcf84
movq (%rsp), %rsi
movq 0x30(%rsp), %rdi
callq 0x8710
jmp 0xcf86
jmp 0xcf96
jmp 0xcf88
movq (%rsp), %rax
movq %rax, 0x30(%rsp)
jmp 0xcf00
movq 0x30(%rsp), %rdi
leaq 0x8(%rsp), %rsi
callq 0x8710
addq $0x48, %rsp
retq
nopw (%rax,%rax)
// File: Baobaobear[P]sort/./sortlib.hpp
// Function: baobao::internal::indirect_sort_iter_warp<baobao::TestClass*>* baobao::internal::insert_sort_limit<baobao::internal::indirect_sort_iter_warp<baobao::TestClass*>*, baobao::internal::indirect_sort_comp_warp<baobao::TestClass*, std::less<baobao::TestClass>>>(baobao::internal::indirect_sort_iter_warp<baobao::TestClass*>*, baobao::internal::indirect_sort_iter_warp<baobao::TestClass*>*, baobao::internal::indirect_sort_comp_warp<baobao::TestClass*, std::less<baobao::TestClass>>, int)
RandomAccessIterator insert_sort_limit(RandomAccessIterator beg, RandomAccessIterator end, Comp compare, int limit)
{
    for (RandomAccessIterator i = beg + 1; i < end; ++i)
    {
        if (!compare(*i, *(i - 1)))
        {
            ++limit;
            continue;
        }
        typename std::iterator_traits<RandomAccessIterator>::value_type val = *i;
        RandomAccessIterator j = i - 1;
        *i = *j;
        for (;j != beg && compare(val, *(j - 1)); --j)
        {
            if (--limit <= 0)
            {
                *j = val;
                return i;
            }
            *j = *(j - 1);
        }
        *j = val;
    }
    return end;
}

// Assembly:
subq $0x58, %rsp
movq %rdx, 0x8(%rsp)
movq %rdi, 0x48(%rsp)
movq %rsi, 0x40(%rsp)
movq %rdx, 0x38(%rsp)
movl %ecx, 0x34(%rsp)
movq 0x48(%rsp), %rax
addq $0x10, %rax
movq %rax, 0x28(%rsp)
movq 0x28(%rsp), %rax
cmpq 0x40(%rsp), %rax
jae 0x14691
movq 0x8(%rsp), %rdi
movq 0x28(%rsp), %rsi
movq 0x28(%rsp), %rdx
addq $-0x10, %rdx
callq 0x144a0
testb $0x1, %al
jne 0x14596
movl 0x34(%rsp), %eax
addl $0x1, %eax
movl %eax, 0x34(%rsp)
jmp 0x1467e
movq 0x28(%rsp), %rax
movq (%rax), %rcx
movq %rcx, 0x18(%rsp)
movq 0x8(%rax), %rax
movq %rax, 0x20(%rsp)
movq 0x28(%rsp), %rax
addq $-0x10, %rax
movq %rax, 0x10(%rsp)
movq 0x10(%rsp), %rcx
movq 0x28(%rsp), %rax
movq (%rcx), %rdx
movq %rdx, (%rax)
movq 0x8(%rcx), %rcx
movq %rcx, 0x8(%rax)
movq 0x10(%rsp), %rcx
xorl %eax, %eax
cmpq 0x48(%rsp), %rcx
movb %al, 0x7(%rsp)
je 0x14600
movq 0x8(%rsp), %rdi
movq 0x10(%rsp), %rdx
addq $-0x10, %rdx
leaq 0x18(%rsp), %rsi
callq 0x144a0
movb %al, 0x7(%rsp)
movb 0x7(%rsp), %al
testb $0x1, %al
jne 0x1460a
jmp 0x14668
movl 0x34(%rsp), %eax
addl $-0x1, %eax
movl %eax, 0x34(%rsp)
cmpl $0x0, %eax
jg 0x1463c
movq 0x10(%rsp), %rax
movq 0x18(%rsp), %rcx
movq %rcx, (%rax)
movq 0x20(%rsp), %rcx
movq %rcx, 0x8(%rax)
movq 0x28(%rsp), %rax
movq %rax, 0x50(%rsp)
jmp 0x1469b
movq 0x10(%rsp), %rcx
movq 0x10(%rsp), %rax
movq -0x10(%rcx), %rdx
movq %rdx, (%rax)
movq -0x8(%rcx), %rcx
movq %rcx, 0x8(%rax)
movq 0x10(%rsp), %rax
addq $-0x10, %rax
movq %rax, 0x10(%rsp)
jmp 0x145d2
movq 0x10(%rsp), %rax
movq 0x18(%rsp), %rcx
movq %rcx, (%rax)
movq 0x20(%rsp), %rcx
movq %rcx, 0x8(%rax)
movq 0x28(%rsp), %rax
addq $0x10, %rax
movq %rax, 0x28(%rsp)
jmp 0x1455a
movq 0x40(%rsp), %rax
movq %rax, 0x50(%rsp)
movq 0x50(%rsp), %rax
addq $0x58, %rsp
retq
nopw %cs:(%rax,%rax)
nop
// File: Baobaobear[P]sort/./sortlib.hpp
// Function: void baobao::internal::unguarded_insert_sort<baobao::TestClass*, std::less<baobao::TestClass>>(baobao::TestClass*, baobao::TestClass*, std::less<baobao::TestClass>)
inline void unguarded_insert_sort(RandomAccessIterator beg, RandomAccessIterator end, Comp compare)
{
    for (RandomAccessIterator i = beg; i < end; ++i)
    {
        if (compare(*i, *(i - 1)))
        {
            typename std::iterator_traits<RandomAccessIterator>::value_type val = *i;
            RandomAccessIterator j = i - 1;
            *i = *j;
            for (;compare(val, *(j - 1)); --j)
            {
                *j = *(j - 1);
            }
            *j = val;
        }
    }
}

// Assembly:
subq $0x48, %rsp
movq %rdi, 0x38(%rsp)
movq %rsi, 0x30(%rsp)
movq 0x38(%rsp), %rax
movq %rax, 0x28(%rsp)
movq 0x28(%rsp), %rax
cmpq 0x30(%rsp), %rax
jae 0xd60f
movq 0x28(%rsp), %rsi
movq 0x28(%rsp), %rdx
addq $-0x20, %rdx
leaq 0x47(%rsp), %rdi
callq 0xcd80
testb $0x1, %al
jne 0xd586
jmp 0xd5fa
movq 0x28(%rsp), %rsi
leaq 0x8(%rsp), %rdi
callq 0x86a0
movq 0x28(%rsp), %rax
addq $-0x20, %rax
movq %rax, (%rsp)
movq (%rsp), %rsi
movq 0x28(%rsp), %rdi
callq 0x8710
movq (%rsp), %rdx
addq $-0x20, %rdx
leaq 0x47(%rsp), %rdi
leaq 0x8(%rsp), %rsi
callq 0xcd80
testb $0x1, %al
jne 0xd5cd
jmp 0xd5ec
movq (%rsp), %rsi
addq $-0x20, %rsi
movq (%rsp), %rdi
callq 0x8710
movq (%rsp), %rax
addq $-0x20, %rax
movq %rax, (%rsp)
jmp 0xd5b0
movq (%rsp), %rdi
leaq 0x8(%rsp), %rsi
callq 0x8710
jmp 0xd5fc
movq 0x28(%rsp), %rax
addq $0x20, %rax
movq %rax, 0x28(%rsp)
jmp 0xd558
addq $0x48, %rsp
retq
nopw %cs:(%rax,%rax)
nop
// File: Baobaobear[P]sort/./sortlib.hpp
// Function: void baobao::sort::merge_sort<baobao::TestClass*, std::less<baobao::TestClass>>(baobao::TestClass*, baobao::TestClass*, std::less<baobao::TestClass>)
void merge_sort(RandomAccessIterator beg, RandomAccessIterator end, Comp compare)
{
    if (end - beg > 1)
    {
        typedef typename std::iterator_traits<RandomAccessIterator>::value_type value_type;
        value_type * buf = (value_type*)malloc((end - beg) / 2 * sizeof(value_type));
        internal::merge_sort_recursive<false>(buf, beg, end, compare);
        free(buf);
    }
}

// Assembly:
subq $0x28, %rsp
movq %rdi, 0x18(%rsp)
movq %rsi, 0x10(%rsp)
movq 0x10(%rsp), %rax
movq 0x18(%rsp), %rcx
subq %rcx, %rax
sarq $0x5, %rax
cmpq $0x1, %rax
jle 0xd68f
movq 0x10(%rsp), %rax
movq 0x18(%rsp), %rcx
subq %rcx, %rax
sarq $0x5, %rax
movl $0x2, %ecx
cqto
idivq %rcx
movq %rax, %rdi
shlq $0x5, %rdi
callq 0x2210
movq %rax, 0x8(%rsp)
movq 0x8(%rsp), %rdi
movq 0x18(%rsp), %rsi
movq 0x10(%rsp), %rdx
callq 0xd6a0
movq 0x8(%rsp), %rdi
callq 0x21f0
addq $0x28, %rsp
retq
nopw %cs:(%rax,%rax)
nop
// File: Baobaobear[P]sort/./sortlib.hpp
// Function: void baobao::internal::merge_sort_recursive<false, baobao::TestClass*, baobao::TestClass*, std::less<baobao::TestClass>>(baobao::TestClass*, baobao::TestClass*, baobao::TestClass*, std::less<baobao::TestClass>)
void merge_sort_recursive(RandomAccessBufferIterator buf, RandomAccessIterator beg, RandomAccessIterator end, Comp compare)
{
    size_t len = end - beg;
    if (len < merge_insertion_sort_threshold)
    {
        insert_sort(beg, end, compare);
        return;
    }
    RandomAccessIterator mid = beg + (len >> 1);
    merge_sort_recursive<safecopy>(buf, beg, mid, compare);
    merge_sort_recursive<safecopy>(buf, mid, end, compare);
    merge_2_part<safecopy>(buf, beg, mid, end, compare);
}

// Assembly:
subq $0x48, %rsp
movq %rdi, 0x38(%rsp)
movq %rsi, 0x30(%rsp)
movq %rdx, 0x28(%rsp)
movq 0x28(%rsp), %rax
movq 0x30(%rsp), %rcx
subq %rcx, %rax
sarq $0x5, %rax
movq %rax, 0x20(%rsp)
cmpq $0x20, 0x20(%rsp)
jae 0xd6e2
movq 0x30(%rsp), %rdi
movq 0x28(%rsp), %rsi
callq 0xcc80
jmp 0xd73c
movq 0x30(%rsp), %rax
movq 0x20(%rsp), %rcx
shrq %rcx
shlq $0x5, %rcx
addq %rcx, %rax
movq %rax, 0x10(%rsp)
movq 0x38(%rsp), %rdi
movq 0x30(%rsp), %rsi
movq 0x10(%rsp), %rdx
callq 0xd6a0
movq 0x38(%rsp), %rdi
movq 0x10(%rsp), %rsi
movq 0x28(%rsp), %rdx
callq 0xd6a0
movq 0x38(%rsp), %rdi
movq 0x30(%rsp), %rsi
movq 0x10(%rsp), %rdx
movq 0x28(%rsp), %rcx
callq 0xd750
addq $0x48, %rsp
retq
nopw %cs:(%rax,%rax)
nopl (%rax,%rax)
// File: Baobaobear[P]sort/./sortlib.hpp
// Function: void baobao::internal::merge_2_part<false, baobao::TestClass*, baobao::TestClass*, std::less<baobao::TestClass>>(baobao::TestClass*, baobao::TestClass*, baobao::TestClass*, baobao::TestClass*, std::less<baobao::TestClass>)
void merge_2_part(RandomAccessBufferIterator buf, RandomAccessIterator beg, RandomAccessIterator mid, RandomAccessIterator end, Comp compare)
{
    if (!compare(*mid, *(mid - 1)))
    {
        return;
    }
    while (beg < mid && !compare(*mid, *beg))
    {
        ++beg;
    }
    if (beg < mid)
    {
        RandomAccessIterator mid_last = mid - 1, last = end - 1;
        while (mid_last < last && !compare(*last, *mid_last))
        {
            --last;
        }
        if (mid_last == last)
        {
            return;
        }
        end = last + 1;
    }
    else
    {
        return;
    }

    if (end - beg < merge_2_part_insertion_sort_threshold)
    {
        insert_sort_part(beg, mid, end, compare);
        return;
    }

    merge_2_part_force<safecopy>(buf, beg, mid, end, compare);
}

// Assembly:
subq $0x48, %rsp
movq %rdi, 0x38(%rsp)
movq %rsi, 0x30(%rsp)
movq %rdx, 0x28(%rsp)
movq %rcx, 0x20(%rsp)
movq 0x28(%rsp), %rsi
movq 0x28(%rsp), %rdx
addq $-0x20, %rdx
leaq 0x47(%rsp), %rdi
callq 0xcd80
testb $0x1, %al
jne 0xd789
jmp 0xd8a9
jmp 0xd78b
movq 0x30(%rsp), %rcx
xorl %eax, %eax
cmpq 0x28(%rsp), %rcx
movb %al, 0xd(%rsp)
jae 0xd7b7
movq 0x28(%rsp), %rsi
movq 0x30(%rsp), %rdx
leaq 0x47(%rsp), %rdi
callq 0xcd80
xorb $-0x1, %al
movb %al, 0xd(%rsp)
movb 0xd(%rsp), %al
testb $0x1, %al
jne 0xd7c1
jmp 0xd7d1
movq 0x30(%rsp), %rax
addq $0x20, %rax
movq %rax, 0x30(%rsp)
jmp 0xd78b
movq 0x30(%rsp), %rax
cmpq 0x28(%rsp), %rax
jae 0xd861
movq 0x28(%rsp), %rax
addq $-0x20, %rax
movq %rax, 0x18(%rsp)
movq 0x20(%rsp), %rax
addq $-0x20, %rax
movq %rax, 0x10(%rsp)
movq 0x18(%rsp), %rcx
xorl %eax, %eax
cmpq 0x10(%rsp), %rcx
movb %al, 0xc(%rsp)
jae 0xd829
movq 0x10(%rsp), %rsi
movq 0x18(%rsp), %rdx
leaq 0x47(%rsp), %rdi
callq 0xcd80
xorb $-0x1, %al
movb %al, 0xc(%rsp)
movb 0xc(%rsp), %al
testb $0x1, %al
jne 0xd833
jmp 0xd843
movq 0x10(%rsp), %rax
addq $-0x20, %rax
movq %rax, 0x10(%rsp)
jmp 0xd7fd
movq 0x18(%rsp), %rax
cmpq 0x10(%rsp), %rax
jne 0xd851
jmp 0xd8a9
movq 0x10(%rsp), %rax
addq $0x20, %rax
movq %rax, 0x20(%rsp)
jmp 0xd863
jmp 0xd8a9
movq 0x20(%rsp), %rax
movq 0x30(%rsp), %rcx
subq %rcx, %rax
sarq $0x5, %rax
cmpq $0x20, %rax
jge 0xd890
movq 0x30(%rsp), %rdi
movq 0x28(%rsp), %rsi
movq 0x20(%rsp), %rdx
callq 0xd8b0
jmp 0xd8a9
movq 0x38(%rsp), %rdi
movq 0x30(%rsp), %rsi
movq 0x28(%rsp), %rdx
movq 0x20(%rsp), %rcx
callq 0xd9b0
addq $0x48, %rsp
retq
nop
// File: Baobaobear[P]sort/./sortlib.hpp
// Function: void baobao::internal::insert_sort_part<baobao::TestClass*, std::less<baobao::TestClass>>(baobao::TestClass*, baobao::TestClass*, baobao::TestClass*, std::less<baobao::TestClass>)
inline void insert_sort_part(RandomAccessIterator beg, RandomAccessIterator mid, RandomAccessIterator end, Comp compare)
{
    for (RandomAccessIterator i = mid; i < end; ++i)
    {
        if (compare(*i, *(i - 1)))
        {
            typename std::iterator_traits<RandomAccessIterator>::value_type val = *i;
            RandomAccessIterator j = i - 1;
            *i = *j;
            for (;j != beg && compare(val, *(j - 1)); --j)
            {
                *j = *(j - 1);
            }
            *j = val;
        }
    }
}

// Assembly:
subq $0x58, %rsp
movq %rdi, 0x48(%rsp)
movq %rsi, 0x40(%rsp)
movq %rdx, 0x38(%rsp)
movq 0x40(%rsp), %rax
movq %rax, 0x30(%rsp)
movq 0x30(%rsp), %rax
cmpq 0x38(%rsp), %rax
jae 0xd9a9
movq 0x30(%rsp), %rsi
movq 0x30(%rsp), %rdx
addq $-0x20, %rdx
leaq 0x57(%rsp), %rdi
callq 0xcd80
testb $0x1, %al
jne 0xd8fe
jmp 0xd994
movq 0x30(%rsp), %rsi
leaq 0x10(%rsp), %rdi
callq 0x86a0
movq 0x30(%rsp), %rax
addq $-0x20, %rax
movq %rax, 0x8(%rsp)
movq 0x8(%rsp), %rsi
movq 0x30(%rsp), %rdi
callq 0x8710
movq 0x8(%rsp), %rcx
xorl %eax, %eax
cmpq 0x48(%rsp), %rcx
movb %al, 0x7(%rsp)
je 0xd958
movq 0x8(%rsp), %rdx
addq $-0x20, %rdx
leaq 0x57(%rsp), %rdi
leaq 0x10(%rsp), %rsi
callq 0xcd80
movb %al, 0x7(%rsp)
movb 0x7(%rsp), %al
testb $0x1, %al
jne 0xd962
jmp 0xd985
movq 0x8(%rsp), %rsi
addq $-0x20, %rsi
movq 0x8(%rsp), %rdi
callq 0x8710
movq 0x8(%rsp), %rax
addq $-0x20, %rax
movq %rax, 0x8(%rsp)
jmp 0xd92a
movq 0x8(%rsp), %rdi
leaq 0x10(%rsp), %rsi
callq 0x8710
jmp 0xd996
movq 0x30(%rsp), %rax
addq $0x20, %rax
movq %rax, 0x30(%rsp)
jmp 0xd8cd
addq $0x58, %rsp
retq
nop
// File: Baobaobear[P]sort/./sortlib.hpp
// Function: void baobao::sort::merge_sort_s<baobao::TestClass*, std::less<baobao::TestClass>>(baobao::TestClass*, baobao::TestClass*, std::less<baobao::TestClass>)
void merge_sort_s(RandomAccessIterator beg, RandomAccessIterator end, Comp compare)
{
    if (end - beg > 1)
    {
        typedef typename std::iterator_traits<RandomAccessIterator>::value_type value_type;
        value_type * buf = new value_type[(end - beg) / 2];
        internal::merge_sort_recursive<true>(buf, beg, end, compare);
        delete[] buf;
    }
}

// Assembly:
subq $0x68, %rsp
movq %rdi, 0x58(%rsp)
movq %rsi, 0x50(%rsp)
movq 0x50(%rsp), %rax
movq 0x58(%rsp), %rcx
subq %rcx, %rax
sarq $0x5, %rax
cmpq $0x1, %rax
jle 0xdd98
movq 0x50(%rsp), %rax
movq 0x58(%rsp), %rcx
subq %rcx, %rax
sarq $0x5, %rax
movl $0x2, %ecx
cqto
idivq %rcx
movq %rax, 0x28(%rsp)
movl $0x20, %ecx
mulq %rcx
movq %rax, %rdi
seto %cl
movq $-0x1, %rax
testb $0x1, %cl
cmovneq %rax, %rdi
callq 0x2030
movq %rax, %rcx
movq 0x28(%rsp), %rax
movq %rcx, 0x30(%rsp)
cmpq $0x0, %rax
je 0xdd44
movq 0x30(%rsp), %rax
movq 0x28(%rsp), %rdx
shlq $0x5, %rdx
movq %rax, %rcx
addq %rdx, %rcx
movq %rcx, 0x18(%rsp)
movq %rax, 0x20(%rsp)
movq 0x20(%rsp), %rdi
movq %rdi, 0x10(%rsp)
callq 0x61b0
jmp 0xdd2c
movq 0x18(%rsp), %rcx
movq 0x10(%rsp), %rax
addq $0x20, %rax
cmpq %rcx, %rax
movq %rax, 0x20(%rsp)
jne 0xdd1b
movq 0x30(%rsp), %rax
movq %rax, 0x48(%rsp)
movq 0x48(%rsp), %rdi
movq 0x58(%rsp), %rsi
movq 0x50(%rsp), %rdx
callq 0xddb0
movq 0x48(%rsp), %rax
movq %rax, 0x8(%rsp)
cmpq $0x0, %rax
je 0xdd7c
movq 0x8(%rsp), %rdi
callq 0x2200
jmp 0xdd98
movq 0x30(%rsp), %rdi
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x40(%rsp)
movl %eax, 0x3c(%rsp)
callq 0x2200
jmp 0xdd9d
addq $0x68, %rsp
retq
movq 0x40(%rsp), %rdi
callq 0x2280
nopw (%rax,%rax)
// File: Baobaobear[P]sort/./sortlib.hpp
// Function: void baobao::internal::merge_sort_recursive_with_buffer<false, baobao::TestClass*, baobao::TestClass*, std::less<baobao::TestClass>>(baobao::TestClass*, unsigned long, baobao::TestClass*, baobao::TestClass*, std::less<baobao::TestClass>)
void merge_sort_recursive_with_buffer(RandomAccessBufferIterator buf, size_t bufsize, RandomAccessIterator beg, RandomAccessIterator end, Comp compare)
{
    size_t len = end - beg;
    if (len < merge_insertion_sort_threshold)
    {
        insert_sort(beg, end, compare);
        return;
    }
    RandomAccessIterator mid = beg + (len >> 1);
    merge_sort_recursive_with_buffer<safecopy>(buf, bufsize, beg, mid, compare);
    merge_sort_recursive_with_buffer<safecopy>(buf, bufsize, mid, end, compare);
    merge_2_part_with_buffer<safecopy>(buf, bufsize, beg, mid, end, compare);
}

// Assembly:
subq $0x48, %rsp
movq %rdi, 0x38(%rsp)
movq %rsi, 0x30(%rsp)
movq %rdx, 0x28(%rsp)
movq %rcx, 0x20(%rsp)
movq 0x20(%rsp), %rax
movq 0x28(%rsp), %rcx
subq %rcx, %rax
sarq $0x5, %rax
movq %rax, 0x18(%rsp)
cmpq $0x20, 0x18(%rsp)
jae 0xe5c7
movq 0x28(%rsp), %rdi
movq 0x20(%rsp), %rsi
callq 0xcc80
jmp 0xe630
movq 0x28(%rsp), %rax
movq 0x18(%rsp), %rcx
shrq %rcx
shlq $0x5, %rcx
addq %rcx, %rax
movq %rax, 0x8(%rsp)
movq 0x38(%rsp), %rdi
movq 0x30(%rsp), %rsi
movq 0x28(%rsp), %rdx
movq 0x8(%rsp), %rcx
callq 0xe580
movq 0x38(%rsp), %rdi
movq 0x30(%rsp), %rsi
movq 0x8(%rsp), %rdx
movq 0x20(%rsp), %rcx
callq 0xe580
movq 0x38(%rsp), %rdi
movq 0x30(%rsp), %rsi
movq 0x28(%rsp), %rdx
movq 0x8(%rsp), %rcx
movq 0x20(%rsp), %r8
callq 0xe640
addq $0x48, %rsp
retq
nopw %cs:(%rax,%rax)
nop
// File: Baobaobear[P]sort/./sortlib.hpp
// Function: baobao::TestClass* baobao::internal::unguarded_insert_sort_limit<baobao::TestClass*, std::less<baobao::TestClass>>(baobao::TestClass*, baobao::TestClass*, std::less<baobao::TestClass>, int)
RandomAccessIterator unguarded_insert_sort_limit(RandomAccessIterator beg, RandomAccessIterator end, Comp compare, int limit)
{
    for (RandomAccessIterator i = beg + 1; i < end; ++i)
    {
        if (!compare(*i, *(i - 1)))
        {
            ++limit;
            continue;
        }
        typename std::iterator_traits<RandomAccessIterator>::value_type val = *i;
        RandomAccessIterator j = i - 1;
        *i = *j;
        for (; compare(val, *(j - 1)); --j)
        {
            if (--limit <= 0)
            {
                *j = val;
                return i;
            }
            *j = *(j - 1);
        }
        *j = val;
    }
    return end;
}

// Assembly:
subq $0x58, %rsp
movq %rdi, 0x40(%rsp)
movq %rsi, 0x38(%rsp)
movl %edx, 0x34(%rsp)
movq 0x40(%rsp), %rax
addq $0x20, %rax
movq %rax, 0x28(%rsp)
movq 0x28(%rsp), %rax
cmpq 0x38(%rsp), %rax
jae 0x1071d
movq 0x28(%rsp), %rsi
movq 0x28(%rsp), %rdx
addq $-0x20, %rdx
leaq 0x4f(%rsp), %rdi
callq 0xcd80
testb $0x1, %al
jne 0x1066c
movl 0x34(%rsp), %eax
addl $0x1, %eax
movl %eax, 0x34(%rsp)
jmp 0x1070a
movq 0x28(%rsp), %rsi
leaq 0x8(%rsp), %rdi
callq 0x86a0
movq 0x28(%rsp), %rax
addq $-0x20, %rax
movq %rax, (%rsp)
movq (%rsp), %rsi
movq 0x28(%rsp), %rdi
callq 0x8710
movq (%rsp), %rdx
addq $-0x20, %rdx
leaq 0x4f(%rsp), %rdi
leaq 0x8(%rsp), %rsi
callq 0xcd80
testb $0x1, %al
jne 0x106b3
jmp 0x106fc
movl 0x34(%rsp), %eax
addl $-0x1, %eax
movl %eax, 0x34(%rsp)
cmpl $0x0, %eax
jg 0x106dd
movq (%rsp), %rdi
leaq 0x8(%rsp), %rsi
callq 0x8710
movq 0x28(%rsp), %rax
movq %rax, 0x50(%rsp)
jmp 0x10727
movq (%rsp), %rsi
addq $-0x20, %rsi
movq (%rsp), %rdi
callq 0x8710
movq (%rsp), %rax
addq $-0x20, %rax
movq %rax, (%rsp)
jmp 0x10696
movq (%rsp), %rdi
leaq 0x8(%rsp), %rsi
callq 0x8710
movq 0x28(%rsp), %rax
addq $0x20, %rax
movq %rax, 0x28(%rsp)
jmp 0x10630
movq 0x38(%rsp), %rax
movq %rax, 0x50(%rsp)
movq 0x50(%rsp), %rax
addq $0x58, %rsp
retq
nopw %cs:(%rax,%rax)
nopl (%rax,%rax)
// File: Baobaobear[P]sort/./sortlib.hpp
// Function: void baobao::util::make_mid_pivot<baobao::TestClass, std::less<baobao::TestClass>>(baobao::TestClass&, baobao::TestClass&, baobao::TestClass&, std::less<baobao::TestClass>)
inline void make_mid_pivot(T& l, T& mid, T& r, Comp compare)
{
    // one swap version
    //if (compare(l, mid))
    //{
    //    if (compare(r, mid))
    //    {
    //        if (compare(l, r))
    //        {
    //            std::swap(r, mid);
    //        }
    //        else
    //        {
    //            std::swap(l, mid);
    //        }
    //    }
    //}
    //else if (compare(mid, l))
    //{
    //    if (compare(mid, r))
    //    {
    //        if (compare(l, r))
    //        {
    //            std::swap(l, mid);
    //        }
    //        else
    //        {
    //            std::swap(r, mid);
    //        }
    //    }
    //}

    // insert sort version
    if (compare(r, mid))
    {
        if (compare(mid, l))
        {
            std::swap(l, r); // optional
            return;
        }
        std::swap(mid, r);
    }
    if (compare(mid, l))
    {
        std::swap(mid, l);
        if (compare(r, mid))
            std::swap(mid, r);
    }
}

// Assembly:
subq $0x28, %rsp
movq %rdi, 0x18(%rsp)
movq %rsi, 0x10(%rsp)
movq %rdx, 0x8(%rsp)
movq 0x8(%rsp), %rsi
movq 0x10(%rsp), %rdx
leaq 0x27(%rsp), %rdi
callq 0xcd80
testb $0x1, %al
jne 0x107cd
jmp 0x10807
movq 0x10(%rsp), %rsi
movq 0x18(%rsp), %rdx
leaq 0x27(%rsp), %rdi
callq 0xcd80
testb $0x1, %al
jne 0x107e7
jmp 0x107f8
movq 0x18(%rsp), %rdi
movq 0x8(%rsp), %rsi
callq 0x8660
jmp 0x1085b
movq 0x10(%rsp), %rdi
movq 0x8(%rsp), %rsi
callq 0x8660
movq 0x10(%rsp), %rsi
movq 0x18(%rsp), %rdx
leaq 0x27(%rsp), %rdi
callq 0xcd80
testb $0x1, %al
jne 0x10821
jmp 0x1085b
movq 0x10(%rsp), %rdi
movq 0x18(%rsp), %rsi
callq 0x8660
movq 0x8(%rsp), %rsi
movq 0x10(%rsp), %rdx
leaq 0x27(%rsp), %rdi
callq 0xcd80
testb $0x1, %al
jne 0x1084a
jmp 0x10859
movq 0x10(%rsp), %rdi
movq 0x8(%rsp), %rsi
callq 0x8660
jmp 0x1085b
addq $0x28, %rsp
retq
// File: Baobaobear[P]sort/./sortlib.hpp
// Function: void baobao::internal::tim_sort_force_stack_merge<false, baobao::TestClass*, baobao::TestClass*, std::less<baobao::TestClass>>(baobao::TestClass*, baobao::TestClass**, baobao::TestClass**, std::less<baobao::TestClass>)
void tim_sort_force_stack_merge(RandomAccessBufferIterator buf, RandomAccessIterator* beg, RandomAccessIterator* end, Comp compare)
{
    while (end - beg > 1)
    {
        if (end - beg > 2)
        {
            if (end[0] - end[-1] <= end[-2] - end[-3])
            {
                merge_2_part<safecopy>(buf, end[-2], end[-1], end[0], compare);
                end[-1] = end[0];
                --end;
            }
            else
            {
                merge_2_part<safecopy>(buf, end[-3], end[-2], end[-1], compare);
                end[-2] = end[-1];
                end[-1] = end[0];
                --end;
            }
        }
        else
        {
            merge_2_part<safecopy>(buf, end[-2], end[-1], end[0], compare);
            end[-1] = end[0];
            --end;
        }
    }
}

// Assembly:
subq $0x28, %rsp
movq %rdi, 0x18(%rsp)
movq %rsi, 0x10(%rsp)
movq %rdx, 0x8(%rsp)
movq 0x8(%rsp), %rax
movq 0x10(%rsp), %rcx
subq %rcx, %rax
sarq $0x3, %rax
cmpq $0x1, %rax
jle 0x114c4
movq 0x8(%rsp), %rax
movq 0x10(%rsp), %rcx
subq %rcx, %rax
sarq $0x3, %rax
cmpq $0x2, %rax
jle 0x1147c
movq 0x8(%rsp), %rax
movq (%rax), %rax
movq 0x8(%rsp), %rcx
movq -0x8(%rcx), %rcx
subq %rcx, %rax
sarq $0x5, %rax
movq 0x8(%rsp), %rcx
movq -0x10(%rcx), %rcx
movq 0x8(%rsp), %rdx
movq -0x18(%rdx), %rdx
subq %rdx, %rcx
sarq $0x5, %rcx
cmpq %rcx, %rax
jg 0x11424
movq 0x18(%rsp), %rdi
movq 0x8(%rsp), %rax
movq -0x10(%rax), %rsi
movq 0x8(%rsp), %rax
movq -0x8(%rax), %rdx
movq 0x8(%rsp), %rax
movq (%rax), %rcx
callq 0xd750
movq 0x8(%rsp), %rax
movq (%rax), %rcx
movq 0x8(%rsp), %rax
movq %rcx, -0x8(%rax)
movq 0x8(%rsp), %rax
addq $-0x8, %rax
movq %rax, 0x8(%rsp)
jmp 0x1147a
movq 0x18(%rsp), %rdi
movq 0x8(%rsp), %rax
movq -0x18(%rax), %rsi
movq 0x8(%rsp), %rax
movq -0x10(%rax), %rdx
movq 0x8(%rsp), %rax
movq -0x8(%rax), %rcx
callq 0xd750
movq 0x8(%rsp), %rax
movq -0x8(%rax), %rcx
movq 0x8(%rsp), %rax
movq %rcx, -0x10(%rax)
movq 0x8(%rsp), %rax
movq (%rax), %rcx
movq 0x8(%rsp), %rax
movq %rcx, -0x8(%rax)
movq 0x8(%rsp), %rax
addq $-0x8, %rax
movq %rax, 0x8(%rsp)
jmp 0x114bf
movq 0x18(%rsp), %rdi
movq 0x8(%rsp), %rax
movq -0x10(%rax), %rsi
movq 0x8(%rsp), %rax
movq -0x8(%rax), %rdx
movq 0x8(%rsp), %rax
movq (%rax), %rcx
callq 0xd750
movq 0x8(%rsp), %rax
movq (%rax), %rcx
movq 0x8(%rsp), %rax
movq %rcx, -0x8(%rax)
movq 0x8(%rsp), %rax
addq $-0x8, %rax
movq %rax, 0x8(%rsp)
jmp 0x11373
addq $0x28, %rsp
retq
nopl (%rax)