// File: /workspace/github_c_makefile_star2_O0/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:
subq $0x38, %rsp
movb %dil, %al
movq 0x48(%rsp), %rdi
movq 0x40(%rsp), %rdi
andb $0x1, %al
movb %al, 0x37(%rsp)
movq %rsi, 0x28(%rsp)
movq %rdx, 0x20(%rsp)
movq %rcx, 0x18(%rsp)
movq %r8, 0x10(%rsp)
movq %r9, 0x8(%rsp)
testb $0x1, 0x37(%rsp)
je 0x23f3e6
jmp 0x23f35d
cmpq $0x0, 0x20(%rsp)
jne 0x23f39d
movq 0x3fcc34(%rip), %rax    # 0x63bfa0
movq (%rax), %rdi
leaq 0x2d6c9d(%rip), %rsi    # 0x516013
leaq 0x33867e(%rip), %rdx    # 0x5779fb
leaq 0x33869d(%rip), %rcx    # 0x577a21
leaq 0x3385a4(%rip), %r8     # 0x57792f
movl $0x11b, %r9d            # imm = 0x11B
movb $0x0, %al
callq 0x199f0
callq 0x19370
jmp 0x23f39f
movq 0x20(%rsp), %rax
cmpq $0x0, (%rax)
jne 0x23f3e4
movq 0x40(%rsp), %rax
movq (%rax), %rdi
shlq $0x3, %rdi
leaq 0x338572(%rip), %rsi    # 0x57792f
movl $0x11f, %edx            # imm = 0x11F
callq 0xe80f0
movq %rax, %rcx
movq 0x20(%rsp), %rax
movq %rcx, (%rax)
movq 0x20(%rsp), %rdi
movq 0x40(%rsp), %rax
movq (%rax), %rsi
callq 0x23f4c0
jmp 0x23f424
movq 0x40(%rsp), %rdi
movq 0x28(%rsp), %rsi
movq 0x20(%rsp), %rax
movq (%rax), %rdx
movq 0x8(%rsp), %rax
movq (%rax), %rcx
callq 0x23f640
movq 0x40(%rsp), %rdi
movq 0x28(%rsp), %rsi
movq 0x8(%rsp), %rax
movq (%rax), %rdx
movq 0x20(%rsp), %rax
movq (%rax), %rcx
callq 0x23f640
cmpq $0x0, 0x8(%rsp)
je 0x23f48a
movq $0x0, (%rsp)
movq (%rsp), %rax
movq 0x40(%rsp), %rcx
cmpq (%rcx), %rax
jae 0x23f488
movq 0x8(%rsp), %rax
movq (%rax), %rax
movq (%rsp), %rcx
movq (%rax,%rcx,8), %rdx
movq 0x20(%rsp), %rax
movq (%rax), %rax
movq (%rsp), %rcx
addq (%rax,%rcx,8), %rdx
movq %rdx, (%rax,%rcx,8)
movq 0x8(%rsp), %rax
movq (%rax), %rax
movq (%rsp), %rcx
movq $0x0, (%rax,%rcx,8)
movq (%rsp), %rax
addq $0x1, %rax
movq %rax, (%rsp)
jmp 0x23f434
jmp 0x23f48a
xorl %eax, %eax
addq $0x38, %rsp
retq
nopw %cs:(%rax,%rax)