// File: /workspace/github_c_makefile_star2_O1/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:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x58, %rsp
movq %r9, %rbx
movl 0x4(%r9), %eax
cmpq %rsi, %rax
jbe 0x1abf65
xorl %eax, %eax
cmpb $0x0, (%rbx)
jne 0x1ac33c
movl 0x8(%rbx), %ecx
testq %rcx, %rcx
je 0x1abf55
movq 0x28(%rbx), %rdi
leaq -0x1(%rcx), %rdx
movq %rdx, %xmm0
pshufd $0x44, %xmm0, %xmm0     # xmm0 = xmm0[0,1,0,1]
leaq 0x8(,%rcx,8), %rcx
andq $-0x10, %rcx
leaq (%rcx,%rcx,2), %rcx
movdqa 0x1b5b95(%rip), %xmm1   # 0x361a70
xorl %edx, %edx
movdqa 0x1b5b9b(%rip), %xmm2   # 0x361a80
pxor %xmm2, %xmm0
pcmpeqd %xmm3, %xmm3
movdqa 0x1b5b9b(%rip), %xmm4   # 0x361a90
movdqa %xmm1, %xmm5
pxor %xmm2, %xmm5
movdqa %xmm5, %xmm6
pcmpgtd %xmm0, %xmm6
pcmpeqd %xmm0, %xmm5
pshufd $0xf5, %xmm5, %xmm7     # xmm7 = xmm5[1,1,3,3]
pand %xmm6, %xmm7
pshufd $0xf5, %xmm6, %xmm5     # xmm5 = xmm6[1,1,3,3]
por %xmm7, %xmm5
movd %xmm5, %esi
notl %esi
testb $0x1, %sil
je 0x1abf30
movq $0x0, 0x10(%rdi,%rdx)
pxor %xmm3, %xmm5
pextrw $0x4, %xmm5, %esi
testb $0x1, %sil
je 0x1abf48
movq $0x0, 0x28(%rdi,%rdx)
paddq %xmm4, %xmm1
addq $0x30, %rdx
cmpq %rdx, %rcx
jne 0x1abef5
movq $0x0, 0x20(%rbx)
movb $0x1, (%rbx)
jmp 0x1ac33c
movq %r8, %rbp
movq %rcx, %r15
movq %rsi, %r12
movq 0x58(%rbx), %rax
testq %rax, %rax
je 0x1ac012
movq 0x10(%rax), %r9
movq 0x20(%rax), %rax
leaq (%rax,%rax,2), %rax
leaq (%r9,%rax,8), %r8
addq $-0x18, %r8
movabsq $-0x5555555555555555, %rax # imm = 0xAAAAAAAAAAAAAAAB
cmpq %r8, %r9
ja 0x1ac012
movq %r8, %rcx
movq %r9, %rsi
subq %r9, %r8
sarq $0x3, %r8
imulq %rax, %r8
leaq 0x1(%r8), %r9
shrq $0x3f, %r9
addq %r9, %r8
incq %r8
shrq %r8
leaq (%r8,%r8,2), %r8
leaq (%rsi,%r8,8), %r8
cmpq %rdx, 0x8(%r8)
jbe 0x1abfda
addq $-0x18, %r8
movb $0x1, %r10b
movq %rsi, %r9
jmp 0x1ac002
jae 0x1abfe5
addq $0x18, %r8
movb $0x1, %r10b
jmp 0x1abffc
movq (%r8), %r9
cmpq %r12, %r9
ja 0x1abfce
addq $0x18, %r8
cmpq %r12, %r9
setb %r10b
cmovaeq %rsi, %r8
movq %r8, %r9
movq %rcx, %r8
testb %r10b, %r10b
jne 0x1abf99
xorl %eax, %eax
cmpq %rcx, %rsi
jbe 0x1ac33c
movb $0x0, (%rbx)
xorl %eax, %eax
testb %dil, %dil
jne 0x1ac33c
movb (%r15), %cl
movl 0x8(%rbx), %edi
cmpb %dil, %cl
je 0x1ac052
testq %rbp, %rbp
je 0x1ac34b
movzbl %dil, %edx
movzbl (%rbp), %esi
cmpl %esi, %edx
je 0x1ac04f
cmpb %sil, %cl
sete %cl
cmpl %esi, %edx
seta %dl
testb %dl, %cl
jne 0x1ac052
movb %dil, (%r15)
cmpb %dil, (%r15)
jne 0x1ac2ee
movq 0x8(%rbp), %rcx
shlq $0x3, %rcx
addq 0x10(%rbx), %rcx
movq %rcx, 0x10(%rsp)
cmpl $0x0, 0x8(%rbx)
je 0x1ac215
leaq 0x30(%rbx), %rax
movq %rax, 0x18(%rsp)
xorl %r13d, %r13d
movq %rbp, 0x20(%rsp)
cmpl $0x0, 0x8(%rbx)
je 0x1ac1b6
movq %r13, %rax
shlq $0x4, %rax
movq %rax, 0x8(%rsp)
leaq (,%r13,2), %rax
addq %r13, %rax
movq %rax, 0x28(%rsp)
xorl %edi, %edi
movq %r13, 0x50(%rsp)
cmpq %r13, %rdi
je 0x1ac1a2
movq 0x18(%r15), %r8
movq 0x8(%rsp), %rax
cmpq $0x0, 0x8(%r8,%rax)
jle 0x1ac1a2
movq 0x28(%rbx), %rax
movq 0x8(%rsp), %rcx
movq (%r8,%rcx), %rbp
addq %rcx, %r8
shlq $0x3, %rbp
movq 0x28(%rsp), %rcx
addq (%rax,%rcx,8), %rbp
movq 0x20(%rsp), %rcx
movq 0x18(%rcx), %rcx
movq %rdi, %rdx
shlq $0x4, %rdx
leaq (%rcx,%rdx), %r14
leaq (%rdi,%rdi,2), %rsi
movq (%rcx,%rdx), %r13
shlq $0x3, %r13
addq (%rax,%rsi,8), %r13
movq %rbp, 0x30(%rsp)
movq %r15, 0x48(%rsp)
movq %rdi, 0x40(%rsp)
movq %r8, 0x38(%rsp)
cmpq $0x0, 0x8(%r14)
movq %r13, %r15
jle 0x1ac17d
movq (%rbp), %rax
movq (%r15), %r8
cmpq %r8, %rax
movq %r8, %rcx
cmovbq %rax, %rcx
movq 0x68(%rbx), %rdi
cmovaq %rax, %r8
movq 0x18(%rsp), %rsi
movq %r12, %rdx
movq 0x90(%rsp), %r9
callq *0x50(%rbx)
testl %eax, %eax
jne 0x1ac322
addq $0x8, %r15
movq 0x8(%r14), %rax
leaq (,%rax,8), %rax
addq %r13, %rax
cmpq %rax, %r15
jb 0x1ac131
addq $0x8, %rbp
movq 0x38(%rsp), %r8
movq 0x8(%r8), %rax
movq 0x30(%rsp), %rcx
leaq (%rcx,%rax,8), %rax
cmpq %rax, %rbp
movq 0x48(%rsp), %r15
movq 0x40(%rsp), %rdi
jb 0x1ac127
incq %rdi
movl 0x8(%rbx), %eax
cmpq %rax, %rdi
movq 0x50(%rsp), %r13
jb 0x1ac0b4
movq 0x20(%rsp), %rbp
cmpq $0x0, 0x10(%rbp)
jle 0x1ac201
movq 0x10(%rsp), %r14
movq (%r14), %r8
movq %rbx, %rdi
movq %r12, %rsi
movq %r15, %rdx
movl %r13d, %ecx
movq 0x90(%rsp), %r9
callq 0x1ac43b
testl %eax, %eax
jne 0x1ac330
addq $0x8, %r14
movq 0x10(%rbp), %rax
movq 0x10(%rsp), %rcx
leaq (%rcx,%rax,8), %rax
cmpq %rax, %r14
jb 0x1ac1c7
incq %r13
movl 0x8(%rbx), %eax
cmpq %rax, %r13
movl $0x0, %eax
jb 0x1ac087
cmpq $0x0, 0x10(%r15)
jle 0x1ac2ee
movq 0x8(%r15), %r13
shlq $0x3, %r13
addq 0x10(%rbx), %r13
leaq 0x30(%rbx), %rax
movq %rax, 0x18(%rsp)
movq %r13, 0x8(%rsp)
movq %rbp, %r14
cmpl $0x0, 0x8(%rbx)
je 0x1ac270
xorl %ebp, %ebp
movq (%r13), %r8
movq %rbx, %rdi
movq %r12, %rsi
movq %r14, %rdx
movl %ebp, %ecx
movq 0x90(%rsp), %r9
callq 0x1ac43b
testl %eax, %eax
jne 0x1ac329
incl %ebp
cmpl 0x8(%rbx), %ebp
jb 0x1ac245
movq %r15, %rbp
cmpq $0x0, 0x10(%r14)
movq 0x10(%rsp), %r15
jle 0x1ac2c9
movq (%r13), %rax
movq (%r15), %r8
cmpq %r8, %rax
movq %r8, %rcx
cmovbq %rax, %rcx
movq 0x68(%rbx), %rdi
cmovaq %rax, %r8
movq 0x18(%rsp), %rsi
movq %r12, %rdx
movq 0x90(%rsp), %r9
callq *0x50(%rbx)
testl %eax, %eax
jne 0x1ac337
addq $0x8, %r15
movq 0x10(%r14), %rax
movq 0x10(%rsp), %rcx
leaq (%rcx,%rax,8), %rax
cmpq %rax, %r15
jb 0x1ac27f
addq $0x8, %r13
movq %rbp, %r15
movq 0x10(%rbp), %rax
movq 0x8(%rsp), %rcx
leaq (%rcx,%rax,8), %rax
cmpq %rax, %r13
movq %r14, %rbp
movl $0x0, %eax
jb 0x1ac23a
movl 0x8(%rbx), %r8d
testq %r8, %r8
je 0x1ac318
movq 0x18(%rbp), %rcx
movq 0x18(%r15), %rdx
shlq $0x4, %r8
xorl %esi, %esi
movq 0x8(%rcx,%rsi), %rdi
addq %rdi, 0x8(%rdx,%rsi)
addq $0x10, %rsi
cmpq %rsi, %r8
jne 0x1ac305
movq 0x10(%rbp), %rcx
addq %rcx, 0x10(%r15)
jmp 0x1ac33c
movl $0xffffffff, %eax       # imm = 0xFFFFFFFF
jmp 0x1ac33c
movl $0xfffffffd, %eax       # imm = 0xFFFFFFFD
jmp 0x1ac33c
movl $0xfffffffe, %eax       # imm = 0xFFFFFFFE
jmp 0x1ac33c
movl $0xfffffffc, %eax       # imm = 0xFFFFFFFC
addq $0x58, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
callq 0x634f9