// File: /workspace/github_c_makefile_star2_O1/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 0x5765
movq %rsi, -0x38(%rbp)
movq 0x8(%rsi), %rbx
leaq 0x2a4e(%rip), %rsi      # 0x70c6
movq %rbx, %rdi
callq 0x2140
movl %eax, -0x44(%rbp)
testl %eax, %eax
je 0x46a7
leaq 0x2a3f(%rip), %rsi      # 0x70cd
movq %rbx, %rdi
callq 0x2140
testl %eax, %eax
jne 0x56f2
leaq 0x33fd(%rip), %rax      # 0x7aa2
jmp 0x46ae
leaq 0x2c6e(%rip), %rax      # 0x731c
movq %rax, -0x30(%rbp)
movq 0x691f(%rip), %rax      # 0xafd8
movq (%rax), %rdi
xorl %ebx, %ebx
movl $0x2, %r12d
xorl %esi, %esi
movl $0x2, %edx
xorl %ecx, %ecx
callq 0x21d0
movq 0x691f(%rip), %rax      # 0xaff8
movq (%rax), %rdi
xorl %esi, %esi
movl $0x2, %edx
xorl %ecx, %ecx
callq 0x21d0
leaq -0xd8(%rbp), %rdi
callq 0x2170
movb $0x0, 0x6ac3(%rip)      # 0xb1c0
movq %rbx, 0x6ac0(%rip)      # 0xb1c4
movq %rbx, 0x6ac5(%rip)      # 0xb1d0
movabsq $0x1e00000013, %rax     # imm = 0x1E00000013
movq %rax, 0x6abc(%rip)      # 0xb1d8
movaps 0x28ed(%rip), %xmm0     # 0x7010
movups %xmm0, 0x6ab6(%rip)     # 0xb1e0
movabsq $0x2100000000, %rax     # imm = 0x2100000000
movq %rax, 0x6ab5(%rip)      # 0xb1f0
movl $0x1, 0x6ab3(%rip)      # 0xb1f8
movl $0x200, %edi            # imm = 0x200
callq 0x21b0
xorps %xmm0, %xmm0
movups %xmm0, 0x6aa7(%rip)     # 0xb200
movq %rax, 0x6ab0(%rip)      # 0xb210
movl $0x200, %edi            # imm = 0x200
callq 0x21b0
movq %rax, 0x6aa7(%rip)      # 0xb218
movl $0x5, 0x6aa5(%rip)      # 0xb220
callq 0x66b3
movq %rax, 0x6aa1(%rip)      # 0xb228
callq 0x66b3
movq %rax, 0x6a9d(%rip)      # 0xb230
movl $0x400, %edi            # imm = 0x400
callq 0x21b0
movq %rax, %rbx
movq %rax, 0x6a91(%rip)      # 0xb238
movl $0x400, %edi            # imm = 0x400
callq 0x21b0
movq %rax, -0x40(%rbp)
movq %rax, 0x6a84(%rip)      # 0xb240
movl $0x400, %edi            # imm = 0x400
callq 0x21b0
movq %rax, 0x6a8b(%rip)      # 0xb258
movl $0x400, %edi            # imm = 0x400
callq 0x21b0
movq %rax, 0x6a82(%rip)      # 0xb260
movl $0x400, %edi            # imm = 0x400
callq 0x21b0
movq %rax, %r14
movq %rax, 0x6a76(%rip)      # 0xb268
movl $0x400, %edi            # imm = 0x400
callq 0x21b0
movq %rax, -0x68(%rbp)
movq %rax, 0x6a69(%rip)      # 0xb270
movl $0x400, %edi            # imm = 0x400
callq 0x21b0
movq %rax, %r15
movq %rax, 0x6a2d(%rip)      # 0xb248
movl $0x400, %edi            # imm = 0x400
callq 0x21b0
movq %rax, %r13
movq %rax, 0x6a21(%rip)      # 0xb250
movl $0x400, %edi            # imm = 0x400
callq 0x21b0
movq %rax, 0x6a68(%rip)      # 0xb2a8
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 0x4ea1
movb $0x1, %r14b
movq $0x0, -0x40(%rbp)
xorl %r15d, %r15d
movslq %r12d, %r13
movq (%rbx,%r13,8), %rbx
cmpb $0x2d, (%rbx)
jne 0x4b8e
movq %rbx, %rdi
leaq 0x27fe(%rip), %rsi      # 0x70d6
callq 0x2140
testl %eax, %eax
je 0x4be4
movq %rbx, %rdi
leaq 0x27e8(%rip), %rsi      # 0x70d7
callq 0x2140
testl %eax, %eax
je 0x4be4
movq %rbx, %rdi
leaq 0x27e1(%rip), %rsi      # 0x70e7
callq 0x2140
testl %eax, %eax
je 0x4c5b
movq %rbx, %rdi
leaq 0x27cb(%rip), %rsi      # 0x70e8
callq 0x2140
testl %eax, %eax
je 0x4c5b
movq %rbx, %rdi
leaq 0x27c8(%rip), %rsi      # 0x70fc
callq 0x2140
testl %eax, %eax
je 0x4c84
movq %rbx, %rdi
leaq 0x27b2(%rip), %rsi      # 0x70fd
callq 0x2140
testl %eax, %eax
je 0x4c84
movq %rbx, %rdi
leaq 0x27ac(%rip), %rsi      # 0x710e
callq 0x2140
testl %eax, %eax
je 0x4cad
movq %rbx, %rdi
leaq 0x2796(%rip), %rsi      # 0x710f
callq 0x2140
testl %eax, %eax
je 0x4cad
movq %rbx, %rdi
leaq 0x278d(%rip), %rsi      # 0x711d
callq 0x2140
testl %eax, %eax
je 0x4cd6
movq %rbx, %rdi
leaq 0x2777(%rip), %rsi      # 0x711e
callq 0x2140
testl %eax, %eax
je 0x4cd6
movq %rbx, %rdi
leaq 0x276e(%rip), %rsi      # 0x712c
callq 0x2140
testl %eax, %eax
je 0x4d20
movq %rbx, %rdi
leaq 0x2758(%rip), %rsi      # 0x712d
callq 0x2140
testl %eax, %eax
je 0x4d20
movq %rbx, %rdi
leaq 0x2755(%rip), %rsi      # 0x7141
callq 0x2140
testl %eax, %eax
je 0x4d49
movq %rbx, %rdi
leaq 0x273f(%rip), %rsi      # 0x7142
callq 0x2140
testl %eax, %eax
je 0x4d49
movq %rbx, %rdi
leaq 0x2736(%rip), %rsi      # 0x7150
callq 0x2140
testl %eax, %eax
je 0x4d72
movq %rbx, %rdi
leaq 0x2720(%rip), %rsi      # 0x7151
callq 0x2140
testl %eax, %eax
je 0x4d72
movq %rbx, %rdi
leaq 0x271d(%rip), %rsi      # 0x7165
callq 0x2140
testl %eax, %eax
je 0x4d9b
movq %rbx, %rdi
leaq 0x2707(%rip), %rsi      # 0x7166
callq 0x2140
testl %eax, %eax
je 0x4d9b
movq %rbx, %rdi
leaq 0x2704(%rip), %rsi      # 0x717a
callq 0x2140
testl %eax, %eax
je 0x4dc0
movq %rbx, %rdi
leaq 0x26ee(%rip), %rsi      # 0x717b
callq 0x2140
testl %eax, %eax
je 0x4dc0
movq %rbx, %rdi
leaq 0x26ed(%rip), %rsi      # 0x7191
callq 0x2140
testl %eax, %eax
je 0x4de5
movq %rbx, %rdi
leaq 0x26d7(%rip), %rsi      # 0x7192
callq 0x2140
testl %eax, %eax
je 0x4de5
movq %rbx, %rdi
leaq 0x26cc(%rip), %rsi      # 0x719e
callq 0x2140
testl %eax, %eax
je 0x4e0a
movq %rbx, %rdi
leaq 0x26be(%rip), %rsi      # 0x71a7
callq 0x2140
testl %eax, %eax
je 0x4e0a
movq %rbx, %rdi
leaq 0x26c3(%rip), %rsi      # 0x71c3
callq 0x2140
testl %eax, %eax
je 0x4e65
movq %rbx, %rdi
leaq 0x26c7(%rip), %rsi      # 0x71de
callq 0x2140
testl %eax, %eax
je 0x4e40
movq %rbx, %rdi
leaq 0x26af(%rip), %rsi      # 0x71dd
callq 0x2140
testl %eax, %eax
je 0x4e40
movq %rbx, %rdi
leaq 0x26b8(%rip), %rsi      # 0x71fd
callq 0x2140
testl %eax, %eax
je 0x4b65
movq %rbx, %rdi
leaq 0x26a6(%rip), %rsi      # 0x71fe
callq 0x2140
testl %eax, %eax
jne 0x5751
movq -0x38(%rbp), %rax
movq 0x8(%rax,%r13,8), %rdi
leaq 0x6683(%rip), %rsi      # 0xb1f8
leaq 0x255e(%rip), %rdx      # 0x70da
callq 0x57a8
testl %eax, %eax
jne 0x4e89
jmp 0x5759
cmpl $0x0, -0x44(%rbp)
jne 0x4e92
testb %r14b, %r14b
je 0x4c0d
movl -0x50(%rbp), %eax
subl %r12d, %eax
addl $-0x2, %eax
cmpl $0x4, %eax
movq -0x38(%rbp), %rbx
ja 0x4cff
leaq 0x24de(%rip), %rcx      # 0x7098
movslq (%rcx,%rax,4), %rax
addq %rcx, %rax
jmpq *%rax
movb $0x0, 0x65f6(%rip)      # 0xb1c0
movq 0x663f(%rip), %rax      # 0xb210
cmpb $0x0, (%rax)
leaq -0x80(%rbp), %rax
movq %rax, -0x40(%rbp)
je 0x4c3c
leaq -0x60(%rbp), %rax
jmp 0x4c38
movq -0x38(%rbp), %rbx
movq 0x8(%rbx,%r13,8), %rdi
leaq 0x65d0(%rip), %rsi      # 0xb1c4
leaq 0x24df(%rip), %rdx      # 0x70da
callq 0x57a8
testl %eax, %eax
jne 0x4e2e
jmp 0x56c2
movq -0x38(%rbp), %rbx
jmp 0x4c3c
movb $0x1, 0x65a6(%rip)      # 0xb1c0
movq 0x65ef(%rip), %rax      # 0xb210
cmpb $0x0, (%rax)
leaq -0xd0(%rbp), %rax
movq %rax, -0x40(%rbp)
je 0x4c3c
leaq -0xa0(%rbp), %rax
movq %rax, -0x40(%rbp)
movslq %r15d, %r15
movq -0x40(%rbp), %rax
movq (%rax,%r15,8), %rdi
movq (%rbx,%r13,8), %rsi
callq 0x2050
incl %r15d
xorl %r14d, %r14d
jmp 0x4e31
movq -0x38(%rbp), %rbx
movq 0x8(%rbx,%r13,8), %rdi
leaq 0x655d(%rip), %rsi      # 0xb1c8
leaq 0x2468(%rip), %rdx      # 0x70da
callq 0x57a8
testl %eax, %eax
jne 0x4e2e
jmp 0x56ce
movq -0x38(%rbp), %rbx
movq 0x8(%rbx,%r13,8), %rdi
leaq 0x653c(%rip), %rsi      # 0xb1d0
leaq 0x2465(%rip), %rdx      # 0x7100
callq 0x57a8
testl %eax, %eax
jne 0x4e2e
jmp 0x56f7
movq -0x38(%rbp), %rbx
movq 0x8(%rbx,%r13,8), %rdi
leaq 0x651b(%rip), %rsi      # 0xb1d8
leaq 0x2416(%rip), %rdx      # 0x70da
callq 0x57a8
testl %eax, %eax
jne 0x4e2e
jmp 0x5708
movq -0x38(%rbp), %rbx
movq 0x8(%rbx,%r13,8), %rdi
leaq 0x64f6(%rip), %rsi      # 0xb1dc
leaq 0x23ed(%rip), %rdx      # 0x70da
callq 0x57a8
testl %eax, %eax
jne 0x4e2e
jmp 0x571b
movq 0x62f2(%rip), %rax      # 0xaff8
movq (%rax), %rdi
leaq 0x250d(%rip), %rsi      # 0x721d
movq -0x30(%rbp), %rdx
xorl %eax, %eax
callq 0x2150
jmp 0x4c3c
movq -0x38(%rbp), %rbx
movq 0x8(%rbx,%r13,8), %rdi
leaq 0x64b0(%rip), %rsi      # 0xb1e0
leaq 0x23f9(%rip), %rdx      # 0x7130
callq 0x57a8
testl %eax, %eax
jne 0x4e2e
jmp 0x5724
movq -0x38(%rbp), %rbx
movq 0x8(%rbx,%r13,8), %rdi
leaq 0x648b(%rip), %rsi      # 0xb1e4
leaq 0x23d0(%rip), %rdx      # 0x7130
callq 0x57a8
testl %eax, %eax
jne 0x4e2e
jmp 0x572d
movq -0x38(%rbp), %rbx
movq 0x8(%rbx,%r13,8), %rdi
leaq 0x6466(%rip), %rsi      # 0xb1e8
leaq 0x23a7(%rip), %rdx      # 0x7130
callq 0x57a8
testl %eax, %eax
jne 0x4e2e
jmp 0x5736
movq -0x38(%rbp), %rbx
movq 0x8(%rbx,%r13,8), %rdi
leaq 0x6441(%rip), %rsi      # 0xb1ec
leaq 0x237e(%rip), %rdx      # 0x7130
callq 0x57a8
testl %eax, %eax
jne 0x4e2e
jmp 0x573f
movq -0x38(%rbp), %rbx
movq 0x8(%rbx,%r13,8), %rdi
leaq 0x6420(%rip), %rsi      # 0xb1f0
leaq 0x2303(%rip), %rdx      # 0x70da
callq 0x57a8
testl %eax, %eax
jne 0x4e2e
jmp 0x5748
movq -0x38(%rbp), %rbx
movq 0x8(%rbx,%r13,8), %rdi
leaq 0x63ff(%rip), %rsi      # 0xb1f4
leaq 0x22de(%rip), %rdx      # 0x70da
callq 0x57a8
testl %eax, %eax
jne 0x4e2e
jmp 0x576e
movq -0x38(%rbp), %rbx
movq 0x8(%rbx,%r13,8), %rdi
leaq 0x63f6(%rip), %rsi      # 0xb210
leaq 0x238d(%rip), %rdx      # 0x71ae
callq 0x57a8
testl %eax, %eax
je 0x5777
incl %r12d
incl %r12d
cmpl -0x50(%rbp), %r12d
jl 0x48be
jmp 0x4ea1
movq -0x38(%rbp), %rax
movq 0x8(%rax,%r13,8), %rdi
leaq 0x63d0(%rip), %rsi      # 0xb220
leaq 0x2283(%rip), %rdx      # 0x70da
callq 0x57a8
testl %eax, %eax
jne 0x4e89
jmp 0x5780
movq -0x38(%rbp), %rax
movq 0x8(%rax,%r13,8), %rdi
leaq 0x63a3(%rip), %rsi      # 0xb218
leaq 0x2332(%rip), %rdx      # 0x71ae
callq 0x57a8
testl %eax, %eax
je 0x5789
incl %r12d
movq -0x38(%rbp), %rbx
jmp 0x4e31
movq 0x639f(%rip), %rdi      # 0xb238
movq %rbx, %rsi
callq 0x2050
movq 0x6390(%rip), %rax      # 0xb238
cmpb $0x0, (%rax)
je 0x56b2
movb 0x6309(%rip), %al       # 0xb1c0
testb %al, %al
je 0x4ecb
movq 0x637e(%rip), %rcx      # 0xb240
cmpb $0x0, (%rcx)
je 0x56b2
movq 0x6376(%rip), %rbx      # 0xb248
cmpl $0x0, -0x44(%rbp)
jne 0x4ee1
cmpb $0x0, (%rbx)
je 0x56b2
testb %al, %al
je 0x4ef5
movq 0x6364(%rip), %rax      # 0xb250
cmpb $0x0, (%rax)
je 0x56b2
movq %rbx, %rdi
callq 0x20c0
movq %rax, %r15
movq 0x6349(%rip), %rdi      # 0xb250
callq 0x20c0
movq %rax, %r14
movslq %r15d, %rax
addq %rax, %rbx
addq $-0x3, %rbx
leaq 0x2309(%rip), %rsi      # 0x7229
movq %rbx, %rdi
callq 0x2140
testl %eax, %eax
jne 0x4f2f
movb $0x0, (%rbx)
cmpb $0x0, 0x628a(%rip)      # 0xb1c0
je 0x4f60
movq 0x6311(%rip), %rax      # 0xb250
movslq %r14d, %rcx
leaq (%rax,%rcx), %rbx
addq $-0x3, %rbx
leaq 0x22d8(%rip), %rsi      # 0x7229
movq %rbx, %rdi
callq 0x2140
testl %eax, %eax
jne 0x4f60
movb $0x0, (%rbx)
movq 0x62a9(%rip), %rax      # 0xb210
cmpb $0x0, (%rax)
je 0x4f8a
cmpb $0x0, 0x624d(%rip)      # 0xb1c0
je 0x4fbd
movq 0x629c(%rip), %rax      # 0xb218
cmpb $0x0, (%rax)
jne 0x4fbd
movq -0x30(%rbp), %rdi
callq 0x243a
cmpl $0x0, -0x44(%rbp)
jne 0x56b2
movq 0x62cd(%rip), %rax      # 0xb268
cmpb $0x0, (%rax)
je 0x56b2
cmpb $0x0, 0x6215(%rip)      # 0xb1c0
je 0x4fbd
movq 0x62bc(%rip), %rax      # 0xb270
cmpb $0x0, (%rax)
je 0x56b2
cmpq $0x0, 0x620b(%rip)      # 0xb1d0
js 0x56da
je 0x500e
movq 0x6284(%rip), %rdi      # 0xb258
movq 0x626d(%rip), %rdx      # 0xb248
leaq 0x2256(%rip), %rsi      # 0x7238
xorl %eax, %eax
callq 0x2290
cmpb $0x0, 0x61d0(%rip)      # 0xb1c0
je 0x500e
movq 0x6267(%rip), %rdi      # 0xb260
movq 0x6250(%rip), %rdx      # 0xb250
leaq 0x2231(%rip), %rsi      # 0x7238
xorl %eax, %eax
callq 0x2290
cmpl $0x0, 0x61af(%rip)      # 0xb1c4
js 0x56e6
movl 0x61d7(%rip), %eax      # 0xb1f8
cmpl $0x2, %eax
jg 0x5032
movl $0x1, 0x61c8(%rip)      # 0xb1f8
jmp 0x5045
cmpl $0x3, %eax
jne 0x5045
cmpq $0x0, 0x6191(%rip)      # 0xb1d0
jne 0x5703
cmpl $0x0, -0x44(%rbp)
je 0x5069
movq 0x61e6(%rip), %rdi      # 0xb238
movq 0x61b7(%rip), %rsi      # 0xb210
movl 0x61c1(%rip), %edx      # 0xb220
callq 0x6bc0
jmp 0x5695
movq 0x61d8(%rip), %rdi      # 0xb248
callq 0x20c0
movq %rsp, -0x50(%rbp)
movq %rsp, %r15
addq $0x23, %rax
andq $-0x10, %rax
subq %rax, %r15
movq %r15, %rsp
movq 0x61b7(%rip), %rdx      # 0xb248
leaq 0x21ca(%rip), %rsi      # 0x7262
movq %r15, %rdi
xorl %eax, %eax
callq 0x2290
movq 0x619f(%rip), %r14      # 0xb248
movq %r14, %rdi
callq 0x20c0
movq %rsp, %rbx
addq $0x23, %rax
andq $-0x10, %rax
subq %rax, %rbx
movq %rbx, %rsp
movq 0x6187(%rip), %rdi      # 0xb250
callq 0x20c0
movq %rsp, %r13
addq $0x23, %rax
andq $-0x10, %rax
subq %rax, %r13
movq %r13, %rsp
leaq 0x2187(%rip), %r12      # 0x726d
movq %rbx, %rdi
movq %r12, %rsi
movq %r14, %rdx
xorl %eax, %eax
callq 0x2290
movq 0x6153(%rip), %rdx      # 0xb250
movq %r13, -0x38(%rbp)
movq %r13, %rdi
movq %r12, %rsi
xorl %eax, %eax
callq 0x2290
movq 0x60fb(%rip), %rax      # 0xb210
cmpb $0x0, (%rax)
jne 0x5279
movq 0x6143(%rip), %rdi      # 0xb268
leaq 0x1f9f(%rip), %rsi      # 0x70cb
callq 0x2200
testq %rax, %rax
je 0x5711
movq %rax, %r12
leaq -0x4e0(%rbp), %rsi
movq %rax, %rdi
movl $0x400, %edx            # imm = 0x400
callq 0x2080
testq %rax, %rax
je 0x51bd
leaq -0x4e0(%rbp), %r13
leaq 0x60c4(%rip), %r14      # 0xb228
movq %r13, %rdi
callq 0x20c0
cmpq $0x1, %rax
jne 0x517c
cmpw $0xa, -0x4e0(%rbp)
je 0x51a8
movl $0x400, %edx            # imm = 0x400
movq %r13, %rdi
movl $0x9, %esi
callq 0x2120
testq %rax, %rax
je 0x51a8
movw $0xa, (%rax)
movq %r14, %rdi
movq %r13, %rsi
movl $0x1, %edx
callq 0x66f7
movq %r12, %rdi
movq %r13, %rsi
movl $0x400, %edx            # imm = 0x400
callq 0x2080
testq %rax, %rax
jne 0x5164
movq %r12, %rdi
callq 0x2030
cmpb $0x0, 0x5ff4(%rip)      # 0xb1c0
je 0x5279
movq 0x6097(%rip), %rdi      # 0xb270
leaq 0x1eeb(%rip), %rsi      # 0x70cb
callq 0x2200
testq %rax, %rax
je 0x5716
movq %rax, %r12
leaq -0x4e0(%rbp), %rsi
movq %rax, %rdi
movl $0x400, %edx            # imm = 0x400
callq 0x2080
testq %rax, %rax
je 0x5271
leaq -0x4e0(%rbp), %r13
leaq 0x6018(%rip), %r14      # 0xb230
movq %r13, %rdi
callq 0x20c0
cmpq $0x1, %rax
jne 0x5230
cmpw $0xa, -0x4e0(%rbp)
je 0x525c
movl $0x400, %edx            # imm = 0x400
movq %r13, %rdi
movl $0x9, %esi
callq 0x2120
testq %rax, %rax
je 0x525c
movw $0xa, (%rax)
movq %r14, %rdi
movq %r13, %rsi
movl $0x1, %edx
callq 0x66f7
movq %r12, %rdi
movq %r13, %rsi
movl $0x400, %edx            # imm = 0x400
callq 0x2080
testq %rax, %rax
jne 0x5218
movq %r12, %rdi
callq 0x2030
cmpl $0x3, 0x5f78(%rip)      # 0xb1f8
movq 0x6021(%rip), %rdi      # 0xb2a8
leaq 0x1fec(%rip), %rax      # 0x727a
leaq 0x203c(%rip), %rsi      # 0x72d1
cmovgeq %rax, %rsi
leaq 0x1fe6(%rip), %rdx      # 0x7286
xorl %eax, %eax
callq 0x2290
callq 0x5934
leaq 0x1f8e(%rip), %rsi      # 0x7241
movq %r15, %rdi
callq 0x2250
cmpb $0x0, 0x5efe(%rip)      # 0xb1c0
setne %r15b
movl 0x6044(%rip), %edi      # 0xb310
movslq 0x5ef1(%rip), %rdx      # 0xb1c4
movq %rdx, %rsi
imulq %rdi, %rsi
movl %r15d, %ecx
shlq %cl, %rsi
movq %rsi, 0x6031(%rip)      # 0xb318
cvtsi2sd %rdi, %xmm2
movsd 0x1d9c(%rip), %xmm0     # 0x7090
mulsd %xmm0, %xmm2
movl 0x6002(%rip), %ecx      # 0xb300
cvtsi2sd %rcx, %xmm1
divsd %xmm1, %xmm2
cvtsd2ss %xmm2, %xmm2
movss %xmm2, 0x600d(%rip)     # 0xb320
movl 0x600b(%rip), %ecx      # 0xb324
xorps %xmm2, %xmm2
cvtsi2sd %rcx, %xmm2
mulsd %xmm0, %xmm2
divsd %xmm1, %xmm2
cvtsd2ss %xmm2, %xmm2
movss %xmm2, 0x5ff3(%rip)     # 0xb328
movl 0x5ff1(%rip), %ecx      # 0xb32c
xorps %xmm2, %xmm2
cvtsi2sd %rcx, %xmm2
mulsd %xmm0, %xmm2
divsd %xmm1, %xmm2
cvtsd2ss %xmm2, %xmm2
movss %xmm2, 0x5fd9(%rip)     # 0xb330
movl 0x5fd7(%rip), %ecx      # 0xb334
xorps %xmm2, %xmm2
cvtsi2sd %rcx, %xmm2
mulsd %xmm0, %xmm2
divsd %xmm1, %xmm2
cvtsd2ss %xmm2, %xmm2
movss %xmm2, 0x5fbf(%rip)     # 0xb338
xorps %xmm2, %xmm2
cvtsi2sdq 0x5fbb(%rip), %xmm2 # 0xb340
cvtsi2sdq 0x5f7a(%rip), %xmm3 # 0xb308
mulsd %xmm0, %xmm2
divsd %xmm3, %xmm2
cvtsd2ss %xmm2, %xmm2
movss %xmm2, 0x5fa6(%rip)     # 0xb348
xorps %xmm2, %xmm2
cvtsi2sdq 0x5fa2(%rip), %xmm2 # 0xb350
movq %rax, %r12
mulsd %xmm0, %xmm2
xorps %xmm3, %xmm3
cvtsi2sd %rsi, %xmm3
divsd %xmm3, %xmm2
cvtsd2ss %xmm2, %xmm2
movss %xmm2, 0x5f8b(%rip)     # 0xb358
movl 0x5f99(%rip), %eax      # 0xb36c
xorps %xmm2, %xmm2
cvtsi2sd %rax, %xmm2
mulsd %xmm0, %xmm2
divsd %xmm1, %xmm2
cvtsd2ss %xmm2, %xmm2
movss %xmm2, 0x5f81(%rip)     # 0xb370
movl 0x5f67(%rip), %eax      # 0xb35c
xorps %xmm2, %xmm2
cvtsi2sd %rax, %xmm2
mulsd %xmm0, %xmm2
divsd %xmm1, %xmm2
cvtsd2ss %xmm2, %xmm2
movss %xmm2, 0x5f4f(%rip)     # 0xb360
movl 0x5f4d(%rip), %eax      # 0xb364
xorps %xmm2, %xmm2
cvtsi2sd %rax, %xmm2
mulsd %xmm0, %xmm2
divsd %xmm1, %xmm2
xorps %xmm0, %xmm0
cvtsd2ss %xmm2, %xmm0
movss %xmm0, 0x5f32(%rip)     # 0xb368
leaq 0x2857(%rip), %rsi      # 0x7c94
movq %r12, %rdi
xorl %eax, %eax
callq 0x2150
movl 0x5eb3(%rip), %edx      # 0xb300
movl %r15d, %ecx
shll %cl, %edx
leaq 0x284f(%rip), %rsi      # 0x7ca8
movq %r12, %rdi
xorl %eax, %eax
callq 0x2150
movq 0x5e9e(%rip), %rdx      # 0xb308
leaq 0x2851(%rip), %rsi      # 0x7cc2
movq %r12, %rdi
xorl %eax, %eax
callq 0x2150
movl 0x5e8f(%rip), %edx      # 0xb310
movl %r15d, %ecx
shll %cl, %edx
leaq 0x2851(%rip), %rsi      # 0x7cde
movq %r12, %rdi
xorl %eax, %eax
callq 0x2150
movq 0x5e7a(%rip), %rdx      # 0xb318
leaq 0x2850(%rip), %rsi      # 0x7cf5
movq %r12, %rdi
xorl %eax, %eax
callq 0x2150
xorps %xmm0, %xmm0
cvtss2sd 0x5e66(%rip), %xmm0     # 0xb320
leaq 0x284d(%rip), %rsi      # 0x7d0e
movq %r12, %rdi
movb $0x1, %al
callq 0x2150
movl 0x5e53(%rip), %edx      # 0xb324
movl %r15d, %ecx
shll %cl, %edx
leaq 0x284c(%rip), %rsi      # 0x7d29
movq %r12, %rdi
xorl %eax, %eax
callq 0x2150
xorps %xmm0, %xmm0
cvtss2sd 0x5e36(%rip), %xmm0     # 0xb328
leaq 0x284d(%rip), %rsi      # 0x7d46
movq %r12, %rdi
movb $0x1, %al
callq 0x2150
movl 0x5e23(%rip), %edx      # 0xb32c
movl %r15d, %ecx
shll %cl, %edx
leaq 0x2852(%rip), %rsi      # 0x7d67
movq %r12, %rdi
xorl %eax, %eax
callq 0x2150
xorps %xmm0, %xmm0
cvtss2sd 0x5e06(%rip), %xmm0     # 0xb330
leaq 0x284a(%rip), %rsi      # 0x7d7b
movq %r12, %rdi
movb $0x1, %al
callq 0x2150
movl 0x5df3(%rip), %edx      # 0xb334
movl %r15d, %ecx
shll %cl, %edx
leaq 0x2846(%rip), %rsi      # 0x7d93
movq %r12, %rdi
xorl %eax, %eax
callq 0x2150
xorps %xmm0, %xmm0
cvtss2sd 0x5dd6(%rip), %xmm0     # 0xb338
leaq 0x284c(%rip), %rsi      # 0x7db5
movq %r12, %rdi
movb $0x1, %al
callq 0x2150
movl 0x5de3(%rip), %edx      # 0xb35c
movl %r15d, %ecx
shll %cl, %edx
leaq 0x2856(%rip), %rsi      # 0x7ddb
movq %r12, %rdi
xorl %eax, %eax
callq 0x2150
xorps %xmm0, %xmm0
cvtss2sd 0x5dc6(%rip), %xmm0     # 0xb360
leaq 0x2853(%rip), %rsi      # 0x7df4
movq %r12, %rdi
movb $0x1, %al
callq 0x2150
movl 0x5db3(%rip), %edx      # 0xb364
movl %r15d, %ecx
shll %cl, %edx
leaq 0x285b(%rip), %rsi      # 0x7e18
movq %r12, %rdi
xorl %eax, %eax
callq 0x2150
xorps %xmm0, %xmm0
cvtss2sd 0x5d96(%rip), %xmm0     # 0xb368
leaq 0x2850(%rip), %rsi      # 0x7e29
movq %r12, %rdi
movb $0x1, %al
callq 0x2150
movl 0x5d83(%rip), %edx      # 0xb36c
movl %r15d, %ecx
shll %cl, %edx
leaq 0x2850(%rip), %rsi      # 0x7e45
movq %r12, %rdi
xorl %eax, %eax
callq 0x2150
xorps %xmm0, %xmm0
cvtss2sd 0x5d66(%rip), %xmm0     # 0xb370
leaq 0x2845(%rip), %rsi      # 0x7e56
movq %r12, %rdi
movb $0x1, %al
callq 0x2150
xorps %xmm0, %xmm0
cvtss2sd 0x5d22(%rip), %xmm0     # 0xb348
leaq 0x2845(%rip), %rsi      # 0x7e72
movq %r12, %rdi
movb $0x1, %al
callq 0x2150
xorps %xmm0, %xmm0
cvtss2sd 0x5d16(%rip), %xmm0     # 0xb358
leaq 0x284b(%rip), %rsi      # 0x7e94
movq %r12, %rdi
movb $0x1, %al
callq 0x2150
movq %r12, %rdi
callq 0x20b0
leaq 0x5d12(%rip), %rdi      # 0xb374
leaq 0xfd0b(%rip), %rsi      # 0x15374
movq %rbx, %rdx
callq 0x5e35
cmpb $0x0, 0x5b48(%rip)      # 0xb1c0
je 0x5691
leaq 0xacf3(%rip), %rdi      # 0x10374
leaq 0x41cec(%rip), %rsi     # 0x47374
movq -0x38(%rbp), %rdx
callq 0x5e35
movq -0x50(%rbp), %rsp
leaq -0x4e0(%rbp), %rdi
callq 0x2170
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 0x22a0
leaq 0x1a15(%rip), %rdi      # 0x70de
jmp 0x5790
leaq 0x1a1a(%rip), %rdi      # 0x70ef
jmp 0x5790
leaq 0x1b4c(%rip), %rdi      # 0x722d
jmp 0x5799
leaq 0x1b56(%rip), %rdi      # 0x7243
jmp 0x5799
callq 0x23f0
leaq 0x1a07(%rip), %rdi      # 0x7105
jmp 0x5790
callq 0x245d
leaq 0x1a04(%rip), %rdi      # 0x7113
jmp 0x5790
callq 0x2498
callq 0x2484
leaq 0x1a00(%rip), %rdi      # 0x7122
jmp 0x5790
leaq 0x1a0b(%rip), %rdi      # 0x7136
jmp 0x5790
leaq 0x1a11(%rip), %rdi      # 0x7145
jmp 0x5790
leaq 0x1a18(%rip), %rdi      # 0x7155
jmp 0x5790
leaq 0x1a24(%rip), %rdi      # 0x716a
jmp 0x5790
leaq 0x1a34(%rip), %rdi      # 0x7183
jmp 0x5790
movq %rbx, %rdi
callq 0x2417
leaq 0x1aa1(%rip), %rdi      # 0x7201
callq 0x2070
leaq 0x1b71(%rip), %rdi      # 0x72dd
jmp 0x5799
leaq 0x1a20(%rip), %rdi      # 0x7195
jmp 0x5790
leaq 0x1a34(%rip), %rdi      # 0x71b2
jmp 0x5790
leaq 0x1a64(%rip), %rdi      # 0x71eb
jmp 0x5790
leaq 0x1a3c(%rip), %rdi      # 0x71cc
callq 0x2070
movq -0x30(%rbp), %rdi
callq 0x2070
movl $0xffffffff, %edi       # imm = 0xFFFFFFFF
callq 0x22a0