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

  gt_assert(strgraph != NULL);
  gt_assert(strgraph->state == GT_STRGRAPH_SORTED_BY_L);

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

  for (i = 0; i < GT_STRGRAPH_NOFVERTICES(strgraph); i++)
    GT_STRGRAPH_V_SET_MARK(strgraph, i, GT_STRGRAPH_V_VACANT);

  for (i = 0; i < GT_STRGRAPH_NOFVERTICES(strgraph); i++)
  {
    if (GT_STRGRAPH_V_OUTDEG(strgraph, i) > 0)
    {
      for (j = 0; j < GT_STRGRAPH_V_NOFEDGES(strgraph, i); j++)
      {
        if (GT_STRGRAPH_EDGE_IS_REDUCED(strgraph, i, j))
          continue;
        if (GT_STRGRAPH_V_MARK(strgraph, GT_STRGRAPH_EDGE_DEST(strgraph, i, j))
              == GT_STRGRAPH_V_INPLAY)
        {
          counter++;
          GT_STRGRAPH_EDGE_REDUCE(strgraph, i, j);
          GT_STRGRAPH_V_DEC_OUTDEG(strgraph, i);
        }
        GT_STRGRAPH_V_SET_MARK(strgraph, i, GT_STRGRAPH_V_INPLAY);
      }
      for (j = 0; j < GT_STRGRAPH_V_NOFEDGES(strgraph, i); j++)
      {
        GT_STRGRAPH_V_SET_MARK(strgraph, GT_STRGRAPH_EDGE_DEST(strgraph, i, j),
            GT_STRGRAPH_V_VACANT);
      }
    }
    if (show_progressbar)
      progress++;
  }
  if (show_progressbar)
    gt_progressbar_stop();
  gt_log_log("submaximal counter: "GT_WU"", counter);
  /* nonmax spm 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 $0x28, %rsp
movl %esi, 0x4(%rsp)
movq $0x0, 0x18(%rsp)
testq %rdi, %rdi
je 0x1dc64b
movq %rdi, %rbx
cmpl $0x2, 0x10(%rdi)
jne 0x1dc650
cmpb $0x0, 0x4(%rsp)
je 0x1dbf77
movq 0x80(%rbx), %rsi
leaq 0x18(%rsp), %rdi
callq 0x110c6c
cmpq $0x0, 0x80(%rbx)
je 0x1dbfc5
xorl %r14d, %r14d
movq 0x58(%rbx), %rax
testq %rax, %rax
je 0x1dc641
cmpq %r14, 0x8(%rax)
jbe 0x1dc641
movl 0x10(%rax), %edx
cmpq $0x41, %rdx
jae 0x1dc641
movq (%rax), %rdi
movq %rdx, %rsi
imulq %r14, %rsi
xorl %ecx, %ecx
callq 0x2fcd13
incq %r14
cmpq 0x80(%rbx), %r14
jb 0x1dbf84
cmpq $0x0, 0x80(%rbx)
je 0x1dc590
movq $0x0, 0x8(%rsp)
xorl %r13d, %r13d
movq 0x70(%rbx), %rax
testq %rax, %rax
je 0x1dc646
cmpq %r13, 0x8(%rax)
jbe 0x1dc646
movl 0x10(%rax), %edx
cmpq $0x41, %rdx
jae 0x1dc646
movq (%rax), %rdi
movq %rdx, %rsi
imulq %r13, %rsi
callq 0x2fcc2c
testq %rax, %rax
je 0x1dc572
movq 0x60(%rbx), %rax
testq %rax, %rax
je 0x1dc5e7
leaq 0x1(%r13), %r12
xorl %r14d, %r14d
movq %r12, 0x10(%rsp)
cmpq %r12, 0x8(%rax)
jbe 0x1dc5e7
movl 0x10(%rax), %edx
cmpq $0x41, %rdx
jae 0x1dc5e7
movq (%rax), %rdi
movq %rdx, %rsi
imulq %r12, %rsi
callq 0x2fcc2c
movq %rax, %r15
movq 0x60(%rbx), %rax
testq %rax, %rax
je 0x1dc5e2
cmpq %r13, 0x8(%rax)
jbe 0x1dc5e2
movl 0x10(%rax), %edx
cmpq $0x41, %rdx
jae 0x1dc5e2
movq (%rax), %rdi
movq %rdx, %rsi
imulq %r13, %rsi
callq 0x2fcc2c
subq %rax, %r15
cmpq %r15, %r14
jae 0x1dc3f9
movq 0x60(%rbx), %rax
testq %rax, %rax
je 0x1dc5fb
cmpq %r13, 0x8(%rax)
jbe 0x1dc5fb
movl 0x10(%rax), %edx
cmpq $0x41, %rdx
jae 0x1dc5fb
movq 0x88(%rbx), %r15
movq (%rax), %rdi
movq %rdx, %rsi
imulq %r13, %rsi
callq 0x2fcc2c
testq %r15, %r15
je 0x1dc5f6
addq %r14, %rax
cmpq %rax, 0x8(%r15)
jbe 0x1dc5f6
movl 0x10(%r15), %edx
cmpq $0x41, %rdx
jae 0x1dc5f6
movq (%r15), %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 0x1dc3e4
movq 0x60(%rbx), %rax
testq %rax, %rax
je 0x1dc619
cmpq %r13, 0x8(%rax)
jbe 0x1dc619
movl 0x10(%rax), %edx
cmpq $0x41, %rdx
jae 0x1dc619
movq 0x58(%rbx), %rbp
movq 0x88(%rbx), %r15
movq (%rax), %rdi
movq %rdx, %rsi
imulq %r13, %rsi
callq 0x2fcc2c
testq %r15, %r15
je 0x1dc60f
addq %r14, %rax
cmpq %rax, 0x8(%r15)
jbe 0x1dc60f
movl 0x10(%r15), %edx
cmpq $0x41, %rdx
jae 0x1dc60f
movq (%r15), %rdi
imulq %rdx, %rax
movq %rax, %rsi
callq 0x2fcc2c
movq %rax, %r12
movq 0x80(%rbx), %rdi
callq 0x2f9d41
movl $0xffffffff, %r15d      # imm = 0xFFFFFFFF
movl %eax, %ecx
shll %cl, %r15d
notl %r15d
movq 0x90(%rbx), %rdi
callq 0x2f9d41
leal 0x1(%rax), %ecx
shll %cl, %r15d
movslq %r15d, %r15
andq %r12, %r15
movq 0x90(%rbx), %rdi
callq 0x2f9d41
leal 0x1(%rax), %ecx
shrq %cl, %r15
testq %rbp, %rbp
je 0x1dc614
cmpq %r15, 0x8(%rbp)
jbe 0x1dc614
movl 0x10(%rbp), %edx
cmpq $0x41, %rdx
jae 0x1dc614
movq (%rbp), %rdi
imulq %rdx, %r15
movq %r15, %rsi
callq 0x2fcc2c
cmpl $0x1, %eax
jne 0x1dc3a7
movq 0x60(%rbx), %rax
testq %rax, %rax
je 0x1dc623
cmpq %r13, 0x8(%rax)
jbe 0x1dc623
movl 0x10(%rax), %edx
cmpq $0x41, %rdx
jae 0x1dc623
movq 0x88(%rbx), %r12
movq (%rax), %rdi
movq %rdx, %rsi
imulq %r13, %rsi
callq 0x2fcc2c
movq %rax, %r15
movq 0x90(%rbx), %rdi
callq 0x2f9d41
movl $0xffffffff, %ebp       # imm = 0xFFFFFFFF
movl %eax, %ecx
shll %cl, %ebp
movq 0x60(%rbx), %rax
testq %rax, %rax
je 0x1dc632
cmpq %r13, 0x8(%rax)
jbe 0x1dc632
movl 0x10(%rax), %edx
cmpq $0x41, %rdx
jae 0x1dc632
movq %r12, 0x20(%rsp)
movq 0x88(%rbx), %r12
movq (%rax), %rdi
movq %rdx, %rsi
imulq %r13, %rsi
callq 0x2fcc2c
testq %r12, %r12
je 0x1dc62d
addq %r14, %rax
cmpq %rax, 0x8(%r12)
jbe 0x1dc62d
movl 0x10(%r12), %edx
cmpq $0x41, %rdx
jae 0x1dc62d
movq (%r12), %rdi
imulq %rdx, %rax
movq %rax, %rsi
callq 0x2fcc2c
movq 0x20(%rsp), %rsi
testq %rsi, %rsi
je 0x1dc637
addq %r14, %r15
cmpq %r15, 0x8(%rsi)
jbe 0x1dc637
movl 0x10(%rsi), %edx
cmpq $0x41, %rdx
jae 0x1dc637
notl %ebp
addl %ebp, %ebp
notl %ebp
movslq %ebp, %rcx
andq %rcx, %rax
movq 0x90(%rbx), %rcx
leaq (%rax,%rcx,2), %rcx
movq (%rsi), %rdi
imulq %rdx, %r15
movq %r15, %rsi
callq 0x2fcd13
movq 0x70(%rbx), %r15
testq %r15, %r15
je 0x1dc628
cmpq %r13, 0x8(%r15)
jbe 0x1dc628
movl 0x10(%r15), %edx
cmpq $0x41, %rdx
jae 0x1dc628
movq (%r15), %rdi
movq %rdx, %rsi
imulq %r13, %rsi
callq 0x2fcc2c
cmpq %r13, 0x8(%r15)
jbe 0x1dc63c
movl 0x10(%r15), %edx
cmpq $0x41, %rdx
jae 0x1dc63c
incq 0x8(%rsp)
decq %rax
movq (%r15), %rdi
movq %rdx, %rsi
imulq %r13, %rsi
movq %rax, %rcx
callq 0x2fcd13
movq 0x10(%rsp), %r12
movq 0x58(%rbx), %rax
testq %rax, %rax
je 0x1dc61e
cmpq %r13, 0x8(%rax)
jbe 0x1dc61e
movl 0x10(%rax), %edx
cmpq $0x41, %rdx
jae 0x1dc61e
movq (%rax), %rdi
movq %rdx, %rsi
imulq %r13, %rsi
movl $0x1, %ecx
callq 0x2fcd13
incq %r14
movq 0x60(%rbx), %rax
testq %rax, %rax
jne 0x1dc034
jmp 0x1dc5e7
movq 0x60(%rbx), %rax
testq %rax, %rax
je 0x1dc5ec
xorl %r14d, %r14d
cmpq %r12, 0x8(%rax)
jbe 0x1dc5ec
movl 0x10(%rax), %edx
cmpq $0x41, %rdx
jae 0x1dc5ec
movq (%rax), %rdi
movq %rdx, %rsi
imulq %r12, %rsi
callq 0x2fcc2c
movq %rax, %r15
movq 0x60(%rbx), %rax
testq %rax, %rax
je 0x1dc5f1
cmpq %r13, 0x8(%rax)
jbe 0x1dc5f1
movl 0x10(%rax), %edx
cmpq $0x41, %rdx
jae 0x1dc5f1
movq (%rax), %rdi
movq %rdx, %rsi
imulq %r13, %rsi
callq 0x2fcc2c
subq %rax, %r15
cmpq %r15, %r14
jae 0x1dc572
movq 0x60(%rbx), %rax
testq %rax, %rax
je 0x1dc605
cmpq %r13, 0x8(%rax)
jbe 0x1dc605
movl 0x10(%rax), %edx
cmpq $0x41, %rdx
jae 0x1dc605
movq 0x58(%rbx), %rbp
movq 0x88(%rbx), %r15
movq (%rax), %rdi
movq %rdx, %rsi
imulq %r13, %rsi
callq 0x2fcc2c
testq %r15, %r15
je 0x1dc60a
addq %r14, %rax
cmpq %rax, 0x8(%r15)
jbe 0x1dc60a
movl 0x10(%r15), %edx
cmpq $0x41, %rdx
jae 0x1dc60a
movq (%r15), %rdi
imulq %rdx, %rax
movq %rax, %rsi
callq 0x2fcc2c
movq %rax, %r12
movq 0x80(%rbx), %rdi
callq 0x2f9d41
movl $0xffffffff, %r15d      # imm = 0xFFFFFFFF
movl %eax, %ecx
shll %cl, %r15d
notl %r15d
movq 0x90(%rbx), %rdi
callq 0x2f9d41
leal 0x1(%rax), %ecx
shll %cl, %r15d
movslq %r15d, %r15
andq %r12, %r15
movq 0x90(%rbx), %rdi
callq 0x2f9d41
leal 0x1(%rax), %ecx
shrq %cl, %r15
testq %rbp, %rbp
je 0x1dc600
cmpq %r15, 0x8(%rbp)
jbe 0x1dc600
movl 0x10(%rbp), %edx
cmpq $0x41, %rdx
jae 0x1dc600
movq (%rbp), %rdi
imulq %rdx, %r15
movq %r15, %rsi
xorl %ecx, %ecx
callq 0x2fcd13
incq %r14
movq 0x60(%rbx), %rax
testq %rax, %rax
movq 0x10(%rsp), %r12
jne 0x1dc409
jmp 0x1dc5ec
cmpb $0x0, 0x4(%rsp)
je 0x1dc57e
incq 0x18(%rsp)
incq %r13
cmpq 0x80(%rbx), %r13
jb 0x1dbfdf
jmp 0x1dc599
movq $0x0, 0x8(%rsp)
cmpb $0x0, 0x4(%rsp)
je 0x1dc5a5
callq 0x111189
leaq 0x1dc948(%rip), %rdi    # 0x3b8ef4
movq 0x8(%rsp), %r14
movq %r14, %rsi
xorl %eax, %eax
callq 0x108e02
testb $0x1, %r14b
jne 0x1dc655
movq %rbx, %rdi
callq 0x1da5e8
shrq %r14
movq %r14, %rax
addq $0x28, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
callq 0x7098d
callq 0x709c6
callq 0x706a8
callq 0x7066f
callq 0x7091b
callq 0x70954
callq 0x705c4
callq 0x70636
callq 0x705fd
callq 0x708a9
callq 0x70870
callq 0x708e2
callq 0x7071a
callq 0x70837
callq 0x70753
callq 0x707c5
callq 0x707fe
callq 0x7078c
callq 0x706e1
callq 0x7058b
callq 0x709ff
callq 0x70a71
callq 0x70552
callq 0x70a38