LLM4Binary/decompile-bench-makefile huggingface dataset:
// File: /workspace/github_cpp_makefile_star2_O3/nataly-enne[P]pet-fera/pet_fera_checagem.cpp
// Function: verifica_dieta(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>&, char&)
bool verifica_dieta(string &dieta, char &sucesso){
	int cont = 0, verificacao;
	char c;
	sucesso = 'n';
	transform(dieta.begin(), dieta.end(), dieta.begin(), ::toupper); // Converte a string nome para caracteres maiúsculos.
	for(int i = 0; i < (int)dieta.size(); i++){
		c = dieta[i];
		verificacao = isalpha(c);
		if(!verificacao && c != ' ' && c != ','){
			sucesso = 'n';
			cout << "ERRO: valor inválido!" << endl << endl;
			return 0;
		}
		else cont++;
		
	}
	if(cont == (int) dieta.size()){
		transform(dieta.begin(), dieta.end(), dieta.begin(), ::tolower);
		sucesso = 's';
		return 1;
	}
	else return 0;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x18, %rsp
movq %rsi, %r12
movb $0x6e, (%rsi)
movq 0x8(%rdi), %rbx
testq %rbx, %rbx
je 0x38c9c
movq %rdi, %r13
movq (%rdi), %r14
xorl %r15d, %r15d
movsbl (%r14,%r15), %edi
callq 0x33d0
movb %al, (%r14,%r15)
incq %r15
cmpq %r15, %rbx
jne 0x38c0c
movq %r12, -0x30(%rbp)
movq 0x8(%r13), %rbx
testl %ebx, %ebx
movq %r13, -0x38(%rbp)
jle 0x38c6d
movq (%r13), %r13
movl %ebx, %r12d
andl $0x7fffffff, %r12d      # imm = 0x7FFFFFFF
xorl %r14d, %r14d
movsbl (%r13,%r14), %r15d
movl %r15d, %edi
callq 0x3320
testl %eax, %eax
jne 0x38c63
movzbl %r15b, %eax
cmpl $0x20, %eax
je 0x38c63
cmpl $0x2c, %eax
jne 0x38ca5
incq %r14
cmpq %r14, %r12
jne 0x38c43
jmp 0x38c73
jne 0x38d18
testq %rbx, %rbx
movq -0x30(%rbp), %r12
movq -0x38(%rbp), %rax
je 0x38c9c
movq (%rax), %r14
xorl %r15d, %r15d
movsbl (%r14,%r15), %edi
callq 0x32c0
movb %al, (%r14,%r15)
incq %r15
cmpq %r15, %rbx
jne 0x38c86
movb $0x73, (%r12)
movb $0x1, %al
jmp 0x38d1a
movq -0x30(%rbp), %rax
movb $0x6e, (%rax)
movq 0xf31d(%rip), %rbx      # 0x47fd0
leaq 0x29c9(%rip), %rsi      # 0x3b683
movl $0x16, %edx
movq %rbx, %rdi
callq 0x3250
movq (%rbx), %rax
movq -0x18(%rax), %rdi
addq %rbx, %rdi
movl $0xa, %esi
callq 0x31f0
movsbl %al, %esi
movq %rbx, %rdi
callq 0x3030
movq %rax, %rdi
callq 0x3130
movq %rax, %rbx
movq (%rax), %rax
movq -0x18(%rax), %rdi
addq %rbx, %rdi
movl $0xa, %esi
callq 0x31f0
movsbl %al, %esi
movq %rbx, %rdi
callq 0x3030
movq %rax, %rdi
callq 0x3130
xorl %eax, %eax
addq $0x18, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O3/nataly-enne[P]pet-fera/pet_fera_checagem.cpp
// Function: verifica_tamanho(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, char&)
bool verifica_tamanho(string tamanho_string, char &sucesso){
	int cont = 0, cont_ponto = 0, verificacao;
	char c;
	sucesso = 'n';
	for(int i = 0; i < (int)tamanho_string.size(); i++){
		c = tamanho_string[i];
		verificacao = isdigit(c);
		if(c == '.'){
			cont_ponto++;
		}
		if(!verificacao && c != '.'){
			sucesso = 'n';
			cout << "ERRO: valor inválido!" << endl << endl;
			return 0;
		}
		else cont++;
		
	}
	if(cont == (int) tamanho_string.size() && cont_ponto == 1){
		sucesso = 's';
		return 1;
	}
	else return 0;
}

// Assembly:
movb $0x6e, (%rsi)
movq 0x8(%rdi), %rcx
xorl %eax, %eax
testl %ecx, %ecx
jle 0x38dff
pushq %rbp
movq %rsp, %rbp
pushq %rbx
pushq %rax
movq (%rdi), %rdx
andl $0x7fffffff, %ecx       # imm = 0x7FFFFFFF
xorl %edi, %edi
movsbl (%rdx,%rdi), %r8d
cmpl $0x2e, %r8d
sete %r9b
leal -0x3a(%r8), %r10d
cmpl $-0xa, %r10d
setae %r10b
orb %r9b, %r10b
je 0x38d8b
xorl %r9d, %r9d
cmpb $0x2e, %r8b
sete %r9b
addl %r9d, %eax
incq %rdi
cmpq %rdi, %rcx
jne 0x38d4b
cmpl $0x1, %eax
jne 0x38df7
movb $0x73, (%rsi)
movb $0x1, %al
jmp 0x38df9
movq 0xf23e(%rip), %rbx      # 0x47fd0
leaq 0x28ea(%rip), %rsi      # 0x3b683
movl $0x16, %edx
movq %rbx, %rdi
callq 0x3250
movq (%rbx), %rax
movq -0x18(%rax), %rdi
addq %rbx, %rdi
movl $0xa, %esi
callq 0x31f0
movsbl %al, %esi
movq %rbx, %rdi
callq 0x3030
movq %rax, %rdi
callq 0x3130
movq %rax, %rbx
movq (%rax), %rax
movq -0x18(%rax), %rdi
addq %rbx, %rdi
movl $0xa, %esi
callq 0x31f0
movsbl %al, %esi
movq %rbx, %rdi
callq 0x3030
movq %rax, %rdi
callq 0x3130
xorl %eax, %eax
addq $0x8, %rsp
popq %rbx
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O3/nataly-enne[P]pet-fera/pet_fera_checagem.cpp
// Function: verifica_data(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, char&)
bool verifica_data(string ultima_muda, char &sucesso){
	int cont = 0, cont_traco = 0, verificacao;
	char c;
	sucesso = 'n';
	for(int i = 0; i < (int)ultima_muda.size(); i++){
		c = ultima_muda[i];
		verificacao = isdigit(c);
		if(c == '-'){
			cont_traco++;
		}
		if(!verificacao && c != '-'){
			sucesso = 'n';
			cout << "ERRO: valor inválido!" << endl << endl;
			return 0;
		}
		else cont++;
		
	}
	if(cont == (int) ultima_muda.size() && cont_traco == 2){
		sucesso = 's';
		return 1;
	}
	else return 0;
}

// Assembly:
movb $0x6e, (%rsi)
movq 0x8(%rdi), %rcx
xorl %eax, %eax
testl %ecx, %ecx
jle 0x38ed6
pushq %rbp
movq %rsp, %rbp
pushq %rbx
pushq %rax
movq (%rdi), %rdx
andl $0x7fffffff, %ecx       # imm = 0x7FFFFFFF
xorl %edi, %edi
movsbl (%rdx,%rdi), %r8d
cmpl $0x2d, %r8d
sete %r9b
leal -0x3a(%r8), %r10d
cmpl $-0xa, %r10d
setae %r10b
orb %r9b, %r10b
je 0x38e62
xorl %r9d, %r9d
cmpb $0x2d, %r8b
sete %r9b
addl %r9d, %eax
incq %rdi
cmpq %rdi, %rcx
jne 0x38e22
cmpl $0x2, %eax
jne 0x38ece
movb $0x73, (%rsi)
movb $0x1, %al
jmp 0x38ed0
movq 0xf167(%rip), %rbx      # 0x47fd0
leaq 0x2813(%rip), %rsi      # 0x3b683
movl $0x16, %edx
movq %rbx, %rdi
callq 0x3250
movq (%rbx), %rax
movq -0x18(%rax), %rdi
addq %rbx, %rdi
movl $0xa, %esi
callq 0x31f0
movsbl %al, %esi
movq %rbx, %rdi
callq 0x3030
movq %rax, %rdi
callq 0x3130
movq %rax, %rbx
movq (%rax), %rax
movq -0x18(%rax), %rdi
addq %rbx, %rdi
movl $0xa, %esi
callq 0x31f0
movsbl %al, %esi
movq %rbx, %rdi
callq 0x3030
movq %rax, %rdi
callq 0x3130
xorl %eax, %eax
addq $0x8, %rsp
popq %rbx
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O3/nataly-enne[P]pet-fera/pet_fera_checagem.cpp
// Function: verifica_autorizacao(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>&, char&)
bool verifica_autorizacao(string &autorizacao, char &sucesso){
	int cont = 0, cont_traco = 0, verificacao;
	char c;
	sucesso = 'n';
	transform(autorizacao.begin(), autorizacao.end(), autorizacao.begin(), ::toupper); // Converte a string nome para caracteres maiúsculos.
	for(int i = 0; i < (int)autorizacao.size(); i++){
		c = autorizacao[i];
		verificacao = isalnum(c);
		if(c == '-'){
			cont_traco++;
		}
		if(!verificacao && c != '-'){
			sucesso = 'n';
			cout << "ERRO: valor inválido!" << endl << endl;
			return 0;
		}
		else cont++;
		
	}
	if(cont == (int) autorizacao.size() && cont_traco == 1){
		transform(autorizacao.begin(), autorizacao.end(), autorizacao.begin(), ::tolower); // Converte a string autorizacao para valores minusculos.
		sucesso = 's';
		return 1;
	}
	else return 0;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x18, %rsp
movb $0x6e, (%rsi)
movq 0x8(%rdi), %rbx
testq %rbx, %rbx
je 0x39023
movq %rsi, %r12
movq %rdi, %r13
movq (%rdi), %r14
xorl %r15d, %r15d
movsbl (%r14,%r15), %edi
callq 0x33d0
movb %al, (%r14,%r15)
incq %r15
cmpq %r15, %rbx
jne 0x38f04
movq 0x8(%r13), %rax
xorl %r15d, %r15d
testl %eax, %eax
jle 0x39026
movq %r12, -0x30(%rbp)
movq %r13, -0x38(%rbp)
movq (%r13), %rbx
movq %rax, -0x40(%rbp)
movl %eax, %r13d
andl $0x7fffffff, %r13d      # imm = 0x7FFFFFFF
xorl %r14d, %r14d
movsbl (%rbx,%r14), %r12d
movl %r12d, %edi
callq 0x3220
cmpl $0x2d, %r12d
je 0x38f5d
testl %eax, %eax
je 0x38fb0
xorl %eax, %eax
cmpb $0x2d, %r12b
sete %al
addl %eax, %r15d
incq %r14
cmpq %r14, %r13
jne 0x38f46
cmpl $0x1, %r15d
jne 0x39023
movq -0x40(%rbp), %r15
testq %r15, %r15
je 0x38fa4
movq -0x38(%rbp), %rax
movq (%rax), %rbx
xorl %r14d, %r14d
movsbl (%rbx,%r14), %edi
callq 0x32c0
movb %al, (%rbx,%r14)
incq %r14
cmpq %r14, %r15
jne 0x38f8e
movq -0x30(%rbp), %rax
movb $0x73, (%rax)
movb $0x1, %r15b
jmp 0x39026
movq -0x30(%rbp), %rax
movb $0x6e, (%rax)
movq 0xf012(%rip), %rbx      # 0x47fd0
leaq 0x26be(%rip), %rsi      # 0x3b683
movl $0x16, %edx
movq %rbx, %rdi
callq 0x3250
movq (%rbx), %rax
movq -0x18(%rax), %rdi
addq %rbx, %rdi
movl $0xa, %esi
callq 0x31f0
movsbl %al, %esi
movq %rbx, %rdi
callq 0x3030
movq %rax, %rdi
callq 0x3130
movq %rax, %rbx
movq (%rax), %rax
movq -0x18(%rax), %rdi
addq %rbx, %rdi
movl $0xa, %esi
callq 0x31f0
movsbl %al, %esi
movq %rbx, %rdi
callq 0x3030
movq %rax, %rdi
callq 0x3130
xorl %r15d, %r15d
movl %r15d, %eax
addq $0x18, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O3/nataly-enne[P]pet-fera/pet_fera_checagem.cpp
// Function: verifica_origem(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>&, char&)
bool verifica_origem(string &origem, char &sucesso){
	int cont = 0, verificacao;
	char c;
	sucesso = 'n';
	transform(origem.begin(), origem.end(), origem.begin(), ::toupper); // Converte a string nome para caracteres maiúsculos.
	for(int i = 0; i < (int)origem.size(); i++){
		c = origem[i];
		verificacao = isalpha(c);
		if(!verificacao && c != ' '){
			sucesso = 'n';
			cout << "ERRO: valor inválido!" << endl << endl;
			return 0;
		}
		else cont++;
		
	}
	if(cont == (int) origem.size()){
		transform(origem.begin(), origem.end(), origem.begin(), ::tolower);
		sucesso = 's';
		return 1;
	}
	else return 0;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x18, %rsp
movq %rsi, %r12
movb $0x6e, (%rsi)
movq 0x8(%rdi), %rbx
testq %rbx, %rbx
je 0x390ed
movq %rdi, %r13
movq (%rdi), %r14
xorl %r15d, %r15d
movsbl (%r14,%r15), %edi
callq 0x33d0
movb %al, (%r14,%r15)
incq %r15
cmpq %r15, %rbx
jne 0x39065
movq %r12, -0x30(%rbp)
movq 0x8(%r13), %rbx
testl %ebx, %ebx
movq %r13, -0x38(%rbp)
jle 0x390be
movq (%r13), %r13
movl %ebx, %r12d
andl $0x7fffffff, %r12d      # imm = 0x7FFFFFFF
xorl %r14d, %r14d
movsbl (%r13,%r14), %r15d
movl %r15d, %edi
callq 0x3320
cmpl $0x20, %r15d
je 0x390b4
testl %eax, %eax
je 0x390f6
incq %r14
cmpq %r14, %r12
jne 0x3909c
jmp 0x390c4
jne 0x39169
testq %rbx, %rbx
movq -0x30(%rbp), %r12
movq -0x38(%rbp), %rax
je 0x390ed
movq (%rax), %r14
xorl %r15d, %r15d
movsbl (%r14,%r15), %edi
callq 0x32c0
movb %al, (%r14,%r15)
incq %r15
cmpq %r15, %rbx
jne 0x390d7
movb $0x73, (%r12)
movb $0x1, %al
jmp 0x3916b
movq -0x30(%rbp), %rax
movb $0x6e, (%rax)
movq 0xeecc(%rip), %rbx      # 0x47fd0
leaq 0x2578(%rip), %rsi      # 0x3b683
movl $0x16, %edx
movq %rbx, %rdi
callq 0x3250
movq (%rbx), %rax
movq -0x18(%rax), %rdi
addq %rbx, %rdi
movl $0xa, %esi
callq 0x31f0
movsbl %al, %esi
movq %rbx, %rdi
callq 0x3030
movq %rax, %rdi
callq 0x3130
movq %rax, %rbx
movq (%rax), %rax
movq -0x18(%rax), %rdi
addq %rbx, %rdi
movl $0xa, %esi
callq 0x31f0
movsbl %al, %esi
movq %rbx, %rdi
callq 0x3030
movq %rax, %rdi
callq 0x3130
xorl %eax, %eax
addq $0x18, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O3/nataly-enne[P]pet-fera/pet_fera_checagem.cpp
// Function: verifica_cor(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>&, char&)
bool verifica_cor(string &cor, char &sucesso){
	int cont = 0, verificacao;
	char c;
	sucesso = 'n';
	transform(cor.begin(), cor.end(), cor.begin(), ::toupper); // Converte a string cor para caracteres maiúsculos.
	for(int i = 0; i < (int)cor.size(); i++){
		c = cor[i];
		verificacao = isalpha(c);
		if(!verificacao && c != ' ' && c != '-'){
			sucesso = 'n';
			cout << "ERRO: valor inválido!" << endl << endl;
			return 0;
		}
		else cont++;	
	}
	if(cont == (int) cor.size()){
		transform(cor.begin(), cor.end(), cor.begin(), ::tolower); // Converte a string cor paara caracteres minusculos.
		sucesso = 's';
		return 1;
	}
	else return 0;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x18, %rsp
movq %rsi, %r12
movb $0x6e, (%rsi)
movq 0x8(%rdi), %rbx
testq %rbx, %rbx
je 0x39237
movq %rdi, %r13
movq (%rdi), %r14
xorl %r15d, %r15d
movsbl (%r14,%r15), %edi
callq 0x33d0
movb %al, (%r14,%r15)
incq %r15
cmpq %r15, %rbx
jne 0x391a7
movq %r12, -0x30(%rbp)
movq 0x8(%r13), %rbx
testl %ebx, %ebx
movq %r13, -0x38(%rbp)
jle 0x39208
movq (%r13), %r13
movl %ebx, %r12d
andl $0x7fffffff, %r12d      # imm = 0x7FFFFFFF
xorl %r14d, %r14d
movsbl (%r13,%r14), %r15d
movl %r15d, %edi
callq 0x3320
testl %eax, %eax
jne 0x391fe
movzbl %r15b, %eax
cmpl $0x20, %eax
je 0x391fe
cmpl $0x2d, %eax
jne 0x39240
incq %r14
cmpq %r14, %r12
jne 0x391de
jmp 0x3920e
jne 0x392b3
testq %rbx, %rbx
movq -0x30(%rbp), %r12
movq -0x38(%rbp), %rax
je 0x39237
movq (%rax), %r14
xorl %r15d, %r15d
movsbl (%r14,%r15), %edi
callq 0x32c0
movb %al, (%r14,%r15)
incq %r15
cmpq %r15, %rbx
jne 0x39221
movb $0x73, (%r12)
movb $0x1, %al
jmp 0x392b5
movq -0x30(%rbp), %rax
movb $0x6e, (%rax)
movq 0xed82(%rip), %rbx      # 0x47fd0
leaq 0x242e(%rip), %rsi      # 0x3b683
movl $0x16, %edx
movq %rbx, %rdi
callq 0x3250
movq (%rbx), %rax
movq -0x18(%rax), %rdi
addq %rbx, %rdi
movl $0xa, %esi
callq 0x31f0
movsbl %al, %esi
movq %rbx, %rdi
callq 0x3030
movq %rax, %rdi
callq 0x3130
movq %rax, %rbx
movq (%rax), %rax
movq -0x18(%rax), %rdi
addq %rbx, %rdi
movl $0xa, %esi
callq 0x31f0
movsbl %al, %esi
movq %rbx, %rdi
callq 0x3030
movq %rax, %rdi
callq 0x3130
xorl %eax, %eax
addq $0x18, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O3/nataly-enne[P]pet-fera/pet_fera_checagem.cpp
// Function: verifica_venenoso(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, char&)
bool verifica_venenoso(string venenoso, char &sucesso){
	int cont = 0, verificacao;
	char c;
	sucesso = 'n';
	for(int i = 0; i < (int)venenoso.size(); i++){
		c = venenoso[i];
		verificacao = isdigit(c);
		if(!verificacao || (venenoso != "0" && venenoso != "1")){
			sucesso = 'n';
			cout << "ERRO: valor inválido!" << endl << endl;
			return 0;
		}
		else cont++;		
	}
	if(cont == (int) venenoso.size()){
		sucesso = 's';
		return 1;
	}
	else return 0;

}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movq %rsi, %rbx
movb $0x6e, (%rsi)
movl 0x8(%rdi), %eax
testl %eax, %eax
jle 0x393a7
movq %rdi, %r14
xorl %r13d, %r13d
leaq 0xf58(%rip), %r15       # 0x3a248
leaq 0xe22(%rip), %r12       # 0x3a119
movq (%r14), %rax
movsbl (%rax,%r13), %eax
addl $-0x30, %eax
cmpl $0x9, %eax
ja 0x39336
movq %r14, %rdi
movq %r15, %rsi
callq 0x30c0
testl %eax, %eax
je 0x39325
movq %r14, %rdi
movq %r12, %rsi
callq 0x30c0
testl %eax, %eax
jne 0x39336
incq %r13
movq 0x8(%r14), %rax
movslq %eax, %rcx
cmpq %rcx, %r13
jl 0x392f7
jmp 0x393aa
movb $0x6e, (%rbx)
movq 0xec90(%rip), %rbx      # 0x47fd0
leaq 0x233c(%rip), %rsi      # 0x3b683
movl $0x16, %edx
movq %rbx, %rdi
callq 0x3250
movq (%rbx), %rax
movq -0x18(%rax), %rdi
addq %rbx, %rdi
movl $0xa, %esi
callq 0x31f0
movsbl %al, %esi
movq %rbx, %rdi
callq 0x3030
movq %rax, %rdi
callq 0x3130
movq %rax, %rbx
movq (%rax), %rax
movq -0x18(%rax), %rdi
addq %rbx, %rdi
movl $0xa, %esi
callq 0x31f0
movsbl %al, %esi
movq %rbx, %rdi
callq 0x3030
movq %rax, %rdi
callq 0x3130
jmp 0x393b6
xorl %r13d, %r13d
cmpl %eax, %r13d
jne 0x393b6
movb $0x73, (%rbx)
movb $0x1, %al
jmp 0x393b8
xorl %eax, %eax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O3/Neuromancer2701[P]OpenTool/src/OpenTool.cpp
// Function: OpenTool::Send(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>)
Error OpenTool::Send(string data)
{
	 Error result = Error::UNKNOWN;
	 vector<char>  buffer(data.begin(), data.end());
	 result = client.Write(buffer);

	 return result;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
subq $0x40, %rsp
movq %rdi, %rbx
movq (%rsi), %rax
movq 0x8(%rsi), %rdx
addq %rax, %rdx
leaq -0x58(%rbp), %r14
leaq -0x21(%rbp), %rcx
movq %r14, %rdi
movq %rax, %rsi
callq 0x61f0
movq (%r14), %rsi
movq 0x8(%r14), %rax
movq %rax, %r14
xorps %xmm0, %xmm0
movaps %xmm0, -0x40(%rbp)
movq $0x0, -0x30(%rbp)
subq %rsi, %r14
je 0x753a
js 0x75a2
movq %r14, %rdi
callq 0x6410
movq %rax, %r15
movq -0x58(%rbp), %rsi
movq -0x50(%rbp), %rax
movq %rax, %r12
subq %rsi, %r12
jmp 0x7540
xorl %r15d, %r15d
movq %r14, %r12
movq %r15, -0x40(%rbp)
addq %r15, %r14
movq %r14, -0x30(%rbp)
cmpq %rsi, %rax
je 0x755b
movq %r15, %rdi
movq %r12, %rdx
callq 0x6600
addq %r12, %r15
leaq -0x40(%rbp), %rsi
movq %r15, 0x8(%rsi)
addq $0x438, %rbx            # imm = 0x438
movq %rbx, %rdi
callq 0x6570
movl %eax, %ebx
movq -0x40(%rbp), %rdi
testq %rdi, %rdi
je 0x7585
callq 0x63e0
movq -0x58(%rbp), %rdi
testq %rdi, %rdi
je 0x7593
callq 0x63e0
movl %ebx, %eax
addq $0x40, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
callq 0x6180
movq %rax, %rbx
movq -0x40(%rbp), %rdi
testq %rdi, %rdi
je 0x75bd
callq 0x63e0
jmp 0x75bd
movq %rax, %rbx
movq -0x58(%rbp), %rdi
testq %rdi, %rdi
je 0x75cb
callq 0x63e0
movq %rbx, %rdi
callq 0x6680
nop
// File: /workspace/github_cpp_makefile_star2_O3/Neuromancer2701[P]OpenTool/src/OpenTool.cpp
// Function: OpenTool::isTimedOut()
bool OpenTool::isTimedOut()
{
	bool timed_out = false;
	std::chrono::time_point<std::chrono::system_clock> current_time;

	if(timer_count != -1)//Server side
	{
		if(keep_alive_timer.GetCount() > timer_count)
		{
			SendKeepAlive();
			timer_count = keep_alive_timer.GetCount();
			timed_out =  false;
		}
	}
	else //Client
	{
		current_time = std::chrono::system_clock::now();

		std::chrono::duration<double> seconds = current_time - lastSentTime;

		if(seconds.count() > timeout)
			timed_out = true;
	}

	return timed_out;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %rbx
pushq %rax
movq %rdi, %rbx
movl 0x8a0(%rdi), %eax
cmpl $-0x1, %eax
je 0x7621
movl 0xa38(%rbx), %ecx
cmpl %eax, %ecx
jle 0x761d
cmpl $0x1, 0x440(%rbx)
jne 0x7611
leaq 0x48(%rbx), %rsi
movl $0x270f, 0x364(%rbx)    # imm = 0x270F
movq %rbx, %rdi
callq 0x64d0
movl 0xa38(%rbx), %eax
movl %eax, 0x8a0(%rbx)
xorl %eax, %eax
jmp 0x7642
callq 0x6080
subq 0x898(%rbx), %rax
cvtsi2sd %rax, %xmm0
divsd 0x39fe(%rip), %xmm0     # 0xb038
ucomisd 0x38(%rbx), %xmm0
seta %al
addq $0x8, %rsp
popq %rbx
popq %rbp
retq
nop
// File: /workspace/github_cpp_makefile_star2_O3/Neuromancer2701[P]OpenTool/src/Header.cpp
// Function: Header::Unpack()
void Header::Unpack()	{

	InputStream >> std::setw(Length_Size)	>> Length;

	InputStream >> std::setw(Number_Size)	>> Number;

	InputStream >> std::setw(Revision_Size) >> Revision;

	InputStream >> std::setw(NoAckFlag_Size) >> NoAckFlag;

	InputStream >> std::setw(StationID_Size) >> StationID;

	InputStream >> std::setw(SpindleID_Size) >> SpindleID;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %rbx
pushq %rax
movq %rdi, %rbx
leaq 0x8(%rdi), %r14
movq 0x8(%rdi), %rax
movq -0x18(%rax), %rax
movl $0x4, %r15d
movq %r15, 0x18(%rdi,%rax)
leaq 0x318(%rdi), %rsi
movq %r14, %rdi
callq 0x6290
movq 0x8(%rbx), %rax
movq -0x18(%rax), %rax
movq %r15, 0x18(%rbx,%rax)
leaq -0x1c(%rbp), %rsi
movl $0x0, (%rsi)
movq %r14, %rdi
callq 0x6670
movq (%rax), %rcx
movq -0x18(%rcx), %rcx
testb $0x5, 0x20(%rax,%rcx)
jne 0x8041
movl -0x1c(%rbp), %eax
movl %eax, 0x31c(%rbx)
movq (%r14), %rax
movq -0x18(%rax), %rax
movq $0x3, 0x10(%r14,%rax)
leaq -0x20(%rbp), %rsi
movl $0x0, (%rsi)
movq %r14, %rdi
callq 0x6670
movq (%rax), %rcx
movq -0x18(%rcx), %rcx
testb $0x5, 0x20(%rax,%rcx)
jne 0x807a
movl -0x20(%rbp), %eax
movl %eax, 0x320(%rbx)
movq 0x8(%rbx), %rax
movq -0x18(%rax), %rax
movl $0x1, %r15d
movq %r15, 0x18(%rbx,%rax)
leaq 0x324(%rbx), %rsi
movq %r14, %rdi
callq 0x6380
movq 0x8(%rbx), %rax
movq -0x18(%rax), %rax
movq %r15, 0x18(%rbx,%rax)
leaq 0x328(%rbx), %rsi
movq %r14, %rdi
callq 0x6290
movq 0x8(%rbx), %rax
movq -0x18(%rax), %rax
movq $0x2, 0x18(%rbx,%rax)
addq $0x32c, %rbx            # imm = 0x32C
movq %r14, %rdi
movq %rbx, %rsi
callq 0x6290
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
nop
// File: /workspace/github_cpp_makefile_star2_O3/Neuromancer2701[P]OpenTool/src/Mid0002.cpp
// Function: Mid_0002::BuildRevision1()
void Mid_0002::BuildRevision1()
{
	OutputStream << std::setw(Index_size) << std::setfill('0') << 1;
	OutputStream << std::setw(Cell_Id_size) << std::setfill('0') << Cell_Id;
	OutputStream << std::setw(Index_size) << std::setfill('0') << 2;
	OutputStream << std::setw(Channel_Id_size) << std::setfill('0') << Channel_Id;
	OutputStream << std::setw(Index_size) << std::setfill('0') << 3;
	OutputStream << std::setw(Controller_Name_size) << std::setfill(' ') << Controller_Name;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %rbx
pushq %rax
movq %rdi, %r14
leaq 0x1a0(%rdi), %rbx
movq 0x1a0(%rdi), %rax
movq -0x18(%rax), %rcx
movq $0x2, 0x1b0(%rdi,%rcx)
movq -0x18(%rax), %rax
leaq (%rdi,%rax), %r15
addq $0x1a0, %r15            # imm = 0x1A0
cmpb $0x0, 0xe1(%r15)
jne 0x8401
movq %r15, %rdi
movl $0x20, %esi
callq 0x63f0
movb $0x1, 0xe1(%r15)
movb $0x30, 0xe0(%r15)
movq %rbx, %rdi
movl $0x1, %esi
callq 0x6640
movq (%rbx), %rax
movq -0x18(%rax), %rcx
movq $0x4, 0x10(%rbx,%rcx)
movq -0x18(%rax), %rax
leaq (%rbx,%rax), %r15
cmpb $0x0, 0xe1(%rbx,%rax)
jne 0x844d
movq %r15, %rdi
movl $0x20, %esi
callq 0x63f0
movb $0x1, 0xe1(%r15)
movb $0x30, 0xe0(%r15)
movl 0x330(%r14), %esi
movq %rbx, %rdi
callq 0x6640
movq 0x1a0(%r14), %rax
movq -0x18(%rax), %rcx
movq $0x2, 0x1b0(%r14,%rcx)
movq -0x18(%rax), %rax
leaq (%rbx,%rax), %r15
cmpb $0x0, 0x281(%r14,%rax)
jne 0x84a3
movq %r15, %rdi
movl $0x20, %esi
callq 0x63f0
movb $0x1, 0xe1(%r15)
movb $0x30, 0xe0(%r15)
movq %rbx, %rdi
movl $0x2, %esi
callq 0x6640
movq (%rbx), %rax
movq -0x18(%rax), %rcx
movq $0x2, 0x10(%rbx,%rcx)
movq -0x18(%rax), %rax
leaq (%rbx,%rax), %r15
cmpb $0x0, 0xe1(%rbx,%rax)
jne 0x84ef
movq %r15, %rdi
movl $0x20, %esi
callq 0x63f0
movb $0x1, 0xe1(%r15)
movb $0x30, 0xe0(%r15)
movl 0x334(%r14), %esi
movq %rbx, %rdi
callq 0x6640
movq 0x1a0(%r14), %rax
movq -0x18(%rax), %rcx
movq $0x2, 0x1b0(%r14,%rcx)
movq -0x18(%rax), %rax
leaq (%rbx,%rax), %r15
cmpb $0x0, 0x281(%r14,%rax)
jne 0x8545
movq %r15, %rdi
movl $0x20, %esi
callq 0x63f0
movb $0x1, 0xe1(%r15)
movb $0x30, 0xe0(%r15)
movq %rbx, %rdi
movl $0x3, %esi
callq 0x6640
movq (%rbx), %rax
movq -0x18(%rax), %rcx
movq $0x19, 0x10(%rbx,%rcx)
movq -0x18(%rax), %rax
leaq (%rbx,%rax), %r15
cmpb $0x0, 0xe1(%rbx,%rax)
jne 0x8591
movq %r15, %rdi
movl $0x20, %esi
callq 0x63f0
movb $0x1, 0xe1(%r15)
movb $0x20, 0xe0(%r15)
movq 0x338(%r14), %rsi
movq 0x340(%r14), %rdx
movq %rbx, %rdi
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
jmp 0x6460
nop
// File: /workspace/github_cpp_makefile_star2_O3/Neuromancer2701[P]OpenTool/src/Mid0002.cpp
// Function: Mid_0002::BuildRevision3()
void Mid_0002::BuildRevision3()
{
	BuildRevision2();
	OutputStream << std::setw(Index_size) << std::setfill('0') << 5;
	OutputStream << std::setw(Open_Protocol_version_size) << std::setfill('0') << Open_Protocol_version;
	OutputStream << std::setw(Index_size) << std::setfill('0') << 6;
	OutputStream << std::setw(Controller_software_version_size) << std::setfill('0') << Controller_software_version;
	OutputStream << std::setw(Index_size) << std::setfill('0') << 7;
	OutputStream << std::setw(Tool_software_version_size) << std::setfill(' ') << Tool_software_version;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %rbx
pushq %rax
movq %rdi, %rbx
callq 0x6480
leaq 0x1a0(%rbx), %r14
movq 0x1a0(%rbx), %rax
movq -0x18(%rax), %rcx
movq $0x2, 0x1b0(%rbx,%rcx)
movq -0x18(%rax), %rax
leaq (%rbx,%rax), %r15
addq $0x1a0, %r15            # imm = 0x1A0
cmpb $0x0, 0xe1(%r15)
jne 0x86ec
movq %r15, %rdi
movl $0x20, %esi
callq 0x63f0
movb $0x1, 0xe1(%r15)
movb $0x30, 0xe0(%r15)
movq %r14, %rdi
movl $0x5, %esi
callq 0x6640
movq (%r14), %rax
movq -0x18(%rax), %rcx
movq $0x13, 0x10(%r14,%rcx)
movq -0x18(%rax), %rax
leaq (%r14,%rax), %r15
cmpb $0x0, 0xe1(%r14,%rax)
jne 0x8739
movq %r15, %rdi
movl $0x20, %esi
callq 0x63f0
movb $0x1, 0xe1(%r15)
movb $0x30, 0xe0(%r15)
movq 0x378(%rbx), %rsi
movq 0x380(%rbx), %rdx
movq %r14, %rdi
callq 0x6460
movq 0x1a0(%rbx), %rax
movq -0x18(%rax), %rcx
movq $0x2, 0x1b0(%rbx,%rcx)
movq -0x18(%rax), %rax
leaq (%r14,%rax), %r15
cmpb $0x0, 0x281(%rbx,%rax)
jne 0x8795
movq %r15, %rdi
movl $0x20, %esi
callq 0x63f0
movb $0x1, 0xe1(%r15)
movb $0x30, 0xe0(%r15)
movq %r14, %rdi
movl $0x6, %esi
callq 0x6640
movq (%r14), %rax
movq -0x18(%rax), %rcx
movq $0x13, 0x10(%r14,%rcx)
movq -0x18(%rax), %rax
leaq (%r14,%rax), %r15
cmpb $0x0, 0xe1(%r14,%rax)
jne 0x87e2
movq %r15, %rdi
movl $0x20, %esi
callq 0x63f0
movb $0x1, 0xe1(%r15)
movb $0x30, 0xe0(%r15)
movq 0x398(%rbx), %rsi
movq 0x3a0(%rbx), %rdx
movq %r14, %rdi
callq 0x6460
movq 0x1a0(%rbx), %rax
movq -0x18(%rax), %rcx
movq $0x2, 0x1b0(%rbx,%rcx)
movq -0x18(%rax), %rax
leaq (%r14,%rax), %r15
cmpb $0x0, 0x281(%rbx,%rax)
jne 0x883e
movq %r15, %rdi
movl $0x20, %esi
callq 0x63f0
movb $0x1, 0xe1(%r15)
movb $0x30, 0xe0(%r15)
movq %r14, %rdi
movl $0x7, %esi
callq 0x6640
movq (%r14), %rax
movq -0x18(%rax), %rcx
movq $0x13, 0x10(%r14,%rcx)
movq -0x18(%rax), %rax
leaq (%r14,%rax), %r15
cmpb $0x0, 0xe1(%r14,%rax)
jne 0x888b
movq %r15, %rdi
movl $0x20, %esi
callq 0x63f0
movb $0x1, 0xe1(%r15)
movb $0x20, 0xe0(%r15)
movq 0x3b8(%rbx), %rsi
movq 0x3c0(%rbx), %rdx
movq %r14, %rdi
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
jmp 0x6460
nop
// File: /workspace/github_cpp_makefile_star2_O3/Neuromancer2701[P]OpenTool/src/Mid0002.cpp
// Function: Mid_0002::PackupMid0002()
void Mid_0002::PackupMid0002()
{

	switch(Revision)
	{
		default:
		case MID_Revision::Revision1:
			 Length += Rev1_size;
			 Packup();
			 BuildRevision1();
			 OutputStream << '\0';
			 break;
		case MID_Revision::Revision2:
			 Length += Rev2_size;
			 Packup();
			 BuildRevision2();
			 OutputStream << '\0';
			 break;
		case MID_Revision::Revision3:
			 Length += Rev3_size;
			 Packup();
			 BuildRevision3();
			 OutputStream << '\0';
			 break;
	}
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r14
pushq %rbx
subq $0x10, %rsp
movq %rdi, %r14
movl 0x318(%rdi), %eax
movl 0x320(%rdi), %ecx
leaq 0x1a0(%rdi), %rbx
cmpl $0x2, %ecx
je 0x8900
cmpl $0x3, %ecx
jne 0x8921
addl $0x69, %eax
movl %eax, 0x318(%r14)
movq (%r14), %rax
movq %r14, %rdi
callq *0x10(%rax)
movq %r14, %rdi
callq 0x6280
leaq -0x13(%rbp), %rsi
jmp 0x8940
addl $0x2a, %eax
movl %eax, 0x318(%r14)
movq (%r14), %rax
movq %r14, %rdi
callq *0x10(%rax)
movq %r14, %rdi
callq 0x6480
leaq -0x12(%rbp), %rsi
jmp 0x8940
addl $0x25, %eax
movl %eax, 0x318(%r14)
movq (%r14), %rax
movq %r14, %rdi
callq *0x10(%rax)
movq %r14, %rdi
callq 0x63d0
leaq -0x11(%rbp), %rsi
movb $0x0, (%rsi)
movl $0x1, %edx
movq %rbx, %rdi
callq 0x6460
addq $0x10, %rsp
popq %rbx
popq %r14
popq %rbp
retq
nop
// File: /workspace/github_cpp_makefile_star2_O3/Neuromancer2701[P]OpenTool/src/Mid0002.cpp
// Function: Mid_0002::UnPackMid0002()
void Mid_0002::UnPackMid0002()
{
	Unpack();

	switch(Revision)
	{
		default:
		case MID_Revision::Revision1:
			 ParseRevision1();
			 break;
		case MID_Revision::Revision2:
			 ParseRevision2();
			 break;
		case MID_Revision::Revision3:
			 ParseRevision3();
			 break;
	}

}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %rbx
pushq %rax
movq %rdi, %rbx
movq (%rdi), %rax
callq *0x18(%rax)
movl 0x320(%rbx), %eax
movq %rbx, %rdi
addq $0x8, %rsp
cmpl $0x2, %eax
je 0x8bf3
cmpl $0x3, %eax
jne 0x8bfa
popq %rbx
popq %rbp
jmp 0x64f0
popq %rbx
popq %rbp
jmp 0x62d0
popq %rbx
popq %rbp
jmp 0x65b0
nopl (%rax)
// File: /workspace/github_cpp_makefile_star2_O3/Neuromancer2701[P]OpenTool/src/Mid0004.cpp
// Function: Mid_0004::BuildMid0004()
void Mid_0004::BuildMid0004()
{
	Length += Number_Size;
	Length += Error_Size;
	Packup();

	OutputStream << std::setw(Number_Size) << std::setfill('0') << Number;
	OutputStream << std::setw(Error_Size) << std::setfill('0') << Error;
	OutputStream << '\0';
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %rbx
pushq %rax
movq %rdi, %r14
addl $0x6, 0x318(%rdi)
movq (%rdi), %rax
callq *0x10(%rax)
leaq 0x1a0(%r14), %rbx
movq 0x1a0(%r14), %rax
movq -0x18(%rax), %rcx
movq $0x4, 0x1b0(%r14,%rcx)
movq -0x18(%rax), %rax
leaq (%r14,%rax), %r15
addq $0x1a0, %r15            # imm = 0x1A0
cmpb $0x0, 0xe1(%r15)
jne 0x8d24
movq %r15, %rdi
movl $0x20, %esi
callq 0x63f0
movb $0x1, 0xe1(%r15)
movb $0x30, 0xe0(%r15)
movl 0x330(%r14), %esi
movq %rbx, %rdi
callq 0x6640
movq 0x1a0(%r14), %rax
movq -0x18(%rax), %rcx
movq $0x2, 0x1b0(%r14,%rcx)
movq -0x18(%rax), %rax
leaq (%rbx,%rax), %r15
cmpb $0x0, 0x281(%r14,%rax)
jne 0x8d7a
movq %r15, %rdi
movl $0x20, %esi
callq 0x63f0
movb $0x1, 0xe1(%r15)
movb $0x30, 0xe0(%r15)
movl 0x334(%r14), %esi
movq %rbx, %rdi
callq 0x6640
leaq -0x19(%rbp), %rsi
movb $0x0, (%rsi)
movl $0x1, %edx
movq %rbx, %rdi
callq 0x6460
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O3/Neuromancer2701[P]OpenTool/src/Mid0005.cpp
// Function: Mid_0005::BuildMid0005()
void Mid_0005::BuildMid0005()
{
	Length += Number_Size;
	Packup();

	OutputStream << std::setw(Number_Size) << std::setfill('0') << Number;
	OutputStream << '\0';
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %rbx
pushq %rax
movq %rdi, %r14
addl $0x4, 0x318(%rdi)
movq (%rdi), %rax
callq *0x10(%rax)
leaq 0x1a0(%r14), %rbx
movq 0x1a0(%r14), %rax
movq -0x18(%rax), %rcx
movq $0x4, 0x1b0(%r14,%rcx)
movq -0x18(%rax), %rax
leaq (%r14,%rax), %r15
addq $0x1a0, %r15            # imm = 0x1A0
cmpb $0x0, 0xe1(%r15)
jne 0x8f08
movq %r15, %rdi
movl $0x20, %esi
callq 0x63f0
movb $0x1, 0xe1(%r15)
movb $0x30, 0xe0(%r15)
movl 0x330(%r14), %esi
movq %rbx, %rdi
callq 0x6640
leaq -0x19(%rbp), %rsi
movb $0x0, (%rsi)
movl $0x1, %edx
movq %rbx, %rdi
callq 0x6460
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O3/Neuromancer2701[P]OpenTool/lib/Timer/Timer.cpp
// Function: Timer::Timer(int, int, bool)
Timer::Timer(int _seconds, int _milliseconds, bool singleshot)
{
	timerSpecs.it_value.tv_sec = seconds = _seconds;
	milliseconds =_milliseconds;
	timerSpecs.it_value.tv_nsec = MILLISECONDS_TO_NANOSECONDS * milliseconds;

	if(singleshot)
	{
		timerSpecs.it_interval.tv_sec = 0;
		timerSpecs.it_interval.tv_nsec = 0;
	}
	else
	{
		timerSpecs.it_interval.tv_sec = timerSpecs.it_value.tv_sec;
		timerSpecs.it_interval.tv_nsec = timerSpecs.it_value.tv_nsec;
	}

	sigemptyset(&SignalAction.sa_mask);
	SignalAction.sa_flags = SA_SIGINFO;
	SignalAction.sa_sigaction = Timer::signal_handler;
	memset(&signalEvent, 0, sizeof(signalEvent));
	signalEvent.sigev_notify = SIGEV_SIGNAL;
	signalEvent.sigev_value.sival_ptr = (void*) this;
	signalEvent.sigev_signo = SIGALRM;


	if (timer_create(CLOCK_REALTIME, &signalEvent, &timerID)!= 0)
	{
		perror("Could not creat the timer");
	}

	if (sigaction(SIGALRM, &SignalAction, NULL))
	{
		perror("Could not install new signal handler");
	}
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r14
pushq %rbx
movq %rdi, %rbx
movq 0x5f0b(%rip), %rax      # 0xefe0
addq $0x10, %rax
movq %rax, (%rdi)
movl %esi, 0x8(%rdi)
movslq %esi, %rax
movq %rax, 0x180(%rdi)
movl %edx, 0xc(%rdi)
imull $0xf4240, %edx, %edx    # imm = 0xF4240
movslq %edx, %rdx
movq %rdx, 0x188(%rdi)
xorl %esi, %esi
testl %ecx, %ecx
cmovneq %rsi, %rax
cmovneq %rsi, %rdx
movq %rax, 0x170(%rdi)
movq %rdx, 0x178(%rdi)
leaq 0xd8(%rdi), %r14
addq $0xe0, %rdi
callq 0x64a0
movl $0x4, 0x160(%rbx)
movq 0x5e3e(%rip), %rax      # 0xef78
movq %rax, 0xd8(%rbx)
leaq 0x98(%rbx), %rsi
xorps %xmm0, %xmm0
movups %xmm0, 0xa0(%rbx)
movups %xmm0, 0xb0(%rbx)
movups %xmm0, 0xc0(%rbx)
movq $0x0, 0xd0(%rbx)
movq %rbx, 0x98(%rbx)
movl $0xe, 0xa0(%rbx)
addq $0x10, %rbx
xorl %edi, %edi
movq %rbx, %rdx
callq 0x60b0
testl %eax, %eax
jne 0x91a6
movl $0xe, %edi
movq %r14, %rsi
xorl %edx, %edx
callq 0x64b0
testl %eax, %eax
jne 0x91b4
popq %rbx
popq %r14
popq %rbp
retq
leaq 0x1f81(%rip), %rdi      # 0xb12e
callq 0x6370
jmp 0x918e
leaq 0x1f8d(%rip), %rdi      # 0xb148
popq %rbx
popq %r14
popq %rbp
jmp 0x6370
// File: /workspace/github_cpp_makefile_star2_O3/Neuromancer2701[P]OpenTool/lib/Timer/Timer.cpp
// Function: Timer::init(int, int, bool)
void Timer::init(int seconds, int milliseconds, bool singleshot)
{
	timerSpecs.it_value.tv_sec = seconds;
	timerSpecs.it_value.tv_nsec = MILLISECONDS_TO_NANOSECONDS * milliseconds;

	if(singleshot)
	{
		timerSpecs.it_interval.tv_sec = 0;
		timerSpecs.it_interval.tv_nsec = 0;
	}
	else
	{
		timerSpecs.it_interval.tv_sec = timerSpecs.it_value.tv_sec;
		timerSpecs.it_interval.tv_nsec = timerSpecs.it_value.tv_nsec;
	}

	sigemptyset(&SignalAction.sa_mask);
	SignalAction.sa_flags = SA_SIGINFO;
	SignalAction.sa_sigaction = Timer::signal_handler;
	memset(&signalEvent, 0, sizeof(signalEvent));
	signalEvent.sigev_notify = SIGEV_SIGNAL;
	signalEvent.sigev_value.sival_ptr = (void*) this;
	signalEvent.sigev_signo = SIGALRM;


	if (timer_create(CLOCK_REALTIME, &signalEvent, &timerID)!= 0)
	{
		perror("Could not creat the timer");
	}

	if (sigaction(SIGALRM, &SignalAction, NULL))
	{
		perror("Could not install new signal handler");
	}
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r14
pushq %rbx
movq %rdi, %r14
movslq %esi, %rax
movq %rax, 0x180(%rdi)
imull $0xf4240, %edx, %edx    # imm = 0xF4240
movslq %edx, %rdx
movq %rdx, 0x188(%rdi)
xorl %esi, %esi
testl %ecx, %ecx
cmovneq %rsi, %rax
cmovneq %rsi, %rdx
movq %rax, 0x170(%rdi)
movq %rdx, 0x178(%rdi)
leaq 0xd8(%rdi), %rbx
addq $0xe0, %rdi
callq 0x64a0
movl $0x4, 0x160(%r14)
movq 0x5d0b(%rip), %rax      # 0xef78
movq %rax, 0xd8(%r14)
leaq 0x98(%r14), %rsi
xorps %xmm0, %xmm0
movups %xmm0, 0xa0(%r14)
movups %xmm0, 0xb0(%r14)
movups %xmm0, 0xc0(%r14)
movq $0x0, 0xd0(%r14)
movq %r14, 0x98(%r14)
movl $0xe, 0xa0(%r14)
addq $0x10, %r14
xorl %edi, %edi
movq %r14, %rdx
callq 0x60b0
testl %eax, %eax
jne 0x92dd
movl $0xe, %edi
movq %rbx, %rsi
xorl %edx, %edx
callq 0x64b0
testl %eax, %eax
jne 0x92eb
popq %rbx
popq %r14
popq %rbp
retq
leaq 0x1e4a(%rip), %rdi      # 0xb12e
callq 0x6370
jmp 0x92c5
leaq 0x1e56(%rip), %rdi      # 0xb148
popq %rbx
popq %r14
popq %rbp
jmp 0x6370
nop
// File: /workspace/github_cpp_makefile_star2_O3/Neuromancer2701[P]OpenTool/lib/sockets/Client.cpp
// Function: Client::Client()
Client::Client() {

	ip_address = "";
	port = 0;
	client_fd = -1;
	status = Connection_Status::UNKNOWN;
	retries = 0;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %rbx
pushq %rax
movq %rdi, %rbx
movq 0x5be4(%rip), %rax      # 0xefc8
addq $0x10, %rax
movq %rax, (%rdi)
leaq 0x18(%rdi), %r14
leaq 0x28(%rdi), %r15
movq %r15, 0x18(%rdi)
movq $0x0, 0x20(%rdi)
movb $0x0, 0x28(%rdi)
leaq 0x1efb(%rip), %rcx      # 0xb305
movq %r14, %rdi
xorl %esi, %esi
xorl %edx, %edx
xorl %r8d, %r8d
callq 0x65a0
movw $0x0, 0x38(%rbx)
movabsq $-0x100000000, %rax     # imm = 0xFFFFFFFF00000000
movq %rax, 0x8(%rbx)
movb $0x0, 0x10(%rbx)
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
movq %rax, %rbx
movq (%r14), %rdi
cmpq %r15, %rdi
je 0x944c
callq 0x63e0
movq %rbx, %rdi
callq 0x6680
// File: /workspace/github_cpp_makefile_star2_O3/Neuromancer2701[P]OpenTool/lib/sockets/Client.cpp
// Function: Client::Accept(int)
Error Client::Accept(int _server_fd){
	struct sockaddr in_addr;
	socklen_t in_len;
	int local_client_fd;
	char port_buffer[32];
	char ip_buffer[32];
	Error error_state = Error::NONE;

	DEBUG("Accepting, Server FD: %d\n ",_server_fd);
	in_len = sizeof( in_addr);
	local_client_fd = accept (_server_fd, &in_addr, &in_len);
	if (local_client_fd == -1)
	{
		if ((errno == EAGAIN) || (errno == EWOULDBLOCK))  /* We have processed all incoming connections. */
		{
			status = Connection_Status::UNKNOWN;
			error_state = Error::ACCEPT_DONE;
			client_fd = -1;
		}
		else
		{
			perror ("accept");
			status = Connection_Status::DISCONNECTED;
			error_state = Error::ACCEPT;
			client_fd = -1;
		}
	}
	else
	{
		client_fd = local_client_fd;
		status = Connection_Status::CONNECTED;
		retries = 0;

		DEBUG("Accepted connections, client FD: %d\n ",client_fd);

        int nameinfo = getnameinfo (&in_addr, in_len, ip_buffer, sizeof(ip_buffer), port_buffer, sizeof(port_buffer), NI_NUMERICHOST | NI_NUMERICSERV);
		if (nameinfo == 0)
		{
			ip_address = string(ip_buffer);
			port = atoi(port_buffer);
			DEBUG("Client Ip:%s:%d \n ",ip_address.c_str(), port);
		}

		if(setBlockingMode(Blocking_Mode::NonBlock) != Error::NONE)
		{
			perror("Nonblock failed.");
			status = Connection_Status::DISCONNECTED;
		}
	}

	return error_state;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
subq $0x90, %rsp
movl %esi, %r14d
movq %rdi, %rbx
leaq 0x1cf8(%rip), %rdi      # 0xb18b
xorl %eax, %eax
callq 0x6060
leaq -0x24(%rbp), %rdx
movl $0x10, (%rdx)
leaq -0x34(%rbp), %rsi
movl %r14d, %edi
callq 0x6130
cmpl $-0x1, %eax
je 0x959b
movl %eax, 0xc(%rbx)
movl $0x1, 0x8(%rbx)
movb $0x0, 0x10(%rbx)
leaq 0x1cdf(%rip), %rdi      # 0xb1ad
movl %eax, %esi
xorl %eax, %eax
callq 0x6060
movl -0x24(%rbp), %esi
movl $0x3, (%rsp)
leaq -0x34(%rbp), %rdi
leaq -0x60(%rbp), %rdx
leaq -0x80(%rbp), %r8
movl $0x20, %ecx
movl $0x20, %r9d
callq 0x62a0
testl %eax, %eax
jne 0x956e
leaq -0x90(%rbp), %r12
movq %r12, -0x10(%r12)
leaq -0x60(%rbp), %r14
movq %r14, %rdi
callq 0x61e0
leaq (%rax,%rbp), %rdx
addq $-0x60, %rdx
leaq -0xa0(%rbp), %r15
movq %r15, %rdi
movq %r14, %rsi
callq 0x61b0
leaq 0x18(%rbx), %rdi
movq %r15, %rsi
callq 0x6470
movq (%r15), %rdi
cmpq %r12, %rdi
je 0x954c
callq 0x63e0
leaq -0x80(%rbp), %rdi
callq 0x65c0
movw %ax, 0x38(%rbx)
movq 0x18(%rbx), %rsi
movzwl %ax, %edx
leaq 0x1c6c(%rip), %rdi      # 0xb1d3
xorl %eax, %eax
callq 0x6060
movq %rbx, %rdi
movl $0x1, %esi
callq 0x66e0
movl $0x2, %r14d
cmpl $0x2, %eax
je 0x95b9
leaq 0x1dd0(%rip), %rdi      # 0xb35d
callq 0x6370
movl $0xffffffff, 0x8(%rbx)  # imm = 0xFFFFFFFF
jmp 0x95b9
callq 0x6050
cmpl $0xb, (%rax)
jne 0x95cc
movabsq $-0x100000000, %rax     # imm = 0xFFFFFFFF00000000
movq %rax, 0x8(%rbx)
movl $0x10, %r14d
movl %r14d, %eax
addq $0x90, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
leaq 0x1bd3(%rip), %rdi      # 0xb1a6
callq 0x6370
movq $-0x1, 0x8(%rbx)
movl $0x9, %r14d
jmp 0x95b9
// File: /workspace/github_cpp_makefile_star2_O3/Neuromancer2701[P]OpenTool/lib/sockets/Client.cpp
// Function: Client::setBlockingMode(Blocking_Mode)
Error Client::setBlockingMode(Blocking_Mode mode)
{
	Error status = Error::UNKNOWN;
	int old_flags = fcntl(client_fd,F_GETFL, 0);

	if(old_flags < 0 )
	{
		perror("failed to read old flags.");
		status = Error::FCNTL_GET;
	}
	else
	{
		if(mode == Blocking_Mode::NonBlock)
		{
			old_flags |= O_NONBLOCK;
		}
		else
		{
			old_flags &= ~O_NONBLOCK;
		}

		old_flags = fcntl(client_fd,F_SETFL, old_flags);
		if(old_flags < 0 )
		{
			perror("failed to set non-block flags.");
			status = Error::FCNTL_SET;
		}
		else
		{
			status = Error::NONE;
		}
	}

	return status;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %rbx
pushq %rax
movl %esi, %r14d
movq %rdi, %rbx
movl 0xc(%rdi), %edi
movl $0x3, %r15d
movl $0x3, %esi
xorl %edx, %edx
xorl %eax, %eax
callq 0x6260
testl %eax, %eax
js 0x964e
movl %eax, %ecx
orl $0x800, %ecx            # imm = 0x800
andl $0x7ffff7ff, %eax       # imm = 0x7FFFF7FF
cmpl $0x1, %r14d
cmovel %ecx, %eax
movl 0xc(%rbx), %edi
movl $0x4, %esi
movl %eax, %edx
xorl %eax, %eax
callq 0x6260
movl %eax, %ecx
movl $0x2, %eax
testl %ecx, %ecx
js 0x965d
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
movl $0x4, %r15d
leaq 0x1c32(%rip), %rdi      # 0xb28d
jmp 0x9664
leaq 0x1c43(%rip), %rdi      # 0xb2a7
callq 0x6370
movl %r15d, %eax
jmp 0x9643
// File: /workspace/github_cpp_makefile_star2_O3/Neuromancer2701[P]OpenTool/lib/sockets/Client.cpp
// Function: Client::Disconnect()
Connection_Status Client::Disconnect()
{
	status = Connection_Status::UNKNOWN;

	    if (client_fd >= 0)
	    {
	        close(client_fd);
	        client_fd = -1;
	        status = Connection_Status::DISCONNECTED;
	    }

	return status;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %rbx
pushq %rax
movq %rdi, %rbx
movl $0x0, 0x8(%rdi)
movl 0xc(%rdi), %edi
testl %edi, %edi
js 0x98dd
callq 0x6720
movq $-0x1, 0x8(%rbx)
movl $0xffffffff, %eax       # imm = 0xFFFFFFFF
jmp 0x98df
xorl %eax, %eax
addq $0x8, %rsp
popq %rbx
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O3/Neuromancer2701[P]OpenTool/lib/sockets/Client.cpp
// Function: Client::EventRead(std::vector<char, std::allocator<char>>&)
Error Client::EventRead(vector<char>& buffer)
{
	Error error_state = Error::UNKNOWN;
	int event_fd, epoll_status;
	struct epoll_event event;
	struct epoll_event events[MAX_EVENTS];

	event_fd = epoll_create1(0);
	if (event_fd == -1)
	{
		perror ("epoll_create");
		error_state = Error::EPOLL_CREATE;
	}
	else
	{
		event.data.fd = client_fd;
		event.events = EPOLLIN | EPOLLET | EPOLLRDHUP;

		epoll_status = epoll_ctl (event_fd, EPOLL_CTL_ADD, client_fd, &event);
		if (epoll_status == -1)
		{
			perror ("epoll_create");
			error_state = Error::EPOLL_CTL;
		}
		else
		{
		    int epoll_events = epoll_wait (event_fd, events, MAX_EVENTS, 1000);
		    for (int i = 0; i < epoll_events; i++)
			{
				if((events[i].events & EPOLLERR) || (events[i].events & EPOLLHUP) || (!(events[i].events & EPOLLIN ))) /*Epoll error occured*/
				{
				  perror("epoll wait error\n");
				  error_state = Error::EPOLL_WAIT;
				  close (events[i].data.fd);
				}
				else if(events[i].events & EPOLLRDHUP)
				{
					perror("epoll event Client has hung up.\n");
					error_state = Error::EPOLL_CLOSE;
				}
				else if(client_fd == events[i].data.fd)
				{
					error_state = Read(buffer);
				}
			}
		}
	}

	return error_state;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0xd8, %rsp
movq %rsi, %rbx
movq %rdi, %r14
xorl %edi, %edi
callq 0x6500
cmpl $-0x1, %eax
je 0x99ca
movl %eax, %r12d
movl 0xc(%r14), %edx
leaq -0x34(%rbp), %rcx
movl %edx, 0x4(%rcx)
movl $0x80002001, (%rcx)     # imm = 0x80002001
movl %eax, %edi
movl $0x1, %esi
callq 0x6520
cmpl $-0x1, %eax
je 0x99dd
leaq -0x100(%rbp), %r15
movl %r12d, %edi
movq %r15, %rsi
movl $0x10, %edx
movl $0x3e8, %ecx            # imm = 0x3E8
callq 0x6200
testl %eax, %eax
jle 0x99b6
movl %eax, %r13d
xorl %eax, %eax
leaq 0x1980(%rip), %r12      # 0xb2e5
movl (%r15), %ecx
movl %ecx, %edx
andl $0x19, %edx
cmpl $0x1, %edx
jne 0x9998
btl $0xd, %ecx
jb 0x99a7
movl 0xc(%r14), %ecx
cmpl 0x4(%r15), %ecx
jne 0x998d
movq %r14, %rdi
movq %rbx, %rsi
callq 0x6220
addq $0xc, %r15
decq %r13
jne 0x9965
jmp 0x99b8
movq %r15, %rdi
callq 0x6740
movl $0xd, %eax
jmp 0x998d
movq %r12, %rdi
callq 0x6370
movl $0xf, %eax
jmp 0x998d
xorl %eax, %eax
addq $0xd8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
leaq 0x18f5(%rip), %rdi      # 0xb2c6
callq 0x6370
movl $0xb, %eax
jmp 0x99b8
leaq 0x18e2(%rip), %rdi      # 0xb2c6
callq 0x6370
movl $0xc, %eax
jmp 0x99b8
// File: /workspace/github_cpp_makefile_star2_O3/Neuromancer2701[P]OpenTool/lib/sockets/Client.cpp
// Function: Client::Read(std::vector<char, std::allocator<char>>&)
Error Client::Read(vector<char>& buffer)
{
	Error status = Error::UNKNOWN;
	int read_bytes = 0;
	char read_buffer[MAX_PACKET_LENGTH];

	read_bytes = read(client_fd, read_buffer, MAX_PACKET_LENGTH);
	if(read_bytes > 0)
	{
		buffer.resize(read_bytes);
		std::copy ( read_buffer, read_buffer + read_bytes, buffer.begin() );
		status = Error::NONE;
	}
	else
	{
		perror("failed to Read.");
		status = Error::READ;
	}

	return status;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %rbx
subq $0x2718, %rsp           # imm = 0x2718
movq %rsi, %rbx
movl 0xc(%rdi), %edi
leaq -0x2730(%rbp), %rsi
movl $0x2710, %edx           # imm = 0x2710
callq 0x6560
movq %rax, %r14
testl %r14d, %r14d
jle 0x9a63
movq %r14, %rsi
andq $0x7fffffff, %rsi       # imm = 0x7FFFFFFF
movq %rbx, %rdi
callq 0x6650
movl $0x2, %r15d
andq $0x7fffffff, %r14       # imm = 0x7FFFFFFF
je 0x9a52
movq (%rbx), %rdi
leaq -0x2730(%rbp), %rsi
movq %r14, %rdx
callq 0x6350
movl %r15d, %eax
addq $0x2718, %rsp           # imm = 0x2718
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
leaq 0x189c(%rip), %rdi      # 0xb306
callq 0x6370
movl $0x5, %r15d
jmp 0x9a52
nop
// File: /workspace/github_cpp_makefile_star2_O3/Neuromancer2701[P]OpenTool/lib/sockets/Client.cpp
// Function: Client::Write(std::vector<char, std::allocator<char>>)
Error Client::Write(vector<char>  buffer)
{
	Error status = Error::UNKNOWN;
	int written_bytes = 0;
	char write_buffer[MAX_PACKET_LENGTH];
	int size = 0;

	for(unsigned int i = 0; i < buffer.size(); i ++)
	{
		write_buffer[i] = buffer[i];
	}

	written_bytes = write(client_fd, write_buffer, size);

	if(written_bytes > 0)
	{
		status = Error::NONE;
	}
	else
	{
		perror("failed to Write.");
		status = Error::WRITE;
	}

	return status;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x2710, %rsp           # imm = 0x2710
movq (%rsi), %rax
movq 0x8(%rsi), %rcx
subq %rax, %rcx
je 0x9aa7
xorl %edx, %edx
movb (%rax,%rdx), %sil
movb %sil, -0x2710(%rbp,%rdx)
incq %rdx
movl %edx, %esi
cmpq %rsi, %rcx
ja 0x9a91
movl 0xc(%rdi), %edi
leaq -0x2710(%rbp), %rsi
xorl %edx, %edx
callq 0x6170
movq %rax, %rcx
movl $0x2, %eax
testl %ecx, %ecx
jle 0x9acd
addq $0x2710, %rsp           # imm = 0x2710
popq %rbp
retq
leaq 0x1842(%rip), %rdi      # 0xb316
callq 0x6370
movl $0x6, %eax
jmp 0x9ac4
// File: /workspace/github_cpp_makefile_star2_O3/Neuromancer2701[P]OpenTool/lib/sockets/Server.cpp
// Function: Server::setBlockingMode(Blocking_Mode)
Error Server::setBlockingMode(Blocking_Mode mode)
{
	error_state = Error::UNKNOWN;
	int old_flags = fcntl(server_fd,F_GETFL, 0);

	if(old_flags < 0 )
	{
		perror("failed to read old flags.");
		error_state = Error::FCNTL_GET;
	}
	else
	{
		if(mode == Blocking_Mode::NonBlock)
		{
			old_flags |= O_NONBLOCK;
		}
		else
		{
			old_flags &= ~O_NONBLOCK;
		}

		old_flags = fcntl(server_fd,F_SETFL, old_flags);
		if(old_flags < 0 )
		{
			perror("failed to set non-block flags.");
			error_state = Error::FCNTL_SET;
		}
		else
		{
			error_state = Error::NONE;
		}
	}

	return error_state;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %rbx
pushq %rax
movl %esi, %r14d
movq %rdi, %rbx
movl $0x0, 0x1b4(%rdi)
movl 0x1a8(%rdi), %edi
movl $0x3, %r15d
movl $0x3, %esi
xorl %edx, %edx
xorl %eax, %eax
callq 0x6260
testl %eax, %eax
js 0xa09c
movl %eax, %ecx
orl $0x800, %ecx            # imm = 0x800
andl $0x7ffff7ff, %eax       # imm = 0x7FFFF7FF
cmpl $0x1, %r14d
cmovel %ecx, %eax
movl 0x1a8(%rbx), %edi
movl $0x4, %esi
movl %eax, %edx
xorl %eax, %eax
callq 0x6260
movl %eax, %ecx
movl $0x2, %eax
testl %ecx, %ecx
js 0xa0ab
movl %eax, 0x1b4(%rbx)
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
movl $0x4, %r15d
leaq 0x11e4(%rip), %rdi      # 0xb28d
jmp 0xa0b2
leaq 0x11f5(%rip), %rdi      # 0xb2a7
callq 0x6370
movl %r15d, %eax
jmp 0xa08b
// File: /workspace/github_cpp_makefile_star2_O3/Neuromancer2701[P]OpenTool/lib/sockets/Server.cpp
// Function: Server::~Server()
Server::~Server() {

	if(server_fd > 0)
		close(server_fd);

	for(int i = 0;i < MAX_CONNECTIONS; i++)
	{
		client_list[i].Disconnect();
	}
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r14
pushq %rbx
movq %rdi, %rbx
movq 0x4ed3(%rip), %rax      # 0xefa0
addq $0x10, %rax
movq %rax, (%rdi)
movl 0x1a8(%rdi), %edi
testl %edi, %edi
jle 0xa0e3
callq 0x6720
movl $0x10, %r14d
leaq (%rbx,%r14), %rdi
callq 0x66d0
addq $0x40, %r14
cmpq $0x190, %r14            # imm = 0x190
jne 0xa0e9
leaq 0x288(%rbx), %rdi
callq 0x66b0
movq 0x190(%rbx), %rdi
testq %rdi, %rdi
je 0xa11c
callq 0x63e0
movl $0x150, %r14d           # imm = 0x150
leaq (%rbx,%r14), %rdi
callq 0x60e0
addq $-0x40, %r14
cmpq $-0x30, %r14
jne 0xa122
popq %rbx
popq %r14
popq %rbp
retq
jmp 0xa13c
movq %rax, %rdi
callq 0x7b26