// File: /workspace/github_c_makefile_star2_O1/genometools[P]genometools/src/match/rdj-strgraph.c
// Function: gt_strgraph_gfa_show
static void gt_strgraph_gfa_show(const GtStrgraph *strgraph,
    const char *indexname, GtGfaVersion version, GtFile *outfp)
{
  GtUword sn1, sn2;
  GtStrgraphVnum i, v2;
  GtUword sl2, spm_len;
  GtStrgraphVEdgenum j;
  bool is_e1, is_e2;
  GtError *err;
  int had_err = 0;
  GtGfaWriter *gw = NULL;

  err = gt_error_new();
  gt_assert(strgraph->encseq != NULL);
  gw = gt_gfa_writer_new(outfp, strgraph->encseq, version);
  had_err = gt_gfa_writer_show_header(gw, (GtUword)
      strgraph->minmatchlen, indexname, false, false, err);
  if (!had_err)
    had_err = gt_gfa_writer_show_segments(gw, err);
  for (i = 0; i < GT_STRGRAPH_NOFVERTICES(strgraph) && !had_err; i++)
  {
    if (GT_STRGRAPH_V_OUTDEG(strgraph, i) > 0)
    {
      sn1 = GT_STRGRAPH_V_READNUM(i);
      is_e1 = GT_STRGRAPH_V_IS_E(i);
      for (j = 0; j < GT_STRGRAPH_V_NOFEDGES(strgraph, i) && !had_err; j++)
      {
        if (!GT_STRGRAPH_EDGE_IS_REDUCED(strgraph, i, j))
        {
          v2 = GT_STRGRAPH_EDGE_DEST(strgraph, i, j);
          sn2 = GT_STRGRAPH_V_READNUM(v2);
          sl2 = (GtUword)GT_STRGRAPH_SEQLEN(strgraph, sn2);
          spm_len = sl2 - (GtUword)GT_STRGRAPH_EDGE_LEN(strgraph, i, j);
          is_e2 = GT_STRGRAPH_V_IS_E(v2);
          if ((is_e1 && is_e2 && (sn1 >= sn2)) ||
              (!is_e1 && !is_e2 && (sn1 > sn2)) ||
              (is_e1 && !is_e2 && (sn1 >= sn2)) ||
              (!is_e1 &&  is_e2 && (sn1 > sn2)))
          {
            /* other E->B / B->E cases, as well as all B-B
               are not considered to avoid double output */
            gt_spmproc_show_gfa(sn1, sn2, spm_len, is_e1, is_e2, gw);
          }
        }
      }
    }
  }
  if (had_err)
  {
    fprintf(stderr, "%s", gt_error_get(err));
    exit(EXIT_FAILURE);
  }
  gt_gfa_writer_delete(gw);
  gt_error_delete(err);
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x38, %rsp
movq %rcx, %r15
movl %edx, %ebp
movq %rsi, %rbx
movq %rdi, %r14
callq 0x1019b4
movq (%r14), %rsi
testq %rsi, %rsi
je 0x1e031c
movq %rax, %r12
movq %r15, %rdi
movl %ebp, %edx
callq 0x1b8d20
movq 0x30(%r14), %rsi
xorl %ebp, %ebp
movq %rax, 0x8(%rsp)
movq %rax, %rdi
movq %rbx, %rdx
xorl %ecx, %ecx
xorl %r8d, %r8d
movq %r12, %r9
callq 0x1b8d76
testl %eax, %eax
jne 0x1dff2a
movq 0x8(%rsp), %rdi
movq %r12, %rsi
callq 0x1b8dd8
testl %eax, %eax
sete %bpl
movq %r12, 0x20(%rsp)
cmpq $0x0, 0x80(%r14)
setne %al
andb %bpl, %al
cmpb $0x1, %al
jne 0x1e02c8
xorl %r12d, %r12d
movl %ebp, 0x1c(%rsp)
movq 0x70(%r14), %rax
testq %rax, %rax
je 0x1e0317
cmpq %r12, 0x8(%rax)
jbe 0x1e0317
movl 0x10(%rax), %edx
cmpq $0x41, %rdx
jae 0x1e0317
movq (%rax), %rdi
movq %rdx, %rsi
imulq %r12, %rsi
callq 0x2fcc2c
testq %rax, %rax
je 0x1e02ae
movq 0x60(%r14), %rax
testq %rax, %rax
je 0x1e02f4
movq %r12, %rcx
shrq %rcx
movq %rcx, 0x10(%rsp)
leaq 0x1(%r12), %r15
testb $0x1, %r12b
sete 0x7(%rsp)
xorl %ebp, %ebp
movq %r15, 0x30(%rsp)
cmpq %r15, 0x8(%rax)
jbe 0x1e02f4
movl 0x10(%rax), %edx
cmpq $0x41, %rdx
jae 0x1e02f4
movq (%rax), %rdi
movq %rdx, %rsi
imulq %r15, %rsi
callq 0x2fcc2c
movq %rax, %rbx
movq 0x60(%r14), %rax
testq %rax, %rax
je 0x1e02ef
cmpq %r12, 0x8(%rax)
jbe 0x1e02ef
movl 0x10(%rax), %edx
cmpq $0x41, %rdx
jae 0x1e02ef
movq (%rax), %rdi
movq %rdx, %rsi
imulq %r12, %rsi
callq 0x2fcc2c
subq %rax, %rbx
cmpq %rbx, %rbp
jae 0x1e02ae
movq 0x60(%r14), %rax
testq %rax, %rax
je 0x1e02f9
cmpq %r12, 0x8(%rax)
jbe 0x1e02f9
movl 0x10(%rax), %edx
cmpq $0x41, %rdx
jae 0x1e02f9
movq 0x88(%r14), %rbx
movq (%rax), %rdi
movq %rdx, %rsi
imulq %r12, %rsi
callq 0x2fcc2c
testq %rbx, %rbx
je 0x1e02fe
addq %rbp, %rax
cmpq %rax, 0x8(%rbx)
jbe 0x1e02fe
movl 0x10(%rbx), %edx
cmpq $0x41, %rdx
jae 0x1e02fe
movq (%rbx), %rdi
imulq %rdx, %rax
movq %rax, %rsi
callq 0x2fcc2c
movq %rax, %rbx
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 %rbx, %rax
shrq %rax
cmpq 0x90(%r14), %rax
je 0x1e0297
movq 0x60(%r14), %rax
testq %rax, %rax
je 0x1e030d
cmpq %r12, 0x8(%rax)
jbe 0x1e030d
movl 0x10(%rax), %edx
cmpq $0x41, %rdx
jae 0x1e030d
movq 0x88(%r14), %rbx
movq (%rax), %rdi
movq %rdx, %rsi
imulq %r12, %rsi
callq 0x2fcc2c
testq %rbx, %rbx
je 0x1e0308
addq %rbp, %rax
cmpq %rax, 0x8(%rbx)
jbe 0x1e0308
movl 0x10(%rbx), %edx
cmpq $0x41, %rdx
jae 0x1e0308
movq (%rbx), %rdi
imulq %rdx, %rax
movq %rax, %rsi
callq 0x2fcc2c
movq %rax, %rbx
movq 0x80(%r14), %rdi
callq 0x2f9d41
movl $0xffffffff, %r15d      # imm = 0xFFFFFFFF
movl %eax, %ecx
shll %cl, %r15d
notl %r15d
movq 0x90(%r14), %rdi
callq 0x2f9d41
leal 0x1(%rax), %ecx
shll %cl, %r15d
movslq %r15d, %r13
andq %rbx, %r13
movq 0x90(%r14), %rdi
callq 0x2f9d41
leal 0x1(%rax), %ecx
shrq %cl, %r13
movq %r13, %rbx
shrq %rbx
movq 0x8(%r14), %rax
testq %rax, %rax
jne 0x1e0188
movq (%r14), %rdi
movq %rbx, %rsi
callq 0xeffd3
movq 0x60(%r14), %rcx
testq %rcx, %rcx
je 0x1e0303
cmpq %r12, 0x8(%rcx)
jbe 0x1e0303
movl 0x10(%rcx), %edx
cmpq $0x41, %rdx
jae 0x1e0303
movq %rax, 0x28(%rsp)
movq 0x88(%r14), %r15
movq (%rcx), %rdi
movq %rdx, %rsi
imulq %r12, %rsi
callq 0x2fcc2c
testq %r15, %r15
je 0x1e0312
addq %rbp, %rax
cmpq %rax, 0x8(%r15)
jbe 0x1e0312
movl 0x10(%r15), %edx
cmpq $0x41, %rdx
jae 0x1e0312
movq (%r15), %rdi
imulq %rdx, %rax
movq %rax, %rsi
callq 0x2fcc2c
movq %rax, %r15
movq 0x90(%r14), %rdi
callq 0x2f9d41
movl $0xffffffff, %edx       # imm = 0xFFFFFFFF
movl %eax, %ecx
shll %cl, %edx
testb $0x1, %r12b
je 0x1e025d
movl %r13d, %eax
andl $0x1, %eax
je 0x1e025d
cmpq %rbx, 0x10(%rsp)
jb 0x1e025d
notl %edx
addl %edx, %edx
movslq %edx, %rax
andq %rax, %r15
shrq %r15
movq 0x28(%rsp), %rdx
subq %r15, %rdx
andl $0x1, %r13d
movl %r12d, %ecx
andl $0x1, %ecx
movq 0x10(%rsp), %rdi
movq %rbx, %rsi
movl %r13d, %r8d
movq 0x8(%rsp), %r9
callq 0x1b8f84
jmp 0x1e0297
movl %r12d, %esi
orl %r13d, %esi
cmpq %rbx, 0x10(%rsp)
setb %cl
seta %al
setbe %dil
orb %sil, %dil
testb $0x1, %dil
je 0x1e0227
movb 0x7(%rsp), %sil
orb %r13b, %sil
orb %cl, %sil
testb $0x1, %sil
je 0x1e0227
movb 0x7(%rsp), %cl
andb %r13b, %cl
andb %al, %cl
jne 0x1e0227
incq %rbp
movq 0x60(%r14), %rax
testq %rax, %rax
movq 0x30(%rsp), %r15
jne 0x1dffb5
jmp 0x1e02f4
incq %r12
cmpq 0x80(%r14), %r12
setb %al
movl 0x1c(%rsp), %ebp
testb %bpl, %al
jne 0x1dff4c
testb %bpl, %bpl
je 0x1e0321
movq 0x8(%rsp), %rdi
callq 0x1b90a8
movq 0x20(%rsp), %rdi
addq $0x38, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
jmp 0x101b35
callq 0x72a32
callq 0x72a6b
callq 0x729f9
callq 0x729c0
callq 0x72915
callq 0x7294e
callq 0x72987
callq 0x728dc
callq 0x72ac7
callq 0x72b00
movq 0x20(%rsp), %rdi
callq 0x72aa4