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

  gt_assert(strgraph != NULL);

  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) == 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("self-matches counter: "GT_WU"", counter);
  /* self 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:
subq $0xa8, %rsp
movb %sil, %al
movq %rdi, 0xa0(%rsp)
andb $0x1, %al
movb %al, 0x9f(%rsp)
movq $0x0, 0x80(%rsp)
movq $0x0, 0x78(%rsp)
cmpq $0x0, 0xa0(%rsp)
jne 0x293383
movq 0x3a8c4e(%rip), %rax    # 0x63bfa0
movq (%rax), %rdi
leaq 0x282cb7(%rip), %rsi    # 0x516013
leaq 0x2eeda1(%rip), %rdx    # 0x582104
leaq 0x2ef1fb(%rip), %rcx    # 0x582565
leaq 0x2eeccf(%rip), %r8     # 0x582040
movl $0x384, %r9d            # imm = 0x384
movb $0x0, %al
callq 0x199f0
callq 0x19370
jmp 0x293385
movq $0x0, 0x80(%rsp)
testb $0x1, 0x9f(%rsp)
je 0x2933b4
movq 0xa0(%rsp), %rax
movq 0x80(%rax), %rsi
leaq 0x78(%rsp), %rdi
callq 0xf9830
movq $0x0, 0x90(%rsp)
movq 0x90(%rsp), %rax
movq 0xa0(%rsp), %rcx
cmpq 0x80(%rcx), %rax
jae 0x293762
movq 0xa0(%rsp), %rax
movq 0x70(%rax), %rdi
movq 0x90(%rsp), %rsi
callq 0x290730
cmpq $0x0, %rax
jbe 0x29372f
movq $0x0, 0x88(%rsp)
movq 0x88(%rsp), %rax
movq %rax, 0x70(%rsp)
movq 0xa0(%rsp), %rax
movq 0x60(%rax), %rdi
movq 0x90(%rsp), %rsi
addq $0x1, %rsi
callq 0x290730
movq %rax, 0x68(%rsp)
movq 0xa0(%rsp), %rax
movq 0x60(%rax), %rdi
movq 0x90(%rsp), %rsi
callq 0x290730
movq 0x68(%rsp), %rcx
movq %rax, %rdx
movq 0x70(%rsp), %rax
subq %rdx, %rcx
cmpq %rcx, %rax
jae 0x29372d
movq 0xa0(%rsp), %rax
movq 0x88(%rax), %rax
movq %rax, 0x58(%rsp)
movq 0xa0(%rsp), %rax
movq 0x60(%rax), %rdi
movq 0x90(%rsp), %rsi
callq 0x290730
movq 0x58(%rsp), %rdi
movq %rax, %rsi
addq 0x88(%rsp), %rsi
callq 0x290730
movq %rax, 0x60(%rsp)
movq 0xa0(%rsp), %rax
movq 0x90(%rax), %rdi
callq 0x46ec80
movl %eax, %ecx
movq 0x60(%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 0xa0(%rsp), %rcx
cmpq 0x90(%rcx), %rax
jne 0x293503
movb $0x1, %al
testb $0x1, %al
jne 0x293712
jmp 0x29350f
xorl %eax, %eax
testb $0x1, %al
jne 0x293712
jmp 0x29350f
movq 0xa0(%rsp), %rax
movq 0x88(%rax), %rax
movq %rax, 0x38(%rsp)
movq 0xa0(%rsp), %rax
movq 0x60(%rax), %rdi
movq 0x90(%rsp), %rsi
callq 0x290730
movq 0x38(%rsp), %rdi
movq %rax, %rsi
addq 0x88(%rsp), %rsi
callq 0x290730
movq %rax, 0x48(%rsp)
movq 0xa0(%rsp), %rax
movq 0x80(%rax), %rdi
callq 0x46ec80
movl %eax, %ecx
movl $0x1, %eax
shll %cl, %eax
subl $0x1, %eax
movl %eax, 0x44(%rsp)
movq 0xa0(%rsp), %rax
movq 0x90(%rax), %rdi
callq 0x46ec80
movl 0x44(%rsp), %edx
movl %eax, %ecx
movq 0x48(%rsp), %rax
addl $0x1, %ecx
shll %cl, %edx
movl %edx, %ecx
movslq %ecx, %rcx
andq %rcx, %rax
movq %rax, 0x50(%rsp)
movq 0xa0(%rsp), %rax
movq 0x90(%rax), %rdi
callq 0x46ec80
movl %eax, %ecx
movq 0x50(%rsp), %rax
addl $0x1, %ecx
movl %ecx, %ecx
shrq %cl, %rax
cmpq 0x90(%rsp), %rax
jne 0x293712
movq 0x80(%rsp), %rax
addq $0x1, %rax
movq %rax, 0x80(%rsp)
movq 0xa0(%rsp), %rax
movq 0x88(%rax), %rax
movq %rax, 0x18(%rsp)
movq 0xa0(%rsp), %rax
movq 0x60(%rax), %rdi
movq 0x90(%rsp), %rsi
callq 0x290730
addq 0x88(%rsp), %rax
movq %rax, 0x20(%rsp)
movq 0xa0(%rsp), %rax
movq 0x90(%rax), %rdi
callq 0x46ec80
movl %eax, %ecx
movl $0x1, %eax
shll %cl, %eax
subl $0x1, %eax
shll %eax
cltq
xorq $-0x1, %rax
movq %rax, 0x10(%rsp)
movq 0xa0(%rsp), %rax
movq 0x88(%rax), %rax
movq %rax, 0x8(%rsp)
movq 0xa0(%rsp), %rax
movq 0x60(%rax), %rdi
movq 0x90(%rsp), %rsi
callq 0x290730
movq 0x8(%rsp), %rdi
movq %rax, %rsi
addq 0x88(%rsp), %rsi
callq 0x290730
movq 0x10(%rsp), %rdx
movq 0x18(%rsp), %rdi
movq 0x20(%rsp), %rsi
andq %rax, %rdx
movq 0xa0(%rsp), %rax
movq 0x90(%rax), %rax
shlq %rax
addq %rax, %rdx
callq 0x2907d0
movq 0xa0(%rsp), %rax
movq 0x70(%rax), %rax
movq %rax, 0x28(%rsp)
movq 0x90(%rsp), %rax
movq %rax, 0x30(%rsp)
movq 0xa0(%rsp), %rax
movq 0x70(%rax), %rdi
movq 0x90(%rsp), %rsi
callq 0x290730
movq 0x28(%rsp), %rdi
movq 0x30(%rsp), %rsi
movq %rax, %rdx
subq $0x1, %rdx
callq 0x2907d0
jmp 0x293714
movq 0x88(%rsp), %rax
addq $0x1, %rax
movq %rax, 0x88(%rsp)
jmp 0x29340c
jmp 0x29372f
testb $0x1, 0x9f(%rsp)
je 0x293747
movq 0x78(%rsp), %rax
addq $0x1, %rax
movq %rax, 0x78(%rsp)
jmp 0x293749
movq 0x90(%rsp), %rax
addq $0x1, %rax
movq %rax, 0x90(%rsp)
jmp 0x2933c0
testb $0x1, 0x9f(%rsp)
je 0x293771
callq 0xfa220
movq 0x80(%rsp), %rsi
leaq 0x2eedf9(%rip), %rdi    # 0x582579
movb $0x0, %al
callq 0xe7740
movq 0x80(%rsp), %rax
andq $0x1, %rax
cmpq $0x0, %rax
je 0x2937d1
movq 0x3a8800(%rip), %rax    # 0x63bfa0
movq (%rax), %rdi
leaq 0x282869(%rip), %rsi    # 0x516013
leaq 0x2eede2(%rip), %rdx    # 0x582593
leaq 0x2eedad(%rip), %rcx    # 0x582565
leaq 0x2ee881(%rip), %r8     # 0x582040
movl $0x3a2, %r9d            # imm = 0x3A2
movb $0x0, %al
callq 0x199f0
callq 0x19370
jmp 0x2937d3
movq 0xa0(%rsp), %rdi
callq 0x293800
movq 0x80(%rsp), %rax
shrq %rax
addq $0xa8, %rsp
retq
nopw %cs:(%rax,%rax)