// File: /workspace/github_c_makefile_star2_O0/genometools[P]genometools/src/extended/region_mapping.c
// Function: update_seq_col_if_necessary
static int update_seq_col_if_necessary(GtRegionMapping *rm, GtStr *seqid,
                                       GtError *err)
{
  int had_err = 0;
  gt_error_check(err);
  gt_assert(rm && seqid);
  /* for mappings, we need to load the changed sequence, if needed... */
  if (rm->mapping) {
    if (!rm->sequence_file || (gt_str_cmp(rm->sequence_name, seqid))) {
      gt_str_delete(rm->sequence_file);
      /* ignore MD5 hashes when using region mappings */
      if (gt_md5_seqid_has_prefix(gt_str_get(seqid))) {
        rm->sequence_file = region_mapping_map(rm,
                                               gt_str_get(seqid)
                                                 +GT_MD5_SEQID_TOTAL_LEN,
                                               err);
      } else
        rm->sequence_file = region_mapping_map(rm, gt_str_get(seqid), err);
      if (!rm->sequence_file)
        had_err = -1;
      else {
        /* load new seqcol */
        if (!rm->sequence_filenames)
          rm->sequence_filenames = gt_str_array_new();
        else
          gt_str_array_reset(rm->sequence_filenames);
        gt_str_array_add(rm->sequence_filenames, rm->sequence_file);
        if (!rm->sequence_name)
          rm->sequence_name = gt_str_new();
        else
          gt_str_reset(rm->sequence_name);
        gt_str_append_str(rm->sequence_name, seqid);
        gt_seq_col_delete(rm->seq_col);
        rm->seq_col = gt_bioseq_col_new(rm->sequence_filenames, err);
        if (!rm->seq_col)
          had_err = -1;
      }
    }
  } else {
    /* ...otherwise, just make sure the seqcol is loaded */
    if (!rm->seq_col) {
      if (rm->encseq) {
        if (!(rm->seq_col = gt_encseq_col_new(rm->encseq, err)))
          had_err = -1;
      } else {
        gt_assert(rm->sequence_filenames);
        if (!(rm->seq_col = gt_bioseq_col_new(rm->sequence_filenames, err)))
          had_err = -1;
      }
      /* handle -matchdescstart, i.e. load seqids into cache */
      if (!had_err && rm->seq_col && rm->matchdescstart)
          gt_seq_col_enable_match_desc_start(rm->seq_col);
    }
    if (!had_err && rm->usedesc) {
      if (rm->seqid2seqnum_mapping)
        gt_seqid2seqnum_mapping_delete(rm->seqid2seqnum_mapping);
      rm->seqid2seqnum_mapping =
                           gt_seqid2seqnum_mapping_new_seqcol(rm->seq_col, err);
      if (!rm->seqid2seqnum_mapping) {
        had_err = -1;
      }
    }

  }
  return had_err;
}

// Assembly:
subq $0x38, %rsp
movq %rdi, 0x30(%rsp)
movq %rsi, 0x28(%rsp)
movq %rdx, 0x20(%rsp)
movl $0x0, 0x1c(%rsp)
cmpq $0x0, 0x20(%rsp)
je 0xe995b
movq 0x20(%rsp), %rdi
callq 0xc270
testb $0x1, %al
jne 0xe9923
jmp 0xe995b
movq 0xca6ae(%rip), %rax     # 0x1b3fd8
movq (%rax), %rdi
leaq 0x74732(%rip), %rsi     # 0x15e066
leaq 0x74d0d(%rip), %rdx     # 0x15e648
leaq 0x90950(%rip), %rcx     # 0x17a292
leaq 0x903bd(%rip), %r8      # 0x179d06
movl $0x99, %r9d
movb $0x0, %al
callq 0xb890
callq 0xb2e0
jmp 0xe995d
jmp 0xe995f
cmpq $0x0, 0x30(%rsp)
je 0xe996f
cmpq $0x0, 0x28(%rsp)
jne 0xe99a7
movq 0xca662(%rip), %rax     # 0x1b3fd8
movq (%rax), %rdi
leaq 0x746e6(%rip), %rsi     # 0x15e066
leaq 0x9080a(%rip), %rdx     # 0x17a191
leaq 0x90904(%rip), %rcx     # 0x17a292
leaq 0x90371(%rip), %r8      # 0x179d06
movl $0x9a, %r9d
movb $0x0, %al
callq 0xb890
callq 0xb2e0
jmp 0xe99a9
movq 0x30(%rsp), %rax
cmpq $0x0, 0x20(%rax)
je 0xe9b53
movq 0x30(%rsp), %rax
cmpq $0x0, 0x8(%rax)
je 0xe99e1
movq 0x30(%rsp), %rax
movq 0x10(%rax), %rdi
movq 0x28(%rsp), %rsi
callq 0x19bd0
cmpl $0x0, %eax
je 0xe9b4e
movq 0x30(%rsp), %rax
movq 0x8(%rax), %rdi
callq 0x1afc0
movq 0x28(%rsp), %rdi
callq 0x19940
movq %rax, %rdi
callq 0x8dca0
testb $0x1, %al
jne 0xe9a07
jmp 0xe9a3f
movq 0x30(%rsp), %rax
movq %rax, 0x10(%rsp)
movq 0x28(%rsp), %rdi
callq 0x19940
movq 0x10(%rsp), %rdi
movq %rax, %rsi
addq $0x25, %rsi
movq 0x20(%rsp), %rdx
callq 0xeae60
movq %rax, %rcx
movq 0x30(%rsp), %rax
movq %rcx, 0x8(%rax)
jmp 0xe9a71
movq 0x30(%rsp), %rax
movq %rax, 0x8(%rsp)
movq 0x28(%rsp), %rdi
callq 0x19940
movq 0x8(%rsp), %rdi
movq %rax, %rsi
movq 0x20(%rsp), %rdx
callq 0xeae60
movq %rax, %rcx
movq 0x30(%rsp), %rax
movq %rcx, 0x8(%rax)
movq 0x30(%rsp), %rax
cmpq $0x0, 0x8(%rax)
jne 0xe9a8a
movl $0xffffffff, 0x1c(%rsp) # imm = 0xFFFFFFFF
jmp 0xe9b4c
movq 0x30(%rsp), %rax
cmpq $0x0, (%rax)
jne 0xe9aa7
callq 0x1b020
movq %rax, %rcx
movq 0x30(%rsp), %rax
movq %rcx, (%rax)
jmp 0xe9ab4
movq 0x30(%rsp), %rax
movq (%rax), %rdi
callq 0x1b6c0
movq 0x30(%rsp), %rax
movq (%rax), %rdi
movq 0x30(%rsp), %rax
movq 0x8(%rax), %rsi
callq 0x1b2a0
movq 0x30(%rsp), %rax
cmpq $0x0, 0x10(%rax)
jne 0xe9ae9
callq 0x18f00
movq %rax, %rcx
movq 0x30(%rsp), %rax
movq %rcx, 0x10(%rax)
jmp 0xe9af7
movq 0x30(%rsp), %rax
movq 0x10(%rax), %rdi
callq 0x19b70
movq 0x30(%rsp), %rax
movq 0x10(%rax), %rdi
movq 0x28(%rsp), %rsi
callq 0x191b0
movq 0x30(%rsp), %rax
movq 0x38(%rax), %rdi
callq 0x14a2c0
movq 0x30(%rsp), %rax
movq (%rax), %rdi
movq 0x20(%rsp), %rsi
callq 0x10f770
movq %rax, %rcx
movq 0x30(%rsp), %rax
movq %rcx, 0x38(%rax)
movq 0x30(%rsp), %rax
cmpq $0x0, 0x38(%rax)
jne 0xe9b4a
movl $0xffffffff, 0x1c(%rsp) # imm = 0xFFFFFFFF
jmp 0xe9b4c
jmp 0xe9b4e
jmp 0xe9c9e
movq 0x30(%rsp), %rax
cmpq $0x0, 0x38(%rax)
jne 0xe9c3b
movq 0x30(%rsp), %rax
cmpq $0x0, 0x30(%rax)
je 0xe9b9b
movq 0x30(%rsp), %rax
movq 0x30(%rax), %rdi
movq 0x20(%rsp), %rsi
callq 0x140910
movq 0x30(%rsp), %rcx
movq %rax, 0x38(%rcx)
cmpq $0x0, %rax
jne 0xe9b99
movl $0xffffffff, 0x1c(%rsp) # imm = 0xFFFFFFFF
jmp 0xe9c0d
jmp 0xe9b9d
movq 0x30(%rsp), %rax
cmpq $0x0, (%rax)
jne 0xe9be0
movq 0xca429(%rip), %rax     # 0x1b3fd8
movq (%rax), %rdi
leaq 0x744ad(%rip), %rsi     # 0x15e066
leaq 0x906ee(%rip), %rdx     # 0x17a2ae
leaq 0x906cb(%rip), %rcx     # 0x17a292
leaq 0x90138(%rip), %r8      # 0x179d06
movl $0xc2, %r9d
movb $0x0, %al
callq 0xb890
callq 0xb2e0
jmp 0xe9be2
movq 0x30(%rsp), %rax
movq (%rax), %rdi
movq 0x20(%rsp), %rsi
callq 0x10f770
movq 0x30(%rsp), %rcx
movq %rax, 0x38(%rcx)
cmpq $0x0, %rax
jne 0xe9c0b
movl $0xffffffff, 0x1c(%rsp) # imm = 0xFFFFFFFF
jmp 0xe9c0d
cmpl $0x0, 0x1c(%rsp)
jne 0xe9c39
movq 0x30(%rsp), %rax
cmpq $0x0, 0x38(%rax)
je 0xe9c39
movq 0x30(%rsp), %rax
testb $0x1, 0x1a(%rax)
je 0xe9c39
movq 0x30(%rsp), %rax
movq 0x38(%rax), %rdi
callq 0x14a3d0
jmp 0xe9c3b
cmpl $0x0, 0x1c(%rsp)
jne 0xe9c9c
movq 0x30(%rsp), %rax
testb $0x1, 0x19(%rax)
je 0xe9c9c
movq 0x30(%rsp), %rax
cmpq $0x0, 0x40(%rax)
je 0xe9c67
movq 0x30(%rsp), %rax
movq 0x40(%rax), %rdi
callq 0xeb520
movq 0x30(%rsp), %rax
movq 0x38(%rax), %rdi
movq 0x20(%rsp), %rsi
callq 0xeb570
movq %rax, %rcx
movq 0x30(%rsp), %rax
movq %rcx, 0x40(%rax)
movq 0x30(%rsp), %rax
cmpq $0x0, 0x40(%rax)
jne 0xe9c9a
movl $0xffffffff, 0x1c(%rsp) # imm = 0xFFFFFFFF
jmp 0xe9c9c
jmp 0xe9c9e
movl 0x1c(%rsp), %eax
addq $0x38, %rsp
retq
nopw (%rax,%rax)