// File: /workspace/github_c_makefile_star2_O3/annoroad[P]fqtools_plus/fqtools.c
// Function: main
int main(int argc, char** argv){

	if (argc < 2){
		puts(HELP);
		exit(-1);
	}
	int function=0;
	char* HELP_output=NULL;
	if (strcmp(argv[1],"filter")==0){
		function = 1;
		HELP_output = (char*)HELP1;
	}else if(strcmp(argv[1],"cutadapt")==0){
		function = 2;
		HELP_output = (char*)HELP2;
	}else{
		fprintf(stderr, "%s\n",HELP);
		exit(0);
	}

	setvbuf(stdout,NULL,_IONBF,0);
	setvbuf(stderr,NULL,_IONBF,0);
	time_t start,end;
	time(&start);
	//fprintf(stdout,"%s\n", ctime(&start));
	//-------------------------------------------------
	g.single_or_pair=0;
	g.CUT=0;
	g.start=0;
	g.QUOTA=0;
	g.LOWQ = 19;
	g.HIGHQ = 30;
	g.LOW_QUALITY=0.5;
	g.highN=0.05;
	g.highAT=0.8;
	g.highGC=0.8;
	g.ployAT=0;
	g.ASCII = 33;
	g.Nthread = 1;

	g.read1Count=0;
	g.read2Count=0;

	g.sequence1 = (char*)malloc(512);
	g.sequence2 = (char*)malloc(512);

	g.min_overlap = 5;
	g.table1=init_hash();
	g.table2=init_hash();
	g.fq1 = (char*)malloc(1024);
	g.fq2 = (char*)malloc(1024);
	g.rawcutfq1 = (char*)malloc(1024);
	g.rawcutfq2 = (char*)malloc(1024);
	g.adapter1 = (char*)malloc(1024);
	g.adapter2 = (char*)malloc(1024);
	g.outfq1 = (char*)malloc(1024);
	g.outfq2 = (char*)malloc(1024);
	g.speedy_gzip = (char*)malloc(1024);
	char* files1[3]={g.fq1, g.adapter1, g.outfq1};
	char* files2[6]={g.fq1, g.fq2, g.adapter1, g.adapter2, g.outfq1, g.outfq2};
	char* files3[2]={g.fq1, g.outfq1};
	char* files4[4]={g.fq1, g.fq2, g.outfq1, g.outfq2};
	char** selectfiles=NULL;
	int n=0;
	int i;
	char x=1;
	for (i=2; i < argc; i++){
		if (argv[i][0] == '-'){
			if (strcmp(argv[i],"--c")==0 || strcmp(argv[i],"-c")==0){
				if(parameter(argv[i+1],&g.CUT,"int")==0){
					puts("--c INT\n");
					puts(HELP_output);
					exit(-1);
				}
				i++;
				continue;
			}else if (strcmp(argv[i],"--start")==0 || strcmp(argv[i],"-start")==0){
				if(parameter(argv[i+1],&g.start,"int")==0){
					puts("--start INT\n");
					puts(HELP_output);
					exit(-1);
				}
				i++;
				continue;
			}else if(strcmp(argv[i],"--q")==0 || strcmp(argv[i],"-q")==0){
				if(parameter(argv[i+1],&g.QUOTA,"long")==0){
					puts("--q INT\n");
					puts(HELP_output);
					exit(-1);
				}
				i++;
				continue;
			}else if (strcmp(argv[i],"--ql")==0 || strcmp(argv[i],"-ql")==0){
				if(parameter(argv[i+1],&g.LOWQ,"int")==0){
					puts("--ql INT\n");
					puts(HELP_output);
					exit(-1);
				}
				i++;
				continue;
			}else if (strcmp(argv[i],"--qh")==0 || strcmp(argv[i],"-qh")==0){
				if(parameter(argv[i+1],&g.HIGHQ,"int")==0){
					puts("--qh INT\n");
					puts(HELP_output);
					exit(-1);
				}
				i++;
				continue;
			}else if (strcmp(argv[i],"--Q")==0 || strcmp(argv[i],"-Q")==0){
				if(parameter(argv[i+1],&g.LOW_QUALITY,"float")==0){
					puts("--Q FLOAT\n");
					puts(HELP_output);
					exit(-1);
				}
				i++;
				continue;
			}else if (strcmp(argv[i],"--n")==0 || strcmp(argv[i],"-n")==0){
				if(parameter(argv[i+1],&g.highN,"float")==0){
					puts("--n FLOAT\n");
					puts(HELP_output);
					exit(-1);
				}
				i++;
				continue;
			}else if (strcmp(argv[i],"--AT")==0 || strcmp(argv[i],"-AT")==0){
				if(parameter(argv[i+1],&g.highAT,"float")==0){
					puts("--highAT FLOAT\n");
					puts(HELP_output);
					exit(-1);
				}
				i++;
				continue;
			}else if (strcmp(argv[i],"--GC")==0 || strcmp(argv[i],"-GC")==0){
				if(parameter(argv[i+1],&g.highGC,"float")==0){
					puts("--highGC FLOAT\n");
					puts(HELP_output);
					exit(-1);
				}
				i++;
				continue;
			}else if (strcmp(argv[i],"--ployAT")==0 || strcmp(argv[i],"-ployAT")==0){
				if(parameter(argv[i+1],&g.ployAT,"int")==0){
					puts("--ployAT INT\n");
					puts(HELP_output);
					exit(-1);
				}
				i++;
				continue;
			}else if (strcmp(argv[i],"--i")==0 || strcmp(argv[i],"-i")==0){
				if(parameter(argv[i+1],&g.ASCII,"int")==0){
					puts("--i INT\n");
					puts(HELP_output);
					exit(-1);
				}
				i++;
				continue;
			}else if (strcmp(argv[i],"--adapt1")==0 || strcmp(argv[i],"-adapt")==0){
				if(parameter(argv[i+1],&g.sequence1,"str")==0){
					puts("--adapt1 string\n");
					puts(HELP_output);
					exit(-1);
				}
				i++;
				continue;
			}else if (strcmp(argv[i],"--adapt2")==0 || strcmp(argv[i],"-adapt")==0){
				if(parameter(argv[i+1],&g.sequence2,"str")==0){
					puts("--adapt2 string\n");
					puts(HELP_output);
					exit(-1);
				}
				i++;
				continue;
			}else if (strcmp(argv[i],"-min_overlap")==0 || strcmp(argv[i],"--min_overlap")==0){
				if(parameter(argv[i+1],&g.min_overlap,"int")==0){
					puts("-min_overlap int\n");
					puts(HELP_output);
					exit(-1);
				}
				i++;
				continue;
			}else if (strcmp(argv[i],"--m")==0 || strcmp(argv[i],"-m")==0){
				if(parameter(argv[i+1],&g.Nthread,"int")==0){
					puts("--m int\n");
					puts(HELP);
					exit(-1);
				}
				i++;
				continue;
			}else{
				fprintf(stderr,"invalid option %s\n",argv[i]);
				exit(0);
			}
		}else {
			if (function == 2){
				strcpy(g.fq1,argv[i]);
				break;	
			}
			if (x){
				if (argc - i == 2){
					g.single_or_pair = 0;
					if (*g.sequence1) selectfiles = files3;
					else selectfiles = files1;
				}else if(argc - i == 3){
					g.single_or_pair = 0;
					if (*g.sequence1) selectfiles = files3;
					else selectfiles = files1;
				}else if(argc - i == 4){
					g.single_or_pair = 1;
					if (*g.sequence1) selectfiles = files4;
					else selectfiles = files2;
				}else if(argc - i == 6){
					g.single_or_pair = 1;
					if (*g.sequence1) selectfiles = files4;
					else selectfiles = files2;
				}else{
					fprintf(stderr, "wrong !\n%s\n",HELP_output);
				}
			}
			x=0;
			strcpy(selectfiles[n],argv[i]);
			n++;
		}
	}

	if (*g.fq1 == '\0') {printf("%s\n",HELP_output);exit(0);}
	if (g.single_or_pair && *g.fq2 == '\0') {printf("%s\n",HELP_output);exit(0);}
	if (*g.outfq1 == '\0' && function == 1) {printf("%s\n",HELP_output);exit(0);}
	if (g.single_or_pair && *g.outfq2 == '\0') {printf("%s\n",HELP_output);exit(0);}

	int out1len = strlen(g.outfq1);
	int out2len = strlen(g.outfq2);
	if (strcmp(g.outfq1+out1len-3,".gz")==0) *(g.outfq1+out1len-3) = '\0';
	if (g.single_or_pair && strcmp(g.outfq2+out2len-3,".gz")==0) *(g.outfq2+out2len-3) = '\0';

	if (*g.sequence1 == '\0'){
		if (function==1) {
			if (*g.adapter1 == '\0') {printf("%s\n",HELP_output);exit(0);}
			if (g.single_or_pair && *g.adapter2 == '\0') {printf("%s\n",HELP_output);exit(0);}
		}else if (function==2){
			printf("%s\n",HELP_output);exit(0);
		}
	}else{
		if (g.single_or_pair){
			if (*g.sequence2 == '\0'){fprintf(stderr, "%s\n",HELP_output);exit(0);}
		}
	}

	if (g.QUOTA < 0){
		puts("-q num > 0");
		exit(-1);
	}else if(g.QUOTA > 0){
		sprintf(g.rawcutfq1,"%s.cut.raw",g.outfq1);
		if (g.single_or_pair) sprintf(g.rawcutfq2,"%s.cut.raw",g.outfq2);
	}
	
	if (g.CUT < 0){
		puts("--c num >= 0");
		exit(-1);
	}

	if (g.Nthread < 3){
		g.Nthread = 1;
	}else{
		if (g.QUOTA != 0){
			if (g.Nthread < 4){
				fprintf(stderr, "--m 不正确\n%s\n",HELP1);
				exit(0);
			}
		}
	}

	//-----------------------------------------
	if (function ==1){
		char statfile[strlen(g.outfq1)+20];
		sprintf(statfile,"%s.gz.stat",g.outfq1);
		char reportfile1[strlen(g.outfq1)+20];
		char reportfile2[strlen(g.outfq2)+20];
		sprintf(reportfile1,"%s.gz.report",g.outfq1);
		sprintf(reportfile2,"%s.gz.report",g.outfq2);
		if (*g.sequence1 == '\0'){
			readadapter();
		}
		if (g.Nthread >= 3){
			sprintf(g.speedy_gzip,"%s -f -p 3 ",speedy_gzip_software);
		}else{
			sprintf(g.speedy_gzip,"%s -f -p 1 ",speedy_gzip_software);	
		}
		//-----------------main func---------------
		process();
		//---------------outstat-------------------
		outstat(statfile);
		outreport(allstat.base1, allstat.quality1, reportfile1);
		if (g.single_or_pair) outreport(allstat.base2, allstat.quality2, reportfile2);
		//-----------------------------------------
	}else if (function == 2){
		cutadapt_main(g.fq1,g.sequence1,g.min_overlap);
	}
		
	time(&end);
	//fprintf(stdout,"%s\n", ctime(&end));
	return(0);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x4b8, %rsp            # imm = 0x4B8
movl %edi, -0x50(%rbp)
cmpl $0x1, %edi
jle 0x575c
movq %rsi, -0x38(%rbp)
movq 0x8(%rsi), %rbx
leaq 0x2a5e(%rip), %rsi      # 0x70c6
movq %rbx, %rdi
callq 0x2150
movl %eax, -0x44(%rbp)
testl %eax, %eax
je 0x4697
leaq 0x2a4f(%rip), %rsi      # 0x70cd
movq %rbx, %rdi
callq 0x2150
testl %eax, %eax
jne 0x56e0
leaq 0x340d(%rip), %rax      # 0x7aa2
jmp 0x469e
leaq 0x2c7e(%rip), %rax      # 0x731c
movq %rax, -0x30(%rbp)
movq 0x692f(%rip), %rax      # 0xafd8
movq (%rax), %rdi
xorl %ebx, %ebx
movl $0x2, %r12d
xorl %esi, %esi
movl $0x2, %edx
xorl %ecx, %ecx
callq 0x21e0
movq 0x692f(%rip), %rax      # 0xaff8
movq (%rax), %rdi
xorl %esi, %esi
movl $0x2, %edx
xorl %ecx, %ecx
callq 0x21e0
leaq -0xd8(%rbp), %rdi
callq 0x2180
movb $0x0, 0x6adb(%rip)      # 0xb1c8
movq %rbx, 0x6ad8(%rip)      # 0xb1cc
movq %rbx, 0x6add(%rip)      # 0xb1d8
movabsq $0x1e00000013, %rax     # imm = 0x1E00000013
movq %rax, 0x6ad4(%rip)      # 0xb1e0
movaps 0x28fd(%rip), %xmm0     # 0x7010
movups %xmm0, 0x6ace(%rip)     # 0xb1e8
movabsq $0x2100000000, %rax     # imm = 0x2100000000
movq %rax, 0x6acd(%rip)      # 0xb1f8
movl $0x1, 0x6acb(%rip)      # 0xb200
movl $0x200, %edi            # imm = 0x200
callq 0x21c0
xorps %xmm0, %xmm0
movups %xmm0, 0x6abf(%rip)     # 0xb208
movq %rax, 0x6ac8(%rip)      # 0xb218
movl $0x200, %edi            # imm = 0x200
callq 0x21c0
movq %rax, 0x6abf(%rip)      # 0xb220
movl $0x5, 0x6abd(%rip)      # 0xb228
callq 0x66bf
movq %rax, 0x6ab9(%rip)      # 0xb230
callq 0x66bf
movq %rax, 0x6ab5(%rip)      # 0xb238
movl $0x400, %edi            # imm = 0x400
callq 0x21c0
movq %rax, %rbx
movq %rax, 0x6aa9(%rip)      # 0xb240
movl $0x400, %edi            # imm = 0x400
callq 0x21c0
movq %rax, -0x40(%rbp)
movq %rax, 0x6a9c(%rip)      # 0xb248
movl $0x400, %edi            # imm = 0x400
callq 0x21c0
movq %rax, 0x6aa3(%rip)      # 0xb260
movl $0x400, %edi            # imm = 0x400
callq 0x21c0
movq %rax, 0x6a9a(%rip)      # 0xb268
movl $0x400, %edi            # imm = 0x400
callq 0x21c0
movq %rax, %r14
movq %rax, 0x6a8e(%rip)      # 0xb270
movl $0x400, %edi            # imm = 0x400
callq 0x21c0
movq %rax, -0x68(%rbp)
movq %rax, 0x6a81(%rip)      # 0xb278
movl $0x400, %edi            # imm = 0x400
callq 0x21c0
movq %rax, %r15
movq %rax, 0x6a45(%rip)      # 0xb250
movl $0x400, %edi            # imm = 0x400
callq 0x21c0
movq %rax, %r13
movq %rax, 0x6a39(%rip)      # 0xb258
movl $0x400, %edi            # imm = 0x400
callq 0x21c0
movq %rax, 0x6a80(%rip)      # 0xb2b0
movq %rbx, -0x80(%rbp)
movq %r14, -0x78(%rbp)
movq %r15, -0x70(%rbp)
movq %rbx, -0xd0(%rbp)
movq -0x40(%rbp), %rax
movq %rax, -0xc8(%rbp)
movq %r14, -0xc0(%rbp)
movq -0x68(%rbp), %rcx
movq %rcx, -0xb8(%rbp)
movq %r15, -0xb0(%rbp)
movq %r13, -0xa8(%rbp)
movq %rbx, -0x60(%rbp)
movq %r15, -0x58(%rbp)
movq %rbx, -0xa0(%rbp)
movq %rax, -0x98(%rbp)
movq %r15, -0x90(%rbp)
movq %r13, -0x88(%rbp)
cmpl $0x2, -0x50(%rbp)
movq -0x38(%rbp), %rbx
je 0x4e73
movb $0x1, %r14b
movq $0x0, -0x40(%rbp)
xorl %r15d, %r15d
movslq %r12d, %r13
movq (%rbx,%r13,8), %rbx
cmpb $0x2d, (%rbx)
jne 0x4b58
movq %rbx, %rdi
leaq 0x280e(%rip), %rsi      # 0x70d6
callq 0x2150
testl %eax, %eax
je 0x4bb2
cmpb $0x63, 0x1(%rbx)
jne 0x48e5
cmpb $0x0, 0x2(%rbx)
je 0x4bb2
movq %rbx, %rdi
leaq 0x27f8(%rip), %rsi      # 0x70e7
callq 0x2150
testl %eax, %eax
je 0x4bdb
movq %rbx, %rdi
leaq 0x27e2(%rip), %rsi      # 0x70e8
callq 0x2150
testl %eax, %eax
je 0x4bdb
movq %rbx, %rdi
leaq 0x27df(%rip), %rsi      # 0x70fc
callq 0x2150
testl %eax, %eax
je 0x4c4f
cmpb $0x71, 0x1(%rbx)
jne 0x493a
cmpb $0x0, 0x2(%rbx)
je 0x4c4f
movq %rbx, %rdi
leaq 0x27ca(%rip), %rsi      # 0x710e
callq 0x2150
testl %eax, %eax
je 0x4c78
movq %rbx, %rdi
leaq 0x27b4(%rip), %rsi      # 0x710f
callq 0x2150
testl %eax, %eax
je 0x4c78
movq %rbx, %rdi
leaq 0x27ab(%rip), %rsi      # 0x711d
callq 0x2150
testl %eax, %eax
je 0x4ca1
movq %rbx, %rdi
leaq 0x2795(%rip), %rsi      # 0x711e
callq 0x2150
testl %eax, %eax
je 0x4ca1
movq %rbx, %rdi
leaq 0x278c(%rip), %rsi      # 0x712c
callq 0x2150
testl %eax, %eax
je 0x4cf3
cmpb $0x51, 0x1(%rbx)
jne 0x49bd
cmpb $0x0, 0x2(%rbx)
je 0x4cf3
movq %rbx, %rdi
leaq 0x277a(%rip), %rsi      # 0x7141
callq 0x2150
testl %eax, %eax
je 0x4d1c
cmpb $0x6e, 0x1(%rbx)
jne 0x49e4
cmpb $0x0, 0x2(%rbx)
je 0x4d1c
movq %rbx, %rdi
leaq 0x2762(%rip), %rsi      # 0x7150
callq 0x2150
testl %eax, %eax
je 0x4d45
movq %rbx, %rdi
leaq 0x274c(%rip), %rsi      # 0x7151
callq 0x2150
testl %eax, %eax
je 0x4d45
movq %rbx, %rdi
leaq 0x2749(%rip), %rsi      # 0x7165
callq 0x2150
testl %eax, %eax
je 0x4d6e
movq %rbx, %rdi
leaq 0x2733(%rip), %rsi      # 0x7166
callq 0x2150
testl %eax, %eax
je 0x4d6e
movq %rbx, %rdi
leaq 0x2730(%rip), %rsi      # 0x717a
callq 0x2150
testl %eax, %eax
je 0x4d93
movq %rbx, %rdi
leaq 0x271a(%rip), %rsi      # 0x717b
callq 0x2150
testl %eax, %eax
je 0x4d93
movq %rbx, %rdi
leaq 0x2719(%rip), %rsi      # 0x7191
callq 0x2150
testl %eax, %eax
je 0x4db8
cmpb $0x69, 0x1(%rbx)
jne 0x4a95
cmpb $0x0, 0x2(%rbx)
je 0x4db8
movq %rbx, %rdi
leaq 0x26ff(%rip), %rsi      # 0x719e
callq 0x2150
testl %eax, %eax
je 0x4ddd
movq %rbx, %rdi
leaq 0x26f1(%rip), %rsi      # 0x71a7
callq 0x2150
testl %eax, %eax
je 0x4ddd
movq %rbx, %rdi
leaq 0x26f6(%rip), %rsi      # 0x71c3
callq 0x2150
testl %eax, %eax
je 0x4e38
movq %rbx, %rdi
leaq 0x26fa(%rip), %rsi      # 0x71de
callq 0x2150
testl %eax, %eax
je 0x4e13
movq %rbx, %rdi
leaq 0x26e2(%rip), %rsi      # 0x71dd
callq 0x2150
testl %eax, %eax
je 0x4e13
movq %rbx, %rdi
leaq 0x26eb(%rip), %rsi      # 0x71fd
callq 0x2150
testl %eax, %eax
je 0x4b2f
cmpb $0x6d, 0x1(%rbx)
jne 0x5748
cmpb $0x0, 0x2(%rbx)
jne 0x5748
movq -0x38(%rbp), %rbx
movq 0x8(%rbx,%r13,8), %rdi
leaq 0x66c1(%rip), %rsi      # 0xb200
leaq 0x2594(%rip), %rdx      # 0x70da
callq 0x578d
testl %eax, %eax
jne 0x4e01
jmp 0x5750
cmpl $0x0, -0x44(%rbp)
jne 0x4e64
testb %r14b, %r14b
je 0x4c2d
movl -0x50(%rbp), %eax
subl %r12d, %eax
addl $-0x2, %eax
cmpl $0x4, %eax
ja 0x4cca
leaq 0x2514(%rip), %rcx      # 0x7098
movslq (%rcx,%rax,4), %rax
addq %rcx, %rax
jmpq *%rax
movb $0x0, 0x6634(%rip)      # 0xb1c8
movq 0x667d(%rip), %rax      # 0xb218
cmpb $0x0, (%rax)
leaq -0x80(%rbp), %rax
movq %rax, -0x40(%rbp)
je 0x4c2d
leaq -0x60(%rbp), %rax
jmp 0x4c29
movq -0x38(%rbp), %rbx
movq 0x8(%rbx,%r13,8), %rdi
leaq 0x660a(%rip), %rsi      # 0xb1cc
leaq 0x2511(%rip), %rdx      # 0x70da
callq 0x578d
testl %eax, %eax
jne 0x4e01
jmp 0x56b0
movq -0x38(%rbp), %rbx
movq 0x8(%rbx,%r13,8), %rdi
leaq 0x65e5(%rip), %rsi      # 0xb1d0
leaq 0x24e8(%rip), %rdx      # 0x70da
callq 0x578d
testl %eax, %eax
jne 0x4e01
jmp 0x56bc
movb $0x1, 0x65bd(%rip)      # 0xb1c8
movq 0x6606(%rip), %rax      # 0xb218
cmpb $0x0, (%rax)
leaq -0xd0(%rbp), %rax
movq %rax, -0x40(%rbp)
je 0x4c2d
leaq -0xa0(%rbp), %rax
movq %rax, -0x40(%rbp)
movslq %r15d, %r15
movq -0x40(%rbp), %rax
movq (%rax,%r15,8), %rdi
movq %rbx, %rsi
callq 0x2050
incl %r15d
xorl %r14d, %r14d
movq -0x38(%rbp), %rbx
jmp 0x4e04
movq -0x38(%rbp), %rbx
movq 0x8(%rbx,%r13,8), %rdi
leaq 0x6579(%rip), %rsi      # 0xb1d8
leaq 0x249a(%rip), %rdx      # 0x7100
callq 0x578d
testl %eax, %eax
jne 0x4e01
jmp 0x56e5
movq -0x38(%rbp), %rbx
movq 0x8(%rbx,%r13,8), %rdi
leaq 0x6558(%rip), %rsi      # 0xb1e0
leaq 0x244b(%rip), %rdx      # 0x70da
callq 0x578d
testl %eax, %eax
jne 0x4e01
jmp 0x56f6
movq -0x38(%rbp), %rbx
movq 0x8(%rbx,%r13,8), %rdi
leaq 0x6533(%rip), %rsi      # 0xb1e4
leaq 0x2422(%rip), %rdx      # 0x70da
callq 0x578d
testl %eax, %eax
jne 0x4e01
jmp 0x5704
movq 0x6327(%rip), %rax      # 0xaff8
movq (%rax), %rdi
leaq 0x2542(%rip), %rsi      # 0x721d
movq -0x30(%rbp), %rdx
xorl %eax, %eax
callq 0x2160
movq -0x38(%rbp), %rax
movq (%rax,%r13,8), %rbx
jmp 0x4c2d
movq -0x38(%rbp), %rbx
movq 0x8(%rbx,%r13,8), %rdi
leaq 0x64e5(%rip), %rsi      # 0xb1e8
leaq 0x2426(%rip), %rdx      # 0x7130
callq 0x578d
testl %eax, %eax
jne 0x4e01
jmp 0x5712
movq -0x38(%rbp), %rbx
movq 0x8(%rbx,%r13,8), %rdi
leaq 0x64c0(%rip), %rsi      # 0xb1ec
leaq 0x23fd(%rip), %rdx      # 0x7130
callq 0x578d
testl %eax, %eax
jne 0x4e01
jmp 0x571b
movq -0x38(%rbp), %rbx
movq 0x8(%rbx,%r13,8), %rdi
leaq 0x649b(%rip), %rsi      # 0xb1f0
leaq 0x23d4(%rip), %rdx      # 0x7130
callq 0x578d
testl %eax, %eax
jne 0x4e01
jmp 0x5724
movq -0x38(%rbp), %rbx
movq 0x8(%rbx,%r13,8), %rdi
leaq 0x6476(%rip), %rsi      # 0xb1f4
leaq 0x23ab(%rip), %rdx      # 0x7130
callq 0x578d
testl %eax, %eax
jne 0x4e01
jmp 0x572d
movq -0x38(%rbp), %rbx
movq 0x8(%rbx,%r13,8), %rdi
leaq 0x6455(%rip), %rsi      # 0xb1f8
leaq 0x2330(%rip), %rdx      # 0x70da
callq 0x578d
testl %eax, %eax
jne 0x4e01
jmp 0x5736
movq -0x38(%rbp), %rbx
movq 0x8(%rbx,%r13,8), %rdi
leaq 0x6434(%rip), %rsi      # 0xb1fc
leaq 0x230b(%rip), %rdx      # 0x70da
callq 0x578d
testl %eax, %eax
jne 0x4e01
jmp 0x573f
movq -0x38(%rbp), %rbx
movq 0x8(%rbx,%r13,8), %rdi
leaq 0x642b(%rip), %rsi      # 0xb218
leaq 0x23ba(%rip), %rdx      # 0x71ae
callq 0x578d
testl %eax, %eax
je 0x5765
incl %r12d
incl %r12d
cmpl -0x50(%rbp), %r12d
jl 0x48ae
jmp 0x4e73
movq -0x38(%rbp), %rbx
movq 0x8(%rbx,%r13,8), %rdi
leaq 0x6405(%rip), %rsi      # 0xb228
leaq 0x22b0(%rip), %rdx      # 0x70da
callq 0x578d
testl %eax, %eax
jne 0x4e01
jmp 0x576e
movq -0x38(%rbp), %rbx
movq 0x8(%rbx,%r13,8), %rdi
leaq 0x63d8(%rip), %rsi      # 0xb220
leaq 0x235f(%rip), %rdx      # 0x71ae
callq 0x578d
testl %eax, %eax
jne 0x4e01
leaq 0x236d(%rip), %rdi      # 0x71cc
jmp 0x5775
movq 0x63d5(%rip), %rdi      # 0xb240
movq %rbx, %rsi
callq 0x2050
movq 0x63c6(%rip), %rax      # 0xb240
cmpb $0x0, (%rax)
je 0x56a0
movb 0x633e(%rip), %r12b     # 0xb1c8
testb %r12b, %r12b
je 0x4ec7
movq 0x63b2(%rip), %rax      # 0xb248
cmpb $0x0, (%rax)
je 0x56a0
movq 0x63aa(%rip), %rbx      # 0xb250
cmpl $0x0, -0x44(%rbp)
jne 0x4eb5
cmpb $0x0, (%rbx)
je 0x56a0
movq 0x639c(%rip), %r14      # 0xb258
cmpb $0x0, (%r14)
jne 0x4ee4
jmp 0x56a0
movq 0x6382(%rip), %rbx      # 0xb250
cmpl $0x0, -0x44(%rbp)
jne 0x4edd
cmpb $0x0, (%rbx)
je 0x56a0
movq 0x6374(%rip), %r14      # 0xb258
movq %rbx, %rdi
callq 0x20c0
movq %rax, %r15
movq %r14, %rdi
callq 0x20c0
movq %rax, %r14
movslq %r15d, %rax
addq %rax, %rbx
addq $-0x3, %rbx
leaq 0x231e(%rip), %rsi      # 0x7229
movq %rbx, %rdi
callq 0x2150
testl %eax, %eax
jne 0x4f21
movb $0x0, (%rbx)
movb 0x62a7(%rip), %r12b     # 0xb1c8
testb %r12b, %r12b
je 0x4f4e
movq 0x632b(%rip), %rax      # 0xb258
movslq %r14d, %rcx
leaq (%rax,%rcx), %rbx
addq $-0x3, %rbx
leaq 0x22ea(%rip), %rsi      # 0x7229
movq %rbx, %rdi
callq 0x2150
testl %eax, %eax
jne 0x4f4e
movb $0x0, (%rbx)
movq 0x62c3(%rip), %rax      # 0xb218
cmpb $0x0, (%rax)
je 0x4f78
cmpb $0x0, 0x6267(%rip)      # 0xb1c8
je 0x4fab
movq 0x62b6(%rip), %rax      # 0xb220
cmpb $0x0, (%rax)
jne 0x4fab
movq -0x30(%rbp), %rdi
callq 0x244a
cmpl $0x0, -0x44(%rbp)
jne 0x56a0
movq 0x62e7(%rip), %rax      # 0xb270
cmpb $0x0, (%rax)
je 0x56a0
cmpb $0x0, 0x622f(%rip)      # 0xb1c8
je 0x4fab
movq 0x62d6(%rip), %rax      # 0xb278
cmpb $0x0, (%rax)
je 0x56a0
cmpq $0x0, 0x6225(%rip)      # 0xb1d8
js 0x56c8
je 0x4ffc
movq 0x629e(%rip), %rdi      # 0xb260
movq 0x6287(%rip), %rdx      # 0xb250
leaq 0x2268(%rip), %rsi      # 0x7238
xorl %eax, %eax
callq 0x22a0
cmpb $0x0, 0x61ea(%rip)      # 0xb1c8
je 0x4ffc
movq 0x6281(%rip), %rdi      # 0xb268
movq 0x626a(%rip), %rdx      # 0xb258
leaq 0x2243(%rip), %rsi      # 0x7238
xorl %eax, %eax
callq 0x22a0
cmpl $0x0, 0x61c9(%rip)      # 0xb1cc
js 0x56d4
movl 0x61f1(%rip), %eax      # 0xb200
cmpl $0x2, %eax
jg 0x5020
movl $0x1, 0x61e2(%rip)      # 0xb200
jmp 0x5033
cmpl $0x3, %eax
jne 0x5033
cmpq $0x0, 0x61ab(%rip)      # 0xb1d8
jne 0x56f1
cmpl $0x0, -0x44(%rbp)
je 0x5057
movq 0x6200(%rip), %rdi      # 0xb240
movq 0x61d1(%rip), %rsi      # 0xb218
movl 0x61db(%rip), %edx      # 0xb228
callq 0x6bd6
jmp 0x5683
movq 0x61f2(%rip), %rdi      # 0xb250
callq 0x20c0
movq %rsp, -0x50(%rbp)
movq %rsp, %r15
addq $0x23, %rax
andq $-0x10, %rax
subq %rax, %r15
movq %r15, %rsp
movq 0x61d1(%rip), %rdx      # 0xb250
leaq 0x21dc(%rip), %rsi      # 0x7262
movq %r15, %rdi
xorl %eax, %eax
callq 0x22a0
movq 0x61b9(%rip), %r14      # 0xb250
movq %r14, %rdi
callq 0x20c0
movq %rsp, %rbx
addq $0x23, %rax
andq $-0x10, %rax
subq %rax, %rbx
movq %rbx, %rsp
movq 0x61a1(%rip), %rdi      # 0xb258
callq 0x20c0
movq %rsp, %r13
addq $0x23, %rax
andq $-0x10, %rax
subq %rax, %r13
movq %r13, %rsp
leaq 0x2199(%rip), %r12      # 0x726d
movq %rbx, %rdi
movq %r12, %rsi
movq %r14, %rdx
xorl %eax, %eax
callq 0x22a0
movq 0x616d(%rip), %rdx      # 0xb258
movq %r13, -0x38(%rbp)
movq %r13, %rdi
movq %r12, %rsi
xorl %eax, %eax
callq 0x22a0
movq 0x6115(%rip), %rax      # 0xb218
cmpb $0x0, (%rax)
jne 0x5267
movq 0x615d(%rip), %rdi      # 0xb270
leaq 0x1fb1(%rip), %rsi      # 0x70cb
callq 0x2210
testq %rax, %rax
je 0x56ff
movq %rax, %r12
leaq -0x4e0(%rbp), %rsi
movq %rax, %rdi
movl $0x400, %edx            # imm = 0x400
callq 0x2080
testq %rax, %rax
je 0x51ab
leaq -0x4e0(%rbp), %r13
leaq 0x60de(%rip), %r14      # 0xb230
movq %r13, %rdi
callq 0x20c0
cmpq $0x1, %rax
jne 0x516a
cmpw $0xa, -0x4e0(%rbp)
je 0x5196
movl $0x400, %edx            # imm = 0x400
movq %r13, %rdi
movl $0x9, %esi
callq 0x2120
testq %rax, %rax
je 0x5196
movw $0xa, (%rax)
movq %r14, %rdi
movq %r13, %rsi
movl $0x1, %edx
callq 0x66f9
movq %r12, %rdi
movq %r13, %rsi
movl $0x400, %edx            # imm = 0x400
callq 0x2080
testq %rax, %rax
jne 0x5152
movq %r12, %rdi
callq 0x2030
cmpb $0x0, 0x600e(%rip)      # 0xb1c8
je 0x5267
movq 0x60b1(%rip), %rdi      # 0xb278
leaq 0x1efd(%rip), %rsi      # 0x70cb
callq 0x2210
testq %rax, %rax
je 0x570d
movq %rax, %r12
leaq -0x4e0(%rbp), %rsi
movq %rax, %rdi
movl $0x400, %edx            # imm = 0x400
callq 0x2080
testq %rax, %rax
je 0x525f
leaq -0x4e0(%rbp), %r13
leaq 0x6032(%rip), %r14      # 0xb238
movq %r13, %rdi
callq 0x20c0
cmpq $0x1, %rax
jne 0x521e
cmpw $0xa, -0x4e0(%rbp)
je 0x524a
movl $0x400, %edx            # imm = 0x400
movq %r13, %rdi
movl $0x9, %esi
callq 0x2120
testq %rax, %rax
je 0x524a
movw $0xa, (%rax)
movq %r14, %rdi
movq %r13, %rsi
movl $0x1, %edx
callq 0x66f9
movq %r12, %rdi
movq %r13, %rsi
movl $0x400, %edx            # imm = 0x400
callq 0x2080
testq %rax, %rax
jne 0x5206
movq %r12, %rdi
callq 0x2030
cmpl $0x3, 0x5f92(%rip)      # 0xb200
movq 0x603b(%rip), %rdi      # 0xb2b0
leaq 0x1ffe(%rip), %rax      # 0x727a
leaq 0x204e(%rip), %rsi      # 0x72d1
cmovgeq %rax, %rsi
leaq 0x1ff8(%rip), %rdx      # 0x7286
xorl %eax, %eax
callq 0x22a0
callq 0x5919
leaq 0x1fa0(%rip), %rsi      # 0x7241
movq %r15, %rdi
callq 0x2260
cmpb $0x0, 0x5f18(%rip)      # 0xb1c8
setne %r15b
movl 0x605e(%rip), %edi      # 0xb318
movslq 0x5f0b(%rip), %rdx      # 0xb1cc
movq %rdx, %rsi
imulq %rdi, %rsi
movl %r15d, %ecx
shlq %cl, %rsi
movq %rsi, 0x604b(%rip)      # 0xb320
cvtsi2sd %rdi, %xmm2
movsd 0x1dae(%rip), %xmm0     # 0x7090
mulsd %xmm0, %xmm2
movl 0x601c(%rip), %ecx      # 0xb308
cvtsi2sd %rcx, %xmm1
divsd %xmm1, %xmm2
cvtsd2ss %xmm2, %xmm2
movss %xmm2, 0x6027(%rip)     # 0xb328
movl 0x6025(%rip), %ecx      # 0xb32c
xorps %xmm2, %xmm2
cvtsi2sd %rcx, %xmm2
mulsd %xmm0, %xmm2
divsd %xmm1, %xmm2
cvtsd2ss %xmm2, %xmm2
movss %xmm2, 0x600d(%rip)     # 0xb330
movl 0x600b(%rip), %ecx      # 0xb334
xorps %xmm2, %xmm2
cvtsi2sd %rcx, %xmm2
mulsd %xmm0, %xmm2
divsd %xmm1, %xmm2
cvtsd2ss %xmm2, %xmm2
movss %xmm2, 0x5ff3(%rip)     # 0xb338
movl 0x5ff1(%rip), %ecx      # 0xb33c
xorps %xmm2, %xmm2
cvtsi2sd %rcx, %xmm2
mulsd %xmm0, %xmm2
divsd %xmm1, %xmm2
cvtsd2ss %xmm2, %xmm2
movss %xmm2, 0x5fd9(%rip)     # 0xb340
xorps %xmm2, %xmm2
cvtsi2sdq 0x5fd5(%rip), %xmm2 # 0xb348
cvtsi2sdq 0x5f94(%rip), %xmm3 # 0xb310
mulsd %xmm0, %xmm2
divsd %xmm3, %xmm2
cvtsd2ss %xmm2, %xmm2
movss %xmm2, 0x5fc0(%rip)     # 0xb350
xorps %xmm2, %xmm2
cvtsi2sdq 0x5fbc(%rip), %xmm2 # 0xb358
movq %rax, %r12
mulsd %xmm0, %xmm2
xorps %xmm3, %xmm3
cvtsi2sd %rsi, %xmm3
divsd %xmm3, %xmm2
cvtsd2ss %xmm2, %xmm2
movss %xmm2, 0x5fa5(%rip)     # 0xb360
movl 0x5fb3(%rip), %eax      # 0xb374
xorps %xmm2, %xmm2
cvtsi2sd %rax, %xmm2
mulsd %xmm0, %xmm2
divsd %xmm1, %xmm2
cvtsd2ss %xmm2, %xmm2
movss %xmm2, 0x5f9b(%rip)     # 0xb378
movl 0x5f81(%rip), %eax      # 0xb364
xorps %xmm2, %xmm2
cvtsi2sd %rax, %xmm2
mulsd %xmm0, %xmm2
divsd %xmm1, %xmm2
cvtsd2ss %xmm2, %xmm2
movss %xmm2, 0x5f69(%rip)     # 0xb368
movl 0x5f67(%rip), %eax      # 0xb36c
xorps %xmm2, %xmm2
cvtsi2sd %rax, %xmm2
mulsd %xmm0, %xmm2
divsd %xmm1, %xmm2
xorps %xmm0, %xmm0
cvtsd2ss %xmm2, %xmm0
movss %xmm0, 0x5f4c(%rip)     # 0xb370
leaq 0x2869(%rip), %rsi      # 0x7c94
movq %r12, %rdi
xorl %eax, %eax
callq 0x2160
movl 0x5ecd(%rip), %edx      # 0xb308
movl %r15d, %ecx
shll %cl, %edx
leaq 0x2861(%rip), %rsi      # 0x7ca8
movq %r12, %rdi
xorl %eax, %eax
callq 0x2160
movq 0x5eb8(%rip), %rdx      # 0xb310
leaq 0x2863(%rip), %rsi      # 0x7cc2
movq %r12, %rdi
xorl %eax, %eax
callq 0x2160
movl 0x5ea9(%rip), %edx      # 0xb318
movl %r15d, %ecx
shll %cl, %edx
leaq 0x2863(%rip), %rsi      # 0x7cde
movq %r12, %rdi
xorl %eax, %eax
callq 0x2160
movq 0x5e94(%rip), %rdx      # 0xb320
leaq 0x2862(%rip), %rsi      # 0x7cf5
movq %r12, %rdi
xorl %eax, %eax
callq 0x2160
xorps %xmm0, %xmm0
cvtss2sd 0x5e80(%rip), %xmm0     # 0xb328
leaq 0x285f(%rip), %rsi      # 0x7d0e
movq %r12, %rdi
movb $0x1, %al
callq 0x2160
movl 0x5e6d(%rip), %edx      # 0xb32c
movl %r15d, %ecx
shll %cl, %edx
leaq 0x285e(%rip), %rsi      # 0x7d29
movq %r12, %rdi
xorl %eax, %eax
callq 0x2160
xorps %xmm0, %xmm0
cvtss2sd 0x5e50(%rip), %xmm0     # 0xb330
leaq 0x285f(%rip), %rsi      # 0x7d46
movq %r12, %rdi
movb $0x1, %al
callq 0x2160
movl 0x5e3d(%rip), %edx      # 0xb334
movl %r15d, %ecx
shll %cl, %edx
leaq 0x2864(%rip), %rsi      # 0x7d67
movq %r12, %rdi
xorl %eax, %eax
callq 0x2160
xorps %xmm0, %xmm0
cvtss2sd 0x5e20(%rip), %xmm0     # 0xb338
leaq 0x285c(%rip), %rsi      # 0x7d7b
movq %r12, %rdi
movb $0x1, %al
callq 0x2160
movl 0x5e0d(%rip), %edx      # 0xb33c
movl %r15d, %ecx
shll %cl, %edx
leaq 0x2858(%rip), %rsi      # 0x7d93
movq %r12, %rdi
xorl %eax, %eax
callq 0x2160
xorps %xmm0, %xmm0
cvtss2sd 0x5df0(%rip), %xmm0     # 0xb340
leaq 0x285e(%rip), %rsi      # 0x7db5
movq %r12, %rdi
movb $0x1, %al
callq 0x2160
movl 0x5dfd(%rip), %edx      # 0xb364
movl %r15d, %ecx
shll %cl, %edx
leaq 0x2868(%rip), %rsi      # 0x7ddb
movq %r12, %rdi
xorl %eax, %eax
callq 0x2160
xorps %xmm0, %xmm0
cvtss2sd 0x5de0(%rip), %xmm0     # 0xb368
leaq 0x2865(%rip), %rsi      # 0x7df4
movq %r12, %rdi
movb $0x1, %al
callq 0x2160
movl 0x5dcd(%rip), %edx      # 0xb36c
movl %r15d, %ecx
shll %cl, %edx
leaq 0x286d(%rip), %rsi      # 0x7e18
movq %r12, %rdi
xorl %eax, %eax
callq 0x2160
xorps %xmm0, %xmm0
cvtss2sd 0x5db0(%rip), %xmm0     # 0xb370
leaq 0x2862(%rip), %rsi      # 0x7e29
movq %r12, %rdi
movb $0x1, %al
callq 0x2160
movl 0x5d9d(%rip), %edx      # 0xb374
movl %r15d, %ecx
shll %cl, %edx
leaq 0x2862(%rip), %rsi      # 0x7e45
movq %r12, %rdi
xorl %eax, %eax
callq 0x2160
xorps %xmm0, %xmm0
cvtss2sd 0x5d80(%rip), %xmm0     # 0xb378
leaq 0x2857(%rip), %rsi      # 0x7e56
movq %r12, %rdi
movb $0x1, %al
callq 0x2160
xorps %xmm0, %xmm0
cvtss2sd 0x5d3c(%rip), %xmm0     # 0xb350
leaq 0x2857(%rip), %rsi      # 0x7e72
movq %r12, %rdi
movb $0x1, %al
callq 0x2160
xorps %xmm0, %xmm0
cvtss2sd 0x5d30(%rip), %xmm0     # 0xb360
leaq 0x285d(%rip), %rsi      # 0x7e94
movq %r12, %rdi
movb $0x1, %al
callq 0x2160
movq %r12, %rdi
callq 0x20b0
leaq 0x5d2c(%rip), %rdi      # 0xb37c
leaq 0xfd25(%rip), %rsi      # 0x1537c
movq %rbx, %rdx
callq 0x5e20
cmpb $0x0, 0x5b62(%rip)      # 0xb1c8
je 0x567f
leaq 0xad0d(%rip), %rdi      # 0x1037c
leaq 0x41d06(%rip), %rsi     # 0x4737c
movq -0x38(%rbp), %rdx
callq 0x5e20
movq -0x50(%rbp), %rsp
leaq -0x4e0(%rbp), %rdi
callq 0x2180
xorl %eax, %eax
leaq -0x28(%rbp), %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movq -0x30(%rbp), %rdi
callq 0x2070
xorl %edi, %edi
callq 0x22b0
leaq 0x1a27(%rip), %rdi      # 0x70de
jmp 0x5775
leaq 0x1a2c(%rip), %rdi      # 0x70ef
jmp 0x5775
leaq 0x1b5e(%rip), %rdi      # 0x722d
jmp 0x577e
leaq 0x1b68(%rip), %rdi      # 0x7243
jmp 0x577e
callq 0x2400
leaq 0x1a19(%rip), %rdi      # 0x7105
jmp 0x5775
callq 0x246d
leaq 0x1a16(%rip), %rdi      # 0x7113
jmp 0x5775
callq 0x24a8
leaq 0x1a17(%rip), %rdi      # 0x7122
jmp 0x5775
callq 0x2494
leaq 0x1a1d(%rip), %rdi      # 0x7136
jmp 0x5775
leaq 0x1a23(%rip), %rdi      # 0x7145
jmp 0x5775
leaq 0x1a2a(%rip), %rdi      # 0x7155
jmp 0x5775
leaq 0x1a36(%rip), %rdi      # 0x716a
jmp 0x5775
leaq 0x1a46(%rip), %rdi      # 0x7183
jmp 0x5775
leaq 0x1a4f(%rip), %rdi      # 0x7195
jmp 0x5775
movq %rbx, %rdi
callq 0x2427
leaq 0x1aaa(%rip), %rdi      # 0x7201
callq 0x2070
leaq 0x1b7a(%rip), %rdi      # 0x72dd
jmp 0x577e
leaq 0x1a46(%rip), %rdi      # 0x71b2
jmp 0x5775
leaq 0x1a76(%rip), %rdi      # 0x71eb
callq 0x2070
movq -0x30(%rbp), %rdi
callq 0x2070
movl $0xffffffff, %edi       # imm = 0xFFFFFFFF
callq 0x22b0