// File: /workspace/github_c_makefile_star2_O0/genometools[P]genometools/src/match/esa-maxpairs.c
// Function: processleafedge_maxpairs
static int processleafedge_maxpairs(bool firstsucc,
                                    GtUword fatherdepth,
                                    GtBUinfo_maxpairs *father,
                                    GtUword leafnumber,
                                    GtBUstate_maxpairs *state,
                                    GtError *err)
{
  unsigned int base;
  GtUword *start, *spptr;
  GtUchar leftchar;

#undef SKDEBUG
#ifdef SKDEBUG
  printf("%s "GT_WU" firstsucc=%s, depth(father)= "GT_WU"\n",
         __func__,
         leafnumber,
         firstsucc ? "true" : "false",
         fatherdepth);
#endif
  if (fatherdepth < (GtUword) state->searchlength)
  {
    setpostabto0_maxpairs(state);
    return 0;
  }
  if (leafnumber == 0)
  {
    leftchar = INITIALCHAR;
  } else
  {
    /* Random access */
    if (state->genericencseq.hasencseq)
    {
      leftchar = gt_encseq_get_encoded_char(state->genericencseq.seqptr.encseq,
                                            leafnumber - 1,
                                            state->readmode);
    } else
    {
      leftchar = state->sequence[leafnumber-1];
    }
  }
  state->initialized = false;
#ifdef SKDEBUG
  printf("%s: leftchar %u\n",__func__,(unsigned int) leftchar);
#endif
  if (firstsucc)
  {
    father->commonchar = leftchar;
    father->uniquecharposlength = 0;
    father->uniquecharposstart = state->uniquechar.nextfreeGtUword;
    for (base = 0; base < state->alphabetsize; base++)
    {
      NODEPOSLISTSTART(father,base) = state->poslist[base].nextfreeGtUword;
      NODEPOSLISTLENGTH(father,base) = 0;
    }
    add2poslist_maxpairs(state,father,(unsigned int) leftchar,leafnumber);
    return 0;
  }
  if (father->commonchar != ISLEFTDIVERSE)
  {
    CHECKCHAR(leftchar);
  }
  if (father->commonchar == ISLEFTDIVERSE)
  {
    for (base = 0; base < state->alphabetsize; base++)
    {
      if (leftchar != (GtUchar) base)
      {
        if (cartproduct1_maxpairs(state,fatherdepth,father,base,leafnumber,
                                  err) != 0)
        {
          return -1;
        }
      }
    }
    start = state->uniquechar.spaceGtUword +
            father->uniquecharposstart;
    for (spptr = start; spptr < start + father->uniquecharposlength; spptr++)
    {
      if (state->processmaxpairs(state->processmaxpairsinfo,
                                 &state->genericencseq,
                                 fatherdepth,
                                 GT_MIN(leafnumber,*spptr),
                                 GT_MAX(leafnumber,*spptr),err) != 0)
      {
        return -2;
      }
    }
  }
  add2poslist_maxpairs(state,father,(unsigned int) leftchar,leafnumber);
  return 0;
}

// Assembly:
subq $0x88, %rsp
movb %dil, %al
andb $0x1, %al
movb %al, 0x83(%rsp)
movq %rsi, 0x78(%rsp)
movq %rdx, 0x70(%rsp)
movq %rcx, 0x68(%rsp)
movq %r8, 0x60(%rsp)
movq %r9, 0x58(%rsp)
movq 0x78(%rsp), %rax
movq 0x60(%rsp), %rcx
movl 0x4(%rcx), %ecx
cmpq %rcx, %rax
jae 0x2368a8
movq 0x60(%rsp), %rdi
callq 0x2371e0
movl $0x0, 0x84(%rsp)
jmp 0x236c03
cmpq $0x0, 0x68(%rsp)
jne 0x2368c1
movq 0x60(%rsp), %rax
movl 0x8(%rax), %eax
addl $0x1, %eax
movb %al, 0x3f(%rsp)
jmp 0x23690c
movq 0x60(%rsp), %rax
testb $0x1, 0x30(%rax)
je 0x2368f1
movq 0x60(%rsp), %rax
movq 0x38(%rax), %rdi
movq 0x68(%rsp), %rsi
subq $0x1, %rsi
movq 0x60(%rsp), %rax
movl 0x48(%rax), %edx
callq 0xa9da0
movb %al, 0x3f(%rsp)
jmp 0x23690a
movq 0x60(%rsp), %rax
movq 0x40(%rax), %rax
movq 0x68(%rsp), %rcx
subq $0x1, %rcx
movb (%rax,%rcx), %al
movb %al, 0x3f(%rsp)
jmp 0x23690c
movq 0x60(%rsp), %rax
movb $0x0, (%rax)
testb $0x1, 0x83(%rsp)
je 0x2369e3
movb 0x3f(%rsp), %cl
movq 0x70(%rsp), %rax
movb %cl, (%rax)
movq 0x70(%rsp), %rax
movq $0x0, 0x10(%rax)
movq 0x60(%rsp), %rax
movq 0x20(%rax), %rcx
movq 0x70(%rsp), %rax
movq %rcx, 0x8(%rax)
movl $0x0, 0x54(%rsp)
movl 0x54(%rsp), %eax
movq 0x60(%rsp), %rcx
cmpl 0x8(%rcx), %eax
jae 0x2369ba
movq 0x60(%rsp), %rax
movq 0x28(%rax), %rax
movl 0x54(%rsp), %ecx
imulq $0x18, %rcx, %rcx
addq %rcx, %rax
movq 0x10(%rax), %rcx
movq 0x70(%rsp), %rax
movq 0x18(%rax), %rax
movl 0x54(%rsp), %edx
shlq $0x4, %rdx
addq %rdx, %rax
movq %rcx, (%rax)
movq 0x70(%rsp), %rax
movq 0x18(%rax), %rax
movl 0x54(%rsp), %ecx
shlq $0x4, %rcx
addq %rcx, %rax
movq $0x0, 0x8(%rax)
movl 0x54(%rsp), %eax
addl $0x1, %eax
movl %eax, 0x54(%rsp)
jmp 0x236954
movq 0x60(%rsp), %rdi
movq 0x70(%rsp), %rsi
movzbl 0x3f(%rsp), %edx
movq 0x68(%rsp), %rcx
callq 0x237250
movl $0x0, 0x84(%rsp)
jmp 0x236c03
movq 0x70(%rsp), %rax
movzbl (%rax), %eax
movq 0x60(%rsp), %rcx
movl 0x8(%rcx), %ecx
movzbl %cl, %ecx
cmpl %ecx, %eax
je 0x236a32
movq 0x70(%rsp), %rax
movzbl (%rax), %eax
movzbl 0x3f(%rsp), %ecx
cmpl %ecx, %eax
jne 0x236a1f
movzbl 0x3f(%rsp), %eax
movq 0x60(%rsp), %rcx
movl 0x8(%rcx), %ecx
movzbl %cl, %ecx
cmpl %ecx, %eax
jl 0x236a30
movq 0x60(%rsp), %rax
movl 0x8(%rax), %eax
movb %al, %cl
movq 0x70(%rsp), %rax
movb %cl, (%rax)
jmp 0x236a32
movq 0x70(%rsp), %rax
movzbl (%rax), %eax
movq 0x60(%rsp), %rcx
movl 0x8(%rcx), %ecx
movzbl %cl, %ecx
cmpl %ecx, %eax
jne 0x236bdf
movl $0x0, 0x54(%rsp)
movl 0x54(%rsp), %eax
movq 0x60(%rsp), %rcx
cmpl 0x8(%rcx), %eax
jae 0x236abb
movzbl 0x3f(%rsp), %eax
movl 0x54(%rsp), %ecx
movzbl %cl, %ecx
cmpl %ecx, %eax
je 0x236aac
movq 0x60(%rsp), %rdi
movq 0x78(%rsp), %rsi
movq 0x70(%rsp), %rdx
movl 0x54(%rsp), %ecx
movq 0x68(%rsp), %r8
movq 0x58(%rsp), %r9
callq 0x237510
cmpl $0x0, %eax
je 0x236aaa
movl $0xffffffff, 0x84(%rsp) # imm = 0xFFFFFFFF
jmp 0x236c03
jmp 0x236aac
jmp 0x236aae
movl 0x54(%rsp), %eax
addl $0x1, %eax
movl %eax, 0x54(%rsp)
jmp 0x236a55
movq 0x60(%rsp), %rax
movq 0x10(%rax), %rax
movq 0x70(%rsp), %rcx
movq 0x8(%rcx), %rcx
shlq $0x3, %rcx
addq %rcx, %rax
movq %rax, 0x48(%rsp)
movq 0x48(%rsp), %rax
movq %rax, 0x40(%rsp)
movq 0x40(%rsp), %rax
movq 0x48(%rsp), %rcx
movq 0x70(%rsp), %rdx
movq 0x10(%rdx), %rdx
shlq $0x3, %rdx
addq %rdx, %rcx
cmpq %rcx, %rax
jae 0x236bdd
movq 0x60(%rsp), %rax
movq 0x50(%rax), %rax
movq %rax, 0x18(%rsp)
movq 0x60(%rsp), %rax
movq 0x68(%rax), %rax
movq %rax, 0x20(%rsp)
movq 0x60(%rsp), %rax
addq $0x30, %rax
movq %rax, 0x28(%rsp)
movq 0x78(%rsp), %rax
movq %rax, 0x30(%rsp)
movq 0x68(%rsp), %rax
movq 0x40(%rsp), %rcx
cmpq (%rcx), %rax
jae 0x236b55
movq 0x68(%rsp), %rax
movq %rax, 0x10(%rsp)
jmp 0x236b62
movq 0x40(%rsp), %rax
movq (%rax), %rax
movq %rax, 0x10(%rsp)
movq 0x10(%rsp), %rax
movq %rax, 0x8(%rsp)
movq 0x68(%rsp), %rax
movq 0x40(%rsp), %rcx
cmpq (%rcx), %rax
jbe 0x236b86
movq 0x68(%rsp), %rax
movq %rax, (%rsp)
jmp 0x236b92
movq 0x40(%rsp), %rax
movq (%rax), %rax
movq %rax, (%rsp)
movq 0x18(%rsp), %rax
movq 0x8(%rsp), %rcx
movq 0x30(%rsp), %rdx
movq 0x28(%rsp), %rsi
movq 0x20(%rsp), %rdi
movq (%rsp), %r8
movq 0x58(%rsp), %r9
callq *%rax
cmpl $0x0, %eax
je 0x236bc8
movl $0xfffffffe, 0x84(%rsp) # imm = 0xFFFFFFFE
jmp 0x236c03
jmp 0x236bca
movq 0x40(%rsp), %rax
addq $0x8, %rax
movq %rax, 0x40(%rsp)
jmp 0x236ae3
jmp 0x236bdf
movq 0x60(%rsp), %rdi
movq 0x70(%rsp), %rsi
movzbl 0x3f(%rsp), %edx
movq 0x68(%rsp), %rcx
callq 0x237250
movl $0x0, 0x84(%rsp)
movl 0x84(%rsp), %eax
addq $0x88, %rsp
retq
nopw %cs:(%rax,%rax)