// File: /workspace/github_c_makefile_star2_O3/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 0x1a3584
xorl %r13d, %r13d
cmpb $0x0, (%rbx)
jne 0x1a393c
movl 0x8(%rbx), %ecx
testq %rcx, %rcx
je 0x1a3574
movq 0x28(%rbx), %rax
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 0x1b5526(%rip), %xmm1   # 0x358a20
xorl %edx, %edx
movdqa 0x1b552c(%rip), %xmm2   # 0x358a30
pxor %xmm2, %xmm0
pcmpeqd %xmm3, %xmm3
movdqa 0x1b552c(%rip), %xmm4   # 0x358a40
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 0x1a354f
movq $0x0, 0x10(%rax,%rdx)
pxor %xmm3, %xmm5
pextrw $0x4, %xmm5, %esi
testb $0x1, %sil
je 0x1a3567
movq $0x0, 0x28(%rax,%rdx)
paddq %xmm4, %xmm1
addq $0x30, %rdx
cmpq %rdx, %rcx
jne 0x1a3514
movq $0x0, 0x20(%rbx)
movb $0x1, (%rbx)
jmp 0x1a393c
movq %r8, %rbp
movq %rcx, %r15
movq %rsi, %r12
movq 0x58(%rbx), %rax
testq %rax, %rax
je 0x1a35af
movq 0x10(%rax), %rcx
movq 0x20(%rax), %rax
leaq (%rax,%rax,2), %rax
leaq (%rcx,%rax,8), %rax
addq $-0x18, %rax
cmpq %rcx, %rax
jae 0x1a35d5
movb $0x0, (%rbx)
xorl %r13d, %r13d
testb %dil, %dil
jne 0x1a393c
movb (%r15), %cl
movl 0x8(%rbx), %eax
cmpb %al, %cl
jne 0x1a363b
cmpb %al, %cl
je 0x1a3667
jmp 0x1a390d
movabsq $-0x5555555555555555, %rsi # imm = 0xAAAAAAAAAAAAAAAB
movq %rax, %r8
subq %rcx, %r8
sarq $0x3, %r8
imulq %rsi, %r8
leaq 0x1(%r8), %r9
shrq $0x3f, %r9
addq %r9, %r8
incq %r8
shrq %r8
leaq (%r8,%r8,2), %r8
leaq (%rcx,%r8,8), %r8
cmpq %rdx, 0x8(%r8)
ja 0x1a3616
jb 0x1a362a
movq (%r8), %r9
cmpq %r12, %r9
jbe 0x1a3624
addq $-0x18, %r8
movq %r8, %rax
cmpq %r8, %rcx
jbe 0x1a35df
jmp 0x1a35af
jae 0x1a3966
addq $0x18, %r8
movq %r8, %rcx
cmpq %rax, %r8
jbe 0x1a35df
jmp 0x1a35af
testq %rbp, %rbp
je 0x1a396b
movzbl %al, %edx
movzbl (%rbp), %esi
cmpl %esi, %edx
je 0x1a3664
cmpb %sil, %cl
setne %dil
cmpl %esi, %edx
setbe %dl
orb %dil, %dl
je 0x1a35c8
movb %al, (%r15)
movq 0x10(%rbx), %rcx
movq 0x8(%rbp), %rdx
leaq (%rcx,%rdx,8), %rdx
movq %rdx, 0x10(%rsp)
testl %eax, %eax
je 0x1a3836
leaq 0x30(%rbx), %rcx
movq %rcx, 0x18(%rsp)
movq $0x0, 0x8(%rsp)
movl $0x0, %ecx
testl %eax, %eax
je 0x1a37bf
movq 0x8(%rsp), %rcx
movq %rcx, %rsi
shlq $0x4, %rsi
leaq (%rcx,%rcx,2), %rdi
movl %eax, %ecx
xorl %r8d, %r8d
cmpq 0x8(%rsp), %r8
je 0x1a37b1
movq 0x18(%r15), %r9
movq 0x8(%r9,%rsi), %rax
testq %rax, %rax
jle 0x1a37b1
movq %r15, 0x40(%rsp)
movq %rbp, 0x38(%rsp)
movq 0x18(%rbp), %rcx
movq 0x28(%rbx), %rdx
movq (%r9,%rsi), %rbp
movq %rsi, 0x30(%rsp)
addq %rsi, %r9
movq %r9, 0x48(%rsp)
shlq $0x3, %rbp
movq %rdi, 0x28(%rsp)
addq (%rdx,%rdi,8), %rbp
movq %r8, %rsi
shlq $0x4, %rsi
leaq (%rcx,%rsi), %r13
movq %r8, 0x20(%rsp)
leaq (%r8,%r8,2), %rdi
movq (%rcx,%rsi), %r14
shlq $0x3, %r14
addq (%rdx,%rdi,8), %r14
movq 0x8(%r13), %rcx
movq %rbp, 0x50(%rsp)
movq %r14, %r15
testq %rcx, %rcx
jle 0x1a3780
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 0x1a382b
addq $0x8, %r15
movq 0x8(%r13), %rcx
leaq (%r14,%rcx,8), %rax
cmpq %rax, %r15
jb 0x1a3732
movq 0x48(%rsp), %rax
movq 0x8(%rax), %rax
addq $0x8, %rbp
movq 0x50(%rsp), %rdx
leaq (%rdx,%rax,8), %rdx
cmpq %rdx, %rbp
jb 0x1a372a
movl 0x8(%rbx), %ecx
xorl %r13d, %r13d
movq 0x40(%rsp), %r15
movq 0x38(%rsp), %rbp
movq 0x30(%rsp), %rsi
movq 0x28(%rsp), %rdi
movq 0x20(%rsp), %r8
incq %r8
movl %ecx, %eax
cmpq %rax, %r8
jb 0x1a36b4
cmpq $0x0, 0x10(%rbp)
movl %ecx, %eax
jle 0x1a380d
movq 0x10(%rsp), %r14
movq (%r14), %r8
movq 0x18(%r15), %rdx
movq %rbx, %rdi
movq %r12, %rsi
movq 0x8(%rsp), %rcx
movq 0x90(%rsp), %r9
callq 0x1a3a5f
testl %eax, %eax
jne 0x1a3956
addq $0x8, %r14
movq 0x10(%rbp), %rax
movq 0x10(%rsp), %rcx
leaq (%rcx,%rax,8), %rax
cmpq %rax, %r14
jb 0x1a37cd
movl 0x8(%rbx), %eax
movq 0x8(%rsp), %rsi
incq %rsi
movl %eax, %ecx
movq %rsi, 0x8(%rsp)
cmpq %rcx, %rsi
jb 0x1a3692
movq 0x10(%rbx), %rcx
jmp 0x1a3838
movl $0xffffffff, %r13d      # imm = 0xFFFFFFFF
jmp 0x1a393c
xorl %eax, %eax
cmpq $0x0, 0x10(%r15)
jle 0x1a390d
movq %rbp, %r13
movq 0x8(%r15), %rax
leaq (%rcx,%rax,8), %r14
leaq 0x30(%rbx), %rax
movq %rax, 0x18(%rsp)
movq %r14, 0x8(%rsp)
cmpl $0x0, 0x8(%rbx)
je 0x1a388f
xorl %ebp, %ebp
movq (%r14), %r8
movq 0x18(%r13), %rdx
movq %rbx, %rdi
movq %r12, %rsi
movl %ebp, %ecx
movq 0x90(%rsp), %r9
callq 0x1a3a5f
testl %eax, %eax
jne 0x1a394e
incl %ebp
cmpl 0x8(%rbx), %ebp
jb 0x1a3864
movq %r15, %rbp
cmpq $0x0, 0x10(%r13)
movq 0x10(%rsp), %r15
jle 0x1a38e7
movq (%r14), %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 0x1a395e
addq $0x8, %r15
movq 0x10(%r13), %rax
movq 0x10(%rsp), %rcx
leaq (%rcx,%rax,8), %rax
cmpq %rax, %r15
jb 0x1a389e
addq $0x8, %r14
movq %rbp, %r15
movq 0x10(%rbp), %rax
movq 0x8(%rsp), %rcx
leaq (%rcx,%rax,8), %rax
cmpq %rax, %r14
jb 0x1a385c
movl 0x8(%rbx), %eax
movq %r13, %rbp
xorl %r13d, %r13d
testl %eax, %eax
je 0x1a3934
movq 0x18(%rbp), %rcx
movq 0x18(%r15), %rdx
movl %eax, %eax
shlq $0x4, %rax
xorl %esi, %esi
movq 0x8(%rcx,%rsi), %rdi
addq %rdi, 0x8(%rdx,%rsi)
addq $0x10, %rsi
cmpq %rsi, %rax
jne 0x1a3921
movq 0x10(%rbp), %rax
addq %rax, 0x10(%r15)
movl %r13d, %eax
addq $0x58, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movl $0xfffffffd, %r13d      # imm = 0xFFFFFFFD
jmp 0x1a393c
movl $0xfffffffe, %r13d      # imm = 0xFFFFFFFE
jmp 0x1a393c
movl $0xfffffffc, %r13d      # imm = 0xFFFFFFFC
jmp 0x1a393c
xorl %r13d, %r13d
jmp 0x1a393c
callq 0x61e53