// File: /workspace/github_c_makefile_star2_O0/genometools[P]genometools/src/extended/id_to_md5_visitor.c
// Function: seqid_to_md5
static int seqid_to_md5(GtGenomeNode *gn, GtRegionMapping *region_mapping,
                        bool substitute_target_ids, GtError *err)
{
  GtStr *seqid;
  int had_err = 0;
  gt_error_check(err);
  gt_assert(gn && region_mapping);
  seqid = gt_genome_node_get_seqid(gn);
  if (!gt_md5_seqid_has_prefix(gt_str_get(seqid))) {
    /* seqid is not already a MD5 seqid -> change id */
    GtUword offset;
    const char *md5;
    GtRange range = gt_genome_node_get_range(gn);
    if (!(md5 = gt_region_mapping_get_md5_fingerprint(region_mapping, seqid,
                                                      &range, &offset, err))) {
      had_err = -1;
    }
    if (!had_err) {
      GtStr *new_seqid = gt_str_new_cstr(GT_MD5_SEQID_PREFIX);
      gt_str_append_cstr(new_seqid, md5);
      gt_str_append_char(new_seqid, GT_MD5_SEQID_SEPARATOR);
      gt_str_append_str(new_seqid, seqid);
      if (gt_feature_node_try_cast(gn)) {
        I2MChangeSeqidInfo info;
        info.new_seqid = new_seqid;
        info.region_mapping = region_mapping;
        info.substitute_target_ids = substitute_target_ids;
        gt_assert(offset);
        info.offset = offset - 1;
        had_err = gt_feature_node_traverse_children((GtFeatureNode*) gn, &info,
                                                    i2m_change_seqid, true,
                                                    err);
      }
      else
        gt_genome_node_change_seqid(gn, new_seqid);
      gt_str_delete(new_seqid);
    }
  }
  return had_err;
}

// Assembly:
subq $0x78, %rsp
movb %dl, %al
movq %rdi, 0x70(%rsp)
movq %rsi, 0x68(%rsp)
andb $0x1, %al
movb %al, 0x67(%rsp)
movq %rcx, 0x58(%rsp)
movl $0x0, 0x4c(%rsp)
cmpq $0x0, 0x58(%rsp)
je 0x195873
movq 0x58(%rsp), %rdi
callq 0xd8a60
testb $0x1, %al
jne 0x19583b
jmp 0x195873
movq 0x4a675e(%rip), %rax    # 0x63bfa0
movq (%rax), %rdi
leaq 0x3807c7(%rip), %rsi    # 0x516013
leaq 0x38096c(%rip), %rdx    # 0x5161bf
leaq 0x3c18b3(%rip), %rcx    # 0x55710d
leaq 0x3c186c(%rip), %r8     # 0x5570cd
movl $0x88, %r9d
movb $0x0, %al
callq 0x199f0
callq 0x19370
jmp 0x195875
jmp 0x195877
cmpq $0x0, 0x70(%rsp)
je 0x195887
cmpq $0x0, 0x68(%rsp)
jne 0x1958bf
movq 0x4a6712(%rip), %rax    # 0x63bfa0
movq (%rax), %rdi
leaq 0x38077b(%rip), %rsi    # 0x516013
leaq 0x3c187b(%rip), %rdx    # 0x55711a
leaq 0x3c1867(%rip), %rcx    # 0x55710d
leaq 0x3c1820(%rip), %r8     # 0x5570cd
movl $0x89, %r9d
movb $0x0, %al
callq 0x199f0
callq 0x19370
jmp 0x1958c1
movq 0x70(%rsp), %rdi
callq 0x171b70
movq %rax, 0x50(%rsp)
movq 0x50(%rsp), %rdi
callq 0x11dee0
movq %rax, %rdi
callq 0xeeff0
testb $0x1, %al
jne 0x195a38
movq 0x70(%rsp), %rdi
callq 0x171cc0
movq %rax, 0x28(%rsp)
movq %rdx, 0x30(%rsp)
movq 0x68(%rsp), %rdi
movq 0x50(%rsp), %rsi
movq 0x58(%rsp), %r8
leaq 0x28(%rsp), %rdx
leaq 0x40(%rsp), %rcx
callq 0x1c9bf0
movq %rax, 0x38(%rsp)
cmpq $0x0, %rax
jne 0x19592f
movl $0xffffffff, 0x4c(%rsp) # imm = 0xFFFFFFFF
cmpl $0x0, 0x4c(%rsp)
jne 0x195a36
leaq 0x3a8508(%rip), %rdi    # 0x53de49
callq 0x11d510
movq %rax, 0x20(%rsp)
movq 0x20(%rsp), %rdi
movq 0x38(%rsp), %rsi
callq 0x11d550
movq 0x20(%rsp), %rdi
movl $0x3a, %esi
callq 0x11da70
movq 0x20(%rsp), %rdi
movq 0x50(%rsp), %rsi
callq 0x11d750
movq 0x70(%rsp), %rdi
callq 0x170450
cmpq $0x0, %rax
je 0x195a1d
movq 0x20(%rsp), %rax
movq %rax, (%rsp)
movq 0x68(%rsp), %rax
movq %rax, 0x8(%rsp)
movb 0x67(%rsp), %al
andb $0x1, %al
movb %al, 0x10(%rsp)
cmpq $0x0, 0x40(%rsp)
jne 0x1959e9
movq 0x4a65e8(%rip), %rax    # 0x63bfa0
movq (%rax), %rdi
leaq 0x380651(%rip), %rsi    # 0x516013
leaq 0x3a3c0e(%rip), %rdx    # 0x5395d7
leaq 0x3c173d(%rip), %rcx    # 0x55710d
leaq 0x3c16f6(%rip), %r8     # 0x5570cd
movl $0x9e, %r9d
movb $0x0, %al
callq 0x199f0
callq 0x19370
jmp 0x1959eb
movq 0x40(%rsp), %rax
subq $0x1, %rax
movq %rax, 0x18(%rsp)
movq 0x70(%rsp), %rdi
movq 0x58(%rsp), %r8
movq %rsp, %rsi
leaq 0x43(%rip), %rdx        # 0x195a50
movl $0x1, %ecx
callq 0x16e2f0
movl %eax, 0x4c(%rsp)
jmp 0x195a2c
movq 0x70(%rsp), %rdi
movq 0x20(%rsp), %rsi
callq 0x171f00
movq 0x20(%rsp), %rdi
callq 0x11f560
jmp 0x195a38
movl 0x4c(%rsp), %eax
addq $0x78, %rsp
retq
nopw %cs:(%rax,%rax)