// File: /workspace/github_c_makefile_star2_O1/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, %rbx
movl %edi, %ebp
movl $0x42200000, 0xa4(%rsp) # imm = 0x42200000
leaq 0x50(%rsp), %rdi
callq 0x5010
leaq 0x19f2(%rip), %rdx      # 0xaa0f
movl %ebp, %edi
movq %rbx, %rsi
callq 0x11c0
xorl %r13d, %r13d
testl %eax, %eax
js 0x945a
movq $0x0, 0x48(%rsp)
movl $0x5, 0x30(%rsp)
movl $0x1, 0x34(%rsp)
leaq 0x19ba(%rip), %rcx      # 0xaa0c
movq %rcx, 0x40(%rsp)
movl $0x64, 0x18(%rsp)
leaq 0x19a9(%rip), %r13      # 0xaa0f
leaq 0x18db(%rip), %r12      # 0xa948
movq 0x5f64(%rip), %r15      # 0xefd8
movl $0x0, 0x24(%rsp)
movl $0x0, 0x14(%rsp)
movl $0x0, 0x38(%rsp)
movq $0x0, 0x90(%rsp)
movq $0x0, 0x88(%rsp)
movq $0x0, 0x98(%rsp)
movl $0x0, 0x28(%rsp)
xorl %r14d, %r14d
leal -0x43(%rax), %ecx
cmpl $0x30, %ecx
ja 0x90dc
movslq (%r12,%rcx,4), %rax
addq %r12, %rax
jmpq *%rax
movq (%r15), %rax
movq %rax, 0x88(%rsp)
jmp 0x92a0
cmpl $0x31, %eax
je 0x9296
cmpl $0x32, %eax
jne 0x92a0
movl $0x1, 0x24(%rsp)
jmp 0x92a0
movq (%r15), %rdi
leaq 0x8(%rsp), %rsi
callq 0x1060
cvtsd2ss %xmm0, %xmm0
movss %xmm0, 0x80(%rsp)
movq 0x8(%rsp), %rdi
cmpb $0x2c, (%rdi)
jne 0x92a0
incq %rdi
leaq 0x8(%rsp), %rsi
callq 0x1060
cvtsd2ss %xmm0, %xmm0
movss %xmm0, 0x7c(%rsp)
jmp 0x92a0
movq (%r15), %rdi
callq 0x11e0
movl %eax, 0x54(%rsp)
jmp 0x92a0
movq (%r15), %rdi
callq 0x1070
cvtsd2ss %xmm0, %xmm0
movss %xmm0, 0x5c(%rsp)
jmp 0x92a0
movq (%r15), %rdi
callq 0x11e0
movl %eax, 0x64(%rsp)
movl $0x1, 0x14(%rsp)
jmp 0x92a0
movq (%r15), %rax
movq %rax, 0x40(%rsp)
jmp 0x92a0
movq (%r15), %rdi
callq 0x11e0
movl %eax, 0x6c(%rsp)
jmp 0x92a0
movq (%r15), %rax
movq %rax, 0x98(%rsp)
jmp 0x92a0
movq (%r15), %rdi
callq 0x11e0
cltq
movq %rax, 0x90(%rsp)
movl $0x1, %r14d
jmp 0x92a0
movq (%r15), %rdi
callq 0x1070
cvtsd2ss %xmm0, %xmm0
movss %xmm0, 0x68(%rsp)
jmp 0x92a0
movq (%r15), %rdi
callq 0x11e0
movl %eax, 0x30(%rsp)
jmp 0x92a0
movl $0x1, 0x38(%rsp)
jmp 0x92a0
movq (%r15), %rdi
callq 0x1070
cvtsd2ss %xmm0, %xmm0
movss %xmm0, 0x84(%rsp)
jmp 0x92a0
movq (%r15), %rdi
callq 0x11e0
movl %eax, 0x58(%rsp)
jmp 0x92a0
movq (%r15), %rdi
callq 0x11e0
movl %eax, 0x78(%rsp)
jmp 0x92a0
movq (%r15), %rdi
callq 0x11e0
movl %eax, 0x50(%rsp)
jmp 0x92a0
movl $0x1, 0x28(%rsp)
jmp 0x92a0
movq (%r15), %rdi
callq 0x11e0
movl %eax, 0x60(%rsp)
jmp 0x92a0
movq (%r15), %rdi
callq 0x11e0
movl %eax, 0x18(%rsp)
jmp 0x92a0
movq (%r15), %rdi
callq 0x11e0
movl %eax, 0x34(%rsp)
jmp 0x92a0
movq (%r15), %rdi
callq 0x11e0
movl %eax, 0x74(%rsp)
jmp 0x92a0
movq (%r15), %rdi
callq 0x11e0
decl %eax
movl %eax, 0x70(%rsp)
jmp 0x92a0
movl $0x1, %eax
movq %rax, 0x48(%rsp)
movl %ebp, %edi
movq %rbx, %rsi
movq %r13, %rdx
callq 0x11c0
testl %eax, %eax
jns 0x90bb
cmpl $0x0, 0x14(%rsp)
sete %al
cmpl $0x0, 0x38(%rsp)
sete 0x38(%rsp)
testl %r14d, %r14d
setne %cl
cmpl $0x0, 0x48(%rsp)
sete 0x48(%rsp)
cmpl $0x0, 0x24(%rsp)
sete 0x14(%rsp)
cmpl $0x0, 0x28(%rsp)
sete 0x24(%rsp)
movl %ecx, %r13d
movq 0x40(%rsp), %r14
movl 0x18(%rsp), %r12d
testb %al, %al
je 0x9304
movl 0x50(%rsp), %eax
movl %eax, 0x64(%rsp)
leaq 0x1734(%rip), %rsi      # 0xaa3f
movq %r14, %rdi
callq 0x1100
cmpl $0x5, %r12d
movl $0x5, %r15d
cmovll %r12d, %r15d
testl %eax, %eax
cmovnel %r12d, %r15d
movq 0x5ca2(%rip), %rax      # 0xefd0
cmpl %ebp, (%rax)
jne 0x9366
leaq 0x50(%rsp), %rdi
movl 0x30(%rsp), %esi
movl 0x34(%rsp), %edx
movq %r14, %rcx
callq 0x2afd
movl $0x1, %r14d
jmp 0x995f
leaq 0x16e2(%rip), %rdi      # 0xaa3b
callq 0x1050
xorl %r14d, %r14d
jmp 0x995f
movq %r14, 0x40(%rsp)
xorl %r12d, %r12d
xorl %eax, %eax
callq 0x2fba
movb 0x38(%rsp), %al
xorb $0x1, %al
movq 0x88(%rsp), %r14
testq %r14, %r14
setne %cl
andb %r13b, %cl
orb %al, %cl
cmpb $0x1, %cl
jne 0x94c9
movq 0x5c5a(%rip), %rax      # 0xeff8
movq (%rax), %rdi
leaq 0x1bcb(%rip), %rsi      # 0xaf73
leaq 0x1bef(%rip), %rdx      # 0xaf9e
xorl %r12d, %r12d
xorl %eax, %eax
callq 0x1120
testq %r14, %r14
setne %al
andb %r13b, %al
cmpb $0x1, %al
jne 0x93fe
movq 0x5c2b(%rip), %r13      # 0xeff8
movq (%r13), %rdi
leaq 0x1bcb(%rip), %rsi      # 0xafa3
leaq 0x1bbf(%rip), %rdx      # 0xaf9e
xorl %eax, %eax
callq 0x1120
movq %r14, %rdi
movq 0x90(%rsp), %rsi
callq 0x8528
movq %rax, %r12
movq %r13, %rax
jmp 0x9405
movq 0x5bf3(%rip), %rax      # 0xeff8
cmpb $0x0, 0x38(%rsp)
jne 0x94c9
movq (%rax), %rdi
leaq 0x1bbe(%rip), %rsi      # 0xafd8
leaq 0x1b7d(%rip), %rdx      # 0xaf9e
xorl %eax, %eax
callq 0x1120
movq 0x5ba1(%rip), %rax      # 0xefd0
movslq (%rax), %rax
movq (%rbx,%rax,8), %rdi
movl 0x50(%rsp), %esi
movl 0x54(%rsp), %edx
movl 0x60(%rsp), %ecx
movss 0x68(%rsp), %xmm0
callq 0x56a1
movq %rax, %r14
testq %r12, %r12
jne 0x94b6
movq %r14, %r12
jmp 0x94c9
movl $0x64, %r12d
leaq 0x15a5(%rip), %r14      # 0xaa0c
movl $0x1, 0x34(%rsp)
movl $0x5, 0x30(%rsp)
movb $0x1, 0x24(%rsp)
movq $0x0, 0x98(%rsp)
movq $0x0, 0x88(%rsp)
movq $0x0, 0x90(%rsp)
movb $0x1, 0x38(%rsp)
movb $0x1, %al
movb $0x1, 0x14(%rsp)
movb $0x1, 0x48(%rsp)
jmp 0x92f8
movq %r12, %rdi
movq %r14, %rsi
callq 0x8fa0
movq %r14, %rdi
callq 0x30fb
movq 0x5b28(%rip), %r13      # 0xeff8
movq (%r13), %rdi
leaq 0x1b34(%rip), %rsi      # 0xb00f
leaq 0x1abc(%rip), %rdx      # 0xaf9e
xorl %eax, %eax
callq 0x1120
callq 0x30d0
movq %rax, %rcx
movq 0x5ad8(%rip), %rax      # 0xefd0
movslq (%rax), %rax
movq (%rbx,%rax,8), %rdi
movl 0x50(%rsp), %esi
movl 0x54(%rsp), %edx
movq %r12, (%rsp)
leaq 0x8(%rsp), %r8
movq %rcx, 0x28(%rsp)
movl $0x1, %r9d
callq 0x5855
movq %rax, %r14
testq %r12, %r12
je 0x9530
movq %r12, %rdi
callq 0x30fb
cmpb $0x0, 0x48(%rsp)
je 0x95a1
movq (%r13), %rdi
leaq 0x1afe(%rip), %rsi      # 0xb040
leaq 0x1a55(%rip), %rdx      # 0xaf9e
movq $0x0, 0x18(%rsp)
xorl %eax, %eax
callq 0x1120
cmpl $0x2, %r15d
jl 0x95b1
movl 0x58(%rsp), %edi
movss 0x5c(%rsp), %xmm0
movq 0x8(%rsp), %rdx
movq 0x28(%rsp), %r12
movl (%r12), %r8d
xorl %esi, %esi
movq %r14, %rcx
callq 0x5c3c
movl 0x50(%rsp), %esi
movq 0x8(%rsp), %rdx
movq %rax, 0x18(%rsp)
movq %rax, %rdi
movq %r14, %rcx
callq 0x6013
movq %rax, 0x8(%rsp)
jmp 0x95b6
movq $0x0, 0x18(%rsp)
movq 0x28(%rsp), %r12
jmp 0x9605
movq 0x28(%rsp), %r12
cmpl $0x3, %r15d
jl 0x9605
xorps %xmm0, %xmm0
cvtsi2sdl 0x60(%rsp), %xmm0
mulsd 0x1373(%rip), %xmm0     # 0xa940
cvttsd2si %xmm0, %esi
xorps %xmm0, %xmm0
cvtsi2sdl 0x64(%rsp), %xmm0
mulsd 0xa46(%rip), %xmm0      # 0xa028
cvttsd2si %xmm0, %edx
movq 0x8(%rsp), %rcx
leaq 0xa4(%rsp), %r9
movq 0x18(%rsp), %rdi
movq %r14, %r8
callq 0x61d4
movq %rax, 0x8(%rsp)
movb 0x14(%rsp), %al
testb %al, %al
je 0x96c5
movq (%r13), %rdi
leaq 0x1a5d(%rip), %rsi      # 0xb079
leaq 0x197b(%rip), %rdx      # 0xaf9e
xorl %eax, %eax
callq 0x1120
cmpl $0x4, %r15d
jl 0x96a0
movl 0x50(%rsp), %eax
movl 0x58(%rsp), %edi
movss 0x5c(%rsp), %xmm0
movl %eax, %esi
shrl $0x1f, %esi
addl %eax, %esi
sarl %esi
movq 0x8(%rsp), %rdx
movl (%r12), %r8d
movq %r14, %rcx
callq 0x5c3c
movq %rax, %r13
movl 0x50(%rsp), %esi
movq 0x8(%rsp), %rdx
movq %rax, %rdi
movq %r14, %rcx
callq 0x6013
movq %rax, 0x8(%rsp)
movq 0x18(%rsp), %rsi
testq %rsi, %rsi
jne 0x9685
movq %r13, 0x18(%rsp)
jmp 0x9699
movl (%r12), %edi
movq %r13, %rdx
callq 0x646e
movq %r13, %rdi
callq 0x1040
movq 0x5958(%rip), %r13      # 0xeff8
cmpl $0x5, %r15d
jl 0x96c5
movq 0x8(%rsp), %rcx
leaq 0x50(%rsp), %rdi
movq %r12, %rsi
movq 0x18(%rsp), %rdx
movq %r14, %r8
callq 0x64af
movq %rax, 0x8(%rsp)
movq 0x8(%rsp), %rsi
shlq $0x5, %rsi
movq %r14, %rdi
callq 0x1180
movq %rax, %r14
movq (%r13), %rdi
leaq 0x19cd(%rip), %rsi      # 0xb0b1
leaq 0x18b3(%rip), %rdx      # 0xaf9e
xorl %eax, %eax
callq 0x1120
movq 0x8(%rsp), %rcx
leaq 0x50(%rsp), %rdi
movq %r12, %rsi
movq 0x18(%rsp), %rdx
movq %r14, 0x38(%rsp)
movq %r14, %r8
callq 0x1d18
movq %rax, %r13
movq 0x88(%rsp), %r12
testq %r12, %r12
je 0x97e3
movq 0x58cc(%rip), %rax      # 0xeff8
movq (%rax), %rdi
leaq 0x19ac(%rip), %rsi      # 0xb0e2
leaq 0x1861(%rip), %rdx      # 0xaf9e
xorl %eax, %eax
callq 0x1120
movq %r12, %rdi
movq 0x28(%rsp), %rsi
callq 0x8560
movq %rax, %r12
cmpb $0x0, 0x24(%rsp)
je 0x9789
movq 0x5896(%rip), %rax      # 0xeff8
movq (%rax), %rdi
leaq 0x19aa(%rip), %rsi      # 0xb116
leaq 0x182b(%rip), %rdx      # 0xaf9e
xorl %eax, %eax
callq 0x1120
movq %r13, %rdi
movq %r12, %rsi
movl 0x30(%rsp), %edx
callq 0x2165
leaq 0x12af(%rip), %rsi      # 0xaa3f
movq 0x40(%rsp), %rdi
callq 0x1100
testl %eax, %eax
jne 0x97ad
movq 0x28(%rsp), %rdi
movq %r12, %rsi
callq 0x84a8
jmp 0x97db
movq 0x5844(%rip), %rax      # 0xeff8
movq (%rax), %rdi
leaq 0x1988(%rip), %rsi      # 0xb146
leaq 0x17d9(%rip), %rdx      # 0xaf9e
xorl %eax, %eax
callq 0x1120
movq %r13, %rdi
movq %r12, %rsi
movl 0x34(%rsp), %edx
callq 0x2088
movq %r12, %rdi
callq 0x1040
cmpl $0x6, %r15d
jl 0x97f6
leaq 0x50(%rsp), %rdi
movq %r13, %rsi
callq 0x2846
cmpl $0x7, %r15d
movq 0x28(%rsp), %r12
jl 0x980e
leaq 0x50(%rsp), %rdi
movq %r13, %rsi
callq 0x28a4
cmpl $0x9, %r15d
jl 0x9821
leaq 0x50(%rsp), %rdi
movq %r13, %rsi
callq 0x28ed
cmpl $0xa, %r15d
jl 0x9834
leaq 0x50(%rsp), %rsi
movq %r13, %rdi
callq 0x297e
cmpl $0xb, %r15d
jl 0x9847
leaq 0x50(%rsp), %rdi
movq %r13, %rsi
callq 0x29de
leaq 0x11be(%rip), %rsi      # 0xaa0c
movq 0x40(%rsp), %r15
movq %r15, %rdi
callq 0x1100
testl %eax, %eax
jne 0x987c
movq %r13, %rdi
movq 0x98(%rsp), %rsi
movq %r12, %rdx
movq 0x18(%rsp), %r15
movq %r15, %rcx
callq 0x2a39
jmp 0x98ac
leaq 0x1aa8(%rip), %rsi      # 0xb32b
movq %r15, %rdi
callq 0x1100
testl %eax, %eax
movq 0x18(%rsp), %r15
jne 0x98ac
movq 0x5725(%rip), %rax      # 0xefc0
movq (%rax), %rcx
movq %r13, %rdi
movq %r12, %rsi
movq %r15, %rdx
callq 0x6798
movq %r13, %rdi
callq 0x3f87
movq %r15, %rdi
callq 0x1040
movq 0x38(%rsp), %rdi
callq 0x1040
movq %r12, %rdi
callq 0x30fb
movq 0x5723(%rip), %r12      # 0xeff8
movq (%r12), %rdi
leaq 0x1a4e(%rip), %rsi      # 0xb32e
leaq 0x16b7(%rip), %r15      # 0xaf9e
leaq 0x114d(%rip), %rcx      # 0xaa3b
leaq 0x1a5b(%rip), %r8       # 0xb350
xorl %r14d, %r14d
movq %r15, %rdx
xorl %eax, %eax
callq 0x1120
movq (%r12), %rdi
leaq 0x1a4c(%rip), %rsi      # 0xb359
movq %r15, %rdx
xorl %eax, %eax
callq 0x1120
testl %ebp, %ebp
jle 0x9925
movl %ebp, %edi
movq %rbx, %rsi
callq 0x2ab9
movq (%r12), %rbx
xorl %eax, %eax
callq 0x2f4f
movsd %xmm0, 0x40(%rsp)
xorl %eax, %eax
callq 0x2f0c
movapd %xmm0, %xmm1
leaq 0x1a22(%rip), %rsi      # 0xb36a
leaq 0x164f(%rip), %rdx      # 0xaf9e
movq %rbx, %rdi
movsd 0x40(%rsp), %xmm0
movb $0x2, %al
callq 0x1120
movl %r14d, %eax
addq $0xa8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq