// File: /workspace/github_c_makefile_star2_O0/genometools[P]genometools/src/match/rdj-strgraph.c
// Function: gt_strgraph_reddepaths
GtUword gt_strgraph_reddepaths(GtStrgraph *strgraph,
    GtUword maxdepth, bool show_progressbar)
{
  GtStrgraphVnum i, from, to;
  GtStrgraphVEdgenum j, from_to;
  GtUword depth, d;
  GtUword counter = 0, nofdepaths = 0;
  GtUint64 progress = 0;
  bool i_branching;
  GtStrgraphEdgeID *edges;

  gt_assert(strgraph != NULL);

  edges = gt_malloc(sizeof (GtStrgraphEdgeID) * (maxdepth + 1));

  if (show_progressbar)
    gt_progressbar_start(&progress,
        (GtUint64)GT_STRGRAPH_NOFVERTICES(strgraph));

  for (i = 0; i < GT_STRGRAPH_NOFVERTICES(strgraph); i++)
  {
    if (GT_STRGRAPH_V_OUTDEG(strgraph, i) > 0)
    {
      if (GT_STRGRAPH_V_IS_INTERNAL(strgraph, i))
        continue;
      i_branching =
        (GT_STRGRAPH_V_OUTDEG(strgraph, i) > (GtStrgraphVEdgenum)1 &&
         GT_STRGRAPH_V_INDEG(strgraph, i) > 0) ||
        (GT_STRGRAPH_V_OUTDEG(strgraph, i) == (GtStrgraphVEdgenum)1 &&
         GT_STRGRAPH_V_INDEG(strgraph, i) > (GtStrgraphVEdgenum)1);
      for (j = 0; j < GT_STRGRAPH_V_NOFEDGES(strgraph, i); j++)
      {
        if (!GT_STRGRAPH_EDGE_IS_REDUCED(strgraph, i, j) &&
            !GT_STRGRAPH_EDGE_HAS_MARK(strgraph, i, j))
        {
          from = i;
          from_to = j;
          to = GT_STRGRAPH_EDGE_DEST(strgraph, from, from_to);
          edges->vnum = from;
          edges->edgenum = from_to;
          depth = 1UL;
          while (GT_STRGRAPH_V_IS_INTERNAL(strgraph, to) &&
              depth <= maxdepth)
          {
            depth++;
            from = to;
            from_to = gt_strgraph_find_only_edge(strgraph, from);
            to = GT_STRGRAPH_EDGE_DEST(strgraph, from, from_to);
            gt_assert(depth >= 1UL);
            gt_assert(depth - 1UL <= maxdepth);
            edges[depth - 1UL].vnum = from;
            edges[depth - 1UL].edgenum = from_to;
          }
          if (depth <= maxdepth &&
              (!i_branching || GT_STRGRAPH_V_OUTDEG(strgraph, to) == 0))
          {
            nofdepaths++;
            for (d = 0; d < depth; d++)
            {
              GT_STRGRAPH_EDGE_SET_MARK(strgraph, edges[d].vnum,
                  edges[d].edgenum);
            }
          }
        }
      }
    }
    if (show_progressbar)
      progress++;
  }
  gt_free(edges);
  counter = gt_strgraph_reduce_marked_edges(strgraph);
  if (show_progressbar)
    gt_progressbar_stop();
  gt_log_log("dead-paths = "GT_WU"", nofdepaths);
  gt_log_log("dead-path edges = "GT_WU"", counter);
#ifndef NDEBUG
  gt_strgraph_check_outdegs(strgraph);
#endif
  return counter;
}

// Assembly:
subq $0x148, %rsp            # imm = 0x148
movb %dl, %al
movq %rdi, 0x140(%rsp)
movq %rsi, 0x138(%rsp)
andb $0x1, %al
movb %al, 0x137(%rsp)
movq $0x0, 0xf0(%rsp)
movq $0x0, 0xe8(%rsp)
movq $0x0, 0xe0(%rsp)
cmpq $0x0, 0x140(%rsp)
jne 0x295849
movq 0x3a6788(%rip), %rax    # 0x63bfa0
movq (%rax), %rdi
leaq 0x2807f1(%rip), %rsi    # 0x516013
leaq 0x2ec8db(%rip), %rdx    # 0x582104
leaq 0x2ece2e(%rip), %rcx    # 0x58265e
leaq 0x2ec809(%rip), %r8     # 0x582040
movl $0x477, %r9d            # imm = 0x477
movb $0x0, %al
callq 0x199f0
callq 0x19370
jmp 0x29584b
movq 0x138(%rsp), %rdi
addq $0x1, %rdi
shlq $0x4, %rdi
leaq 0x2ec7de(%rip), %rsi    # 0x582040
movl $0x479, %edx            # imm = 0x479
callq 0xe80f0
movq %rax, 0xd0(%rsp)
testb $0x1, 0x137(%rsp)
je 0x29589a
movq 0x140(%rsp), %rax
movq 0x80(%rax), %rsi
leaq 0xe0(%rsp), %rdi
callq 0xf9830
movq $0x0, 0x128(%rsp)
movq 0x128(%rsp), %rax
movq 0x140(%rsp), %rcx
cmpq 0x80(%rcx), %rax
jae 0x2961da
movq 0x140(%rsp), %rax
movq 0x70(%rax), %rdi
movq 0x128(%rsp), %rsi
callq 0x290730
cmpq $0x0, %rax
jbe 0x2961a1
movq 0x140(%rsp), %rax
movq 0x70(%rax), %rdi
movq 0x128(%rsp), %rsi
callq 0x290730
cmpq $0x1, %rax
jne 0x295975
movq 0x140(%rsp), %rax
movq 0x70(%rax), %rax
movq %rax, 0xc8(%rsp)
movq 0x128(%rsp), %rax
andq $0x1, %rax
cmpq $0x1, %rax
jne 0x295941
movq 0x128(%rsp), %rax
subq $0x1, %rax
movq %rax, 0xc0(%rsp)
jmp 0x295955
movq 0x128(%rsp), %rax
addq $0x1, %rax
movq %rax, 0xc0(%rsp)
movq 0xc8(%rsp), %rdi
movq 0xc0(%rsp), %rsi
callq 0x290730
cmpq $0x1, %rax
jne 0x295975
jmp 0x2961c1
movq 0x140(%rsp), %rax
movq 0x70(%rax), %rdi
movq 0x128(%rsp), %rsi
callq 0x290730
cmpq $0x1, %rax
jbe 0x295a0f
movq 0x140(%rsp), %rax
movq 0x70(%rax), %rax
movq %rax, 0xb8(%rsp)
movq 0x128(%rsp), %rax
andq $0x1, %rax
cmpq $0x1, %rax
jne 0x2959d0
movq 0x128(%rsp), %rax
subq $0x1, %rax
movq %rax, 0xb0(%rsp)
jmp 0x2959e4
movq 0x128(%rsp), %rax
addq $0x1, %rax
movq %rax, 0xb0(%rsp)
movq 0xb8(%rsp), %rdi
movq 0xb0(%rsp), %rsi
callq 0x290730
movq %rax, %rcx
movb $0x1, %al
cmpq $0x0, %rcx
movb %al, 0xaf(%rsp)
ja 0x295abb
movq 0x140(%rsp), %rax
movq 0x70(%rax), %rdi
movq 0x128(%rsp), %rsi
callq 0x290730
movq %rax, %rcx
xorl %eax, %eax
cmpq $0x1, %rcx
movb %al, 0xae(%rsp)
jne 0x295aad
movq 0x140(%rsp), %rax
movq 0x70(%rax), %rax
movq %rax, 0xa0(%rsp)
movq 0x128(%rsp), %rax
andq $0x1, %rax
cmpq $0x1, %rax
jne 0x295a76
movq 0x128(%rsp), %rax
subq $0x1, %rax
movq %rax, 0x98(%rsp)
jmp 0x295a8a
movq 0x128(%rsp), %rax
addq $0x1, %rax
movq %rax, 0x98(%rsp)
movq 0xa0(%rsp), %rdi
movq 0x98(%rsp), %rsi
callq 0x290730
cmpq $0x1, %rax
seta %al
movb %al, 0xae(%rsp)
movb 0xae(%rsp), %al
movb %al, 0xaf(%rsp)
movb 0xaf(%rsp), %al
andb $0x1, %al
movb %al, 0xdf(%rsp)
movq $0x0, 0x110(%rsp)
movq 0x110(%rsp), %rax
movq %rax, 0x90(%rsp)
movq 0x140(%rsp), %rax
movq 0x60(%rax), %rdi
movq 0x128(%rsp), %rsi
addq $0x1, %rsi
callq 0x290730
movq %rax, 0x88(%rsp)
movq 0x140(%rsp), %rax
movq 0x60(%rax), %rdi
movq 0x128(%rsp), %rsi
callq 0x290730
movq 0x88(%rsp), %rcx
movq %rax, %rdx
movq 0x90(%rsp), %rax
subq %rdx, %rcx
cmpq %rcx, %rax
jae 0x29619f
movq 0x140(%rsp), %rax
movq 0x88(%rax), %rax
movq %rax, 0x78(%rsp)
movq 0x140(%rsp), %rax
movq 0x60(%rax), %rdi
movq 0x128(%rsp), %rsi
callq 0x290730
movq 0x78(%rsp), %rdi
movq %rax, %rsi
addq 0x110(%rsp), %rsi
callq 0x290730
movq %rax, 0x80(%rsp)
movq 0x140(%rsp), %rax
movq 0x90(%rax), %rdi
callq 0x46ec80
movl %eax, %ecx
movq 0x80(%rsp), %rax
movl $0x1, %edx
shll %cl, %edx
movl %edx, %ecx
subl $0x1, %ecx
shll %ecx
movslq %ecx, %rcx
andq %rcx, %rax
shrq %rax
movq 0x140(%rsp), %rcx
cmpq 0x90(%rcx), %rax
jne 0x295be0
movb $0x1, %al
testb $0x1, %al
jne 0x296184
jmp 0x295bec
xorl %eax, %eax
testb $0x1, %al
jne 0x296184
jmp 0x295bec
movq 0x140(%rsp), %rax
movq 0x88(%rax), %rax
movq %rax, 0x70(%rsp)
movq 0x140(%rsp), %rax
movq 0x60(%rax), %rdi
movq 0x128(%rsp), %rsi
callq 0x290730
movq 0x70(%rsp), %rdi
movq %rax, %rsi
addq 0x110(%rsp), %rsi
callq 0x290730
andq $0x1, %rax
shrq $0x0, %rax
cmpq $0x0, %rax
je 0x295c48
movb $0x1, %al
testb $0x1, %al
jne 0x296184
jmp 0x295c54
xorl %eax, %eax
testb $0x1, %al
jne 0x296184
jmp 0x295c54
movq 0x128(%rsp), %rax
movq %rax, 0x120(%rsp)
movq 0x110(%rsp), %rax
movq %rax, 0x108(%rsp)
movq 0x140(%rsp), %rax
movq 0x88(%rax), %rax
movq %rax, 0x50(%rsp)
movq 0x140(%rsp), %rax
movq 0x60(%rax), %rdi
movq 0x120(%rsp), %rsi
callq 0x290730
movq 0x50(%rsp), %rdi
movq %rax, %rsi
addq 0x108(%rsp), %rsi
callq 0x290730
movq %rax, 0x60(%rsp)
movq 0x140(%rsp), %rax
movq 0x80(%rax), %rdi
callq 0x46ec80
movl %eax, %ecx
movl $0x1, %eax
shll %cl, %eax
subl $0x1, %eax
movl %eax, 0x5c(%rsp)
movq 0x140(%rsp), %rax
movq 0x90(%rax), %rdi
callq 0x46ec80
movl 0x5c(%rsp), %edx
movl %eax, %ecx
movq 0x60(%rsp), %rax
addl $0x1, %ecx
shll %cl, %edx
movl %edx, %ecx
movslq %ecx, %rcx
andq %rcx, %rax
movq %rax, 0x68(%rsp)
movq 0x140(%rsp), %rax
movq 0x90(%rax), %rdi
callq 0x46ec80
movl %eax, %ecx
movq 0x68(%rsp), %rax
addl $0x1, %ecx
movl %ecx, %ecx
shrq %cl, %rax
movq %rax, 0x118(%rsp)
movq 0x120(%rsp), %rcx
movq 0xd0(%rsp), %rax
movq %rcx, (%rax)
movq 0x108(%rsp), %rcx
movq 0xd0(%rsp), %rax
movq %rcx, 0x8(%rax)
movq $0x1, 0x100(%rsp)
movq 0x140(%rsp), %rax
movq 0x70(%rax), %rdi
movq 0x118(%rsp), %rsi
callq 0x290730
movq %rax, %rcx
xorl %eax, %eax
cmpq $0x1, %rcx
movb %al, 0x4f(%rsp)
jne 0x295e12
movq 0x140(%rsp), %rax
movq 0x70(%rax), %rax
movq %rax, 0x40(%rsp)
movq 0x118(%rsp), %rax
andq $0x1, %rax
cmpq $0x1, %rax
jne 0x295dcc
movq 0x118(%rsp), %rax
subq $0x1, %rax
movq %rax, 0x38(%rsp)
jmp 0x295ddd
movq 0x118(%rsp), %rax
addq $0x1, %rax
movq %rax, 0x38(%rsp)
movq 0x40(%rsp), %rdi
movq 0x38(%rsp), %rsi
callq 0x290730
movq %rax, %rcx
xorl %eax, %eax
cmpq $0x1, %rcx
movb %al, 0x4f(%rsp)
jne 0x295e12
movq 0x100(%rsp), %rax
cmpq 0x138(%rsp), %rax
setbe %al
movb %al, 0x4f(%rsp)
movb 0x4f(%rsp), %al
testb $0x1, %al
jne 0x295e1f
jmp 0x296010
movq 0x100(%rsp), %rax
addq $0x1, %rax
movq %rax, 0x100(%rsp)
movq 0x118(%rsp), %rax
movq %rax, 0x120(%rsp)
movq 0x140(%rsp), %rdi
movq 0x120(%rsp), %rsi
callq 0x296260
movq %rax, 0x108(%rsp)
movq 0x140(%rsp), %rax
movq 0x88(%rax), %rax
movq %rax, 0x18(%rsp)
movq 0x140(%rsp), %rax
movq 0x60(%rax), %rdi
movq 0x120(%rsp), %rsi
callq 0x290730
movq 0x18(%rsp), %rdi
movq %rax, %rsi
addq 0x108(%rsp), %rsi
callq 0x290730
movq %rax, 0x28(%rsp)
movq 0x140(%rsp), %rax
movq 0x80(%rax), %rdi
callq 0x46ec80
movl %eax, %ecx
movl $0x1, %eax
shll %cl, %eax
subl $0x1, %eax
movl %eax, 0x24(%rsp)
movq 0x140(%rsp), %rax
movq 0x90(%rax), %rdi
callq 0x46ec80
movl 0x24(%rsp), %edx
movl %eax, %ecx
movq 0x28(%rsp), %rax
addl $0x1, %ecx
shll %cl, %edx
movl %edx, %ecx
movslq %ecx, %rcx
andq %rcx, %rax
movq %rax, 0x30(%rsp)
movq 0x140(%rsp), %rax
movq 0x90(%rax), %rdi
callq 0x46ec80
movl %eax, %ecx
movq 0x30(%rsp), %rax
addl $0x1, %ecx
movl %ecx, %ecx
shrq %cl, %rax
movq %rax, 0x118(%rsp)
cmpq $0x1, 0x100(%rsp)
jae 0x295f6a
movq 0x3a6067(%rip), %rax    # 0x63bfa0
movq (%rax), %rdi
leaq 0x2800d0(%rip), %rsi    # 0x516013
leaq 0x2ec72b(%rip), %rdx    # 0x582675
leaq 0x2ec70d(%rip), %rcx    # 0x58265e
leaq 0x2ec0e8(%rip), %r8     # 0x582040
movl $0x49c, %r9d            # imm = 0x49C
movb $0x0, %al
callq 0x199f0
callq 0x19370
jmp 0x295f6c
jmp 0x295f6e
movq 0x100(%rsp), %rax
subq $0x1, %rax
cmpq 0x138(%rsp), %rax
jbe 0x295fbc
movq 0x3a6015(%rip), %rax    # 0x63bfa0
movq (%rax), %rdi
leaq 0x28007e(%rip), %rsi    # 0x516013
leaq 0x2ec6e6(%rip), %rdx    # 0x582682
leaq 0x2ec6bb(%rip), %rcx    # 0x58265e
leaq 0x2ec096(%rip), %r8     # 0x582040
movl $0x49d, %r9d            # imm = 0x49D
movb $0x0, %al
callq 0x199f0
callq 0x19370
jmp 0x295fbe
movq 0x120(%rsp), %rcx
movq 0xd0(%rsp), %rax
movq 0x100(%rsp), %rdx
subq $0x1, %rdx
shlq $0x4, %rdx
addq %rdx, %rax
movq %rcx, (%rax)
movq 0x108(%rsp), %rcx
movq 0xd0(%rsp), %rax
movq 0x100(%rsp), %rdx
subq $0x1, %rdx
shlq $0x4, %rdx
addq %rdx, %rax
movq %rcx, 0x8(%rax)
jmp 0x295d6e
movq 0x100(%rsp), %rax
cmpq 0x138(%rsp), %rax
ja 0x296182
testb $0x1, 0xdf(%rsp)
je 0x296053
movq 0x140(%rsp), %rax
movq 0x70(%rax), %rdi
movq 0x118(%rsp), %rsi
callq 0x290730
cmpq $0x0, %rax
jne 0x296182
movq 0xe8(%rsp), %rax
addq $0x1, %rax
movq %rax, 0xe8(%rsp)
movq $0x0, 0xf8(%rsp)
movq 0xf8(%rsp), %rax
cmpq 0x100(%rsp), %rax
jae 0x296180
movq 0x140(%rsp), %rax
movq 0x88(%rax), %rax
movq %rax, 0x8(%rsp)
movq 0x140(%rsp), %rax
movq 0x60(%rax), %rdi
movq 0xd0(%rsp), %rax
movq 0xf8(%rsp), %rcx
shlq $0x4, %rcx
addq %rcx, %rax
movq (%rax), %rsi
callq 0x290730
movq 0xd0(%rsp), %rcx
movq 0xf8(%rsp), %rdx
shlq $0x4, %rdx
addq %rdx, %rcx
addq 0x8(%rcx), %rax
movq %rax, 0x10(%rsp)
movq 0x140(%rsp), %rax
movq 0x88(%rax), %rax
movq %rax, (%rsp)
movq 0x140(%rsp), %rax
movq 0x60(%rax), %rdi
movq 0xd0(%rsp), %rax
movq 0xf8(%rsp), %rcx
shlq $0x4, %rcx
addq %rcx, %rax
movq (%rax), %rsi
callq 0x290730
movq (%rsp), %rdi
movq %rax, %rsi
movq 0xd0(%rsp), %rax
movq 0xf8(%rsp), %rcx
shlq $0x4, %rcx
addq %rcx, %rax
addq 0x8(%rax), %rsi
callq 0x290730
movq 0x8(%rsp), %rdi
movq 0x10(%rsp), %rsi
movq %rax, %rdx
andq $-0x2, %rdx
addq $0x1, %rdx
callq 0x2907d0
movq 0xf8(%rsp), %rax
addq $0x1, %rax
movq %rax, 0xf8(%rsp)
jmp 0x296073
jmp 0x296182
jmp 0x296184
jmp 0x296186
movq 0x110(%rsp), %rax
addq $0x1, %rax
movq %rax, 0x110(%rsp)
jmp 0x295ad7
jmp 0x2961a1
testb $0x1, 0x137(%rsp)
je 0x2961bf
movq 0xe0(%rsp), %rax
addq $0x1, %rax
movq %rax, 0xe0(%rsp)
jmp 0x2961c1
movq 0x128(%rsp), %rax
addq $0x1, %rax
movq %rax, 0x128(%rsp)
jmp 0x2958a6
movq 0xd0(%rsp), %rdi
leaq 0x2ebe57(%rip), %rsi    # 0x582040
movl $0x4b1, %edx            # imm = 0x4B1
callq 0xe88c0
movq 0x140(%rsp), %rdi
callq 0x294da0
movq %rax, 0xf0(%rsp)
testb $0x1, 0x137(%rsp)
je 0x296217
callq 0xfa220
movq 0xe8(%rsp), %rsi
leaq 0x2ec474(%rip), %rdi    # 0x58269a
movb $0x0, %al
callq 0xe7740
movq 0xf0(%rsp), %rsi
leaq 0x2ec46f(%rip), %rdi    # 0x5826ab
movb $0x0, %al
callq 0xe7740
movq 0x140(%rsp), %rdi
callq 0x293800
movq 0xf0(%rsp), %rax
addq $0x148, %rsp            # imm = 0x148
retq