// File: /workspace/github_c_makefile_star2_O3/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:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x38, %rsp
movq $0x0, 0x18(%rsp)
testq %rdi, %rdi
je 0x1d0e71
movl %esi, %ebp
movq %rdi, %rbx
testb %bpl, %bpl
je 0x1d09f4
movq 0x80(%rbx), %rsi
leaq 0x18(%rsp), %rdi
callq 0x10ba28
cmpq $0x0, 0x80(%rbx)
je 0x1d0def
xorl %r13d, %r13d
xorl %r12d, %r12d
movl %ebp, 0x14(%rsp)
movq 0x70(%rbx), %rax
testq %rax, %rax
je 0x1d0e6c
cmpq %r12, 0x8(%rax)
jbe 0x1d0e6c
movl 0x10(%rax), %edx
cmpq $0x41, %rdx
jae 0x1d0e6c
movq (%rax), %rdi
movq %rdx, %rsi
imulq %r12, %rsi
callq 0x2f37dc
testq %rax, %rax
je 0x1d0dd3
movq 0x60(%rbx), %rax
testq %rax, %rax
je 0x1d0e35
leaq 0x1(%r12), %r14
xorl %ebp, %ebp
movq %r14, 0x8(%rsp)
movq %r12, 0x20(%rsp)
cmpq %r14, 0x8(%rax)
jbe 0x1d0e35
movl 0x10(%rax), %edx
cmpq $0x41, %rdx
jae 0x1d0e35
movq (%rax), %rdi
movq %rdx, %rsi
imulq %r14, %rsi
callq 0x2f37dc
movq %rax, %r15
movq 0x60(%rbx), %rax
testq %rax, %rax
je 0x1d0e30
cmpq %r12, 0x8(%rax)
jbe 0x1d0e30
movl 0x10(%rax), %edx
cmpq $0x41, %rdx
jae 0x1d0e30
movq (%rax), %rdi
movq %rdx, %rsi
imulq %r12, %rsi
callq 0x2f37dc
subq %rax, %r15
cmpq %r15, %rbp
jae 0x1d0dcf
movq 0x60(%rbx), %rax
testq %rax, %rax
je 0x1d0e3f
cmpq %r12, 0x8(%rax)
jbe 0x1d0e3f
movl 0x10(%rax), %edx
cmpq $0x41, %rdx
jae 0x1d0e3f
movq 0x88(%rbx), %r14
movq (%rax), %rdi
movq %rdx, %rsi
imulq %r12, %rsi
callq 0x2f37dc
testq %r14, %r14
je 0x1d0e3a
addq %rbp, %rax
cmpq %rax, 0x8(%r14)
jbe 0x1d0e3a
movl 0x10(%r14), %edx
cmpq $0x41, %rdx
jae 0x1d0e3a
movq (%r14), %rdi
imulq %rdx, %rax
movq %rax, %rsi
callq 0x2f37dc
movq %rax, %r15
movq 0x90(%rbx), %rdi
callq 0x2f09dd
movl $0xffffffff, %edx       # imm = 0xFFFFFFFF
movl %eax, %ecx
shll %cl, %edx
notl %edx
addl %edx, %edx
movslq %edx, %rax
andq %r15, %rax
shrq %rax
cmpq 0x90(%rbx), %rax
je 0x1d0db8
movq 0x60(%rbx), %rax
testq %rax, %rax
je 0x1d0e44
cmpq %r12, 0x8(%rax)
jbe 0x1d0e44
movl 0x10(%rax), %edx
cmpq $0x41, %rdx
jae 0x1d0e44
movq 0x88(%rbx), %r14
movq (%rax), %rdi
movq %rdx, %rsi
imulq %r12, %rsi
callq 0x2f37dc
testq %r14, %r14
je 0x1d0e49
addq %rbp, %rax
cmpq %rax, 0x8(%r14)
jbe 0x1d0e49
movl 0x10(%r14), %edx
cmpq $0x41, %rdx
jae 0x1d0e49
movq (%r14), %rdi
imulq %rdx, %rax
movq %rax, %rsi
callq 0x2f37dc
movq %rax, %r15
movq 0x80(%rbx), %rdi
callq 0x2f09dd
movl $0xffffffff, %r14d      # imm = 0xFFFFFFFF
movl %eax, %ecx
shll %cl, %r14d
notl %r14d
movq 0x90(%rbx), %rdi
callq 0x2f09dd
leal 0x1(%rax), %ecx
shll %cl, %r14d
movslq %r14d, %r14
andq %r15, %r14
movq 0x90(%rbx), %rdi
callq 0x2f09dd
leal 0x1(%rax), %ecx
shrq %cl, %r14
cmpq %r12, %r14
jne 0x1d0db8
movq 0x60(%rbx), %rax
testq %rax, %rax
je 0x1d0e53
cmpq %r12, 0x8(%rax)
jbe 0x1d0e53
movl 0x10(%rax), %edx
cmpq $0x41, %rdx
jae 0x1d0e53
movq %r13, 0x28(%rsp)
movq 0x88(%rbx), %r14
movq (%rax), %rdi
movq %rdx, %rsi
imulq %r12, %rsi
callq 0x2f37dc
movq %rax, %r15
movq 0x90(%rbx), %rdi
callq 0x2f09dd
movl $0xffffffff, %r13d      # imm = 0xFFFFFFFF
movl %eax, %ecx
shll %cl, %r13d
movq 0x60(%rbx), %rax
testq %rax, %rax
je 0x1d0e4e
cmpq %r12, 0x8(%rax)
jbe 0x1d0e4e
movl 0x10(%rax), %edx
cmpq $0x41, %rdx
jae 0x1d0e4e
movq %r14, 0x30(%rsp)
movq 0x88(%rbx), %r14
movq (%rax), %rdi
movq %rdx, %rsi
imulq %r12, %rsi
callq 0x2f37dc
testq %r14, %r14
je 0x1d0e62
addq %rbp, %rax
cmpq %rax, 0x8(%r14)
jbe 0x1d0e62
movl 0x10(%r14), %edx
cmpq $0x41, %rdx
jae 0x1d0e62
movq (%r14), %rdi
imulq %rdx, %rax
movq %rax, %rsi
callq 0x2f37dc
movq 0x30(%rsp), %r12
testq %r12, %r12
je 0x1d0e58
addq %rbp, %r15
cmpq %r15, 0x8(%r12)
jbe 0x1d0e58
movl 0x10(%r12), %edx
cmpq $0x41, %rdx
jae 0x1d0e58
notl %r13d
addl %r13d, %r13d
notl %r13d
movslq %r13d, %rcx
andq %rcx, %rax
movq 0x90(%rbx), %rcx
leaq (%rax,%rcx,2), %rcx
movq (%r12), %rdi
imulq %rdx, %r15
movq %r15, %rsi
callq 0x2f388c
movq 0x70(%rbx), %r14
testq %r14, %r14
movq 0x20(%rsp), %r12
je 0x1d0e5d
cmpq %r12, 0x8(%r14)
jbe 0x1d0e5d
movl 0x10(%r14), %edx
cmpq $0x41, %rdx
jae 0x1d0e5d
movq (%r14), %rdi
movq %rdx, %rsi
imulq %r12, %rsi
callq 0x2f37dc
cmpq %r12, 0x8(%r14)
jbe 0x1d0e67
movl 0x10(%r14), %edx
cmpq $0x41, %rdx
jae 0x1d0e67
movq 0x28(%rsp), %r13
incq %r13
decq %rax
movq (%r14), %rdi
movq %rdx, %rsi
imulq %r12, %rsi
movq %rax, %rcx
callq 0x2f388c
movq 0x8(%rsp), %r14
incq %rbp
movq 0x60(%rbx), %rax
testq %rax, %rax
jne 0x1d0a66
jmp 0x1d0e35
movl 0x14(%rsp), %ebp
testb %bpl, %bpl
je 0x1d0ddd
incq 0x18(%rsp)
incq %r12
cmpq 0x80(%rbx), %r12
jb 0x1d0a0c
jmp 0x1d0df2
xorl %r13d, %r13d
testb %bpl, %bpl
je 0x1d0dfc
callq 0x10bf8a
leaq 0x1dea24(%rip), %rdi    # 0x3af827
movq %r13, %rsi
xorl %eax, %eax
callq 0x103d72
testb $0x1, %r13b
jne 0x1d0e76
movq %rbx, %rdi
callq 0x1d0e7b
shrq %r13
movq %r13, %rax
addq $0x38, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
callq 0x6d697
callq 0x6d6d0
callq 0x6d625
callq 0x6d65e
callq 0x6d5ec
callq 0x6d5b3
callq 0x6d541
callq 0x6d57a
callq 0x6d4cf
callq 0x6d496
callq 0x6d508
callq 0x6d45d
callq 0x6d709
callq 0x6d77b
callq 0x6d742