// File: /workspace/github_c_makefile_star2_O3/genometools[P]genometools/src/tools/gt_seqfilter.c
// Function: gt_seqfilter_runner
static int gt_seqfilter_runner(int argc, const char **argv, int parsed_args,
                               void *tool_arguments, GtError *err)
{
  SeqFilterArguments *arguments = tool_arguments;
  GtBioseqIterator *bsi;
  GtBioseq *bioseq;
  GtUint64 passed = 0, filtered = 0, num_of_sequences = 0, steps = 0;
  int had_err = 0;

  gt_error_check(err);
  gt_assert(tool_arguments);

  bsi = gt_bioseq_iterator_new(argc - parsed_args, argv + parsed_args);

  while (!(had_err = gt_bioseq_iterator_next(bsi, &bioseq, err)) &&
         bioseq != NULL) {
    GtUword i;
    GtUint64 current_num = gt_bioseq_number_of_sequences(bioseq);
    for (i = 0;
         i < current_num &&
         (arguments->maxseqnum == GT_UNDEF_UWORD ||
          passed + 1 <= arguments->maxseqnum);
         i++) {
      char *seq;
      if ((arguments->step == 1 ||
           steps + 1 == arguments->step) &&
          (arguments->sample_prob == 1.0 ||
           gt_rand_0_to_1() <= arguments->sample_prob) &&
          (arguments->minlength == GT_UNDEF_UWORD ||
           gt_bioseq_get_sequence_length(bioseq, i) >= arguments->minlength) &&
          (arguments->maxlength == GT_UNDEF_UWORD ||
           gt_bioseq_get_sequence_length(bioseq, i) <= arguments->maxlength) &&
          (!arguments->nowildcards ||
           !gt_bioseq_seq_has_wildcards(bioseq, i))) {
        seq = gt_bioseq_get_sequence(bioseq, i);
        gt_fasta_show_entry(gt_bioseq_get_description(bioseq, i),
                            seq,
                            gt_bioseq_get_sequence_length(bioseq, i),
                            arguments->width, arguments->outfp);
        gt_free(seq);
        passed++;
      }
      else {
        filtered++;
      }
      steps = (steps + 1 == arguments->step) ? 0 : steps + 1;
    }
    filtered += current_num - i;
    num_of_sequences += current_num;
    gt_bioseq_delete(bioseq);
  }

  /* show statistics */
  if (!had_err) {
    gt_assert(passed + filtered == num_of_sequences);
    fprintf(stderr, "# " GT_LLU " out of " GT_LLU
            " sequences have been removed (%.3f%%)\n",
            filtered, num_of_sequences,
            ((double) filtered / num_of_sequences) * 100.0);
  }

  gt_bioseq_iterator_delete(bsi);

  return had_err;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x38, %rsp
movq %r8, %r15
movq %rcx, %r12
movl %edx, %ebp
movq %rsi, %r14
movl %edi, %ebx
testq %r8, %r8
je 0xc312d
movq %r15, %rdi
callq 0xfcc32
testb %al, %al
jne 0xc33eb
testq %r12, %r12
je 0xc33e1
subl %ebp, %ebx
movslq %ebp, %rax
leaq (%r14,%rax,8), %rsi
movl %ebx, %edi
callq 0xd63a0
leaq 0x8(%rsp), %r14
movq %rax, 0x20(%rsp)
movq %rax, %rdi
movq %r14, %rsi
movq %r15, %rdx
callq 0xd6416
movl %eax, %ebp
testl %eax, %eax
sete %al
movq (%r14), %rdi
testq %rdi, %rdi
setne %cl
andb %al, %cl
cmpb $0x1, %cl
jne 0xc3335
movq %r15, 0x30(%rsp)
movq $0x0, 0x10(%rsp)
xorl %r13d, %r13d
xorl %ebx, %ebx
xorl %r14d, %r14d
callq 0xd4fc8
movq %rax, 0x18(%rsp)
testq %rax, %rax
je 0xc32df
movq %r14, 0x28(%rsp)
xorl %ebp, %ebp
movq 0x18(%r12), %rax
cmpq $-0x1, %rax
setne %cl
movq 0x10(%rsp), %rdx
leaq 0x1(%rdx), %r14
cmpq %rax, %r14
seta %al
testb %al, %cl
jne 0xc32e8
movq 0x28(%r12), %rax
movq %rbx, %r15
incq %r15
cmpq $0x1, %rax
je 0xc31e2
cmpq %rax, %r15
jne 0xc3258
movsd 0x38(%r12), %xmm0
ucomisd 0x283037(%rip), %xmm0   # 0x346228
jne 0xc31f5
jnp 0xc3207
callq 0x105e4d
movsd 0x38(%r12), %xmm1
ucomisd %xmm0, %xmm1
jb 0xc3258
cmpq $-0x1, 0x20(%r12)
je 0xc3223
movq 0x8(%rsp), %rdi
movq %rbp, %rsi
callq 0xd4ba3
cmpq 0x20(%r12), %rax
jb 0xc3258
cmpq $-0x1, 0x10(%r12)
je 0xc323f
movq 0x8(%rsp), %rdi
movq %rbp, %rsi
callq 0xd4ba3
cmpq 0x10(%r12), %rax
ja 0xc3258
cmpb $0x1, 0x40(%r12)
jne 0xc3279
movq 0x8(%rsp), %rdi
movq %rbp, %rsi
callq 0xd4dde
testb %al, %al
je 0xc3279
incq %r13
cmpq 0x28(%r12), %r15
movl $0x0, %ebx
cmovneq %r15, %rbx
incq %rbp
cmpq %rbp, 0x18(%rsp)
jne 0xc31a9
jmp 0xc32e3
movq 0x8(%rsp), %rdi
movq %rbp, %rsi
callq 0xd4b0d
movq %rax, %rbx
movq 0x8(%rsp), %rdi
movq %rbp, %rsi
callq 0xd4bb7
movq %rax, 0x10(%rsp)
movq 0x8(%rsp), %rdi
movq %rbp, %rsi
callq 0xd4ba3
movq (%r12), %r8
movq 0x30(%r12), %rcx
movq 0x10(%rsp), %rdi
movq %rbx, %rsi
movq %rax, %rdx
callq 0xfe000
movq %rbx, %rdi
leaq 0x2952d2(%rip), %rsi    # 0x35859d
movl $0xa3, %edx
callq 0x1045eb
movq %r14, 0x10(%rsp)
jmp 0xc325b
xorl %ebp, %ebp
jmp 0xc32ed
movq 0x18(%rsp), %rbp
movq 0x28(%rsp), %r14
movq %r13, %rax
movq 0x18(%rsp), %r13
addq %r13, %r14
subq %rbp, %r13
addq %rax, %r13
movq 0x8(%rsp), %rdi
callq 0xd491d
movq 0x20(%rsp), %rdi
leaq 0x8(%rsp), %rsi
movq 0x30(%rsp), %rdx
callq 0xd6416
movl %eax, %ebp
testl %eax, %eax
sete %al
jne 0xc3344
movq 0x8(%rsp), %rdi
testq %rdi, %rdi
jne 0xc318f
jmp 0xc3344
xorl %r14d, %r14d
xorl %r13d, %r13d
movq $0x0, 0x10(%rsp)
testb %al, %al
jne 0xc3363
movq 0x20(%rsp), %rdi
callq 0xd63ee
movl %ebp, %eax
addq $0x38, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movq 0x10(%rsp), %rcx
addq %r13, %rcx
movq 0x3f5c0e(%rip), %rax    # 0x4b8f80
movq (%rax), %rdi
cmpq %r14, %rcx
jne 0xc33e6
movq %r13, %xmm1
movq 0x284559(%rip), %xmm2   # 0x3478e0
punpckldq %xmm2, %xmm1    # xmm1 = xmm1[0],xmm2[0],xmm1[1],xmm2[1]
movapd 0x28455d(%rip), %xmm3   # 0x3478f0
subpd %xmm3, %xmm1
movapd %xmm1, %xmm0
unpckhpd %xmm1, %xmm0            # xmm0 = xmm0[1],xmm1[1]
addsd %xmm1, %xmm0
movq %r14, %xmm1
punpckldq %xmm2, %xmm1    # xmm1 = xmm1[0],xmm2[0],xmm1[1],xmm2[1]
subpd %xmm3, %xmm1
movapd %xmm1, %xmm2
unpckhpd %xmm1, %xmm2            # xmm2 = xmm2[1],xmm1[1]
addsd %xmm1, %xmm2
divsd %xmm2, %xmm0
mulsd 0x286418(%rip), %xmm0   # 0x3497e0
leaq 0x2953f0(%rip), %rsi    # 0x3587bf
movq %r13, %rdx
movq %r14, %rcx
movb $0x1, %al
callq 0x17ab0
jmp 0xc3348
callq 0x1eeaf
callq 0x1ee80
callq 0x1ee47