// File: /workspace/github_c_makefile_star2_O2/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 0x2668
xorl %ecx, %ecx
leaq 0x11c82(%rip), %r14     # 0x14054
pushq $0x1
popq %r15
leaq 0x11c27(%rip), %r12     # 0x14004
movl %ecx, %r13d
movl %ebp, %edi
movq %rbx, %rsi
movq %r14, %rdx
callq 0x2240
testl %eax, %eax
js 0x24fc
leal -0x63(%rax), %ecx
cmpl $0x13, %ecx
ja 0x244b
movslq (%r12,%rcx,4), %rax
addq %r12, %rax
movl %r15d, %ecx
jmpq *%rax
movq 0x18bc8(%rip), %rax     # 0x1afd8
movq (%rax), %rdi
leaq 0x8(%rsp), %rsi
pushq $0xa
popq %rdx
callq 0x2160
movl %eax, 0x20(%rsp)
movq 0x8(%rsp), %rdi
cmpb $0x2c, (%rdi)
jne 0x24f4
incq %rdi
leaq 0x8(%rsp), %rsi
pushq $0xa
popq %rdx
callq 0x2160
movl %eax, 0x24(%rsp)
jmp 0x24f4
cmpl $0x41, %eax
je 0x24ef
movl %r13d, %ecx
cmpl $0x4f, %eax
jne 0x23dd
andb $-0x41, 0x30(%rsp)
jmp 0x24f4
movq 0x18b6b(%rip), %rax     # 0x1afd8
movq (%rax), %rdi
callq 0x2250
movl %eax, 0x18(%rsp)
jmp 0x24f4
movq 0x18b56(%rip), %rax     # 0x1afd8
movq (%rax), %rdi
callq 0x2250
leaq 0x18ddf(%rip), %rcx     # 0x1b270
movl %eax, (%rcx)
jmp 0x24f4
movq 0x18b3c(%rip), %rax     # 0x1afd8
movq (%rax), %rdi
callq 0x2250
movl %eax, 0x48(%rsp)
jmp 0x24f4
movq 0x18b27(%rip), %rax     # 0x1afd8
movq (%rax), %rdi
callq 0x2070
cvtsd2ss %xmm0, %xmm0
movss %xmm0, 0x5c(%rsp)
jmp 0x24f4
movq 0x18b0c(%rip), %rax     # 0x1afd8
movq (%rax), %rdi
callq 0x2250
movl %eax, 0x1c(%rsp)
jmp 0x24f4
movq 0x18af7(%rip), %rax     # 0x1afd8
movq (%rax), %rdi
callq 0x2250
movl %eax, 0x28(%rsp)
jmp 0x24f4
orb $0x20, 0x30(%rsp)
movl %r13d, %ecx
jmp 0x23dd
movq 0x18acd(%rip), %rax     # 0x1afd0
movslq (%rax), %rax
cmpl %ebp, %eax
je 0x2569
movq (%rbx,%rax,8), %rdi
leaq 0x8(%rsp), %rbx
movq %rbx, %rsi
callq 0x33f4
movl (%rbx), %esi
leaq 0x18(%rsp), %rdi
leaq 0x14(%rsp), %r14
movq %rax, %rdx
movq %r14, %rcx
callq 0x3300
movq %rax, %rbx
movl (%r14), %edi
movq %rax, %rsi
testl %r13d, %r13d
je 0x2547
callq 0x317e
jmp 0x254c
callq 0x2e01
movl 0x14(%rsp), %edi
movq %rbx, %rsi
callq 0x32b5
xorl %eax, %eax
addq $0x68, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movq 0x18a88(%rip), %r14     # 0x1aff8
movq (%r14), %rcx
leaq 0x11aec(%rip), %rdi     # 0x14066
pushq $0x21
popq %rsi
pushq $0x1
popq %rbx
movq %rbx, %rdx
callq 0x2260
movq (%r14), %rcx
leaq 0x11af6(%rip), %rdi     # 0x14088
pushq $0x9
popq %rsi
movq %rbx, %rdx
callq 0x2260
movq (%r14), %rdi
movl 0x1c(%rsp), %edx
leaq 0x11ae7(%rip), %rsi     # 0x14092
xorl %eax, %eax
callq 0x2150
movq (%r14), %rdi
movl 0x20(%rsp), %edx
movl 0x24(%rsp), %ecx
leaq 0x11b24(%rip), %rsi     # 0x140e8
xorl %eax, %eax
callq 0x2150
movq (%r14), %rdi
movl 0x28(%rsp), %edx
leaq 0x11b6b(%rip), %rsi     # 0x14144
xorl %eax, %eax
callq 0x2150
movq (%r14), %rdi
cvtss2sd 0x5c(%rsp), %xmm0
leaq 0x11b97(%rip), %rsi     # 0x14187
movb $0x1, %al
callq 0x2150
movq (%r14), %rdi
movl 0x18(%rsp), %edx
leaq 0x11bd2(%rip), %rsi     # 0x141d7
xorl %eax, %eax
callq 0x2150
movq (%r14), %rdi
movl 0x48(%rsp), %edx
leaq 0x11c17(%rip), %rsi     # 0x14231
xorl %eax, %eax
callq 0x2150
movq (%r14), %rcx
leaq 0x11c63(%rip), %rdi     # 0x1428e
pushq $0x60
popq %rsi
movq %rbx, %rdx
callq 0x2260
movq (%r14), %rcx
leaq 0x11caf(%rip), %rdi     # 0x142ef
pushq $0x36
popq %rsi
movq %rbx, %rdx
callq 0x2260
movq (%r14), %rcx
leaq 0x11cd1(%rip), %rdi     # 0x14326
pushq $0x3e
popq %rsi
movq %rbx, %rdx
callq 0x2260
pushq $0x1
popq %rax
jmp 0x255a