// File: /workspace/github_c_makefile_star2_O3/lh3[P]fermi-lite/example.c
// Function: main
int main(int argc, char *argv[])
{
	fml_opt_t opt;
	int c, n_seqs, n_utg, gfa_out = 0;
	bseq1_t *seqs;
	fml_utg_t *utg;

	fml_opt_init(&opt);
	while ((c = getopt(argc, argv, "gOAe:l:r:t:c:d:v:")) >= 0) {
		if (c == 'e') opt.ec_k = atoi(optarg);
		else if (c == 'l') opt.min_asm_ovlp = atoi(optarg);
		else if (c == 'r') opt.mag_opt.min_dratio1 = atof(optarg);
		else if (c == 'A') opt.mag_opt.flag |= MAG_F_AGGRESSIVE;
		else if (c == 'O') opt.mag_opt.flag &= ~MAG_F_POPOPEN;
		else if (c == 'd') opt.mag_opt.max_bdiff = atoi(optarg);
		else if (c == 't') opt.n_threads = atoi(optarg);
		else if (c == 'g') gfa_out = 1;
		else if (c == 'v') fm_verbose = atoi(optarg);
		else if (c == 'c') {
			char *p;
			opt.min_cnt = strtol(optarg, &p, 10);
			if (*p == ',') opt.max_cnt = strtol(p + 1, &p, 10);
		}
	}
	if (argc == optind) {
		fprintf(stderr, "Usage: fml-asm [options] <in.fq>\n");
		fprintf(stderr, "Options:\n");
		fprintf(stderr, "  -e INT          k-mer length for error correction (0 for auto; -1 to disable) [%d]\n", opt.ec_k);
		fprintf(stderr, "  -c INT1[,INT2]  range of k-mer & read count thresholds for ec and graph cleaning [%d,%d]\n", opt.min_cnt, opt.max_cnt);
		fprintf(stderr, "  -l INT          min overlap length during initial assembly [%d]\n", opt.min_asm_ovlp);
		fprintf(stderr, "  -r FLOAT        drop an overlap if its length is below maxOvlpLen*FLOAT [%g]\n", opt.mag_opt.min_dratio1);
		fprintf(stderr, "  -t INT          number of threads (don't use multi-threading for small data sets) [%d]\n", opt.n_threads);
		fprintf(stderr, "  -d INT          retain a bubble if one side is longer than the other side by >INT-bp [%d]\n", opt.mag_opt.max_bdiff);
		fprintf(stderr, "  -A              discard heterozygotes (apply this to assemble bacterial genomes; override -O)\n");
		fprintf(stderr, "  -O              don't apply aggressive tip trimming\n");
		fprintf(stderr, "  -g              output the assembly graph in the GFA format\n");
		return 1;
	}
	seqs = bseq_read(argv[optind], &n_seqs);
	utg = fml_assemble(&opt, n_seqs, seqs, &n_utg);
	if (!gfa_out) fml_utg_print(n_utg, utg);
	else fml_utg_print_gfa(n_utg, utg);
	fml_utg_destroy(n_utg, utg);
	return 0;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x68, %rsp
movq %rsi, %rbx
movl %edi, %ebp
leaq 0x18(%rsp), %rdi
callq 0x2734
leaq 0x14ab4(%rip), %rdx     # 0x17054
movl %ebp, %edi
movq %rbx, %rsi
callq 0x2240
testl %eax, %eax
js 0x26b3
xorl %r12d, %r12d
leaq 0x14a98(%rip), %r14     # 0x17054
leaq 0x14a41(%rip), %r13     # 0x17004
movq 0x1aa0e(%rip), %r15     # 0x1cfd8
leal -0x63(%rax), %ecx
cmpl $0x13, %ecx
ja 0x2618
movslq (%r13,%rcx,4), %rax
addq %r13, %rax
jmpq *%rax
movq (%r15), %rdi
leaq 0x8(%rsp), %rsi
movl $0xa, %edx
callq 0x2160
movl %eax, 0x20(%rsp)
movq 0x8(%rsp), %rdi
cmpb $0x2c, (%rdi)
jne 0x2695
incq %rdi
leaq 0x8(%rsp), %rsi
movl $0xa, %edx
callq 0x2160
movl %eax, 0x24(%rsp)
jmp 0x2695
cmpl $0x41, %eax
je 0x2690
cmpl $0x4f, %eax
jne 0x2695
andb $-0x41, 0x30(%rsp)
jmp 0x2695
movq (%r15), %rdi
callq 0x2070
cvtsd2ss %xmm0, %xmm0
movss %xmm0, 0x5c(%rsp)
jmp 0x2695
movq (%r15), %rdi
callq 0x2250
movl %eax, 0x18(%rsp)
jmp 0x2695
movq (%r15), %rdi
callq 0x2250
leaq 0x1ac16(%rip), %rcx     # 0x1d270
movl %eax, (%rcx)
jmp 0x2695
movq (%r15), %rdi
callq 0x2250
movl %eax, 0x48(%rsp)
jmp 0x2695
movq (%r15), %rdi
callq 0x2250
movl %eax, 0x28(%rsp)
jmp 0x2695
movq (%r15), %rdi
callq 0x2250
movl %eax, 0x1c(%rsp)
jmp 0x2695
movl $0x1, %r12d
jmp 0x2695
orb $0x20, 0x30(%rsp)
movl %ebp, %edi
movq %rbx, %rsi
movq %r14, %rdx
callq 0x2240
testl %eax, %eax
jns 0x25ca
testl %r12d, %r12d
sete %r15b
jmp 0x26b6
movb $0x1, %r15b
movq 0x1a913(%rip), %rax     # 0x1cfd0
movslq (%rax), %rax
cmpl %ebp, %eax
je 0x2723
movq (%rbx,%rax,8), %rdi
leaq 0x8(%rsp), %rbx
movq %rbx, %rsi
callq 0x4134
movl (%rbx), %esi
leaq 0x18(%rsp), %rdi
leaq 0x14(%rsp), %r14
movq %rax, %rdx
movq %r14, %rcx
callq 0x402f
movq %rax, %rbx
movl (%r14), %edi
movq %rax, %rsi
testb %r15b, %r15b
je 0x2701
callq 0x2ff5
jmp 0x2706
callq 0x3e90
movl 0x14(%rsp), %edi
movq %rbx, %rsi
callq 0x3fe2
xorl %eax, %eax
addq $0x68, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
leaq 0x18(%rsp), %rdi
callq 0x22c0
movl $0x1, %eax
jmp 0x2714