// File: /workspace/github_c_makefile_star2_O2/aokad[P]sequeeze/seqtk.c
// Function: stk_dropse
int stk_dropse(int argc, char *argv[])
{
	gzFile fp;
	kseq_t *seq, last;

	if (argc == 1 && isatty(fileno(stdin))) {
		fprintf(stderr, "Usage: seqtk dropse <in.fq>\n");
		return 1;
	}
	fp = argc > 1 && strcmp(argv[1], "-")? gzopen(argv[1], "r") : gzdopen(fileno(stdin), "r");
	if (fp == 0) {
		fprintf(stderr, "[E::%s] failed to open the input file/stream.\n", __func__);
		return 1;
	}
	seq = kseq_init(fp);

	memset(&last, 0, sizeof(kseq_t));
	while (kseq_read(seq) >= 0) {
		if (last.name.l) {
			kstring_t *p = &last.name, *q = &seq->name;
			int is_diff;
			if (p->l == q->l) {
				int l = (p->l > 2 && p->s[p->l-2] == '/' && q->s[q->l-2] == '/' && isdigit(p->s[p->l-1]) && isdigit(q->s[q->l-1]))? p->l - 2 : p->l;
				is_diff = strncmp(p->s, q->s, l);
			} else is_diff = 1;
			if (!is_diff) {
				stk_printseq(&last, 0);
				stk_printseq(seq, 0);
				last.name.l = 0;
			} else cpy_kseq(&last, seq);
		} else cpy_kseq(&last, seq);
	}

	kseq_destroy(seq);
	gzclose(fp);
	// free last!
	return 0;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x78, %rsp
cmpl $0x1, %edi
jne 0x6e4c
movq 0x71b0(%rip), %rax      # 0xdfc8
movq (%rax), %rdi
callq 0x21b0
movl %eax, %edi
callq 0x2090
testl %eax, %eax
je 0x6e6b
movq 0x71c6(%rip), %rax      # 0xdff8
movq (%rax), %rcx
leaq 0x34b5(%rip), %rdi      # 0xa2f1
pushq $0x1c
popq %rsi
pushq $0x1
popq %rdx
callq 0x2260
jmp 0x6fb0
jle 0x6e6b
movq 0x8(%rsi), %rdi
cmpb $0x2d, (%rdi)
jne 0x6e5d
cmpb $0x0, 0x1(%rdi)
je 0x6e6b
leaq 0x2344(%rip), %rsi      # 0x91a8
callq 0x2220
jmp 0x6e88
movq 0x7156(%rip), %rax      # 0xdfc8
movq (%rax), %rdi
callq 0x21b0
leaq 0x2327(%rip), %rsi      # 0x91a8
movl %eax, %edi
callq 0x20b0
movq %rax, %rbx
testq %rax, %rax
je 0x6f91
movq %rbx, %rdi
callq 0x3102
movq %rax, %r14
xorps %xmm0, %xmm0
movq %rsp, %r15
movaps %xmm0, (%r15)
movaps %xmm0, 0x10(%r15)
movaps %xmm0, 0x20(%r15)
movaps %xmm0, 0x30(%r15)
movaps %xmm0, 0x40(%r15)
movaps %xmm0, 0x50(%r15)
movaps %xmm0, 0x60(%r15)
movq %r14, %rdi
callq 0x312e
testl %eax, %eax
js 0x6f70
movq (%rsp), %rbp
testq %rbp, %rbp
je 0x6f42
cmpq (%r14), %rbp
jne 0x6f42
movq 0x10(%rsp), %r12
cmpq $0x2, %rbp
jbe 0x6f2c
cmpb $0x2f, -0x2(%r12,%rbp)
movq 0x10(%r14), %r13
jne 0x6f30
cmpb $0x2f, -0x2(%r13,%rbp)
jne 0x6f30
callq 0x2290
movq (%rax), %rax
movsbq -0x1(%r12,%rbp), %rcx
testb $0x8, 0x1(%rax,%rcx,2)
je 0x6f30
movsbq -0x1(%r13,%rbp), %rcx
testb $0x8, 0x1(%rax,%rcx,2)
je 0x6f30
addq $-0x2, %rbp
jmp 0x6f30
movq 0x10(%r14), %r13
movslq %ebp, %rdx
movq %r12, %rdi
movq %r13, %rsi
callq 0x2070
testl %eax, %eax
je 0x6f52
movq %r15, %rdi
movq %r14, %rsi
callq 0x5dc4
jmp 0x6ec7
movq %r15, %rdi
xorl %esi, %esi
callq 0x5e07
movq %r14, %rdi
xorl %esi, %esi
callq 0x5e07
andq $0x0, (%rsp)
jmp 0x6ec7
movq %r14, %rdi
callq 0x3329
movq %rbx, %rdi
callq 0x2040
xorl %eax, %eax
addq $0x78, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movq 0x7060(%rip), %rax      # 0xdff8
movq (%rax), %rdi
leaq 0x23ff(%rip), %rsi      # 0x93a1
leaq 0x3365(%rip), %rdx      # 0xa30e
xorl %eax, %eax
callq 0x2190
pushq $0x1
popq %rax
jmp 0x6f82