// File: /workspace/github_c_makefile_star2_O0/genometools[P]genometools/src/match/esa-maxpairs.c
// Function: processbranchingedge_maxpairs
static int processbranchingedge_maxpairs(bool firstsucc,
                                         GtUword fatherdepth,
                                         GtUword fatherlb,
                                         GtBUinfo_maxpairs *father,
                                         GT_UNUSED GtUword sondepth,
                                         GT_UNUSED GtUword sonwidth,
                                         GtBUinfo_maxpairs *son,
                                         GtBUstate_maxpairs *state,
                                         GtError *err)
{
  unsigned int chfather, chson;
  GtUword *start, *spptr, *fptr, *fstart;

#ifdef SKDEBUG
  printf("%s firstsucc=%s, depth(father)= "GT_WU"\n",
          __func__,firstsucc ? "true" : "false",fatherdepth);
#endif
  if (fatherdepth < (GtUword) state->searchlength)
  {
    setpostabto0_maxpairs(state);
    return 0;
  }
  if (state->maxfreqcollect != NULL)
  {
    if (binaryfindlcpinterval(state->maxfreqcollect->arr.spaceLcpinterval,
                              state->maxfreqcollect->arr.nextfreeLcpinterval,
                              fatherdepth,fatherlb))
    {
      return 0;
    }
#ifdef SKDEBUG
    gt_assert(!linearfindlcpinterval(
                              state->maxfreqcollect->arr.spaceLcpinterval,
                              state->maxfreqcollect->arr.nextfreeLcpinterval,
                              fatherdepth,fatherlb));
#endif
  }
  state->initialized = false;
  if (firstsucc)
  {
    return 0;
  }
  if (father->commonchar != ISLEFTDIVERSE)
  {
    gt_assert(son != NULL);
#ifdef SKDEBUG
    printf("commonchar=%u\n",(unsigned int) son->commonchar);
#endif
    if (son->commonchar != ISLEFTDIVERSE)
    {
      CHECKCHAR(son->commonchar);
    } else
    {
      father->commonchar = ISLEFTDIVERSE;
    }
  }
  if (father->commonchar == ISLEFTDIVERSE)
  {
    start = state->uniquechar.spaceGtUword + son->uniquecharposstart;
    for (chfather = 0; chfather < state->alphabetsize; chfather++)
    {
      for (chson = 0; chson < state->alphabetsize; chson++)
      {
        if (chson != chfather)
        {
          if (cartproduct2_maxpairs(state,fatherdepth,father,chfather,
                                    son,chson,err) != 0)
          {
            return -1;
          }
        }
      }
      for (spptr = start; spptr < start + son->uniquecharposlength; spptr++)
      {
        if (cartproduct1_maxpairs(state,fatherdepth,father,chfather,*spptr,
                                  err) != 0)
        {
          return -2;
        }
      }
    }
    fstart = state->uniquechar.spaceGtUword +
             father->uniquecharposstart;
    for (fptr = fstart; fptr < fstart + father->uniquecharposlength; fptr++)
    {
      for (chson = 0; chson < state->alphabetsize; chson++)
      {
        if (cartproduct1_maxpairs(state,fatherdepth,son,chson,*fptr,err) != 0)
        {
          return -3;
        }
      }
      for (spptr = start; spptr < start + son->uniquecharposlength; spptr++)
      {
        if (state->processmaxpairs(state->processmaxpairsinfo,
                                   &state->genericencseq,
                                   fatherdepth,GT_MIN(*fptr,*spptr),
                                               GT_MAX(*fptr,*spptr),err) != 0)
        {
          return -4;
        }
      }
    }
  }
  concatlists_maxpairs(state,father,son);
  return 0;
}

// Assembly:
subq $0x98, %rsp
movb %dil, %al
movq 0xb0(%rsp), %rdi
movq 0xa8(%rsp), %rdi
movq 0xa0(%rsp), %rdi
andb $0x1, %al
movb %al, 0x93(%rsp)
movq %rsi, 0x88(%rsp)
movq %rdx, 0x80(%rsp)
movq %rcx, 0x78(%rsp)
movq %r8, 0x70(%rsp)
movq %r9, 0x68(%rsp)
movq 0x88(%rsp), %rax
movq 0xa8(%rsp), %rcx
movl 0x4(%rcx), %ecx
cmpq %rcx, %rax
jae 0x236c9f
movq 0xa8(%rsp), %rdi
callq 0x2371e0
movl $0x0, 0x94(%rsp)
jmp 0x237191
movq 0xa8(%rsp), %rax
cmpq $0x0, 0x58(%rax)
je 0x236cfb
movq 0xa8(%rsp), %rax
movq 0x58(%rax), %rax
movq 0x10(%rax), %rdi
movq 0xa8(%rsp), %rax
movq 0x58(%rax), %rax
movq 0x20(%rax), %rsi
movq 0x88(%rsp), %rdx
movq 0x80(%rsp), %rcx
callq 0x2376a0
testb $0x1, %al
jne 0x236ce9
jmp 0x236cf9
movl $0x0, 0x94(%rsp)
jmp 0x237191
jmp 0x236cfb
movq 0xa8(%rsp), %rax
movb $0x0, (%rax)
testb $0x1, 0x93(%rsp)
je 0x236d20
movl $0x0, 0x94(%rsp)
jmp 0x237191
movq 0x78(%rsp), %rax
movzbl (%rax), %eax
movq 0xa8(%rsp), %rcx
movl 0x8(%rcx), %ecx
movzbl %cl, %ecx
cmpl %ecx, %eax
je 0x236e02
jmp 0x236d40
cmpq $0x0, 0xa0(%rsp)
jne 0x236d83
movq 0x40524e(%rip), %rax    # 0x63bfa0
movq (%rax), %rdi
leaq 0x2df2b7(%rip), %rsi    # 0x516013
leaq 0x3401c5(%rip), %rdx    # 0x576f28
leaq 0x3401ca(%rip), %rcx    # 0x576f34
leaq 0x33ffcf(%rip), %r8     # 0x576d40
movl $0x186, %r9d            # imm = 0x186
movb $0x0, %al
callq 0x199f0
callq 0x19370
jmp 0x236d85
movq 0xa0(%rsp), %rax
movzbl (%rax), %eax
movq 0xa8(%rsp), %rcx
movl 0x8(%rcx), %ecx
movzbl %cl, %ecx
cmpl %ecx, %eax
je 0x236dec
movq 0x78(%rsp), %rax
movzbl (%rax), %eax
movq 0xa0(%rsp), %rcx
movzbl (%rcx), %ecx
cmpl %ecx, %eax
jne 0x236dd6
movq 0xa0(%rsp), %rax
movzbl (%rax), %eax
movq 0xa8(%rsp), %rcx
movl 0x8(%rcx), %ecx
movzbl %cl, %ecx
cmpl %ecx, %eax
jl 0x236dea
movq 0xa8(%rsp), %rax
movl 0x8(%rax), %eax
movb %al, %cl
movq 0x78(%rsp), %rax
movb %cl, (%rax)
jmp 0x236e00
movq 0xa8(%rsp), %rax
movl 0x8(%rax), %eax
movb %al, %cl
movq 0x78(%rsp), %rax
movb %cl, (%rax)
jmp 0x236e02
movq 0x78(%rsp), %rax
movzbl (%rax), %eax
movq 0xa8(%rsp), %rcx
movl 0x8(%rcx), %ecx
movzbl %cl, %ecx
cmpl %ecx, %eax
jne 0x23716c
movq 0xa8(%rsp), %rax
movq 0x10(%rax), %rax
movq 0xa0(%rsp), %rcx
movq 0x8(%rcx), %rcx
shlq $0x3, %rcx
addq %rcx, %rax
movq %rax, 0x58(%rsp)
movl $0x0, 0x64(%rsp)
movl 0x64(%rsp), %eax
movq 0xa8(%rsp), %rcx
cmpl 0x8(%rcx), %eax
jae 0x236f74
movl $0x0, 0x60(%rsp)
movl 0x60(%rsp), %eax
movq 0xa8(%rsp), %rcx
cmpl 0x8(%rcx), %eax
jae 0x236ee1
movl 0x60(%rsp), %eax
cmpl 0x64(%rsp), %eax
je 0x236ed2
movq 0xa8(%rsp), %rdi
movq 0x88(%rsp), %rsi
movq 0x78(%rsp), %rdx
movl 0x64(%rsp), %ecx
movq 0xa0(%rsp), %r8
movl 0x60(%rsp), %r9d
movq 0xb0(%rsp), %rax
movq %rax, (%rsp)
callq 0x2377d0
cmpl $0x0, %eax
je 0x236ed0
movl $0xffffffff, 0x94(%rsp) # imm = 0xFFFFFFFF
jmp 0x237191
jmp 0x236ed2
jmp 0x236ed4
movl 0x60(%rsp), %eax
addl $0x1, %eax
movl %eax, 0x60(%rsp)
jmp 0x236e69
movq 0x58(%rsp), %rax
movq %rax, 0x50(%rsp)
movq 0x50(%rsp), %rax
movq 0x58(%rsp), %rcx
movq 0xa0(%rsp), %rdx
movq 0x10(%rdx), %rdx
shlq $0x3, %rdx
addq %rdx, %rcx
cmpq %rcx, %rax
jae 0x236f62
movq 0xa8(%rsp), %rdi
movq 0x88(%rsp), %rsi
movq 0x78(%rsp), %rdx
movl 0x64(%rsp), %ecx
movq 0x50(%rsp), %rax
movq (%rax), %r8
movq 0xb0(%rsp), %r9
callq 0x237510
cmpl $0x0, %eax
je 0x236f50
movl $0xfffffffe, 0x94(%rsp) # imm = 0xFFFFFFFE
jmp 0x237191
jmp 0x236f52
movq 0x50(%rsp), %rax
addq $0x8, %rax
movq %rax, 0x50(%rsp)
jmp 0x236eeb
jmp 0x236f64
movl 0x64(%rsp), %eax
addl $0x1, %eax
movl %eax, 0x64(%rsp)
jmp 0x236e4c
movq 0xa8(%rsp), %rax
movq 0x10(%rax), %rax
movq 0x78(%rsp), %rcx
movq 0x8(%rcx), %rcx
shlq $0x3, %rcx
addq %rcx, %rax
movq %rax, 0x40(%rsp)
movq 0x40(%rsp), %rax
movq %rax, 0x48(%rsp)
movq 0x48(%rsp), %rax
movq 0x40(%rsp), %rcx
movq 0x78(%rsp), %rdx
movq 0x10(%rdx), %rdx
shlq $0x3, %rdx
addq %rdx, %rcx
cmpq %rcx, %rax
jae 0x23716a
movl $0x0, 0x60(%rsp)
movl 0x60(%rsp), %eax
movq 0xa8(%rsp), %rcx
cmpl 0x8(%rcx), %eax
jae 0x237030
movq 0xa8(%rsp), %rdi
movq 0x88(%rsp), %rsi
movq 0xa0(%rsp), %rdx
movl 0x60(%rsp), %ecx
movq 0x48(%rsp), %rax
movq (%rax), %r8
movq 0xb0(%rsp), %r9
callq 0x237510
cmpl $0x0, %eax
je 0x237021
movl $0xfffffffd, 0x94(%rsp) # imm = 0xFFFFFFFD
jmp 0x237191
jmp 0x237023
movl 0x60(%rsp), %eax
addl $0x1, %eax
movl %eax, 0x60(%rsp)
jmp 0x236fca
movq 0x58(%rsp), %rax
movq %rax, 0x50(%rsp)
movq 0x50(%rsp), %rax
movq 0x58(%rsp), %rcx
movq 0xa0(%rsp), %rdx
movq 0x10(%rdx), %rdx
shlq $0x3, %rdx
addq %rdx, %rcx
cmpq %rcx, %rax
jae 0x237155
movq 0xa8(%rsp), %rax
movq 0x50(%rax), %rax
movq %rax, 0x20(%rsp)
movq 0xa8(%rsp), %rax
movq 0x68(%rax), %rax
movq %rax, 0x28(%rsp)
movq 0xa8(%rsp), %rax
addq $0x30, %rax
movq %rax, 0x30(%rsp)
movq 0x88(%rsp), %rax
movq %rax, 0x38(%rsp)
movq 0x48(%rsp), %rax
movq (%rax), %rax
movq 0x50(%rsp), %rcx
cmpq (%rcx), %rax
jae 0x2370c1
movq 0x48(%rsp), %rax
movq (%rax), %rax
movq %rax, 0x18(%rsp)
jmp 0x2370ce
movq 0x50(%rsp), %rax
movq (%rax), %rax
movq %rax, 0x18(%rsp)
movq 0x18(%rsp), %rax
movq %rax, 0x10(%rsp)
movq 0x48(%rsp), %rax
movq (%rax), %rax
movq 0x50(%rsp), %rcx
cmpq (%rcx), %rax
jbe 0x2370f9
movq 0x48(%rsp), %rax
movq (%rax), %rax
movq %rax, 0x8(%rsp)
jmp 0x237106
movq 0x50(%rsp), %rax
movq (%rax), %rax
movq %rax, 0x8(%rsp)
movq 0x20(%rsp), %rax
movq 0x10(%rsp), %rcx
movq 0x38(%rsp), %rdx
movq 0x30(%rsp), %rsi
movq 0x28(%rsp), %rdi
movq 0x8(%rsp), %r8
movq 0xb0(%rsp), %r9
callq *%rax
cmpl $0x0, %eax
je 0x237140
movl $0xfffffffc, 0x94(%rsp) # imm = 0xFFFFFFFC
jmp 0x237191
jmp 0x237142
movq 0x50(%rsp), %rax
addq $0x8, %rax
movq %rax, 0x50(%rsp)
jmp 0x23703a
jmp 0x237157
movq 0x48(%rsp), %rax
addq $0x8, %rax
movq %rax, 0x48(%rsp)
jmp 0x236f9f
jmp 0x23716c
movq 0xa8(%rsp), %rdi
movq 0x78(%rsp), %rsi
movq 0xa0(%rsp), %rdx
callq 0x237a20
movl $0x0, 0x94(%rsp)
movl 0x94(%rsp), %eax
addq $0x98, %rsp
retq