// File: /workspace/github_cpp_makefile_star2_O1/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
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0xb8, %rsp
cmpl $0x1, %edi
jne 0xe780
movq 0x6cdf(%rip), %rdx      # 0x15430
leaq 0x6cd0(%rip), %rbx      # 0x15428
leaq 0x293e(%rip), %rcx      # 0x1109d
movl $0x1, %r8d
movq %rbx, %rdi
xorl %esi, %esi
callq 0x33d0
leaq 0x6cf2(%rip), %rdi      # 0x15468
movq %rbx, %rsi
callq 0x3150
jmp 0xe7ad
movq 0x8(%rsi), %rbx
movq 0x6ca5(%rip), %r14      # 0x15430
leaq 0x6c96(%rip), %r15      # 0x15428
movq %rbx, %rdi
callq 0x3110
movq %r15, %rdi
xorl %esi, %esi
movq %r14, %rdx
movq %rbx, %rcx
movq %rax, %r8
callq 0x33d0
leaq 0x6c94(%rip), %rdi      # 0x15448
leaq 0x6c6d(%rip), %rsi      # 0x15428
callq 0x3150
leaq -0xab20(%rip), %rsi     # 0x3ca7
movl $0x2, %edi
callq 0x3300
callq 0x3d7f
leaq 0x2dce(%rip), %rdi      # 0x115ab
xorl %eax, %eax
callq 0x3060
movq 0x67b5(%rip), %rax      # 0x14fa0
movq (%rax), %rdi
callq 0x32e0
leaq 0x6e26(%rip), %rdx      # 0x15620
movl $0x5413, %esi           # imm = 0x5413
movl $0x1, %edi
xorl %eax, %eax
callq 0x3380
leaq 0x6c8a(%rip), %rsi      # 0x1549c
xorl %edi, %edi
callq 0x32a0
movups 0x6c7c(%rip), %xmm0     # 0x1549c
movups %xmm0, 0x6cb1(%rip)     # 0x154d8
movups 0x6c7e(%rip), %xmm0     # 0x154ac
movups %xmm0, 0x6cb3(%rip)     # 0x154e8
movups 0x6c80(%rip), %xmm0     # 0x154bc
movups %xmm0, 0x6cb5(%rip)     # 0x154f8
movups 0x6c7e(%rip), %xmm0     # 0x154c8
movups %xmm0, 0x6cb3(%rip)     # 0x15504
leaq 0x6c80(%rip), %rdx      # 0x154d8
andb $-0xb, 0x6c85(%rip)     # 0x154e4
xorl %edi, %edi
xorl %esi, %esi
callq 0x3350
testl %eax, %eax
jne 0xf6cd
movl 0x69fa(%rip), %esi      # 0x15270
xorl %edi, %edi
callq 0x49be
movl 0x69f1(%rip), %esi      # 0x15274
movl 0x69ef(%rip), %edx      # 0x15278
leaq 0x27f8(%rip), %rdi      # 0x11088
xorl %eax, %eax
callq 0x3060
leaq 0x38(%rsp), %rbp
leaq 0x28(%rsp), %rdi
leaq 0x6b80(%rip), %r15      # 0x15428
leaq 0x50(%rsp), %r12
xorl %ebx, %ebx
movl $0x0, 0x4c(%rsp)
movq %rdi, %r14
callq 0x3370
movsbl %al, %eax
cmpl $0x67, %eax
jg 0xe921
leal -0x3a(%rax), %ecx
cmpl $0xa, %ecx
ja 0xea5c
leaq 0x2732(%rip), %rdx      # 0x1100c
movslq (%rdx,%rcx,4), %rax
addq %rdx, %rax
movq %r14, %rdi
jmpq *%rax
callq 0x6b02
movl 0x697f(%rip), %esi      # 0x15270
xorl %edi, %edi
callq 0x49be
andb $-0xb, 0x6be5(%rip)     # 0x154e4
xorl %edi, %edi
xorl %esi, %esi
leaq 0x6bce(%rip), %rdx      # 0x154d8
callq 0x3350
testl %eax, %eax
je 0xf631
callq 0x35b8
jmp 0xf631
cmpl $0x7f, %eax
je 0xeefd
cmpl $0x71, %eax
je 0xf088
cmpl $0x68, %eax
jne 0xf65e
movl %ebx, %r13d
movq %rbp, %rbx
cmpl $0x0, 0x6ad7(%rip)      # 0x15420
leaq 0x69e0(%rip), %r12      # 0x15330
leaq 0x6a79(%rip), %rbp      # 0x153d0
je 0xe971
movq %r12, %rdi
callq 0x104d6
movq %rbp, %rdi
callq 0x104d6
decl 0x6ab1(%rip)            # 0x15420
jne 0xe959
movl $0x0, 0x6aa5(%rip)      # 0x15420
leaq 0x695e(%rip), %rdi      # 0x152e0
movq %r15, %rsi
callq 0x10562
leaq 0x69ef(%rip), %rdi      # 0x15380
leaq 0x6ab0(%rip), %rbp      # 0x15448
movq %rbp, %rsi
callq 0x10562
movq %r15, %rdi
leaq 0x6abe(%rip), %r12      # 0x15468
movq %r12, %rsi
callq 0x3150
movq %rbp, %rdi
movq %r12, %rsi
callq 0x3150
callq 0x3d7f
movl $0xc, %edx
movq 0x65fa(%rip), %rdi      # 0x14fc8
leaq 0x2be1(%rip), %rsi      # 0x115b6
callq 0x32c0
movq 0x65bf(%rip), %rax      # 0x14fa0
movq (%rax), %rdi
callq 0x32e0
movl 0x6881(%rip), %esi      # 0x15270
xorl %edi, %edi
callq 0x49be
andb $-0xb, 0x6ae7(%rip)     # 0x154e4
xorl %edi, %edi
xorl %esi, %esi
leaq 0x6ad0(%rip), %rdx      # 0x154d8
callq 0x3350
testl %eax, %eax
jne 0xf492
movl $0x1, 0x685d(%rip)      # 0x1527c
movl $0x0, 0x6a6f(%rip)      # 0x15498
movl 0x6845(%rip), %esi      # 0x15274
leaq 0x2652(%rip), %rdi      # 0x11088
movl $0x1, %edx
xorl %eax, %eax
callq 0x3060
movq %r14, %rdi
leaq 0x69dc(%rip), %r15      # 0x15428
leaq 0x50(%rsp), %r12
movq %rbx, %rbp
movl %r13d, %ebx
jmp 0xf661
cmpl $0xa, %eax
movq %r14, %rdi
jne 0xf661
movl 0x6a2a(%rip), %eax      # 0x15498
addl 0x6808(%rip), %eax      # 0x1527c
cmpl $0x1, %eax
je 0xf661
cmpl $0x2, %eax
jne 0xea9d
leaq 0x69bf(%rip), %rdi      # 0x15448
leaq 0x69d8(%rip), %rsi      # 0x15468
callq 0x3050
testl %eax, %eax
je 0xf65e
cmpl $0x0, 0x697c(%rip)      # 0x15420
leaq 0x6885(%rip), %r15      # 0x15330
leaq 0x691e(%rip), %r13      # 0x153d0
je 0xeacc
movq %r15, %rdi
callq 0x104d6
movq %r13, %rdi
callq 0x104d6
decl 0x6956(%rip)            # 0x15420
jne 0xeab4
movl $0x0, 0x694a(%rip)      # 0x15420
movq 0x69ab(%rip), %rax      # 0x15488
movl 0x6799(%rip), %ecx      # 0x1527c
movl 0x69af(%rip), %edx      # 0x15498
leal (%rcx,%rdx), %ebp
decl %ebp
movslq %ebp, %rcx
movq (%rax,%rcx,8), %rax
cmpb $0x4, 0x12(%rax)
jne 0xf1f2
leaq 0x687a(%rip), %rdi      # 0x15380
leaq 0x693b(%rip), %rsi      # 0x15448
callq 0x10562
cmpl $0x1, %ebp
jne 0xf2d6
movl %ebx, %r15d
leaq 0x88(%rsp), %rax
movq %rax, 0x78(%rsp)
movq 0x6916(%rip), %rsi      # 0x15448
movq 0x6917(%rip), %rdx      # 0x15450
addq %rsi, %rdx
leaq 0x78(%rsp), %rbp
movq %rbp, %rdi
callq 0xfda0
movq %r14, %r12
movq %r14, %rdi
movq %rbp, %rsi
callq 0x3c64
leaq 0x68ea(%rip), %rdi      # 0x15448
movq %r12, %rsi
callq 0x3320
movq 0x28(%rsp), %rdi
leaq 0x38(%rsp), %r12
movq %r12, %rbx
cmpq %r12, %rdi
je 0xeb85
movq 0x38(%rsp), %rsi
incq %rsi
callq 0x3260
movq 0x78(%rsp), %rdi
leaq 0x88(%rsp), %rax
cmpq %rax, %rdi
leaq 0x688c(%rip), %r12      # 0x15428
je 0xebae
movq 0x88(%rsp), %rsi
incq %rsi
callq 0x3260
movq %rbx, %rbp
movl %r15d, %ebx
movq %r12, %r15
jmp 0xf501
movl 0x698e(%rip), %ecx      # 0x15550
movl 0x66a8(%rip), %eax      # 0x15270
movl 0x66ae(%rip), %esi      # 0x1527c
cmpl %eax, %ecx
jle 0xf092
movl 0x68bc(%rip), %edx      # 0x15498
addl %esi, %edx
cmpl %ecx, %edx
jge 0xf661
cmpl %eax, %esi
jl 0xf09a
movl 0x6680(%rip), %esi      # 0x15274
movl 0x667e(%rip), %edx      # 0x15278
movl %ebx, %r15d
movq %rbp, %rbx
leaq 0x2481(%rip), %rbp      # 0x11088
movq %rbp, %rdi
xorl %eax, %eax
callq 0x3060
movl 0x6881(%rip), %edi      # 0x15498
incl %edi
movl %edi, 0x6879(%rip)      # 0x15498
movl 0x664b(%rip), %esi      # 0x15270
addl %edi, %esi
callq 0x49be
movl 0x663e(%rip), %eax      # 0x15270
movl 0x663c(%rip), %ecx      # 0x15274
leal (%rax,%rcx), %esi
decl %esi
movq %rbp, %rdi
leaq 0x67e1(%rip), %rax      # 0x15428
movq %rbx, %rbp
movl %r15d, %ebx
movq %rax, %r15
leaq 0x50(%rsp), %r12
jmp 0xf652
movl 0x661c(%rip), %eax      # 0x1527c
cmpl $0x2, %eax
jl 0xf0b5
leal -0x1(%rax), %ecx
movl %ecx, 0x660a(%rip)      # 0x1527c
movl 0x65fc(%rip), %ecx      # 0x15274
leal (%rax,%rcx), %esi
addl $-0x2, %esi
jmp 0xf64b
movq 0x669e(%rip), %rax      # 0x15328
movq %rax, %rcx
subq 0x6674(%rip), %rcx      # 0x15308
shrq $0x3, %rcx
cmpq $0x1, %rax
adcq $-0x1, %rcx
movq 0x6669(%rip), %rax      # 0x15310
subq 0x666a(%rip), %rax      # 0x15318
shlq $0x4, %rcx
sarq $0x5, %rax
addq %rcx, %rax
movq 0x6640(%rip), %rcx      # 0x15300
subq 0x6629(%rip), %rcx      # 0x152f0
sarq $0x5, %rcx
addq %rax, %rcx
je 0xf661
incl 0x6746(%rip)            # 0x15420
leaq 0x664f(%rip), %rdi      # 0x15330
movq %r15, %rsi
callq 0x10562
leaq 0x66e0(%rip), %rdi      # 0x153d0
leaq 0x6751(%rip), %rsi      # 0x15448
callq 0x10562
movq 0x660d(%rip), %rsi      # 0x15310
cmpq 0x660e(%rip), %rsi      # 0x15318
jne 0xed1f
movq 0x6615(%rip), %rax      # 0x15328
movq -0x8(%rax), %rsi
movl $0x200, %eax            # imm = 0x200
addq %rax, %rsi
addq $-0x20, %rsi
movq %r15, %rdi
callq 0x3150
movq 0x667e(%rip), %rsi      # 0x153b0
cmpq 0x667f(%rip), %rsi      # 0x153b8
jne 0xed4e
movq 0x6686(%rip), %rax      # 0x153c8
movq -0x8(%rax), %rsi
movl $0x200, %eax            # imm = 0x200
addq %rax, %rsi
addq $-0x20, %rsi
leaq 0x66ef(%rip), %rdi      # 0x15448
callq 0x3150
leaq 0x661b(%rip), %rdi      # 0x15380
callq 0x104d6
leaq 0x656f(%rip), %rdi      # 0x152e0
callq 0x104d6
callq 0x3d7f
movq 0x621e(%rip), %rax      # 0x14fa0
movq (%rax), %rdi
callq 0x32e0
movl 0x64e0(%rip), %esi      # 0x15270
xorl %edi, %edi
callq 0x49be
andb $-0xb, 0x6746(%rip)     # 0x154e4
xorl %edi, %edi
xorl %esi, %esi
leaq 0x672f(%rip), %rdx      # 0x154d8
callq 0x3350
testl %eax, %eax
je 0xf631
callq 0x3552
jmp 0xf631
movq 0x65b1(%rip), %rax      # 0x15378
movq %rax, %rcx
subq 0x6587(%rip), %rcx      # 0x15358
shrq $0x3, %rcx
cmpq $0x1, %rax
adcq $-0x1, %rcx
movq 0x657c(%rip), %rax      # 0x15360
subq 0x657d(%rip), %rax      # 0x15368
shlq $0x4, %rcx
sarq $0x5, %rax
addq %rcx, %rax
movq 0x6553(%rip), %rcx      # 0x15350
subq 0x653c(%rip), %rcx      # 0x15340
sarq $0x5, %rcx
addq %rax, %rcx
je 0xf661
decl 0x6609(%rip)            # 0x15420
leaq 0x64c2(%rip), %rdi      # 0x152e0
movq %r15, %rsi
callq 0x10562
leaq 0x6553(%rip), %rdi      # 0x15380
leaq 0x6614(%rip), %rsi      # 0x15448
callq 0x10562
movq 0x6520(%rip), %rsi      # 0x15360
cmpq 0x6521(%rip), %rsi      # 0x15368
jne 0xee5c
movq 0x6528(%rip), %rax      # 0x15378
movq -0x8(%rax), %rsi
movl $0x200, %eax            # imm = 0x200
addq %rax, %rsi
addq $-0x20, %rsi
movq %r15, %rdi
callq 0x3150
movq 0x6591(%rip), %rsi      # 0x15400
cmpq 0x6592(%rip), %rsi      # 0x15408
jne 0xee8b
movq 0x6599(%rip), %rax      # 0x15418
movq -0x8(%rax), %rsi
movl $0x200, %eax            # imm = 0x200
addq %rax, %rsi
addq $-0x20, %rsi
leaq 0x65b2(%rip), %rdi      # 0x15448
callq 0x3150
leaq 0x652e(%rip), %rdi      # 0x153d0
callq 0x104d6
leaq 0x6482(%rip), %rdi      # 0x15330
callq 0x104d6
callq 0x3d7f
movq 0x60e1(%rip), %rax      # 0x14fa0
movq (%rax), %rdi
callq 0x32e0
movl 0x63a3(%rip), %esi      # 0x15270
xorl %edi, %edi
callq 0x49be
andb $-0xb, 0x6609(%rip)     # 0x154e4
xorl %edi, %edi
xorl %esi, %esi
leaq 0x65f2(%rip), %rdx      # 0x154d8
callq 0x3350
testl %eax, %eax
je 0xf631
callq 0x3530
jmp 0xf631
leaq 0x6544(%rip), %rdi      # 0x15448
leaq 0x655d(%rip), %rsi      # 0x15468
callq 0x3050
testl %eax, %eax
je 0xf65e
movl %ebx, 0x74(%rsp)
movq %rbp, %rbx
cmpl $0x0, 0x64fa(%rip)      # 0x15420
leaq 0x6403(%rip), %r12      # 0x15330
leaq 0x649c(%rip), %r13      # 0x153d0
je 0xef4e
movq %r12, %rdi
callq 0x104d6
movq %r13, %rdi
callq 0x104d6
decl 0x64d4(%rip)            # 0x15420
jne 0xef36
movl $0x0, 0x64c8(%rip)      # 0x15420
leaq 0x6381(%rip), %rdi      # 0x152e0
movq %r15, %rsi
callq 0x10562
leaq 0x6412(%rip), %rdi      # 0x15380
leaq 0x64d3(%rip), %rsi      # 0x15448
callq 0x10562
leaq 0xa8(%rsp), %rax
movq %rax, 0x98(%rsp)
movq 0x64b7(%rip), %rsi      # 0x15448
movq 0x64b8(%rip), %rdx      # 0x15450
addq %rsi, %rdx
leaq 0x98(%rsp), %rbp
movq %rbp, %rdi
callq 0xfda0
movq %r14, %r12
movq %r14, %rdi
movq %rbp, %rsi
callq 0x3c64
leaq 0x6488(%rip), %rdi      # 0x15448
movq %r12, %rsi
callq 0x3320
movq 0x28(%rsp), %rdi
movq %rbx, %rbp
cmpq %rbx, %rdi
je 0xefe2
movq 0x38(%rsp), %rsi
incq %rsi
callq 0x3260
movq 0x98(%rsp), %rdi
leaq 0xa8(%rsp), %rax
cmpq %rax, %rdi
movl 0x74(%rsp), %ebx
je 0xf00b
movq 0xa8(%rsp), %rsi
incq %rsi
callq 0x3260
leaq 0x18(%rsp), %rax
movq %rax, 0x8(%rsp)
movq 0x640c(%rip), %rsi      # 0x15428
movq 0x640d(%rip), %rdx      # 0x15430
addq %rsi, %rdx
leaq 0x8(%rsp), %r12
movq %r12, %rdi
callq 0xfda0
movq %r12, %rdi
leaq 0x205c(%rip), %rsi      # 0x11099
callq 0x3480
movq 0x643f(%rip), %rax      # 0x15488
movq 0x8(%rax), %rsi
addq $0x13, %rsi
movq %r12, %rdi
callq 0x3480
movq %rbp, 0x28(%rsp)
movq (%rax), %rdx
movq %rax, %rcx
addq $0x10, %rcx
cmpq %rcx, %rdx
leaq 0x50(%rsp), %r12
je 0xf129
movq %rdx, 0x28(%rsp)
movq (%rcx), %rdx
movq %rdx, 0x38(%rsp)
jmp 0xf130
movl $0x1, %ebx
jmp 0xf65e
cmpl %ecx, %esi
jge 0xf661
leal 0x1(%rsi), %eax
movl %eax, 0x61d9(%rip)      # 0x1527c
addl 0x61cb(%rip), %esi      # 0x15274
leaq 0x1fd8(%rip), %rdi      # 0x11088
jmp 0xf652
cmpl $0x0, 0x63dc(%rip)      # 0x15498
je 0xf661
movl 0x61ac(%rip), %esi      # 0x15274
movl 0x61aa(%rip), %edx      # 0x15278
movl %ebx, %r15d
movq %rbp, %rbx
leaq 0x1fad(%rip), %rbp      # 0x11088
movq %rbp, %rdi
xorl %eax, %eax
callq 0x3060
movl 0x63ad(%rip), %edi      # 0x15498
decl %edi
movl %edi, 0x63a5(%rip)      # 0x15498
movl 0x6177(%rip), %esi      # 0x15270
addl %edi, %esi
callq 0x49be
movl 0x616e(%rip), %esi      # 0x15274
movl 0x616c(%rip), %edx      # 0x15278
movq %rbp, %rdi
leaq 0x6312(%rip), %rax      # 0x15428
movq %rbx, %rbp
movl %r15d, %ebx
movq %rax, %r15
leaq 0x50(%rsp), %r12
jmp 0xf657
movups (%rcx), %xmm0
movups %xmm0, (%rbp)
movq 0x8(%rax), %rdx
movq %rdx, 0x30(%rsp)
movq %rcx, (%rax)
movq $0x0, 0x8(%rax)
movb $0x0, 0x10(%rax)
movq %r15, %rdi
movq %r14, %rsi
callq 0x3320
movq 0x28(%rsp), %rdi
cmpq %rbp, %rdi
je 0xf16a
movq 0x38(%rsp), %rsi
incq %rsi
callq 0x3260
movq 0x8(%rsp), %rdi
leaq 0x18(%rsp), %rax
cmpq %rax, %rdi
je 0xf186
movq 0x18(%rsp), %rsi
incq %rsi
callq 0x3260
callq 0x3d7f
movq 0x5e0e(%rip), %rax      # 0x14fa0
movq (%rax), %rdi
callq 0x32e0
movl 0x60d0(%rip), %esi      # 0x15270
xorl %edi, %edi
callq 0x49be
andb $-0xb, 0x6336(%rip)     # 0x154e4
xorl %edi, %edi
xorl %esi, %esi
leaq 0x631f(%rip), %rdx      # 0x154d8
callq 0x3350
testl %eax, %eax
jne 0xf678
movl $0x1, 0x60ac(%rip)      # 0x1527c
movl $0x0, 0x62be(%rip)      # 0x15498
movl 0x6094(%rip), %esi      # 0x15274
movl 0x6092(%rip), %edx      # 0x15278
leaq 0x1e9b(%rip), %rdi      # 0x11088
jmp 0xf657
leaq 0x38(%rsp), %rax
movq %rax, 0x28(%rsp)
movq 0x6225(%rip), %rsi      # 0x15428
movq 0x6226(%rip), %rdx      # 0x15430
addq %rsi, %rdx
movq %r14, %rdi
callq 0xfda0
cmpq $0x0, 0x6213(%rip)      # 0x15430
je 0xf250
xorl %esi, %esi
xorl %ebp, %ebp
movq 0x28(%rsp), %rax
cmpb $0x20, (%rax,%rsi)
jne 0xf242
movl $0x1, %edx
movq %r14, %rdi
movl $0x5c, %ecx
callq 0x34b0
incl %ebp
incl %ebp
movslq %ebp, %rsi
cmpq %rsi, 0x61e2(%rip)      # 0x15430
ja 0xf223
leaq 0x60(%rsp), %rbp
movq %rbp, 0x50(%rsp)
movq 0x28(%rsp), %rsi
movq 0x30(%rsp), %rdx
addq %rsi, %rdx
movq %r12, %rdi
callq 0xfda0
movq %r12, %rdi
leaq 0x1e20(%rip), %rsi      # 0x11099
callq 0x3480
movq %r12, %rdi
leaq 0x18(%rsp), %r12
movq 0x61fb(%rip), %rax      # 0x15488
movslq 0x5fe8(%rip), %rcx      # 0x1527c
movslq 0x61fd(%rip), %rdx      # 0x15498
addq %rcx, %rdx
movq -0x8(%rax,%rdx,8), %rsi
addq $0x13, %rsi
callq 0x3480
movq %r12, 0x8(%rsp)
movq (%rax), %rdx
movq %rax, %rcx
addq $0x10, %rcx
cmpq %rcx, %rdx
je 0xf36c
movq %rdx, 0x8(%rsp)
movq (%rcx), %rdx
movq %rdx, 0x18(%rsp)
jmp 0xf374
leaq 0x18(%rsp), %rbp
movq %rbp, 0x8(%rsp)
movq 0x6161(%rip), %rsi      # 0x15448
movq 0x6162(%rip), %rdx      # 0x15450
addq %rsi, %rdx
leaq 0x8(%rsp), %r12
movq %r12, %rdi
callq 0xfda0
movq %r12, %rdi
leaq 0x1d91(%rip), %rsi      # 0x11099
callq 0x3480
movq 0x6174(%rip), %rax      # 0x15488
movslq 0x5f61(%rip), %rcx      # 0x1527c
movslq 0x6176(%rip), %rdx      # 0x15498
addq %rcx, %rdx
movq -0x8(%rax,%rdx,8), %rsi
addq $0x13, %rsi
movq %r12, %rdi
callq 0x3480
leaq 0x38(%rsp), %r12
movq %r12, 0x28(%rsp)
movq (%rax), %rdx
movq %rax, %rcx
addq $0x10, %rcx
cmpq %rcx, %rdx
leaq 0x60d4(%rip), %r15      # 0x15428
je 0xf49c
movq %rdx, 0x28(%rsp)
movq (%rcx), %rdx
movq %rdx, 0x38(%rsp)
jmp 0xf4a4
movups (%rcx), %xmm0
movups %xmm0, (%r12)
movq 0x8(%rax), %rdx
movq %rdx, 0x10(%rsp)
movq %rcx, (%rax)
movq $0x0, 0x8(%rax)
movb $0x0, 0x10(%rax)
movq 0x50(%rsp), %rdi
cmpq %rbp, %rdi
je 0xf3a3
movq 0x60(%rsp), %rsi
incq %rsi
callq 0x3260
callq 0x30a0
movl %eax, %ebp
testl %eax, %eax
jne 0xf41f
leaq 0x1d23(%rip), %rdi      # 0x110d8
movl $0x442, %esi            # imm = 0x442
movl $0x180, %edx            # imm = 0x180
xorl %eax, %eax
callq 0x31b0
movl %eax, %r12d
leaq 0x1d10(%rip), %rdi      # 0x110e0
cmpl $-0x1, %eax
je 0xf412
movq 0x5bf4(%rip), %r13      # 0x14fd0
movq (%r13), %rdi
callq 0x3280
movl %eax, %edi
callq 0x33b0
movl %eax, %r15d
movq (%r13), %rdi
callq 0x3280
movl %r12d, %edi
movl %eax, %esi
callq 0x3220
leaq 0x1ce8(%rip), %rdi      # 0x110f1
cmpl $-0x1, %eax
jne 0xf6d7
callq 0x31e0
movl $0xff, 0x4c(%rsp)
movq 0x8(%rsp), %rdi
leaq 0x18(%rsp), %rax
cmpq %rax, %rdi
je 0xf43b
movq 0x18(%rsp), %rsi
incq %rsi
callq 0x3260
movq 0x28(%rsp), %rdi
leaq 0x38(%rsp), %rax
cmpq %rax, %rdi
je 0xf457
movq 0x38(%rsp), %rsi
incq %rsi
callq 0x3260
testl %ebp, %ebp
je 0xf474
leaq 0x38(%rsp), %rbp
movq %r14, %rdi
leaq 0x5fbe(%rip), %r15      # 0x15428
leaq 0x50(%rsp), %r12
jmp 0xf661
movl $0x1, %eax
leaq 0x38(%rsp), %rbp
movq %r14, %rdi
leaq 0x5fa0(%rip), %r15      # 0x15428
leaq 0x50(%rsp), %r12
jmp 0xf66e
callq 0x350e
jmp 0xea15
movups (%rcx), %xmm0
movups %xmm0, (%r12)
movq %r12, %rbp
movq 0x8(%rax), %rdx
movq %rdx, 0x30(%rsp)
movq %rcx, (%rax)
movq $0x0, 0x8(%rax)
movb $0x0, 0x10(%rax)
leaq 0x5f82(%rip), %rdi      # 0x15448
movq %r14, %rsi
callq 0x3320
movq 0x28(%rsp), %rdi
cmpq %r12, %rdi
je 0xf4e5
movq 0x38(%rsp), %rsi
incq %rsi
callq 0x3260
movq 0x8(%rsp), %rdi
leaq 0x18(%rsp), %rax
cmpq %rax, %rdi
je 0xf501
movq 0x18(%rsp), %rsi
incq %rsi
callq 0x3260
leaq 0x5dd8(%rip), %rdi      # 0x152e0
movq %r15, %rsi
callq 0x10562
leaq 0x18(%rsp), %rax
movq %rax, 0x8(%rsp)
movq 0x5f07(%rip), %rsi      # 0x15428
movq 0x5f08(%rip), %rdx      # 0x15430
addq %rsi, %rdx
leaq 0x8(%rsp), %r12
movq %r12, %rdi
callq 0xfda0
movq %r12, %rdi
leaq 0x1b57(%rip), %rsi      # 0x11099
callq 0x3480
movq 0x5f3a(%rip), %rax      # 0x15488
movslq 0x5d27(%rip), %rcx      # 0x1527c
movslq 0x5f3c(%rip), %rdx      # 0x15498
addq %rcx, %rdx
movq -0x8(%rax,%rdx,8), %rsi
addq $0x13, %rsi
movq %r12, %rdi
callq 0x3480
movq %rbp, 0x28(%rsp)
movq (%rax), %rdx
movq %rax, %rcx
addq $0x10, %rcx
cmpq %rcx, %rdx
leaq 0x50(%rsp), %r12
je 0xf598
movq %rdx, 0x28(%rsp)
movq (%rcx), %rdx
movq %rdx, 0x38(%rsp)
jmp 0xf59f
movups (%rcx), %xmm0
movups %xmm0, (%rbp)
movq 0x8(%rax), %rdx
movq %rdx, 0x30(%rsp)
movq %rcx, (%rax)
movq $0x0, 0x8(%rax)
movb $0x0, 0x10(%rax)
movq %r15, %rdi
movq %r14, %rsi
callq 0x3320
movq 0x28(%rsp), %rdi
cmpq %rbp, %rdi
je 0xf5d9
movq 0x38(%rsp), %rsi
incq %rsi
callq 0x3260
movq 0x8(%rsp), %rdi
leaq 0x18(%rsp), %rax
cmpq %rax, %rdi
je 0xf5f5
movq 0x18(%rsp), %rsi
incq %rsi
callq 0x3260
callq 0x3d7f
movq 0x599f(%rip), %rax      # 0x14fa0
movq (%rax), %rdi
callq 0x32e0
movl 0x5c61(%rip), %esi      # 0x15270
xorl %edi, %edi
callq 0x49be
andb $-0xb, 0x5ec7(%rip)     # 0x154e4
xorl %edi, %edi
xorl %esi, %esi
leaq 0x5eb0(%rip), %rdx      # 0x154d8
callq 0x3350
testl %eax, %eax
jne 0xf682
movl $0x1, 0x5c41(%rip)      # 0x1527c
movl $0x0, 0x5e53(%rip)      # 0x15498
movl 0x5c29(%rip), %esi      # 0x15274
leaq 0x1a36(%rip), %rdi      # 0x11088
movl $0x1, %edx
xorl %eax, %eax
callq 0x3060
movq %r14, %rdi
xorl %ecx, %ecx
cmpl $0x1, %ebx
sete %cl
leal (%rcx,%rcx,2), %eax
movl %ecx, %ebx
testl %eax, %eax
je 0xe8b7
jmp 0xf689
callq 0x3596
jmp 0xf1c6
callq 0x3574
jmp 0xf631
cmpl $0x3, %eax
jne 0xf6b5
leaq 0x5e07(%rip), %rdx      # 0x1549c
xorl %ebx, %ebx
xorl %edi, %edi
xorl %esi, %esi
callq 0x3350
leaq 0x1f04(%rip), %rdi      # 0x115ab
xorl %eax, %eax
callq 0x3060
callq 0x3d7f
jmp 0xf6b9
movl 0x4c(%rsp), %ebx
movl %ebx, %eax
addq $0xb8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
callq 0x34f2
jmp 0xe870
movq 0x8(%rsp), %rdx
leaq 0x1a25(%rip), %rdi      # 0x11108
leaq 0x1a27(%rip), %rsi      # 0x11111
xorl %ecx, %ecx
xorl %eax, %eax
callq 0x3330
movq 0x58d6(%rip), %rax      # 0x14fd0
movq (%rax), %rdi
callq 0x32e0
movl %r12d, %edi
callq 0x34a0
movq 0x58bf(%rip), %rax      # 0x14fd0
movq (%rax), %rdi
callq 0x3280
movl %r15d, %edi
movl %eax, %esi
callq 0x3220
movl %r15d, %edi
callq 0x34a0
movl $0x1, %edi
callq 0x3310
jmp 0xf7bd
movq %rax, %rbx
movq 0x78(%rsp), %rdi
leaq 0x88(%rsp), %rax
cmpq %rax, %rdi
je 0xf7fd
movq 0x88(%rsp), %rsi
jmp 0xf7f5
jmp 0xf782
jmp 0xf782
jmp 0xf782
jmp 0xf782
jmp 0xf76a
movq %rax, %rbx
movq 0x50(%rsp), %rdi
cmpq %rbp, %rdi
je 0xf7e1
movq 0x60(%rsp), %rsi
jmp 0xf7d4
jmp 0xf7de
jmp 0xf782
movq %rax, %rbx
movq 0x8(%rsp), %rdi
leaq 0x18(%rsp), %rax
cmpq %rax, %rdi
je 0xf7fd
movq 0x18(%rsp), %rsi
jmp 0xf7f5
movq %rax, %rbx
movq 0x98(%rsp), %rdi
leaq 0xa8(%rsp), %rax
cmpq %rax, %rdi
je 0xf7fd
movq 0xa8(%rsp), %rsi
jmp 0xf7f5
movq %rax, %rbx
movq 0x8(%rsp), %rdi
leaq 0x18(%rsp), %rax
cmpq %rax, %rdi
je 0xf7e1
movq 0x18(%rsp), %rsi
incq %rsi
callq 0x3260
jmp 0xf7e1
movq %rax, %rbx
movq 0x28(%rsp), %rdi
leaq 0x38(%rsp), %rax
cmpq %rax, %rdi
je 0xf7fd
movq 0x38(%rsp), %rsi
incq %rsi
callq 0x3260
movq %rbx, %rdi
callq 0x3450
nop