// File: /workspace/github_c_makefile_star2_O0/genometools[P]genometools/src/extended/md5_to_id_visitor.c
// Function: m2i_change_target_seqids
static int m2i_change_target_seqids(GtFeatureNode *fn, const char *target,
                                    GtRegionMapping *region_mapping,
                                    GtError *err)
{
  GtStrArray *target_ids;
  GtArray *target_ranges, *target_strands;
  GtStr *desc, *new_seqid;
  GtUword i;
  int had_err;
  gt_error_check(err);
  gt_assert(fn && target);
  target_ids = gt_str_array_new();
  target_ranges = gt_array_new(sizeof (GtRange));
  target_strands = gt_array_new(sizeof (GtStrand));
  desc = gt_str_new();
  new_seqid = gt_str_new();
  had_err = gt_gff3_parser_parse_all_target_attributes(target, false,
                                                       target_ids,
                                                       target_ranges,
                                                       target_strands, "", 0,
                                                       err);
  for (i = 0; !had_err && i < gt_str_array_size(target_ids); i++) {
    GtStr *seqid;
    gt_str_reset(desc);
    gt_str_reset(new_seqid);
    seqid = gt_str_array_get_str(target_ids, i);
    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 */
      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);
    }
    if (!had_err)
      gt_str_array_set(target_ids, i, new_seqid);
  }
  if (!had_err) {
    GtStr *new_target = gt_str_new();
    gt_gff3_parser_build_target_str(new_target, target_ids, target_ranges,
                                    target_strands);
    gt_feature_node_set_attribute(fn, GT_GFF_TARGET, gt_str_get(new_target));
    gt_str_delete(new_target);
  }
  gt_str_delete(new_seqid);
  gt_str_delete(desc);
  gt_array_delete(target_strands);
  gt_array_delete(target_ranges);
  gt_str_array_delete(target_ids);
  return had_err;
}

// Assembly:
subq $0x98, %rsp
movq %rdi, 0x90(%rsp)
movq %rsi, 0x88(%rsp)
movq %rdx, 0x80(%rsp)
movq %rcx, 0x78(%rsp)
cmpq $0x0, 0x78(%rsp)
je 0x1ad304
movq 0x78(%rsp), %rdi
callq 0xd8a60
testb $0x1, %al
jne 0x1ad2cc
jmp 0x1ad304
movq 0x48eccd(%rip), %rax    # 0x63bfa0
movq (%rax), %rdi
leaq 0x368d36(%rip), %rsi    # 0x516013
leaq 0x368edb(%rip), %rdx    # 0x5161bf
leaq 0x3acefa(%rip), %rcx    # 0x55a1e5
leaq 0x3ace7b(%rip), %r8     # 0x55a16d
movl $0x3c, %r9d
movb $0x0, %al
callq 0x199f0
callq 0x19370
jmp 0x1ad306
jmp 0x1ad308
cmpq $0x0, 0x90(%rsp)
je 0x1ad31e
cmpq $0x0, 0x88(%rsp)
jne 0x1ad356
movq 0x48ec7b(%rip), %rax    # 0x63bfa0
movq (%rax), %rdi
leaq 0x368ce4(%rip), %rsi    # 0x516013
leaq 0x3acec8(%rip), %rdx    # 0x55a1fe
leaq 0x3acea8(%rip), %rcx    # 0x55a1e5
leaq 0x3ace29(%rip), %r8     # 0x55a16d
movl $0x3d, %r9d
movb $0x0, %al
callq 0x199f0
callq 0x19370
jmp 0x1ad358
callq 0x11f5c0
movq %rax, 0x70(%rsp)
movl $0x10, %edi
callq 0x80990
movq %rax, 0x68(%rsp)
movl $0x4, %edi
callq 0x80990
movq %rax, 0x60(%rsp)
callq 0x11d4a0
movq %rax, 0x58(%rsp)
callq 0x11d4a0
movq %rax, 0x50(%rsp)
movq 0x88(%rsp), %rdi
movq 0x70(%rsp), %rdx
movq 0x68(%rsp), %rcx
movq 0x60(%rsp), %r8
movq 0x78(%rsp), %rax
xorl %esi, %esi
leaq 0x3f026f(%rip), %r9     # 0x59d628
movl $0x0, (%rsp)
movq %rax, 0x8(%rsp)
callq 0x1778a0
movl %eax, 0x44(%rsp)
movq $0x0, 0x48(%rsp)
xorl %eax, %eax
cmpl $0x0, 0x44(%rsp)
movb %al, 0x2f(%rsp)
jne 0x1ad40a
movq 0x48(%rsp), %rax
movq %rax, 0x20(%rsp)
movq 0x70(%rsp), %rdi
callq 0x11fcc0
movq %rax, %rcx
movq 0x20(%rsp), %rax
cmpq %rcx, %rax
setb %al
movb %al, 0x2f(%rsp)
movb 0x2f(%rsp), %al
testb $0x1, %al
jne 0x1ad417
jmp 0x1ad50b
movq 0x58(%rsp), %rdi
callq 0x11e110
movq 0x50(%rsp), %rdi
callq 0x11e110
movq 0x70(%rsp), %rdi
movq 0x48(%rsp), %rsi
callq 0x11f960
movq %rax, 0x38(%rsp)
movq 0x38(%rsp), %rdi
callq 0x11dfa0
cmpq $0x25, %rax
jbe 0x1ad476
movq 0x50(%rsp), %rax
movq %rax, 0x18(%rsp)
movq 0x38(%rsp), %rdi
callq 0x11dee0
movq 0x18(%rsp), %rdi
movq %rax, %rsi
addq $0x25, %rsi
callq 0x11d550
jmp 0x1ad4db
cmpq $0x0, 0x80(%rsp)
jne 0x1ad49c
movq 0x78(%rsp), %rdi
leaq 0x3acd2d(%rip), %rsi    # 0x55a1ba
movb $0x0, %al
callq 0xd88c0
movl $0xffffffff, 0x44(%rsp) # imm = 0xFFFFFFFF
cmpl $0x0, 0x44(%rsp)
jne 0x1ad4c3
movq 0x80(%rsp), %rdi
movq 0x58(%rsp), %rsi
movq 0x38(%rsp), %rdx
movq 0x78(%rsp), %rcx
callq 0x1c95a0
movl %eax, 0x44(%rsp)
cmpl $0x0, 0x44(%rsp)
jne 0x1ad4d9
movq 0x50(%rsp), %rdi
movq 0x58(%rsp), %rsi
callq 0x1cb2e0
jmp 0x1ad4db
cmpl $0x0, 0x44(%rsp)
jne 0x1ad4f6
movq 0x70(%rsp), %rdi
movq 0x48(%rsp), %rsi
movq 0x50(%rsp), %rdx
callq 0x11faa0
jmp 0x1ad4f8
movq 0x48(%rsp), %rax
addq $0x1, %rax
movq %rax, 0x48(%rsp)
jmp 0x1ad3d7
cmpl $0x0, 0x44(%rsp)
jne 0x1ad56a
callq 0x11d4a0
movq %rax, 0x30(%rsp)
movq 0x30(%rsp), %rdi
movq 0x70(%rsp), %rsi
movq 0x68(%rsp), %rdx
movq 0x60(%rsp), %rcx
callq 0x177950
movq 0x90(%rsp), %rax
movq %rax, 0x10(%rsp)
movq 0x30(%rsp), %rdi
callq 0x11dee0
movq 0x10(%rsp), %rdi
movq %rax, %rdx
leaq 0x370445(%rip), %rsi    # 0x51d9a0
callq 0x16d660
movq 0x30(%rsp), %rdi
callq 0x11f560
movq 0x50(%rsp), %rdi
callq 0x11f560
movq 0x58(%rsp), %rdi
callq 0x11f560
movq 0x60(%rsp), %rdi
callq 0x81f80
movq 0x68(%rsp), %rdi
callq 0x81f80
movq 0x70(%rsp), %rdi
callq 0x11fd20
movl 0x44(%rsp), %eax
addq $0x98, %rsp
retq
nopl (%rax,%rax)