// File: /workspace/github_cpp_makefile_star2_O1/obliviousram[P]oblivious-avl-tree/src/OAVLTreeDeterministicEviction.cpp
// Function: OAVLTreeDeterministicEviction::insert(int, int)
void OAVLTreeDeterministicEviction::insert(int key, int val) {
    Block to_insert;
    to_insert.leaf_id = rand_gen->getRandomLeaf();
    to_insert.id = id_gen->getNextId();
    to_insert.data[0] = key;
    to_insert.data[1] = val;
    to_insert.data[2] = 0;
    to_insert.data[3] = 0;
    if (root.id == -1) {
        stash.push_back(to_insert);
        root.leaf_id = to_insert.leaf_id;
        root.id = to_insert.id;
        performDummyFinds(num_levels);
        evictTwoPaths();
        performDummyEvictions(num_levels - 1);
        return;
    }
    moveToLocal(root.leaf_id, root.id);
    int b = 0;
    while (true) {
        if (local[b].data[0] < key) {
            if (local[b].rightChildId != -1) {
                moveToLocal(local[b].rightChildPos, local[b].rightChildId);
            } else {
                local[b].rightChildId = to_insert.id;
                local[b].rightChildPos = to_insert.leaf_id;
                local.push_back(to_insert);
                break;
            }
        } else {
            if (local[b].leftChildId != -1) {
                moveToLocal(local[b].leftChildPos, local[b].leftChildId);
            } else {
                local[b].leftChildId = to_insert.id;
                local[b].leftChildPos = to_insert.leaf_id;
                local.push_back(to_insert);
                break;
            }
        }
        b = (int)local.size() - 1;
    }
    for (int i = (int)local.size() - 2; i >= 0; i--) {
        local[i].leaf_id = rand_gen->getRandomLeaf();
        if (local[i].leftChildId == local[i + 1].id) {
            local[i].leftChildPos = local[i + 1].leaf_id;
        } else local[i].rightChildPos = local[i + 1].leaf_id;
    }
    updateHeight();
    root.id = local[0].id;
    root.leaf_id = local[0].leaf_id;

    for (int i = (int)local.size() - 3; i > 0; i--) {
        if (local[i].getBalance() > 1) {
            if (local[i+1].getBalance() >= 0) {
                bool isLeftChild = false;
                if (local[i-1].leftChildId == local[i].id) isLeftChild = true;
                local[i].leftChildId = local[i+1].rightChildId;
                local[i].leftChildPos = local[i+1].rightChildPos;
                local[i+1].rightChildId = local[i].id;
                local[i+1].rightChildPos = local[i].leaf_id;
                if (isLeftChild) {
                    local[i-1].leftChildId = local[i+1].id;
                    local[i-1].leftChildPos = local[i+1].leaf_id;
                } else {
                    local[i-1].rightChildId = local[i+1].id;
                    local[i-1].rightChildPos = local[i+1].leaf_id;
                }
                local[i].data[2] = local[i+1].data[3];
                local[i+1].data[3] = 1+ max(local[i].data[2],local[i].data[3]);
                if (isLeftChild) local[i-1].data[2] = 1+ max(local[i+1].data[2],local[i+1].data[3]);
                else local[i-1].data[3] = 1+ max(local[i+1].data[2],local[i+1].data[3]);
                for (int j = i-2; j >= 0; j--) {
                    if (local[j].leftChildId == local[j+1].id) {
                        local[j].data[2] = 1 + max(local[j+1].data[2], local[j+1].data[3]);
                    } else local[j].data[3] = 1 + max(local[j+1].data[2], local[j+1].data[3]);
                }
                root.id = local[0].id;
                root.leaf_id = local[0].leaf_id;
            } else { //double rotation
               bool isLeftChild = false;
               if (local[i-1].leftChildId == local[i].id) isLeftChild = true;
               local[i].leftChildId = local[i+2].rightChildId;
               local[i].leftChildPos = local[i+2].rightChildPos;
               local[i].data[2] = local[i+2].data[3];
               local[i+1].rightChildId = local[i+2].leftChildId;
               local[i+1].rightChildPos = local[i+2].leftChildPos;
               local[i+1].data[3] = local[i+2].data[2];
               local[i+2].rightChildId = local[i].id;
               local[i+2].rightChildPos = local[i].leaf_id;
               local[i+2].data[3] = 1 + max(local[i].data[2], local[i].data[3]);
               local[i+2].leftChildId = local[i+1].id;
               local[i+2].leftChildPos = local[i+1].leaf_id;
               local[i+2].data[2] = 1 + max(local[i+1].data[2], local[i+1].data[3]);
               if (isLeftChild) {
                   local[i-1].leftChildId = local[i+2].id;
                   local[i-1].leftChildPos = local[i+2].leaf_id;
                   local[i-1].data[2] = 1+ max(local[i+2].data[2],local[i+2].data[3]);
               } else {
                   local[i-1].rightChildId = local[i+2].id;
                   local[i-1].rightChildPos = local[i+2].leaf_id;
                   local[i-1].data[3] = 1+ max(local[i+2].data[2],local[i+2].data[3]);
               }
               for (int j = i-2; j >= 0; j--) {
                   if (local[j].leftChildId == local[j+1].id) {
                       local[j].data[2] = 1 + max(local[j+1].data[2], local[j+1].data[3]);
                   } else local[j].data[3] = 1 + max(local[j+1].data[2], local[j+1].data[3]);
               }
               root.id = local[0].id;
               root.leaf_id = local[0].leaf_id;
           }
        }
        
        
        if (local[i].getBalance() < -1) {
            if (local[i+1].getBalance() <= 0) {
                bool isLeftChild = false;
                if (local[i-1].leftChildId == local[i].id) isLeftChild = true;
                local[i].rightChildId = local[i+1].leftChildId;
                local[i].rightChildPos = local[i+1].leftChildPos;
                local[i+1].leftChildId = local[i].id;
                local[i+1].leftChildPos = local[i].leaf_id;
                if (isLeftChild) {
                    local[i-1].leftChildId = local[i+1].id;
                    local[i-1].leftChildPos = local[i+1].leaf_id;
                } else {
                    local[i-1].rightChildId = local[i+1].id;
                    local[i-1].rightChildPos = local[i+1].leaf_id;
                }
                local[i].data[3] = local[i+1].data[2];
                local[i+1].data[2] = 1+ max(local[i].data[2],local[i].data[3]);
                if (isLeftChild) local[i-1].data[2] = 1+ max(local[i+1].data[2],local[i+1].data[3]);
                else local[i-1].data[3] = 1+ max(local[i+1].data[2],local[i+1].data[3]);
                for (int j = i-2; j >= 0; j--) {
                    if (local[j].leftChildId == local[j+1].id) {
                        local[j].data[2] = 1 + max(local[j+1].data[2], local[j+1].data[3]);
                    } else local[j].data[3] = 1 + max(local[j+1].data[2], local[j+1].data[3]);
                }
                root.id = local[0].id;
                root.leaf_id = local[0].leaf_id;
            } else { //double rotation
                bool isLeftChild = false;
                if (local[i-1].leftChildId == local[i].id) isLeftChild = true;
                local[i].rightChildId = local[i+2].leftChildId;
                local[i].rightChildPos = local[i+2].leftChildPos;
                local[i].data[3] = local[i+2].data[2];
                local[i+1].leftChildId = local[i+2].rightChildId;
                local[i+1].leftChildPos = local[i+2].rightChildPos;
                local[i+1].data[2] = local[i+2].data[3];
                local[i+2].leftChildId = local[i].id;
                local[i+2].leftChildPos = local[i].leaf_id;
                local[i+2].data[2] = 1 + max(local[i].data[2], local[i].data[3]);
                local[i+2].rightChildId = local[i+1].id;
                local[i+2].rightChildPos = local[i+1].leaf_id;
                local[i+2].data[3] = 1 + max(local[i+1].data[2], local[i+1].data[3]);
                if (isLeftChild) {
                    local[i-1].leftChildId = local[i+2].id;
                    local[i-1].leftChildPos = local[i+2].leaf_id;
                    local[i-1].data[2] = 1+ max(local[i+2].data[2],local[i+2].data[3]);
                } else {
                    local[i-1].rightChildId = local[i+2].id;
                    local[i-1].rightChildPos = local[i+2].leaf_id;
                    local[i-1].data[3] = 1+ max(local[i+2].data[2],local[i+2].data[3]);
                }
                for (int j = i-2; j >= 0; j--) {
                    if (local[j].leftChildId == local[j+1].id) {
                        local[j].data[2] = 1 + max(local[j+1].data[2], local[j+1].data[3]);
                    } else local[j].data[3] = 1 + max(local[j+1].data[2], local[j+1].data[3]);
                }
                root.id = local[0].id;
                root.leaf_id = local[0].leaf_id;
            }
        }
    }

    //rotate root
    if (local[0].getBalance() > 1) {
        if (local[1].getBalance() >= 0) {
            local[0].leftChildId = local[1].rightChildId;
            local[0].leftChildPos = local[1].rightChildPos;
            local[1].rightChildId = local[0].id;
            local[1].rightChildPos = local[0].leaf_id;
            local[0].data[2] = local[1].data[3];
            local[1].data[3] = 1+ max(local[0].data[2],local[0].data[3]);
            root.id = local[1].id;
            root.leaf_id = local[1].leaf_id;
        } else { //double rotation
            local[0].leftChildId = local[2].rightChildId;
            local[0].leftChildPos = local[2].rightChildPos;
            local[0].data[2] = local[2].data[3];
            local[1].rightChildId = local[2].leftChildId;
            local[1].rightChildPos = local[2].leftChildPos;
            local[1].data[3] = local[2].data[2];
            local[2].rightChildId = local[0].id;
            local[2].rightChildPos = local[0].leaf_id;
            local[2].data[3] = 1 + max(local[0].data[2], local[0].data[3]);
            local[2].leftChildId = local[1].id;
            local[2].leftChildPos = local[1].leaf_id;
            local[2].data[2] = 1 + max(local[1].data[2], local[1].data[3]);
            root.id = local[2].id;
            root.leaf_id = local[2].leaf_id;
        }
    }
    if (local[0].getBalance() < -1) {
        if (local[1].getBalance() <= 0) {
            local[0].rightChildId = local[1].leftChildId;
            local[0].rightChildPos = local[1].leftChildPos;
            local[1].leftChildId = local[0].id;
            local[1].leftChildPos = local[0].leaf_id;
            local[0].data[3] = local[1].data[2];
            local[1].data[2] = 1+ max(local[0].data[2],local[0].data[3]);
            root.id = local[1].id;
            root.leaf_id = local[1].leaf_id;
        } else { //double rotation
            local[0].rightChildId = local[2].leftChildId;
            local[0].rightChildPos = local[2].leftChildPos;
            local[0].data[3] = local[2].data[2];
            local[1].leftChildId = local[2].rightChildId;
            local[1].leftChildPos = local[2].rightChildPos;
            local[1].data[2] = local[2].data[3];
            local[2].leftChildId = local[0].id;
            local[2].leftChildPos = local[0].leaf_id;
            local[2].data[2] = 1 + max(local[0].data[2], local[0].data[3]);
            local[2].rightChildId = local[1].id;
            local[2].rightChildPos = local[1].leaf_id;
            local[2].data[3] = 1 + max(local[1].data[2], local[1].data[3]);
            root.id = local[2].id;
            root.leaf_id = local[2].leaf_id;
        }
    }
    int l = local.size();
    performDummyFinds(num_levels - l);
    while (!local.empty())
    {
        stash.push_back(local[local.size()-1]);
        local.pop_back();
        evictTwoPaths();
    }
    performDummyEvictions(num_levels - l);
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x48, %rsp
movl %edx, %r14d
movl %esi, %ebp
movq %rdi, %rbx
leaq 0x18(%rsp), %rdi
callq 0x2630
movq 0x10(%rbx), %rdi
movq (%rdi), %rax
callq *(%rax)
movl %eax, 0x20(%rsp)
movq 0x60(%rbx), %rax
movl (%rax), %ecx
leal 0x1(%rcx), %edx
movl %edx, (%rax)
movl %ecx, 0x24(%rsp)
movl %ebp, 0x28(%rsp)
movl %r14d, 0x2c(%rsp)
movq $0x0, 0x30(%rsp)
movl 0x68(%rbx), %edx
cmpl $-0x1, %edx
je 0x44cc
movl 0x6c(%rbx), %esi
movq %rbx, %rdi
callq 0x41e0
leaq 0x48(%rbx), %rax
movq %rax, 0x8(%rsp)
xorl %eax, %eax
movabsq $-0x5555555555555555, %r15 # imm = 0xAAAAAAAAAAAAAAAB
cltq
movq 0x8(%rsp), %rcx
movq (%rcx), %rcx
leaq (%rax,%rax,2), %rdx
shlq $0x4, %rdx
leaq (%rcx,%rdx), %rax
cmpl %ebp, 0x10(%rcx,%rdx)
jge 0x449f
movl 0x2c(%rax), %edx
movl $0x28, %ecx
cmpl $-0x1, %edx
jne 0x44ac
jmp 0x451a
movl 0x24(%rax), %edx
movl $0x20, %ecx
cmpl $-0x1, %edx
je 0x4521
movl (%rax,%rcx), %esi
movq %rbx, %rdi
callq 0x41e0
movq 0x50(%rbx), %rax
subq 0x48(%rbx), %rax
sarq $0x4, %rax
imulq %r15, %rax
decq %rax
jmp 0x4474
leaq 0x30(%rbx), %rdi
leaq 0x18(%rsp), %rsi
callq 0x3124
movl 0x20(%rsp), %eax
movl %eax, 0x6c(%rbx)
movl 0x24(%rsp), %eax
movl %eax, 0x68(%rbx)
movl 0x20(%rbx), %esi
movq %rbx, %rdi
callq 0x4cc0
movq %rbx, %rdi
callq 0x4e18
movl 0x20(%rbx), %ebp
cmpl $0x2, %ebp
jl 0x4c82
decl %ebp
movq %rbx, %rdi
callq 0x4e18
decl %ebp
jne 0x4509
jmp 0x4c82
movl $0x2c, %edx
jmp 0x4526
movl $0x24, %edx
leaq 0x18(%rsp), %rsi
movl 0xc(%rsi), %edi
movl %edi, (%rax,%rdx)
movl 0x8(%rsi), %edx
movl %edx, (%rax,%rcx)
movq 0x8(%rsp), %rdi
callq 0x3124
movq 0x50(%rbx), %rax
subq 0x48(%rbx), %rax
sarq $0x4, %rax
imulq %r15, %rax
cmpl $0x2, %eax
jl 0x45a1
addl $-0x2, %eax
leaq 0x1(%rax), %r14
shlq $0x4, %rax
leaq (%rax,%rax,2), %r12
movq 0x10(%rbx), %rdi
movq (%rdi), %rax
callq *(%rax)
movq 0x8(%rsp), %rcx
movq (%rcx), %rcx
leaq (%rcx,%r12), %rdx
movl %eax, 0x8(%rcx,%r12)
movl 0x24(%rcx,%r12), %eax
movl 0x38(%rcx,%r12), %esi
xorl %edi, %edi
cmpl 0x3c(%rcx,%r12), %eax
setne %dil
movl %esi, 0x20(%rdx,%rdi,8)
addq $-0x30, %r12
decq %r14
jg 0x4565
movq %rbx, %rdi
callq 0x4ec4
movq 0x48(%rbx), %rcx
movq 0x50(%rbx), %rax
movl 0xc(%rcx), %edx
movl %edx, 0x68(%rbx)
movl 0x8(%rcx), %edx
movl %edx, 0x6c(%rbx)
subq %rcx, %rax
sarq $0x4, %rax
imulq %r15, %rax
cmpl $0x4, %eax
jl 0x4a83
movl $0xfffffffd, %ecx       # imm = 0xFFFFFFFD
movl %eax, %r15d
addl %ecx, %r15d
leal -0x5(%rax), %ebp
leal -0x4(%rax), %r12d
leaq (%r15,%r15,2), %r13
shlq $0x4, %r13
movq 0x8(%rsp), %rax
movq (%rax), %rdi
addq %r13, %rdi
callq 0x2a32
movl %ebp, %ecx
shlq $0x4, %rcx
leaq (%rcx,%rcx,2), %rcx
movq %rcx, 0x10(%rsp)
cmpl $0x2, %eax
jl 0x4836
leaq 0x1(%r15), %rax
leaq (%rax,%rax,2), %r14
shlq $0x4, %r14
movq 0x8(%rsp), %rax
movq (%rax), %rdi
addq %r14, %rdi
callq 0x2a32
movq 0x8(%rsp), %rcx
movq (%rcx), %rcx
leaq (%rcx,%r13), %rdx
movl -0xc(%rcx,%r13), %esi
movl 0xc(%rcx,%r13), %edi
testl %eax, %eax
js 0x46ce
xorl %eax, %eax
cmpl %edi, %esi
setne %al
movl 0x2c(%rcx,%r14), %r8d
movl %r8d, 0x24(%rdx)
movl 0x28(%rcx,%r14), %r8d
movl %r8d, 0x20(%rdx)
movl %edi, 0x2c(%rcx,%r14)
movl 0x8(%rdx), %r8d
movl %r8d, 0x28(%rcx,%r14)
movl 0xc(%rcx,%r14), %r8d
shll $0x3, %eax
movq %rax, %r9
orq $-0xc, %r9
orq $-0x10, %rax
movl %r8d, (%rdx,%r9)
movl 0x8(%rcx,%r14), %r8d
movl %r8d, (%rdx,%rax)
movl 0x1c(%rcx,%r14), %eax
movl %eax, 0x18(%rdx)
movl 0x1c(%rdx), %r8d
cmpl %r8d, %eax
cmovgl %eax, %r8d
leal 0x1(%r8), %r9d
movl 0x18(%rcx,%r14), %eax
cmpl %r8d, %eax
cmovlel %r9d, %eax
incl %eax
movl %r9d, 0x1c(%rcx,%r14)
cmpl %edi, %esi
jne 0x4791
movl %eax, -0x18(%rdx)
jmp 0x4794
movl 0x8c(%rcx,%r13), %eax
movl %eax, 0x24(%rdx)
movl 0x88(%rcx,%r13), %eax
movl %eax, 0x20(%rdx)
movl 0x7c(%rcx,%r13), %r9d
movl %r9d, 0x18(%rdx)
movl 0x84(%rcx,%r13), %eax
movl %eax, 0x2c(%rcx,%r14)
movl 0x80(%rcx,%r13), %eax
movl %eax, 0x28(%rcx,%r14)
movl 0x78(%rcx,%r13), %r8d
movl %r8d, 0x1c(%rcx,%r14)
movl %edi, 0x8c(%rcx,%r13)
movl 0x8(%rdx), %eax
movl %eax, 0x88(%rcx,%r13)
movl 0x1c(%rdx), %eax
cmpl %eax, %r9d
jl 0x472f
movl 0x18(%rdx), %eax
leal 0x1(%rax), %r9d
movl %r9d, 0x7c(%rcx,%r13)
movl 0xc(%rcx,%r14), %r9d
movl %r9d, 0x84(%rcx,%r13)
movl 0x8(%rcx,%r14), %r9d
movl %r9d, 0x80(%rcx,%r13)
movl 0x18(%rcx,%r14), %r9d
cmpl %r8d, %r9d
jge 0x4761
movl 0x1c(%rcx,%r14), %r9d
leal 0x1(%r9), %r8d
movl %r8d, 0x78(%rcx,%r13)
movl 0x6c(%rcx,%r13), %r8d
cmpl %edi, %esi
jne 0x47d5
movl %r8d, -0xc(%rdx)
movl 0x68(%rdx), %esi
movl %esi, -0x10(%rdx)
xorl %esi, %esi
cmpl %eax, %r9d
setl %sil
movl 0x78(%rdx,%rsi,4), %eax
incl %eax
movl %eax, -0x18(%rdx)
jmp 0x47ef
movl %eax, -0x14(%rdx)
cmpq $0x2, %r15
jl 0x482a
movq 0x10(%rsp), %rax
addq %rcx, %rax
addq $0x4c, %rax
movl %r12d, %edx
movl -0x4(%rax), %edi
movl (%rax), %esi
cmpl %esi, %edi
cmovgl %edi, %esi
movl -0x28(%rax), %edi
incl %esi
cmpl -0x10(%rax), %edi
jne 0x47c6
movl %esi, -0x34(%rax)
jmp 0x47c9
movl %esi, -0x30(%rax)
decl %edx
addq $-0x30, %rax
testl %edx, %edx
jg 0x47ad
jmp 0x482a
movl %r8d, -0x4(%rdx)
movl 0x68(%rdx), %eax
movl %eax, -0x8(%rdx)
movl 0x78(%rdx), %eax
movl 0x7c(%rdx), %esi
cmpl %esi, %eax
cmovgl %eax, %esi
incl %esi
movl %esi, -0x14(%rdx)
cmpq $0x2, %r15
jl 0x482a
movq 0x10(%rsp), %rax
addq %rcx, %rax
addq $0x4c, %rax
movl %r12d, %edx
movl -0x4(%rax), %edi
movl (%rax), %esi
cmpl %esi, %edi
cmovgl %edi, %esi
movl -0x28(%rax), %edi
incl %esi
cmpl -0x10(%rax), %edi
jne 0x481d
movl %esi, -0x34(%rax)
jmp 0x4820
movl %esi, -0x30(%rax)
decl %edx
addq $-0x30, %rax
testl %edx, %edx
jg 0x4804
movl 0xc(%rcx), %eax
movl %eax, 0x68(%rbx)
movl 0x8(%rcx), %eax
movl %eax, 0x6c(%rbx)
movq 0x8(%rsp), %rax
movq (%rax), %rdi
addq %r13, %rdi
callq 0x2a32
cmpl $-0x2, %eax
jg 0x4a6d
leaq 0x1(%r15), %rax
leaq (%rax,%rax,2), %r14
shlq $0x4, %r14
movq 0x8(%rsp), %rax
movq (%rax), %rdi
addq %r14, %rdi
callq 0x2a32
movq 0x8(%rsp), %rcx
movq (%rcx), %rcx
leaq (%rcx,%r13), %rdx
movl -0xc(%rcx,%r13), %esi
movl 0xc(%rcx,%r13), %edi
testl %eax, %eax
jle 0x4953
movl 0x84(%rcx,%r13), %eax
movl %eax, 0x2c(%rdx)
movl 0x80(%rcx,%r13), %eax
movl %eax, 0x28(%rdx)
movl 0x78(%rcx,%r13), %r9d
movl %r9d, 0x1c(%rdx)
movl 0x8c(%rcx,%r13), %eax
movl %eax, 0x24(%rcx,%r14)
movl 0x88(%rcx,%r13), %eax
movl %eax, 0x20(%rcx,%r14)
movl 0x7c(%rcx,%r13), %r8d
movl %r8d, 0x18(%rcx,%r14)
movl %edi, 0x84(%rcx,%r13)
movl 0x8(%rdx), %eax
movl %eax, 0x80(%rcx,%r13)
movl 0x18(%rdx), %eax
cmpl %r9d, %eax
jge 0x48ea
movl 0x1c(%rdx), %eax
leal 0x1(%rax), %r9d
movl %r9d, 0x78(%rcx,%r13)
movl 0xc(%rcx,%r14), %r9d
movl %r9d, 0x8c(%rcx,%r13)
movl 0x8(%rcx,%r14), %r9d
movl %r9d, 0x88(%rcx,%r13)
movl 0x1c(%rcx,%r14), %r9d
cmpl %r9d, %r8d
jl 0x491c
movl 0x18(%rcx,%r14), %r9d
leal 0x1(%r9), %r8d
movl %r8d, 0x7c(%rcx,%r13)
movl 0x6c(%rcx,%r13), %r8d
cmpl %edi, %esi
jne 0x49cc
movl %r8d, -0xc(%rdx)
movl 0x68(%rdx), %esi
movl %esi, -0x10(%rdx)
xorl %esi, %esi
cmpl %r9d, %eax
setl %sil
movl 0x78(%rdx,%rsi,4), %eax
incl %eax
movl %eax, -0x18(%rdx)
jmp 0x49e6
xorl %eax, %eax
cmpl %edi, %esi
setne %al
movl 0x24(%rcx,%r14), %r8d
movl %r8d, 0x2c(%rdx)
movl 0x20(%rcx,%r14), %r8d
movl %r8d, 0x28(%rdx)
movl %edi, 0x24(%rcx,%r14)
movl 0x8(%rdx), %r8d
movl %r8d, 0x20(%rcx,%r14)
movl 0xc(%rcx,%r14), %r8d
shll $0x3, %eax
movq %rax, %r9
orq $-0xc, %r9
orq $-0x10, %rax
movl %r8d, (%rdx,%r9)
movl 0x8(%rcx,%r14), %r8d
movl %r8d, (%rdx,%rax)
movl 0x18(%rcx,%r14), %r8d
movl %r8d, 0x1c(%rdx)
movl 0x18(%rdx), %eax
cmpl %r8d, %eax
cmovgl %eax, %r8d
incl %r8d
movl 0x1c(%rcx,%r14), %eax
cmpl %eax, %r8d
cmovgl %r8d, %eax
incl %eax
movl %r8d, 0x18(%rcx,%r14)
cmpl %edi, %esi
jne 0x4a23
movl %eax, -0x18(%rdx)
jmp 0x4a26
movl %r8d, -0x4(%rdx)
movl 0x68(%rdx), %eax
movl %eax, -0x8(%rdx)
movl 0x78(%rdx), %eax
movl 0x7c(%rdx), %esi
cmpl %esi, %eax
cmovgl %eax, %esi
incl %esi
movl %esi, -0x14(%rdx)
cmpq $0x2, %r15
jl 0x4a61
movq 0x10(%rsp), %rax
addq %rcx, %rax
addq $0x4c, %rax
movl %r12d, %edx
movl -0x4(%rax), %edi
movl (%rax), %esi
cmpl %esi, %edi
cmovgl %edi, %esi
movl -0x28(%rax), %edi
incl %esi
cmpl -0x10(%rax), %edi
jne 0x4a14
movl %esi, -0x34(%rax)
jmp 0x4a17
movl %esi, -0x30(%rax)
decl %edx
addq $-0x30, %rax
testl %edx, %edx
jg 0x49fb
jmp 0x4a61
movl %eax, -0x14(%rdx)
cmpq $0x2, %r15
jl 0x4a61
movq 0x10(%rsp), %rax
addq %rcx, %rax
addq $0x4c, %rax
movl %r12d, %edx
movl -0x4(%rax), %edi
movl (%rax), %esi
cmpl %esi, %edi
cmovgl %edi, %esi
movl -0x28(%rax), %edi
incl %esi
cmpl -0x10(%rax), %edi
jne 0x4a54
movl %esi, -0x34(%rax)
jmp 0x4a57
movl %esi, -0x30(%rax)
decl %edx
addq $-0x30, %rax
testl %edx, %edx
jg 0x4a3b
movl 0xc(%rcx), %eax
movl %eax, 0x68(%rbx)
movl 0x8(%rcx), %eax
movl %eax, 0x6c(%rbx)
leaq -0x1(%r15), %rax
decl %ebp
decl %r12d
cmpq $0x1, %r15
movq %rax, %r15
jg 0x45e3
movq 0x8(%rsp), %rax
movq (%rax), %rdi
callq 0x2a32
cmpl $0x2, %eax
jl 0x4b4d
movq 0x8(%rsp), %rax
movq (%rax), %rdi
addq $0x30, %rdi
callq 0x2a32
movq 0x8(%rsp), %rcx
movq (%rcx), %rcx
testl %eax, %eax
js 0x4ae5
movq 0x58(%rcx), %rax
movq %rax, 0x20(%rcx)
movq 0x8(%rcx), %rax
movq %rax, 0x58(%rcx)
movl 0x4c(%rcx), %eax
movl %eax, 0x18(%rcx)
movl 0x1c(%rcx), %edx
cmpl %edx, %eax
cmovgl %eax, %edx
incl %edx
movl %edx, 0x4c(%rcx)
movl $0x38, %eax
movl $0x3c, %edx
jmp 0x4b41
movq 0x88(%rcx), %rax
movq %rax, 0x20(%rcx)
movl 0x7c(%rcx), %eax
movl %eax, 0x18(%rcx)
movq 0x80(%rcx), %rdx
movq %rdx, 0x58(%rcx)
movl 0x78(%rcx), %edx
movl %edx, 0x4c(%rcx)
movq 0x8(%rcx), %rsi
movq %rsi, 0x88(%rcx)
movl 0x1c(%rcx), %esi
cmpl %esi, %eax
cmovll %esi, %eax
incl %eax
movl %eax, 0x7c(%rcx)
movq 0x38(%rcx), %rax
movq %rax, 0x80(%rcx)
movl 0x48(%rcx), %eax
cmpl %edx, %eax
cmovll %edx, %eax
incl %eax
movl %eax, 0x78(%rcx)
movl $0x68, %eax
movl $0x6c, %edx
movl (%rcx,%rdx), %edx
movl %edx, 0x68(%rbx)
movl (%rcx,%rax), %eax
movl %eax, 0x6c(%rbx)
movq 0x8(%rsp), %rax
movq (%rax), %rdi
callq 0x2a32
cmpl $-0x2, %eax
jg 0x4c17
movq 0x8(%rsp), %rax
movq (%rax), %rdi
addq $0x30, %rdi
callq 0x2a32
movq 0x8(%rsp), %rcx
movq (%rcx), %rcx
testl %eax, %eax
jle 0x4bde
movq 0x80(%rcx), %rax
movq %rax, 0x28(%rcx)
movl 0x78(%rcx), %eax
movl %eax, 0x1c(%rcx)
movq 0x88(%rcx), %rdx
movq %rdx, 0x50(%rcx)
movl 0x7c(%rcx), %edx
movl %edx, 0x48(%rcx)
movq 0x8(%rcx), %rsi
movq %rsi, 0x80(%rcx)
movl 0x18(%rcx), %esi
cmpl %eax, %esi
cmovll %eax, %esi
incl %esi
movl %esi, 0x78(%rcx)
movq 0x38(%rcx), %rax
movq %rax, 0x88(%rcx)
movl 0x4c(%rcx), %eax
cmpl %eax, %edx
cmovll %eax, %edx
incl %edx
movl %edx, 0x7c(%rcx)
movl $0x68, %eax
movl $0x6c, %edx
jmp 0x4c0b
movq 0x50(%rcx), %rax
movq %rax, 0x28(%rcx)
movq 0x8(%rcx), %rax
movq %rax, 0x50(%rcx)
movl 0x48(%rcx), %eax
movl %eax, 0x1c(%rcx)
movl 0x18(%rcx), %edx
cmpl %eax, %edx
cmovgl %edx, %eax
incl %eax
movl %eax, 0x48(%rcx)
movl $0x38, %eax
movl $0x3c, %edx
movl (%rcx,%rdx), %edx
movl %edx, 0x68(%rbx)
movl (%rcx,%rax), %eax
movl %eax, 0x6c(%rbx)
movq 0x50(%rbx), %rax
subq 0x48(%rbx), %rax
shrq $0x4, %rax
imull $0xaaaaaaab, %eax, %ebp # imm = 0xAAAAAAAB
movl 0x20(%rbx), %esi
subl %ebp, %esi
movq %rbx, %rdi
callq 0x4cc0
leaq 0x30(%rbx), %r14
movq 0x50(%rbx), %rsi
cmpq %rsi, 0x48(%rbx)
je 0x4c6c
addq $-0x30, %rsi
movq %r14, %rdi
callq 0x3124
movq 0x50(%rbx), %rax
leaq -0x30(%rax), %rdi
movq %rdi, 0x50(%rbx)
movq -0x30(%rax), %rax
callq *(%rax)
movq %rbx, %rdi
callq 0x4e18
jmp 0x4c3a
movl 0x20(%rbx), %r14d
subl %ebp, %r14d
jle 0x4c82
movq %rbx, %rdi
callq 0x4e18
decl %r14d
jne 0x4c75
leaq 0x18(%rsp), %rdi
callq 0x264c
addq $0x48, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
jmp 0x4cab
jmp 0x4cab
jmp 0x4cab
jmp 0x4cab
jmp 0x4cab
jmp 0x4cab
jmp 0x4cab
jmp 0x4cab
movq %rax, %rbx
leaq 0x18(%rsp), %rdi
callq 0x264c
movq %rbx, %rdi
callq 0x22a0