// File: /workspace/github_c_makefile_star2_O2/lh3[P]minigraph/main.c
// Function: main
int main(int argc, char *argv[])
{
	const char *opt_str = "x:k:w:t:r:m:n:g:K:o:p:N:Pq:d:l:f:U:M:F:j:L:DSc";
	ketopt_t o = KETOPT_INIT;
	mg_mapopt_t opt;
	mg_idxopt_t ipt;
	mg_ggopt_t gpt;
	int i, c, ret, n_threads = 4;
	char *s;
	FILE *fp_help = stderr;
	gfa_t *g;

	mg_verbose = 3;
	liftrlimit();
	mg_realtime0 = realtime();
	mg_opt_set(0, &ipt, &opt, &gpt);

	while ((c = ketopt(&o, argc, argv, 1, opt_str, long_options)) >= 0) { // test command line options and apply option -x/preset first
		if (c == 'x') {
			if (mg_opt_set(o.arg, &ipt, &opt, &gpt) < 0) {
				fprintf(stderr, "[ERROR] unknown preset '%s'\n", o.arg);
				return 1;
			}
		} else if (c == ':') {
			fprintf(stderr, "[ERROR] missing option argument\n");
			return 1;
		} else if (c == '?') {
			fprintf(stderr, "[ERROR] unknown option in \"%s\"\n", argv[o.i - 1]);
			return 1;
		}
	}
	o = KETOPT_INIT;

	while ((c = ketopt(&o, argc, argv, 1, opt_str, long_options)) >= 0) {
		if (c == 'w') ipt.w = atoi(o.arg);
		else if (c == 'k') ipt.k = atoi(o.arg);
		else if (c == 't') n_threads = atoi(o.arg);
		else if (c == 'f') opt.occ_max1_frac = atof(o.arg);
		else if (c == 'g') opt.max_gap = mm_parse_num(o.arg);
		else if (c == 'F') opt.max_frag_len = mm_parse_num(o.arg);
		else if (c == 'K') opt.mini_batch_size = mm_parse_num(o.arg);
		else if (c == 'p') opt.pri_ratio = atof(o.arg);
		else if (c == 'N') opt.best_n = mm_parse_num(o.arg);
		else if (c == 'P') opt.flag |= MG_M_ALL_CHAINS;
		else if (c == 'D') opt.flag |= MG_M_NO_DIAG;
		else if (c == 'M') opt.mask_level = atof(o.arg);
		else if (c == 'j') opt.div = atof(o.arg);
		else if (c == 'l') gpt.min_map_len = mm_parse_num(o.arg);
		else if (c == 'd') gpt.min_depth_len = mm_parse_num(o.arg);
		else if (c == 'q') gpt.min_mapq = atoi(o.arg);
		else if (c == 'L') gpt.min_var_len = atoi(o.arg);
		else if (c == 'S') opt.flag |= MG_M_WRITE_LCHAIN;
		else if (c == 'c') opt.flag |= MG_M_CIGAR;
		else if (c == 301) opt.flag |= MG_M_VERTEX_COOR;      // --vc
		else if (c == 309) gpt.ggs_min_end_cnt = atoi(o.arg);  // --gg-min-end-cnt
		else if (c == 310) gpt.ggs_min_end_frac = atof(o.arg); // --gg-min-end-frac
		else if (c == 312) opt.flag |= MG_M_NO_COMP_PATH;     // --no-comp-path
		else if (c == 313) gpt.match_pen = atoi(o.arg);       // --gg-match-pen
		else if (c == 314) opt.flag |= MG_M_FRAG_MODE | MG_M_FRAG_MERGE;       // --frag
		else if (c == 315) opt.flag |= MG_M_CAL_COV | MG_M_SKIP_GCHECK, gpt.flag |= MG_G_CAL_COV; // --cov
		else if (c == 316) opt.min_cov_blen = mm_parse_num(o.arg);             // --min-cov-blen
		else if (c == 317) opt.min_cov_mapq = atoi(o.arg);                     // --min-cov-mapq
		else if (c == 318) opt.chn_pen_gap = atof(o.arg);     // --gap-pen
		else if (c == 319) opt.ref_bonus = atoi(o.arg);       // --ref-bonus
		else if (c == 320) opt.max_gap_pre = mm_parse_num(o.arg); // --max-gap-pre
		else if (c == 321) opt.max_lc_skip = atoi(o.arg);     // --max-lc-skip
		else if (c == 322) opt.max_gc_skip = atoi(o.arg);     // --max-gc-skip
		else if (c == 323) opt.max_lc_iter = mm_parse_num(o.arg);  // --max-lc-iter
		else if (c == 324) opt.rmq_size_cap = mm_parse_num(o.arg); // --max-rmq-size
		else if (c == 326) opt.flag |= MG_M_WRITE_MZ | MG_M_WRITE_LCHAIN; // --write-mz
		else if (c == 327) gpt.flag |= MG_G_CALL, opt.flag |= MG_M_SKIP_GCHECK; // --call
		else if (c == 328) opt.cap_kalloc = mm_parse_num(o.arg); // --cap-kalloc
		else if (c == 329) opt.gdp_max_ed = mm_parse_num(o.arg); // --gdp-max-ed
		else if (c == 401) mg_dbg_flag |= MG_DBG_NO_KALLOC;   // --no-kalloc
		else if (c == 402) mg_dbg_flag |= MG_DBG_QNAME;       // --dbg-qname
		else if (c == 403) mg_dbg_flag |= MG_DBG_LCHAIN;      // --dbg-lchain
		else if (c == 404) mg_dbg_flag |= MG_DBG_INSERT;      // --dbg-insert
		else if (c == 405) mg_dbg_flag |= MG_DBG_SHORTK;      // --dbg-shortk
		else if (c == 406) mg_dbg_flag |= MG_DBG_GC1;         // --dbg-gc1
		else if (c == 407) mg_dbg_flag |= MG_DBG_LC_PROF;     // --dbg-lc-prof
		else if (c == 408) mg_dbg_flag |= MG_DBG_MINIWFA;     // --dbg-mwf-long
		else if (c == 409) mg_dbg_flag |= MG_DBG_MWF_SEQ;     // --dbg-mwf-seq
		else if (c == 'U') {
			opt.occ_max1 = (int)mm_parse_num2(o.arg, &s);
			if (*s == ',') opt.occ_max1_cap = (int)mm_parse_num2(s + 1, &s);
		} else if (c == 'r') {
			opt.bw = (int)mm_parse_num2(o.arg, &s);
			if (*s == ',') opt.bw_long = (int)mm_parse_num2(s + 1, &s);
		} else if (c == 'n') {
			opt.min_gc_cnt = (int)mm_parse_num2(o.arg, &s);
			if (*s == ',') opt.min_lc_cnt = (int)mm_parse_num2(s + 1, &s);
		} else if (c == 'm') {
			opt.min_gc_score = (int)mm_parse_num2(o.arg, &s);
			if (*s == ',') opt.min_lc_score = (int)mm_parse_num2(s + 1, &s);
		} else if (c == 'o') {
			if (strcmp(o.arg, "-") != 0) {
				if (freopen(o.arg, "wb", stdout) == NULL) {
					fprintf(stderr, "[ERROR]\033[1;31m failed to write the output to file '%s'\033[0m\n", o.arg);
					exit(1);
				}
			}
		} else if (c == 306) { // --ggen
			if (o.arg) {
				if (strcmp(o.arg, "none") == 0) gpt.algo = MG_G_NONE;
				else if (strcmp(o.arg, "simple") == 0) gpt.algo = MG_G_GGSIMPLE;
				else {
					fprintf(stderr, "ERROR: unknown graph generation algorithm \"%s\"\n", o.arg);
					return 1;
				}
			} else gpt.algo = MG_G_GGSIMPLE;
		} else if (c == 302) { // --secondary
			yes_or_no(&opt.flag, MG_M_PRINT_2ND, o.longidx, o.arg, 1);
		} else if (c == 303) { // --ins-qovlp
			yes_or_no(&gpt.flag, MG_G_NO_QOVLP, o.longidx, o.arg, 1);
		} else if (c == 304) { // --heap-sort
			yes_or_no(&opt.flag, MG_M_HEAP_SORT, o.longidx, o.arg, 1);
		} else if (c == 305) { // --show-unmap
			yes_or_no(&opt.flag, MG_M_SHOW_UNMAP, o.longidx, o.arg, 1);
		} else if (c == 307) { // --rmq
			yes_or_no(&opt.flag, MG_M_RMQ, o.longidx, o.arg, 1);
		} else if (c == 325) { // --inv
			yes_or_no(&gpt.flag, MG_G_NO_INV, o.longidx, o.arg, 0);
		} else if (c == 300) { // --version
			puts(MG_VERSION);
			return 0;
		}
	}
	if (mg_opt_check(&ipt, &opt, &gpt) < 0)
		return 1;
	if (gpt.algo == MG_G_GGSIMPLE && !(opt.flag&MG_M_CIGAR))
		fprintf(stderr, "[WARNING]\033[1;31m it is recommended to add -c for graph generation\033[0m\n");

	if (argc == o.ind || fp_help == stdout) {
		fprintf(fp_help, "Usage: minigraph [options] <target.gfa> <query.fa> [...]\n");
		fprintf(fp_help, "Options:\n");
		fprintf(fp_help, "  Indexing:\n");
		fprintf(fp_help, "    -k INT       k-mer size (no larger than 28) [%d]\n", ipt.k);
		fprintf(fp_help, "    -w INT       minizer window size [%d]\n", ipt.w);
		fprintf(fp_help, "  Mapping:\n");
		fprintf(fp_help, "    -c           perform base alignment; RECOMMENDED\n");
		fprintf(fp_help, "    -f FLOAT     ignore top FLOAT fraction of repetitive minimizers [%g]\n", opt.occ_max1_frac);
		fprintf(fp_help, "    -U INT[,INT] choose the minimizer occurrence threshold within this interval [%d,%d]\n", opt.occ_max1, opt.occ_max1_cap);
		fprintf(fp_help, "    -j FLOAT     expected sequence divergence [%g]\n", opt.div);
		fprintf(fp_help, "    -g NUM       stop chain enlongation if there are no minimizers in INT-bp [%d]\n", opt.max_gap);
		fprintf(fp_help, "    -F NUM       max fragment length (effective with -xsr or in the fragment mode) [%d]\n", opt.max_frag_len);
		fprintf(fp_help, "    -r NUM[,NUM] bandwidth for the two rounds of chaining [%d,%d]\n", opt.bw, opt.bw_long);
		fprintf(fp_help, "    -n INT[,INT] minimal number of minimizers on a graph/linear chain [%d,%d]\n", opt.min_gc_cnt, opt.min_lc_cnt);
		fprintf(fp_help, "    -m INT[,INT] minimal graph/linear chaining score [%d,%d]\n", opt.min_gc_score, opt.min_lc_score);
		fprintf(fp_help, "    -p FLOAT     min secondary-to-primary score ratio [%g]\n", opt.pri_ratio);
		fprintf(fp_help, "    -N INT       retain at most INT secondary mappings [%d]\n", opt.best_n);
		fprintf(fp_help, "    -D           skip self diagonal matches\n");
		fprintf(fp_help, "  Graph generation:\n");
		fprintf(fp_help, "    --ggen       perform incremental graph generation\n");
		fprintf(fp_help, "    -q INT       min mapping quality [%d]\n", gpt.min_mapq);
		fprintf(fp_help, "    -l NUM       min alignment length [%d]\n", gpt.min_map_len);
		fprintf(fp_help, "    -d NUM       min alignment length for depth calculation [%d]\n", gpt.min_depth_len);
		fprintf(fp_help, "    -L INT       min variant length [%d]\n", gpt.min_var_len);
		fprintf(fp_help, "    --call       call the graph path in each bubble and output BED\n");
		fprintf(fp_help, "  Input/output:\n");
		fprintf(fp_help, "    -t INT       number of threads [%d]\n", n_threads);
		fprintf(fp_help, "    -o FILE      output mappings to FILE [stdout]\n");
		fprintf(fp_help, "    -K NUM       minibatch size for mapping [500M]\n");
		fprintf(fp_help, "    -S           output linear chains in * sName sLen nMz div sStart sEnd qStart qEnd\n");
		fprintf(fp_help, "    --vc         output in the vertex coordinate\n");
		fprintf(fp_help, "  Preset:\n");
		fprintf(fp_help, "    -x STR       preset []\n");
		fprintf(fp_help, "                 - lr: noisy long read mapping (the default)\n");
		fprintf(fp_help, "                 - asm: asm-to-ref mapping\n");
		fprintf(fp_help, "                 - sr: short reads\n");
		fprintf(fp_help, "                 - ggs: incremental graph generation\n");
		return fp_help == stdout? 0 : 1;
	}

	g = gfa_read(argv[o.ind]);
	if (g == 0) {
		fprintf(stderr, "[ERROR] failed to load the graph from file '%s'\n", argv[o.ind]);
		return 1;
	} else if (mg_verbose >= 3) {
		fprintf(stderr, "[M::%s::%.3f*%.2f] loaded the graph from \"%s\"\n", __func__, realtime() - mg_realtime0, cputime() / (realtime() - mg_realtime0), argv[o.ind]);
	}

	if (gpt.algo == MG_G_NONE && !(gpt.flag & MG_G_CALL)) {
		ret = mg_map_files(g, argc - (o.ind + 1), (const char**)&argv[o.ind + 1], &ipt, &opt, n_threads);
	} else {
		if (gpt.flag & MG_G_CALL) gfa_sort_ref_arc(g);
		ret = mg_ggen(g, argc - (o.ind + 1), (const char**)&argv[o.ind + 1], &ipt, &opt, &gpt, n_threads);
	}

	if ((gpt.algo != MG_G_NONE || (opt.flag & MG_M_CAL_COV)) && !(gpt.flag & MG_G_CALL))
		gfa_print(g, stdout, 0);
	gfa_destroy(g);

	if (fflush(stdout) == EOF) {
		fprintf(stderr, "[ERROR] failed to write the results\n");
		exit(EXIT_FAILURE);
	}

	if (mg_verbose >= 3) {
		fprintf(stderr, "[M::%s] Version: %s\n", __func__, MG_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; Peak RSS: %.3f GB\n", __func__, realtime() - mg_realtime0, cputime(), peakrss() / 1024.0 / 1024.0 / 1024.0);
	}
	return !!ret;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x158, %rsp            # imm = 0x158
movq %rsi, 0x38(%rsp)
movl %edi, %r15d
movups 0x4df2(%rip), %xmm0     # 0x26600
leaq 0x10(%rsp), %r12
movaps %xmm0, 0x10(%r12)
movups 0x4dd0(%rip), %xmm0     # 0x265f0
movaps %xmm0, (%r12)
movq 0xc7cc(%rip), %rax      # 0x2dff8
movq (%rax), %rax
movq %rax, 0x60(%rsp)
leaq 0xcbc5(%rip), %rax      # 0x2e400
movl $0x3, (%rax)
callq 0x217bc
callq 0x37fd
leaq 0xce2e(%rip), %rax      # 0x2e680
movsd %xmm0, (%rax)
leaq 0x54(%rsp), %r13
leaq 0xa0(%rsp), %rbp
leaq 0x68(%rsp), %rbx
xorl %edi, %edi
movq %r13, %rsi
movq %rbp, %rdx
movq %rbx, %rcx
callq 0xd93c
movq %r12, %rdi
movl %r15d, %esi
movq 0x38(%rsp), %rdx
callq 0x2266e
testl %eax, %eax
js 0x218d7
cmpl $0x78, %eax
je 0x218a4
cmpl $0x3a, %eax
je 0x225cc
cmpl $0x3f, %eax
jne 0x21878
jmp 0x225a3
movq 0x18(%rsp), %r14
movq %r14, %rdi
movq %r13, %rsi
movq %rbp, %rdx
movq %rbx, %rcx
callq 0xd93c
testl %eax, %eax
jns 0x21878
movq 0xc733(%rip), %rax      # 0x2dff8
movq (%rax), %rdi
leaq 0x422c(%rip), %rsi      # 0x25afb
movq %r14, %rdx
jmp 0x225c3
leaq 0x10(%rsp), %r12
movups 0x4d1d(%rip), %xmm0     # 0x26600
movaps %xmm0, 0x10(%r12)
movupd 0x4cff(%rip), %xmm0     # 0x265f0
movapd %xmm0, (%r12)
pushq $0x4
popq %rax
movl %eax, 0x48(%rsp)
leaq 0x41a3(%rip), %r14      # 0x25aa8
leaq 0x4054(%rip), %rbp      # 0x25960
leaq 0x411d(%rip), %r13      # 0x25a30
movq %r12, %rdi
movl %r15d, %esi
movq 0x38(%rsp), %rdx
callq 0x2266e
testl %eax, %eax
js 0x21f5a
leal -0x12c(%rax), %ecx
cmpl $0x1d, %ecx
jbe 0x21952
leal -0x44(%rax), %ecx
cmpl $0x33, %ecx
ja 0x21966
movslq (%rbp,%rcx,4), %rax
addq %rbp, %rax
jmpq *%rax
orb $0x40, 0xa2(%rsp)
jmp 0x21913
movslq (%r13,%rcx,4), %rax
addq %r13, %rax
jmpq *%rax
orb $0x8, 0xa1(%rsp)
jmp 0x21913
addl $0xfffffe6f, %eax       # imm = 0xFFFFFE6F
cmpl $0x8, %eax
ja 0x21913
movslq (%r14,%rax,4), %rax
addq %r14, %rax
jmpq *%rax
leaq 0xccf8(%rip), %rax      # 0x2e678
orb $0x1, (%rax)
jmp 0x21913
movl 0x20(%rsp), %edx
movq 0x18(%rsp), %rcx
leaq 0x68(%rsp), %rdi
pushq $0x4
popq %rsi
xorl %r8d, %r8d
callq 0x22981
jmp 0x21913
movq 0x18(%rsp), %rdi
callq 0x2310
movl %eax, 0xf8(%rsp)
jmp 0x21913
orb $0x8, 0x68(%rsp)
orb $0x2, 0xa3(%rsp)
jmp 0x21913
movq 0x18(%rsp), %rdi
callq 0x2310
movl %eax, 0x8c(%rsp)
jmp 0x21913
movq 0x18(%rsp), %rbx
testq %rbx, %rbx
je 0x21a19
leaq 0x41a6(%rip), %rsi      # 0x25b98
movq %rbx, %rdi
callq 0x21f0
testl %eax, %eax
je 0x21f50
leaq 0x3910(%rip), %rsi      # 0x25319
movq %rbx, %rdi
callq 0x21f0
testl %eax, %eax
jne 0x2261d
movl $0x1, 0x70(%rsp)
jmp 0x21913
movq 0x18(%rsp), %rdi
callq 0x228f1
movl %eax, 0xfc(%rsp)
jmp 0x21913
movl 0x20(%rsp), %edx
movq 0x18(%rsp), %rcx
leaq 0xa0(%rsp), %rdi
pushq $0x1
popq %r8
movl $0x8000, %esi           # imm = 0x8000
callq 0x22981
jmp 0x21913
movq 0x18(%rsp), %rdi
callq 0x20e0
cvtsd2ss %xmm0, %xmm0
movss %xmm0, 0x90(%rsp)
jmp 0x21913
movl 0x20(%rsp), %edx
movq 0x18(%rsp), %rcx
leaq 0xa0(%rsp), %rdi
pushq $0x1
popq %r8
movl $0x100000, %esi         # imm = 0x100000
callq 0x22981
jmp 0x21913
orq $0x1800000, 0xa0(%rsp) # imm = 0x1800000
jmp 0x21913
movl 0x20(%rsp), %edx
movq 0x18(%rsp), %rcx
leaq 0xa0(%rsp), %rdi
pushq $0x1
popq %r8
movl $0x400, %esi            # imm = 0x400
callq 0x22981
jmp 0x21913
movl 0x20(%rsp), %edx
movq 0x18(%rsp), %rcx
leaq 0x68(%rsp), %rdi
pushq $0x1
popq %rsi
pushq $0x1
popq %r8
callq 0x22981
jmp 0x21913
movq 0x18(%rsp), %rdi
callq 0x228f1
movl %eax, 0xdc(%rsp)
jmp 0x21913
orq $0x2004000, 0xa0(%rsp) # imm = 0x2004000
orb $0x2, 0x68(%rsp)
jmp 0x21913
movq 0x18(%rsp), %rdi
callq 0x228f1
movq %rax, 0x138(%rsp)
jmp 0x21913
movl 0x20(%rsp), %edx
movq 0x18(%rsp), %rcx
leaq 0xa0(%rsp), %rdi
pushq $0x1
popq %r8
movl $0x2000, %esi           # imm = 0x2000
callq 0x22981
jmp 0x21913
orb $-0x40, 0xa0(%rsp)
jmp 0x21913
movq 0x18(%rsp), %rdi
callq 0x2310
movl %eax, 0x100(%rsp)
jmp 0x21913
movq 0x18(%rsp), %rdi
callq 0x20e0
cvtsd2ss %xmm0, %xmm0
movss %xmm0, 0xf0(%rsp)
jmp 0x21913
orb $0x20, 0xa2(%rsp)
jmp 0x21913
movq 0x18(%rsp), %rdi
callq 0x2310
movl %eax, 0x140(%rsp)
jmp 0x21913
movq 0x18(%rsp), %rdi
callq 0x2310
movl %eax, 0x130(%rsp)
jmp 0x21913
movq 0x18(%rsp), %rdi
callq 0x2310
movl %eax, 0x84(%rsp)
jmp 0x21913
movq 0x18(%rsp), %rdi
callq 0x228f1
movl %eax, 0x114(%rsp)
jmp 0x21913
movq 0x18(%rsp), %rdi
callq 0x228f1
movl %eax, 0xd0(%rsp)
jmp 0x21913
movq 0x18(%rsp), %rdi
callq 0x228f1
movl %eax, 0x144(%rsp)
jmp 0x21913
movq 0x18(%rsp), %rdi
leaq 0x40(%rsp), %rbx
movq %rbx, %rsi
callq 0x228f5
movl %eax, 0x110(%rsp)
movq (%rbx), %rdi
cmpb $0x2c, (%rdi)
jne 0x21913
incq %rdi
leaq 0x40(%rsp), %rsi
callq 0x228f5
movl %eax, 0x108(%rsp)
jmp 0x21913
movq 0x18(%rsp), %rdi
callq 0x2310
movl %eax, 0x58(%rsp)
jmp 0x21913
movq 0x18(%rsp), %rdi
callq 0x20e0
cvtsd2ss %xmm0, %xmm0
movss %xmm0, 0xc4(%rsp)
jmp 0x21913
movq 0x18(%rsp), %rdi
callq 0x20e0
cvtsd2ss %xmm0, %xmm0
movss %xmm0, 0x120(%rsp)
jmp 0x21913
movq 0x18(%rsp), %rdi
callq 0x228f1
movl %eax, 0xe0(%rsp)
jmp 0x21913
orb $0x4, 0xa3(%rsp)
jmp 0x21913
movq 0x18(%rsp), %rdi
callq 0x228f1
movq %rax, 0xa8(%rsp)
jmp 0x21913
movq 0x18(%rsp), %rdi
callq 0x228f1
movl %eax, 0x78(%rsp)
jmp 0x21913
movq 0x18(%rsp), %rdi
callq 0x2310
movl %eax, 0x80(%rsp)
jmp 0x21913
orb $-0x80, 0xa2(%rsp)
jmp 0x21913
movq 0x18(%rsp), %rdi
callq 0x228f1
movl %eax, 0xe8(%rsp)
jmp 0x21913
movq 0x18(%rsp), %rdi
leaq 0x40(%rsp), %rbx
movq %rbx, %rsi
callq 0x228f5
movl %eax, 0x10c(%rsp)
movq (%rbx), %rdi
cmpb $0x2c, (%rdi)
jne 0x21913
incq %rdi
leaq 0x40(%rsp), %rsi
callq 0x228f5
movl %eax, 0x104(%rsp)
jmp 0x21913
movq 0x18(%rsp), %rdi
callq 0x2310
movl %eax, 0x74(%rsp)
jmp 0x21913
movq 0x18(%rsp), %rdi
callq 0x228f1
movl %eax, 0x128(%rsp)
jmp 0x21913
movq 0x18(%rsp), %rdi
leaq 0x40(%rsp), %rbx
movq %rbx, %rsi
callq 0x228f5
movl %eax, 0xc8(%rsp)
movq (%rbx), %rdi
cmpb $0x2c, (%rdi)
jne 0x21913
incq %rdi
leaq 0x40(%rsp), %rsi
callq 0x228f5
movl %eax, 0xcc(%rsp)
jmp 0x21913
movq 0x18(%rsp), %rdi
callq 0x20e0
cvtsd2ss %xmm0, %xmm0
movss %xmm0, 0xec(%rsp)
jmp 0x21913
orb $0x10, 0xa1(%rsp)
jmp 0x21913
movq 0x18(%rsp), %rbx
cmpb $0x2d, (%rbx)
jne 0x21e1c
cmpb $0x0, 0x1(%rbx)
je 0x21913
movq 0xc1b5(%rip), %rax      # 0x2dfd8
movq (%rax), %rdx
leaq 0x3d2c(%rip), %rsi      # 0x25b59
movq %rbx, %rdi
callq 0x2190
testq %rax, %rax
jne 0x21913
jmp 0x2264b
movq 0x18(%rsp), %rdi
callq 0x228f1
movl %eax, 0x7c(%rsp)
jmp 0x21913
movq 0x18(%rsp), %rdi
leaq 0x40(%rsp), %rbx
movq %rbx, %rsi
callq 0x228f5
movl %eax, 0xbc(%rsp)
movq (%rbx), %rdi
cmpb $0x2c, (%rdi)
jne 0x21913
incq %rdi
leaq 0x40(%rsp), %rsi
callq 0x228f5
movl %eax, 0xc0(%rsp)
jmp 0x21913
movq 0x18(%rsp), %rdi
callq 0x2310
movl %eax, 0x48(%rsp)
jmp 0x21913
movq 0x18(%rsp), %rdi
callq 0x20e0
cvtsd2ss %xmm0, %xmm0
movss %xmm0, 0x12c(%rsp)
jmp 0x21913
movq 0x18(%rsp), %rdi
callq 0x2310
movl %eax, 0x54(%rsp)
jmp 0x21913
leaq 0xc79b(%rip), %rax      # 0x2e678
orb $0x20, (%rax)
jmp 0x21913
leaq 0xc78c(%rip), %rax      # 0x2e678
orb $0x8, (%rax)
jmp 0x21913
leaq 0xc77d(%rip), %rax      # 0x2e678
orb $0x10, (%rax)
jmp 0x21913
leaq 0xc76e(%rip), %rax      # 0x2e678
orb $0x1, 0x1(%rax)
jmp 0x21913
leaq 0xc75e(%rip), %rax      # 0x2e678
orb $0x2, (%rax)
jmp 0x21913
leaq 0xc74f(%rip), %rax      # 0x2e678
orb $0x40, (%rax)
jmp 0x21913
leaq 0xc740(%rip), %rax      # 0x2e678
orb $-0x80, (%rax)
jmp 0x21913
leaq 0xc731(%rip), %rax      # 0x2e678
orb $0x2, 0x1(%rax)
jmp 0x21913
andl $0x0, 0x70(%rsp)
jmp 0x21913
leaq 0x54(%rsp), %rdi
leaq 0xa0(%rsp), %rsi
leaq 0x68(%rsp), %rdx
callq 0xdb5a
movb $0x1, %bl
testl %eax, %eax
js 0x220c2
cmpl $0x1, 0x70(%rsp)
movq 0xc071(%rip), %rbp      # 0x2dff8
jne 0x21f97
testb $0x4, 0xa3(%rsp)
je 0x225ef
movslq 0x10(%rsp), %r14
movq 0xc035(%rip), %r13      # 0x2dfd8
cmpl %r15d, %r14d
movq 0x60(%rsp), %r12
je 0x220d7
cmpq (%r13), %r12
je 0x220d7
movq 0x38(%rsp), %rax
movq (%rax,%r14,8), %rdi
callq 0x699b
testq %rax, %rax
je 0x22434
movq %rax, %r12
leaq 0xc424(%rip), %rax      # 0x2e400
cmpl $0x3, (%rax)
jge 0x22454
cmpl $0x0, 0x70(%rsp)
movq 0x68(%rsp), %rax
je 0x21ff7
testb $0x8, %al
je 0x22034
jmp 0x2202c
testb $0x8, %al
jne 0x2202c
movl %r14d, %esi
notl %esi
addl %r15d, %esi
movq 0x38(%rsp), %rax
leaq (%rax,%r14,8), %rdx
addq $0x8, %rdx
leaq 0x54(%rsp), %rcx
leaq 0xa0(%rsp), %r8
movq %r12, %rdi
movl 0x48(%rsp), %r9d
callq 0x1d517
jmp 0x2206b
movq %r12, %rdi
callq 0x8537
leaq 0x1(%r14), %rax
movl %r15d, %esi
subl %eax, %esi
movq 0x38(%rsp), %rax
leaq (%rax,%r14,8), %rdx
addq $0x8, %rdx
movl 0x48(%rsp), %eax
movl %eax, (%rsp)
leaq 0x54(%rsp), %rcx
leaq 0xa0(%rsp), %r8
leaq 0x68(%rsp), %r9
movq %r12, %rdi
callq 0x20aea
movl %eax, %ebx
cmpl $0x0, 0x70(%rsp)
jne 0x2207e
testb $0x40, 0xa1(%rsp)
je 0x22093
testb $0x8, 0x68(%rsp)
jne 0x22093
movq (%r13), %rsi
movq %r12, %rdi
xorl %edx, %edx
callq 0x6dd1
movq %r12, %rdi
callq 0x3dac
movq (%r13), %rdi
callq 0x2290
cmpl $-0x1, %eax
je 0x22633
leaq 0xc34c(%rip), %rax      # 0x2e400
cmpl $0x3, (%rax)
jge 0x224cb
testl %ebx, %ebx
setne %bl
movzbl %bl, %eax
addq $0x158, %rsp            # imm = 0x158
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
leaq 0x3b40(%rip), %rdi      # 0x25c1e
pushq $0x39
popq %rsi
pushq $0x1
popq %r14
movq %r14, %rdx
movq %r12, %rcx
callq 0x2340
leaq 0x3b61(%rip), %rdi      # 0x25c58
pushq $0x9
popq %rsi
movq %r14, %rdx
movq %r12, %rcx
callq 0x2340
leaq 0x3b56(%rip), %rdi      # 0x25c62
pushq $0xc
popq %rsi
movq %r14, %rdx
movq %r12, %rcx
callq 0x2340
movl 0x58(%rsp), %edx
leaq 0x3b4a(%rip), %rsi      # 0x25c6f
movq %r12, %rdi
xorl %eax, %eax
callq 0x2210
movl 0x54(%rsp), %edx
leaq 0x3b6b(%rip), %rsi      # 0x25ca5
movq %r12, %rdi
xorl %eax, %eax
callq 0x2210
leaq 0x3b85(%rip), %rdi      # 0x25cd0
pushq $0xb
popq %rsi
movq %r14, %rdx
movq %r12, %rcx
callq 0x2340
leaq 0x3b7c(%rip), %rdi      # 0x25cdc
pushq $0x35
popq %r15
movq %r15, %rsi
movq %r14, %rdx
movq %r12, %rcx
callq 0x2340
cvtss2sd 0xc4(%rsp), %xmm0
leaq 0x3b90(%rip), %rsi      # 0x25d12
movq %r12, %rdi
movb $0x1, %al
callq 0x2210
movl 0xbc(%rsp), %edx
movl 0xc0(%rsp), %ecx
leaq 0x3bbb(%rip), %rsi      # 0x25d5c
movq %r12, %rdi
xorl %eax, %eax
callq 0x2210
cvtss2sd 0xec(%rsp), %xmm0
leaq 0x3bfa(%rip), %rsi      # 0x25db5
movq %r12, %rdi
movb $0x1, %al
callq 0x2210
movl 0xe0(%rsp), %edx
leaq 0x3c16(%rip), %rsi      # 0x25de9
movq %r12, %rdi
xorl %eax, %eax
callq 0x2210
movl 0xe8(%rsp), %edx
leaq 0x3c51(%rip), %rsi      # 0x25e3c
movq %r12, %rdi
xorl %eax, %eax
callq 0x2210
movl 0xc8(%rsp), %edx
movl 0xcc(%rsp), %ecx
leaq 0x3c8b(%rip), %rsi      # 0x25e95
movq %r12, %rdi
xorl %eax, %eax
callq 0x2210
movl 0x104(%rsp), %ecx
movl 0x10c(%rsp), %edx
leaq 0x3caf(%rip), %rsi      # 0x25ed8
movq %r12, %rdi
xorl %eax, %eax
callq 0x2210
movl 0x108(%rsp), %ecx
movl 0x110(%rsp), %edx
leaq 0x3cdf(%rip), %rsi      # 0x25f27
movq %r12, %rdi
xorl %eax, %eax
callq 0x2210
cvtss2sd 0x12c(%rsp), %xmm0
leaq 0x3d03(%rip), %rsi      # 0x25f65
movq %r12, %rdi
movb $0x1, %al
callq 0x2210
movl 0x128(%rsp), %edx
leaq 0x3d27(%rip), %rsi      # 0x25fa1
movq %r12, %rdi
xorl %eax, %eax
callq 0x2210
leaq 0x3d53(%rip), %rdi      # 0x25fde
pushq $0x2c
popq %rsi
movq %r14, %rdx
movq %r12, %rcx
callq 0x2340
leaq 0x3d6b(%rip), %rdi      # 0x2600b
pushq $0x14
popq %rsi
movq %r14, %rdx
movq %r12, %rcx
callq 0x2340
leaq 0x3d6b(%rip), %rdi      # 0x26020
pushq $0x36
popq %rsi
movq %r14, %rdx
movq %r12, %rcx
callq 0x2340
movl 0x74(%rsp), %edx
leaq 0x3d89(%rip), %rsi      # 0x26057
movq %r12, %rdi
xorl %eax, %eax
callq 0x2210
movl 0x78(%rsp), %edx
leaq 0x3d9f(%rip), %rsi      # 0x26082
movq %r12, %rdi
xorl %eax, %eax
callq 0x2210
movl 0x7c(%rsp), %edx
leaq 0x3db6(%rip), %rsi      # 0x260ae
movq %r12, %rdi
xorl %eax, %eax
callq 0x2210
movl 0x80(%rsp), %edx
leaq 0x3de0(%rip), %rsi      # 0x260f0
movq %r12, %rdi
xorl %eax, %eax
callq 0x2210
leaq 0x3df9(%rip), %rdi      # 0x2611a
pushq $0x43
popq %rsi
movq %r14, %rdx
movq %r12, %rcx
callq 0x2340
leaq 0x3e28(%rip), %rdi      # 0x2615e
pushq $0x10
popq %rsi
movq %r14, %rdx
movq %r12, %rcx
callq 0x2340
leaq 0x3e24(%rip), %rsi      # 0x2616f
movq %r12, %rdi
movl 0x48(%rsp), %edx
xorl %eax, %eax
callq 0x2210
leaq 0x3e38(%rip), %rdi      # 0x26198
pushq $0x32
popq %rsi
movq %r14, %rdx
movq %r12, %rcx
callq 0x2340
leaq 0x3e56(%rip), %rdi      # 0x261cb
pushq $0x33
popq %rsi
movq %r14, %rdx
movq %r12, %rcx
callq 0x2340
leaq 0x3e75(%rip), %rdi      # 0x261ff
pushq $0x56
popq %rsi
movq %r14, %rdx
movq %r12, %rcx
callq 0x2340
leaq 0x3eb7(%rip), %rdi      # 0x26256
pushq $0x31
popq %rsi
movq %r14, %rdx
movq %r12, %rcx
callq 0x2340
leaq 0x3ed4(%rip), %rdi      # 0x26288
pushq $0xa
popq %rsi
movq %r14, %rdx
movq %r12, %rcx
callq 0x2340
leaq 0x3eca(%rip), %rdi      # 0x26293
pushq $0x1b
popq %rsi
movq %r14, %rdx
movq %r12, %rcx
callq 0x2340
leaq 0x3ed1(%rip), %rdi      # 0x262af
pushq $0x3d
popq %rsi
movq %r14, %rdx
movq %r12, %rcx
callq 0x2340
leaq 0x3efa(%rip), %rdi      # 0x262ed
pushq $0x2b
popq %rsi
movq %r14, %rdx
movq %r12, %rcx
callq 0x2340
leaq 0x3f11(%rip), %rdi      # 0x26319
pushq $0x23
popq %rsi
movq %r14, %rdx
movq %r12, %rcx
callq 0x2340
leaq 0x3f20(%rip), %rdi      # 0x2633d
movq %r15, %rsi
movq %r14, %rdx
movq %r12, %rcx
callq 0x2340
cmpq (%r13), %r12
jmp 0x220bf
movq (%rbp), %rdi
movq 0x38(%rsp), %rax
movq (%rax,%r14,8), %rdx
leaq 0x3f2b(%rip), %rsi      # 0x26373
xorl %eax, %eax
callq 0x2210
jmp 0x220c2
movq (%rbp), %rax
movq %rax, 0x60(%rsp)
callq 0x37fd
leaq 0xc217(%rip), %rbx      # 0x2e680
subsd (%rbx), %xmm0
movsd %xmm0, 0x150(%rsp)
callq 0x3794
movsd %xmm0, 0x148(%rsp)
callq 0x37fd
subsd (%rbx), %xmm0
movsd 0x148(%rsp), %xmm1
divsd %xmm0, %xmm1
movq 0x38(%rsp), %rax
movq (%rax,%r14,8), %rcx
leaq 0x3efa(%rip), %rsi      # 0x263a4
leaq 0x3f22(%rip), %rdx      # 0x263d3
movq 0x60(%rsp), %rdi
movsd 0x150(%rsp), %xmm0
movb $0x2, %al
callq 0x2210
jmp 0x21fe5
movq (%rbp), %rdi
leaq 0x3f02(%rip), %rsi      # 0x263d8
leaq 0x3ef6(%rip), %r14      # 0x263d3
leaq 0x36e9(%rip), %rcx      # 0x25bcd
xorl %r12d, %r12d
movq %r14, %rdx
xorl %eax, %eax
callq 0x2210
movq (%rbp), %rdi
leaq 0x3ef1(%rip), %rsi      # 0x263ed
movq %r14, %rdx
xorl %eax, %eax
callq 0x2210
testl %r15d, %r15d
cmovlel %r12d, %r15d
leaq 0x3ee6(%rip), %r13      # 0x263fa
xorl %r14d, %r14d
movq (%rbp), %r12
cmpq %r14, %r15
je 0x2253b
movq 0x38(%rsp), %rax
movq (%rax,%r14,8), %rdx
movq %r12, %rdi
movq %r13, %rsi
xorl %eax, %eax
callq 0x2210
incq %r14
jmp 0x22517
callq 0x37fd
leaq 0xc139(%rip), %rax      # 0x2e680
subsd (%rax), %xmm0
movsd %xmm0, 0x38(%rsp)
callq 0x3794
movsd %xmm0, 0x48(%rsp)
callq 0x37d7
cvtsi2sd %rax, %xmm2
movsd 0x33d2(%rip), %xmm0     # 0x25940
mulsd %xmm0, %xmm2
mulsd %xmm0, %xmm2
mulsd %xmm0, %xmm2
leaq 0x3e7d(%rip), %rsi      # 0x263fe
leaq 0x3e4b(%rip), %rdx      # 0x263d3
movq %r12, %rdi
movsd 0x38(%rsp), %xmm0
movsd 0x48(%rsp), %xmm1
movb $0x3, %al
callq 0x2210
jmp 0x220bd
movq 0xba4e(%rip), %rax      # 0x2dff8
movq (%rax), %rdi
movslq 0x24(%rsp), %rax
movq 0x38(%rsp), %rcx
movq -0x8(%rcx,%rax,8), %rdx
leaq 0x3576(%rip), %rsi      # 0x25b39
xorl %eax, %eax
callq 0x2210
jmp 0x225e8
movq 0xba25(%rip), %rax      # 0x2dff8
movq (%rax), %rcx
leaq 0x353b(%rip), %rdi      # 0x25b18
pushq $0x20
popq %rsi
pushq $0x1
popq %rdx
callq 0x2340
movb $0x1, %bl
jmp 0x220c2
movq (%rbp), %rcx
leaq 0x35dd(%rip), %rdi      # 0x25bd7
pushq $0x46
popq %rsi
pushq $0x1
popq %rdx
callq 0x2340
jmp 0x21f97
leaq 0x35bc(%rip), %rdi      # 0x25bcd
callq 0x2090
xorl %ebx, %ebx
jmp 0x220c2
movq 0xb9d4(%rip), %rax      # 0x2dff8
movq (%rax), %rdi
leaq 0x356f(%rip), %rsi      # 0x25b9d
movq %rbx, %rdx
jmp 0x225c3
movq (%rbp), %rcx
leaq 0xb42(%rip), %rdi       # 0x23180
pushq $0x24
popq %rsi
pushq $0x1
popq %rdx
callq 0x2340
jmp 0x22666
movq 0xb9a6(%rip), %rax      # 0x2dff8
movq (%rax), %rdi
leaq 0x3500(%rip), %rsi      # 0x25b5c
movq %rbx, %rdx
xorl %eax, %eax
callq 0x2210
pushq $0x1
popq %rdi
callq 0x2330