// 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_insert(double, int)
SkipListNode* private_insert(double score, KeyType key) 
    {
        SkipListNode *update[SKIPLIST_MAXLEVEL], *x;
        unsigned int rank[SKIPLIST_MAXLEVEL];
        int i, level;

        x = mHeader;
        for (i = mLevel-1; i >= 0; i--) {
            /* store rank that is crossed to reach the insert position */
            rank[i] = i == (mLevel-1) ? 0 : rank[i+1];
            while (x->mLevel[i].mForward && x->mLevel[i].mForward->mScore < score) {
                rank[i] += x->mLevel[i].mSpan;
                x = x->mLevel[i].mForward;
            }
            update[i] = x;
        }
        /* For skiplist self, 'key' stands
         * we assume the key is not already inside, since we allow duplicated
         * scores, and the re-insertion of score and redis object should never
         * happen since the caller of zslInsert() should test in the hash table
         * if the element is already inside or not. */
        level = randomlevel();
        if (level > mLevel) {
            for (i = mLevel; i < level; i++) {
                rank[i] = 0;
                update[i] = mHeader;
                update[i]->mLevel[i].mSpan = mLength;
            }
            mLevel = level;
        }
        x = new SkipListNode(level, score, key);
        for (i = 0; i < level; i++) {
            x->mLevel[i].mForward = update[i]->mLevel[i].mForward;
            update[i]->mLevel[i].mForward = x;
    
            /* update span covered by update[i] as x is
             * inserted here */
            x->mLevel[i].mSpan = update[i]->mLevel[i].mSpan - (rank[0] - rank[i]);
            update[i]->mLevel[i].mSpan = (rank[0] - rank[i]) + 1;
        }
    
        /* increment span for untouched levels */
        for (i = level; i < mLevel; i++) {
            update[i]->mLevel[i].mSpan++;
        }

        x->mBackward = (update[0] == mHeader) ? NULL : update[0];
        if (x->mLevel[0].mForward)
            x->mLevel[0].mForward->mBackward = x;
        else
            mTail = x;
        mLength++;
        return x;
    }

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
subq $0x190, %rsp            # imm = 0x190
movl %esi, %r14d
movq %rdi, %rbx
movq (%rdi), %rdx
movl 0x18(%rdi), %eax
movq %rax, %rcx
testl %ecx, %ecx
jle 0x1ef3
xorl %esi, %esi
cmpq %rax, %rcx
je 0x1eb5
movl -0xb0(%rbp,%rcx,4), %esi
decq %rcx
movl %ecx, %edi
movq %rdi, %r8
shlq $0x4, %r8
movq 0x20(%rdx), %r10
movq (%r10,%r8), %r9
testq %r9, %r9
je 0x1ee2
ucomisd 0x8(%r9), %xmm0
jbe 0x1ee2
addq %r8, %r10
addl 0x8(%r10), %esi
movq %r9, %rdx
jmp 0x1ec1
movl %esi, -0xb0(%rbp,%rdi,4)
movq %rdx, -0x1b0(%rbp,%rdi,8)
jmp 0x1ea3
movsd %xmm0, -0x28(%rbp)
movq %rbx, %rdi
callq 0x2172
movl %eax, %r12d
movslq 0x18(%rbx), %rax
cmpl %eax, %r12d
jle 0x1f48
movq (%rbx), %rcx
movl 0x10(%rbx), %edx
movslq %r12d, %rsi
leaq (,%rax,4), %rdi
cmpq %rsi, %rax
jge 0x1f44
andl $0x0, -0xb0(%rbp,%rdi)
movq %rcx, -0x1b0(%rbp,%rdi,2)
movq 0x20(%rcx), %r8
movl %edx, 0x8(%r8,%rdi,4)
incq %rax
addq $0x4, %rdi
jmp 0x1f1d
movl %r12d, 0x18(%rbx)
pushq $0x28
popq %rdi
callq 0x1110
movq %rax, %r15
movq %rax, %rdi
movl %r12d, %esi
movsd -0x28(%rbp), %xmm0
movl %r14d, %edx
callq 0x2198
movslq %r12d, %rax
movl -0xb0(%rbp), %ecx
leal 0x1(%rcx), %edx
xorl %esi, %esi
testl %r12d, %r12d
cmovlel %esi, %r12d
addl %r12d, %r12d
cmpq %rsi, %r12
je 0x1fc8
movq -0x1b0(%rbp,%rsi,4), %rdi
movq 0x20(%rdi), %rdi
movq (%rdi,%rsi,8), %r8
movq 0x20(%r15), %r9
movq %r8, (%r9,%rsi,8)
movq %r15, (%rdi,%rsi,8)
movl 0x8(%rdi,%rsi,8), %r8d
movl -0xb0(%rbp,%rsi,2), %r10d
subl %ecx, %r8d
addl %r10d, %r8d
movl %r8d, 0x8(%r9,%rsi,8)
movl %edx, %r8d
subl %r10d, %r8d
movl %r8d, 0x8(%rdi,%rsi,8)
addq $0x2, %rsi
jmp 0x1f7e
movslq 0x18(%rbx), %rcx
leaq (,%rax,8), %rdx
cmpq %rcx, %rax
jge 0x1ff2
movq -0x1b0(%rbp,%rdx), %rsi
movq 0x20(%rsi), %rsi
incl 0x8(%rsi,%rdx,2)
incq %rax
addq $0x8, %rdx
jmp 0x1fd4
movq -0x1b0(%rbp), %rax
xorl %ecx, %ecx
cmpq (%rbx), %rax
cmovneq %rax, %rcx
movq %rcx, 0x18(%r15)
movq 0x20(%r15), %rax
movq (%rax), %rax
leaq 0x8(%rbx), %rcx
leaq 0x18(%rax), %rdx
testq %rax, %rax
cmoveq %rcx, %rdx
movq %r15, (%rdx)
incq 0x10(%rbx)
movq %r15, %rax
addq $0x190, %rsp            # imm = 0x190
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
movq %rax, %rbx
movq %r15, %rdi
callq 0x10f0
movq %rbx, %rdi
callq 0x1180
nop