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

#ifdef SHUDEBUG
  printf("%s firstsucc=%s, depth(father)=" GT_WU ",path=",__func__,
         firstsucc ? "true" : "false",fatherdepth);
  if (fatherdepth > 0)
  {
    gt_encseq_showatstartposwithdepth(stdout,
                                      state->encseq,
                                      GT_READMODE_FORWARD,
                                      state->lastleafnumber,
                                      fatherdepth);
  }
  printf("\n");
#endif
  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
    gt_assert(father != NULL);
    shownode(__LINE__,state,"father",father);
    gt_assert(son != NULL);
    shownode(__LINE__,state,"son",son);
#endif
    cartproduct_shulen(state, fatherdepth, father->gnumdist, son->gnumdist);
    cartproduct_shulen(state, fatherdepth, son->gnumdist, father->gnumdist);
  }
  if (son != NULL)
  {
    for (idx = 0; idx < state->numofdbfiles; idx++)
    {
      father->gnumdist[idx] += son->gnumdist[idx];
      son->gnumdist[idx] = 0;
#ifdef SHUDEBUG
      printf("gnumdist[id=" GT_WU ",filenum=" GT_WU "]=" GT_WU "\n",
             father->id, idx, father->gnumdist[idx]);
      printf("gnumdist[id=" GT_WU ",filenum=" GT_WU "]=0\n",son->id,idx);
#endif
    }
  }
  return 0;
}

// Assembly:
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
pushq %rax
movq %r8, %rbx
movq %rcx, %r14
movq %rdx, %r15
testl %edi, %edi
je 0x153814
testq %r15, %r15
je 0x153855
cmpq $0x0, (%r15)
jne 0x153803
movq (%rbx), %rdi
shlq $0x3, %rdi
leaq 0x1f1cfc(%rip), %rsi    # 0x3454e7
movl $0x11f, %edx            # imm = 0x11F
callq 0x93160
movq %rax, (%r15)
movq (%rbx), %rsi
movq %r15, %rdi
callq 0x15388d
testq %r14, %r14
jne 0x153836
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
retq
movq %rsi, %r12
movq (%r15), %rdx
movq (%r14), %rcx
movq %rbx, %rdi
callq 0x1538a2
movq (%r14), %rdx
movq (%r15), %rcx
movq %rbx, %rdi
movq %r12, %rsi
callq 0x1538a2
xorl %eax, %eax
cmpq (%rbx), %rax
jae 0x153808
movq (%r14), %rcx
movq (%rcx,%rax,8), %rdx
movq (%r15), %rsi
addq %rdx, (%rsi,%rax,8)
andq $0x0, (%rcx,%rax,8)
incq %rax
jmp 0x153838
movq 0x2e470c(%rip), %rax    # 0x437f68
movq (%rax), %rdi
leaq 0x1917ad(%rip), %rsi    # 0x2e5013
leaq 0x1f1d46(%rip), %rdx    # 0x3455b3
leaq 0x1f1d65(%rip), %rcx    # 0x3455d9
leaq 0x1f1c6c(%rip), %r8     # 0x3454e7
movl $0x11b, %r9d            # imm = 0x11B
xorl %eax, %eax
callq 0x17a50
callq 0x17390