// File: /workspace/github_c_makefile_star2_O0/genometools[P]genometools/src/match/rdj-contigs-graph.c
// Function: gt_contigs_graph_extend_contigs
void gt_contigs_graph_extend_contigs(GtContigsGraph *cg, bool use_only_internal)
{
  GtUword cnum, nof_v_before;
  GtArrayGtContigsGraphPathElem path[2];
  GT_INITARRAY(&(path[0]), GtContigsGraphPathElem);
  GT_INITARRAY(&(path[1]), GtContigsGraphPathElem);
  for (cnum = 0; cnum < cg->nof_v; cnum++)
  {
    cg->v_m[cnum].selected = false;
    cg->v_m[cnum].processed = false;
    cg->v_m[cnum].visited = false;
  }
  nof_v_before = cg->nof_v;
  gt_log_log("nof_v before extending contigs = "GT_WU"", cg->nof_v);
  for (cnum = 0; cnum < nof_v_before; cnum++)
  {
    GtContigsGraphPathEndInfo info[2];
    GtUword deg[2];
    unsigned int startdir;
    deg[0] = (GtUword)cg->v_spm[0][cnum].deg;
    deg[1] = (GtUword)cg->v_spm[1][cnum].deg;
    if ((cg->v_m[cnum].deleted) ||
        (cg->v_m[cnum].optional) ||
        (deg[0] > 1UL) || /* junction */
        (deg[1] > 1UL) || /* junction */
        (deg[0] == 0 && deg[1] == 0)) /* isolated */
      continue;
    gt_log_log("extend_contigs, cnum = "GT_WU"", cnum);
    for (startdir = 0; startdir < 2U; startdir++)
    {
      if (cg->v_spm[startdir][cnum].deg == 0)
      {
        info[startdir].depth = 0;
        info[startdir].t = GT_CONTIGS_GRAPH_SINGLE_END;
        info[startdir].dest = (GtUword)
          gt_contigs_graph_find_only_spm_edge(cg, cnum,
              GT_CONTIGS_GRAPH_OTHER_DIR(startdir))->dest;
        info[startdir].cnum = cnum;
        info[startdir].dir = GT_CONTIGS_GRAPH_OTHER_DIR(startdir);
        continue;
      }
      else
      {
        {
          GtUword cnum2;
          for (cnum2 = 0; cnum2 < nof_v_before; cnum2++)
          {
            cg->v_m[cnum2].visited = false;
          }
        }
        gt_contigs_graph_find_path_end(&(info[startdir]), &(path[startdir]),
            cg, cnum, startdir, use_only_internal);
      }
    }
    gt_contigs_graph_create_composite_vertex(cg, path, info);
    {
      GtUword cnum2;
      for (cnum2 = 0; cnum2 < nof_v_before; cnum2++)
      {
        if (cg->v_m[cnum2].processed && !cg->v_m[cnum2].deleted
        && info[0].t != GT_CONTIGS_GRAPH_CIRCULAR)
          gt_contigs_graph_rm_vertex(cg, cnum2);
      }
    }
  }
  for (cnum = 0; cnum < nof_v_before; cnum++)
  {
    if (cg->v_m[cnum].selected && !cg->v_m[cnum].deleted)
      gt_contigs_graph_rm_vertex(cg, cnum);
  }
  GT_FREEARRAY(&path[0], GtContigsGraphPathElem);
  GT_FREEARRAY(&path[1], GtContigsGraphPathElem);
}

// Assembly:
subq $0xc8, %rsp
movb %sil, %al
movq %rdi, 0xc0(%rsp)
andb $0x1, %al
movb %al, 0xbf(%rsp)
movq $0x0, 0x70(%rsp)
movq $0x0, 0x80(%rsp)
movq $0x0, 0x78(%rsp)
jmp 0x280d1b
movq $0x0, 0x88(%rsp)
movq $0x0, 0x98(%rsp)
movq $0x0, 0x90(%rsp)
movq $0x0, 0xb0(%rsp)
movq 0xb0(%rsp), %rax
movq 0xc0(%rsp), %rcx
cmpq (%rcx), %rax
jae 0x280dd9
movq 0xc0(%rsp), %rax
movq 0x38(%rax), %rax
movq 0xb0(%rsp), %rcx
movb (%rax,%rcx), %dl
andb $-0x5, %dl
orb $0x0, %dl
movb %dl, (%rax,%rcx)
movq 0xc0(%rsp), %rax
movq 0x38(%rax), %rax
movq 0xb0(%rsp), %rcx
movb (%rax,%rcx), %dl
andb $-0x9, %dl
orb $0x0, %dl
movb %dl, (%rax,%rcx)
movq 0xc0(%rsp), %rax
movq 0x38(%rax), %rax
movq 0xb0(%rsp), %rcx
movb (%rax,%rcx), %dl
andb $-0x11, %dl
orb $0x0, %dl
movb %dl, (%rax,%rcx)
movq 0xb0(%rsp), %rax
addq $0x1, %rax
movq %rax, 0xb0(%rsp)
jmp 0x280d4b
movq 0xc0(%rsp), %rax
movq (%rax), %rax
movq %rax, 0xa8(%rsp)
movq 0xc0(%rsp), %rax
movq (%rax), %rsi
leaq 0x2ff585(%rip), %rdi    # 0x580383
movb $0x0, %al
callq 0xe7740
movq $0x0, 0xb0(%rsp)
movq 0xb0(%rsp), %rax
cmpq 0xa8(%rsp), %rax
jae 0x281128
movq 0xc0(%rsp), %rax
movq 0x18(%rax), %rax
movq 0xb0(%rsp), %rcx
movq (%rax,%rcx,8), %rax
andq $0xffff, %rax           # imm = 0xFFFF
movq %rax, 0x20(%rsp)
movq 0xc0(%rsp), %rax
movq 0x20(%rax), %rax
movq 0xb0(%rsp), %rcx
movq (%rax,%rcx,8), %rax
andq $0xffff, %rax           # imm = 0xFFFF
movq %rax, 0x28(%rsp)
movq 0xc0(%rsp), %rax
movq 0x38(%rax), %rax
movq 0xb0(%rsp), %rcx
movb (%rax,%rcx), %al
andb $0x1, %al
testb $0x1, %al
jne 0x280ec9
movq 0xc0(%rsp), %rax
movq 0x38(%rax), %rax
movq 0xb0(%rsp), %rcx
movb (%rax,%rcx), %al
shrb %al
andb $0x1, %al
testb $0x1, %al
jne 0x280ec9
cmpq $0x1, 0x20(%rsp)
ja 0x280ec9
cmpq $0x1, 0x28(%rsp)
ja 0x280ec9
cmpq $0x0, 0x20(%rsp)
jne 0x280ece
cmpq $0x0, 0x28(%rsp)
jne 0x280ece
jmp 0x28110f
movq 0xb0(%rsp), %rsi
leaq 0x2ff4cb(%rip), %rdi    # 0x5803a8
movb $0x0, %al
callq 0xe7740
movl $0x0, 0x1c(%rsp)
cmpl $0x2, 0x1c(%rsp)
jae 0x28107c
movq 0xc0(%rsp), %rax
movl 0x1c(%rsp), %ecx
movq 0x18(%rax,%rcx,8), %rax
movq 0xb0(%rsp), %rcx
movq (%rax,%rcx,8), %rax
andq $0xffff, %rax           # imm = 0xFFFF
cmpl $0x0, %eax
jne 0x280fde
movl 0x1c(%rsp), %eax
movl %eax, %ecx
leaq 0x30(%rsp), %rax
shlq $0x5, %rcx
addq %rcx, %rax
movq $0x0, 0x10(%rax)
movl 0x1c(%rsp), %eax
movl %eax, %ecx
leaq 0x30(%rsp), %rax
shlq $0x5, %rcx
addq %rcx, %rax
movl $0x1, 0x1c(%rax)
movq 0xc0(%rsp), %rdi
movq 0xb0(%rsp), %rsi
movl 0x1c(%rsp), %ecx
xorl %edx, %edx
movl $0x1, %eax
cmpl $0x0, %ecx
cmovel %eax, %edx
callq 0x27ed40
movl (%rax), %eax
movl %eax, %ecx
movl 0x1c(%rsp), %eax
movl %eax, %edx
leaq 0x30(%rsp), %rax
shlq $0x5, %rdx
addq %rdx, %rax
movq %rcx, 0x8(%rax)
movq 0xb0(%rsp), %rcx
movl 0x1c(%rsp), %eax
movl %eax, %edx
leaq 0x30(%rsp), %rax
shlq $0x5, %rdx
addq %rdx, %rax
movq %rcx, (%rax)
movl 0x1c(%rsp), %edx
xorl %ecx, %ecx
movl $0x1, %eax
cmpl $0x0, %edx
cmovel %eax, %ecx
movl 0x1c(%rsp), %eax
movl %eax, %edx
leaq 0x30(%rsp), %rax
shlq $0x5, %rdx
addq %rdx, %rax
movl %ecx, 0x18(%rax)
jmp 0x28106c
movq $0x0, 0x10(%rsp)
movq 0x10(%rsp), %rax
cmpq 0xa8(%rsp), %rax
jae 0x281023
movq 0xc0(%rsp), %rax
movq 0x38(%rax), %rax
movq 0x10(%rsp), %rcx
movb (%rax,%rcx), %dl
andb $-0x11, %dl
orb $0x0, %dl
movb %dl, (%rax,%rcx)
movq 0x10(%rsp), %rax
addq $0x1, %rax
movq %rax, 0x10(%rsp)
jmp 0x280fe7
movl 0x1c(%rsp), %eax
leaq 0x30(%rsp), %rdi
shlq $0x5, %rax
addq %rax, %rdi
movl 0x1c(%rsp), %eax
leaq 0x70(%rsp), %rsi
imulq $0x18, %rax, %rax
addq %rax, %rsi
movq 0xc0(%rsp), %rdx
movq 0xb0(%rsp), %rcx
movl 0x1c(%rsp), %r8d
movb 0xbf(%rsp), %al
andb $0x1, %al
movzbl %al, %r9d
callq 0x27fc80
jmp 0x28106c
movl 0x1c(%rsp), %eax
addl $0x1, %eax
movl %eax, 0x1c(%rsp)
jmp 0x280eec
movq 0xc0(%rsp), %rdi
leaq 0x70(%rsp), %rsi
leaq 0x30(%rsp), %rdx
callq 0x280170
movq $0x0, 0x8(%rsp)
movq 0x8(%rsp), %rax
cmpq 0xa8(%rsp), %rax
jae 0x28110d
movq 0xc0(%rsp), %rax
movq 0x38(%rax), %rax
movq 0x8(%rsp), %rcx
movb (%rax,%rcx), %al
shrb $0x3, %al
andb $0x1, %al
testb $0x1, %al
je 0x2810fb
movq 0xc0(%rsp), %rax
movq 0x38(%rax), %rax
movq 0x8(%rsp), %rcx
movb (%rax,%rcx), %al
andb $0x1, %al
testb $0x1, %al
jne 0x2810fb
cmpl $0x3, 0x4c(%rsp)
je 0x2810fb
movq 0xc0(%rsp), %rdi
movq 0x8(%rsp), %rsi
callq 0x27f430
jmp 0x2810fd
movq 0x8(%rsp), %rax
addq $0x1, %rax
movq %rax, 0x8(%rsp)
jmp 0x28109c
jmp 0x28110f
movq 0xb0(%rsp), %rax
addq $0x1, %rax
movq %rax, 0xb0(%rsp)
jmp 0x280e11
movq $0x0, 0xb0(%rsp)
movq 0xb0(%rsp), %rax
cmpq 0xa8(%rsp), %rax
jae 0x2811b0
movq 0xc0(%rsp), %rax
movq 0x38(%rax), %rax
movq 0xb0(%rsp), %rcx
movb (%rax,%rcx), %al
shrb $0x2, %al
andb $0x1, %al
testb $0x1, %al
je 0x281198
movq 0xc0(%rsp), %rax
movq 0x38(%rax), %rax
movq 0xb0(%rsp), %rcx
movb (%rax,%rcx), %al
andb $0x1, %al
testb $0x1, %al
jne 0x281198
movq 0xc0(%rsp), %rdi
movq 0xb0(%rsp), %rsi
callq 0x27f430
jmp 0x28119a
movq 0xb0(%rsp), %rax
addq $0x1, %rax
movq %rax, 0xb0(%rsp)
jmp 0x281134
jmp 0x2811b2
cmpq $0x0, 0x70(%rsp)
je 0x2811ee
movq 0x70(%rsp), %rdi
leaq 0x2feb6b(%rip), %rsi    # 0x57fd31
movl $0x477, %edx            # imm = 0x477
callq 0xe88c0
movq $0x0, 0x78(%rsp)
movq $0x0, 0x80(%rsp)
movq $0x0, 0x70(%rsp)
jmp 0x2811f0
jmp 0x2811f2
cmpq $0x0, 0x88(%rsp)
je 0x28123a
movq 0x88(%rsp), %rdi
leaq 0x2feb25(%rip), %rsi    # 0x57fd31
movl $0x478, %edx            # imm = 0x478
callq 0xe88c0
movq $0x0, 0x90(%rsp)
movq $0x0, 0x98(%rsp)
movq $0x0, 0x88(%rsp)
jmp 0x28123c
addq $0xc8, %rsp
retq
nopw %cs:(%rax,%rax)