LLM4Binary/decompile-bench-makefile huggingface dataset:
// File: /workspace/github_c_makefile_star2_O3/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 0x9c76
testq %rax, %rax
je 0x88ef
movq %rax, %rbx
callq 0x9842
testq %rax, %rax
je 0x88f8
movq %rax, %r14
movq %rbx, %rdi
callq 0x9c5a
leaq -0x28(%rbp), %r15
movq %r15, %rdi
movl %eax, %esi
callq 0x76d14
leaq 0x26d(%rip), %rax       # 0x8ab8
movq %rax, 0x8(%r15)
movq %r14, %rdi
callq 0x989e
movq -0x28(%rbp), %rdi
callq 0x76f66
testl %eax, %eax
jne 0x8870
movq %r14, %rdi
callq 0x9892
testl %eax, %eax
je 0x88d6
movq -0x28(%rbp), %rdi
callq 0x76f56
testl %eax, %eax
je 0x88af
xorl %r15d, %r15d
movq %rbx, %rdi
callq 0x9c5a
cmpl %eax, %r15d
jge 0x88af
movq %r14, %rdi
callq 0x9936
testq %rax, %rax
je 0x88af
movq -0x28(%rbp), %rdi
movq -0x20(%rbp), %rsi
movq %rax, %rdx
callq 0x76ec3
incl %r15d
jmp 0x8880
movq %rbx, %rdi
callq 0x9c6e
testl %eax, %eax
je 0x88c5
movq %rbx, %rdi
callq 0x9c6e
jmp 0x88ca
movl $0x2, %eax
movl %eax, %edi
callq 0x81e0
jmp 0x884f
leaq 0x6e747(%rip), %rdi     # 0x77024
callq 0x84b0
leaq -0x28(%rbp), %rdi
callq 0x76e6b
xorl %eax, %eax
jmp 0x890e
leaq 0x6e70e(%rip), %rsi     # 0x77004
jmp 0x88ff
leaq 0x6e713(%rip), %rsi     # 0x77012
movl $0x2, %edi
callq 0xa619
movl $0xffffffff, %eax       # imm = 0xFFFFFFFF
addq $0x18, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
jmp 0x8931
jmp 0x891d
movq %rax, %rbx
leaq -0x28(%rbp), %rdi
callq 0x76e6b
movq %rbx, %rdi
callq 0x8520
movq %rax, %rdi
callq 0x8939
// File: /workspace/github_c_makefile_star2_O3/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 0x8c5c9(%rip), %r14     # 0x94f50
movq %r14, %rdi
callq 0x8450
movq %rbx, %rdi
callq 0x9b9e
movl %eax, %ebx
movq %r14, %rdi
callq 0x8200
movl %ebx, %eax
popq %rbx
popq %r14
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O3/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
movq 0x8c5b8(%rip), %rax     # 0x94f78
testq %rax, %rax
jne 0x8a00
leaq 0x8c5b4(%rip), %rdi     # 0x94f80
callq 0x8450
movl $0xf8, %edi
callq 0x8300
movq %rax, %rbx
movq %rax, %rdi
callq 0xa1e0
movq %rbx, 0x8c58b(%rip)     # 0x94f78
leaq 0x8c58c(%rip), %rdi     # 0x94f80
callq 0x8200
movq 0x8c578(%rip), %rax     # 0x94f78
popq %rbx
popq %r14
popq %rbp
retq
movq %rax, %r14
movl $0xf8, %esi
movq %rbx, %rdi
callq 0x8310
movq %r14, %rdi
callq 0x8520
nop
// File: /workspace/github_c_makefile_star2_O3/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 0x8a3d
xorl %ebx, %ebx
jmp 0x8aa7
movq %rdx, %r12
movq %rsi, %r14
movq %rdi, %r15
leaq 0x8c533(%rip), %rdi     # 0x94f80
callq 0x8450
movq %r15, %rdi
movq %r14, %rsi
callq 0xa350
testq %rax, %rax
je 0x8a6e
movq %rax, %rbx
leaq 0x6e5c8(%rip), %rdi     # 0x77034
jmp 0x8a96
movq %r14, %rdi
movq %r12, %rsi
callq 0xa100
testq %rax, %rax
je 0x8ab3
movq %rax, %rbx
movq %r15, %rdi
movq %r14, %rsi
movq %rax, %rdx
callq 0xa26e
leaq 0x6e592(%rip), %rdi     # 0x77028
callq 0x84b0
leaq 0x8c4de(%rip), %rdi     # 0x94f80
callq 0x8200
movq %rbx, %rax
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
xorl %ebx, %ebx
jmp 0x8a9b
nop
// File: /workspace/github_c_makefile_star2_O3/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 0x8d95
movabsq $0x3f0000003f, %rax     # imm = 0x3F0000003F
leal -0x30(%rcx), %edx
cmpb $0xa, %dl
jb 0x8d8a
movzbl %cl, %ecx
addl $-0x41, %ecx
cmpl $0x25, %ecx
ja 0x8da0
btq %rcx, %rax
jae 0x8da0
movb 0x1(%rdi), %cl
incq %rdi
cmpb $0xd, %cl
jne 0x8d71
xorl %eax, %eax
cmpb $0xa, 0x1(%rdi)
sete %al
popq %rbp
retq
xorl %eax, %eax
jmp 0x8d9e
// File: /workspace/github_c_makefile_star2_O3/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 0x9007
pushq %rbp
movq %rsp, %rbp
pushq %r14
pushq %rbx
movq %rdi, %rbx
leaq 0x8bfbe(%rip), %r14     # 0x94fa8
movq %r14, %rdi
callq 0x8450
movq 0x8(%rbx), %rdi
callq 0x8360
movq %r14, %rdi
popq %rbx
popq %r14
popq %rbp
jmp 0x8200
retq
// File: /workspace/github_c_makefile_star2_O3/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 0x9086
movl %eax, %ecx
incq %rcx
xorl %esi, %esi
movl $0x1, %edx
movzbl -0x1(%rbx,%rcx), %eax
leal -0x61(%rax), %edi
cmpb $0x5, %dil
ja 0x9055
addl $-0x57, %eax
jmp 0x906c
leal -0x41(%rax), %edi
cmpb $0x5, %dil
ja 0x9063
addl $-0x37, %eax
jmp 0x906c
addb $-0x30, %al
cmpb $0x9, %al
ja 0x907d
movzbl %al, %eax
imull %edx, %eax
addl %esi, %eax
shll $0x4, %edx
movl %eax, %esi
decq %rcx
jg 0x9042
jmp 0x9088
movl $0x1, %edx
xorl %eax, %eax
jmp 0x9074
xorl %eax, %eax
addq $0x8, %rsp
popq %rbx
popq %rbp
retq
nop
// File: /workspace/github_c_makefile_star2_O3/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 0x8410
movq %rax, (%rbx)
testq %rax, %rax
je 0x9315
addq $0x8, %rsp
popq %rbx
popq %rbp
retq
callq 0x82d0
movq %rax, %rdi
addq $0x8, %rsp
popq %rbx
popq %rbp
jmp 0x84b0
// File: /workspace/github_c_makefile_star2_O3/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 0x82c0
movq %rax, 0x8(%rbx)
testq %rax, %rax
jne 0x9366
leaq 0x6de34(%rip), %rdi     # 0x77191
callq 0x84b0
movq 0x8(%rbx), %rax
addq $0x8, %rsp
popq %rbx
popq %rbp
retq
nop
// File: /workspace/github_c_makefile_star2_O3/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 0x8480
addq $0x28, %r14
movq %rbx, %rdi
movq %r14, %rsi
callq 0x19fec
testl %eax, %eax
jne 0x93cf
popq %rbx
popq %r14
popq %rbp
retq
leaq 0x6dde0(%rip), %rsi     # 0x771b6
movl $0x2, %edi
callq 0xa619
movl $0xffffffff, %edi       # imm = 0xFFFFFFFF
callq 0x8380
// File: /workspace/github_c_makefile_star2_O3/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 0x9458
callq 0xc4a4
movq 0x28(%rbx), %rdi
callq 0x18b86
movq 0x8bb70(%rip), %r14     # 0x94fd8
testq %r14, %r14
je 0x9475
movq %r14, %rdi
callq 0x9440
movl $0x38, %esi
movq %r14, %rdi
callq 0x8310
movq %rbx, %rdi
popq %rbx
popq %r14
popq %rbp
jmp 0x8340
movq %rax, %rdi
callq 0x8939
// File: /workspace/github_c_makefile_star2_O3/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 0x8450
leaq 0x30(%rbx), %r15
movq 0x30(%rbx), %rdi
testq %rdi, %rdi
je 0x94be
callq 0xc4a4
movq 0x28(%rbx), %rdi
movq %r14, %rsi
xorl %edx, %edx
xorl %ecx, %ecx
movq %r15, %r8
callq 0x15c74
movl %eax, %r12d
testl %eax, %eax
je 0x94f2
movl $0x2, %edi
movq %r14, %rsi
callq 0xa619
movq (%r15), %rsi
movl $0x2, %edi
callq 0xa619
movq %rbx, %rdi
callq 0x8200
movl %r12d, %eax
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O3/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 0x8450
leaq 0x30(%rbx), %r15
movq 0x30(%rbx), %rdi
testq %rdi, %rdi
je 0x9537
callq 0xc4a4
movq 0x28(%rbx), %rdi
movq %r14, %rsi
movq %r13, %rdx
movq %r12, %rcx
movq %r15, %r8
callq 0x15c74
movl %eax, %r12d
testl %eax, %eax
je 0x956d
movl $0x2, %edi
movq %r14, %rsi
callq 0xa619
movq (%r15), %rsi
movl $0x2, %edi
callq 0xa619
movq %rbx, %rdi
callq 0x8200
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_O3/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 0x8ba66(%rip), %rbx     # 0x95008
movq %rbx, %rdi
callq 0x8450
movl $0x2, %edi
movl $0x1, %esi
xorl %edx, %edx
callq 0x80a0
movl %eax, %r14d
movq %rbx, %rdi
callq 0x8200
movl %r14d, %eax
popq %rbx
popq %r14
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O3/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 0x8ba52(%rip), %r14     # 0x95030
movq %r14, %rdi
callq 0x8450
movl %ebx, %edi
callq 0x8560
movq %r14, %rdi
callq 0x8200
movl $0x1, %eax
popq %rbx
popq %r14
popq %rbp
retq
nop
// File: /workspace/github_c_makefile_star2_O3/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 0x9787
movl %esi, %r14d
testl %esi, %esi
jle 0x9783
movq %rcx, %rbx
movq %rdi, -0x38(%rbp)
movl $0x20, %edi
callq 0x8300
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 0x7596f(%rip), %rdi     # 0x7f023
movq %r14, %rsi
callq 0x8330
testl %eax, %eax
je 0x9720
leaq 0x6db0f(%rip), %rdi     # 0x771d6
movq %r14, %rsi
callq 0x8330
testl %eax, %eax
je 0x9733
leaq 0x6db03(%rip), %rdi     # 0x771dd
movq %r14, %rsi
callq 0x8330
testl %eax, %eax
je 0x9745
leaq 0x6daf5(%rip), %rdi     # 0x771e2
movq %r14, %rsi
callq 0x8330
testl %eax, %eax
je 0x9759
leaq 0x6dae7(%rip), %rdi     # 0x771e7
movq %r14, %rsi
callq 0x8330
testl %eax, %eax
jne 0x976b
movq -0x30(%rbp), %rax
movq (%rax,%r13,8), %rdi
callq 0x84c0
movl %eax, 0x18(%r12)
jmp 0x976b
movq -0x30(%rbp), %rax
movq (%rax,%r13,8), %rdi
callq 0x84c0
movl %eax, (%r12)
jmp 0x976b
movq -0x30(%rbp), %rax
movq (%rax,%r13,8), %rsi
movq %r12, %rdi
callq 0x9272
jmp 0x976b
movq -0x30(%rbp), %rax
movq (%rax,%r13,8), %rdi
callq 0x84c0
movl %eax, 0x10(%r12)
jmp 0x976b
movq -0x30(%rbp), %rax
movq (%rax,%r13,8), %rdi
callq 0x84c0
movl %eax, 0x14(%r12)
incq %r13
cmpq %r13, %r15
jne 0x96a9
movq -0x38(%rbp), %rdi
movq %r12, %rsi
callq 0x9944
xorl %eax, %eax
jmp 0x978c
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_O3/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 0x9923
callq 0x93ea
testq %rax, %rax
je 0x991d
movq %rax, %r15
movl $0xa, %edx
subl %r12d, %edx
leaq 0x6d8fb(%rip), %rsi     # 0x771ed
xorl %r14d, %r14d
leaq -0x220(%rbp), %r12
movq %r12, %rdi
xorl %eax, %eax
callq 0x8080
movq (%rbx), %rcx
leaq -0x2b8(%rip), %rdx      # 0x9658
movq %r15, %rdi
movq %r12, %rsi
callq 0x9506
jmp 0x9923
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_O3/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 0x99a3
cmpl $0x0, 0x14(%rbx)
jle 0x99a3
leaq 0x18(%rbx), %r15
movq %r15, %rdi
callq 0x8450
movq (%rbx), %rdi
movq (%rdi), %r14
movq 0x8(%rdi), %rax
movq %rax, (%rbx)
movl $0x10, %esi
callq 0x8310
decl 0x14(%rbx)
movq %r15, %rdi
callq 0x8200
jmp 0x99ac
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_O3/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 0x99c5
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 0x8450
movl $0x10, %edi
callq 0x8300
movq %r15, (%rax)
movq $0x0, 0x8(%rax)
leaq 0x8(%rbx), %rcx
movq 0x8(%rbx), %rdx
movq (%rbx), %rsi
orq %rdx, %rsi
jne 0x9a0e
movq %rcx, %rdx
movq %rbx, %rcx
jmp 0x9a17
testq %rdx, %rdx
je 0x9a1d
addq $0x8, %rdx
movq %rax, (%rdx)
movq %rax, (%rcx)
incl 0x14(%rbx)
movq %r14, %rdi
callq 0x8200
// File: /workspace/github_c_makefile_star2_O3/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 0x8b613(%rip), %r14     # 0x95060
movq %r14, %rdi
callq 0x8450
movq %rbx, %rdi
callq 0xa702
movq %rax, %rbx
movq %r14, %rdi
callq 0x8200
movq %rbx, %rax
popq %rbx
popq %r14
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O3/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 0x8b5df(%rip), %r14     # 0x95060
movq %r14, %rdi
callq 0x8450
movq %rbx, %rdi
callq 0xa7a7
movq %rax, %rbx
movq %r14, %rdi
callq 0x8200
movq %rbx, %rax
popq %rbx
popq %r14
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O3/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 0x8b5ab(%rip), %r14     # 0x95060
movq %r14, %rdi
callq 0x8450
movq %rbx, %rdi
callq 0xa8b2
movq %rax, %rbx
movq %r14, %rdi
callq 0x8200
movq %rbx, %rax
popq %rbx
popq %r14
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O3/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 0x8b5a0(%rip), %rdi     # 0x95088
callq 0x8450
testq %rbx, %rbx
je 0x9afa
movq %rbx, %rdi
callq 0x8360
leaq 0x8b587(%rip), %rdi     # 0x95088
addq $0x8, %rsp
popq %rbx
popq %rbp
jmp 0x8200
// File: /workspace/github_c_makefile_star2_O3/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 0x6d710(%rip), %rsi     # 0x77230
leaq 0x8b589(%rip), %r8      # 0x950b0
movl $0xd1b71759, %r9d       # imm = 0xD1B71759
movl $0x0, %r10d
testq %rdi, %rdi
je 0x9b79
movb (%rdi), %cl
movl $0x0, %r10d
testb %cl, %cl
je 0x9b79
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 0x9b4e
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 0x9b2d
popq %rbx
popq %r14
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O3/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 0x6d67e(%rip), %rdx     # 0x77230
leaq 0x8b4f7(%rip), %rsi     # 0x950b0
movl $0xd1b71759, %r8d       # imm = 0xD1B71759
movl $0x0, %r9d
testq %rdi, %rdi
je 0x9c0a
movb (%rdi), %r10b
testb %r10b, %r10b
je 0x9c0a
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 0x9bdc
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 0x9c2f
incq %rcx
cmpq $0x8, %rcx
jne 0x9bbf
movl $0x1, %eax
jmp 0x9c31
xorl %eax, %eax
popq %rbx
popq %r14
popq %rbp
retq
nop
// File: /workspace/github_c_makefile_star2_O3/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 0x9d21
movq %r14, %rdi
callq 0xa4f6
movl $0x10, %esi
movq %r14, %rdi
callq 0x8310
incq %r15
cmpq $0x17, %r15
jne 0x9d03
movq 0x94fc7(%rip), %rbx     # 0x9ecf8
testq %rbx, %rbx
je 0x9d3e
movq %rbx, %rdi
callq 0x9cf0
movl $0xb8, %esi
movq %rbx, %rdi
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
jmp 0x8310
nop
// File: /workspace/github_c_makefile_star2_O3/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 0xa1a7
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 0x83b0
testl %eax, %eax
setne %cl
movq (%rbx), %r14
testq %r14, %r14
sete %dl
andb %cl, %dl
cmpb $0x1, %dl
jne 0xa179
movl %eax, %edi
callq 0x8400
movq %rax, %rdi
callq 0x84b0
jmp 0xa1a7
movl $0x10, %edi
callq 0x83f0
testq %rax, %rax
je 0xa19f
movq %rax, %rbx
movq 0x18(%r14), %rax
movups (%rax), %xmm0
movups %xmm0, (%rbx)
movq %r14, %rdi
callq 0x83e0
jmp 0xa1a9
movq %r14, %rdi
callq 0x83e0
xorl %ebx, %ebx
movq %rbx, %rax
addq $0x40, %rsp
popq %rbx
popq %r14
popq %rbp
retq
nopl (%rax)
// File: /workspace/github_c_makefile_star2_O3/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 0xa1dc
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 0xa1c6
jmp 0xa1de
xorl %eax, %eax
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O3/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 0xa268
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 0xa248
leaq (%rbx,%rax,8), %r15
addq $0x10, %r15
movq 0x10(%rdi), %rax
movq %rax, (%r15)
callq 0x8360
movq (%r15), %rdi
testq %rdi, %rdi
jne 0xa234
incq %r14
cmpq $0xa, %r14
jne 0xa21e
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_O3/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 0xa33e
movq %rdx, %r14
movq %rsi, %r15
movq %rdi, %rbx
callq 0xa350
testq %rax, %rax
jne 0xa33e
movq %r15, %rdi
callq 0x8120
movq %r15, %rdi
movl %eax, %esi
callq 0xa1b8
movq %rax, -0x30(%rbp)
movq %r15, %rdi
callq 0x8120
leaq 0x19(%rax), %rdi
callq 0x83f0
testq %rax, %rax
je 0xa33e
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 0x82b0
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_O3/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 0xa3c4
movq %rsi, %rbx
movq %rdi, %r14
movq %rsi, %rdi
callq 0x8120
movq %rbx, %rdi
movl %eax, %esi
callq 0xa1b8
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 0xa3c4
xorl %r14d, %r14d
movq 0x8(%r15), %rdi
movq %rbx, %rsi
callq 0x8420
testl %eax, %eax
je 0xa3d5
movq 0x10(%r15), %r15
testq %r15, %r15
jne 0xa3a9
jmp 0xa3c7
xorl %r14d, %r14d
movq %r14, %rax
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
movq (%r15), %r14
jmp 0xa3c7
// File: /workspace/github_c_makefile_star2_O3/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 0xa3fd
xorl %r15d, %r15d
jmp 0xa46f
movq %rsi, %r14
movq %rdi, %rbx
movq %rsi, %rdi
callq 0x8120
movq %r14, %rdi
movl %eax, %esi
callq 0xa1b8
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 0xa46f
movq 0x8(%r12), %rdi
movq %r14, %rsi
callq 0x8420
testl %eax, %eax
jne 0xa436
movq (%r12), %r15
movq 0x10(%r12), %rax
movq %rax, 0x10(%r13)
movq %r12, %rdi
callq 0x8360
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_O3/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 0x6cdfb(%rip), %xmm0    # 0x77340
movaps %xmm0, -0x50(%rbp)
movaps 0x6cde0(%rip), %xmm0    # 0x77330
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 0xa604
movl $0x0, %r12d
cmpl %r13d, %r15d
jb 0xa604
leaq -0x30(%rbp), %r12
movq %r12, %rdi
callq 0x82a0
movq %r12, %rdi
callq 0x81d0
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 0x6cd82(%rip), %rsi     # 0x77351
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_O3/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 0x6cd46(%rip), %rdi     # 0x77376
movl $0x442, %esi            # imm = 0x442
movl $0x1b6, %edx            # imm = 0x1B6
xorl %eax, %eax
callq 0x81c0
cmpl $-0x1, %eax
je 0xa66d
movl %eax, %r15d
movl %eax, %edi
movl $0x2, %esi
movl %r14d, %edx
movq %rbx, %rcx
callq 0xa50c
movl %r15d, %edi
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
jmp 0x8560
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O3/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 %r14
pushq %rbx
testq %rdi, %rdi
je 0xa6d0
movq %rdi, %r14
leaq 0x6ca82(%rip), %rsi     # 0x77110
callq 0x8090
testq %rax, %rax
je 0xa6d7
movq %rax, %rbx
leaq 0x1(%rax), %rdi
callq 0x8120
movl $0x1, %edi
movq %rax, %rsi
callq 0x8190
testq %rax, %rax
je 0xa6d0
movq %rax, %r14
addq $0x2, %rbx
movq %rbx, %rdi
callq 0x8120
movq %r14, %rdi
movq %rbx, %rsi
movq %rax, %rdx
jmp 0xa6f9
xorl %eax, %eax
popq %rbx
popq %r14
popq %rbp
retq
movq %r14, %rdi
callq 0x8120
movq %rax, %rbx
leaq 0x1(%rax), %rsi
movl $0x1, %edi
callq 0x8190
movq %rax, %rdi
movq %r14, %rsi
movq %rbx, %rdx
popq %rbx
popq %r14
popq %rbp
jmp 0x8230
// File: /workspace/github_c_makefile_star2_O3/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 %r14
pushq %rbx
testq %rdi, %rdi
je 0xa7a0
leaq 0x6c9f7(%rip), %rsi     # 0x77110
callq 0x8090
testq %rax, %rax
je 0xa7a0
movq %rax, %rbx
addq $0x2, %rbx
movq %rbx, %rdi
movl $0x3a, %esi
callq 0x8100
testq %rax, %rax
jne 0xa74e
movq %rbx, %rdi
movl $0x2f, %esi
callq 0x8100
testq %rax, %rax
je 0xa777
movq %rax, %r14
subq %rbx, %r14
leal 0x1(%r14), %eax
movslq %eax, %rsi
movl $0x1, %edi
callq 0x8190
movslq %r14d, %rdx
movq %rax, %rdi
movq %rbx, %rsi
popq %rbx
popq %r14
popq %rbp
jmp 0x8230
movq %rbx, %rdi
callq 0x8120
movq %rax, %r14
leaq 0x1(%rax), %rsi
movl $0x1, %edi
callq 0x8190
testq %rax, %rax
je 0xa7a0
movq %rax, %rdi
movq %rbx, %rsi
movq %r14, %rdx
jmp 0xa76e
xorl %eax, %eax
popq %rbx
popq %r14
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O3/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 %rbx
pushq %rax
testq %rdi, %rdi
je 0xa8a5
movq %rdi, %rbx
callq 0xa678
movq %rax, %r15
movq %rax, %rdi
movl $0x3a, %esi
callq 0x8100
testq %rax, %rax
je 0xa7fb
movq %rax, %r14
incq %r14
movq %r14, %rdi
movl $0x2f, %esi
callq 0x8100
testq %rax, %rax
je 0xa858
movq %rax, %rbx
subq %r14, %rbx
leaq 0x1(%rbx), %rsi
jmp 0xa867
movq %r15, %rdi
callq 0x8360
leaq 0x6cb77(%rip), %rsi     # 0x77381
movl $0x5, %edx
movq %rbx, %rdi
callq 0x8150
testl %eax, %eax
je 0xa88e
leaq 0x6cb65(%rip), %rsi     # 0x77387
movl $0x4, %edx
movq %rbx, %rdi
callq 0x8150
testl %eax, %eax
je 0xa83e
cmpb $0x2f, (%rbx)
jne 0xa8a5
cmpb $0x2f, 0x1(%rbx)
jne 0xa8a5
movl $0x3, %edi
callq 0x83f0
testq %rax, %rax
je 0xa8a5
movb $0x0, 0x2(%rax)
movw $0x3038, (%rax)         # imm = 0x3038
jmp 0xa8a7
movq %r14, %rdi
callq 0x8120
movq %rax, %rbx
leaq 0x1(%rax), %rsi
movl $0x1, %edi
callq 0x8190
testq %rax, %rax
je 0xa8a5
movq %rax, %rdi
movq %r14, %rsi
movq %rbx, %rdx
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
jmp 0x8230
movl $0x4, %edi
callq 0x83f0
testq %rax, %rax
je 0xa8a5
movl $0x333434, (%rax)       # imm = 0x333434
jmp 0xa8a7
xorl %eax, %eax
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O3/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 0xa936
callq 0xa678
movq %rax, %rbx
movq %rax, %rdi
movl $0x2f, %esi
callq 0x8100
testq %rax, %rax
je 0xa90d
movq %rax, %r15
movq %rax, %rdi
callq 0x8120
incl %eax
movslq %eax, %rdi
callq 0x83f0
testq %rax, %rax
je 0xa92e
movq %rax, %r14
movq %rax, %rdi
movq %r15, %rsi
callq 0x82b0
movq %rbx, %rdi
callq 0x8360
jmp 0xa939
movq %rbx, %rdi
callq 0x8360
movl $0x2, %edi
callq 0x83f0
testq %rax, %rax
je 0xa936
movq %rax, %r14
movw $0x2f, (%rax)
jmp 0xa939
movq %rbx, %rdi
callq 0x8360
xorl %r14d, %r14d
movq %r14, %rax
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O3/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 0xa9a7
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 0xa702
movq %rax, %r14
movq %rbx, %rdi
callq 0xa7a7
movq %rax, %r15
movq %rbx, %rdi
callq 0xa8b2
movq %rax, %rbx
testq %r14, %r14
je 0xa9aa
testq %r15, %r15
je 0xa9d9
movl $0x20, %edi
callq 0x83f0
testq %rax, %rax
je 0xaa09
movq %r14, (%rax)
movq %r15, 0x8(%rax)
movq %rbx, 0x10(%rax)
jmp 0xaa0b
xorl %eax, %eax
retq
testq %r12, %r12
je 0xaa09
movq (%r12), %r13
testq %r13, %r13
je 0xaa09
movq %r13, %rdi
callq 0x8120
leaq 0x1(%rax), %rdi
callq 0x83f0
movq %rax, %r14
movq %rax, %rdi
movq %r13, %rsi
callq 0x82b0
jmp 0xa986
testq %r12, %r12
je 0xaa09
movq 0x8(%r12), %r12
testq %r12, %r12
je 0xaa09
movq %r12, %rdi
callq 0x8120
leaq 0x1(%rax), %rdi
callq 0x83f0
movq %rax, %r15
movq %rax, %rdi
movq %r12, %rsi
callq 0x82b0
jmp 0xa98b
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_O3/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 0xaa6a
orl $0x800, %eax            # imm = 0x800
movl %ebx, %edi
movl $0x4, %esi
movl %eax, %edx
xorl %eax, %eax
callq 0x8170
sarl $0x1f, %eax
jmp 0xaa6f
movl $0xffffffff, %eax       # imm = 0xFFFFFFFF
addq $0x8, %rsp
popq %rbx
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O3/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 0xaaa8
andl $0x7ffff7ff, %eax       # imm = 0x7FFFF7FF
movl %ebx, %edi
movl $0x4, %esi
movl %eax, %edx
xorl %eax, %eax
callq 0x8170
sarl $0x1f, %eax
jmp 0xaaad
movl $0xffffffff, %eax       # imm = 0xFFFFFFFF
addq $0x8, %rsp
popq %rbx
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O3/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 0xab59
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 0x82e0
testl %eax, %eax
jns 0xab5c
callq 0x8050
cmpl $0x4, (%rax)
je 0xab38
jmp 0xab6d
xorl %eax, %eax
retq
je 0xab62
xorl %eax, %eax
jmp 0xab72
callq 0x8050
movl $0x6e, (%rax)
movl $0xffffffff, %eax       # imm = 0xFFFFFFFF
addq $0x98, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq