// File: /workspace/github_c_makefile_star2_O0/genometools[P]genometools/src/match/tyr-mersplit.c
// Function: remainadvance
static bool remainadvance(Merbounds *merbounds,
                          GtUword merbytes,
                          GtUword byteoffset,
                          GtUchar remainmask,
                          const GtUchar *searchbytecode,
                          const GtUchar *leftptr,
                          const GtUchar *rightptr)
{
  GtUchar scode, scodeleft, scoderight;

  scode = extractremainingbytes(remainmask,byteoffset,searchbytecode);
  scodeleft = extractremainingbytes(remainmask,byteoffset,leftptr);
  if (scode > scodeleft)
  {
    scoderight = extractremainingbytes(remainmask,byteoffset,rightptr);
    if (scode > scoderight)
    {
      return false;
    }
    merbounds->leftmer = remainingleftmost(merbytes,
                                           byteoffset,
                                           remainmask,
                                           scode,
                                           leftptr,
                                           rightptr);
  }
  if (scode < scodeleft)
  {
    return false;
  }
  if (scode == scodeleft)
  {
    merbounds->leftmer = leftptr;
  }
  scoderight = extractremainingbytes(remainmask,byteoffset,rightptr);
  if (scode >= scoderight)
  {
    merbounds->rightmer = rightptr;
  } else
  {
    merbounds->rightmer = remainingrightmost(merbytes,
                                             byteoffset,
                                             remainmask,
                                             scode,
                                             leftptr,
                                             rightptr);
  }
  return true;
}

// Assembly:
subq $0x48, %rsp
movb %cl, %al
movq 0x50(%rsp), %rcx
movq %rdi, 0x38(%rsp)
movq %rsi, 0x30(%rsp)
movq %rdx, 0x28(%rsp)
movb %al, 0x27(%rsp)
movq %r8, 0x18(%rsp)
movq %r9, 0x10(%rsp)
movb 0x27(%rsp), %al
movq 0x28(%rsp), %rsi
movq 0x18(%rsp), %rdx
movzbl %al, %edi
callq 0x2f5210
movb %al, 0xf(%rsp)
movb 0x27(%rsp), %al
movq 0x28(%rsp), %rsi
movq 0x10(%rsp), %rdx
movzbl %al, %edi
callq 0x2f5210
movb %al, 0xe(%rsp)
movzbl 0xf(%rsp), %eax
movzbl 0xe(%rsp), %ecx
cmpl %ecx, %eax
jle 0x2f479e
movb 0x27(%rsp), %al
movq 0x28(%rsp), %rsi
movq 0x50(%rsp), %rdx
movzbl %al, %edi
callq 0x2f5210
movb %al, 0xd(%rsp)
movzbl 0xf(%rsp), %eax
movzbl 0xd(%rsp), %ecx
cmpl %ecx, %eax
jle 0x2f476c
movb $0x0, 0x47(%rsp)
jmp 0x2f4841
movq 0x30(%rsp), %rdi
movq 0x28(%rsp), %rsi
movb 0x27(%rsp), %cl
movb 0xf(%rsp), %al
movq 0x10(%rsp), %r8
movq 0x50(%rsp), %r9
movzbl %cl, %edx
movzbl %al, %ecx
callq 0x2f5240
movq %rax, %rcx
movq 0x38(%rsp), %rax
movq %rcx, (%rax)
movzbl 0xf(%rsp), %eax
movzbl 0xe(%rsp), %ecx
cmpl %ecx, %eax
jge 0x2f47b6
movb $0x0, 0x47(%rsp)
jmp 0x2f4841
movzbl 0xf(%rsp), %eax
movzbl 0xe(%rsp), %ecx
cmpl %ecx, %eax
jne 0x2f47d1
movq 0x10(%rsp), %rcx
movq 0x38(%rsp), %rax
movq %rcx, (%rax)
movb 0x27(%rsp), %al
movq 0x28(%rsp), %rsi
movq 0x50(%rsp), %rdx
movzbl %al, %edi
callq 0x2f5210
movb %al, 0xd(%rsp)
movzbl 0xf(%rsp), %eax
movzbl 0xd(%rsp), %ecx
cmpl %ecx, %eax
jl 0x2f4809
movq 0x50(%rsp), %rcx
movq 0x38(%rsp), %rax
movq %rcx, 0x8(%rax)
jmp 0x2f483c
movq 0x30(%rsp), %rdi
movq 0x28(%rsp), %rsi
movb 0x27(%rsp), %cl
movb 0xf(%rsp), %al
movq 0x10(%rsp), %r8
movq 0x50(%rsp), %r9
movzbl %cl, %edx
movzbl %al, %ecx
callq 0x2f5340
movq %rax, %rcx
movq 0x38(%rsp), %rax
movq %rcx, 0x8(%rax)
movb $0x1, 0x47(%rsp)
movb 0x47(%rsp), %al
andb $0x1, %al
addq $0x48, %rsp
retq
nopl (%rax)