// File: /workspace/github_c_makefile_star2_O0/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:
subq $0xe8, %rsp
movq %rdi, 0xe0(%rsp)
movq %rsi, 0xd8(%rsp)
movl %edx, 0xd4(%rsp)
movq %rcx, 0xc8(%rsp)
movl $0x0, 0x7c(%rsp)
movq $0x0, 0x70(%rsp)
callq 0xd88a0
movq %rax, 0x80(%rsp)
movq 0xe0(%rsp), %rax
cmpq $0x0, (%rax)
jne 0x2999ba
movq 0x3a2617(%rip), %rax    # 0x63bfa0
movq (%rax), %rdi
leaq 0x27c680(%rip), %rsi    # 0x516013
leaq 0x2e8674(%rip), %rdx    # 0x58200e
leaq 0x2e9957(%rip), %rcx    # 0x5832f8
leaq 0x2e8698(%rip), %r8     # 0x582040
movl $0x803, %r9d            # imm = 0x803
movb $0x0, %al
callq 0x199f0
callq 0x19370
jmp 0x2999bc
movq 0xc8(%rsp), %rdi
movq 0xe0(%rsp), %rax
movq (%rax), %rsi
movl 0xd4(%rsp), %edx
callq 0x250740
movq %rax, 0x70(%rsp)
movq 0x70(%rsp), %rdi
movq 0xe0(%rsp), %rax
movq 0x30(%rax), %rsi
movq 0xd8(%rsp), %rdx
movq 0x80(%rsp), %r9
xorl %r8d, %r8d
movl %r8d, %ecx
callq 0x2507b0
movl %eax, 0x7c(%rsp)
cmpl $0x0, 0x7c(%rsp)
jne 0x299a2d
movq 0x70(%rsp), %rdi
movq 0x80(%rsp), %rsi
callq 0x250920
movl %eax, 0x7c(%rsp)
movq $0x0, 0xb0(%rsp)
movq 0xb0(%rsp), %rcx
movq 0xe0(%rsp), %rdx
xorl %eax, %eax
cmpq 0x80(%rdx), %rcx
movb %al, 0x6f(%rsp)
jae 0x299a66
cmpl $0x0, 0x7c(%rsp)
setne %al
xorb $-0x1, %al
movb %al, 0x6f(%rsp)
movb 0x6f(%rsp), %al
testb $0x1, %al
jne 0x299a73
jmp 0x299ed2
movq 0xe0(%rsp), %rax
movq 0x70(%rax), %rdi
movq 0xb0(%rsp), %rsi
callq 0x290730
cmpq $0x0, %rax
jbe 0x299eb7
movq 0xb0(%rsp), %rax
shrq %rax
movq %rax, 0xc0(%rsp)
movq 0xb0(%rsp), %rax
andq $0x1, %rax
cmpq $0x1, %rax
sete %al
andb $0x1, %al
movb %al, 0x8f(%rsp)
movq $0x0, 0x90(%rsp)
movq 0x90(%rsp), %rax
movq %rax, 0x60(%rsp)
movq 0xe0(%rsp), %rax
movq 0x60(%rax), %rdi
movq 0xb0(%rsp), %rsi
addq $0x1, %rsi
callq 0x290730
movq %rax, 0x58(%rsp)
movq 0xe0(%rsp), %rax
movq 0x60(%rax), %rdi
movq 0xb0(%rsp), %rsi
callq 0x290730
movq 0x58(%rsp), %rdx
movq 0x60(%rsp), %rcx
subq %rax, %rdx
xorl %eax, %eax
cmpq %rdx, %rcx
movb %al, 0x6e(%rsp)
jae 0x299b3f
cmpl $0x0, 0x7c(%rsp)
setne %al
xorb $-0x1, %al
movb %al, 0x6e(%rsp)
movb 0x6e(%rsp), %al
testb $0x1, %al
jne 0x299b4c
jmp 0x299eb5
movq 0xe0(%rsp), %rax
movq 0x88(%rax), %rax
movq %rax, 0x48(%rsp)
movq 0xe0(%rsp), %rax
movq 0x60(%rax), %rdi
movq 0xb0(%rsp), %rsi
callq 0x290730
movq 0x48(%rsp), %rdi
movq %rax, %rsi
addq 0x90(%rsp), %rsi
callq 0x290730
movq %rax, 0x50(%rsp)
movq 0xe0(%rsp), %rax
movq 0x90(%rax), %rdi
callq 0x46ec80
movl %eax, %ecx
movq 0x50(%rsp), %rax
movl $0x1, %edx
shll %cl, %edx
movl %edx, %ecx
subl $0x1, %ecx
shll %ecx
movslq %ecx, %rcx
andq %rcx, %rax
shrq %rax
movq 0xe0(%rsp), %rcx
cmpq 0x90(%rcx), %rax
jne 0x299be2
movb $0x1, %al
testb $0x1, %al
jne 0x299e9a
jmp 0x299bee
xorl %eax, %eax
testb $0x1, %al
jne 0x299e9a
jmp 0x299bee
movq 0xe0(%rsp), %rax
movq 0x88(%rax), %rax
movq %rax, 0x28(%rsp)
movq 0xe0(%rsp), %rax
movq 0x60(%rax), %rdi
movq 0xb0(%rsp), %rsi
callq 0x290730
movq 0x28(%rsp), %rdi
movq %rax, %rsi
addq 0x90(%rsp), %rsi
callq 0x290730
movq %rax, 0x38(%rsp)
movq 0xe0(%rsp), %rax
movq 0x80(%rax), %rdi
callq 0x46ec80
movl %eax, %ecx
movl $0x1, %eax
shll %cl, %eax
subl $0x1, %eax
movl %eax, 0x34(%rsp)
movq 0xe0(%rsp), %rax
movq 0x90(%rax), %rdi
callq 0x46ec80
movl 0x34(%rsp), %edx
movl %eax, %ecx
movq 0x38(%rsp), %rax
addl $0x1, %ecx
shll %cl, %edx
movl %edx, %ecx
movslq %ecx, %rcx
andq %rcx, %rax
movq %rax, 0x40(%rsp)
movq 0xe0(%rsp), %rax
movq 0x90(%rax), %rdi
callq 0x46ec80
movl %eax, %ecx
movq 0x40(%rsp), %rax
addl $0x1, %ecx
movl %ecx, %ecx
shrq %cl, %rax
movq %rax, 0xa8(%rsp)
movq 0xa8(%rsp), %rax
shrq %rax
movq %rax, 0xb8(%rsp)
movq 0xe0(%rsp), %rax
cmpq $0x0, 0x8(%rax)
jbe 0x299cea
movq 0xe0(%rsp), %rax
movq 0x8(%rax), %rax
movq %rax, 0x20(%rsp)
jmp 0x299d07
movq 0xe0(%rsp), %rax
movq (%rax), %rdi
movq 0xb8(%rsp), %rsi
callq 0xb09f0
movq %rax, 0x20(%rsp)
movq 0x20(%rsp), %rax
movq %rax, 0xa0(%rsp)
movq 0xa0(%rsp), %rax
movq %rax, 0x10(%rsp)
movq 0xe0(%rsp), %rax
movq 0x88(%rax), %rax
movq %rax, 0x8(%rsp)
movq 0xe0(%rsp), %rax
movq 0x60(%rax), %rdi
movq 0xb0(%rsp), %rsi
callq 0x290730
movq 0x8(%rsp), %rdi
movq %rax, %rsi
addq 0x90(%rsp), %rsi
callq 0x290730
movq %rax, 0x18(%rsp)
movq 0xe0(%rsp), %rax
movq 0x90(%rax), %rdi
callq 0x46ec80
movl %eax, %ecx
movq 0x10(%rsp), %rax
movl $0x1, %edx
shll %cl, %edx
movq 0x18(%rsp), %rcx
subl $0x1, %edx
shll %edx
movslq %edx, %rdx
andq %rdx, %rcx
shrq %rcx
subq %rcx, %rax
movq %rax, 0x98(%rsp)
movq 0xa8(%rsp), %rax
andq $0x1, %rax
cmpq $0x1, %rax
sete %al
andb $0x1, %al
movb %al, 0x8e(%rsp)
testb $0x1, 0x8f(%rsp)
je 0x299dea
testb $0x1, 0x8e(%rsp)
je 0x299dea
movq 0xc0(%rsp), %rax
cmpq 0xb8(%rsp), %rax
jae 0x299e5c
testb $0x1, 0x8f(%rsp)
jne 0x299e10
testb $0x1, 0x8e(%rsp)
jne 0x299e10
movq 0xc0(%rsp), %rax
cmpq 0xb8(%rsp), %rax
ja 0x299e5c
testb $0x1, 0x8f(%rsp)
je 0x299e36
testb $0x1, 0x8e(%rsp)
jne 0x299e36
movq 0xc0(%rsp), %rax
cmpq 0xb8(%rsp), %rax
jae 0x299e5c
testb $0x1, 0x8f(%rsp)
jne 0x299e98
testb $0x1, 0x8e(%rsp)
je 0x299e98
movq 0xc0(%rsp), %rax
cmpq 0xb8(%rsp), %rax
jbe 0x299e98
movq 0xc0(%rsp), %rdi
movq 0xb8(%rsp), %rsi
movq 0x98(%rsp), %rdx
movb 0x8f(%rsp), %cl
movb 0x8e(%rsp), %al
movq 0x70(%rsp), %r9
andb $0x1, %cl
andb $0x1, %al
movzbl %cl, %ecx
movzbl %al, %r8d
callq 0x250c40
jmp 0x299e9a
jmp 0x299e9c
movq 0x90(%rsp), %rax
addq $0x1, %rax
movq %rax, 0x90(%rsp)
jmp 0x299ad1
jmp 0x299eb7
jmp 0x299eb9
movq 0xb0(%rsp), %rax
addq $0x1, %rax
movq %rax, 0xb0(%rsp)
jmp 0x299a39
cmpl $0x0, 0x7c(%rsp)
je 0x299f13
movq 0x3a20c0(%rip), %rax    # 0x63bfa0
movq (%rax), %rax
movq %rax, (%rsp)
movq 0x80(%rsp), %rdi
callq 0xd8b20
movq (%rsp), %rdi
movq %rax, %rdx
leaq 0x30211f(%rip), %rsi    # 0x59c021
movb $0x0, %al
callq 0x199f0
movl $0x1, %edi
callq 0x19890
movq 0x70(%rsp), %rdi
callq 0x251060
movq 0x80(%rsp), %rdi
callq 0xd8c80
addq $0xe8, %rsp
retq
nopw %cs:(%rax,%rax)