// File: /workspace/github_c_makefile_star2_O3/genometools[P]genometools/src/tools/gt_fingerprint.c
// Function: gt_fingerprint_runner
static int gt_fingerprint_runner(int argc, const char **argv, int parsed_args,
                                 void *tool_arguments, GtError *err)
{
  FingerprintArguments *arguments = tool_arguments;
  bool extract_found = true;
  GtBioseq *bs;
  GtStringDistri *sd;
  GtUword i, j;
  int had_err = 0;

  gt_error_check(err);
  gt_assert(arguments);
  sd = gt_string_distri_new();

  if (gt_str_length(arguments->extract))
    extract_found = false;

  /* process sequence files */
  for (i = parsed_args; !had_err && i < argc; i++) {
    if (!(bs = gt_bioseq_new(argv[i], err)))
      had_err = -1;
    if (!had_err) {
      for (j = 0; j < gt_bioseq_number_of_sequences(bs); j++) {
        if (gt_str_length(arguments->checklist) || arguments->show_duplicates)
          gt_string_distri_add(sd, gt_bioseq_get_md5_fingerprint(bs, j));
        else if (gt_str_length(arguments->extract)) {
          if (!strcmp(gt_bioseq_get_md5_fingerprint(bs, j),
                      gt_str_get(arguments->extract))) {
            char *seq = gt_bioseq_get_sequence(bs, j);
            gt_fasta_show_entry(gt_bioseq_get_description(bs, j),
                                seq,
                                gt_bioseq_get_sequence_length(bs, j),
                                arguments->width, arguments->outfp);
            gt_free(seq);
            extract_found = true;
          }
        }
        else if (!arguments->detect_collisions)
          gt_xputs(gt_bioseq_get_md5_fingerprint(bs, j));
      }
    }
    gt_bioseq_delete(bs);
  }

  if (!had_err && !extract_found) {
    gt_error_set(err, "could not find sequence with fingerprint '%s' in given "
                      "sequence file(s)", gt_str_get(arguments->extract));
    had_err = -1;
  }

  if (!had_err) {
    if (gt_str_length(arguments->checklist))
      had_err = compare_fingerprints(sd, gt_str_get(arguments->checklist), err);
    else if (arguments->show_duplicates)
      had_err = show_duplicates(sd, err);
    else if (arguments->detect_collisions)
      had_err = detect_collisions(argc - parsed_args, argv + parsed_args, err);
  }

  gt_string_distri_delete(sd);

  return had_err;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x48, %rsp
movq %r8, %rbx
movq %rcx, %r12
movl %edx, %r13d
movq %rsi, (%rsp)
movl %edi, %ebp
testq %r8, %r8
je 0xa8802
movq %rbx, %rdi
callq 0xfcc32
testb %al, %al
jne 0xa8c67
testq %r12, %r12
je 0xa8c62
callq 0x11c288
movq %rax, %r14
movq 0x10(%r12), %rdi
callq 0x11b0ca
testq %rax, %rax
sete %r15b
movslq %r13d, %rcx
movl %ebp, %edx
subl %ecx, %edx
movl %edx, 0x1c(%rsp)
movq %r14, 0x8(%rsp)
movq %rcx, 0x38(%rsp)
jbe 0xa8b16
movq %rbx, 0x10(%rsp)
movslq %ebp, %rax
movq %rax, 0x40(%rsp)
movq %rcx, %rbx
movq (%rsp), %rax
movq (%rax,%rbx,8), %rdi
movq 0x10(%rsp), %rsi
callq 0xd4388
movq %rax, %rbp
testq %rax, %rax
je 0xa8985
movq %rbp, %rdi
callq 0xd4fc8
testq %rax, %rax
je 0xa8985
xorl %r13d, %r13d
movq 0x8(%r12), %rdi
callq 0x11b0ca
testq %rax, %rax
jne 0xa8897
cmpb $0x1, (%r12)
jne 0xa88c2
movq %rbp, %rdi
movq %r13, %rsi
callq 0xd4f66
movq %r14, %rdi
movq %rax, %rsi
callq 0x11c2e2
incq %r13
movq %rbp, %rdi
callq 0xd4fc8
cmpq %rax, %r13
jb 0xa8881
jmp 0xa8985
movq 0x10(%r12), %rdi
callq 0x11b0ca
testq %rax, %rax
je 0xa8961
movq %rbp, %rdi
movq %r13, %rsi
callq 0xd4f66
movq %rax, %r14
movq 0x10(%r12), %rdi
callq 0x11b0a1
movq %r14, %rdi
movq 0x8(%rsp), %r14
movq %rax, %rsi
callq 0x17a40
testl %eax, %eax
jne 0xa88ad
movq %rbp, %rdi
movq %r13, %rsi
callq 0xd4b0d
movq %rax, %r14
movq %rbp, %rdi
movq %r13, %rsi
callq 0xd4bb7
movq %rax, %r15
movq %rbp, %rdi
movq %r13, %rsi
callq 0xd4ba3
movq 0x18(%r12), %rcx
movq 0x28(%r12), %r8
movq %r15, %rdi
movq %r14, %rsi
movq %rax, %rdx
callq 0xfe000
movq %r14, %rdi
movq 0x8(%rsp), %r14
leaq 0x2a4421(%rip), %rsi    # 0x34cd70
movl $0x148, %edx            # imm = 0x148
callq 0x1045eb
movb $0x1, %r15b
jmp 0xa88ad
cmpb $0x0, 0x1(%r12)
jne 0xa88ad
movq %rbp, %rdi
movq %r13, %rsi
callq 0xd4f66
movq %rax, %rdi
callq 0x11f93e
jmp 0xa88ad
movq %rbp, %rdi
callq 0xd491d
testq %rbp, %rbp
je 0xa89a0
incq %rbx
cmpq 0x40(%rsp), %rbx
jb 0xa884f
testq %rbp, %rbp
je 0xa8b3d
testb $0x1, %r15b
movq 0x10(%rsp), %rbx
je 0xa8b1f
movq 0x8(%r12), %rdi
callq 0x11b0ca
testq %rax, %rax
je 0xa8b47
movq 0x8(%r12), %rdi
callq 0x11b0a1
movq %rax, %r15
movb $0x0, 0x20(%rsp)
testq %rbx, %rbx
je 0xa89f2
movq %rbx, %rdi
callq 0xfcc32
testb %al, %al
jne 0xa8c71
testq %r14, %r14
je 0xa8c6c
testq %r15, %r15
je 0xa8c6c
cmpb $0x2d, (%r15)
jne 0xa8a15
cmpb $0x0, 0x1(%r15)
je 0xa8c4a
leaq 0x2b2439(%rip), %rsi    # 0x35ae55
leaq 0x2a434d(%rip), %rdx    # 0x34cd70
movq %r15, %rdi
movl $0x97, %ecx
callq 0xfcf55
movq %rax, %r15
movl $0x0, (%rsp)
movq %rbx, 0x10(%rsp)
callq 0x11ac6c
movq %rax, %r12
movq %rax, %rdi
movq %r15, %rsi
callq 0x11b1ff
xorl %ebp, %ebp
cmpl $-0x1, %eax
je 0xa8abe
leaq 0x2a45ef(%rip), %r13    # 0x34d04f
movq %r12, %rdi
callq 0x11b0a1
movq %r14, %rdi
movq %rax, %rsi
callq 0x11c3d4
movq %r14, %rbx
movq %rax, %r14
movq %r12, %rdi
callq 0x11b0a1
testq %r14, %r14
je 0xa8a93
movq %rbx, %rdi
movq %rax, %rsi
callq 0x11c362
jmp 0xa8aa3
movq %r13, %rdi
movq %rax, %rsi
xorl %eax, %eax
callq 0x17070
movb $0x1, %bpl
movq %rbx, %r14
movq %r12, %rdi
callq 0x11b132
movq %r12, %rdi
movq %r15, %rsi
callq 0x11b1ff
cmpl $-0x1, %eax
jne 0xa8a60
movb %bpl, 0x20(%rsp)
movq %r12, %rdi
callq 0x11bdbf
cmpb $0x0, (%rsp)
jne 0xa8ad9
movq %r15, %rdi
callq 0xfd09a
leaq 0x506(%rip), %rsi       # 0xa8fe6
leaq 0x20(%rsp), %r14
movq 0x8(%rsp), %rdi
movq %r14, %rdx
callq 0x11c48c
xorl %ebp, %ebp
cmpb $0x1, (%r14)
movq 0x10(%rsp), %rdi
jne 0xa8c0a
leaq 0x2a455b(%rip), %rsi    # 0x34d065
xorl %eax, %eax
callq 0xfcb67
jmp 0xa8c05
testq %rax, %rax
je 0xa89b8
movq 0x10(%r12), %rdi
callq 0x11b0a1
leaq 0x2a44b2(%rip), %rsi    # 0x34cfe2
movq %rbx, %rdi
movq %rax, %rdx
xorl %eax, %eax
callq 0xfcb67
movl $0xffffffff, %ebp       # imm = 0xFFFFFFFF
jmp 0xa8c0f
cmpb $0x1, (%r12)
movq 0x38(%rsp), %rcx
jne 0xa8c28
testq %rbx, %rbx
je 0xa8b6c
movq %rbx, %rdi
callq 0xfcc32
testb %al, %al
jne 0xa8c7b
testq %r14, %r14
je 0xa8c76
movq %r14, %rdi
xorpd %xmm0, %xmm0
leaq 0x20(%rsp), %r14
movapd %xmm0, (%r14)
leaq 0x48a(%rip), %rsi       # 0xa9017
movq %r14, %rdx
callq 0x11c48c
movq (%r14), %rdx
testq %rdx, %rdx
je 0xa8c5e
movq 0x28(%rsp), %rcx
movq %rdx, %xmm1
movq 0x29ed2d(%rip), %xmm2   # 0x3478e0
punpckldq %xmm2, %xmm1    # xmm1 = xmm1[0],xmm2[0],xmm1[1],xmm2[1]
movapd 0x29ed31(%rip), %xmm3   # 0x3478f0
subpd %xmm3, %xmm1
movapd %xmm1, %xmm0
unpckhpd %xmm1, %xmm0            # xmm0 = xmm0[1],xmm1[1]
addsd %xmm1, %xmm0
movq %rcx, %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 0x2a0bec(%rip), %xmm0   # 0x3497e0
leaq 0x2a44fb(%rip), %rsi    # 0x34d0f6
movq %rbx, %rdi
movb $0x1, %al
callq 0xfcb67
movl $0xffffffff, %ebp       # imm = 0xFFFFFFFF
movq 0x8(%rsp), %r14
movq %r14, %rdi
callq 0x11c57d
movl %ebp, %eax
addq $0x48, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
xorl %ebp, %ebp
cmpb $0x1, 0x1(%r12)
jne 0xa8c0f
movq (%rsp), %rax
leaq (%rax,%rcx,8), %rsi
movl 0x1c(%rsp), %edi
movq %rbx, %rdx
callq 0xa8c80
movl %eax, %ebp
jmp 0xa8c0f
movq 0x4102cf(%rip), %rax    # 0x4b8f20
movq (%rax), %r15
movb $0x1, %al
movl %eax, (%rsp)
jmp 0xa8a3a
xorl %ebp, %ebp
jmp 0xa8c0a
callq 0x1b0ca
callq 0x1afad
callq 0x1b01f
callq 0x1afe6
callq 0x1b091
callq 0x1b058