// File: /workspace/github_c_makefile_star2_O3/lh3[P]pre-pe/pre-meta.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:c:q:")) >= 0) {
		if (c == 't') g.opt.n_threads = atoi(optarg);
		else if (c == 'T') g.opt.tab_out = 1;
		else if (c == 'l') g.opt.min_seq_len = atoi(optarg);
		else if (c == 'c') g.opt.bc_cut = atoi(optarg);
		else if (c == 'q') g.opt.qmask = atoi(optarg);
	}
	if (argc - optind < 1) {
		fprintf(stderr, "Usage: seqtk mergepe <read1.fq> <read2.fq> | pre-meta [options] -\n");
		fprintf(stderr, "Options:\n");
		fprintf(stderr, "  -t INT     number of threads [%d]\n", g.opt.n_threads);
		fprintf(stderr, "  -l INT     min read/fragment length to output [%d]\n", g.opt.min_seq_len);
		fprintf(stderr, "  -c INT     cut INT-bp from the 5'-end to derive concatenated BC [%d]\n", g.opt.bc_cut);
		fprintf(stderr, "  -q INT     if both qualities on an overlap base above INT, mask to N [%d]\n", g.opt.qmask);
		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);

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

	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)
movl $0x989680, 0x1c(%rsp)   # imm = 0x989680
movaps 0xd65(%rip), %xmm0      # 0x5060
movups %xmm0, 0x24(%rsp)
movabsq $0x200000003, %rax      # imm = 0x200000003
movq %rax, 0x34(%rsp)
movl $0xa, 0x3c(%rsp)
leaq 0xdd8(%rip), %rdx       # 0x50f6
callq 0x2200
testl %eax, %eax
js 0x43d0
movl $0x2, 0x10(%rsp)
movl $0x0, 0xc(%rsp)
movl $0x28, 0x14(%rsp)
movl $0x1, %r15d
movl $0x14, %r13d
movq 0x2c82(%rip), %r12      # 0x6fd8
leaq 0xd99(%rip), %r14       # 0x50f6
cmpl $0x6b, %eax
jle 0x4380
cmpl $0x6c, %eax
je 0x4398
cmpl $0x71, %eax
je 0x43a7
cmpl $0x74, %eax
jne 0x43bd
movq (%r12), %rdi
callq 0x2210
movl %eax, 0x10(%rsp)
jmp 0x43bd
cmpl $0x54, %eax
je 0x43b5
cmpl $0x63, %eax
jne 0x43bd
movq (%r12), %rdi
callq 0x2210
movl %eax, %r15d
jmp 0x43bd
movq (%r12), %rdi
callq 0x2210
movl %eax, 0x14(%rsp)
jmp 0x43bd
movq (%r12), %rdi
callq 0x2210
movl %eax, %r13d
jmp 0x43bd
movl $0x1, 0xc(%rsp)
movl %ebp, %edi
movq %rbx, %rsi
movq %r14, %rdx
callq 0x2200
testl %eax, %eax
jns 0x435d
jmp 0x43f4
movl $0x14, %r13d
movl $0x1, %r15d
movl $0x28, 0x14(%rsp)
movl $0x0, 0xc(%rsp)
movl $0x2, 0x10(%rsp)
movl %r13d, 0x48(%rsp)
movl %r15d, 0x44(%rsp)
movl 0x14(%rsp), %esi
movl %esi, 0x20(%rsp)
movl 0xc(%rsp), %eax
movl %eax, 0x40(%rsp)
movl 0x10(%rsp), %edi
movl %edi, 0x18(%rsp)
movq 0x2bb3(%rip), %rax      # 0x6fd0
movslq (%rax), %rax
cmpl %ebp, %eax
jge 0x4537
movq (%rbx,%rax,8), %rdi
cmpb $0x2d, (%rdi)
jne 0x443b
cmpb $0x0, 0x1(%rdi)
je 0x4515
leaq 0xe28(%rip), %rsi       # 0x526a
callq 0x21e0
movq %rax, %rbx
movl $0x1, %edi
movl $0x50, %esi
callq 0x2120
movq %rax, %r14
movl $0x1, %edi
movl $0x20, %esi
callq 0x2120
movq %rax, %r15
movq %rbx, 0x10(%rax)
movl $0x10000, 0x8(%rax)     # imm = 0x10000
movl $0x4000, %edi           # imm = 0x4000
callq 0x21a0
movq %rax, 0x18(%r15)
movq %r15, 0x48(%r14)
leaq 0x18(%rsp), %r15
movq %r14, 0x38(%r15)
leaq 0xae(%rip), %rsi        # 0x4549
movl $0x2, %edi
movq %r15, %rdx
movl $0x3, %ecx
callq 0x25f0
movq 0x38(%r15), %r14
testq %r14, %r14
je 0x44fc
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 0x44f4
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 0x2aac(%rip), %rax      # 0x6fc8
movq (%rax), %rdi
callq 0x2160
leaq 0xd3f(%rip), %rsi       # 0x526a
movl %eax, %edi
callq 0x20a0
jmp 0x4447
movl %r15d, %edx
movl %r13d, %ecx
callq 0x2290
movl $0x1, %eax
jmp 0x4506