// File: /workspace/github_c_makefile_star2_O2/genometools[P]genometools/src/match/rdj-strgraph.c
// Function: gt_strgraph_dot_show_context
static int gt_strgraph_dot_show_context(GtStrgraph *strgraph,
    GtStrgraphFormat format, GtFile *outfp, GtUword *readnums,
    GtUword nofreadnums, GtUword maxdepth, bool extend,
    GtUword group, GtError *err)
{
  int had_err = 0;
  GtArray *stack;
  GtStrgraphVnumAndDepth to_add, *current;
  GtStrgraphVnum v, w;
  GtStrgraphVEdgenum j;
  GtUword d;
  GtUword sn1, sn2, readnum, i;
  bool is_e1, is_e2;

  gt_assert(format == GT_STRGRAPH_DOT || format == GT_STRGRAPH_DOT_BI);
  stack = gt_array_new(sizeof (GtStrgraphVnumAndDepth));
  for (i = 0; i < nofreadnums; i++)
  {
    readnum = readnums[i];
    if (readnum >= (GtUword)GT_STRGRAPH_NOFREADS(strgraph))
    {
      had_err = -1;
      gt_error_set(err, "Can't show context of read "GT_WU" "
          "because the readset has "FormatGtStrgraphVnum" reads", readnum,
          GT_STRGRAPH_NOFREADS(strgraph));
      break;
    }
    to_add.v = GT_STRGRAPH_V_B(readnum);
    to_add.d = 1UL;
    gt_array_add(stack, to_add);
    gt_strgraph_dot_show_vertex(outfp, format, strgraph, to_add.v, 1UL, group);
    to_add.v = GT_STRGRAPH_V_E(readnum);
    to_add.d = 1UL;
    gt_array_add(stack, to_add);
    gt_strgraph_dot_show_vertex(outfp, format, strgraph, to_add.v, 1UL, group);
  }
  if (had_err)
  {
    gt_array_delete(stack);
    return had_err;
  }
  while (gt_array_size(stack) > 0)
  {
    current = gt_array_pop(stack);
    v = current->v;
    d = current->d;
    if (!GT_STRGRAPH_DOT_VISITED(v))
    {
      sn1 = GT_STRGRAPH_V_READNUM(v);
      if (d > 1UL)
      {
        gt_strgraph_dot_show_vertex(outfp, format, strgraph, v, d, 0);
      }
      if (GT_STRGRAPH_V_OUTDEG(strgraph, v) > 0)
      {
        is_e1 = GT_STRGRAPH_V_IS_E(v);
        for (j = 0; j < GT_STRGRAPH_V_NOFEDGES(strgraph, v); j++)
        {
          if (!GT_STRGRAPH_EDGE_IS_REDUCED(strgraph, v, j))
          {
            w = GT_STRGRAPH_EDGE_DEST(strgraph, v, j);
            sn2 = GT_STRGRAPH_V_READNUM(w);
            is_e2 = GT_STRGRAPH_V_IS_E(w);
            if (format == GT_STRGRAPH_DOT)
            {
              gt_strgraph_dot_show_edge(outfp, v, w,
                  GT_STRGRAPH_EDGE_LEN(strgraph, v, j));
            }
            else
            {
              gt_strgraph_dot_bi_show_edge(outfp, sn1, !is_e1, sn2, is_e2);
            }
            if (d < maxdepth ||
                (extend && GT_STRGRAPH_V_IS_INTERNAL(strgraph, v)))
            {
              if (!GT_STRGRAPH_DOT_VISITED(w))
              {
                to_add.v = w;
                to_add.d = d + 1;
                gt_array_add(stack, to_add);
              }
              w = GT_STRGRAPH_V_OTHER(w);
              if (!GT_STRGRAPH_DOT_VISITED(w))
              {
                to_add.v = w;
                to_add.d = d + 1;
                gt_array_add(stack, to_add);
              }
            }
          }
        }
      }
    }
    GT_STRGRAPH_DOT_SET_VISITED(v, d);
  }
  gt_array_delete(stack);
  return had_err;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x58, %rsp
movq %r9, 0x50(%rsp)
movq %r8, 0x30(%rsp)
movq %rcx, 0x28(%rsp)
movq %rdx, 0x20(%rsp)
movl %esi, 0x4(%rsp)
cmpl $0x2, %esi
jae 0x18598b
movq %rdi, %r12
pushq $0x10
popq %rdi
callq 0x5809c
movq %rax, 0x18(%rsp)
xorl %edx, %edx
pushq $0x1
popq %rbp
movq 0x18(%rsp), %r13
movq 0x20(%rsp), %r15
movl 0x4(%rsp), %ebx
cmpq %rdx, 0x30(%rsp)
je 0x185616
movq 0x28(%rsp), %rax
movq (%rax,%rdx,8), %r14
movq 0x80(%r12), %rcx
shrq %rcx
cmpq %rcx, %r14
jae 0x18594f
addq %r14, %r14
movq %r14, 0x8(%rsp)
movq %rbp, 0x10(%rsp)
movq %r13, %rdi
leaq 0x8(%rsp), %rsi
pushq $0x10
popq %rax
movq %rdx, 0x38(%rsp)
movq %rax, %rdx
callq 0x5851d
movq 0x8(%rsp), %rcx
movq %r15, %rdi
movl %ebx, %esi
movq %r12, %rdx
movq %rbp, %r8
movq 0x98(%rsp), %r9
callq 0x1877d0
orq %rbp, %r14
movq %r14, 0x8(%rsp)
movq %rbp, 0x10(%rsp)
movq %r13, %rdi
leaq 0x8(%rsp), %rsi
pushq $0x10
popq %rdx
callq 0x5851d
movq 0x8(%rsp), %rcx
movq %r15, %rdi
movl %ebx, %esi
movq %r12, %rdx
movq %rbp, %r8
movq 0x98(%rsp), %r9
callq 0x1877d0
movq 0x38(%rsp), %rdx
incq %rdx
jmp 0x185565
pushq $-0x1
popq %rbp
movq 0x18(%rsp), %rbx
movq %rbx, %rdi
callq 0x586a4
testq %rax, %rax
je 0x18594a
movq %rbx, %rdi
callq 0x58247
movq (%rax), %r13
movq 0x8(%rax), %r15
movq 0x58(%r12), %rdi
movq %r13, %rsi
callq 0x17ffcd
cmpl $0x2, %eax
je 0x18592b
movq 0x58(%r12), %rdi
movq %r13, %rsi
callq 0x17ffcd
cmpl $0x3, %eax
je 0x18592b
cmpq $0x2, %r15
jb 0x18568a
movq 0x20(%rsp), %rdi
movl 0x4(%rsp), %esi
movq %r12, %rdx
movq %r13, %rcx
movq %r15, %r8
xorl %r9d, %r9d
callq 0x1877d0
movq 0x70(%r12), %rdi
movq %r13, %rsi
callq 0x17ffcd
testq %rax, %rax
je 0x18592b
movq %r13, %rax
shrq %rax
movq %rax, 0x28(%rsp)
leaq 0x1(%r13), %rax
leaq -0x1(%r13), %rcx
testb $0x1, %r13b
movq %rax, 0x38(%rsp)
cmoveq %rax, %rcx
movq %rcx, 0x48(%rsp)
leaq 0x1(%r15), %rax
movq %rax, 0x40(%rsp)
xorl %r14d, %r14d
movq %r15, 0x30(%rsp)
movq 0x60(%r12), %rdi
movq 0x38(%rsp), %rsi
callq 0x17ffcd
movq %rax, %rbx
movq 0x60(%r12), %rdi
movq %r13, %rsi
callq 0x17ffcd
subq %rax, %rbx
cmpq %rbx, %r14
jae 0x18592b
movq 0x60(%r12), %rdi
movq 0x88(%r12), %rbx
movq %r13, %rsi
callq 0x17ffcd
leaq (%rax,%r14), %rsi
movq %rbx, %rdi
callq 0x17ffcd
movq %rax, %rbx
movq 0x90(%r12), %rdi
callq 0x28a939
movl %ebp, %edx
movl %eax, %ecx
shll %cl, %edx
notl %edx
addl %edx, %edx
movslq %edx, %rax
andq %rbx, %rax
shrq %rax
cmpq 0x90(%r12), %rax
je 0x185920
movq 0x60(%r12), %rdi
movq 0x88(%r12), %rbx
movq %r13, %rsi
callq 0x17ffcd
leaq (%rax,%r14), %rsi
movq %rbx, %rdi
callq 0x17ffcd
movq %rax, %rbx
movq 0x80(%r12), %rdi
callq 0x28a939
pushq $-0x1
popq %r15
movl %r15d, %ebp
movl %eax, %ecx
shll %cl, %ebp
notl %ebp
movq 0x90(%r12), %rdi
callq 0x28a939
leal 0x1(%rax), %ecx
shll %cl, %ebp
movslq %ebp, %rbp
andq %rbx, %rbp
movq 0x90(%r12), %rdi
callq 0x28a939
leal 0x1(%rax), %ecx
shrq %cl, %rbp
cmpl $0x0, 0x4(%rsp)
je 0x1857ea
movl %ebp, %r8d
andl $0x1, %r8d
xorl %edx, %edx
testb $0x1, %r13b
sete %dl
movq %rbp, %rcx
shrq %rcx
movq 0x20(%rsp), %rdi
movq 0x28(%rsp), %rsi
callq 0x18779b
jmp 0x18583f
movq 0x60(%r12), %rdi
movq 0x88(%r12), %rbx
movq %r13, %rsi
callq 0x17ffcd
leaq (%rax,%r14), %rsi
movq %rbx, %rdi
callq 0x17ffcd
movq %rax, %rbx
movq 0x90(%r12), %rdi
callq 0x28a939
movl %eax, %ecx
shll %cl, %r15d
notl %r15d
addl %r15d, %r15d
movslq %r15d, %rcx
andq %rbx, %rcx
shrq %rcx
movq 0x20(%rsp), %rdi
movq %r13, %rsi
movq %rbp, %rdx
callq 0x18775e
movq 0x30(%rsp), %r15
cmpq 0x50(%rsp), %r15
jae 0x1858ea
movq 0x58(%r12), %rdi
movq %rbp, %rsi
callq 0x17ffcd
cmpl $0x2, %eax
je 0x185894
movq 0x58(%r12), %rdi
movq %rbp, %rsi
callq 0x17ffcd
cmpl $0x3, %eax
je 0x185894
movq %rbp, 0x8(%rsp)
movq 0x40(%rsp), %rax
movq %rax, 0x10(%rsp)
movq 0x18(%rsp), %rdi
leaq 0x8(%rsp), %rsi
pushq $0x10
popq %rdx
callq 0x5851d
movl %ebp, %ebx
andl $0x1, %ebx
negq %rbx
orq $0x1, %rbx
addq %rbp, %rbx
movq 0x58(%r12), %rdi
movq %rbx, %rsi
callq 0x17ffcd
cmpl $0x2, %eax
je 0x185920
movq 0x58(%r12), %rdi
movq %rbx, %rsi
callq 0x17ffcd
cmpl $0x3, %eax
je 0x185920
movq %rbx, 0x8(%rsp)
movq 0x40(%rsp), %rax
movq %rax, 0x10(%rsp)
movq 0x18(%rsp), %rdi
leaq 0x8(%rsp), %rsi
pushq $0x10
popq %rdx
callq 0x5851d
jmp 0x185920
cmpb $0x0, 0x90(%rsp)
je 0x185920
movq 0x70(%r12), %rdi
movq %r13, %rsi
callq 0x17ffcd
cmpq $0x1, %rax
jne 0x185920
movq 0x70(%r12), %rdi
movq 0x48(%rsp), %rsi
callq 0x17ffcd
cmpq $0x1, %rax
je 0x18584f
incq %r14
pushq $-0x1
popq %rbp
jmp 0x1856d6
xorl %edx, %edx
cmpq $0x1, %r15
sete %dl
movq 0x58(%r12), %rdi
orq $0x2, %rdx
movq %r13, %rsi
callq 0x180026
jmp 0x185619
xorl %r14d, %r14d
jmp 0x185971
leaq 0x1cb063(%rip), %rsi    # 0x3509b9
movq 0xa0(%rsp), %rdi
movq %r14, %rdx
xorl %eax, %eax
callq 0x89dbb
pushq $-0x1
popq %r14
movq 0x18(%rsp), %rbx
movq %rbx, %rdi
callq 0x58eb9
movl %r14d, %eax
addq $0x58, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movq 0x2b25d6(%rip), %rax    # 0x437f68
movq (%rax), %rdi
leaq 0x15f677(%rip), %rsi    # 0x2e5013
leaq 0x1ca777(%rip), %rdx    # 0x35011a
leaq 0x1caff2(%rip), %rcx    # 0x35099c
leaq 0x1c9dc4(%rip), %r8     # 0x34f775
movl $0x60b, %r9d            # imm = 0x60B
xorl %eax, %eax
callq 0x17a50
callq 0x17390