LLM4Binary/decompile-bench-makefile huggingface dataset:
// File: /workspace/github_cpp_makefile_star2_O3/luigix25[P]SSLP/library/ReadFileManager.cpp
// Function: ReadFileManager::compute_size_file()
uint64_t ReadFileManager::compute_size_file(){
	fs.open(file_name, fstream::in | fstream::binary);
	if(fs.fail()){ 
		cout << "LOG: file can't open" << endl;
		return false;
	}	
	fs.seekg (0,fs.end);
	uint64_t length = fs.tellg(); 
	fs.close();
	return length;
}

// Assembly:
pushq %r14
pushq %rbx
pushq %rax
movq %rdi, %r14
leaq 0x28(%rdi), %rbx
leaq 0x8(%rdi), %rsi
movq %rbx, %rdi
movl $0xc, %edx
callq 0x4640
movq 0x28(%r14), %rax
movq -0x18(%rax), %rax
testb $0x5, 0x48(%r14,%rax)
je 0x7d35
movq 0x82cb(%rip), %rbx      # 0xffc0
leaq 0x37d7(%rip), %rsi      # 0xb4d3
movl $0x14, %edx
movq %rbx, %rdi
callq 0x44e0
movq (%rbx), %rax
movq -0x18(%rax), %rdi
addq %rbx, %rdi
movl $0xa, %esi
callq 0x4410
movsbl %al, %esi
movq %rbx, %rdi
callq 0x4040
movq %rax, %rdi
callq 0x42f0
xorl %r14d, %r14d
jmp 0x7d57
movq %rbx, %rdi
xorl %esi, %esi
movl $0x2, %edx
callq 0x4620
movq %rbx, %rdi
callq 0x47a0
movq %rax, %r14
movq %rbx, %rdi
callq 0x4070
movq %r14, %rax
addq $0x8, %rsp
popq %rbx
popq %r14
retq
// File: /workspace/github_cpp_makefile_star2_O3/luigix25[P]SSLP/library/ReadFileManager.cpp
// Function: ReadFileManager::openStream()
bool ReadFileManager::openStream(){
	if(!fs.is_open()){
		fs.open(file_name, fstream::in | fstream::binary);
		if(fs.fail()){ 
			cout << "LOG: file can't open" << endl;
			return false;
		}
	}
	return true;
}

// Assembly:
pushq %r14
pushq %rbx
pushq %rax
movq %rdi, %r14
addq $0xa8, %rdi
callq 0x40d0
movb $0x1, %bl
testb %al, %al
jne 0x7df3
leaq 0x28(%r14), %rdi
leaq 0x8(%r14), %rsi
movl $0xc, %edx
callq 0x4640
movq 0x28(%r14), %rax
movq -0x18(%rax), %rax
testb $0x5, 0x48(%r14,%rax)
je 0x7df3
movq 0x820a(%rip), %rbx      # 0xffc0
leaq 0x3716(%rip), %rsi      # 0xb4d3
movl $0x14, %edx
movq %rbx, %rdi
callq 0x44e0
movq (%rbx), %rax
movq -0x18(%rax), %rdi
addq %rbx, %rdi
movl $0xa, %esi
callq 0x4410
movsbl %al, %esi
movq %rbx, %rdi
callq 0x4040
movq %rax, %rdi
callq 0x42f0
xorl %ebx, %ebx
movl %ebx, %eax
addq $0x8, %rsp
popq %rbx
popq %r14
retq
nop
// File: /workspace/github_cpp_makefile_star2_O3/luigix25[P]SSLP/library/ReadFileManager.cpp
// Function: ReadFileManager::read(Chunk&)
file_status ReadFileManager::read(Chunk &c){ 	

	if(!openStream()){
		return FILE_ERROR;
	}	
	uint64_t chunk_address = file_size - remaining_size; //secure, only internal modify
	uint64_t size; // curent chunk size
	if(remaining_size >= MAX_CHUNK_SIZE){
		size = MAX_CHUNK_SIZE;
	} else{
		size = remaining_size; //if last chunk have lower size
	}
	c.size = size;
	fs.seekg(chunk_address); // Set position on disk in input stream
	c.setPlainText(new char[size]);

	fs.read(c.getPlainText(), size);
	if(!fs){
		return FILE_ERROR;
	}

	remaining_size -= c.size;

	closeStream();
	
	if(remaining_size <= 0){
		return END_OF_FILE;
	}
	return NO_ERRORS;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
movq %rsi, %r14
movq %rdi, %rbx
movq (%rdi), %rax
callq *(%rax)
movl $0x2, %ebp
testb %al, %al
je 0x7ea9
movq 0x238(%rbx), %rsi
movq 0x240(%rbx), %rax
subq %rax, %rsi
movl $0x40000, %r15d         # imm = 0x40000
cmpq %r15, %rax
cmovbq %rax, %r15
movl %r15d, 0x10(%r14)
leaq 0x28(%rbx), %r12
movq %r12, %rdi
xorl %edx, %edx
callq 0x45a0
movq %r15, %rdi
callq 0x4030
movq %r14, %rdi
movq %rax, %rsi
callq 0xa32c
movq %r14, %rdi
callq 0xa386
movq %r12, %rdi
movq %rax, %rsi
movq %r15, %rdx
callq 0x4590
movq 0x28(%rbx), %rax
movq -0x18(%rax), %rax
testb $0x5, 0x48(%rbx,%rax)
jne 0x7ea9
movslq 0x10(%r14), %rax
subq %rax, 0x240(%rbx)
movq %rbx, %rdi
callq 0x78a6
xorl %eax, %eax
cmpq $0x0, 0x240(%rbx)
sete %al
leal (%rax,%rax,2), %ebp
movl %ebp, %eax
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O3/luigix25[P]SSLP/library/EncryptManager.cpp
// Function: EncryptManager::EncryptManager()
EncryptManager::EncryptManager(){

  	this->ctx = EVP_CIPHER_CTX_new();
  	if(!EVP_EncryptInit(ctx, EVP_aes_128_cbc(), this->key, this->IV)){
  		perror("Error In EVP_EncryptInit");
  	}

	incrementIV();

}

// Assembly:
pushq %r14
pushq %rbx
pushq %rax
movq %rdi, %rbx
callq 0x4280
movq %rax, %r14
movq %rax, (%rbx)
callq 0x4230
leaq 0x86ce(%rip), %rdx      # 0x105a0
leaq 0x86d7(%rip), %rcx      # 0x105b0
movq %r14, %rdi
movq %rax, %rsi
callq 0x45d0
testl %eax, %eax
je 0x7ef4
addq $0x8, %rsp
popq %rbx
popq %r14
jmp 0xa17c
leaq 0x35ff(%rip), %rdi      # 0xb4fa
callq 0x43b0
jmp 0x7ee8
// File: /workspace/github_cpp_makefile_star2_O3/luigix25[P]SSLP/library/EncryptManager.cpp
// Function: EncryptManager::EncryptUpdate(char*&, int&, char const*, int)
bool EncryptManager::EncryptUpdate(char *& ciphertext, int32_t& ciphertext_len, const char* plaintext ,int32_t plaintext_len){

	ciphertext = new char[plaintext_len + AES_BLOCK];
 	
 	if(!EVP_EncryptUpdate(this->ctx, (unsigned char*)ciphertext, &ciphertext_len, (unsigned char*)plaintext, plaintext_len)){
    	perror("Error in EVP_EncryptUpdate");
    	return false;
    }

    return true;

}

// Assembly:
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
movl %r8d, %ebx
movq %rcx, %r14
movq %rdx, %r15
movq %rsi, %r12
movq %rdi, %r13
leal 0x10(%rbx), %eax
movslq %eax, %rdi
callq 0x4030
movq %rax, (%r12)
movq (%r13), %rdi
movq %rax, %rsi
movq %r15, %rdx
movq %r14, %rcx
movl %ebx, %r8d
callq 0x4090
movl %eax, %ebx
testl %eax, %eax
je 0x7fa3
testl %ebx, %ebx
setne %al
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
retq
leaq 0x3569(%rip), %rdi      # 0xb513
callq 0x43b0
jmp 0x7f94
nop
// File: /workspace/github_cpp_makefile_star2_O3/luigix25[P]SSLP/library/EncryptManager.cpp
// Function: EncryptManager::EncryptUpdate(EncryptedChunk&, Chunk&)
bool EncryptManager::EncryptUpdate(EncryptedChunk& ec, Chunk& c){

	ec.setCipherText(new char[c.size + AES_BLOCK]);
 	
 	if(!EVP_EncryptUpdate(this->ctx, (unsigned char*)ec.getCipherText(), &ec.size, (unsigned char*)c.getPlainText(), c.size)){
    	perror("Error in EVP_EncryptUpdate");
    	return false;
    }

    return true;

	//return EncryptUpdate(ec.ciphertext,ec.size,c.plaintext,c.size);

}

// Assembly:
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
pushq %rax
movq %rdx, %r14
movq %rsi, %rbx
movq %rdi, %r15
movslq 0x10(%rdx), %rdi
addq $0x10, %rdi
callq 0x4030
movq %rbx, %rdi
movq %rax, %rsi
callq 0xa410
movq (%r15), %r15
movq %rbx, %rdi
callq 0xa43e
movq %rax, %r12
addq $0x10, %rbx
movq %r14, %rdi
callq 0xa386
movl 0x10(%r14), %r8d
movq %r15, %rdi
movq %r12, %rsi
movq %rbx, %rdx
movq %rax, %rcx
callq 0x4090
movl %eax, %ebx
testl %eax, %eax
je 0x8021
testl %ebx, %ebx
setne %al
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
retq
leaq 0x34eb(%rip), %rdi      # 0xb513
callq 0x43b0
jmp 0x8010
nop
// File: /workspace/github_cpp_makefile_star2_O3/luigix25[P]SSLP/library/EncryptManager.cpp
// Function: EncryptManager::EncryptFinal(char*, int&)
bool EncryptManager::EncryptFinal(char* ciphertext,int32_t &len){

	int local_len;
	
	if(!EVP_EncryptFinal(ctx, (unsigned char*)ciphertext + len, &local_len)){
		perror("Error in EVP_EncryptFinal");
		return false;
	}
  	len += local_len;
	//EVP_CIPHER_CTX_free(ctx);
	return true;

}

// Assembly:
pushq %rbp
pushq %rbx
pushq %rax
movq %rdx, %rbx
movq (%rdi), %rdi
movslq (%rdx), %rax
addq %rax, %rsi
leaq 0x4(%rsp), %rdx
callq 0x4830
movl %eax, %ebp
testl %eax, %eax
je 0x808d
movl 0x4(%rsp), %eax
addl %eax, (%rbx)
testl %ebp, %ebp
setne %al
addq $0x8, %rsp
popq %rbx
popq %rbp
retq
leaq 0x349a(%rip), %rdi      # 0xb52e
callq 0x43b0
jmp 0x8081
nop
// File: /workspace/github_cpp_makefile_star2_O3/luigix25[P]SSLP/library/DecryptManager.cpp
// Function: DecryptManager::DecryptManager()
DecryptManager::DecryptManager(){
	
	this->ctx = EVP_CIPHER_CTX_new();
  	if(!EVP_DecryptInit(ctx, EVP_aes_128_cbc(), this->key, this->IV)){
  		perror("Error In EVP_DecryptInit");
  	}

	incrementIV();

}

// Assembly:
pushq %r14
pushq %rbx
pushq %rax
movq %rdi, %rbx
callq 0x4280
movq %rax, %r14
movq %rax, (%rbx)
callq 0x4230
leaq 0x84e6(%rip), %rdx      # 0x105a0
leaq 0x84ef(%rip), %rcx      # 0x105b0
movq %r14, %rdi
movq %rax, %rsi
callq 0x4100
testl %eax, %eax
je 0x80dc
addq $0x8, %rsp
popq %rbx
popq %r14
jmp 0xa17c
leaq 0x3465(%rip), %rdi      # 0xb548
callq 0x43b0
jmp 0x80d0
// File: /workspace/github_cpp_makefile_star2_O3/luigix25[P]SSLP/library/DecryptManager.cpp
// Function: DecryptManager::DecryptUpdate(Chunk&, EncryptedChunk&)
bool DecryptManager::DecryptUpdate(Chunk &c, EncryptedChunk& ec){
	
	c.setPlainText(new char[ec.size + AES_BLOCK]);


    if(!EVP_DecryptUpdate(this->ctx, (unsigned char*)c.getPlainText(), &c.size, (unsigned char*)ec.getCipherText(), ec.size)){
    	perror("Error in EVP_DecryptUpdate");
    	return false;
    }

    return true;


}

// Assembly:
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
pushq %rax
movq %rdx, %r14
movq %rsi, %rbx
movq %rdi, %r15
movslq 0x10(%rdx), %rdi
addq $0x10, %rdi
callq 0x4030
movq %rbx, %rdi
movq %rax, %rsi
callq 0xa32c
movq (%r15), %r15
movq %rbx, %rdi
callq 0xa386
movq %rax, %r12
addq $0x10, %rbx
movq %r14, %rdi
callq 0xa43e
movl 0x10(%r14), %r8d
movq %r15, %rdi
movq %r12, %rsi
movq %rbx, %rdx
movq %rax, %rcx
callq 0x4260
movl %eax, %ebx
testl %eax, %eax
je 0x81a9
testl %ebx, %ebx
setne %al
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
retq
leaq 0x33b1(%rip), %rdi      # 0xb561
callq 0x43b0
jmp 0x8198
nop
// File: /workspace/github_cpp_makefile_star2_O3/luigix25[P]SSLP/library/DecryptManager.cpp
// Function: DecryptManager::DecryptUpdate(char*&, int&, char const*, int)
bool DecryptManager::DecryptUpdate(char *& plaintext,int32_t& plaintext_len,const char* ciphertext,int ciphertext_len){
    plaintext = new char[ciphertext_len + AES_BLOCK];


    if(!EVP_DecryptUpdate(this->ctx, (unsigned char*)plaintext, &plaintext_len, (unsigned char*)ciphertext, ciphertext_len)){
    	perror("Error in EVP_DecryptUpdate");
    	return false;
    }

    return true;
}

// Assembly:
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
movl %r8d, %ebx
movq %rcx, %r14
movq %rdx, %r15
movq %rsi, %r12
movq %rdi, %r13
leal 0x10(%rbx), %eax
movslq %eax, %rdi
callq 0x4030
movq %rax, (%r12)
movq (%r13), %rdi
movq %rax, %rsi
movq %r15, %rdx
movq %r14, %rcx
movl %ebx, %r8d
callq 0x4260
movl %eax, %ebx
testl %eax, %eax
je 0x8209
testl %ebx, %ebx
setne %al
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
retq
leaq 0x3351(%rip), %rdi      # 0xb561
callq 0x43b0
jmp 0x81fa
nop
// File: /workspace/github_cpp_makefile_star2_O3/luigix25[P]SSLP/library/DecryptManager.cpp
// Function: DecryptManager::DecryptFinal(char*, int&)
bool DecryptManager::DecryptFinal(char* plaintext,int32_t &plaintext_len){
	int len;
	
	if(!EVP_DecryptFinal(ctx, (unsigned char*)plaintext + plaintext_len, &len)){
		perror("Error in EVP_DecryptFinal");
		return false;
	}
  	
  	plaintext_len += len;
	//EVP_CIPHER_CTX_free(ctx);
	return true;
}

// Assembly:
pushq %rbp
pushq %rbx
pushq %rax
movq %rdx, %rbx
movq (%rdi), %rdi
movslq (%rdx), %rax
addq %rax, %rsi
leaq 0x4(%rsp), %rdx
callq 0x4060
movl %eax, %ebp
testl %eax, %eax
je 0x8249
movl 0x4(%rsp), %eax
addl %eax, (%rbx)
testl %ebp, %ebp
setne %al
addq $0x8, %rsp
popq %rbx
popq %rbp
retq
leaq 0x332c(%rip), %rdi      # 0xb57c
callq 0x43b0
jmp 0x823d
nop
// File: /workspace/github_cpp_makefile_star2_O3/luigix25[P]SSLP/library/HMACManager.cpp
// Function: HMACManager::HMACManager()
HMACManager::HMACManager(){
  this->mdctx = HMAC_CTX_new();
 // size_t key_hmac_size = HMAC_KEY_SIZE;


    if(!HMAC_Init_ex(mdctx, this->hmac_key, HMAC_KEY_SIZE, EVP_sha256(), NULL)){
      perror("Error In HMAC_Init_ex");
    }

}

// Assembly:
pushq %r14
pushq %rbx
pushq %rax
movq %rdi, %rbx
callq 0x4550
movq %rax, %r14
movq %rax, (%rbx)
callq 0x4780
leaq 0x831e(%rip), %rsi      # 0x105c0
movq %r14, %rdi
movl $0x10, %edx
movq %rax, %rcx
xorl %r8d, %r8d
callq 0x41f0
testl %eax, %eax
je 0x82c1
addq $0x8, %rsp
popq %rbx
popq %r14
retq
leaq 0x32ce(%rip), %rdi      # 0xb596
addq $0x8, %rsp
popq %rbx
popq %r14
jmp 0x43b0
// File: /workspace/github_cpp_makefile_star2_O3/luigix25[P]SSLP/library/HMACManager.cpp
// Function: HMACManager::HMACFinal(enum_nonce)
char* HMACManager::HMACFinal(enum_nonce en){
	int hash_size = EVP_MD_size(EVP_sha256());
	char *digest = new char [HASH_SIZE];

  if(nonce != 0){
    Chunk c;
    c.size = sizeof(uint32_t);
    c.setInt(nonce[en]);

    if(!HMACUpdate(c)){
      return NULL;
    }

    nonce[en]++;
  }
  
	if(!HMAC_Final(mdctx, (unsigned char*)digest, (unsigned int*)&hash_size)){
		perror("Error in HMAC_Final");
		return NULL;
	}

//	HMAC_CTX_free(mdctx);
	return digest;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
subq $0x20, %rsp
movl %esi, %ebp
movq %rdi, %r14
callq 0x4780
movq %rax, %rdi
callq 0x4190
movl %eax, 0x4(%rsp)
movl $0x20, %edi
callq 0x4030
movq %rax, %rbx
leaq 0x8(%rsp), %r12
movq %r12, %rdi
callq 0xa2d0
movl $0x4, 0x10(%r12)
movl %ebp, %eax
leaq 0x818e(%rip), %rcx      # 0x10574
leaq (%rcx,%rax,4), %r15
movq %r12, %rdi
movq %r15, %rsi
callq 0xa38c
leaq 0x8(%rsp), %rsi
movq %r14, %rdi
callq 0x832e
testb %al, %al
je 0x8435
incl (%r15)
leaq 0x8(%rsp), %rdi
callq 0xa2e4
movq (%r14), %rdi
leaq 0x4(%rsp), %rdx
movq %rbx, %rsi
callq 0x40e0
testl %eax, %eax
jne 0x8441
leaq 0x317e(%rip), %rdi      # 0xb5ac
callq 0x43b0
jmp 0x843f
leaq 0x8(%rsp), %rdi
callq 0xa2e4
xorl %ebx, %ebx
movq %rbx, %rax
addq $0x20, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
movq %rax, %rbx
leaq 0x8(%rsp), %rdi
callq 0xa2e4
movq %rbx, %rdi
callq 0x47d0
// File: /workspace/github_cpp_makefile_star2_O3/luigix25[P]SSLP/library/RSAVerifyManager.cpp
// Function: RSAVerifyManager::RSAVerifyManager(char const*)
RSAVerifyManager::RSAVerifyManager(const char *pubkey_path){
	
	this->mdctx = EVP_MD_CTX_new();
  if(!this->mdctx){
    perror("ERRORE new");
  }

	//size_t key_hmac_size = sizeof(KEY_HMAC);
  FILE* pubkey_file = fopen(pubkey_path, "r");
  if(!pubkey_file){ cerr << "Error: cannot open file '" << pubkey_path << "' (missing?)\n"; exit(1); }
  this->pubkey = PEM_read_PUBKEY(pubkey_file, NULL, NULL, NULL);
  fclose(pubkey_file);
  if(!this->pubkey){ cerr << "Error: PEM_read_PUBKEY returned NULL\n"; exit(1); }


  if(!EVP_VerifyInit(this->mdctx,EVP_sha256())){
  	perror("Error In RSA_Init_ex");
  }

  shouldFree = true;

}

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
movq %rsi, %r14
movq %rdi, %rbx
callq 0x44d0
movq %rax, (%rbx)
testq %rax, %rax
je 0x850d
leaq 0x2e6e(%rip), %rsi      # 0xb329
movq %r14, %rdi
callq 0x4510
testq %rax, %rax
je 0x8529
movq %rax, %r15
movq %rax, %rdi
xorl %esi, %esi
xorl %edx, %edx
xorl %ecx, %ecx
callq 0x4820
movq %rax, 0x8(%rbx)
movq %r15, %rdi
callq 0x4430
cmpq $0x0, 0x8(%rbx)
je 0x8553
movq (%rbx), %r14
callq 0x4780
movq %r14, %rdi
movq %rax, %rsi
callq 0x4870
testl %eax, %eax
je 0x851b
movb $0x1, 0x10(%rbx)
popq %rbx
popq %r14
popq %r15
retq
leaq 0x30ac(%rip), %rdi      # 0xb5c0
callq 0x43b0
jmp 0x84b4
leaq 0x30cf(%rip), %rdi      # 0xb5f1
callq 0x43b0
jmp 0x8503
movq 0x7ab8(%rip), %rdi      # 0xffe8
leaq 0x2d14(%rip), %rsi      # 0xb24b
callq 0x4420
movq %rax, %rdi
movq %r14, %rsi
callq 0x4420
leaq 0x2d17(%rip), %rsi      # 0xb265
movq %rax, %rdi
jmp 0x8561
movq 0x7a8e(%rip), %rdi      # 0xffe8
leaq 0x306a(%rip), %rsi      # 0xb5cb
callq 0x4420
movl $0x1, %edi
callq 0x4560
// File: /workspace/github_cpp_makefile_star2_O3/luigix25[P]SSLP/library/RSAVerifyManager.cpp
// Function: RSAVerifyManager::RSAVerifyManager(PublicKey&)
RSAVerifyManager::RSAVerifyManager(PublicKey &pubClass){
  
  this->mdctx = EVP_MD_CTX_new();
  if(!this->mdctx){
    perror("ERRORE new");
  }

  this->pubkey = pubClass.getKey();
  if(!EVP_VerifyInit(this->mdctx,EVP_sha256())){
      perror("Error In RSA_Init_ex");
    }

  shouldFree = false;

}

// Assembly:
pushq %r14
pushq %rbx
pushq %rax
movq %rsi, %r14
movq %rdi, %rbx
callq 0x44d0
movq %rax, (%rbx)
testq %rax, %rax
je 0x85b6
movq %r14, %rdi
callq 0xa2b4
movq %rax, 0x8(%rbx)
movq (%rbx), %r14
callq 0x4780
movq %r14, %rdi
movq %rax, %rsi
callq 0x4870
testl %eax, %eax
je 0x85c4
movb $0x0, 0x10(%rbx)
addq $0x8, %rsp
popq %rbx
popq %r14
retq
leaq 0x3003(%rip), %rdi      # 0xb5c0
callq 0x43b0
jmp 0x8587
leaq 0x3026(%rip), %rdi      # 0xb5f1
callq 0x43b0
jmp 0x85aa
// File: /workspace/github_cpp_makefile_star2_O3/luigix25[P]SSLP/library/RSAVerifyManager.cpp
// Function: RSAVerifyManager::~RSAVerifyManager()
RSAVerifyManager::~RSAVerifyManager(){
  EVP_MD_CTX_free(mdctx);
  CRYPTO_cleanup_all_ex_data();
  if(shouldFree)
    EVP_PKEY_free(this->pubkey);

}

// Assembly:
pushq %rbx
movq %rdi, %rbx
movq (%rdi), %rdi
callq 0x4800
cmpb $0x1, 0x10(%rbx)
jne 0x86c5
movq 0x8(%rbx), %rdi
callq 0x4270
popq %rbx
retq
movq %rax, %rdi
callq 0x73e9
nop
// File: /workspace/github_cpp_makefile_star2_O3/luigix25[P]SSLP/library/RSASignManager.cpp
// Function: RSASignManager::RSASignManager(char const*)
RSASignManager::RSASignManager(const char *key_path){
	
  this->mdctx = NULL;
  this->prvkey = NULL;

	this->mdctx = EVP_MD_CTX_new();
	//size_t key_hmac_size = sizeof(KEY_HMAC);
  this->privkeyPath = string(key_path);
  
  if(!EVP_SignInit(mdctx,EVP_sha256())){
  		perror("Error In RSA_Init_ex");
  }

}

// Assembly:
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
subq $0x28, %rsp
movq %rsi, %r15
movq %rdi, %r14
leaq 0x10(%rdi), %rbx
leaq 0x20(%rdi), %r12
movq %r12, 0x10(%rdi)
movq $0x0, 0x18(%rdi)
movb $0x0, 0x20(%rdi)
xorps %xmm0, %xmm0
movups %xmm0, (%rdi)
callq 0x44d0
movq %rax, (%r14)
leaq 0x8(%rsp), %rdi
leaq 0x7(%rsp), %rdx
movq %r15, %rsi
callq 0x6904
leaq 0x8(%rsp), %r15
movq %rbx, %rdi
movq %r15, %rsi
callq 0x4570
movq (%r15), %rdi
leaq 0x18(%rsp), %rax
cmpq %rax, %rdi
je 0x8743
movq 0x18(%rsp), %rsi
incq %rsi
callq 0x4450
movq (%r14), %r14
callq 0x4780
movq %r14, %rdi
movq %rax, %rsi
callq 0x4870
testl %eax, %eax
je 0x8766
addq $0x28, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
retq
leaq 0x2e84(%rip), %rdi      # 0xb5f1
callq 0x43b0
jmp 0x875a
jmp 0x8776
movq %rax, %r14
movq (%rbx), %rdi
cmpq %r12, %rdi
je 0x878d
movq (%r12), %rsi
incq %rsi
callq 0x4450
movq %r14, %rdi
callq 0x47d0
nop
// File: /workspace/github_cpp_makefile_star2_O3/luigix25[P]SSLP/library/RSASignManager.cpp
// Function: RSASignManager::RSAFinal(unsigned int&)
char* RSASignManager::RSAFinal(uint32_t& len){

  FILE* prvkey_file = fopen(this->privkeyPath.c_str(), "r");
  cout<<this->privkeyPath.c_str()<<endl;


  if(!prvkey_file){ cerr << "Error: cannot open file '" << this->privkeyPath << "' (missing?)\n"; exit(1); }
  this->prvkey = PEM_read_PrivateKey(prvkey_file, NULL, NULL, NULL);
  fclose(prvkey_file);
  if(!this->prvkey){ cerr << "Error: PEM_read_PrivateKey returned NULL\n"; exit(1); }
  

	char *signature = new char [EVP_PKEY_size(this->prvkey)];
  unsigned int signature_len;


	if(!EVP_SignFinal(mdctx,(unsigned char*)signature, &signature_len, this->prvkey)){
		perror("Error in RSA_Final");
		return NULL;
	}

  len = signature_len;

  //distruggere chiave privata
  EVP_PKEY_free(this->prvkey);
  this->prvkey = NULL;

	return signature;
}

// Assembly:
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
pushq %rax
movq %rsi, %r14
movq %rdi, %rbx
movq 0x10(%rdi), %rdi
leaq 0x2b02(%rip), %rsi      # 0xb329
callq 0x4510
movq %rax, %r15
movq 0x10(%rbx), %r12
testq %r12, %r12
je 0x8854
movq %r12, %rdi
callq 0x41c0
movq 0x7779(%rip), %rdi      # 0xffc0
movq %r12, %rsi
movq %rax, %rdx
callq 0x44e0
jmp 0x8872
movq 0x7765(%rip), %rax      # 0xffc0
movq (%rax), %rcx
movq -0x18(%rcx), %rcx
leaq (%rax,%rcx), %rdi
movl 0x20(%rax,%rcx), %esi
orl $0x1, %esi
callq 0x4760
movq 0x7747(%rip), %r12      # 0xffc0
movq (%r12), %rax
movq -0x18(%rax), %rdi
addq %r12, %rdi
movl $0xa, %esi
callq 0x4410
movsbl %al, %esi
movq %r12, %rdi
callq 0x4040
movq %rax, %rdi
callq 0x42f0
testq %r15, %r15
je 0x8931
movq %r15, %rdi
xorl %esi, %esi
xorl %edx, %edx
xorl %ecx, %ecx
callq 0x4310
movq %rax, 0x8(%rbx)
movq %r15, %rdi
callq 0x4430
movq 0x8(%rbx), %rdi
testq %rdi, %rdi
je 0x895f
callq 0x47b0
movslq %eax, %rdi
callq 0x4030
movq %rax, %r15
movq (%rbx), %rdi
movq 0x8(%rbx), %rcx
leaq 0x4(%rsp), %rdx
movq %rax, %rsi
callq 0x40a0
testl %eax, %eax
je 0x8920
movl 0x4(%rsp), %eax
movl %eax, (%r14)
movq 0x8(%rbx), %rdi
callq 0x4270
movq $0x0, 0x8(%rbx)
movq %r15, %rax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
retq
leaq 0x2d3b(%rip), %rdi      # 0xb662
callq 0x43b0
xorl %r15d, %r15d
jmp 0x8911
addq $0x10, %rbx
movq 0x76ac(%rip), %rdi      # 0xffe8
leaq 0x2908(%rip), %rsi      # 0xb24b
callq 0x4420
movq %rax, %rdi
movq %rbx, %rsi
callq 0x43e0
leaq 0x290b(%rip), %rsi      # 0xb265
movq %rax, %rdi
jmp 0x896d
movq 0x7682(%rip), %rdi      # 0xffe8
leaq 0x2ccb(%rip), %rsi      # 0xb638
callq 0x4420
movl $0x1, %edi
callq 0x4560
// File: /workspace/github_cpp_makefile_star2_O3/luigix25[P]SSLP/library/RSASignManager.cpp
// Function: RSASignManager::~RSASignManager()
RSASignManager::~RSASignManager(){
  if(this->prvkey != NULL){
    EVP_PKEY_free(this->prvkey);
  }

  if(this->mdctx != NULL){
    EVP_MD_CTX_free(this->mdctx);
  }

  CRYPTO_cleanup_all_ex_data();
  
}

// Assembly:
pushq %rbx
movq %rdi, %rbx
movq 0x8(%rdi), %rdi
testq %rdi, %rdi
je 0x898e
callq 0x4270
movq (%rbx), %rdi
testq %rdi, %rdi
je 0x899b
callq 0x4800
movq 0x10(%rbx), %rdi
addq $0x20, %rbx
cmpq %rbx, %rdi
je 0x89b4
movq (%rbx), %rsi
incq %rsi
popq %rbx
jmp 0x4450
popq %rbx
retq
movq %rax, %rdi
callq 0x73e9
nop
// File: /workspace/github_cpp_makefile_star2_O3/luigix25[P]SSLP/library/SendReceiveFile.cpp
// Function: checkValidityFilename(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>)
bool checkValidityFilename(string filename){
	if(filename.find('/') != string::npos){
		cout << "filename not correct " << endl;
		return false;
	}
	else{
		cout << "filename correct " << endl;
		return true;
	}
}

// Assembly:
pushq %r14
pushq %rbx
pushq %rax
movl $0x2f, %esi
xorl %edx, %edx
callq 0x45e0
movq %rax, %rbx
movq 0x75e6(%rip), %rdi      # 0xffc0
cmpq $-0x1, %rax
je 0x89ee
leaq 0x2ca1(%rip), %rsi      # 0xb688
movl $0x15, %edx
jmp 0x89fa
leaq 0x2ca9(%rip), %rsi      # 0xb69e
movl $0x11, %edx
callq 0x44e0
cmpq $-0x1, %rbx
sete %bl
movq 0x75b3(%rip), %r14      # 0xffc0
movq (%r14), %rax
movq -0x18(%rax), %rdi
addq %r14, %rdi
movl $0xa, %esi
callq 0x4410
movsbl %al, %esi
movq %r14, %rdi
callq 0x4040
movq %rax, %rdi
callq 0x42f0
movl %ebx, %eax
addq $0x8, %rsp
popq %rbx
popq %r14
retq
// File: /workspace/github_cpp_makefile_star2_O3/luigix25[P]SSLP/library/CertificateManager.cpp
// Function: CertificateManager::verifyCertificate(x509_st*)
bool CertificateManager::verifyCertificate(X509* certificate){

	if(!certificate)
		return false;

	int ret;

	X509_STORE_CTX* certvfy_ctx = X509_STORE_CTX_new();
	if(!certvfy_ctx) { cerr << "Error: X509_STORE_CTX_new returned NULL\n" << ERR_error_string(ERR_get_error(), NULL) << "\n"; exit(1); }
	ret = X509_STORE_CTX_init(certvfy_ctx, store, certificate, NULL);
	if(ret != 1) { cerr << "Error: X509_STORE_CTX_init returned " << ret << "\n" << ERR_error_string(ERR_get_error(), NULL) << "\n"; exit(1); }
	ret = X509_verify_cert(certvfy_ctx);
	
	X509_STORE_CTX_free(certvfy_ctx);

	if(ret != 1) { 
		cerr << "Error: X509_verify_cert returned " << ret << "\n" << ERR_error_string(ERR_get_error(), NULL) << endl; 
		return false;
	} else {
		return true;
	}


}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %rbx
pushq %rax
testq %rsi, %rsi
je 0x99c6
movq %rsi, %r14
movq %rdi, %r15
callq 0x4380
testq %rax, %rax
je 0x99d3
movq %rax, %rbx
movq (%r15), %rsi
movq %rax, %rdi
movq %r14, %rdx
xorl %ecx, %ecx
callq 0x4290
cmpl $0x1, %eax
jne 0x9a0f
movq %rbx, %rdi
callq 0x4350
movl %eax, %ebp
movq %rbx, %rdi
callq 0x46f0
movb $0x1, %al
cmpl $0x1, %ebp
je 0x99c8
movq 0x66c6(%rip), %rbx      # 0xffe8
leaq 0x1fbb(%rip), %rsi      # 0xb8e4
movl $0x21, %edx
movq %rbx, %rdi
callq 0x44e0
movq %rbx, %rdi
movl %ebp, %esi
callq 0x4790
movq %rax, %rbx
leaq 0x1927(%rip), %rsi      # 0xb271
movl $0x1, %edx
movq %rax, %rdi
callq 0x44e0
callq 0x4600
movq %rax, %rdi
xorl %esi, %esi
callq 0x4160
testq %rax, %rax
je 0x9986
movq %rax, %r14
movq %rax, %rdi
callq 0x41c0
movq %rbx, %rdi
movq %r14, %rsi
movq %rax, %rdx
callq 0x44e0
jmp 0x999f
movq (%rbx), %rax
movq -0x18(%rax), %rax
movq %rbx, %rdi
addq %rax, %rdi
movl 0x20(%rbx,%rax), %esi
orl $0x1, %esi
callq 0x4760
movq (%rbx), %rax
movq -0x18(%rax), %rdi
addq %rbx, %rdi
movl $0xa, %esi
callq 0x4410
movsbl %al, %esi
movq %rbx, %rdi
callq 0x4040
movq %rax, %rdi
callq 0x42f0
xorl %eax, %eax
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
movq 0x660e(%rip), %rdi      # 0xffe8
leaq 0x1eb5(%rip), %rsi      # 0xb896
callq 0x4420
movq %rax, %rbx
callq 0x4600
movq %rax, %rdi
xorl %esi, %esi
callq 0x4160
movq %rbx, %rdi
movq %rax, %rsi
callq 0x4420
leaq 0x1867(%rip), %rsi      # 0xb271
movq %rax, %rdi
jmp 0x9a63
movl %eax, %ebp
movq 0x65d0(%rip), %rdi      # 0xffe8
leaq 0x1ea0(%rip), %rsi      # 0xb8bf
callq 0x4420
movq %rax, %rdi
movl %ebp, %esi
callq 0x4790
leaq 0x183c(%rip), %rbx      # 0xb271
movq %rax, %rdi
movq %rbx, %rsi
callq 0x4420
movq %rax, %r14
callq 0x4600
movq %rax, %rdi
xorl %esi, %esi
callq 0x4160
movq %r14, %rdi
movq %rax, %rsi
callq 0x4420
movq %rax, %rdi
movq %rbx, %rsi
callq 0x4420
movl $0x1, %edi
callq 0x4560
// File: /workspace/github_cpp_makefile_star2_O3/luigix25[P]SSLP/library/CertificateManager.cpp
// Function: CertificateManager::extractCommonName(x509_st*, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>&)
bool CertificateManager::extractCommonName(X509* certificate,string &string_name){

	if(!certificate)
		return false;

	X509_NAME* name = X509_get_subject_name(certificate);
	int len;
	
	len = X509_NAME_get_text_by_NID(name,NID_commonName,NULL,0);				//i get the length of the commonname
	if(len == -1)
		return false;

	len++;																		//terminator char

	char *tmp = new char[len];

	if(X509_NAME_get_text_by_NID(name,NID_commonName,tmp,len) == -1)
		return false;

	string_name = (string)tmp;
	delete[] tmp;

	return true;

}

// Assembly:
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
subq $0x28, %rsp
testq %rsi, %rsi
je 0x9b2e
movq %rdx, %rbx
movq %rsi, %rdi
callq 0x4470
movq %rax, %r15
xorl %r14d, %r14d
movq %rax, %rdi
movl $0xd, %esi
xorl %edx, %edx
xorl %ecx, %ecx
callq 0x4520
cmpl $-0x1, %eax
je 0x9b31
incl %eax
movslq %eax, %r12
movq %r12, %rdi
callq 0x4030
movq %rax, %r14
movq %r15, %rdi
movl $0xd, %esi
movq %rax, %rdx
movl %r12d, %ecx
callq 0x4520
cmpl $-0x1, %eax
je 0x9b2e
leaq 0x18(%rsp), %r12
movq %r12, -0x10(%r12)
movq %r14, %rdi
callq 0x41c0
movq %r14, %rdx
addq %rax, %rdx
leaq 0x8(%rsp), %r15
movq %r15, %rdi
movq %r14, %rsi
callq 0x6a90
movq %rbx, %rdi
movq %r15, %rsi
callq 0x4570
movq (%r15), %rdi
cmpq %r12, %rdi
je 0x9b21
movq 0x18(%rsp), %rsi
incq %rsi
callq 0x4450
movq %r14, %rdi
callq 0x45c0
movb $0x1, %r14b
jmp 0x9b31
xorl %r14d, %r14d
movl %r14d, %eax
addq $0x28, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
retq
// File: /workspace/github_cpp_makefile_star2_O3/luigix25[P]SSLP/library/RSAEncryptManager.cpp
// Function: RSAEncryptManager::RSAEncryptManager(evp_pkey_st*)
RSAEncryptManager::RSAEncryptManager(EVP_PKEY *pubkey){
  
  this->mdctx = NULL;

  this->mdctx = EVP_CIPHER_CTX_new();
  //size_t key_hmac_size = sizeof(KEY_HMAC);
  this->pubkey = pubkey;
  
  unsigned char* key = new unsigned char[EVP_PKEY_size(pubkey)];
  unsigned char *iv = new unsigned char[EVP_CIPHER_iv_length(EVP_aes_128_cbc())];

  int key_len;


  if(!EVP_SealInit(mdctx,EVP_aes_128_cbc(),&key,&key_len,iv,&pubkey,1)){
      perror("Error In RSA_Init_ex");
  }

}

// Assembly:
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
subq $0x28, %rsp
movq %rsi, %r14
movq %rdi, %rbx
movq %rsi, 0x18(%rsp)
leaq 0x20(%rdi), %r12
movq %r12, 0x10(%rdi)
xorl %eax, %eax
movq %rax, 0x18(%rdi)
movb $0x0, 0x20(%rdi)
movq %rax, (%rdi)
callq 0x4280
movq %rax, (%rbx)
movq %r14, 0x8(%rbx)
movq %r14, %rdi
callq 0x47b0
movslq %eax, %rdi
callq 0x4030
movq %rax, 0x10(%rsp)
callq 0x4230
movq %rax, %rdi
callq 0x4840
movslq %eax, %rdi
callq 0x4030
movq %rax, %r14
movq (%rbx), %r15
callq 0x4230
movl $0x1, (%rsp)
leaq 0x10(%rsp), %rdx
leaq 0x24(%rsp), %rcx
leaq 0x18(%rsp), %r9
movq %r15, %rdi
movq %rax, %rsi
movq %r14, %r8
callq 0x48a0
testl %eax, %eax
je 0x9be8
addq $0x28, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
retq
leaq 0x1a02(%rip), %rdi      # 0xb5f1
callq 0x43b0
jmp 0x9bdc
jmp 0x9bfc
jmp 0x9bfc
jmp 0x9bfc
movq %rax, %r14
movq 0x10(%rbx), %rdi
cmpq %r12, %rdi
je 0x9c14
movq (%r12), %rsi
incq %rsi
callq 0x4450
movq %r14, %rdi
callq 0x47d0
// File: /workspace/github_cpp_makefile_star2_O3/luigix25[P]SSLP/library/RSAEncryptManager.cpp
// Function: RSAEncryptManager::RSAFinal(EncryptedChunk&)
bool RSAEncryptManager::RSAFinal(EncryptedChunk& ec){

  int len;

  if(!EVP_SealFinal(this->mdctx, (unsigned char*)ec.getCipherText() + ec.size, &len)){
    perror("Error in RSA_Final");
    return false;
  }

  ec.size += len;
  return true;
}

// Assembly:
pushq %rbp
pushq %r14
pushq %rbx
subq $0x10, %rsp
movq %rsi, %rbx
movq (%rdi), %r14
movq %rsi, %rdi
callq 0xa43e
movslq 0x10(%rbx), %rsi
addq %rax, %rsi
leaq 0xc(%rsp), %rdx
movq %r14, %rdi
callq 0x44a0
movl %eax, %ebp
testl %eax, %eax
je 0x9cc3
movl 0xc(%rsp), %eax
addl %eax, 0x10(%rbx)
testl %ebp, %ebp
setne %al
addq $0x10, %rsp
popq %rbx
popq %r14
popq %rbp
retq
leaq 0x1998(%rip), %rdi      # 0xb662
callq 0x43b0
jmp 0x9cb5
nop
// File: /workspace/github_cpp_makefile_star2_O3/luigix25[P]SSLP/library/RSADecryptManager.cpp
// Function: RSADecryptManager::RSADecryptManager(char const*, unsigned int)
RSADecryptManager::RSADecryptManager(const char *privkey_path,uint32_t key_len){
  
  this->mdctx = NULL;

  this->mdctx = EVP_CIPHER_CTX_new();
  //size_t key_hmac_size = sizeof(KEY_HMAC);
  
  FILE* privkey_file = fopen(privkey_path, "r");
  if(!privkey_file){ 
    cerr << "Error: cannot open file '" << privkey_path << "' (missing?)\n"; 
    exit(1); 
  }

  this->privkey = PEM_read_PrivateKey(privkey_file, NULL, NULL, NULL);
  fclose(privkey_file);

  if(!this->privkey){ 
    cerr << "Error: PEM_read_PUBKEY returned NULL\n"; 
    exit(1); 
  }

  this->key = new unsigned char[key_len];
  this->iv = new unsigned char[EVP_CIPHER_iv_length(EVP_aes_128_cbc())];

  if(!EVP_OpenInit(this->mdctx,EVP_aes_128_cbc(),key,key_len,iv,this->privkey)){
      perror("Error In RSA_Init_ex");
  }

}

// Assembly:
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
pushq %rax
movl %edx, %ebx
movq %rsi, %r15
movq %rdi, %r14
movq $0x0, (%rdi)
callq 0x4280
movq %rax, (%r14)
leaq 0x15ff(%rip), %rsi      # 0xb329
movq %r15, %rdi
callq 0x4510
testq %rax, %rax
je 0x9dcf
movq %rax, %r12
movq %rax, %rdi
xorl %esi, %esi
xorl %edx, %edx
xorl %ecx, %ecx
callq 0x4310
movq %rax, 0x8(%r14)
movq %r12, %rdi
callq 0x4430
cmpq $0x0, 0x8(%r14)
je 0x9df9
movl %ebx, %edi
callq 0x4030
movq %rax, 0x18(%r14)
callq 0x4230
movq %rax, %rdi
callq 0x4840
movslq %eax, %rdi
callq 0x4030
movq %rax, 0x10(%r14)
movq (%r14), %r15
callq 0x4230
movq 0x18(%r14), %rdx
movq 0x8(%r14), %r9
movq 0x10(%r14), %r8
movq %r15, %rdi
movq %rax, %rsi
movl %ebx, %ecx
callq 0x43f0
testl %eax, %eax
je 0x9db8
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
retq
leaq 0x1832(%rip), %rdi      # 0xb5f1
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
jmp 0x43b0
movq 0x6212(%rip), %rdi      # 0xffe8
leaq 0x146e(%rip), %rsi      # 0xb24b
callq 0x4420
movq %rax, %rdi
movq %r15, %rsi
callq 0x4420
leaq 0x1471(%rip), %rsi      # 0xb265
movq %rax, %rdi
jmp 0x9e07
movq 0x61e8(%rip), %rdi      # 0xffe8
leaq 0x17c4(%rip), %rsi      # 0xb5cb
callq 0x4420
movl $0x1, %edi
callq 0x4560
// File: /workspace/github_cpp_makefile_star2_O3/luigix25[P]SSLP/library/RSADecryptManager.cpp
// Function: RSADecryptManager::RSAFinal(Chunk&)
bool RSADecryptManager::RSAFinal(Chunk& c){

  int len;

  if(!EVP_OpenFinal(this->mdctx, (unsigned char*)c.getPlainText() + c.size, &len)){
    perror("Error in RSA_Final");
    return false;
  }

  c.size += len;
  return true;
}

// Assembly:
pushq %rbp
pushq %r14
pushq %rbx
subq $0x10, %rsp
movq %rsi, %rbx
movq (%rdi), %r14
movq %rsi, %rdi
callq 0xa386
movslq 0x10(%rbx), %rsi
addq %rax, %rsi
leaq 0xc(%rsp), %rdx
movq %r14, %rdi
callq 0x44c0
movl %eax, %ebp
testl %eax, %eax
je 0x9ebd
movl 0xc(%rsp), %eax
addl %eax, 0x10(%rbx)
testl %ebp, %ebp
setne %al
addq $0x10, %rsp
popq %rbx
popq %r14
popq %rbp
retq
leaq 0x179e(%rip), %rdi      # 0xb662
callq 0x43b0
jmp 0x9eaf
nop
// File: /workspace/github_cpp_makefile_star2_O3/luigix25[P]SSLP/library/DHManager.cpp
// Function: DHManager::DHManager(char const*)
DHManager::DHManager(const char *path){

	FILE* dh_params = fopen(path, "r");
	if(!dh_params){ cerr << "Error: cannot open file '" << path << "' (missing?)\n"; exit(1); }
	this->session = PEM_read_DHparams(dh_params, NULL, NULL, NULL);
	fclose(dh_params);
	if(!this->session){ cerr << "Error: PEM_read_DHparams returned NULL\n"; exit(1); }

	int res;

	if(DH_check(this->session,&res) != 1){
		cout<<"Errore"<<endl;
	} 

	if(res != 0){
		cerr<<"Error in DH params"<<endl;
		exit(-1);
	}

}

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
subq $0x10, %rsp
movq %rsi, %r14
movq %rdi, %rbx
leaq 0x1433(%rip), %rsi      # 0xb329
movq %r14, %rdi
callq 0x4510
testq %rax, %rax
je 0x9f91
movq %rax, %r15
movq %rax, %rdi
xorl %esi, %esi
xorl %edx, %edx
xorl %ecx, %ecx
callq 0x41a0
movq %rax, (%rbx)
movq %r15, %rdi
callq 0x4430
movq (%rbx), %rdi
testq %rdi, %rdi
je 0x9fbb
leaq 0xc(%rsp), %rsi
callq 0x42a0
cmpl $0x1, %eax
je 0x9f80
movq 0x607b(%rip), %rbx      # 0xffc0
leaq 0x19f6(%rip), %rsi      # 0xb942
movl $0x6, %edx
movq %rbx, %rdi
callq 0x44e0
movq (%rbx), %rax
movq -0x18(%rax), %rdi
addq %rbx, %rdi
movl $0xa, %esi
callq 0x4410
movsbl %al, %esi
movq %rbx, %rdi
callq 0x4040
movq %rax, %rdi
callq 0x42f0
cmpl $0x0, 0xc(%rsp)
jne 0x9fd8
addq $0x10, %rsp
popq %rbx
popq %r14
popq %r15
retq
movq 0x6050(%rip), %rdi      # 0xffe8
leaq 0x12ac(%rip), %rsi      # 0xb24b
callq 0x4420
movq %rax, %rdi
movq %r14, %rsi
callq 0x4420
leaq 0x12af(%rip), %rsi      # 0xb265
movq %rax, %rdi
jmp 0x9fc9
movq 0x6026(%rip), %rdi      # 0xffe8
leaq 0x1951(%rip), %rsi      # 0xb91a
callq 0x4420
movl $0x1, %edi
callq 0x4560
movq 0x6009(%rip), %rdi      # 0xffe8
leaq 0x1963(%rip), %rsi      # 0xb949
callq 0x4420
movq %rax, %rdi
callq 0x41e0
movl $0xffffffff, %edi       # imm = 0xFFFFFFFF
callq 0x4560
nop
// File: /workspace/github_cpp_makefile_star2_O3/luigix25[P]SSLP/library/DHManager.cpp
// Function: DHManager::generatePublicKey(int&)
char * DHManager::generatePublicKey(int &len){
	if(DH_generate_key(this->session) != 1){
		cerr<<"Error in DH_generate_key"<<endl;
		return NULL;
	}

	BIGNUM *pub_key;
	DH_get0_key(this->session,(const BIGNUM**)&pub_key,NULL);

	unsigned char *return_value = new unsigned char[BN_num_bytes(pub_key)];


	len = BN_bn2bin(pub_key,return_value);
	if(len <= 0){
		delete[] return_value;
		return NULL;
	}

	return (char*)return_value;

}

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
subq $0x10, %rsp
movq %rsi, %rbx
movq %rdi, %r14
movq (%rdi), %rdi
callq 0x4140
cmpl $0x1, %eax
jne 0xa068
movq (%r14), %rdi
leaq 0x8(%rsp), %r15
movq %r15, %rsi
xorl %edx, %edx
callq 0x42c0
movq (%r15), %rdi
callq 0x44f0
leal 0x7(%rax), %ecx
addl $0xe, %eax
testl %ecx, %ecx
cmovnsl %ecx, %eax
sarl $0x3, %eax
movslq %eax, %rdi
callq 0x4030
movq %rax, %r14
movq (%r15), %rdi
movq %rax, %rsi
callq 0x4580
movl %eax, (%rbx)
testl %eax, %eax
jg 0xa0ad
movq %r14, %rdi
callq 0x45c0
jmp 0xa0aa
movq 0x5f79(%rip), %rbx      # 0xffe8
leaq 0x18e6(%rip), %rsi      # 0xb95c
movl $0x18, %edx
movq %rbx, %rdi
callq 0x44e0
movq (%rbx), %rax
movq -0x18(%rax), %rdi
addq %rbx, %rdi
movl $0xa, %esi
callq 0x4410
movsbl %al, %esi
movq %rbx, %rdi
callq 0x4040
movq %rax, %rdi
callq 0x42f0
xorl %r14d, %r14d
movq %r14, %rax
addq $0x10, %rsp
popq %rbx
popq %r14
popq %r15
retq
// File: /workspace/github_cpp_makefile_star2_O3/luigix25[P]SSLP/library/HashManager.cpp
// Function: HashManager::HashFinal()
char* HashManager::HashFinal(){
  unsigned int hash_size = EVP_MD_size(EVP_sha256());
  char *digest = new char [HASH_SIZE];

  if(!EVP_DigestFinal(mdctx, (unsigned char*) digest,&hash_size)){
    perror("Error in EVP_DigestFinal");
    return NULL;
  }

  return digest;

}

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
subq $0x10, %rsp
movq %rdi, %r14
callq 0x4780
movq %rax, %rdi
callq 0x4190
leaq 0xc(%rsp), %r15
movl %eax, (%r15)
movl $0x20, %edi
callq 0x4030
movq %rax, %rbx
movq (%r14), %rdi
movq %rax, %rsi
movq %r15, %rdx
callq 0x4670
testl %eax, %eax
je 0xa247
movq %rbx, %rax
addq $0x10, %rsp
popq %rbx
popq %r14
popq %r15
retq
leaq 0x1759(%rip), %rdi      # 0xb9a7
callq 0x43b0
xorl %ebx, %ebx
jmp 0xa23a
nop
// File: /workspace/github_cpp_makefile_star2_O3/luigix25[P]SSLP/library/Chunk.cpp
// Function: Chunk::clean()
void Chunk::clean(){
	if(plaintext != NULL && shouldFree){
		delete[] plaintext;
		plaintext = NULL;
		shouldFree = false;
	}
}

// Assembly:
pushq %rbx
movq %rdi, %rbx
movq 0x8(%rdi), %rdi
testq %rdi, %rdi
je 0xa32a
cmpb $0x1, (%rbx)
jne 0xa32a
callq 0x45c0
movq $0x0, 0x8(%rbx)
movb $0x0, (%rbx)
popq %rbx
retq
// File: /workspace/github_cpp_makefile_star2_O3/luigix25[P]SSLP/library/Chunk.cpp
// Function: EncryptedChunk::clean()
void EncryptedChunk::clean(){
	if(ciphertext != NULL && shouldFree){
		delete[] ciphertext;
		ciphertext = NULL;
		shouldFree = false;
	}
}

// Assembly:
pushq %rbx
movq %rdi, %rbx
movq 0x8(%rdi), %rdi
testq %rdi, %rdi
je 0xa40e
cmpb $0x1, (%rbx)
jne 0xa40e
callq 0x45c0
movq $0x0, 0x8(%rbx)
movb $0x0, (%rbx)
popq %rbx
retq
// File: /workspace/github_cpp_makefile_star2_O3/aempirei[P]Chat-Art/include/tile.hh
// Function: tile::move(long, long)
const pos_t& tile::move(ssize_t lines, ssize_t columns) {

	pos[1] += lines * geo.size[1];
	pos[0] += columns * geo.size[0];

	sum(rgb_sum);
	mean(rgb_mean);
	stdev(rgb_stdev);

	set_color_lum();

	return pos;
}

// Assembly:
pushq %r14
pushq %rbx
pushq %rax
movq %rdi, %rbx
imull 0xc(%rdi), %esi
addl %esi, 0x30(%rdi)
leaq 0x2c(%rdi), %r14
imull 0x8(%rdi), %edx
addl %edx, 0x2c(%rdi)
leaq 0x40(%rdi), %rsi
callq 0x2a10
movslq 0x8(%rbx), %rax
movslq 0xc(%rbx), %rcx
imulq %rax, %rcx
movl $0xd, %esi
movslq 0xc(%rbx,%rsi,4), %rax
xorl %edx, %edx
divq %rcx
andl $-0x2, %eax
movl %eax, (%rbx,%rsi,4)
incq %rsi
cmpq $0x10, %rsi
jne 0x29d7
leaq 0x4c(%rbx), %rsi
movq %rbx, %rdi
callq 0x2ac0
movq %rbx, %rdi
callq 0x2bc2
movq %r14, %rax
addq $0x8, %rsp
popq %rbx
popq %r14
retq
nop
// File: /workspace/github_cpp_makefile_star2_O3/aempirei[P]Chat-Art/include/tile.hh
// Function: tile::sum(int (&) [3]) const
const rgb_sum_t& tile::sum(rgb_sum_t& v) const {

	v[0] = v[1] = v[2] = 0;

	for(int y = 0; y < geo.size[1]; y++) {
		for(int x = 0; x < geo.size[0]; x++) {

			const rgb_t& w = *pixel(y,x);

			for(int i = 0; i < 3; i++)
				v[i] += w[i];
		}
	}

	return v;
}

// Assembly:
movq %rsi, %rax
movl $0x0, 0x8(%rsi)
movq $0x0, (%rsi)
movl 0xc(%rdi), %esi
testl %esi, %esi
jle 0x2a92
pushq %rbx
movq (%rdi), %rcx
movl 0x8(%rdi), %r10d
xorl %edx, %edx
testl %r10d, %r10d
jle 0x2a86
movq (%rcx), %r8
movq 0x10(%rcx), %rsi
leaq (%r8,%r8,2), %r8
xorl %r9d, %r9d
movslq 0x30(%rdi), %r11
movslq 0x2c(%rdi), %r10
addq %rdx, %r11
imulq %r8, %r11
leaq (%r10,%r10,2), %r10
addq %rsi, %r10
addq %r11, %r10
xorl %r11d, %r11d
movzbl (%r10,%r11), %ebx
addl %ebx, (%rax,%r11,4)
incq %r11
cmpq $0x3, %r11
jne 0x2a61
incq %r9
movslq 0x8(%rdi), %r10
addq $0x3, %rsi
cmpq %r10, %r9
jl 0x2a45
movl 0xc(%rdi), %esi
incq %rdx
movslq %esi, %r8
cmpq %r8, %rdx
jl 0x2a32
popq %rbx
retq
nop
// File: /workspace/github_cpp_makefile_star2_O3/aempirei[P]Chat-Art/include/tile.hh
// Function: tile::stdev(int (&) [3]) const
const rgb_sum_t& tile::stdev(rgb_sum_t& v) const {

	v[0] = v[1] = v[2] = 0;

	for(int y = 0; y < geo.size[1]; y++) {
		for(int x = 0; x < geo.size[0]; x++) {

			const rgb_t& w = *pixel(y,x);

			for(int i = 0; i < 3; i++) {
				int32_t xx = w[i] - rgb_mean[i];
				v[i] += xx * xx;
			}
		}
	}

	for(int i = 0; i < 3; i++)
		v[i] = (int32_t)rint(sqrt((double)v[i] / n()));

	return v;
}

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
movq %rsi, %rbx
movq %rdi, %r14
movl $0x0, 0x8(%rsi)
movq $0x0, (%rsi)
movl 0xc(%rdi), %edx
testl %edx, %edx
jle 0x2b51
movq (%r14), %rax
movl 0x8(%r14), %r8d
xorl %ecx, %ecx
testl %r8d, %r8d
jle 0x2b46
movq (%rax), %rsi
movq 0x10(%rax), %rdx
leaq (%rsi,%rsi,2), %rsi
xorl %edi, %edi
movslq 0x30(%r14), %r9
movslq 0x2c(%r14), %r8
addq %rcx, %r9
imulq %rsi, %r9
leaq (%r8,%r8,2), %r8
addq %rdx, %r8
addq %r9, %r8
xorl %r9d, %r9d
movzbl (%r8,%r9), %r10d
subl 0x34(%r14,%r9,4), %r10d
imull %r10d, %r10d
addl %r10d, (%rbx,%r9,4)
incq %r9
cmpq $0x3, %r9
jne 0x2b17
incq %rdi
movslq 0x8(%r14), %r8
addq $0x3, %rdx
cmpq %r8, %rdi
jl 0x2afb
movl 0xc(%r14), %edx
incq %rcx
movslq %edx, %rsi
cmpq %rsi, %rcx
jl 0x2ae9
xorl %r15d, %r15d
xorps %xmm0, %xmm0
cvtsi2sdl (%rbx,%r15,4), %xmm0
movslq 0x8(%r14), %rax
movslq 0xc(%r14), %rcx
imulq %rax, %rcx
movq %rcx, %xmm1
punpckldq 0x249a(%rip), %xmm1 # xmm1 = xmm1[0],mem[0],xmm1[1],mem[1]
subpd 0x24a2(%rip), %xmm1     # 0x5020
movapd %xmm1, %xmm2
unpckhpd %xmm1, %xmm2            # xmm2 = xmm2[1],xmm1[1]
addsd %xmm1, %xmm2
divsd %xmm2, %xmm0
ucomisd 0x249a(%rip), %xmm0     # 0x5030
jb 0x2b9e
sqrtsd %xmm0, %xmm0
jmp 0x2ba3
callq 0x2160
callq 0x2230
cvttsd2si %xmm0, %eax
movl %eax, (%rbx,%r15,4)
incq %r15
cmpq $0x3, %r15
jne 0x2b54
movq %rbx, %rax
popq %rbx
popq %r14
popq %r15
retq
// File: /workspace/github_cpp_makefile_star2_O3/aempirei[P]Chat-Art/include/tile.hh
// Function: tile::set_color_lum()
void tile::set_color_lum() {
	geo.ratio = 0;
	for(int i = 0; i < 3; i++) {
		uint8_t level = (uint8_t)(rgb_sum[i] / n()) >> geometry::ratio_shift;
		geo.color[i] = rgb_mean[i] & mean_mask;
		if(level > geo.ratio)
			geo.ratio = level;
	}
}

// Assembly:
movl $0x0, 0x1c(%rdi)
movslq 0x8(%rdi), %rax
movslq 0xc(%rdi), %rcx
imulq %rax, %rcx
movq $-0x3, %rsi
movslq 0x4c(%rdi,%rsi,4), %rax
xorl %edx, %edx
divq %rcx
shrl $0x2, %eax
movl 0x40(%rdi,%rsi,4), %edx
andl $-0x2, %edx
movl %edx, 0x1c(%rdi,%rsi,4)
andl $0x3f, %eax
cmpl 0x1c(%rdi), %eax
jle 0x2bff
movl %eax, 0x1c(%rdi)
incq %rsi
jne 0x2bdc
retq
nop
// File: /workspace/github_cpp_makefile_star2_O3/aempirei[P]Chat-Art/calibration.cc
// Function: try_code(pnm const&, unsigned int, int, int, int)
bool try_code(const pnm& snapshot, code_t code, int x0, int y, int dx) {

	const rgb_t *c[2] = { NULL, NULL };

	for(int column = 0; column < code_sz; column++) {

		size_t x = x0 + column * dx;

		if(x >= snapshot.width)
			return false;

		const rgb_t *pixel = snapshot.pixel(y, x);

		int bit = BIT_ISSET(code, column);

		if(c[bit] == NULL) {

			c[bit] = pixel;

			if(c[0] != NULL && c[1] != NULL && rgb::equals(*c[0], *c[1]))
				return false;

		} else if(!rgb::equals(*pixel, *c[bit])) { 
			return false;
		}
	}

	return true;
}

// Assembly:
pushq %rbp
pushq %r14
pushq %rbx
xorps %xmm0, %xmm0
movaps %xmm0, -0x10(%rsp)
movq (%rdi), %r9
movslq %edx, %rdx
cmpq %rdx, %r9
jbe 0x2f0f
movslq %ecx, %rax
movslq %r8d, %rcx
imulq %r9, %rax
leaq (%rax,%rax,2), %rax
leaq (%rdx,%rdx,2), %r8
addq 0x10(%rdi), %r8
addq %rax, %r8
leaq (%rcx,%rcx,2), %rdi
xorl %eax, %eax
xorl %r10d, %r10d
xorl %ebx, %ebx
btl %r10d, %esi
setb %bl
movq -0x10(%rsp,%rbx,8), %r11
testq %r11, %r11
je 0x2eb0
movb (%r8), %bl
cmpb (%r11), %bl
jne 0x2f11
movb 0x1(%r8), %bl
cmpb 0x1(%r11), %bl
jne 0x2f11
movb 0x2(%r8), %bl
cmpb 0x2(%r11), %bl
je 0x2ef2
jmp 0x2f11
movq %r8, -0x10(%rsp,%rbx,8)
movq -0x10(%rsp), %r11
movq -0x8(%rsp), %rbx
testq %r11, %r11
setne %bpl
testq %rbx, %rbx
setne %r14b
andb %bpl, %r14b
cmpb $0x1, %r14b
jne 0x2ef2
movb (%r11), %bpl
cmpb (%rbx), %bpl
jne 0x2ef2
movb 0x1(%r11), %bpl
cmpb 0x1(%rbx), %bpl
jne 0x2ef2
movb 0x2(%r11), %r11b
cmpb 0x2(%rbx), %r11b
je 0x2f11
cmpq $0x1f, %r10
setae %al
je 0x2f11
addq %rdi, %r8
addq %rcx, %rdx
incq %r10
cmpq %rdx, %r9
ja 0x2e7f
jmp 0x2f11
xorl %eax, %eax
andb $0x1, %al
popq %rbx
popq %r14
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O3/aempirei[P]Chat-Art/calibration.cc
// Function: find_code(pnm const&, int, unsigned int, int*, int*)
bool find_code(const pnm& snapshot, int y0, code_t code, pos_t pos, int *tile_width) {

	size_t max_tile_width = snapshot.width / code_sz;

	for(int dx = max_tile_width; dx > 0; dx--) {

		size_t tile_columns = snapshot.width / dx;
		size_t x_offset = snapshot.width % dx;

		for(size_t column = 0; column + code_sz - 1 < tile_columns; column++) {

			for(size_t y = y0; y < snapshot.height; y++) {

				int x0 = column * dx + x_offset;

				if(try_code(snapshot, code, x0, y, dx)) {

					while(try_code(snapshot, code, x0 - 1, y, dx))
						x0--;

					pos[0] = x0;
					pos[1] = y;

					*tile_width = dx;

					return true;
				}
			}
		}
	}

	return false;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x48, %rsp
movq (%rdi), %rax
movq %rax, %r15
shrq $0x5, %r15
testl %r15d, %r15d
jle 0x2fed
movq %rdi, %r12
movl %edx, (%rsp)
movq %rcx, 0x8(%rsp)
movq %r8, 0x10(%rsp)
movl %esi, 0x4(%rsp)
movslq %esi, %rcx
movq 0x8(%rdi), %rdx
andl $0x7fffffff, %r15d      # imm = 0x7FFFFFFF
movq %rdx, 0x30(%rsp)
movq %rcx, 0x38(%rsp)
subq %rcx, %rdx
movq %rdx, 0x20(%rsp)
movq %rax, 0x18(%rsp)
xorl %edx, %edx
divq %r15
movq %rdx, 0x28(%rsp)
movq %rax, 0x40(%rsp)
cmpq $0x20, %rax
jb 0x2fdb
xorl %r13d, %r13d
movq 0x30(%rsp), %rax
cmpq 0x38(%rsp), %rax
jbe 0x2fc9
movl %r13d, %r14d
imull %r15d, %r14d
addl 0x28(%rsp), %r14d
movl 0x4(%rsp), %ebx
movq 0x20(%rsp), %rbp
movq %r12, %rdi
movl (%rsp), %esi
movl %r14d, %edx
movl %ebx, %ecx
movl %r15d, %r8d
callq 0x2e42
testb %al, %al
jne 0x2ff1
incl %ebx
decq %rbp
jne 0x2fab
leaq 0x1(%r13), %rax
addq $0x20, %r13
cmpq 0x40(%rsp), %r13
movq %rax, %r13
jb 0x2f8a
leaq -0x1(%r15), %rax
cmpq $0x1, %r15
movq %rax, %r15
movq 0x18(%rsp), %rax
jg 0x2f72
xorl %eax, %eax
jmp 0x3026
movl (%rsp), %ebp
movl %r14d, %r13d
leal -0x1(%r13), %r14d
movq %r12, %rdi
movl %ebp, %esi
movl %r14d, %edx
movl %ebx, %ecx
movl %r15d, %r8d
callq 0x2e42
testb %al, %al
jne 0x2ff4
movq 0x8(%rsp), %rax
movl %r13d, (%rax)
movl %ebx, 0x4(%rax)
movq 0x10(%rsp), %rax
movl %r15d, (%rax)
movb $0x1, %al
addq $0x48, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O3/aempirei[P]Chat-Art/calibration.cc
// Function: process_calibration()
void process_calibration() {

	pnm snapshot(stdin);
	config cfg;

	if(snapshot.isloaded()) {

		pos_t prefix_pos;
		pos_t suffix_pos;

		int prefix_tile_width;
		int suffix_tile_width;

		if(	find_code(snapshot, 0, prefix_code, prefix_pos, &prefix_tile_width) &&
				find_code(snapshot, prefix_pos[1] + 1, suffix_code, suffix_pos, &suffix_tile_width))
		{

			int hn = suffix_pos[1] - prefix_pos[1];

			if(	(prefix_tile_width == suffix_tile_width) &&
					(prefix_pos[0] == suffix_pos[0]) &&
					(hn % (calibration_lines - 1) == 0))
			{

				pos_t tile_sz = { prefix_tile_width, hn / (calibration_lines - 1) };

				process_tiles(cfg, snapshot, tile_sz, prefix_pos);
			}
		}
	}
}

// Assembly:
pushq %rbx
subq $0x80, %rsp
movq 0x47b9(%rip), %rax      # 0x7fc8
movq (%rax), %rsi
leaq 0x18(%rsp), %rbx
movq %rbx, %rdi
callq 0x280a
xorps %xmm0, %xmm0
movaps %xmm0, 0x60(%rsp)
movaps %xmm0, 0x50(%rsp)
movaps %xmm0, 0x40(%rsp)
movaps %xmm0, 0x30(%rsp)
movq $0x0, 0x70(%rsp)
cmpq $0x0, 0x10(%rbx)
je 0x391e
cmpq $0x0, 0x18(%rsp)
je 0x391e
cmpq $0x0, 0x20(%rsp)
je 0x391e
leaq 0x18(%rsp), %rdi
leaq 0x8(%rsp), %rcx
leaq 0x4(%rsp), %r8
xorl %esi, %esi
movl $0xa55faced, %edx       # imm = 0xA55FACED
callq 0x2f18
testb %al, %al
je 0x391e
movl 0xc(%rsp), %ebx
leal 0x1(%rbx), %esi
leaq 0x18(%rsp), %rdi
leaq 0x10(%rsp), %rcx
movq %rsp, %r8
movl $0x1deadfed, %edx       # imm = 0x1DEADFED
callq 0x2f18
testb %al, %al
je 0x391e
movl 0x4(%rsp), %eax
cmpl (%rsp), %eax
jne 0x391e
movl 0x8(%rsp), %ecx
cmpl 0x10(%rsp), %ecx
jne 0x391e
movl 0x14(%rsp), %ecx
subl %ebx, %ecx
movslq %ecx, %rdx
imulq $-0x6db6db6d, %rdx, %rcx # imm = 0x92492493
shrq $0x20, %rcx
addl %edx, %ecx
movl %ecx, %esi
shrl $0x1f, %esi
sarl $0x2, %ecx
addl %esi, %ecx
leal (,%rcx,8), %esi
movl %ecx, %edi
subl %esi, %edi
addl %edx, %edi
jne 0x391e
leaq 0x78(%rsp), %rdx
movl %eax, (%rdx)
movl %ecx, 0x4(%rdx)
leaq 0x30(%rsp), %rdi
leaq 0x18(%rsp), %rsi
leaq 0x8(%rsp), %rcx
callq 0x329c
movq 0x60(%rsp), %rdi
testq %rdi, %rdi
je 0x391e
movq 0x70(%rsp), %rsi
subq %rdi, %rsi
callq 0x21d0
movq 0x48(%rsp), %rdi
testq %rdi, %rdi
je 0x3935
movq 0x58(%rsp), %rsi
subq %rdi, %rsi
callq 0x21d0
movq 0x30(%rsp), %rdi
testq %rdi, %rdi
je 0x394c
movq 0x40(%rsp), %rsi
subq %rdi, %rsi
callq 0x21d0
movq 0x28(%rsp), %rdi
testq %rdi, %rdi
je 0x395b
callq 0x2220
addq $0x80, %rsp
popq %rbx
retq
movq %rax, %rbx
leaq 0x30(%rsp), %rdi
callq 0x4280
movq 0x28(%rsp), %rdi
testq %rdi, %rdi
je 0x3980
callq 0x2220
movq %rbx, %rdi
callq 0x2300