LLM4Binary/decompile-bench-makefile huggingface dataset:
// File: /workspace/github_cpp_makefile_star2_O3/parth-shel[P]xpac/client.cpp
// Function: xpac_dir_handler(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>)
static inline void xpac_dir_handler(std::string filepath){
	DIR* dir = opendir(filepath.c_str());
	if (dir)
	{
		closedir(dir);  //Directory exists and we don't need to so anything
	}
	else if (ENOENT == errno)
	{
		//Directory does not exist. So we need to create it
		std::cout<<"Creating the directory: "<<filepath<<std::endl;
		mkdir(filepath.c_str(),0775);
	}
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r14
pushq %rbx
movq %rdi, %rbx
movq (%rdi), %rdi
callq 0x3500
testq %rax, %rax
je 0x7372
movq %rax, %rdi
popq %rbx
popq %r14
popq %rbp
jmp 0x3540
callq 0x3050
cmpl $0x2, (%rax)
jne 0x73e1
movq 0x8c4d(%rip), %r14      # 0xffd0
leaq 0x51e8(%rip), %rsi      # 0xc572
movl $0x18, %edx
movq %r14, %rdi
callq 0x3400
movq (%rbx), %rsi
movq 0x8(%rbx), %rdx
movq %r14, %rdi
callq 0x3400
movq %rax, %r14
movq (%rax), %rax
movq -0x18(%rax), %rdi
addq %r14, %rdi
movl $0xa, %esi
callq 0x3370
movsbl %al, %esi
movq %r14, %rdi
callq 0x3030
movq %rax, %rdi
callq 0x3280
movq (%rbx), %rdi
movl $0x1fd, %esi            # imm = 0x1FD
popq %rbx
popq %r14
popq %rbp
jmp 0x31d0
popq %rbx
popq %r14
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O3/parth-shel[P]xpac/client_socket.cpp
// Function: client_driver(char*, char*)
int client_driver(char * command, char * ip) {
 	int sock_fd;
 	struct sockaddr_in srv_addr;
 	
	memset(&srv_addr, 0, sizeof(srv_addr));

 	// create a client socket
 	sock_fd = socket(AF_INET, SOCK_STREAM, IPPROTO_TCP);
 	srv_addr.sin_family = AF_INET; // internet address

	// DNS lookup
	char * IP = (char *) malloc(128 * sizeof(char));
	if( hostname_to_ip(ip, IP) < 0 ) {
		printf("DNS lookup failure\n");
		exit(EXIT_FAILURE);
	}

 	// convert command line argument to numeric IP
 	if ( inet_pton(AF_INET, IP, &(srv_addr.sin_addr)) < 1 ) {
 		printf("invalid IP address\n");
		exit(EXIT_FAILURE);
 	}

 	// use specified port number or default otherwise
	// TODO: WORK ON PORT SELECTION
 	srv_addr.sin_port = htons(SRV_PORT);

 	if( connect(sock_fd, (struct sockaddr*) &srv_addr, sizeof(srv_addr)) < 0 ) {
 		perror("connect error");
 		exit(EXIT_FAILURE);
 	}
 	else {
 		printf("connected to:%s:%d ..\n",ip,SRV_PORT);
 	}
 
	if( recv_file(sock_fd, command) < 0 ) { // command
		//perror("receive error\n");
		//exit(EXIT_FAILURE);
		return -1;
	}
 	
	// close socket
 	if(close(sock_fd) < 0) {
 		perror("socket close error");
 		exit(EXIT_FAILURE);
 	}
 
	return EXIT_SUCCESS;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
subq $0x10, %rsp
movq %rsi, %r15
movq %rdi, %rbx
xorps %xmm0, %xmm0
movaps %xmm0, -0x30(%rbp)
movl $0x2, %edi
movl $0x1, %esi
movl $0x6, %edx
callq 0x30f0
movl %eax, %r14d
movw $0x2, -0x30(%rbp)
movl $0x80, %edi
callq 0x3490
movq %rax, %r12
movq %r15, %rdi
movq %rax, %rsi
callq 0x940c
testl %eax, %eax
js 0x93e8
leaq -0x2c(%rbp), %rdx
movl $0x2, %edi
movq %r12, %rsi
callq 0x3640
testl %eax, %eax
jle 0x93f1
leaq -0x30(%rbp), %rsi
movw $0xf413, 0x2(%rsi)      # imm = 0xF413
movl %r14d, %edi
movl $0x10, %edx
callq 0x32f0
testl %eax, %eax
js 0x9407
leaq 0x3367(%rip), %rdi      # 0xc707
xorl %r12d, %r12d
movq %r15, %rsi
movl $0x13f4, %edx           # imm = 0x13F4
xorl %eax, %eax
callq 0x3060
movl %r14d, %edi
movq %rbx, %rsi
callq 0x945f
testl %eax, %eax
js 0x93d2
movl %r14d, %edi
callq 0x3670
testl %eax, %eax
jns 0x93d8
callq 0x36cc
movl $0xffffffff, %r12d      # imm = 0xFFFFFFFF
movl %r12d, %eax
addq $0x10, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
leaq 0x3410(%rip), %rdi      # 0xc7ff
jmp 0x93f8
leaq 0x33f4(%rip), %rdi      # 0xc7ec
callq 0x3520
movl $0x1, %edi
callq 0x3440
callq 0x36e4
// File: /workspace/github_cpp_makefile_star2_O3/parth-shel[P]xpac/client_socket.cpp
// Function: hostname_to_ip(char*, char*)
int hostname_to_ip(char * hostname, char * ip) {
	struct hostent *ptrh;
    	struct in_addr **addr_list;
         
    	// get host info
	if ( (ptrh = gethostbyname( hostname ) ) == NULL) {
       	 	perror("gethostbyname error\n");
        	return -1;
    	}
 
    	addr_list = (struct in_addr **) ptrh->h_addr_list;
     
    	for(int i = 0; addr_list[i] != NULL; i++) {
        	strcpy(ip , inet_ntoa(*addr_list[i]) );
        	return 0;
    	}
     
    	return -1;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r14
pushq %rbx
movq %rsi, %rbx
callq 0x33f0
testq %rax, %rax
je 0x944c
movq 0x18(%rax), %rax
movq (%rax), %r14
testq %r14, %r14
je 0x943f
movl (%r14), %edi
callq 0x31c0
movq %rbx, %rdi
movq %rax, %rsi
callq 0x3350
xorl %eax, %eax
cmpq $0x1, %r14
sbbl %eax, %eax
popq %rbx
popq %r14
popq %rbp
retq
leaq 0x32de(%rip), %rdi      # 0xc731
callq 0x3300
movl $0xffffffff, %eax       # imm = 0xFFFFFFFF
jmp 0x9447
// File: /workspace/github_cpp_makefile_star2_O3/parth-shel[P]xpac/client_socket.cpp
// Function: recv_file(int, char*)
int recv_file(int sock, char* file_name) {
 	char send_str [MAX_SEND_BUF]; // message to be sent to server
 	int fd; // file descriptor for receiving file
 	ssize_t sent_bytes, rcvd_bytes, rcvd_file_size;
 	int recv_count; // count of recv() calls
 	char recv_str[MAX_RECV_BUF]; // buffer to hold received data 
 	size_t send_strlen; // length of transmitted string

 	sprintf(send_str, "%s\n", file_name); 
 	send_strlen = strlen(send_str); /* length of message to be transmitted */
 	if( (sent_bytes = send(sock, send_str, send_strlen, 0)) < 0 ) {
 		perror("send error");
 		return -1;
 	}
 

 	// create file to save received data
 	if ( (fd = open(file_name, O_WRONLY|O_CREAT, 0666)) < 0 ) {
 		perror("error creating file");
 		return -1;
 	}

 	recv_count = 0; // number of recv() calls required to receive the file
 	rcvd_file_size = 0; // size of received file

 	// continue receiving file
 	while ( (rcvd_bytes = recv(sock, recv_str, MAX_RECV_BUF, 0)) > 0 ) {
 		recv_count++;
 		rcvd_file_size += rcvd_bytes;

		if(!strcmp(recv_str,errmsg_notfound)){
			printf("File not found on xpac repo!\nPlease check file name and try again!");
			return -1;
		}
 		if (write(fd, recv_str, rcvd_bytes) < 0 ) {
 			perror("error writing to file");
 			return -1;
 		}
 	}
 	
	close(fd); // close file
 	printf("Client Received: %zu bytes in %d recv(s)\n", rcvd_file_size, recv_count);
 	return rcvd_file_size;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x208, %rsp            # imm = 0x208
movq %rsi, %r14
movl %edi, %r15d
leaq 0x32c6(%rip), %rsi      # 0xc746
leaq -0x230(%rbp), %rbx
movq %rbx, %rdi
movq %r14, %rdx
xorl %eax, %eax
callq 0x30a0
movq %rbx, %rdi
callq 0x31b0
movl %r15d, -0x2c(%rbp)
movl %r15d, %edi
movq %rbx, %rsi
movq %rax, %rdx
xorl %ecx, %ecx
callq 0x3200
testq %rax, %rax
js 0x9562
xorl %r15d, %r15d
movq %r14, %rdi
movl $0x41, %esi
movl $0x1b6, %edx            # imm = 0x1B6
xorl %eax, %eax
callq 0x32b0
testl %eax, %eax
js 0x956b
movl %eax, %r12d
leaq -0x130(%rbp), %r13
xorl %r14d, %r14d
movl $0x100, %edx            # imm = 0x100
movl -0x2c(%rbp), %edi
movq %r13, %rsi
xorl %ecx, %ecx
callq 0x3150
testq %rax, %rax
jle 0x9534
movq %rax, %rbx
movq 0x6e52(%rip), %rsi      # 0x10358
movq %r13, %rdi
callq 0x34b0
testl %eax, %eax
je 0x9552
addq %rbx, %r14
incl %r15d
movl %r12d, %edi
movq %r13, %rsi
movq %rbx, %rdx
callq 0x3170
testq %rax, %rax
jns 0x94e5
leaq 0x327a(%rip), %rdi      # 0xc7ac
jmp 0x9572
movl %r12d, %edi
callq 0x3670
leaq 0x327f(%rip), %rdi      # 0xc7c2
movq %r14, %rsi
movl %r15d, %edx
xorl %eax, %eax
callq 0x3060
jmp 0x957d
leaq 0x3210(%rip), %rdi      # 0xc769
xorl %eax, %eax
callq 0x3060
jmp 0x9577
leaq 0x31e1(%rip), %rdi      # 0xc74a
jmp 0x9572
leaq 0x31e3(%rip), %rdi      # 0xc755
callq 0x3300
movl $0xffffffff, %r14d      # imm = 0xFFFFFFFF
movl %r14d, %eax
addq $0x208, %rsp            # imm = 0x208
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
nop
// File: /workspace/github_cpp_makefile_star2_O3/parth-shel[P]xpac/metadata.cpp
// Function: metadata::metadata(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>)
metadata::metadata(std::string pkg_name,std::string pkg_ver){
	this->pkg_name = pkg_name;
	this->pkg_ver = pkg_ver;
	this->str_hash = new std::hash<std::string>;
	pkg_id = std::to_string((*str_hash)(this->pkg_name + this->pkg_ver));
	dep_list = new std::vector<std::string>;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x68, %rsp
movq %rdx, %r12
movq %rdi, %rbx
leaq 0x10(%rdi), %rax
movq %rax, -0x48(%rbp)
movq %rax, (%rdi)
xorl %eax, %eax
movq %rax, 0x8(%rdi)
movb %al, 0x10(%rdi)
leaq 0x20(%rdi), %rcx
movq %rcx, -0x30(%rbp)
leaq 0x30(%rdi), %rcx
movq %rcx, -0x40(%rbp)
movq %rcx, 0x20(%rdi)
movq %rax, 0x28(%rdi)
movb %al, 0x30(%rdi)
leaq 0x40(%rdi), %r15
leaq 0x50(%rdi), %rcx
movq %rcx, -0x38(%rbp)
movq %rcx, 0x40(%rdi)
movq %rax, 0x48(%rdi)
movb %al, 0x50(%rdi)
callq 0x3220
movq %r15, %rdi
movq %r12, %rsi
callq 0x3220
movl $0x1, %edi
callq 0x3390
movq %rax, 0x68(%rbx)
leaq -0x68(%rbp), %rdi
movq %rbx, %rsi
movq %r15, %rdx
callq 0xa36d
movq -0x68(%rbp), %rdi
movq -0x60(%rbp), %rsi
movl $0xc70f6907, %edx       # imm = 0xC70F6907
callq 0x30b0
movq %rax, %r12
movl $0x1, %esi
cmpq $0xa, %rax
jb 0x998d
movl $0x4, %esi
movabsq $0x346dc5d63886594b, %rdi # imm = 0x346DC5D63886594B
movq %r12, %rcx
cmpq $0x63, %rcx
jbe 0x9986
cmpq $0x3e7, %rcx            # imm = 0x3E7
jbe 0x998b
cmpq $0x2710, %rcx           # imm = 0x2710
jb 0x998d
movq %rcx, %rax
mulq %rdi
shrq $0xb, %rdx
addl $0x4, %esi
cmpq $0x1869f, %rcx          # imm = 0x1869F
movq %rdx, %rcx
ja 0x9950
addl $-0x3, %esi
jmp 0x998d
addl $-0x2, %esi
jmp 0x998d
decl %esi
movl %esi, %esi
leaq -0x78(%rbp), %r14
movq %r14, -0x10(%r14)
leaq -0x88(%rbp), %rdi
xorl %edx, %edx
callq 0x3410
leaq -0x88(%rbp), %r13
movq (%r13), %rdi
movl 0x8(%r13), %esi
movq %r12, %rdx
callq 0x77c7
movq -0x30(%rbp), %rdi
movq %r13, %rsi
callq 0x3450
movq (%r13), %rdi
cmpq %r14, %rdi
je 0x99d6
callq 0x3360
leaq -0x58(%rbp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x99e8
callq 0x3360
movl $0x18, %edi
callq 0x3390
xorps %xmm0, %xmm0
movups %xmm0, (%rax)
movq $0x0, 0x10(%rax)
movq %rax, 0x60(%rbx)
addq $0x68, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movq %rax, %r12
leaq -0x58(%rbp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x9a37
callq 0x3360
jmp 0x9a37
movq %rax, %rdi
callq 0x7536
jmp 0x9a34
movq %rax, %r12
movq (%r15), %rdi
cmpq -0x38(%rbp), %rdi
je 0x9a45
callq 0x3360
movq -0x30(%rbp), %rax
movq (%rax), %rdi
cmpq -0x40(%rbp), %rdi
je 0x9a57
callq 0x3360
movq (%rbx), %rdi
cmpq -0x48(%rbp), %rdi
je 0x9a65
callq 0x3360
movq %r12, %rdi
callq 0x35c0
nop
// File: /workspace/github_cpp_makefile_star2_O3/parth-shel[P]xpac/installed_packages_modules.cpp
// Function: calculate_users_packages()
void calculate_users_packages(){
	std::ifstream file;
	file.open(installed_file);
	std::string next_installed;
	while (getline(file,next_installed)) {
		int index = next_installed.find(" ");
		std::string name = next_installed.substr(0,index);
		std::string version = next_installed.substr(index+1, std::string::npos);
		user_installed_list.insert(std::make_pair(name,version));
	}
	file.close();
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x2a8, %rsp            # imm = 0x2A8
leaq -0x2d0(%rbp), %r12
movq %r12, %rdi
callq 0x33e0
leaq 0x5bc6(%rip), %rsi      # 0x105a0
movq %r12, %rdi
movl $0x8, %edx
callq 0x3330
leaq -0x38(%rbp), %rax
movq %rax, -0x10(%rax)
movq $0x0, -0x8(%rax)
movb $0x0, (%rax)
leaq -0x48(%rbp), %r14
leaq -0x88(%rbp), %r13
leaq -0xc8(%rbp), %r15
movq -0x2d0(%rbp), %rax
movq -0x18(%rax), %rdi
addq %r12, %rdi
movl $0xa, %esi
callq 0x3370
movsbl %al, %edx
movq %r12, %rdi
movq %r14, %rsi
callq 0x3620
movq (%rax), %rcx
movq -0x18(%rcx), %rcx
testb $0x5, 0x20(%rax,%rcx)
jne 0xab16
movl $0x1, %ecx
movq %r14, %rdi
leaq 0x1aa2(%rip), %rsi      # 0xc4f5
xorl %edx, %edx
callq 0x35b0
movq %rax, %rbx
movslq %ebx, %rcx
leaq -0x68(%rbp), %rdi
movq %r14, %rsi
xorl %edx, %edx
callq 0x33b0
shlq $0x20, %rbx
movabsq $0x100000000, %rax      # imm = 0x100000000
addq %rax, %rbx
sarq $0x20, %rbx
movq %r13, %rdi
movq %r14, %rsi
movq %rbx, %rdx
movq $-0x1, %rcx
callq 0x33b0
movq %r15, %rdi
leaq -0x68(%rbp), %rsi
movq %r13, %rdx
callq 0xa90e
leaq 0x5b12(%rip), %rdi      # 0x105c0
movq %r15, %rsi
callq 0x8bc2
movq -0xa8(%rbp), %rdi
leaq -0x98(%rbp), %rax
cmpq %rax, %rdi
je 0xaace
callq 0x3360
movq -0xc8(%rbp), %rdi
leaq -0xb8(%rbp), %rax
cmpq %rax, %rdi
je 0xaae6
callq 0x3360
movq -0x88(%rbp), %rdi
leaq -0x78(%rbp), %rax
cmpq %rax, %rdi
je 0xaafb
callq 0x3360
movq -0x68(%rbp), %rdi
leaq -0x58(%rbp), %rax
cmpq %rax, %rdi
je 0xaa0c
callq 0x3360
jmp 0xaa0c
leaq -0x2d0(%rbp), %rdi
callq 0x30c0
movq -0x48(%rbp), %rdi
leaq -0x38(%rbp), %rax
cmpq %rax, %rdi
je 0xab34
callq 0x3360
leaq -0x2d0(%rbp), %rdi
callq 0x3100
addq $0x2a8, %rsp            # imm = 0x2A8
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
jmp 0xab9d
movq %rax, %rbx
jmp 0xabb2
movq %rax, %rbx
leaq -0xc8(%rbp), %rdi
callq 0x74b2
jmp 0xab6d
movq %rax, %rbx
movq -0x88(%rbp), %rdi
leaq -0x78(%rbp), %rax
cmpq %rax, %rdi
je 0xab89
callq 0x3360
jmp 0xab89
jmp 0xab9d
movq %rax, %rbx
movq -0x68(%rbp), %rdi
leaq -0x58(%rbp), %rax
cmpq %rax, %rdi
je 0xaba0
callq 0x3360
jmp 0xaba0
movq %rax, %rbx
leaq -0x38(%rbp), %rax
movq -0x48(%rbp), %rdi
cmpq %rax, %rdi
je 0xabb2
callq 0x3360
leaq -0x2d0(%rbp), %rdi
callq 0x3100
movq %rbx, %rdi
callq 0x35c0
// File: /workspace/github_cpp_makefile_star2_O3/parth-shel[P]xpac/installed_packages_modules.cpp
// Function: add_to_install_list(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>)
void add_to_install_list(std::string name, std::string version) {
	std::fstream file;
	file.open(installed_file, std::ios::out | std::ios::app);

	// Simply appending to file
	file << name << " " << version <<"\n";

	file.close();
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %rbx
subq $0x218, %rsp            # imm = 0x218
movq %rsi, %rbx
movq %rdi, %r14
leaq -0x228(%rbp), %r15
movq %r15, %rdi
callq 0x3430
leaq 0x59ae(%rip), %rsi      # 0x105a0
movq %r15, %rdi
movl $0x11, %edx
callq 0x34a0
leaq -0x218(%rbp), %rdi
movq (%r14), %rsi
movq 0x8(%r14), %rdx
callq 0x3400
movq %rax, %r14
leaq 0x18d9(%rip), %rsi      # 0xc4f5
movl $0x1, %edx
movq %rax, %rdi
callq 0x3400
movq (%rbx), %rsi
movq 0x8(%rbx), %rdx
movq %r14, %rdi
callq 0x3400
leaq 0x1bab(%rip), %rsi      # 0xc7ea
movl $0x1, %edx
movq %rax, %rdi
callq 0x3400
leaq -0x228(%rbp), %rdi
callq 0x3080
leaq -0x228(%rbp), %rdi
callq 0x30d0
addq $0x218, %rsp            # imm = 0x218
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
movq %rax, %rbx
leaq -0x228(%rbp), %rdi
callq 0x30d0
movq %rbx, %rdi
callq 0x35c0
// File: /workspace/github_cpp_makefile_star2_O3/parth-shel[P]xpac/installed_packages_modules.cpp
// Function: rewrite_installed_packages()
void rewrite_installed_packages(){
	std::fstream file;
	file.open(installed_file, std::ios::out | std::ios::trunc);

	for(auto itr = user_installed_list.begin(); itr!=user_installed_list.end(); itr++) {
		file << itr->first << " " << itr->second << "\n";
	}

	file.close();
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x218, %rsp            # imm = 0x218
leaq -0x238(%rbp), %rbx
movq %rbx, %rdi
callq 0x3430
leaq 0x58ed(%rip), %rsi      # 0x105a0
movq %rbx, %rdi
movl $0x30, %edx
callq 0x34a0
movq 0x5911(%rip), %rbx      # 0x105d8
leaq 0x58fa(%rip), %r14      # 0x105c8
cmpq %r14, %rbx
je 0xad38
leaq 0x181b(%rip), %r15      # 0xc4f5
leaq 0x1b09(%rip), %r12      # 0xc7ea
movq 0x20(%rbx), %rsi
movq 0x28(%rbx), %rdx
leaq -0x228(%rbp), %rdi
callq 0x3400
movq %rax, %r13
movl $0x1, %edx
movq %rax, %rdi
movq %r15, %rsi
callq 0x3400
movq 0x40(%rbx), %rsi
movq 0x48(%rbx), %rdx
movq %r13, %rdi
callq 0x3400
movl $0x1, %edx
movq %rax, %rdi
movq %r12, %rsi
callq 0x3400
movq %rbx, %rdi
callq 0x3290
movq %rax, %rbx
cmpq %r14, %rax
jne 0xace1
leaq -0x238(%rbp), %rdi
callq 0x3080
leaq -0x238(%rbp), %rdi
callq 0x30d0
addq $0x218, %rsp            # imm = 0x218
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
jmp 0xad64
movq %rax, %rbx
leaq -0x238(%rbp), %rdi
callq 0x30d0
movq %rbx, %rdi
callq 0x35c0
nop
// File: /workspace/github_cpp_makefile_star2_O3/parth-shel[P]xpac/cleanup_directory.cpp
// Function: cleanup_directory(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>)
void cleanup_directory(std::string dir_name){
	dir_name = get_current_dir_name() + std::string("/") + dir_name;
	int ret = fork();
	if(ret == 0) {
		execl("/bin/rm", "rm", "-rf", dir_name.c_str(), NULL);
		exit(1);
	} else {
		waitpid( ret, NULL, 0);
	}
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x68, %rsp
movq %rdi, %rbx
callq 0x3630
movq %rax, %r14
leaq -0x58(%rbp), %r12
movq %r12, -0x10(%r12)
leaq 0x1262(%rip), %rsi      # 0xc00a
leaq 0x125c(%rip), %rdx      # 0xc00b
leaq -0x68(%rbp), %r15
movq %r15, %rdi
callq 0x7f0c
movq %r14, %rdi
callq 0x31b0
movq %r15, %rdi
xorl %esi, %esi
xorl %edx, %edx
movq %r14, %rcx
movq %rax, %r8
callq 0x33d0
leaq -0x38(%rbp), %r15
movq %r15, -0x10(%r15)
movq (%rax), %rdx
movq %rax, %rcx
addq $0x10, %rcx
cmpq %rcx, %rdx
je 0xadf9
movq %rdx, -0x48(%rbp)
movq (%rcx), %rdx
movq %rdx, -0x38(%rbp)
jmp 0xae00
movups (%rcx), %xmm0
movups %xmm0, (%r15)
movq 0x8(%rax), %rdx
leaq -0x48(%rbp), %rdi
movq %rdx, 0x8(%rdi)
movq %rcx, (%rax)
movq $0x0, 0x8(%rax)
movb $0x0, 0x10(%rax)
movq (%rbx), %rsi
movq 0x8(%rbx), %rdx
callq 0x3140
leaq -0x78(%rbp), %r13
movq %r13, -0x10(%r13)
movq (%rax), %rdx
movq %rax, %rcx
addq $0x10, %rcx
cmpq %rcx, %rdx
je 0xae4e
movq %rdx, -0x88(%rbp)
movq (%rcx), %rdx
movq %rdx, -0x78(%rbp)
jmp 0xae56
movups (%rcx), %xmm0
movups %xmm0, (%r13)
movq 0x8(%rax), %rdx
leaq -0x88(%rbp), %r14
movq %rdx, 0x8(%r14)
movq %rcx, (%rax)
movq $0x0, 0x8(%rax)
movb $0x0, 0x10(%rax)
movq %rbx, %rdi
movq %r14, %rsi
callq 0x3450
movq (%r14), %rdi
cmpq %r13, %rdi
je 0xae8c
callq 0x3360
movq -0x48(%rbp), %rdi
cmpq %r15, %rdi
je 0xae9a
callq 0x3360
movq -0x68(%rbp), %rdi
cmpq %r12, %rdi
je 0xaea8
callq 0x3360
callq 0x3110
testl %eax, %eax
je 0xaecb
movl %eax, %edi
xorl %esi, %esi
xorl %edx, %edx
callq 0x32d0
addq $0x68, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movq (%rbx), %rcx
leaq 0x19fe(%rip), %rdi      # 0xc8d3
leaq 0x19fc(%rip), %rsi      # 0xc8d8
leaq 0x19f8(%rip), %rdx      # 0xc8db
xorl %r8d, %r8d
xorl %eax, %eax
callq 0x3460
movl $0x1, %edi
callq 0x3440
movq %rax, %rbx
movq -0x48(%rbp), %rdi
cmpq %r15, %rdi
je 0xaf0d
callq 0x3360
jmp 0xaf0d
movq %rax, %rbx
movq -0x68(%rbp), %rdi
cmpq %r12, %rdi
je 0xaf1b
callq 0x3360
movq %rbx, %rdi
callq 0x35c0
nop
// File: /workspace/github_cpp_makefile_star2_O3/parth-shel[P]xpac/MD5checksum.cc
// Function: MD5checksum::generate_hash()
void MD5checksum::generate_hash() {
	int fd;
	unsigned char result[MD5_DIGEST_LENGTH];
	void * file_buffer;
	if((fd = open(file_path.c_str(), O_RDONLY)) < 0) {
		return;
	}

	if((file_size = get_file_size(fd)) == 0) {
		return;
	}
	
	file_buffer = mmap(0, file_size, PROT_READ, MAP_SHARED, fd, 0);
	MD5((unsigned char*) file_buffer, file_size, result);
	munmap(file_buffer, file_size);

	close(fd);

	result_hash.clear();
	for(int i = 0;i < MD5_DIGEST_LENGTH;i++) {
		result_hash.push_back(result[i]);
	}
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %rbx
subq $0x98, %rsp
movq %rdi, %rbx
movq (%rdi), %rdi
xorl %esi, %esi
xorl %eax, %eax
callq 0x32b0
testl %eax, %eax
js 0xb065
movl %eax, %r14d
leaq -0xb0(%rbp), %rsi
movl %eax, %edi
callq 0x3580
testl %eax, %eax
js 0xafd0
movq -0x80(%rbp), %rsi
jmp 0xafd2
xorl %esi, %esi
movq %rsi, 0x20(%rbx)
testq %rsi, %rsi
je 0xb065
xorl %edi, %edi
movl $0x1, %edx
movl $0x1, %ecx
movl %r14d, %r8d
xorl %r9d, %r9d
callq 0x35d0
movq %rax, %r15
movq 0x20(%rbx), %rsi
leaq -0xb0(%rbp), %rdx
movq %rax, %rdi
callq 0x3530
movq 0x20(%rbx), %rsi
movq %r15, %rdi
callq 0x3240
movl %r14d, %edi
callq 0x3670
movq 0x28(%rbx), %rax
cmpq %rax, 0x30(%rbx)
je 0xb02e
movq %rax, 0x30(%rbx)
leaq 0x28(%rbx), %r14
xorl %r15d, %r15d
leaq (%r15,%rbp), %rdx
addq $-0xb0, %rdx
movq 0x30(%rbx), %rsi
cmpq 0x38(%rbx), %rsi
je 0xb054
movb (%rdx), %al
movb %al, (%rsi)
incq 0x30(%rbx)
jmp 0xb05c
movq %r14, %rdi
callq 0xb364
incq %r15
cmpq $0x10, %r15
jne 0xb035
addq $0x98, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
nop
// File: /workspace/github_cpp_makefile_star2_O3/parth-shel[P]xpac/MD5checksum.cc
// Function: MD5checksum::save_hash()
void MD5checksum::save_hash() {
	std::string hash_path(file_path);
	hash_path.append(".md5hash");
	std::ofstream hash_file(hash_path, std::ios::out | std::ios::trunc);
	std::string str(result_hash.begin(), result_hash.end());
	hash_file << str; 
	hash_file.close();
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %rbx
subq $0x248, %rsp            # imm = 0x248
movq %rdi, %rbx
leaq -0x48(%rbp), %r15
movq %r15, -0x10(%r15)
movq (%rdi), %rsi
movq 0x8(%rdi), %rdx
addq %rsi, %rdx
leaq -0x58(%rbp), %r14
movq %r14, %rdi
callq 0x80a2
leaq 0x17d3(%rip), %rsi      # 0xc8df
movq %r14, %rdi
callq 0x3650
leaq -0x258(%rbp), %rdi
leaq -0x58(%rbp), %rsi
movl $0x30, %edx
callq 0x3660
movq 0x28(%rbx), %rsi
movq 0x30(%rbx), %rdx
leaq -0x28(%rbp), %r14
movq %r14, -0x10(%r14)
leaq -0x38(%rbp), %rdi
callq 0xb456
movq -0x38(%rbp), %rsi
movq -0x30(%rbp), %rdx
leaq -0x258(%rbp), %rdi
callq 0x3400
leaq -0x258(%rbp), %rdi
callq 0x34c0
movq -0x38(%rbp), %rdi
cmpq %r14, %rdi
je 0xb170
callq 0x3360
movq 0x4e49(%rip), %rax      # 0xffc0
movq (%rax), %rcx
movq 0x18(%rax), %rax
leaq -0x250(%rbp), %rdi
movq %rcx, -0x8(%rdi)
movq -0x18(%rcx), %rcx
movq %rax, -0x258(%rbp,%rcx)
callq 0x3310
leaq -0x160(%rbp), %rdi
callq 0x3160
movq -0x58(%rbp), %rdi
cmpq %r15, %rdi
je 0xb1b4
callq 0x3360
addq $0x248, %rsp            # imm = 0x248
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
movq %rax, %rbx
jmp 0xb1df
jmp 0xb1c9
movq %rax, %rbx
jmp 0xb1eb
movq %rax, %rbx
movq -0x38(%rbp), %rdi
cmpq %r14, %rdi
je 0xb1df
callq 0x3360
leaq -0x258(%rbp), %rdi
callq 0x34f0
movq -0x58(%rbp), %rdi
cmpq %r15, %rdi
je 0xb1f9
callq 0x3360
movq %rbx, %rdi
callq 0x35c0
nop
// File: /workspace/github_cpp_makefile_star2_O3/parth-shel[P]xpac/MD5checksum.cc
// Function: MD5checksum::compare_saved_hash(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>)
bool MD5checksum::compare_saved_hash(std::string other_file_path) {
	std::ifstream file(other_file_path, std::ios::in);
	if(!file.good()) {
		return false;
	}

	if(file.is_open()) {
		std::string buf((std::istreambuf_iterator<char>(file)), std::istreambuf_iterator<char>());
		std::string str(result_hash.begin(), result_hash.end());
		return (str == buf);
	}
	return false;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
subq $0x250, %rsp            # imm = 0x250
movq %rdi, %rbx
leaq -0x268(%rbp), %r14
movq %r14, %rdi
movl $0x8, %edx
callq 0x3550
movq (%r14), %rax
movq -0x18(%rax), %r14
cmpl $0x0, -0x248(%rbp,%r14)
jne 0xb2b3
leaq -0x1f0(%rbp), %rdi
callq 0x30e0
testb %al, %al
je 0xb2b3
movq -0x180(%rbp,%r14), %rsi
leaq -0x30(%rbp), %r15
movq %r15, -0x10(%r15)
leaq -0x40(%rbp), %rdi
movl $0xffffffff, %edx       # imm = 0xFFFFFFFF
xorl %ecx, %ecx
movl $0xffffffff, %r8d       # imm = 0xFFFFFFFF
callq 0xb4d0
movq 0x28(%rbx), %rsi
movq 0x30(%rbx), %rdx
leaq -0x50(%rbp), %r12
movq %r12, -0x10(%r12)
leaq -0x60(%rbp), %rdi
callq 0xb456
movq -0x58(%rbp), %rdx
cmpq -0x38(%rbp), %rdx
jne 0xb2d3
movq -0x60(%rbp), %r14
testq %rdx, %rdx
je 0xb2db
movq -0x40(%rbp), %rsi
movq %r14, %rdi
callq 0x33a0
testl %eax, %eax
sete %bl
jmp 0xb2dd
xorl %ebx, %ebx
leaq -0x268(%rbp), %rdi
callq 0x3100
movl %ebx, %eax
addq $0x250, %rsp            # imm = 0x250
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
movq -0x60(%rbp), %r14
xorl %ebx, %ebx
jmp 0xb2dd
movb $0x1, %bl
cmpq %r12, %r14
je 0xb2ea
movq %r14, %rdi
callq 0x3360
movq -0x40(%rbp), %rdi
cmpq %r15, %rdi
je 0xb2b5
callq 0x3360
jmp 0xb2b5
movq %rax, %rbx
movq -0x40(%rbp), %rdi
cmpq %r15, %rdi
je 0xb310
callq 0x3360
jmp 0xb310
movq %rax, %rbx
leaq -0x268(%rbp), %rdi
callq 0x3100
movq %rbx, %rdi
callq 0x35c0
// File: /workspace/github_cpp_makefile_star2_O3/nmmmnu[P]HM3/net/worker/echoworker_impl.h
// Function: net::WorkerStatus net::worker::EchoWorker::operator()<net::ClientBuffer>(net::ClientBuffer&)
WorkerStatus EchoWorker::operator()(CONNECTION &buffer){
	if (buffer.size() == 0)
		return WorkerStatus::PASS;

	// buffer.print();

	if (cmp_(cmd_shutdown, buffer)){
		return WorkerStatus::SHUTDOWN;
	}

	if (cmp_(cmd_exit, buffer)){
		return WorkerStatus::DISCONNECT;
	}


	if (cmp_(cmd_hello, buffer)){
		buffer.clear();
		buffer.push("Hello, how are you?\r\n");
		return WorkerStatus::WRITE;
	}

	if (cmp_(cmd_help, buffer)){
		buffer.clear();
		buffer.push(msg_help);
		return WorkerStatus::WRITE;
	}

	return WorkerStatus::WRITE;
}

// Assembly:
pushq %rbp
pushq %rbx
pushq %rax
movq %rsi, %rbx
movq (%rsi), %rsi
movq 0x10(%rbx), %rdx
xorl %ebp, %ebp
subq %rsi, %rdx
je 0x311d
addq 0x8(%rbx), %rsi
leaq 0x3d59(%rip), %rdi      # 0x6da8
callq 0x3166
testl %eax, %eax
je 0x30eb
movq (%rbx), %rax
movq 0x10(%rbx), %rdx
movq 0x8(%rbx), %rsi
addq %rax, %rsi
subq %rax, %rdx
leaq 0x3d24(%rip), %rdi      # 0x6d98
callq 0x3166
testl %eax, %eax
je 0x30f2
movq (%rbx), %rax
movq 0x10(%rbx), %rdx
movq 0x8(%rbx), %rsi
addq %rax, %rsi
subq %rax, %rdx
leaq 0x3ce3(%rip), %rdi      # 0x6d78
callq 0x3166
testl %eax, %eax
je 0x30f9
movq (%rbx), %rax
movq 0x10(%rbx), %rdx
movq 0x8(%rbx), %rsi
addq %rax, %rsi
subq %rax, %rdx
leaq 0x3cd2(%rip), %rdi      # 0x6d88
callq 0x3166
movl $0x2, %ebp
testl %eax, %eax
jne 0x311d
leaq 0x8(%rbx), %rdi
xorl %eax, %eax
movq %rax, 0x10(%rbx)
movq 0x8(%rbx), %rcx
movb $0x0, (%rcx)
movq %rax, (%rbx)
leaq 0x101d(%rip), %rsi      # 0x40fc
movl $0x7b, %edx
callq 0x2060
jmp 0x311d
movl $0x5, %ebp
jmp 0x311d
movl $0x3, %ebp
jmp 0x311d
xorl %eax, %eax
movq %rax, 0x10(%rbx)
movq 0x8(%rbx), %rcx
movb $0x0, (%rcx)
movq %rax, (%rbx)
leaq 0xfd6(%rip), %rsi       # 0x40e6
movq %rbx, %rdi
callq 0x3126
movl $0x2, %ebp
movl %ebp, %eax
addq $0x8, %rsp
popq %rbx
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O3/lagoproject[P]arti/analysis/showers.cc
// Function: curved(double, double)
void curved(double xp, double yp) {
  double d = r_earth + h;
  double t = sqrt(xp*xp + yp*yp)/d;
  double f = atan2(yp,xp);
  z = (d*cos(t) - r_earth)*cm2m;
  d *= sin(t);
  x = d*cos(f)*cm2m;
  y = d*sin(f)*cm2m;
}

// Assembly:
subq $0x18, %rsp
movsd 0x57da(%rip), %xmm4     # 0x8148
addsd 0x59d2(%rip), %xmm4     # 0x8348
movsd %xmm4, (%rsp)
movapd %xmm0, %xmm2
movapd %xmm1, %xmm0
mulsd %xmm1, %xmm0
movapd %xmm2, %xmm3
mulsd %xmm2, %xmm3
addsd %xmm0, %xmm3
xorps %xmm0, %xmm0
sqrtsd %xmm3, %xmm0
divsd %xmm4, %xmm0
movsd %xmm0, 0x8(%rsp)
movapd %xmm1, %xmm0
movapd %xmm2, %xmm1
callq 0x2040
movsd %xmm0, 0x10(%rsp)
movsd 0x8(%rsp), %xmm0
callq 0x2230
mulsd (%rsp), %xmm0
subsd 0x5779(%rip), %xmm0     # 0x8148
mulsd 0x5791(%rip), %xmm0     # 0x8168
movsd %xmm0, 0x5961(%rip)     # 0x8340
movsd 0x8(%rsp), %xmm0
callq 0x2050
mulsd (%rsp), %xmm0
movsd %xmm0, (%rsp)
movsd 0x10(%rsp), %xmm0
callq 0x2230
mulsd (%rsp), %xmm0
mulsd 0x575c(%rip), %xmm0     # 0x8168
movsd %xmm0, 0x591c(%rip)     # 0x8330
movsd 0x10(%rsp), %xmm0
callq 0x2050
mulsd (%rsp), %xmm0
mulsd 0x573c(%rip), %xmm0     # 0x8168
movsd %xmm0, 0x5904(%rip)     # 0x8338
addq $0x18, %rsp
retq
// File: /workspace/github_cpp_makefile_star2_O3/grisu48[P]geoJson/geoJson.cpp
// Function: Coords::Coords(Coords const&)
Coords(const Coords &src) {
        this->lon = src.lon;
        this->lat = src.lat;
        this->ele = src.ele;
        this->time = src.time;
    }

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
leaq 0x20(%rdi), %r15
xorl %eax, %eax
movq %rax, (%rdi)
movl $0x0, 0x8(%rdi)
leaq 0x10(%rdi), %rbx
movq %r15, 0x10(%rdi)
movq %rax, 0x18(%rdi)
movb $0x0, 0x20(%rdi)
vmovsd (%rsi), %xmm0
vmovsd %xmm0, (%rdi)
vmovss 0x8(%rsi), %xmm0
addq $0x10, %rsi
vmovss %xmm0, 0x8(%rdi)
movq %rbx, %rdi
callq 0x2130
popq %rbx
popq %r14
popq %r15
retq
movq (%rbx), %rdi
movq %rax, %r14
cmpq %r15, %rdi
je 0x5771
callq 0x21c0
movq %r14, %rdi
callq 0x2310
nop
// File: /workspace/github_cpp_makefile_star2_O3/SeanLee97[P]LL1-Parser/driver.cpp
// Function: main
int main(int argc, char* argv[]) {
	Grammar g;
	g.init(argv[1]);
	g.parse();
	//g.print_table();
	return 0;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r14
pushq %rbx
subq $0x300, %rsp            # imm = 0x300
movq %rsi, %rbx
leaq -0x308(%rbp), %r14
movq %r14, %rdi
callq 0x2dec
movq 0x8(%rbx), %rsi
movq %r14, %rdi
callq 0x4b42
leaq -0x308(%rbp), %rdi
callq 0x52fa
leaq -0x308(%rbp), %rdi
callq 0x25f6
xorl %eax, %eax
addq $0x300, %rsp            # imm = 0x300
popq %rbx
popq %r14
popq %rbp
retq
movq %rax, %rbx
leaq -0x308(%rbp), %rdi
callq 0x25f6
movq %rbx, %rdi
callq 0x22e0
nop
// File: /workspace/github_cpp_makefile_star2_O3/SeanLee97[P]LL1-Parser/scan.cpp
// Function: make_token(tok_num)
static inline token make_token(tok_num t) {
    token rtn;
    rtn.num = t;
    assert(image_index < TOKEN_MAX);
    token_image[image_index] = 0;
    rtn.name = token_names[t];
    rtn.image = string(token_image);
    rtn.line = tok_line;
    rtn.column = tok_col;
    return rtn;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x28, %rsp
leaq 0x20(%rdi), %r12
movq %r12, 0x10(%rdi)
movq $0x0, 0x18(%rdi)
movb $0x0, 0x20(%rdi)
movl %esi, (%rdi)
movslq 0x86e1(%rip), %rax      # 0xb2e4
cmpq $0x64, %rax
jge 0x2c95
movq %rdi, %rbx
leaq 0x10(%rdi), %r14
leaq 0x86e5(%rip), %r15      # 0xb300
movb $0x0, (%rax,%r15)
movl %esi, %eax
leaq 0x8587(%rip), %rcx      # 0xb1b0
movq (%rcx,%rax,8), %rax
movq %rax, 0x8(%rdi)
leaq -0x38(%rbp), %r13
movq %r13, -0x10(%r13)
movq %r15, %rdi
callq 0x20d0
leaq (%rax,%r15), %rdx
leaq -0x48(%rbp), %rdi
movq %r15, %rsi
callq 0x2d4c
leaq -0x48(%rbp), %r15
movq %r14, %rdi
movq %r15, %rsi
callq 0x2240
movq (%r15), %rdi
cmpq %r13, %rdi
je 0x2c74
movq -0x38(%rbp), %rsi
incq %rsi
callq 0x21d0
movl 0x8672(%rip), %eax      # 0xb2ec
movl %eax, 0x30(%rbx)
movl 0x866d(%rip), %eax      # 0xb2f0
movl %eax, 0x34(%rbx)
addq $0x28, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
leaq 0x54cc(%rip), %rdi      # 0x8168
leaq 0x54dd(%rip), %rsi      # 0x8180
leaq 0x54df(%rip), %rcx      # 0x8189
movl $0x55, %edx
callq 0x2130
movq %rax, %rbx
movq (%r14), %rdi
cmpq %r12, %rdi
je 0x2ccb
movq (%r12), %rsi
incq %rsi
callq 0x21d0
movq %rbx, %rdi
callq 0x22e0
// File: /workspace/github_cpp_makefile_star2_O3/SeanLee97[P]LL1-Parser/scan.cpp
// Function: nextchar()
static inline void nextchar() {
    assert(image_index < TOKEN_MAX);
    token_image[image_index++] = cur_char;
    cur_char = cin.get();
    cur_col++;
    if (cur_char == '\n') {
        cur_line++;
        cur_col = 0;
    }
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
movslq 0x8606(%rip), %rax      # 0xb2e4
cmpq $0x64, %rax
jge 0x2d2c
movb 0x85ce(%rip), %cl       # 0xb2b8
leal 0x1(%rax), %edx
movl %edx, 0x85f1(%rip)      # 0xb2e4
leaq 0x8606(%rip), %rdx      # 0xb300
movb %cl, (%rax,%rdx)
movq 0x82dc(%rip), %rdi      # 0xafe0
callq 0x2220
movl %eax, 0x85a9(%rip)      # 0xb2b8
incl 0x85d3(%rip)            # 0xb2e8
cmpl $0xa, %eax
jne 0x2d2a
incl 0x859c(%rip)            # 0xb2bc
movl $0x0, 0x85be(%rip)      # 0xb2e8
popq %rbp
retq
leaq 0x5435(%rip), %rdi      # 0x8168
leaq 0x5446(%rip), %rsi      # 0x8180
leaq 0x548c(%rip), %rcx      # 0x81cd
movl $0x48, %edx
callq 0x2130
nop
// File: /workspace/github_cpp_makefile_star2_O3/SeanLee97[P]LL1-Parser/grammar.cpp
// Function: Grammar::_get_idx_by_symbol(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>)
int Grammar::_get_idx_by_symbol(string symbol_to_find) {

	for(int i = 0; i < terminal_names.size(); i++) {
		if(terminal_names[i].compare(symbol_to_find) == 0)
			return i * -1;
	}

	for(int i = 0; i < nonterminal_names.size(); i++) {
		if(nonterminal_names[i].compare(symbol_to_find) == 0)
			return i;
	}

	return 999;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movq %rsi, %r14
movq %rdi, %r15
movq 0x238(%rdi), %rdi
cmpq %rdi, 0x240(%r15)
je 0x338f
xorl %r12d, %r12d
xorl %ebx, %ebx
addq %r12, %rdi
movq %r14, %rsi
callq 0x2040
testl %eax, %eax
je 0x33dc
incq %rbx
movq 0x238(%r15), %rdi
movq 0x240(%r15), %rax
subq %rdi, %rax
sarq $0x5, %rax
addq $0x20, %r12
cmpq %rbx, %rax
ja 0x335f
movq 0x250(%r15), %rdi
movl $0x3e7, %ebx            # imm = 0x3E7
cmpq %rdi, 0x258(%r15)
je 0x33e3
xorl %r12d, %r12d
xorl %r13d, %r13d
addq %r12, %rdi
movq %r14, %rsi
callq 0x2040
testl %eax, %eax
je 0x33e0
incq %r13
movq 0x250(%r15), %rdi
movq 0x258(%r15), %rax
subq %rdi, %rax
sarq $0x5, %rax
addq $0x20, %r12
cmpq %r13, %rax
ja 0x33aa
jmp 0x33e3
negl %ebx
jmp 0x33e3
movl %r13d, %ebx
movl %ebx, %eax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O3/SeanLee97[P]LL1-Parser/grammar.cpp
// Function: Grammar::_push_unique_elements(std::vector<int, std::allocator<int>>, std::vector<int, std::allocator<int>>)
vector<int> Grammar::_push_unique_elements(vector<int> target, vector<int> source) {
	for(int i = 0; i < source.size(); i++) {
		if(!_in_array(target, abs(source[i]))) {
			target.push_back(source[i]);
		}
	}
	return target;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x18, %rsp
movq %rdx, %rbx
movq %rdi, %r14
movq 0x8(%rcx), %rax
cmpq (%rcx), %rax
je 0x3e6a
movq %rcx, %r15
xorl %r13d, %r13d
leaq -0x40(%rbp), %r12
movq %r12, %rdi
movq %rbx, %rsi
callq 0x5ebc
movq (%r15), %rdx
movl (%rdx,%r13,4), %ecx
movl %ecx, %eax
negl %eax
cmovsl %ecx, %eax
movq -0x40(%rbp), %rdi
movq -0x38(%rbp), %rcx
subq %rdi, %rcx
je 0x3e0d
sarq $0x2, %rcx
cmpq $0x1, %rcx
adcq $0x0, %rcx
xorl %edx, %edx
cmpl %eax, (%rdi,%rdx,4)
je 0x3e3d
incq %rdx
cmpq %rdx, %rcx
jne 0x3dfe
jmp 0x3e12
testq %rdi, %rdi
je 0x3e21
movq -0x30(%rbp), %rsi
subq %rdi, %rsi
callq 0x21d0
movq (%r15), %rdx
leaq (%rdx,%r13,4), %rdx
movq 0x8(%rbx), %rsi
cmpq 0x10(%rbx), %rsi
je 0x3e4b
movl (%rdx), %eax
movl %eax, (%rsi)
addq $0x4, %rsi
movq %rsi, 0x8(%rbx)
jmp 0x3e53
movq -0x30(%rbp), %rsi
subq %rdi, %rsi
callq 0x21d0
jmp 0x3e53
movq %rbx, %rdi
callq 0x66b8
incq %r13
movq 0x8(%r15), %rax
subq (%r15), %rax
sarq $0x2, %rax
cmpq %r13, %rax
ja 0x3dca
movq (%rbx), %rax
movq %rax, (%r14)
movq 0x8(%rbx), %rax
movq %rax, 0x8(%r14)
movq 0x10(%rbx), %rax
movq %rax, 0x10(%r14)
xorps %xmm0, %xmm0
movups %xmm0, (%rbx)
movq $0x0, 0x10(%rbx)
movq %r14, %rax
addq $0x18, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O3/kmyk[P]procon26/beam_search.cpp
// Function: beam_search(board const&, std::vector<block, std::allocator<block>> const&, int, bool)
vector<placement_t> beam_search(board const & brd, std::vector<block> const & blks, int beam_width, bool is_chokudai) {
    if (is_chokudai) {
        unordered_set<bitset<board_size * board_size> > cache;
        while (true) beam_search_solver(beam_width, &cache)(brd, blks);
    } else {
        return beam_search_solver(beam_width, nullptr)(brd, blks);
    }
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x21a8, %rsp           # imm = 0x21A8
movl %ecx, %ebp
movq %rdx, %rbx
movq %rsi, %r14
testl %r8d, %r8d
jne 0x26af
movq %rdi, %r15
leaq 0x50(%rsp), %r12
movq %r12, %rdi
movl %ebp, %esi
xorl %edx, %edx
callq 0x291c
movq %r15, %rdi
movq %r12, %rsi
movq %r14, %rdx
movq %rbx, %rcx
callq 0x2b5c
movl $0x2148, %ebx           # imm = 0x2148
movq 0x40(%rsp,%rbx), %rdi
testq %rdi, %rdi
je 0x2657
movq 0x50(%rsp,%rbx), %rsi
subq %rdi, %rsi
callq 0x2190
addq $-0x18, %rbx
cmpq $0x2118, %rbx           # imm = 0x2118
jne 0x2640
leaq 0x2140(%rsp), %rbx
movq %rbx, %rdi
callq 0x47ae
movq -0x28(%rbx), %rdi
testq %rdi, %rdi
je 0x268d
movq 0x2128(%rsp), %rsi
subq %rdi, %rsi
callq 0x2190
leaq 0x2100(%rsp), %rdi
callq 0x4570
movq %r15, %rax
addq $0x21a8, %rsp           # imm = 0x21A8
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
leaq 0x48(%rsp), %rax
movq %rax, -0x30(%rax)
movq $0x1, -0x28(%rax)
xorps %xmm0, %xmm0
movups %xmm0, -0x20(%rax)
movl $0x3f800000, -0x10(%rax) # imm = 0x3F800000
movups %xmm0, -0x8(%rax)
leaq 0x50(%rsp), %r13
movq %rsp, %r12
movq %r13, %rdi
movl %ebp, %esi
leaq 0x18(%rsp), %rdx
callq 0x291c
movq %r12, %rdi
movq %r13, %rsi
movq %r14, %rdx
movq %rbx, %rcx
callq 0x2b5c
movq (%rsp), %rdi
testq %rdi, %rdi
je 0x2710
movq 0x10(%rsp), %rsi
subq %rdi, %rsi
callq 0x2190
movl $0x2148, %r15d          # imm = 0x2148
movq 0x40(%rsp,%r15), %rdi
testq %rdi, %rdi
je 0x272d
movq 0x50(%rsp,%r15), %rsi
subq %rdi, %rsi
callq 0x2190
addq $-0x18, %r15
cmpq $0x2118, %r15           # imm = 0x2118
jne 0x2716
leaq 0x2140(%rsp), %rdi
callq 0x47ae
movq 0x2118(%rsp), %rdi
testq %rdi, %rdi
je 0x2764
movq 0x2128(%rsp), %rsi
subq %rdi, %rsi
callq 0x2190
leaq 0x2100(%rsp), %rdi
callq 0x4570
jmp 0x26da
movq %rax, %rbx
leaq 0x50(%rsp), %rdi
callq 0x449c
jmp 0x2788
movq %rax, %rbx
leaq 0x18(%rsp), %rdi
callq 0x746a
jmp 0x27a1
movq %rax, %rbx
leaq 0x50(%rsp), %rdi
callq 0x449c
movq %rbx, %rdi
callq 0x22a0
// File: /workspace/github_cpp_makefile_star2_O3/kmyk[P]procon26/procon26.cpp
// Function: signature_block(bool const (&) [8][8], point_t const&)
uint64_t signature_block(bool const (& a)[block_size][block_size], point_t const & offset) {
    static_assert (block_size == 8, "");
    uint64_t z = 0; // 8*8 == 64
    repeat_from (y, offset.y, 8) {
        uint64_t w = 0;
        repeat_from (x, offset.x, 8) {
            w = w << 1;
            if (a[y][x]) w = w | 1;
        }
        w = w << offset.x;
        z = (z << 8) | w;
    }
    z = z << (8 * offset.y);
    return z;
}

// Assembly:
movslq 0x4(%rsi), %rdx
cmpq $0x7, %rdx
jg 0x74ee
pushq %rbx
movslq (%rsi), %rcx
leaq (%rdi,%rdx,8), %rsi
leaq 0x1(%rcx), %rdi
xorl %eax, %eax
movq %rdx, %r8
cmpl $0x7, %ecx
jg 0x74d1
movq %rdi, %r11
xorl %r9d, %r9d
movq %rdi, %r10
movzbl -0x1(%rsi,%r11), %ebx
leaq (%rbx,%r9,2), %r9
incq %r10
cmpl $0x8, %r11d
movq %r10, %r11
jne 0x74b9
jmp 0x74d4
xorl %r9d, %r9d
shlq %cl, %r9
shlq $0x8, %rax
orq %r9, %rax
incq %r8
addq $0x8, %rsi
cmpl $0x8, %r8d
jne 0x74ab
popq %rbx
jmp 0x74f0
xorl %eax, %eax
shll $0x3, %edx
movl %edx, %ecx
shlq %cl, %rax
retq
nop
// File: /workspace/github_cpp_makefile_star2_O3/kmyk[P]procon26/procon26.cpp
// Function: board::board(board_t const&)
board::board(board_t const & a) {
    copy_cell_map(a.a, m_cell, [](bool x) -> int { return x; });
    repeat (y, board_size) {
        repeat (x, board_size) {
            m_packed[y * board_size + x] = m_cell[y][x];
        }
    }
    shrink();
    update();
}

// Assembly:
pushq %rbx
movq %rdi, %rbx
leaq 0x2030(%rdi), %rax
pxor %xmm0, %xmm0
movdqu %xmm0, 0x20a0(%rdi)
movdqu %xmm0, 0x2090(%rdi)
movdqu %xmm0, 0x2080(%rdi)
movdqu %xmm0, 0x2070(%rdi)
movdqu %xmm0, 0x2060(%rdi)
movdqu %xmm0, 0x2050(%rdi)
movdqu %xmm0, 0x2040(%rdi)
movdqu %xmm0, 0x2030(%rdi)
xorl %ecx, %ecx
movq %rdi, %rdx
xorl %edi, %edi
movd (%rsi,%rdi), %xmm1
punpcklbw %xmm0, %xmm1    # xmm1 = xmm1[0],xmm0[0],xmm1[1],xmm0[1],xmm1[2],xmm0[2],xmm1[3],xmm0[3],xmm1[4],xmm0[4],xmm1[5],xmm0[5],xmm1[6],xmm0[6],xmm1[7],xmm0[7]
punpcklwd %xmm0, %xmm1    # xmm1 = xmm1[0],xmm0[0],xmm1[1],xmm0[1],xmm1[2],xmm0[2],xmm1[3],xmm0[3]
movdqu %xmm1, (%rdx,%rdi,4)
addq $0x4, %rdi
cmpq $0x20, %rdi
jne 0x758c
incq %rcx
addq $0x20, %rsi
subq $-0x80, %rdx
cmpq $0x20, %rcx
jne 0x758a
xorl %edx, %edx
xorl %esi, %esi
movl %edx, %edi
andl $0x3f, %edi
movq %rdx, %r8
xorl %r9d, %r9d
leal (%rdi,%r9), %ecx
movl $0x1, %r10d
shlq %cl, %r10
movq %r8, %rcx
shrq $0x6, %rcx
cmpl $0x0, (%rbx,%r8,4)
je 0x75e9
orq (%rax,%rcx,8), %r10
jmp 0x75f0
notq %r10
andq (%rax,%rcx,8), %r10
movq %r10, (%rax,%rcx,8)
incq %r9
incq %r8
cmpq $0x20, %r9
jne 0x75c8
incq %rsi
addq $0x20, %rdx
cmpq $0x20, %rsi
jne 0x75bd
movq %rbx, %rdi
callq 0x761e
movq %rbx, %rdi
popq %rbx
jmp 0x7798
// File: /workspace/github_cpp_makefile_star2_O3/kmyk[P]procon26/procon26.cpp
// Function: board::shrink()
void board::shrink() {
    m_offset = { 0, 0 };
    m_size = { N, N };
    shrink_cell(m_cell, m_offset, m_size, 1);
    repeat (y,board_size) {
        m_skips[y][board_size-1] = 1;
        for (int x = board_size - 2; x >= 0; -- x) {
            m_skips[y][x] = m_cell[y][x+1] == 0 ? 1 : m_skips[y][x+1] + 1;
        }
    }
    m_stone_offset = { 0, 0 };
    m_stone_size = { N, N };
    shrink_cell(m_cell, m_stone_offset, m_stone_size, [](int n) -> bool { return n <= 1; });
}

// Assembly:
pushq %rbx
subq $0x10, %rsp
movq %rdi, %rbx
leaq 0x1000(%rdi), %rsi
leaq 0x1008(%rdi), %rdx
movaps 0x3c05(%rip), %xmm0     # 0xb240
movups %xmm0, 0x1000(%rdi)
leaq 0xc(%rsp), %rcx
movl $0x1, (%rcx)
callq 0x91a3
leaq 0x102c(%rbx), %rax
xorl %ecx, %ecx
movl $0x1, %edx
movq %rbx, %rsi
movq %rcx, %rdi
shlq $0x7, %rdi
movl $0x1, 0x7c(%rax,%rdi)
movl $0x7c, %edi
movl $0x1, %r8d
incl %r8d
cmpl $0x0, (%rsi,%rdi)
cmovel %edx, %r8d
movl %r8d, 0x1028(%rsi,%rdi)
addq $-0x4, %rdi
jne 0x767d
incq %rcx
subq $-0x80, %rsi
cmpq $0x20, %rcx
jne 0x7663
movaps 0x3b96(%rip), %xmm0     # 0xb240
movups %xmm0, 0x1014(%rbx)
movl $0x20, %esi
xorl %ecx, %ecx
movq %rbx, %rax
xorl %edx, %edx
cmpl $0x2, (%rax,%rdx)
jl 0x76e7
subq $-0x80, %rdx
cmpq $0x1000, %rdx           # imm = 0x1000
jne 0x76bd
incq %rcx
movl %ecx, 0x1014(%rbx)
decl %esi
movl %esi, 0x101c(%rbx)
addq $0x4, %rax
jmp 0x76bb
movl %esi, %ecx
movl $0x20, %edx
xorl %edi, %edi
movq %rax, %r8
testl %esi, %esi
jle 0x7709
xorl %r9d, %r9d
cmpl $0x2, (%r8,%r9,4)
jl 0x7720
incq %r9
cmpq %r9, %rcx
jne 0x76fa
incq %rdi
movl %edi, 0x1018(%rbx)
decl %edx
movl %edx, 0x1020(%rbx)
subq $-0x80, %r8
jmp 0x76f3
movl %edx, %esi
movslq %edi, %rdi
shlq $0x7, %rdi
addq %rbx, %rdi
movl $0x1f, %r8d
testl %edx, %edx
jle 0x774f
movslq %r8d, %r9
leaq (%rdi,%r9,4), %r9
movq %rsi, %r10
cmpl $0x2, (%r9)
jl 0x775d
subq $-0x80, %r9
decq %r10
jne 0x7740
decq %rcx
movl %ecx, 0x101c(%rbx)
decl %r8d
jmp 0x7732
movl %ecx, %edx
movl $0x1f, %edi
testl %ecx, %ecx
jle 0x7784
movslq %edi, %r8
shlq $0x7, %r8
addq %rax, %r8
xorl %r9d, %r9d
cmpl $0x2, (%r8,%r9,4)
jl 0x7791
incq %r9
cmpq %r9, %rdx
jne 0x7775
decq %rsi
movl %esi, 0x1020(%rbx)
decl %edi
jmp 0x7764
addq $0x10, %rsp
popq %rbx
retq
nop
// File: /workspace/github_cpp_makefile_star2_O3/kmyk[P]procon26/procon26.cpp
// Function: board::update()
void board::update() {
    m_area = 0;
    m_stone_area = 0;
    m_first_stone = 1000000007;
    repeat (y,board_size) {
        repeat (x,board_size) {
            switch (m_cell[y][x]) {
                case 0:
                    m_area += 1;
                    break;
                case 1:
                    break;
                default:
                    m_stone_area += 1;
                    m_first_stone = std::min(m_first_stone, m_cell[y][x]);
            }
        }
    }
}

// Assembly:
movl $0x0, 0x1010(%rdi)
movabsq $0x3b9aca0700000000, %rax # imm = 0x3B9ACA0700000000
movq %rax, 0x1024(%rdi)
movl $0x3b9aca07, %eax       # imm = 0x3B9ACA07
xorl %ecx, %ecx
movq %rdi, %rdx
xorl %esi, %esi
xorl %r8d, %r8d
xorl %r9d, %r9d
movl (%rdx,%r9,4), %r10d
cmpl $0x1, %r10d
je 0x77f9
testl %r10d, %r10d
jne 0x77de
incl %esi
movl %esi, 0x1010(%rdi)
jmp 0x77f9
incl %r8d
movl %r8d, 0x1024(%rdi)
movl (%rdx,%r9,4), %r10d
cmpl %eax, %r10d
cmovll %r10d, %eax
movl %eax, 0x1028(%rdi)
incq %r9
cmpq $0x20, %r9
jne 0x77c5
incq %rcx
subq $-0x80, %rdx
cmpq $0x20, %rcx
jne 0x77c2
retq
// File: /workspace/github_cpp_makefile_star2_O3/kmyk[P]procon26/procon26.cpp
// Function: board::is_intersect(block const&, placement_t const&, int*) const
bool board::is_intersect(block const & blk, placement_t const & p, int *skipp) const {
    repeat (i, blk.area()) {
        point_t q = blk.stones(p.f,p.r)[i] + p.p;
        if (q.y < 0 or board_size <= q.y or board_size <= q.x) {
            if (skipp) *skipp = board_size;
            return true;
        }
        if (q.x < 0) {
            if (skipp) *skipp = - q.x;
            return true;
        }
        if (at(q)) {
            if (skipp) *skipp = std::max(skip(q), blk.skips(p.f,p.r)[i]);
            return true;
        }
    }
    if (skipp) *skipp = 1;
    return false;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %rbx
movslq 0x280(%rsi), %r8
testq %r8, %r8
jle 0x793e
movl 0xc(%rdx), %eax
movl 0x10(%rdx), %r9d
leaq (%rax,%rax,2), %rax
shlq $0x5, %rax
addq %rax, %rsi
leaq (%r9,%r9,2), %r9
movq 0x290(%rsi,%r9,8), %r11
movl 0x4(%rdx), %ebx
movl 0x8(%rdx), %ebp
movq %r8, %r14
negq %r14
movb $0x1, %al
movl $0x1, %r10d
movl -0x8(%r11,%r10,8), %edx
addl %ebx, %edx
cmpl $0x1f, %edx
jg 0x7947
movl -0x4(%r11,%r10,8), %r15d
addl %ebp, %r15d
cmpl $0x20, %r15d
jae 0x7947
testl %edx, %edx
js 0x795c
shlq $0x7, %r15
addq %rdi, %r15
cmpl $0x0, (%r15,%rdx,4)
jne 0x7965
cmpq %r8, %r10
setb %al
leaq (%r14,%r10), %rdx
incq %rdx
incq %r10
cmpq $0x1, %rdx
jne 0x78fc
movl $0x1, %edx
xorl %eax, %eax
jmp 0x794c
movl $0x20, %edx
testq %rcx, %rcx
je 0x7953
movl %edx, (%rcx)
andb $0x1, %al
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
testq %rcx, %rcx
je 0x7953
negl %edx
jmp 0x7951
testq %rcx, %rcx
je 0x7953
movl 0x102c(%r15,%rdx,4), %edi
movq 0x350(%rsi,%r9,8), %rdx
movl -0x4(%rdx,%r10,4), %edx
cmpl %edx, %edi
cmovgl %edi, %edx
jmp 0x7951
// File: /workspace/github_cpp_makefile_star2_O3/kmyk[P]procon26/procon26.cpp
// Function: board::is_puttable(block const&, placement_t const&, int, int*) const
bool board::is_puttable(block const & blk, placement_t const & p, int n, int *skipp) const {
    if (is_intersect(blk, p, skipp)) return false;
    if (is_new()) {
        return true;
    } else {
        repeat (j,blk.area()) {
            repeat (i,4) {
                point_t r = blk.stones(p.f,p.r)[j] + p.p + dp[i];
                if (not is_on_board(r)) continue;
                int a = at(r);
                if (2 <= a and a < n) return true; // is a stone
                if (2 <= a and n < a and a == m_first_stone) return true;
            }
        }
        return false;
    }
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x18, %rsp
movl %ecx, 0x4(%rsp)
movq %rdx, %r14
movq %rsi, %rbx
movq %rdi, %r12
movq %r8, %rcx
callq 0x78b8
testb %al, %al
je 0x79da
xorl %eax, %eax
jmp 0x7ac3
movb $0x1, %al
cmpl $0x0, 0x1024(%r12)
je 0x7ac3
cmpl $0x0, 0x280(%rbx)
jle 0x79d3
leaq 0x290(%rbx), %rbp
xorl %r15d, %r15d
leaq 0x386b(%rip), %r13      # 0xb270
movq %rbx, 0x10(%rsp)
xorl %ebx, %ebx
movl 0xc(%r14), %eax
movl 0x10(%r14), %ecx
leaq (%rax,%rax,2), %rax
shlq $0x5, %rax
addq %rbp, %rax
leaq (%rcx,%rcx,2), %rcx
movq (%rax,%rcx,8), %rax
movl 0x4(%r14), %ecx
movl 0x8(%r14), %edx
addl (%rax,%r15,8), %ecx
addl 0x4(%rax,%r15,8), %edx
addl (%r13,%rbx,8), %ecx
addl 0x4(%r13,%rbx,8), %edx
shlq $0x20, %rdx
orq %rdx, %rcx
movq %rcx, 0x8(%rsp)
leaq 0x8(%rsp), %rdi
callq 0x9b40
testb %al, %al
je 0x7a98
movq 0x8(%rsp), %rax
movslq %eax, %rcx
sarq $0x20, %rax
shlq $0x7, %rax
addq %r12, %rax
movl (%rax,%rcx,4), %eax
cmpl $0x2, %eax
setge %cl
cmpl 0x4(%rsp), %eax
setl %dl
testb %dl, %cl
jne 0x7ac1
cmpl $0x2, %eax
jl 0x7a98
cmpl 0x4(%rsp), %eax
jle 0x7a98
cmpl 0x1028(%r12), %eax
je 0x7ac1
incq %rbx
cmpq $0x4, %rbx
jne 0x7a0c
incq %r15
movq 0x10(%rsp), %rbx
movslq 0x280(%rbx), %rcx
xorl %eax, %eax
cmpq %rcx, %r15
jl 0x7a0a
jmp 0x7ac3
movb $0x1, %al
addq $0x18, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq