// File: /workspace/github_c_makefile_star2_O1/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 0x1da5de
movl %esi, %ebp
movq %rdi, %rbx
testb %bpl, %bpl
je 0x1da161
movq 0x80(%rbx), %rsi
leaq 0x18(%rsp), %rdi
callq 0x110c6c
cmpq $0x0, 0x80(%rbx)
je 0x1da55c
xorl %r13d, %r13d
xorl %r12d, %r12d
movl %ebp, 0x14(%rsp)
movq 0x70(%rbx), %rax
testq %rax, %rax
je 0x1da5d9
cmpq %r12, 0x8(%rax)
jbe 0x1da5d9
movl 0x10(%rax), %edx
cmpq $0x41, %rdx
jae 0x1da5d9
movq (%rax), %rdi
movq %rdx, %rsi
imulq %r12, %rsi
callq 0x2fcc2c
testq %rax, %rax
je 0x1da540
movq 0x60(%rbx), %rax
testq %rax, %rax
je 0x1da5a2
leaq 0x1(%r12), %r14
xorl %ebp, %ebp
movq %r14, 0x8(%rsp)
movq %r12, 0x20(%rsp)
cmpq %r14, 0x8(%rax)
jbe 0x1da5a2
movl 0x10(%rax), %edx
cmpq $0x41, %rdx
jae 0x1da5a2
movq (%rax), %rdi
movq %rdx, %rsi
imulq %r14, %rsi
callq 0x2fcc2c
movq %rax, %r15
movq 0x60(%rbx), %rax
testq %rax, %rax
je 0x1da59d
cmpq %r12, 0x8(%rax)
jbe 0x1da59d
movl 0x10(%rax), %edx
cmpq $0x41, %rdx
jae 0x1da59d
movq (%rax), %rdi
movq %rdx, %rsi
imulq %r12, %rsi
callq 0x2fcc2c
subq %rax, %r15
cmpq %r15, %rbp
jae 0x1da53c
movq 0x60(%rbx), %rax
testq %rax, %rax
je 0x1da5ac
cmpq %r12, 0x8(%rax)
jbe 0x1da5ac
movl 0x10(%rax), %edx
cmpq $0x41, %rdx
jae 0x1da5ac
movq 0x88(%rbx), %r14
movq (%rax), %rdi
movq %rdx, %rsi
imulq %r12, %rsi
callq 0x2fcc2c
testq %r14, %r14
je 0x1da5a7
addq %rbp, %rax
cmpq %rax, 0x8(%r14)
jbe 0x1da5a7
movl 0x10(%r14), %edx
cmpq $0x41, %rdx
jae 0x1da5a7
movq (%r14), %rdi
imulq %rdx, %rax
movq %rax, %rsi
callq 0x2fcc2c
movq %rax, %r15
movq 0x90(%rbx), %rdi
callq 0x2f9d41
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 0x1da525
movq 0x60(%rbx), %rax
testq %rax, %rax
je 0x1da5b1
cmpq %r12, 0x8(%rax)
jbe 0x1da5b1
movl 0x10(%rax), %edx
cmpq $0x41, %rdx
jae 0x1da5b1
movq 0x88(%rbx), %r14
movq (%rax), %rdi
movq %rdx, %rsi
imulq %r12, %rsi
callq 0x2fcc2c
testq %r14, %r14
je 0x1da5b6
addq %rbp, %rax
cmpq %rax, 0x8(%r14)
jbe 0x1da5b6
movl 0x10(%r14), %edx
cmpq $0x41, %rdx
jae 0x1da5b6
movq (%r14), %rdi
imulq %rdx, %rax
movq %rax, %rsi
callq 0x2fcc2c
movq %rax, %r15
movq 0x80(%rbx), %rdi
callq 0x2f9d41
movl $0xffffffff, %r14d      # imm = 0xFFFFFFFF
movl %eax, %ecx
shll %cl, %r14d
notl %r14d
movq 0x90(%rbx), %rdi
callq 0x2f9d41
leal 0x1(%rax), %ecx
shll %cl, %r14d
movslq %r14d, %r14
andq %r15, %r14
movq 0x90(%rbx), %rdi
callq 0x2f9d41
leal 0x1(%rax), %ecx
shrq %cl, %r14
cmpq %r12, %r14
jne 0x1da525
movq 0x60(%rbx), %rax
testq %rax, %rax
je 0x1da5c0
cmpq %r12, 0x8(%rax)
jbe 0x1da5c0
movl 0x10(%rax), %edx
cmpq $0x41, %rdx
jae 0x1da5c0
movq %r13, 0x28(%rsp)
movq 0x88(%rbx), %r14
movq (%rax), %rdi
movq %rdx, %rsi
imulq %r12, %rsi
callq 0x2fcc2c
movq %rax, %r15
movq 0x90(%rbx), %rdi
callq 0x2f9d41
movl $0xffffffff, %r13d      # imm = 0xFFFFFFFF
movl %eax, %ecx
shll %cl, %r13d
movq 0x60(%rbx), %rax
testq %rax, %rax
je 0x1da5bb
cmpq %r12, 0x8(%rax)
jbe 0x1da5bb
movl 0x10(%rax), %edx
cmpq $0x41, %rdx
jae 0x1da5bb
movq %r14, 0x30(%rsp)
movq 0x88(%rbx), %r14
movq (%rax), %rdi
movq %rdx, %rsi
imulq %r12, %rsi
callq 0x2fcc2c
testq %r14, %r14
je 0x1da5cf
addq %rbp, %rax
cmpq %rax, 0x8(%r14)
jbe 0x1da5cf
movl 0x10(%r14), %edx
cmpq $0x41, %rdx
jae 0x1da5cf
movq (%r14), %rdi
imulq %rdx, %rax
movq %rax, %rsi
callq 0x2fcc2c
movq 0x30(%rsp), %r12
testq %r12, %r12
je 0x1da5c5
addq %rbp, %r15
cmpq %r15, 0x8(%r12)
jbe 0x1da5c5
movl 0x10(%r12), %edx
cmpq $0x41, %rdx
jae 0x1da5c5
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 0x2fcd13
movq 0x70(%rbx), %r14
testq %r14, %r14
movq 0x20(%rsp), %r12
je 0x1da5ca
cmpq %r12, 0x8(%r14)
jbe 0x1da5ca
movl 0x10(%r14), %edx
cmpq $0x41, %rdx
jae 0x1da5ca
movq (%r14), %rdi
movq %rdx, %rsi
imulq %r12, %rsi
callq 0x2fcc2c
cmpq %r12, 0x8(%r14)
jbe 0x1da5d4
movl 0x10(%r14), %edx
cmpq $0x41, %rdx
jae 0x1da5d4
movq 0x28(%rsp), %r13
incq %r13
decq %rax
movq (%r14), %rdi
movq %rdx, %rsi
imulq %r12, %rsi
movq %rax, %rcx
callq 0x2fcd13
movq 0x8(%rsp), %r14
incq %rbp
movq 0x60(%rbx), %rax
testq %rax, %rax
jne 0x1da1d3
jmp 0x1da5a2
movl 0x14(%rsp), %ebp
testb %bpl, %bpl
je 0x1da54a
incq 0x18(%rsp)
incq %r12
cmpq 0x80(%rbx), %r12
jb 0x1da179
jmp 0x1da55f
xorl %r13d, %r13d
testb %bpl, %bpl
je 0x1da569
callq 0x111189
leaq 0x1de8b7(%rip), %rdi    # 0x3b8e27
movq %r13, %rsi
xorl %eax, %eax
callq 0x108e02
testb $0x1, %r13b
jne 0x1da5e3
movq %rbx, %rdi
callq 0x1da5e8
shrq %r13
movq %r13, %rax
addq $0x38, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
callq 0x6f29e
callq 0x6f2d7
callq 0x6f22c
callq 0x6f265
callq 0x6f1f3
callq 0x6f1ba
callq 0x6f148
callq 0x6f181
callq 0x6f0d6
callq 0x6f09d
callq 0x6f10f
callq 0x6f064
callq 0x6f310
callq 0x6f382
callq 0x6f349