// File: /workspace/github_c_makefile_star2_O1/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 0xc5245
movq %r15, %rdi
callq 0x101a9a
testb %al, %al
jne 0xc5503
testq %r12, %r12
je 0xc54f9
subl %ebp, %ebx
movslq %ebp, %rax
leaq (%r14,%rax,8), %rsi
movl %ebx, %edi
callq 0xd89fc
leaq 0x8(%rsp), %r14
movq %rax, 0x20(%rsp)
movq %rax, %rdi
movq %r14, %rsi
movq %r15, %rdx
callq 0xd8a72
movl %eax, %ebp
testl %eax, %eax
sete %al
movq (%r14), %rdi
testq %rdi, %rdi
setne %cl
andb %al, %cl
cmpb $0x1, %cl
jne 0xc544d
movq %r15, 0x30(%rsp)
movq $0x0, 0x10(%rsp)
xorl %r13d, %r13d
xorl %ebx, %ebx
xorl %r14d, %r14d
callq 0xd75d2
movq %rax, 0x18(%rsp)
testq %rax, %rax
je 0xc53f7
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 0xc5400
movq 0x28(%r12), %rax
movq %rbx, %r15
incq %r15
cmpq $0x1, %rax
je 0xc52fa
cmpq %rax, %r15
jne 0xc5370
movsd 0x38(%r12), %xmm0
ucomisd 0x289f1f(%rip), %xmm0   # 0x34f228
jne 0xc530d
jnp 0xc531f
callq 0x10af04
movsd 0x38(%r12), %xmm1
ucomisd %xmm0, %xmm1
jb 0xc5370
cmpq $-0x1, 0x20(%r12)
je 0xc533b
movq 0x8(%rsp), %rdi
movq %rbp, %rsi
callq 0xd71ae
cmpq 0x20(%r12), %rax
jb 0xc5370
cmpq $-0x1, 0x10(%r12)
je 0xc5357
movq 0x8(%rsp), %rdi
movq %rbp, %rsi
callq 0xd71ae
cmpq 0x10(%r12), %rax
ja 0xc5370
cmpb $0x1, 0x40(%r12)
jne 0xc5391
movq 0x8(%rsp), %rdi
movq %rbp, %rsi
callq 0xd73e9
testb %al, %al
je 0xc5391
incq %r13
cmpq 0x28(%r12), %r15
movl $0x0, %ebx
cmovneq %r15, %rbx
incq %rbp
cmpq %rbp, 0x18(%rsp)
jne 0xc52c1
jmp 0xc53fb
movq 0x8(%rsp), %rdi
movq %rbp, %rsi
callq 0xd7118
movq %rax, %rbx
movq 0x8(%rsp), %rdi
movq %rbp, %rsi
callq 0xd71c2
movq %rax, 0x10(%rsp)
movq 0x8(%rsp), %rdi
movq %rbp, %rsi
callq 0xd71ae
movq (%r12), %r8
movq 0x30(%r12), %rcx
movq 0x10(%rsp), %rdi
movq %rbx, %rsi
movq %rax, %rdx
callq 0x102ec0
movq %rbx, %rdi
leaq 0x29c20d(%rip), %rsi    # 0x3615f0
movl $0xa3, %edx
callq 0x109670
movq %r14, 0x10(%rsp)
jmp 0xc5373
xorl %ebp, %ebp
jmp 0xc5405
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 0xd6f28
movq 0x20(%rsp), %rdi
leaq 0x8(%rsp), %rsi
movq 0x30(%rsp), %rdx
callq 0xd8a72
movl %eax, %ebp
testl %eax, %eax
sete %al
jne 0xc545c
movq 0x8(%rsp), %rdi
testq %rdi, %rdi
jne 0xc52a7
jmp 0xc545c
xorl %r14d, %r14d
xorl %r13d, %r13d
movq $0x0, 0x10(%rsp)
testb %al, %al
jne 0xc547b
movq 0x20(%rsp), %rdi
callq 0xd8a4a
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 0x3feaf6(%rip), %rax    # 0x4c3f80
movq (%rax), %rdi
cmpq %r14, %rcx
jne 0xc54fe
movq %r13, %xmm1
movq 0x28b441(%rip), %xmm2   # 0x3508e0
punpckldq %xmm2, %xmm1    # xmm1 = xmm1[0],xmm2[0],xmm1[1],xmm2[1]
movapd 0x28b445(%rip), %xmm3   # 0x3508f0
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 0x28d310(%rip), %xmm0   # 0x3527f0
leaq 0x29c32b(%rip), %rsi    # 0x361812
movq %r13, %rdx
movq %r14, %rcx
movb $0x1, %al
callq 0x17ab0
jmp 0xc5460
callq 0x1f239
callq 0x1f20a
callq 0x1f1d1