// File: /workspace/github_c_makefile_star2_O1/genometools[P]genometools/src/match/rdj-strgraph.c
// Function: gt_strgraph_compact
void gt_strgraph_compact(GtStrgraph *strgraph, bool show_progressbar)
{
  GtStrgraphVnum i;
  GtStrgraphEdgenum old_offset, next_free_edge, new_offset;
  GtStrgraphVEdgenum old_nofedges, j;
  GtUint64 progress = 0;

  gt_assert(strgraph != NULL);

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

  next_free_edge = 0;
  for (i = 0; i < GT_STRGRAPH_NOFVERTICES(strgraph); i++)
  {
    new_offset = next_free_edge;
    old_offset = GT_STRGRAPH_V_OFFSET(strgraph, i);
    old_nofedges = GT_STRGRAPH_V_NOFEDGES(strgraph, i);
    for (j = 0; j < old_nofedges; j++)
    {
      if (!GT_STRGRAPH_EDGE_IS_REDUCED(strgraph, i, j))
      {
        GT_STRGRAPH_COPY_EDGE(strgraph, old_offset + j, next_free_edge);
        next_free_edge++;
      }
    }
    GT_STRGRAPH_V_SET_OFFSET(strgraph, i, new_offset);
    gt_assert(next_free_edge - GT_STRGRAPH_V_OFFSET(strgraph, i) ==
        (GtStrgraphEdgenum)GT_STRGRAPH_V_OUTDEG(strgraph, i));
    if (show_progressbar)
      progress++;
  }
  GT_STRGRAPH_V_SET_OFFSET(strgraph, GT_STRGRAPH_NOFVERTICES(strgraph),
      next_free_edge);
  if (next_free_edge < GT_STRGRAPH_NOFEDGES(strgraph))
  {
    GT_STRGRAPH_SHRINK_EDGES(strgraph, next_free_edge);
  }

  if (show_progressbar)
    gt_progressbar_stop();
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x28, %rsp
movq $0x0, 0x10(%rsp)
testq %rdi, %rdi
je 0x1d831f
movl %esi, %ebp
movq %rdi, %r14
testb %bpl, %bpl
je 0x1d7f79
movq 0x80(%r14), %rsi
leaq 0x10(%rsp), %rdi
callq 0x110c6c
movq 0x80(%r14), %rsi
testq %rsi, %rsi
je 0x1d8241
xorl %r15d, %r15d
movq $0x0, (%rsp)
movl %ebp, 0xc(%rsp)
movq 0x60(%r14), %rax
testq %rax, %rax
je 0x1d82fc
cmpq %r15, 0x8(%rax)
jbe 0x1d82fc
movl 0x10(%rax), %edx
cmpq $0x41, %rdx
jae 0x1d82fc
movq (%rax), %rdi
movq %rdx, %rsi
imulq %r15, %rsi
callq 0x2fcc2c
movq %rax, 0x20(%rsp)
movq 0x60(%r14), %rax
testq %rax, %rax
je 0x1d82f7
leaq 0x1(%r15), %rcx
cmpq %rcx, 0x8(%rax)
jbe 0x1d82f7
movl 0x10(%rax), %edx
cmpq $0x41, %rdx
jae 0x1d82f7
movq (%rax), %rdi
movq %rdx, %rsi
movq %rcx, 0x18(%rsp)
imulq %rcx, %rsi
callq 0x2fcc2c
movq %rax, %rbx
movq 0x60(%r14), %rax
testq %rax, %rax
je 0x1d8301
cmpq %r15, 0x8(%rax)
jbe 0x1d8301
movl 0x10(%rax), %edx
cmpq $0x41, %rdx
jae 0x1d8301
movq (%rax), %rdi
movq %rdx, %rsi
imulq %r15, %rsi
callq 0x2fcc2c
movq (%rsp), %r12
subq %rax, %rbx
je 0x1d8169
xorl %ebp, %ebp
movq (%rsp), %r12
movq 0x60(%r14), %rax
testq %rax, %rax
je 0x1d82e8
cmpq %r15, 0x8(%rax)
jbe 0x1d82e8
movl 0x10(%rax), %edx
cmpq $0x41, %rdx
jae 0x1d82e8
movq 0x88(%r14), %r13
movq (%rax), %rdi
movq %rdx, %rsi
imulq %r15, %rsi
callq 0x2fcc2c
testq %r13, %r13
je 0x1d82e3
addq %rbp, %rax
cmpq %rax, 0x8(%r13)
jbe 0x1d82e3
movl 0x10(%r13), %edx
cmpq $0x41, %rdx
jae 0x1d82e3
movq (%r13), %rdi
imulq %rdx, %rax
movq %rax, %rsi
callq 0x2fcc2c
movq %rax, %r13
movq 0x90(%r14), %rdi
callq 0x2f9d41
movl $0xffffffff, %edx       # imm = 0xFFFFFFFF
movl %eax, %ecx
shll %cl, %edx
notl %edx
addl %edx, %edx
movslq %edx, %rax
andq %r13, %rax
shrq %rax
cmpq 0x90(%r14), %rax
je 0x1d815d
movq 0x88(%r14), %r13
testq %r13, %r13
je 0x1d82ed
movq 0x20(%rsp), %rax
leaq (%rax,%rbp), %rsi
cmpq %rsi, 0x8(%r13)
jbe 0x1d82ed
movl 0x10(%r13), %edx
cmpq $0x41, %rdx
jae 0x1d82ed
movq (%r13), %rdi
imulq %rdx, %rsi
callq 0x2fcc2c
cmpq %r12, 0x8(%r13)
jbe 0x1d82f2
movl 0x10(%r13), %edx
cmpq $0x41, %rdx
jae 0x1d82f2
movq (%r13), %rdi
movq %rdx, %rsi
imulq %r12, %rsi
movq %rax, %rcx
callq 0x2fcd13
incq %r12
incq %rbp
cmpq %rbp, %rbx
jne 0x1d8055
movq 0x60(%r14), %rax
testq %rax, %rax
je 0x1d8306
cmpq %r15, 0x8(%rax)
jbe 0x1d8306
movl 0x10(%rax), %edx
cmpq $0x41, %rdx
jae 0x1d8306
movq (%rax), %rdi
movq %rdx, %rsi
imulq %r15, %rsi
movq (%rsp), %rcx
callq 0x2fcd13
movq 0x60(%r14), %rax
testq %rax, %rax
movl 0xc(%rsp), %ebp
je 0x1d830b
cmpq %r15, 0x8(%rax)
jbe 0x1d830b
movl 0x10(%rax), %edx
cmpq $0x41, %rdx
jae 0x1d830b
movq (%rax), %rdi
movq %rdx, %rsi
imulq %r15, %rsi
callq 0x2fcc2c
movq 0x70(%r14), %rcx
testq %rcx, %rcx
je 0x1d8310
cmpq %r15, 0x8(%rcx)
jbe 0x1d8310
movl 0x10(%rcx), %edx
cmpq $0x41, %rdx
jae 0x1d8310
movq %r12, %rbx
subq %rax, %rbx
movq (%rcx), %rdi
imulq %rdx, %r15
movq %r15, %rsi
callq 0x2fcc2c
cmpq %rax, %rbx
jne 0x1d8315
testb %bpl, %bpl
movq 0x18(%rsp), %rax
je 0x1d8228
incq 0x10(%rsp)
movq 0x80(%r14), %rsi
movq %rax, %r15
movq %r12, (%rsp)
cmpq %rsi, %rax
jb 0x1d7f98
jmp 0x1d8244
xorl %r12d, %r12d
movq 0x60(%r14), %rax
testq %rax, %rax
je 0x1d831a
cmpq %rsi, 0x8(%rax)
jbe 0x1d831a
movl 0x10(%rax), %edx
cmpq $0x41, %rdx
jae 0x1d831a
movq (%rax), %rdi
imulq %rdx, %rsi
movq %r12, %rcx
callq 0x2fcd13
cmpq 0x98(%r14), %r12
jae 0x1d82ca
movq %r12, 0x98(%r14)
testq %r12, %r12
jne 0x1d82ca
movq 0x88(%r14), %rbx
testq %rbx, %rbx
je 0x1d82bf
movq (%rbx), %rdi
leaq 0x191b46(%rip), %r15    # 0x369de8
movq %r15, %rsi
movl $0x5d, %edx
callq 0x109670
movq %rbx, %rdi
movq %r15, %rsi
movl $0x5e, %edx
callq 0x109670
movq $0x0, 0x88(%r14)
testb %bpl, %bpl
je 0x1d82d4
callq 0x111189
addq $0x28, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
callq 0x6d998
callq 0x6d9d1
callq 0x6d95f
callq 0x6d926
callq 0x6db27
callq 0x6db60
callq 0x6daee
callq 0x6dab5
callq 0x6da7c
callq 0x6da43
callq 0x6da0a
callq 0x6db99
callq 0x6dbd2