LLM4Binary/decompile-bench-makefile huggingface dataset:
// File: /workspace/github_cpp_makefile_star2_O2/helayzhang[P]sorted_set/./sorted_set.hh
// Function: SortedSet<int, std::tr1::hash<int>, std::equal_to<int>>::private_delete(double, int)
bool private_delete(double score, KeyType key) 
    {
        SkipListNode *update[SKIPLIST_MAXLEVEL], *x;
        int i;
        x = mHeader;
        for (i = mLevel-1; i >= 0; i--) {
            while (x->mLevel[i].mForward && x->mLevel[i].mForward->mScore < score)
                x = x->mLevel[i].mForward;
            update[i] = x;
        }
        /* We may have multiple elements with the same score, what we need
         * is to find the element with both the right score and key. */
        x = x->mLevel[0].mForward;
        if (x && score == x->mScore && x->mKey == key) {
            private_delete_node(x, update);
            delete x;
            return true;
        } 
        else {
            return false; /* not found */
        }
        return false; /* not found */
    }

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %rbx
subq $0x108, %rsp            # imm = 0x108
movq (%rdi), %rax
movslq 0x18(%rdi), %rcx
testq %rcx, %rcx
jle 0x1e35
decq %rcx
movq %rcx, %rdx
shlq $0x4, %rdx
movq %rax, %r8
movq %r8, %rax
movq 0x20(%r8), %r8
movq (%r8,%rdx), %r8
testq %r8, %r8
je 0x1e2b
ucomisd 0x8(%r8), %xmm0
ja 0x1e13
movq %rax, -0x110(%rbp,%rcx,8)
jmp 0x1e01
movq 0x20(%rax), %rax
movq (%rax), %rbx
testq %rbx, %rbx
je 0x1e76
movsd 0x8(%rbx), %xmm1
ucomisd %xmm0, %xmm1
jne 0x1e76
jp 0x1e76
cmpl %esi, 0x10(%rbx)
jne 0x1e76
leaq -0x110(%rbp), %rdx
movq %rbx, %rsi
callq 0x20ce
movq %rbx, %rdi
callq 0x1cf4
movq %rbx, %rdi
callq 0x10f0
movb $0x1, %al
jmp 0x1e78
xorl %eax, %eax
addq $0x108, %rsp            # imm = 0x108
popq %rbx
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O2/helayzhang[P]sorted_set/./sorted_set.hh
// Function: SortedSet<int, std::tr1::hash<int>, std::equal_to<int>>::private_delete_node(SortedSet<int, std::tr1::hash<int>, std::equal_to<int>>::SkipListNode*, SortedSet<int, std::tr1::hash<int>, std::equal_to<int>>::SkipListNode**)
void private_delete_node(SkipListNode *x, SkipListNode **update) 
    {
        int i;
        for (i = 0; i < mLevel; i++) {
            if (update[i]->mLevel[i].mForward == x) {
                update[i]->mLevel[i].mSpan += x->mLevel[i].mSpan - 1;
                update[i]->mLevel[i].mForward = x->mLevel[i].mForward;
            } else {
                update[i]->mLevel[i].mSpan -= 1;
            }
        }
        if (x->mLevel[0].mForward) {
            x->mLevel[0].mForward->mBackward = x->mBackward;
        } else {
            mTail = x->mBackward;
        }
        while(mLevel > 1 && mHeader->mLevel[mLevel-1].mForward == NULL)
            mLevel--;
        mLength--;
    }

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r14
pushq %rbx
movl 0x18(%rdi), %eax
movslq %eax, %rcx
movabsq $0x1, %r8
xorl %r9d, %r9d
cmpq %rcx, %r9
jge 0x212a
movq (%rdx,%r9,8), %r10
movq 0x20(%r10), %r10
cmpq %rsi, -0x8(%r10,%r8,8)
je 0x2102
decl (%r10,%r8,8)
jmp 0x2121
movq 0x20(%rsi), %r11
movl (%r11,%r8,8), %ebx
movl (%r10,%r8,8), %r14d
addl %r14d, %ebx
decl %ebx
movl %ebx, (%r10,%r8,8)
movq -0x8(%r11,%r8,8), %r11
movq %r11, -0x8(%r10,%r8,8)
incq %r9
addq $0x2, %r8
jmp 0x20e8
movq 0x18(%rsi), %rcx
movq 0x20(%rsi), %rdx
movq (%rdx), %rdx
leaq 0x8(%rdi), %rsi
leaq 0x18(%rdx), %r8
testq %rdx, %rdx
cmoveq %rsi, %r8
movq %rcx, (%r8)
movq (%rdi), %rcx
cmpl $0x2, %eax
jl 0x2168
movq 0x20(%rcx), %rdx
movl %eax, %esi
shlq $0x4, %rsi
cmpq $0x0, -0x10(%rdx,%rsi)
jne 0x2168
decl %eax
movl %eax, 0x18(%rdi)
jmp 0x214a
decq 0x10(%rdi)
popq %rbx
popq %r14
popq %rbp
retq
nop
// File: /workspace/github_cpp_makefile_star2_O2/helayzhang[P]sorted_set/./sorted_set.hh
// Function: SortedSet<int, std::tr1::hash<int>, std::equal_to<int>>::zrange_withscores_generic(long, long, bool, std::vector<std::pair<int, double>, std::allocator<std::pair<int, double>>>&)
void zrange_withscores_generic(long start, long end, bool reverse, KeyScoreVecType &result) {
        result.clear();

        /* Sanitize indexes. */
        long llen = length();
        if (start < 0) start = llen+start;
        if (end < 0) end = llen+end;
        if (start < 0) start = 0;

        /* Invariant: start >= 0, so this test will be true when end < 0.
         * The range is empty when start > end or start >= length. */
        if (start > end || start >= llen) {
            return;
        }
        if (end >= llen) end = llen-1;
        unsigned long rangelen = (end-start)+1;

        SkipListNode *ln;
        /* Check if starting point is trivial, before doing log(N) lookup. */
        if (reverse) {
            ln = mTail;
            if (start > 0)
                ln = get_element_by_rank(llen-start);
        } else {
            ln = mHeader->mLevel[0].mForward;
            if (start > 0)
                ln = get_element_by_rank(start+1);
        }

        while(rangelen--) {
            assert(ln != NULL);
            result.push_back(std::make_pair(ln->mKey, ln->mScore));
            ln = reverse ? ln->mBackward : ln->mLevel[0].mForward;
        }
    }

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x18, %rsp
movq %r8, %rbx
movl %ecx, %r14d
movq (%r8), %rax
cmpq %rax, 0x8(%r8)
je 0x248a
movq %rax, 0x8(%rbx)
movq 0x10(%rdi), %rcx
movq %rsi, %rax
sarq $0x3f, %rax
andq %rcx, %rax
addq %rsi, %rax
movq %rdx, %r8
sarq $0x3f, %r8
andq %rcx, %r8
addq %rdx, %r8
xorl %r12d, %r12d
testq %rax, %rax
cmovgq %rax, %r12
cmpq %r8, %r12
setg %dl
movq %rcx, %rsi
subq %r12, %rsi
setle %r9b
orb %dl, %r9b
jne 0x254c
leaq -0x1(%rcx), %r13
cmpq %rcx, %r8
cmovbq %r8, %r13
testb %r14b, %r14b
je 0x24e6
testq %rax, %rax
jg 0x24f0
movq 0x8(%rdi), %r15
jmp 0x2504
testq %rax, %rax
jle 0x24fa
leaq 0x1(%r12), %rsi
callq 0x257a
movq %rax, %r15
jmp 0x2504
movq (%rdi), %rax
movq 0x20(%rax), %rax
movq (%rax), %r15
notq %r13
addq %r12, %r13
leaq -0x38(%rbp), %r12
testq %r13, %r13
je 0x254c
testq %r15, %r15
je 0x255b
movl 0x10(%r15), %eax
movsd 0x8(%r15), %xmm0
movl %eax, -0x38(%rbp)
movsd %xmm0, -0x30(%rbp)
movq %rbx, %rdi
movq %r12, %rsi
callq 0x25ca
testb %r14b, %r14b
je 0x2540
addq $0x18, %r15
jmp 0x2544
movq 0x20(%r15), %r15
movq (%r15), %r15
incq %r13
jmp 0x250e
addq $0x18, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
leaq 0xaec(%rip), %rdi       # 0x304e
leaq 0xaf0(%rip), %rsi       # 0x3059
leaq 0xaf9(%rip), %rcx       # 0x3069
movl $0x1b7, %edx            # imm = 0x1B7
callq 0x10b0
// File: /workspace/github_cpp_makefile_star2_O2/helayzhang[P]sorted_set/./sorted_set.hh
// Function: SortedSet<int, std::tr1::hash<int>, std::equal_to<int>>::get_element_by_rank(unsigned long)
SkipListNode* get_element_by_rank(unsigned long rank) {
        SkipListNode *x;
        unsigned long traversed = 0;
        int i;

        x = mHeader;
        for (i = mLevel-1; i >= 0; i--) {
            while (x->mLevel[i].mForward && (traversed + x->mLevel[i].mSpan) <= rank)
            {
                traversed += x->mLevel[i].mSpan;
                x = x->mLevel[i].mForward;
            }
            if (traversed == rank) {
                return x;
            }
        }
        return NULL;
    }

// Assembly:
pushq %rbp
movq %rsp, %rbp
movq (%rdi), %rax
movslq 0x18(%rdi), %rcx
xorl %edx, %edx
testq %rcx, %rcx
jle 0x25c5
decq %rcx
movq %rcx, %rdi
shlq $0x4, %rdi
movq %rax, %r8
movq %rdx, %r9
movq %r9, %rdx
movq %r8, %rax
movq 0x20(%r8), %r9
movq (%r9,%rdi), %r8
testq %r8, %r8
je 0x25be
addq %rdi, %r9
movl 0x8(%r9), %r9d
addq %rdx, %r9
cmpq %rsi, %r9
jbe 0x259c
cmpq %rsi, %rdx
jne 0x2587
jmp 0x25c7
xorl %eax, %eax
popq %rbp
retq
nop
// File: /workspace/github_cpp_makefile_star2_O2/helayzhang[P]sorted_set/./sorted_set.hh
// Function: SortedSet<int, std::tr1::hash<int>, std::equal_to<int>>::first_in_range(SortedSet<int, std::tr1::hash<int>, std::equal_to<int>>::RangeSpec const&)
SkipListNode* first_in_range(const RangeSpec &range) {
        SkipListNode *x;
        int i;
    
        /* If everything is out of range, return early. */
        if (!is_in_range(range)) return NULL;
    
        x = mHeader;
        for (i = mLevel-1; i >= 0; i--) {
            /* Go forward while *OUT* of range. */
            while (x->mLevel[i].mForward && !score_gte_min(x->mLevel[i].mForward->mScore, range))
                x = x->mLevel[i].mForward;
        }
    
        /* This is an inner range, so the next node cannot be NULL. */
        x = x->mLevel[0].mForward;
        assert(x != NULL);

        /* Check if score <= max. */
        if (!score_lte_max(x->mScore, range)) return NULL;
        return x;
    }

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r14
pushq %rbx
movq %rsi, %rbx
movq %rdi, %r14
callq 0x2906
testb %al, %al
je 0x27a7
movq (%r14), %rdx
movslq 0x18(%r14), %rax
movb 0x10(%rbx), %cl
movsd (%rbx), %xmm0
testq %rax, %rax
jle 0x27ab
decq %rax
movq %rax, %rdi
shlq $0x4, %rdi
movq %rdx, %rsi
movq 0x20(%rdx), %rdx
movq (%rdx,%rdi), %rdx
testq %rdx, %rdx
je 0x27a2
movsd 0x8(%rdx), %xmm1
xorl %r8d, %r8d
xorl %r9d, %r9d
ucomisd %xmm0, %xmm1
seta %r8b
setae %r9b
testb $0x1, %cl
cmovnel %r8d, %r9d
testb %r9b, %r9b
je 0x276f
movq %rsi, %rdx
jmp 0x2760
xorl %eax, %eax
jmp 0x27da
movq 0x20(%rdx), %rax
movq (%rax), %rcx
testq %rcx, %rcx
je 0x27df
movsd 0x8(%rbx), %xmm0
xorl %eax, %eax
xorl %edx, %edx
ucomisd 0x8(%rcx), %xmm0
seta %al
setae %dl
cmpb $0x0, 0x11(%rbx)
cmovnel %eax, %edx
xorl %eax, %eax
testb %dl, %dl
cmovneq %rcx, %rax
popq %rbx
popq %r14
popq %rbp
retq
leaq 0x93e(%rip), %rdi       # 0x3124
leaq 0x86c(%rip), %rsi       # 0x3059
leaq 0x93a(%rip), %rcx       # 0x312e
movl $0xd8, %edx
callq 0x10b0
// File: /workspace/github_cpp_makefile_star2_O2/helayzhang[P]sorted_set/./sorted_set.hh
// Function: SortedSet<int, std::tr1::hash<int>, std::equal_to<int>>::get_rank(double, int)
unsigned long get_rank(double score, KeyType key) {
        SkipListNode *x;
        unsigned long rank = 0;
        int i;

        x = mHeader;
        for (i = mLevel-1; i >= 0; i--) {
            while (x->mLevel[i].mForward && x->mLevel[i].mForward->mScore <= score) {
                rank += x->mLevel[i].mSpan;
                x = x->mLevel[i].mForward;
            }

            /* x might be equal to mHeader, so test if is header */
            if (not x->mIsHeader && x->mKey == key) {
                return rank;
            }
        }
        return 0;
    }

// Assembly:
pushq %rbp
movq %rsp, %rbp
movq (%rdi), %rdx
movslq 0x18(%rdi), %rcx
xorl %eax, %eax
testq %rcx, %rcx
jle 0x284a
decq %rcx
movq %rcx, %rdi
shlq $0x4, %rdi
movq 0x20(%rdx), %r9
movq (%r9,%rdi), %r8
testq %r8, %r8
je 0x283e
ucomisd 0x8(%r8), %xmm0
jb 0x283e
addq %rdi, %r9
movl 0x8(%r9), %edx
addq %rdx, %rax
movq %r8, %rdx
jmp 0x281a
cmpb $0x0, (%rdx)
jne 0x280b
cmpl %esi, 0x10(%rdx)
jne 0x280b
jmp 0x284c
xorl %eax, %eax
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O2/helayzhang[P]sorted_set/./sorted_set.hh
// Function: SortedSet<int, std::tr1::hash<int>, std::equal_to<int>>::last_in_range(SortedSet<int, std::tr1::hash<int>, std::equal_to<int>>::RangeSpec const&)
SkipListNode* last_in_range(const RangeSpec &range) {
        SkipListNode *x;
        int i;
    
        /* If everything is out of range, return early. */
        if (!is_in_range(range)) return NULL;
    
        x = mHeader;
        for (i = mLevel-1; i >= 0; i--) {
            /* Go forward while *IN* range. */
            while (x->mLevel[i].mForward && score_lte_max(x->mLevel[i].mForward->mScore, range))
                x = x->mLevel[i].mForward;
        }
    
        /* This is an inner range, so this node cannot be NULL. */
        assert(x != NULL);
    
        /* Check if score >= min. */
        if (!score_gte_min(x->mScore, range)) return NULL;
        return x;
    }

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r14
pushq %rbx
movq %rsi, %rbx
movq %rdi, %r14
callq 0x2906
testb %al, %al
je 0x28b6
movq (%r14), %rcx
movslq 0x18(%r14), %rax
movb 0x11(%rbx), %dl
movsd 0x8(%rbx), %xmm0
testq %rax, %rax
jle 0x28ba
decq %rax
movq %rax, %rdi
shlq $0x4, %rdi
movq %rcx, %rsi
movq 0x20(%rcx), %rcx
movq (%rcx,%rdi), %rcx
testq %rcx, %rcx
je 0x28b1
xorl %r8d, %r8d
xorl %r9d, %r9d
ucomisd 0x8(%rcx), %xmm0
seta %r8b
setae %r9b
testb $0x1, %dl
cmovnel %r8d, %r9d
testb %r9b, %r9b
jne 0x2882
movq %rsi, %rcx
jmp 0x2873
xorl %eax, %eax
jmp 0x28e1
testq %rcx, %rcx
je 0x28e6
movsd 0x8(%rcx), %xmm0
xorl %eax, %eax
xorl %edx, %edx
ucomisd (%rbx), %xmm0
seta %al
setae %dl
cmpb $0x0, 0x10(%rbx)
cmovnel %eax, %edx
xorl %eax, %eax
testb %dl, %dl
cmovneq %rcx, %rax
popq %rbx
popq %r14
popq %rbp
retq
leaq 0x837(%rip), %rdi       # 0x3124
leaq 0x765(%rip), %rsi       # 0x3059
leaq 0x8c0(%rip), %rcx       # 0x31bb
movl $0xf0, %edx
callq 0x10b0
nop
// File: /workspace/github_cpp_makefile_star2_O2/helayzhang[P]sorted_set/./sorted_set.hh
// Function: SortedSet<int, std::tr1::hash<int>, std::equal_to<int>>::is_in_range(SortedSet<int, std::tr1::hash<int>, std::equal_to<int>>::RangeSpec const&)
bool is_in_range(const RangeSpec &range) {
        SkipListNode *x;
        /* Test for ranges that will always be empty. */
        if (range.mMin > range.mMax || (range.mMin == range.mMax && (range.mMinex || range.mMaxex)))
            return false;
        x = mTail;
        if (x == NULL || !score_gte_min(x->mScore, range))
            return false;
        x = mHeader->mLevel[0].mForward;
        if (x == NULL || !score_lte_max(x->mScore, range))
            return false;
        return true;
    }

// Assembly:
movsd (%rsi), %xmm1
movsd 0x8(%rsi), %xmm0
ucomisd %xmm0, %xmm1
ja 0x2978
jne 0x2925
jp 0x2925
cmpb $0x0, 0x10(%rsi)
jne 0x2978
cmpb $0x0, 0x11(%rsi)
jne 0x2978
movq 0x8(%rdi), %rax
testq %rax, %rax
je 0x2978
pushq %rbp
movq %rsp, %rbp
movsd 0x8(%rax), %xmm2
xorl %eax, %eax
xorl %ecx, %ecx
ucomisd %xmm1, %xmm2
seta %al
setae %cl
cmpb $0x0, 0x10(%rsi)
cmovnel %eax, %ecx
cmpb $0x1, %cl
jne 0x297b
movq (%rdi), %rax
movq 0x20(%rax), %rax
movq (%rax), %rcx
testq %rcx, %rcx
je 0x297b
xorl %edx, %edx
xorl %eax, %eax
ucomisd 0x8(%rcx), %xmm0
seta %dl
setae %al
cmpb $0x0, 0x11(%rsi)
cmovnel %edx, %eax
jmp 0x297d
xorl %eax, %eax
retq
xorl %eax, %eax
popq %rbp
retq
nop
// File: /workspace/github_cpp_makefile_star2_O2/helayzhang[P]sorted_set/./sorted_set.hh
// Function: SortedSet<int, std::tr1::hash<int>, std::equal_to<int>>::zrank_generic(int, bool, unsigned long&)
bool zrank_generic(KeyType key, bool reverse, unsigned long &rank) {
        unsigned long llen = length();
        DictTypeIterator it = mDict.find(key);
        if (it != mDict.end()) {
            double score = it->second;
            rank = get_rank(score, key);
            if (reverse) {
                rank = llen - rank;
            }
            else {
                rank -= 1;
            }
            return true;
        }
        else {
            return false;
        }
    }

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x18, %rsp
movq %rcx, -0x38(%rbp)
movl %edx, %r14d
movq %rdi, %r12
leaq -0x2c(%rbp), %rax
movl %esi, (%rax)
movq 0x10(%rdi), %r13
addq $0x20, %rdi
movq %rax, %rsi
callq 0x1da0
movq %rax, %r15
movq 0x28(%r12), %rax
movq 0x30(%r12), %rcx
movq (%rax,%rcx,8), %rbx
cmpq %rbx, %r15
je 0x2ab8
movsd 0x8(%r15), %xmm0
movl -0x2c(%rbp), %esi
movq %r12, %rdi
callq 0x27fe
subq %rax, %r13
decq %rax
testb %r14b, %r14b
cmovneq %r13, %rax
movq -0x38(%rbp), %rcx
movq %rax, (%rcx)
cmpq %rbx, %r15
setne %al
addq $0x18, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
nop
// File: /workspace/github_cpp_makefile_star2_O2/helayzhang[P]sorted_set/./sorted_set.hh
// Function: SortedSet<int, std::tr1::hash<int>, std::equal_to<int>>::zrangebyscore_withscores_generic(double, double, bool, std::vector<std::pair<int, double>, std::allocator<std::pair<int, double>>>&, bool, bool)
void zrangebyscore_withscores_generic(double min, double max, bool reverse, KeyScoreVecType &result, 
                                          bool minex = false, bool maxex = false) {
        result.clear();
        RangeSpec range((reverse?max:min), (reverse?min:max), (reverse?maxex:minex), (reverse?minex:maxex));
        SkipListNode *ln;

        /* If reversed, get the last node in range as starting point. */
        if (reverse) {
            ln = last_in_range(range);
        } else {
            ln = first_in_range(range);
        }

        /* No "first" element in the specified interval. */
        if (ln == NULL) {
            return;
        }
        while (ln) {
            /* Abort when the node is no longer in range. */
            if (reverse) {
                if (!score_gte_min(ln->mScore,range)) break;
            } else {
                if (!score_lte_max(ln->mScore,range)) break;
            }

            result.push_back(std::make_pair(ln->mKey, ln->mScore));

            /* Move to next node */
            if (reverse) {
                ln = ln->mBackward;
            } else {
                ln = ln->mLevel[0].mForward;
            }
        }
    }

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
subq $0x30, %rsp
movq %rdx, %rbx
movl %esi, %r14d
movq (%rdx), %rax
cmpq %rax, 0x8(%rdx)
je 0x2af0
movq %rax, 0x8(%rbx)
testb %r14b, %r14b
jne 0x2afb
movapd %xmm0, %xmm2
jmp 0x2b03
movapd %xmm1, %xmm2
movapd %xmm0, %xmm1
movzbl %r8b, %eax
movzbl %cl, %ecx
movl %ecx, %edx
cmovnel %eax, %edx
cmovnel %ecx, %eax
movsd %xmm2, -0x38(%rbp)
movsd %xmm1, -0x30(%rbp)
movb %dl, -0x28(%rbp)
movb %al, -0x27(%rbp)
leaq -0x38(%rbp), %rsi
je 0x2b2f
callq 0x284e
jmp 0x2b34
callq 0x273c
movq %rax, %r15
testq %rax, %rax
je 0x2bb6
leaq -0x48(%rbp), %r12
testq %r15, %r15
je 0x2bb6
movsd 0x8(%r15), %xmm0
testb %r14b, %r14b
je 0x2b6c
xorl %eax, %eax
xorl %ecx, %ecx
ucomisd -0x38(%rbp), %xmm0
seta %al
setae %cl
cmpb $0x0, -0x28(%rbp)
cmovnel %eax, %ecx
testb %cl, %cl
jne 0x2b8b
jmp 0x2bb6
movsd -0x30(%rbp), %xmm1
xorl %eax, %eax
xorl %ecx, %ecx
ucomisd %xmm0, %xmm1
seta %al
setae %cl
cmpb $0x0, -0x27(%rbp)
cmovnel %eax, %ecx
cmpb $0x1, %cl
jne 0x2bb6
movl 0x10(%r15), %eax
movl %eax, -0x48(%rbp)
movsd %xmm0, -0x40(%rbp)
movq %rbx, %rdi
movq %r12, %rsi
callq 0x25ca
testb %r14b, %r14b
je 0x2bad
addq $0x18, %r15
jmp 0x2bb1
movq 0x20(%r15), %r15
movq (%r15), %r15
jmp 0x2b40
addq $0x30, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
nop
// File: /workspace/github_cpp_makefile_star2_O2/helayzhang[P]sorted_set/./sorted_set.hh
// Function: SortedSet<int, std::tr1::hash<int>, std::equal_to<int>>::private_delete_range_by_rank(unsigned int, unsigned int)
unsigned long private_delete_range_by_rank(unsigned int start, unsigned int end) {
        SkipListNode *update[SKIPLIST_MAXLEVEL], *x;
        unsigned long traversed = 0, removed = 0;
        int i;

        x = mHeader;
        for (i = mLevel-1; i >= 0; i--) {
            while (x->mLevel[i].mForward && (traversed + x->mLevel[i].mSpan) < start) {
                traversed += x->mLevel[i].mSpan;
                x = x->mLevel[i].mForward;
            }
            update[i] = x;
        }

        traversed++;
        x = x->mLevel[0].mForward;
        while (x && traversed <= end) {
            SkipListNode *next = x->mLevel[0].mForward;
            private_delete_node(x, update);
            mDict.erase(x->mKey);
            delete x;
            removed++;
            traversed++;
            x = next;
        }
        return removed;
    }

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x118, %rsp            # imm = 0x118
movq (%rdi), %rax
movq %rdi, -0x30(%rbp)
movslq 0x18(%rdi), %rcx
movl %esi, %esi
xorl %r12d, %r12d
testq %rcx, %rcx
jle 0x2c29
decq %rcx
movq %rcx, %rdi
shlq $0x4, %rdi
movq %r12, %r9
movq %rax, %r8
movq %r8, %rax
movq %r9, %r12
movq 0x20(%r8), %r9
movq (%r9,%rdi), %r8
testq %r8, %r8
je 0x2c1f
addq %rdi, %r9
movl 0x8(%r9), %r9d
addq %r12, %r9
cmpq %rsi, %r9
jb 0x2bfd
movq %rax, -0x140(%rbp,%rcx,8)
jmp 0x2be8
movq 0x20(%rax), %rax
movq (%rax), %r13
movl %edx, %eax
movq %rax, -0x38(%rbp)
movq -0x30(%rbp), %rax
leaq 0x20(%rax), %r15
xorl %r14d, %r14d
testq %r13, %r13
je 0x2c8e
leaq (%r12,%r14), %rax
cmpq -0x38(%rbp), %rax
jae 0x2c8e
movq 0x20(%r13), %rax
movq (%rax), %rbx
movq -0x30(%rbp), %rdi
movq %r13, %rsi
leaq -0x140(%rbp), %rdx
callq 0x20ce
leaq 0x10(%r13), %rsi
movq %r15, %rdi
callq 0x2ca4
movq %r13, %rdi
callq 0x1cf4
movq %r13, %rdi
callq 0x10f0
incq %r14
movq %rbx, %r13
jmp 0x2c41
movq %r14, %rax
addq $0x118, %rsp            # imm = 0x118
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
nop
// File: /workspace/github_cpp_makefile_star2_O2/devernay[P]vlpovutils/./vlpov.hpp
// Function: VLPovImage<double>::save(char const*)
int save(const char *filename) { // should be const, but no because of endianness stuff
        if (_width <= 0 || _height <= 0) {
            return -1;
        }
        unsigned int siz = _width*_height;
        std::FILE *const nfile = std::fopen(filename,"wb");
        if (!nfile) {
            return -1;
        }
        if (!endianness()) {
            invert_endianness();
        }
        size_t nw = std::fwrite(_data,sizeof(T),siz,nfile);
        std::fclose(nfile);
        if (nw != siz) {
            return -1;
        }
        if (!endianness()) {
            invert_endianness();
        }
        return 0;
    }

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movl (%rdi), %ebp
pushq $-0x1
popq %rbx
testl %ebp, %ebp
jle 0x2e92
movq %rdi, %r14
movl 0x4(%rdi), %r15d
testl %r15d, %r15d
jle 0x2e92
leaq 0x4625(%rip), %rax      # 0x746c
movq %rsi, %rdi
movq %rax, %rsi
callq 0x2190
testq %rax, %rax
je 0x2e92
movq %rax, %r12
imull %ebp, %r15d
movq %r14, %rdi
callq 0x3642
movq 0x8(%r14), %rdi
pushq $0x8
popq %rsi
movq %r15, %rdx
movq %r12, %rcx
callq 0x2300
movq %rax, %r13
movq %r12, %rdi
callq 0x2130
cmpq %r15, %r13
jne 0x2e92
movq %r14, %rdi
callq 0x3642
xorl %ebx, %ebx
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/jamesgrimmett[P]orbital_determination/ex10-2_linear_least_squares.cc
// Function: fill_ata_atb(std::vector<double, std::allocator<double>>, std::vector<double, std::allocator<double>>)
std::tuple< std::vector<std::vector<double> >, std::vector<double> > 
            fill_ata_atb(std::vector<double> xobs_, std::vector<double> yobs_) {
  int i;
  // Fill the matrix components of the general solution, as shown in Vallado
  // Exercise 10-2.

  // The two components of the general solution (A^T * A, and A^T * B)
  std::vector<std::vector<double> > ata_ = {{0.0, 0.0},{0.0, 0.0}};
  std::vector<double> atb_ = {0.0, 0.0};
  // fill ata and atb
  for ( i = 0; i < xobs_.size(); i++ ) {
    ata_[0][0] += 1.0;
    ata_[0][1] += xobs_[i];
    ata_[1][0] += xobs_[i];
    ata_[1][1] += pow(xobs_[i], 2);

    atb_[0] += yobs_[i];
    atb_[1] += xobs_[i] * yobs_[i];
  }
  return std::make_tuple(ata_, atb_);
}

// Assembly:
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
subq $0x78, %rsp
movq %rdx, %r14
movq %rsi, %r15
movq %rdi, %rbx
xorpd %xmm0, %xmm0
leaq 0x60(%rsp), %rsi
movapd %xmm0, (%rsi)
leaq 0x8(%rsp), %rdi
pushq $0x2
popq %rdx
leaq 0x7(%rsp), %rcx
callq 0x22d2
leaq 0x20(%rsp), %rdi
leaq 0x50(%rsp), %rsi
xorpd %xmm0, %xmm0
movapd %xmm0, (%rsi)
pushq $0x2
popq %rdx
leaq 0x6(%rsp), %rcx
callq 0x22d2
leaq 0x38(%rsp), %rdi
leaq 0x8(%rsp), %rsi
pushq $0x2
popq %rdx
leaq 0x5(%rsp), %rcx
callq 0x2454
pushq $0x18
popq %r12
leaq (%rsp,%r12), %rdi
addq $0x8, %rdi
callq 0x25c2
addq $-0x18, %r12
cmpq $-0x18, %r12
jne 0x1d65
xorpd %xmm0, %xmm0
leaq 0x60(%rsp), %rsi
movapd %xmm0, (%rsi)
leaq 0x8(%rsp), %rdi
pushq $0x2
popq %rdx
leaq 0x50(%rsp), %rcx
callq 0x22d2
movq (%r15), %rax
movq 0x8(%r15), %rcx
subq %rax, %rcx
sarq $0x3, %rcx
movq 0x38(%rsp), %rdx
movq 0x8(%rsp), %rsi
xorl %edi, %edi
movsd 0x12c3(%rip), %xmm0     # 0x3080
cmpq %rdi, %rcx
je 0x1e37
movq (%rdx), %r8
movsd (%r8), %xmm1
addsd %xmm0, %xmm1
movsd %xmm1, (%r8)
movsd (%rax,%rdi,8), %xmm1
addsd 0x8(%r8), %xmm1
movsd %xmm1, 0x8(%r8)
movsd (%rax,%rdi,8), %xmm1
movq 0x18(%rdx), %r8
addsd (%r8), %xmm1
movsd %xmm1, (%r8)
movsd (%rax,%rdi,8), %xmm1
mulsd %xmm1, %xmm1
addsd 0x8(%r8), %xmm1
movsd %xmm1, 0x8(%r8)
movq (%r14), %r8
movsd (%r8,%rdi,8), %xmm1
addsd (%rsi), %xmm1
movsd %xmm1, (%rsi)
movsd (%rax,%rdi,8), %xmm1
mulsd (%r8,%rdi,8), %xmm1
addsd 0x8(%rsi), %xmm1
movsd %xmm1, 0x8(%rsi)
incq %rdi
jmp 0x1dbd
leaq 0x38(%rsp), %rsi
leaq 0x8(%rsp), %rdx
movq %rbx, %rdi
callq 0x2588
leaq 0x8(%rsp), %rdi
callq 0x25c2
leaq 0x38(%rsp), %rdi
callq 0x2432
movq %rbx, %rax
addq $0x78, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
retq
movq %rax, %rbx
leaq 0x8(%rsp), %rdi
callq 0x25c2
jmp 0x1e7e
movq %rax, %rbx
leaq 0x38(%rsp), %rdi
callq 0x2432
jmp 0x1ebc
movq %rax, %rbx
pushq $0x18
popq %r14
leaq (%rsp,%r14), %rdi
addq $0x8, %rdi
callq 0x25c2
addq $-0x18, %r14
cmpq $-0x18, %r14
jne 0x1e91
jmp 0x1ebc
movq %rax, %rbx
leaq 0x8(%rsp), %rdi
callq 0x25c2
jmp 0x1ebc
movq %rax, %rbx
movq %rbx, %rdi
callq 0x1140
// File: /workspace/github_cpp_makefile_star2_O2/jamesgrimmett[P]orbital_determination/ex10-2_linear_least_squares.cc
// Function: inverse(std::vector<std::vector<double, std::allocator<double>>, std::allocator<std::vector<double, std::allocator<double>>>>)
std::vector<std::vector<double> > inverse(std::vector<std::vector<double> > arr) {
  // Calculate the inverse of a 2x2 matrix

  std::vector<std::vector<double> > inv(arr[0].size(), std::vector<double>(arr[1].size()));
  
  double det = determinant(arr);

  inv[0][0] = arr[1][1]  / det;
  inv[1][1] = arr[0][0]  / det;
  inv[0][1] = -arr[1][0] / det;
  inv[1][0] = -arr[0][1] / det;

  return inv;
}

// Assembly:
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
subq $0x48, %rsp
movq %rsi, %r14
movq %rdi, %rbx
movq (%rsi), %rax
movq (%rax), %r12
movq 0x8(%rax), %r15
movq 0x20(%rax), %rsi
subq 0x18(%rax), %rsi
sarq $0x3, %rsi
leaq 0x18(%rsp), %rdi
leaq 0xf(%rsp), %rdx
callq 0x248e
subq %r12, %r15
sarq $0x3, %r15
leaq 0x18(%rsp), %rdx
leaq 0xe(%rsp), %rcx
movq %rbx, %rdi
movq %r15, %rsi
callq 0x24e0
leaq 0x18(%rsp), %rdi
callq 0x25c2
leaq 0x30(%rsp), %rdi
movq %r14, %rsi
callq 0x23d8
leaq 0x30(%rsp), %r15
movq %r15, %rdi
callq 0x22b0
movsd %xmm0, 0x10(%rsp)
movq %r15, %rdi
callq 0x2432
movq (%r14), %rax
movq 0x18(%rax), %rcx
movsd 0x8(%rcx), %xmm0
movsd 0x10(%rsp), %xmm2
divsd %xmm2, %xmm0
movq (%rbx), %rdx
movq (%rdx), %rsi
movsd %xmm0, (%rsi)
movq (%rax), %rax
movsd (%rax), %xmm0
divsd %xmm2, %xmm0
movq 0x18(%rdx), %rdx
movsd %xmm0, 0x8(%rdx)
movsd (%rcx), %xmm0
movapd 0x10d8(%rip), %xmm1     # 0x3060
xorpd %xmm1, %xmm0
divsd %xmm2, %xmm0
movsd %xmm0, 0x8(%rsi)
movsd 0x8(%rax), %xmm0
xorpd %xmm1, %xmm0
divsd %xmm2, %xmm0
movsd %xmm0, (%rdx)
movq %rbx, %rax
addq $0x48, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
retq
movq %rax, %r14
movq %rbx, %rdi
callq 0x2432
jmp 0x1fd4
movq %rax, %r14
leaq 0x18(%rsp), %rdi
callq 0x25c2
jmp 0x1fd4
movq %rax, %r14
movq %r14, %rdi
callq 0x1140
// File: /workspace/github_cpp_makefile_star2_O2/jamesgrimmett[P]orbital_determination/ex10-2_linear_least_squares.cc
// Function: dot_product(std::vector<std::vector<double, std::allocator<double>>, std::allocator<std::vector<double, std::allocator<double>>>>, std::vector<double, std::allocator<double>>)
std::vector<double> dot_product(std::vector<std::vector<double> > a, 
                                  std::vector<double> b) {
  // calculate the dot production of a 2x2 matrix with a 1x2 vector
                          
  std::vector<double> result(2, 0.0);
  std::vector<double> a0 = {a[0][0], a[0][1]};
  std::vector<double> a1 = {a[1][0], a[1][1]};

  result[0] = std::inner_product(a0.begin(),a0.end(),b.begin(),0.0);
  result[1] = std::inner_product(a1.begin(),a1.end(),b.begin(),0.0);

  return result;
}

// Assembly:
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x50, %rsp
movq %rdx, %r14
movq %rsi, %r15
movq %rdi, %rbx
leaq 0x28(%rsp), %rdx
andq $0x0, (%rdx)
pushq $0x2
popq %r12
leaq 0x10(%rsp), %r13
movq %r12, %rsi
movq %r13, %rcx
callq 0x2308
movq (%r15), %rax
movq (%rax), %rax
movupd (%rax), %xmm0
movapd %xmm0, (%r13)
leaq 0x28(%rsp), %rdi
leaq 0x10(%rsp), %rsi
leaq 0x40(%rsp), %rcx
movq %r12, %rdx
callq 0x22d2
movq (%r15), %rax
movq 0x18(%rax), %rax
movupd (%rax), %xmm0
leaq 0x40(%rsp), %rsi
movapd %xmm0, (%rsi)
leaq 0x10(%rsp), %rdi
pushq $0x2
popq %rdx
leaq 0xf(%rsp), %rcx
callq 0x22d2
movq 0x28(%rsp), %rcx
movq 0x30(%rsp), %rdx
movq (%r14), %rax
xorpd %xmm0, %xmm0
movq %rax, %rsi
cmpq %rdx, %rcx
je 0x208b
movsd (%rcx), %xmm1
mulsd (%rsi), %xmm1
addsd %xmm1, %xmm0
addq $0x8, %rcx
addq $0x8, %rsi
jmp 0x2070
movq (%rbx), %rcx
movsd %xmm0, (%rcx)
movq 0x10(%rsp), %rdx
movq 0x18(%rsp), %rsi
xorpd %xmm0, %xmm0
cmpq %rsi, %rdx
je 0x20bb
movsd (%rdx), %xmm1
mulsd (%rax), %xmm1
addsd %xmm1, %xmm0
addq $0x8, %rdx
addq $0x8, %rax
jmp 0x20a0
movsd %xmm0, 0x8(%rcx)
leaq 0x10(%rsp), %rdi
callq 0x25c2
leaq 0x28(%rsp), %rdi
callq 0x25c2
movq %rbx, %rax
addq $0x50, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
retq
movq %rax, %r14
leaq 0x28(%rsp), %rdi
callq 0x25c2
jmp 0x20f7
movq %rax, %r14
movq %rbx, %rdi
callq 0x25c2
movq %r14, %rdi
callq 0x1140
// File: /workspace/github_cpp_makefile_star2_O2/jamesgrimmett[P]orbital_determination/ex10-2_linear_least_squares.cc
// Function: propagate(std::vector<double, std::allocator<double>>, std::vector<double, std::allocator<double>>)
std::vector<double> propagate(std::vector<double> state_, 
                                   std::vector<double> xobs_) {
  // Propagate the observed x value using the state vector
  // to calculate the expected y values.

  int i;
  std::vector<double> yexp_(xobs_.size(), 0.0);

  for (i = 0; i < xobs_.size(); i++) {
    yexp_[i] = state_[0] + state_[1] * xobs_[i];   
  }

  return yexp_;
}

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
subq $0x10, %rsp
movq %rdx, %r15
movq %rsi, %r14
movq %rdi, %rbx
movq 0x8(%rdx), %rsi
subq (%rdx), %rsi
sarq $0x3, %rsi
leaq 0x8(%rsp), %rdx
andq $0x0, (%rdx)
leaq 0x7(%rsp), %rcx
callq 0x2308
movq (%r15), %rax
movq 0x8(%r15), %rcx
subq %rax, %rcx
sarq $0x3, %rcx
movq (%rbx), %rdx
xorl %esi, %esi
cmpq %rsi, %rcx
jbe 0x216a
movq (%r14), %rdi
movsd 0x8(%rdi), %xmm0
mulsd (%rax,%rsi,8), %xmm0
addsd (%rdi), %xmm0
movsd %xmm0, (%rdx,%rsi,8)
incq %rsi
jmp 0x214a
movq %rbx, %rax
addq $0x10, %rsp
popq %rbx
popq %r14
popq %r15
retq
// File: /workspace/github_cpp_makefile_star2_O2/jamesgrimmett[P]orbital_determination/ex10-2_linear_least_squares.cc
// Function: residuals(std::vector<double, std::allocator<double>>, std::vector<double, std::allocator<double>>)
std::vector<double> residuals(std::vector<double> yobs_, 
                                 std::vector<double> yexp_) {
  // calculate the residuals (observed  - expected)

  // residuals vector
  std::vector<double> res_(yobs_.size(), 0.0);

  std::transform(yobs_.cbegin(), yobs_.cend(), 
                   yexp_.cbegin(), res_.begin(), std::minus<double>());

  return res_;  
}

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
subq $0x10, %rsp
movq %rdx, %r14
movq %rsi, %r15
movq %rdi, %rbx
movq 0x8(%rsi), %rsi
subq (%r15), %rsi
sarq $0x3, %rsi
leaq 0x8(%rsp), %rdx
andq $0x0, (%rdx)
leaq 0x7(%rsp), %rcx
callq 0x2308
movq (%r15), %rdi
movq 0x8(%r15), %rsi
movq (%r14), %rdx
movq (%rbx), %rcx
callq 0x2536
movq %rbx, %rax
addq $0x10, %rsp
popq %rbx
popq %r14
popq %r15
retq
movq %rax, %r14
movq %rbx, %rdi
callq 0x25c2
movq %r14, %rdi
callq 0x1140
// File: /workspace/github_cpp_makefile_star2_O2/jamesgrimmett[P]orbital_determination/ex10-2_linear_least_squares.cc
// Function: root_mean_sq(std::vector<double, std::allocator<double>>)
double root_mean_sq(std::vector<double> res_) {
  // Calculate the square root of the mean expected squared value
  double rms_;
  std::vector<double> ressq(res_.size(), 0.0);
  std::transform(res_.cbegin(), res_.cend(),
                   res_.cbegin(), ressq.begin(), std::multiplies<double>());
  rms_ = std::accumulate(ressq.begin(), ressq.end(), 0.0) / res_.size();
  rms_ = std::sqrt(rms_);

  return rms_;
}

// Assembly:
pushq %r14
pushq %rbx
subq $0x38, %rsp
movq %rdi, %rbx
movq 0x8(%rdi), %rsi
subq (%rdi), %rsi
sarq $0x3, %rsi
leaq 0x30(%rsp), %rdx
andq $0x0, (%rdx)
leaq 0x18(%rsp), %r14
leaq 0xf(%rsp), %rcx
movq %r14, %rdi
callq 0x2308
movq (%rbx), %rdi
movq 0x8(%rbx), %rsi
movq (%r14), %rcx
movq %rdi, %rdx
callq 0x2559
movq 0x18(%rsp), %rax
movq 0x20(%rsp), %rcx
xorpd %xmm0, %xmm0
cmpq %rcx, %rax
je 0x2238
addsd (%rax), %xmm0
addq $0x8, %rax
jmp 0x2229
movq 0x8(%rbx), %rax
subq (%rbx), %rax
sarq $0x3, %rax
movq %rax, %xmm1
punpckldq 0xdd0(%rip), %xmm1 # xmm1 = xmm1[0],mem[0],xmm1[1],mem[1]
subpd 0xdd8(%rip), %xmm1      # 0x3030
movapd %xmm1, %xmm2
unpckhpd %xmm1, %xmm2            # xmm2 = xmm2[1],xmm1[1]
addsd %xmm1, %xmm2
divsd %xmm2, %xmm0
xorpd %xmm1, %xmm1
ucomisd %xmm1, %xmm0
jb 0x2278
sqrtsd %xmm0, %xmm0
jmp 0x227d
callq 0x1090
movsd %xmm0, 0x10(%rsp)
leaq 0x18(%rsp), %rdi
callq 0x25c2
movsd 0x10(%rsp), %xmm0
addq $0x38, %rsp
popq %rbx
popq %r14
retq
movq %rax, %rbx
leaq 0x18(%rsp), %rdi
callq 0x25c2
movq %rbx, %rdi
callq 0x1140
// File: /workspace/github_cpp_makefile_star2_O2/brianwu02[P]ImageProcessing/halftone.cpp
// Function: main
int main(int argc, char** argv) {
    int m;
    double gamma;
    imageP I1, I2;

    cout << "argv[1] infile: " << argv[1] << endl;
    cout << "argv[2] m:      " << argv[2] << endl;
    cout << "argv[3] gamma:  " << argv[3] << endl;
    cout << "argv[4] outfile " << argv[4] << endl;

    I1 = IP_readImage(argv[1]);
    I2 = NEWIMAGE;

    m = atoi(argv[2]);
    gamma = atof(argv[3]);

    halftone(I1, m, gamma, I2);
    IP_saveImage(I2, argv[4]);

    IP_freeImage(I1);
    IP_freeImage(I2);
    
    return 1;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %rbx
pushq %rax
movq %rsi, %rbx
movq 0x2ce3(%rip), %r14      # 0x3fd0
leaq 0xd24(%rip), %rsi       # 0x2018
movq %r14, %rdi
callq 0x1090
movq 0x8(%rbx), %rsi
movq %rax, %rdi
callq 0x1090
movq %rax, %rdi
callq 0x1060
leaq 0xd12(%rip), %rsi       # 0x2029
movq %r14, %rdi
callq 0x1090
movq 0x10(%rbx), %rsi
movq %rax, %rdi
callq 0x1090
movq %rax, %rdi
callq 0x1060
leaq 0xd00(%rip), %rsi       # 0x203a
movq %r14, %rdi
callq 0x1090
movq 0x18(%rbx), %rsi
movq %rax, %rdi
callq 0x1090
movq %rax, %rdi
callq 0x1060
leaq 0xcee(%rip), %rsi       # 0x204b
movq %r14, %rdi
callq 0x1090
movq 0x20(%rbx), %rsi
movq %rax, %rdi
callq 0x1090
movq %rax, %rdi
callq 0x1060
movq 0x8(%rbx), %rdi
callq 0x1618
movq %rax, %r14
pushq $0x10
popq %rdi
callq 0x1100
movq %rax, %r15
movq 0x10(%rbx), %rdi
callq 0x1140
movl %eax, %ebp
movq 0x18(%rbx), %rdi
callq 0x10d0
cvtsd2ss %xmm0, %xmm0
movq %r14, %rdi
movl %ebp, %esi
movq %r15, %rdx
callq 0x13df
movq 0x20(%rbx), %rsi
movq %r15, %rdi
callq 0x17e2
movq %r14, %rdi
callq 0x18e3
movq %r15, %rdi
callq 0x18e3
pushq $0x1
popq %rax
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O2/dcdolson[P]nsh-sf-devkit/examples/count/main.cpp
// Function: main
int main(int argc, char** argv)
{
    try
    {
        auto interface = nshdev::NetInterfaceFactory::CreateInterfaceFromArgs(argc, argv);
        if(interface == nullptr)
        {
            std::cerr << "Failed to create interface" << std::endl;
            return 2;
        }

        nshdev::Demux demux;
        interface->SetConsumer(&demux);

        PacketCounter packetCounter;
        demux.SetConsumer(&packetCounter);

        nshdev::Scheduler scheduler(*interface);

        scheduler.SchedulePackets();

	}
    catch(const std::exception& e)
    {
        std::cerr << "Caught exception (aborting)" << std::endl << e.what() << std::endl;
    }

    return 1;  // can only get here by exception
}

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
subq $0x60, %rsp
leaq 0xc(%rsp), %rax
movl %edi, (%rax)
leaq 0x38(%rsp), %rdx
movq %rsi, (%rdx)
movq %rsp, %rdi
movq %rax, %rsi
callq 0x287e
movq (%rsp), %r15
testq %r15, %r15
je 0x257a
leaq 0x10(%rsp), %rdi
callq 0x32b0
movq (%rsp), %rdi
leaq 0x10(%rsp), %rbx
movq %rbx, %rsi
callq 0x265a
leaq 0x40(%rsp), %r14
movq %r14, %rdi
callq 0x2684
movq %r14, 0x10(%rbx)
movq (%rsp), %rsi
leaq 0x28(%rsp), %rdi
callq 0x3374
leaq 0x28(%rsp), %rdi
callq 0x3386
leaq 0x10(%rsp), %rdi
callq 0x26aa
xorl %ebx, %ebx
jmp 0x2598
movq 0x4a67(%rip), %rdi      # 0x6fe8
leaq 0x1a7c(%rip), %rsi      # 0x4004
callq 0x21d0
movq %rax, %rdi
callq 0x2100
pushq $0x2
popq %rbx
movq (%rsp), %rdi
testq %rdi, %rdi
je 0x25a7
movq (%rdi), %rax
callq *0x8(%rax)
testq %r15, %r15
je 0x25af
pushq $0x1
popq %rbx
movl %ebx, %eax
addq $0x60, %rsp
popq %rbx
popq %r14
popq %r15
retq
jmp 0x25bd
movq %rdx, %r14
movq %rax, %rbx
jmp 0x25dd
movq %rdx, %r14
movq %rax, %rbx
jmp 0x25ec
movq %rdx, %r14
movq %rax, %rbx
leaq 0x10(%rsp), %rdi
callq 0x26aa
movq (%rsp), %rdi
testq %rdi, %rdi
je 0x25ec
movq (%rdi), %rax
callq *0x8(%rax)
cmpl $0x1, %r14d
jne 0x2649
movq %rbx, %rdi
callq 0x20d0
movq %rax, %rbx
movq 0x49e4(%rip), %rdi      # 0x6fe8
leaq 0x1a14(%rip), %rsi      # 0x401f
callq 0x21d0
movq %rax, %rdi
callq 0x2100
movq %rax, %r14
movq (%rbx), %rax
movq %rbx, %rdi
callq *0x10(%rax)
movq %r14, %rdi
movq %rax, %rsi
callq 0x21d0
movq %rax, %rdi
callq 0x2100
callq 0x2270
jmp 0x25ac
movq %rax, %rbx
callq 0x2270
movq %rbx, %rdi
callq 0x22c0
movq %rax, %rdi
callq 0x26c1
nop
// File: /workspace/github_cpp_makefile_star2_O2/dcdolson[P]nsh-sf-devkit/examples/count/PacketCounter.cpp
// Function: PacketCounter::Display()
void PacketCounter::Display()
{
    // very primitive: display counts, but no more than once per second.
    std::time_t now = std::time(nullptr);
    if( now - m_lastDisplayTime > 0 )
    {
        std::cout << "Packets: " << std::right << std::setw(12) << m_packets
	    << "  Bytes: " << m_bytes << std::endl;
	m_lastDisplayTime = now;
    }
}

// Assembly:
pushq %r14
pushq %rbx
pushq %rax
movq %rdi, %rbx
xorl %edi, %edi
callq 0x21c0
cmpq 0x18(%rbx), %rax
jle 0x27ac
movq %rax, %r14
movq 0x4872(%rip), %rdi      # 0x6fb8
leaq 0x1973(%rip), %rsi      # 0x40c0
callq 0x21d0
movq (%rax), %rcx
movq -0x18(%rcx), %rdx
movl $0xffffff4f, %esi       # imm = 0xFFFFFF4F
andl 0x18(%rax,%rdx), %esi
orl $0x80, %esi
movl %esi, 0x18(%rax,%rdx)
movq -0x18(%rcx), %rcx
movq $0xc, 0x10(%rax,%rcx)
movq 0x8(%rbx), %rsi
movq %rax, %rdi
callq 0x2130
leaq 0x193e(%rip), %rsi      # 0x40ca
movq %rax, %rdi
callq 0x21d0
movq 0x10(%rbx), %rsi
movq %rax, %rdi
callq 0x2130
movq %rax, %rdi
callq 0x2100
movq %r14, 0x18(%rbx)
addq $0x8, %rsp
popq %rbx
popq %r14
retq
// File: /workspace/github_cpp_makefile_star2_O2/eschwabe[P]interview-practice/src/removechars.cpp
// Function: remove_chars(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>)
string remove_chars(string str, string remove) {
    string output;
    unordered_set<char> remove_set;
    for(char c : remove) {
        remove_set.insert(c);
    }
    for(char c : str) {
        if( remove_set.find(c) == remove_set.end() ) {
            output.append(1, c);
        }
    }

    return output;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x48, %rsp
movq %rsi, 0x8(%rsp)
movq %rdi, %rbx
leaq 0x10(%rdi), %rax
movq %rax, (%rdi)
andq $0x0, 0x8(%rdi)
movb $0x0, 0x10(%rdi)
leaq 0x40(%rsp), %rax
movq %rax, -0x30(%rax)
movq $0x1, -0x28(%rax)
xorps %xmm0, %xmm0
movups %xmm0, -0x20(%rax)
movl $0x3f800000, -0x10(%rax) # imm = 0x3F800000
movups %xmm0, -0x8(%rax)
movq (%rdx), %r13
movq 0x8(%rdx), %rbp
xorl %r14d, %r14d
leaq 0x10(%rsp), %r15
leaq 0x7(%rsp), %r12
cmpq %r14, %rbp
je 0x1327
movb (%r13,%r14), %al
movb %al, 0x7(%rsp)
movq %r15, %rdi
movq %r12, %rsi
callq 0x1558
incq %r14
jmp 0x1309
movq 0x8(%rsp), %rax
movq (%rax), %r13
movq 0x8(%rax), %rbp
xorl %r12d, %r12d
leaq 0x10(%rsp), %r14
leaq 0x7(%rsp), %r15
cmpq %r12, %rbp
je 0x1373
movb (%r13,%r12), %al
movb %al, 0x7(%rsp)
movq %r14, %rdi
movq %r15, %rsi
callq 0x18d4
testq %rax, %rax
jne 0x136e
movsbl 0x7(%rsp), %edx
movq %rbx, %rdi
pushq $0x1
popq %rsi
callq 0x1110
incq %r12
jmp 0x1340
leaq 0x10(%rsp), %rdi
callq 0x14a4
movq %rbx, %rax
addq $0x48, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
jmp 0x1393
jmp 0x1393
movq %rax, %r14
leaq 0x10(%rsp), %rdi
callq 0x14a4
movq %rbx, %rdi
callq 0x1070
movq %r14, %rdi
callq 0x1160
// File: /workspace/github_cpp_makefile_star2_O2/arnoldrobbins[P]mcilroy-regex/grep.cpp
// Function: grepcomp()
void
grepcomp()
{
	int i;
	char *s, *t;	
	for(i=0; i<nargpat; i++) {
		for(t=s=argpat[i]; t; s = t+1) {	/*see above*/
			t = strchr(s, '\n');
			if(t)
				*t = 0;
			docomp(s);
		}	
	}

	for(i=0; i<nfilepat; i++) {
		FILE *patfile = fopen(filepat[i], "r");
		if(patfile)
			while(getline(patfile, filepat[i]) >= 0)
				docomp(&line[0]);
		else if(!sflag)
			error("cannot open", filepat[i]);
		else
			retval = 2;
		fclose(patfile);
	}
	if(nre == 0)
		error("no pattern", "");
}

// Assembly:
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
pushq %rax
xorl %r12d, %r12d
pushq $0xa
popq %rbx
movslq 0x9ee6(%rip), %rax      # 0xe660
cmpq %rax, %r12
jge 0x47bd
movq 0x9e2a(%rip), %rax      # 0xe5b0
movq (%rax,%r12,8), %r14
movq %r14, %r15
testq %r15, %r15
je 0x47b8
movq %r14, %rdi
movl %ebx, %esi
callq 0x40b0
movq %rax, %r15
testq %rax, %rax
je 0x47a8
movb $0x0, (%r15)
movq %r14, %rdi
callq 0x4a05
movq %r15, %r14
incq %r14
jmp 0x478d
incq %r12
jmp 0x4773
xorl %r15d, %r15d
leaq 0x4fe3(%rip), %rbx      # 0x97aa
movslq 0x9f4a(%rip), %rax      # 0xe718
cmpq %rax, %r15
jge 0x4833
movq 0x9e8e(%rip), %rax      # 0xe668
movq (%rax,%r15,8), %rdi
movq %rbx, %rsi
callq 0x41b0
movq %rax, %r14
testq %rax, %rax
je 0x4813
movq 0x9e73(%rip), %rax      # 0xe668
movq (%rax,%r15,8), %rsi
movq %r14, %rdi
callq 0x4a9f
testl %eax, %eax
js 0x4826
movq 0xa24c(%rip), %rdi      # 0xea58
callq 0x4a05
jmp 0x47ee
cmpl $0x0, 0x9d86(%rip)      # 0xe5a0
je 0x4848
movl $0x2, 0x994a(%rip)      # 0xe170
movq %r14, %rdi
callq 0x4160
incq %r15
jmp 0x47c7
cmpl $0x0, 0xa216(%rip)      # 0xea50
je 0x485f
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
retq
movq 0x9e19(%rip), %rax      # 0xe668
movq (%rax,%r15,8), %rsi
leaq 0x48d3(%rip), %rdi      # 0x912d
callq 0x4757
leaq 0x4890(%rip), %rdi      # 0x90f6
leaq 0x4888(%rip), %rsi      # 0x90f5
callq 0x4757
// File: /workspace/github_cpp_makefile_star2_O2/arnoldrobbins[P]mcilroy-regex/grep.cpp
// Function: execute(_IO_FILE*, char const*)
void
execute(FILE *input, const char *name)
{
	int i, lineno;
	int hits = 0;
	for(lineno=1; ; lineno++) {
		int n = getline(input, name);
		if(n < 0)
			break;
		for(i=0; i<nre; i++) {
			int result = regnexec(&re[i], &line[0], n, 0, 0, 0);
			if(result == 0) 
				break;
			if(result != REG_NOMATCH)
				doregerror(result, name, lineno);
		}
		if((i<nre) ^ vflag) {
			hits++;
			if(qflag | lflag)
				break;
			if(cflag)
				continue;
			if(nfiles>1 && !hflag)
				printf("%s:", name);
			if(nflag)
				printf("%d:", lineno);
			printf("%s\n", line.bytes());
		}
	}
	if(hits)
		anyhits = 1;
	if(qflag)
		return;
	if(lflag && hits)
		printf("%s\n", name);
	if(!lflag && cflag) {
		if(nfiles>1 && !hflag)
			printf("%s:", name);
		printf("%d\n", hits);
	}
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movq %rsi, %r14
movq %rdi, (%rsp)
pushq $0x1
popq %rbp
xorl %ebx, %ebx
movq (%rsp), %rdi
movq %r14, %rsi
callq 0x4a9f
testl %eax, %eax
js 0x496f
movl %eax, %r13d
xorl %r15d, %r15d
xorl %r12d, %r12d
movslq 0xa1a3(%rip), %rax      # 0xea50
cmpq %rax, %r12
jge 0x48f7
movq 0x9e67(%rip), %rdi      # 0xe720
addq %r15, %rdi
movq 0xa195(%rip), %rsi      # 0xea58
movq %r13, %rdx
xorl %ecx, %ecx
xorl %r8d, %r8d
xorl %r9d, %r9d
callq 0x5f8c
cmpl $0x1, %eax
je 0x48e8
testl %eax, %eax
je 0x48f1
movl %eax, %edi
movq %r14, %rsi
movl %ebp, %edx
callq 0x4b28
incq %r12
addq $0x28, %r15
jmp 0x48a6
movl 0xa159(%rip), %eax      # 0xea50
xorl %ecx, %ecx
cmpl %r12d, %eax
setg %cl
cmpl %ecx, 0x9c9f(%rip)      # 0xe5a4
je 0x4968
incl %ebx
movl 0x9c85(%rip), %eax      # 0xe594
orl 0x9c83(%rip), %eax      # 0xe598
jne 0x496f
cmpl $0x0, 0x9c72(%rip)      # 0xe590
jne 0x4968
cmpl $0x2, 0xa159(%rip)      # 0xea80
jl 0x4943
cmpl $0x0, 0x9c78(%rip)      # 0xe5a8
jne 0x4943
leaq 0x483d(%rip), %rdi      # 0x9176
movq %r14, %rsi
xorl %eax, %eax
callq 0x4050
cmpl $0x0, 0x9c52(%rip)      # 0xe59c
je 0x495c
leaq 0x4827(%rip), %rdi      # 0x917a
movl %ebp, %esi
xorl %eax, %eax
callq 0x4050
movq 0xa0f5(%rip), %rdi      # 0xea58
callq 0x4230
incl %ebp
jmp 0x4889
testl %ebx, %ebx
je 0x497d
movl $0x1, 0xa0ff(%rip)      # 0xea7c
cmpl $0x0, 0x9c14(%rip)      # 0xe598
je 0x4995
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
testl %ebx, %ebx
sete %cl
movl 0x9bf4(%rip), %eax      # 0xe594
testl %eax, %eax
sete %dl
orb %cl, %dl
jne 0x49b7
movq %r14, %rdi
callq 0x4230
movl 0x9bdd(%rip), %eax      # 0xe594
testl %eax, %eax
jne 0x4986
cmpl $0x0, 0x9bce(%rip)      # 0xe590
je 0x4986
cmpl $0x2, 0xa0b5(%rip)      # 0xea80
jl 0x49e7
cmpl $0x0, 0x9bd4(%rip)      # 0xe5a8
jne 0x49e7
leaq 0x4799(%rip), %rdi      # 0x9176
movq %r14, %rsi
xorl %eax, %eax
callq 0x4050
leaq 0x479e(%rip), %rdi      # 0x918c
movl %ebx, %esi
xorl %eax, %eax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
jmp 0x4050
// File: /workspace/github_cpp_makefile_star2_O2/arnoldrobbins[P]mcilroy-regex/grep.cpp
// Function: docomp(char*)
void
docomp(char *s)
{
	if(re.assure(nre))
		error("out of space at--", s);
	int result = regcomp(&re[nre], s, options);
	if(result)
		doregerror(result, s, 0);
	if(!nre || !regcomb(&re[nre-1], &re[nre]))
		nre++;
}

// Assembly:
pushq %rbx
movq %rdi, %rbx
movl 0xa041(%rip), %esi      # 0xea50
leaq 0x9d0a(%rip), %rdi      # 0xe720
callq 0x4c28
testl %eax, %eax
jne 0x4a90
movslq 0xa02a(%rip), %rax      # 0xea50
imulq $0x28, %rax, %rdi
addq 0x9cef(%rip), %rdi      # 0xe720
movl 0x973d(%rip), %edx      # 0xe174
movq %rbx, %rsi
callq 0x6d88
testl %eax, %eax
je 0x4a4f
movl %eax, %edi
movq %rbx, %rsi
xorl %edx, %edx
callq 0x4b28
movslq 0x9ffa(%rip), %rax      # 0xea50
testq %rax, %rax
je 0x4a85
movq 0x9cbe(%rip), %rcx      # 0xe720
imulq $0x28, %rax, %rax
leaq (%rcx,%rax), %rsi
leaq (%rcx,%rax), %rdi
addq $-0x28, %rdi
callq 0x70f4
testl %eax, %eax
jne 0x4a8e
movl 0x9fcf(%rip), %eax      # 0xea50
incl %eax
jmp 0x4a88
pushq $0x1
popq %rax
movl %eax, 0x9fc2(%rip)      # 0xea50
popq %rbx
retq
leaq 0x46a2(%rip), %rdi      # 0x9139
movq %rbx, %rsi
callq 0x4757
// File: /workspace/github_cpp_makefile_star2_O2/arnoldrobbins[P]mcilroy-regex/grep.cpp
// Function: getline(_IO_FILE*, char const*)
int
getline(FILE *input, const char *name)
{
	int c, j;
	for(j=0; ; j++) {
		if(line.assure(j))
			error("out of space reading ", name);
		switch(c = getc(input)) {
		default:
			line[j] = c;
			continue;
		case EOF:
			if(j == 0)
				return -1;
			warn("newline appended to ", name);
		case '\n':
			line[j] = 0;
			return j;
		}
	}
}

// Assembly:
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
pushq %rax
movq %rsi, %r14
movq %rdi, %r15
xorl %ebx, %ebx
leaq 0x9fa2(%rip), %r12      # 0xea58
movq %r12, %rdi
movl %ebx, %esi
callq 0x4c34
testl %eax, %eax
jne 0x4b19
movq %r15, %rdi
callq 0x4090
cmpl $-0x1, %eax
je 0x4ae5
cmpl $0xa, %eax
je 0x4af9
movq 0x9f7b(%rip), %rcx      # 0xea58
movb %al, (%rcx,%rbx)
incq %rbx
jmp 0x4ab6
testq %rbx, %rbx
je 0x4b14
leaq 0x4670(%rip), %rdi      # 0x9161
movq %r14, %rsi
callq 0x4b9d
movq 0x9f58(%rip), %rax      # 0xea58
movl %ebx, %ecx
movb $0x0, (%rax,%rcx)
movl %ebx, %eax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
retq
pushq $-0x1
popq %rbx
jmp 0x4b06
leaq 0x462b(%rip), %rdi      # 0x914b
movq %r14, %rsi
callq 0x4757
// File: /workspace/github_cpp_makefile_star2_O2/arnoldrobbins[P]mcilroy-regex/grep.cpp
// Function: doregerror(int, char const*, int)
void
doregerror(int result, const char *name, int lineno)
{
	char errbuf[100];
	if(result==0 || result==REG_NOMATCH)
		return;
	regerror(result, 0, errbuf, sizeof(errbuf));
	fprintf(stderr, "grep: %s: %s", errbuf, name);
	if(lineno)
		fprintf(stderr, ":%d\n", lineno);
	else
		fprintf(stderr, "\n");
	exit(2);
}

// Assembly:
cmpl $0x1, %edi
ja 0x4b2e
retq
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
subq $0x68, %rsp
movl %edx, %ebx
movq %rsi, %r14
movq %rsp, %r15
pushq $0x64
popq %rcx
xorl %esi, %esi
movq %r15, %rdx
callq 0x40e0
movq 0x947b(%rip), %r12      # 0xdfd0
movq (%r12), %rdi
leaq 0x461e(%rip), %rsi      # 0x917e
movq %r15, %rdx
movq %r14, %rcx
xorl %eax, %eax
callq 0x4200
movq (%r12), %rax
testl %ebx, %ebx
je 0x4b90
leaq 0x460f(%rip), %rsi      # 0x918b
movq %rax, %rdi
movl %ebx, %edx
xorl %eax, %eax
callq 0x4200
pushq $0x2
popq %rdi
callq 0x41c0
pushq $0xa
popq %rdi
movq %rax, %rsi
callq 0x41d0
jmp 0x4b88