LLM4Binary/decompile-bench-makefile huggingface dataset:
// File: /workspace/github_c_makefile_star2_O1/shifengbin[P]bishe/main.cpp
// Function: main
int main()
{

	ConfigParser *config = ConfigParser::getConfigParser();
	if ( config == NULL )
	{
		mylog( ERROR, "Config Error!");
		return -1;
	}

	URLManager *urlm = URLManager::getURLManager();
	if ( urlm == NULL )
	{
		mylog( ERROR, "URLManager Error!");
		return -1;
	}
	
	TaskControl tasks( config->getJobNum() , download );
	URL *tUrl = NULL;


	while( 1 )
	{
		urlm->loadURL();
		if (!tasks.getCurrentRun() && !urlm->getCurrentSize() )
		{
			puts("END");
			break;
		}
		
		if ( tasks.isAllTaskDone() )
		{
			for ( int i = 0 ; i < config->getJobNum() && (tUrl = urlm->popURL()) !=NULL; i++)
			{
				tasks.addTaskToQueue( tUrl);
			}
		}

		if ( config->getDuration() != 0 )
		{
			sleep(config->getDuration());
		}
		else
		{
			sleep(2);
		}

	}
	
	
	return 0;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %rbx
subq $0x18, %rsp
callq 0x9c6a
testq %rax, %rax
je 0x88df
movq %rax, %rbx
callq 0x9834
testq %rax, %rax
je 0x88e8
movq %rax, %r14
movq %rbx, %rdi
callq 0x9c4e
leaq -0x28(%rbp), %r15
movq %r15, %rdi
movl %eax, %esi
callq 0x78454
leaq 0x26d(%rip), %rax       # 0x8aa8
movq %rax, 0x8(%r15)
movq %r14, %rdi
callq 0x9892
movq -0x28(%rbp), %rdi
callq 0x786b6
testl %eax, %eax
jne 0x8860
movq %r14, %rdi
callq 0x9886
testl %eax, %eax
je 0x88c6
movq -0x28(%rbp), %rdi
callq 0x786a6
testl %eax, %eax
je 0x889f
xorl %r15d, %r15d
movq %rbx, %rdi
callq 0x9c4e
cmpl %eax, %r15d
jge 0x889f
movq %r14, %rdi
callq 0x992a
testq %rax, %rax
je 0x889f
movq -0x28(%rbp), %rdi
movq -0x20(%rbp), %rsi
movq %rax, %rdx
callq 0x78613
incl %r15d
jmp 0x8870
movq %rbx, %rdi
callq 0x9c62
testl %eax, %eax
je 0x88b5
movq %rbx, %rdi
callq 0x9c62
jmp 0x88ba
movl $0x2, %eax
movl %eax, %edi
callq 0x81d0
jmp 0x883f
leaq 0x70757(%rip), %rdi     # 0x79024
callq 0x84a0
leaq -0x28(%rbp), %rdi
callq 0x785bb
xorl %eax, %eax
jmp 0x88fe
leaq 0x7071e(%rip), %rsi     # 0x79004
jmp 0x88ef
leaq 0x70723(%rip), %rsi     # 0x79012
movl $0x2, %edi
callq 0xa61d
movl $0xffffffff, %eax       # imm = 0xFFFFFFFF
addq $0x18, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
jmp 0x8921
jmp 0x890d
movq %rax, %rbx
leaq -0x28(%rbp), %rdi
callq 0x785bb
movq %rbx, %rdi
callq 0x8510
movq %rax, %rdi
callq 0x8929
// File: /workspace/github_c_makefile_star2_O1/shifengbin[P]bishe/bloom/./BloomFilter.cpp
// Function: Bloom::isExist(char*)
int Bloom::isExist( char *str )
{
	int ret;
	pthread_mutex_lock(&lockis);
	ret = search(str);
	pthread_mutex_unlock(&lockis);
	return ret;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r14
pushq %rbx
movq %rdi, %rbx
leaq 0x8e5c9(%rip), %r14     # 0x96f40
movq %r14, %rdi
callq 0x8440
movq %rbx, %rdi
callq 0x9b92
movl %eax, %ebx
movq %r14, %rdi
callq 0x81f0
movl %ebx, %eax
popq %rbx
popq %r14
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O1/shifengbin[P]bishe/dns/DNSCache.cpp
// Function: DNSCache::getDNSCache()
DNSCache* DNSCache::getDNSCache()
{
	if ( dnsCa == NULL )
	{
		pthread_mutex_lock(&lock);
		dnsCa = new DNSCache(); 
		pthread_mutex_unlock(&lock);
	}
	return dnsCa;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r14
pushq %rbx
cmpq $0x0, 0x8e5b7(%rip)     # 0x96f68
jne 0x89e7
leaq 0x8e5b6(%rip), %rdi     # 0x96f70
callq 0x8440
movl $0xf8, %edi
callq 0x82f0
movq %rax, %rbx
movq %rax, %rdi
callq 0xa1e4
movq %rbx, 0x8e58d(%rip)     # 0x96f68
leaq 0x8e58e(%rip), %rdi     # 0x96f70
callq 0x81f0
movq 0x8e57a(%rip), %rax     # 0x96f68
popq %rbx
popq %r14
popq %rbp
retq
movq %rax, %r14
movl $0xf8, %esi
movq %rbx, %rdi
callq 0x8300
movq %r14, %rdi
callq 0x8510
nop
// File: /workspace/github_c_makefile_star2_O1/shifengbin[P]bishe/dns/DNSCache.cpp
// Function: DNSCache::DNS(char*, char*)
struct sockaddr_in* DNSCache::DNS(  char *host , char *port)
{
	struct sockaddr_in *saddr = NULL;

	if ( host == NULL || port == NULL)
	{
		return NULL;
	}
	pthread_mutex_lock(&lock);
	if ((saddr = (struct sockaddr_in*)hl.get( host ))== NULL)
	{
		saddr = dns( host , port );
		if (saddr != NULL )
		{
			hl.set(host,saddr);
			//------debug
			puts("DNS CaCHED!");
			pthread_mutex_unlock(&lock);
			return saddr;
		}
		pthread_mutex_unlock(&lock);
		return NULL;
	}
	else
	{
		puts("Get Cache");
		pthread_mutex_unlock(&lock);
		return saddr;
	}
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
testq %rsi, %rsi
sete %al
testq %rdx, %rdx
sete %cl
orb %al, %cl
je 0x8a2b
xorl %ebx, %ebx
jmp 0x8a95
movq %rdx, %r12
movq %rsi, %r14
movq %rdi, %r15
leaq 0x8e535(%rip), %rdi     # 0x96f70
callq 0x8440
movq %r15, %rdi
movq %r14, %rsi
callq 0xa354
testq %rax, %rax
je 0x8a5c
movq %rax, %rbx
leaq 0x705da(%rip), %rdi     # 0x79034
jmp 0x8a84
movq %r14, %rdi
movq %r12, %rsi
callq 0xa104
testq %rax, %rax
je 0x8aa1
movq %rax, %rbx
movq %r15, %rdi
movq %r14, %rsi
movq %rax, %rdx
callq 0xa272
leaq 0x705a4(%rip), %rdi     # 0x79028
callq 0x84a0
leaq 0x8e4e0(%rip), %rdi     # 0x96f70
callq 0x81f0
movq %rbx, %rax
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
xorl %ebx, %ebx
jmp 0x8a89
nopl (%rax)
// File: /workspace/github_c_makefile_star2_O1/shifengbin[P]bishe/HTTP/./HTTP.cpp
// Function: isHex(char*)
int isHex( char *num)
{
	while( *num != '\r' )
	{
		if ( *num >='0' && *num <= '9' || *num >= 'a' && *num <='f' ||*num>='A' && *num <='F')
		{
			;
		}else
		{
			return 0;
		}
		num++;
	}
	if ( *(num+1) == '\n')
	{
		return 1;
	}
	return 0;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
movb (%rdi), %cl
cmpb $0xd, %cl
je 0x8d81
movabsq $0x3f0000003f, %rax     # imm = 0x3F0000003F
leal -0x30(%rcx), %edx
cmpb $0xa, %dl
jb 0x8d76
movzbl %cl, %ecx
addl $-0x41, %ecx
cmpl $0x25, %ecx
ja 0x8d8c
btq %rcx, %rax
jae 0x8d8c
movb 0x1(%rdi), %cl
incq %rdi
cmpb $0xd, %cl
jne 0x8d5d
xorl %eax, %eax
cmpb $0xa, 0x1(%rdi)
sete %al
popq %rbp
retq
xorl %eax, %eax
jmp 0x8d8a
// File: /workspace/github_c_makefile_star2_O1/shifengbin[P]bishe/HTTP/./HTTP.cpp
// Function: HTTP::~HTTP()
HTTP::~HTTP()
{
	if ( this->body != NULL )
	{
		pthread_mutex_lock(&lock);
		free( this->body );
		pthread_mutex_unlock(&lock);
	}
}

// Assembly:
cmpq $0x0, 0x8(%rdi)
je 0x8fff
pushq %rbp
movq %rsp, %rbp
pushq %r14
pushq %rbx
movq %rdi, %rbx
leaq 0x8dfb6(%rip), %r14     # 0x96f98
movq %r14, %rdi
callq 0x8440
movq 0x8(%rbx), %rdi
callq 0x8350
movq %r14, %rdi
popq %rbx
popq %r14
popq %rbp
jmp 0x81f0
retq
// File: /workspace/github_c_makefile_star2_O1/shifengbin[P]bishe/Hex2I/./Hex2I.c
// Function: hex2i
int hex2i( const char *hex )
{
	int ret = 0;
	int index = strlen( hex ) - 1;
	int temp = 0;
	int per = 1;
	int i;
	for( i = index; i>= 0; i--)
	{
		if( hex[i] >= 'a' && hex[i] <= 'f' )
		{
			temp = hex[i] - 'a' + 10;
		}
		else if ( hex[i] >= 'A' && hex[i] <= 'F' )
		{
			temp = hex[i] - 'A' + 10;
		}
		else if ( hex[i] >= '0' && hex[i] <= '9' )
		{
			temp = hex[i] - '0';	
		}
		else
		{
			ret = 0;
			per = 1;
			continue;
		}
		ret += ( per * temp );
		per*=16;
		
	}
	return ret;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %rbx
pushq %rax
movq %rdi, %rbx
callq 0x8120
decl %eax
js 0x9083
movl %eax, %ecx
incq %rcx
xorl %esi, %esi
movl $0x1, %edx
movzbl -0x1(%rbx,%rcx), %eax
leal -0x61(%rax), %edi
cmpb $0x5, %dil
ja 0x904d
addl $-0x57, %eax
jmp 0x9069
leal -0x41(%rax), %edi
cmpb $0x5, %dil
ja 0x905b
addl $-0x37, %eax
jmp 0x9069
leal -0x30(%rax), %edi
cmpb $0x9, %dil
ja 0x907a
addb $-0x30, %al
movzbl %al, %eax
imull %edx, %eax
addl %esi, %eax
shll $0x4, %edx
movl %eax, %esi
decq %rcx
jg 0x903a
jmp 0x9085
movl $0x1, %edx
xorl %eax, %eax
jmp 0x9071
xorl %eax, %eax
addq $0x8, %rsp
popq %rbx
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O1/shifengbin[P]bishe/ModelTool/ModelTool.cpp
// Function: Model::Model(char const*)
Model::Model( const char *filename )
{
	output = NULL;
	this->handle = dlopen( filename , RTLD_NOW );
	if ( this->handle == NULL )
	{
		puts(dlerror());
	}
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %rbx
pushq %rax
movq %rdi, %rbx
movq $0x0, 0x8(%rdi)
movq %rsi, %rdi
movl $0x2, %esi
callq 0x8400
movq %rax, (%rbx)
testq %rax, %rax
je 0x92ff
addq $0x8, %rsp
popq %rbx
popq %rbp
retq
callq 0x82c0
movq %rax, %rdi
addq $0x8, %rsp
popq %rbx
popq %rbp
jmp 0x84a0
// File: /workspace/github_c_makefile_star2_O1/shifengbin[P]bishe/ModelTool/ModelTool.cpp
// Function: Model::getMethod(char const*)
OUTPUTFUNC Model::getMethod( const char *funcName )
{
	output = (OUTPUTFUNC)dlsym( this->handle, funcName);
	if ( output == NULL  )
	{
		puts("getMethod Error``````````````");
	}
	return output;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %rbx
pushq %rax
movq %rdi, %rbx
movq (%rdi), %rdi
callq 0x82b0
movq %rax, 0x8(%rbx)
testq %rax, %rax
jne 0x934c
leaq 0x6fe4a(%rip), %rdi     # 0x79191
callq 0x84a0
movq 0x8(%rbx), %rax
addq $0x8, %rsp
popq %rbx
popq %rbp
retq
nop
// File: /workspace/github_c_makefile_star2_O1/shifengbin[P]bishe/Persistence/Persistence.cpp
// Function: Persistence::Persistence(char const*)
Persistence::Persistence( const char *dbfile )
{
	int ret;	
	unlink(dbfile);//remove old dbfile

//	this->lock = PTHREAD_MUTEX_INITIALIZER; 
	pthread_mutex_init( &(this->lock) , NULL );
	ret = sqlite3_open( dbfile , &(this->db) );
	if ( ret != SQLITE_OK )
	{
		mylog( ERROR , "create database error");
		exit(-1);
	}
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r14
pushq %rbx
movq %rsi, %rbx
movq %rdi, %r14
movq %rsi, %rdi
callq 0x8140
movq %r14, %rdi
xorl %esi, %esi
callq 0x8470
addq $0x28, %r14
movq %rbx, %rdi
movq %r14, %rsi
callq 0x1a10f
testl %eax, %eax
jne 0x93bb
popq %rbx
popq %r14
popq %rbp
retq
leaq 0x6fdf4(%rip), %rsi     # 0x791b6
movl $0x2, %edi
callq 0xa61d
movl $0xffffffff, %edi       # imm = 0xFFFFFFFF
callq 0x8370
// File: /workspace/github_c_makefile_star2_O1/shifengbin[P]bishe/Persistence/Persistence.cpp
// Function: Persistence::~Persistence()
Persistence::~Persistence()
{
	if (this->err != NULL )
		sqlite3_free( this->err );

	sqlite3_close( this->db );

	delete pdb;
	
	pthread_mutex_destroy(&(this->lock));
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r14
pushq %rbx
movq %rdi, %rbx
movq 0x30(%rdi), %rdi
testq %rdi, %rdi
je 0x9446
callq 0xc3e1
movq 0x28(%rbx), %rdi
callq 0x18dd5
movq 0x8db72(%rip), %r14     # 0x96fc8
testq %r14, %r14
je 0x9470
movq %r14, %rdi
callq 0x942e
movl $0x38, %esi
movq %r14, %rdi
callq 0x8300
movq %rbx, %rdi
popq %rbx
popq %r14
popq %rbp
jmp 0x8330
movq %rax, %rdi
callq 0x8929
// File: /workspace/github_c_makefile_star2_O1/shifengbin[P]bishe/Persistence/Persistence.cpp
// Function: Persistence::exec(char const*)
int Persistence::exec( const char *sql )// insert update delete create table etc without select 
{
	int ret = 0;	
	pthread_mutex_lock(&(this->lock));

	if (this->err != NULL )
		sqlite3_free( this->err );
	ret = sqlite3_exec(this->db,sql,0,0,&(this->err));
	if (ret != SQLITE_OK )
	{
		mylog(ERROR,sql);
		mylog(ERROR,this->err);
	}
	pthread_mutex_unlock(&(this->lock));
	return ret;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
movq %rsi, %r14
movq %rdi, %rbx
callq 0x8440
leaq 0x30(%rbx), %r15
movq 0x30(%rbx), %rdi
testq %rdi, %rdi
je 0x94ac
callq 0xc3e1
movq 0x28(%rbx), %rdi
movq %r14, %rsi
xorl %edx, %edx
xorl %ecx, %ecx
movq %r15, %r8
callq 0x15cb6
movl %eax, %r12d
testl %eax, %eax
je 0x94e0
movl $0x2, %edi
movq %r14, %rsi
callq 0xa61d
movq (%r15), %rsi
movl $0x2, %edi
callq 0xa61d
movq %rbx, %rdi
callq 0x81f0
movl %r12d, %eax
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O1/shifengbin[P]bishe/Persistence/Persistence.cpp
// Function: Persistence::query(char const*, int (*)(void*, int, char**, char**), void*)
int Persistence::query( const char *sql , callback fun, void *data)//all select insert update delete
{
	int ret = 0;	
	pthread_mutex_lock(&(this->lock));

	if (this->err != NULL )
		sqlite3_free( this->err );
	ret = sqlite3_exec(this->db,sql,fun,data,&(this->err));
	if (ret != SQLITE_OK )
	{
		mylog(ERROR,sql);
		mylog(ERROR,this->err);
	}
	pthread_mutex_unlock(&(this->lock));
	return ret;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movq %rcx, %r12
movq %rdx, %r13
movq %rsi, %r14
movq %rdi, %rbx
callq 0x8440
leaq 0x30(%rbx), %r15
movq 0x30(%rbx), %rdi
testq %rdi, %rdi
je 0x9525
callq 0xc3e1
movq 0x28(%rbx), %rdi
movq %r14, %rsi
movq %r13, %rdx
movq %r12, %rcx
movq %r15, %r8
callq 0x15cb6
movl %eax, %r12d
testl %eax, %eax
je 0x955b
movl $0x2, %edi
movq %r14, %rsi
callq 0xa61d
movq (%r15), %rsi
movl $0x2, %edi
callq 0xa61d
movq %rbx, %rdi
callq 0x81f0
movl %r12d, %eax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
nop
// File: /workspace/github_c_makefile_star2_O1/shifengbin[P]bishe/SockTool/SockTool.cpp
// Function: SockTool::Socket()
int SockTool::Socket()
{
	int fd;
	pthread_mutex_lock(&socklock);
	fd = socket( AF_INET , SOCK_STREAM , 0 );
	pthread_mutex_unlock(&socklock);
	return fd;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r14
pushq %rbx
leaq 0x8da6a(%rip), %rbx     # 0x96ff8
movq %rbx, %rdi
callq 0x8440
movl $0x2, %edi
movl $0x1, %esi
xorl %edx, %edx
callq 0x80a0
movl %eax, %r14d
movq %rbx, %rdi
callq 0x81f0
movl %r14d, %eax
popq %rbx
popq %r14
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O1/shifengbin[P]bishe/SockTool/SockTool.cpp
// Function: SockTool::Close(int)
int SockTool::Close( int fd )
{
	pthread_mutex_lock(&sockclose);
	close(fd);
	pthread_mutex_unlock(&sockclose);
	return 1;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r14
pushq %rbx
movl %edi, %ebx
leaq 0x8da56(%rip), %r14     # 0x97020
movq %r14, %rdi
callq 0x8440
movl %ebx, %edi
callq 0x8550
movq %r14, %rdi
callq 0x81f0
movl $0x1, %eax
popq %rbx
popq %r14
popq %rbp
retq
nop
// File: /workspace/github_c_makefile_star2_O1/shifengbin[P]bishe/URLManager/URLManager.cpp
// Function: load(void*, int, char**, char**)
int load( void *um , int count, char **vals ,char **colname)
{
	int i;
	Queue<URL>* que = (Queue<URL>*)um;
	if ( que == NULL )
	{
		return -1;
	}
	if (count <= 0)
	{
		return 0;
	}

	URL *temp = new URL;
	if ( temp == NULL )
	{
		return -1;
	}

	for( i = 0; i < count; i++)
	{
		if ( !strcasecmp( ID ,colname[i]) )
		{
			temp->setId(atoi(vals[i]));
		} 
		else if ( !strcasecmp( URLSTR , colname[i]) )
		{
			temp->setURLStr( vals[i] );
		}
		else if ( !strcasecmp( TYPE , colname[i]) )
		{
			temp->setType( atoi( vals[i] ) );	
		}
		else if ( !strcasecmp( DEEP , colname[i]) )
		{
			temp->setDeep( atoi( vals[i] ) );
		}
		else if ( !strcasecmp( STATE , colname[i] ) )
		{
			temp->setState( atoi( vals[i] ) );
		}
//		printf("%s=%s\n",colname[i],vals[i]);
	}
//	printf("ADD %s:%d\n",temp->getURLStr(),temp->getDeep());
	que->push( temp );
	return 0;	
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x18, %rsp
movq %rdx, -0x30(%rbp)
testq %rdi, %rdi
je 0x9773
movl %esi, %r14d
testl %esi, %esi
jle 0x976f
movq %rcx, %rbx
movq %rdi, -0x38(%rbp)
movl $0x20, %edi
callq 0x82f0
movq %rax, %r12
xorl %r13d, %r13d
movl %r13d, (%rax)
xorps %xmm0, %xmm0
movups %xmm0, 0x8(%rax)
movl %r13d, 0x18(%rax)
movl %r14d, %r15d
movq (%rbx,%r13,8), %r14
leaq 0x77973(%rip), %rdi     # 0x81013
movq %r14, %rsi
callq 0x8320
testl %eax, %eax
je 0x970c
leaq 0x6fb23(%rip), %rdi     # 0x791d6
movq %r14, %rsi
callq 0x8320
testl %eax, %eax
je 0x971f
leaq 0x6fb17(%rip), %rdi     # 0x791dd
movq %r14, %rsi
callq 0x8320
testl %eax, %eax
je 0x9731
leaq 0x6fb09(%rip), %rdi     # 0x791e2
movq %r14, %rsi
callq 0x8320
testl %eax, %eax
je 0x9745
leaq 0x6fafb(%rip), %rdi     # 0x791e7
movq %r14, %rsi
callq 0x8320
testl %eax, %eax
jne 0x9757
movq -0x30(%rbp), %rax
movq (%rax,%r13,8), %rdi
callq 0x84b0
movl %eax, 0x18(%r12)
jmp 0x9757
movq -0x30(%rbp), %rax
movq (%rax,%r13,8), %rdi
callq 0x84b0
movl %eax, (%r12)
jmp 0x9757
movq -0x30(%rbp), %rax
movq (%rax,%r13,8), %rsi
movq %r12, %rdi
callq 0x9258
jmp 0x9757
movq -0x30(%rbp), %rax
movq (%rax,%r13,8), %rdi
callq 0x84b0
movl %eax, 0x10(%r12)
jmp 0x9757
movq -0x30(%rbp), %rax
movq (%rax,%r13,8), %rdi
callq 0x84b0
movl %eax, 0x14(%r12)
incq %r13
cmpq %r13, %r15
jne 0x9695
movq -0x38(%rbp), %rdi
movq %r12, %rsi
callq 0x9938
xorl %eax, %eax
jmp 0x9778
movl $0xffffffff, %eax       # imm = 0xFFFFFFFF
addq $0x18, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
nop
// File: /workspace/github_c_makefile_star2_O1/shifengbin[P]bishe/URLManager/URLManager.cpp
// Function: URLManager::loadURL()
int URLManager::loadURL()
{
	int length = urlQue->getCount();
	int loadcount;
	Persistence *db;
	char sql[512] = { 0 };

	if ( length < URLLESSIZE )
	{
		//here need load url
		loadcount = URLMAXSIZE - length;
		db = Persistence::getPersistence();
		
		if ( db == NULL )
		{
			return -1;
		}
		sprintf(sql,"select * from url where state=0 order by id desc limit %d",loadcount);
		db->query(sql,load,this->urlQue);
	}
		//nothing
	return 0;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
subq $0x200, %rsp            # imm = 0x200
movq %rdi, %rbx
movq (%rdi), %rax
movl 0x14(%rax), %r12d
leaq -0x220(%rbp), %rdi
xorl %r14d, %r14d
movl $0x200, %edx            # imm = 0x200
xorl %esi, %esi
callq 0x8160
cmpl $0x1, %r12d
jg 0x9917
callq 0x93d6
testq %rax, %rax
je 0x9911
movq %rax, %r15
movl $0xa, %edx
subl %r12d, %edx
leaq 0x6f907(%rip), %rsi     # 0x791ed
xorl %r14d, %r14d
leaq -0x220(%rbp), %r12
movq %r12, %rdi
xorl %eax, %eax
callq 0x8080
movq (%rbx), %rcx
leaq -0x2c0(%rip), %rdx      # 0x9644
movq %r15, %rdi
movq %r12, %rsi
callq 0x94f4
jmp 0x9917
movl $0xffffffff, %r14d      # imm = 0xFFFFFFFF
movl %r14d, %eax
addq $0x200, %rsp            # imm = 0x200
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O1/shifengbin[P]bishe/URLManager/./../Queue/Queue.h
// Function: Queue<URL>::pop()
T*  Queue<T>::pop()
{
    if ( head == NULL || length <= 0)
    {
	tail = head = NULL;
        return NULL;
    }
    pthread_mutex_lock(&lock);
    T *temp = head->node;
    Node<T> *del = head;
    head = head->next;
    delete del;
    length--;
    pthread_mutex_unlock(&lock);
    return temp;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %rbx
pushq %rax
movq %rdi, %rbx
cmpq $0x0, (%rdi)
je 0x9997
cmpl $0x0, 0x14(%rbx)
jle 0x9997
leaq 0x18(%rbx), %r15
movq %r15, %rdi
callq 0x8440
movq (%rbx), %rdi
movq (%rdi), %r14
movq 0x8(%rdi), %rax
movq %rax, (%rbx)
movl $0x10, %esi
callq 0x8300
decl 0x14(%rbx)
movq %r15, %rdi
callq 0x81f0
jmp 0x99a0
xorps %xmm0, %xmm0
movups %xmm0, (%rbx)
xorl %r14d, %r14d
movq %r14, %rax
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O1/shifengbin[P]bishe/URLManager/./../Queue/Queue.h
// Function: Queue<URL>::pushTail(URL*)
int Queue<T>::pushTail( T *node )
{
    Node<T> *temp = NULL;
    if ( node  == NULL)
    {
        return -1;
    }
    pthread_mutex_lock(&lock);
    temp = new Node<T>;
    temp->node = node;
    temp->next = NULL;
    if ( tail == NULL && head == NULL )
    {
        tail = temp;
        head = temp;
    }
    else if ( tail != NULL )
    {
        tail->next = temp;
        tail = temp;
    }
    length++;
    pthread_mutex_unlock(&lock);
}

// Assembly:
testq %rsi, %rsi
jne 0x99b9
movl $0xffffffff, %eax       # imm = 0xFFFFFFFF
retq
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %rbx
pushq %rax
movq %rsi, %r15
movq %rdi, %rbx
leaq 0x18(%rdi), %r14
movq %r14, %rdi
callq 0x8440
movl $0x10, %edi
callq 0x82f0
movq %r15, (%rax)
movq $0x0, 0x8(%rax)
leaq 0x8(%rbx), %rcx
movq 0x8(%rbx), %rdx
movq (%rbx), %rsi
orq %rdx, %rsi
jne 0x9a02
movq %rcx, %rdx
movq %rbx, %rcx
jmp 0x9a0b
testq %rdx, %rdx
je 0x9a11
addq $0x8, %rdx
movq %rax, (%rdx)
movq %rax, (%rcx)
incl 0x14(%rbx)
movq %r14, %rdi
callq 0x81f0
// File: /workspace/github_c_makefile_star2_O1/shifengbin[P]bishe/parserurl/./URLParser.cpp
// Function: URLParser::getHost(char*)
char *URLParser::getHost( char *url )
{
	char *temp = NULL;
	pthread_mutex_lock( &lock );
	temp = gethost(url);	
	pthread_mutex_unlock( &lock );
	return temp;
	
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r14
pushq %rbx
movq %rdi, %rbx
leaq 0x8d60f(%rip), %r14     # 0x97050
movq %r14, %rdi
callq 0x8440
movq %rbx, %rdi
callq 0xa72b
movq %rax, %rbx
movq %r14, %rdi
callq 0x81f0
movq %rbx, %rax
popq %rbx
popq %r14
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O1/shifengbin[P]bishe/parserurl/./URLParser.cpp
// Function: URLParser::getPort(char*)
char *URLParser::getPort( char *url )
{
	char *temp = NULL;
        pthread_mutex_lock( &lock );
        temp = getport(url);
        pthread_mutex_unlock( &lock );
        return temp;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r14
pushq %rbx
movq %rdi, %rbx
leaq 0x8d5db(%rip), %r14     # 0x97050
movq %r14, %rdi
callq 0x8440
movq %rbx, %rdi
callq 0xa7fc
movq %rax, %rbx
movq %r14, %rdi
callq 0x81f0
movq %rbx, %rax
popq %rbx
popq %r14
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O1/shifengbin[P]bishe/parserurl/./URLParser.cpp
// Function: URLParser::getRes(char*)
char *URLParser::getRes( char *url )
{
	char *temp = NULL;
        pthread_mutex_lock( &lock );
        temp = getres(url);
        pthread_mutex_unlock( &lock );
        return temp;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r14
pushq %rbx
movq %rdi, %rbx
leaq 0x8d5a7(%rip), %r14     # 0x97050
movq %r14, %rdi
callq 0x8440
movq %rbx, %rdi
callq 0xa923
movq %rax, %rbx
movq %r14, %rdi
callq 0x81f0
movq %rbx, %rax
popq %rbx
popq %r14
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O1/shifengbin[P]bishe/parserurl/./URLParser.cpp
// Function: URLParser::deleteMemery(void*)
void URLParser::deleteMemery( void *del)
{
	pthread_mutex_lock(&lockd);
	if ( del != NULL )
	{
		free(del);
	}
	pthread_mutex_unlock(&lockd);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %rbx
pushq %rax
movq %rdi, %rbx
leaq 0x8d59c(%rip), %rdi     # 0x97078
callq 0x8440
testq %rbx, %rbx
je 0x9aee
movq %rbx, %rdi
callq 0x8350
leaq 0x8d583(%rip), %rdi     # 0x97078
addq $0x8, %rsp
popq %rbx
popq %rbp
jmp 0x81f0
// File: /workspace/github_c_makefile_star2_O1/shifengbin[P]bishe/bloom/bloom.c
// Function: add
void add( char *str )
{
	int i = 0;
	unsigned h = 0;
	for( i = 0; i< 8; i++)
	{
		h = hash( str , seeds[i]);
		bloom[h/sizeof(int)] |= 1<<(h%sizeof(int));
	}
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r14
pushq %rbx
leaq 0x1(%rdi), %rax
xorl %edx, %edx
leaq 0x6f71c(%rip), %rsi     # 0x79230
leaq 0x8d585(%rip), %r8      # 0x970a0
movl $0xd1b71759, %r9d       # imm = 0xD1B71759
movl $0x0, %r10d
testq %rdi, %rdi
je 0x9b6d
movb (%rdi), %cl
movl $0x0, %r10d
testb %cl, %cl
je 0x9b6d
movl (%rsi,%rdx,4), %r11d
xorl %r10d, %r10d
movq %rax, %rbx
movl %r10d, %r14d
imull %r11d, %r14d
movsbl %cl, %r10d
addl %r14d, %r10d
movb (%rbx), %cl
incq %rbx
testb %cl, %cl
jne 0x9b42
movl %r10d, %ecx
imulq %r9, %rcx
shrq $0x2f, %rcx
imull $0x9c40, %ecx, %ecx     # imm = 0x9C40
subl %ecx, %r10d
movl %r10d, %ecx
andb $0x3, %cl
movl $0x1, %r11d
shll %cl, %r11d
andl $-0x4, %r10d
orl %r11d, (%r10,%r8)
incq %rdx
cmpq $0x8, %rdx
jne 0x9b21
popq %rbx
popq %r14
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O1/shifengbin[P]bishe/bloom/bloom.c
// Function: search
int search( char *str)
{
	int  i = 0;
	unsigned int h = 0;
	for( i = 0; i< 8; i++)
	{
		h = hash( str, seeds[i]);
		if ( (bloom[h/sizeof(int)] & 1<<(h%sizeof(int))) == 0)
			return 0;

	}
	return 1;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r14
pushq %rbx
leaq 0x1(%rdi), %rax
xorl %ecx, %ecx
leaq 0x6f68a(%rip), %rdx     # 0x79230
leaq 0x8d4f3(%rip), %rsi     # 0x970a0
movl $0xd1b71759, %r8d       # imm = 0xD1B71759
movl $0x0, %r9d
testq %rdi, %rdi
je 0x9bfe
movb (%rdi), %r10b
testb %r10b, %r10b
je 0x9bfe
movl (%rdx,%rcx,4), %r11d
xorl %r9d, %r9d
movq %rax, %rbx
movl %r9d, %r14d
imull %r11d, %r14d
movsbl %r10b, %r9d
addl %r14d, %r9d
movb (%rbx), %r10b
incq %rbx
testb %r10b, %r10b
jne 0x9bd0
movl %r9d, %r10d
imulq %r8, %r10
shrq $0x2f, %r10
imull $0x9c40, %r10d, %r10d   # imm = 0x9C40
subl %r10d, %r9d
movl %r9d, %r10d
andl $-0x4, %r10d
movl (%r10,%rsi), %r10d
andl $0x3, %r9d
btl %r9d, %r10d
jae 0x9c23
incq %rcx
cmpq $0x8, %rcx
jne 0x9bb3
movl $0x1, %eax
jmp 0x9c25
xorl %eax, %eax
popq %rbx
popq %r14
popq %rbp
retq
nop
// File: /workspace/github_c_makefile_star2_O1/shifengbin[P]bishe/ConfigParser/configparser.cpp
// Function: ConfigParser::~ConfigParser()
ConfigParser::~ConfigParser()
{
    for( int  i = 0; i < MODESIZE ; i++ )
    {
        if (this->modes[i] != NULL)
        {
            delete this->modes[i];
        }
    }
    delete ConfigParser::config;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %rbx
pushq %rax
movq %rdi, %rbx
movl $0x3, %r15d
movq (%rbx,%r15,8), %r14
testq %r14, %r14
je 0x9d17
movq %r14, %rdi
callq 0xa4fa
movl $0x10, %esi
movq %r14, %rdi
callq 0x8300
incq %r15
cmpq $0x17, %r15
jne 0x9cf9
movq 0x96fc1(%rip), %rbx     # 0xa0ce8
testq %rbx, %rbx
je 0x9d4b
movq %rbx, %rdi
callq 0x9ce6
movl $0xb8, %esi
movq %rbx, %rdi
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
jmp 0x8300
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O1/shifengbin[P]bishe/dns/dns.c
// Function: dns
struct sockaddr_in *dns( char *hostname ,char *port)
{
	struct addrinfo *ai=NULL;
	struct addrinfo i;
	struct sockaddr_in *p = NULL;
	int ret;
	if (hostname == NULL|| port == NULL)
	{
		return NULL;
	}
	memset(&i,0 ,sizeof(struct addrinfo));
	i.ai_family = AF_INET;
//	i.ai_flags = AI_PASSIVE;
	i.ai_socktype = SOCK_STREAM;
	ret = getaddrinfo(hostname,port,&i,&ai);
	if (ret != 0 && ai == NULL)
	{
		puts(gai_strerror(ret));
		return NULL;
	}
	p = (struct sockaddr_in*)malloc(sizeof(struct sockaddr_in));
	if (p==NULL)
	{
		freeaddrinfo(ai);
		return NULL;
	}
	memset(p, 0 , sizeof(struct sockaddr_in));
	memcpy(p,ai->ai_addr,sizeof(struct sockaddr_in));
/*	p->sin_family = AF_INET;
	p->sin_port = htons(atoi(port));
	memcpy( &(p->sin_addr) ,&(ai->ai_addr->sin_addr) , sizeof(struct in_addr) );
*/	
	freeaddrinfo(ai);
	return p;
	
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r14
pushq %rbx
subq $0x40, %rsp
movq $0x0, -0x18(%rbp)
testq %rdi, %rdi
sete %al
testq %rsi, %rsi
sete %cl
orb %al, %cl
jne 0xa1ab
xorps %xmm0, %xmm0
leaq -0x50(%rbp), %rdx
movaps %xmm0, (%rdx)
movaps %xmm0, 0x20(%rdx)
movaps %xmm0, 0x10(%rdx)
movabsq $0x100000002, %rax      # imm = 0x100000002
movq %rax, 0x4(%rdx)
leaq -0x18(%rbp), %rbx
movq %rbx, %rcx
callq 0x83a0
testl %eax, %eax
setne %cl
movq (%rbx), %r14
testq %r14, %r14
sete %dl
andb %cl, %dl
cmpb $0x1, %dl
jne 0xa17d
movl %eax, %edi
callq 0x83f0
movq %rax, %rdi
callq 0x84a0
jmp 0xa1ab
movl $0x10, %edi
callq 0x83e0
testq %rax, %rax
je 0xa1a3
movq %rax, %rbx
movq 0x18(%r14), %rax
movups (%rax), %xmm0
movups %xmm0, (%rbx)
movq %r14, %rdi
callq 0x83d0
jmp 0xa1ad
movq %r14, %rdi
callq 0x83d0
xorl %ebx, %ebx
movq %rbx, %rax
addq $0x40, %rsp
popq %rbx
popq %r14
popq %rbp
retq
nopl (%rax)
// File: /workspace/github_c_makefile_star2_O1/shifengbin[P]bishe/HashList/hash.c
// Function: hash
unsigned int hash( const char *str , int len)
{

	unsigned int ret = 0;
	unsigned int seed = 131;
	
	int i;
	for ( i = 0 ; i < len ; i++)
	{
		ret = ret * seed + str[i];
	}
	return ret;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
testl %esi, %esi
jle 0xa1e0
movl %esi, %ecx
xorl %edx, %edx
xorl %eax, %eax
imull $0x83, %eax, %esi
movsbl (%rdi,%rdx), %eax
addl %esi, %eax
incq %rdx
cmpq %rdx, %rcx
jne 0xa1ca
jmp 0xa1e2
xorl %eax, %eax
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O1/shifengbin[P]bishe/HashList/hashlist.c
// Function: destroyHashList
int   destroyHashList( HashList *list)
{
    int i = 0;
    HashNode *temp;
    if ( list == NULL )
    {
        return -1;
    }

    for( i = 0; i < LISTLENGTH ; i++ )
    {
        while( list->list[i].next != NULL )
        {
            temp = list->list[i].next;
            list->list[i].next = list->list[i].next->next;
            if (temp != NULL )
                free(temp);
        }
    }
    list->length = 0;
    return 0;
}

// Assembly:
testq %rdi, %rdi
je 0xa26c
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %rbx
pushq %rax
movq %rdi, %rbx
xorl %r14d, %r14d
leaq (%r14,%r14,2), %rax
movq 0x10(%rbx,%rax,8), %rdi
testq %rdi, %rdi
je 0xa24c
leaq (%rbx,%rax,8), %r15
addq $0x10, %r15
movq 0x10(%rdi), %rax
movq %rax, (%r15)
callq 0x8350
movq (%r15), %rdi
testq %rdi, %rdi
jne 0xa238
incq %r14
cmpq $0xa, %r14
jne 0xa222
movl $0x0, 0xf0(%rbx)
xorl %eax, %eax
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
movl $0xffffffff, %eax       # imm = 0xFFFFFFFF
retq
// File: /workspace/github_c_makefile_star2_O1/shifengbin[P]bishe/HashList/hashlist.c
// Function: addElement
int   addElement( HashList *list, const char *key , void *value )
{
    int pos = 0;
    HashNode *temp = NULL;
    void *data = NULL;
    char *tkey = NULL;

    if ( list == NULL || key == NULL || value == NULL )
    {
        return -1;
    }

    data = getElement( list , key );
    if (data != NULL )
    {
        return -1;
    }

    pos = hash( key ,strlen(key)) % LISTLENGTH;

    temp = (HashNode*)malloc( sizeof( HashNode ) + strlen( key )+ 1 );

    if ( temp == NULL )
    {
        return -1;
    }
    tkey = (char *)(temp + 1);
    sprintf(tkey , "%s", key);
    temp->node = value;
    temp->key = tkey;
    temp->next = list->list[pos].next;
    list->list[pos].next = temp;
    list->length++;

    return 0;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
testq %rdi, %rdi
sete %al
testq %rsi, %rsi
sete %cl
orb %al, %cl
testq %rdx, %rdx
sete %al
orb %cl, %al
movl $0xffffffff, %r12d      # imm = 0xFFFFFFFF
jne 0xa342
movq %rdx, %r14
movq %rsi, %r15
movq %rdi, %rbx
callq 0xa354
testq %rax, %rax
jne 0xa342
movq %r15, %rdi
callq 0x8120
movq %r15, %rdi
movl %eax, %esi
callq 0xa1bc
movq %rax, -0x30(%rbp)
movq %r15, %rdi
callq 0x8120
leaq 0x19(%rax), %rdi
callq 0x83e0
testq %rax, %rax
je 0xa342
movq %rax, %r13
movq -0x30(%rbp), %rcx
movl %ecx, %eax
movq %rcx, %rdx
movl $0xcccccccd, %ecx       # imm = 0xCCCCCCCD
imulq %rax, %rcx
shrq $0x23, %rcx
addl %ecx, %ecx
leal (%rcx,%rcx,4), %eax
subl %eax, %edx
movq %rdx, -0x30(%rbp)
movq %r13, %r12
addq $0x18, %r12
movq %r12, %rdi
movq %r15, %rsi
callq 0x82a0
movq %r14, (%r13)
movq %r12, 0x8(%r13)
movq -0x30(%rbp), %rax
leaq (%rax,%rax,2), %rax
movq 0x10(%rbx,%rax,8), %rcx
movq %rcx, 0x10(%r13)
movq %r13, 0x10(%rbx,%rax,8)
incl 0xf0(%rbx)
xorl %r12d, %r12d
movl %r12d, %eax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O1/shifengbin[P]bishe/HashList/hashlist.c
// Function: getElement
void* getElement( HashList *list, const char *key)
{
    int pos = 0;
    HashNode *temp = NULL;

    if ( list == NULL || key == NULL )
    {
        return NULL;
    }

    pos = hash( key , strlen( key )) % LISTLENGTH;
    temp = list->list[pos].next;
    while( temp != NULL )
    {
        if ( !strcmp ( temp->key , key ))
        {
            return temp->node;
        }
        temp = temp->next;
    }

    return NULL;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %rbx
pushq %rax
testq %rdi, %rdi
sete %al
testq %rsi, %rsi
sete %cl
orb %al, %cl
jne 0xa3c8
movq %rsi, %rbx
movq %rdi, %r14
movq %rsi, %rdi
callq 0x8120
movq %rbx, %rdi
movl %eax, %esi
callq 0xa1bc
movl %eax, %ecx
movl $0xcccccccd, %edx       # imm = 0xCCCCCCCD
imulq %rcx, %rdx
shrq $0x23, %rdx
addl %edx, %edx
leal (%rdx,%rdx,4), %ecx
subl %ecx, %eax
leaq (%rax,%rax,2), %rax
movq 0x10(%r14,%rax,8), %r15
testq %r15, %r15
je 0xa3c8
xorl %r14d, %r14d
movq 0x8(%r15), %rdi
movq %rbx, %rsi
callq 0x8410
testl %eax, %eax
je 0xa3d9
movq 0x10(%r15), %r15
testq %r15, %r15
jne 0xa3ad
jmp 0xa3cb
xorl %r14d, %r14d
movq %r14, %rax
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
movq (%r15), %r14
jmp 0xa3cb
// File: /workspace/github_c_makefile_star2_O1/shifengbin[P]bishe/HashList/hashlist.c
// Function: delElement
void* delElement( HashList *list, const char *key)
{
    int pos = 0;
    HashNode *temp = NULL;
    HashNode *pre = NULL;
    HashNode *del = NULL;
    void *data = NULL;
    if ( list == NULL || key == NULL )
    {
        return NULL;
    }

    pos = hash( key , strlen( key )) % LISTLENGTH;
    pre = &(list->list[pos]);
    temp = list->list[pos].next;
    while( temp != NULL )
    {
        if ( !strcmp ( temp->key , key ))
        {
            del = temp;
            data = temp->node;
            pre->next = del->next;
            free( del );
            list->length--;
            return data;
        }
        pre = temp;
        temp = temp->next;
    }
    return NULL;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
testq %rdi, %rdi
sete %al
testq %rsi, %rsi
sete %cl
orb %al, %cl
je 0xa401
xorl %r15d, %r15d
jmp 0xa473
movq %rsi, %r14
movq %rdi, %rbx
movq %rsi, %rdi
callq 0x8120
movq %r14, %rdi
movl %eax, %esi
callq 0xa1bc
movl %eax, %ecx
movl $0xcccccccd, %edx       # imm = 0xCCCCCCCD
imulq %rcx, %rdx
shrq $0x23, %rdx
addl %edx, %edx
leal (%rdx,%rdx,4), %ecx
subl %ecx, %eax
leaq (%rax,%rax,2), %rax
leaq (%rbx,%rax,8), %r12
xorl %r15d, %r15d
movq %r12, %r13
movq 0x10(%r12), %r12
testq %r12, %r12
je 0xa473
movq 0x8(%r12), %rdi
movq %r14, %rsi
callq 0x8410
testl %eax, %eax
jne 0xa43a
movq (%r12), %r15
movq 0x10(%r12), %rax
movq %rax, 0x10(%r13)
movq %r12, %rdi
callq 0x8350
decl 0xf0(%rbx)
movq %r15, %rax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O1/shifengbin[P]bishe/ConfigParser/modepair.cpp
// Function: ModePair::ModePair(char*, int)
ModePair::ModePair(char *mode, int type)
{
    if (mode == NULL)   return;

    int len = strlen(mode);
    this->mode = new char[len+1];
    sprintf(this->mode,"%s",mode);
    this->type = type;

}

// Assembly:
testq %rsi, %rsi
je 0xa4e5
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %rbx
pushq %rax
movl %edx, %ebx
movq %rsi, %r15
movq %rdi, %r14
movq %rsi, %rdi
callq 0x8120
incl %eax
movslq %eax, %rdi
callq 0x8040
movq %rax, (%r14)
movq %rax, %rdi
movq %r15, %rsi
callq 0x82a0
movl %ebx, 0x8(%r14)
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O1/shifengbin[P]bishe/log/mylog.c
// Function: writelog
int writelog( int fd , int filter,int level, const char *str)
{
	char buf[512] = { 0 };
	struct tm *ti;
	char a[][11]={	"[DEBUG]   ",
			"[WARNING] ",
			"[ERROR]   "};
	if ( level > ERROR || filter > ERROR || level < DEBUG || filter < DEBUG)
		return-1;
	if ( level < filter)
		return 0;
	time_t t;
	time(&t);
	ti = localtime(&t);
	
	sprintf(buf,"%s %4d/%02d/%02d %02d:%02d:%02d :%s\n", a[level],
					ti->tm_year+1900,
					ti->tm_mon+1 ,
					ti->tm_mday,
					ti->tm_hour,
					ti->tm_min,
					ti->tm_sec,
					str);
	write(fd , buf ,strlen(buf));
	
	return 0;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x238, %rsp            # imm = 0x238
movq %rcx, %r14
movl %edx, %r15d
movl %esi, %r13d
movl %edi, %ebx
leaq -0x260(%rbp), %rdi
movl $0x200, %edx            # imm = 0x200
xorl %esi, %esi
callq 0x8160
movaps 0x6edf7(%rip), %xmm0    # 0x79340
movaps %xmm0, -0x50(%rbp)
movaps 0x6eddc(%rip), %xmm0    # 0x79330
movaps %xmm0, -0x60(%rbp)
movb $0x0, -0x40(%rbp)
cmpl $0x3, %r15d
setae %al
cmpl $0x3, %r13d
setae %cl
orb %al, %cl
movl $0xffffffff, %r12d      # imm = 0xFFFFFFFF
jne 0xa608
movl $0x0, %r12d
cmpl %r13d, %r15d
jl 0xa608
leaq -0x30(%rbp), %r12
movq %r12, %rdi
callq 0x8290
movq %r12, %rdi
callq 0x81c0
movl %r15d, %ecx
leaq (%rcx,%rcx,4), %rdx
leaq (%rcx,%rdx,2), %rcx
leaq (%rcx,%rbp), %rdx
addq $-0x60, %rdx
movl $0x76c, %ecx            # imm = 0x76C
addl 0x14(%rax), %ecx
movl 0x10(%rax), %r8d
incl %r8d
movl 0xc(%rax), %r9d
movl 0x8(%rax), %r10d
movl (%rax), %r11d
movl 0x4(%rax), %r13d
leaq 0x6ed7e(%rip), %rsi     # 0x79351
xorl %r12d, %r12d
leaq -0x260(%rbp), %r15
movq %r15, %rdi
xorl %eax, %eax
pushq %r14
pushq %r11
pushq %r13
pushq %r10
callq 0x8080
addq $0x20, %rsp
movq %r15, %rdi
callq 0x8120
movl %ebx, %edi
movq %r15, %rsi
movq %rax, %rdx
callq 0x80f0
movl %r12d, %eax
addq $0x238, %rsp            # imm = 0x238
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O1/shifengbin[P]bishe/log/mylog.c
// Function: mylog
void mylog( int level , const char *str)
{
	int fd = open( "spider.log" , O_CREAT|O_RDWR|O_APPEND,0666);
	if ( fd != -1)
	{
		writelog(fd , ERROR , level , str);
		close( fd );	
	}
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %rbx
pushq %rax
movq %rsi, %rbx
movl %edi, %r14d
leaq 0x6ed42(%rip), %rdi     # 0x79376
movl $0x442, %esi            # imm = 0x442
movl $0x1b6, %edx            # imm = 0x1B6
xorl %eax, %eax
callq 0x81b0
cmpl $-0x1, %eax
je 0xa671
movl %eax, %r15d
movl %eax, %edi
movl $0x2, %esi
movl %r14d, %edx
movq %rbx, %rcx
callq 0xa510
movl %r15d, %edi
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
jmp 0x8550
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O1/shifengbin[P]bishe/parserurl/parserurl.c
// Function: removehttp
char *removehttp(char *url)
{
	char *u = url;
	char *ru;
	int len = 0;

	if (url == NULL)
		return NULL;


	if ( (u = strstr(url , "//")) != NULL)
	{
		ru = (char*)malloc(strlen(u+1));
		if ( ru== NULL)
			return NULL;
		memset( ru , 0 , strlen(u+1));
		memcpy( ru , u+2 , strlen(u+2));
	}
	else
	{
		ru = (char*)malloc(strlen(url)+1);
		memset( ru , 0 ,strlen(url)+1);
		memcpy( ru , url, strlen(url));
	}
	return ru;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
testq %rdi, %rdi
je 0xa6e3
movq %rdi, %r14
leaq 0x6ea7a(%rip), %rsi     # 0x79110
callq 0x8090
testq %rax, %rax
je 0xa6ee
movq %rax, %rbx
leaq 0x1(%rax), %rdi
callq 0x8120
movq %rax, %r15
movq %rax, %rdi
callq 0x83e0
testq %rax, %rax
je 0xa6e3
movq %rax, %r14
movq %rax, %rdi
xorl %esi, %esi
movq %r15, %rdx
callq 0x8160
addq $0x2, %rbx
movq %rbx, %rdi
callq 0x8120
movq %r14, %rdi
movq %rbx, %rsi
movq %rax, %rdx
jmp 0xa71e
xorl %eax, %eax
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
movq %r14, %rdi
callq 0x8120
movq %rax, %rbx
leaq 0x1(%rax), %r15
movq %r15, %rdi
callq 0x83e0
movq %rax, %r12
movq %rax, %rdi
xorl %esi, %esi
movq %r15, %rdx
callq 0x8160
movq %r12, %rdi
movq %r14, %rsi
movq %rbx, %rdx
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
jmp 0x8220
// File: /workspace/github_c_makefile_star2_O1/shifengbin[P]bishe/parserurl/parserurl.c
// Function: gethost
char *gethost( char *url)
{
	char *hosts,*hoste;
	char *rhttp ;
	if( url == NULL)
		return NULL;

	if ((hosts = strstr(url,"//")) == NULL)
	{
		return NULL;
	}
	hosts+=2;
	if ((hoste = strstr( hosts,":")) == NULL)
	{
		if((hoste = strstr(hosts,"/")) == NULL)
		{
			rhttp = (char*)malloc(strlen(hosts)+1);
			if ( rhttp == NULL)
				return NULL;
			memset(rhttp, 0 , strlen(hosts)+1);
			memcpy(rhttp, hosts,strlen(hosts));
			return rhttp;
		}
	}
	int len = hoste - hosts;
	rhttp = (char *)malloc(len + 1);
	memset( rhttp, 0 , len+1);
	memcpy( rhttp, hosts, len);
	return rhttp;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
testq %rdi, %rdi
je 0xa7f1
leaq 0x6e9ca(%rip), %rsi     # 0x79110
callq 0x8090
testq %rax, %rax
je 0xa7f1
movq %rax, %rbx
addq $0x2, %rbx
movq %rbx, %rdi
movl $0x3a, %esi
callq 0x8100
testq %rax, %rax
jne 0xa77f
movq %rbx, %rdi
movl $0x2f, %esi
callq 0x8100
testq %rax, %rax
je 0xa7ba
movq %rax, %r14
subq %rbx, %r14
leal 0x1(%r14), %eax
movslq %eax, %r15
movq %r15, %rdi
callq 0x83e0
movq %rax, %r12
movq %rax, %rdi
xorl %esi, %esi
movq %r15, %rdx
callq 0x8160
movslq %r14d, %rdx
movq %r12, %rdi
movq %rbx, %rsi
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
jmp 0x8220
movq %rbx, %rdi
callq 0x8120
movq %rax, %r14
leaq 0x1(%rax), %r15
movq %r15, %rdi
callq 0x83e0
testq %rax, %rax
je 0xa7f1
movq %rax, %r12
movq %rax, %rdi
xorl %esi, %esi
movq %r15, %rdx
callq 0x8160
movq %r12, %rdi
movq %rbx, %rsi
movq %r14, %rdx
jmp 0xa7ad
xorl %eax, %eax
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O1/shifengbin[P]bishe/parserurl/parserurl.c
// Function: getport
char *getport( char *url)
{
	char *c,*p;
	char *port;
	char *rh;
	if (url == NULL)
		return NULL;
	rh = removehttp(url);

	if ((c = strchr(rh,':'))== NULL)
	{
		free(rh);
		if ( strncmp(url, "https",5) == 0 )
		{
			port = (char *)malloc(4);
			if (port == NULL)
				return NULL;
			sprintf( port , "443");
		}
		else if ((strncmp(url,"http",4) == 0) ||(strncmp(url, "//",2)==0) )
		{
			port = (char *)malloc(3);
			if (port == NULL)
				return NULL;
			sprintf(port, "80");
		}
		else 
		{
			return NULL;
		}
	}
	else
	{
		c++;
		if ( (p = strchr(c,'/')) == NULL)
		{
			port = (char*)malloc(strlen(c)+1);	
			if (port == NULL)	
				return NULL;
			memset(port , 0 , strlen(c)+1);
			memcpy(port , c , strlen(c));
		}
		else
		{
			port = (char*)malloc(p-c+1);
			if ( port == NULL)
				return NULL;
			memset( port , 0 , p-c+1);
			memcpy( port , c , p-c);
		}
	}
	return port;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
testq %rdi, %rdi
je 0xa918
movq %rdi, %r14
callq 0xa67c
movq %rax, %r15
movq %rax, %rdi
movl $0x3a, %esi
callq 0x8100
testq %rax, %rax
je 0xa851
movq %rax, %rbx
incq %rbx
movq %rbx, %rdi
movl $0x2f, %esi
callq 0x8100
testq %rax, %rax
je 0xa8bf
movq %rax, %r14
subq %rbx, %r14
leaq 0x1(%r14), %r15
jmp 0xa8ce
movq %r15, %rdi
callq 0x8350
leaq 0x6eb21(%rip), %rsi     # 0x79381
movl $0x5, %edx
movq %r14, %rdi
callq 0x8150
testl %eax, %eax
je 0xa901
leaq 0x6eb0b(%rip), %rsi     # 0x79387
movl $0x4, %edx
movq %r14, %rdi
callq 0x8150
testl %eax, %eax
je 0xa8a5
leaq 0x6e87c(%rip), %rsi     # 0x79110
movl $0x2, %edx
movq %r14, %rdi
callq 0x8150
testl %eax, %eax
jne 0xa918
movl $0x3, %edi
callq 0x83e0
testq %rax, %rax
je 0xa918
movb $0x0, 0x2(%rax)
movw $0x3038, (%rax)         # imm = 0x3038
jmp 0xa91a
movq %rbx, %rdi
callq 0x8120
movq %rax, %r14
leaq 0x1(%rax), %r15
movq %r15, %rdi
callq 0x83e0
testq %rax, %rax
je 0xa918
movq %rax, %r12
movq %rax, %rdi
xorl %esi, %esi
movq %r15, %rdx
callq 0x8160
movq %r12, %rdi
movq %rbx, %rsi
movq %r14, %rdx
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
jmp 0x8220
movl $0x4, %edi
callq 0x83e0
testq %rax, %rax
je 0xa918
movl $0x333434, (%rax)       # imm = 0x333434
jmp 0xa91a
xorl %eax, %eax
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O1/shifengbin[P]bishe/parserurl/parserurl.c
// Function: getres
char *getres( char *url )
{
	char *u;
	char *find;
	char *ret;
	int len;

	if (url == NULL)
		return NULL;

	u = removehttp(url);
	if ( (find = strchr(u,'/')) == NULL)
	{
		free(u);
		ret = (char *)malloc(2);
		if (ret == NULL )
			return NULL;
		sprintf( ret , "/");
		return ret;
	}
	len = strlen(find);
	ret = (char *)malloc(len+1);
	if ( ret == NULL )
	{
		free(u);
		return NULL;
	}
	sprintf(ret , "%s", find);
	free(u);
	return ret;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %rbx
pushq %rax
testq %rdi, %rdi
je 0xa9a7
callq 0xa67c
movq %rax, %rbx
movq %rax, %rdi
movl $0x2f, %esi
callq 0x8100
testq %rax, %rax
je 0xa97e
movq %rax, %r15
movq %rax, %rdi
callq 0x8120
incl %eax
movslq %eax, %rdi
callq 0x83e0
testq %rax, %rax
je 0xa99f
movq %rax, %r14
movq %rax, %rdi
movq %r15, %rsi
callq 0x82a0
movq %rbx, %rdi
callq 0x8350
jmp 0xa9aa
movq %rbx, %rdi
callq 0x8350
movl $0x2, %edi
callq 0x83e0
testq %rax, %rax
je 0xa9a7
movq %rax, %r14
movw $0x2f, (%rax)
jmp 0xa9aa
movq %rbx, %rdi
callq 0x8350
xorl %r14d, %r14d
movq %r14, %rax
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O1/shifengbin[P]bishe/parserurl/parserurl.c
// Function: parserURL
PURL *parserURL( PURL *u , char *url)
{
	PURL *ret;
	char *host;
	char *port;
	char *res;

	if (url == NULL)
		return NULL;
	host = gethost(url);
	port = getport(url);
	res =  getres(url);

	if (host == NULL )
	{
		if ( u == NULL || u->host == NULL)
			return NULL;
		host = (char *)malloc(strlen(u->host)+1);
		sprintf(host , "%s", u->host);
	}
	if (port == NULL )
	{
		if ( u == NULL || u->port == NULL)
			return NULL;
		port = (char *)malloc(strlen(u->port)+1);
		sprintf( port , "%s" , u->port);
	}
	ret = (PURL*)malloc(sizeof(PURL));
	if (ret == NULL )
	{
		if ( host == NULL)
			free(host);
		if ( port == NULL)
			free(port);
		if ( res == NULL )
			free(res);
		return NULL;
	}
	ret->host = host;
	ret->port = port;
	ret->res  = res;
	return ret;
}

// Assembly:
testq %rsi, %rsi
je 0xaa18
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movq %rsi, %rbx
movq %rdi, %r12
movq %rsi, %rdi
callq 0xa72b
movq %rax, %r14
movq %rbx, %rdi
callq 0xa7fc
movq %rax, %r15
movq %rbx, %rdi
callq 0xa923
movq %rax, %rbx
testq %r14, %r14
je 0xaa1b
testq %r15, %r15
je 0xaa4a
movl $0x20, %edi
callq 0x83e0
testq %rax, %rax
je 0xaa7a
movq %r14, (%rax)
movq %r15, 0x8(%rax)
movq %rbx, 0x10(%rax)
jmp 0xaa7c
xorl %eax, %eax
retq
testq %r12, %r12
je 0xaa7a
movq (%r12), %r13
testq %r13, %r13
je 0xaa7a
movq %r13, %rdi
callq 0x8120
leaq 0x1(%rax), %rdi
callq 0x83e0
movq %rax, %r14
movq %rax, %rdi
movq %r13, %rsi
callq 0x82a0
jmp 0xa9f7
testq %r12, %r12
je 0xaa7a
movq 0x8(%r12), %r12
testq %r12, %r12
je 0xaa7a
movq %r12, %rdi
callq 0x8120
leaq 0x1(%rax), %rdi
callq 0x83e0
movq %rax, %r15
movq %rax, %rdi
movq %r12, %rsi
callq 0x82a0
jmp 0xa9fc
xorl %eax, %eax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O1/shifengbin[P]bishe/SockTool/sockutils.c
// Function: setnonblock
int setnonblock( int fd)
{
	int flags = fcntl( fd , F_GETFL); 
	if (flags < 0 )
		return -1;
	flags|=O_NONBLOCK;
	if ( fcntl( fd, F_SETFL , flags) < 0)
		return -1;
	return 0;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %rbx
pushq %rax
movl %edi, %ebx
movl $0x3, %esi
xorl %eax, %eax
callq 0x8170
testl %eax, %eax
js 0xaada
orl $0x800, %eax            # imm = 0x800
movl %ebx, %edi
movl $0x4, %esi
movl %eax, %edx
xorl %eax, %eax
callq 0x8170
sarl $0x1f, %eax
jmp 0xaadf
movl $0xffffffff, %eax       # imm = 0xFFFFFFFF
addq $0x8, %rsp
popq %rbx
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O1/shifengbin[P]bishe/SockTool/sockutils.c
// Function: setblock
int setblock( int fd )
{
	int flags = fcntl( fd , F_GETFL); 
	if (flags < 0 )
		return -1;
	flags&=~O_NONBLOCK;
	if ( fcntl( fd, F_SETFL , flags) < 0)
		return -1;
	return 0;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %rbx
pushq %rax
movl %edi, %ebx
movl $0x3, %esi
xorl %eax, %eax
callq 0x8170
testl %eax, %eax
js 0xab18
andl $0x7ffff7ff, %eax       # imm = 0x7FFFF7FF
movl %ebx, %edi
movl $0x4, %esi
movl %eax, %edx
xorl %eax, %eax
callq 0x8170
sarl $0x1f, %eax
jmp 0xab1d
movl $0xffffffff, %eax       # imm = 0xFFFFFFFF
addq $0x8, %rsp
popq %rbx
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O1/shifengbin[P]bishe/SockTool/sockutils.c
// Function: read_timeout
int read_timeout( int fd , int sec)
{
	fd_set fds;
	struct timeval t;
	int ret;
	
	if ( sec <= 0)
		return 0;

	FD_ZERO(&fds);
	FD_SET(fd,&fds);
	
	t.tv_sec = sec;
	t.tv_usec = 0;
	do
	{
		ret = select( fd+1 , &fds, NULL, NULL ,&t);
	}while(ret < 0 && errno == EINTR);

	if ( ret < 0 )
	{
		return -1;
	}else if (ret == 0)
	{
		errno = ETIMEDOUT;
		return -1;
	}

	return 0;
}

// Assembly:
testl %esi, %esi
jle 0xabc9
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %rbx
subq $0x98, %rsp
movl %edi, %ebx
xorps %xmm0, %xmm0
leaq -0xb0(%rbp), %r14
movaps %xmm0, 0x70(%r14)
movaps %xmm0, 0x60(%r14)
movaps %xmm0, 0x50(%r14)
movaps %xmm0, 0x40(%r14)
movaps %xmm0, 0x30(%r14)
movaps %xmm0, 0x20(%r14)
leal 0x3f(%rbx), %eax
testl %edi, %edi
cmovnsl %edi, %eax
movl %eax, %edx
andl $-0x40, %edx
movl %edi, %ecx
subl %edx, %ecx
movl $0x1, %edx
shlq %cl, %rdx
movaps %xmm0, 0x10(%r14)
movaps %xmm0, (%r14)
sarl $0x6, %eax
cltq
orq %rdx, -0xb0(%rbp,%rax,8)
movl %esi, %eax
leaq -0x28(%rbp), %r15
movq %rax, (%r15)
movq $0x0, 0x8(%r15)
incl %ebx
movl %ebx, %edi
movq %r14, %rsi
xorl %edx, %edx
xorl %ecx, %ecx
movq %r15, %r8
callq 0x82d0
testl %eax, %eax
jns 0xabcc
callq 0x8050
cmpl $0x4, (%rax)
je 0xaba8
jmp 0xabdd
xorl %eax, %eax
retq
je 0xabd2
xorl %eax, %eax
jmp 0xabe2
callq 0x8050
movl $0x6e, (%rax)
movl $0xffffffff, %eax       # imm = 0xFFFFFFFF
addq $0x98, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq