// File: /workspace/github_c_makefile_star2_O0/genometools[P]genometools/src/match/rdj-strgraph.c
// Function: gt_strgraph_add_edge_to_connecting_path
static int gt_strgraph_add_edge_to_connecting_path(GtStrgraph *strgraph,
    GtStrgraphVnum from, GtStrgraphVEdgenum j, GtUword goal_sn,
    GtStrgraphVtype goal_vt, GtUword current_length, GtUword minlen,
    GtUword maxlen, GtArray *path, bool first_path_only,
    GtUword *count_too_long, GtUword *count_too_short, GtUword *count_found,
    GtUword *count_circular, GtUword *count_redundant, GtContigsWriter *cw,
    GtLogger *logger)
{
  GtStrgraphVnumAndDepth wl;
  GtStrgraphVEdgenum e;
  wl.v = GT_STRGRAPH_EDGE_DEST(strgraph, from, j);
  wl.d = GT_STRGRAPH_EDGE_LEN(strgraph, from, j);
  current_length += wl.d;
  if (current_length > maxlen)
  {
    (*count_too_long)++;
    return -1;
  }
  if ((GT_STRGRAPH_V_READNUM(wl.v) == goal_sn) &&
      ((goal_vt == GT_STRGRAPH_VTYPE_A) ||
       ((goal_vt == GT_STRGRAPH_VTYPE_E) && GT_STRGRAPH_V_IS_E(wl.v)) ||
       ((goal_vt == GT_STRGRAPH_VTYPE_B) && GT_STRGRAPH_V_IS_B(wl.v))))
  {
    if (current_length <= minlen)
    {
      (*count_too_short)++;
      return -1;
    }
    else
    {
      (*count_found)++;
      gt_array_add(path, wl);
      gt_logger_log(logger, "Path found, length: "GT_WU, current_length);
      gt_strgraph_output_connecting_path(strgraph, path, cw);
      gt_array_pop(path);
      return 0;
    }
  }
  if (GT_STRGRAPH_V_MARK(strgraph, wl.v) == GT_STRGRAPH_V_MARKED)
  {
    (*count_circular)++;
    return -1;
  }
  else if (GT_STRGRAPH_V_MARK(strgraph, wl.v) == GT_STRGRAPH_V_INPLAY)
  {
    (*count_redundant)++;
    return -1;
  }
  else
  {
    int found = -1;
    GT_STRGRAPH_V_SET_MARK(strgraph, wl.v, GT_STRGRAPH_V_MARKED);
    for (e = 0; e < GT_STRGRAPH_V_NOFEDGES(strgraph, wl.v); e++)
    {
      if (!GT_STRGRAPH_EDGE_IS_REDUCED(strgraph, wl.v, e))
      {
        int retcode;
        gt_array_add(path, wl);
        retcode = gt_strgraph_add_edge_to_connecting_path(strgraph, wl.v, e,
            goal_sn, goal_vt, current_length, minlen, maxlen, path,
            first_path_only, count_too_long, count_too_short, count_found,
            count_circular, count_redundant, cw, logger);
        gt_array_pop(path);
        if (retcode == 0)
        {
          if (first_path_only)
            return retcode;
          found = retcode;
        }
      }
    }
    GT_STRGRAPH_V_SET_MARK(strgraph, wl.v, GT_STRGRAPH_V_INPLAY);
    return found;
  }
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x128, %rsp            # imm = 0x128
movq 0x1b0(%rsp), %rax
movq 0x1a8(%rsp), %rax
movq 0x1a0(%rsp), %rax
movq 0x198(%rsp), %rax
movq 0x190(%rsp), %rax
movq 0x188(%rsp), %rax
movq 0x180(%rsp), %rax
movb 0x178(%rsp), %al
movq 0x170(%rsp), %r10
movq 0x168(%rsp), %r10
movq 0x160(%rsp), %r10
movq %rdi, 0x118(%rsp)
movq %rsi, 0x110(%rsp)
movq %rdx, 0x108(%rsp)
movq %rcx, 0x100(%rsp)
movl %r8d, 0xfc(%rsp)
movq %r9, 0xf0(%rsp)
andb $0x1, %al
movb %al, 0xef(%rsp)
movq 0x118(%rsp), %rax
movq 0x88(%rax), %rax
movq %rax, 0x98(%rsp)
movq 0x118(%rsp), %rax
movq 0x60(%rax), %rdi
movq 0x110(%rsp), %rsi
callq 0x290730
movq 0x98(%rsp), %rdi
movq %rax, %rsi
addq 0x108(%rsp), %rsi
callq 0x290730
movq %rax, 0xa8(%rsp)
movq 0x118(%rsp), %rax
movq 0x80(%rax), %rdi
callq 0x46ec80
movl %eax, %ecx
movl $0x1, %eax
shll %cl, %eax
subl $0x1, %eax
movl %eax, 0xa4(%rsp)
movq 0x118(%rsp), %rax
movq 0x90(%rax), %rdi
callq 0x46ec80
movl 0xa4(%rsp), %edx
movl %eax, %ecx
movq 0xa8(%rsp), %rax
addl $0x1, %ecx
shll %cl, %edx
movl %edx, %ecx
movslq %ecx, %rcx
andq %rcx, %rax
movq %rax, 0xb0(%rsp)
movq 0x118(%rsp), %rax
movq 0x90(%rax), %rdi
callq 0x46ec80
movl %eax, %ecx
movq 0xb0(%rsp), %rax
addl $0x1, %ecx
movl %ecx, %ecx
shrq %cl, %rax
movq %rax, 0xd8(%rsp)
movq 0x118(%rsp), %rax
movq 0x88(%rax), %rax
movq %rax, 0xb8(%rsp)
movq 0x118(%rsp), %rax
movq 0x60(%rax), %rdi
movq 0x110(%rsp), %rsi
callq 0x290730
movq 0xb8(%rsp), %rdi
movq %rax, %rsi
addq 0x108(%rsp), %rsi
callq 0x290730
movq %rax, 0xc0(%rsp)
movq 0x118(%rsp), %rax
movq 0x90(%rax), %rdi
callq 0x46ec80
movl %eax, %ecx
movq 0xc0(%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 %rax, 0xe0(%rsp)
movq 0xe0(%rsp), %rax
addq 0xf0(%rsp), %rax
movq %rax, 0xf0(%rsp)
movq 0xf0(%rsp), %rax
cmpq 0x168(%rsp), %rax
jbe 0x29dde9
movq 0x180(%rsp), %rax
movq (%rax), %rcx
addq $0x1, %rcx
movq %rcx, (%rax)
movl $0xffffffff, 0x124(%rsp) # imm = 0xFFFFFFFF
jmp 0x29e25f
movq 0xd8(%rsp), %rax
shrq %rax
cmpq 0x100(%rsp), %rax
jne 0x29df04
cmpl $0x2, 0xfc(%rsp)
je 0x29de4c
cmpl $0x1, 0xfc(%rsp)
jne 0x29de28
movq 0xd8(%rsp), %rax
andq $0x1, %rax
cmpq $0x1, %rax
je 0x29de4c
cmpl $0x0, 0xfc(%rsp)
jne 0x29df04
movq 0xd8(%rsp), %rax
andq $0x1, %rax
cmpq $0x1, %rax
je 0x29df04
movq 0xf0(%rsp), %rax
cmpq 0x160(%rsp), %rax
ja 0x29de80
movq 0x188(%rsp), %rax
movq (%rax), %rcx
addq $0x1, %rcx
movq %rcx, (%rax)
movl $0xffffffff, 0x124(%rsp) # imm = 0xFFFFFFFF
jmp 0x29e25f
movq 0x190(%rsp), %rax
movq (%rax), %rcx
addq $0x1, %rcx
movq %rcx, (%rax)
movq 0x170(%rsp), %rdi
leaq 0xd8(%rsp), %rsi
movl $0x10, %edx
callq 0x81100
movq 0x1b0(%rsp), %rdi
movq 0xf0(%rsp), %rdx
leaq 0x2e5366(%rip), %rsi    # 0x583229
movb $0x0, %al
callq 0xe7cd0
movq 0x118(%rsp), %rdi
movq 0x170(%rsp), %rsi
movq 0x1a8(%rsp), %rdx
callq 0x29e280
movq 0x170(%rsp), %rdi
callq 0x80c70
movl $0x0, 0x124(%rsp)
jmp 0x29e25f
movq 0x118(%rsp), %rax
movq 0x58(%rax), %rdi
movq 0xd8(%rsp), %rsi
callq 0x290730
cmpl $0x3, %eax
jne 0x29df44
movq 0x198(%rsp), %rax
movq (%rax), %rcx
addq $0x1, %rcx
movq %rcx, (%rax)
movl $0xffffffff, 0x124(%rsp) # imm = 0xFFFFFFFF
jmp 0x29e25f
movq 0x118(%rsp), %rax
movq 0x58(%rax), %rdi
movq 0xd8(%rsp), %rsi
callq 0x290730
cmpl $0x1, %eax
jne 0x29df84
movq 0x1a0(%rsp), %rax
movq (%rax), %rcx
addq $0x1, %rcx
movq %rcx, (%rax)
movl $0xffffffff, 0x124(%rsp) # imm = 0xFFFFFFFF
jmp 0x29e25f
movl $0xffffffff, 0xcc(%rsp) # imm = 0xFFFFFFFF
movq 0x118(%rsp), %rax
movq 0x58(%rax), %rdi
movq 0xd8(%rsp), %rsi
movl $0x3, %edx
callq 0x2907d0
movq $0x0, 0xd0(%rsp)
movq 0xd0(%rsp), %rax
movq %rax, 0x90(%rsp)
movq 0x118(%rsp), %rax
movq 0x60(%rax), %rdi
movq 0xd8(%rsp), %rsi
addq $0x1, %rsi
callq 0x290730
movq %rax, 0x88(%rsp)
movq 0x118(%rsp), %rax
movq 0x60(%rax), %rdi
movq 0xd8(%rsp), %rsi
callq 0x290730
movq 0x88(%rsp), %rcx
movq %rax, %rdx
movq 0x90(%rsp), %rax
subq %rdx, %rcx
cmpq %rcx, %rax
jae 0x29e233
movq 0x118(%rsp), %rax
movq 0x88(%rax), %rax
movq %rax, 0x78(%rsp)
movq 0x118(%rsp), %rax
movq 0x60(%rax), %rdi
movq 0xd8(%rsp), %rsi
callq 0x290730
movq 0x78(%rsp), %rdi
movq %rax, %rsi
addq 0xd0(%rsp), %rsi
callq 0x290730
movq %rax, 0x80(%rsp)
movq 0x118(%rsp), %rax
movq 0x90(%rax), %rdi
callq 0x46ec80
movl %eax, %ecx
movq 0x80(%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 0x118(%rsp), %rcx
cmpq 0x90(%rcx), %rax
jne 0x29e0c2
movb $0x1, %al
testb $0x1, %al
jne 0x29e218
jmp 0x29e0ce
xorl %eax, %eax
testb $0x1, %al
jne 0x29e218
jmp 0x29e0ce
movq 0x170(%rsp), %rdi
leaq 0xd8(%rsp), %rsi
movl $0x10, %edx
callq 0x81100
movq 0x118(%rsp), %rdi
movq 0xd8(%rsp), %rsi
movq 0xd0(%rsp), %rdx
movq 0x100(%rsp), %rcx
movl 0xfc(%rsp), %r8d
movq 0xf0(%rsp), %r9
movq 0x160(%rsp), %rax
movq %rax, 0x60(%rsp)
movq 0x168(%rsp), %rax
movq %rax, 0x68(%rsp)
movq 0x170(%rsp), %r13
movb 0xef(%rsp), %bpl
movq 0x180(%rsp), %r12
movq 0x188(%rsp), %r15
movq 0x190(%rsp), %r14
movq 0x198(%rsp), %rbx
movq 0x1a0(%rsp), %r11
movq 0x1a8(%rsp), %r10
movq 0x1b0(%rsp), %rax
movq %rax, 0x70(%rsp)
movq 0x60(%rsp), %rax
andb $0x1, %bpl
movq %rax, (%rsp)
movq 0x68(%rsp), %rax
movq %rax, 0x8(%rsp)
movq 0x70(%rsp), %rax
movq %r13, 0x10(%rsp)
movzbl %bpl, %ebp
movl %ebp, 0x18(%rsp)
movq %r12, 0x20(%rsp)
movq %r15, 0x28(%rsp)
movq %r14, 0x30(%rsp)
movq %rbx, 0x38(%rsp)
movq %r11, 0x40(%rsp)
movq %r10, 0x48(%rsp)
movq %rax, 0x50(%rsp)
callq 0x29db90
movl %eax, 0xc8(%rsp)
movq 0x170(%rsp), %rdi
callq 0x80c70
cmpl $0x0, 0xc8(%rsp)
jne 0x29e216
testb $0x1, 0xef(%rsp)
je 0x29e208
movl 0xc8(%rsp), %eax
movl %eax, 0x124(%rsp)
jmp 0x29e25f
movl 0xc8(%rsp), %eax
movl %eax, 0xcc(%rsp)
jmp 0x29e218
jmp 0x29e21a
movq 0xd0(%rsp), %rax
addq $0x1, %rax
movq %rax, 0xd0(%rsp)
jmp 0x29dfb9
movq 0x118(%rsp), %rax
movq 0x58(%rax), %rdi
movq 0xd8(%rsp), %rsi
movl $0x1, %edx
callq 0x2907d0
movl 0xcc(%rsp), %eax
movl %eax, 0x124(%rsp)
movl 0x124(%rsp), %eax
addq $0x128, %rsp            # imm = 0x128
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
nopl (%rax,%rax)