// File: danish241194[P]Linux-Terminal-Based-File-Explorer/start_page.cpp
// Function: main
int main(int arg,char *args[])
	{

//mkdir("trash_folder_2018201016", S_IRWXU | S_IRWXG | S_IROTH | S_IXOTH);

	if(arg==1){
		path=".";
		home=path;
		pathdup=path;

	}
	else{

		path=args[1];

		pathdup=path;
	}
	
	signal(SIGINT, INThandler);
	
	
	int a;
	
	real_clean();
	//system("reset");	
	printf("\033[2J\033[1;1H");
	fflush(stdout);
	ioctl(STDOUT_FILENO, TIOCGWINSZ, &w);
	
	tcgetattr(0,&initial_settings);
	new_settings = initial_settings;

	new_settings.c_lflag &= ~ECHO;

	new_settings.c_lflag &= ~ICANON;

	if(tcsetattr(0, TCSANOW, &new_settings) != 0) {
	fprintf(stderr,"could not set attributes\n");
	}




	
	print_dirs(0,height);
	gotoxy(start_x,start_y); // y,1
	char ch;
	int flag=0;

	while(1){
	ch = getchar();
	int s = (int)ch;
	


	switch(s){

		case 58:{
				CommandMode();	
				print_dirs(0,height);
				
				new_settings.c_lflag &= ~ECHO;

				new_settings.c_lflag &= ~ICANON;

				if(tcsetattr(0, TCSANOW, &new_settings) != 0) {
				fprintf(stderr,"could not set attributes\n");
				}
				y=1;
				scroll_k=0;
				gotoxy(y+start_x-1,1);
				
				break;		
			}

		case 127:{
					
				if(pathdup.compare(home)==0){break;}
					while(back!=0)
					{
					forward_history.pop();
					fkh.pop();
						back--;
					}
					back=0;
					
					back_history.push(path);
					bkh.push(pathdup);pathdup = getactualpath(pathdup);
					path = path +"/"+namelist[1]->d_name;
					real_clean();
					fflush(stdout);		
					
					print_dirs(0,height);
					
					new_settings.c_lflag &= ~ECHO;

					new_settings.c_lflag &= ~ICANON;

					if(tcsetattr(0, TCSANOW, &new_settings) != 0) {
					fprintf(stderr,"could not set attributes\n");
					}
					y=1;
					scroll_k=0;
					gotoxy(start_x,start_y);//y,1	
			break;}
			
		case 65:
			{
					
				if(y>=2){
					y--;
					gotoxy(y+start_x-1,1);
						
						break;
				}
				
				if(scroll_k!=0)
				{
	
				gotoxy(start_x,start_y);
				scroll_k=scroll_k-1;
				print_dirs(scroll_k,height+scroll_k);
				gotoxy(start_x,start_y);
				
				}
				else
				{
								
				}
				break;			
			}
			
		case 66:{	

				if(nn>height){
				if(height-(height-y)+scroll_k<nn){
				if(y<height){
					y++;
					gotoxy(y+start_x-1,1); 
					break;
				}		
				gotoxy(start_x,start_y);
				scroll_k++;
				print_dirs(scroll_k,height+scroll_k);
				gotoxy(height+start_x-1,1);
				}
				}else{
				if(y<nn)
				{
					y++;
					gotoxy(y+start_x-1,1);
				}	

				}
				break;			
			}
			//quit (q)
		case 113:{
				flag=1;
				break;
			}
			//enter 
		case 10:{	

				if((y+scroll_k-1)==0)
				{
					break;
				}
				if((y+scroll_k-1)==1 && pathdup.compare(home)==0){//back_history.size()==0
					break;
				}
				
				while(back!=0){
				forward_history.pop();
				fkh.pop();
					back--;
				}
				back=0;
				if((int)namelist[y+scroll_k-1]->d_type==4){
				if((y+scroll_k-1)==1){//back_history.size()==0
					bkh.push(pathdup);
					pathdup = getactualpath(pathdup);				
				
				}else{
						bkh.push(pathdup);
					pathdup = pathdup +"/"+namelist[y+scroll_k-1]->d_name;
					}
				
				back_history.push(path);
				path = path +"/"+namelist[y+scroll_k-1]->d_name;
				//printf("\033[2J\033[1;1H");
				real_clean();				
				fflush(stdout);		
				
				print_dirs(0,height);
				//cout<<"----"<<y+scroll_k-1<<"---";
				new_settings.c_lflag &= ~ECHO;

				new_settings.c_lflag &= ~ICANON;

				if(tcsetattr(0, TCSANOW, &new_settings) != 0) {
					fprintf(stderr,"could not set attributes\n");
				}
					y=1;
					scroll_k=0;
					gotoxy(y+start_x-1,1); // y,1//......y+2

				}
				else{
					string pathre = path;
					for(int k=0;k<path.size();k++){
						if(pathre[k]==' '){
	
							pathre.insert(k,1,'\\');
							k+=1;
					}
				}
				string path1 = pathre +"/"+namelist[y+scroll_k-1]->d_name;
				pid_t pid = fork();
				if (pid == 0) {

					int out = open("err.log", O_RDWR|O_CREAT|O_APPEND, 0600);
					if (-1 == out) { perror("opening cout.log"); return 255; }
    					int save_out = dup(fileno(stderr));
   					if (-1 == dup2(out, fileno(stderr))) { perror("cannot redirect stdout"); return 255; }
      					
    			  				
				execl("/usr/bin/xdg-open", "xdg-open", path1.c_str(), (char *)0);
						
    					fflush(stderr); close(out);
  
    					dup2(save_out, fileno(stderr));
   
	
    					close(save_out);
  				
  					exit(1);
				}
				
					}

			break;
			}
			//left-arrow <-
			case 68:{	
				if(back_history.size()==0){
					
					break;
				}
				back++;
				forward_history.push(path);
				
				fkh.push(pathdup);
				path = back_history.top(); pathdup = bkh.top();bkh.pop();
				back_history.pop();
				//printf("\033[2J\033[1;1H");
				real_clean();				
				fflush(stdout);		
				
				print_dirs(0,height);
				
				new_settings.c_lflag &= ~ECHO;

				new_settings.c_lflag &= ~ICANON;

				if(tcsetattr(0, TCSANOW, &new_settings) != 0) {
				fprintf(stderr,"could not set attributes\n");
				}
				y=1;
				scroll_k=0;
				gotoxy(y+start_x-1,1); // y,1//.......y+2
				

			break;
			}
			//right_arrow ->
			case 67:{	
				if(forward_history.size()==0){
					break;
				}
				back--;
				back_history.push(path); bkh.push(pathdup);
				path = forward_history.top();
				pathdup = fkh.top();
				fkh.pop();
				forward_history.pop();
				real_clean();
				
				fflush(stdout);		
				
				print_dirs(0,height);
				
				new_settings.c_lflag &= ~ECHO;

				new_settings.c_lflag &= ~ICANON;

				if(tcsetattr(0, TCSANOW, &new_settings) != 0) {
				fprintf(stderr,"could not set attributes\n");
				}
				y=1;
				scroll_k=0;
				gotoxy(y+start_x-1,1);//y,1/.......y+2
				

			break;
			}
			//home 'h'
			case 104:{
					while(back!=0)
					{
					forward_history.pop();
					fkh.pop();
						back--;
					}
					back=0;
					
					back_history.push(path); bkh.push(pathdup);
					path = home; pathdup = home;
					real_clean();
					cout<<"home acalled";
					//printf("\033[2J\033[1;1H");
					fflush(stdout);		
					
					print_dirs(0,height);
					
					new_settings.c_lflag &= ~ECHO;

					new_settings.c_lflag &= ~ICANON;

					if(tcsetattr(0, TCSANOW, &new_settings) != 0) {
					fprintf(stderr,"could not set attributes\n");
					}
					y=1;
					scroll_k=0;
					gotoxy(y+start_x-1,1);//y,1////.........y+2

					

				
				break;
				}

		}
		if(flag==1){
			break;
		}

	}
	tcsetattr(0,TCSANOW,&initial_settings);
	printf("\033[2J\033[1;1H");
	real_clean();
	return 0;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x260, %rsp            # imm = 0x260
movl $0x0, -0x4(%rbp)
movl %edi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
cmpl $0x1, -0x8(%rbp)
jne 0xceea
leaq 0xa622(%rip), %rdi      # 0x174d8
leaq 0x51a0(%rip), %rsi      # 0x1205d
callq 0x3450
leaq 0xa64f(%rip), %rdi      # 0x17518
leaq 0xa608(%rip), %rsi      # 0x174d8
callq 0x3060
leaq 0xa61c(%rip), %rdi      # 0x174f8
leaq 0xa5f5(%rip), %rsi      # 0x174d8
callq 0x3060
jmp 0xcf11
movq -0x10(%rbp), %rax
movq 0x8(%rax), %rsi
leaq 0xa5df(%rip), %rdi      # 0x174d8
callq 0x3450
leaq 0xa5f3(%rip), %rdi      # 0x174f8
leaq 0xa5cc(%rip), %rsi      # 0x174d8
callq 0x3060
movl $0x2, %edi
leaq -0x90cd(%rip), %rsi     # 0x3e50
callq 0x33e0
callq 0x3f30
leaq 0x563d(%rip), %rdi      # 0x1256b
movb $0x0, %al
callq 0x3070
movq 0xa05c(%rip), %rax      # 0x16f98
movq (%rax), %rdi
callq 0x33c0
movl $0x1, %edi
movl $0x5413, %esi           # imm = 0x5413
leaq 0xa77b(%rip), %rdx      # 0x176d0
movb $0x0, %al
callq 0x3480
xorl %edi, %edi
leaq 0xa5e7(%rip), %rsi      # 0x1754c
callq 0x33a0
leaq 0xa617(%rip), %rdi      # 0x17588
leaq 0xa5d4(%rip), %rsi      # 0x1754c
movl $0x3c, %edx
callq 0x3250
movl 0xa60c(%rip), %eax      # 0x17594
andl $-0x9, %eax
movl %eax, 0xa603(%rip)      # 0x17594
movl 0xa5fd(%rip), %eax      # 0x17594
andl $-0x3, %eax
movl %eax, 0xa5f4(%rip)      # 0x17594
xorl %esi, %esi
leaq 0xa5df(%rip), %rdx      # 0x17588
movl %esi, %edi
callq 0x3440
cmpl $0x0, %eax
je 0xcfcd
movq 0xa014(%rip), %rax      # 0x16fd0
movq (%rax), %rdi
leaq 0x555c(%rip), %rsi      # 0x12522
movb $0x0, %al
callq 0x34a0
movl 0xa34d(%rip), %esi      # 0x17320
xorl %edi, %edi
callq 0x4ce0
movl 0xa344(%rip), %esi      # 0x17324
movl 0xa342(%rip), %edx      # 0x17328
leaq 0x505b(%rip), %rdi      # 0x12048
movb $0x0, %al
callq 0x3070
movl $0x0, -0x1c(%rbp)
callq 0x3470
movb %al, -0x15(%rbp)
movsbl -0x15(%rbp), %eax
movl %eax, -0x20(%rbp)
movl -0x20(%rbp), %eax
movl %eax, -0x1ec(%rbp)
subl $0xa, %eax
je 0xd53f
jmp 0xd01e
movl -0x1ec(%rbp), %eax
subl $0x3a, %eax
je 0xd0a5
jmp 0xd02b
movl -0x1ec(%rbp), %eax
subl $0x41, %eax
je 0xd362
jmp 0xd03c
movl -0x1ec(%rbp), %eax
subl $0x42, %eax
je 0xd40d
jmp 0xd04d
movl -0x1ec(%rbp), %eax
subl $0x43, %eax
je 0xdd26
jmp 0xd05e
movl -0x1ec(%rbp), %eax
subl $0x44, %eax
je 0xdbe5
jmp 0xd06f
movl -0x1ec(%rbp), %eax
subl $0x68, %eax
je 0xde67
jmp 0xd080
movl -0x1ec(%rbp), %eax
subl $0x71, %eax
je 0xd533
jmp 0xd091
movl -0x1ec(%rbp), %eax
subl $0x7f, %eax
je 0xd13d
jmp 0xdfa6
callq 0x6dd0
movl 0xa270(%rip), %esi      # 0x17320
xorl %edi, %edi
callq 0x4ce0
movl 0xa4d7(%rip), %eax      # 0x17594
andl $-0x9, %eax
movl %eax, 0xa4ce(%rip)      # 0x17594
movl 0xa4c8(%rip), %eax      # 0x17594
andl $-0x3, %eax
movl %eax, 0xa4bf(%rip)      # 0x17594
xorl %esi, %esi
leaq 0xa4aa(%rip), %rdx      # 0x17588
movl %esi, %edi
callq 0x3440
cmpl $0x0, %eax
je 0xd102
movq 0x9edf(%rip), %rax      # 0x16fd0
movq (%rax), %rdi
leaq 0x5427(%rip), %rsi      # 0x12522
movb $0x0, %al
callq 0x34a0
movl $0x1, 0xa220(%rip)      # 0x1732c
movl $0x0, 0xa432(%rip)      # 0x17548
movl 0xa210(%rip), %esi      # 0x1732c
addl 0xa202(%rip), %esi      # 0x17324
subl $0x1, %esi
leaq 0x4f1c(%rip), %rdi      # 0x12048
movl $0x1, %edx
movb $0x0, %al
callq 0x3070
jmp 0xdfa6
leaq 0xa3b4(%rip), %rdi      # 0x174f8
leaq 0xa3cd(%rip), %rsi      # 0x17518
callq 0x3050
cmpl $0x0, %eax
jne 0xd15a
jmp 0xdfa6
jmp 0xd15c
cmpl $0x0, 0xa36d(%rip)      # 0x174d0
je 0xd18e
leaq 0xa274(%rip), %rdi      # 0x173e0
callq 0xe610
leaq 0xa308(%rip), %rdi      # 0x17480
callq 0xe610
movl 0xa34d(%rip), %eax      # 0x174d0
addl $-0x1, %eax
movl %eax, 0xa344(%rip)      # 0x174d0
jmp 0xd15c
movl $0x0, 0xa338(%rip)      # 0x174d0
leaq 0xa1f1(%rip), %rdi      # 0x17390
leaq 0xa332(%rip), %rsi      # 0x174d8
callq 0xe630
leaq 0xa27e(%rip), %rdi      # 0x17430
leaq 0xa33f(%rip), %rsi      # 0x174f8
movq %rsi, -0x200(%rbp)
callq 0xe630
movq -0x200(%rbp), %rsi
leaq -0x60(%rbp), %rdi
movq %rdi, -0x1f8(%rbp)
callq 0x3150
movq -0x1f8(%rbp), %rsi
leaq -0x40(%rbp), %rdi
callq 0x3dd0
jmp 0xd1ee
leaq 0xa303(%rip), %rdi      # 0x174f8
leaq -0x40(%rbp), %rsi
movq %rsi, -0x210(%rbp)
callq 0x3400
movq -0x210(%rbp), %rdi
callq 0x3628
leaq -0x60(%rbp), %rdi
callq 0x3628
leaq 0xa2b7(%rip), %rsi      # 0x174d8
leaq 0x4e31(%rip), %rdx      # 0x12059
leaq -0xb0(%rbp), %rdi
movq %rdi, -0x208(%rbp)
callq 0xe2a0
movq -0x208(%rbp), %rsi
movq 0xa2ef(%rip), %rax      # 0x17538
movq 0x8(%rax), %rdx
addq $0x13, %rdx
leaq -0x90(%rbp), %rdi
callq 0xe320
jmp 0xd25f
leaq 0xa272(%rip), %rdi      # 0x174d8
leaq -0x90(%rbp), %rsi
callq 0x3400
leaq -0x90(%rbp), %rdi
callq 0x3628
leaq -0xb0(%rbp), %rdi
callq 0x3628
callq 0x3f30
movq 0x9d02(%rip), %rax      # 0x16f98
movq (%rax), %rdi
callq 0x33c0
movl 0xa07c(%rip), %esi      # 0x17320
xorl %edi, %edi
callq 0x4ce0
movl 0xa2e3(%rip), %eax      # 0x17594
andl $-0x9, %eax
movl %eax, 0xa2da(%rip)      # 0x17594
movl 0xa2d4(%rip), %eax      # 0x17594
andl $-0x3, %eax
movl %eax, 0xa2cb(%rip)      # 0x17594
xorl %esi, %esi
leaq 0xa2b6(%rip), %rdx      # 0x17588
movl %esi, %edi
callq 0x3440
cmpl $0x0, %eax
je 0xd32f
movq 0x9ceb(%rip), %rax      # 0x16fd0
movq (%rax), %rdi
leaq 0x5233(%rip), %rsi      # 0x12522
movb $0x0, %al
callq 0x34a0
jmp 0xd32f
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x68(%rbp)
movl %eax, -0x6c(%rbp)
leaq -0x60(%rbp), %rdi
callq 0x3628
jmp 0xdfe9
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x68(%rbp)
movl %eax, -0x6c(%rbp)
leaq -0xb0(%rbp), %rdi
callq 0x3628
jmp 0xdfe9
movl $0x1, 0x9ff3(%rip)      # 0x1732c
movl $0x0, 0xa205(%rip)      # 0x17548
movl 0x9fdb(%rip), %esi      # 0x17324
movl 0x9fd9(%rip), %edx      # 0x17328
leaq 0x4cf2(%rip), %rdi      # 0x12048
movb $0x0, %al
callq 0x3070
jmp 0xdfa6
cmpl $0x2, 0x9fc3(%rip)      # 0x1732c
jl 0xd3a1
movl 0x9fbb(%rip), %eax      # 0x1732c
addl $-0x1, %eax
movl %eax, 0x9fb2(%rip)      # 0x1732c
movl 0x9fac(%rip), %esi      # 0x1732c
addl 0x9f9e(%rip), %esi      # 0x17324
subl $0x1, %esi
leaq 0x4cb8(%rip), %rdi      # 0x12048
movl $0x1, %edx
movb $0x0, %al
callq 0x3070
jmp 0xdfa6
cmpl $0x0, 0xa1a0(%rip)      # 0x17548
je 0xd406
movl 0x9f74(%rip), %esi      # 0x17324
movl 0x9f72(%rip), %edx      # 0x17328
leaq 0x4c8b(%rip), %rdi      # 0x12048
movb $0x0, %al
callq 0x3070
movl 0xa17e(%rip), %eax      # 0x17548
subl $0x1, %eax
movl %eax, 0xa175(%rip)      # 0x17548
movl 0xa16f(%rip), %edi      # 0x17548
movl 0x9f41(%rip), %esi      # 0x17320
addl 0xa163(%rip), %esi      # 0x17548
callq 0x4ce0
movl 0x9f34(%rip), %esi      # 0x17324
movl 0x9f32(%rip), %edx      # 0x17328
leaq 0x4c4b(%rip), %rdi      # 0x12048
movb $0x0, %al
callq 0x3070
jmp 0xd408
jmp 0xd408
jmp 0xdfa6
movl 0xa1ed(%rip), %eax      # 0x17600
cmpl 0x9f07(%rip), %eax      # 0x17320
jle 0xd4ed
movl 0x9efb(%rip), %eax      # 0x17320
movl 0x9ef5(%rip), %ecx      # 0x17320
subl 0x9efb(%rip), %ecx      # 0x1732c
subl %ecx, %eax
addl 0xa10f(%rip), %eax      # 0x17548
cmpl 0xa1c1(%rip), %eax      # 0x17600
jge 0xd4eb
movl 0x9ee1(%rip), %eax      # 0x1732c
cmpl 0x9ecf(%rip), %eax      # 0x17320
jge 0xd489
movl 0x9ed3(%rip), %eax      # 0x1732c
addl $0x1, %eax
movl %eax, 0x9eca(%rip)      # 0x1732c
movl 0x9ec4(%rip), %esi      # 0x1732c
addl 0x9eb6(%rip), %esi      # 0x17324
subl $0x1, %esi
leaq 0x4bd0(%rip), %rdi      # 0x12048
movl $0x1, %edx
movb $0x0, %al
callq 0x3070
jmp 0xdfa6
movl 0x9e95(%rip), %esi      # 0x17324
movl 0x9e93(%rip), %edx      # 0x17328
leaq 0x4bac(%rip), %rdi      # 0x12048
movb $0x0, %al
callq 0x3070
movl 0xa09f(%rip), %eax      # 0x17548
addl $0x1, %eax
movl %eax, 0xa096(%rip)      # 0x17548
movl 0xa090(%rip), %edi      # 0x17548
movl 0x9e62(%rip), %esi      # 0x17320
addl 0xa084(%rip), %esi      # 0x17548
callq 0x4ce0
movl 0x9e51(%rip), %esi      # 0x17320
addl 0x9e4f(%rip), %esi      # 0x17324
subl $0x1, %esi
leaq 0x4b69(%rip), %rdi      # 0x12048
movl $0x1, %edx
movb $0x0, %al
callq 0x3070
jmp 0xd52e
movl 0x9e39(%rip), %eax      # 0x1732c
cmpl 0xa107(%rip), %eax      # 0x17600
jge 0xd52c
movl 0x9e2b(%rip), %eax      # 0x1732c
addl $0x1, %eax
movl %eax, 0x9e22(%rip)      # 0x1732c
movl 0x9e1c(%rip), %esi      # 0x1732c
addl 0x9e0e(%rip), %esi      # 0x17324
subl $0x1, %esi
leaq 0x4b28(%rip), %rdi      # 0x12048
movl $0x1, %edx
movb $0x0, %al
callq 0x3070
jmp 0xd52e
jmp 0xdfa6
movl $0x1, -0x1c(%rbp)
jmp 0xdfa6
movl 0x9de7(%rip), %eax      # 0x1732c
addl 0x9ffd(%rip), %eax      # 0x17548
subl $0x1, %eax
cmpl $0x0, %eax
jne 0xd558
jmp 0xdfa6
movl 0x9dce(%rip), %eax      # 0x1732c
addl 0x9fe4(%rip), %eax      # 0x17548
subl $0x1, %eax
cmpl $0x1, %eax
jne 0xd589
leaq 0x9f85(%rip), %rdi      # 0x174f8
leaq 0x9f9e(%rip), %rsi      # 0x17518
callq 0x3050
cmpl $0x0, %eax
jne 0xd589
jmp 0xdfa6
jmp 0xd58b
cmpl $0x0, 0x9f3e(%rip)      # 0x174d0
je 0xd5bd
leaq 0x9e45(%rip), %rdi      # 0x173e0
callq 0xe610
leaq 0x9ed9(%rip), %rdi      # 0x17480
callq 0xe610
movl 0x9f1e(%rip), %eax      # 0x174d0
addl $-0x1, %eax
movl %eax, 0x9f15(%rip)      # 0x174d0
jmp 0xd58b
movl $0x0, 0x9f09(%rip)      # 0x174d0
movq 0x9f6a(%rip), %rax      # 0x17538
movl 0x9d58(%rip), %ecx      # 0x1732c
addl 0x9f6e(%rip), %ecx      # 0x17548
subl $0x1, %ecx
movslq %ecx, %rcx
movq (%rax,%rcx,8), %rax
movzbl 0x12(%rax), %eax
cmpl $0x4, %eax
jne 0xd8c6
movl 0x9d35(%rip), %eax      # 0x1732c
addl 0x9f4b(%rip), %eax      # 0x17548
subl $0x1, %eax
cmpl $0x1, %eax
jne 0xd69f
leaq 0x9e20(%rip), %rdi      # 0x17430
leaq 0x9ee1(%rip), %rsi      # 0x174f8
movq %rsi, -0x220(%rbp)
callq 0xe630
movq -0x220(%rbp), %rsi
leaq -0xf0(%rbp), %rdi
movq %rdi, -0x218(%rbp)
callq 0x3150
movq -0x218(%rbp), %rsi
leaq -0xd0(%rbp), %rdi
callq 0x3dd0
jmp 0xd652
leaq 0x9e9f(%rip), %rdi      # 0x174f8
leaq -0xd0(%rbp), %rsi
callq 0x3400
leaq -0xd0(%rbp), %rdi
callq 0x3628
leaq -0xf0(%rbp), %rdi
callq 0x3628
jmp 0xd75f
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x68(%rbp)
movl %eax, -0x6c(%rbp)
leaq -0xf0(%rbp), %rdi
callq 0x3628
jmp 0xdfe9
leaq 0x9d8a(%rip), %rdi      # 0x17430
leaq 0x9e4b(%rip), %rsi      # 0x174f8
movq %rsi, -0x230(%rbp)
callq 0xe630
movq -0x230(%rbp), %rsi
leaq 0x4992(%rip), %rdx      # 0x12059
leaq -0x130(%rbp), %rdi
movq %rdi, -0x228(%rbp)
callq 0xe2a0
movq -0x228(%rbp), %rsi
movq 0x9e50(%rip), %rax      # 0x17538
movl 0x9c3e(%rip), %edi      # 0x1732c
movl 0x9e54(%rip), %ecx      # 0x17548
movl %ecx, %edx
movl %edi, %ecx
leal -0x1(%rcx,%rdx), %ecx
movslq %ecx, %rcx
movq (%rax,%rcx,8), %rdx
addq $0x13, %rdx
leaq -0x110(%rbp), %rdi
callq 0xe320
jmp 0xd715
leaq 0x9ddc(%rip), %rdi      # 0x174f8
leaq -0x110(%rbp), %rsi
callq 0x3400
leaq -0x110(%rbp), %rdi
callq 0x3628
leaq -0x130(%rbp), %rdi
callq 0x3628
jmp 0xd75f
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x68(%rbp)
movl %eax, -0x6c(%rbp)
leaq -0x130(%rbp), %rdi
callq 0x3628
jmp 0xdfe9
leaq 0x9c2a(%rip), %rdi      # 0x17390
leaq 0x9d6b(%rip), %rsi      # 0x174d8
movq %rsi, -0x240(%rbp)
callq 0xe630
movq -0x240(%rbp), %rsi
leaq 0x48d2(%rip), %rdx      # 0x12059
leaq -0x170(%rbp), %rdi
movq %rdi, -0x238(%rbp)
callq 0xe2a0
movq -0x238(%rbp), %rsi
movq 0x9d90(%rip), %rax      # 0x17538
movl 0x9b7e(%rip), %edi      # 0x1732c
movl 0x9d94(%rip), %ecx      # 0x17548
movl %ecx, %edx
movl %edi, %ecx
leal -0x1(%rcx,%rdx), %ecx
movslq %ecx, %rcx
movq (%rax,%rcx,8), %rdx
addq $0x13, %rdx
leaq -0x150(%rbp), %rdi
callq 0xe320
jmp 0xd7d5
leaq 0x9cfc(%rip), %rdi      # 0x174d8
leaq -0x150(%rbp), %rsi
callq 0x3400
leaq -0x150(%rbp), %rdi
callq 0x3628
leaq -0x170(%rbp), %rdi
callq 0x3628
callq 0x3f30
movq 0x978c(%rip), %rax      # 0x16f98
movq (%rax), %rdi
callq 0x33c0
movl 0x9b06(%rip), %esi      # 0x17320
xorl %edi, %edi
callq 0x4ce0
movl 0x9d6d(%rip), %eax      # 0x17594
andl $-0x9, %eax
movl %eax, 0x9d64(%rip)      # 0x17594
movl 0x9d5e(%rip), %eax      # 0x17594
andl $-0x3, %eax
movl %eax, 0x9d55(%rip)      # 0x17594
xorl %esi, %esi
leaq 0x9d40(%rip), %rdx      # 0x17588
movl %esi, %edi
callq 0x3440
cmpl $0x0, %eax
je 0xd88b
movq 0x9775(%rip), %rax      # 0x16fd0
movq (%rax), %rdi
leaq 0x4cbd(%rip), %rsi      # 0x12522
movb $0x0, %al
callq 0x34a0
jmp 0xd88b
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x68(%rbp)
movl %eax, -0x6c(%rbp)
leaq -0x170(%rbp), %rdi
callq 0x3628
jmp 0xdfe9
movl $0x1, 0x9a97(%rip)      # 0x1732c
movl $0x0, 0x9ca9(%rip)      # 0x17548
movl 0x9a87(%rip), %esi      # 0x1732c
addl 0x9a79(%rip), %esi      # 0x17324
subl $0x1, %esi
leaq 0x4793(%rip), %rdi      # 0x12048
movl $0x1, %edx
movb $0x0, %al
callq 0x3070
jmp 0xdbe0
leaq -0x190(%rbp), %rdi
leaq 0x9c04(%rip), %rsi      # 0x174d8
callq 0x3150
movl $0x0, -0x194(%rbp)
movslq -0x194(%rbp), %rax
movq %rax, -0x248(%rbp)
leaq 0x9be0(%rip), %rdi      # 0x174d8
callq 0x3200
movq %rax, %rcx
movq -0x248(%rbp), %rax
cmpq %rcx, %rax
jae 0xd992
movslq -0x194(%rbp), %rsi
leaq -0x190(%rbp), %rdi
callq 0x3600
movq %rax, -0x250(%rbp)
jmp 0xd92c
movq -0x250(%rbp), %rax
movsbl (%rax), %eax
cmpl $0x20, %eax
jne 0xd97c
movslq -0x194(%rbp), %rsi
leaq -0x190(%rbp), %rdi
movl $0x1, %edx
movl $0x5c, %ecx
callq 0x3610
jmp 0xd95a
movl -0x194(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x194(%rbp)
jmp 0xd97c
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x68(%rbp)
movl %eax, -0x6c(%rbp)
jmp 0xdbcf
jmp 0xd97e
movl -0x194(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x194(%rbp)
jmp 0xd8e3
leaq 0x46c0(%rip), %rdx      # 0x12059
leaq -0x1d8(%rbp), %rdi
leaq -0x190(%rbp), %rsi
callq 0xe2a0
jmp 0xd9ae
movq 0x9b83(%rip), %rax      # 0x17538
movl 0x9971(%rip), %esi      # 0x1732c
movl 0x9b87(%rip), %ecx      # 0x17548
movl %ecx, %edx
movl %esi, %ecx
leal -0x1(%rcx,%rdx), %ecx
movslq %ecx, %rcx
movq (%rax,%rcx,8), %rdx
addq $0x13, %rdx
leaq -0x1b8(%rbp), %rdi
leaq -0x1d8(%rbp), %rsi
callq 0xe320
jmp 0xd9e9
leaq -0x1d8(%rbp), %rdi
callq 0x3628
callq 0x30d0
movl %eax, -0x1dc(%rbp)
cmpl $0x0, -0x1dc(%rbp)
jne 0xdb9a
leaq 0x4684(%rip), %rdi      # 0x12098
xorl %eax, %eax
movl $0x442, %esi            # imm = 0x442
movl $0x180, %edx            # imm = 0x180
callq 0x3220
movl %eax, -0x254(%rbp)
jmp 0xda2d
movl -0x254(%rbp), %eax
movl %eax, -0x1e0(%rbp)
movl $0xffffffff, %eax       # imm = 0xFFFFFFFF
cmpl -0x1e0(%rbp), %eax
jne 0xdaa4
leaq 0x4653(%rip), %rdi      # 0x120a0
callq 0x3260
jmp 0xda54
movl $0xff, -0x4(%rbp)
movl $0x1, -0x1e4(%rbp)
jmp 0xdba4
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x68(%rbp)
movl %eax, -0x6c(%rbp)
leaq -0x1d8(%rbp), %rdi
callq 0x3628
jmp 0xdbcf
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x68(%rbp)
movl %eax, -0x6c(%rbp)
leaq -0x1b8(%rbp), %rdi
callq 0x3628
jmp 0xdbcf
movq 0x9525(%rip), %rax      # 0x16fd0
movq (%rax), %rdi
callq 0x3350
movl %eax, %edi
callq 0x34d0
movl %eax, -0x1e8(%rbp)
movl -0x1e0(%rbp), %eax
movl %eax, -0x258(%rbp)
movq 0x94fd(%rip), %rax      # 0x16fd0
movq (%rax), %rdi
callq 0x3350
movl -0x258(%rbp), %edi
movl %eax, %esi
callq 0x32c0
movl %eax, %ecx
movl $0xffffffff, %eax       # imm = 0xFFFFFFFF
cmpl %ecx, %eax
jne 0xdb17
leaq 0x45b7(%rip), %rdi      # 0x120b1
callq 0x3260
jmp 0xdb01
movl $0xff, -0x4(%rbp)
movl $0x1, -0x1e4(%rbp)
jmp 0xdba4
leaq -0x1b8(%rbp), %rdi
callq 0x3140
movq %rax, %rdx
leaq 0x459b(%rip), %rdi      # 0x120c8
leaq 0x459d(%rip), %rsi      # 0x120d1
xorl %eax, %eax
movl %eax, %ecx
callq 0x3420
movq 0x948c(%rip), %rax      # 0x16fd0
movq (%rax), %rdi
callq 0x33c0
jmp 0xdb4e
movl -0x1e0(%rbp), %edi
callq 0x35e0
jmp 0xdb5b
movl -0x1e8(%rbp), %eax
movl %eax, -0x25c(%rbp)
movq 0x9462(%rip), %rax      # 0x16fd0
movq (%rax), %rdi
callq 0x3350
movl -0x25c(%rbp), %edi
movl %eax, %esi
callq 0x32c0
movl -0x1e8(%rbp), %edi
callq 0x35e0
jmp 0xdb90
movl $0x1, %edi
callq 0x33f0
movl $0x0, -0x1e4(%rbp)
leaq -0x1b8(%rbp), %rdi
callq 0x3628
leaq -0x190(%rbp), %rdi
callq 0x3628
movl -0x1e4(%rbp), %eax
testl %eax, %eax
je 0xdbcd
jmp 0xdbc8
jmp 0xdfdd
jmp 0xdbe0
leaq -0x190(%rbp), %rdi
callq 0x3628
jmp 0xdfe9
jmp 0xdfa6
leaq 0x97a4(%rip), %rdi      # 0x17390
callq 0xe6b0
cmpq $0x0, %rax
jne 0xdbfc
jmp 0xdfa6
movl 0x98ce(%rip), %eax      # 0x174d0
addl $0x1, %eax
movl %eax, 0x98c5(%rip)      # 0x174d0
leaq 0x97ce(%rip), %rdi      # 0x173e0
leaq 0x98bf(%rip), %rsi      # 0x174d8
callq 0xe630
leaq 0x985b(%rip), %rdi      # 0x17480
leaq 0x98cc(%rip), %rsi      # 0x174f8
callq 0xe630
leaq 0x9758(%rip), %rdi      # 0x17390
callq 0xe6d0
movq %rax, %rsi
leaq 0x9891(%rip), %rdi      # 0x174d8
callq 0x3060
leaq 0x97dd(%rip), %rdi      # 0x17430
callq 0xe6d0
movq %rax, %rsi
leaq 0x9896(%rip), %rdi      # 0x174f8
callq 0x3060
leaq 0x97c2(%rip), %rdi      # 0x17430
callq 0xe610
leaq 0x9716(%rip), %rdi      # 0x17390
callq 0xe610
callq 0x3f30
movq 0x930d(%rip), %rax      # 0x16f98
movq (%rax), %rdi
callq 0x33c0
movl 0x9687(%rip), %esi      # 0x17320
xorl %edi, %edi
callq 0x4ce0
movl 0x98ee(%rip), %eax      # 0x17594
andl $-0x9, %eax
movl %eax, 0x98e5(%rip)      # 0x17594
movl 0x98df(%rip), %eax      # 0x17594
andl $-0x3, %eax
movl %eax, 0x98d6(%rip)      # 0x17594
xorl %esi, %esi
leaq 0x98c1(%rip), %rdx      # 0x17588
movl %esi, %edi
callq 0x3440
cmpl $0x0, %eax
je 0xdceb
movq 0x92f6(%rip), %rax      # 0x16fd0
movq (%rax), %rdi
leaq 0x483e(%rip), %rsi      # 0x12522
movb $0x0, %al
callq 0x34a0
movl $0x1, 0x9637(%rip)      # 0x1732c
movl $0x0, 0x9849(%rip)      # 0x17548
movl 0x9627(%rip), %esi      # 0x1732c
addl 0x9619(%rip), %esi      # 0x17324
subl $0x1, %esi
leaq 0x4333(%rip), %rdi      # 0x12048
movl $0x1, %edx
movb $0x0, %al
callq 0x3070
jmp 0xdfa6
leaq 0x96b3(%rip), %rdi      # 0x173e0
callq 0xe6b0
cmpq $0x0, %rax
jne 0xdd3d
jmp 0xdfa6
movl 0x978d(%rip), %eax      # 0x174d0
addl $-0x1, %eax
movl %eax, 0x9784(%rip)      # 0x174d0
leaq 0x963d(%rip), %rdi      # 0x17390
leaq 0x977e(%rip), %rsi      # 0x174d8
callq 0xe630
leaq 0x96ca(%rip), %rdi      # 0x17430
leaq 0x978b(%rip), %rsi      # 0x174f8
callq 0xe630
leaq 0x9667(%rip), %rdi      # 0x173e0
callq 0xe6d0
movq %rax, %rsi
leaq 0x9750(%rip), %rdi      # 0x174d8
callq 0x3060
leaq 0x96ec(%rip), %rdi      # 0x17480
callq 0xe6d0
movq %rax, %rsi
leaq 0x9755(%rip), %rdi      # 0x174f8
callq 0x3060
leaq 0x96d1(%rip), %rdi      # 0x17480
callq 0xe610
leaq 0x9625(%rip), %rdi      # 0x173e0
callq 0xe610
callq 0x3f30
movq 0x91cc(%rip), %rax      # 0x16f98
movq (%rax), %rdi
callq 0x33c0
movl 0x9546(%rip), %esi      # 0x17320
xorl %edi, %edi
callq 0x4ce0
movl 0x97ad(%rip), %eax      # 0x17594
andl $-0x9, %eax
movl %eax, 0x97a4(%rip)      # 0x17594
movl 0x979e(%rip), %eax      # 0x17594
andl $-0x3, %eax
movl %eax, 0x9795(%rip)      # 0x17594
xorl %esi, %esi
leaq 0x9780(%rip), %rdx      # 0x17588
movl %esi, %edi
callq 0x3440
cmpl $0x0, %eax
je 0xde2c
movq 0x91b5(%rip), %rax      # 0x16fd0
movq (%rax), %rdi
leaq 0x46fd(%rip), %rsi      # 0x12522
movb $0x0, %al
callq 0x34a0
movl $0x1, 0x94f6(%rip)      # 0x1732c
movl $0x0, 0x9708(%rip)      # 0x17548
movl 0x94e6(%rip), %esi      # 0x1732c
addl 0x94d8(%rip), %esi      # 0x17324
subl $0x1, %esi
leaq 0x41f2(%rip), %rdi      # 0x12048
movl $0x1, %edx
movb $0x0, %al
callq 0x3070
jmp 0xdfa6
jmp 0xde69
cmpl $0x0, 0x9660(%rip)      # 0x174d0
je 0xde9b
leaq 0x9567(%rip), %rdi      # 0x173e0
callq 0xe610
leaq 0x95fb(%rip), %rdi      # 0x17480
callq 0xe610
movl 0x9640(%rip), %eax      # 0x174d0
addl $-0x1, %eax
movl %eax, 0x9637(%rip)      # 0x174d0
jmp 0xde69
movl $0x0, 0x962b(%rip)      # 0x174d0
leaq 0x94e4(%rip), %rdi      # 0x17390
leaq 0x9625(%rip), %rsi      # 0x174d8
callq 0xe630
leaq 0x9571(%rip), %rdi      # 0x17430
leaq 0x9632(%rip), %rsi      # 0x174f8
callq 0xe630
leaq 0x9606(%rip), %rdi      # 0x174d8
leaq 0x963f(%rip), %rsi      # 0x17518
callq 0x3060
leaq 0x9613(%rip), %rdi      # 0x174f8
leaq 0x962c(%rip), %rsi      # 0x17518
callq 0x3060
callq 0x3f30
movq 0x90cb(%rip), %rdi      # 0x16fc8
leaq 0x4672(%rip), %rsi      # 0x12576
callq 0x32e0
movq 0x9088(%rip), %rax      # 0x16f98
movq (%rax), %rdi
callq 0x33c0
movl 0x9402(%rip), %esi      # 0x17320
xorl %edi, %edi
callq 0x4ce0
movl 0x9669(%rip), %eax      # 0x17594
andl $-0x9, %eax
movl %eax, 0x9660(%rip)      # 0x17594
movl 0x965a(%rip), %eax      # 0x17594
andl $-0x3, %eax
movl %eax, 0x9651(%rip)      # 0x17594
xorl %esi, %esi
leaq 0x963c(%rip), %rdx      # 0x17588
movl %esi, %edi
callq 0x3440
cmpl $0x0, %eax
je 0xdf70
movq 0x9071(%rip), %rax      # 0x16fd0
movq (%rax), %rdi
leaq 0x45b9(%rip), %rsi      # 0x12522
movb $0x0, %al
callq 0x34a0
movl $0x1, 0x93b2(%rip)      # 0x1732c
movl $0x0, 0x95c4(%rip)      # 0x17548
movl 0x93a2(%rip), %esi      # 0x1732c
addl 0x9394(%rip), %esi      # 0x17324
subl $0x1, %esi
leaq 0x40ae(%rip), %rdi      # 0x12048
movl $0x1, %edx
movb $0x0, %al
callq 0x3070
cmpl $0x1, -0x1c(%rbp)
jne 0xdfae
jmp 0xdfb3
jmp 0xcffb
xorl %esi, %esi
leaq 0x9590(%rip), %rdx      # 0x1754c
movl %esi, %edi
callq 0x3440
leaq 0x45a1(%rip), %rdi      # 0x1256b
movb $0x0, %al
callq 0x3070
callq 0x3f30
movl $0x0, -0x4(%rbp)
movl -0x4(%rbp), %eax
addq $0x260, %rsp            # imm = 0x260
popq %rbp
retq
movq -0x68(%rbp), %rdi
callq 0x3570
nopw %cs:(%rax,%rax)
nopl (%rax)