// File: /workspace/github_c_makefile_star2_O1/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 %rbx
subq $0x48, %rsp
movq %rsi, %rbx
movl %edi, %ebp
xorps %xmm0, %xmm0
movaps %xmm0, (%rsp)
movaps %xmm0, 0x20(%rsp)
movaps %xmm0, 0x30(%rsp)
movq $0x0, 0x40(%rsp)
movabsq $0x98968000000002, %rax # imm = 0x98968000000002
movq %rax, (%rsp)
movabsq $0x3200000028, %rax     # imm = 0x3200000028
movq %rax, 0x8(%rsp)
movaps 0x1001(%rip), %xmm0     # 0x6020
movaps %xmm0, 0x10(%rsp)
movabsq $0x600000002, %rax      # imm = 0x600000002
movq %rax, 0x20(%rsp)
movl $0x8, 0x28(%rsp)
leaq 0x10c3(%rip), %rdx      # 0x6105
callq 0x2210
testl %eax, %eax
js 0x50b4
movq 0x2f86(%rip), %r15      # 0x7fd8
leaq 0x10ac(%rip), %r14      # 0x6105
cmpl $0x6b, %eax
jg 0x5076
cmpl $0x54, %eax
je 0x508d
cmpl $0x62, %eax
jne 0x50a3
movq (%r15), %rdi
callq 0x2220
movl %eax, 0x28(%rsp)
jmp 0x50a3
cmpl $0x6c, %eax
je 0x5097
cmpl $0x74, %eax
jne 0x50a3
movq (%r15), %rdi
callq 0x2220
movl %eax, (%rsp)
jmp 0x50a3
movl $0x1, 0x2c(%rsp)
jmp 0x50a3
movq (%r15), %rdi
callq 0x2220
movl %eax, 0x8(%rsp)
movl %ebp, %edi
movq %rbx, %rsi
movq %r14, %rdx
callq 0x2210
testl %eax, %eax
jns 0x5059
movq 0x2f15(%rip), %rax      # 0x7fd0
movslq (%rax), %rax
cmpl %ebp, %eax
jge 0x520d
movq (%rbx,%rax,8), %rbx
leaq 0x1133(%rip), %rsi      # 0x6204
movq %rbx, %rdi
callq 0x2130
testl %eax, %eax
je 0x50ee
leaq 0x1122(%rip), %rsi      # 0x6206
movq %rbx, %rdi
callq 0x21f0
jmp 0x510b
movq 0x2ed3(%rip), %rax      # 0x7fc8
movq (%rax), %rdi
callq 0x2170
leaq 0x1102(%rip), %rsi      # 0x6206
movl %eax, %edi
callq 0x20a0
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 0x8(%rax), %eax
andl $0x3, %eax
orl $0x10000, %eax          # imm = 0x10000
movl %eax, 0x8(%r14)
movl $0x4000, %edi           # imm = 0x4000
callq 0x21b0
movq %rax, 0x18(%r14)
movq %r14, 0x48(%r15)
movq %rsp, %r14
movq %r15, 0x40(%r14)
movq 0x2ffb(%rip), %rdi      # 0x8160
callq 0x2a4c
movq %rax, 0x30(%r14)
movq 0x2ff3(%rip), %rdi      # 0x8168
callq 0x2a4c
movq %rax, 0x38(%r14)
leaq 0xa1(%rip), %rsi        # 0x5226
movl $0x2, %edi
movq %r14, %rdx
movl $0x3, %ecx
callq 0x25d7
movq 0x38(%r14), %rdi
callq 0x27f0
movq 0x30(%r14), %rdi
callq 0x27f0
movq 0x40(%r14), %r14
testq %r14, %r14
je 0x51f8
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 0x51f0
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 $0x48, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
leaq 0x8(%rsp), %rdx
leaq 0x28(%rsp), %rsi
movq %rsp, %rdi
callq 0x22a0
movl $0x1, %eax
jmp 0x5202