// File: /workspace/github_c_makefile_star2_O0/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
movq %rsp, %rbp
subq $0xc0, %rsp
movl %edi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
cmpl $0x1, -0x8(%rbp)
jne 0x8fc7
movq 0x8039(%rip), %rax      # 0x10fc8
movq (%rax), %rdi
callq 0x21b0
movl %eax, %edi
callq 0x2090
cmpl $0x0, %eax
je 0x8fc7
movq 0x804e(%rip), %rax      # 0x10ff8
movq (%rax), %rdi
leaq 0x5415(%rip), %rsi      # 0xe3c9
movb $0x0, %al
callq 0x2190
movl $0x1, -0x4(%rbp)
jmp 0x9278
cmpl $0x1, -0x8(%rbp)
jle 0x9003
movq -0x10(%rbp), %rax
movq 0x8(%rax), %rdi
leaq 0x54ba(%rip), %rsi      # 0xe496
callq 0x2170
cmpl $0x0, %eax
je 0x9003
movq -0x10(%rbp), %rax
movq 0x8(%rax), %rdi
leaq 0x428b(%rip), %rsi      # 0xd280
callq 0x2220
movq %rax, -0xb0(%rbp)
jmp 0x9027
movq 0x7fbe(%rip), %rax      # 0x10fc8
movq (%rax), %rdi
callq 0x21b0
movl %eax, %edi
leaq 0x4265(%rip), %rsi      # 0xd280
callq 0x20b0
movq %rax, -0xb0(%rbp)
movq -0xb0(%rbp), %rax
movq %rax, -0x18(%rbp)
cmpq $0x0, -0x18(%rbp)
jne 0x9064
movq 0x7fb8(%rip), %rax      # 0x10ff8
movq (%rax), %rdi
leaq 0x442f(%rip), %rsi      # 0xd479
leaq 0x5395(%rip), %rdx      # 0xe3e6
movb $0x0, %al
callq 0x2190
movl $0x1, -0x4(%rbp)
jmp 0x9278
movq -0x18(%rbp), %rdi
callq 0x38f0
movq %rax, -0x20(%rbp)
leaq -0x90(%rbp), %rdi
xorl %esi, %esi
movl $0x70, %edx
callq 0x2120
movq -0x20(%rbp), %rdi
callq 0x3930
cmpl $0x0, %eax
jl 0x925f
cmpq $0x0, -0x90(%rbp)
je 0x924a
leaq -0x90(%rbp), %rax
movq %rax, -0x98(%rbp)
movq -0x20(%rbp), %rax
movq %rax, -0xa0(%rbp)
movq -0x98(%rbp), %rax
movq (%rax), %rax
movq -0xa0(%rbp), %rcx
cmpq (%rcx), %rax
jne 0x91ff
movq -0x98(%rbp), %rax
cmpq $0x2, (%rax)
jbe 0x91b7
movq -0x98(%rbp), %rax
movq 0x10(%rax), %rax
movq -0x98(%rbp), %rcx
movq (%rcx), %rcx
subq $0x2, %rcx
movsbl (%rax,%rcx), %eax
cmpl $0x2f, %eax
jne 0x91b7
movq -0xa0(%rbp), %rax
movq 0x10(%rax), %rax
movq -0xa0(%rbp), %rcx
movq (%rcx), %rcx
subq $0x2, %rcx
movsbl (%rax,%rcx), %eax
cmpl $0x2f, %eax
jne 0x91b7
callq 0x2280
movq (%rax), %rax
movq -0x98(%rbp), %rcx
movq 0x10(%rcx), %rcx
movq -0x98(%rbp), %rdx
movq (%rdx), %rdx
subq $0x1, %rdx
movsbl (%rcx,%rdx), %ecx
movslq %ecx, %rcx
movzwl (%rax,%rcx,2), %eax
andl $0x800, %eax            # imm = 0x800
cmpl $0x0, %eax
je 0x91b7
callq 0x2280
movq (%rax), %rax
movq -0xa0(%rbp), %rcx
movq 0x10(%rcx), %rcx
movq -0xa0(%rbp), %rdx
movq (%rdx), %rdx
subq $0x1, %rdx
movsbl (%rcx,%rdx), %ecx
movslq %ecx, %rcx
movzwl (%rax,%rcx,2), %eax
andl $0x800, %eax            # imm = 0x800
cmpl $0x0, %eax
je 0x91b7
movq -0x98(%rbp), %rax
movq (%rax), %rax
subq $0x2, %rax
movq %rax, -0xb8(%rbp)
jmp 0x91c8
movq -0x98(%rbp), %rax
movq (%rax), %rax
movq %rax, -0xb8(%rbp)
movq -0xb8(%rbp), %rax
movl %eax, -0xa8(%rbp)
movq -0x98(%rbp), %rax
movq 0x10(%rax), %rdi
movq -0xa0(%rbp), %rax
movq 0x10(%rax), %rsi
movslq -0xa8(%rbp), %rdx
callq 0x2060
movl %eax, -0xa4(%rbp)
jmp 0x9209
movl $0x1, -0xa4(%rbp)
cmpl $0x0, -0xa4(%rbp)
jne 0x9238
leaq -0x90(%rbp), %rdi
xorl %esi, %esi
callq 0x7440
movq -0x20(%rbp), %rdi
xorl %esi, %esi
callq 0x7440
movq $0x0, -0x90(%rbp)
jmp 0x9248
movq -0x20(%rbp), %rsi
leaq -0x90(%rbp), %rdi
callq 0x73d0
jmp 0x925a
movq -0x20(%rbp), %rsi
leaq -0x90(%rbp), %rdi
callq 0x73d0
jmp 0x9084
movq -0x20(%rbp), %rdi
callq 0x3d40
movq -0x18(%rbp), %rdi
callq 0x2030
movl $0x0, -0x4(%rbp)
movl -0x4(%rbp), %eax
addq $0xc0, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)