LLM4Binary/decompile-bench-makefile huggingface dataset:
// File: /workspace/github_cpp_makefile_star2_O2/Baobaobear[P]sort/./grailsort.hpp
// Function: void Mrrl::grail_SmartMergeWithBuffer<baobao::TestClass*, std::less<baobao::TestClass>>(baobao::TestClass*, int*, int*, baobao::TestClass*, baobao::TestClass*, std::less<baobao::TestClass>)
void grail_SmartMergeWithBuffer(RandomAccessIterator beg, int *alen1, int *atype, RandomAccessIterator end, RandomAccessIterator lkeys, Comp compare) {
    RandomAccessIterator p0 = lkeys, p1 = beg, p2 = beg + *alen1, q1 = p2, q2 = end;
    int ftype = !*atype;  // 1 if inverted
    while (p1 < q1 && p2 < q2) {
        if (grail_cmp(*p1, *p2, compare) - ftype < 0)
            grail_swap1(p0++, p1++);
        else grail_swap1(p0++, p2++);
    }
    if (p1 < q1) {
        *alen1 = (int)(q1 - p1);
        while (p1 < q1) grail_swap1(--q1, --q2);
    } else {
        *alen1 = (int)(q2 - p2);
        *atype = ftype;
    }
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x18, %rsp
movq %r8, %rbp
movq %rcx, %rbx
movq %rdi, %r14
movq %rsi, 0x8(%rsp)
movslq (%rsi), %r13
shlq $0x5, %r13
addq %rdi, %r13
movq %rdx, 0x10(%rsp)
movl (%rdx), %r12d
movq %r13, %r15
cmpq %r13, %r14
jae 0xa82b
cmpq %rbx, %r15
jae 0xa82b
testl %r12d, %r12d
sete %cl
movl (%r14), %eax
movl (%r15), %edx
cmpl %edx, %eax
setl %dl
setle %al
andb %cl, %al
orb %dl, %al
movq %r14, %rsi
jne 0xa807
movq %r15, %rsi
movzbl %al, %eax
movl %eax, %ecx
shll $0x5, %ecx
addq %rcx, %r14
xorb $0x1, %al
movzbl %al, %eax
shll $0x5, %eax
addq %rax, %r15
movq %rbp, %rdi
callq 0xa092
addq $0x20, %rbp
jmp 0xa7dd
cmpq %r13, %r14
jae 0xa85b
movq %r13, %rax
subq %r14, %rax
shrq $0x5, %rax
movq 0x8(%rsp), %rcx
movl %eax, (%rcx)
addq $-0x20, %rbx
cmpq %r13, %r14
jae 0xa878
addq $-0x20, %r13
movq %r13, %rdi
movq %rbx, %rsi
callq 0xa092
jmp 0xa841
xorl %eax, %eax
testl %r12d, %r12d
sete %al
subq %r15, %rbx
shrq $0x5, %rbx
movq 0x8(%rsp), %rcx
movl %ebx, (%rcx)
movq 0x10(%rsp), %rcx
movl %eax, (%rcx)
addq $0x18, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O2/Baobaobear[P]sort/./grailsort.hpp
// Function: void Mrrl::grail_SmartMergeWithoutBuffer<baobao::TestClass*, std::less<baobao::TestClass>>(baobao::TestClass*, int*, int*, baobao::TestClass*, std::less<baobao::TestClass>)
void grail_SmartMergeWithoutBuffer(RandomAccessIterator beg, int *alen1, int *atype, RandomAccessIterator end, Comp compare) {
    int ftype;

    if (beg == end) return;
    RandomAccessIterator mid = beg + *alen1;
    ftype = !*atype;
    if ((mid - beg) && grail_cmp(*(mid - 1), *mid, compare) - ftype >= 0) {
        while (mid - beg) {
            RandomAccessIterator p = (ftype ? grail_BinSearchLeft(mid, end, beg, compare) : grail_BinSearchRight(mid, end, beg, compare));
            if (p > mid) {
                grail_rotate(beg, mid, p);
                beg += p - mid;
                mid = p;
            }
            if (mid == end) {
                *alen1 = (int)(mid - beg);
                return;
            }
            do {
                beg++;
            } while ((mid - beg) && grail_cmp(*beg, *mid, compare) - ftype < 0);
        }
    }
    *alen1 = (int)(end - beg); *atype = ftype;
}

// Assembly:
cmpq %rcx, %rdi
je 0xa990
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x18, %rsp
movq %rcx, %rbx
movq %rdi, %r12
movq %rsi, 0x8(%rsp)
movslq (%rsi), %r13
movq %rdx, 0x10(%rsp)
movl (%rdx), %r14d
testl %r14d, %r14d
sete 0x7(%rsp)
testq %r13, %r13
je 0xa965
testl %r14d, %r14d
sete %al
shlq $0x5, %r13
movl -0x20(%r12,%r13), %ecx
movl (%r12,%r13), %edx
cmpl %ecx, %edx
setge %cl
jg 0xa965
andb %cl, %al
jne 0xa965
addq %r12, %r13
cmpq %r12, %r13
je 0xa962
movq %r13, %rdi
movq %rbx, %rsi
movq %r12, %rdx
testl %r14d, %r14d
je 0xa904
callq 0xa9a1
jmp 0xa909
callq 0x9fbf
movq %rax, %rbp
movq %rax, %r15
subq %r13, %r15
jbe 0xa927
movq %r12, %rdi
movq %r13, %rsi
movq %rbp, %rdx
callq 0x9ff3
addq %r15, %r12
jmp 0xa92a
movq %r13, %rbp
cmpq %rbx, %rbp
je 0xa991
addq $0x20, %r12
movq %r12, %rax
movq %rax, %r12
cmpq %rbp, %rax
je 0xa95d
testl %r14d, %r14d
sete %cl
movl (%r12), %esi
movl (%rbp), %edi
cmpl %esi, %edi
setge %dl
leaq 0x20(%r12), %rax
cmpl %edi, %esi
jl 0xa936
andb %dl, %cl
jne 0xa936
movq %rbp, %r13
jmp 0xa8ea
movq %r13, %r12
xorl %ecx, %ecx
movb 0x7(%rsp), %al
movb %al, %cl
subq %r12, %rbx
shrq $0x5, %rbx
movq 0x8(%rsp), %rax
movl %ebx, (%rax)
movq 0x10(%rsp), %rax
movl %ecx, (%rax)
addq $0x18, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
subq %r12, %rbx
shrq $0x5, %rbx
movq 0x8(%rsp), %rax
movl %ebx, (%rax)
jmp 0xa982
// File: /workspace/github_cpp_makefile_star2_O2/Baobaobear[P]sort/./grailsort.hpp
// Function: baobao::TestClass* Mrrl::grail_BinSearchRight<baobao::TestClass*, std::less<baobao::TestClass>>(baobao::TestClass*, baobao::TestClass*, baobao::TestClass*, std::less<baobao::TestClass>)
RandomAccessIterator grail_BinSearchRight(RandomAccessIterator beg, RandomAccessIterator end, RandomAccessIterator key, Comp compare)
{
    RandomAccessIterator a = beg - 1, b = end, c;
    while (a < b - 1)
    {
        c = a + ((b - a) >> 1);
        if (compare(*key, *c)) b = c;
        else a = c;
    }
    return b;
}

// Assembly:
movq %rsi, %rax
addq $-0x20, %rdi
leaq -0x20(%rax), %rcx
cmpq %rcx, %rdi
jae 0xa9d6
movq %rax, %rsi
subq %rdi, %rsi
sarq $0x6, %rsi
shlq $0x5, %rsi
leaq (%rdi,%rsi), %rcx
movl (%rdx), %r8d
cmpl (%rdi,%rsi), %r8d
jl 0xa9d1
movq %rcx, %rdi
jmp 0xa9a8
movq %rcx, %rax
jmp 0xa9a8
retq
// File: /workspace/github_cpp_makefile_star2_O2/Baobaobear[P]sort/./grailsort.hpp
// Function: void Mrrl::grail_sort<baobao::TestClass*, std::less<baobao::TestClass>>(baobao::TestClass*, baobao::TestClass*, std::less<baobao::TestClass>)
void grail_sort(RandomAccessIterator beg, RandomAccessIterator end, Comp compare)
{
    typedef typename std::iterator_traits<RandomAccessIterator>::value_type value_type;
    int L = 1;
    while (L * L < end - beg) L *= 2;
    value_type * ExtBuf = new value_type[L];
    if (ExtBuf == NULL)
    {
        grail_sort_buffer(beg, end, compare);
    }
    else
    {
        grail_commonSort(beg, end, ExtBuf, L, compare);
        delete[] ExtBuf;
    }
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movq %rsi, %rbx
movq %rdi, %r14
movq %rsi, %rax
subq %rdi, %rax
sarq $0x5, %rax
pushq $0x1
popq %rcx
movl %ecx, %r15d
movl %ecx, %edx
imull %edx, %edx
leal (%r15,%r15), %ecx
cmpq %rdx, %rax
jg 0xaa40
movl %r15d, %r13d
shlq $0x5, %r13
movq %r13, %rdi
callq 0x2030
movq %rax, %r12
xorl %ebp, %ebp
leaq (%r12,%rbp), %rdi
callq 0x39d2
addq $0x20, %rbp
cmpq %rbp, %r13
jne 0xaa65
movq %r14, %rdi
movq %rbx, %rsi
movq %r12, %rdx
movl %r15d, %ecx
callq 0x91aa
movq %r12, %rdi
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
jmp 0x21d0
// File: /workspace/github_cpp_makefile_star2_O2/Baobaobear[P]sort/./wikisort.hpp
// Function: Range<baobao::TestClass*> Wiki::Iterator::nextRange<baobao::TestClass*>(baobao::TestClass*)
Range<Iterator> nextRange(Iterator it) {
            std::size_t start = decimal;

            decimal += decimal_step;
            numerator += numerator_step;
            if (numerator >= denominator) {
                numerator -= denominator;
                ++decimal;
            }

            return Range<Iterator>(it + start, it + decimal);
        }

// Assembly:
movq 0x10(%rdi), %rax
movq 0x18(%rdi), %rcx
movq 0x28(%rdi), %rdx
addq %rax, %rdx
movq %rdx, 0x10(%rdi)
addq 0x30(%rdi), %rcx
movq %rcx, 0x18(%rdi)
subq 0x20(%rdi), %rcx
jb 0xc7bc
movq %rcx, 0x18(%rdi)
incq %rdx
movq %rdx, 0x10(%rdi)
shlq $0x5, %rax
addq %rsi, %rax
shlq $0x5, %rdx
addq %rsi, %rdx
retq
// File: /workspace/github_cpp_makefile_star2_O2/Baobaobear[P]sort/./wikisort.hpp
// Function: void Wiki::MergeExternal<baobao::TestClass*, baobao::TestClass*, std::less<baobao::TestClass>>(baobao::TestClass*, baobao::TestClass*, baobao::TestClass*, baobao::TestClass*, baobao::TestClass*, std::less<baobao::TestClass>)
void MergeExternal(RandomAccessIterator1 first1, RandomAccessIterator1 last1,
                       RandomAccessIterator1 first2, RandomAccessIterator1 last2,
                       RandomAccessIterator2 cache, Comparison compare) {
        // A fits into the cache, so use that instead of the internal buffer
        RandomAccessIterator2 A_index = cache;
        RandomAccessIterator2 A_last = cache + std::distance(first1, last1);
        RandomAccessIterator1 B_index = first2;
        RandomAccessIterator1 B_last = last2;
        RandomAccessIterator1 insert_index = first1;

        if (last2 - first2 > 0 && last1 - first1 > 0) {
            while (true) {
                if (!compare(*B_index, *A_index)) {
                    *insert_index = *A_index;
                    ++A_index;
                    ++insert_index;
                    if (A_index == A_last) break;
                } else {
                    *insert_index = *B_index;
                    ++B_index;
                    ++insert_index;
                    if (B_index == B_last) break;
                }
            }
        }

        // copy the remainder of A into the final array
        std::copy(A_index, A_last, insert_index);
    }

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movq %r8, %rbx
movq %rcx, %r15
movq %rdi, %r13
subq %rdi, %rsi
leaq (%r8,%rsi), %r14
movq %rcx, %rax
subq %rdx, %rax
testq %rax, %rax
setle %al
testq %rsi, %rsi
setle %cl
orb %al, %cl
jne 0xc84c
movq %rdx, %r12
movq %r13, %rbp
movl (%r12), %eax
cmpl (%rbx), %eax
jl 0xc824
leaq 0x20(%rbp), %r13
movq %rbp, %rdi
movq %rbx, %rsi
callq 0x4164
addq $0x20, %rbx
cmpq %r14, %rbx
jne 0xc7ff
jmp 0xc842
movq %rbp, %rdi
movq %r12, %rsi
callq 0x4164
addq $0x20, %r12
leaq 0x20(%rbp), %r13
cmpq %r15, %r12
jne 0xc7ff
addq $0x20, %rbp
jmp 0xc849
addq $0x20, %rbp
movq %r14, %rbx
movq %rbp, %r13
movq %rbx, %rdi
movq %r14, %rsi
movq %r13, %rdx
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
jmp 0x55a4
// File: /workspace/github_cpp_makefile_star2_O2/Baobaobear[P]sort/./wikisort.hpp
// Function: baobao::TestClass* FindLastForward<baobao::TestClass*, baobao::TestClass, std::less<baobao::TestClass>>(baobao::TestClass*, baobao::TestClass*, baobao::TestClass const&, std::less<baobao::TestClass>, unsigned long)
RandomAccessIterator FindLastForward(RandomAccessIterator first, RandomAccessIterator last,
                                     const T & value, Comparison compare, std::size_t unique) {
    std::size_t size = std::distance(first, last);
    if (size == 0) return first;

    std::size_t skip = std::max(size / unique, (std::size_t)1);

    RandomAccessIterator index;
    for (index = first + skip ; !compare(value, *(index - 1)) ; index += skip) {
        if (index >= last - skip) {
            return std::upper_bound(index, last, value, compare);
        }
    }
    return std::upper_bound(index - skip, index, value, compare);
}

// Assembly:
movq %rsi, %r9
subq %rdi, %r9
je 0xc8a6
movq %rdx, %r8
sarq $0x5, %r9
movq %r9, %rax
xorl %edx, %edx
divq %rcx
cmpq %rcx, %r9
pushq $0x1
popq %rcx
cmovaeq %rax, %rcx
movl (%r8), %eax
shlq $0x5, %rcx
movq %rsi, %rdx
subq %rcx, %rdx
cmpl -0x20(%rdi,%rcx), %eax
jl 0xc8aa
addq %rcx, %rdi
cmpq %rdx, %rdi
jb 0xc896
jmp 0xc8b0
movq %rdi, %rax
retq
addq %rdi, %rcx
movq %rcx, %rsi
movq %r8, %rdx
jmp 0x6997
// File: /workspace/github_cpp_makefile_star2_O2/Baobaobear[P]sort/./wikisort.hpp
// Function: baobao::TestClass* FindFirstBackward<baobao::TestClass*, baobao::TestClass, std::less<baobao::TestClass>>(baobao::TestClass*, baobao::TestClass*, baobao::TestClass const&, std::less<baobao::TestClass>, unsigned long)
RandomAccessIterator FindFirstBackward(RandomAccessIterator first, RandomAccessIterator last,
                                       const T & value, Comparison compare, std::size_t unique) {
    std::size_t size = std::distance(first, last);
    if (size == 0) return first;

    std::size_t skip = std::max(size / unique, (std::size_t)1);

    RandomAccessIterator index;
    for (index = last - skip ; index > first && !compare(*(index - 1), value) ; index -= skip) {
        if (index < first + skip) {
            return std::lower_bound(first, index, value, compare);
        }
    }
    return std::lower_bound(index, index + skip, value, compare);
}

// Assembly:
movq %rsi, %r9
subq %rdi, %r9
je 0xc90e
movq %rdx, %r8
sarq $0x5, %r9
movq %r9, %rax
xorl %edx, %edx
divq %rcx
cmpq %rcx, %r9
pushq $0x1
popq %rcx
cmovaeq %rax, %rcx
movl (%r8), %edx
shlq $0x5, %rcx
leaq (%rdi,%rcx), %r9
negq %rcx
leaq (%rsi,%rcx), %rax
cmpq %rdi, %rax
jbe 0xc903
cmpl %edx, -0x20(%rsi,%rcx)
jl 0xc903
movq %rax, %rsi
cmpq %r9, %rax
jae 0xc8e7
movq %rax, %rsi
jmp 0xc906
movq %rax, %rdi
movq %r8, %rdx
jmp 0x69cd
movq %rdi, %rax
retq
// File: /workspace/github_cpp_makefile_star2_O2/Baobaobear[P]sort/./wikisort.hpp
// Function: void Wiki::MergeInternal<baobao::TestClass*, std::less<baobao::TestClass>>(baobao::TestClass*, baobao::TestClass*, baobao::TestClass*, baobao::TestClass*, baobao::TestClass*, std::less<baobao::TestClass>)
void MergeInternal(RandomAccessIterator first1, RandomAccessIterator last1,
                       RandomAccessIterator first2, RandomAccessIterator last2,
                       RandomAccessIterator buffer, Comparison compare) {
        // whenever we find a value to add to the final array, swap it with the value that's already in that spot
        // when this algorithm is finished, 'buffer' will contain its original contents, but in a different order
        RandomAccessIterator A_index = buffer;
        RandomAccessIterator B_index = first2;
        RandomAccessIterator A_last = buffer + std::distance(first1, last1);
        RandomAccessIterator B_last = last2;
        RandomAccessIterator insert_index = first1;

        if (last2 - first2 > 0 && last1 - first1 > 0) {
            while (true) {
                if (!compare(*B_index, *A_index)) {
                    std::iter_swap(insert_index, A_index);
                    ++A_index;
                    ++insert_index;
                    if (A_index == A_last) break;
                } else {
                    std::iter_swap(insert_index, B_index);
                    ++B_index;
                    ++insert_index;
                    if (B_index == B_last) break;
                }
            }
        }

        // BlockSwap
        std::swap_ranges(A_index, A_last, insert_index);
    }

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movq %r8, %rbx
movq %rcx, %r15
movq %rdi, %r13
subq %rdi, %rsi
leaq (%r8,%rsi), %r14
movq %rcx, %rax
subq %rdx, %rax
testq %rax, %rax
setle %al
testq %rsi, %rsi
setle %cl
orb %al, %cl
jne 0xc993
movq %rdx, %r12
movq %r13, %rbp
movl (%r12), %eax
cmpl (%rbx), %eax
jl 0xc96b
leaq 0x20(%rbp), %r13
movq %rbp, %rdi
movq %rbx, %rsi
callq 0x4106
addq $0x20, %rbx
cmpq %r14, %rbx
jne 0xc946
jmp 0xc989
movq %rbp, %rdi
movq %r12, %rsi
callq 0x4106
addq $0x20, %r12
leaq 0x20(%rbp), %r13
cmpq %r15, %r12
jne 0xc946
addq $0x20, %rbp
jmp 0xc990
addq $0x20, %rbp
movq %r14, %rbx
movq %rbp, %r13
movq %rbx, %rdi
movq %r14, %rsi
movq %r13, %rdx
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
jmp 0x5221
// File: /workspace/github_cpp_makefile_star2_O2/Baobaobear[P]sort/./wikisort.hpp
// Function: void Wiki::MergeInPlace<baobao::TestClass*, std::less<baobao::TestClass>>(baobao::TestClass*, baobao::TestClass*, baobao::TestClass*, baobao::TestClass*, std::less<baobao::TestClass>)
void MergeInPlace(RandomAccessIterator first1, RandomAccessIterator last1,
                      RandomAccessIterator first2, RandomAccessIterator last2,
                      Comparison compare) {
        if (last1 - first1 == 0 || last2 - first2 == 0) return;

        /*
         this just repeatedly binary searches into B and rotates A into position.
         the paper suggests using the 'rotation-based Hwang and Lin algorithm' here,
         but I decided to stick with this because it had better situational performance

         (Hwang and Lin is designed for merging subarrays of very different sizes,
         but WikiSort almost always uses subarrays that are roughly the same size)

         normally this is incredibly suboptimal, but this function is only called
         when none of the A or B blocks in any subarray contained 2sqrtA unique values,
         which places a hard limit on the number of times this will ACTUALLY need
         to binary search and rotate.

         according to my analysis the worst case is sqrtA rotations performed on sqrtA items
         once the constant factors are removed, which ends up being O(n)

         again, this is NOT a general-purpose solution - it only works well in this case!
         kind of like how the O(n^2) insertion sort is used in some places
         */

        while (true) {
            // find the first place in B where the first item in A needs to be inserted
            RandomAccessIterator mid = std::lower_bound(first2, last2, *first1, compare);

            // rotate A into place
            std::size_t amount = mid - last1;
            std::rotate(first1, last1, mid);
            if (last2 == mid) break;

            // calculate the new A and B ranges
            first2 = mid;
            first1 += amount;
            last1 = first2;
            first1 = std::upper_bound(first1, last1, *first1, compare);
            if (std::distance(first1, last1) == 0) break;
        }
    }

// Assembly:
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
pushq %rax
movq %rcx, %rbx
cmpq %rdi, %rsi
sete %al
cmpq %rdx, %rcx
sete %cl
orb %al, %cl
jne 0xca19
movq %rdx, %r14
movq %rsi, %r12
movq %rdi, %r15
movq %r14, %rdi
movq %rbx, %rsi
movq %r15, %rdx
callq 0x69cd
movq %rax, %r14
movq %r15, %rdi
movq %r12, %rsi
movq %rax, %rdx
callq 0x5103
cmpq %rbx, %r14
je 0xca19
movq %r14, %rax
subq %r12, %rax
addq %rax, %r15
movq %r15, %rdi
movq %r14, %rsi
movq %r15, %rdx
callq 0x6997
movq %rax, %r15
movq %r14, %r12
cmpq %rax, %r14
jne 0xc9d3
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
retq
// File: /workspace/github_cpp_makefile_star2_O2/Baobaobear[P]sort/./wikisort.hpp
// Function: void InsertionSort<baobao::TestClass*, std::less<baobao::TestClass>>(baobao::TestClass*, baobao::TestClass*, std::less<baobao::TestClass>)
void InsertionSort(BidirectionalIterator first, BidirectionalIterator last, Comparison compare) {
    typedef typename std::iterator_traits<BidirectionalIterator>::value_type T;
    if (first == last) return;

    for (BidirectionalIterator cur = first + 1 ; cur != last ; ++cur) {
        BidirectionalIterator sift = cur;
        BidirectionalIterator sift_1 = cur - 1;

        // Compare first so we can avoid 2 moves for
        // an element already positioned correctly.
        if (compare(*sift, *sift_1)) {
            T tmp = *sift;
            do {
                *sift-- = *sift_1;
            } while (sift != first && compare(tmp, *--sift_1));
            *sift = tmp;
        }
    }
}

// Assembly:
cmpq %rsi, %rdi
je 0xcac7
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x28, %rsp
movq %rdi, %r14
leaq 0x20(%rdi), %r13
xorl %r15d, %r15d
leaq 0x8(%rsp), %rbp
movq %rdi, %rax
movq %rsi, (%rsp)
leaq 0x20(%rax), %r12
cmpq %rsi, %r12
je 0xcab9
movl 0x20(%rax), %ecx
cmpl (%rax), %ecx
jge 0xcab0
movq %rbp, %rbx
movq %rbp, %rdi
movq %r12, %rsi
callq 0x4144
movq %r15, %rbp
movq %r13, %rdi
addq %rbp, %rdi
leaq (%r14,%rbp), %rsi
callq 0x4164
testq %rbp, %rbp
je 0xca9e
movl 0x8(%rsp), %eax
leaq -0x20(%rbp), %rdi
cmpl -0x20(%r14,%rbp), %eax
movq %rdi, %rbp
jl 0xca73
addq %r13, %rdi
jmp 0xcaa1
movq %r14, %rdi
movq %rbx, %rbp
movq %rbx, %rsi
callq 0x4164
movq (%rsp), %rsi
addq $0x20, %r15
movq %r12, %rax
jmp 0xca52
addq $0x28, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O2/Baobaobear[P]sort/./wikisort.hpp
// Function: baobao::TestClass* FindFirstForward<baobao::TestClass*, baobao::TestClass, std::less<baobao::TestClass>>(baobao::TestClass*, baobao::TestClass*, baobao::TestClass const&, std::less<baobao::TestClass>, unsigned long)
RandomAccessIterator FindFirstForward(RandomAccessIterator first, RandomAccessIterator last,
                                      const T & value, Comparison compare, std::size_t unique) {
    std::size_t size = std::distance(first, last);
    if (size == 0) return first;

    std::size_t skip = std::max(size / unique, (std::size_t)1);

    RandomAccessIterator index;
    for (index = first + skip ; compare(*(index - 1), value) ; index += skip) {
        if (index >= last - skip) {
            return std::lower_bound(index, last, value, compare);
        }
    }
    return std::lower_bound(index - skip, index, value, compare);
}

// Assembly:
movq %rsi, %r9
subq %rdi, %r9
je 0xcb06
movq %rdx, %r8
sarq $0x5, %r9
movq %r9, %rax
xorl %edx, %edx
divq %rcx
cmpq %rcx, %r9
pushq $0x1
popq %rcx
cmovaeq %rax, %rcx
movl (%r8), %eax
shlq $0x5, %rcx
movq %rsi, %rdx
subq %rcx, %rdx
cmpl %eax, -0x20(%rdi,%rcx)
jge 0xcb0a
addq %rcx, %rdi
cmpq %rdx, %rdi
jb 0xcaf6
jmp 0xcb10
movq %rdi, %rax
retq
addq %rdi, %rcx
movq %rcx, %rsi
movq %r8, %rdx
jmp 0x69cd
// File: /workspace/github_cpp_makefile_star2_O2/Baobaobear[P]sort/./wikisort.hpp
// Function: baobao::TestClass* FindLastBackward<baobao::TestClass*, baobao::TestClass, std::less<baobao::TestClass>>(baobao::TestClass*, baobao::TestClass*, baobao::TestClass const&, std::less<baobao::TestClass>, unsigned long)
RandomAccessIterator FindLastBackward(RandomAccessIterator first, RandomAccessIterator last,
                                      const T & value, Comparison compare, std::size_t unique) {
    std::size_t size = std::distance(first, last);
    if (size == 0) return first;

    std::size_t skip = std::max(size / unique, (std::size_t)1);

    RandomAccessIterator index;
    for (index = last - skip ; index > first && compare(value, *(index - 1)) ; index -= skip) {
        if (index < first + skip) {
            return std::upper_bound(first, index, value, compare);
        }
    }
    return std::upper_bound(index, index + skip, value, compare);
}

// Assembly:
movq %rsi, %r9
subq %rdi, %r9
je 0xcb6e
movq %rdx, %r8
sarq $0x5, %r9
movq %r9, %rax
xorl %edx, %edx
divq %rcx
cmpq %rcx, %r9
pushq $0x1
popq %rcx
cmovaeq %rax, %rcx
movl (%r8), %edx
shlq $0x5, %rcx
leaq (%rdi,%rcx), %r9
negq %rcx
leaq (%rsi,%rcx), %rax
cmpq %rdi, %rax
jbe 0xcb63
cmpl -0x20(%rsi,%rcx), %edx
jge 0xcb63
movq %rax, %rsi
cmpq %r9, %rax
jae 0xcb47
movq %rax, %rsi
jmp 0xcb66
movq %rax, %rdi
movq %r8, %rdx
jmp 0x6997
movq %rdi, %rax
retq
// File: /workspace/github_cpp_makefile_star2_O2/rurban[P]dgnlib/dgndump.c
// Function: Usage()
static void Usage()

{
    printf( "Usage: dgndump [-e xmin ymin xmax ymax] [-s] [-r n] filename.dgn\n" );
    printf( "\n" );
    printf( "  -e xmin ymin xmax ymax: only get elements within extents.\n" );
    printf( "  -s: produce summary report of element types and levels.\n");
    printf( "  -r n: report raw binary contents of elements of type n.\n");

    exit( 1 );
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
leaq 0xb4ea(%rip), %rdi      # 0xe11a
callq 0x2460
pushq $0xa
popq %rdi
callq 0x23f0
leaq 0xb517(%rip), %rdi      # 0xe15b
callq 0x2460
leaq 0xb547(%rip), %rdi      # 0xe197
callq 0x2460
leaq 0xb575(%rip), %rdi      # 0xe1d1
callq 0x2460
pushq $0x1
popq %rdi
callq 0x2370
nopl (%rax)
// File: /workspace/github_cpp_makefile_star2_O2/rurban[P]dgnlib/cpl_conv.cpp
// Function: CPLCalloc
void *CPLCalloc( size_t nCount, size_t nSize )

{
    void        *pReturn;

    if( nSize * nCount == 0 )
        return NULL;
    
    pReturn = VSICalloc( nCount, nSize );
    if( pReturn == NULL )
    {
        CPLError( CE_Fatal, CPLE_OutOfMemory,
                  "CPLCalloc(): Out of memory allocating %d bytes.\n",
                  nSize * nCount );
    }

    return pReturn;
}

// Assembly:
pushq %r14
pushq %rbx
pushq %rax
movq %rsi, %rbx
imulq %rdi, %rbx
testq %rbx, %rbx
je 0x2ca5
callq 0x6a3a
movq %rax, %r14
testq %rax, %rax
jne 0x2ca8
leaq 0xb600(%rip), %rdx      # 0xe290
xorl %r14d, %r14d
pushq $0x4
popq %rdi
pushq $0x2
popq %rsi
movq %rbx, %rcx
xorl %eax, %eax
callq 0x439c
jmp 0x2ca8
xorl %r14d, %r14d
movq %r14, %rax
addq $0x8, %rsp
popq %rbx
popq %r14
retq
// File: /workspace/github_cpp_makefile_star2_O2/rurban[P]dgnlib/cpl_conv.cpp
// Function: CPLMalloc
void *CPLMalloc( size_t nSize )

{
    void        *pReturn;

    CPLVerifyConfiguration();

    if( nSize == 0 )
        return NULL;

    if( (ssize_t)nSize < 0 )
    {
        CPLError( CE_Failure, CPLE_AppDefined,
                  "CPLMalloc(%ld): Silly size requested.\n",
                  (long)nSize );
        return NULL;
    }
    
    pReturn = VSIMalloc( nSize );
    if( pReturn == NULL )
    {
        CPLError( CE_Fatal, CPLE_OutOfMemory,
                  "CPLMalloc(): Out of memory allocating %ld bytes.\n",
                  (long)nSize );
    }

    return pReturn;
}

// Assembly:
pushq %r14
pushq %rbx
pushq %rax
testq %rdi, %rdi
je 0x2ce1
movq %rdi, %r14
js 0x2ce5
movq %r14, %rdi
callq 0x6a3f
movq %rax, %rbx
testq %rax, %rax
jne 0x2cfe
leaq 0xb610(%rip), %rdx      # 0xe2e8
xorl %ebx, %ebx
pushq $0x4
popq %rdi
pushq $0x2
jmp 0x2cf3
xorl %ebx, %ebx
jmp 0x2cfe
leaq 0xb5d5(%rip), %rdx      # 0xe2c1
xorl %ebx, %ebx
pushq $0x3
popq %rdi
pushq $0x1
popq %rsi
movq %r14, %rcx
xorl %eax, %eax
callq 0x439c
movq %rbx, %rax
addq $0x8, %rsp
popq %rbx
popq %r14
retq
// File: /workspace/github_cpp_makefile_star2_O2/rurban[P]dgnlib/cpl_conv.cpp
// Function: CPLRealloc
void * CPLRealloc( void * pData, size_t nNewSize )

{
    void        *pReturn;

    if ( nNewSize == 0 )
    {
        VSIFree(pData);
        return NULL;
    }

    if( (ssize_t)nNewSize < 0 )
    {
        CPLError( CE_Failure, CPLE_AppDefined,
                  "CPLRealloc(%ld): Silly size requested.\n",
                  (long)nNewSize );
        return NULL;
    }
    
    if( pData == NULL )
        pReturn = VSIMalloc( nNewSize );
    else
        pReturn = VSIRealloc( pData, nNewSize );
    
    if( pReturn == NULL )
    {
        CPLError( CE_Fatal, CPLE_OutOfMemory,
                  "CPLRealloc(): Out of memory allocating %ld bytes.\n",
                  (long)nNewSize );
    }

    return pReturn;
}

// Assembly:
pushq %r14
pushq %rbx
pushq %rax
testq %rsi, %rsi
je 0x2d27
movq %rsi, %rbx
js 0x2d31
testq %rdi, %rdi
je 0x2d42
movq %rbx, %rsi
callq 0x6a44
jmp 0x2d4a
callq 0x6a49
xorl %r14d, %r14d
jmp 0x2d6c
leaq 0xb5e2(%rip), %rdx      # 0xe31a
xorl %r14d, %r14d
pushq $0x3
popq %rdi
pushq $0x1
jmp 0x2d61
movq %rbx, %rdi
callq 0x6a3f
movq %rax, %r14
testq %rax, %rax
jne 0x2d6c
leaq 0xb5e9(%rip), %rdx      # 0xe342
xorl %r14d, %r14d
pushq $0x4
popq %rdi
pushq $0x2
popq %rsi
movq %rbx, %rcx
xorl %eax, %eax
callq 0x439c
movq %r14, %rax
addq $0x8, %rsp
popq %rbx
popq %r14
retq
// File: /workspace/github_cpp_makefile_star2_O2/rurban[P]dgnlib/cpl_conv.cpp
// Function: CPLStrdup
char *CPLStrdup( const char * pszString )

{
    char        *pszReturn;

    if( pszString == NULL )
        pszString = "";

    pszReturn = VSIStrdup( pszString );
        
    if( pszReturn == NULL )
    {
        CPLError( CE_Fatal, CPLE_OutOfMemory,
                  "CPLStrdup(): Out of memory allocating %d bytes.\n",
                  strlen(pszString) );
        
    }
    
    return( pszReturn );
}

// Assembly:
pushq %r14
pushq %rbx
pushq %rax
testq %rdi, %rdi
leaq 0xc267(%rip), %r14      # 0xefec
cmovneq %rdi, %r14
movq %r14, %rdi
callq 0x6a4e
movq %rax, %rbx
testq %rax, %rax
jne 0x2db8
movq %r14, %rdi
callq 0x2120
leaq 0xb5cd(%rip), %rdx      # 0xe375
pushq $0x4
popq %rdi
pushq $0x2
popq %rsi
movq %rax, %rcx
xorl %eax, %eax
callq 0x439c
movq %rbx, %rax
addq $0x8, %rsp
popq %rbx
popq %r14
retq
// File: /workspace/github_cpp_makefile_star2_O2/rurban[P]dgnlib/cpl_conv.cpp
// Function: CPLReadLine
const char *CPLReadLine( FILE * fp )

{
    char *pszRLBuffer = CPLReadLineBuffer(1);
    int         nReadSoFar = 0;

/* -------------------------------------------------------------------- */
/*      Cleanup case.                                                   */
/* -------------------------------------------------------------------- */
    if( fp == NULL )
    {
        CPLReadLineBuffer( -1 );
        return NULL;
    }

/* -------------------------------------------------------------------- */
/*      Loop reading chunks of the line till we get to the end of       */
/*      the line.                                                       */
/* -------------------------------------------------------------------- */
    int nBytesReadThisTime;

    do {
/* -------------------------------------------------------------------- */
/*      Grow the working buffer if we have it nearly full.  Fail out    */
/*      of read line if we can't reallocate it big enough (for          */
/*      instance for a _very large_ file with no newlines).             */
/* -------------------------------------------------------------------- */
        pszRLBuffer = CPLReadLineBuffer( nReadSoFar + 129 );
        if( pszRLBuffer == NULL )
            return NULL;

/* -------------------------------------------------------------------- */
/*      Do the actual read.                                             */
/* -------------------------------------------------------------------- */
        if( CPLFGets( pszRLBuffer+nReadSoFar, 128, fp ) == NULL )
            return NULL;

        nBytesReadThisTime = strlen(pszRLBuffer+nReadSoFar);
        nReadSoFar += nBytesReadThisTime;

    } while( nBytesReadThisTime >= 127
             && pszRLBuffer[nReadSoFar-1] != 13
             && pszRLBuffer[nReadSoFar-1] != 10 );

    return( pszRLBuffer );
}

// Assembly:
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
pushq %rax
movq %rdi, %rbx
pushq $0x1
popq %rdi
callq 0x2fd4
testq %rbx, %rbx
je 0x2fba
xorl %r12d, %r12d
leal 0x81(%r12), %edi
callq 0x2fd4
testq %rax, %rax
je 0x2fc2
movq %rax, %r14
movslq %r12d, %r15
addq %rax, %r15
movq %r15, %rdi
movl $0x80, %esi
movq %rbx, %rdx
callq 0x2dc3
testq %rax, %rax
je 0x2fc2
movq %r15, %rdi
callq 0x2120
cmpl $0x7f, %eax
jl 0x2fc5
movl %r12d, %ecx
movl %eax, %r12d
addq %rcx, %r12
movzbl -0x1(%r14,%r12), %eax
cmpl $0xd, %eax
je 0x2fc5
cmpl $0xa, %eax
jne 0x2f62
jmp 0x2fc5
pushq $-0x1
popq %rdi
callq 0x2fd4
xorl %r14d, %r14d
movq %r14, %rax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
retq
// File: /workspace/github_cpp_makefile_star2_O2/rurban[P]dgnlib/cpl_conv.cpp
// Function: CPLReadLineBuffer(int)
static char *CPLReadLineBuffer( int nRequiredSize )

{
    
/* -------------------------------------------------------------------- */
/*      A required size of -1 means the buffer should be freed.         */
/* -------------------------------------------------------------------- */
    if( nRequiredSize == -1 )
    {
        if( CPLGetTLS( CTLS_RLBUFFERINFO ) != NULL )
        {
            CPLFree( CPLGetTLS( CTLS_RLBUFFERINFO ) );
            CPLSetTLS( CTLS_RLBUFFERINFO, NULL, FALSE );
        }
        return NULL;
    }

/* -------------------------------------------------------------------- */
/*      If the buffer doesn't exist yet, create it.                     */
/* -------------------------------------------------------------------- */
    GUInt32 *pnAlloc = (GUInt32 *) CPLGetTLS( CTLS_RLBUFFERINFO );

    if( pnAlloc == NULL )
    {
        pnAlloc = (GUInt32 *) CPLMalloc(200);
        *pnAlloc = 196;
        CPLSetTLS( CTLS_RLBUFFERINFO, pnAlloc, TRUE );
    }

/* -------------------------------------------------------------------- */
/*      If it is too small, grow it bigger.                             */
/* -------------------------------------------------------------------- */
    if( (int) *pnAlloc < nRequiredSize+1 )
    {
        int nNewSize = nRequiredSize + 4 + 500;

        pnAlloc = (GUInt32 *) CPLRealloc(pnAlloc,nNewSize);
        if( pnAlloc == NULL )
        {
            CPLSetTLS( CTLS_RLBUFFERINFO, NULL, FALSE );
            return NULL;
        }
            
        *pnAlloc = nNewSize - 4;
        CPLSetTLS( CTLS_RLBUFFERINFO, pnAlloc, TRUE );
    }

    return (char *) (pnAlloc+1);
}

// Assembly:
pushq %rbp
pushq %r14
pushq %rbx
movl %edi, %r14d
pushq $0x1
popq %rdi
callq 0x4dfd
movq %rax, %rbx
cmpl $-0x1, %r14d
je 0x304d
testq %rbx, %rbx
jne 0x3011
movl $0xc8, %edi
callq 0x2cb3
movq %rax, %rbx
movl $0xc4, (%rax)
pushq $0x1
popq %rdi
movq %rax, %rsi
movl %edi, %edx
callq 0x4e33
cmpl %r14d, (%rbx)
jg 0x3047
leal 0x1f8(%r14), %eax
movslq %eax, %rsi
movq %rbx, %rdi
callq 0x2d0a
testq %rax, %rax
je 0x306e
movq %rax, %rbx
addl $0x1f4, %r14d           # imm = 0x1F4
movl %r14d, (%rax)
pushq $0x1
popq %rdi
movq %rax, %rsi
movl %edi, %edx
callq 0x4e33
addq $0x4, %rbx
jmp 0x307c
testq %rbx, %rbx
je 0x306a
pushq $0x1
popq %rbp
movl %ebp, %edi
callq 0x4dfd
movq %rax, %rdi
callq 0x6a49
xorl %ebx, %ebx
movl %ebp, %edi
jmp 0x3073
xorl %ebx, %ebx
jmp 0x307c
xorl %ebx, %ebx
pushq $0x1
popq %rdi
xorl %esi, %esi
xorl %edx, %edx
callq 0x4e33
movq %rbx, %rax
popq %rbx
popq %r14
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O2/rurban[P]dgnlib/cpl_conv.cpp
// Function: CPLScanString
char *CPLScanString( const char *pszString, int nMaxLength,
                     int bTrimSpaces, int bNormalize )
{
    char    *pszBuffer;

    if ( !pszString )
        return NULL;

    if ( !nMaxLength )
        return CPLStrdup( "" );

    pszBuffer = (char *)CPLMalloc( nMaxLength + 1 );
    if ( !pszBuffer )
        return NULL;

    strncpy( pszBuffer, pszString,  nMaxLength );
    pszBuffer[nMaxLength] = '\0';

    if ( bTrimSpaces )
    {
        size_t  i = strlen( pszBuffer );
        while ( i-- > 0 && isspace(pszBuffer[i]) )
            pszBuffer[i] = '\0';
    }

    if ( bNormalize )
    {
        size_t  i = strlen( pszBuffer );
        while ( i-- > 0 )
        {
            if ( pszBuffer[i] == ':' )
                pszBuffer[i] = '_';
        }
    }

    return pszBuffer;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
testq %rdi, %rdi
je 0x3251
movl %esi, %r12d
testl %esi, %esi
je 0x3282
movl %ecx, %ebp
movl %edx, %r14d
movq %rdi, %r15
leal 0x1(%r12), %eax
movslq %eax, %rdi
callq 0x2cb3
testq %rax, %rax
je 0x3251
movq %rax, %rbx
movslq %r12d, %r12
movq %rax, %rdi
movq %r15, %rsi
movq %r12, %rdx
callq 0x2150
movb $0x0, (%rbx,%r12)
testl %r14d, %r14d
je 0x325f
movq %rbx, %rdi
callq 0x2120
movq %rax, %r14
movq %rax, %r15
subq $0x1, %r15
jb 0x325f
movsbl -0x1(%rbx,%r14), %edi
callq 0x2060
testl %eax, %eax
je 0x325f
movb $0x0, -0x1(%rbx,%r14)
movq %r15, %r14
jmp 0x3231
xorl %ebx, %ebx
movq %rbx, %rax
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
testl %ebp, %ebp
je 0x3253
movq %rbx, %rdi
callq 0x2120
movq %rax, %rcx
subq $0x1, %rax
jb 0x3253
cmpb $0x3a, -0x1(%rbx,%rcx)
jne 0x326b
movb $0x5f, -0x1(%rbx,%rcx)
jmp 0x326b
leaq 0xbd63(%rip), %rdi      # 0xefec
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
jmp 0x2d77
// File: /workspace/github_cpp_makefile_star2_O2/rurban[P]dgnlib/cpl_conv.cpp
// Function: CPLScanLong
long CPLScanLong( const char *pszString, int nMaxLength )
{
    long    iValue;
    char    *pszValue = (char *)CPLMalloc( nMaxLength + 1);

/* -------------------------------------------------------------------- */
/*      Compute string into local buffer, and terminate it.             */
/* -------------------------------------------------------------------- */
    strncpy( pszValue, pszString, nMaxLength );
    pszValue[nMaxLength] = '\0';

/* -------------------------------------------------------------------- */
/*      Use atol() to fetch out the result                              */
/* -------------------------------------------------------------------- */
    iValue = atol( pszValue );

    CPLFree( pszValue );
    return iValue;
}

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
movl %esi, %ebx
movq %rdi, %r14
leal 0x1(%rbx), %eax
movslq %eax, %rdi
callq 0x2cb3
movq %rax, %r15
movslq %ebx, %rbx
movq %rax, %rdi
movq %r14, %rsi
movq %rbx, %rdx
callq 0x2150
movb $0x0, (%r15,%rbx)
movq %r15, %rdi
callq 0x2360
movq %rax, %rbx
movq %r15, %rdi
callq 0x6a49
movq %rbx, %rax
popq %rbx
popq %r14
popq %r15
retq
// File: /workspace/github_cpp_makefile_star2_O2/rurban[P]dgnlib/cpl_conv.cpp
// Function: CPLScanPointer
void *CPLScanPointer( const char *pszString, int nMaxLength )
{
    void  *pResult;
    char  szTemp[128];

/* -------------------------------------------------------------------- */
/*      Compute string into local buffer, and terminate it.             */
/* -------------------------------------------------------------------- */
    if( nMaxLength > (int) sizeof(szTemp)-1 )
        nMaxLength = sizeof(szTemp)-1;

    strncpy( szTemp, pszString, nMaxLength );
    szTemp[nMaxLength] = '\0';

/* -------------------------------------------------------------------- */
/*      On MSVC we have to scanf pointer values without the 0x          */
/*      prefix.                                                         */
/* -------------------------------------------------------------------- */
    if( EQUALN(szTemp,"0x",2) )
    {
        pResult = NULL;

#if defined(WIN32) && defined(_MSC_VER)
        sscanf( szTemp+2, "%p", &pResult );
#else
        sscanf( szTemp, "%p", &pResult );
#endif
    }
    
    else
    {
        pResult = (void *) CPLScanUIntBig( szTemp, nMaxLength );
    }

    return pResult;
}

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
subq $0x90, %rsp
movq %rdi, %rax
cmpl $0x7f, %esi
pushq $0x7f
popq %rbx
cmovll %esi, %ebx
movslq %ebx, %r14
leaq 0x10(%rsp), %r15
movq %r15, %rdi
movq %rax, %rsi
movq %r14, %rdx
callq 0x2150
movb $0x0, 0x10(%rsp,%r14)
leaq 0xc18b(%rip), %rsi      # 0xf4f0
pushq $0x2
popq %rdx
movq %r15, %rdi
callq 0x23b0
testl %eax, %eax
je 0x3382
leaq 0x10(%rsp), %rdi
movl %ebx, %esi
callq 0x32e0
jmp 0x33a4
leaq 0x8(%rsp), %rbx
andq $0x0, (%rbx)
leaq 0xb065(%rip), %rsi      # 0xe3f7
leaq 0x10(%rsp), %rdi
movq %rbx, %rdx
xorl %eax, %eax
callq 0x22c0
movq (%rbx), %rax
addq $0x90, %rsp
popq %rbx
popq %r14
popq %r15
retq
// File: /workspace/github_cpp_makefile_star2_O2/rurban[P]dgnlib/cpl_conv.cpp
// Function: CPLPrintString
int CPLPrintString( char *pszDest, const char *pszSrc, int nMaxLen )
{
    char    *pszTemp = pszDest;
    int     nChars = 0;

    if ( !pszDest )
        return 0;

    if ( !pszSrc )
    {
        *pszDest = '\0';
        return 1;
    }

    while ( nChars < nMaxLen && *pszSrc )
    {
        *pszTemp++ = *pszSrc++;
        nChars++;
    }

    return nChars;
}

// Assembly:
testq %rdi, %rdi
je 0x3454
testq %rsi, %rsi
je 0x3457
movl %edx, %eax
xorl %ecx, %ecx
testl %edx, %edx
cmovlel %ecx, %eax
cmpl %ecx, %eax
je 0x3456
movb (%rsi,%rcx), %dl
testb %dl, %dl
je 0x345e
movb %dl, (%rdi,%rcx)
incq %rcx
jmp 0x3441
xorl %eax, %eax
retq
movb $0x0, (%rdi)
pushq $0x1
popq %rax
retq
movl %ecx, %eax
retq
// File: /workspace/github_cpp_makefile_star2_O2/rurban[P]dgnlib/cpl_conv.cpp
// Function: CPLPrintStringFill
int CPLPrintStringFill( char *pszDest, const char *pszSrc, int nMaxLen )
{
    char    *pszTemp = pszDest;

    if ( !pszDest )
        return 0;

    if ( !pszSrc )
    {
        memset( pszDest, ' ', nMaxLen );
        return nMaxLen;
    }

    while ( nMaxLen && *pszSrc )
    {
        *pszTemp++ = *pszSrc++;
        nMaxLen--;
    }

    if ( nMaxLen )
        memset( pszTemp, ' ', nMaxLen );

    return nMaxLen;
}

// Assembly:
testq %rdi, %rdi
je 0x348a
pushq %rbx
movl %edx, %ebx
testq %rsi, %rsi
je 0x3492
movl %ebx, %edx
xorl %eax, %eax
xorl %ecx, %ecx
cmpl %ecx, %edx
je 0x349f
movb (%rsi,%rcx), %r8b
testb %r8b, %r8b
je 0x348d
movb %r8b, (%rdi,%rcx)
incq %rcx
jmp 0x3474
xorl %eax, %eax
retq
subl %ecx, %ebx
addq %rcx, %rdi
movslq %ebx, %rdx
pushq $0x20
popq %rsi
callq 0x2160
movl %ebx, %eax
popq %rbx
retq
// File: /workspace/github_cpp_makefile_star2_O2/rurban[P]dgnlib/cpl_conv.cpp
// Function: CPLPrintInt32
int CPLPrintInt32( char *pszBuffer, GInt32 iValue, int nMaxLen )
{
    char    szTemp[64];

    if ( !pszBuffer )
        return 0;

    if ( nMaxLen >= 64 )
        nMaxLen = 63;

#if UINT_MAX == 65535
    sprintf( szTemp, "%*ld", nMaxLen, iValue );
#else
    sprintf( szTemp, "%*d", nMaxLen, iValue );
#endif

    return CPLPrintString( pszBuffer, szTemp, nMaxLen );
}

// Assembly:
testq %rdi, %rdi
je 0x34e8
pushq %rbp
pushq %r14
pushq %rbx
subq $0x40, %rsp
movl %esi, %ecx
movq %rdi, %rbx
cmpl $0x3f, %edx
pushq $0x3f
popq %rbp
cmovll %edx, %ebp
leaq 0xaf29(%rip), %rsi      # 0xe3ec
movq %rsp, %r14
movq %r14, %rdi
movl %ebp, %edx
xorl %eax, %eax
callq 0x20a0
movq %rbx, %rdi
movq %r14, %rsi
movl %ebp, %edx
callq 0x342e
addq $0x40, %rsp
popq %rbx
popq %r14
popq %rbp
retq
xorl %eax, %eax
retq
// File: /workspace/github_cpp_makefile_star2_O2/rurban[P]dgnlib/cpl_conv.cpp
// Function: CPLPrintUIntBig
int CPLPrintUIntBig( char *pszBuffer, GUIntBig iValue, int nMaxLen )
{
    char    szTemp[64];

    if ( !pszBuffer )
        return 0;

    if ( nMaxLen >= 64 )
        nMaxLen = 63;

#if defined(WIN32) && defined(_MSC_VER)
    sprintf( szTemp, "%*I64d", nMaxLen, iValue );
# elif HAVE_LONG_LONG
    sprintf( szTemp, "%*lld", nMaxLen, (long long) iValue );
//    sprintf( szTemp, "%*Ld", nMaxLen, (long long) iValue );
#else
    sprintf( szTemp, "%*ld", nMaxLen, iValue );
#endif

    return CPLPrintString( pszBuffer, szTemp, nMaxLen );
}

// Assembly:
testq %rdi, %rdi
je 0x3533
pushq %rbp
pushq %r14
pushq %rbx
subq $0x40, %rsp
movq %rsi, %rcx
movq %rdi, %rbx
cmpl $0x3f, %edx
pushq $0x3f
popq %rbp
cmovll %edx, %ebp
leaq 0xaee2(%rip), %rsi      # 0xe3f0
movq %rsp, %r14
movq %r14, %rdi
movl %ebp, %edx
xorl %eax, %eax
callq 0x20a0
movq %rbx, %rdi
movq %r14, %rsi
movl %ebp, %edx
callq 0x342e
addq $0x40, %rsp
popq %rbx
popq %r14
popq %rbp
retq
xorl %eax, %eax
retq
// File: /workspace/github_cpp_makefile_star2_O2/rurban[P]dgnlib/cpl_conv.cpp
// Function: CPLPrintPointer
int CPLPrintPointer( char *pszBuffer, void *pValue, int nMaxLen )
{
    char    szTemp[64];

    if ( !pszBuffer )
        return 0;

    if ( nMaxLen >= 64 )
        nMaxLen = 63;

    sprintf( szTemp, "%p", pValue );

    // On windows, and possibly some other platforms the sprintf("%p")
    // does not prefix things with 0x so it is hard to know later if the
    // value is hex encoded.  Fix this up here. 

    if( !EQUALN(szTemp,"0x",2) )
        sprintf( szTemp, "0x%p", pValue );

    return CPLPrintString( pszBuffer, szTemp, nMaxLen );
}

// Assembly:
testq %rdi, %rdi
je 0x35ad
pushq %rbp
pushq %r15
pushq %r14
pushq %rbx
subq $0x48, %rsp
movq %rsi, %r14
movq %rdi, %rbx
cmpl $0x3f, %edx
pushq $0x3f
popq %rbp
cmovll %edx, %ebp
leaq 0xae9c(%rip), %rsi      # 0xe3f7
movq %rsp, %r15
movq %r15, %rdi
movq %r14, %rdx
xorl %eax, %eax
callq 0x20a0
leaq 0xbf7e(%rip), %rsi      # 0xf4f0
pushq $0x2
popq %rdx
movq %r15, %rdi
callq 0x23b0
testl %eax, %eax
je 0x3595
leaq 0xae6d(%rip), %rsi      # 0xe3f5
movq %rsp, %rdi
movq %r14, %rdx
xorl %eax, %eax
callq 0x20a0
movq %rsp, %rsi
movq %rbx, %rdi
movl %ebp, %edx
callq 0x342e
addq $0x48, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
xorl %eax, %eax
retq
// File: /workspace/github_cpp_makefile_star2_O2/rurban[P]dgnlib/cpl_conv.cpp
// Function: CPLPrintTime
int CPLPrintTime( char *pszBuffer, int nMaxLen, const char *pszFormat,
                  const struct tm *poBrokenTime, char *pszLocale )
{
    char    *pszTemp = (char *)CPLMalloc( (nMaxLen + 1) * sizeof(char) );
    int     nChars;

#if defined(HAVE_LOCALE_H) && defined(HAVE_SETLOCALE)
    char        *pszCurLocale = NULL;

    if ( pszLocale || EQUAL( pszLocale, "" ) )
    {
        // Save the current locale
        pszCurLocale = setlocale(LC_ALL, NULL );
        // Set locale to the specified value
        setlocale( LC_ALL, pszLocale );
    }
#endif
    
    if ( !strftime( pszTemp, nMaxLen + 1, pszFormat, poBrokenTime ) )
        memset( pszTemp, 0, nMaxLen + 1);

#if defined(HAVE_LOCALE_H) && defined(HAVE_SETLOCALE)
    // Restore stored locale back
    if ( pszCurLocale )
        setlocale( LC_ALL, pszCurLocale );
#endif

    nChars = CPLPrintString( pszBuffer, pszTemp, nMaxLen );

    CPLFree( pszTemp );

    return nChars;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movq %rcx, %r13
movq %rdx, %rbp
movl %esi, %ebx
movq %rdi, %r14
leal 0x1(%rbx), %eax
movslq %eax, %r12
movq %r12, %rdi
callq 0x2cb3
movq %rax, %r15
movq %rax, %rdi
movq %r12, %rsi
movq %rbp, %rdx
movq %r13, %rcx
callq 0x2220
testq %rax, %rax
jne 0x3657
movq %r15, %rdi
xorl %esi, %esi
movq %r12, %rdx
callq 0x2160
movq %r14, %rdi
movq %r15, %rsi
movl %ebx, %edx
callq 0x342e
movl %eax, %ebx
movq %r15, %rdi
callq 0x6a49
movl %ebx, %eax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O2/rurban[P]dgnlib/cpl_conv.cpp
// Function: CPLGetConfigOption
const char * CPL_STDCALL
CPLGetConfigOption( const char *pszKey, const char *pszDefault )

{
    const char *pszResult = NULL;

    {
        CPLMutexHolderD( &hConfigMutex );

        pszResult = CSLFetchNameValue( (char **) papszConfigOptions, pszKey );
    }

#if !defined(WIN32CE) 
    if( pszResult == NULL )
        pszResult = getenv( pszKey );
#endif
    
    if( pszResult == NULL )
        return pszDefault;
    else
        return pszResult;
}

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
subq $0x20, %rsp
movq %rsi, %rbx
movq %rdi, %r14
leaq 0x11c63(%rip), %rsi     # 0x152f8
leaq 0xad5e(%rip), %rdx      # 0xe3fa
leaq 0x8(%rsp), %rdi
movsd 0xab67(%rip), %xmm0     # 0xe210
movl $0x5b3, %ecx            # imm = 0x5B3
callq 0x4c40
movq 0x11c46(%rip), %rdi     # 0x15300
movq %r14, %rsi
callq 0x60b1
movq %rax, %r15
leaq 0x8(%rsp), %rdi
callq 0x4c42
testq %r15, %r15
jne 0x36df
movq %r14, %rdi
callq 0x2380
movq %rax, %r15
testq %r15, %r15
cmovneq %r15, %rbx
movq %rbx, %rax
addq $0x20, %rsp
popq %rbx
popq %r14
popq %r15
retq
movq %rax, %rbx
leaq 0x8(%rsp), %rdi
callq 0x4c42
movq %rbx, %rdi
callq 0x2500
// File: /workspace/github_cpp_makefile_star2_O2/rurban[P]dgnlib/cpl_conv.cpp
// Function: CPLStat
int CPLStat( const char *pszPath, VSIStatBuf *psStatBuf )

{
    if( strlen(pszPath) == 2 && pszPath[1] == ':' )
    {
        char    szAltPath[10];
        
        strncpy( szAltPath, pszPath, 10 );
        strcat( szAltPath, "\\" );
        return VSIStat( szAltPath, psStatBuf );
    }
    else
        return VSIStat( pszPath, psStatBuf );
}

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
subq $0x10, %rsp
movq %rsi, %rbx
movq %rdi, %r14
callq 0x2120
cmpq $0x2, %rax
jne 0x382f
cmpb $0x3a, 0x1(%r14)
jne 0x382f
leaq 0x6(%rsp), %r15
pushq $0xa
popq %rdx
movq %r15, %rdi
movq %r14, %rsi
callq 0x2150
movq %r15, %rdi
callq 0x2120
movw $0x5c, 0x6(%rsp,%rax)
movq %r15, %rdi
movq %rbx, %rsi
callq 0x6a53
addq $0x10, %rsp
popq %rbx
popq %r14
popq %r15
retq
movq %r14, %rdi
movq %rbx, %rsi
addq $0x10, %rsp
popq %rbx
popq %r14
popq %r15
jmp 0x6a53