// File: /workspace/github_c_makefile_star2_O3/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 0xfcb4c
movq (%r14), %rsi
testq %rsi, %rsi
je 0x1d6bdd
movq %rax, %r12
movq %r15, %rdi
movl %ebp, %edx
callq 0x1b01ec
movq 0x30(%r14), %rsi
movq %rax, %rdi
movq %rbx, %rdx
movq %rax, %rbx
xorl %ecx, %ecx
xorl %r8d, %r8d
movq %r12, %r9
callq 0x1b0242
testl %eax, %eax
jne 0x1d6bd5
movq %rbx, %rdi
movq %r12, %rsi
callq 0x1b02a4
movl %eax, 0x1c(%rsp)
testl %eax, %eax
sete %al
cmpq $0x0, 0x80(%r14)
setne %cl
andb %al, %cl
cmpb $0x1, %cl
jne 0x1d6b83
xorl %r15d, %r15d
movq %r12, 0x28(%rsp)
movq %rbx, 0x20(%rsp)
movq 0x70(%r14), %rax
testq %rax, %rax
je 0x1d6bd0
cmpq %r15, 0x8(%rax)
jbe 0x1d6bd0
movl 0x10(%rax), %edx
cmpq $0x41, %rdx
jae 0x1d6bd0
movq (%rax), %rdi
movq %rdx, %rsi
imulq %r15, %rsi
callq 0x2f37dc
testq %rax, %rax
je 0x1d6b70
movq 0x60(%r14), %rax
testq %rax, %rax
je 0x1d6bad
movq %r15, %rcx
shrq %rcx
movq %rcx, 0x10(%rsp)
leaq 0x1(%r15), %r13
testb $0x1, %r15b
sete 0x7(%rsp)
xorl %r12d, %r12d
movq %r15, 0x8(%rsp)
movq %r13, 0x30(%rsp)
cmpq %r13, 0x8(%rax)
jbe 0x1d6bad
movl 0x10(%rax), %edx
cmpq $0x41, %rdx
jae 0x1d6bad
movq (%rax), %rdi
movq %rdx, %rsi
imulq %r13, %rsi
callq 0x2f37dc
movq %rax, %rbx
movq 0x60(%r14), %rax
testq %rax, %rax
je 0x1d6ba8
cmpq %r15, 0x8(%rax)
jbe 0x1d6ba8
movl 0x10(%rax), %edx
cmpq $0x41, %rdx
jae 0x1d6ba8
movq (%rax), %rdi
movq %rdx, %rsi
imulq %r15, %rsi
callq 0x2f37dc
subq %rax, %rbx
cmpq %rbx, %r12
jae 0x1d6b61
movq 0x60(%r14), %rax
testq %rax, %rax
je 0x1d6bb2
cmpq %r15, 0x8(%rax)
jbe 0x1d6bb2
movl 0x10(%rax), %edx
cmpq $0x41, %rdx
jae 0x1d6bb2
movq 0x88(%r14), %rbx
movq (%rax), %rdi
movq %rdx, %rsi
imulq %r15, %rsi
callq 0x2f37dc
testq %rbx, %rbx
je 0x1d6bb7
addq %r12, %rax
cmpq %rax, 0x8(%rbx)
jbe 0x1d6bb7
movl 0x10(%rbx), %edx
cmpq $0x41, %rdx
jae 0x1d6bb7
movq (%rbx), %rdi
imulq %rdx, %rax
movq %rax, %rsi
callq 0x2f37dc
movq %rax, %rbx
movq 0x90(%r14), %rdi
callq 0x2f09dd
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 0x1d6b45
movq 0x60(%r14), %rax
testq %rax, %rax
movq 0x8(%rsp), %r15
je 0x1d6bbc
cmpq %r15, 0x8(%rax)
jbe 0x1d6bbc
movl 0x10(%rax), %edx
cmpq $0x41, %rdx
jae 0x1d6bbc
movq 0x88(%r14), %rbx
movq (%rax), %rdi
movq %rdx, %rsi
imulq %r15, %rsi
callq 0x2f37dc
testq %rbx, %rbx
je 0x1d6bc1
addq %r12, %rax
cmpq %rax, 0x8(%rbx)
jbe 0x1d6bc1
movl 0x10(%rbx), %edx
cmpq $0x41, %rdx
jae 0x1d6bc1
movq (%rbx), %rdi
imulq %rdx, %rax
movq %rax, %rsi
callq 0x2f37dc
movq %rax, %rbx
movq 0x80(%r14), %rdi
callq 0x2f09dd
movl $0xffffffff, %ebp       # imm = 0xFFFFFFFF
movl %eax, %ecx
shll %cl, %ebp
notl %ebp
movq 0x90(%r14), %rdi
callq 0x2f09dd
leal 0x1(%rax), %ecx
shll %cl, %ebp
movslq %ebp, %r13
andq %rbx, %r13
movq 0x90(%r14), %rdi
callq 0x2f09dd
leal 0x1(%rax), %ecx
shrq %cl, %r13
movq %r13, %rbp
shrq %rbp
movq 0x8(%r14), %rbx
testq %rbx, %rbx
jne 0x1d6a31
movq (%r14), %rdi
movq %rbp, %rsi
callq 0xeb9d2
movq %rax, %rbx
movq 0x60(%r14), %rax
testq %rax, %rax
je 0x1d6bc6
cmpq %r15, 0x8(%rax)
jbe 0x1d6bc6
movl 0x10(%rax), %edx
cmpq $0x41, %rdx
jae 0x1d6bc6
movq %r15, %rcx
movq 0x88(%r14), %r15
movq (%rax), %rdi
movq %rdx, %rsi
imulq %rcx, %rsi
callq 0x2f37dc
testq %r15, %r15
je 0x1d6bcb
addq %r12, %rax
cmpq %rax, 0x8(%r15)
jbe 0x1d6bcb
movl 0x10(%r15), %edx
cmpq $0x41, %rdx
jae 0x1d6bcb
movq (%r15), %rdi
imulq %rdx, %rax
movq %rax, %rsi
callq 0x2f37dc
movq %rax, %r15
movq 0x90(%r14), %rdi
callq 0x2f09dd
movl $0xffffffff, %edx       # imm = 0xFFFFFFFF
movl %eax, %ecx
shll %cl, %edx
testb $0x1, 0x8(%rsp)
je 0x1d6b07
movl %r13d, %eax
andl $0x1, %eax
je 0x1d6b07
cmpq %rbp, 0x10(%rsp)
jb 0x1d6b07
notl %edx
addl %edx, %edx
movslq %edx, %rax
andq %rax, %r15
shrq %r15
subq %r15, %rbx
andl $0x1, %r13d
movq 0x8(%rsp), %rax
movl %eax, %ecx
andl $0x1, %ecx
movq 0x10(%rsp), %rdi
movq %rbp, %rsi
movq %rbx, %rdx
movl %r13d, %r8d
movq 0x20(%rsp), %r9
callq 0x1b043d
jmp 0x1d6b45
movq 0x8(%rsp), %rax
movl %eax, %esi
orl %r13d, %esi
cmpq %rbp, 0x10(%rsp)
setb %cl
seta %al
setbe %dil
orb %sil, %dil
testb $0x1, %dil
je 0x1d6acf
movb 0x7(%rsp), %sil
orb %r13b, %sil
orb %cl, %sil
testb $0x1, %sil
je 0x1d6acf
movb 0x7(%rsp), %cl
andb %r13b, %cl
andb %al, %cl
jne 0x1d6acf
incq %r12
movq 0x60(%r14), %rax
testq %rax, %rax
movq 0x8(%rsp), %r15
movq 0x30(%rsp), %r13
jne 0x1d685a
jmp 0x1d6bad
movq %r13, %r15
movq 0x28(%rsp), %r12
movq 0x20(%rsp), %rbx
jmp 0x1d6b76
incq %r15
movq %r15, %r13
cmpq 0x80(%r14), %r13
jb 0x1d67ec
cmpl $0x0, 0x1c(%rsp)
jne 0x1d6bd5
movq %rbx, %rdi
callq 0x1b0561
movq %r12, %rdi
addq $0x38, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
jmp 0xfcccd
callq 0x70e2b
callq 0x70e64
callq 0x70df2
callq 0x70db9
callq 0x70d80
callq 0x70d47
callq 0x70d0e
callq 0x70cd5
callq 0x70ec0
movq %r12, %rdi
callq 0x70e9d
callq 0x70ef9