// File: /workspace/github_c_makefile_star2_O1/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 0x1cf4c8
movq %rsi, %rbx
testq %rsi, %rsi
je 0x1cf4cd
movq %rdi, %r14
movl $0x0, (%rsp)
movq 0x10(%rdi), %rsi
leaq 0x1e74e6(%rip), %rdi    # 0x3b685f
xorl %eax, %eax
callq 0x108e02
movq (%r14), %rsi
leaq 0x1e74e7(%rip), %rdi    # 0x3b6871
xorl %eax, %eax
callq 0x108e02
movl 0x10(%r14), %eax
testl %eax, %eax
je 0x1cf3d8
xorl %r12d, %r12d
movq %rsp, %r15
movq 0x38(%r14), %rax
movb (%rax,%r12), %al
movl %eax, %ecx
shrb %cl
orb %al, %cl
testb $0x1, %cl
jne 0x1cf3cc
movl %r12d, 0x4(%rsp)
movl $0x4, %esi
movl $0x2, %edx
movq %r15, %rdi
movq %rbx, %rcx
callq 0x125658
incq %r12
movl 0x10(%r14), %eax
cmpq %rax, %r12
jb 0x1cf39f
cmpl (%r14), %eax
jae 0x1cf4b4
movl %eax, %r12d
movq %rsp, %r15
movq 0x38(%r14), %rax
movb (%rax,%r12), %al
movl %eax, %ecx
shrb %cl
orb %al, %cl
testb $0x1, %cl
jne 0x1cf4a5
movq 0x10(%r14), %rax
movq 0x40(%r14), %rcx
movq %r12, %rdx
subq %rax, %rdx
movq (%rcx,%rdx,8), %rcx
testw %cx, %cx
je 0x1cf4a5
xorl %ebp, %ebp
xorl %r13d, %r13d
shrq $0xc, %rcx
andq $-0x10, %rcx
addq 0x58(%r14), %rcx
movq 0x30(%r14), %rdx
movq (%rbp,%rcx), %rdi
movq 0x8(%rbp,%rcx), %rsi
shlq $0x5, %rdi
movq 0x8(%rdx,%rdi), %rdx
cmpq %rsi, %rdx
jb 0x1cf4c3
subl %esi, %edx
testq %r13, %r13
movl $0x0, %esi
cmovel %esi, %edx
movl %edx, (%rsp)
movq (%rcx,%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 0x125658
incq %r13
movq 0x10(%r14), %rax
movq 0x40(%r14), %rcx
movq %r12, %rdx
subq %rax, %rdx
movq (%rcx,%rdx,8), %rcx
movzwl %cx, %edx
addq $0x10, %rbp
cmpq %rdx, %r13
jb 0x1cf41e
incq %r12
movl (%r14), %eax
cmpq %rax, %r12
jb 0x1cf3e7
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
callq 0x6b61d
callq 0x6b68f
callq 0x6b656