// File: /workspace/github_c_makefile_star2_O2/genometools[P]genometools/src/match/rdj-strgraph.c
// Function: gt_strgraph_redwithrc
GtUword gt_strgraph_redwithrc(GtStrgraph *strgraph, bool show_progressbar)
{
  GtStrgraphVnum vnum;
  GtStrgraphVEdgenum edgenum;
  GtUword counter = 0;
  GtUint64 progress = 0;

  gt_assert(strgraph != NULL);

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

  counter = 0;
  if (show_progressbar)
    gt_progressbar_start(&(progress),
        (GtUint64)GT_STRGRAPH_NOFVERTICES(strgraph));
  for (vnum = 0; vnum < GT_STRGRAPH_NOFVERTICES(strgraph); vnum++)
  {
    if (GT_STRGRAPH_V_OUTDEG(strgraph, vnum) > 0)
    {
      for (edgenum = 0; edgenum < GT_STRGRAPH_V_NOFEDGES(strgraph, vnum);
          edgenum++)
      {
        if (!GT_STRGRAPH_EDGE_IS_REDUCED(strgraph, vnum, edgenum) &&
            GT_STRGRAPH_EDGE_DEST(strgraph, vnum, edgenum) ==
            GT_STRGRAPH_V_OTHER(vnum))
        {
          counter++;
          GT_STRGRAPH_EDGE_REDUCE(strgraph, vnum, edgenum);
          GT_STRGRAPH_V_DEC_OUTDEG(strgraph, vnum);
        }
      }
    }
    if (show_progressbar)
      progress++;
  }
  if (show_progressbar)
    gt_progressbar_stop();

  gt_log_log("withrc-matches counter: "GT_WU"", counter);
  /* withrc matches shoud be found twice, check number is even */
  gt_assert((counter & 1) == 0);
#ifndef NDEBUG
  gt_strgraph_check_outdegs(strgraph);
#endif
  return (counter >> 1);
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x38, %rsp
andq $0x0, 0x18(%rsp)
testq %rdi, %rdi
je 0x181e4d
movl %esi, %ebp
movq %rdi, %rbx
testb %bpl, %bpl
je 0x181c0d
movq 0x80(%rbx), %rsi
leaq 0x18(%rsp), %r14
movq %r14, %rdi
callq 0x9c79c
movq 0x80(%rbx), %rsi
movq %r14, %rdi
callq 0x9c79c
xorl %r15d, %r15d
pushq $-0x1
popq %r14
movq $0x0, 0x8(%rsp)
movl %ebp, 0x4(%rsp)
cmpq 0x80(%rbx), %r15
jae 0x181e0a
movq 0x70(%rbx), %rdi
movq %r15, %rsi
callq 0x17ffcd
testq %rax, %rax
je 0x181df8
leaq 0x1(%r15), %rbp
leaq -0x1(%r15), %rax
testb $0x1, %r15b
cmoveq %rbp, %rax
movq %rax, 0x30(%rsp)
xorl %r12d, %r12d
movq %rbp, 0x10(%rsp)
movq 0x60(%rbx), %rdi
movq %rbp, %rsi
callq 0x17ffcd
movq %rax, %r13
movq 0x60(%rbx), %rdi
movq %r15, %rsi
callq 0x17ffcd
subq %rax, %r13
cmpq %r13, %r12
jae 0x181df4
movq 0x60(%rbx), %rdi
movq 0x88(%rbx), %r13
movq %r15, %rsi
callq 0x17ffcd
leaq (%rax,%r12), %rsi
movq %r13, %rdi
callq 0x17ffcd
movq %rax, %r13
movq 0x90(%rbx), %rdi
callq 0x28a939
movl %r14d, %edx
movl %eax, %ecx
shll %cl, %edx
notl %edx
addl %edx, %edx
movslq %edx, %rax
andq %r13, %rax
shrq %rax
cmpq 0x90(%rbx), %rax
je 0x181dec
movq 0x60(%rbx), %rdi
movq 0x88(%rbx), %r13
movq %r15, %rsi
callq 0x17ffcd
leaq (%rax,%r12), %rsi
movq %r13, %rdi
callq 0x17ffcd
movq %rax, %r13
movq 0x80(%rbx), %rdi
callq 0x28a939
movl %r14d, %ebp
movl %eax, %ecx
shll %cl, %ebp
notl %ebp
movq 0x90(%rbx), %rdi
callq 0x28a939
leal 0x1(%rax), %ecx
shll %cl, %ebp
movslq %ebp, %r14
andq %r13, %r14
movq 0x90(%rbx), %rdi
callq 0x28a939
leal 0x1(%rax), %ecx
shrq %cl, %r14
cmpq 0x30(%rsp), %r14
jne 0x181de3
incq 0x8(%rsp)
movq 0x60(%rbx), %rdi
movq 0x88(%rbx), %rax
movq %rax, 0x28(%rsp)
movq %r15, %rsi
callq 0x17ffcd
addq %r12, %rax
movq %rax, 0x20(%rsp)
movq 0x90(%rbx), %rdi
callq 0x28a939
pushq $-0x1
popq %rbp
movl %ebp, %edx
movl %eax, %ecx
shll %cl, %edx
notl %edx
addl %edx, %edx
notl %edx
movslq %edx, %r13
movq 0x60(%rbx), %rdi
movq 0x88(%rbx), %r14
movq %r15, %rsi
callq 0x17ffcd
leaq (%rax,%r12), %rsi
movq %r14, %rdi
callq 0x17ffcd
andq %r13, %rax
movq 0x90(%rbx), %rcx
leaq (%rax,%rcx,2), %rdx
movq 0x28(%rsp), %rdi
movq 0x20(%rsp), %rsi
callq 0x180026
movq 0x70(%rbx), %r14
movq %r14, %rdi
movq %r15, %rsi
callq 0x17ffcd
leaq -0x1(%rax), %rdx
movq %r14, %rdi
movq %r15, %rsi
callq 0x180026
movl %ebp, %r14d
jmp 0x181de7
pushq $-0x1
popq %r14
movq 0x10(%rsp), %rbp
incq %r12
jmp 0x181c60
movl 0x4(%rsp), %ebp
testb %bpl, %bpl
je 0x181e02
incq 0x18(%rsp)
incq %r15
jmp 0x181c21
testb %bpl, %bpl
je 0x181e14
callq 0x9cce9
leaq 0x1cde97(%rip), %rdi    # 0x34fcb2
movq 0x8(%rsp), %r14
movq %r14, %rsi
xorl %eax, %eax
callq 0x92a82
testb $0x1, %r14b
jne 0x181e7b
movq %rbx, %rdi
callq 0x181ac4
shrq %r14
movq %r14, %rax
addq $0x38, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movq 0x2b6114(%rip), %rax    # 0x437f68
movq (%rax), %rdi
leaq 0x1631b5(%rip), %rsi    # 0x2e5013
leaq 0x1cd9d4(%rip), %rdx    # 0x34f839
leaq 0x1cde30(%rip), %rcx    # 0x34fc9c
leaq 0x1cd902(%rip), %r8     # 0x34f775
movl $0x3b1, %r9d            # imm = 0x3B1
jmp 0x181ea7
movq 0x2b60e6(%rip), %rax    # 0x437f68
movq (%rax), %rdi
leaq 0x163187(%rip), %rsi    # 0x2e5013
leaq 0x1cddf6(%rip), %rdx    # 0x34fc89
leaq 0x1cde02(%rip), %rcx    # 0x34fc9c
leaq 0x1cd8d4(%rip), %r8     # 0x34f775
movl $0x3d4, %r9d            # imm = 0x3D4
xorl %eax, %eax
callq 0x17a50
callq 0x17390