// File: /workspace/github_c_makefile_star2_O2/genometools[P]genometools/src/match/esa-shulen.c
// Function: processleafedge_shulen
static int processleafedge_shulen(bool firstsucc,
                                  GtUword fatherdepth,
                                  GtBUinfo_shulen *father,
                                  GtUword leafnumber,
                                  GtBUstate_shulen *state,
                                  GT_UNUSED GtError *err)
{
  GtUword gnum;

#ifdef SHUDEBUG
  printf("processleafedge " GT_WU " firstsucc=%s, "
         " depth(father)=" GT_WU ", path=",
         leafnumber,
         firstsucc ? "true" : "false",
         fatherdepth);
  if (fatherdepth > 0)
  {
    gt_encseq_showatstartposwithdepth(stdout,
                                      state->encseq,
                                      GT_READMODE_FORWARD,
                                      leafnumber,
                                      fatherdepth);
  }
  printf("\n");
#endif
  if (state->file_to_genome_map != NULL)
  {
    gnum = state->file_to_genome_map[gt_encseq_filenum(state->encseq,
                                                       leafnumber)];
  } else
  {
    gnum = gt_encseq_filenum(state->encseq,leafnumber);
  }
  if (firstsucc)
  {
    gt_assert(father != NULL);
    if (father->gnumdist == NULL)
    {
      father->gnumdist
        = gt_malloc(sizeof (*father->gnumdist) * state->numofdbfiles);
    }
    resetgnumdist_shulen(father,state->numofdbfiles);
#ifdef SHUDEBUG
    shownode(__LINE__,state,"father",father);
#endif
  } else
  {
#ifdef SHUDEBUG
    shownode(__LINE__,state,"father",father);
#endif
    shu_compute_leaf_edge_contrib(state,father->gnumdist,gnum,fatherdepth);
  }
  father->gnumdist[gnum]++;
#ifdef SHUDEBUG
  printf("gnumdist[id=" GT_WU ",filenum=" GT_WU "]=" GT_WU "\n",father->id,gnum,
                                              father->gnumdist[gnum]);
  state->lastleafnumber = leafnumber;
#endif
  return 0;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movq %r8, %r14
movq %rdx, %r12
movq %rsi, %r15
movl %edi, %ebp
movq 0x10(%r8), %rdi
movq 0x18(%r8), %r13
movq %rcx, %rsi
callq 0x81b97
movq %rax, %rbx
testq %r13, %r13
je 0x1536f0
movq (%r13,%rbx,8), %rbx
testb %bpl, %bpl
je 0x153743
testq %r12, %r12
je 0x153785
cmpq $0x0, (%r12)
jne 0x153721
movq (%r14), %rdi
shlq $0x3, %rdi
leaq 0x1f1dd4(%rip), %rsi    # 0x3454e7
movl $0xeb, %edx
callq 0x93160
movq %rax, (%r12)
movq (%r14), %rsi
movq %r12, %rdi
callq 0x15388d
movq (%r12), %rax
incq (%rax,%rbx,8)
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movq (%r12), %rax
incq %r15
xorl %ecx, %ecx
cmpq (%r14), %rcx
jae 0x153730
cmpq %rcx, %rbx
je 0x153780
cmpq $0x0, (%rax,%rcx,8)
je 0x153780
movq 0x8(%r14), %rdx
movq (%rdx,%rcx,8), %rsi
addq %r15, (%rsi,%rbx,8)
cmpq $0x0, (%rax,%rbx,8)
jne 0x153780
movq (%rax,%rcx,8), %rsi
imulq %r15, %rsi
movq (%rdx,%rbx,8), %rdx
addq %rsi, (%rdx,%rcx,8)
incq %rcx
jmp 0x15374c
movq 0x2e47dc(%rip), %rax    # 0x437f68
movq (%rax), %rdi
leaq 0x19187d(%rip), %rsi    # 0x2e5013
leaq 0x1f1e16(%rip), %rdx    # 0x3455b3
leaq 0x1f1e1e(%rip), %rcx    # 0x3455c2
leaq 0x1f1d3c(%rip), %r8     # 0x3454e7
movl $0xe7, %r9d
xorl %eax, %eax
callq 0x17a50
callq 0x17390