LLM4Binary/decompile-bench-makefile huggingface dataset:
// File: /workspace/github_cpp_makefile_star2_O3/nvanbenschoten[P]total-order-multicast/src/message.cc
// Function: msg::operator<<(std::ostream&, msg::SeqMessage const&)
std::ostream& operator<<(std::ostream& o, const SeqMessage& seq_msg) {
  o << "{type: " << seq_msg.type;
  o << ", sender: " << seq_msg.sender;
  o << ", msg_id: " << seq_msg.msg_id;
  o << ", final_seq: " << seq_msg.final_seq;
  o << ", final_seq_proposer: " << seq_msg.final_seq_proposer;
  o << "}";
  return o;
}

// Assembly:
pushq %r14
pushq %rbx
pushq %rax
movq %rsi, %r14
movq %rdi, %rbx
leaq 0x2130(%rip), %rsi      # 0x15237
movl $0x7, %edx
callq 0x53f0
movl (%r14), %esi
movq %rbx, %rdi
callq 0x5240
leaq 0x211c(%rip), %rsi      # 0x1523f
movl $0xa, %edx
movq %rbx, %rdi
callq 0x53f0
movl 0x4(%r14), %esi
movq %rbx, %rdi
callq 0x5240
leaq 0x2107(%rip), %rsi      # 0x1524a
movl $0xa, %edx
movq %rbx, %rdi
callq 0x53f0
movl 0x8(%r14), %esi
movq %rbx, %rdi
callq 0x5240
leaq 0x2119(%rip), %rsi      # 0x1527c
movl $0xd, %edx
movq %rbx, %rdi
callq 0x53f0
movl 0xc(%r14), %esi
movq %rbx, %rdi
callq 0x5240
leaq 0x2107(%rip), %rsi      # 0x1528a
movl $0x16, %edx
movq %rbx, %rdi
callq 0x53f0
movl 0x10(%r14), %esi
movq %rbx, %rdi
callq 0x5240
leaq 0x1ab8(%rip), %rsi      # 0x14c5b
movl $0x1, %edx
movq %rbx, %rdi
callq 0x53f0
movq %rbx, %rax
addq $0x8, %rsp
popq %rbx
popq %r14
retq
// File: /workspace/github_cpp_makefile_star2_O3/nvanbenschoten[P]total-order-multicast/src/message.cc
// Function: msg::operator<<(std::ostream&, msg::SeqAckMessage const&)
std::ostream& operator<<(std::ostream& o, const SeqAckMessage& seqack_msg) {
  o << "{type: " << seqack_msg.type;
  o << ", sender: " << seqack_msg.sender;
  o << ", msg_id: " << seqack_msg.msg_id;
  o << "}";
  return o;
}

// Assembly:
pushq %r14
pushq %rbx
pushq %rax
movq %rsi, %r14
movq %rdi, %rbx
leaq 0x206b(%rip), %rsi      # 0x15237
movl $0x7, %edx
callq 0x53f0
movl (%r14), %esi
movq %rbx, %rdi
callq 0x5240
leaq 0x2057(%rip), %rsi      # 0x1523f
movl $0xa, %edx
movq %rbx, %rdi
callq 0x53f0
movl 0x4(%r14), %esi
movq %rbx, %rdi
callq 0x5240
leaq 0x2042(%rip), %rsi      # 0x1524a
movl $0xa, %edx
movq %rbx, %rdi
callq 0x53f0
movl 0x8(%r14), %esi
movq %rbx, %rdi
callq 0x5240
leaq 0x1a33(%rip), %rsi      # 0x14c5b
movl $0x1, %edx
movq %rbx, %rdi
callq 0x53f0
movq %rbx, %rax
addq $0x8, %rsp
popq %rbx
popq %r14
retq
// File: /workspace/github_cpp_makefile_star2_O3/nvanbenschoten[P]total-order-multicast/src/net.cc
// Function: net::AddressWithDefaultPort(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, std::experimental::fundamentals_v1::optional<unsigned short>)
Address AddressWithDefaultPort(
    std::string addr, std::experimental::optional<unsigned short> port) {
  size_t found = addr.find(":");
  if (found != std::string::npos) {
    port = std::stoi(addr.substr(found + 1));
    addr = addr.substr(0, found);
  } else if (!port) {
    throw std::invalid_argument(
        "port not specified in address and no default port provided");
  }
  return Address(addr, *port);
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x58, %rsp
movq %rdx, %rbp
movq %rsi, %r15
movq %rdi, %rbx
leaq 0x1fb8(%rip), %rsi      # 0x152a1
movl $0x1, %ecx
movq %r15, %rdi
xorl %edx, %edx
callq 0x5630
cmpq $-0x1, %rax
je 0x133e7
movq %rax, %r12
movq %rbp, 0x8(%rsp)
leaq 0x1(%rax), %rdx
leaq 0x38(%rsp), %r13
movq %r13, %rdi
movq %r15, %rsi
movq $-0x1, %rcx
callq 0x53a0
movq (%r13), %rbp
callq 0x5040
movq %rax, %r13
movl (%rax), %eax
movl %eax, 0x4(%rsp)
movl $0x0, (%r13)
leaq 0x10(%rsp), %r14
movq %rbp, %rdi
movq %r14, %rsi
movl $0xa, %edx
callq 0x54d0
cmpq %rbp, (%r14)
je 0x1345c
movslq %eax, %rcx
cmpq %rax, %rcx
jne 0x13468
movl (%r13), %ecx
cmpl $0x22, %ecx
je 0x13468
testl %ecx, %ecx
movq 0x8(%rsp), %rbp
jne 0x13387
movl 0x4(%rsp), %ecx
movl %ecx, (%r13)
cmpb $0x0, 0x2(%rbp)
jne 0x13391
movb $0x1, 0x2(%rbp)
movw %ax, (%rbp)
leaq 0x48(%rsp), %r13
movq -0x10(%r13), %rdi
cmpq %r13, %rdi
je 0x133b0
movq 0x48(%rsp), %rsi
incq %rsi
callq 0x5370
leaq 0x38(%rsp), %r14
movq %r14, %rdi
movq %r15, %rsi
xorl %edx, %edx
movq %r12, %rcx
callq 0x53a0
movq %r15, %rdi
movq %r14, %rsi
callq 0x5420
movq (%r14), %rdi
cmpq %r13, %rdi
je 0x133f1
movq 0x48(%rsp), %rsi
incq %rsi
callq 0x5370
jmp 0x133f1
cmpb $0x0, 0x2(%rbp)
je 0x13474
leaq 0x28(%rsp), %r12
movq %r12, -0x10(%r12)
movq (%r15), %rsi
movq 0x8(%r15), %rdx
addq %rsi, %rdx
leaq 0x18(%rsp), %r14
movq %r14, %rdi
callq 0x7dce
movzwl (%rbp), %ebp
leaq 0x10(%rbx), %rax
movq %rax, (%rbx)
movq (%r14), %rsi
movq 0x8(%r14), %rdx
addq %rsi, %rdx
movq %rbx, %rdi
callq 0x7dce
movw %bp, 0x20(%rbx)
movq 0x18(%rsp), %rdi
cmpq %r12, %rdi
je 0x1344a
movq 0x28(%rsp), %rsi
incq %rsi
callq 0x5370
movq %rbx, %rax
addq $0x58, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
leaq 0x1e7b(%rip), %rdi      # 0x152de
callq 0x5210
leaq 0x1e6f(%rip), %rdi      # 0x152de
callq 0x54f0
movl $0x10, %edi
callq 0x51a0
movq %rax, %r14
leaq 0x1e1b(%rip), %rsi      # 0x152a3
movq %rax, %rdi
callq 0x56a0
movq 0x8b31(%rip), %rsi      # 0x1bfc8
movq 0x8b12(%rip), %rdx      # 0x1bfb0
movq %r14, %rdi
callq 0x5610
movq %rax, %rbx
movq %r14, %rdi
callq 0x5280
jmp 0x134f0
movq %rax, %rbx
movq 0x18(%rsp), %rdi
cmpq %r12, %rdi
je 0x134f0
movq 0x28(%rsp), %rsi
incq %rsi
callq 0x5370
jmp 0x134f0
movq %rax, %rbx
cmpl $0x0, (%r13)
jne 0x134e1
movl 0x4(%rsp), %eax
movl %eax, (%r13)
leaq 0x10(%rsp), %rdi
leaq 0x38(%rsp), %rsi
callq 0x5908
movq %rbx, %rdi
callq 0x5650
// File: /workspace/github_cpp_makefile_star2_O3/lemire[P]backward_multiplication/include/backwardmultiply.h
// Function: backwardmultiply::multiplication_backward_limit(unsigned long, unsigned long const*, unsigned long, unsigned long*, unsigned long)
size_t multiplication_backward_limit(uint64_t w, const uint64_t *b, size_t n,
                                     uint64_t *output, size_t minexactwords) {
  if ((w == 0) || (n == 0)) { // special case
    std::fill(output, output + n + 1, 0);
    return n + 1;
  }

  auto p = full_multiplication(w, b[n - 1]);
  output[n - 1] = p.low;
  output[n] = p.high;
  if (minexactwords <= 1) {
    // check if addition overflows
    if (p.low + w - 1 >= p.low) {
      // we are good at output[n]
      return 1;
    }
  }
  for (size_t i = n - 2; i != SIZE_MAX; i--) {
    p = full_multiplication(w, b[i]);
    output[i] = p.low;
    bool overflow = (output[i + 1] + p.high < output[i + 1]);
    output[i + 1] += p.high;
    for (size_t j = i + 2; overflow; j++) {
      output[j]++;
      overflow = (output[j] == 0);
    }
    if (minexactwords <= n - i) {
      // check if addition overflows
      if (p.low + w - 1 >= p.low) {
        // we are good at output[n], ..., output[i+1], so we have
        // n - (i+1) + 1 = n - i good words
        return n - i;
      }
      if (minexactwords < n - i) {
        // then the only way we could overflow is if the following is true
        if (output[i + 1] != 0xFFFFFFFFFFFFFFFF) {
          // we are good at output[n], ..., output[i+2], so we have
          // n - (i+2) + 1 = n - i - 1 good words

          return n - i - 1;
        }
      }
    }
  }
  return n + 1;
}

// Assembly:
pushq %r14
pushq %rbx
pushq %rax
movq %rdx, %rbx
testq %rdi, %rdi
setne %al
testq %rdx, %rdx
setne %dl
testb %dl, %al
jne 0x139d
leaq (%rcx,%rbx,8), %rax
addq $0x8, %rax
cmpq %rcx, %rax
je 0x141d
leaq 0x8(,%rbx,8), %rdx
movq %rcx, %rdi
xorl %esi, %esi
callq 0x1060
jmp 0x141d
movq %rdi, %rax
mulq -0x8(%rsi,%rbx,8)
movq %rax, -0x8(%rcx,%rbx,8)
movq %rdx, (%rcx,%rbx,8)
movq %rdi, %r10
negq %r10
cmpq $0x1, %r8
ja 0x13c7
movq %rax, %r9
movl $0x1, %eax
cmpq %r10, %r9
jbe 0x1423
leaq -0x2(%rbx), %r11
cmpq $-0x1, %r11
je 0x141d
leaq (%rcx,%rbx,8), %r14
movq %rdi, %rax
mulq (%rsi,%r11,8)
movq %rax, %r9
movq %rax, (%rcx,%r11,8)
addq %rdx, 0x8(%rcx,%r11,8)
movq %r14, %rax
jae 0x13f6
incq (%rax)
leaq 0x8(%rax), %rax
je 0x13ed
movq %rbx, %rax
subq %r11, %rax
cmpq %r8, %rax
jb 0x1413
cmpq %r10, %r9
jbe 0x1423
cmpq %r8, %rax
jbe 0x1413
cmpq $-0x1, 0x8(%rcx,%r11,8)
jne 0x142b
addq $-0x8, %r14
subq $0x1, %r11
jae 0x13d5
incq %rbx
movq %rbx, %rax
addq $0x8, %rsp
popq %rbx
popq %r14
retq
decq %rax
jmp 0x1423
// File: /workspace/github_cpp_makefile_star2_O3/lemire[P]backward_multiplication/include/backwardmultiply.h
// Function: backwardmultiply::multiplication_backward_limit_resume(unsigned long, unsigned long const*, unsigned long, unsigned long*, unsigned long, unsigned long&)
size_t multiplication_backward_limit_resume(uint64_t w, const uint64_t *b,
                                            size_t n, uint64_t *output,
                                            size_t minexactwords,
                                            size_t &previousindex) {
  if (n == 0) { // special case
    std::fill(output, output + n + 1, 0);
    return n + 1; // we are done!!!
  }
  if (previousindex > n) {
    // assume we are done
    return n + 1;
  }
  if (previousindex == n) {
    previousindex = n - 1;
    auto p = full_multiplication(w, b[n - 1]);
    output[n - 1] = p.low;
    output[n] = p.high;
    if (minexactwords <= 1) {
      // check if addition overflows
      if (p.low + w - 1 >= p.low) {
        // we are good
        return 1;
      }
    }
  }

  for (size_t i = previousindex - 1; i != SIZE_MAX; i--) {
    auto p = full_multiplication(w, b[i]);
    output[i] = p.low;
    bool overflow = (output[i + 1] + p.high < output[i + 1]);
    output[i + 1] += p.high;
    for (size_t j = i + 2; overflow; j++) {
      output[j]++;
      overflow = (output[j] == 0);
    }
    if (minexactwords <= n - i) {
      // check if addition overflows
      if (p.low + w - 1 >= p.low) {
        // we are good
        previousindex = i;
        return n - i;
      }
      if (minexactwords < n - i) {
        // then the only way we could overflow is if the following is true
        if (output[i + 1] != 0xFFFFFFFFFFFFFFFF) {
          previousindex = i;
          return n - i - 1;
        }
      }
    }
  }
  previousindex = SIZE_MAX;
  return n + 1;
}

// Assembly:
testq %rdx, %rdx
je 0x1447
movq %rdx, %r10
movq (%r9), %rdx
cmpq %r10, %rdx
jbe 0x1454
incq %r10
movq %r10, %rax
retq
movq $0x0, (%rcx)
movl $0x1, %eax
retq
jne 0x148a
leaq -0x1(%r10), %rax
movq %rax, (%r9)
movq %rdi, %rax
mulq -0x8(%rsi,%r10,8)
movq %rax, -0x8(%rcx,%r10,8)
movq %rdx, (%rcx,%r10,8)
cmpq $0x1, %r8
ja 0x1487
movq %rax, %r11
movq %rdi, %rdx
negq %rdx
movl $0x1, %eax
cmpq %rdx, %r11
jbe 0x1446
movq (%r9), %rdx
pushq %r15
pushq %r14
pushq %rbx
testq %rdx, %rdx
je 0x14f0
movq %rdi, %rbx
negq %rbx
leaq (%rcx,%rdx,8), %r14
addq $0x8, %r14
movq %rdx, %r15
movq %rdi, %rax
mulq -0x8(%rsi,%rdx,8)
movq %rax, %r11
movq %rax, -0x8(%rcx,%r15,8)
addq %rdx, (%rcx,%r15,8)
movq %r14, %rax
jae 0x14c7
incq (%rax)
leaq 0x8(%rax), %rax
je 0x14be
leaq -0x1(%r15), %rdx
movq %r10, %rax
subq %rdx, %rax
cmpq %r8, %rax
jb 0x14e7
cmpq %rbx, %r11
jbe 0x1503
cmpq %r8, %rax
jbe 0x14e7
cmpq $-0x1, (%rcx,%r15,8)
jne 0x1508
addq $-0x8, %r14
testq %rdx, %rdx
jne 0x14a2
movq $-0x1, (%r9)
incq %r10
movq %r10, %rax
popq %rbx
popq %r14
popq %r15
retq
movq %rdx, (%r9)
jmp 0x14fd
movq %rdx, (%r9)
decq %rax
jmp 0x14fd
// File: /workspace/github_cpp_makefile_star2_O3/t0mm4rx[P]piscine_cpp/day07/ex02/./Array.hpp
// Function: Array<int>::operator=(Array<int> const&)
const Array &operator=(const Array &target)
		{
			if (this->array != nullptr)
				delete [] this->array;
			this->array = new T[target.size()];
			this->n = target.size();
			for (unsigned int i = 0; i < target.size(); i++)
				this->array[i] = target.array[i];
			return (*this);
		}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %rbx
pushq %rax
movq %rsi, %r14
movq %rdi, %rbx
movq (%rdi), %rdi
testq %rdi, %rdi
je 0x19a1
callq 0x1100
movl 0x8(%r14), %r15d
leaq (,%r15,4), %rdi
callq 0x1030
movq %rax, (%rbx)
movl %r15d, 0x8(%rbx)
testq %r15, %r15
je 0x19d1
movq (%r14), %rcx
xorl %edx, %edx
movl (%rcx,%rdx,4), %esi
movl %esi, (%rax,%rdx,4)
incq %rdx
cmpq %rdx, %r15
jne 0x19c3
movq %rbx, %rax
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O3/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:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x38, %rsp
movq %rsi, %rbx
shlq $0x5, %rsi
addq %rdi, %rsi
movq %rdi, (%rsp)
movq %rsi, 0x10(%rsp)
callq 0x47d6
movabsq $-0x5555555555555555, %rcx # imm = 0xAAAAAAAAAAAAAAAB
movq %rbx, %rax
mulq %rcx
movq %rbx, 0x8(%rsp)
cmpq $0x6, %rbx
jb 0x3ce4
shrq %rdx
movl $0x1, %ecx
movq %rcx, %rax
leaq (%rcx,%rcx,2), %rcx
incq %rcx
cmpq %rdx, %rcx
jb 0x3bda
cmpq $0x3, %rax
jb 0x3ce4
leaq 0x20(%rsp), %rdi
cmpq 0x8(%rsp), %rcx
jge 0x3cc4
movq %rcx, %rax
shlq $0x5, %rax
movq (%rsp), %r14
leaq (%r14,%rax), %rsi
leaq (%r14,%rax), %r8
addq $0x8, %r8
negq %rax
xorl %r10d, %r10d
movq %rsi, %rdx
movq %r10, %r9
shlq $0x5, %r9
movl (%rdx), %ebp
movl 0x4(%rdx), %r12d
movq 0x10(%r8,%r9), %r11
movq %r11, 0x10(%rdi)
movups (%r8,%r9), %xmm0
movups %xmm0, (%rdi)
movq %rdx, %r11
cmpq %rsi, %rdx
jb 0x3c8f
movq %r14, %r9
movq %rdx, %r13
movl (%r13,%rax), %ebx
cmpl %ebx, %ebp
jge 0x3c8c
leaq (%rax,%r13), %r11
movl %ebx, (%r13)
movl 0x4(%r11), %ebx
movl %ebx, 0x4(%r13)
movl $0x2, %ebx
movl (%r9,%rbx,4), %r15d
movl %r15d, (%r13,%rbx,4)
incq %rbx
cmpq $0x8, %rbx
jne 0x3c6d
addq %rax, %r9
movq %r11, %r13
cmpq %rsi, %r11
jae 0x3c4f
jmp 0x3c8f
movq %r13, %r11
movl %ebp, (%r11)
movl %r12d, 0x4(%r11)
movl $0x2, %r9d
movl 0x18(%rsp,%r9,4), %ebx
movl %ebx, (%r11,%r9,4)
incq %r9
cmpq $0x8, %r9
jne 0x3c9c
addq $0x20, %rdx
incq %r10
addq $0x20, %r14
cmpq 0x10(%rsp), %rdx
jb 0x3c23
movq %rcx, %rax
movabsq $-0x5555555555555555, %rdx # imm = 0xAAAAAAAAAAAAAAAB
mulq %rdx
shrq %rdx
cmpq $0x1d, %rcx
movq %rdx, %rcx
ja 0x3bf8
addq $0x38, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O3/Baobaobear[P]sort/./sortlib.hpp
// Function: void baobao::internal::q_insert_sort<baobao::TestClass*, std::less<baobao::TestClass>>(baobao::TestClass*, 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:
pushq %rbx
leaq 0x1a0(%rdi), %rax
cmpq %rsi, %rax
jae 0x3e4a
movq %rdi, %rcx
movl (%rax), %edx
movl (%rcx), %r9d
cmpl %r9d, %edx
jge 0x3e3d
movl 0x4(%rax), %r8d
movq 0x18(%rax), %r10
movq %r10, -0x10(%rsp)
movups 0x8(%rax), %xmm0
movaps %xmm0, -0x20(%rsp)
movl %r9d, (%rax)
movl 0x4(%rcx), %r9d
movl %r9d, 0x4(%rax)
leaq 0x8(%rcx), %r9
movq $-0x18, %r10
movl 0x20(%rcx,%r10), %r11d
movl %r11d, 0x1c0(%rcx,%r10)
addq $0x4, %r10
jne 0x3e12
movl %edx, (%rcx)
movl %r8d, 0x4(%rcx)
movq -0x10(%rsp), %rdx
movq %rdx, 0x10(%r9)
movaps -0x20(%rsp), %xmm0
movups %xmm0, (%r9)
addq $0x20, %rax
addq $0x20, %rcx
cmpq %rsi, %rax
jb 0x3ddc
leaq 0x20(%rdi), %rax
cmpq %rsi, %rax
jae 0x3f24
movq %rdi, %rcx
movl (%rax), %edx
movl (%rcx), %r9d
cmpl %r9d, %edx
jge 0x3f13
movl %edx, -0x20(%rsp)
movl 0x24(%rcx), %r8d
movl %r8d, -0x1c(%rsp)
movl $0x2, %r10d
movl 0x20(%rcx,%r10,4), %r11d
movl %r11d, -0x20(%rsp,%r10,4)
incq %r10
cmpq $0x8, %r10
jne 0x3e7b
movl %r9d, (%rax)
movl 0x4(%rcx), %r9d
movl %r9d, 0x24(%rcx)
movl $0x2, %r9d
movl (%rcx,%r9,4), %r10d
movl %r10d, 0x20(%rcx,%r9,4)
incq %r9
cmpq $0x8, %r9
jne 0x3e9f
movq %rdi, %r9
cmpq %rdi, %rcx
je 0x3ef5
movq %rcx, %r9
movl -0x20(%r9), %r11d
cmpl %r11d, %edx
jge 0x3ef5
leaq -0x20(%r9), %r10
movl %r11d, (%r9)
movl -0x1c(%r9), %r11d
movl %r11d, 0x4(%r9)
movq $-0x18, %r11
movl (%r9,%r11), %ebx
movl %ebx, 0x20(%r9,%r11)
addq $0x4, %r11
jne 0x3edb
movq %r10, %r9
cmpq %rdi, %r10
jne 0x3ebc
movq %rdi, %r9
movl %edx, (%r9)
movl %r8d, 0x4(%r9)
movl $0x2, %edx
movl -0x20(%rsp,%rdx,4), %r8d
movl %r8d, (%r9,%rdx,4)
incq %rdx
cmpq $0x8, %rdx
jne 0x3f01
addq $0x20, %rax
addq $0x20, %rcx
cmpq %rsi, %rax
jb 0x3e5a
popq %rbx
retq
// File: /workspace/github_cpp_makefile_star2_O3/Baobaobear[P]sort/./sortlib.hpp
// Function: baobao::util::taus88::init(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:
pushq %rbp
pushq %rbx
pushq %rax
movq %rdi, %rbx
imull $0x8088405, %esi, %eax  # imm = 0x8088405
addl $0x8088406, %eax        # imm = 0x8088406
movl %esi, (%rdi)
notl %esi
imull $0x8088405, %esi, %ecx  # imm = 0x8088405
incl %ecx
movl %eax, 0x4(%rdi)
movl %ecx, 0x8(%rdi)
movl $0x10, %ebp
movq %rbx, %rdi
callq 0x4560
decl %ebp
jne 0x454c
addq $0x8, %rsp
popq %rbx
popq %rbp
retq
nop
// File: /workspace/github_cpp_makefile_star2_O3/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:
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x20, %rsp
movq %rsi, %r14
subq %rdi, %r14
sarq $0x5, %r14
cmpq $0x2, %r14
jl 0x4890
movq %rdi, %rbx
movq %r14, %rax
shlq $0x5, %rax
leaq (%rax,%rdi), %r12
addq $-0x18, %r12
leaq -0x1(%r14), %r15
movq %r15, %r13
shlq $0x5, %r13
movl %r15d, %edi
callq 0x23f6
movl %eax, %esi
shlq $0x5, %rsi
leaq (%rbx,%rsi), %rax
movl (%rbx,%r13), %ecx
movl 0x4(%rbx,%r13), %edx
movq 0x18(%rbx,%r13), %rdi
movq %rdi, 0x10(%rsp)
movups 0x8(%rbx,%r13), %xmm0
movaps %xmm0, (%rsp)
leaq 0x8(%rbx,%rsi), %rsi
movl -0x8(%rsi), %edi
movl %edi, (%rbx,%r13)
movl -0x4(%rsi), %edi
movl %edi, 0x4(%rbx,%r13)
xorl %edi, %edi
movl (%rsi,%rdi,4), %r8d
movl %r8d, (%r12,%rdi,4)
incq %rdi
cmpq $0x6, %rdi
jne 0x4859
movl %ecx, (%rax)
movl %edx, 0x4(%rax)
movq 0x10(%rsp), %rax
movq %rax, 0x10(%rsi)
movaps (%rsp), %xmm0
movups %xmm0, (%rsi)
addq $-0x20, %r12
cmpq $0x2, %r14
movq %r15, %r14
jg 0x4809
addq $0x20, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
retq
// File: /workspace/github_cpp_makefile_star2_O3/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:
pushq %rbp
pushq %r14
pushq %rbx
movl %esi, %r14d
movq %rdi, %rbx
leal 0x1(%r14), %ebp
movl 0x14(%rdi), %edx
testl %edx, %edx
jne 0x4d0d
movq (%rbx), %rdi
callq 0x4560
movl %eax, 0x10(%rbx)
movl $0x4, %edx
testl %r14d, %ebp
je 0x4d65
movl %ebp, %eax
leal -0x1(%rax), %ecx
testl %ecx, %eax
je 0x4d27
movl %eax, %ecx
negl %ecx
andl %eax, %ecx
addl %eax, %ecx
movl %ecx, %eax
jmp 0x4d14
movzbl %cl, %r14d
decl %edx
movl %edx, 0x14(%rbx)
movl 0x10(%rbx), %ecx
movl %ecx, %eax
shrl $0x8, %eax
movl %eax, 0x10(%rbx)
andl %r14d, %ecx
cmpl %ebp, %ecx
jb 0x4d7a
testl %edx, %edx
jne 0x4d53
movq (%rbx), %rdi
callq 0x4560
movl $0x4, %edx
decl %edx
movl %edx, 0x14(%rbx)
movl %r14d, %ecx
andl %eax, %ecx
shrl $0x8, %eax
movl %eax, 0x10(%rbx)
jmp 0x4d3e
decl %edx
movl %edx, 0x14(%rbx)
movl 0x10(%rbx), %eax
andl %eax, %r14d
shrl $0x8, %eax
movl %eax, 0x10(%rbx)
movzbl %r14b, %ecx
movl %ecx, %eax
popq %rbx
popq %r14
popq %rbp
retq
nop
// File: /workspace/github_cpp_makefile_star2_O3/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:
pushq %rbp
pushq %r14
pushq %rbx
movl %esi, %r14d
movq %rdi, %rbx
leal 0x1(%r14), %ebp
movl 0xc(%rdi), %edx
testl %edx, %edx
jne 0x4da7
movq (%rbx), %rdi
callq 0x4560
movl %eax, 0x8(%rbx)
movl $0x2, %edx
testl %r14d, %ebp
je 0x4dff
movl %ebp, %eax
leal -0x1(%rax), %ecx
testl %ecx, %eax
je 0x4dc1
movl %eax, %ecx
negl %ecx
andl %eax, %ecx
addl %eax, %ecx
movl %ecx, %eax
jmp 0x4dae
movzwl %cx, %r14d
decl %edx
movl %edx, 0xc(%rbx)
movl 0x8(%rbx), %ecx
movl %ecx, %eax
shrl $0x10, %eax
movl %eax, 0x8(%rbx)
andl %r14d, %ecx
cmpl %ebp, %ecx
jb 0x4e14
testl %edx, %edx
jne 0x4ded
movq (%rbx), %rdi
callq 0x4560
movl $0x2, %edx
decl %edx
movl %edx, 0xc(%rbx)
movl %r14d, %ecx
andl %eax, %ecx
shrl $0x10, %eax
movl %eax, 0x8(%rbx)
jmp 0x4dd8
decl %edx
movl %edx, 0xc(%rbx)
movl 0x8(%rbx), %eax
andl %eax, %r14d
shrl $0x10, %eax
movl %eax, 0x8(%rbx)
movzwl %r14w, %ecx
movl %ecx, %eax
popq %rbx
popq %r14
popq %rbp
retq
nop
// File: /workspace/github_cpp_makefile_star2_O3/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:
pushq %rbp
pushq %r14
pushq %rbx
movl %esi, %r14d
movq %rdi, %rbx
leal 0x1(%r14), %ebp
testl %esi, %ebp
je 0x4e56
movl %ebp, %eax
leal -0x1(%rax), %r14d
testl %r14d, %eax
je 0x4e45
movl %eax, %ecx
negl %ecx
andl %eax, %ecx
addl %eax, %ecx
movl %ecx, %eax
jmp 0x4e30
movq (%rbx), %rdi
callq 0x4560
andl %r14d, %eax
cmpl %ebp, %eax
jae 0x4e45
jmp 0x4e61
movq (%rbx), %rdi
callq 0x4560
andl %r14d, %eax
popq %rbx
popq %r14
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O3/Baobaobear[P]sort/./sortlib.hpp
// Function: void baobao::internal::insert_sort<baobao::TestClass*, std::less<baobao::TestClass>>(baobao::TestClass*, 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:
leaq 0x20(%rdi), %rax
cmpq %rsi, %rax
jae 0x668f
pushq %rbx
movq %rdi, %rcx
movl (%rax), %edx
movl (%rcx), %r9d
cmpl %r9d, %edx
jge 0x667d
movl %edx, -0x20(%rsp)
movl 0x24(%rcx), %r8d
movl %r8d, -0x1c(%rsp)
movl $0x2, %r10d
movl 0x20(%rcx,%r10,4), %r11d
movl %r11d, -0x20(%rsp,%r10,4)
incq %r10
cmpq $0x8, %r10
jne 0x65e5
movl %r9d, (%rax)
movl 0x4(%rcx), %r9d
movl %r9d, 0x24(%rcx)
movl $0x2, %r9d
movl (%rcx,%r9,4), %r10d
movl %r10d, 0x20(%rcx,%r9,4)
incq %r9
cmpq $0x8, %r9
jne 0x6609
movq %rdi, %r9
cmpq %rdi, %rcx
je 0x665f
movq %rcx, %r9
movl -0x20(%r9), %r11d
cmpl %r11d, %edx
jge 0x665f
leaq -0x20(%r9), %r10
movl %r11d, (%r9)
movl -0x1c(%r9), %r11d
movl %r11d, 0x4(%r9)
movq $-0x18, %r11
movl (%r9,%r11), %ebx
movl %ebx, 0x20(%r9,%r11)
addq $0x4, %r11
jne 0x6645
movq %r10, %r9
cmpq %rdi, %r10
jne 0x6626
movq %rdi, %r9
movl %edx, (%r9)
movl %r8d, 0x4(%r9)
movl $0x2, %edx
movl -0x20(%rsp,%rdx,4), %r8d
movl %r8d, (%r9,%rdx,4)
incq %rdx
cmpq $0x8, %rdx
jne 0x666b
addq $0x20, %rax
addq $0x20, %rcx
cmpq %rsi, %rax
jb 0x65c4
popq %rbx
retq
// File: /workspace/github_cpp_makefile_star2_O3/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:
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x20, %rsp
movq %rsi, %r12
subq %rdi, %r12
sarq $0x5, %r12
cmpq $0x2, %r12
jl 0x675b
movq %rsi, %rbx
movq %rdi, %r14
shlq $0x4, %r12
andq $-0x20, %r12
addq %rdi, %r12
leaq -0x20(%rsi), %r15
movq %r14, %rdi
movq %r12, %rsi
movq %r15, %rdx
callq 0x6769
addq $-0x20, %r12
cmpq %r14, %r12
jae 0x66c6
cmpq %r14, %r15
jbe 0x675b
leaq 0x8(%r14), %r13
movl (%r14), %eax
movl 0x4(%r14), %ecx
movq 0x10(%r13), %rdx
movq %rdx, 0x10(%rsp)
movups (%r13), %xmm0
movaps %xmm0, (%rsp)
movl (%r15), %edx
movl %edx, (%r14)
movl 0x4(%r15), %edx
movl %edx, 0x4(%r14)
leaq 0x8(%r15), %rdx
movq $-0x18, %rsi
movl (%rbx,%rsi), %edi
movl %edi, 0x20(%r14,%rsi)
addq $0x4, %rsi
jne 0x6718
leaq -0x20(%r15), %r12
movl %eax, (%r15)
movl %ecx, 0x4(%r15)
movq 0x10(%rsp), %rax
movq %rax, 0x10(%rdx)
movaps (%rsp), %xmm0
movups %xmm0, (%rdx)
movq %r14, %rdi
movq %r14, %rsi
movq %r12, %rdx
callq 0x6769
addq $-0x20, %rbx
movq %r12, %r15
cmpq %r14, %r12
ja 0x66e6
addq $0x20, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
retq
// File: /workspace/github_cpp_makefile_star2_O3/Baobaobear[P]sort/./sortlib.hpp
// Function: baobao::TestClass* baobao::internal::insert_sort_limit<baobao::TestClass*, std::less<baobao::TestClass>>(baobao::TestClass*, 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:
leaq 0x20(%rdi), %rax
cmpq %rsi, %rax
jae 0x6c9e
pushq %rbp
pushq %rbx
movq %rdi, %rcx
movl (%rax), %r8d
movl (%rcx), %r10d
cmpl %r10d, %r8d
jge 0x6c86
movl %r8d, -0x20(%rsp)
movl 0x24(%rcx), %r9d
movl %r9d, -0x1c(%rsp)
movl $0x2, %r11d
movl 0x20(%rcx,%r11,4), %ebx
movl %ebx, -0x20(%rsp,%r11,4)
incq %r11
cmpq $0x8, %r11
jne 0x6be7
movl %r10d, (%rax)
movl 0x4(%rcx), %r10d
movl %r10d, 0x24(%rcx)
movl $0x2, %r10d
movl (%rcx,%r10,4), %r11d
movl %r11d, 0x20(%rcx,%r10,4)
incq %r10
cmpq $0x8, %r10
jne 0x6c0b
cmpq %rdi, %rcx
je 0x6c62
movq %rcx, %r10
movl -0x20(%r10), %ebx
cmpl %ebx, %r8d
jge 0x6c65
cmpl $0x1, %edx
jle 0x6ca2
leaq -0x20(%r10), %r11
decl %edx
movl %ebx, (%r10)
movl -0x1c(%r10), %ebx
movl %ebx, 0x4(%r10)
movq $-0x18, %rbx
movl (%r10,%rbx), %ebp
movl %ebp, 0x20(%r10,%rbx)
addq $0x4, %rbx
jne 0x6c4b
movq %r11, %r10
cmpq %rdi, %r11
jne 0x6c25
movq %rdi, %r10
movl %r8d, (%r10)
movl %r9d, 0x4(%r10)
movl $0x2, %r8d
movl -0x20(%rsp,%r8,4), %r9d
movl %r9d, (%r10,%r8,4)
incq %r8
cmpq $0x8, %r8
jne 0x6c72
jmp 0x6c88
incl %edx
addq $0x20, %rax
addq $0x20, %rcx
cmpq %rsi, %rax
jb 0x6bc4
movq %rsi, %rax
jmp 0x6cbf
movq %rsi, %rax
retq
movl %r8d, (%r10)
movl %r9d, 0x4(%r10)
movl $0x2, %ecx
movl -0x20(%rsp,%rcx,4), %edx
movl %edx, (%r10,%rcx,4)
incq %rcx
cmpq $0x8, %rcx
jne 0x6cae
popq %rbx
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O3/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:
movq %rsi, %rax
subq %rdi, %rax
cmpq $0x21, %rax
jl 0x6d0c
pushq %r15
pushq %r14
pushq %rbx
movq %rsi, %rbx
movq %rdi, %r14
shrq %rax
movabsq $0x3fffffffffffffe0, %rdi # imm = 0x3FFFFFFFFFFFFFE0
andq %rax, %rdi
callq 0x21d0
movq %rax, %r15
movq %rax, %rdi
movq %r14, %rsi
movq %rbx, %rdx
callq 0x6d0d
movq %r15, %rdi
popq %rbx
popq %r14
popq %r15
jmp 0x21b0
retq
// File: /workspace/github_cpp_makefile_star2_O3/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:
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
pushq %rax
movq %rdx, %rbx
movq %rsi, %r14
movq %rdx, %r15
subq %rsi, %r15
sarq $0x5, %r15
cmpq $0x1f, %r15
ja 0x6d41
movq %r14, %rdi
movq %rbx, %rsi
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
jmp 0x65b3
movq %rdi, %r12
shlq $0x4, %r15
andq $-0x20, %r15
addq %r14, %r15
movq %r14, %rsi
movq %r15, %rdx
callq 0x6d0d
movq %r12, %rdi
movq %r15, %rsi
movq %rbx, %rdx
callq 0x6d0d
movq %r12, %rdi
movq %r14, %rsi
movq %r15, %rdx
movq %rbx, %rcx
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
jmp 0x6d84
// File: /workspace/github_cpp_makefile_star2_O3/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:
movq %rsi, %rax
subq %rdi, %rax
cmpq $0x21, %rax
jl 0x7132
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
pushq %rax
movq %rsi, %rbx
movq %rdi, %r14
shrq %rax
movabsq $0x3fffffffffffffe0, %r15 # imm = 0x3FFFFFFFFFFFFFE0
andq %rax, %r15
movq %r15, %rdi
callq 0x2030
movq %rax, %r12
movq %rax, %rdi
xorl %esi, %esi
movq %r15, %rdx
callq 0x20d0
movq %r12, %rdi
movq %r14, %rsi
movq %rbx, %rdx
callq 0x7133
movq %r12, %rdi
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
jmp 0x21c0
retq
// File: /workspace/github_cpp_makefile_star2_O3/Baobaobear[P]sort/./sortlib.hpp
// Function: void baobao::internal::merge_sort_with_buffer<false, baobao::TestClass*, std::less<baobao::TestClass>>(baobao::TestClass*, baobao::TestClass*, std::less<baobao::TestClass>, bool)
void merge_sort_with_buffer(RandomAccessIterator beg, RandomAccessIterator end, Comp compare, bool buffered)
{
    if (end - beg > 1)
    {
        typedef typename std::iterator_traits<RandomAccessIterator>::value_type value_type;
        if (buffered)
        {
            if ((end - beg) / 2 * sizeof(value_type) <= merge_sort_stack_buffer_size)
            {
                value_type buf[merge_sort_stack_buffer_size / sizeof(value_type)];
                merge_sort_recursive<safecopy>(buf, beg, end, compare);
            }
            else if (merge_sort_alloc_buffer)
            {
                size_t bufsize = (size_t)sqrt(end - beg + 0.1);
                value_type * buf = new value_type[bufsize];
                merge_sort_recursive_with_buffer<safecopy>(buf, bufsize, beg, end, compare);
                delete[] buf;
            }
            else
            {
                // not really in-place, uses a fixed size of buffer in stack
                value_type buf[merge_sort_stack_buffer_size / sizeof(value_type)];
                merge_sort_recursive_with_buffer<safecopy>(buf, sizeof(buf) / sizeof(value_type), beg, end, compare);
            }
        }
        else
        {
            merge_sort_recursive_with_buffer<false>((value_type*)NULL, 0, beg, end, compare);
        }
    }
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x4008, %rsp           # imm = 0x4008
movq %rsi, %rcx
subq %rdi, %rcx
movq %rcx, %rax
sarq $0x5, %rax
cmpq $0x2, %rax
jl 0x759f
movq %rsi, %rbx
movq %rdi, %r14
testb %dl, %dl
je 0x75b1
andq $-0x40, %rcx
cmpq $0x8001, %rcx           # imm = 0x8001
ja 0x75d1
movq %rsp, %r15
movl $0x4000, %edx           # imm = 0x4000
movq %r15, %rdi
xorl %esi, %esi
callq 0x20d0
movq %r15, %rdi
movq %r14, %rsi
movq %rbx, %rdx
callq 0x6d0d
addq $0x4008, %rsp           # imm = 0x4008
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
xorl %edi, %edi
xorl %esi, %esi
movq %r14, %rdx
movq %rbx, %rcx
addq $0x4008, %rsp           # imm = 0x4008
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
jmp 0x7667
cvtsi2sd %rax, %xmm0
addsd 0xca2a(%rip), %xmm0     # 0x14008
sqrtsd %xmm0, %xmm0
cvttsd2si %xmm0, %rax
movq %rax, %rcx
sarq $0x3f, %rcx
subsd 0xca1a(%rip), %xmm0     # 0x14010
cvttsd2si %xmm0, %rbp
andq %rcx, %rbp
orq %rax, %rbp
movq %rbp, %rax
shrq $0x3b, %rax
movq %rbp, %r15
shlq $0x5, %r15
xorl %r13d, %r13d
negq %rax
movl $0x0, %edi
sbbq %rdi, %rdi
orq %r15, %rdi
callq 0x2030
movq %rax, %r12
testq %rbp, %rbp
je 0x763d
movq %r12, %rdi
xorl %esi, %esi
movq %r15, %rdx
callq 0x20d0
movq %rbp, %r13
movq %r12, %rdi
movq %r13, %rsi
movq %r14, %rdx
movq %rbx, %rcx
callq 0x7667
movq %r12, %rdi
addq $0x4008, %rsp           # imm = 0x4008
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
jmp 0x21c0
// File: /workspace/github_cpp_makefile_star2_O3/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:
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
movq %rcx, %rbx
movq %rdx, %r14
movq %rcx, %r15
subq %rdx, %r15
sarq $0x5, %r15
cmpq $0x1f, %r15
ja 0x769a
movq %r14, %rdi
movq %rbx, %rsi
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
jmp 0x65b3
movq %rsi, %r12
movq %rdi, %r13
shlq $0x4, %r15
andq $-0x20, %r15
addq %r14, %r15
movq %r14, %rdx
movq %r15, %rcx
callq 0x7667
movq %r13, %rdi
movq %r12, %rsi
movq %r15, %rdx
movq %rbx, %rcx
callq 0x7667
movq %r13, %rdi
movq %r12, %rsi
movq %r14, %rdx
movq %r15, %rcx
movq %rbx, %r8
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
jmp 0x76e4
// File: /workspace/github_cpp_makefile_star2_O3/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:
leaq 0x20(%rdi), %rax
cmpq %rsi, %rax
jae 0x910d
pushq %rbx
movl (%rax), %ecx
movl (%rdi), %r9d
cmpl %r9d, %ecx
jge 0x90d2
movl %ecx, -0x20(%rsp)
movl 0x24(%rdi), %r8d
movl %r8d, -0x1c(%rsp)
movl $0x2, %r10d
movl 0x20(%rdi,%r10,4), %r11d
movl %r11d, -0x20(%rsp,%r10,4)
incq %r10
cmpq $0x8, %r10
jne 0x904e
movl %r9d, (%rax)
movl 0x4(%rdi), %r9d
movl %r9d, 0x24(%rdi)
movl $0x2, %r9d
movl (%rdi,%r9,4), %r10d
movl %r10d, 0x20(%rdi,%r9,4)
incq %r9
cmpq $0x8, %r9
jne 0x9072
movl -0x20(%rdi), %r11d
cmpl %r11d, %ecx
jge 0x90d6
leaq -0x20(%rdi), %rbx
movq %rdi, %r9
cmpl $0x1, %edx
jle 0x9111
movq %rbx, %r10
decl %edx
movl %r11d, (%r9)
movl -0x1c(%r9), %r11d
movl %r11d, 0x4(%r9)
movq $-0x18, %r11
movl (%r9,%r11), %ebx
movl %ebx, 0x20(%r9,%r11)
addq $0x4, %r11
jne 0x90b0
leaq -0x20(%r10), %rbx
movl -0x20(%r10), %r11d
addq $-0x20, %r9
cmpl %r11d, %ecx
jl 0x9094
jmp 0x90d9
incl %edx
jmp 0x90f7
movq %rdi, %r10
movl %ecx, (%r10)
movl %r8d, 0x4(%r10)
movl $0x2, %ecx
movl -0x20(%rsp,%rcx,4), %r8d
movl %r8d, (%r10,%rcx,4)
incq %rcx
cmpq $0x8, %rcx
jne 0x90e5
addq $0x20, %rax
addq $0x20, %rdi
cmpq %rsi, %rax
jb 0x902d
movq %rsi, %rax
jmp 0x912e
movq %rsi, %rax
retq
movl %ecx, (%r9)
movl %r8d, 0x4(%r9)
movl $0x2, %ecx
movl -0x20(%rsp,%rcx,4), %edx
movl %edx, (%r9,%rcx,4)
incq %rcx
cmpq $0x8, %rcx
jne 0x911d
popq %rbx
retq
// File: /workspace/github_cpp_makefile_star2_O3/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:
movq %rdx, %rax
subq %rsi, %rax
cmpq $0x9, %rax
jl 0x9bc2
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
pushq %rax
movq %rdx, %r15
movq %rsi, %rbx
movq %rdi, %r14
cmpq $0x10, %rax
jne 0x9b5a
leaq -0x8(%r15), %r12
movq -0x10(%r15), %rsi
movq -0x8(%r15), %rdx
movq (%r15), %rcx
movq %r14, %rdi
jmp 0x9b9c
movq (%r15), %rax
leaq -0x8(%r15), %r12
movq -0x8(%r15), %rcx
movq %rax, %rdi
subq %rcx, %rdi
movq -0x18(%r15), %rsi
movq -0x10(%r15), %rdx
movq %rdx, %r8
subq %rsi, %r8
cmpq %r8, %rdi
jle 0x9b90
movq %r14, %rdi
callq 0x6d84
movq -0x8(%r15), %rax
movq %rax, -0x10(%r15)
jmp 0x9ba1
movq %r14, %rdi
movq %rdx, %rsi
movq %rcx, %rdx
movq %rax, %rcx
callq 0x6d84
movq (%r15), %rax
movq %rax, -0x8(%r15)
movq %r12, %rax
subq %rbx, %rax
movq %r12, %r15
cmpq $0x8, %rax
jg 0x9b40
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
retq
// File: /workspace/github_cpp_makefile_star2_O3/Baobaobear[P]sort/./sortlib.hpp
// Function: void baobao::internal::tim_sort_force_stack_merge_with_buffer<false, baobao::TestClass*, baobao::TestClass*, std::less<baobao::TestClass>>(baobao::TestClass*, unsigned long, baobao::TestClass**, baobao::TestClass**, std::less<baobao::TestClass>)
void tim_sort_force_stack_merge_with_buffer(RandomAccessBufferIterator buf, size_t bufsize, 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_with_buffer<safecopy>(buf, bufsize, end[-2], end[-1], end[0], compare);
                end[-1] = end[0];
                --end;
            }
            else
            {
                merge_2_part_with_buffer<safecopy>(buf, bufsize, end[-3], end[-2], end[-1], compare);
                end[-2] = end[-1];
                end[-1] = end[0];
                --end;
            }
        }
        else
        {
            merge_2_part_with_buffer<safecopy>(buf, bufsize, end[-2], end[-1], end[0], compare);
            end[-1] = end[0];
            --end;
        }
    }
}

// Assembly:
movq %rcx, %rax
subq %rdx, %rax
cmpq $0x9, %rax
jl 0x9e22
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
movq %rcx, %r12
movq %rdx, %rbx
movq %rsi, %r14
movq %rdi, %r15
cmpq $0x10, %rax
jne 0x9da9
leaq -0x8(%r12), %r13
movq -0x10(%r12), %rdx
movq -0x8(%r12), %rcx
movq (%r12), %r8
movq %r15, %rdi
movq %r14, %rsi
jmp 0x9df8
movq (%r12), %r8
leaq -0x8(%r12), %r13
movq -0x8(%r12), %rax
movq %r8, %rsi
subq %rax, %rsi
movq -0x18(%r12), %rdx
movq -0x10(%r12), %rcx
movq %rcx, %rdi
subq %rdx, %rdi
cmpq %rdi, %rsi
jle 0x9dec
movq %r15, %rdi
movq %r14, %rsi
movq %rax, %r8
callq 0x76e4
movq -0x8(%r12), %rax
movq %rax, -0x10(%r12)
jmp 0x9dfd
movq %r15, %rdi
movq %r14, %rsi
movq %rcx, %rdx
movq %rax, %rcx
callq 0x76e4
movq (%r12), %rax
movq %rax, -0x8(%r12)
movq %r13, %rax
subq %rbx, %rax
movq %r13, %r12
cmpq $0x8, %rax
jg 0x9d88
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
retq
// File: /workspace/github_cpp_makefile_star2_O3/Baobaobear[P]sort/./sortlib.hpp
// Function: void baobao::internal::indirect_qsort<baobao::TestClass*, std::less<baobao::TestClass>>(baobao::TestClass*, baobao::TestClass*, std::less<baobao::TestClass>)
void indirect_qsort(RandomAccessIterator beg, RandomAccessIterator end, Comp compare)
{
    if (end - beg > 1)
    {
        size_t size = (size_t)(end - beg);
        indirect_sort_iter_warp<RandomAccessIterator>* ptr = new indirect_sort_iter_warp<RandomAccessIterator>[size], *ptr_beg = ptr, *ptr_end = ptr + size;
        for (size_t i = 0; i < size; ++i)
        {
            ptr[i].it = beg + i;
            ptr[i].index = i;
        }
        internal::quick_sort(ptr_beg, ptr_end, indirect_sort_comp_warp<RandomAccessIterator, Comp>(compare));
        for (size_t i = 0; i < size; ++i)
        {
            ptr[i].index = ptr[i].it - beg;
        }

        for (size_t index = 0; index < size; ++index)
        {
            if (ptr[index].index)
            {
                size_t i = index;
                typename std::iterator_traits<RandomAccessIterator>::value_type v = *ptr[i].it;
                for (; ptr[i].index > index;)
                {
                    size_t j = ptr[i].index;
                    *ptr[i].it = *ptr[j].it;
                    ptr[i].index = 0;
                    i = j;
                }
                *ptr[i].it = v;
                ptr[i].index = 0;
            }
        }
        delete[] ptr;
    }
}

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
subq $0x30, %rsp
subq %rdi, %rsi
movq %rsi, %r15
sarq $0x5, %r15
cmpq $0x2, %r15
jl 0xa619
movq %rdi, %r14
shrq %rsi
movq %rsi, %rdi
callq 0x2030
movq %rax, %rbx
addq $0x8, %rax
xorl %ecx, %ecx
movq %r14, %rdx
movq %rdx, (%rax)
movq %rcx, -0x8(%rax)
incq %rcx
addq $0x10, %rax
addq $0x20, %rdx
cmpq %rcx, %r15
jne 0xa519
movq %r15, %rsi
shlq $0x4, %rsi
addq %rbx, %rsi
leaq 0xf(%rsp), %rdx
movq %rbx, %rdi
callq 0xa623
leaq 0x8(%rbx), %rax
movq %r15, %rcx
movq (%rax), %rdx
subq %r14, %rdx
sarq $0x5, %rdx
movq %rdx, -0x8(%rax)
addq $0x10, %rax
decq %rcx
jne 0xa54e
xorl %eax, %eax
movq %rax, %rcx
shlq $0x4, %rcx
movq (%rbx,%rcx), %rdx
testq %rdx, %rdx
je 0xa605
addq %rbx, %rcx
movq 0x8(%rcx), %r8
movl (%r8), %esi
movl 0x4(%r8), %edi
movq 0x18(%r8), %r9
movq %r9, 0x20(%rsp)
movups 0x8(%r8), %xmm0
movaps %xmm0, 0x10(%rsp)
cmpq %rax, %rdx
jbe 0xa5e4
shlq $0x4, %rdx
movq 0x8(%rbx,%rdx), %r8
movq 0x8(%rcx), %r9
movl (%r8), %r10d
movl %r10d, (%r9)
movl 0x4(%r8), %r10d
movl %r10d, 0x4(%r9)
movl $0x2, %r10d
movl (%r8,%r10,4), %r11d
movl %r11d, (%r9,%r10,4)
incq %r10
cmpq $0x8, %r10
jne 0xa5c2
movq $0x0, (%rcx)
leaq (%rbx,%rdx), %rcx
movq (%rbx,%rdx), %rdx
jmp 0xa59c
movl %esi, (%r8)
movl %edi, 0x4(%r8)
movaps 0x10(%rsp), %xmm0
movups %xmm0, 0x8(%r8)
movq 0x20(%rsp), %rdx
movq %rdx, 0x18(%r8)
movq $0x0, (%rcx)
incq %rax
cmpq %r15, %rax
jne 0xa567
movq %rbx, %rdi
callq 0x21c0
addq $0x30, %rsp
popq %rbx
popq %r14
popq %r15
retq
// File: /workspace/github_cpp_makefile_star2_O3/Baobaobear[P]sort/./sortlib.hpp
// Function: void baobao::internal::radix_sort_msd_in_place<baobao::TestClass*, baobao::internal::radix_get_index<baobao::TestClass, unsigned int>, std::less<baobao::TestClass>>(baobao::TestClass*, baobao::TestClass*, baobao::internal::radix_get_index<baobao::TestClass, unsigned int>, std::less<baobao::TestClass>)
void radix_sort_msd_in_place(RandomAccessIterator beg, RandomAccessIterator end, RadixIndexFunc get_index, Comp compare)
{
    uint32_t max_offset = 0;
    for (RandomAccessIterator i = beg; i < end; ++i)
    {
        uint32_t offset = radix_get_max_offset(get_index(*i));
        if (max_offset < offset)
            max_offset = offset;
    }
    radix_sort_msd_in_place(beg, end, get_index, max_offset, compare);
}

// Assembly:
xorl %edx, %edx
cmpq %rsi, %rdi
jae 0xb4f5
xorl %r8d, %r8d
movl $0x80000000, %eax       # imm = 0x80000000
movq %rdi, %rcx
movl (%rcx), %r9d
xorl %eax, %r9d
movl $0x0, %edx
cmpl $0x100, %r9d            # imm = 0x100
jb 0xb4dd
xorl %edx, %edx
movl %r9d, %r10d
addl $0x8, %edx
shrl $0x8, %r10d
cmpl $0xffff, %r9d           # imm = 0xFFFF
movl %r10d, %r9d
ja 0xb4ca
cmpl %edx, %r8d
cmoval %r8d, %edx
addq $0x20, %rcx
movl %edx, %r8d
cmpq %rsi, %rcx
jb 0xb4b1
jmp 0xb4f5