// File: /workspace/github_c_makefile_star2_O0/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:
subq $0xe8, %rsp
movb %sil, %al
movq %rdi, 0xe0(%rsp)
andb $0x1, %al
movb %al, 0xdf(%rsp)
movq $0x0, 0xc0(%rsp)
movq $0x0, 0xb8(%rsp)
cmpq $0x0, 0xe0(%rsp)
jne 0x2950e6
movq 0x3a6eeb(%rip), %rax    # 0x63bfa0
movq (%rax), %rdi
leaq 0x280f54(%rip), %rsi    # 0x516013
leaq 0x2ed03e(%rip), %rdx    # 0x582104
leaq 0x2ed563(%rip), %rcx    # 0x582630
leaq 0x2ecf6c(%rip), %r8     # 0x582040
movl $0x42a, %r9d            # imm = 0x42A
movb $0x0, %al
callq 0x199f0
callq 0x19370
jmp 0x2950e8
jmp 0x2950ea
movq 0xe0(%rsp), %rax
cmpl $0x2, 0x10(%rax)
je 0x295130
movq 0x3a6ea1(%rip), %rax    # 0x63bfa0
movq (%rax), %rdi
leaq 0x280f0a(%rip), %rsi    # 0x516013
leaq 0x2ed4dd(%rip), %rdx    # 0x5825ed
leaq 0x2ed519(%rip), %rcx    # 0x582630
leaq 0x2ecf22(%rip), %r8     # 0x582040
movl $0x42b, %r9d            # imm = 0x42B
movb $0x0, %al
callq 0x199f0
callq 0x19370
jmp 0x295132
testb $0x1, 0xdf(%rsp)
je 0x295158
movq 0xe0(%rsp), %rax
movq 0x80(%rax), %rsi
leaq 0xb8(%rsp), %rdi
callq 0xf9830
movq $0x0, 0xd0(%rsp)
movq 0xd0(%rsp), %rax
movq 0xe0(%rsp), %rcx
cmpq 0x80(%rcx), %rax
jae 0x2951b0
movq 0xe0(%rsp), %rax
movq 0x58(%rax), %rdi
movq 0xd0(%rsp), %rsi
xorl %eax, %eax
movl %eax, %edx
callq 0x2907d0
movq 0xd0(%rsp), %rax
addq $0x1, %rax
movq %rax, 0xd0(%rsp)
jmp 0x295164
movq $0x0, 0xd0(%rsp)
movq 0xd0(%rsp), %rax
movq 0xe0(%rsp), %rcx
cmpq 0x80(%rcx), %rax
jae 0x295721
movq 0xe0(%rsp), %rax
movq 0x70(%rax), %rdi
movq 0xd0(%rsp), %rsi
callq 0x290730
cmpq $0x0, %rax
jbe 0x2956e8
movq $0x0, 0xc8(%rsp)
movq 0xc8(%rsp), %rax
movq %rax, 0xb0(%rsp)
movq 0xe0(%rsp), %rax
movq 0x60(%rax), %rdi
movq 0xd0(%rsp), %rsi
addq $0x1, %rsi
callq 0x290730
movq %rax, 0xa8(%rsp)
movq 0xe0(%rsp), %rax
movq 0x60(%rax), %rdi
movq 0xd0(%rsp), %rsi
callq 0x290730
movq 0xa8(%rsp), %rcx
movq %rax, %rdx
movq 0xb0(%rsp), %rax
subq %rdx, %rcx
cmpq %rcx, %rax
jae 0x295582
movq 0xe0(%rsp), %rax
movq 0x88(%rax), %rax
movq %rax, 0x98(%rsp)
movq 0xe0(%rsp), %rax
movq 0x60(%rax), %rdi
movq 0xd0(%rsp), %rsi
callq 0x290730
movq 0x98(%rsp), %rdi
movq %rax, %rsi
addq 0xc8(%rsp), %rsi
callq 0x290730
movq %rax, 0xa0(%rsp)
movq 0xe0(%rsp), %rax
movq 0x90(%rax), %rdi
callq 0x46ec80
movl %eax, %ecx
movq 0xa0(%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 0xe0(%rsp), %rcx
cmpq 0x90(%rcx), %rax
jne 0x295313
movb $0x1, %al
testb $0x1, %al
jne 0x29531b
jmp 0x295320
xorl %eax, %eax
testb $0x1, %al
jne 0x29531b
jmp 0x295320
jmp 0x295569
movq 0xe0(%rsp), %rax
movq 0x58(%rax), %rax
movq %rax, 0x90(%rsp)
movq 0xe0(%rsp), %rax
movq 0x88(%rax), %rax
movq %rax, 0x70(%rsp)
movq 0xe0(%rsp), %rax
movq 0x60(%rax), %rdi
movq 0xd0(%rsp), %rsi
callq 0x290730
movq 0x70(%rsp), %rdi
movq %rax, %rsi
addq 0xc8(%rsp), %rsi
callq 0x290730
movq %rax, 0x80(%rsp)
movq 0xe0(%rsp), %rax
movq 0x80(%rax), %rdi
callq 0x46ec80
movl %eax, %ecx
movl $0x1, %eax
shll %cl, %eax
subl $0x1, %eax
movl %eax, 0x7c(%rsp)
movq 0xe0(%rsp), %rax
movq 0x90(%rax), %rdi
callq 0x46ec80
movl 0x7c(%rsp), %edx
movl %eax, %ecx
movq 0x80(%rsp), %rax
addl $0x1, %ecx
shll %cl, %edx
movl %edx, %ecx
movslq %ecx, %rcx
andq %rcx, %rax
movq %rax, 0x88(%rsp)
movq 0xe0(%rsp), %rax
movq 0x90(%rax), %rdi
callq 0x46ec80
movq 0x88(%rsp), %rsi
movq 0x90(%rsp), %rdi
addl $0x1, %eax
movl %eax, %eax
movl %eax, %ecx
shrq %cl, %rsi
callq 0x290730
cmpl $0x1, %eax
jne 0x29554b
movq 0xc0(%rsp), %rax
addq $0x1, %rax
movq %rax, 0xc0(%rsp)
movq 0xe0(%rsp), %rax
movq 0x88(%rax), %rax
movq %rax, 0x50(%rsp)
movq 0xe0(%rsp), %rax
movq 0x60(%rax), %rdi
movq 0xd0(%rsp), %rsi
callq 0x290730
addq 0xc8(%rsp), %rax
movq %rax, 0x58(%rsp)
movq 0xe0(%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, 0x48(%rsp)
movq 0xe0(%rsp), %rax
movq 0x88(%rax), %rax
movq %rax, 0x40(%rsp)
movq 0xe0(%rsp), %rax
movq 0x60(%rax), %rdi
movq 0xd0(%rsp), %rsi
callq 0x290730
movq 0x40(%rsp), %rdi
movq %rax, %rsi
addq 0xc8(%rsp), %rsi
callq 0x290730
movq 0x48(%rsp), %rdx
movq 0x50(%rsp), %rdi
movq 0x58(%rsp), %rsi
andq %rax, %rdx
movq 0xe0(%rsp), %rax
movq 0x90(%rax), %rax
shlq %rax
addq %rax, %rdx
callq 0x2907d0
movq 0xe0(%rsp), %rax
movq 0x70(%rax), %rax
movq %rax, 0x60(%rsp)
movq 0xd0(%rsp), %rax
movq %rax, 0x68(%rsp)
movq 0xe0(%rsp), %rax
movq 0x70(%rax), %rdi
movq 0xd0(%rsp), %rsi
callq 0x290730
movq 0x60(%rsp), %rdi
movq 0x68(%rsp), %rsi
movq %rax, %rdx
subq $0x1, %rdx
callq 0x2907d0
movq 0xe0(%rsp), %rax
movq 0x58(%rax), %rdi
movq 0xd0(%rsp), %rsi
movl $0x1, %edx
callq 0x2907d0
movq 0xc8(%rsp), %rax
addq $0x1, %rax
movq %rax, 0xc8(%rsp)
jmp 0x295208
movq $0x0, 0xc8(%rsp)
movq 0xc8(%rsp), %rax
movq %rax, 0x38(%rsp)
movq 0xe0(%rsp), %rax
movq 0x60(%rax), %rdi
movq 0xd0(%rsp), %rsi
addq $0x1, %rsi
callq 0x290730
movq %rax, 0x30(%rsp)
movq 0xe0(%rsp), %rax
movq 0x60(%rax), %rdi
movq 0xd0(%rsp), %rsi
callq 0x290730
movq 0x30(%rsp), %rcx
movq %rax, %rdx
movq 0x38(%rsp), %rax
subq %rdx, %rcx
cmpq %rcx, %rax
jae 0x2956e6
movq 0xe0(%rsp), %rax
movq 0x58(%rax), %rax
movq %rax, 0x28(%rsp)
movq 0xe0(%rsp), %rax
movq 0x88(%rax), %rax
movq %rax, 0x8(%rsp)
movq 0xe0(%rsp), %rax
movq 0x60(%rax), %rdi
movq 0xd0(%rsp), %rsi
callq 0x290730
movq 0x8(%rsp), %rdi
movq %rax, %rsi
addq 0xc8(%rsp), %rsi
callq 0x290730
movq %rax, 0x18(%rsp)
movq 0xe0(%rsp), %rax
movq 0x80(%rax), %rdi
callq 0x46ec80
movl %eax, %ecx
movl $0x1, %eax
shll %cl, %eax
subl $0x1, %eax
movl %eax, 0x14(%rsp)
movq 0xe0(%rsp), %rax
movq 0x90(%rax), %rdi
callq 0x46ec80
movl 0x14(%rsp), %edx
movl %eax, %ecx
movq 0x18(%rsp), %rax
addl $0x1, %ecx
shll %cl, %edx
movl %edx, %ecx
movslq %ecx, %rcx
andq %rcx, %rax
movq %rax, 0x20(%rsp)
movq 0xe0(%rsp), %rax
movq 0x90(%rax), %rdi
callq 0x46ec80
movq 0x20(%rsp), %rsi
movq 0x28(%rsp), %rdi
addl $0x1, %eax
movl %eax, %eax
movl %eax, %ecx
shrq %cl, %rsi
xorl %eax, %eax
movl %eax, %edx
callq 0x2907d0
movq 0xc8(%rsp), %rax
addq $0x1, %rax
movq %rax, 0xc8(%rsp)
jmp 0x29558e
jmp 0x2956e8
testb $0x1, 0xdf(%rsp)
je 0x295706
movq 0xb8(%rsp), %rax
addq $0x1, %rax
movq %rax, 0xb8(%rsp)
jmp 0x295708
movq 0xd0(%rsp), %rax
addq $0x1, %rax
movq %rax, 0xd0(%rsp)
jmp 0x2951bc
testb $0x1, 0xdf(%rsp)
je 0x295730
callq 0xfa220
movq 0xc0(%rsp), %rsi
leaq 0x2ecf07(%rip), %rdi    # 0x582646
movb $0x0, %al
callq 0xe7740
movq 0xc0(%rsp), %rax
andq $0x1, %rax
cmpq $0x0, %rax
je 0x295790
movq 0x3a6841(%rip), %rax    # 0x63bfa0
movq (%rax), %rdi
leaq 0x2808aa(%rip), %rsi    # 0x516013
leaq 0x2ece23(%rip), %rdx    # 0x582593
leaq 0x2eceb9(%rip), %rcx    # 0x582630
leaq 0x2ec8c2(%rip), %r8     # 0x582040
movl $0x452, %r9d            # imm = 0x452
movb $0x0, %al
callq 0x199f0
callq 0x19370
jmp 0x295792
movq 0xe0(%rsp), %rdi
callq 0x293800
movq 0xc0(%rsp), %rax
shrq %rax
addq $0xe8, %rsp
retq
nopw %cs:(%rax,%rax)