// File: /workspace/github_c_makefile_star2_O2/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, %r15
movl %edi, %r12d
xorps %xmm0, %xmm0
movups %xmm0, 0x40(%rsp)
andq $0x0, 0x50(%rsp)
movl $0x989680, 0x14(%rsp)   # imm = 0x989680
movaps 0xb57(%rip), %xmm0      # 0x5040
movups %xmm0, 0x1c(%rsp)
movabsq $0x200000003, %rax      # imm = 0x200000003
movq %rax, 0x2c(%rsp)
movl $0x6, 0x34(%rsp)
pushq $0x28
popq %rbp
pushq $0x8
popq %r14
pushq $0x2
popq %rbx
movl $0x0, 0xc(%rsp)
leaq 0xbf7(%rip), %r13       # 0x5115
movl %r12d, %edi
movq %r15, %rsi
movq %r13, %rdx
callq 0x2200
testl %eax, %eax
js 0x4587
cmpl $0x54, %eax
je 0x4557
cmpl $0x62, %eax
je 0x4560
cmpl $0x6c, %eax
je 0x4574
cmpl $0x74, %eax
jne 0x451e
movq 0x2a8d(%rip), %rax      # 0x6fd8
movq (%rax), %rdi
callq 0x2210
movl %eax, %ebx
jmp 0x451e
pushq $0x1
popq %rax
movl %eax, 0xc(%rsp)
jmp 0x451e
movq 0x2a71(%rip), %rax      # 0x6fd8
movq (%rax), %rdi
callq 0x2210
movl %eax, %r14d
jmp 0x451e
movq 0x2a5d(%rip), %rax      # 0x6fd8
movq (%rax), %rdi
callq 0x2210
movl %eax, %ebp
jmp 0x451e
movl 0xc(%rsp), %eax
movl %eax, 0x3c(%rsp)
movl %ebp, 0x18(%rsp)
movl %r14d, 0x38(%rsp)
movl %ebx, 0x10(%rsp)
movq 0x2a2d(%rip), %rax      # 0x6fd0
movslq (%rax), %rax
cmpl %r12d, %eax
jge 0x46e8
movq (%r15,%rax,8), %rdi
cmpb $0x2d, (%rdi)
jne 0x45c2
cmpb $0x0, 0x1(%rdi)
je 0x46c6
leaq 0xc4b(%rip), %rsi       # 0x5214
callq 0x21e0
movq %rax, %rbx
pushq $0x1
popq %r14
pushq $0x50
popq %rsi
movq %r14, %rdi
callq 0x2120
movq %rax, %r15
pushq $0x20
popq %rsi
movq %r14, %rdi
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 0x2b32(%rip), %rdi      # 0x7150
callq 0x2b9f
movq %rax, 0x30(%r14)
movq 0x2b2a(%rip), %rdi      # 0x7158
callq 0x2b9f
movq %rax, 0x38(%r14)
leaq 0x13a(%rip), %rsi       # 0x4778
pushq $0x2
popq %rdi
pushq $0x3
popq %rcx
movq %r14, %rdx
callq 0x2509
movq 0x38(%r14), %rdi
callq 0x2718
movq 0x30(%r14), %rdi
callq 0x2718
movq 0x40(%r14), %r14
testq %r14, %r14
je 0x46ad
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 0x46a5
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 0x28fb(%rip), %rax      # 0x6fc8
movq (%rax), %rdi
callq 0x2160
leaq 0xb38(%rip), %rsi       # 0x5214
movl %eax, %edi
callq 0x20a0
jmp 0x45ce
movl %ebx, %r13d
movq 0x2906(%rip), %rbx      # 0x6ff8
movq (%rbx), %rcx
leaq 0xa21(%rip), %rdi       # 0x511d
pushq $0x44
popq %rsi
pushq $0x1
popq %r15
movq %r15, %rdx
callq 0x2220
movq (%rbx), %rcx
leaq 0xa4d(%rip), %rdi       # 0x5162
pushq $0x9
popq %rsi
movq %r15, %rdx
callq 0x2220
movq (%rbx), %rdi
leaq 0xa42(%rip), %rsi       # 0x516c
movl %r13d, %edx
xorl %eax, %eax
callq 0x2140
movq (%rbx), %rdi
leaq 0xa53(%rip), %rsi       # 0x5191
movl %r14d, %edx
xorl %eax, %eax
callq 0x2140
movq (%rbx), %rdi
leaq 0xa61(%rip), %rsi       # 0x51b3
movl %ebp, %edx
xorl %eax, %eax
callq 0x2140
movq (%rbx), %rcx
leaq 0xa84(%rip), %rdi       # 0x51e9
pushq $0x2a
popq %rsi
movq %r15, %rdx
callq 0x2220
pushq $0x1
popq %rax
jmp 0x46b7