// File: /workspace/github_c_makefile_star2_O2/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 $0x48, %rsp
movq %rsi, %r12
movl %edi, %r13d
xorps %xmm0, %xmm0
movups %xmm0, 0x38(%rsp)
movl $0x989680, 0xc(%rsp)    # imm = 0x989680
movaps 0x155c(%rip), %xmm0     # 0x5040
movups %xmm0, 0x14(%rsp)
movabsq $0x200000003, %rax      # imm = 0x200000003
movq %rax, 0x24(%rsp)
movl $0xa, 0x2c(%rsp)
pushq $0x14
popq %r14
pushq $0x1
popq %r15
pushq $0x28
popq %rbp
movl $0x0, (%rsp)
pushq $0x2
popq %rax
movl %eax, 0x4(%rsp)
leaq 0x15b6(%rip), %rbx      # 0x50d6
movl %r13d, %edi
movq %r12, %rsi
movq %rbx, %rdx
callq 0x2200
testl %eax, %eax
js 0x3ba6
cmpl $0x54, %eax
je 0x3b74
cmpl $0x63, %eax
je 0x3b7c
cmpl $0x6c, %eax
je 0x3b90
cmpl $0x71, %eax
je 0x3b60
cmpl $0x74, %eax
jne 0x3b20
movq 0x3486(%rip), %rax      # 0x6fd8
movq (%rax), %rdi
callq 0x2210
movl %eax, 0x4(%rsp)
jmp 0x3b20
movq 0x3471(%rip), %rax      # 0x6fd8
movq (%rax), %rdi
callq 0x2210
movl %eax, %r14d
jmp 0x3b20
pushq $0x1
popq %rax
movl %eax, (%rsp)
jmp 0x3b20
movq 0x3455(%rip), %rax      # 0x6fd8
movq (%rax), %rdi
callq 0x2210
movl %eax, %r15d
jmp 0x3b20
movq 0x3441(%rip), %rax      # 0x6fd8
movq (%rax), %rdi
callq 0x2210
movl %eax, %ebp
jmp 0x3b20
movl %r14d, 0x38(%rsp)
movl %r15d, 0x34(%rsp)
movl %ebp, 0x10(%rsp)
movl (%rsp), %eax
movl %eax, 0x30(%rsp)
movl 0x4(%rsp), %r9d
movl %r9d, 0x8(%rsp)
movq 0x3404(%rip), %rax      # 0x6fd0
movslq (%rax), %rax
cmpl %r13d, %eax
jge 0x3cdf
movq (%r12,%rax,8), %rdi
cmpb $0x2d, (%rdi)
jne 0x3beb
cmpb $0x0, 0x1(%rdi)
je 0x3cbd
leaq 0x1658(%rip), %rsi      # 0x524a
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 0x8(%rsp), %r14
movq %r15, 0x38(%r14)
leaq 0x146(%rip), %rsi       # 0x3d8d
pushq $0x2
popq %rdi
pushq $0x3
popq %rcx
movq %r14, %rdx
callq 0x2509
movq 0x38(%r14), %r14
testq %r14, %r14
je 0x3ca4
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 0x3c9c
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 %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movq 0x3304(%rip), %rax      # 0x6fc8
movq (%rax), %rdi
callq 0x2160
leaq 0x1577(%rip), %rsi      # 0x524a
movl %eax, %edi
callq 0x20a0
jmp 0x3bf7
movl %r14d, %edx
movl %ebp, %r8d
movq 0x330c(%rip), %r14      # 0x6ff8
movq (%r14), %rcx
leaq 0x13ec(%rip), %rdi      # 0x50e2
pushq $0x42
popq %rsi
movl %edx, %ebp
movl %r8d, %r12d
movl %r9d, %r13d
pushq $0x1
popq %rbx
movq %rbx, %rdx
callq 0x2220
movq (%r14), %rcx
leaq 0x140f(%rip), %rdi      # 0x5125
pushq $0x9
popq %rsi
movq %rbx, %rdx
callq 0x2220
movq (%r14), %rdi
leaq 0x1404(%rip), %rsi      # 0x512f
movl %r13d, %edx
xorl %eax, %eax
callq 0x2140
movq (%r14), %rdi
leaq 0x1415(%rip), %rsi      # 0x5154
movl %r12d, %edx
xorl %eax, %eax
callq 0x2140
movq (%r14), %rdi
leaq 0x1437(%rip), %rsi      # 0x518a
movl %r15d, %edx
xorl %eax, %eax
callq 0x2140
movq (%r14), %rdi
leaq 0x146b(%rip), %rsi      # 0x51d2
movl %ebp, %edx
xorl %eax, %eax
callq 0x2140
movq (%r14), %rcx
leaq 0x14a5(%rip), %rdi      # 0x521f
pushq $0x2a
popq %rsi
movq %rbx, %rdx
callq 0x2220
pushq $0x1
popq %rax
jmp 0x3cae