// File: /workspace/github_c_makefile_star2_O2/rikuu[P]kermit/main.c
// Function: main
int main(int argc, char *argv[])
{
	ma_opt_t opt;
	int i, c, stage = 100, no_first = 0, no_second = 0, bi_dir = 1, o_set = 0, no_cont = 0, g_set = 0, no_propagate = 0;
	int max_depth = 5, max_distance=1;
	float cov = 40.0;
	char *fn_reads = 0, *fn_colors = 0, *outfmt = "ug";
	uint64_t excl_color = 0;

	ma_opt_init(&opt);
	while ((c = getopt(argc, argv, "n:m:s:c:S:i:d:g:o:h:I:r:f:e:p:C:G:b:12PVRF:")) >= 0) {
		if (c == 'm') opt.min_match = atoi(optarg);
		else if (c == 'i') opt.min_iden = atof(optarg);
		else if (c == 's') opt.min_span = atoi(optarg);
		else if (c == 'c') opt.min_dp = atoi(optarg);
		else if (c == 'o') opt.min_ovlp = atoi(optarg), o_set = 1;
		else if (c == 'S') stage = atoi(optarg);
		else if (c == 'd') opt.bub_dist = atoi(optarg);
		else if (c == 'g') opt.gap_fuzz = atoi(optarg);
		else if (c == 'h') opt.max_hang = atoi(optarg);
		else if (c == 'I') opt.int_frac = atof(optarg);
		else if (c == 'e') opt.max_ext = atoi(optarg);
		else if (c == 'f') fn_reads = optarg;
		else if (c == 'p') outfmt = optarg;
		else if (c == '1') no_first = 1;
		else if (c == '2') no_second = 1;
		else if (c == 'P') no_propagate = 1;
		else if (c == 'n') opt.n_rounds = atoi(optarg) - 1;
		else if (c == 'R') no_cont = 1;
		else if (c == 'F') opt.final_ovlp_drop_ratio = atof(optarg);
		else if (c == 'C') fn_colors = optarg;
		else if (c == 'G') excl_color = atoi(optarg), g_set = 1;
		else if (c == 'D') max_depth = atoi(optarg);
		else if (c == 'b') max_distance = atoi(optarg);
		else if (c == 'V') {
			printf("%s\n", KM_VERSION);
			return 0;
		} else if (c == 'r') {
			char *s;
			opt.max_ovlp_drop_ratio = strtod(optarg, &s);
			if (*s == ',') opt.min_ovlp_drop_ratio = strtod(s + 1, &s);
		}
	}
	if (o_set == 0) opt.min_ovlp = opt.min_span;
	if (strcmp(outfmt, "cf") == 0) stage = (stage < 5) ? stage : 5;
	if (argc == optind) {
		fprintf(stderr, "Usage: kermit [options] <in.paf>\n");
		fprintf(stderr, "Options:\n");
		fprintf(stderr, "  Pre-selection:\n");
		fprintf(stderr, "    -R          prefilter clearly contained reads (2-pass required)\n");
		fprintf(stderr, "    -G INT      use only reads with given color\n");
		fprintf(stderr, "    -m INT      min match length [%d]\n", opt.min_match);
		fprintf(stderr, "    -i FLOAT    min identity [%.2g]\n", opt.min_iden);
		fprintf(stderr, "    -s INT      min span [%d]\n", opt.min_span);
		fprintf(stderr, "    -c INT      min coverage [%d]\n", opt.min_dp);
		fprintf(stderr, "  Overlap:\n");
		fprintf(stderr, "    -o INT      min overlap [same as -s]\n");
		fprintf(stderr, "    -h INT      max over hang length [%d]\n", opt.max_hang);
		fprintf(stderr, "    -I FLOAT    min end-to-end match ratio [%.2g]\n", opt.int_frac);
		fprintf(stderr, "  Layout:\n");
		fprintf(stderr, "    -g INT      max gap differences between reads for trans-reduction [%d]\n", opt.gap_fuzz);
		fprintf(stderr, "    -d INT      max distance for bubble popping [%d]\n", opt.bub_dist);
		fprintf(stderr, "    -e INT      small unitig threshold [%d]\n", opt.max_ext);
		fprintf(stderr, "    -f FILE     read sequences []\n");
		fprintf(stderr, "    -n INT      rounds of short overlap removal [%d]\n", opt.n_rounds + 1);
		fprintf(stderr, "    -r FLOAT[,FLOAT]\n");
		fprintf(stderr, "                max and min overlap drop ratio [%.2g,%.2g]\n", opt.max_ovlp_drop_ratio, opt.min_ovlp_drop_ratio);
		fprintf(stderr, "    -F FLOAT    aggressive overlap drop ratio in the end [%.2g]\n", opt.final_ovlp_drop_ratio);
		fprintf(stderr, "  Coloring:\n");
		fprintf(stderr, "    -C FILE     read colors []\n");
		fprintf(stderr, "    -D INT      max propagation depth [%d]\n", max_depth);
		fprintf(stderr, "    -b INT      max distance between colors [%d]\n", max_distance);
		fprintf(stderr, "  Miscellaneous:\n");
		fprintf(stderr, "    -p STR      output information: ug, sg, or cf [%s]\n", outfmt);
		fprintf(stderr, "    -b          both directions of an arc are present in input\n");
		fprintf(stderr, "    -1          skip 1-pass read selection\n");
		fprintf(stderr, "    -2          skip 2-pass read selection\n");
		fprintf(stderr, "    -P          skip propagation\n");
		fprintf(stderr, "    -V          print version number\n");
		return 1;
	}

	sys_init();

	sdict_t *excl = 0;
	if (no_cont || (fn_colors && g_set)) {
		fprintf(stderr, "[M::%s] ===> Step 0: excluding reads <===\n", __func__);
		if (fn_colors && g_set) {
			fprintf(stderr, "[M::%s] ===> Step 0.1: excluding colored reads <===\n", __func__);
			excl = km_exclude(fn_colors, excl_color);
		}

		if (no_cont) {
			fprintf(stderr, "[M::%s] ===> Step 0.2: excluding contained reads <===\n", __func__);
			sdict_t *excl2 = ma_hit_no_cont(argv[optind], opt.min_span, opt.min_match, opt.max_hang, opt.int_frac);
			
			if (excl) {
				dict_merge(excl, excl2);
				sd_destroy(excl2);
			} else {
				excl = excl2;
			}
		}
	}

	fprintf(stderr, "[M::%s] ===> Step 1: reading read mappings <===\n", __func__);
	sdict_t *d = sd_init();
	size_t n_hits;
	ma_hit_t *hit = ma_hit_read(argv[optind], opt.min_span, opt.min_match, d, &n_hits, bi_dir, excl);
	if (excl) sd_destroy(excl);

	ma_sub_t *sub = 0;
	if (!no_first) {
		fprintf(stderr, "[M::%s] ===> Step 2: 1-pass (crude) read selection <===\n", __func__);
		if (stage >= 2) {
			sub = ma_hit_sub(opt.min_dp, opt.min_iden, 0, n_hits, hit, d->n_seq);
			n_hits = ma_hit_cut(sub, opt.min_span, n_hits, hit);
		}
		if (stage >= 3) n_hits = ma_hit_flt(sub, opt.max_hang * 1.5, opt.min_ovlp * .5, n_hits, hit, &cov);
	}

	if (!no_second) {
		fprintf(stderr, "[M::%s] ===> Step 3: 2-pass (fine) read selection <===\n", __func__);
		if (stage >= 4) {
			ma_sub_t *sub2 = ma_hit_sub(opt.min_dp, opt.min_iden, opt.min_span/2, n_hits, hit, d->n_seq);
			n_hits = ma_hit_cut(sub2, opt.min_span, n_hits, hit);
			if (sub != 0) {
				ma_sub_merge(d->n_seq, sub, sub2);
				free(sub2);
			} else {
				sub = sub2;
			}
		}
		if (stage >= 5) n_hits = ma_hit_contained(&opt, d, sub, n_hits, hit);
	}

	hit = (ma_hit_t*)realloc(hit, n_hits * sizeof(ma_hit_t));

	fprintf(stderr, "[M::%s] ===> Step 4: 1-pass graph cleaning <===\n", __func__);
	asg_t *sg = ma_sg_gen(&opt, d, sub, n_hits, hit);
	if (fn_colors) {
		fprintf(stderr, "[M::%s] ===> Step 4.1: reading graph coloring <===\n", __func__);
		km_color_t *colors = km_colors_read(fn_colors, d);

		if (!no_propagate) {
			fprintf(stderr, "[M::%s] ===> Step 4.2: propagating colors <===\n", __func__);
			km_propagate(sg, colors, max_depth);
		}

		if (strcmp(outfmt, "cf") == 0) {
			km_cf_print(d, colors);
		} else {
			fprintf(stderr, "[M::%s] ===> Step 4.3: removing color crossing arcs <===\n", __func__);
			km_cut_cross(sg, colors, max_distance);
		}

		free(colors);
	}

	if (stage >= 6) {
		fprintf(stderr, "[M::%s] ===> Step 5: 2-pass graph cleaning <===\n", __func__);
		fprintf(stderr, "[M::%s] ===> Step 5.1: transitive reduction <===\n", __func__);
		asg_arc_del_trans(sg, opt.gap_fuzz);
	}
	if (stage >= 7) {
		fprintf(stderr, "[M::%s] ===> Step 5.2: initial tip cutting and bubble popping <===\n", __func__);
		asg_cut_tip(sg, opt.max_ext);
		asg_pop_bubble(sg, opt.bub_dist);
	}
	if (stage >= 9) {
		fprintf(stderr, "[M::%s] ===> Step 5.3: cutting short overlaps (%d rounds in total) <===\n", __func__, opt.n_rounds + 1);
		for (i = 0; i <= opt.n_rounds; ++i) {
			float r = opt.min_ovlp_drop_ratio + (opt.max_ovlp_drop_ratio - opt.min_ovlp_drop_ratio) / opt.n_rounds * i;
			if (asg_arc_del_short(sg, r) != 0) {
				asg_cut_tip(sg, opt.max_ext);
				asg_pop_bubble(sg, opt.bub_dist);
			}
		}
	}
	if (stage >= 10) {
		fprintf(stderr, "[M::%s] ===> Step 5.4: removing short internal sequences and bi-loops <===\n", __func__);
		asg_cut_internal(sg, 1);
		asg_cut_biloop(sg, opt.max_ext);
		asg_cut_tip(sg, opt.max_ext);
		asg_pop_bubble(sg, opt.bub_dist);
	}
	if (stage >= 11) {
		fprintf(stderr, "[M::%s] ===> Step 5.5: aggressively cutting short overlaps <===\n", __func__);
		if (asg_arc_del_short(sg, opt.final_ovlp_drop_ratio) != 0) {
			asg_cut_tip(sg, opt.max_ext);
			asg_pop_bubble(sg, opt.bub_dist);
		}
	}

	if (strcmp(outfmt, "ug") == 0) {
		fprintf(stderr, "[M::%s] ===> Step 6: generating unitigs <===\n", __func__);
		ma_ug_t *ug = ma_ug_gen(sg);
		if (fn_reads) ma_ug_seq(ug, d, sub, fn_reads);
		ma_ug_print(ug, d, sub, stdout);
		ma_ug_destroy(ug);
	} else if (strcmp(outfmt, "sg") == 0)
		ma_sg_print(sg, d, sub, stdout);

	asg_destroy(sg);
	free(sub);
	free(hit);
	sd_destroy(d);

	fprintf(stderr, "[M::%s] Version: %s (miniasm %s)\n", __func__, KM_VERSION, MA_VERSION);
	fprintf(stderr, "[M::%s] CMD:", __func__);
	for (i = 0; i < argc; ++i)
		fprintf(stderr, " %s", argv[i]);
	fprintf(stderr, "\n[M::%s] Real time: %.3f sec; CPU: %.3f sec\n", __func__, sys_realtime(), sys_cputime());
	return 0;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0xa8, %rsp
movq %rsi, %r14
movl %edi, %r15d
movl $0x42200000, 0x94(%rsp) # imm = 0x42200000
leaq 0x28(%rsp), %rdi
callq 0x3648
pushq $0x64
popq %rax
movl %eax, 0x8(%rsp)
leaq 0x1df0(%rip), %rax      # 0x99dc
movq %rax, 0x78(%rsp)
pushq $0x1
popq %rcx
pushq $0x5
popq %rax
movl %eax, 0x70(%rsp)
movq $0x0, 0x60(%rsp)
leaq 0x1dd4(%rip), %r13      # 0x99df
leaq 0x1d06(%rip), %rbp      # 0x9918
movq 0x63bf(%rip), %rbx      # 0xdfd8
movl $0x0, 0x84(%rsp)
movl %ecx, 0x74(%rsp)
movq $0x0, 0x98(%rsp)
movq $0x0, 0x88(%rsp)
movq $0x0, 0xa0(%rsp)
movl $0x0, 0x20(%rsp)
movl $0x0, 0x10(%rsp)
movl $0x0, 0x6c(%rsp)
xorl %ecx, %ecx
movl %ecx, %r12d
movl %r15d, %edi
movq %r14, %rsi
movq %r13, %rdx
callq 0x11c0
testl %eax, %eax
js 0x7e57
leal -0x43(%rax), %ecx
cmpl $0x30, %ecx
ja 0x7ca1
movslq (%rbp,%rcx,4), %rax
addq %rbp, %rax
jmpq *%rax
movq (%rbx), %rax
movq %rax, 0x88(%rsp)
jmp 0x7e4f
pushq $0x1
popq %rcx
cmpl $0x31, %eax
je 0x7c66
movl %r12d, %ecx
cmpl $0x32, %eax
jne 0x7c66
pushq $0x1
popq %rax
movl %eax, 0x6c(%rsp)
jmp 0x7e4f
movq (%rbx), %rdi
leaq 0x18(%rsp), %rsi
callq 0x1060
cvtsd2ss %xmm0, %xmm0
movss %xmm0, 0x58(%rsp)
movq 0x18(%rsp), %rdi
cmpb $0x2c, (%rdi)
jne 0x7e4f
incq %rdi
leaq 0x18(%rsp), %rsi
callq 0x1060
cvtsd2ss %xmm0, %xmm0
movss %xmm0, 0x54(%rsp)
jmp 0x7e4f
movq (%rbx), %rdi
callq 0x11e0
movl %eax, 0x2c(%rsp)
jmp 0x7e4f
movq (%rbx), %rdi
callq 0x1070
cvtsd2ss %xmm0, %xmm0
movss %xmm0, 0x34(%rsp)
jmp 0x7e4f
movq (%rbx), %rdi
callq 0x11e0
movl %eax, 0x3c(%rsp)
pushq $0x1
popq %rax
movl %eax, 0x10(%rsp)
jmp 0x7e4f
movq (%rbx), %rax
movq %rax, 0x78(%rsp)
jmp 0x7e4f
movq (%rbx), %rdi
callq 0x11e0
movl %eax, 0x44(%rsp)
jmp 0x7e4f
movq (%rbx), %rax
movq %rax, 0x98(%rsp)
jmp 0x7e4f
movq (%rbx), %rdi
callq 0x11e0
cltq
movq %rax, 0xa0(%rsp)
pushq $0x1
popq %rax
movq %rax, 0x60(%rsp)
jmp 0x7e4f
movq (%rbx), %rdi
callq 0x1070
cvtsd2ss %xmm0, %xmm0
movss %xmm0, 0x40(%rsp)
jmp 0x7e4f
movq (%rbx), %rdi
callq 0x11e0
movl %eax, 0x70(%rsp)
jmp 0x7e4f
pushq $0x1
popq %rax
movl %eax, 0x20(%rsp)
jmp 0x7e4f
movq (%rbx), %rdi
callq 0x1070
cvtsd2ss %xmm0, %xmm0
movss %xmm0, 0x5c(%rsp)
jmp 0x7e4f
movq (%rbx), %rdi
callq 0x11e0
movl %eax, 0x30(%rsp)
jmp 0x7e4f
movq (%rbx), %rdi
callq 0x11e0
movl %eax, 0x50(%rsp)
jmp 0x7e4f
movq (%rbx), %rdi
callq 0x11e0
movl %eax, 0x28(%rsp)
jmp 0x7e4f
pushq $0x1
popq %rax
movl %eax, 0x84(%rsp)
jmp 0x7e4f
movq (%rbx), %rdi
callq 0x11e0
movl %eax, 0x38(%rsp)
jmp 0x7e4f
movq (%rbx), %rdi
callq 0x11e0
movl %eax, 0x8(%rsp)
jmp 0x7e4f
movq (%rbx), %rdi
callq 0x11e0
movl %eax, 0x74(%rsp)
jmp 0x7e4f
movq (%rbx), %rdi
callq 0x11e0
movl %eax, 0x4c(%rsp)
jmp 0x7e4f
movq (%rbx), %rdi
callq 0x11e0
decl %eax
movl %eax, 0x48(%rsp)
movl %r12d, %ecx
jmp 0x7c66
cmpl $0x0, 0x10(%rsp)
jne 0x7e66
movl 0x28(%rsp), %eax
movl %eax, 0x3c(%rsp)
movq 0x78(%rsp), %rcx
cmpb $0x63, (%rcx)
jne 0x7e8e
cmpb $0x66, 0x1(%rcx)
jne 0x7e8e
movl 0x8(%rsp), %edx
cmpl $0x5, %edx
pushq $0x5
popq %rax
cmovll %edx, %eax
cmpb $0x0, 0x2(%rcx)
cmovel %eax, %edx
movl %edx, 0x8(%rsp)
movq 0x613b(%rip), %r13      # 0xdfd0
cmpl %r15d, (%r13)
jne 0x81b7
movq 0x6152(%rip), %r12      # 0xdff8
movq (%r12), %rcx
leaq 0x1b5e(%rip), %rdi      # 0x9a0f
pushq $0x21
popq %r14
pushq $0x1
popq %rbx
movq %r14, %rsi
movq %rbx, %rdx
callq 0x1210
movq (%r12), %rcx
leaq 0x1b63(%rip), %rdi      # 0x9a31
pushq $0x9
popq %rsi
movq %rbx, %rdx
callq 0x1210
movq (%r12), %rcx
leaq 0x1b57(%rip), %rdi      # 0x9a3b
pushq $0x11
popq %r15
movq %r15, %rsi
movq %rbx, %rdx
callq 0x1210
movq (%r12), %rcx
leaq 0x1b4f(%rip), %rdi      # 0x9a4d
pushq $0x44
popq %rsi
movq %rbx, %rdx
callq 0x1210
movq (%r12), %rcx
leaq 0x1b7e(%rip), %rdi      # 0x9a92
pushq $0x30
popq %rsi
movq %rbx, %rdx
callq 0x1210
movq (%r12), %rdi
movl 0x2c(%rsp), %edx
leaq 0x1b95(%rip), %rsi      # 0x9ac3
xorl %eax, %eax
callq 0x1120
movq (%r12), %rdi
cvtss2sd 0x34(%rsp), %xmm0
leaq 0x1ba4(%rip), %rsi      # 0x9aea
movb $0x1, %al
callq 0x1120
movq (%r12), %rdi
movl 0x28(%rsp), %edx
leaq 0x1bb3(%rip), %rsi      # 0x9b0f
xorl %eax, %eax
callq 0x1120
movq (%r12), %rdi
movl 0x30(%rsp), %edx
leaq 0x1bbc(%rip), %rsi      # 0x9b2e
xorl %eax, %eax
callq 0x1120
movq (%r12), %rcx
leaq 0x1bcd(%rip), %rdi      # 0x9b51
pushq $0xb
popq %rsi
movq %rbx, %rdx
callq 0x1210
movq (%r12), %rcx
leaq 0x1bc3(%rip), %rdi      # 0x9b5d
pushq $0x29
popq %rsi
movq %rbx, %rdx
callq 0x1210
movq (%r12), %rdi
movl 0x38(%rsp), %edx
leaq 0x1bd3(%rip), %rsi      # 0x9b87
xorl %eax, %eax
callq 0x1120
movq (%r12), %rdi
cvtss2sd 0x40(%rsp), %xmm0
leaq 0x1be6(%rip), %rsi      # 0x9bb2
movb $0x1, %al
callq 0x1120
movq (%r12), %rcx
leaq 0x1c07(%rip), %rdi      # 0x9be5
pushq $0xa
popq %rsi
movq %rbx, %rdx
callq 0x1210
movq (%r12), %rdi
movl 0x44(%rsp), %edx
leaq 0x1bf8(%rip), %rsi      # 0x9bf0
xorl %eax, %eax
callq 0x1120
movq (%r12), %rdi
movl 0x4c(%rsp), %edx
leaq 0x1c2e(%rip), %rsi      # 0x9c3c
xorl %eax, %eax
callq 0x1120
movq (%r12), %rdi
movl 0x50(%rsp), %edx
leaq 0x1c4e(%rip), %rsi      # 0x9c72
xorl %eax, %eax
callq 0x1120
movq (%r12), %rcx
leaq 0x1c69(%rip), %rdi      # 0x9c9f
pushq $0x22
popq %rsi
movq %rbx, %rdx
callq 0x1210
movq (%r12), %rdi
movl 0x48(%rsp), %edx
incl %edx
leaq 0x1c70(%rip), %rsi      # 0x9cc2
xorl %eax, %eax
callq 0x1120
movq (%r12), %rcx
leaq 0x1c94(%rip), %rdi      # 0x9cf8
pushq $0x15
popq %rsi
movq %rbx, %rdx
callq 0x1210
movq (%r12), %rdi
cvtss2sd 0x58(%rsp), %xmm0
cvtss2sd 0x54(%rsp), %xmm1
leaq 0x1c88(%rip), %rsi      # 0x9d0e
movb $0x2, %al
callq 0x1120
movq (%r12), %rdi
cvtss2sd 0x5c(%rsp), %xmm0
leaq 0x1cac(%rip), %rsi      # 0x9d4a
movb $0x1, %al
callq 0x1120
movq (%r12), %rcx
leaq 0x1cdb(%rip), %rdi      # 0x9d8b
pushq $0xc
popq %rsi
movq %rbx, %rdx
callq 0x1210
movq (%r12), %rcx
leaq 0x1cd2(%rip), %rdi      # 0x9d98
pushq $0x1f
popq %rsi
movq %rbx, %rdx
callq 0x1210
movq (%r12), %rdi
leaq 0x1cdc(%rip), %rsi      # 0x9db8
movl 0x70(%rsp), %edx
xorl %eax, %eax
callq 0x1120
movq (%r12), %rdi
leaq 0x1cf2(%rip), %rsi      # 0x9de4
movl 0x74(%rsp), %edx
xorl %eax, %eax
callq 0x1120
movq (%r12), %rcx
leaq 0x1d0e(%rip), %rdi      # 0x9e16
movq %r15, %rsi
movq %rbx, %rdx
callq 0x1210
movq (%r12), %rdi
leaq 0x1d0a(%rip), %rsi      # 0x9e28
movq 0x78(%rsp), %rdx
xorl %eax, %eax
callq 0x1120
movq (%r12), %rcx
leaq 0x1d2b(%rip), %rdi      # 0x9e60
pushq $0x3f
popq %rsi
movq %rbx, %rdx
callq 0x1210
movq (%r12), %rcx
leaq 0x1d55(%rip), %rdi      # 0x9ea0
pushq $0x2b
popq %r15
movq %r15, %rsi
movq %rbx, %rdx
callq 0x1210
movq (%r12), %rcx
leaq 0x1d67(%rip), %rdi      # 0x9ecc
movq %r15, %rsi
movq %rbx, %rdx
callq 0x1210
movq (%r12), %rcx
leaq 0x1d7d(%rip), %rdi      # 0x9ef8
movq %r14, %rsi
movq %rbx, %rdx
callq 0x1210
movq (%r12), %rcx
leaq 0x1d89(%rip), %rdi      # 0x9f1a
pushq $0x25
popq %rsi
movq %rbx, %rdx
callq 0x1210
pushq $0x1
popq %rbx
jmp 0x894c
leaq 0x1860(%rip), %rdi      # 0x9a0b
callq 0x1050
xorl %ebx, %ebx
jmp 0x894c
xorl %eax, %eax
callq 0x13fd
cmpl $0x0, 0x20(%rsp)
jne 0x81e4
cmpq $0x0, 0x88(%rsp)
setne %al
cmpl $0x0, 0x60(%rsp)
setne %cl
andb %al, %cl
cmpb $0x1, %cl
jne 0x82a7
movq 0x5e0d(%rip), %rbp      # 0xdff8
movq (%rbp), %rdi
leaq 0x1d4a(%rip), %rsi      # 0x9f40
leaq 0x1d6e(%rip), %rdx      # 0x9f6b
xorl %ebx, %ebx
xorl %eax, %eax
callq 0x1120
movq 0x88(%rsp), %rdx
testq %rdx, %rdx
setne %al
cmpl $0x0, 0x60(%rsp)
setne %cl
andb %al, %cl
cmpb $0x1, %cl
jne 0x8258
movq %r13, %rbx
movq %rdx, %r13
movq (%rbp), %rdi
leaq 0x1d3c(%rip), %rsi      # 0x9f70
leaq 0x1d30(%rip), %rdx      # 0x9f6b
xorl %eax, %eax
callq 0x1120
movq %r13, %rdi
movq %rbx, %r13
movq 0xa0(%rsp), %rsi
callq 0x6ae0
movq %rax, %rbx
cmpl $0x0, 0x20(%rsp)
je 0x82c1
movq (%rbp), %rdi
leaq 0x1d3b(%rip), %rsi      # 0x9fa5
leaq 0x1cfa(%rip), %rdx      # 0x9f6b
xorl %eax, %eax
callq 0x1120
movq %r13, %rbp
movslq (%r13), %rax
movq (%r14,%rax,8), %rdi
movl 0x28(%rsp), %esi
movl 0x2c(%rsp), %edx
movl 0x38(%rsp), %ecx
movss 0x40(%rsp), %xmm0
callq 0x3cba
movq %rax, %r13
testq %rbx, %rbx
jne 0x82ab
movq %r13, %rbx
jmp 0x82be
xorl %ebx, %ebx
jmp 0x82c1
movq %rbx, %rdi
movq %r13, %rsi
callq 0x7b6c
movq %r13, %rdi
callq 0x1484
movq %rbp, %r13
movq 0x5d30(%rip), %rbp      # 0xdff8
movq (%rbp), %rdi
leaq 0x1d09(%rip), %rsi      # 0x9fdc
leaq 0x1c91(%rip), %rdx      # 0x9f6b
xorl %eax, %eax
callq 0x1120
callq 0x145c
movq %rax, %rcx
movslq (%r13), %rax
movq (%r14,%rax,8), %rdi
movl 0x28(%rsp), %esi
movl 0x2c(%rsp), %edx
movq %rbx, (%rsp)
leaq 0x18(%rsp), %r8
pushq $0x1
popq %r9
movq %rcx, 0x10(%rsp)
callq 0x3eb7
movq %rax, %r13
testq %rbx, %rbx
je 0x8320
movq %rbx, %rdi
callq 0x1484
testl %r12d, %r12d
jne 0x83af
movq (%rbp), %rdi
leaq 0x1cd9(%rip), %rsi      # 0xa00d
leaq 0x1c30(%rip), %rdx      # 0x9f6b
xorl %r12d, %r12d
xorl %eax, %eax
callq 0x1120
movl 0x8(%rsp), %ecx
cmpl $0x2, %ecx
movl 0x6c(%rsp), %ebx
movq 0x10(%rsp), %rax
jl 0x83ba
movl 0x30(%rsp), %edi
movss 0x34(%rsp), %xmm0
movq 0x18(%rsp), %rdx
movl (%rax), %r8d
xorl %esi, %esi
movl %ecx, 0x8(%rsp)
movq %r13, %rcx
callq 0x4244
movq %r13, %rcx
movq %rax, %r13
movl 0x28(%rsp), %esi
movq 0x18(%rsp), %rdx
movq %rax, %rdi
movq %rcx, 0x20(%rsp)
callq 0x45db
movl 0x8(%rsp), %ecx
movq %rax, 0x18(%rsp)
cmpl $0x2, %ecx
jne 0x866b
movq %r13, %r12
movq 0x20(%rsp), %r13
jmp 0x83ba
xorl %r12d, %r12d
movl 0x8(%rsp), %ecx
movl 0x6c(%rsp), %ebx
movl %ecx, 0x8(%rsp)
testl %ebx, %ebx
jne 0x843d
movq (%rbp), %rdi
leaq 0x1c79(%rip), %rsi      # 0xa046
leaq 0x1b97(%rip), %rdx      # 0x9f6b
xorl %eax, %eax
callq 0x1120
movq 0x18(%rsp), %rcx
cmpl $0x4, 0x8(%rsp)
jl 0x8442
movl 0x28(%rsp), %eax
movl 0x30(%rsp), %edi
movss 0x34(%rsp), %xmm0
pushq $0x2
popq %rsi
cltd
idivl %esi
movq 0x10(%rsp), %rdx
movl (%rdx), %r8d
movl %eax, %esi
movq %rcx, %rdx
movq %r13, %rcx
callq 0x4244
movq %rax, %rbx
movl 0x28(%rsp), %esi
movq 0x18(%rsp), %rdx
movq %rax, %rdi
movq %r13, %rcx
callq 0x45db
movq %rax, 0x18(%rsp)
testq %r12, %r12
jne 0x86bb
movq %rax, %rcx
jmp 0x86dd
movq 0x18(%rsp), %rcx
movq %r12, %rbx
shlq $0x5, %rcx
movq %r13, %rdi
movq %rcx, %rsi
callq 0x1180
movq %rax, %r12
movq (%rbp), %rdi
leaq 0x1c1c(%rip), %rsi      # 0xa07e
leaq 0x1b02(%rip), %rdx      # 0x9f6b
xorl %eax, %eax
callq 0x1120
movq 0x18(%rsp), %rcx
leaq 0x28(%rsp), %rdi
movq 0x10(%rsp), %rsi
movq %rbx, 0x20(%rsp)
movq %rbx, %rdx
movq %r12, %r8
callq 0x4cf8
movq %rax, %r13
movq 0x88(%rsp), %rbx
testq %rbx, %rbx
movl 0x8(%rsp), %ecx
je 0x8565
movq %r12, 0x60(%rsp)
movq (%rbp), %rdi
leaq 0x1bf8(%rip), %rsi      # 0xa0af
leaq 0x1aad(%rip), %rdx      # 0x9f6b
xorl %eax, %eax
callq 0x1120
movq %rbx, %rdi
movq 0x10(%rsp), %rsi
callq 0x6b99
movq %rax, %r12
cmpl $0x0, 0x84(%rsp)
jne 0x8507
movq (%rbp), %rdi
leaq 0x1bf9(%rip), %rsi      # 0xa0e3
leaq 0x1a7a(%rip), %rdx      # 0x9f6b
xorl %eax, %eax
callq 0x1120
movq %r13, %rdi
movq %r12, %rsi
movl 0x70(%rsp), %edx
callq 0x6e00
movq 0x78(%rsp), %rax
cmpb $0x63, (%rax)
jne 0x852c
cmpb $0x66, 0x1(%rax)
jne 0x852c
cmpb $0x0, 0x2(%rax)
jne 0x852c
movq 0x10(%rsp), %rdi
movq %r12, %rsi
callq 0x6a6b
jmp 0x8554
movq (%rbp), %rdi
leaq 0x1bdc(%rip), %rsi      # 0xa113
leaq 0x1a2d(%rip), %rdx      # 0x9f6b
xorl %eax, %eax
callq 0x1120
movq %r13, %rdi
movq %r12, %rsi
movl 0x74(%rsp), %edx
callq 0x6cc5
movq %r12, %rdi
callq 0x1040
movl 0x8(%rsp), %ecx
movq 0x60(%rsp), %r12
cmpl $0x6, %ecx
jl 0x87a9
movq (%rbp), %rdi
leaq 0x1bd4(%rip), %rsi      # 0xa14d
leaq 0x19eb(%rip), %rbx      # 0x9f6b
movq %rbx, %rdx
xorl %eax, %eax
callq 0x1120
movq (%rbp), %rdi
leaq 0x1be9(%rip), %rsi      # 0xa17e
movq %rbx, %rdx
xorl %eax, %eax
callq 0x1120
movl 0x44(%rsp), %esi
movq %r13, %rdi
callq 0x2704
cmpl $0x6, 0x8(%rsp)
je 0x87a9
movq (%rbp), %rdi
leaq 0x1bef(%rip), %rsi      # 0xa1b0
leaq 0x19a3(%rip), %rdx      # 0x9f6b
xorl %ebx, %ebx
xorl %eax, %eax
callq 0x1120
movl 0x50(%rsp), %esi
movq %r13, %rdi
callq 0x2a73
movl 0x4c(%rsp), %esi
movq %r13, %rdi
callq 0x2f31
cmpl $0x9, 0x8(%rsp)
jb 0x87a9
movq (%rbp), %rdi
movl 0x48(%rsp), %ecx
incl %ecx
leaq 0x1bef(%rip), %rsi      # 0xa1f4
leaq 0x195f(%rip), %rdx      # 0x9f6b
xorl %eax, %eax
callq 0x1120
movl 0x48(%rsp), %eax
cmpl %eax, %ebx
jg 0x870a
movss 0x54(%rsp), %xmm1
cvtsi2ss %eax, %xmm2
movss 0x58(%rsp), %xmm3
cvtsi2ss %ebx, %xmm0
subss %xmm1, %xmm3
divss %xmm2, %xmm3
mulss %xmm3, %xmm0
addss %xmm1, %xmm0
movq %r13, %rdi
callq 0x2474
testl %eax, %eax
je 0x8667
movl 0x50(%rsp), %esi
movq %r13, %rdi
callq 0x2a73
movl 0x4c(%rsp), %esi
movq %r13, %rdi
callq 0x2f31
incl %ebx
jmp 0x8613
cvtsi2sdl 0x38(%rsp), %xmm0
mulsd 0x1297(%rip), %xmm0     # 0x9910
cvttsd2si %xmm0, %esi
cvtsi2sdl 0x3c(%rsp), %xmm0
mulsd 0x99d(%rip), %xmm0      # 0x9028
cvttsd2si %xmm0, %edx
leaq 0x94(%rsp), %r9
movq %r13, %r12
movq %r13, %rdi
movq %rax, %rcx
movq 0x20(%rsp), %r13
movq %r13, %r8
callq 0x47b2
movl 0x8(%rsp), %ecx
movq %rax, 0x18(%rsp)
jmp 0x83ba
movq 0x10(%rsp), %rax
movl (%rax), %edi
movq %r12, %rsi
movq %rbx, %rdx
callq 0x4ade
movq %rbx, %rdi
callq 0x1040
movq 0x18(%rsp), %rcx
movq %r12, %rbx
cmpl $0x4, 0x8(%rsp)
je 0x8445
leaq 0x28(%rsp), %rdi
movq 0x10(%rsp), %rsi
movq %rbx, %rdx
movq %r13, %r8
callq 0x4b1c
movq %rax, %rcx
movq %rax, 0x18(%rsp)
jmp 0x8445
movl 0x8(%rsp), %ecx
cmpl $0xa, %ecx
jl 0x87a9
movq (%rbp), %rdi
leaq 0x1b1b(%rip), %rsi      # 0xa23d
leaq 0x1842(%rip), %rdx      # 0x9f6b
xorl %eax, %eax
movl %ecx, %ebx
callq 0x1120
pushq $0x1
popq %rsi
movq %r13, %rdi
callq 0x2c03
movl 0x50(%rsp), %esi
movq %r13, %rdi
callq 0x2cf7
movl 0x50(%rsp), %esi
movq %r13, %rdi
callq 0x2a73
movl 0x4c(%rsp), %esi
movq %r13, %rdi
callq 0x2f31
cmpl $0xa, %ebx
je 0x87a9
movq (%rbp), %rdi
leaq 0x1b18(%rip), %rsi      # 0xa289
leaq 0x17f3(%rip), %rdx      # 0x9f6b
xorl %eax, %eax
callq 0x1120
movss 0x5c(%rsp), %xmm0
movq %r13, %rdi
callq 0x2474
testl %eax, %eax
je 0x87a9
movl 0x50(%rsp), %esi
movq %r13, %rdi
callq 0x2a73
movl 0x4c(%rsp), %esi
movq %r13, %rdi
callq 0x2f31
movq 0x78(%rsp), %rcx
movzbl (%rcx), %eax
cmpl $0x73, %eax
je 0x8855
cmpl $0x75, %eax
movq 0x20(%rsp), %rbx
jne 0x8880
cmpb $0x67, 0x1(%rcx)
jne 0x8880
cmpb $0x0, 0x2(%rcx)
jne 0x8880
movq %r12, 0x60(%rsp)
movq (%rbp), %rdi
leaq 0x1ade(%rip), %rsi      # 0xa2ca
leaq 0x1778(%rip), %rdx      # 0x9f6b
xorl %eax, %eax
callq 0x1120
movq %r13, %rdi
callq 0x561c
movq %rax, %rbx
movq 0x98(%rsp), %rcx
testq %rcx, %rcx
je 0x8824
movq %rbx, %rdi
movq 0x10(%rsp), %rsi
movq 0x20(%rsp), %rdx
callq 0x5bea
movq 0x5795(%rip), %rax      # 0xdfc0
movq (%rax), %rcx
movq %rbx, %rdi
movq 0x10(%rsp), %rsi
movq 0x20(%rsp), %r12
movq %r12, %rdx
callq 0x5219
movq %rbx, %rdi
movq %r12, %rbx
callq 0x51c0
movq 0x60(%rsp), %r12
jmp 0x8880
cmpb $0x67, 0x1(%rcx)
movq 0x20(%rsp), %rbx
jne 0x8880
cmpb $0x0, 0x2(%rcx)
jne 0x8880
movq 0x5753(%rip), %rax      # 0xdfc0
movq (%rax), %rcx
movq %r13, %rdi
movq 0x10(%rsp), %rsi
movq %rbx, %rdx
callq 0x502d
movq %r13, %rdi
callq 0x2222
movq %rbx, %rdi
callq 0x1040
movq %r12, %rdi
callq 0x1040
movq 0x10(%rsp), %rdi
callq 0x1484
movq (%rbp), %rdi
leaq 0x1a4b(%rip), %rsi      # 0xa2f8
leaq 0x16b7(%rip), %rbx      # 0x9f6b
leaq 0x1150(%rip), %rcx      # 0x9a0b
leaq 0x1a58(%rip), %r8       # 0xa31a
xorl %r12d, %r12d
movq %rbx, %rdx
xorl %eax, %eax
callq 0x1120
movq (%rbp), %rdi
leaq 0x1a49(%rip), %rsi      # 0xa323
movq %rbx, %rdx
xorl %eax, %eax
callq 0x1120
testl %r15d, %r15d
cmovlel %r12d, %r15d
leaq 0x1a3e(%rip), %rbx      # 0xa330
xorl %r13d, %r13d
movq (%rbp), %r12
cmpq %r13, %r15
je 0x8914
movq (%r14,%r13,8), %rdx
movq %r12, %rdi
movq %rbx, %rsi
xorl %eax, %eax
callq 0x1120
incq %r13
jmp 0x88f5
xorl %ebx, %ebx
xorl %eax, %eax
callq 0x138f
movsd %xmm0, 0x8(%rsp)
xorl %eax, %eax
callq 0x134c
movapd %xmm0, %xmm1
leaq 0x19ff(%rip), %rsi      # 0xa334
leaq 0x162f(%rip), %rdx      # 0x9f6b
movq %r12, %rdi
movsd 0x8(%rsp), %xmm0
movb $0x2, %al
callq 0x1120
movl %ebx, %eax
addq $0xa8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq