// File: /workspace/github_c_makefile_star2_O3/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 0x1d2ee4
movq %rdi, %rbx
cmpl $0x2, 0x10(%rdi)
jne 0x1d2ee9
cmpb $0x0, 0x4(%rsp)
je 0x1d280e
movq 0x80(%rbx), %rsi
leaq 0x18(%rsp), %rdi
callq 0x10ba28
cmpq $0x0, 0x80(%rbx)
je 0x1d2e29
xorl %r14d, %r14d
movq 0x58(%rbx), %rax
testq %rax, %rax
je 0x1d2eda
cmpq %r14, 0x8(%rax)
jbe 0x1d2eda
movl 0x10(%rax), %edx
cmpq $0x41, %rdx
jae 0x1d2eda
movq (%rax), %rdi
movq %rdx, %rsi
imulq %r14, %rsi
xorl %ecx, %ecx
callq 0x2f388c
incq %r14
movq 0x80(%rbx), %rax
cmpq %rax, %r14
jb 0x1d281f
testq %rax, %rax
je 0x1d2e29
movq $0x0, 0x8(%rsp)
xorl %r13d, %r13d
movq 0x70(%rbx), %rax
testq %rax, %rax
je 0x1d2edf
cmpq %r13, 0x8(%rax)
jbe 0x1d2edf
movl 0x10(%rax), %edx
cmpq $0x41, %rdx
jae 0x1d2edf
movq (%rax), %rdi
movq %rdx, %rsi
imulq %r13, %rsi
callq 0x2f37dc
testq %rax, %rax
je 0x1d2e0b
movq 0x60(%rbx), %rax
testq %rax, %rax
je 0x1d2e80
leaq 0x1(%r13), %r12
xorl %r14d, %r14d
movq %r12, 0x10(%rsp)
cmpq %r12, 0x8(%rax)
jbe 0x1d2e80
movl 0x10(%rax), %edx
cmpq $0x41, %rdx
jae 0x1d2e80
movq (%rax), %rdi
movq %rdx, %rsi
imulq %r12, %rsi
callq 0x2f37dc
movq %rax, %r15
movq 0x60(%rbx), %rax
testq %rax, %rax
je 0x1d2e7b
cmpq %r13, 0x8(%rax)
jbe 0x1d2e7b
movl 0x10(%rax), %edx
cmpq $0x41, %rdx
jae 0x1d2e7b
movq (%rax), %rdi
movq %rdx, %rsi
imulq %r13, %rsi
callq 0x2f37dc
subq %rax, %r15
cmpq %r15, %r14
jae 0x1d2c92
movq 0x60(%rbx), %rax
testq %rax, %rax
je 0x1d2e94
cmpq %r13, 0x8(%rax)
jbe 0x1d2e94
movl 0x10(%rax), %edx
cmpq $0x41, %rdx
jae 0x1d2e94
movq 0x88(%rbx), %r15
movq (%rax), %rdi
movq %rdx, %rsi
imulq %r13, %rsi
callq 0x2f37dc
testq %r15, %r15
je 0x1d2e8f
addq %r14, %rax
cmpq %rax, 0x8(%r15)
jbe 0x1d2e8f
movl 0x10(%r15), %edx
cmpq $0x41, %rdx
jae 0x1d2e8f
movq (%r15), %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 0x1d2c7d
movq 0x60(%rbx), %rax
testq %rax, %rax
je 0x1d2eb2
cmpq %r13, 0x8(%rax)
jbe 0x1d2eb2
movl 0x10(%rax), %edx
cmpq $0x41, %rdx
jae 0x1d2eb2
movq 0x58(%rbx), %rbp
movq 0x88(%rbx), %r15
movq (%rax), %rdi
movq %rdx, %rsi
imulq %r13, %rsi
callq 0x2f37dc
testq %r15, %r15
je 0x1d2ea8
addq %r14, %rax
cmpq %rax, 0x8(%r15)
jbe 0x1d2ea8
movl 0x10(%r15), %edx
cmpq $0x41, %rdx
jae 0x1d2ea8
movq (%r15), %rdi
imulq %rdx, %rax
movq %rax, %rsi
callq 0x2f37dc
movq %rax, %r12
movq 0x80(%rbx), %rdi
callq 0x2f09dd
movl $0xffffffff, %r15d      # imm = 0xFFFFFFFF
movl %eax, %ecx
shll %cl, %r15d
notl %r15d
movq 0x90(%rbx), %rdi
callq 0x2f09dd
leal 0x1(%rax), %ecx
shll %cl, %r15d
movslq %r15d, %r15
andq %r12, %r15
movq 0x90(%rbx), %rdi
callq 0x2f09dd
leal 0x1(%rax), %ecx
shrq %cl, %r15
testq %rbp, %rbp
je 0x1d2ead
cmpq %r15, 0x8(%rbp)
jbe 0x1d2ead
movl 0x10(%rbp), %edx
cmpq $0x41, %rdx
jae 0x1d2ead
movq (%rbp), %rdi
imulq %rdx, %r15
movq %r15, %rsi
callq 0x2f37dc
cmpl $0x1, %eax
jne 0x1d2c40
movq 0x60(%rbx), %rax
testq %rax, %rax
je 0x1d2ebc
cmpq %r13, 0x8(%rax)
jbe 0x1d2ebc
movl 0x10(%rax), %edx
cmpq $0x41, %rdx
jae 0x1d2ebc
movq 0x88(%rbx), %r12
movq (%rax), %rdi
movq %rdx, %rsi
imulq %r13, %rsi
callq 0x2f37dc
movq %rax, %r15
movq 0x90(%rbx), %rdi
callq 0x2f09dd
movl $0xffffffff, %ebp       # imm = 0xFFFFFFFF
movl %eax, %ecx
shll %cl, %ebp
movq 0x60(%rbx), %rax
testq %rax, %rax
je 0x1d2ecb
cmpq %r13, 0x8(%rax)
jbe 0x1d2ecb
movl 0x10(%rax), %edx
cmpq $0x41, %rdx
jae 0x1d2ecb
movq %r12, 0x20(%rsp)
movq 0x88(%rbx), %r12
movq (%rax), %rdi
movq %rdx, %rsi
imulq %r13, %rsi
callq 0x2f37dc
testq %r12, %r12
je 0x1d2ec6
addq %r14, %rax
cmpq %rax, 0x8(%r12)
jbe 0x1d2ec6
movl 0x10(%r12), %edx
cmpq $0x41, %rdx
jae 0x1d2ec6
movq (%r12), %rdi
imulq %rdx, %rax
movq %rax, %rsi
callq 0x2f37dc
movq 0x20(%rsp), %rsi
testq %rsi, %rsi
je 0x1d2ed0
addq %r14, %r15
cmpq %r15, 0x8(%rsi)
jbe 0x1d2ed0
movl 0x10(%rsi), %edx
cmpq $0x41, %rdx
jae 0x1d2ed0
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 0x2f388c
movq 0x70(%rbx), %r15
testq %r15, %r15
je 0x1d2ec1
cmpq %r13, 0x8(%r15)
jbe 0x1d2ec1
movl 0x10(%r15), %edx
cmpq $0x41, %rdx
jae 0x1d2ec1
movq (%r15), %rdi
movq %rdx, %rsi
imulq %r13, %rsi
callq 0x2f37dc
cmpq %r13, 0x8(%r15)
jbe 0x1d2ed5
movl 0x10(%r15), %edx
cmpq $0x41, %rdx
jae 0x1d2ed5
incq 0x8(%rsp)
decq %rax
movq (%r15), %rdi
movq %rdx, %rsi
imulq %r13, %rsi
movq %rax, %rcx
callq 0x2f388c
movq 0x10(%rsp), %r12
movq 0x58(%rbx), %rax
testq %rax, %rax
je 0x1d2eb7
cmpq %r13, 0x8(%rax)
jbe 0x1d2eb7
movl 0x10(%rax), %edx
cmpq $0x41, %rdx
jae 0x1d2eb7
movq (%rax), %rdi
movq %rdx, %rsi
imulq %r13, %rsi
movl $0x1, %ecx
callq 0x2f388c
incq %r14
movq 0x60(%rbx), %rax
testq %rax, %rax
jne 0x1d28cd
jmp 0x1d2e80
movq 0x60(%rbx), %rax
testq %rax, %rax
je 0x1d2e85
xorl %r14d, %r14d
cmpq %r12, 0x8(%rax)
jbe 0x1d2e85
movl 0x10(%rax), %edx
cmpq $0x41, %rdx
jae 0x1d2e85
movq (%rax), %rdi
movq %rdx, %rsi
imulq %r12, %rsi
callq 0x2f37dc
movq %rax, %r15
movq 0x60(%rbx), %rax
testq %rax, %rax
je 0x1d2e8a
cmpq %r13, 0x8(%rax)
jbe 0x1d2e8a
movl 0x10(%rax), %edx
cmpq $0x41, %rdx
jae 0x1d2e8a
movq (%rax), %rdi
movq %rdx, %rsi
imulq %r13, %rsi
callq 0x2f37dc
subq %rax, %r15
cmpq %r15, %r14
jae 0x1d2e0b
movq 0x60(%rbx), %rax
testq %rax, %rax
je 0x1d2e9e
cmpq %r13, 0x8(%rax)
jbe 0x1d2e9e
movl 0x10(%rax), %edx
cmpq $0x41, %rdx
jae 0x1d2e9e
movq 0x58(%rbx), %rbp
movq 0x88(%rbx), %r15
movq (%rax), %rdi
movq %rdx, %rsi
imulq %r13, %rsi
callq 0x2f37dc
testq %r15, %r15
je 0x1d2ea3
addq %r14, %rax
cmpq %rax, 0x8(%r15)
jbe 0x1d2ea3
movl 0x10(%r15), %edx
cmpq $0x41, %rdx
jae 0x1d2ea3
movq (%r15), %rdi
imulq %rdx, %rax
movq %rax, %rsi
callq 0x2f37dc
movq %rax, %r12
movq 0x80(%rbx), %rdi
callq 0x2f09dd
movl $0xffffffff, %r15d      # imm = 0xFFFFFFFF
movl %eax, %ecx
shll %cl, %r15d
notl %r15d
movq 0x90(%rbx), %rdi
callq 0x2f09dd
leal 0x1(%rax), %ecx
shll %cl, %r15d
movslq %r15d, %r15
andq %r12, %r15
movq 0x90(%rbx), %rdi
callq 0x2f09dd
leal 0x1(%rax), %ecx
shrq %cl, %r15
testq %rbp, %rbp
je 0x1d2e99
cmpq %r15, 0x8(%rbp)
jbe 0x1d2e99
movl 0x10(%rbp), %edx
cmpq $0x41, %rdx
jae 0x1d2e99
movq (%rbp), %rdi
imulq %rdx, %r15
movq %r15, %rsi
xorl %ecx, %ecx
callq 0x2f388c
incq %r14
movq 0x60(%rbx), %rax
testq %rax, %rax
movq 0x10(%rsp), %r12
jne 0x1d2ca2
jmp 0x1d2e85
cmpb $0x0, 0x4(%rsp)
je 0x1d2e17
incq 0x18(%rsp)
incq %r13
cmpq 0x80(%rbx), %r13
jb 0x1d2878
jmp 0x1d2e32
movq $0x0, 0x8(%rsp)
cmpb $0x0, 0x4(%rsp)
je 0x1d2e3e
callq 0x10bf8a
leaq 0x1dcaaf(%rip), %rdi    # 0x3af8f4
movq 0x8(%rsp), %r14
movq %r14, %rsi
xorl %eax, %eax
callq 0x103d72
testb $0x1, %r14b
jne 0x1d2eee
movq %rbx, %rdi
callq 0x1d0e7b
shrq %r14
movq %r14, %rax
addq $0x28, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
callq 0x6ed4d
callq 0x6ed86
callq 0x6ea68
callq 0x6ea2f
callq 0x6ecdb
callq 0x6ed14
callq 0x6e984
callq 0x6e9f6
callq 0x6e9bd
callq 0x6ec69
callq 0x6ec30
callq 0x6eca2
callq 0x6eada
callq 0x6ebf7
callq 0x6eb13
callq 0x6eb85
callq 0x6ebbe
callq 0x6eb4c
callq 0x6eaa1
callq 0x6edf8
callq 0x6edbf
callq 0x6ee6a
callq 0x6e94b
callq 0x6ee31