// File: /workspace/github_c_makefile_star2_O0/genometools[P]genometools/src/extended/id_to_md5_visitor.c
// Function: i2m_change_target_seqids
static int i2m_change_target_seqids(GtFeatureNode *fn, const char *target,
                                    GtRegionMapping *region_mapping,
                                    GtError *err)
{
  GtArray *target_ranges, *target_strands;
  GtStrArray *target_ids;
  GtUword i;
  GtStr *md5str;
  int had_err;
  gt_error_check(err);
  gt_assert(fn && target && region_mapping);
  md5str = gt_str_new();
  target_ids = gt_str_array_new();
  target_ranges = gt_array_new(sizeof (GtRange));
  target_strands = gt_array_new(sizeof (GtStrand));
  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;
    GtUword offset;
    const char *md5;
    GtRange *range;
    seqid = gt_str_array_get_str(target_ids, i);
    range = gt_array_get(target_ranges, i);
    if (!(md5 = gt_region_mapping_get_md5_fingerprint(region_mapping, seqid,
                                                      range, &offset, err))) {
      had_err = -1;
    }
    if (!had_err) {
      GtRange transformed_range;
      gt_str_set(md5str, GT_MD5_SEQID_PREFIX);
      gt_str_append_cstr(md5str, md5);
      gt_str_append_char(md5str, GT_MD5_SEQID_SEPARATOR);
      gt_str_append_str(md5str, seqid);
      gt_str_array_set(target_ids, i, md5str);
      gt_assert(offset);
      transformed_range = gt_range_offset(range, -(offset - 1));
      range->start = transformed_range.start;
      range->end = transformed_range.end;
    }
  }
  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_array_delete(target_strands);
  gt_array_delete(target_ranges);
  gt_str_array_delete(target_ids);
  gt_str_delete(md5str);
  return had_err;
}

// Assembly:
subq $0xc8, %rsp
movq %rdi, 0xc0(%rsp)
movq %rsi, 0xb8(%rsp)
movq %rdx, 0xb0(%rsp)
movq %rcx, 0xa8(%rsp)
cmpq $0x0, 0xa8(%rsp)
je 0x195c6d
movq 0xa8(%rsp), %rdi
callq 0xd8a60
testb $0x1, %al
jne 0x195c35
jmp 0x195c6d
movq 0x4a6364(%rip), %rax    # 0x63bfa0
movq (%rax), %rdi
leaq 0x3803cd(%rip), %rsi    # 0x516013
leaq 0x380572(%rip), %rdx    # 0x5161bf
leaq 0x3c14ec(%rip), %rcx    # 0x557140
leaq 0x3c1472(%rip), %r8     # 0x5570cd
movl $0x3e, %r9d
movb $0x0, %al
callq 0x199f0
callq 0x19370
jmp 0x195c6f
jmp 0x195c71
cmpq $0x0, 0xc0(%rsp)
je 0x195c92
cmpq $0x0, 0xb8(%rsp)
je 0x195c92
cmpq $0x0, 0xb0(%rsp)
jne 0x195cca
movq 0x4a6307(%rip), %rax    # 0x63bfa0
movq (%rax), %rdi
leaq 0x380370(%rip), %rsi    # 0x516013
leaq 0x3c14af(%rip), %rdx    # 0x557159
leaq 0x3c148f(%rip), %rcx    # 0x557140
leaq 0x3c1415(%rip), %r8     # 0x5570cd
movl $0x3f, %r9d
movb $0x0, %al
callq 0x199f0
callq 0x19370
jmp 0x195ccc
callq 0x11d4a0
movq %rax, 0x80(%rsp)
callq 0x11f5c0
movq %rax, 0x90(%rsp)
movl $0x10, %edi
callq 0x80990
movq %rax, 0xa0(%rsp)
movl $0x4, %edi
callq 0x80990
movq %rax, 0x98(%rsp)
movq 0xb8(%rsp), %rdi
movq 0x90(%rsp), %rdx
movq 0xa0(%rsp), %rcx
movq 0x98(%rsp), %r8
movq 0xa8(%rsp), %rax
xorl %esi, %esi
leaq 0x4078ed(%rip), %r9     # 0x59d628
movl $0x0, (%rsp)
movq %rax, 0x8(%rsp)
callq 0x1778a0
movl %eax, 0x7c(%rsp)
movq $0x0, 0x88(%rsp)
xorl %eax, %eax
cmpl $0x0, 0x7c(%rsp)
movb %al, 0x2f(%rsp)
jne 0x195d95
movq 0x88(%rsp), %rax
movq %rax, 0x20(%rsp)
movq 0x90(%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 0x195da2
jmp 0x195f2f
movq 0x90(%rsp), %rdi
movq 0x88(%rsp), %rsi
callq 0x11f960
movq %rax, 0x70(%rsp)
movq 0xa0(%rsp), %rdi
movq 0x88(%rsp), %rsi
callq 0x80b60
movq %rax, 0x58(%rsp)
movq 0xb0(%rsp), %rdi
movq 0x70(%rsp), %rsi
movq 0x58(%rsp), %rdx
movq 0xa8(%rsp), %r8
leaq 0x68(%rsp), %rcx
callq 0x1c9bf0
movq %rax, 0x60(%rsp)
cmpq $0x0, %rax
jne 0x195e0d
movl $0xffffffff, 0x7c(%rsp) # imm = 0xFFFFFFFF
cmpl $0x0, 0x7c(%rsp)
jne 0x195f14
movq 0x80(%rsp), %rdi
leaq 0x3a8022(%rip), %rsi    # 0x53de49
callq 0x11d650
movq 0x80(%rsp), %rdi
movq 0x60(%rsp), %rsi
callq 0x11d550
movq 0x80(%rsp), %rdi
movl $0x3a, %esi
callq 0x11da70
movq 0x80(%rsp), %rdi
movq 0x70(%rsp), %rsi
callq 0x11d750
movq 0x90(%rsp), %rdi
movq 0x88(%rsp), %rsi
movq 0x80(%rsp), %rdx
callq 0x11faa0
cmpq $0x0, 0x68(%rsp)
jne 0x195ebf
movq 0x4a6112(%rip), %rax    # 0x63bfa0
movq (%rax), %rdi
leaq 0x38017b(%rip), %rsi    # 0x516013
leaq 0x3a3738(%rip), %rdx    # 0x5395d7
leaq 0x3c129a(%rip), %rcx    # 0x557140
leaq 0x3c1220(%rip), %r8     # 0x5570cd
movl $0x5b, %r9d
movb $0x0, %al
callq 0x199f0
callq 0x19370
jmp 0x195ec1
movq 0x58(%rsp), %rdi
movq 0x68(%rsp), %rax
subq $0x1, %rax
xorl %ecx, %ecx
movl %ecx, %esi
subq %rax, %rsi
callq 0x107830
movq %rax, 0x38(%rsp)
movq %rdx, 0x40(%rsp)
movq 0x38(%rsp), %rax
movq %rax, 0x48(%rsp)
movq 0x40(%rsp), %rax
movq %rax, 0x50(%rsp)
movq 0x48(%rsp), %rcx
movq 0x58(%rsp), %rax
movq %rcx, (%rax)
movq 0x50(%rsp), %rcx
movq 0x58(%rsp), %rax
movq %rcx, 0x8(%rax)
jmp 0x195f16
movq 0x88(%rsp), %rax
addq $0x1, %rax
movq %rax, 0x88(%rsp)
jmp 0x195d5c
cmpl $0x0, 0x7c(%rsp)
jne 0x195f97
callq 0x11d4a0
movq %rax, 0x30(%rsp)
movq 0x30(%rsp), %rdi
movq 0x90(%rsp), %rsi
movq 0xa0(%rsp), %rdx
movq 0x98(%rsp), %rcx
callq 0x177950
movq 0xc0(%rsp), %rax
movq %rax, 0x18(%rsp)
movq 0x30(%rsp), %rdi
callq 0x11dee0
movq 0x18(%rsp), %rdi
movq %rax, %rdx
leaq 0x387a18(%rip), %rsi    # 0x51d9a0
callq 0x16d660
movq 0x30(%rsp), %rdi
callq 0x11f560
movq 0x98(%rsp), %rdi
callq 0x81f80
movq 0xa0(%rsp), %rdi
callq 0x81f80
movq 0x90(%rsp), %rdi
callq 0x11fd20
movq 0x80(%rsp), %rdi
callq 0x11f560
movl 0x7c(%rsp), %eax
addq $0xc8, %rsp
retq
nopw (%rax,%rax)