// File: /workspace/github_c_makefile_star2_O0/genometools[P]genometools/src/extended/md5_to_id_visitor.c
// Function: md5_to_seqid
static int md5_to_seqid(GtGenomeNode *gn, GtRegionMapping *region_mapping,
                        GtError *err)
{
  GtStr *seqid;
  int had_err = 0;
  gt_error_check(err);
  gt_assert(gn);
  seqid = gt_genome_node_get_seqid(gn);
  if (gt_md5_seqid_has_prefix(gt_str_get(seqid))) {
    GtStr *new_seqid = gt_str_new();
    /* seqid is a MD5 seqid -> change id */
    if (gt_str_length(seqid) > GT_MD5_SEQID_TOTAL_LEN)
      gt_str_append_cstr(new_seqid, gt_str_get(seqid) + GT_MD5_SEQID_TOTAL_LEN);
    else {
      /* for backward compatibility */
      GtStr *desc = gt_str_new();
      if (!region_mapping) {
        gt_error_set(err, "no region mapping defined");
        had_err = -1;
      }
      if (!had_err) {
        had_err = gt_region_mapping_get_description(region_mapping, desc, seqid,
                                                    err);
      }
      if (!had_err)
        gt_regular_seqid_save(new_seqid, desc);
      gt_str_delete(desc);
    }
    if (!had_err) {
      if (gt_feature_node_try_cast(gn)) {
        M2IChangeSeqidInfo info;
        info.new_seqid = new_seqid;
        info.region_mapping = region_mapping;
        had_err = gt_feature_node_traverse_children((GtFeatureNode*) gn, &info,
                                                    m2i_change_seqid, true,
                                                    err);
      }
      else
        gt_genome_node_change_seqid(gn, new_seqid);
    }
    gt_str_delete(new_seqid);
  }
  return had_err;
}

// Assembly:
subq $0x58, %rsp
movq %rdi, 0x50(%rsp)
movq %rsi, 0x48(%rsp)
movq %rdx, 0x40(%rsp)
movl $0x0, 0x34(%rsp)
cmpq $0x0, 0x40(%rsp)
je 0x1acfcb
movq 0x40(%rsp), %rdi
callq 0xd8a60
testb $0x1, %al
jne 0x1acf93
jmp 0x1acfcb
movq 0x48f006(%rip), %rax    # 0x63bfa0
movq (%rax), %rdi
leaq 0x36906f(%rip), %rsi    # 0x516013
leaq 0x369214(%rip), %rdx    # 0x5161bf
leaq 0x3ad1fb(%rip), %rcx    # 0x55a1ad
leaq 0x3ad1b4(%rip), %r8     # 0x55a16d
movl $0x7f, %r9d
movb $0x0, %al
callq 0x199f0
callq 0x19370
jmp 0x1acfcd
jmp 0x1acfcf
cmpq $0x0, 0x50(%rsp)
jne 0x1ad00f
movq 0x48efc2(%rip), %rax    # 0x63bfa0
movq (%rax), %rdi
leaq 0x36902b(%rip), %rsi    # 0x516013
leaq 0x3c319b(%rip), %rdx    # 0x57018a
leaq 0x3ad1b7(%rip), %rcx    # 0x55a1ad
leaq 0x3ad170(%rip), %r8     # 0x55a16d
movl $0x80, %r9d
movb $0x0, %al
callq 0x199f0
callq 0x19370
jmp 0x1ad011
movq 0x50(%rsp), %rdi
callq 0x171b70
movq %rax, 0x38(%rsp)
movq 0x38(%rsp), %rdi
callq 0x11dee0
movq %rax, %rdi
callq 0xeeff0
testb $0x1, %al
jne 0x1ad03b
jmp 0x1ad159
callq 0x11d4a0
movq %rax, 0x28(%rsp)
movq 0x38(%rsp), %rdi
callq 0x11dfa0
cmpq $0x25, %rax
jbe 0x1ad07c
movq 0x28(%rsp), %rax
movq %rax, 0x8(%rsp)
movq 0x38(%rsp), %rdi
callq 0x11dee0
movq 0x8(%rsp), %rdi
movq %rax, %rsi
addq $0x25, %rsi
callq 0x11d550
jmp 0x1ad0ed
callq 0x11d4a0
movq %rax, 0x20(%rsp)
cmpq $0x0, 0x48(%rsp)
jne 0x1ad0a9
movq 0x40(%rsp), %rdi
leaq 0x3ad120(%rip), %rsi    # 0x55a1ba
movb $0x0, %al
callq 0xd88c0
movl $0xffffffff, 0x34(%rsp) # imm = 0xFFFFFFFF
cmpl $0x0, 0x34(%rsp)
jne 0x1ad0cd
movq 0x48(%rsp), %rdi
movq 0x20(%rsp), %rsi
movq 0x38(%rsp), %rdx
movq 0x40(%rsp), %rcx
callq 0x1c95a0
movl %eax, 0x34(%rsp)
cmpl $0x0, 0x34(%rsp)
jne 0x1ad0e3
movq 0x28(%rsp), %rdi
movq 0x20(%rsp), %rsi
callq 0x1cb2e0
movq 0x20(%rsp), %rdi
callq 0x11f560
cmpl $0x0, 0x34(%rsp)
jne 0x1ad14f
movq 0x50(%rsp), %rdi
callq 0x170450
cmpq $0x0, %rax
je 0x1ad13e
movq 0x28(%rsp), %rax
movq %rax, 0x10(%rsp)
movq 0x48(%rsp), %rax
movq %rax, 0x18(%rsp)
movq 0x50(%rsp), %rdi
movq 0x40(%rsp), %r8
leaq 0x10(%rsp), %rsi
leaq 0x42(%rip), %rdx        # 0x1ad170
movl $0x1, %ecx
callq 0x16e2f0
movl %eax, 0x34(%rsp)
jmp 0x1ad14d
movq 0x50(%rsp), %rdi
movq 0x28(%rsp), %rsi
callq 0x171f00
jmp 0x1ad14f
movq 0x28(%rsp), %rdi
callq 0x11f560
movl 0x34(%rsp), %eax
addq $0x58, %rsp
retq
nopw %cs:(%rax,%rax)