// File: /workspace/github_c_makefile_star2_O3/genometools[P]genometools/src/match/rdj-contigs-graph.c
// Function: gt_contigs_graph_output_paths
void gt_contigs_graph_output_paths(GtContigsGraph *cg, FILE *fp)
{
  GtContigpathElem cnum;
  uint64_t unum;
  GtContigpathElem elems[2];
  GtContigsGraphSeqUnit *unit;
  gt_assert(cg != NULL);
  gt_assert(fp != NULL);
  elems[0] = 0;
  gt_log_log("nof_simple_v: "GT_WU"", cg->nof_simple_v);
  gt_log_log("nof_v: "GT_WU"", cg->nof_v);
  for (cnum = 0; cnum < (uint32_t)cg->nof_simple_v; cnum++)
  {
    if (cg->v_m[cnum].deleted || cg->v_m[cnum].optional)
      continue;
    elems[1] = cnum;
    (void)gt_xfwrite(&elems, sizeof (*elems), (size_t)2, fp);
  }
  for (cnum = (uint32_t)cg->nof_simple_v; cnum < (uint32_t)cg->nof_v; cnum++)
  {
    if (cg->v_m[cnum].deleted || cg->v_m[cnum].optional)
      continue;
    for (unum = 0; unum < cg->v_cmp[cnum - cg->nof_simple_v].deg; unum++)
    {
      unit = cg->units + cg->v_cmp[cnum - cg->nof_simple_v].ptr + unum;
      gt_assert(cg->v_d[unit->seqnum].length >= unit->offset);
      elems[0] = (unum == 0)
        ? 0
        : (uint32_t) cg->v_d[unit->seqnum].length - unit->offset;
      elems[1] = unit->revcomp
        ? (uint32_t) GT_MULT2(cg->nof_simple_v) - 1 - unit->seqnum
        : (uint32_t) unit->seqnum;
      (void)gt_xfwrite(&elems, sizeof (*elems), (size_t)2, fp);
    }
  }
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
testq %rdi, %rdi
je 0x1c624b
movq %rsi, %rbx
testq %rsi, %rsi
je 0x1c6250
movq %rdi, %r14
movl $0x0, (%rsp)
movq 0x10(%rdi), %rsi
leaq 0x1e716e(%rip), %rdi    # 0x3ad25f
xorl %ebp, %ebp
xorl %eax, %eax
callq 0x103d72
movq (%r14), %rsi
leaq 0x1e716d(%rip), %rdi    # 0x3ad271
xorl %eax, %eax
callq 0x103d72
movq 0x10(%r14), %rax
testl %eax, %eax
je 0x1c6156
xorl %r12d, %r12d
movq %rsp, %r15
movq 0x38(%r14), %rcx
movb (%rcx,%r12), %cl
movl %ecx, %edx
shrb %dl
orb %cl, %dl
testb $0x1, %dl
jne 0x1c614a
movl %r12d, 0x4(%rsp)
movl $0x4, %esi
movl $0x2, %edx
movq %r15, %rdi
movq %rbx, %rcx
callq 0x11f89c
movq 0x10(%r14), %rax
incq %r12
movl %eax, %ecx
cmpq %rcx, %r12
jb 0x1c6119
movl %eax, %ebp
movq (%r14), %rcx
cmpl %ecx, %ebp
jae 0x1c6237
movl %ecx, %ecx
movl %ebp, %r12d
movq %rsp, %r15
movq 0x38(%r14), %rdx
movb (%rdx,%r12), %dl
movl %edx, %esi
shrb %sil
orb %dl, %sil
testb $0x1, %sil
jne 0x1c6229
movq 0x40(%r14), %rdx
movq %r12, %rsi
subq %rax, %rsi
movq (%rdx,%rsi,8), %rdx
testw %dx, %dx
je 0x1c6229
xorl %ebp, %ebp
xorl %r13d, %r13d
shrq $0xc, %rdx
andq $-0x10, %rdx
addq 0x58(%r14), %rdx
movq 0x30(%r14), %rcx
movq (%rbp,%rdx), %rdi
movq 0x8(%rbp,%rdx), %rsi
shlq $0x5, %rdi
movq 0x8(%rcx,%rdi), %rcx
cmpq %rsi, %rcx
jb 0x1c6246
subl %esi, %ecx
testq %r13, %r13
movl $0x0, %esi
cmovel %esi, %ecx
movl %ecx, (%rsp)
movq (%rdx,%rbp), %rcx
movl %ecx, %edx
notl %edx
leal (%rdx,%rax,2), %eax
testq %rcx, %rcx
cmovnsl %ecx, %eax
movl %eax, 0x4(%rsp)
movl $0x4, %esi
movl $0x2, %edx
movq %r15, %rdi
movq %rbx, %rcx
callq 0x11f89c
incq %r13
movq 0x10(%r14), %rax
movq 0x40(%r14), %rcx
movq %r12, %rdx
subq %rax, %rdx
movq (%rcx,%rdx,8), %rdx
movzwl %dx, %ecx
addq $0x10, %rbp
cmpq %rcx, %r13
jb 0x1c619f
movl (%r14), %ecx
incq %r12
movl %ecx, %edx
cmpq %rdx, %r12
jb 0x1c6169
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
callq 0x69d7c
callq 0x69dee
callq 0x69db5