// File: /workspace/github_cpp_makefile_star2_O3/zkl94[P]distributed-key-value-store/MP1Node.cpp
// Function: MP1Node::nodeLoopOps()
void MP1Node::nodeLoopOps() {

    // 0. update self heartbeat and tiemstamp
    // 1. Check if any node hasn't responded within a timeout period and then delete the nodes
    // 2. Propagate your membership list to every other member (MEMBERLIST)

    // update self heartbeat
    memberNode->heartbeat++;

    // update the entry of self in self memberlist
    memberNode->memberList[0].setheartbeat(memberNode->heartbeat);
    memberNode->memberList[0].settimestamp(par->getcurrtime());

    memberNode->myPos = memberNode->memberList.begin();
    while (memberNode->myPos != memberNode->memberList.end()) {
        if(isEntryInvalid(memberNode, *memberNode->myPos)) {
            int id = memberNode->myPos->getid();
            short port = memberNode->myPos->getport();
            Address address;
            string _address = to_string(id) + ":" + to_string(port);
            address = Address(_address);

            // cout << "found invalid entry with id " << id <<endl;

            if (this->tobedeleted->count(id) == 0) {
                // may have already added to tobedeleted map
                this->tobedeleted->insert(std::make_pair(id, 0));
            }

            // can't remove it at once although we are using tobedeleted map
            // because we still have to send broadcast to it
            // memberNode->myPos = memberNode->memberList.erase(memberNode->myPos);
        }
        ++memberNode->myPos;
    }

    this->updateToBeDeletedMap();

    // construct MEMBERLIST message
    int entry_num = memberNode->memberList.size();
    int currentOffset = 0; 
    // allocate maximum space possibly needed
    size_t memberListMsgSize = sizeof(MessageHdr) + (6 + sizeof(long)) * entry_num;
    MessageHdr *memberListMsg;
    memberListMsg = (MessageHdr *) malloc(memberListMsgSize * sizeof(char));
    memberListMsg->msgType = MEMBERLIST;
    currentOffset += sizeof(int);

    // send / construct two kinds of messages
    for (MemberListEntry memberListEntry: memberNode->memberList) {
        // if it is to be deleted, don't add it to member list messages
        if (this->tobedeleted->count(memberListEntry.getid()) != 0) {
            continue;
        }

        Address address;
        string _address = to_string(memberListEntry.getid()) + ":" + to_string(memberListEntry.getport());
        address = Address(_address);

        // add to MEMBERLIST
        memcpy((char *)(memberListMsg) + currentOffset, &address.addr, sizeof(address.addr));
        currentOffset += sizeof(address.addr);
        memcpy((char *)(memberListMsg) + currentOffset, &memberListEntry.heartbeat, sizeof(long));
        currentOffset += sizeof(long);
    }


    // Propagate your membership list; it is sent to even nodes (entries) to be deleted
    broadcast++;
    // decide whether broadcast or unicast
    if (broadcast >= BROADCAST_INTERVAL) {
        // broadcast
        for (MemberListEntry memberListEntry: memberNode->memberList) {
            Address address;
            string _address = to_string(memberListEntry.getid()) + ":" + to_string(memberListEntry.getport());
            address = Address(_address);
            emulNet->ENsend(&memberNode->addr, &address, (char *)memberListMsg, currentOffset);
        }
        broadcast = 0;
    } else {
        // unicast
        int member_num = memberNode->memberList.size();
        int index = rand() % member_num;
        Address address;
        string _address = to_string(memberNode->memberList.at(index).getid()) + ":" + to_string(memberNode->memberList.at(index).getport());
        address = Address(_address);
        emulNet->ENsend(&memberNode->addr, &address, (char *)memberListMsg, currentOffset);
    }

    #ifdef DEBUGLOG
        log->LOG(&memberNode->addr, "sent member list message");
    #endif

    free(memberListMsg);

    return;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x148, %rsp            # imm = 0x148
movq %rdi, %r15
movq 0x20(%rdi), %rax
movq 0x18(%rax), %rsi
movq 0x28(%rax), %rdi
incq %rsi
movq %rsi, 0x18(%rax)
callq 0xd0be
movq 0x18(%r15), %rdi
movq 0x20(%r15), %rax
movq 0x28(%rax), %r14
callq 0xd00e
movslq %eax, %rsi
movq %r14, %rdi
callq 0xd0c4
movq 0x20(%r15), %rax
movq 0x28(%rax), %rcx
movq %rcx, 0x40(%rax)
movq 0x20(%r15), %rbx
movq 0x40(%rbx), %rdi
cmpq 0x30(%rbx), %rdi
movq %r15, 0x90(%rsp)
je 0x41a3
callq 0xd0ae
movq %rax, %r14
movq 0x28(%rbx), %rdi
callq 0xd0ae
subq %r14, %rax
cmpq $0x6, %rax
jl 0x4189
movq 0x20(%r15), %rax
movq 0x40(%rax), %rdi
callq 0xd09e
movl %eax, %r14d
movq 0x20(%r15), %rax
movq 0x40(%rax), %rdi
callq 0xd0a2
movl %eax, %r12d
movl %r14d, %r15d
negl %r15d
cmovsl %r14d, %r15d
movl $0x1, %ebp
cmpl $0xa, %r15d
jb 0x3ebf
movl $0x4, %ebp
movl %r15d, %eax
movl $0xd1b71759, %edx       # imm = 0xD1B71759
cmpl $0x63, %eax
jbe 0x3eb8
cmpl $0x3e7, %eax            # imm = 0x3E7
jbe 0x3ebd
cmpl $0x2710, %eax           # imm = 0x2710
jb 0x3ebf
movl %eax, %ecx
imulq %rdx, %rcx
shrq $0x2d, %rcx
addl $0x4, %ebp
cmpl $0x1869f, %eax          # imm = 0x1869F
movl %ecx, %eax
ja 0x3e8a
addl $-0x3, %ebp
jmp 0x3ebf
addl $-0x2, %ebp
jmp 0x3ebf
decl %ebp
movl %r14d, %r13d
shrl $0x1f, %r13d
leal (%rbp,%r13), %esi
leaq 0x80(%rsp), %rax
movq %rax, 0x70(%rsp)
leaq 0x70(%rsp), %rbx
movq %rbx, %rdi
movl $0x2d, %edx
callq 0x32f0
addq 0x70(%rsp), %r13
movq %r13, %rdi
movl %ebp, %esi
movl %r15d, %edx
callq 0x6723
movq %rbx, %rdi
leaq 0x13dab(%rip), %rsi     # 0x17cb1
callq 0x3480
leaq 0x18(%rsp), %rsi
movq %rsi, 0x8(%rsp)
movq (%rax), %rdx
movq %rax, %rcx
addq $0x10, %rcx
cmpq %rcx, %rdx
je 0x3f33
movq %rdx, 0x8(%rsp)
movq (%rcx), %rdx
movq %rdx, 0x18(%rsp)
jmp 0x3f39
movups (%rcx), %xmm0
movups %xmm0, (%rsi)
movq 0x90(%rsp), %r13
movq 0x8(%rax), %rdx
movq %rdx, 0x10(%rsp)
movq %rcx, (%rax)
movq $0x0, 0x8(%rax)
movb $0x0, 0x10(%rax)
movswl %r12w, %ebx
movl %ebx, %ebp
negl %ebp
cmovsl %ebx, %ebp
movl $0x1, %r15d
cmpl $0xa, %ebp
jb 0x3f98
movl $0x2, %r15d
cmpl $0x64, %ebp
jb 0x3f98
movl $0x3, %r15d
cmpl $0x3e8, %ebp            # imm = 0x3E8
jb 0x3f98
cmpl $0x2710, %ebp           # imm = 0x2710
movl $0x5, %r15d
sbbl $0x0, %r15d
shrl $0x1f, %ebx
leal (%r15,%rbx), %esi
leaq 0x58(%rsp), %r12
movq %r12, 0x48(%rsp)
leaq 0x48(%rsp), %rdi
movl $0x2d, %edx
callq 0x32f0
movl %ebx, %edi
addq 0x48(%rsp), %rdi
movl %r15d, %esi
movl %ebp, %edx
callq 0x6723
movq 0x8(%rsp), %rcx
movl $0xf, %edi
leaq 0x18(%rsp), %r15
cmpq %r15, %rcx
je 0x3fe2
movq 0x18(%rsp), %rdi
movq 0x10(%rsp), %r8
movq 0x48(%rsp), %rsi
movq 0x50(%rsp), %rdx
leaq (%rdx,%r8), %rax
cmpq %rdi, %rax
leaq 0x38(%rsp), %rbx
leaq 0x8(%rsp), %rbp
jbe 0x4018
movl $0xf, %edi
cmpq %r12, %rsi
je 0x4013
movq 0x58(%rsp), %rdi
cmpq %rdi, %rax
jbe 0x4022
movq %rbp, %rdi
callq 0x30d0
jmp 0x4030
leaq 0x48(%rsp), %rdi
xorl %esi, %esi
xorl %edx, %edx
callq 0x32c0
movq %rbx, 0x28(%rsp)
movq (%rax), %rdx
leaq 0x10(%rax), %rcx
cmpq %rcx, %rdx
je 0x4050
movq %rdx, 0x28(%rsp)
movq (%rcx), %rdx
movq %rdx, 0x38(%rsp)
jmp 0x4056
movups (%rcx), %xmm0
movups %xmm0, (%rbx)
movq %rax, %rdx
addq $0x8, %rdx
movq 0x8(%rax), %rsi
movq %rsi, 0x30(%rsp)
movq %rcx, (%rax)
movq $0x0, (%rdx)
movb $0x0, (%rcx)
movq 0x48(%rsp), %rdi
cmpq %r12, %rdi
je 0x408a
movq 0x58(%rsp), %rsi
incq %rsi
callq 0x3280
movq 0x8(%rsp), %rdi
cmpq %r15, %rdi
leaq 0x128(%rsp), %r12
je 0x40a9
movq 0x18(%rsp), %rsi
incq %rsi
callq 0x3280
movq 0x70(%rsp), %rdi
leaq 0x80(%rsp), %rax
cmpq %rax, %rdi
leaq 0x138(%rsp), %r15
je 0x40d3
movq 0x80(%rsp), %rsi
incq %rsi
callq 0x3280
movq %r15, 0x128(%rsp)
movq 0x28(%rsp), %rsi
movq 0x30(%rsp), %rdx
addq %rsi, %rdx
movq %r12, %rdi
callq 0x6790
movq %rbp, %rdi
movq %r12, %rsi
callq 0x62c6
leaq 0xb0(%rsp), %rdi
movq %rbp, %rsi
callq 0xd02a
movq 0x128(%rsp), %rdi
cmpq %r15, %rdi
je 0x4128
movq 0x138(%rsp), %rsi
incq %rsi
callq 0x3280
movq %r13, %r15
movq 0x38(%r13), %rdi
movq 0x10(%rdi), %rax
testq %rax, %rax
je 0x4162
leaq 0x8(%rdi), %rdx
movq %rdx, %rcx
xorl %esi, %esi
cmpl %r14d, 0x20(%rax)
setl %sil
cmovgeq %rax, %rcx
movq 0x10(%rax,%rsi,8), %rax
testq %rax, %rax
jne 0x413f
cmpq %rdx, %rcx
je 0x4162
cmpl 0x20(%rcx), %r14d
jge 0x4172
movl %r14d, %eax
movq %rax, 0x8(%rsp)
movq %rbp, %rsi
callq 0x6b14
movq 0x28(%rsp), %rdi
cmpq %rbx, %rdi
je 0x4189
movq 0x38(%rsp), %rsi
incq %rsi
callq 0x3280
movq 0x20(%r15), %rbx
movq 0x40(%rbx), %rdi
addq $0x18, %rdi
movq %rdi, 0x40(%rbx)
cmpq 0x30(%rbx), %rdi
jne 0x3e2a
movq %r15, %rdi
callq 0x5dec
movq 0x20(%r15), %rax
movq 0x28(%rax), %r15
movq 0x30(%rax), %rbx
movq %rbx, %rax
subq %r15, %rax
shrq $0x3, %rax
imull $0xaaaaaaab, %eax, %eax # imm = 0xAAAAAAAB
movslq %eax, %rdi
leaq (%rdi,%rdi), %rax
shlq $0x4, %rdi
subq %rax, %rdi
addq $0x4, %rdi
callq 0x3350
movq %rax, 0xa0(%rsp)
movl $0x2, (%rax)
movq %rbx, 0xa8(%rsp)
movl $0x4, %ebp
cmpq %r15, %rbx
je 0x45bc
leaq 0xc8(%rsp), %r12
movq %r12, %rbx
leaq 0xb0(%rsp), %r12
movq %r12, %rdi
movq %r15, %rsi
callq 0xd068
movq 0x90(%rsp), %rax
movq 0x38(%rax), %r14
movq %r12, %rdi
callq 0xd09e
movq 0x10(%r14), %rcx
testq %rcx, %rcx
je 0x4265
addq $0x8, %r14
movq %r14, %rdx
xorl %esi, %esi
cmpl %eax, 0x20(%rcx)
setl %sil
cmovgeq %rcx, %rdx
movq 0x10(%rcx,%rsi,8), %rcx
testq %rcx, %rcx
jne 0x4244
cmpq %r14, %rdx
je 0x4265
cmpl 0x20(%rdx), %eax
jge 0x42c8
movl %ebp, 0x6c(%rsp)
leaq 0xb0(%rsp), %rdi
callq 0xd09e
movl %eax, %r14d
movl %eax, %ebp
negl %ebp
cmovsl %eax, %ebp
movl $0x1, %r13d
cmpl $0xa, %ebp
jb 0x42d9
movl $0x4, %r13d
movl %ebp, %eax
movl $0xd1b71759, %edx       # imm = 0xD1B71759
cmpl $0x63, %eax
jbe 0x42d0
cmpl $0x3e7, %eax            # imm = 0x3E7
jbe 0x42d6
cmpl $0x2710, %eax           # imm = 0x2710
jb 0x42d9
movl %eax, %ecx
imulq %rdx, %rcx
shrq $0x2d, %rcx
addl $0x4, %r13d
cmpl $0x1869f, %eax          # imm = 0x1869F
movl %ecx, %eax
ja 0x4298
addl $-0x3, %r13d
jmp 0x42d9
movq %rbx, %r12
jmp 0x45aa
addl $-0x2, %r13d
jmp 0x42d9
decl %r13d
shrl $0x1f, %r14d
leal (%r14,%r13), %esi
leaq 0x80(%rsp), %rax
movq %rax, 0x70(%rsp)
leaq 0x70(%rsp), %r12
movq %r12, %rdi
movl $0x2d, %edx
callq 0x32f0
addq 0x70(%rsp), %r14
movq %r14, %rdi
movl %r13d, %esi
movl %ebp, %edx
callq 0x6723
movq %r12, %rdi
leaq 0x13995(%rip), %rsi     # 0x17cb1
callq 0x3480
leaq 0x18(%rsp), %rsi
movq %rsi, 0x8(%rsp)
movq (%rax), %rdx
movq %rax, %rcx
addq $0x10, %rcx
cmpq %rcx, %rdx
movq %rbx, %r12
je 0x434c
movq %rdx, 0x8(%rsp)
movq (%rcx), %rdx
movq %rdx, 0x18(%rsp)
jmp 0x4352
movups (%rcx), %xmm0
movups %xmm0, (%rsi)
movq 0x8(%rax), %rdx
movq %rdx, 0x10(%rsp)
movq %rcx, (%rax)
movq $0x0, 0x8(%rax)
movb $0x0, 0x10(%rax)
leaq 0xb0(%rsp), %rdi
callq 0xd0a2
movswl %ax, %r13d
movl %r13d, %ebp
negl %ebp
cmovsl %r13d, %ebp
movl $0x1, %r14d
cmpl $0xa, %ebp
jb 0x43b8
movl $0x2, %r14d
cmpl $0x64, %ebp
jb 0x43b8
movl $0x3, %r14d
cmpl $0x3e8, %ebp            # imm = 0x3E8
jb 0x43b8
cmpl $0x2710, %ebp           # imm = 0x2710
movl $0x5, %r14d
sbbl $0x0, %r14d
shrl $0x1f, %r13d
leal (%r14,%r13), %esi
leaq 0x58(%rsp), %rax
movq %rax, 0x48(%rsp)
leaq 0x48(%rsp), %rdi
movl $0x2d, %edx
callq 0x32f0
movl %r13d, %edi
addq 0x48(%rsp), %rdi
movl %r14d, %esi
movl %ebp, %edx
callq 0x6723
movq 0x8(%rsp), %rcx
movl $0xf, %edi
leaq 0x18(%rsp), %rax
cmpq %rax, %rcx
je 0x4404
movq 0x18(%rsp), %rdi
movq 0x10(%rsp), %r8
movq 0x48(%rsp), %rsi
movq 0x50(%rsp), %rdx
leaq (%rdx,%r8), %rax
cmpq %rdi, %rax
movl 0x6c(%rsp), %ebp
leaq 0x38(%rsp), %rbx
leaq 0x8(%rsp), %r14
jbe 0x4443
movl $0xf, %edi
leaq 0x58(%rsp), %r9
cmpq %r9, %rsi
je 0x443e
movq 0x58(%rsp), %rdi
cmpq %rdi, %rax
jbe 0x444d
movq %r14, %rdi
callq 0x30d0
jmp 0x445b
leaq 0x48(%rsp), %rdi
xorl %esi, %esi
xorl %edx, %edx
callq 0x32c0
movq %rbx, 0x28(%rsp)
movq (%rax), %rdx
leaq 0x10(%rax), %rcx
cmpq %rcx, %rdx
je 0x447b
movq %rdx, 0x28(%rsp)
movq (%rcx), %rdx
movq %rdx, 0x38(%rsp)
jmp 0x4481
movups (%rcx), %xmm0
movups %xmm0, (%rbx)
movq %rax, %rdx
addq $0x8, %rdx
movq 0x8(%rax), %rsi
movq %rsi, 0x30(%rsp)
movq %rcx, (%rax)
movq $0x0, (%rdx)
movb $0x0, (%rcx)
movq 0x48(%rsp), %rdi
leaq 0x58(%rsp), %rax
cmpq %rax, %rdi
je 0x44ba
movq 0x58(%rsp), %rsi
incq %rsi
callq 0x3280
movq 0x8(%rsp), %rdi
leaq 0x18(%rsp), %rax
cmpq %rax, %rdi
je 0x44d6
movq 0x18(%rsp), %rsi
incq %rsi
callq 0x3280
movq 0x70(%rsp), %rdi
leaq 0x80(%rsp), %rax
cmpq %rax, %rdi
je 0x44f8
movq 0x80(%rsp), %rsi
incq %rsi
callq 0x3280
leaq 0xd8(%rsp), %rax
movq %rax, 0xc8(%rsp)
movq 0x28(%rsp), %rsi
movq 0x30(%rsp), %rdx
addq %rsi, %rdx
movq %r12, %rdi
callq 0x6790
movq %r14, %rdi
movq %r12, %rsi
callq 0x62c6
leaq 0x9a(%rsp), %rdi
movq %r14, %rsi
callq 0xd02a
movq 0xc8(%rsp), %rdi
leaq 0xd8(%rsp), %rax
cmpq %rax, %rdi
je 0x455d
movq 0xd8(%rsp), %rsi
incq %rsi
callq 0x3280
movslq %ebp, %rax
movzwl 0x9e(%rsp), %ecx
movq 0xa0(%rsp), %rdx
movw %cx, 0x4(%rdx,%rax)
movl 0x9a(%rsp), %ecx
movl %ecx, (%rdx,%rax)
addl $0x6, %eax
cltq
movq 0xb8(%rsp), %rcx
movq %rcx, (%rdx,%rax)
movq 0x28(%rsp), %rdi
cmpq %rbx, %rdi
je 0x45a7
movq 0x38(%rsp), %rsi
incq %rsi
callq 0x3280
addl $0xe, %ebp
addq $0x18, %r15
cmpq 0xa8(%rsp), %r15
jne 0x420a
movq 0x90(%rsp), %r14
movl 0x30(%r14), %ecx
leal 0x1(%rcx), %eax
movl %eax, 0x30(%r14)
movq 0x20(%r14), %rax
cmpl $0x2, %ecx
jle 0x4965
movq 0x28(%rax), %r15
movq 0x30(%rax), %rax
movq %rax, 0xa8(%rsp)
cmpq %rax, %r15
je 0x4951
leaq 0x8(%rsp), %r12
movl %ebp, 0x6c(%rsp)
leaq 0xb0(%rsp), %r14
movq %r14, %rdi
movq %r15, %rsi
callq 0xd068
movq %r14, %rdi
callq 0xd09e
movl %eax, %r14d
movl %eax, %ebp
negl %ebp
cmovsl %eax, %ebp
movl $0x1, %r13d
cmpl $0xa, %ebp
jb 0x4674
movl $0x4, %r13d
movl %ebp, %eax
movl $0xd1b71759, %edx       # imm = 0xD1B71759
cmpl $0x63, %eax
jbe 0x466b
cmpl $0x3e7, %eax            # imm = 0x3E7
jbe 0x4671
cmpl $0x2710, %eax           # imm = 0x2710
jb 0x4674
movl %eax, %ecx
imulq %rdx, %rcx
shrq $0x2d, %rcx
addl $0x4, %r13d
cmpl $0x1869f, %eax          # imm = 0x1869F
movl %ecx, %eax
ja 0x463b
addl $-0x3, %r13d
jmp 0x4674
addl $-0x2, %r13d
jmp 0x4674
decl %r13d
movq %r12, %rbx
shrl $0x1f, %r14d
leal (%r14,%r13), %esi
leaq 0x80(%rsp), %rax
movq %rax, 0x70(%rsp)
leaq 0x70(%rsp), %r12
movq %r12, %rdi
movl $0x2d, %edx
callq 0x32f0
addq 0x70(%rsp), %r14
movq %r14, %rdi
movl %r13d, %esi
movl %ebp, %edx
callq 0x6723
movq %r12, %rdi
leaq 0x135f7(%rip), %rsi     # 0x17cb1
callq 0x3480
leaq 0x18(%rsp), %rsi
movq %rsi, 0x8(%rsp)
movq (%rax), %rdx
movq %rax, %rcx
addq $0x10, %rcx
cmpq %rcx, %rdx
je 0x46e7
movq %rdx, 0x8(%rsp)
movq (%rcx), %rdx
movq %rdx, 0x18(%rsp)
jmp 0x46ed
movups (%rcx), %xmm0
movups %xmm0, (%rsi)
movq %rbx, %r12
movq 0x8(%rax), %rdx
movq %rdx, 0x10(%rsp)
movq %rcx, (%rax)
movq $0x0, 0x8(%rax)
movb $0x0, 0x10(%rax)
leaq 0xb0(%rsp), %rdi
callq 0xd0a2
movswl %ax, %r13d
movl %r13d, %ebp
negl %ebp
cmovsl %r13d, %ebp
movl $0x1, %r14d
cmpl $0xa, %ebp
jb 0x4756
movl $0x2, %r14d
cmpl $0x64, %ebp
jb 0x4756
movl $0x3, %r14d
cmpl $0x3e8, %ebp            # imm = 0x3E8
jb 0x4756
cmpl $0x2710, %ebp           # imm = 0x2710
movl $0x5, %r14d
sbbl $0x0, %r14d
shrl $0x1f, %r13d
leal (%r14,%r13), %esi
leaq 0x58(%rsp), %rax
movq %rax, 0x48(%rsp)
leaq 0x48(%rsp), %rdi
movl $0x2d, %edx
callq 0x32f0
movl %r13d, %edi
addq 0x48(%rsp), %rdi
movl %r14d, %esi
movl %ebp, %edx
callq 0x6723
movq 0x8(%rsp), %rcx
movl $0xf, %edi
leaq 0x18(%rsp), %rax
cmpq %rax, %rcx
je 0x47a2
movq 0x18(%rsp), %rdi
movq 0x10(%rsp), %r8
movq 0x48(%rsp), %rsi
movq 0x50(%rsp), %rdx
leaq (%rdx,%r8), %rax
cmpq %rdi, %rax
movl 0x6c(%rsp), %ebp
leaq 0x38(%rsp), %rbx
leaq 0x118(%rsp), %r14
jbe 0x47e4
movl $0xf, %edi
leaq 0x58(%rsp), %r9
cmpq %r9, %rsi
je 0x47df
movq 0x58(%rsp), %rdi
cmpq %rdi, %rax
jbe 0x47ee
movq %r12, %rdi
callq 0x30d0
jmp 0x47fc
leaq 0x48(%rsp), %rdi
xorl %esi, %esi
xorl %edx, %edx
callq 0x32c0
movq %rbx, 0x28(%rsp)
movq (%rax), %rdx
leaq 0x10(%rax), %rcx
cmpq %rcx, %rdx
je 0x481c
movq %rdx, 0x28(%rsp)
movq (%rcx), %rdx
movq %rdx, 0x38(%rsp)
jmp 0x4822
movups (%rcx), %xmm0
movups %xmm0, (%rbx)
movq %rax, %rdx
addq $0x8, %rdx
movq 0x8(%rax), %rsi
movq %rsi, 0x30(%rsp)
movq %rcx, (%rax)
movq $0x0, (%rdx)
movb $0x0, (%rcx)
movq 0x48(%rsp), %rdi
leaq 0x58(%rsp), %rax
cmpq %rax, %rdi
je 0x485b
movq 0x58(%rsp), %rsi
incq %rsi
callq 0x3280
movq 0x8(%rsp), %rdi
leaq 0x18(%rsp), %rax
cmpq %rax, %rdi
je 0x4877
movq 0x18(%rsp), %rsi
incq %rsi
callq 0x3280
movq %r12, %r13
movq 0x70(%rsp), %rdi
leaq 0x80(%rsp), %rax
cmpq %rax, %rdi
je 0x489c
movq 0x80(%rsp), %rsi
incq %rsi
callq 0x3280
movq %r14, 0x108(%rsp)
movq 0x28(%rsp), %rsi
movq 0x30(%rsp), %rdx
addq %rsi, %rdx
leaq 0x108(%rsp), %r12
movq %r12, %rdi
callq 0x6790
movq %r13, %rdi
movq %r12, %rsi
movq %r13, %r12
callq 0x62c6
leaq 0x9a(%rsp), %rdi
movq %r12, %rsi
callq 0xd02a
movq 0x108(%rsp), %rdi
cmpq %r14, %rdi
je 0x48fc
movq 0x118(%rsp), %rsi
incq %rsi
callq 0x3280
movq 0x90(%rsp), %rax
movq 0x8(%rax), %rdi
movq 0x20(%rax), %rsi
addq $0x8, %rsi
leaq 0x9a(%rsp), %rdx
movq 0xa0(%rsp), %rcx
movl %ebp, %r8d
callq 0x6e4c
movq 0x28(%rsp), %rdi
cmpq %rbx, %rdi
je 0x493f
movq 0x38(%rsp), %rsi
incq %rsi
callq 0x3280
addq $0x18, %r15
cmpq 0xa8(%rsp), %r15
jne 0x45fe
movq 0x90(%rsp), %rax
movl $0x0, 0x30(%rax)
jmp 0x4cf3
movq 0x30(%rax), %rcx
subq 0x28(%rax), %rcx
shrq $0x3, %rcx
imull $0xaaaaaaab, %ecx, %ebx # imm = 0xAAAAAAAB
callq 0x30a0
cltd
idivl %ebx
movq 0x20(%r14), %rcx
movslq %edx, %r15
movq 0x28(%rcx), %rax
movq 0x30(%rcx), %rdx
subq %rax, %rdx
sarq $0x3, %rdx
movabsq $-0x5555555555555555, %rcx # imm = 0xAAAAAAAAAAAAAAAB
imulq %rcx, %rdx
cmpq %r15, %rdx
jbe 0x4d12
leaq (%r15,%r15,2), %rbx
leaq (%rax,%rbx,8), %rdi
callq 0xd09e
movl %eax, %r13d
movl %eax, %r12d
negl %r12d
cmovsl %eax, %r12d
movl $0x1, %r14d
cmpl $0xa, %r12d
jb 0x4a1c
movl $0x4, %r14d
movl $0xd1b71759, %eax       # imm = 0xD1B71759
movl %r12d, %ecx
cmpl $0x63, %ecx
jbe 0x4a13
cmpl $0x3e7, %ecx            # imm = 0x3E7
jbe 0x4a19
cmpl $0x2710, %ecx           # imm = 0x2710
jb 0x4a1c
movl %ecx, %edx
imulq %rax, %rdx
shrq $0x2d, %rdx
addl $0x4, %r14d
cmpl $0x1869f, %ecx          # imm = 0x1869F
movl %edx, %ecx
ja 0x49e0
addl $-0x3, %r14d
jmp 0x4a1c
addl $-0x2, %r14d
jmp 0x4a1c
decl %r14d
movl %ebp, 0x6c(%rsp)
shrl $0x1f, %r13d
leal (%r14,%r13), %esi
leaq 0x80(%rsp), %rax
movq %rax, -0x10(%rax)
leaq 0x70(%rsp), %rbp
movq %rbp, %rdi
movl $0x2d, %edx
callq 0x32f0
addq (%rbp), %r13
movq %r13, %rdi
movl %r14d, %esi
movl %r12d, %edx
callq 0x6723
leaq 0x13252(%rip), %rsi     # 0x17cb1
movq %rbp, %rdi
callq 0x3480
leaq 0x18(%rsp), %r12
movq %r12, -0x10(%r12)
movq (%rax), %rdx
movq %rax, %rcx
addq $0x10, %rcx
cmpq %rcx, %rdx
movq 0x90(%rsp), %r13
je 0x4a97
movq %rdx, 0x8(%rsp)
movq (%rcx), %rdx
movq %rdx, 0x18(%rsp)
jmp 0x4a9f
movups (%rcx), %xmm0
movups %xmm0, (%r12)
movq 0x8(%rax), %rdx
movq %rdx, 0x10(%rsp)
movq %rcx, (%rax)
movq $0x0, 0x8(%rax)
movb $0x0, 0x10(%rax)
movq 0x20(%r13), %rcx
movq 0x28(%rcx), %rax
movq 0x30(%rcx), %rdx
subq %rax, %rdx
sarq $0x3, %rdx
movabsq $-0x5555555555555555, %rcx # imm = 0xAAAAAAAAAAAAAAAB
imulq %rcx, %rdx
cmpq %r15, %rdx
jbe 0x4d23
leaq (%rax,%rbx,8), %rdi
callq 0xd0a2
movswl %ax, %ebx
movl %ebx, %ebp
negl %ebp
cmovsl %ebx, %ebp
movl $0x1, %r14d
cmpl $0xa, %ebp
jb 0x4b28
movl $0x2, %r14d
cmpl $0x64, %ebp
jb 0x4b28
movl $0x3, %r14d
cmpl $0x3e8, %ebp            # imm = 0x3E8
jb 0x4b28
cmpl $0x2710, %ebp           # imm = 0x2710
movl $0x5, %r14d
sbbl $0x0, %r14d
shrl $0x1f, %ebx
leal (%r14,%rbx), %esi
leaq 0x58(%rsp), %r15
movq %r15, -0x10(%r15)
leaq 0x48(%rsp), %rdi
movl $0x2d, %edx
callq 0x32f0
movl %ebx, %edi
addq 0x48(%rsp), %rdi
movl %r14d, %esi
movl %ebp, %edx
callq 0x6723
movq 0x8(%rsp), %rcx
movq 0x10(%rsp), %r8
movq 0x50(%rsp), %rdx
leaq (%rdx,%r8), %rax
movl $0xf, %edi
cmpq %r12, %rcx
je 0x4b7a
movq 0x18(%rsp), %rdi
movq 0x48(%rsp), %rsi
cmpq %rdi, %rax
movl 0x6c(%rsp), %ebp
jbe 0x4b9c
movl $0xf, %edi
cmpq %r15, %rsi
je 0x4b97
movq 0x58(%rsp), %rdi
cmpq %rdi, %rax
jbe 0x4ba8
leaq 0x8(%rsp), %rdi
callq 0x30d0
jmp 0x4bb6
leaq 0x48(%rsp), %rdi
xorl %esi, %esi
xorl %edx, %edx
callq 0x32c0
leaq 0x38(%rsp), %rdx
movq %rdx, -0x10(%rdx)
movq (%rax), %rsi
leaq 0x10(%rax), %rcx
cmpq %rcx, %rsi
je 0x4bda
movq %rsi, 0x28(%rsp)
movq (%rcx), %rdx
movq %rdx, 0x38(%rsp)
jmp 0x4be0
movups (%rcx), %xmm0
movups %xmm0, (%rdx)
movq %rax, %rdx
addq $0x8, %rdx
movq 0x8(%rax), %rsi
movq %rsi, 0x30(%rsp)
movq %rcx, (%rax)
movq $0x0, (%rdx)
movb $0x0, (%rcx)
movq 0x48(%rsp), %rdi
cmpq %r15, %rdi
je 0x4c14
movq 0x58(%rsp), %rsi
incq %rsi
callq 0x3280
movq 0x8(%rsp), %rdi
cmpq %r12, %rdi
je 0x4c2b
movq 0x18(%rsp), %rsi
incq %rsi
callq 0x3280
movq 0x70(%rsp), %rdi
leaq 0x80(%rsp), %rax
cmpq %rax, %rdi
je 0x4c4d
movq 0x80(%rsp), %rsi
incq %rsi
callq 0x3280
leaq 0xf8(%rsp), %rbx
movq %rbx, -0x10(%rbx)
movq 0x28(%rsp), %rsi
movq 0x30(%rsp), %rdx
addq %rsi, %rdx
leaq 0xe8(%rsp), %rdi
callq 0x6790
leaq 0x8(%rsp), %rdi
leaq 0xe8(%rsp), %rsi
callq 0x62c6
leaq 0xb0(%rsp), %rdi
leaq 0x8(%rsp), %rsi
callq 0xd02a
movq 0xe8(%rsp), %rdi
cmpq %rbx, %rdi
je 0x4cb4
movq 0xf8(%rsp), %rsi
incq %rsi
callq 0x3280
movq 0x8(%r13), %rdi
movq 0x20(%r13), %rsi
addq $0x8, %rsi
leaq 0xb0(%rsp), %rdx
movq 0xa0(%rsp), %rcx
movl %ebp, %r8d
callq 0x6e4c
leaq 0x38(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x4cf3
movq 0x38(%rsp), %rsi
incq %rsi
callq 0x3280
movq 0xa0(%rsp), %rdi
callq 0x3320
addq $0x148, %rsp            # imm = 0x148
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
leaq 0x123d2(%rip), %rdi     # 0x170eb
movq %r15, %rsi
xorl %eax, %eax
callq 0x33c0
leaq 0x123c1(%rip), %rdi     # 0x170eb
movq %r15, %rsi
xorl %eax, %eax
callq 0x33c0
jmp 0x4d36
movq %rax, %r14
jmp 0x4d79
movq %rax, %r14
movq 0x48(%rsp), %rdi
cmpq %r15, %rdi
je 0x4d8a
movq 0x58(%rsp), %rsi
incq %rsi
callq 0x3280
jmp 0x4d8a
jmp 0x4dca
movq %rax, %r14
movq 0xe8(%rsp), %rdi
cmpq %rbx, %rdi
je 0x4d79
movq 0xf8(%rsp), %rsi
incq %rsi
callq 0x3280
leaq 0x38(%rsp), %rax
movq -0x10(%rax), %rdi
jmp 0x4e62
movq %rax, %r14
movq 0x8(%rsp), %rdi
cmpq %r12, %rdi
jne 0x4e80
jmp 0x4e8d
jmp 0x4dc2
jmp 0x4dca
jmp 0x4dd2
jmp 0x4dc2
jmp 0x4dc2
jmp 0x4e6e
jmp 0x4dc2
jmp 0x4dca
movq %rax, %r14
movq 0x48(%rsp), %rdi
cmpq %r12, %rdi
jne 0x4de8
jmp 0x4e71
movq %rax, %r14
jmp 0x4e58
movq %rax, %r14
jmp 0x4e8d
movq %rax, %r14
movq 0x48(%rsp), %rdi
leaq 0x58(%rsp), %rax
cmpq %rax, %rdi
je 0x4e71
movq 0x58(%rsp), %rsi
incq %rsi
callq 0x3280
jmp 0x4e71
jmp 0x4e6e
movq %r14, %rcx
movq %rax, %r14
movq 0x108(%rsp), %rdi
cmpq %rcx, %rdi
je 0x4e58
movq 0x118(%rsp), %rsi
jmp 0x4e50
movq %rax, %r14
movq 0x128(%rsp), %rdi
cmpq %r15, %rdi
je 0x4e58
movq 0x138(%rsp), %rsi
jmp 0x4e50
movq %rax, %r14
movq 0xc8(%rsp), %rdi
leaq 0xd8(%rsp), %rax
cmpq %rax, %rdi
je 0x4e58
movq 0xd8(%rsp), %rsi
incq %rsi
callq 0x3280
movq 0x28(%rsp), %rdi
leaq 0x38(%rsp), %rax
cmpq %rax, %rdi
je 0x4eaf
movq 0x38(%rsp), %rsi
jmp 0x4ea7
movq %rax, %r14
movq 0x8(%rsp), %rdi
leaq 0x18(%rsp), %rax
cmpq %rax, %rdi
je 0x4e8d
movq 0x18(%rsp), %rsi
incq %rsi
callq 0x3280
movq 0x70(%rsp), %rdi
leaq 0x80(%rsp), %rax
cmpq %rax, %rdi
je 0x4eaf
movq 0x80(%rsp), %rsi
incq %rsi
callq 0x3280
movq %r14, %rdi
callq 0x3450
nop