LLM4Binary/decompile-bench-makefile huggingface dataset:
// File: /workspace/github_cpp_makefile_star2_O1/msu-starx[P]starx/pid.cpp
// Function: PID::computeValues()
bool PID::computeValues(void){
    if(!inAuto) return false;
    unsigned long currentTime = this->millis();
    unsigned long elapsedTime = currentTime - lastTime;
    if(elapsedTime >= sampleTime) {
        errorValue = setPoint - inputValue;
        iTerm += kiGain * errorValue;
        if(iTerm > outMax) iTerm = outMax;
        else if(iTerm < outMin) iTerm = outMin;
        dInput = inputValue - lastInput;
        // PID Equation
        outputValue = (kpGain * errorValue) + (iTerm) - (kdGain * dInput);
        //
        if(outputValue > outMax) outputValue = outMax;
        else if(outputValue < outMin) outputValue = outMin;
        lastInput = inputValue;
        lastTime = currentTime;
        return true;
    }
    else return false;
}

// Assembly:
cmpb $0x1, 0x10(%rdi)
jne 0x59f4
pushq %rbp
movq %rsp, %rbp
pushq %r14
pushq %rbx
subq $0x10, %rsp
movq %rdi, %rbx
leaq -0x20(%rbp), %r14
movq %r14, %rdi
xorl %esi, %esi
callq 0x2330
imulq $0x3e8, (%r14), %rcx    # imm = 0x3E8
movabsq $0x20c49ba5e353f7cf, %rax # imm = 0x20C49BA5E353F7CF
imulq 0x8(%r14)
movq %rdx, %rax
shrq $0x3f, %rax
sarq $0x7, %rdx
addq %rax, %rdx
addq %rcx, %rdx
movq %rdx, %rax
subq 0x20(%rbx), %rax
cmpq 0x18(%rbx), %rax
setae %al
jb 0x59eb
movsd 0x28(%rbx), %xmm0
movsd 0x40(%rbx), %xmm1
subsd %xmm0, %xmm1
movsd %xmm1, 0x38(%rbx)
movsd 0x68(%rbx), %xmm3
mulsd %xmm1, %xmm3
addsd 0x48(%rbx), %xmm3
movsd %xmm3, 0x48(%rbx)
movsd 0x80(%rbx), %xmm2
ucomisd %xmm2, %xmm3
movapd %xmm2, %xmm4
ja 0x599f
movsd 0x78(%rbx), %xmm4
ucomisd %xmm3, %xmm4
jbe 0x59a4
movsd %xmm4, 0x48(%rbx)
movapd %xmm0, %xmm3
subsd 0x58(%rbx), %xmm3
movsd %xmm3, 0x50(%rbx)
mulsd 0x60(%rbx), %xmm1
addsd 0x48(%rbx), %xmm1
mulsd 0x70(%rbx), %xmm3
subsd %xmm3, %xmm1
movsd %xmm1, 0x30(%rbx)
ucomisd %xmm2, %xmm1
ja 0x59db
movsd 0x78(%rbx), %xmm2
ucomisd %xmm1, %xmm2
jbe 0x59e0
movsd %xmm2, 0x30(%rbx)
movsd %xmm0, 0x58(%rbx)
movq %rdx, 0x20(%rbx)
movb $0x1, %al
addq $0x10, %rsp
popq %rbx
popq %r14
popq %rbp
retq
xorl %eax, %eax
retq
nop
// File: /workspace/github_cpp_makefile_star2_O1/msu-starx[P]starx/pid.cpp
// Function: PID::setTunings(double, double, double)
void PID::setTunings(double Kp, double Ki, double Kd){
    if(Kp < 0 || Ki < 0 || Kd < 0) return;
    double sampleTimeInSec = ((double)sampleTime) / 1000;
    kpGain = Kp;
    kiGain = Ki * sampleTimeInSec;
    kdGain = Kd / sampleTimeInSec;
    if(controllerDirection == REVERSE) {
        kpGain = (0 - kpGain);
        kiGain = (0 - kiGain);
        kdGain = (0 - kdGain);
    }
}

// Assembly:
xorpd %xmm3, %xmm3
ucomisd %xmm0, %xmm3
ja 0x5a81
ucomisd %xmm1, %xmm3
ja 0x5a81
ucomisd %xmm2, %xmm3
ja 0x5a81
pushq %rbp
movq %rsp, %rbp
movsd 0x18(%rdi), %xmm3
unpcklps 0x7f2(%rip), %xmm3      # xmm3 = xmm3[0],mem[0],xmm3[1],mem[1]
subpd 0x7fa(%rip), %xmm3      # 0x6220
movapd %xmm3, %xmm4
unpckhpd %xmm3, %xmm4            # xmm4 = xmm4[1],xmm3[1]
addsd %xmm3, %xmm4
divsd 0x7f6(%rip), %xmm4      # 0x6230
movsd %xmm0, 0x60(%rdi)
mulsd %xmm4, %xmm1
movsd %xmm1, 0x68(%rdi)
divsd %xmm4, %xmm2
movsd %xmm2, 0x70(%rdi)
movl 0x14(%rdi), %eax
cmpl 0xc(%rdi), %eax
jne 0x5a80
xorpd %xmm3, %xmm3
xorpd %xmm4, %xmm4
subsd %xmm0, %xmm4
movsd %xmm4, 0x60(%rdi)
xorpd %xmm0, %xmm0
subsd %xmm1, %xmm0
movsd %xmm0, 0x68(%rdi)
subsd %xmm2, %xmm3
movsd %xmm3, 0x70(%rdi)
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O1/msu-starx[P]starx/pid.cpp
// Function: PID::setSampleTime(int)
void PID::setSampleTime(int newSampleTime){
    if(newSampleTime > 0) {
        double ratio = newSampleTime / sampleTime;
        kiGain *= ratio;
        kdGain /= ratio;
        sampleTime = newSampleTime;
    }
}

// Assembly:
testl %esi, %esi
jle 0x5abb
pushq %rbp
movq %rsp, %rbp
movl %esi, %ecx
movq %rcx, %rax
xorl %edx, %edx
divq 0x18(%rdi)
cvtsi2sd %rax, %xmm0
movsd 0x68(%rdi), %xmm1
mulsd %xmm0, %xmm1
movsd %xmm1, 0x68(%rdi)
movsd 0x70(%rdi), %xmm1
divsd %xmm0, %xmm1
movsd %xmm1, 0x70(%rdi)
movq %rcx, 0x18(%rdi)
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O1/msu-starx[P]starx/pid.cpp
// Function: PID::setOutputLimits(double, double)
void PID::setOutputLimits(double Min, double Max){
    if(Min >= Max) return;
    outMin = Min;
    outMax = Max;
    if(inAuto) {
        if(outputValue > outMax) outputValue = outMax;
        else if(outputValue < outMin) outputValue = outMin;
        if(iTerm > outMax) iTerm = outMax;
        else if(iTerm < outMin) iTerm = outMin;
    }
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
ucomisd %xmm1, %xmm0
jae 0x5b11
movsd %xmm0, 0x78(%rdi)
movsd %xmm1, 0x80(%rdi)
cmpb $0x1, 0x10(%rdi)
jne 0x5b11
movsd 0x30(%rdi), %xmm3
ucomisd %xmm1, %xmm3
movapd %xmm1, %xmm2
ja 0x5af2
ucomisd %xmm3, %xmm0
movapd %xmm0, %xmm2
jbe 0x5af7
movsd %xmm2, 0x30(%rdi)
movsd 0x48(%rdi), %xmm2
ucomisd %xmm1, %xmm2
ja 0x5b0c
ucomisd %xmm2, %xmm0
movapd %xmm0, %xmm1
jbe 0x5b11
movsd %xmm1, 0x48(%rdi)
popq %rbp
retq
nop
// File: /workspace/github_cpp_makefile_star2_O1/msu-starx[P]starx/pid.cpp
// Function: PID::setMode(int)
void PID::setMode(int Mode){
    bool newAuto = Mode == AUTOMATIC;
    if(newAuto && !inAuto) {
        this->initialize();
    }
    inAuto = newAuto;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
movl 0x4(%rdi), %eax
cmpl %esi, %eax
jne 0x5b57
cmpb $0x0, 0x10(%rdi)
jne 0x5b57
movsd 0x28(%rdi), %xmm0
movsd 0x30(%rdi), %xmm1
movsd %xmm0, 0x58(%rdi)
movsd %xmm1, 0x48(%rdi)
movsd 0x80(%rdi), %xmm0
ucomisd %xmm0, %xmm1
ja 0x5b52
movsd 0x78(%rdi), %xmm0
ucomisd %xmm1, %xmm0
jbe 0x5b57
movsd %xmm0, 0x48(%rdi)
cmpl %esi, %eax
sete 0x10(%rdi)
popq %rbp
retq
nop
// File: /workspace/github_cpp_makefile_star2_O1/msu-starx[P]starx/pid.cpp
// Function: PID::initialize()
void PID::initialize(void){
    lastInput = inputValue;
    iTerm = outputValue;
    if(iTerm > outMax) iTerm = outMax;
    else if(iTerm < outMin) iTerm = outMin;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
movsd 0x28(%rdi), %xmm0
movsd 0x30(%rdi), %xmm1
movsd %xmm0, 0x58(%rdi)
movsd %xmm1, 0x48(%rdi)
movsd 0x80(%rdi), %xmm0
ucomisd %xmm0, %xmm1
ja 0x5b91
movsd 0x78(%rdi), %xmm0
ucomisd %xmm1, %xmm0
jbe 0x5b96
movsd %xmm0, 0x48(%rdi)
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O1/msu-starx[P]starx/pid.cpp
// Function: PID::setControllerDirection(int)
void PID::setControllerDirection(int Direction){
    if(inAuto && Direction != controllerDirection) {
        kpGain = (0 - kpGain);
        kiGain = (0 - kiGain);
        kdGain = (0 - kdGain);
    }
    controllerDirection = Direction;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
cmpb $0x1, 0x10(%rdi)
jne 0x5bd1
cmpl %esi, 0x14(%rdi)
je 0x5bd1
xorpd %xmm0, %xmm0
xorpd %xmm1, %xmm1
subsd 0x60(%rdi), %xmm1
movsd %xmm1, 0x60(%rdi)
xorpd %xmm1, %xmm1
subsd 0x68(%rdi), %xmm1
movsd %xmm1, 0x68(%rdi)
subsd 0x70(%rdi), %xmm0
movsd %xmm0, 0x70(%rdi)
movl %esi, 0x14(%rdi)
popq %rbp
retq
nop
// File: /workspace/github_cpp_makefile_star2_O1/msu-starx[P]starx/serial.cpp
// Function: SerialPort::openPort()
void SerialPort::openPort(void){
    fileDescriptor = open(portName, O_RDWR | O_NOCTTY);
    // portName = Name of serial port
    // O_RDWR = Allows read/write access to serial port
    // O_NOCTTY = No terminal will control the process
    // O_NDELAY = Non blocking mode (do not care about the DCD line status)
    if (fileDescriptor == -1) {
        perror("\nOpen_Port: Unable to open serial port =");
    }
    else{
        printf("\nPort %s opened successfully!\n", portName);
    }
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %rbx
pushq %rax
movq %rdi, %rbx
movq 0x118(%rdi), %rdi
movl $0x102, %esi            # imm = 0x102
xorl %eax, %eax
callq 0x2140
movl %eax, 0x4(%rbx)
cmpl $-0x1, %eax
je 0x5c17
movq 0x118(%rbx), %rsi
leaq 0x657(%rip), %rdi       # 0x6261
xorl %eax, %eax
addq $0x8, %rsp
popq %rbx
popq %rbp
jmp 0x2050
leaq 0x61a(%rip), %rdi       # 0x6238
addq $0x8, %rsp
popq %rbx
popq %rbp
jmp 0x21a0
nop
// File: /workspace/github_cpp_makefile_star2_O1/msu-starx[P]starx/serial.cpp
// Function: SerialPort::writePort(char const*)
void SerialPort::writePort(const char* bufferWrite){
    bytesWrite = write(fileDescriptor, bufferWrite, strlen(bufferWrite));
    if(bytesWrite < 0) {
        fputs("write() of bytes failed!\n", stderr);
    }
    //*// Debug SerialPort::writePort
    if(bytesWrite > 0) {
        printf("Sent: %s", bufferWrite);
        printf("\n");
    }//*/
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %rbx
pushq %rax
movq %rsi, %rbx
movq %rdi, %r14
movl 0x4(%rdi), %r15d
movq %rsi, %rdi
callq 0x20d0
movl %r15d, %edi
movq %rbx, %rsi
movq %rax, %rdx
callq 0x2090
movl %eax, 0x8(%r14)
testl %eax, %eax
js 0x5e39
cmpl $0x0, 0x8(%r14)
jle 0x5e2e
leaq 0x4ed(%rip), %rdi       # 0x62fd
movq %rbx, %rsi
xorl %eax, %eax
callq 0x2050
movl $0xa, %edi
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
jmp 0x2260
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
callq 0x2459
jmp 0x5e02
// File: /workspace/github_cpp_makefile_star2_O1/msu-starx[P]starx/serial.cpp
// Function: SerialPort::readPort()
char* SerialPort::readPort(void){
    bytesRead = read(fileDescriptor, &bufferRead, bufferSize);
    bufferRead[bytesRead] = 0;
    //*// Debug SerialPort::readPort
    if(bytesRead > 0) {
        printf("Received: %s", bufferRead);
        printf("\n");
    }//*/
    return bufferRead;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r14
pushq %rbx
movq %rdi, %r14
movl 0x4(%rdi), %edi
leaq 0x15(%r14), %rbx
movl $0xff, %edx
movq %rbx, %rsi
callq 0x2290
movl %eax, 0xc(%r14)
cltq
movb $0x0, 0x15(%r14,%rax)
cmpl $0x0, 0xc(%r14)
jle 0x5e8c
leaq 0x48e(%rip), %rdi       # 0x6306
movq %rbx, %rsi
xorl %eax, %eax
callq 0x2050
movl $0xa, %edi
callq 0x2260
movq %rbx, %rax
popq %rbx
popq %r14
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O1/sidscrazy[P]Paxos/./paxos_message.h
// Function: receive_packet(int)
message *receive_packet (int fd){
	message *m = (message *) malloc (sizeof (message));
	if (m == NULL){
		return NULL;
	}

	char buf[1024];
	size_t len = sizeof (message);
	size_t r = recv (fd, buf, len, MSG_DONTWAIT);
	if (r != len){
		free (m);
		return NULL;
	}

	memcpy (m, buf, sizeof (message));
	return m;


}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r14
pushq %rbx
subq $0x400, %rsp            # imm = 0x400
movl %edi, %r14d
movl $0x20, %edi
callq 0x2280
testq %rax, %rax
je 0x251d
movq %rax, %rbx
leaq -0x410(%rbp), %rsi
movl $0x20, %edx
movl %r14d, %edi
movl $0x40, %ecx
callq 0x2080
cmpq $0x20, %rax
jne 0x2515
movaps -0x410(%rbp), %xmm0
movaps -0x400(%rbp), %xmm1
movups %xmm1, 0x10(%rbx)
movups %xmm0, (%rbx)
jmp 0x251f
movq %rbx, %rdi
callq 0x2240
xorl %ebx, %ebx
movq %rbx, %rax
addq $0x400, %rsp            # imm = 0x400
popq %rbx
popq %r14
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O1/sidscrazy[P]Paxos/./paxos_message.h
// Function: ping(int, MSG_TYPE)
void ping (int fd, MSG_TYPE ty){
	message *m = (message *) malloc (sizeof (message));
	if (m == NULL){
		return;
	}
	m->receiver = -1;
	m->value = NO_VALUE;
	m->round = -1;
	m->type = ty;
	write (fd, (char *)m, sizeof (message));
	free (m);

}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %rbx
pushq %rax
movl %esi, %r15d
movl %edi, %ebx
movl $0x20, %edi
callq 0x2280
testq %rax, %rax
je 0x2592
movq %rax, %r14
movq $-0x1, 0x4(%rax)
movl $0xffffffff, 0xc(%rax)  # imm = 0xFFFFFFFF
movl %r15d, 0x10(%rax)
movl $0x20, %edx
movl %ebx, %edi
movq %rax, %rsi
callq 0x20a0
movq %r14, %rdi
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
jmp 0x2240
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O1/sidscrazy[P]Paxos/./paxos_message.h
// Function: dump_message(message*)
void dump_message (message *m) {
	std::cout << "Paxos Message Start" << std::endl;
	std::cout << "Sender: " << m->sender << std::endl;
	std::cout << "Receier: " << m->receiver << std::endl;
	std::cout << "Value: " << m->value << std::endl;
	std::cout << "Round: " << m->round << std::endl;
	std::cout << "Type: " << m->type << std::endl;
	std::cout << "Paxos Message End" << std::endl;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %rbx
pushq %rax
movq %rdi, %r14
movq 0x5a27(%rip), %rbx      # 0x7fd8
leaq 0x2a6c(%rip), %rsi      # 0x5024
movl $0x13, %edx
movq %rbx, %rdi
callq 0x2220
movq (%rbx), %rax
movq -0x18(%rax), %rdi
addq %rbx, %rdi
movl $0xa, %esi
callq 0x21f0
movsbl %al, %esi
movq %rbx, %rdi
callq 0x2030
movq %rax, %rdi
callq 0x2130
leaq 0x2a45(%rip), %rsi      # 0x5038
movl $0x8, %edx
movq %rbx, %rdi
callq 0x2220
movl (%r14), %esi
movq %rbx, %rdi
callq 0x2310
movq %rax, %r15
movq (%rax), %rax
movq -0x18(%rax), %rdi
addq %r15, %rdi
movl $0xa, %esi
callq 0x21f0
movsbl %al, %esi
movq %r15, %rdi
callq 0x2030
movq %rax, %rdi
callq 0x2130
leaq 0x2a05(%rip), %rsi      # 0x5041
movl $0x9, %edx
movq %rbx, %rdi
callq 0x2220
movl 0x4(%r14), %esi
movq %rbx, %rdi
callq 0x2310
movq %rax, %r15
movq (%rax), %rax
movq -0x18(%rax), %rdi
addq %r15, %rdi
movl $0xa, %esi
callq 0x21f0
movsbl %al, %esi
movq %r15, %rdi
callq 0x2030
movq %rax, %rdi
callq 0x2130
leaq 0x29c5(%rip), %rsi      # 0x504b
movl $0x7, %edx
movq %rbx, %rdi
callq 0x2220
movl 0x8(%r14), %esi
movq %rbx, %rdi
callq 0x2310
movq %rax, %r15
movq (%rax), %rax
movq -0x18(%rax), %rdi
addq %r15, %rdi
movl $0xa, %esi
callq 0x21f0
movsbl %al, %esi
movq %r15, %rdi
callq 0x2030
movq %rax, %rdi
callq 0x2130
leaq 0x2983(%rip), %rsi      # 0x5053
movl $0x7, %edx
movq %rbx, %rdi
callq 0x2220
movl 0xc(%r14), %esi
movq %rbx, %rdi
callq 0x2310
movq %rax, %r15
movq (%rax), %rax
movq -0x18(%rax), %rdi
addq %r15, %rdi
movl $0xa, %esi
callq 0x21f0
movsbl %al, %esi
movq %r15, %rdi
callq 0x2030
movq %rax, %rdi
callq 0x2130
leaq 0x2941(%rip), %rsi      # 0x505b
movl $0x6, %edx
movq %rbx, %rdi
callq 0x2220
movl 0x10(%r14), %esi
movq %rbx, %rdi
callq 0x2310
movq %rax, %r14
movq (%rax), %rax
movq -0x18(%rax), %rdi
addq %r14, %rdi
movl $0xa, %esi
callq 0x21f0
movsbl %al, %esi
movq %r14, %rdi
callq 0x2030
movq %rax, %rdi
callq 0x2130
leaq 0x28fe(%rip), %rsi      # 0x5062
movl $0x11, %edx
movq %rbx, %rdi
callq 0x2220
movq (%rbx), %rax
movq -0x18(%rax), %rdi
addq %rbx, %rdi
movl $0xa, %esi
callq 0x21f0
movsbl %al, %esi
movq %rbx, %rdi
callq 0x2030
movq %rax, %rdi
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
jmp 0x2130
// File: /workspace/github_cpp_makefile_star2_O1/sidscrazy[P]Paxos/paxos_node.cpp
// Function: main
int main (){
	/* Listen for initialization message */
	message *m;
	while (true){
		m = (receive_packet (1));
		if (m != NULL){
			break;
		}
	}

	PaxosNode node (m);
	free (m);
	node.run ();
	return 0;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r14
pushq %rbx
subq $0x110, %rsp            # imm = 0x110
movl $0x1, %edi
callq 0x24bc
testq %rax, %rax
je 0x27b0
movq %rax, %rbx
leaq -0x118(%rbp), %r14
movq %r14, %rdi
movq %rax, %rsi
callq 0x2832
movq %rbx, %rdi
callq 0x2240
movq %r14, %rdi
callq 0x293c
movq -0x38(%rbp), %rdi
testq %rdi, %rdi
je 0x27f2
callq 0x21d0
movq -0x50(%rbp), %rdi
testq %rdi, %rdi
je 0x2800
callq 0x21d0
leaq -0xa0(%rbp), %rdi
callq 0x2ba2
xorl %eax, %eax
addq $0x110, %rsp            # imm = 0x110
popq %rbx
popq %r14
popq %rbp
retq
movq %rax, %rbx
leaq -0x118(%rbp), %rdi
callq 0x29dc
movq %rbx, %rdi
callq 0x2320
nop
// File: /workspace/github_cpp_makefile_star2_O1/sidscrazy[P]Paxos/paxos_node.cpp
// Function: PaxosNode::PaxosNode(message*)
PaxosNode (message *m){
		if (m->type != MSG_INIT) {
			exit (1);
		}
		id = m->sender;
		role = m->receiver;
		num_nodes = m->value;
		n = 0;
		v = NO_VALUE;
		state = NO_VALUE;
		log = new PaxosNodeLogger (id);
	}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movq %rsi, %r15
movq %rdi, %r14
movb $0x0, 0x18(%rdi)
addq $0x28, %rdi
leaq 0x78(%r14), %rbx
movl $0xa0, %edx
xorl %esi, %esi
callq 0x2110
movq %rbx, %rdi
xorl %esi, %esi
callq 0x2a1a
xorps %xmm0, %xmm0
movups %xmm0, 0xe8(%r14)
movups %xmm0, 0xd8(%r14)
movups %xmm0, 0xc8(%r14)
movabsq $0x200000005, %rax      # imm = 0x200000005
movq %rax, 0xf8(%r14)
cmpl $0x0, 0x10(%r15)
jne 0x28ed
movl (%r15), %r12d
movl %r12d, (%r14)
movl 0x4(%r15), %eax
movl %eax, 0x8(%r14)
movl 0x8(%r15), %eax
movl %eax, 0x4(%r14)
movl $0xffffffff, %eax       # imm = 0xFFFFFFFF
movq %rax, 0xc(%r14)
movl $0xffffffff, 0x14(%r14) # imm = 0xFFFFFFFF
movl $0x228, %edi            # imm = 0x228
callq 0x2200
movq %rax, %r13
movq %rax, %rdi
movl %r12d, %esi
callq 0x3fbc
movq %r13, 0x20(%r14)
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movl $0x1, %edi
callq 0x2250
movq %rax, %r15
movq %r13, %rdi
callq 0x21d0
jmp 0x2907
movq %rax, %r15
movq 0xe0(%r14), %rdi
addq $0xc8, %r14
testq %rdi, %rdi
je 0x291f
callq 0x21d0
movq (%r14), %rdi
testq %rdi, %rdi
je 0x292c
callq 0x21d0
movq %rbx, %rdi
callq 0x2ba2
movq %r15, %rdi
callq 0x2320
// File: /workspace/github_cpp_makefile_star2_O1/sidscrazy[P]Paxos/paxos_node.cpp
// Function: PaxosNode::run()
void run (){
		std::thread t ([this]{ this->network_listener(); });
		message *m;
		while (true){
			m = NULL;
			queue_lock.lock ();
			if (!messages.empty ()){
				m = messages.front ();
				messages.pop ();
			}
			queue_lock.unlock ();
			
			process_message (m);
			proposer_state_update ();
			check_consensus ();
			check_timeout ();	
		}

	}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
subq $0x10, %rsp
movq %rdi, %rbx
leaq -0x30(%rbp), %rsi
movq %rdi, (%rsi)
leaq -0x28(%rbp), %rdi
callq 0x2bf0
leaq 0x50(%rbx), %r14
leaq 0x78(%rbx), %r15
movq %r14, %rdi
callq 0x22b0
testl %eax, %eax
jne 0x29bf
movq 0x88(%rbx), %rax
cmpq %rax, 0xa8(%rbx)
je 0x298f
movq (%rax), %r12
movq %r15, %rdi
callq 0x335c
jmp 0x2992
xorl %r12d, %r12d
movq %r14, %rdi
callq 0x2160
movq %rbx, %rdi
movq %r12, %rsi
callq 0x2c96
movq %rbx, %rdi
callq 0x2efa
movq %rbx, %rdi
callq 0x2f50
movq %rbx, %rdi
callq 0x3044
jmp 0x2966
movl %eax, %edi
callq 0x2120
jmp 0x29c8
cmpq $0x0, -0x28(%rbp)
jne 0x29d7
movq %rax, %rdi
callq 0x2320
callq 0x2070
// File: /workspace/github_cpp_makefile_star2_O1/sidscrazy[P]Paxos/paxos_node.cpp
// Function: PaxosNode::proposer_state_update()
void proposer_state_update () {
		if ((role & PROPOSER)){
			if (prepare_acks.size () == 0 && state == NO_VALUE){
				prepare ();
			} else if (votes.size () == 0 && state == PREPARING) {
				propose ();
			}

		}
	}

// Assembly:
pushq %rbp
movq %rsp, %rbp
testb $0x1, 0x8(%rdi)
jne 0x2f06
popq %rbp
retq
movq 0xe8(%rdi), %rax
cmpq 0xe0(%rdi), %rax
sete %cl
movl 0x14(%rdi), %eax
cmpl $-0x1, %eax
sete %dl
andb %cl, %dl
cmpb $0x1, %dl
jne 0x2f2d
popq %rbp
jmp 0x3dd0
movq 0xd0(%rdi), %rcx
cmpq 0xc8(%rdi), %rcx
sete %cl
cmpl $-0x4, %eax
sete %al
andb %cl, %al
cmpb $0x1, %al
jne 0x2f04
popq %rbp
jmp 0x3e90
// File: /workspace/github_cpp_makefile_star2_O1/sidscrazy[P]Paxos/paxos_node.cpp
// Function: PaxosNode::check_consensus()
void check_consensus () {
		if ((role & LEARNER)&& (role & PROPOSER) &&
			state == PROPOSING) {
			int valid_votes = 0;
			for (int i = 0; i < votes.size (); i++){
				if (votes [i]->v == v && votes [i]->n == n){
					valid_votes++;
				}
			}
			if (valid_votes > (num_nodes % 2 == 0 ? num_nodes / 2 : 1 + (num_nodes / 2))) {
				message cons (id, -1, v, n, MSG_CONSENSUS);
				network_lock.lock ();
				send_message (0, &cons);
				network_lock.unlock ();
				safe_exit (&cons);
			}
		}
	}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %rbx
subq $0x28, %rsp
movl 0x8(%rdi), %eax
notl %eax
testb $0x3, %al
jne 0x3031
movq %rdi, %rbx
cmpl $-0x5, 0x14(%rdi)
jne 0x3031
movq 0xc8(%rbx), %rcx
movq 0xd0(%rbx), %rdx
subq %rcx, %rdx
je 0x2fc3
sarq $0x3, %rdx
movl 0xc(%rbx), %esi
movl 0x10(%rbx), %edi
cmpq $0x1, %rdx
adcq $0x0, %rdx
xorl %r8d, %r8d
xorl %eax, %eax
movq (%rcx,%r8,8), %r9
cmpl %esi, 0x8(%r9)
jne 0x2fb9
xorl %r10d, %r10d
cmpl %edi, 0x4(%r9)
sete %r10b
addl %r10d, %eax
incq %r8
cmpq %r8, %rdx
jne 0x2fa1
jmp 0x2fc5
xorl %eax, %eax
movl 0x4(%rbx), %ecx
testb $0x1, %cl
jne 0x2fd1
sarl %ecx
jmp 0x2fde
movl %ecx, %edx
shrl $0x1f, %edx
addl %ecx, %edx
sarl %edx
incl %edx
movl %edx, %ecx
cmpl %ecx, %eax
jle 0x3031
movl (%rbx), %eax
movq 0xc(%rbx), %rcx
movl %eax, -0x38(%rbp)
movl $0xffffffff, -0x34(%rbp) # imm = 0xFFFFFFFF
movq %rcx, -0x30(%rbp)
movl $0x6, -0x28(%rbp)
leaq 0x28(%rbx), %r14
movq %r14, %rdi
callq 0x22b0
testl %eax, %eax
jne 0x303c
leaq -0x38(%rbp), %r15
movq %rbx, %rdi
xorl %esi, %esi
movq %r15, %rdx
callq 0x33b0
movq %r14, %rdi
callq 0x2160
movq %rbx, %rdi
movq %r15, %rsi
callq 0x37fa
addq $0x28, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
movl %eax, %edi
callq 0x2120
nop
// File: /workspace/github_cpp_makefile_star2_O1/sidscrazy[P]Paxos/paxos_node.cpp
// Function: PaxosNode::check_timeout()
void check_timeout (){
		if (role & PROPOSER){
			time_t timeStamp = time(0);
			if (timeStamp - timeout  > TIMEOUT) {
				clear_responses ();
				proposer_state_update ();
			}
		}
	}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %rbx
pushq %rax
testb $0x1, 0x8(%rdi)
je 0x307d
movq %rdi, %rbx
xorl %edi, %edi
callq 0x21c0
subq 0x100(%rbx), %rax
cmpq $0x9, %rax
jl 0x307d
movq %rbx, %rdi
callq 0x3758
movq %rbx, %rdi
addq $0x8, %rsp
popq %rbx
popq %rbp
jmp 0x2efa
addq $0x8, %rsp
popq %rbx
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O1/sidscrazy[P]Paxos/paxos_node.cpp
// Function: PaxosNode::network_listener()
void network_listener (){
		message *m;
		while (true){
			network_lock.lock ();
			m = receive_packet (1);
			network_lock.unlock ();
			if (m != NULL){
				queue_lock.lock ();
				messages.push (m);
				queue_lock.unlock ();
			}
		}
	}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movq %rdi, %rbx
leaq 0x28(%rdi), %r14
movq %r14, %rdi
callq 0x22b0
testl %eax, %eax
jne 0x314b
leaq 0x50(%rbx), %r15
leaq 0x78(%rbx), %r12
leaq -0x30(%rbp), %r13
movl $0x1, %edi
callq 0x24bc
movq %rax, -0x30(%rbp)
movq %r14, %rdi
callq 0x2160
cmpq $0x0, -0x30(%rbp)
je 0x313f
movq %r15, %rdi
callq 0x22b0
testl %eax, %eax
jne 0x314b
movq 0xa8(%rbx), %rax
movq 0xb8(%rbx), %rcx
addq $-0x8, %rcx
cmpq %rcx, %rax
je 0x312c
movq -0x30(%rbp), %rcx
movq %rcx, (%rax)
addq $0x8, 0xa8(%rbx)
jmp 0x3137
movq %r12, %rdi
movq %r13, %rsi
callq 0x3152
movq %r15, %rdi
callq 0x2160
movq %r14, %rdi
callq 0x22b0
testl %eax, %eax
je 0x30db
movl %eax, %edi
callq 0x2120
// File: /workspace/github_cpp_makefile_star2_O1/sidscrazy[P]Paxos/paxos_node.cpp
// Function: PaxosNode::clear_responses()
void clear_responses (){
		if (role & LEARNER){
			for (int i = 0; i < votes.size (); i++){
				free (votes [i]);
			}
			votes.clear ();
		}
		prepare_acks.clear ();
		state = NO_VALUE;
	}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r14
pushq %rbx
movq %rdi, %rbx
testb $0x2, 0x8(%rdi)
je 0x37b3
movq 0xc8(%rbx), %rax
movq 0xd0(%rbx), %rcx
cmpq %rax, %rcx
je 0x37a7
xorl %r14d, %r14d
movq (%rax,%r14,8), %rdi
callq 0x2240
incq %r14
movq 0xc8(%rbx), %rax
movq 0xd0(%rbx), %rcx
movq %rcx, %rdx
subq %rax, %rdx
sarq $0x3, %rdx
cmpq %r14, %rdx
ja 0x377e
cmpq %rax, %rcx
je 0x37b3
movq %rax, 0xd0(%rbx)
movq 0xe0(%rbx), %rax
cmpq %rax, 0xe8(%rbx)
je 0x37ca
movq %rax, 0xe8(%rbx)
movl $0xffffffff, 0x14(%rbx) # imm = 0xFFFFFFFF
popq %rbx
popq %r14
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O1/sidscrazy[P]Paxos/paxos_node.cpp
// Function: PaxosNode::safe_exit(message*)
void safe_exit (message *m) {
		log->CloseLogFile ();
		m->type = MSG_TEARDOWN;
		network_lock.lock ();
		send_message (0, m);
		while (true){
			m = receive_packet (1);
			if (m != NULL){
				if (m->type == MSG_TEARDOWN){
					network_lock.unlock ();
					exit (0);
				}
			}
		}
	}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %rbx
pushq %rax
movq %rsi, %r14
movq %rdi, %r15
movq 0x20(%rdi), %rdi
callq 0x450a
movl $0x8, 0x10(%r14)
leaq 0x28(%r15), %rbx
movq %rbx, %rdi
callq 0x22b0
testl %eax, %eax
jne 0x385c
movq %r15, %rdi
xorl %esi, %esi
movq %r14, %rdx
callq 0x33b0
movl $0x1, %edi
callq 0x24bc
testq %rax, %rax
je 0x3838
cmpl $0x8, 0x10(%rax)
jne 0x3838
movq %rbx, %rdi
callq 0x2c8c
xorl %edi, %edi
callq 0x2250
movl %eax, %edi
callq 0x2120
nop
// File: /workspace/github_cpp_makefile_star2_O1/sidscrazy[P]Paxos/paxos_node.cpp
// Function: PaxosNode::simulate_crash()
void simulate_crash (){
		int c = rand () % 100;
		int crash_type = rand () % 100;
		if (c < p_crash){
			/* Don't sleep while holding locks. It's fine
			   to just modify system state accordingly when
			   waking up. */
			network_lock.lock ();
			log->Crash ();
			notify_crash (CRASH_ENTRY);
			network_lock.unlock ();

			int crash_duration = (rand () % (CRASH_DUR * 3) ) + 1;
			sleep (crash_duration);

			network_lock.lock ();
			queue_lock.lock ();
			while (!messages.empty ()) {
				message *m = messages.front ();
				messages.pop ();
				free (m);
			}
			queue_lock.unlock ();
			/* Machine Failure. Clear all current
			   state and then recover from log. */
			if (crash_type < crash_dist) {
				clear_responses ();
			}


			clear_network ();
			log->ResumeFromCrash ();
			notify_crash (RESUME_ENTRY);
			network_lock.unlock ();
		}
	}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movq %rdi, %rbx
callq 0x2060
movslq %eax, %r14
imulq $0x51eb851f, %r14, %rax # imm = 0x51EB851F
movq %rax, %rcx
shrq $0x3f, %rcx
sarq $0x25, %rax
addl %ecx, %eax
imull $0x64, %eax, %eax
subl %eax, %r14d
callq 0x2060
cmpl 0xf8(%rbx), %r14d
jge 0x39d4
movl %eax, %r15d
leaq 0x28(%rbx), %r14
movq %r14, %rdi
callq 0x22b0
testl %eax, %eax
jne 0x39e3
movq 0x20(%rbx), %rdi
callq 0x498c
movq %rbx, %rdi
movl $0x2, %esi
callq 0x3d68
movq %r14, %rdi
callq 0x2160
callq 0x2060
cltq
imulq $0x2aaaaaab, %rax, %rcx # imm = 0x2AAAAAAB
movq %rcx, %rdx
shrq $0x3f, %rdx
shrq $0x20, %rcx
addl %edx, %ecx
addl %ecx, %ecx
leal (%rcx,%rcx,2), %ecx
negl %ecx
leal (%rax,%rcx), %edi
incl %edi
callq 0x2150
movq %r14, %rdi
callq 0x22b0
testl %eax, %eax
jne 0x39e3
movq %r14, -0x30(%rbp)
leaq 0x50(%rbx), %r12
movq %r12, %rdi
callq 0x22b0
testl %eax, %eax
jne 0x39e3
movslq %r15d, %r14
imulq $0x51eb851f, %r14, %rax # imm = 0x51EB851F
movq %rax, %rcx
shrq $0x3f, %rcx
sarq $0x25, %rax
addl %ecx, %eax
imull $0x64, %eax, %eax
subl %eax, %r14d
movq 0x88(%rbx), %rax
cmpq %rax, 0xa8(%rbx)
je 0x3986
leaq 0x78(%rbx), %r15
movq (%rax), %r13
movq %r15, %rdi
callq 0x335c
movq %r13, %rdi
callq 0x2240
movq 0x88(%rbx), %rax
cmpq %rax, 0xa8(%rbx)
jne 0x3963
movq %r12, %rdi
callq 0x2160
cmpl 0xfc(%rbx), %r14d
jge 0x399f
movq %rbx, %rdi
callq 0x3758
movq %rbx, %rdi
callq 0x3db0
movq 0x20(%rbx), %rdi
callq 0x4a6e
movq %rbx, %rdi
movl $0x3, %esi
callq 0x3d68
movq -0x30(%rbp), %rdi
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
jmp 0x2160
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movl %eax, %edi
callq 0x2120
// File: /workspace/github_cpp_makefile_star2_O1/sidscrazy[P]Paxos/paxos_node.cpp
// Function: PaxosNode::notify_crash(int)
void notify_crash (int code) {
		message m (id, -1, code, n, MSG_CRASH);
		auto now = std::chrono::system_clock::now();
   		m.timestamp = std::chrono::duration_cast<std::chrono::nanoseconds>(now.time_since_epoch()).count();
		send_packet (0, &m);
	}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %rbx
subq $0x28, %rsp
movl (%rdi), %eax
movl 0x10(%rdi), %ecx
leaq -0x28(%rbp), %rbx
movl %eax, (%rbx)
movl $0xffffffff, 0x4(%rbx)  # imm = 0xFFFFFFFF
movl %esi, 0x8(%rbx)
movl %ecx, 0xc(%rbx)
movl $0x9, 0x10(%rbx)
callq 0x2040
movq %rax, 0x18(%rbx)
movl $0x20, %edx
xorl %edi, %edi
movq %rbx, %rsi
callq 0x20a0
addq $0x28, %rsp
popq %rbx
popq %rbp
retq
nop
// File: /workspace/github_cpp_makefile_star2_O1/sidscrazy[P]Paxos/paxos_node.cpp
// Function: PaxosNode::clear_network()
void clear_network () {
		message *m;
		while (true){
			m = receive_packet (1);
			if (m == NULL){
				break;
			} else {
				free (m);
			}
		}

	}

// Assembly:
pushq %rbp
movq %rsp, %rbp
movl $0x1, %edi
callq 0x24bc
testq %rax, %rax
je 0x3dcd
movq %rax, %rdi
callq 0x2240
jmp 0x3db4
popq %rbp
retq
nop
// File: /workspace/github_cpp_makefile_star2_O1/sidscrazy[P]Paxos/paxos_node.cpp
// Function: PaxosNode::prepare()
void prepare (){
		if (role & PROPOSER){
			n += 1;
			message m (id, -1, -1, n, MSG_PREPARE);

			clear_responses ();
			network_lock.lock ();
			send_message (0, &m);
			network_lock.unlock ();
			prepare_acks.push_back (id);
			state = PREPARING;
			timeout = time(0);
			simulate_crash ();

		}
	}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r14
pushq %rbx
subq $0x20, %rsp
testb $0x1, 0x8(%rdi)
je 0x3e7f
movq %rdi, %rbx
movl 0x10(%rdi), %eax
incl %eax
movl %eax, 0x10(%rdi)
movl (%rdi), %ecx
movl %ecx, -0x30(%rbp)
movq $-0x1, -0x2c(%rbp)
movl %eax, -0x24(%rbp)
movl $0x1, -0x20(%rbp)
callq 0x3758
leaq 0x28(%rbx), %r14
movq %r14, %rdi
callq 0x22b0
testl %eax, %eax
jne 0x3e88
leaq -0x30(%rbp), %rdx
movq %rbx, %rdi
xorl %esi, %esi
callq 0x33b0
movq %r14, %rdi
callq 0x2160
movq 0xe8(%rbx), %rsi
cmpq 0xf0(%rbx), %rsi
je 0x3e53
movl (%rbx), %eax
movl %eax, (%rsi)
addq $0x4, %rsi
movq %rsi, 0xe8(%rbx)
jmp 0x3e62
leaq 0xe0(%rbx), %rdi
movq %rbx, %rdx
callq 0x3af6
movl $0xfffffffc, 0x14(%rbx) # imm = 0xFFFFFFFC
xorl %edi, %edi
callq 0x21c0
movq %rax, 0x100(%rbx)
movq %rbx, %rdi
callq 0x3864
addq $0x20, %rsp
popq %rbx
popq %r14
popq %rbp
retq
movl %eax, %edi
callq 0x2120
nop
// File: /workspace/github_cpp_makefile_star2_O1/sidscrazy[P]Paxos/paxos_node.cpp
// Function: PaxosNode::propose()
void propose (){

		if ((num_nodes % 2 == 0 ? num_nodes / 2 : 1 + (num_nodes / 2)) > prepare_acks.size ()){
			return;
		}

		proposed_v = true;

		state = PROPOSING;

		if (v == NO_VALUE){
			v = rand () % 250;
		}
		vote *vo = (vote *) malloc (sizeof (vote));
		vo->node = id;
		vo->n = n;
		vo->v = v;
		votes.push_back (vo);

		message m (id, -1, v, n, MSG_PROPOSE);
		network_lock.lock ();
		send_message (0, &m);
		network_lock.unlock ();
		timeout  = time(0);
		simulate_crash ();
	}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r14
pushq %rbx
subq $0x30, %rsp
movq %rdi, %rbx
movl 0x4(%rdi), %eax
testb $0x1, %al
jne 0x3ea9
sarl %eax
jmp 0x3eb6
movl %eax, %ecx
shrl $0x1f, %ecx
addl %eax, %ecx
sarl %ecx
incl %ecx
movl %ecx, %eax
cltq
movq 0xe8(%rbx), %rcx
subq 0xe0(%rbx), %rcx
sarq $0x2, %rcx
cmpq %rax, %rcx
jb 0x3fac
movb $0x1, 0x18(%rbx)
movl $0xfffffffb, 0x14(%rbx) # imm = 0xFFFFFFFB
cmpl $-0x1, 0xc(%rbx)
jne 0x3f0a
callq 0x2060
cltq
imulq $0x10624dd3, %rax, %rcx # imm = 0x10624DD3
movq %rcx, %rdx
shrq $0x3f, %rdx
sarq $0x24, %rcx
addl %edx, %ecx
imull $0xfa, %ecx, %ecx
subl %ecx, %eax
movl %eax, 0xc(%rbx)
movl $0xc, %edi
callq 0x2280
movq %rax, -0x18(%rbp)
movl (%rbx), %ecx
movl %ecx, (%rax)
movl 0x10(%rbx), %ecx
movl %ecx, 0x4(%rax)
movl 0xc(%rbx), %ecx
movl %ecx, 0x8(%rax)
movq 0xd0(%rbx), %rsi
cmpq 0xd8(%rbx), %rsi
je 0x3f45
movq %rax, (%rsi)
addq $0x8, 0xd0(%rbx)
jmp 0x3f55
leaq 0xc8(%rbx), %rdi
leaq -0x18(%rbp), %rdx
callq 0x3c2e
movl (%rbx), %eax
movq 0xc(%rbx), %rcx
movl %eax, -0x38(%rbp)
movl $0xffffffff, -0x34(%rbp) # imm = 0xFFFFFFFF
movq %rcx, -0x30(%rbp)
movl $0x3, -0x28(%rbp)
leaq 0x28(%rbx), %r14
movq %r14, %rdi
callq 0x22b0
testl %eax, %eax
jne 0x3fb5
leaq -0x38(%rbp), %rdx
movq %rbx, %rdi
xorl %esi, %esi
callq 0x33b0
movq %r14, %rdi
callq 0x2160
xorl %edi, %edi
callq 0x21c0
movq %rax, 0x100(%rbx)
movq %rbx, %rdi
callq 0x3864
addq $0x30, %rsp
popq %rbx
popq %r14
popq %rbp
retq
movl %eax, %edi
callq 0x2120
// File: /workspace/github_cpp_makefile_star2_O1/sidscrazy[P]Paxos/./plan/PaxosNodeLogger.cpp
// Function: PaxosNodeLogger::PaxosNodeLogger(int)
PaxosNodeLogger::PaxosNodeLogger(int nodeid)
{
    nodeuniqueid = nodeid;
    SetLogFileName(nodeid);
    OpenLogFile(logfilename);
    AddLogFileHeader();
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
subq $0x20, %rsp
movl %esi, %r14d
movq %rdi, %rbx
callq 0x2300
leaq 0x210(%rbx), %r15
movq %r15, 0x200(%rbx)
movq $0x0, 0x208(%rbx)
movb $0x0, 0x210(%rbx)
movl %r14d, 0x220(%rbx)
movq %rbx, %rdi
movl %r14d, %esi
callq 0x40a4
leaq -0x30(%rbp), %r12
movq %r12, -0x10(%r12)
movq 0x200(%rbx), %rsi
movq 0x208(%rbx), %rdx
addq %rsi, %rdx
leaq -0x40(%rbp), %rdi
callq 0x4b50
leaq 0x70(%rbx), %rdi
callq 0x2050
testb %al, %al
jne 0x4049
leaq -0x40(%rbp), %rsi
movq %rbx, %rdi
movl $0x10, %edx
callq 0x20f0
movq -0x40(%rbp), %rdi
cmpq %r12, %rdi
je 0x4057
callq 0x21d0
movq %rbx, %rdi
callq 0x42ba
addq $0x20, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
movq %rax, %r14
movq -0x40(%rbp), %rdi
cmpq %r12, %rdi
je 0x4082
callq 0x21d0
jmp 0x4082
movq %rax, %r14
movq 0x200(%rbx), %rdi
cmpq %r15, %rdi
je 0x4093
callq 0x21d0
movq %rbx, %rdi
callq 0x22c0
movq %r14, %rdi
callq 0x2320
nop
// File: /workspace/github_cpp_makefile_star2_O1/sidscrazy[P]Paxos/./plan/PaxosNodeLogger.cpp
// Function: PaxosNodeLogger::AddMsg(message*, int)
void PaxosNodeLogger::AddMsg (message *m, int role) {
    myfile << "\n"; // get to the new line for next entry.
    myfile << m->timestamp        << ",";         // get to the new line for next entry.
    myfile << m->sender     << ",";         // string: unique guid for the node which owns this log file, same as file name.
    myfile << m->receiver     << ",";         
    myfile << MSG_ENTRY         << ",";         // int: denotes if the node is alive is crashed state.
    myfile << m->round                 << ",";         // int: The value of N proposed or accepted by a node. In say Broadcast action, its value is redundant.
    myfile << m->value             << ",";         // string: Pick value v of highest proposal number -> this is the v we are talking about
    myfile << role          << ",";         // int: Proposer, Acceptor, Learner.
    myfile << m->round     << ",";         // int: Maximum Promised value of N so far for the node. Even leader can have a promised N
    if (m->type == MSG_CONSENSUS){
        myfile << m->value    << ","; 
    } else {
        myfile << ""    << ","; 
    }
    myfile << m->type     << ",";         // int Current action on the node as the logging is happening                              
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
movl %edx, %r12d
movq %rsi, %r14
movq %rdi, %rbx
leaq 0xbae(%rip), %rsi       # 0x5277
movl $0x1, %edx
callq 0x2220
movq 0x18(%r14), %rsi
movq %rbx, %rdi
callq 0x21e0
leaq 0xb3a(%rip), %r15       # 0x5220
movl $0x1, %edx
movq %rax, %rdi
movq %r15, %rsi
callq 0x2220
movl (%r14), %esi
movq %rbx, %rdi
callq 0x2310
movl $0x1, %edx
movq %rax, %rdi
movq %r15, %rsi
callq 0x2220
movl 0x4(%r14), %esi
movq %rbx, %rdi
callq 0x2310
movl $0x1, %edx
movq %rax, %rdi
movq %r15, %rsi
callq 0x2220
movq %rbx, %rdi
movl $0x1, %esi
callq 0x2310
movl $0x1, %edx
movq %rax, %rdi
movq %r15, %rsi
callq 0x2220
movl 0xc(%r14), %esi
movq %rbx, %rdi
callq 0x2310
movl $0x1, %edx
movq %rax, %rdi
movq %r15, %rsi
callq 0x2220
movl 0x8(%r14), %esi
movq %rbx, %rdi
callq 0x2310
movl $0x1, %edx
movq %rax, %rdi
movq %r15, %rsi
callq 0x2220
movq %rbx, %rdi
movl %r12d, %esi
callq 0x2310
movl $0x1, %edx
movq %rax, %rdi
movq %r15, %rsi
callq 0x2220
movl 0xc(%r14), %esi
movq %rbx, %rdi
callq 0x2310
movl $0x1, %edx
movq %rax, %rdi
movq %r15, %rsi
callq 0x2220
cmpl $0x6, 0x10(%r14)
jne 0x47d1
movl 0x8(%r14), %esi
movq %rbx, %rdi
callq 0x2310
movq %rax, %rdi
jmp 0x47e5
leaq 0xaa0(%rip), %rsi       # 0x5278
movq %rbx, %rdi
xorl %edx, %edx
callq 0x2220
movq %rbx, %rdi
leaq 0xa34(%rip), %r15       # 0x5220
movl $0x1, %edx
movq %r15, %rsi
callq 0x2220
movl 0x10(%r14), %esi
movq %rbx, %rdi
callq 0x2310
movl $0x1, %edx
movq %rax, %rdi
movq %r15, %rsi
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
jmp 0x2220
nop
// File: /workspace/github_cpp_makefile_star2_O1/sidscrazy[P]Paxos/./plan/PaxosNodeLogger.cpp
// Function: PaxosNodeLogger::CrashSequence(message*)
void PaxosNodeLogger::CrashSequence (message *m){
    myfile << "\n"; // get to the new line for next entry.
    myfile << m->timestamp        << ",";         // get to the new line for next entry.
    myfile << m->sender     << ",";         // string: unique guid for the node which owns this log file, same as file name.
    myfile << "-1" << ",";
    myfile << m->value         << ",";         // int: denotes if the node is alive is crashed state.
    myfile << "-1"                  << ",";         // int: The value of N proposed or accepted by a node. In say Broadcast action, its value is redundant.
    myfile << "-1"            << ",";         // string: Pick value v of highest proposal number -> this is the v we are talking about
    myfile << "-1"           << ",";         // int: Proposer, Acceptor, Learner.
    myfile << "-1"      << ",";         // int: Maximum Promised value of N so far for the node. Even leader can have a promised N
    myfile << "-1"     << ","; 
    myfile << "-1"      << ",";         // int Current action on the node as the logging is happening      
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
movq %rsi, %r12
movq %rdi, %rbx
leaq 0xa41(%rip), %rsi       # 0x5277
movl $0x1, %edx
callq 0x2220
movq 0x18(%r12), %rsi
movq %rbx, %rdi
callq 0x21e0
leaq 0x9cc(%rip), %r14       # 0x5220
movl $0x1, %edx
movq %rax, %rdi
movq %r14, %rsi
callq 0x2220
movl (%r12), %esi
movq %rbx, %rdi
callq 0x2310
movl $0x1, %edx
movq %rax, %rdi
movq %r14, %rsi
callq 0x2220
leaq 0x9f5(%rip), %r15       # 0x527c
movl $0x2, %edx
movq %rbx, %rdi
movq %r15, %rsi
callq 0x2220
movl $0x1, %edx
movq %rbx, %rdi
movq %r14, %rsi
callq 0x2220
movl 0x8(%r12), %esi
movq %rbx, %rdi
callq 0x2310
movl $0x1, %edx
movq %rax, %rdi
movq %r14, %rsi
callq 0x2220
movl $0x2, %edx
movq %rbx, %rdi
movq %r15, %rsi
callq 0x2220
movl $0x1, %edx
movq %rbx, %rdi
movq %r14, %rsi
callq 0x2220
movl $0x2, %edx
movq %rbx, %rdi
movq %r15, %rsi
callq 0x2220
movl $0x1, %edx
movq %rbx, %rdi
movq %r14, %rsi
callq 0x2220
movl $0x2, %edx
movq %rbx, %rdi
movq %r15, %rsi
callq 0x2220
movl $0x1, %edx
movq %rbx, %rdi
movq %r14, %rsi
callq 0x2220
movl $0x2, %edx
movq %rbx, %rdi
movq %r15, %rsi
callq 0x2220
movl $0x1, %edx
movq %rbx, %rdi
movq %r14, %rsi
callq 0x2220
movl $0x2, %edx
movq %rbx, %rdi
movq %r15, %rsi
callq 0x2220
movl $0x1, %edx
movq %rbx, %rdi
movq %r14, %rsi
callq 0x2220
movl $0x2, %edx
movq %rbx, %rdi
movq %r15, %rsi
callq 0x2220
movl $0x1, %edx
movq %rbx, %rdi
movq %r14, %rsi
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
jmp 0x2220
// File: /workspace/github_cpp_makefile_star2_O1/ArashPartow[P]exprtk-extras/exprtk_gnuplot.cpp
// Function: main
int main()
{
   exprtk_gnuplot_fx plotter;

   plotter
      .set_expression("clamp(-1.0,sin(2 * pi * x) + cos(x / 2 * pi),+1.0)")
      .set_domain(-5,+5)
      .set_title("ExprTk GNUPlot Example");

   plotter.plot();

   return 0;
}

// Assembly:
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
subq $0xa8, %rsp
leaq 0x58(%rsp), %rbx
movq %rbx, -0x10(%rbx)
xorl %eax, %eax
movq %rax, -0x8(%rbx)
movb %al, (%rbx)
leaq 0x78(%rsp), %r14
movq %r14, -0x10(%r14)
movq %rax, -0x8(%r14)
movb %al, (%r14)
xorps %xmm0, %xmm0
movups %xmm0, 0x10(%r14)
movups %xmm0, 0x20(%r14)
leaq 0x38(%rsp), %r15
movq %r15, -0x10(%r15)
leaq 0x1af527(%rip), %rsi    # 0x2c88cf
leaq 0x1af552(%rip), %rdx    # 0x2c8901
leaq 0x28(%rsp), %rdi
callq 0x198f0a
leaq 0x68(%rsp), %rdi
leaq 0x28(%rsp), %rsi
callq 0x116570
movaps 0x1aac41(%rip), %xmm0   # 0x2c4010
movups %xmm0, 0x88(%rsp)
leaq 0x18(%rsp), %r12
movq %r12, -0x10(%r12)
leaq 0x1af51a(%rip), %rsi    # 0x2c8902
leaq 0x1af529(%rip), %rdx    # 0x2c8918
leaq 0x8(%rsp), %rdi
callq 0x198f0a
leaq 0x48(%rsp), %rdi
leaq 0x8(%rsp), %rsi
callq 0x116570
movq 0x8(%rsp), %rdi
cmpq %r12, %rdi
je 0x11941f
movq 0x18(%rsp), %rsi
incq %rsi
callq 0x116080
movq 0x28(%rsp), %rdi
cmpq %r15, %rdi
je 0x119436
movq 0x38(%rsp), %rsi
incq %rsi
callq 0x116080
leaq 0x48(%rsp), %rdi
callq 0x1195c8
testb %al, %al
je 0x11944e
leaq 0x48(%rsp), %rdi
callq 0x1199ae
movq 0x68(%rsp), %rdi
cmpq %r14, %rdi
je 0x119465
movq 0x78(%rsp), %rsi
incq %rsi
callq 0x116080
movq 0x48(%rsp), %rdi
cmpq %rbx, %rdi
je 0x11947c
movq 0x58(%rsp), %rsi
incq %rsi
callq 0x116080
xorl %eax, %eax
addq $0xa8, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
retq
movq %rax, %rbx
movq 0x8(%rsp), %rdi
cmpq %r12, %rdi
je 0x1194ae
movq 0x18(%rsp), %rsi
incq %rsi
callq 0x116080
jmp 0x1194ae
jmp 0x1194ab
movq %rax, %rbx
movq 0x28(%rsp), %rdi
cmpq %r15, %rdi
je 0x1194cc
movq 0x38(%rsp), %rsi
incq %rsi
callq 0x116080
jmp 0x1194cc
jmp 0x1194c9
movq %rax, %rbx
leaq 0x48(%rsp), %rdi
callq 0x119586
movq %rbx, %rdi
callq 0x1162f0
// File: /workspace/github_cpp_makefile_star2_O1/ArashPartow[P]exprtk-extras/exprtk_gnuplot.cpp
// Function: exprtk_gnuplot_fx::generate_gp_script()
bool generate_gp_script()
   {
      std::ofstream stream("plot.gp");

      if (!stream)
      {
         return false;
      }

      stream << "set term png\n";
      stream << "set output 'plot.png'\n";
      stream << "set xrange[" << min_x_ << ":" << max_x_ <<"]\n";
      stream << "set yrange[" << min_y_ << ":" << max_y_ <<"]\n";
      stream << "set xzeroaxis\n";
      stream << "set yzeroaxis\n";
      stream << "plot 'data.dat' using 1:2:(1.0) smooth unique title '" << title_ <<"'\n";

      return true;
   }

// Assembly:
pushq %rbp
pushq %r14
pushq %rbx
subq $0x200, %rsp            # imm = 0x200
movq %rdi, %rbx
leaq 0x1b3a36(%rip), %rsi    # 0x2cd3f9
movq %rsp, %r14
movq %r14, %rdi
movl $0x10, %edx
callq 0x116150
movq (%r14), %rax
movq -0x18(%rax), %rax
movl 0x20(%rsp,%rax), %ebp
testb $0x5, %bpl
jne 0x119b21
leaq 0x1b3a12(%rip), %rsi    # 0x2cd401
movq %rsp, %rdi
movl $0xd, %edx
callq 0x1164f0
leaq 0x1b3a0c(%rip), %rsi    # 0x2cd40f
movq %rsp, %rdi
movl $0x16, %edx
callq 0x1164f0
leaq 0x1b3a0f(%rip), %rsi    # 0x2cd426
movq %rsp, %rdi
movl $0xb, %edx
callq 0x1164f0
movsd 0x40(%rbx), %xmm0
movq %rsp, %rdi
callq 0x1163a0
movq %rax, %r14
leaq 0x1af5ee(%rip), %rsi    # 0x2c9029
movl $0x1, %edx
movq %rax, %rdi
callq 0x1164f0
movsd 0x48(%rbx), %xmm0
movq %r14, %rdi
callq 0x1163a0
leaq 0x1b39d6(%rip), %rsi    # 0x2cd432
movl $0x2, %edx
movq %rax, %rdi
callq 0x1164f0
leaq 0x1b39c5(%rip), %rsi    # 0x2cd435
movq %rsp, %rdi
movl $0xb, %edx
callq 0x1164f0
movsd 0x50(%rbx), %xmm0
movq %rsp, %rdi
callq 0x1163a0
movq %rax, %r14
leaq 0x1af595(%rip), %rsi    # 0x2c9029
movl $0x1, %edx
movq %rax, %rdi
callq 0x1164f0
movsd 0x58(%rbx), %xmm0
movq %r14, %rdi
callq 0x1163a0
leaq 0x1b397d(%rip), %rsi    # 0x2cd432
movl $0x2, %edx
movq %rax, %rdi
callq 0x1164f0
leaq 0x1b3978(%rip), %rsi    # 0x2cd441
movq %rsp, %rdi
movl $0xe, %edx
callq 0x1164f0
leaq 0x1b3973(%rip), %rsi    # 0x2cd450
movq %rsp, %rdi
movl $0xe, %edx
callq 0x1164f0
leaq 0x1b396e(%rip), %rsi    # 0x2cd45f
movq %rsp, %rdi
movl $0x35, %edx
callq 0x1164f0
movq (%rbx), %rsi
movq 0x8(%rbx), %rdx
movq %rsp, %rdi
callq 0x1164f0
leaq 0x1b390f(%rip), %rsi    # 0x2cd423
movl $0x2, %edx
movq %rax, %rdi
callq 0x1164f0
testb $0x5, %bpl
sete %bl
movq 0x31b499(%rip), %rax    # 0x434fc8
movq (%rax), %rcx
movq 0x18(%rax), %rax
leaq 0x8(%rsp), %rdi
movq %rcx, -0x8(%rdi)
movq -0x18(%rcx), %rcx
movq %rax, (%rsp,%rcx)
callq 0x1162d0
leaq 0xf8(%rsp), %rdi
callq 0x116360
movl %ebx, %eax
addq $0x200, %rsp            # imm = 0x200
popq %rbx
popq %r14
popq %rbp
retq
movq %rax, %rbx
movq %rsp, %rdi
callq 0x1163c0
movq %rbx, %rdi
callq 0x1162f0
// File: /workspace/github_cpp_makefile_star2_O1/ra101[P]Generic-BlockChain-container-cpp/./includes/rsa.hpp
// Function: ra::rsa_key_pair::create_key(unsigned long)
void rsa_key_pair::create_key(unsigned long seed)
    {
        random_prime_engine<std::default_random_engine> eng(seed);
        do
        {
            // two random prime int
            int p1 = eng();
            int p2 = eng();

            int n = p1 * p2;
            int phin = n - p1 - p2 + 1; //(p1-1)*(p2-1)
            int e = get_e(phin);
            int k = get_k(phin, e);
            int d = (k * phin + 1) / e;

            // multipplication to BIG_NO is way to concatenate n and e or d
            public_key = n * BIG_NO + e;
            private_key = n * BIG_NO + d;
        } while (!are_keys_valid());
    }

// Assembly:
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x20, %rsp
movq %rdi, %rbx
leaq 0x8(%rsp), %r14
movq $0x0, 0x8(%r14)
movabsq $0x200000005, %rcx      # imm = 0x200000005
movq %rsi, %rax
mulq %rcx
movq %rsi, %rax
subq %rdx, %rax
shrq %rax
addq %rdx, %rax
shrq $0x1e, %rax
movq %rax, %rcx
shlq $0x1f, %rcx
subq %rcx, %rax
leaq (%rsi,%rax), %rcx
cmpq $0x1, %rcx
leaq 0x3b98(%rip), %rcx      # 0x6030
adcq %rsi, %rax
movq %rcx, 0x10(%r14)
movq %rax, (%r14)
movabsq $0x174876e800, %r12     # imm = 0x174876E800
movabsq $-0x501400f434db5501, %r13 # imm = 0xAFEBFF0BCB24AAFF
movq %r14, %rdi
callq 0x2ee0
movl %eax, %r15d
movq %r14, %rdi
callq 0x2ee0
movl %eax, %esi
movl %eax, %r9d
imull %r15d, %r9d
movl %r9d, %edi
subl %esi, %edi
subl %r15d, %edi
leal 0x1(%rdi), %ecx
movl $0x3, %r10d
cmpl $0x3, %edi
jl 0x24fc
movl %ecx, %eax
xorl %edx, %edx
divl %r10d
testl %edx, %edx
jne 0x24fc
addl $0x2, %r10d
cmpl %edi, %r10d
jle 0x24e8
testl %edi, %edi
jle 0x2537
leal -0x1(%rsi), %eax
imull %eax, %r15d
subl %r15d, %esi
addl $0x2, %edi
movl $0x1, %r8d
movl %edi, %eax
cltd
idivl %r10d
testl %edx, %edx
je 0x253d
leal (%rsi,%r8), %eax
incl %eax
movl %r8d, %edx
incl %edx
addl %ecx, %edi
movl %edx, %r8d
cmpl $0x1, %eax
jne 0x2513
movl %ecx, %r8d
jmp 0x253d
movl $0x1, %r8d
imull %ecx, %r8d
incl %r8d
movl %r8d, %eax
cltd
idivl %r10d
movslq %r9d, %rdx
imulq %r12, %rdx
movslq %r10d, %rcx
addq %rdx, %rcx
movq %rcx, 0x8(%rbx)
movslq %eax, %rsi
addq %rdx, %rsi
movq %rsi, (%rbx)
movq %rcx, %rax
mulq %r13
movq %rdx, %rcx
movq %rsi, %rax
mulq %r13
shrq $0x24, %rcx
shrq $0x24, %rdx
cmpl %edx, %ecx
jne 0x24b6
addq $0x20, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
retq
// File: /workspace/github_cpp_makefile_star2_O1/ra101[P]Generic-BlockChain-container-cpp/./includes/rsa.hpp
// Function: ra::encrypt(unsigned long, unsigned long long)
std::size_t encrypt(std::size_t digest, unsigned long long int others_public_key)
    {
        int n = others_public_key / BIG_NO; // retrive n
        int e = others_public_key % BIG_NO; // retrive e
        long long int res = 1;              // Initialize result
        long long int x = digest;
        x = x % n; // Update x if it is more than or
                   // equal to n
        while (e > 0)
        {
            // If e is odd, multiply x with result
            if (e & 1)
                res = (res * x) % n;
            // e must be even now
            e = e >> 1; // e = e/2
            x = (x * x) % n;
        }
        return res;
    }

// Assembly:
movabsq $-0x501400f434db5501, %rcx # imm = 0xAFEBFF0BCB24AAFF
movq %rsi, %rax
mulq %rcx
movq %rdx, %rcx
shrq $0x24, %rcx
imull $0x4876e800, %ecx, %eax # imm = 0x4876E800
subl %eax, %esi
movl $0x1, %r8d
testl %esi, %esi
jle 0x2690
movq %rdi, %rax
cqto
idivq %rcx
movq %rdx, %rdi
testb $0x1, %sil
je 0x2681
imulq %rdi, %r8
movq %r8, %rax
cqto
idivq %rcx
movq %rdx, %r8
movl %esi, %eax
shrl %eax
imulq %rdi, %rdi
cmpl $0x1, %esi
movl %eax, %esi
ja 0x2661
movq %r8, %rax
retq
// File: /workspace/github_cpp_makefile_star2_O1/ra101[P]Generic-BlockChain-container-cpp/./includes/rsa.hpp
// Function: ra::rsa_key_pair::decrypt(unsigned int)
std::size_t rsa_key_pair::decrypt(unsigned encrypted_data)
    {
        int n = private_key / BIG_NO; // retrive n
        int d = private_key % BIG_NO; // retrive d
        unsigned long long int res = 1;
        unsigned long long int x = encrypted_data;
        x = x % n;
        while (d > 0) // exact simmilar encrypt
        {
            if (d & 1)
                res = (res * x) % n;
            d = d >> 1;
            x = (x * x) % n;
        }
        return res;
    }

// Assembly:
movq (%rdi), %rcx
movabsq $-0x501400f434db5501, %rdx # imm = 0xAFEBFF0BCB24AAFF
movq %rcx, %rax
mulq %rdx
movq %rdx, %r9
shrq $0x24, %r9
imull $0x4876e800, %r9d, %eax # imm = 0x4876E800
subl %eax, %ecx
testl %ecx, %ecx
jle 0x26f3
movl %esi, %r8d
movl $0x1, %edi
movq %r8, %rax
xorl %edx, %edx
divq %r9
movq %rdx, %r8
testb $0x1, %cl
je 0x26e2
imulq %r8, %rdi
movq %rdi, %rax
xorl %edx, %edx
divq %r9
movq %rdx, %rdi
movl %ecx, %eax
shrl %eax
imulq %r8, %r8
cmpl $0x1, %ecx
movl %eax, %ecx
ja 0x26c3
jmp 0x26f8
movl $0x1, %edi
movq %rdi, %rax
retq