// File: /workspace/github_c_makefile_star2_O0/genometools[P]genometools/src/tools/gt_encseq_md5.c
// Function: gt_encseq_md5_runner
static int gt_encseq_md5_runner(GT_UNUSED int argc, const char **argv,
                           int parsed_args, void *tool_arguments,
                           GtError *err)
{
  GtEncseqInfoArguments *arguments = tool_arguments;
  int had_err = 0;
  GtEncseqLoader *encseq_loader;
  GtEncseq *encseq;
  gt_error_check(err);
  gt_assert(arguments);

  encseq_loader = gt_encseq_loader_new();
  if (!(encseq = gt_encseq_loader_load(encseq_loader,
                                       argv[parsed_args], err)))
    had_err = -1;

  if (!had_err) {
    GtUword i;

    if (arguments->fromindex) {
      GtMD5Tab *tab;

      if (!gt_encseq_has_md5_support(encseq)) {
        gt_error_set(err, "encoded sequence given by indexname \"%s\" does not "
                          "have MD5 support", argv[parsed_args]);
        had_err = -1;
      }
      if (!had_err) {
        tab = gt_encseq_get_md5_tab(encseq, err);
        if (tab) {
          for (i = 0; i < gt_encseq_num_of_sequences(encseq); i++) {
            gt_file_xprintf(arguments->outfp,
                            ""GT_WU": %s\n", i, gt_md5_tab_get(tab, i));
          }
          gt_md5_tab_delete(tab);
        } else had_err = -1;
      }
    } else {
      char *seq,
           *md5str;
      for (i = 0; i < gt_encseq_num_of_sequences(encseq); i++) {
        GtUword len, start, end;
        len = gt_encseq_seqlength(encseq, i);
        start = gt_encseq_seqstartpos(encseq, i);
        end = len + start -1;
        seq = gt_malloc(len * sizeof (char));
        gt_encseq_extract_decoded(encseq, seq, start, end);
        md5str = gt_md5_fingerprint(seq, len);
        gt_file_xprintf(arguments->outfp, ""GT_WU": %s\n", i, md5str);
        gt_free(seq);
        gt_free(md5str);
      }
    }
  }
  gt_encseq_delete(encseq);
  gt_encseq_loader_delete(encseq_loader);
  return had_err;
}

// Assembly:
subq $0xa8, %rsp
movl %edi, 0xa4(%rsp)
movq %rsi, 0x98(%rsp)
movl %edx, 0x94(%rsp)
movq %rcx, 0x88(%rsp)
movq %r8, 0x80(%rsp)
movq 0x88(%rsp), %rax
movq %rax, 0x78(%rsp)
movl $0x0, 0x74(%rsp)
cmpq $0x0, 0x80(%rsp)
je 0x32f88
movq 0x80(%rsp), %rdi
callq 0xd8a60
testb $0x1, %al
jne 0x32f50
jmp 0x32f88
movq 0x609049(%rip), %rax    # 0x63bfa0
movq (%rax), %rdi
leaq 0x4e30b2(%rip), %rsi    # 0x516013
leaq 0x4e3257(%rip), %rdx    # 0x5161bf
leaq 0x4e9f25(%rip), %rcx    # 0x51ce94
leaq 0x4e9e93(%rip), %r8     # 0x51ce09
movl $0x4e, %r9d
movb $0x0, %al
callq 0x199f0
callq 0x19370
jmp 0x32f8a
jmp 0x32f8c
cmpq $0x0, 0x78(%rsp)
jne 0x32fcc
movq 0x609005(%rip), %rax    # 0x63bfa0
movq (%rax), %rdi
leaq 0x4e306e(%rip), %rsi    # 0x516013
leaq 0x547bb3(%rip), %rdx    # 0x57ab5f
leaq 0x4e9ee1(%rip), %rcx    # 0x51ce94
leaq 0x4e9e4f(%rip), %r8     # 0x51ce09
movl $0x4f, %r9d
movb $0x0, %al
callq 0x199f0
callq 0x19370
jmp 0x32fce
callq 0xb7a40
movq %rax, 0x68(%rsp)
movq 0x68(%rsp), %rdi
movq 0x98(%rsp), %rax
movslq 0x94(%rsp), %rcx
movq (%rax,%rcx,8), %rsi
movq 0x80(%rsp), %rdx
callq 0xb7aa0
movq %rax, 0x60(%rsp)
cmpq $0x0, %rax
jne 0x33011
movl $0xffffffff, 0x74(%rsp) # imm = 0xFFFFFFFF
cmpl $0x0, 0x74(%rsp)
jne 0x33249
movq 0x78(%rsp), %rax
testb $0x1, 0x10(%rax)
je 0x33130
movq 0x60(%rsp), %rdi
callq 0xb3120
testb $0x1, %al
jne 0x3306b
movq 0x80(%rsp), %rdi
movq 0x98(%rsp), %rax
movslq 0x94(%rsp), %rcx
movq (%rax,%rcx,8), %rdx
leaq 0x4e9e4d(%rip), %rsi    # 0x51cea9
movb $0x0, %al
callq 0xd88c0
movl $0xffffffff, 0x74(%rsp) # imm = 0xFFFFFFFF
cmpl $0x0, 0x74(%rsp)
jne 0x3312b
movq 0x60(%rsp), %rdi
movq 0x80(%rsp), %rsi
callq 0xb3060
movq %rax, 0x50(%rsp)
cmpq $0x0, 0x50(%rsp)
je 0x33121
movq $0x0, 0x58(%rsp)
movq 0x58(%rsp), %rax
movq %rax, 0x20(%rsp)
movq 0x60(%rsp), %rdi
callq 0xa9d50
movq %rax, %rcx
movq 0x20(%rsp), %rax
cmpq %rcx, %rax
jae 0x33115
movq 0x78(%rsp), %rax
movq 0x8(%rax), %rax
movq %rax, 0x10(%rsp)
movq 0x58(%rsp), %rax
movq %rax, 0x18(%rsp)
movq 0x50(%rsp), %rdi
movq 0x58(%rsp), %rsi
callq 0xefd30
movq 0x10(%rsp), %rdi
movq 0x18(%rsp), %rdx
movq %rax, %rcx
leaq 0x4e9dee(%rip), %rsi    # 0x51ceec
movb $0x0, %al
callq 0xddca0
movq 0x58(%rsp), %rax
addq $0x1, %rax
movq %rax, 0x58(%rsp)
jmp 0x330a2
movq 0x50(%rsp), %rdi
callq 0xefc30
jmp 0x33129
movl $0xffffffff, 0x74(%rsp) # imm = 0xFFFFFFFF
jmp 0x3312b
jmp 0x33247
movq $0x0, 0x58(%rsp)
movq 0x58(%rsp), %rax
movq %rax, 0x8(%rsp)
movq 0x60(%rsp), %rdi
callq 0xa9d50
movq %rax, %rcx
movq 0x8(%rsp), %rax
cmpq %rcx, %rax
jae 0x33245
movq 0x60(%rsp), %rdi
movq 0x58(%rsp), %rsi
callq 0xb09f0
movq %rax, 0x38(%rsp)
movq 0x60(%rsp), %rdi
movq 0x58(%rsp), %rsi
callq 0xb0530
movq %rax, 0x30(%rsp)
movq 0x38(%rsp), %rax
addq 0x30(%rsp), %rax
subq $0x1, %rax
movq %rax, 0x28(%rsp)
movq 0x38(%rsp), %rdi
shlq $0x0, %rdi
leaq 0x4e9c60(%rip), %rsi    # 0x51ce09
movl $0x73, %edx
callq 0xe80f0
movq %rax, 0x48(%rsp)
movq 0x60(%rsp), %rdi
movq 0x48(%rsp), %rsi
movq 0x30(%rsp), %rdx
movq 0x28(%rsp), %rcx
callq 0xac570
movq 0x48(%rsp), %rdi
movq 0x38(%rsp), %rsi
callq 0xeeef0
movq %rax, 0x40(%rsp)
movq 0x78(%rsp), %rax
movq 0x8(%rax), %rdi
movq 0x58(%rsp), %rdx
movq 0x40(%rsp), %rcx
leaq 0x4e9ced(%rip), %rsi    # 0x51ceec
movb $0x0, %al
callq 0xddca0
movq 0x48(%rsp), %rdi
leaq 0x4e9bf7(%rip), %rsi    # 0x51ce09
movl $0x77, %edx
callq 0xe88c0
movq 0x40(%rsp), %rdi
leaq 0x4e9be1(%rip), %rsi    # 0x51ce09
movl $0x78, %edx
callq 0xe88c0
movq 0x58(%rsp), %rax
addq $0x1, %rax
movq %rax, 0x58(%rsp)
jmp 0x33139
jmp 0x33247
jmp 0x33249
movq 0x60(%rsp), %rdi
callq 0xae070
movq 0x68(%rsp), %rdi
callq 0xb7e50
movl 0x74(%rsp), %eax
addq $0xa8, %rsp
retq
nopl (%rax)