LLM4Binary/decompile-bench-makefile huggingface dataset:
// File: /workspace/github_cpp_makefile_star2_O1/davidcairuz[P]network-internet-relay-chat/socket.cpp
// Function: Socket::Socket(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, int)
Socket::Socket(string ip, string name, int port) {
	if (log) cout << "Creating socket\n";
	
	this->connected = false;
	this->name = name;
	this->port = port;
	this->ip = ip;

    this->sock_fd = socket(AF_INET, SOCK_STREAM, 0);
	this->conn_fd = this->sock_fd;

	if (this->sock_fd == -1) {
        this->error.set_occurred();
        this->error.set_message("Could not create socket T.T\n");
    }

	size_t size = sizeof(&serv_addr);
    bzero(&serv_addr, size);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x48, %rsp
movl %ecx, %ebx
movq %rdx, %r15
movq %rsi, %r13
movq %rdi, %r14
leaq 0x8(%rdi), %rax
movq %rax, -0x48(%rbp)
leaq 0x18(%rdi), %rax
movq %rax, -0x38(%rbp)
movq %rax, 0x8(%rdi)
xorl %eax, %eax
movq %rax, 0x10(%rdi)
movb %al, 0x18(%rdi)
leaq 0x28(%rdi), %r12
leaq 0x38(%rdi), %rcx
movq %rcx, -0x30(%rbp)
movq %rcx, 0x28(%rdi)
movq %rax, 0x30(%rdi)
movb %al, 0x38(%rdi)
addq $0x48, %rdi
movq %rdi, -0x40(%rbp)
movq %r12, -0x50(%rbp)
callq 0x24fc
movb $0x0, 0x74(%r14)
movq %r12, %rdi
movq %r15, %rsi
callq 0x20e0
movl %ebx, (%r14)
movq -0x48(%rbp), %rdi
movq %r13, %rsi
callq 0x20e0
movl $0x2, %edi
movl $0x1, %esi
xorl %edx, %edx
callq 0x2050
movl %eax, 0x98(%r14)
movl %eax, 0x70(%r14)
cmpl $-0x1, %eax
jne 0x279f
movq -0x40(%rbp), %rdi
callq 0x2526
leaq -0x60(%rbp), %rbx
movq %rbx, -0x10(%rbx)
leaq 0x28da(%rip), %rsi      # 0x5047
leaq 0x28ef(%rip), %rdx      # 0x5063
leaq -0x70(%rbp), %rdi
callq 0x261a
leaq -0x70(%rbp), %rsi
movq -0x40(%rbp), %rdi
callq 0x2544
movq -0x70(%rbp), %rdi
cmpq %rbx, %rdi
je 0x279f
movq -0x60(%rbp), %rsi
incq %rsi
callq 0x21c0
movq $0x0, 0x78(%r14)
addq $0x48, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movq %rax, %r12
movq -0x70(%rbp), %rdi
cmpq %rbx, %rdi
je 0x27da
movq -0x60(%rbp), %rsi
incq %rsi
callq 0x21c0
jmp 0x27da
jmp 0x27d7
movq %rax, %r12
jmp 0x27f2
movq %rax, %r12
movq 0x50(%r14), %rdi
addq $0x60, %r14
cmpq %r14, %rdi
je 0x27f2
movq (%r14), %rsi
incq %rsi
callq 0x21c0
movq -0x50(%rbp), %rax
movq (%rax), %rdi
cmpq -0x30(%rbp), %rdi
je 0x280e
movq -0x30(%rbp), %rax
movq (%rax), %rsi
incq %rsi
callq 0x21c0
movq -0x48(%rbp), %rax
movq (%rax), %rdi
cmpq -0x38(%rbp), %rdi
je 0x282a
movq -0x38(%rbp), %rax
movq (%rax), %rsi
incq %rsi
callq 0x21c0
movq %r12, %rdi
callq 0x2280
// File: /workspace/github_cpp_makefile_star2_O1/davidcairuz[P]network-internet-relay-chat/socket.cpp
// Function: Socket::Disconnect()
void Socket::Disconnect() {
	if (log) cout << "Disconnecting\n";

	int status = close(this->sock_fd);

	if (status == -1) {
		this->error.set_occurred();
		this->error.set_message("Could not disconnect... =(\n");
	}
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %rbx
subq $0x28, %rsp
movq %rdi, %rbx
movl 0x98(%rdi), %edi
callq 0x22e0
cmpl $-0x1, %eax
jne 0x290c
addq $0x48, %rbx
movq %rbx, %rdi
callq 0x2526
leaq -0x28(%rbp), %r15
movq %r15, -0x10(%r15)
leaq 0x27f5(%rip), %rsi      # 0x50ce
leaq 0x2809(%rip), %rdx      # 0x50e9
leaq -0x38(%rbp), %r14
movq %r14, %rdi
callq 0x261a
movq %rbx, %rdi
movq %r14, %rsi
callq 0x2544
movq -0x38(%rbp), %rdi
cmpq %r15, %rdi
je 0x290c
movq -0x28(%rbp), %rsi
incq %rsi
callq 0x21c0
addq $0x28, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
movq %rax, %rbx
movq -0x38(%rbp), %rdi
cmpq %r15, %rdi
je 0x292f
movq -0x28(%rbp), %rsi
incq %rsi
callq 0x21c0
movq %rbx, %rdi
callq 0x2280
nop
// File: /workspace/github_cpp_makefile_star2_O1/davidcairuz[P]network-internet-relay-chat/socket.cpp
// Function: Socket::Bind()
void Socket::Bind(){
	if (log) cout << "Binding socket\n";
	
	/* IPV4 */
	this->serv_addr.sin_family = AF_INET;

	/* Manda o socket ouvir em todas as interfaces disponíveis */
	this->serv_addr.sin_addr.s_addr = htonl(INADDR_ANY);

	/* Port em network byte order */
	this->serv_addr.sin_port = htons(this->port);

	int status = bind(this->sock_fd, (struct sockaddr *)&serv_addr, sizeof(serv_addr));

	if (status == -1){
		this->error.set_occurred();
		this->error.set_message("Could not bind with the server ;-;\n");
		return;
	}
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %rbx
subq $0x28, %rsp
movq %rdi, %rbx
leaq 0x78(%rdi), %rsi
movw $0x2, 0x78(%rdi)
movl $0x0, 0x7c(%rdi)
movzwl (%rdi), %eax
rolw $0x8, %ax
movw %ax, 0x7a(%rdi)
movl 0x98(%rdi), %edi
movl $0x10, %edx
callq 0x2040
cmpl $-0x1, %eax
jne 0x29c7
addq $0x48, %rbx
movq %rbx, %rdi
callq 0x2526
leaq -0x28(%rbp), %r15
movq %r15, -0x10(%r15)
leaq 0x26d0(%rip), %rsi      # 0x5064
leaq 0x26ec(%rip), %rdx      # 0x5087
leaq -0x38(%rbp), %r14
movq %r14, %rdi
callq 0x261a
movq %rbx, %rdi
movq %r14, %rsi
callq 0x2544
movq -0x38(%rbp), %rdi
cmpq %r15, %rdi
je 0x29c7
movq -0x28(%rbp), %rsi
incq %rsi
callq 0x21c0
addq $0x28, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
movq %rax, %rbx
movq -0x38(%rbp), %rdi
cmpq %r15, %rdi
je 0x29ea
movq -0x28(%rbp), %rsi
incq %rsi
callq 0x21c0
movq %rbx, %rdi
callq 0x2280
// File: /workspace/github_cpp_makefile_star2_O1/davidcairuz[P]network-internet-relay-chat/socket.cpp
// Function: Socket::Connect()
void Socket::Connect() {
	if (log) cout << "Connecting socket\n";
	
	/* IPV4 */
	this->serv_addr.sin_family = AF_INET;
	
	/* Diz em que porta está o servidor a ser conectado */
	this->serv_addr.sin_addr.s_addr = inet_addr((this->ip).c_str());
	
	/* Port em network byte order */
	this->serv_addr.sin_port = htons(this->port);
    
	int status = connect(this->sock_fd, (struct sockaddr*)&serv_addr, sizeof(serv_addr));

	if (status == -1) {
		this->error.set_occurred();
		this->error.set_message("Could not connect with the server =(\n");
		return;
	}
    
    this->connected = true;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %rbx
subq $0x28, %rsp
movq %rdi, %rbx
leaq 0x78(%rdi), %r14
movw $0x2, 0x78(%rdi)
movq 0x8(%rdi), %rdi
callq 0x21b0
movl %eax, 0x7c(%rbx)
movzwl (%rbx), %eax
rolw $0x8, %ax
movw %ax, 0x7a(%rbx)
movl 0x98(%rbx), %edi
movq %r14, %rsi
movl $0x10, %edx
callq 0x2150
cmpl $-0x1, %eax
je 0x2a57
movb $0x1, 0x74(%rbx)
jmp 0x2aa5
addq $0x48, %rbx
movq %rbx, %rdi
callq 0x2526
leaq -0x28(%rbp), %r15
movq %r15, -0x10(%r15)
leaq 0x2616(%rip), %rsi      # 0x5088
leaq 0x2634(%rip), %rdx      # 0x50ad
leaq -0x38(%rbp), %r14
movq %r14, %rdi
callq 0x261a
movq %rbx, %rdi
movq %r14, %rsi
callq 0x2544
movq -0x38(%rbp), %rdi
cmpq %r15, %rdi
je 0x2aa5
movq -0x28(%rbp), %rsi
incq %rsi
callq 0x21c0
addq $0x28, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
movq %rax, %rbx
movq -0x38(%rbp), %rdi
cmpq %r15, %rdi
je 0x2ac8
movq -0x28(%rbp), %rsi
incq %rsi
callq 0x21c0
movq %rbx, %rdi
callq 0x2280
// File: /workspace/github_cpp_makefile_star2_O1/davidcairuz[P]network-internet-relay-chat/socket.cpp
// Function: Socket::Accept[abi:cxx11]()
pair<int, string> Socket::Accept() {
	if (log) cout << "Accepting\n";
	
	sockaddr_in received_addr;
	socklen_t addr_size = sizeof(received_addr);

	int connection_fd = accept(this->sock_fd, (struct sockaddr *)&received_addr, &addr_size);

	if (connection_fd == -1) {
		this->error.set_occurred();
		this->error.set_message("Server didn't accept, sorry =(\n");
		return pair<int, string>(-1, "");
	}
	
	this->conn_fd = connection_fd;
	getpeername(connection_fd, (struct sockaddr*)&received_addr, &addr_size);
	return pair<int, string>(connection_fd, inet_ntoa(received_addr.sin_addr));
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
subq $0x40, %rsp
movq %rsi, %r14
movq %rdi, %rbx
leaq -0x28(%rbp), %rdx
movl $0x10, (%rdx)
movl 0x98(%rsi), %edi
leaq -0x58(%rbp), %rsi
callq 0x2080
cmpl $-0x1, %eax
je 0x2b3a
movl %eax, %r15d
movl %eax, 0x70(%r14)
leaq -0x58(%rbp), %r14
leaq -0x28(%rbp), %rdx
movl %eax, %edi
movq %r14, %rsi
callq 0x2120
movl 0x4(%r14), %edi
callq 0x20c0
movl %r15d, (%rbx)
leaq 0x8(%rbx), %rdi
leaq -0x21(%rbp), %rdx
movq %rax, %rsi
callq 0x2e8c
jmp 0x2baa
addq $0x48, %r14
movq %r14, %rdi
callq 0x2526
leaq -0x38(%rbp), %r12
movq %r12, -0x10(%r12)
leaq 0x2558(%rip), %rsi      # 0x50ae
leaq 0x2570(%rip), %rdx      # 0x50cd
leaq -0x48(%rbp), %r15
movq %r15, %rdi
callq 0x261a
movq %r14, %rdi
movq %r15, %rsi
callq 0x2544
movq -0x48(%rbp), %rdi
cmpq %r12, %rdi
je 0x2b89
movq -0x38(%rbp), %rsi
incq %rsi
callq 0x21c0
movl $0xffffffff, (%rbx)     # imm = 0xFFFFFFFF
leaq 0x8(%rbx), %rdi
leaq 0x18(%rbx), %rax
movq %rax, 0x8(%rbx)
leaq 0x26e2(%rip), %rdx      # 0x5284
movq %rdx, %rsi
callq 0x261a
movq %rbx, %rax
addq $0x40, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
movq %rax, %rbx
movq -0x48(%rbp), %rdi
cmpq %r12, %rdi
je 0x2bd2
movq -0x38(%rbp), %rsi
incq %rsi
callq 0x21c0
movq %rbx, %rdi
callq 0x2280
// File: /workspace/github_cpp_makefile_star2_O1/davidcairuz[P]network-internet-relay-chat/socket.cpp
// Function: Socket::Read[abi:cxx11](int)
string Socket::Read(int conn_fd) {
	if (log) cout << "Reading\n";

	char helper[buffer_size + 1];
	bzero(helper, sizeof(helper));
	
	int status = read(conn_fd, helper, sizeof(helper));

	if (status == -1) {
		this->error.set_occurred();
		this->error.set_message("Could not read... =(\n");
	}
	
	string ret(helper);
	return ret;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
subq $0x1030, %rsp           # imm = 0x1030
movl %edx, %r15d
movq %rsi, %r14
movq %rdi, %rbx
leaq -0x1050(%rbp), %r12
movl $0x1001, %edx           # imm = 0x1001
movq %r12, %rdi
xorl %esi, %esi
callq 0x20f0
movl $0x1001, %edx           # imm = 0x1001
movl %r15d, %edi
movq %r12, %rsi
callq 0x2250
cmpl $-0x1, %eax
jne 0x2c6f
addq $0x48, %r14
movq %r14, %rdi
callq 0x2526
leaq -0x30(%rbp), %r12
movq %r12, -0x10(%r12)
leaq 0x24ae(%rip), %rsi      # 0x50ea
leaq 0x24bc(%rip), %rdx      # 0x50ff
leaq -0x40(%rbp), %r15
movq %r15, %rdi
callq 0x261a
movq %r14, %rdi
movq %r15, %rsi
callq 0x2544
movq -0x40(%rbp), %rdi
cmpq %r12, %rdi
je 0x2c6f
movq -0x30(%rbp), %rsi
incq %rsi
callq 0x21c0
leaq 0x10(%rbx), %rax
movq %rax, (%rbx)
leaq -0x1050(%rbp), %r14
movq %r14, %rdi
callq 0x20b0
leaq (%rax,%rbp), %rdx
addq $-0x1050, %rdx          # imm = 0xEFB0
movq %rbx, %rdi
movq %r14, %rsi
callq 0x261a
movq %rbx, %rax
addq $0x1030, %rsp           # imm = 0x1030
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
movq %rax, %rbx
movq -0x40(%rbp), %rdi
cmpq %r12, %rdi
je 0x2cc6
movq -0x30(%rbp), %rsi
incq %rsi
callq 0x21c0
movq %rbx, %rdi
callq 0x2280
// File: /workspace/github_cpp_makefile_star2_O1/davidcairuz[P]network-internet-relay-chat/socket.cpp
// Function: Socket::Write(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, int)
int Socket::Write(string msg, int conn_fd) {
	if (log) cout << "Writing\n";

	// Default conn_fd
	if (conn_fd == -1) conn_fd = this->conn_fd;

	char helper[buffer_size + 1];
	bzero(helper, sizeof(helper));
	strcpy(helper, msg.c_str());

	int status = write(conn_fd, helper, sizeof(helper));

	if (status < 1) {
		this->error.set_occurred();
		this->error.set_message("Could not write... =(\n");
	}

	return status;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
subq $0x1030, %rsp           # imm = 0x1030
movl %edx, %r14d
movq %rsi, %r15
movq %rdi, %rbx
cmpl $-0x1, %edx
jne 0x2cf2
movl 0x70(%rbx), %r14d
leaq -0x1050(%rbp), %r12
movl $0x1001, %edx           # imm = 0x1001
movq %r12, %rdi
xorl %esi, %esi
callq 0x20f0
movq (%r15), %rsi
movq %r12, %rdi
callq 0x2180
movl $0x1001, %edx           # imm = 0x1001
movl %r14d, %edi
movq %r12, %rsi
callq 0x2090
movq %rax, %r14
testl %r14d, %r14d
jg 0x2d7a
addq $0x48, %rbx
movq %rbx, %rdi
callq 0x2526
leaq -0x30(%rbp), %r12
movq %r12, -0x10(%r12)
leaq 0x23b9(%rip), %rsi      # 0x5100
leaq 0x23c8(%rip), %rdx      # 0x5116
leaq -0x40(%rbp), %r15
movq %r15, %rdi
callq 0x261a
movq %rbx, %rdi
movq %r15, %rsi
callq 0x2544
movq -0x40(%rbp), %rdi
cmpq %r12, %rdi
je 0x2d7a
movq -0x30(%rbp), %rsi
incq %rsi
callq 0x21c0
movl %r14d, %eax
addq $0x1030, %rsp           # imm = 0x1030
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
movq %rax, %rbx
movq -0x40(%rbp), %rdi
cmpq %r12, %rdi
je 0x2da5
movq -0x30(%rbp), %rsi
incq %rsi
callq 0x21c0
movq %rbx, %rdi
callq 0x2280
nop
// File: /workspace/github_cpp_makefile_star2_O1/davidcairuz[P]network-internet-relay-chat/socket.cpp
// Function: Socket::Check()
void Socket::Check() {
    if (!this->Has_error()) return;
	
	cout << this->Get_error();
	delete this;
	exit(1);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %rbx
subq $0x28, %rsp
movq %rdi, %rbx
leaq 0x48(%rdi), %r14
movq %r14, %rdi
callq 0x253a
testl %eax, %eax
jne 0x2df1
addq $0x28, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
leaq -0x38(%rbp), %r15
movq %r15, %rdi
movq %r14, %rsi
callq 0x2552
movq 0x51c9(%rip), %rdi      # 0x7fd0
movq %r15, %rsi
callq 0x2170
leaq -0x38(%rbp), %rdi
callq 0x22f8
movq %rbx, %rdi
callq 0x2832
movl $0xa0, %esi
movq %rbx, %rdi
callq 0x21c0
movl $0x1, %edi
callq 0x2220
movq %rax, %rbx
leaq -0x28(%rbp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x2e53
movq -0x28(%rbp), %rsi
incq %rsi
callq 0x21c0
movq %rbx, %rdi
callq 0x2280
nop
// File: /workspace/github_cpp_makefile_star2_O1/davidcairuz[P]network-internet-relay-chat/client.cpp
// Function: check_channel_name(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>)
bool check_channel_name(string name){
    if(name.size() == 0 or name.size() > 200) return false;
    if(name[0] != '#' and name[0] != '&') return false;
    if(name.find(' ') != name.npos) return false;
    if(name.find(',') != name.npos) return false;
    if(name.find((char)7) != name.npos) return false;
    return true;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r14
pushq %rbx
movq $-0xc9, %rax
addq 0x8(%rdi), %rax
cmpq $-0xc8, %rax
jb 0x2f8b
movq %rdi, %rbx
movq (%rdi), %rax
movzbl (%rax), %eax
cmpl $0x26, %eax
je 0x2f42
cmpl $0x23, %eax
jne 0x2f8b
xorl %r14d, %r14d
movq %rbx, %rdi
movl $0x20, %esi
xorl %edx, %edx
callq 0x2240
cmpq $-0x1, %rax
jne 0x2f8e
xorl %r14d, %r14d
movq %rbx, %rdi
movl $0x2c, %esi
xorl %edx, %edx
callq 0x2240
cmpq $-0x1, %rax
jne 0x2f8e
movq %rbx, %rdi
movl $0x7, %esi
xorl %edx, %edx
callq 0x2240
cmpq $-0x1, %rax
sete %r14b
jmp 0x2f8e
xorl %r14d, %r14d
movl %r14d, %eax
popq %rbx
popq %r14
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O1/davidcairuz[P]network-internet-relay-chat/client.cpp
// Function: check_username(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>)
bool check_username(string username) {
    if (username.size() <= 2) return false;
    if (username == "server") return false;

    for (char letter : username) {
        if (!check_letter(letter)) return false;
    }
    return true;
}

// Assembly:
cmpq $0x3, 0x8(%rdi)
jae 0x3002
xorl %eax, %eax
jmp 0x3071
pushq %rbp
movq %rsp, %rbp
pushq %rbx
pushq %rax
movq %rdi, %rbx
leaq 0x232c(%rip), %rsi      # 0x533e
callq 0x2070
testl %eax, %eax
je 0x3069
movq 0x8(%rbx), %rcx
testq %rcx, %rcx
sete %al
je 0x306b
movq (%rbx), %rdx
xorl %esi, %esi
movabsq $0x4000000000003, %rdi  # imm = 0x4000000000003
movzbl (%rdx,%rsi), %r8d
movl %r8d, %r9d
andb $-0x21, %r9b
addb $-0x41, %r9b
cmpb $0x1a, %r9b
jb 0x305c
addl $-0x2d, %r8d
cmpl $0x32, %r8d
ja 0x306b
btq %r8, %rdi
jae 0x306b
incq %rsi
cmpq %rsi, %rcx
sete %al
jne 0x3036
jmp 0x306b
xorl %eax, %eax
addq $0x8, %rsp
popq %rbx
popq %rbp
andb $0x1, %al
retq
// File: /workspace/github_cpp_makefile_star2_O1/davidcairuz[P]network-internet-relay-chat/client.cpp
// Function: get_nickname[abi:cxx11]()
string get_nickname() {
    string nickname = "";
    cout << "Type your nickname (a-z, A-Z, ., _, -, size > 2): ";
    
    if(!getline(cin, nickname)) {
        cout << "Quitting" << endl;
        exit(0);
    }
    
    // espera nome válido
    while (!check_username(nickname)) {
        cout << "Type a valid username (a-z, A-Z, ., _, -, size > 2): ";
        if(!getline(cin, nickname)) {
           cout << "Quitting" << endl;
           exit(0);
        }
    }

    return nickname;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x28, %rsp
movq %rdi, %rbx
leaq 0x10(%rdi), %rax
movq %rax, -0x30(%rbp)
movq %rax, (%rdi)
leaq 0x21ea(%rip), %rdx      # 0x5284
movq %rdx, %rsi
callq 0x261a
movq 0x4f27(%rip), %rdi      # 0x7fd0
leaq 0x21d5(%rip), %rsi      # 0x5285
movl $0x32, %edx
callq 0x21f0
movq 0x4f1f(%rip), %rdi      # 0x7fe0
movq (%rdi), %rax
addq -0x18(%rax), %rdi
movl $0xa, %esi
callq 0x2190
movsbl %al, %edx
movq 0x4f04(%rip), %r14      # 0x7fe0
movq %r14, %rdi
movq %rbx, %rsi
callq 0x22c0
movq (%rax), %rcx
movq -0x18(%rcx), %rcx
testb $0x5, 0x20(%rax,%rcx)
jne 0x31c5
leaq -0x40(%rbp), %r13
leaq -0x50(%rbp), %r15
movq %r13, -0x50(%rbp)
movq (%rbx), %rsi
movq 0x8(%rbx), %rdx
addq %rsi, %rdx
movq %r15, %rdi
callq 0x2580
movq %r15, %rdi
callq 0x2ff7
movl %eax, %r12d
movq -0x50(%rbp), %rdi
cmpq %r13, %rdi
je 0x3137
movq -0x40(%rbp), %rsi
incq %rsi
callq 0x21c0
testb %r12b, %r12b
jne 0x31b3
movl $0x35, %edx
movq 0x4e88(%rip), %rdi      # 0x7fd0
leaq 0x2172(%rip), %rsi      # 0x52c1
callq 0x21f0
movq (%r14), %rax
movq -0x18(%rax), %rdi
addq %r14, %rdi
movl $0xa, %esi
callq 0x2190
movsbl %al, %edx
movq %r14, %rdi
movq %rbx, %rsi
callq 0x22c0
movq (%rax), %rcx
movq -0x18(%rcx), %rcx
testb $0x5, 0x20(%rax,%rcx)
je 0x3101
movq 0x4e41(%rip), %rdi      # 0x7fd0
leaq 0x2122(%rip), %rsi      # 0x52b8
movl $0x8, %edx
callq 0x21f0
movq 0x4e29(%rip), %rdi      # 0x7fd0
callq 0x20d0
xorl %edi, %edi
callq 0x2220
movq %rbx, %rax
addq $0x28, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movq 0x4e04(%rip), %rdi      # 0x7fd0
leaq 0x20e5(%rip), %rsi      # 0x52b8
movl $0x8, %edx
callq 0x21f0
movq 0x4dec(%rip), %rdi      # 0x7fd0
callq 0x20d0
jmp 0x31ac
jmp 0x31ed
movq %rax, %r14
movq (%rbx), %rdi
movq -0x30(%rbp), %rax
cmpq %rax, %rdi
je 0x3207
movq (%rax), %rsi
incq %rsi
callq 0x21c0
movq %r14, %rdi
callq 0x2280
// File: /workspace/github_cpp_makefile_star2_O1/davidcairuz[P]network-internet-relay-chat/client.cpp
// Function: client_receive_thread(void*)
void* client_receive_thread(void* arg) {
    string message = "";
    int failed = 0;

    while (!quit) {
        do {
            message = client_socket->Read(client_socket->Get_conn_fd());
            client_socket->Check();
            cout << message << "\n";
            
            if (message == "Too many people here, you are not welcome\n") { // server cheio
                quit = true;
                break;
            } else if (message.empty()) { // checa se houve max_retries erros
                failed++;
                sleep(1);
                
                if (failed >= Socket::max_retries) {
                    cout << "Server is down" << endl;
                    break;
                } else 
                    continue;
            
            } else {
                failed = 0;
            }

            message = "";

        } while (message.size() == Socket::buffer_size && !quit);
    }

    pthread_exit(NULL);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x48, %rsp
leaq -0x38(%rbp), %rax
movq %rax, -0x10(%rax)
leaq 0x2031(%rip), %rdx      # 0x5284
leaq -0x48(%rbp), %rdi
movq %rdx, %rsi
callq 0x261a
cmpb $0x0, 0x4f7a(%rip)      # 0x81e0
je 0x326f
xorl %edi, %edi
callq 0x2290
xorl %r13d, %r13d
leaq -0x68(%rbp), %rbx
leaq -0x48(%rbp), %r14
movq 0x4d4f(%rip), %r15      # 0x7fd0
movq 0x4f60(%rip), %r12      # 0x81e8
movq %r12, %rdi
callq 0x2dbc
movq %rbx, %rdi
movq %r12, %rsi
movl %eax, %edx
callq 0x2bda
movq %r14, %rdi
movq %rbx, %rsi
callq 0x2230
movq -0x68(%rbp), %rdi
leaq -0x58(%rbp), %rax
cmpq %rax, %rdi
je 0x32c1
movq -0x58(%rbp), %rsi
incq %rsi
callq 0x21c0
movq 0x4f20(%rip), %rdi      # 0x81e8
callq 0x2dc6
movq -0x48(%rbp), %rsi
movq -0x40(%rbp), %rdx
movq %r15, %rdi
callq 0x21f0
movl $0x1, %edx
movq %rax, %rdi
leaq 0x1f97(%rip), %rsi      # 0x5283
callq 0x21f0
movq %r14, %rdi
leaq 0x1ffc(%rip), %rsi      # 0x52f7
callq 0x2070
testl %eax, %eax
je 0x3326
movq -0x40(%rbp), %rdx
testq %rdx, %rdx
je 0x332f
xorl %r13d, %r13d
movq %r14, %rdi
xorl %esi, %esi
leaq 0x1f68(%rip), %rcx      # 0x5284
xorl %r8d, %r8d
callq 0x2270
jmp 0x3383
movb $0x1, 0x4eb3(%rip)      # 0x81e0
jmp 0x339f
movl $0x1, %edi
callq 0x2130
leal 0x1(%r13), %r12d
cmpl $0x4, %r13d
jl 0x3380
movl $0xe, %edx
movq %r15, %rdi
leaq 0x1fd0(%rip), %rsi      # 0x5322
callq 0x21f0
movq (%r15), %rax
movq -0x18(%rax), %rdi
addq %r15, %rdi
movl $0xa, %esi
callq 0x2190
movsbl %al, %esi
movq %r15, %rdi
callq 0x2030
movq %rax, %rdi
callq 0x2100
jmp 0x33a2
movl %r12d, %r13d
cmpq $0x1000, -0x40(%rbp)    # imm = 0x1000
jne 0x339f
testb $0x1, 0x4e4c(%rip)      # 0x81e0
movl %r13d, %r12d
je 0x3281
jmp 0x33a2
movl %r13d, %r12d
cmpb $0x1, 0x4e37(%rip)      # 0x81e0
movl %r12d, %r13d
jne 0x3281
jmp 0x3268
jmp 0x33bd
jmp 0x33bd
jmp 0x33bd
movq %rax, %rbx
movq -0x48(%rbp), %rdi
leaq -0x38(%rbp), %rax
cmpq %rax, %rdi
je 0x33d9
movq -0x38(%rbp), %rsi
incq %rsi
callq 0x21c0
movq %rbx, %rdi
callq 0x2280
// File: /workspace/github_cpp_makefile_star2_O1/cimtools[P]yaaclc/src/main.cpp
// Function: main
int main(int argc, char* argv[]){
    cout << "begining" << endl;
    cout << argv[1] << endl;
    
    Analizer_ACL analizer(argv[1]);
    cout << "Object created" << endl;

    cout << analizer.token_vector.size() << endl;
    analizer.lexer();

    return 0;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %rbx
subq $0x78, %rsp
movq %rsi, %rbx
movq 0x97c5(%rip), %r14      # 0xbfd8
leaq 0x67ea(%rip), %rsi      # 0x9004
movl $0x8, %edx
movq %r14, %rdi
callq 0x2210
movq (%r14), %rax
movq -0x18(%rax), %rdi
addq %r14, %rdi
movl $0xa, %esi
callq 0x21b0
movsbl %al, %esi
movq %r14, %rdi
callq 0x2030
movq %rax, %rdi
callq 0x2140
movq 0x8(%rbx), %r15
testq %r15, %r15
je 0x2873
movq %r15, %rdi
callq 0x2100
movq 0x9772(%rip), %rdi      # 0xbfd8
movq %r15, %rsi
movq %rax, %rdx
callq 0x2210
jmp 0x288b
movq (%r14), %rax
movq -0x18(%rax), %rax
leaq (%r14,%rax), %rdi
movl 0x20(%r14,%rax), %esi
orl $0x1, %esi
callq 0x2320
movq (%r14), %rax
movq -0x18(%rax), %rdi
addq %r14, %rdi
movl $0xa, %esi
callq 0x21b0
movsbl %al, %esi
movq %r14, %rdi
callq 0x2030
movq %rax, %rdi
callq 0x2140
movq 0x8(%rbx), %rsi
leaq -0x40(%rbp), %rdi
leaq -0x19(%rbp), %rdx
callq 0x2a00
leaq -0x90(%rbp), %rdi
leaq -0x40(%rbp), %rsi
callq 0x377c
leaq -0x30(%rbp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x28ec
movq -0x30(%rbp), %rsi
incq %rsi
callq 0x21d0
movq 0x96e5(%rip), %rbx      # 0xbfd8
leaq 0x6713(%rip), %rsi      # 0x900d
movl $0xe, %edx
movq %rbx, %rdi
callq 0x2210
movq (%rbx), %rax
addq -0x18(%rax), %rbx
movq %rbx, %rdi
movl $0xa, %esi
callq 0x21b0
movsbl %al, %esi
movq 0x96b3(%rip), %rdi      # 0xbfd8
callq 0x2030
movq %rax, %rdi
callq 0x2140
movq -0x68(%rbp), %rsi
subq -0x70(%rbp), %rsi
sarq $0x3, %rsi
movq 0x9693(%rip), %rdi      # 0xbfd8
callq 0x2130
movq %rax, %rbx
movq (%rax), %rax
movq -0x18(%rax), %rdi
addq %rbx, %rdi
movl $0xa, %esi
callq 0x21b0
movsbl %al, %esi
movq %rbx, %rdi
callq 0x2030
movq %rax, %rdi
callq 0x2140
leaq -0x90(%rbp), %rbx
movq %rbx, %rdi
callq 0x3d2c
movq -0x70(%rbp), %rdi
testq %rdi, %rdi
je 0x2998
movq -0x60(%rbp), %rsi
subq %rdi, %rsi
callq 0x21d0
movq -0x90(%rbp), %rdi
cmpq %rbx, %rdi
je 0x29b9
movq (%rdi), %r14
movl $0x18, %esi
callq 0x21d0
movq %r14, %rdi
cmpq %rbx, %r14
jne 0x29a4
xorl %eax, %eax
addq $0x78, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
movq %rax, %rbx
leaq -0x30(%rbp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x29f8
movq -0x30(%rbp), %rsi
incq %rsi
callq 0x21d0
jmp 0x29f8
movq %rax, %rbx
jmp 0x29f8
movq %rax, %rbx
leaq -0x90(%rbp), %rdi
callq 0x2aca
movq %rbx, %rdi
callq 0x2340
// File: /workspace/github_cpp_makefile_star2_O1/cimtools[P]yaaclc/src/Analizer_ACL.cpp
// Function: Analizer_ACL::Analizer_ACL()
Analizer_ACL::Analizer_ACL(){
    myfile = new ifstream( "base.dnl" );
    map<string,string> * global_scope = new map<string,string>;
    scopes.push_back(global_scope);
    scope_iterator = scopes.begin();
    #ifdef DEBUGGING
    cout << "Constructor: start getting tokens" << endl;
    #endif
    get_tokens();
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %rbx
pushq %rax
movq %rdi, %rbx
movq %rdi, 0x8(%rdi)
movq %rdi, (%rdi)
xorps %xmm0, %xmm0
movups %xmm0, 0x10(%rdi)
movups %xmm0, 0x20(%rdi)
movups %xmm0, 0x30(%rdi)
movl $0x0, 0x40(%rdi)
movl $0x208, %edi            # imm = 0x208
callq 0x21c0
movq %rax, %r15
leaq 0x604c(%rip), %rsi      # 0x9046
movq %rax, %rdi
movl $0x8, %edx
callq 0x2360
movq %r15, 0x48(%rbx)
movl $0x30, %edi
callq 0x21c0
movq %rax, %r14
addq $0x8, %rax
movl $0x0, 0x8(%r14)
xorl %ecx, %ecx
movq %rcx, 0x10(%r14)
movq %rax, 0x18(%r14)
movq %rax, 0x20(%r14)
movq %rcx, 0x28(%r14)
movl $0x18, %edi
callq 0x21c0
movq %r14, 0x10(%rax)
movq %rax, %rdi
movq %rbx, %rsi
callq 0x2050
incq 0x10(%rbx)
movq (%rbx), %rax
movq %rax, 0x18(%rbx)
movq %rbx, %rdi
callq 0x30be
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
movq %rax, %r14
movl $0x208, %esi            # imm = 0x208
movq %r15, %rdi
callq 0x21d0
jmp 0x3084
jmp 0x3081
movq %rax, %r14
movq 0x20(%rbx), %rdi
testq %rdi, %rdi
je 0x3099
movq 0x30(%rbx), %rsi
subq %rdi, %rsi
callq 0x21d0
movq (%rbx), %rdi
cmpq %rbx, %rdi
je 0x30b6
movq (%rdi), %r15
movl $0x18, %esi
callq 0x21d0
movq %r15, %rdi
cmpq %rbx, %r15
jne 0x30a1
movq %r14, %rdi
callq 0x2340
// File: /workspace/github_cpp_makefile_star2_O1/cimtools[P]yaaclc/src/Analizer_ACL.cpp
// Function: Analizer_ACL::Analizer_ACL(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>)
Analizer_ACL::Analizer_ACL( string file_path ){
    myfile = new ifstream( file_path );
    map<string,string> * global_scope = new map<string,string>;
    scopes.push_back(global_scope);
    scope_iterator = scopes.begin();
    #ifdef DEBUGGING
    cout << "Constructor: start getting tokens" << endl;
    #endif
    get_tokens();
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %rbx
pushq %rax
movq %rsi, %r14
movq %rdi, %rbx
movq %rdi, 0x8(%rdi)
movq %rdi, (%rdi)
xorps %xmm0, %xmm0
movups %xmm0, 0x10(%rdi)
movups %xmm0, 0x20(%rdi)
movups %xmm0, 0x30(%rdi)
movl $0x0, 0x40(%rdi)
movl $0x208, %edi            # imm = 0x208
callq 0x21c0
movq %rax, %r15
movq %rax, %rdi
movq %r14, %rsi
movl $0x8, %edx
callq 0x22e0
movq %r15, 0x48(%rbx)
movl $0x30, %edi
callq 0x21c0
movq %rax, %r14
addq $0x8, %rax
movl $0x0, 0x8(%r14)
xorl %ecx, %ecx
movq %rcx, 0x10(%r14)
movq %rax, 0x18(%r14)
movq %rax, 0x20(%r14)
movq %rcx, 0x28(%r14)
movl $0x18, %edi
callq 0x21c0
movq %r14, 0x10(%rax)
movq %rax, %rdi
movq %rbx, %rsi
callq 0x2050
incq 0x10(%rbx)
movq (%rbx), %rax
movq %rax, 0x18(%rbx)
movq %rbx, %rdi
callq 0x30be
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
movq %rax, %r14
movl $0x208, %esi            # imm = 0x208
movq %r15, %rdi
callq 0x21d0
jmp 0x3843
jmp 0x3840
movq %rax, %r14
movq 0x20(%rbx), %rdi
testq %rdi, %rdi
je 0x3858
movq 0x30(%rbx), %rsi
subq %rdi, %rsi
callq 0x21d0
movq (%rbx), %rdi
cmpq %rbx, %rdi
je 0x3875
movq (%rdi), %r15
movl $0x18, %esi
callq 0x21d0
movq %r15, %rdi
cmpq %rbx, %r15
jne 0x3860
movq %r14, %rdi
callq 0x2340
nop
// File: /workspace/github_cpp_makefile_star2_O1/cimtools[P]yaaclc/src/Analizer_ACL.cpp
// Function: Analizer_ACL::eat_tokens_if_match(std::vector<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, std::allocator<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>>>)
bool Analizer_ACL::eat_tokens_if_match( vector<string> type_sequence ){
    vector<Token *>::iterator after_state = token_iterator;
    if(equal( type_sequence.begin(), type_sequence.end(), token_iterator, [&](string first, Token * second){
        ++after_state;
        if( first.at(0) == '_'){
            first.erase(0,1);
            return second->content == first;
        }else{
            return second->type == first;
        }
    })){
        token_iterator = after_state;//Eat the tokens.
        return true;
    }else{
        return false;
    }
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x38, %rsp
movq 0x38(%rdi), %rax
movq %rax, -0x30(%rbp)
movq (%rsi), %rbx
movq 0x8(%rsi), %r15
cmpq %r15, %rbx
sete %r14b
je 0x3990
movq %rdi, -0x58(%rbp)
xorl %eax, %eax
xorl %r14d, %r14d
movq %rax, %r12
leaq -0x40(%rbp), %rax
movq %rax, -0x50(%rbp)
movq (%rbx,%r12,4), %rsi
movq 0x8(%rbx,%r12,4), %rdx
addq %rsi, %rdx
leaq -0x50(%rbp), %rdi
callq 0x2f22
movq -0x48(%rbp), %rdx
testq %rdx, %rdx
je 0x39b4
movq -0x30(%rbp), %rax
movq (%rax,%r12), %r13
movq -0x50(%rbp), %rsi
cmpb $0x5f, (%rsi)
jne 0x391b
movl $0x1, %edx
leaq -0x50(%rbp), %rdi
xorl %esi, %esi
callq 0x2080
movq 0x8(%r13), %rdx
cmpq -0x48(%rbp), %rdx
jne 0x393d
testq %rdx, %rdx
je 0x3942
movq -0x50(%rbp), %rsi
movq (%r13), %rdi
jmp 0x3930
movq 0x28(%r13), %rax
cmpq %rdx, %rax
jne 0x393d
testq %rax, %rax
je 0x3942
movq 0x20(%r13), %rdi
movq %rax, %rdx
callq 0x21e0
testl %eax, %eax
sete %r13b
jmp 0x3945
xorl %r13d, %r13d
jmp 0x3945
movb $0x1, %r13b
movq -0x50(%rbp), %rdi
leaq -0x40(%rbp), %rax
cmpq %rax, %rdi
je 0x395e
movq -0x40(%rbp), %rsi
incq %rsi
callq 0x21d0
testb %r13b, %r13b
je 0x397d
leaq (%rbx,%r12,4), %rcx
leaq 0x8(%r12), %rax
addq $0x20, %rcx
cmpq %r15, %rcx
sete %r14b
jne 0x38b4
movq -0x30(%rbp), %rax
addq %r12, %rax
addq $0x8, %rax
movq %rax, -0x30(%rbp)
movq -0x58(%rbp), %rdi
testb $0x1, %r14b
je 0x399e
movq -0x30(%rbp), %rax
movq %rax, 0x38(%rdi)
andb $0x1, %r14b
movl %r14d, %eax
addq $0x38, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
leaq 0x5900(%rip), %rdi      # 0x92bb
xorl %esi, %esi
xorl %eax, %eax
callq 0x2290
jmp 0x39c6
movq %rax, %rbx
movq -0x50(%rbp), %rdi
leaq -0x40(%rbp), %rax
cmpq %rax, %rdi
je 0x39e2
movq -0x40(%rbp), %rsi
incq %rsi
callq 0x21d0
movq %rbx, %rdi
callq 0x2340
// File: /workspace/github_cpp_makefile_star2_O1/cimtools[P]yaaclc/src/Analizer_ACL.cpp
// Function: Analizer_ACL::search_scopes(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>)
string Analizer_ACL::search_scopes( string key ){
    string return_value = "__ERRCODE: Couldn't find variable name";

    //First chek if it is on global scope.
    if( (**(scopes.begin())).count(key) ){
        return_value = (**(scopes.begin()))[key];
    }else{
        for( auto search_iterator = scope_iterator; search_iterator != scopes.begin(); --search_iterator ){
            if( (**search_iterator).count(key) ){//If there is at least one occurence of the key on the current map.
                return_value = (**search_iterator)[key];
                break;//find the value, so break the loop.
            }
        }
    }
    if( return_value == "__ERRCODE: Couldn't find variable name\n"){
        cout << "Couldn't find the variable name.\n";
        return "__ERR";
    }

    return return_value;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x28, %rsp
movq %rdx, %r14
movq %rsi, %r15
movq %rdi, %rbx
leaq -0x38(%rbp), %rax
movq %rax, -0x10(%rax)
leaq 0x563c(%rip), %rsi      # 0x904f
leaq 0x565b(%rip), %rdx      # 0x9075
leaq -0x48(%rbp), %rdi
callq 0x2baa
movq (%r15), %rax
movq 0x10(%rax), %r12
movq %r12, %rdi
movq %r14, %rsi
callq 0x7cc4
addq $0x8, %r12
cmpq %r12, %rax
je 0x3a8e
movq (%r15), %rax
movq 0x10(%rax), %rdi
movq %r14, %rsi
callq 0x7a0e
leaq -0x48(%rbp), %rdi
movq %rax, %rsi
callq 0x2120
leaq 0x5616(%rip), %rsi      # 0x9076
leaq -0x48(%rbp), %rdi
callq 0x20b0
testl %eax, %eax
je 0x3abe
leaq 0x10(%rbx), %rax
movq %rax, (%rbx)
movq -0x48(%rbp), %rcx
leaq -0x38(%rbp), %r14
cmpq %r14, %rcx
je 0x3af9
movq %rcx, (%rbx)
movq -0x38(%rbp), %rax
movq %rax, 0x10(%rbx)
jmp 0x3b00
movq 0x18(%r15), %r13
cmpq %r13, (%r15)
je 0x3a59
movq 0x10(%r13), %r12
movq %r12, %rdi
movq %r14, %rsi
callq 0x7cc4
addq $0x8, %r12
cmpq %r12, %rax
jne 0x3b3f
movq 0x8(%r13), %r13
cmpq (%r15), %r13
jne 0x3a97
jmp 0x3a59
movq 0x8513(%rip), %rdi      # 0xbfd8
leaq 0x55d2(%rip), %rsi      # 0x909e
movl $0x21, %edx
leaq -0x38(%rbp), %r14
callq 0x2210
leaq 0x10(%rbx), %rax
movq %rax, (%rbx)
leaq 0x55d8(%rip), %rsi      # 0x90c0
leaq 0x55d6(%rip), %rdx      # 0x90c5
movq %rbx, %rdi
callq 0x2baa
jmp 0x3b18
movups (%r14), %xmm0
movups %xmm0, (%rax)
movq -0x40(%rbp), %rax
movq %rax, 0x8(%rbx)
movq %r14, -0x48(%rbp)
movq $0x0, -0x40(%rbp)
movb $0x0, -0x38(%rbp)
movq -0x48(%rbp), %rdi
cmpq %r14, %rdi
je 0x3b2d
movq -0x38(%rbp), %rsi
incq %rsi
callq 0x21d0
movq %rbx, %rax
addq $0x28, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movq 0x10(%r13), %rdi
movq %r14, %rsi
callq 0x7a0e
leaq -0x48(%rbp), %rdi
movq %rax, %rsi
callq 0x2120
jmp 0x3a59
jmp 0x3b66
jmp 0x3b66
jmp 0x3b66
jmp 0x3b66
jmp 0x3b66
movq %rax, %rbx
movq -0x48(%rbp), %rdi
leaq -0x38(%rbp), %rax
cmpq %rax, %rdi
je 0x3b82
movq -0x38(%rbp), %rsi
incq %rsi
callq 0x21d0
movq %rbx, %rdi
callq 0x2340
// File: /workspace/github_cpp_makefile_star2_O1/cimtools[P]yaaclc/src/Analizer_ACL.cpp
// Function: Analizer_ACL::get_relative_token_content[abi:cxx11](int)
string Analizer_ACL::get_relative_token_content( int relative_position ){
    string content;

    content = (*(token_iterator+relative_position))->content;
    #ifdef DEBUGGING
    cout << "get_relative_token_content:The readed token is " << content << endl;
    #endif
    return content;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %rbx
pushq %rax
movq %rdi, %rbx
leaq 0x10(%rdi), %r15
movq %r15, (%rdi)
movq $0x0, 0x8(%rdi)
movb $0x0, 0x10(%rdi)
movslq %edx, %rax
movq 0x38(%rsi), %rcx
movq (%rcx,%rax,8), %rsi
callq 0x2120
movq %rbx, %rax
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
movq %rax, %r14
movq (%rbx), %rdi
cmpq %r15, %rdi
je 0x3bde
movq (%r15), %rsi
incq %rsi
callq 0x21d0
movq %r14, %rdi
callq 0x2340
// File: /workspace/github_cpp_makefile_star2_O1/cimtools[P]yaaclc/src/Analizer_ACL.cpp
// Function: Analizer_ACL::get_relative_token_type[abi:cxx11](int)
string Analizer_ACL::get_relative_token_type( int relative_position ){
    string type;

    type = (*(token_iterator+relative_position))->type;
    #ifdef DEBUGGING
    cout << "get_relative_token_content:The readed token is " << type << endl;
    #endif
    return type;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %rbx
pushq %rax
movq %rdi, %rbx
leaq 0x10(%rdi), %r15
movq %r15, (%rdi)
movq $0x0, 0x8(%rdi)
movb $0x0, 0x10(%rdi)
movslq %edx, %rax
movq 0x38(%rsi), %rcx
movq (%rcx,%rax,8), %rsi
addq $0x20, %rsi
callq 0x2120
movq %rbx, %rax
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
movq %rax, %r14
movq (%rbx), %rdi
cmpq %r15, %rdi
je 0x3c3e
movq (%r15), %rsi
incq %rsi
callq 0x21d0
movq %r14, %rdi
callq 0x2340
// File: /workspace/github_cpp_makefile_star2_O1/cimtools[P]yaaclc/src/Analizer_ACL.cpp
// Function: Analizer_ACL::skip_block()
void Analizer_ACL::skip_block(){
    int scope_level = 0;
    do{

        ++token_iterator; //start analizing the next token.
        #ifdef DEBUGGING2
        cout << "skip_block: Token being analized is   " << (*token_iterator)->content << "      From type        " << (*token_iterator)->type << "       scope_level has value     "<< scope_level  <<endl;
        #endif
        if((*token_iterator)->type == "END"){
            cout << "SKIPING IF BLOCK ERROR: coudn`t find the end of if block\n";
            break;
        }else if( (*token_iterator)->content == "if" ){
            ++scope_level;
        }else if( (*token_iterator)->content == "endif" ){
            --scope_level;
        }

    }while( !(  ( (*token_iterator)->content == "else" && scope_level == 0 )   ||  ( (*token_iterator)->content != "endif" && scope_level == -1 ) ) );
    ++token_iterator;//The token skiped was a else to run instead of an if, or it was the endif in case the if didn`t had an else.

    #ifdef DEBUGGING2
    cout << "skip_block: When exiting the function the current token is   " << (*token_iterator)->content << "      From type        " << (*token_iterator)->type << endl;
    #endif
    return;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movq %rdi, %rbx
xorl %r15d, %r15d
leaq 0x5465(%rip), %r14      # 0x90c6
leaq 0x55d7(%rip), %r12      # 0x923f
leaq 0x560d(%rip), %r13      # 0x927c
movq 0x38(%rbx), %rax
leaq 0x8(%rax), %rcx
movq %rcx, 0x38(%rbx)
movq 0x8(%rax), %rdi
addq $0x20, %rdi
movq %r14, %rsi
callq 0x20b0
testl %eax, %eax
je 0x3d00
movq 0x38(%rbx), %rax
movq (%rax), %rdi
leaq 0x5516(%rip), %rsi      # 0x91b3
callq 0x20b0
testl %eax, %eax
je 0x3cc1
movq 0x38(%rbx), %rax
movq (%rax), %rdi
movq %r13, %rsi
callq 0x20b0
cmpl $0x1, %eax
movl $0x0, %eax
sbbl %eax, %eax
jmp 0x3cc6
movl $0x1, %eax
addl %eax, %r15d
movq 0x38(%rbx), %rax
movq (%rax), %rdi
movq %r12, %rsi
callq 0x20b0
orl %r15d, %eax
je 0x3d18
movq 0x38(%rbx), %rax
movq (%rax), %rdi
movq %r13, %rsi
callq 0x20b0
testl %eax, %eax
je 0x3c6f
cmpl $-0x1, %r15d
jne 0x3c6f
jmp 0x3d18
movq 0x82d1(%rip), %rdi      # 0xbfd8
leaq 0x53bc(%rip), %rsi      # 0x90ca
movl $0x39, %edx
callq 0x2210
addq $0x8, 0x38(%rbx)
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O1/IdelCoder[P]PTransE-ag/Train_PTransE-pos.cpp
// Function: randn(double, double, double, double)
double randn(double miu,double sigma, double min ,double max)
{
    double x,y,dScope;
    do{
        x=rand(min,max);
        y=normal(x,miu,sigma);
        dScope=rand(0.0,normal(miu,miu,sigma));
    }while(dScope>y);
    return x;
}

// Assembly:
subq $0x58, %rsp
movsd %xmm2, 0x20(%rsp)
subsd %xmm2, %xmm3
movsd %xmm3, 0x28(%rsp)
movsd 0x873d(%rip), %xmm2     # 0xb010
divsd %xmm1, %xmm2
movsd %xmm2, (%rsp)
movapd %xmm1, %xmm2
addsd %xmm1, %xmm2
mulsd %xmm1, %xmm2
movsd %xmm0, 0x18(%rsp)
subsd %xmm0, %xmm0
movapd 0x8766(%rip), %xmm1     # 0xb060
xorpd %xmm0, %xmm1
mulsd %xmm0, %xmm1
movsd %xmm2, 0x10(%rsp)
divsd %xmm2, %xmm1
movapd %xmm1, 0x40(%rsp)
callq 0x2070
xorps %xmm1, %xmm1
cvtsi2sd %eax, %xmm1
mulsd 0x28(%rsp), %xmm1
movsd 0x86dc(%rip), %xmm0     # 0xb008
mulsd %xmm0, %xmm1
addsd 0x20(%rsp), %xmm1
movsd %xmm1, 0x8(%rsp)
subsd 0x18(%rsp), %xmm1
movapd %xmm1, %xmm0
xorpd 0x8712(%rip), %xmm0     # 0xb060
mulsd %xmm1, %xmm0
divsd 0x10(%rsp), %xmm0
callq 0x2330
mulsd (%rsp), %xmm0
movsd %xmm0, 0x38(%rsp)
movapd 0x40(%rsp), %xmm0
callq 0x2330
mulsd (%rsp), %xmm0
movsd %xmm0, 0x30(%rsp)
callq 0x2070
xorps %xmm0, %xmm0
cvtsi2sd %eax, %xmm0
mulsd 0x30(%rsp), %xmm0
mulsd 0x8670(%rip), %xmm0     # 0xb008
ucomisd 0x38(%rsp), %xmm0
ja 0x2912
movsd 0x8(%rsp), %xmm0
addq $0x58, %rsp
retq
// File: /workspace/github_cpp_makefile_star2_O1/IdelCoder[P]PTransE-ag/Train_PTransE-pos.cpp
// Function: vec_len(std::vector<double, std::allocator<double>>&)
double vec_len(vector<double> &a)
{
	double res=0;
/*	if (L1_flag)
		for (int i=0; i<a.size(); i++)
			res+=fabs(a[i]);
	else*/
	{
		for (int i=0; i<a.size(); i++)
			res+=a[i]*a[i];
		res = sqrt(res);
	}
	return res;
}

// Assembly:
movq (%rdi), %rax
movq 0x8(%rdi), %rcx
xorpd %xmm1, %xmm1
xorpd %xmm0, %xmm0
subq %rax, %rcx
je 0x29eb
sarq $0x3, %rcx
cmpq $0x1, %rcx
adcq $0x0, %rcx
xorl %edx, %edx
movsd (%rax,%rdx,8), %xmm2
mulsd %xmm2, %xmm2
addsd %xmm2, %xmm0
incq %rdx
cmpq %rdx, %rcx
jne 0x29d6
ucomisd %xmm1, %xmm0
jb 0x2160
sqrtsd %xmm0, %xmm0
retq
// File: /workspace/github_cpp_makefile_star2_O1/IdelCoder[P]PTransE-ag/Train_PTransE-pos.cpp
// Function: main
int main(int argc,char**argv)
{
    //随机数种子
    srand((unsigned) time(NULL));
    if (argc!=2)
        return 0;
    else
    {
        version = argv[1];
        positive_margin = atof(version.c_str());
        prepare();
        train.run();
    }
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %rbx
pushq %rax
movq %rsi, %rbx
movl %edi, %ebp
xorl %edi, %edi
callq 0x2190
movl %eax, %edi
callq 0x21b0
cmpl $0x2, %ebp
jne 0x4796
movq 0x8(%rbx), %rbx
movq 0xabc1(%rip), %r14      # 0xf310
leaq 0xabb2(%rip), %r15      # 0xf308
movq %rbx, %rdi
callq 0x20d0
movq %r15, %rdi
xorl %esi, %esi
movq %r14, %rdx
movq %rbx, %rcx
movq %rax, %r8
callq 0x22b0
movq 0xab90(%rip), %rdi      # 0xf308
callq 0x2250
movsd %xmm0, 0xaba3(%rip)     # 0xf328
callq 0x29fa
leaq 0x5405f(%rip), %rdi     # 0x587f0
callq 0x4d0e
xorl %eax, %eax
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
nop
// File: /workspace/github_cpp_makefile_star2_O1/IdelCoder[P]PTransE-ag/Train_PTransE-pos.cpp
// Function: Train::add(int, int, int, std::vector<std::pair<std::vector<int, std::allocator<int>>, double>, std::allocator<std::pair<std::vector<int, std::allocator<int>>, double>>>)
void add(int x,int y,int z, vector<pair<vector<int>,double> > path_list)
    {
        fb_h.push_back(x);
        fb_r.push_back(z);
        fb_l.push_back(y);
        // 保存该三元组对应的所有路径
		fb_path.push_back(path_list);
        ok[make_pair(x,z)][y]=1;
    }

// Assembly:
pushq %r14
pushq %rbx
subq $0x18, %rsp
movq %r8, %r14
movl %esi, %eax
movq %rdi, %rbx
movl %esi, 0xc(%rsp)
movl %edx, 0x8(%rsp)
movl %ecx, 0x4(%rsp)
movq 0x70(%rdi), %rsi
cmpq 0x78(%rdi), %rsi
je 0x4af1
movl %eax, (%rsi)
addq $0x4, %rsi
movq %rsi, 0x70(%rbx)
jmp 0x4aff
leaq 0x68(%rbx), %rdi
leaq 0xc(%rsp), %rdx
callq 0x96d2
movq 0xa0(%rbx), %rsi
cmpq 0xa8(%rbx), %rsi
je 0x4b22
movl 0x4(%rsp), %eax
movl %eax, (%rsi)
addq $0x4, %rsi
movq %rsi, 0xa0(%rbx)
jmp 0x4b33
leaq 0x98(%rbx), %rdi
leaq 0x4(%rsp), %rdx
callq 0x96d2
movq 0x88(%rbx), %rsi
cmpq 0x90(%rbx), %rsi
je 0x4b56
movl 0x8(%rsp), %eax
movl %eax, (%rsi)
addq $0x4, %rsi
movq %rsi, 0x88(%rbx)
jmp 0x4b67
leaq 0x80(%rbx), %rdi
leaq 0x8(%rsp), %rdx
callq 0x96d2
leaq 0xb0(%rbx), %rdi
movq %r14, %rsi
callq 0x566e
movl 0xc(%rsp), %eax
movl 0x4(%rsp), %ecx
shlq $0x20, %rcx
orq %rax, %rcx
leaq 0x10(%rsp), %rsi
movq %rcx, (%rsi)
movq %rbx, %rdi
callq 0x569a
leaq 0x8(%rsp), %rsi
movq %rax, %rdi
callq 0x5728
movl $0x1, (%rax)
addq $0x18, %rsp
popq %rbx
popq %r14
retq
// File: /workspace/github_cpp_makefile_star2_O1/IdelCoder[P]PTransE-ag/Train_PTransE-pos.cpp
// Function: Train::norm(std::vector<double, std::allocator<double>>&)
double norm(vector<double> &a)
    {
        double x = vec_len(a);
        if (x>1)
        for (int ii=0; ii<a.size(); ii++)
                a[ii]/=x;
        return 0;
    }

// Assembly:
pushq %rbx
movq %rsi, %rbx
movq (%rsi), %rax
movq 0x8(%rsi), %rcx
xorpd %xmm1, %xmm1
xorpd %xmm0, %xmm0
subq %rax, %rcx
je 0x5f33
sarq $0x3, %rcx
cmpq $0x1, %rcx
adcq $0x0, %rcx
xorl %edx, %edx
movsd (%rax,%rdx,8), %xmm2
mulsd %xmm2, %xmm2
addsd %xmm2, %xmm0
incq %rdx
cmpq %rdx, %rcx
jne 0x5f1e
ucomisd %xmm1, %xmm0
jb 0x5f3f
sqrtsd %xmm0, %xmm0
jmp 0x5f44
callq 0x2160
ucomisd 0x50cc(%rip), %xmm0     # 0xb018
jbe 0x5f7e
movq (%rbx), %rax
movq 0x8(%rbx), %rcx
subq %rax, %rcx
je 0x5f7e
sarq $0x3, %rcx
cmpq $0x1, %rcx
adcq $0x0, %rcx
xorl %edx, %edx
movsd (%rax,%rdx,8), %xmm1
divsd %xmm0, %xmm1
movsd %xmm1, (%rax,%rdx,8)
incq %rdx
cmpq %rdx, %rcx
jne 0x5f68
xorpd %xmm0, %xmm0
popq %rbx
retq
// File: /workspace/github_cpp_makefile_star2_O1/IdelCoder[P]PTransE-ag/Train_PTransE-pos.cpp
// Function: Train::train_kb(int, int, int, int, int, int, double)
void train_kb(int e1_a,int e2_a,int rel_a,int e1_b,int e2_b,int rel_b,double margin)
    {
        double sum1 = calc_kb(e1_a,e2_a,rel_a);
        double sum2 = calc_kb(e1_b,e2_b,rel_b);
        if (sum1+margin>sum2)
        {
            // 两者的差距在marign之内，才计算损失函数，调整参数
        	res+=margin+sum1-sum2;
        	gradient_kb(e1_a, e2_a, rel_a, -1);
			gradient_kb(e1_b, e2_b, rel_b, 1);
        }
    }

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x28, %rsp
movsd %xmm0, 0x20(%rsp)
movl %r9d, %ebp
movl %r8d, %r14d
movl %edx, %r13d
movl %esi, %ebx
movq %rdi, %r15
movl 0x60(%rsp), %r12d
movl %ecx, 0xc(%rsp)
callq 0x88c8
movsd %xmm0, 0x18(%rsp)
movq %r15, %rdi
movl %r14d, 0x10(%rsp)
movl %r14d, %esi
movl %ebp, 0x14(%rsp)
movl %ebp, %edx
movl %r12d, %ecx
callq 0x88c8
movsd 0x18(%rsp), %xmm1
addsd 0x20(%rsp), %xmm1
ucomisd %xmm0, %xmm1
jbe 0x82a5
subsd %xmm0, %xmm1
addsd 0x38(%r15), %xmm1
movsd %xmm1, 0x38(%r15)
movsd 0x2de5(%rip), %xmm0     # 0xb050
movq %r15, %rdi
movl %ebx, %esi
movl %r13d, %edx
movl 0xc(%rsp), %ecx
callq 0x8948
movsd 0x2d94(%rip), %xmm0     # 0xb018
movq %r15, %rdi
movl 0x10(%rsp), %esi
movl 0x14(%rsp), %edx
movl %r12d, %ecx
addq $0x28, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
jmp 0x8948
addq $0x28, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O1/IdelCoder[P]PTransE-ag/Train_PTransE-pos.cpp
// Function: Train::train_pos(int, int, int, int, int, int, double)
void train_pos(int e1_a,int e2_a,int rel_a,int e1_b,int e2_b,int rel_b,double margin) {
        double sum1 = calc_kb(e1_a, e2_a, rel_a);
        double sum2 = calc_kb(e1_b, e2_b, rel_b);
        if(sum1 - sum2 > margin) {
            res += sum1 - sum2 - margin;
            gradient_kb(e1_a, e2_a, rel_a, -1);
            gradient_kb(e1_b, e2_b, rel_b, 1);
        } else if(sum2 - sum1 > margin) {
            res += sum2 - sum1 - margin;
            gradient_kb(e1_a, e2_a, rel_a, 1);
            gradient_kb(e1_b, e2_b, rel_b, -1);
        }
    }

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x28, %rsp
movsd %xmm0, 0x20(%rsp)
movl %r9d, %ebp
movl %r8d, %r14d
movl %edx, %r13d
movl %esi, %ebx
movq %rdi, %r15
movl 0x60(%rsp), %r12d
movl %ecx, 0x14(%rsp)
callq 0x88c8
movsd %xmm0, 0x8(%rsp)
movq %r15, %rdi
movl %r14d, 0x18(%rsp)
movl %r14d, %esi
movl %ebp, 0x1c(%rsp)
movl %ebp, %edx
movl %r12d, %ecx
callq 0x88c8
movsd 0x20(%rsp), %xmm3
movapd %xmm0, %xmm1
movsd 0x8(%rsp), %xmm0
movapd %xmm0, %xmm2
subsd %xmm1, %xmm2
ucomisd %xmm3, %xmm2
jbe 0x83b5
movsd 0x2c73(%rip), %xmm0     # 0xb018
movsd %xmm0, 0x8(%rsp)
movsd 0x2c9d(%rip), %xmm0     # 0xb050
jmp 0x83d9
subsd %xmm0, %xmm1
ucomisd %xmm3, %xmm1
jbe 0x8421
movsd 0x2c89(%rip), %xmm0     # 0xb050
movsd %xmm0, 0x8(%rsp)
movsd 0x2c43(%rip), %xmm0     # 0xb018
movapd %xmm1, %xmm2
subsd %xmm3, %xmm2
addsd 0x38(%r15), %xmm2
movsd %xmm2, 0x38(%r15)
movq %r15, %rdi
movl %ebx, %esi
movl %r13d, %edx
movl 0x14(%rsp), %ecx
callq 0x8948
movq %r15, %rdi
movl 0x18(%rsp), %esi
movl 0x1c(%rsp), %edx
movl %r12d, %ecx
movsd 0x8(%rsp), %xmm0
addq $0x28, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
jmp 0x8948
addq $0x28, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O1/IdelCoder[P]PTransE-ag/Train_PTransE-pos.cpp
// Function: Train::train_path(int, int, std::vector<int, std::allocator<int>>, double, double)
void train_path(int rel, int rel_neg, vector<int> rel_path, double margin,double x)
    {
        double sum1 = calc_path(rel,rel_path);
        double sum2 = calc_path(rel_neg,rel_path);
		double lambda = 1;
        if (sum1+margin>sum2)
        {
            // 训练path
            // 记录误差
        	res+=x*lambda*(margin+sum1-sum2);
        	gradient_path(rel,rel_path, -x*lambda);
			gradient_path(rel_neg,rel_path, x*lambda);
        }
    }

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
subq $0x90, %rsp
movaps %xmm1, (%rsp)
movsd %xmm0, 0x28(%rsp)
movq %rcx, %r15
movl %edx, %ebx
movl %esi, %ebp
movq %rdi, %r14
leaq 0x78(%rsp), %r12
movq %r12, %rdi
movq %rcx, %rsi
callq 0x5542
movq %r14, %rdi
movl %ebp, %esi
movq %r12, %rdx
callq 0x9494
movsd %xmm0, 0x20(%rsp)
movq (%r12), %rdi
testq %rdi, %rdi
je 0x852a
callq 0x21a0
leaq 0x60(%rsp), %r12
movq %r12, %rdi
movq %r15, %rsi
callq 0x5542
movq %r14, %rdi
movl %ebx, %esi
movq %r12, %rdx
callq 0x9494
movq (%r12), %rdi
testq %rdi, %rdi
je 0x8561
movsd %xmm0, 0x18(%rsp)
callq 0x21a0
movsd 0x18(%rsp), %xmm0
movsd 0x20(%rsp), %xmm1
addsd 0x28(%rsp), %xmm1
ucomisd %xmm0, %xmm1
jbe 0x85ee
subsd %xmm0, %xmm1
mulsd (%rsp), %xmm1
addsd 0x38(%r14), %xmm1
movsd %xmm1, 0x38(%r14)
leaq 0x48(%rsp), %r12
movq %r12, %rdi
movq %r15, %rsi
callq 0x5542
movaps 0x2ac1(%rip), %xmm0     # 0xb060
xorps (%rsp), %xmm0
movq %r14, %rdi
movl %ebp, %esi
movq %r12, %rdx
callq 0x952c
movq (%r12), %rdi
testq %rdi, %rdi
je 0x85be
callq 0x21a0
leaq 0x30(%rsp), %r12
movq %r12, %rdi
movq %r15, %rsi
callq 0x5542
movq %r14, %rdi
movl %ebx, %esi
movq %r12, %rdx
movapd (%rsp), %xmm0
callq 0x952c
movq (%r12), %rdi
testq %rdi, %rdi
je 0x85ee
callq 0x21a0
addq $0x90, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq