LLM4Binary/decompile-bench-makefile huggingface dataset:
// File: /workspace/github_cpp_makefile_star2_O1/kingufl[P]Rmapper/src/buildgraph.cpp
// Function: extract_one_bilabel(int, int, int, int, std::vector<int, std::allocator<int>>&, std::vector<int, std::allocator<int>>&, int, int, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, int)
bilabel extract_one_bilabel(int index, int kmer_size, int dsize, int start_locus, vector<int>& temp, vector<int>& temp_sum, int orientation, int chromosome, string rmapname,int rmap_id){

    bilabel tembi;
    int locus=start_locus;

    int i=index;
    tembi.kmer_size=kmer_size;
    tembi.rmap_from=rmapname;
    tembi.rmap_id=rmap_id;
    tembi.i_rmap=i;
    tembi.chromosome=chromosome;
    tembi.locus=locus;
    tembi.orientation=orientation;

    int k1_end=i+kmer_size-1;
    int p_rmap=k1_end+1;
    int q_rmap=p_rmap;


    if(i>0)
        tembi.sums[0]=temp_sum[k1_end]-temp_sum[i-1];
    else
        tembi.sums[0]=temp_sum[k1_end];

    while(temp_sum[q_rmap]-temp_sum[k1_end]<dsize){
        q_rmap++;
        if(q_rmap+kmer_size>=temp.size()){
            tembi.kmer_size=-1;
            return(tembi);
        }

    }

    tembi.sums[1]=temp_sum[q_rmap]-temp_sum[k1_end];
    tembi.q_rmap=q_rmap;
    tembi.sums[2]=temp_sum[q_rmap+kmer_size]-temp_sum[q_rmap];

    return(tembi);


}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movq %r9, -0x30(%rbp)
movl %r8d, %r15d
movl %ecx, %r14d
movl %edx, %r12d
movl %esi, %r13d
movq %rdi, %rbx
movq 0x28(%rbp), %rsi
addq $0x10, %rdi
leaq 0x20(%rbx), %rax
movq %rax, 0x10(%rbx)
xorl %eax, %eax
movq %rax, 0x18(%rbx)
movb $0x0, 0x20(%rbx)
xorps %xmm0, %xmm0
movups %xmm0, 0x48(%rbx)
movq %rax, 0x58(%rbx)
movl %edx, (%rbx)
callq 0x3110
movl 0x30(%rbp), %eax
movl 0x20(%rbp), %edx
movl 0x18(%rbp), %esi
movq 0x10(%rbp), %rcx
movl %eax, 0x30(%rbx)
movl %r13d, 0x34(%rbx)
movl %edx, 0xc(%rbx)
movl %r15d, 0x4(%rbx)
movl %esi, 0x8(%rbx)
leal (%r12,%r13), %eax
leal -0x1(%r12,%r13), %edx
movslq %eax, %r9
movq (%rcx), %rdi
movl -0x4(%rdi,%r9,4), %esi
testl %r13d, %r13d
jle 0x68f4
movl %r13d, %r8d
subl -0x4(%rdi,%r8,4), %esi
movl %esi, 0x3c(%rbx)
movq (%rcx), %rcx
movslq %edx, %rdx
movl (%rcx,%rdx,4), %esi
movq -0x30(%rbp), %rdx
movq 0x8(%rdx), %rdi
subq (%rdx), %rdi
sarq $0x2, %rdi
movslq %r12d, %r8
leaq (%rcx,%r9,4), %rdx
addq %r9, %r8
movl (%rdx), %r9d
subl %esi, %r9d
cmpl %r14d, %r9d
jge 0x693a
addq $0x4, %rdx
incq %r8
incl %eax
cmpq %r8, %rdi
ja 0x6919
movl $0xffffffff, (%rbx)     # imm = 0xFFFFFFFF
jmp 0x694c
movl %r9d, 0x40(%rbx)
movl %eax, 0x38(%rbx)
movslq %r8d, %rax
movl (%rcx,%rax,4), %eax
subl (%rdx), %eax
movl %eax, 0x44(%rbx)
movq %rbx, %rax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movq %rax, %r14
movq %rbx, %rdi
callq 0xe5d6
movq %r14, %rdi
callq 0x33d0
// File: /workspace/github_cpp_makefile_star2_O1/iZhangHui[P]CppPrimer/CH10_GenericAlgorithms/examples/use-istream-iter.cc
// Function: main
int main() {
	vector<int> vec;
	istream_iterator<int> in_iter(cin);  // read ints from cin
	istream_iterator<int> eof;           // istream ``end'' iterator

	// use in_iter to read cin storing what we read in vec
	while (in_iter != eof)  // while there's valid input to read
		// postfix increment reads the stream and 
		// returns the old value of the iterator
		// we dereference that iterator to get 
		// the previous value read from the stream 
		vec.push_back(*in_iter++);  

	// use an ostream_iterator to print the contents of vec
	ostream_iterator<int> out_iter(cout, " ");
	copy(vec.begin(), vec.end(), out_iter);
	cout << endl;
	
	// alternative way to print contents of vec
	for (auto e : vec)
		*out_iter++ = e;  // the assignment writes this element to cout
	cout << endl;
	
	return 0;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x48, %rsp
xorps %xmm0, %xmm0
movaps %xmm0, -0x50(%rbp)
movq $0x0, -0x40(%rbp)
movq 0x2d3d(%rip), %rax      # 0x3fe0
leaq -0x60(%rbp), %rdi
movq %rax, (%rdi)
movb $0x1, 0xc(%rdi)
callq 0x147a
movb -0x54(%rbp), %al
testb %al, %al
je 0x130a
leaq -0x30(%rbp), %rbx
leaq -0x60(%rbp), %r14
leaq -0x50(%rbp), %r15
movq -0x60(%rbp), %rcx
movq %rcx, -0x38(%rbp)
movl -0x58(%rbp), %ecx
movl %ecx, -0x30(%rbp)
movb %al, -0x2c(%rbp)
movq %r14, %rdi
callq 0x147a
movq -0x48(%rbp), %rsi
cmpq -0x40(%rbp), %rsi
je 0x12f8
movl -0x30(%rbp), %eax
movl %eax, (%rsi)
addq $0x4, %rsi
movq %rsi, -0x48(%rbp)
jmp 0x1303
movq %r15, %rdi
movq %rbx, %rdx
callq 0x14b4
movb -0x54(%rbp), %al
testb %al, %al
jne 0x12c6
movq 0x2cbf(%rip), %rbx      # 0x3fd0
movq %rbx, -0x70(%rbp)
leaq 0xce8(%rip), %rax       # 0x2004
movq %rax, -0x68(%rbp)
movq -0x50(%rbp), %r14
movq -0x48(%rbp), %r12
movq %rbx, -0x38(%rbp)
movq %rax, -0x30(%rbp)
subq %r14, %r12
sarq $0x2, %r12
testq %r12, %r12
jle 0x135b
incq %r12
leaq -0x38(%rbp), %r15
movq %r15, %rdi
movq %r14, %rsi
callq 0x1432
addq $0x4, %r14
decq %r12
cmpq $0x1, %r12
jg 0x1343
movq (%rbx), %rax
addq -0x18(%rax), %rbx
movq %rbx, %rdi
movl $0xa, %esi
callq 0x10b0
movsbl %al, %esi
movq 0x2c57(%rip), %rbx      # 0x3fd0
movq %rbx, %rdi
callq 0x1030
movq %rax, %rdi
callq 0x1080
movq -0x50(%rbp), %r12
movq -0x48(%rbp), %r13
cmpq %r13, %r12
je 0x13b9
leaq -0x70(%rbp), %r14
leaq -0x38(%rbp), %r15
movl (%r12), %eax
movl %eax, -0x38(%rbp)
movq %r14, %rdi
movq %r15, %rsi
callq 0x1432
addq $0x4, %r12
cmpq %r13, %r12
jne 0x139e
movq (%rbx), %rax
addq -0x18(%rax), %rbx
movq %rbx, %rdi
movl $0xa, %esi
callq 0x10b0
movsbl %al, %esi
movq 0x2bf9(%rip), %rdi      # 0x3fd0
callq 0x1030
movq %rax, %rdi
callq 0x1080
movq -0x50(%rbp), %rdi
testq %rdi, %rdi
je 0x13f9
movq -0x40(%rbp), %rsi
subq %rdi, %rsi
callq 0x10d0
xorl %eax, %eax
addq $0x48, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
jmp 0x1412
jmp 0x1412
jmp 0x1412
jmp 0x1412
movq %rax, %rbx
movq -0x50(%rbp), %rdi
testq %rdi, %rdi
je 0x142a
movq -0x40(%rbp), %rsi
subq %rdi, %rsi
callq 0x10d0
movq %rbx, %rdi
callq 0x1120
// File: /workspace/github_cpp_makefile_star2_O1/tonymuu[P]distributed-kv-store/MP1Node.cpp
// Function: MP1Node::MP1Node(Params*, EmulNet*, Log*, Address*)
MP1Node::MP1Node( Params *params, EmulNet *emul, Log *log, Address *address) {
	for( int i = 0; i < 6; i++ ) {
		NULLADDR[i] = 0;
	}
	this->memberNode = new Member;
    this->shouldDeleteMember = true;
	memberNode->inited = false;
	this->emulNet = emul;
	this->log = log;
	this->par = params;
	this->memberNode->addr = *address;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movq %r8, %rbx
movq %rcx, %r14
movq %rdx, %rbp
movq %rsi, %r15
movq %rdi, %r13
leaq 0x1c823(%rip), %rax     # 0x20c30
movq %rax, (%rdi)
movl $0x0, 0x29(%rdi)
movw $0x0, 0x2d(%rdi)
movl $0xe8, %edi
callq 0x32b0
movq %rax, %r12
movq %rax, %rdi
callq 0x4f72
movq %r12, 0x20(%r13)
movb $0x1, 0x28(%r13)
movb $0x0, 0xe(%r12)
movq %rbp, 0x8(%r13)
movq %r14, 0x10(%r13)
movq %r15, 0x18(%r13)
addq $0x8, %r12
movq %r12, %rdi
movq %rbx, %rsi
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
jmp 0xc9b6
movq %rax, %rbx
movl $0xe8, %esi
movq %r12, %rdi
callq 0x32c0
movq %rbx, %rdi
callq 0x34b0
// File: /workspace/github_cpp_makefile_star2_O1/tonymuu[P]distributed-kv-store/MP1Node.cpp
// Function: MP1Node::MP1Node(Member*, Params*, EmulNet*, Log*, Address*)
MP1Node::MP1Node(Member* member, Params *params, EmulNet *emul, Log *log, Address *address) {
    for( int i = 0; i < 6; i++ ) {
        NULLADDR[i] = 0;
    }
    this->memberNode = member;
    this->shouldDeleteMember = false;
    this->emulNet = emul;
    this->log = log;
    this->par = params;
    this->memberNode->addr = *address;
}

// Assembly:
leaq 0x1c7a7(%rip), %rax     # 0x20c30
movq %rax, (%rdi)
movl $0x0, 0x29(%rdi)
movw $0x0, 0x2d(%rdi)
movq %rsi, 0x20(%rdi)
movb $0x0, 0x28(%rdi)
movq %rcx, 0x8(%rdi)
movq %r8, 0x10(%rdi)
movq %rdx, 0x18(%rdi)
leaq 0x8(%rsi), %rdi
movq %r9, %rsi
jmp 0xc9b6
nop
// File: /workspace/github_cpp_makefile_star2_O1/tonymuu[P]distributed-kv-store/MP1Node.cpp
// Function: MP1Node::introduceSelfToGroup(Address*)
int MP1Node::introduceSelfToGroup(Address *joinaddr) {
	MessageHdr *msg;
#ifdef DEBUGLOG
    static char s[1024];
#endif

    if ( 0 == strcmp((char *)&(memberNode->addr.addr), (char *)&(joinaddr->addr))) {
        // I am the group booter (first process to join the group). Boot up the group
#ifdef DEBUGLOG
        log->LOG(&memberNode->addr, "Starting up group...");
#endif
        memberNode->inGroup = true;
        // add myself to my memberlist
        int id = 0;
        short port;
        setIdAndPortFromAddress(memberNode->addr, &id, &port);
        MemberListEntry entry = MemberListEntry(id, port, 0, par->getcurrtime());
        memberNode->memberList.push_back(entry);

        // log to debug log about new node join
        log->logNodeAdd(&memberNode->addr, &memberNode->addr);
    }
    else {
        size_t msgsize = sizeof(MessageHdr) + sizeof(joinaddr->addr) + sizeof(long) + 1;
        msg = (MessageHdr *) malloc(msgsize * sizeof(char));

        // create JOINREQ message: format of data is {struct Address myaddr}
        msg->msgType = JOINREQ;
        memcpy((char *)(msg+1), &memberNode->addr.addr, sizeof(memberNode->addr.addr));
        memcpy((char *)(msg+1) + 1 + sizeof(memberNode->addr.addr), &memberNode->heartbeat, sizeof(long));

#ifdef DEBUGLOG
        sprintf(s, "Trying to join...");
        log->LOG(&memberNode->addr, s);
#endif

        // send JOINREQ message to introducer member
        emulNet->ENsend(&memberNode->addr, joinaddr, (char *)msg, msgsize);

        free(msg);
    }

    return 1;

}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x28, %rsp
movq %rsi, %r14
movq %rdi, %rbx
movq 0x20(%rdi), %r13
leaq 0x8(%r13), %r15
movq %r15, %rdi
callq 0x33b0
testl %eax, %eax
je 0x46d8
movl $0x13, %edi
callq 0x33a0
movq %rax, %r12
movl $0x0, (%rax)
movl (%r15), %eax
movl %eax, 0x4(%r12)
movzwl 0x4(%r15), %eax
movw %ax, 0x8(%r12)
movq 0x18(%r13), %rax
movq %rax, 0xb(%r12)
movups 0x139a2(%rip), %xmm0    # 0x1802e
movaps %xmm0, 0x1cc9d(%rip)    # 0x21330
movw $0x2e, 0x1cca4(%rip)    # 0x21340
leaq 0x1cc8d(%rip), %rdx     # 0x21330
movq 0x10(%rbx), %rdi
movq %r15, %rsi
xorl %eax, %eax
callq 0xbc4c
movq 0x8(%rbx), %rdi
movq 0x20(%rbx), %rsi
addq $0x8, %rsi
movq %r14, %rdx
movq %r12, %rcx
movl $0x13, %r8d
callq 0x66d0
movq %r12, %rdi
callq 0x3360
jmp 0x4752
movq 0x10(%rbx), %rdi
leaq 0x13936(%rip), %rdx     # 0x18019
movq %r15, %rsi
xorl %eax, %eax
callq 0xbc4c
movq 0x20(%rbx), %rsi
movb $0x1, 0xf(%rsi)
addq $0x8, %rsi
leaq 0x8(%rsp), %r14
movq %r14, %rdi
callq 0xc9a8
movl (%r14), %ebp
movswl 0x4(%r14), %r14d
movq 0x18(%rbx), %rdi
callq 0xc962
movslq %eax, %r8
leaq 0x10(%rsp), %r15
movq %r15, %rdi
movl %ebp, %esi
movl %r14d, %edx
xorl %ecx, %ecx
callq 0xc9f2
movq 0x20(%rbx), %rdi
addq $0x28, %rdi
movq %r15, %rsi
callq 0x5016
movq 0x10(%rbx), %rdi
movq 0x20(%rbx), %rdx
addq $0x8, %rdx
movq %rdx, %rsi
callq 0xbf50
movl $0x1, %eax
addq $0x28, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O1/tonymuu[P]distributed-kv-store/MP1Node.cpp
// Function: MP1Node::finishUpThisNode()
int MP1Node::finishUpThisNode(){
    memberNode->inited = false;
    memberNode->inGroup = false;
    memberNode->nnb = 0;
    memberNode->heartbeat = 0;
    memberNode->memberList.clear();
    return 0;
}

// Assembly:
movq 0x20(%rdi), %rax
movw $0x0, 0xe(%rax)
movl $0x0, 0x14(%rax)
movq $0x0, 0x18(%rax)
movq 0x28(%rax), %rcx
cmpq %rcx, 0x30(%rax)
je 0x478d
movq %rcx, 0x30(%rax)
xorl %eax, %eax
retq
// File: /workspace/github_cpp_makefile_star2_O1/tonymuu[P]distributed-kv-store/MP1Node.cpp
// Function: MP1Node::recvCallBack(void*, char*, int)
bool MP1Node::recvCallBack(void *env, char *data, int size ) {
    // Get msg header from msg
    MessageHdr header;
    memcpy(&header, data, sizeof(MessageHdr));

    // Perform different functions based on different msg type
    if (header.msgType == JOINREQ) {
        // deserialize msg from memory
        Address addr;
        addr.init();
        long heartbeat = 0;
        memcpy(&addr.addr, data + sizeof(MessageHdr), sizeof(addr.addr));
        memcpy(&heartbeat, data + sizeof(MessageHdr) + sizeof(addr.addr), sizeof(long));

        // add to my memberlist
        int id = 0;
        short port;
        setIdAndPortFromAddress(addr, &id, &port);
        MemberListEntry entry = MemberListEntry(id, port, heartbeat, par->getcurrtime());
        memberNode->memberList.push_back(entry);

        // log to debug log about new node join
        log->logNodeAdd(&memberNode->addr, &addr);

        // send joinrep msg that includes my memberlist
        sendJoinRepMsg(&addr);
    } else if (header.msgType == JOINREP) {
        // Since I received JOINREP, I've made myself known so I'm in the group
        memberNode->inGroup = true;
        // We just joined, so we should use introducer's membership list and clear anything previously stored.
        memberNode->memberList.clear();

        // Now we deserialize the msg and update my member list
        deserializeAndUpdateMemberList(data, size);
    } else if (header.msgType == UPDATEREQ) {
        // update membership list, add any new nodes, log
        deserializeAndUpdateMemberList(data, size);
    }
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x28, %rsp
movq %rdi, %rbx
movl (%rdx), %eax
cmpl $0x1, %eax
je 0x4a80
testl %eax, %eax
jne 0x4a96
movzwl 0x8(%rdx), %eax
leaq 0x8(%rsp), %r14
movw %ax, 0x4(%r14)
movl 0x4(%rdx), %eax
movl %eax, (%r14)
movq 0xa(%rdx), %r15
movq %rsp, %r12
movq %r12, %rdi
movq %r14, %rsi
callq 0xc9a8
movl (%r12), %ebp
movswl 0x4(%r12), %r12d
movq 0x18(%rbx), %rdi
callq 0xc962
movslq %eax, %r8
leaq 0x10(%rsp), %r13
movq %r13, %rdi
movl %ebp, %esi
movl %r12d, %edx
movq %r15, %rcx
callq 0xc9f2
movq 0x20(%rbx), %rdi
addq $0x28, %rdi
movq %r13, %rsi
callq 0x5016
movq 0x10(%rbx), %rdi
movq 0x20(%rbx), %rsi
addq $0x8, %rsi
movq %r14, %rdx
callq 0xbf50
movq %rbx, %rdi
movq %r14, %rsi
callq 0x4aa4
movq 0x20(%rbx), %rax
movb $0x1, 0xf(%rax)
movq 0x28(%rax), %rsi
cmpq %rsi, 0x30(%rax)
je 0x4a96
movq %rsi, 0x30(%rax)
movq %rbx, %rdi
movq %rdx, %rsi
movl %ecx, %edx
callq 0x4b22
nop
// File: /workspace/github_cpp_makefile_star2_O1/tonymuu[P]distributed-kv-store/MP1Node.cpp
// Function: MP1Node::sendJoinRepMsg(Address*)
void MP1Node::sendJoinRepMsg(Address *toAddr) {
    // Create the msg that includes header and my member list entires
    int mleSize = sizeof(int) + sizeof(short) + sizeof(long) + sizeof(long), numEntries = memberNode->memberList.size();
    size_t msgsize = sizeof(MessageHdr) + mleSize * numEntries;

    MessageHdr *msg;
    msg = (MessageHdr *) malloc(msgsize * sizeof(char));
    msg->msgType = JOINREP;

    serializeMemberList(msg);
    // Reply with JOINREP message
    emulNet->ENsend(&memberNode->addr, toAddr, (char *)msg, msgsize);

    free(msg);
}

// Assembly:
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
pushq %rax
movq %rsi, %rbx
movq %rdi, %r14
movq 0x20(%rdi), %rax
movq 0x30(%rax), %rcx
subq 0x28(%rax), %rcx
shrq $0x3, %rcx
movabsq $-0x5555554e00000000, %r15 # imm = 0xAAAAAAB200000000
imulq %rcx, %r15
sarq $0x20, %r15
addq $0x4, %r15
movq %r15, %rdi
callq 0x33a0
movq %rax, %r12
movl $0x1, (%rax)
movq %r14, %rdi
movq %rax, %rsi
callq 0x4d14
movq 0x8(%r14), %rdi
movq 0x20(%r14), %rsi
addq $0x8, %rsi
movq %rbx, %rdx
movq %r12, %rcx
movl %r15d, %r8d
callq 0x66d0
movq %r12, %rdi
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
jmp 0x3360
nop
// File: /workspace/github_cpp_makefile_star2_O1/tonymuu[P]distributed-kv-store/MP1Node.cpp
// Function: MP1Node::serializeMemberList(MP1Node::MessageHdr*)
void MP1Node::serializeMemberList(MessageHdr* msg) {
    int offset = 0;
    int id = 0;
    short port = 0;
    setIdAndPortFromAddress(memberNode->addr, &id, &port);
    long currTime = par->getcurrtime();
    for(auto mle = memberNode->memberList.begin(); mle != memberNode->memberList.end(); ++mle) {
        memcpy((char *)(msg+1) + offset, &mle->id, sizeof(int));
        offset += sizeof(int);

        memcpy((char *)(msg+1) + offset, &mle->port, sizeof(short));
        offset += sizeof(short);

        memcpy((char *)(msg+1) + offset, mle->id == id ? &(memberNode->heartbeat) : &(mle->heartbeat), sizeof(long));
        offset += sizeof(long);

        memcpy((char *)(msg+1) + offset, mle->id == id ? &currTime : &(mle->timestamp), sizeof(long));
        offset += sizeof(long);
    }
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %rbx
pushq %rax
movq %rsi, %rbx
movq %rdi, %r14
movq 0x20(%rdi), %rsi
addq $0x8, %rsi
movq %rsp, %r15
movq %r15, %rdi
callq 0xc9a8
movl (%r15), %ebp
movq 0x18(%r14), %rdi
callq 0xc962
movq 0x20(%r14), %rdx
movq 0x28(%rdx), %rcx
cmpq 0x30(%rdx), %rcx
je 0x4df2
cltq
addq $0x10, %rcx
xorl %r10d, %r10d
movabsq $0x400000000, %rdx      # imm = 0x400000000
movabsq $0x600000000, %rsi      # imm = 0x600000000
movabsq $0xe00000000, %rdi      # imm = 0xE00000000
movq %r10, %r8
shlq $0x20, %r8
movslq %r10d, %r9
movl -0x10(%rcx), %r10d
movl %r10d, 0x4(%rbx,%r9)
leaq (%r8,%rdx), %r9
sarq $0x20, %r9
movzwl -0xc(%rcx), %r10d
movw %r10w, 0x4(%rbx,%r9)
leaq (%r8,%rsi), %r10
sarq $0x20, %r10
movq 0x20(%r14), %r11
addq $0x18, %r11
cmpl %ebp, -0x10(%rcx)
leaq -0x8(%rcx), %r9
cmovneq %r9, %r11
movq (%r11), %r11
movq %r11, 0x4(%rbx,%r10)
movq %rax, %r10
cmpl %ebp, -0x10(%rcx)
je 0x4dcd
movq (%rcx), %r10
addq %rdi, %r8
sarq $0x20, %r8
movq %r10, 0x4(%rbx,%r8)
addq $0x8, %r8
movq 0x20(%r14), %r11
addq $0x18, %rcx
addq $0x10, %r9
movq %r8, %r10
cmpq 0x30(%r11), %r9
jne 0x4d7c
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
nop
// File: /workspace/github_cpp_makefile_star2_O1/tonymuu[P]distributed-kv-store/MP1Node.cpp
// Function: MP1Node::createMemberlistMap()
map<int, MemberListEntry*> MP1Node::createMemberlistMap() {
    map<int, MemberListEntry*> map;
    for (auto neighbour = memberNode->memberList.begin(); neighbour != memberNode->memberList.end(); neighbour++) {
        map[neighbour->id] = &*neighbour;
    }
    return map;
}

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
movq %rdi, %rbx
leaq 0x8(%rdi), %rax
movl $0x0, 0x8(%rdi)
xorl %ecx, %ecx
movq %rcx, 0x10(%rdi)
movq %rax, 0x18(%rdi)
movq %rax, 0x20(%rdi)
movq %rcx, 0x28(%rdi)
movq 0x20(%rsi), %rax
movq 0x28(%rax), %r15
cmpq 0x30(%rax), %r15
je 0x4eee
movq %rsi, %r14
movq %rbx, %rdi
movq %r15, %rsi
callq 0x5042
movq %r15, (%rax)
addq $0x18, %r15
movq 0x20(%r14), %rax
cmpq 0x30(%rax), %r15
jne 0x4ed2
movq %rbx, %rax
popq %rbx
popq %r14
popq %r15
retq
movq %rax, %r14
movq %rbx, %rdi
callq 0x563a
movq %r14, %rdi
callq 0x34b0
// File: /workspace/github_cpp_makefile_star2_O1/tonymuu[P]distributed-kv-store/MP1Node.cpp
// Function: MP1Node::getNodeFromMemberListTable(int)
MemberListEntry* MP1Node::getNodeFromMemberListTable(int id) {
    for(auto mle = memberNode->memberList.begin(); mle != memberNode->memberList.end(); ++mle) {
        if(mle->id == id) {
            return mle.base();
        }
    }
    return nullptr;
}

// Assembly:
movq 0x20(%rdi), %rcx
movq 0x28(%rcx), %rax
movq 0x30(%rcx), %rcx
cmpq %rcx, %rax
je 0x4f63
cmpl %esi, (%rax)
je 0x4f65
addq $0x18, %rax
jmp 0x4f54
xorl %eax, %eax
retq
// File: /workspace/github_cpp_makefile_star2_O1/tonymuu[P]distributed-kv-store/Application.cpp
// Function: Application::run()
int Application::run()
{
	int i;
	int timeWhenAllNodesHaveJoined = 0;
	// boolean indicating if all nodes have joined
	bool allNodesJoined = false;
	srand(time(NULL));

	// As time runs along
	for( par->globaltime = 0; par->globaltime < TOTAL_RUNNING_TIME; ++par->globaltime ) {
		// Run the membership protocol
		mp1Run();

		// Wait for all nodes to join
		if ( par->allNodesJoined == nodeCount && !allNodesJoined ) {
			timeWhenAllNodesHaveJoined = par->getcurrtime();
			allNodesJoined = true;
		}
		if ( par->getcurrtime() > timeWhenAllNodesHaveJoined + 50 ) {
			// Call the KV store functionalities
			mp2Run();
		}
		// Fail some nodes
		//fail();
	}

	// Clean up
	en->ENcleanup();
	en1->ENcleanup();

	for(i=0;i<=par->EN_GPSZ-1;i++) {
		 mp1[i]->finishUpThisNode();
	}

	return SUCCESS;
}

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
movq %rdi, %rbx
xorl %r15d, %r15d
xorl %edi, %edi
callq 0x3250
movl %eax, %edi
callq 0x3270
movq 0x58(%rbx), %rax
movl $0x0, 0x28(%rax)
xorl %r14d, %r14d
movq %rbx, %rdi
callq 0x719e
movq 0x58(%rbx), %rdi
movl 0x2c(%rdi), %eax
cmpl 0x1b27c(%rip), %eax     # 0x21fb0
jne 0x6d47
testb $0x1, %r15b
jne 0x6d47
callq 0xc962
movl %eax, %r14d
movb $0x1, %r15b
movq 0x58(%rbx), %rdi
callq 0xc962
leal 0x32(%r14), %ecx
cmpl %ecx, %eax
jle 0x6d60
movq %rbx, %rdi
callq 0x73e6
movq 0x58(%rbx), %rax
movl 0x28(%rax), %ecx
leal 0x1(%rcx), %edx
movl %edx, 0x28(%rax)
cmpl $0x2bb, %ecx            # imm = 0x2BB
jl 0x6d1f
movq 0x28(%rbx), %rdi
callq 0x6a20
movq 0x30(%rbx), %rdi
callq 0x6a20
movq 0x58(%rbx), %rax
cmpl $0x0, 0x18(%rax)
jle 0x6db1
xorl %r14d, %r14d
movq 0x40(%rbx), %rax
movq (%rax,%r14,8), %rdi
callq 0x4766
incq %r14
movq 0x58(%rbx), %rax
movslq 0x18(%rax), %rax
cmpq %rax, %r14
jl 0x6d94
xorl %eax, %eax
popq %rbx
popq %r14
popq %r15
retq
nop
// File: /workspace/github_cpp_makefile_star2_O1/tonymuu[P]distributed-kv-store/Application.cpp
// Function: Application::~Application()
Application::~Application() {
	delete log;
	delete en;
	delete en1;
	for ( int i = 0; i < par->EN_GPSZ; i++ ) {
        delete members[i];
		delete mp1[i];
		delete mp2[i];
	}
	free(mp1);
	free(mp2);
    free(members);
	delete par;
}

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
movq %rdi, %rbx
leaq 0x19c3f(%rip), %rax     # 0x20cf0
movq %rax, (%rdi)
movq 0x38(%rdi), %rdi
testq %rdi, %rdi
je 0x70c3
movq (%rdi), %rax
callq *0x8(%rax)
movq 0x28(%rbx), %rdi
testq %rdi, %rdi
je 0x70d2
movq (%rdi), %rax
callq *0x8(%rax)
movq 0x30(%rbx), %rdi
testq %rdi, %rdi
je 0x70e1
movq (%rdi), %rax
callq *0x8(%rax)
movq 0x58(%rbx), %rax
cmpl $0x0, 0x18(%rax)
jle 0x7146
xorl %r15d, %r15d
movq 0x50(%rbx), %rax
movq (%rax,%r15,8), %rdi
testq %rdi, %rdi
je 0x7101
movq (%rdi), %rax
callq *0x8(%rax)
movq 0x40(%rbx), %rax
movq (%rax,%r15,8), %rdi
testq %rdi, %rdi
je 0x7114
movq (%rdi), %rax
callq *0x8(%rax)
movq 0x48(%rbx), %rax
movq (%rax,%r15,8), %r14
testq %r14, %r14
je 0x7136
movq %r14, %rdi
callq 0xe882
movl $0xf0, %esi
movq %r14, %rdi
callq 0x32c0
incq %r15
movq 0x58(%rbx), %rax
movslq 0x18(%rax), %rax
cmpq %rax, %r15
jl 0x70ee
movq 0x40(%rbx), %rdi
callq 0x3360
movq 0x48(%rbx), %rdi
callq 0x3360
movq 0x50(%rbx), %rdi
callq 0x3360
movq 0x58(%rbx), %rdi
testq %rdi, %rdi
je 0x7174
movl $0x38, %esi
callq 0x32c0
addq $0x60, %rbx
movq %rbx, %rdi
popq %rbx
popq %r14
popq %r15
jmp 0xb586
nop
// File: /workspace/github_cpp_makefile_star2_O1/tonymuu[P]distributed-kv-store/Application.cpp
// Function: Application::insertTestKVPairs()
void Application::insertTestKVPairs() {
	int number = 0;

	/*
	 * Init a few test key value pairs
	 */
	initTestKVPairs();

	for ( map<string, string>::iterator it = testKVPairs.begin(); it != testKVPairs.end(); ++it ) {
		// Step 1. Find a node that is alive
		number = findARandomNodeThatIsAlive();

		// Step 2. Issue a create operation
		log->LOG(&mp2[number]->getMemberNode()->addr, "CREATE OPERATION KEY: %s VALUE: %s at time: %d", it->first.c_str(), it->second.c_str(), par->getcurrtime());
		mp2[number]->clientCreate(it->first, it->second);
	}

	cout<<endl<<"Sent " <<testKVPairs.size() <<" create messages to the ring"<<endl;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x58, %rsp
movq %rdi, %rbx
callq 0xaf86
movq 0x78(%rbx), %r14
leaq 0x68(%rbx), %rax
movq %rax, 0x28(%rsp)
cmpq %rax, %r14
je 0x771c
callq 0x30a0
movq 0x48(%rbx), %rcx
movq 0x58(%rbx), %rdi
cltd
idivl 0x18(%rdi)
movslq %edx, %r15
movq (%rcx,%r15,8), %rax
movq 0x50(%rax), %rbp
cmpb $0x0, 0x10(%rbp)
jne 0x761e
movq 0x38(%rbx), %rax
movq %rax, 0x30(%rsp)
addq $0x8, %rbp
movq 0x20(%r14), %r12
movq 0x40(%r14), %r13
callq 0xc962
movq 0x30(%rsp), %rdi
movq %rbp, %rsi
leaq 0x10cd1(%rip), %rdx     # 0x1833a
movq %r12, %rcx
movq %r13, %r8
movl %eax, %r9d
xorl %eax, %eax
callq 0xbc4c
movq 0x48(%rbx), %rax
movq (%rax,%r15,8), %rbp
leaq 0x18(%rsp), %r15
movq %r15, 0x8(%rsp)
movq 0x20(%r14), %rsi
movq 0x28(%r14), %rdx
addq %rsi, %rdx
leaq 0x8(%rsp), %r15
movq %r15, %rdi
callq 0x5a48
leaq 0x48(%rsp), %r12
movq %r12, 0x38(%rsp)
movq 0x40(%r14), %rsi
movq 0x48(%r14), %rdx
addq %rsi, %rdx
leaq 0x38(%rsp), %r13
movq %r13, %rdi
callq 0x5a48
movq %rbp, %rdi
movq %r15, %rsi
movq %r13, %rdx
callq 0xf7e6
movq 0x38(%rsp), %rdi
cmpq %r12, %rdi
je 0x76ea
movq 0x48(%rsp), %rsi
incq %rsi
callq 0x32c0
movq 0x8(%rsp), %rdi
leaq 0x18(%rsp), %rax
cmpq %rax, %rdi
je 0x7706
movq 0x18(%rsp), %rsi
incq %rsi
callq 0x32c0
movq %r14, %rdi
callq 0x31d0
movq %rax, %r14
cmpq 0x28(%rsp), %rax
jne 0x761e
movq 0x198a5(%rip), %r14     # 0x20fc8
movq (%r14), %rax
movq -0x18(%rax), %rdi
addq %r14, %rdi
movl $0xa, %esi
callq 0x3280
movsbl %al, %esi
movq %r14, %rdi
callq 0x3030
movq %rax, %rdi
callq 0x31c0
movq %rax, %r14
leaq 0x10c15(%rip), %rsi     # 0x18369
movl $0x5, %edx
movq %rax, %rdi
callq 0x3310
movq 0x88(%rbx), %rsi
movq %r14, %rdi
callq 0x31b0
movq %rax, %rbx
leaq 0x10bf5(%rip), %rsi     # 0x1836f
movl $0x1c, %edx
movq %rax, %rdi
callq 0x3310
movq (%rbx), %rax
movq -0x18(%rax), %rdi
addq %rbx, %rdi
movl $0xa, %esi
callq 0x3280
movsbl %al, %esi
movq %rbx, %rdi
callq 0x3030
movq %rax, %rdi
callq 0x31c0
addq $0x58, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movq %rax, %rbx
jmp 0x77dc
movq %rax, %rbx
movq 0x38(%rsp), %rdi
cmpq %r12, %rdi
je 0x77dc
movq 0x48(%rsp), %rsi
incq %rsi
callq 0x32c0
movq 0x8(%rsp), %rdi
leaq 0x18(%rsp), %rax
cmpq %rax, %rdi
je 0x77f8
movq 0x18(%rsp), %rsi
incq %rsi
callq 0x32c0
movq %rbx, %rdi
callq 0x34b0
// File: /workspace/github_cpp_makefile_star2_O1/tonymuu[P]distributed-kv-store/Application.cpp
// Function: Application::findARandomNodeThatIsAlive()
int Application::findARandomNodeThatIsAlive() {
	int number;
	do {
		number = (rand()%par->EN_GPSZ);
	}while (mp2[number]->getMemberNode()->bFailed);
	return number;
}

// Assembly:
pushq %rbx
movq %rdi, %rbx
callq 0x30a0
movq 0x48(%rbx), %rcx
movq 0x58(%rbx), %rsi
cltd
idivl 0x18(%rsi)
movslq %edx, %rax
movq (%rcx,%rax,8), %rax
movq 0x50(%rax), %rax
cmpb $0x0, 0x10(%rax)
jne 0xaf60
movl %edx, %eax
popq %rbx
retq
// File: /workspace/github_cpp_makefile_star2_O1/tonymuu[P]distributed-kv-store/Log.cpp
// Function: Log::logCreateSuccess(Address*, bool, int, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>)
void Log::logCreateSuccess(Address * address, bool isCoordinator, int transID, string key, string value){
	static char stdstring[1000];
	string str;
	if (isCoordinator)
		str = "coordinator";
	else
		str = "server";
	sprintf(stdstring, "%s: create success at time %d, transID=%d, key=%s, value=%s", str.c_str(), par->getcurrtime(), transID, key.c_str(), value.c_str());
    LOG(address, stdstring);
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x38, %rsp
movq %r9, %r15
movq %r8, %r12
movl %ecx, %ebp
movq %rsi, 0x10(%rsp)
movq %rdi, %r14
leaq 0x28(%rsp), %rbx
movq %rbx, -0x10(%rbx)
movq $0x0, -0x8(%rbx)
movb $0x0, (%rbx)
leaq 0xc8cd(%rip), %rax      # 0x18952
leaq 0xc8d2(%rip), %rcx      # 0x1895e
testl %edx, %edx
cmovneq %rax, %rcx
movl %edx, %eax
leaq (%rax,%rax,4), %r8
addq $0x6, %r8
leaq 0x18(%rsp), %rdi
xorl %esi, %esi
xorl %edx, %edx
callq 0x3440
movq 0x18(%rsp), %r13
movq 0x8(%r14), %rdi
callq 0xc962
movq (%r12), %r9
movq (%r15), %rcx
movq %rcx, (%rsp)
leaq 0x1e836(%rip), %r15     # 0x2a900
leaq 0xc894(%rip), %rsi      # 0x18965
movq %r15, %rdi
movq %r13, %rdx
movl %eax, %ecx
movl %ebp, %r8d
xorl %eax, %eax
callq 0x3080
movq %r14, %rdi
movq 0x10(%rsp), %rsi
movq %r15, %rdx
xorl %eax, %eax
callq 0xbc4c
movq 0x18(%rsp), %rdi
cmpq %rbx, %rdi
je 0xc10c
movq 0x28(%rsp), %rsi
incq %rsi
callq 0x32c0
addq $0x38, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movq %rax, %r14
movq 0x18(%rsp), %rdi
cmpq %rbx, %rdi
je 0xc135
movq 0x28(%rsp), %rsi
incq %rsi
callq 0x32c0
movq %r14, %rdi
callq 0x34b0
nop
// File: /workspace/github_cpp_makefile_star2_O1/tonymuu[P]distributed-kv-store/Log.cpp
// Function: Log::logReadSuccess(Address*, bool, int, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>)
void Log::logReadSuccess(Address * address, bool isCoordinator, int transID, string key, string value){
    static char stdstring[1000];
	string str;
	if (isCoordinator)
		str = "coordinator";
	else
		str = "server";
	sprintf(stdstring, "%s: read success at time %d, transID=%d, key=%s, value=%s", str.c_str(), par->getcurrtime(), transID, key.c_str(), value.c_str());
    LOG(address, stdstring);
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x38, %rsp
movq %r9, %r15
movq %r8, %r12
movl %ecx, %ebp
movq %rsi, 0x10(%rsp)
movq %rdi, %r14
leaq 0x28(%rsp), %rbx
movq %rbx, -0x10(%rbx)
movq $0x0, -0x8(%rbx)
movb $0x0, (%rbx)
leaq 0xc7db(%rip), %rax      # 0x18952
leaq 0xc7e0(%rip), %rcx      # 0x1895e
testl %edx, %edx
cmovneq %rax, %rcx
movl %edx, %eax
leaq (%rax,%rax,4), %r8
addq $0x6, %r8
leaq 0x18(%rsp), %rdi
xorl %esi, %esi
xorl %edx, %edx
callq 0x3440
movq 0x18(%rsp), %r13
movq 0x8(%r14), %rdi
callq 0xc962
movq (%r12), %r9
movq (%r15), %rcx
movq %rcx, (%rsp)
leaq 0x1eb34(%rip), %r15     # 0x2acf0
leaq 0xc7de(%rip), %rsi      # 0x189a1
movq %r15, %rdi
movq %r13, %rdx
movl %eax, %ecx
movl %ebp, %r8d
xorl %eax, %eax
callq 0x3080
movq %r14, %rdi
movq 0x10(%rsp), %rsi
movq %r15, %rdx
xorl %eax, %eax
callq 0xbc4c
movq 0x18(%rsp), %rdi
cmpq %rbx, %rdi
je 0xc1fe
movq 0x28(%rsp), %rsi
incq %rsi
callq 0x32c0
addq $0x38, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movq %rax, %r14
movq 0x18(%rsp), %rdi
cmpq %rbx, %rdi
je 0xc227
movq 0x28(%rsp), %rsi
incq %rsi
callq 0x32c0
movq %r14, %rdi
callq 0x34b0
nop
// File: /workspace/github_cpp_makefile_star2_O1/tonymuu[P]distributed-kv-store/Log.cpp
// Function: Log::logUpdateSuccess(Address*, bool, int, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>)
void Log::logUpdateSuccess(Address * address, bool isCoordinator, int transID, string key, string newValue){
    static char stdstring[1000];
	string str;
	if (isCoordinator)
		str = "coordinator";
	else
		str = "server";
	sprintf(stdstring, "%s: update success at time %d, transID=%d, key=%s, value=%s", str.c_str(), par->getcurrtime(), transID, key.c_str(), newValue.c_str());
    LOG(address, stdstring);
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x38, %rsp
movq %r9, %r15
movq %r8, %r12
movl %ecx, %ebp
movq %rsi, 0x10(%rsp)
movq %rdi, %r14
leaq 0x28(%rsp), %rbx
movq %rbx, -0x10(%rbx)
movq $0x0, -0x8(%rbx)
movb $0x0, (%rbx)
leaq 0xc6e9(%rip), %rax      # 0x18952
leaq 0xc6ee(%rip), %rcx      # 0x1895e
testl %edx, %edx
cmovneq %rax, %rcx
movl %edx, %eax
leaq (%rax,%rax,4), %r8
addq $0x6, %r8
leaq 0x18(%rsp), %rdi
xorl %esi, %esi
xorl %edx, %edx
callq 0x3440
movq 0x18(%rsp), %r13
movq 0x8(%r14), %rdi
callq 0xc962
movq (%r12), %r9
movq (%r15), %rcx
movq %rcx, (%rsp)
leaq 0x1ee32(%rip), %r15     # 0x2b0e0
leaq 0xc726(%rip), %rsi      # 0x189db
movq %r15, %rdi
movq %r13, %rdx
movl %eax, %ecx
movl %ebp, %r8d
xorl %eax, %eax
callq 0x3080
movq %r14, %rdi
movq 0x10(%rsp), %rsi
movq %r15, %rdx
xorl %eax, %eax
callq 0xbc4c
movq 0x18(%rsp), %rdi
cmpq %rbx, %rdi
je 0xc2f0
movq 0x28(%rsp), %rsi
incq %rsi
callq 0x32c0
addq $0x38, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movq %rax, %r14
movq 0x18(%rsp), %rdi
cmpq %rbx, %rdi
je 0xc319
movq 0x28(%rsp), %rsi
incq %rsi
callq 0x32c0
movq %r14, %rdi
callq 0x34b0
nop
// File: /workspace/github_cpp_makefile_star2_O1/tonymuu[P]distributed-kv-store/Log.cpp
// Function: Log::logDeleteSuccess(Address*, bool, int, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>)
void Log::logDeleteSuccess(Address * address, bool isCoordinator, int transID, string key){
    static char stdstring[1000];
	string str;
	if (isCoordinator)
		str = "coordinator";
	else
		str = "server";
	sprintf(stdstring, "%s: delete success at time %d, transID=%d, key=%s", str.c_str(), par->getcurrtime(), transID, key.c_str());
    LOG(address, stdstring);
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x28, %rsp
movq %r8, %r15
movl %ecx, %ebp
movq %rsi, %rbx
movq %rdi, %r14
leaq 0x18(%rsp), %r13
movq %r13, -0x10(%r13)
movq $0x0, -0x8(%r13)
movb $0x0, (%r13)
leaq 0xc5fa(%rip), %rax      # 0x18952
leaq 0xc5ff(%rip), %rcx      # 0x1895e
testl %edx, %edx
cmovneq %rax, %rcx
movl %edx, %eax
leaq (%rax,%rax,4), %r8
addq $0x6, %r8
leaq 0x8(%rsp), %rdi
xorl %esi, %esi
xorl %edx, %edx
callq 0x3440
movq 0x8(%rsp), %r12
movq 0x8(%r14), %rdi
callq 0xc962
movq (%r15), %r9
leaq 0x1f13b(%rip), %r15     # 0x2b4d0
leaq 0xc67b(%rip), %rsi      # 0x18a17
movq %r15, %rdi
movq %r12, %rdx
movl %eax, %ecx
movl %ebp, %r8d
xorl %eax, %eax
callq 0x3080
movq %r14, %rdi
movq %rbx, %rsi
movq %r15, %rdx
xorl %eax, %eax
callq 0xbc4c
movq 0x8(%rsp), %rdi
cmpq %r13, %rdi
je 0xc3d5
movq 0x18(%rsp), %rsi
incq %rsi
callq 0x32c0
addq $0x28, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movq %rax, %rbx
movq 0x8(%rsp), %rdi
cmpq %r13, %rdi
je 0xc3fe
movq 0x18(%rsp), %rsi
incq %rsi
callq 0x32c0
movq %rbx, %rdi
callq 0x34b0
// File: /workspace/github_cpp_makefile_star2_O1/tonymuu[P]distributed-kv-store/Log.cpp
// Function: Log::logReadFail(Address*, bool, int, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>)
void Log::logReadFail(Address * address, bool isCoordinator, int transID, string key){
    static char stdstring[1000];
	string str;
	if (isCoordinator)
		str = "coordinator";
	else
		str = "server";
	sprintf(stdstring, "%s: read fail at time %d, transID=%d, key=%s", str.c_str(), par->getcurrtime(), transID, key.c_str());
    LOG(address, stdstring);
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x28, %rsp
movq %r8, %r15
movl %ecx, %ebp
movq %rsi, %rbx
movq %rdi, %r14
leaq 0x18(%rsp), %r13
movq %r13, -0x10(%r13)
movq $0x0, -0x8(%r13)
movb $0x0, (%r13)
leaq 0xc424(%rip), %rax      # 0x18952
leaq 0xc429(%rip), %rcx      # 0x1895e
testl %edx, %edx
cmovneq %rax, %rcx
movl %edx, %eax
leaq (%rax,%rax,4), %r8
addq $0x6, %r8
leaq 0x8(%rsp), %rdi
xorl %esi, %esi
xorl %edx, %edx
callq 0x3440
movq 0x8(%rsp), %r12
movq 0x8(%r14), %rdi
callq 0xc962
movq (%r15), %r9
leaq 0x1f745(%rip), %r15     # 0x2bcb0
leaq 0xc510(%rip), %rsi      # 0x18a82
movq %r15, %rdi
movq %r12, %rdx
movl %eax, %ecx
movl %ebp, %r8d
xorl %eax, %eax
callq 0x3080
movq %r14, %rdi
movq %rbx, %rsi
movq %r15, %rdx
xorl %eax, %eax
callq 0xbc4c
movq 0x8(%rsp), %rdi
cmpq %r13, %rdi
je 0xc5ab
movq 0x18(%rsp), %rsi
incq %rsi
callq 0x32c0
addq $0x28, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movq %rax, %rbx
movq 0x8(%rsp), %rdi
cmpq %r13, %rdi
je 0xc5d4
movq 0x18(%rsp), %rsi
incq %rsi
callq 0x32c0
movq %rbx, %rdi
callq 0x34b0
// File: /workspace/github_cpp_makefile_star2_O1/tonymuu[P]distributed-kv-store/Log.cpp
// Function: Log::logUpdateFail(Address*, bool, int, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>)
void Log::logUpdateFail(Address * address, bool isCoordinator, int transID, string key, string newValue){
    static char stdstring[1000];
	string str;
	if (isCoordinator)
		str = "coordinator";
	else
		str = "server";
	sprintf(stdstring, "%s: update fail at time %d, transID=%d, key=%s, value=%s", str.c_str(), par->getcurrtime(), transID, key.c_str(), newValue.c_str());
    LOG(address, stdstring);
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x38, %rsp
movq %r9, %r15
movq %r8, %r12
movl %ecx, %ebp
movq %rsi, 0x10(%rsp)
movq %rdi, %r14
leaq 0x28(%rsp), %rbx
movq %rbx, -0x10(%rbx)
movq $0x0, -0x8(%rbx)
movb $0x0, (%rbx)
leaq 0xc33d(%rip), %rax      # 0x18952
leaq 0xc342(%rip), %rcx      # 0x1895e
testl %edx, %edx
cmovneq %rax, %rcx
movl %edx, %eax
leaq (%rax,%rax,4), %r8
addq $0x6, %r8
leaq 0x18(%rsp), %rdi
xorl %esi, %esi
xorl %edx, %edx
callq 0x3440
movq 0x18(%rsp), %r13
movq 0x8(%r14), %rdi
callq 0xc962
movq (%r12), %r9
movq (%r15), %rcx
movq %rcx, (%rsp)
leaq 0x1fa46(%rip), %r15     # 0x2c0a0
leaq 0xc44e(%rip), %rsi      # 0x18aaf
movq %r15, %rdi
movq %r13, %rdx
movl %eax, %ecx
movl %ebp, %r8d
xorl %eax, %eax
callq 0x3080
movq %r14, %rdi
movq 0x10(%rsp), %rsi
movq %r15, %rdx
xorl %eax, %eax
callq 0xbc4c
movq 0x18(%rsp), %rdi
cmpq %rbx, %rdi
je 0xc69c
movq 0x28(%rsp), %rsi
incq %rsi
callq 0x32c0
addq $0x38, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movq %rax, %r14
movq 0x18(%rsp), %rdi
cmpq %rbx, %rdi
je 0xc6c5
movq 0x28(%rsp), %rsi
incq %rsi
callq 0x32c0
movq %r14, %rdi
callq 0x34b0
nop
// File: /workspace/github_cpp_makefile_star2_O1/tonymuu[P]distributed-kv-store/Log.cpp
// Function: Log::logDeleteFail(Address*, bool, int, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>)
void Log::logDeleteFail(Address * address, bool isCoordinator, int transID, string key){
    static char stdstring[1000];
	string str;
	if (isCoordinator)
		str = "coordinator";
	else
		str = "server";
	sprintf(stdstring, "%s: delete fail at time %d, transID=%d, key=%s", str.c_str(), par->getcurrtime(), transID, key.c_str());
    LOG(address, stdstring);
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x28, %rsp
movq %r8, %r15
movl %ecx, %ebp
movq %rsi, %rbx
movq %rdi, %r14
leaq 0x18(%rsp), %r13
movq %r13, -0x10(%r13)
movq $0x0, -0x8(%r13)
movb $0x0, (%r13)
leaq 0xc24e(%rip), %rax      # 0x18952
leaq 0xc253(%rip), %rcx      # 0x1895e
testl %edx, %edx
cmovneq %rax, %rcx
movl %edx, %eax
leaq (%rax,%rax,4), %r8
addq $0x6, %r8
leaq 0x8(%rsp), %rdi
xorl %esi, %esi
xorl %edx, %edx
callq 0x3440
movq 0x8(%rsp), %r12
movq 0x8(%r14), %rdi
callq 0xc962
movq (%r15), %r9
leaq 0x1fd4f(%rip), %r15     # 0x2c490
leaq 0xc3a0(%rip), %rsi      # 0x18ae8
movq %r15, %rdi
movq %r12, %rdx
movl %eax, %ecx
movl %ebp, %r8d
xorl %eax, %eax
callq 0x3080
movq %r14, %rdi
movq %rbx, %rsi
movq %r15, %rdx
xorl %eax, %eax
callq 0xbc4c
movq 0x8(%rsp), %rdi
cmpq %r13, %rdi
je 0xc781
movq 0x18(%rsp), %rsi
incq %rsi
callq 0x32c0
addq $0x28, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movq %rax, %rbx
movq 0x8(%rsp), %rdi
cmpq %r13, %rdi
je 0xc7aa
movq 0x18(%rsp), %rsi
incq %rsi
callq 0x32c0
movq %rbx, %rdi
callq 0x34b0
nop
// File: /workspace/github_cpp_makefile_star2_O1/tonymuu[P]distributed-kv-store/Params.cpp
// Function: Params::setparams(char*)
void Params::setparams(char *config_file) {
	//trace.funcEntry("Params::setparams");
	char CRUD[10];
	FILE *fp = fopen(config_file,"r");

	fscanf(fp,"MAX_NNB: %d", &MAX_NNB);
	fscanf(fp,"\nSINGLE_FAILURE: %d", &SINGLE_FAILURE);
	fscanf(fp,"\nDROP_MSG: %d", &DROP_MSG);
	fscanf(fp,"\nMSG_DROP_PROB: %lf", &MSG_DROP_PROB);
	fscanf(fp,"\nCRUD_TEST: %s", CRUD);

	auto type = testTypeMap.find(CRUD);
	if(type == testTypeMap.end()){
		throw std::runtime_error("Unavailable Test Type!");
	}
	else{
		this->CRUDTEST = type->second;
	}

	//printf("Parameters of the test case: %d %d %d %lf\n", MAX_NNB, SINGLE_FAILURE, DROP_MSG, MSG_DROP_PROB);

	EN_GPSZ = MAX_NNB;
	STEP_RATE=.25;
	MAX_MSG_SIZE = 4000;
	globaltime = 0;
	dropmsg = 0;
	allNodesJoined = 0;
	for ( int i = 0; i < EN_GPSZ; i++ ) {
		allNodesJoined += i;
	}
	fclose(fp);
	//trace.funcExit("Params::setparams", SUCCESS);
	return;
}

// Assembly:
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
subq $0x38, %rsp
movq %rsi, %rax
movq %rdi, %rbx
leaq 0xc18f(%rip), %rsi      # 0x18963
movq %rax, %rdi
callq 0x3350
movq %rax, %r14
leaq 0xc37a(%rip), %rsi      # 0x18b60
movq %rax, %rdi
movq %rbx, %rdx
xorl %eax, %eax
callq 0x34d0
leaq 0x4(%rbx), %rdx
leaq 0xc36e(%rip), %rsi      # 0x18b6c
movq %r14, %rdi
xorl %eax, %eax
callq 0x34d0
leaq 0x20(%rbx), %rdx
leaq 0xc36d(%rip), %rsi      # 0x18b80
movq %r14, %rdi
xorl %eax, %eax
callq 0x34d0
leaq 0x8(%rbx), %rdx
leaq 0xc366(%rip), %rsi      # 0x18b8e
movq %r14, %rdi
xorl %eax, %eax
callq 0x34d0
leaq 0xc369(%rip), %rsi      # 0x18ba2
leaq 0x2e(%rsp), %r15
movq %r14, %rdi
movq %r15, %rdx
xorl %eax, %eax
callq 0x34d0
leaq 0x18(%rsp), %r12
movq %r12, -0x10(%r12)
movq %r15, %rdi
callq 0x3110
leaq (%rsp,%rax), %rdx
addq $0x2e, %rdx
leaq 0x8(%rsp), %rdi
movq %r15, %rsi
callq 0xb686
leaq 0x20007(%rip), %rdi     # 0x2c880
leaq 0x8(%rsp), %rsi
callq 0xc966
movq %rax, %r15
movq 0x8(%rsp), %rdi
cmpq %r12, %rdi
je 0xc89d
movq 0x18(%rsp), %rsi
incq %rsi
callq 0x32c0
testq %r15, %r15
je 0xc8fb
movl 0x28(%r15), %eax
movl %eax, 0x34(%rbx)
movl (%rbx), %eax
movl %eax, 0x18(%rbx)
movabsq $0x3fd0000000000000, %rcx # imm = 0x3FD0000000000000
movq %rcx, 0x10(%rbx)
movl $0xfa0, 0x1c(%rbx)      # imm = 0xFA0
movq $0x0, 0x24(%rbx)
testl %eax, %eax
jle 0xc8e2
leal -0x1(%rax), %ecx
leal -0x2(%rax), %edx
imulq %rcx, %rdx
shrq %rdx
addl %edx, %eax
decl %eax
jmp 0xc8e4
xorl %eax, %eax
movl %eax, 0x2c(%rbx)
movq %r14, %rdi
callq 0x32a0
addq $0x38, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
retq
movl $0x10, %edi
callq 0x3140
movq %rax, %r14
leaq 0xc2a2(%rip), %rsi      # 0x18bb1
movq %rax, %rdi
callq 0x30f0
movq 0x146d2(%rip), %rsi     # 0x20ff0
movq 0x1469b(%rip), %rdx     # 0x20fc0
movq %r14, %rdi
callq 0x3480
movq %rax, %rbx
movq %r14, %rdi
callq 0x3200
jmp 0xc959
movq %rax, %rbx
movq 0x8(%rsp), %rdi
cmpq %r12, %rdi
je 0xc959
movq 0x18(%rsp), %rsi
incq %rsi
callq 0x32c0
jmp 0xc959
movq %rax, %rbx
movq %rbx, %rdi
callq 0x34b0
nop
// File: /workspace/github_cpp_makefile_star2_O1/tonymuu[P]distributed-kv-store/Member.cpp
// Function: Member::operator=(Member const&)
Member& Member::operator =(const Member& anotherMember) {
	this->addr = anotherMember.addr;
	this->inited = anotherMember.inited;
	this->inGroup = anotherMember.inGroup;
	this->bFailed = anotherMember.bFailed;
	this->nnb = anotherMember.nnb;
	this->heartbeat = anotherMember.heartbeat;
	this->pingCounter = anotherMember.pingCounter;
	this->timeOutCounter = anotherMember.timeOutCounter;
	this->memberList = anotherMember.memberList;
	this->myPos = anotherMember.myPos;
	this->mp1q = anotherMember.mp1q;
	this->mp2q = anotherMember.mp2q;
	return *this;
}

// Assembly:
pushq %r14
pushq %rbx
pushq %rax
movq %rsi, %r14
movq %rdi, %rbx
movzwl 0xc(%rsi), %eax
movw %ax, 0xc(%rdi)
movl 0x8(%rsi), %eax
movl %eax, 0x8(%rdi)
movb 0xe(%rsi), %al
movb %al, 0xe(%rdi)
movb 0xf(%rsi), %al
movb %al, 0xf(%rdi)
movb 0x10(%rsi), %al
movb %al, 0x10(%rdi)
movl 0x14(%rsi), %eax
movl %eax, 0x14(%rdi)
movq 0x18(%rsi), %rax
movq %rax, 0x18(%rdi)
movl 0x20(%rsi), %eax
movl %eax, 0x20(%rdi)
movl 0x24(%rsi), %eax
movl %eax, 0x24(%rdi)
addq $0x28, %rsi
addq $0x28, %rdi
callq 0xcc48
movq 0x40(%r14), %rax
movq %rax, 0x40(%rbx)
leaq 0x48(%r14), %rsi
leaq 0x48(%rbx), %rdi
callq 0xcdb2
movl $0x98, %edi
addq %rdi, %r14
addq %rbx, %rdi
movq %r14, %rsi
callq 0xcdb2
movq %rbx, %rax
addq $0x8, %rsp
popq %rbx
popq %r14
retq
// File: /workspace/github_cpp_makefile_star2_O1/tonymuu[P]distributed-kv-store/Trace.cpp
// Function: Trace::traceFileCreate()
int Trace::traceFileCreate() {

    int rc = SUCCESS;        // Return code

    logF = fopen(LOG_FILE_LOCATION, "w");
    if ( NULL == logF )
    {
        printf("\nUnable to open log file in write mode\n");
        rc = FAILURE;
    }

    return rc;
}

// Assembly:
pushq %rbx
movq %rdi, %rbx
leaq 0xa58c(%rip), %rdi      # 0x18c07
leaq 0xa261(%rip), %rsi      # 0x188e3
callq 0x3350
movq %rax, %rcx
movq %rax, (%rbx)
xorl %eax, %eax
testq %rcx, %rcx
jne 0xe6a5
leaq 0xa5a5(%rip), %rdi      # 0x18c40
callq 0x3430
movl $0xffffffff, %eax       # imm = 0xFFFFFFFF
popq %rbx
retq
nop
// File: /workspace/github_cpp_makefile_star2_O1/tonymuu[P]distributed-kv-store/Trace.cpp
// Function: Trace::printToTrace(char*, char*)
int Trace::printToTrace(char *keyMsg, char *valueMsg) {

    int rc = SUCCESS;        // Return code

    fprintf(logF, "%s : %s\n", keyMsg, valueMsg);
    fflush(logF);

    return rc;
}

// Assembly:
pushq %rbx
movq %rdx, %rcx
movq %rsi, %rdx
movq %rdi, %rbx
movq (%rdi), %rdi
leaq 0xa557(%rip), %rsi      # 0x18c13
xorl %eax, %eax
callq 0x33d0
movq (%rbx), %rdi
callq 0x3340
xorl %eax, %eax
popq %rbx
retq
nop
// File: /workspace/github_cpp_makefile_star2_O1/tonymuu[P]distributed-kv-store/Trace.cpp
// Function: Trace::funcEntry(char*)
int Trace::funcEntry(char *funcName) {

    int rc = SUCCESS;        // Return code

    fprintf(logF, "ENTRY - %s\n", funcName);
    fflush(logF);

    return rc;
}

// Assembly:
pushq %rbx
movq %rsi, %rdx
movq %rdi, %rbx
movq (%rdi), %rdi
leaq 0xa52d(%rip), %rsi      # 0x18c1c
xorl %eax, %eax
callq 0x33d0
movq (%rbx), %rdi
callq 0x3340
xorl %eax, %eax
popq %rbx
retq
// File: /workspace/github_cpp_makefile_star2_O1/tonymuu[P]distributed-kv-store/Trace.cpp
// Function: Trace::funcExit(char*, int)
int Trace::funcExit(char *funcName, int f_rc) {

    int rc = SUCCESS;        // Return code

    fprintf(logF, "EXIT - %s with rc = %d\n", funcName, f_rc);
    fflush(logF);

    return rc;
}

// Assembly:
pushq %rbx
movl %edx, %ecx
movq %rsi, %rdx
movq %rdi, %rbx
movq (%rdi), %rdi
leaq 0xa513(%rip), %rsi      # 0x18c28
xorl %eax, %eax
callq 0x33d0
movq (%rbx), %rdi
callq 0x3340
xorl %eax, %eax
popq %rbx
retq
// File: /workspace/github_cpp_makefile_star2_O1/tonymuu[P]distributed-kv-store/MP2Node.cpp
// Function: MP2Node::MP2Node(Member*, Params*, EmulNet*, Log*, Address*)
MP2Node::MP2Node(Member *memberNode, Params *par, EmulNet * emulNet, Log * log, Address * address) {
	this->memberNode = memberNode;
	this->par = par;
	this->emulNet = emulNet;
	this->log = log;
	ht = new HashTable();
	this->memberNode->addr = *address;
	this->delimiter = "::";
}

// Assembly:
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
movq %r9, %r15
movq %rdi, %rbx
leaq 0x70(%rdi), %r14
leaq 0x80(%rdi), %r13
xorps %xmm0, %xmm0
movups %xmm0, 0x30(%rdi)
movups %xmm0, 0x20(%rdi)
movups %xmm0, 0x10(%rdi)
movups %xmm0, (%rdi)
xorl %eax, %eax
movq %rax, 0x40(%rdi)
movq %r13, 0x70(%rdi)
movq %rax, 0x78(%rdi)
movb $0x0, 0x80(%rdi)
addq $0x98, %rdi
movl %eax, 0x98(%rbx)
movq %rax, 0xa0(%rbx)
movq %rdi, 0xa8(%rbx)
movq %rdi, 0xb0(%rbx)
movq %rax, 0xb8(%rbx)
leaq 0xc8(%rbx), %rdi
movl %eax, 0xc8(%rbx)
movq %rax, 0xd0(%rbx)
movq %rdi, 0xd8(%rbx)
movq %rdi, 0xe0(%rbx)
movq %rax, 0xe8(%rbx)
movq %rsi, 0x50(%rbx)
movq %rdx, 0x58(%rbx)
movq %rcx, 0x60(%rbx)
movq %r8, 0x68(%rbx)
movl $0x38, %edi
callq 0x32b0
movq %rax, %r12
movq %rax, %rdi
callq 0x13c84
movq %r12, 0x48(%rbx)
movq 0x50(%rbx), %rdi
addq $0x8, %rdi
movq %r15, %rsi
callq 0xc9b6
movq 0x78(%rbx), %rdx
leaq 0xa4b9(%rip), %rcx      # 0x18cb8
movl $0x2, %r8d
movq %r14, %rdi
xorl %esi, %esi
callq 0x3440
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
retq
movq %rax, %r15
movl $0x38, %esi
movq %r12, %rdi
callq 0x32c0
jmp 0xe82e
movq %rax, %r15
leaq 0x90(%rbx), %r12
leaq 0xc0(%rbx), %rdi
callq 0x12ac8
movq %r12, %rdi
callq 0x12b5c
movq (%r14), %rdi
cmpq %r13, %rdi
je 0xe85d
movq (%r13), %rsi
incq %rsi
callq 0x32c0
leaq 0x30(%rbx), %rdi
leaq 0x18(%rbx), %r14
callq 0xb544
movq %r14, %rdi
callq 0xb544
movq %rbx, %rdi
callq 0xb544
movq %r15, %rdi
callq 0x34b0