// File: /workspace/github_c_makefile_star2_O3/lh3[P]pre-pe/pre-lianti.c
// Function: main
int main(int argc, char *argv[])
{
	int c;
	lt_global_t g;
	gzFile fp;

	lt_global_init(&g);
	while ((c = getopt(argc, argv, "Tt:b:l:")) >= 0) {
		if (c == 't') g.opt.n_threads = atoi(optarg);
		else if (c == 'T') g.opt.tab_out = 1;
		else if (c == 'b') g.opt.bc_len = atoi(optarg);
		else if (c == 'l') g.opt.min_seq_len = atoi(optarg);
	}
	if (argc - optind < 1) {
		fprintf(stderr, "Usage: seqtk mergepe <read1.fq> <read2.fq> | pre-lianti [options] -\n");
		fprintf(stderr, "Options:\n");
		fprintf(stderr, "  -t INT     number of threads [%d]\n", g.opt.n_threads);
		fprintf(stderr, "  -b INT     barcode length [%d]\n", g.opt.bc_len);
		fprintf(stderr, "  -l INT     min read/fragment length to output [%d]\n", g.opt.min_seq_len);
		fprintf(stderr, "  -T         tabular output for debugging\n");
		return 1;
	}

	fp = strcmp(argv[optind], "-")? gzopen(argv[optind], "r") : gzdopen(fileno(stdin), "r");
	g.ks = kseq_init(fp);
	g.sc_bind = lt_sc_gen(lt_bind);
	g.sc_prom = lt_sc_gen(lt_promoter);

	kt_pipeline(2, worker_pipeline, &g, 3);

	lt_sc_destroy(g.sc_prom);
	lt_sc_destroy(g.sc_bind);
	kseq_destroy(g.ks);
	gzclose(fp);
	return 0;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x58, %rsp
movq %rsi, %rbx
movl %edi, %ebp
xorps %xmm0, %xmm0
movups %xmm0, 0x48(%rsp)
movups %xmm0, 0x38(%rsp)
movl $0x989680, 0x14(%rsp)   # imm = 0x989680
movaps 0xc5a(%rip), %xmm0      # 0x6060
movups %xmm0, 0x1c(%rsp)
movabsq $0x200000003, %rax      # imm = 0x200000003
movq %rax, 0x2c(%rsp)
movl $0x6, 0x34(%rsp)
leaq 0xd0c(%rip), %rdx       # 0x6135
callq 0x2200
testl %eax, %eax
js 0x54c8
movl $0x2, 0xc(%rsp)
movl $0x8, %r12d
movl $0x28, %r14d
movl $0x0, 0x8(%rsp)
movq 0x2b7f(%rip), %r15      # 0x7fd8
leaq 0xcd5(%rip), %r13       # 0x6135
cmpl $0x6b, %eax
jg 0x547c
cmpl $0x54, %eax
je 0x5494
cmpl $0x62, %eax
jne 0x54a9
movq (%r15), %rdi
callq 0x2210
movl %eax, %r12d
jmp 0x54a9
cmpl $0x6c, %eax
je 0x549e
cmpl $0x74, %eax
jne 0x54a9
movq (%r15), %rdi
callq 0x2210
movl %eax, 0xc(%rsp)
jmp 0x54a9
movl $0x1, 0x8(%rsp)
jmp 0x54a9
movq (%r15), %rdi
callq 0x2210
movl %eax, %r14d
movl %ebp, %edi
movq %rbx, %rsi
movq %r13, %rdx
callq 0x2200
testl %eax, %eax
jns 0x5460
movl 0x8(%rsp), %eax
movl %eax, 0x3c(%rsp)
movl 0xc(%rsp), %edi
jmp 0x54d9
movl $0x28, %r14d
movl $0x8, %r12d
movl $0x2, %edi
movl %r14d, 0x18(%rsp)
movl %r12d, 0x38(%rsp)
movl %edi, 0x10(%rsp)
movq 0x2ae2(%rip), %rax      # 0x7fd0
movslq (%rax), %rax
cmpl %ebp, %eax
jge 0x563a
movq (%rbx,%rax,8), %rdi
cmpb $0x2d, (%rdi)
jne 0x550c
cmpb $0x0, 0x1(%rdi)
je 0x5618
leaq 0xd21(%rip), %rsi       # 0x6234
callq 0x21e0
movq %rax, %rbx
movl $0x1, %edi
movl $0x50, %esi
callq 0x2120
movq %rax, %r15
movl $0x1, %edi
movl $0x20, %esi
callq 0x2120
movq %rax, %r14
movq %rbx, 0x10(%rax)
movl $0x10000, 0x8(%rax)     # imm = 0x10000
movl $0x4000, %edi           # imm = 0x4000
callq 0x21a0
movq %rax, 0x18(%r14)
movq %r14, 0x48(%r15)
leaq 0x10(%rsp), %r14
movq %r15, 0x40(%r14)
movq 0x2be4(%rip), %rdi      # 0x8150
callq 0x2c67
movq %rax, 0x30(%r14)
movq 0x2bdc(%rip), %rdi      # 0x8158
callq 0x2c67
movq %rax, 0x38(%r14)
leaq 0xc0(%rip), %rsi        # 0x564c
movl $0x2, %edi
movq %r14, %rdx
movl $0x3, %ecx
callq 0x25d0
movq 0x38(%r14), %rdi
callq 0x27e8
movq 0x30(%r14), %rdi
callq 0x27e8
movq 0x40(%r14), %r14
testq %r14, %r14
je 0x55ff
movq 0x8(%r14), %rdi
callq 0x2050
movq 0x18(%r14), %rdi
callq 0x2050
movq 0x28(%r14), %rdi
callq 0x2050
movq 0x38(%r14), %rdi
callq 0x2050
movq 0x48(%r14), %r15
testq %r15, %r15
je 0x55f7
movq 0x18(%r15), %rdi
callq 0x2050
movq %r15, %rdi
callq 0x2050
movq %r14, %rdi
callq 0x2050
movq %rbx, %rdi
callq 0x2040
xorl %eax, %eax
addq $0x58, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movq 0x29a9(%rip), %rax      # 0x7fc8
movq (%rax), %rdi
callq 0x2160
leaq 0xc06(%rip), %rsi       # 0x6234
movl %eax, %edi
callq 0x20a0
jmp 0x5518
movl %r12d, %esi
movl %r14d, %edx
callq 0x2290
movl $0x1, %eax
jmp 0x5609