// File: /workspace/github_c_makefile_star2_O0/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
movq %rsp, %rbp
subq $0x120, %rsp            # imm = 0x120
movl $0x0, -0x4(%rbp)
movl %edi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movl $0x64, -0x54(%rbp)
movl $0x0, -0x58(%rbp)
movl $0x0, -0x5c(%rbp)
movl $0x1, -0x60(%rbp)
movl $0x0, -0x64(%rbp)
movl $0x0, -0x68(%rbp)
movl $0x0, -0x6c(%rbp)
movl $0x0, -0x70(%rbp)
movl $0x5, -0x74(%rbp)
movl $0x1, -0x78(%rbp)
movss 0x1e35(%rip), %xmm0     # 0xf87c
movss %xmm0, -0x7c(%rbp)
movq $0x0, -0x88(%rbp)
movq $0x0, -0x90(%rbp)
leaq 0x1e1f(%rip), %rax      # 0xf888
movq %rax, -0x98(%rbp)
movq $0x0, -0xa0(%rbp)
leaq -0x48(%rbp), %rdi
callq 0x5410
movl -0x8(%rbp), %edi
movq -0x10(%rbp), %rsi
leaq 0x1df9(%rip), %rdx      # 0xf88b
callq 0x11b0
movl %eax, -0x50(%rbp)
cmpl $0x0, %eax
jl 0xddea
cmpl $0x6d, -0x50(%rbp)
jne 0xdac0
movq 0x5528(%rip), %rax      # 0x12fd8
movq (%rax), %rdi
callq 0x11d0
movl %eax, -0x44(%rbp)
jmp 0xdde5
cmpl $0x69, -0x50(%rbp)
jne 0xdae3
movq 0x550b(%rip), %rax      # 0x12fd8
movq (%rax), %rdi
callq 0x1060
cvtsd2ss %xmm0, %xmm0
movss %xmm0, -0x3c(%rbp)
jmp 0xdde3
cmpl $0x73, -0x50(%rbp)
jne 0xdb00
movq 0x54e8(%rip), %rax      # 0x12fd8
movq (%rax), %rdi
callq 0x11d0
movl %eax, -0x48(%rbp)
jmp 0xdde1
cmpl $0x63, -0x50(%rbp)
jne 0xdb1d
movq 0x54cb(%rip), %rax      # 0x12fd8
movq (%rax), %rdi
callq 0x11d0
movl %eax, -0x40(%rbp)
jmp 0xdddf
cmpl $0x6f, -0x50(%rbp)
jne 0xdb41
movq 0x54ae(%rip), %rax      # 0x12fd8
movq (%rax), %rdi
callq 0x11d0
movl %eax, -0x34(%rbp)
movl $0x1, -0x64(%rbp)
jmp 0xdddd
cmpl $0x53, -0x50(%rbp)
jne 0xdb5e
movq 0x548a(%rip), %rax      # 0x12fd8
movq (%rax), %rdi
callq 0x11d0
movl %eax, -0x54(%rbp)
jmp 0xdddb
cmpl $0x64, -0x50(%rbp)
jne 0xdb7b
movq 0x546d(%rip), %rax      # 0x12fd8
movq (%rax), %rdi
callq 0x11d0
movl %eax, -0x24(%rbp)
jmp 0xddd9
cmpl $0x67, -0x50(%rbp)
jne 0xdb98
movq 0x5450(%rip), %rax      # 0x12fd8
movq (%rax), %rdi
callq 0x11d0
movl %eax, -0x2c(%rbp)
jmp 0xddd7
cmpl $0x68, -0x50(%rbp)
jne 0xdbb5
movq 0x5433(%rip), %rax      # 0x12fd8
movq (%rax), %rdi
callq 0x11d0
movl %eax, -0x38(%rbp)
jmp 0xddd5
cmpl $0x49, -0x50(%rbp)
jne 0xdbd8
movq 0x5416(%rip), %rax      # 0x12fd8
movq (%rax), %rdi
callq 0x1060
cvtsd2ss %xmm0, %xmm0
movss %xmm0, -0x30(%rbp)
jmp 0xddd3
cmpl $0x65, -0x50(%rbp)
jne 0xdbf5
movq 0x53f3(%rip), %rax      # 0x12fd8
movq (%rax), %rdi
callq 0x11d0
movl %eax, -0x20(%rbp)
jmp 0xddd1
cmpl $0x66, -0x50(%rbp)
jne 0xdc11
movq 0x53d6(%rip), %rax      # 0x12fd8
movq (%rax), %rax
movq %rax, -0x88(%rbp)
jmp 0xddcf
cmpl $0x70, -0x50(%rbp)
jne 0xdc2d
movq 0x53ba(%rip), %rax      # 0x12fd8
movq (%rax), %rax
movq %rax, -0x98(%rbp)
jmp 0xddcd
cmpl $0x31, -0x50(%rbp)
jne 0xdc3f
movl $0x1, -0x58(%rbp)
jmp 0xddcb
cmpl $0x32, -0x50(%rbp)
jne 0xdc51
movl $0x1, -0x5c(%rbp)
jmp 0xddc9
cmpl $0x50, -0x50(%rbp)
jne 0xdc63
movl $0x1, -0x70(%rbp)
jmp 0xddc7
cmpl $0x6e, -0x50(%rbp)
jne 0xdc83
movq 0x5368(%rip), %rax      # 0x12fd8
movq (%rax), %rdi
callq 0x11d0
subl $0x1, %eax
movl %eax, -0x28(%rbp)
jmp 0xddc5
cmpl $0x52, -0x50(%rbp)
jne 0xdc95
movl $0x1, -0x68(%rbp)
jmp 0xddc3
cmpl $0x46, -0x50(%rbp)
jne 0xdcb8
movq 0x5336(%rip), %rax      # 0x12fd8
movq (%rax), %rdi
callq 0x1060
cvtsd2ss %xmm0, %xmm0
movss %xmm0, -0x14(%rbp)
jmp 0xddc1
cmpl $0x43, -0x50(%rbp)
jne 0xdcd4
movq 0x5313(%rip), %rax      # 0x12fd8
movq (%rax), %rax
movq %rax, -0x90(%rbp)
jmp 0xddbf
cmpl $0x47, -0x50(%rbp)
jne 0xdcfe
movq 0x52f7(%rip), %rax      # 0x12fd8
movq (%rax), %rdi
callq 0x11d0
cltq
movq %rax, -0xa0(%rbp)
movl $0x1, -0x6c(%rbp)
jmp 0xddbd
cmpl $0x44, -0x50(%rbp)
jne 0xdd1b
movq 0x52cd(%rip), %rax      # 0x12fd8
movq (%rax), %rdi
callq 0x11d0
movl %eax, -0x74(%rbp)
jmp 0xddbb
cmpl $0x62, -0x50(%rbp)
jne 0xdd38
movq 0x52b0(%rip), %rax      # 0x12fd8
movq (%rax), %rdi
callq 0x11d0
movl %eax, -0x78(%rbp)
jmp 0xddb9
cmpl $0x56, -0x50(%rbp)
jne 0xdd5f
leaq 0x15bb(%rip), %rdi      # 0xf300
leaq 0x1b6b(%rip), %rsi      # 0xf8b7
movb $0x0, %al
callq 0x1080
movl $0x0, -0x4(%rbp)
jmp 0xeab3
cmpl $0x72, -0x50(%rbp)
jne 0xddb5
movq 0x526c(%rip), %rax      # 0x12fd8
movq (%rax), %rdi
leaq -0xa8(%rbp), %rsi
callq 0x1050
cvtsd2ss %xmm0, %xmm0
movss %xmm0, -0x18(%rbp)
movq -0xa8(%rbp), %rax
movsbl (%rax), %eax
cmpl $0x2c, %eax
jne 0xddb3
movq -0xa8(%rbp), %rdi
addq $0x1, %rdi
leaq -0xa8(%rbp), %rsi
callq 0x1050
cvtsd2ss %xmm0, %xmm0
movss %xmm0, -0x1c(%rbp)
jmp 0xddb5
jmp 0xddb7
jmp 0xddb9
jmp 0xddbb
jmp 0xddbd
jmp 0xddbf
jmp 0xddc1
jmp 0xddc3
jmp 0xddc5
jmp 0xddc7
jmp 0xddc9
jmp 0xddcb
jmp 0xddcd
jmp 0xddcf
jmp 0xddd1
jmp 0xddd3
jmp 0xddd5
jmp 0xddd7
jmp 0xddd9
jmp 0xdddb
jmp 0xdddd
jmp 0xdddf
jmp 0xdde1
jmp 0xdde3
jmp 0xdde5
jmp 0xda84
cmpl $0x0, -0x64(%rbp)
jne 0xddf6
movl -0x48(%rbp), %eax
movl %eax, -0x34(%rbp)
movq -0x98(%rbp), %rdi
leaq 0x1ab7(%rip), %rsi      # 0xf8bb
callq 0x10f0
cmpl $0x0, %eax
jne 0xde35
cmpl $0x5, -0x54(%rbp)
jge 0xde1f
movl -0x54(%rbp), %eax
movl %eax, -0x104(%rbp)
jmp 0xde2c
movl $0x5, %eax
movl %eax, -0x104(%rbp)
jmp 0xde2c
movl -0x104(%rbp), %eax
movl %eax, -0x54(%rbp)
movl -0x8(%rbp), %eax
movq 0x5191(%rip), %rcx      # 0x12fd0
cmpl (%rcx), %eax
jne 0xe1c0
movq 0x51aa(%rip), %rax      # 0x12ff8
movq (%rax), %rdi
leaq 0x1a66(%rip), %rsi      # 0xf8be
movb $0x0, %al
callq 0x1110
movq 0x5192(%rip), %rax      # 0x12ff8
movq (%rax), %rdi
leaq 0x1a70(%rip), %rsi      # 0xf8e0
movb $0x0, %al
callq 0x1110
movq 0x517a(%rip), %rax      # 0x12ff8
movq (%rax), %rdi
leaq 0x1a62(%rip), %rsi      # 0xf8ea
movb $0x0, %al
callq 0x1110
movq 0x5162(%rip), %rax      # 0x12ff8
movq (%rax), %rdi
leaq 0x1a5c(%rip), %rsi      # 0xf8fc
movb $0x0, %al
callq 0x1110
movq 0x514a(%rip), %rax      # 0x12ff8
movq (%rax), %rdi
leaq 0x1a89(%rip), %rsi      # 0xf941
movb $0x0, %al
callq 0x1110
movq 0x5132(%rip), %rax      # 0x12ff8
movq (%rax), %rdi
movl -0x44(%rbp), %edx
leaq 0x1a9f(%rip), %rsi      # 0xf972
movb $0x0, %al
callq 0x1110
movq 0x5117(%rip), %rax      # 0x12ff8
movq (%rax), %rdi
movss -0x3c(%rbp), %xmm0
cvtss2sd %xmm0, %xmm0
leaq 0x1aa5(%rip), %rsi      # 0xf999
movb $0x1, %al
callq 0x1110
movq 0x50f6(%rip), %rax      # 0x12ff8
movq (%rax), %rdi
movl -0x48(%rbp), %edx
leaq 0x1aaf(%rip), %rsi      # 0xf9be
movb $0x0, %al
callq 0x1110
movq 0x50db(%rip), %rax      # 0x12ff8
movq (%rax), %rdi
movl -0x40(%rbp), %edx
leaq 0x1ab3(%rip), %rsi      # 0xf9dd
movb $0x0, %al
callq 0x1110
movq 0x50c0(%rip), %rax      # 0x12ff8
movq (%rax), %rdi
leaq 0x1abe(%rip), %rsi      # 0xfa00
movb $0x0, %al
callq 0x1110
movq 0x50a8(%rip), %rax      # 0x12ff8
movq (%rax), %rdi
leaq 0x1ab2(%rip), %rsi      # 0xfa0c
movb $0x0, %al
callq 0x1110
movq 0x5090(%rip), %rax      # 0x12ff8
movq (%rax), %rdi
movl -0x38(%rbp), %edx
leaq 0x1ac1(%rip), %rsi      # 0xfa36
movb $0x0, %al
callq 0x1110
movq 0x5075(%rip), %rax      # 0x12ff8
movq (%rax), %rdi
movss -0x30(%rbp), %xmm0
cvtss2sd %xmm0, %xmm0
leaq 0x1acb(%rip), %rsi      # 0xfa61
movb $0x1, %al
callq 0x1110
movq 0x5054(%rip), %rax      # 0x12ff8
movq (%rax), %rdi
leaq 0x1ae6(%rip), %rsi      # 0xfa94
movb $0x0, %al
callq 0x1110
movq 0x503c(%rip), %rax      # 0x12ff8
movq (%rax), %rdi
movl -0x2c(%rbp), %edx
leaq 0x1ad6(%rip), %rsi      # 0xfa9f
movb $0x0, %al
callq 0x1110
movq 0x5021(%rip), %rax      # 0x12ff8
movq (%rax), %rdi
movl -0x24(%rbp), %edx
leaq 0x1b07(%rip), %rsi      # 0xfaeb
movb $0x0, %al
callq 0x1110
movq 0x5006(%rip), %rax      # 0x12ff8
movq (%rax), %rdi
movl -0x20(%rbp), %edx
leaq 0x1b22(%rip), %rsi      # 0xfb21
movb $0x0, %al
callq 0x1110
movq 0x4feb(%rip), %rax      # 0x12ff8
movq (%rax), %rdi
leaq 0x1b37(%rip), %rsi      # 0xfb4e
movb $0x0, %al
callq 0x1110
movq 0x4fd3(%rip), %rax      # 0x12ff8
movq (%rax), %rdi
movl -0x28(%rbp), %edx
addl $0x1, %edx
leaq 0x1b3c(%rip), %rsi      # 0xfb71
movb $0x0, %al
callq 0x1110
movq 0x4fb5(%rip), %rax      # 0x12ff8
movq (%rax), %rdi
leaq 0x1b5a(%rip), %rsi      # 0xfba7
movb $0x0, %al
callq 0x1110
movq 0x4f9d(%rip), %rax      # 0x12ff8
movq (%rax), %rdi
movss -0x18(%rbp), %xmm0
cvtss2sd %xmm0, %xmm0
movss -0x1c(%rbp), %xmm1
cvtss2sd %xmm1, %xmm1
leaq 0x1b46(%rip), %rsi      # 0xfbbd
movb $0x2, %al
callq 0x1110
movq 0x4f73(%rip), %rax      # 0x12ff8
movq (%rax), %rdi
movss -0x14(%rbp), %xmm0
cvtss2sd %xmm0, %xmm0
leaq 0x1b61(%rip), %rsi      # 0xfbf9
movb $0x1, %al
callq 0x1110
movq 0x4f52(%rip), %rax      # 0x12ff8
movq (%rax), %rdi
leaq 0x1b8a(%rip), %rsi      # 0xfc3a
movb $0x0, %al
callq 0x1110
movq 0x4f3a(%rip), %rax      # 0x12ff8
movq (%rax), %rdi
leaq 0x1b7f(%rip), %rsi      # 0xfc47
movb $0x0, %al
callq 0x1110
movq 0x4f22(%rip), %rax      # 0x12ff8
movq (%rax), %rdi
movl -0x74(%rbp), %edx
leaq 0x1b84(%rip), %rsi      # 0xfc67
movb $0x0, %al
callq 0x1110
movq 0x4f07(%rip), %rax      # 0x12ff8
movq (%rax), %rdi
movl -0x78(%rbp), %edx
leaq 0x1b95(%rip), %rsi      # 0xfc93
movb $0x0, %al
callq 0x1110
movq 0x4eec(%rip), %rax      # 0x12ff8
movq (%rax), %rdi
leaq 0x1baf(%rip), %rsi      # 0xfcc5
movb $0x0, %al
callq 0x1110
movq 0x4ed4(%rip), %rax      # 0x12ff8
movq (%rax), %rdi
movq -0x98(%rbp), %rdx
leaq 0x1ba2(%rip), %rsi      # 0xfcd7
movb $0x0, %al
callq 0x1110
movq 0x4eb5(%rip), %rax      # 0x12ff8
movq (%rax), %rdi
leaq 0x1bc2(%rip), %rsi      # 0xfd0f
movb $0x0, %al
callq 0x1110
movq 0x4e9d(%rip), %rax      # 0x12ff8
movq (%rax), %rdi
leaq 0x1bea(%rip), %rsi      # 0xfd4f
movb $0x0, %al
callq 0x1110
movq 0x4e85(%rip), %rax      # 0x12ff8
movq (%rax), %rdi
leaq 0x1bfe(%rip), %rsi      # 0xfd7b
movb $0x0, %al
callq 0x1110
movq 0x4e6d(%rip), %rax      # 0x12ff8
movq (%rax), %rdi
leaq 0x1c12(%rip), %rsi      # 0xfda7
movb $0x0, %al
callq 0x1110
movq 0x4e55(%rip), %rax      # 0x12ff8
movq (%rax), %rdi
leaq 0x1c1c(%rip), %rsi      # 0xfdc9
movb $0x0, %al
callq 0x1110
movl $0x1, -0x4(%rbp)
jmp 0xeab3
movb $0x0, %al
callq 0x1410
movq $0x0, -0xb0(%rbp)
cmpl $0x0, -0x68(%rbp)
jne 0xe1f0
cmpq $0x0, -0x90(%rbp)
je 0xe2ea
cmpl $0x0, -0x6c(%rbp)
je 0xe2ea
movq 0x4e01(%rip), %rax      # 0x12ff8
movq (%rax), %rdi
leaq 0x1bee(%rip), %rsi      # 0xfdef
leaq 0x1c12(%rip), %rdx      # 0xfe1a
movb $0x0, %al
callq 0x1110
cmpq $0x0, -0x90(%rbp)
je 0xe258
cmpl $0x0, -0x6c(%rbp)
je 0xe258
movq 0x4dd2(%rip), %rax      # 0x12ff8
movq (%rax), %rdi
leaq 0x1bef(%rip), %rsi      # 0xfe1f
leaq 0x1be3(%rip), %rdx      # 0xfe1a
movb $0x0, %al
callq 0x1110
movq -0x90(%rbp), %rdi
movq -0xa0(%rbp), %rsi
callq 0xb8d0
movq %rax, -0xb0(%rbp)
cmpl $0x0, -0x68(%rbp)
je 0xe2e8
movq 0x4d8f(%rip), %rax      # 0x12ff8
movq (%rax), %rdi
leaq 0x1be1(%rip), %rsi      # 0xfe54
leaq 0x1ba0(%rip), %rdx      # 0xfe1a
movb $0x0, %al
callq 0x1110
movq -0x10(%rbp), %rax
movq 0x4d44(%rip), %rcx      # 0x12fd0
movslq (%rcx), %rcx
movq (%rax,%rcx,8), %rdi
movl -0x48(%rbp), %esi
movl -0x44(%rbp), %edx
movl -0x38(%rbp), %ecx
movss -0x30(%rbp), %xmm0
callq 0x61c0
movq %rax, -0xb8(%rbp)
cmpq $0x0, -0xb0(%rbp)
je 0xe2d8
movq -0xb0(%rbp), %rdi
movq -0xb8(%rbp), %rsi
callq 0xd970
movq -0xb8(%rbp), %rdi
callq 0x14f0
jmp 0xe2e6
movq -0xb8(%rbp), %rax
movq %rax, -0xb0(%rbp)
jmp 0xe2e8
jmp 0xe2ea
movq 0x4d07(%rip), %rax      # 0x12ff8
movq (%rax), %rdi
leaq 0x1b90(%rip), %rsi      # 0xfe8b
leaq 0x1b18(%rip), %rdx      # 0xfe1a
movb $0x0, %al
callq 0x1110
callq 0x1490
movq %rax, -0xc0(%rbp)
movq -0x10(%rbp), %rax
movq 0x4cb0(%rip), %rcx      # 0x12fd0
movslq (%rcx), %rcx
movq (%rax,%rcx,8), %rdi
movl -0x48(%rbp), %esi
movl -0x44(%rbp), %edx
movq -0xc0(%rbp), %rcx
movl -0x60(%rbp), %r9d
movq -0xb0(%rbp), %rax
leaq -0xc8(%rbp), %r8
movq %rax, (%rsp)
callq 0x6410
movq %rax, -0xd0(%rbp)
cmpq $0x0, -0xb0(%rbp)
je 0xe36c
movq -0xb0(%rbp), %rdi
callq 0x14f0
movq $0x0, -0xd8(%rbp)
cmpl $0x0, -0x58(%rbp)
jne 0xe451
movq 0x4c70(%rip), %rax      # 0x12ff8
movq (%rax), %rdi
leaq 0x1b2a(%rip), %rsi      # 0xfebc
leaq 0x1a81(%rip), %rdx      # 0xfe1a
movb $0x0, %al
callq 0x1110
cmpl $0x2, -0x54(%rbp)
jl 0xe3fa
movl -0x40(%rbp), %edi
movss -0x3c(%rbp), %xmm0
movq -0xc8(%rbp), %rdx
movq -0xd0(%rbp), %rcx
movq -0xc0(%rbp), %rax
movl (%rax), %eax
movl %eax, %r8d
xorl %esi, %esi
callq 0x6900
movq %rax, -0xd8(%rbp)
movq -0xd8(%rbp), %rdi
movl -0x48(%rbp), %esi
movq -0xc8(%rbp), %rdx
movq -0xd0(%rbp), %rcx
callq 0x6f40
movq %rax, -0xc8(%rbp)
cmpl $0x3, -0x54(%rbp)
jl 0xe44f
movq -0xd8(%rbp), %rdi
cvtsi2sdl -0x38(%rbp), %xmm0
movsd 0x146c(%rip), %xmm1     # 0xf880
mulsd %xmm1, %xmm0
cvttsd2si %xmm0, %esi
cvtsi2sdl -0x34(%rbp), %xmm0
movsd 0xbff(%rip), %xmm1      # 0xf028
mulsd %xmm1, %xmm0
cvttsd2si %xmm0, %edx
movq -0xc8(%rbp), %rcx
movq -0xd0(%rbp), %r8
leaq -0x7c(%rbp), %r9
callq 0x7400
movq %rax, -0xc8(%rbp)
jmp 0xe451
cmpl $0x0, -0x5c(%rbp)
jne 0xe55d
movq 0x4b96(%rip), %rax      # 0x12ff8
movq (%rax), %rdi
leaq 0x1a89(%rip), %rsi      # 0xfef5
leaq 0x19a7(%rip), %rdx      # 0xfe1a
movb $0x0, %al
callq 0x1110
cmpl $0x4, -0x54(%rbp)
jl 0xe529
movl -0x40(%rbp), %edi
movss -0x3c(%rbp), %xmm0
movl -0x48(%rbp), %eax
movl $0x2, %ecx
cltd
idivl %ecx
movl %eax, %esi
movq -0xc8(%rbp), %rdx
movq -0xd0(%rbp), %rcx
movq -0xc0(%rbp), %rax
movl (%rax), %eax
movl %eax, %r8d
callq 0x6900
movq %rax, -0xe0(%rbp)
movq -0xe0(%rbp), %rdi
movl -0x48(%rbp), %esi
movq -0xc8(%rbp), %rdx
movq -0xd0(%rbp), %rcx
callq 0x6f40
movq %rax, -0xc8(%rbp)
cmpq $0x0, -0xd8(%rbp)
je 0xe519
movq -0xc0(%rbp), %rax
movl (%rax), %eax
movl %eax, %edi
movq -0xd8(%rbp), %rsi
movq -0xe0(%rbp), %rdx
callq 0x79b0
movq -0xe0(%rbp), %rdi
callq 0x1040
jmp 0xe527
movq -0xe0(%rbp), %rax
movq %rax, -0xd8(%rbp)
jmp 0xe529
cmpl $0x5, -0x54(%rbp)
jl 0xe55b
movq -0xc0(%rbp), %rsi
movq -0xd8(%rbp), %rdx
movq -0xc8(%rbp), %rcx
movq -0xd0(%rbp), %r8
leaq -0x48(%rbp), %rdi
callq 0x7a50
movq %rax, -0xc8(%rbp)
jmp 0xe55d
movq -0xd0(%rbp), %rdi
movq -0xc8(%rbp), %rsi
shlq $0x5, %rsi
callq 0x1170
movq %rax, -0xd0(%rbp)
movq 0x4a76(%rip), %rax      # 0x12ff8
movq (%rax), %rdi
leaq 0x19a1(%rip), %rsi      # 0xff2d
leaq 0x1887(%rip), %rdx      # 0xfe1a
movb $0x0, %al
callq 0x1110
movq -0xc0(%rbp), %rsi
movq -0xd8(%rbp), %rdx
movq -0xc8(%rbp), %rcx
movq -0xd0(%rbp), %r8
leaq -0x48(%rbp), %rdi
callq 0x7dd0
movq %rax, -0xe8(%rbp)
cmpq $0x0, -0x90(%rbp)
je 0xe6b6
movq 0x4a1d(%rip), %rax      # 0x12ff8
movq (%rax), %rdi
leaq 0x1979(%rip), %rsi      # 0xff5e
leaq 0x182e(%rip), %rdx      # 0xfe1a
movb $0x0, %al
callq 0x1110
movq -0x90(%rbp), %rdi
movq -0xc0(%rbp), %rsi
callq 0xb9a0
movq %rax, -0xf0(%rbp)
cmpl $0x0, -0x70(%rbp)
jne 0xe648
movq 0x49de(%rip), %rax      # 0x12ff8
movq (%rax), %rdi
leaq 0x196e(%rip), %rsi      # 0xff92
leaq 0x17ef(%rip), %rdx      # 0xfe1a
movb $0x0, %al
callq 0x1110
movq -0xe8(%rbp), %rdi
movq -0xf0(%rbp), %rsi
movl -0x74(%rbp), %edx
callq 0xbec0
movq -0x98(%rbp), %rdi
leaq 0x1265(%rip), %rsi      # 0xf8bb
callq 0x10f0
cmpl $0x0, %eax
jne 0xe675
movq -0xc0(%rbp), %rdi
movq -0xf0(%rbp), %rsi
callq 0xb7d0
jmp 0xe6aa
movq 0x497c(%rip), %rax      # 0x12ff8
movq (%rax), %rdi
leaq 0x193c(%rip), %rsi      # 0xffc2
leaq 0x178d(%rip), %rdx      # 0xfe1a
movb $0x0, %al
callq 0x1110
movq -0xe8(%rbp), %rdi
movq -0xf0(%rbp), %rsi
movl -0x78(%rbp), %edx
callq 0xbb30
movq -0xf0(%rbp), %rdi
callq 0x1040
cmpl $0x6, -0x54(%rbp)
jl 0xe709
movq 0x4935(%rip), %rax      # 0x12ff8
movq (%rax), %rdi
leaq 0x192f(%rip), %rsi      # 0xfffc
leaq 0x1746(%rip), %rdx      # 0xfe1a
movb $0x0, %al
callq 0x1110
movq 0x4916(%rip), %rax      # 0x12ff8
movq (%rax), %rdi
leaq 0x1941(%rip), %rsi      # 0x1002d
leaq 0x1727(%rip), %rdx      # 0xfe1a
movb $0x0, %al
callq 0x1110
movq -0xe8(%rbp), %rdi
movl -0x2c(%rbp), %esi
callq 0x3b00
cmpl $0x7, -0x54(%rbp)
jl 0xe74c
movq 0x48e2(%rip), %rax      # 0x12ff8
movq (%rax), %rdi
leaq 0x193f(%rip), %rsi      # 0x1005f
leaq 0x16f3(%rip), %rdx      # 0xfe1a
movb $0x0, %al
callq 0x1110
movq -0xe8(%rbp), %rdi
movl -0x20(%rbp), %esi
callq 0x4180
movq -0xe8(%rbp), %rdi
movl -0x24(%rbp), %esi
callq 0x4890
cmpl $0x9, -0x54(%rbp)
jl 0xe7fd
movq 0x489b(%rip), %rax      # 0x12ff8
movq (%rax), %rdi
movl -0x28(%rbp), %ecx
addl $0x1, %ecx
leaq 0x1936(%rip), %rsi      # 0x100a3
leaq 0x16a6(%rip), %rdx      # 0xfe1a
movb $0x0, %al
callq 0x1110
movl $0x0, -0x4c(%rbp)
movl -0x4c(%rbp), %eax
cmpl -0x28(%rbp), %eax
jg 0xe7fb
movss -0x1c(%rbp), %xmm1
movss -0x18(%rbp), %xmm0
subss -0x1c(%rbp), %xmm0
cvtsi2ssl -0x28(%rbp), %xmm2
divss %xmm2, %xmm0
cvtsi2ssl -0x4c(%rbp), %xmm2
mulss %xmm2, %xmm0
addss %xmm1, %xmm0
movss %xmm0, -0xf4(%rbp)
movq -0xe8(%rbp), %rdi
movss -0xf4(%rbp), %xmm0
callq 0x3630
cmpl $0x0, %eax
je 0xe7ee
movq -0xe8(%rbp), %rdi
movl -0x20(%rbp), %esi
callq 0x4180
movq -0xe8(%rbp), %rdi
movl -0x24(%rbp), %esi
callq 0x4890
jmp 0xe7f0
movl -0x4c(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x4c(%rbp)
jmp 0xe782
jmp 0xe7fd
cmpl $0xa, -0x54(%rbp)
jl 0xe860
movq 0x47ee(%rip), %rax      # 0x12ff8
movq (%rax), %rdi
leaq 0x18d8(%rip), %rsi      # 0x100ec
leaq 0x15ff(%rip), %rdx      # 0xfe1a
movb $0x0, %al
callq 0x1110
movq -0xe8(%rbp), %rdi
movl $0x1, %esi
callq 0x43b0
movq -0xe8(%rbp), %rdi
movl -0x20(%rbp), %esi
callq 0x44e0
movq -0xe8(%rbp), %rdi
movl -0x20(%rbp), %esi
callq 0x4180
movq -0xe8(%rbp), %rdi
movl -0x24(%rbp), %esi
callq 0x4890
cmpl $0xb, -0x54(%rbp)
jl 0xe8bb
movq 0x478b(%rip), %rax      # 0x12ff8
movq (%rax), %rdi
leaq 0x18c1(%rip), %rsi      # 0x10138
leaq 0x159c(%rip), %rdx      # 0xfe1a
movb $0x0, %al
callq 0x1110
movq -0xe8(%rbp), %rdi
movss -0x14(%rbp), %xmm0
callq 0x3630
cmpl $0x0, %eax
je 0xe8b9
movq -0xe8(%rbp), %rdi
movl -0x20(%rbp), %esi
callq 0x4180
movq -0xe8(%rbp), %rdi
movl -0x24(%rbp), %esi
callq 0x4890
jmp 0xe8bb
movq -0x98(%rbp), %rdi
leaq 0xfbf(%rip), %rsi       # 0xf888
callq 0x10f0
cmpl $0x0, %eax
jne 0xe966
movq 0x471a(%rip), %rax      # 0x12ff8
movq (%rax), %rdi
leaq 0x1891(%rip), %rsi      # 0x10179
leaq 0x152b(%rip), %rdx      # 0xfe1a
movb $0x0, %al
callq 0x1110
movq -0xe8(%rbp), %rdi
callq 0x8e50
movq %rax, -0x100(%rbp)
cmpq $0x0, -0x88(%rbp)
je 0xe934
movq -0x100(%rbp), %rdi
movq -0xc0(%rbp), %rsi
movq -0xd8(%rbp), %rdx
movq -0x88(%rbp), %rcx
callq 0x9730
movq -0x100(%rbp), %rdi
movq -0xc0(%rbp), %rsi
movq -0xd8(%rbp), %rdx
movq 0x4670(%rip), %rax      # 0x12fc0
movq (%rax), %rcx
callq 0x8720
movq -0x100(%rbp), %rdi
callq 0x8680
jmp 0xe9a4
movq -0x98(%rbp), %rdi
leaq 0x1833(%rip), %rsi      # 0x101a7
callq 0x10f0
cmpl $0x0, %eax
jne 0xe9a2
movq -0xe8(%rbp), %rdi
movq -0xc0(%rbp), %rsi
movq -0xd8(%rbp), %rdx
movq 0x4626(%rip), %rax      # 0x12fc0
movq (%rax), %rcx
callq 0x8440
jmp 0xe9a4
movq -0xe8(%rbp), %rdi
callq 0x3130
movq -0xd8(%rbp), %rdi
callq 0x1040
movq -0xd0(%rbp), %rdi
callq 0x1040
movq -0xc0(%rbp), %rdi
callq 0x14f0
movq 0x461d(%rip), %rax      # 0x12ff8
movq (%rax), %rdi
leaq 0x17c5(%rip), %rsi      # 0x101aa
leaq 0x142e(%rip), %rdx      # 0xfe1a
leaq 0xec4(%rip), %rcx       # 0xf8b7
leaq 0x17d2(%rip), %r8       # 0x101cc
movb $0x0, %al
callq 0x1110
movq 0x45f0(%rip), %rax      # 0x12ff8
movq (%rax), %rdi
leaq 0x17c3(%rip), %rsi      # 0x101d5
leaq 0x1401(%rip), %rdx      # 0xfe1a
movb $0x0, %al
callq 0x1110
movl $0x0, -0x4c(%rbp)
movl -0x4c(%rbp), %eax
cmpl -0x8(%rbp), %eax
jge 0xea5e
movq 0x45c2(%rip), %rax      # 0x12ff8
movq (%rax), %rdi
movq -0x10(%rbp), %rax
movslq -0x4c(%rbp), %rcx
movq (%rax,%rcx,8), %rdx
leaq 0x1796(%rip), %rsi      # 0x101e2
movb $0x0, %al
callq 0x1110
movl -0x4c(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x4c(%rbp)
jmp 0xea27
movq 0x4593(%rip), %rax      # 0x12ff8
movq (%rax), %rax
movq %rax, -0x118(%rbp)
movb $0x0, %al
callq 0x1390
movsd %xmm0, -0x110(%rbp)
movb $0x0, %al
callq 0x1330
movq -0x118(%rbp), %rdi
movaps %xmm0, %xmm1
movsd -0x110(%rbp), %xmm0
leaq 0x1748(%rip), %rsi      # 0x101e6
leaq 0x1375(%rip), %rdx      # 0xfe1a
movb $0x2, %al
callq 0x1110
movl $0x0, -0x4(%rbp)
movl -0x4(%rbp), %eax
addq $0x120, %rsp            # imm = 0x120
popq %rbp
retq