// File: /workspace/github_c_makefile_star2_O0/genometools[P]genometools/src/match/tyr-mersplit.c
// Function: splitmerinterval
static void splitmerinterval(Tyrbckinfo *tyrbckinfo,
                             const Tyrindex *tyrindex)

{
  const GtUchar *rightbound, *leftptr, *rightptr, *mertable, *lastmer;
  GtUword code, leftcode, rightcode, merbytes;

  mertable = gt_tyrindex_mertable(tyrindex);
  lastmer = gt_tyrindex_lastmer(tyrindex);
  merbytes = gt_tyrindex_merbytes(tyrindex);
  leftptr = mertable;
  rightptr = lastmer;
  rightcode = extractprefixbytecode(merbytes,
                                    tyrbckinfo->prefixlength,
                                    rightptr);
  while (true)
  {
    leftcode = extractprefixbytecode(merbytes,
                                     tyrbckinfo->prefixlength,
                                     leftptr);
    tyrbckinfo->bounds[leftcode] = (GtUword) (leftptr - mertable);
    SETDEFINEDBOUND(tyrbckinfo->boundisdefined,leftcode);
    if (leftcode == rightcode)
    {
      break;
    }
    rightbound = findrightmostmer(merbytes,
                                  tyrbckinfo->prefixlength,
                                  leftcode,leftptr,rightptr);
    leftptr = rightbound + merbytes;
  }
  tyrbckinfo->bounds[tyrbckinfo->numofcodes]
    = (GtUword) (lastmer + merbytes - mertable);
  SETDEFINEDBOUND(tyrbckinfo->boundisdefined,tyrbckinfo->numofcodes);
  for (code = tyrbckinfo->numofcodes - 1; /* Nothing */ ; code--)
  {
    if (!ISBOUNDDEFINED(tyrbckinfo->boundisdefined,code))
    {
      tyrbckinfo->bounds[code] = tyrbckinfo->bounds[code+1];
    }
    if (code == 0)
    {
      break;
    }
  }
}

// Assembly:
subq $0x58, %rsp
movq %rdi, 0x50(%rsp)
movq %rsi, 0x48(%rsp)
movq 0x48(%rsp), %rdi
callq 0x4e8130
movq %rax, 0x28(%rsp)
movq 0x48(%rsp), %rdi
callq 0x4e8140
movq %rax, 0x20(%rsp)
movq 0x48(%rsp), %rdi
callq 0x4e8150
movq %rax, (%rsp)
movq 0x28(%rsp), %rax
movq %rax, 0x38(%rsp)
movq 0x20(%rsp), %rax
movq %rax, 0x30(%rsp)
movq (%rsp), %rdi
movq 0x50(%rsp), %rax
movl 0x8(%rax), %esi
movq 0x30(%rsp), %rdx
callq 0x2f45e0
movq %rax, 0x8(%rsp)
movq (%rsp), %rdi
movq 0x50(%rsp), %rax
movl 0x8(%rax), %esi
movq 0x38(%rsp), %rdx
callq 0x2f45e0
movq %rax, 0x10(%rsp)
movq 0x38(%rsp), %rdx
movq 0x28(%rsp), %rax
subq %rax, %rdx
movq 0x50(%rsp), %rax
movq 0x20(%rax), %rax
movq 0x10(%rsp), %rcx
movq %rdx, (%rax,%rcx,8)
movq 0x10(%rsp), %rcx
andq $0x3f, %rcx
movabsq $-0x8000000000000000, %rdx # imm = 0x8000000000000000
shrq %cl, %rdx
movq 0x50(%rsp), %rax
movq 0x18(%rax), %rax
movq 0x10(%rsp), %rcx
shrq $0x6, %rcx
orq (%rax,%rcx,8), %rdx
movq %rdx, (%rax,%rcx,8)
movq 0x10(%rsp), %rax
cmpq 0x8(%rsp), %rax
jne 0x2f4e01
jmp 0x2f4e39
movq (%rsp), %rdi
movq 0x50(%rsp), %rax
movl 0x8(%rax), %esi
movq 0x10(%rsp), %rdx
movq 0x38(%rsp), %rcx
movq 0x30(%rsp), %r8
callq 0x2f5440
movq %rax, 0x40(%rsp)
movq 0x40(%rsp), %rax
addq (%rsp), %rax
movq %rax, 0x38(%rsp)
jmp 0x2f4d89
movq 0x20(%rsp), %rdx
addq (%rsp), %rdx
movq 0x28(%rsp), %rax
subq %rax, %rdx
movq 0x50(%rsp), %rax
movq 0x20(%rax), %rax
movq 0x50(%rsp), %rcx
movq 0x10(%rcx), %rcx
movq %rdx, (%rax,%rcx,8)
movq 0x50(%rsp), %rax
movq 0x10(%rax), %rcx
andq $0x3f, %rcx
movabsq $-0x8000000000000000, %rdx # imm = 0x8000000000000000
shrq %cl, %rdx
movq 0x50(%rsp), %rax
movq 0x18(%rax), %rax
movq 0x50(%rsp), %rcx
movq 0x10(%rcx), %rcx
shrq $0x6, %rcx
orq (%rax,%rcx,8), %rdx
movq %rdx, (%rax,%rcx,8)
movq 0x50(%rsp), %rax
movq 0x10(%rax), %rax
subq $0x1, %rax
movq %rax, 0x18(%rsp)
movq 0x50(%rsp), %rax
movq 0x18(%rax), %rax
movq 0x18(%rsp), %rcx
shrq $0x6, %rcx
movq (%rax,%rcx,8), %rax
movq 0x18(%rsp), %rcx
andq $0x3f, %rcx
movabsq $-0x8000000000000000, %rdx # imm = 0x8000000000000000
shrq %cl, %rdx
movq %rdx, %rcx
andq %rcx, %rax
cmpq $0x0, %rax
jne 0x2f4f07
movq 0x50(%rsp), %rax
movq 0x20(%rax), %rax
movq 0x18(%rsp), %rcx
movq 0x8(%rax,%rcx,8), %rdx
movq 0x50(%rsp), %rax
movq 0x20(%rax), %rax
movq 0x18(%rsp), %rcx
movq %rdx, (%rax,%rcx,8)
cmpq $0x0, 0x18(%rsp)
jne 0x2f4f11
jmp 0x2f4f23
jmp 0x2f4f13
movq 0x18(%rsp), %rax
addq $-0x1, %rax
movq %rax, 0x18(%rsp)
jmp 0x2f4eaa
addq $0x58, %rsp
retq
nopl (%rax,%rax)