// File: /workspace/github_c_makefile_star2_O2/genometools[P]genometools/src/tools/gt_sequniq.c
// Function: gt_sequniq_runner
static int gt_sequniq_runner(int argc, const char **argv, int parsed_args,
                             void *tool_arguments, GtError *err)
{
  GtSequniqArguments *arguments = tool_arguments;
  GtUint64 duplicates = 0, num_of_sequences = 0;
  int i, had_err = 0;
  GtMD5Set *md5set;

  gt_error_check(err);
  gt_assert(arguments);
  md5set = gt_md5set_new(arguments->nofseqs);
  if (!arguments->seqit) {
    GtUword j;
    GtBioseq *bs;

    for (i = parsed_args; !had_err && i < argc; i++) {
      if (!(bs = gt_bioseq_new(argv[i], err)))
        had_err = -1;
      if (!had_err) {
        GtMD5SetStatus retval;
        for (j = 0; j < gt_bioseq_number_of_sequences(bs) && !had_err; j++) {
          char *seq = gt_bioseq_get_sequence(bs, j);
          retval = gt_md5set_add_sequence(md5set, seq,
                                          gt_bioseq_get_sequence_length(bs, j),
                                          arguments->rev, err);
          if (retval == GT_MD5SET_NOT_FOUND)
            gt_fasta_show_entry(gt_bioseq_get_description(bs, j), seq,
                                gt_bioseq_get_sequence_length(bs, j),
                                arguments->width, arguments->outfp);
          else if (retval != GT_MD5SET_ERROR)
            duplicates++;
          else
            had_err = -1;
          num_of_sequences++;
          gt_free(seq);
        }
        gt_bioseq_delete(bs);
      }
    }
  }
  else {
    GtSeqIterator *seqit;
    GtStrArray *files;
    off_t totalsize;
    const GtUchar *sequence;
    char *desc;
    GtUword len;

    files = gt_str_array_new();
    for (i = parsed_args; i < argc; i++)
      gt_str_array_add_cstr(files, argv[i]);
    totalsize = gt_files_estimate_total_size(files);
    seqit = gt_seq_iterator_sequence_buffer_new(files, err);
    if (!seqit)
      had_err = -1;
    if (!had_err) {
      if (arguments->verbose) {
        gt_progressbar_start(gt_seq_iterator_getcurrentcounter(seqit,
                                                          (GtUint64) totalsize),
                             (GtUint64) totalsize);
      }
      while (!had_err) {
        GtMD5SetStatus retval;
        if ((gt_seq_iterator_next(seqit, &sequence, &len, &desc, err)) != 1)
          break;

        retval = gt_md5set_add_sequence(md5set, (const char*) sequence, len,
                                        arguments->rev, err);
        if (retval == GT_MD5SET_NOT_FOUND)
          gt_fasta_show_entry(desc, (const char*) sequence, len,
                              arguments->width, arguments->outfp);
        else if (retval != GT_MD5SET_ERROR)
          duplicates++;
        else
          had_err = -1;
        num_of_sequences++;
      }
      if (arguments->verbose)
        gt_progressbar_stop();
      gt_seq_iterator_delete(seqit);
    }
    gt_str_array_delete(files);
  }

  /* show statistics */
  if (!had_err) {
    fprintf(stderr,
            "# "GT_WU" out of "GT_WU" sequences have been removed (%.3f%%)\n",
            (GtUword)duplicates, (GtUword)num_of_sequences,
            ((double) duplicates / (double)num_of_sequences) * 100.0);
  }

  gt_md5set_delete(md5set);
  return had_err;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x48, %rsp
movq %r8, %r15
movq %rcx, %r14
movl %edx, %ebp
movq %rsi, %r13
movl %edi, %ebx
testq %r8, %r8
je 0x49c66
movq %r15, %rdi
callq 0x89eb7
testb %al, %al
jne 0x49f87
testq %r14, %r14
je 0x49f5d
movq 0x10(%r14), %rdi
callq 0xfffc0
movq %rax, 0x10(%rsp)
cmpb $0x0, (%r14)
je 0x49cac
callq 0xae154
movslq %ebp, %r12
movq %rax, %rbp
movslq %ebx, %rbx
cmpq %rbx, %r12
jge 0x49dd6
movq (%r13,%r12,8), %rsi
movq %rbp, %rdi
callq 0xae22f
incq %r12
jmp 0x49c91
movslq %ebp, %rax
movslq %ebx, %rcx
movq %rcx, 0x30(%rsp)
xorl %ebp, %ebp
xorl %ebx, %ebx
movq $0x0, (%rsp)
movq %r13, 0x28(%rsp)
testl %ebp, %ebp
jne 0x49ecc
cmpq 0x30(%rsp), %rax
jge 0x49ecc
movq %rax, 0x8(%rsp)
movq (%r13,%rax,8), %rdi
movq %r15, %rsi
callq 0x5a868
testq %rax, %rax
je 0x49dbf
movq %rax, %r13
movq %rbx, 0x38(%rsp)
xorl %ebx, %ebx
xorl %ebp, %ebp
movq %r13, %rdi
callq 0x5ba79
testl %ebp, %ebp
jne 0x49daa
cmpq %rax, %rbx
jae 0x49daa
movq %r13, %rdi
movq %rbx, %rsi
callq 0x5b1f9
movq %rax, %r12
movq %r13, %rdi
movq %rbx, %rsi
callq 0x5b2f1
movzbl 0x2(%r14), %ecx
movq 0x10(%rsp), %rdi
movq %r12, %rsi
movq %rax, %rdx
movq %r15, %r8
callq 0x100256
movl %eax, %ebp
cmpl $-0x1, %eax
je 0x49d8e
testl %ebp, %ebp
jne 0x49d88
movq %r13, %rdi
movq %rbx, %rsi
callq 0x5b338
movq %rax, %rbp
movq %r13, %rdi
movq %rbx, %rsi
callq 0x5b2f1
movq 0x8(%r14), %rcx
movq 0x20(%r14), %r8
movq %rbp, %rdi
movq %r12, %rsi
movq %rax, %rdx
callq 0x8c0bc
jmp 0x49d8c
incq (%rsp)
xorl %ebp, %ebp
movq %r12, %rdi
leaq 0x2af5a8(%rip), %rsi    # 0x2f9340
movl $0x8c, %edx
callq 0x936f9
incq %rbx
jmp 0x49d02
movq %r13, %rdi
callq 0x5af87
movq 0x38(%rsp), %rax
addq %rbx, %rax
movq %rax, %rbx
jmp 0x49dc4
pushq $-0x1
popq %rax
movl %eax, %ebp
movq 0x8(%rsp), %rax
incq %rax
movq 0x28(%rsp), %r13
jmp 0x49cc8
movq %rbp, %rdi
callq 0x8e240
movq %rax, %rbx
movq %rbp, %rdi
movq %r15, %rsi
callq 0xa70d0
testq %rax, %rax
movq %rbp, 0x8(%rsp)
je 0x49e9d
movq %rax, %r12
cmpb $0x1, 0x1(%r14)
jne 0x49e1a
movq %r12, %rdi
movq %rbx, %rsi
callq 0xa6337
movq %rax, %rdi
movq %rbx, %rsi
callq 0x9c79c
xorl %eax, %eax
pushq $-0x1
popq %rbp
leaq 0x40(%rsp), %r13
xorl %ebx, %ebx
movq $0x0, (%rsp)
testl %eax, %eax
jne 0x49eae
movq %r12, %rdi
leaq 0x20(%rsp), %rsi
leaq 0x18(%rsp), %rdx
movq %r13, %rcx
movq %r15, %r8
callq 0xa62e5
cmpl $0x1, %eax
jne 0x49eac
movq 0x20(%rsp), %rsi
movq 0x18(%rsp), %rdx
movzbl 0x2(%r14), %ecx
movq 0x10(%rsp), %rdi
movq %r15, %r8
callq 0x100256
cmpl $-0x1, %eax
je 0x49e98
testl %eax, %eax
jne 0x49e92
movq 0x40(%rsp), %rdi
movq 0x20(%rsp), %rsi
movq 0x18(%rsp), %rdx
movq 0x8(%r14), %rcx
movq 0x20(%r14), %r8
callq 0x8c0bc
jmp 0x49e96
incq (%rsp)
xorl %eax, %eax
incq %rbx
jmp 0x49e2e
pushq $-0x1
popq %rbp
xorl %ebx, %ebx
movq $0x0, (%rsp)
jmp 0x49ec2
xorl %ebp, %ebp
cmpb $0x1, 0x1(%r14)
jne 0x49eba
callq 0x9cce9
movq %r12, %rdi
callq 0xa6389
movq 0x8(%rsp), %rdi
callq 0xae662
testl %ebp, %ebp
je 0x49eeb
movq 0x10(%rsp), %rdi
callq 0x10020a
movl %ebp, %eax
addq $0x48, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movq 0x3ee076(%rip), %rax    # 0x437f68
movq (%rax), %rdi
movq (%rsp), %rdx
movq %rdx, %xmm1
movq 0x29d9da(%rip), %xmm2   # 0x2e78e0
punpckldq %xmm2, %xmm1    # xmm1 = xmm1[0],xmm2[0],xmm1[1],xmm2[1]
movapd 0x29d9de(%rip), %xmm3   # 0x2e78f0
subpd %xmm3, %xmm1
movapd %xmm1, %xmm0
unpckhpd %xmm1, %xmm0            # xmm0 = xmm0[1],xmm1[1]
addsd %xmm1, %xmm0
movq %rbx, %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 0x29f899(%rip), %xmm0   # 0x2e97e0
leaq 0x2af527(%rip), %rsi    # 0x2f9475
movq %rbx, %rcx
movb $0x1, %al
callq 0x17a50
jmp 0x49ed0
movq 0x3ee004(%rip), %rax    # 0x437f68
movq (%rax), %rdi
leaq 0x29b0a5(%rip), %rsi    # 0x2e5013
leaq 0x2fe6de(%rip), %rdx    # 0x348653
leaq 0x2af4e7(%rip), %rcx    # 0x2f9463
leaq 0x2af3bd(%rip), %r8     # 0x2f9340
pushq $0x73
jmp 0x49faf
movq 0x3edfda(%rip), %rax    # 0x437f68
movq (%rax), %rdi
leaq 0x29b07b(%rip), %rsi    # 0x2e5013
leaq 0x29b220(%rip), %rdx    # 0x2e51bf
leaq 0x2af4bd(%rip), %rcx    # 0x2f9463
leaq 0x2af393(%rip), %r8     # 0x2f9340
pushq $0x72
popq %r9
xorl %eax, %eax
callq 0x17a50
callq 0x17390
nopl (%rax)