// File: /workspace/github_c_makefile_star2_O3/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 $0x28, %rsp
movq %rcx, 0x18(%rsp)
movq 0x60(%rdi), %rax
testq %rax, %rax
je 0x1d98fc
movq %rsi, %r13
cmpq %rsi, 0x8(%rax)
jbe 0x1d98fc
movq %rdx, %r12
movl 0x10(%rax), %edx
cmpq $0x41, %rdx
jae 0x1d98fc
movq %r9, %r15
movq %rdi, %rbx
movl %r8d, 0x4(%rsp)
movq 0x88(%rdi), %r14
movq (%rax), %rdi
movq %rdx, %rsi
imulq %r13, %rsi
callq 0x2f37dc
testq %r14, %r14
je 0x1d9901
addq %r12, %rax
cmpq %rax, 0x8(%r14)
jbe 0x1d9901
movl 0x10(%r14), %edx
cmpq $0x41, %rdx
jae 0x1d9901
movq (%r14), %rdi
imulq %rdx, %rax
movq %rax, %rsi
callq 0x2f37dc
movq %rax, %rbp
movq 0x80(%rbx), %rdi
callq 0x2f09dd
movl $0xffffffff, %r14d      # imm = 0xFFFFFFFF
movl %eax, %ecx
shll %cl, %r14d
notl %r14d
movq 0x90(%rbx), %rdi
callq 0x2f09dd
leal 0x1(%rax), %ecx
shll %cl, %r14d
movslq %r14d, %r14
andq %rbp, %r14
movq 0x90(%rbx), %rdi
callq 0x2f09dd
leal 0x1(%rax), %ecx
shrq %cl, %r14
movq %r14, 0x8(%rsp)
movq 0x60(%rbx), %rax
testq %rax, %rax
je 0x1d9906
cmpq %r13, 0x8(%rax)
jbe 0x1d9906
movl 0x10(%rax), %edx
cmpq $0x41, %rdx
jae 0x1d9906
movq 0x88(%rbx), %rbp
movq (%rax), %rdi
imulq %rdx, %r13
movq %r13, %rsi
callq 0x2f37dc
testq %rbp, %rbp
je 0x1d990b
addq %r12, %rax
cmpq %rax, 0x8(%rbp)
jbe 0x1d990b
movl 0x10(%rbp), %edx
cmpq $0x41, %rdx
jae 0x1d990b
movq 0x80(%rsp), %r13
movq (%rbp), %rdi
imulq %rdx, %rax
movq %rax, %rsi
callq 0x2f37dc
movq %rax, %rbp
movq 0x90(%rbx), %rdi
callq 0x2f09dd
movl $0xffffffff, %r12d      # imm = 0xFFFFFFFF
movl $0xffffffff, %edx       # imm = 0xFFFFFFFF
movl %eax, %ecx
shll %cl, %edx
notl %edx
addl %edx, %edx
movslq %edx, %rcx
andq %rbp, %rcx
shrq %rcx
movq %rcx, 0x10(%rsp)
addq %r15, %rcx
cmpq 0x68(%rsp), %rcx
jbe 0x1d94bf
incq (%r13)
jmp 0x1d98db
movq 0xa8(%rsp), %r13
movq %r14, %rax
shrq %rax
cmpq 0x18(%rsp), %rax
movl 0x4(%rsp), %eax
jne 0x1d958f
testl %eax, %eax
je 0x1d9585
cmpl $0x2, %eax
je 0x1d94fc
cmpl $0x1, %eax
jne 0x1d958f
testb $0x1, %r14b
je 0x1d958f
cmpq 0x60(%rsp), %rcx
jbe 0x1d9575
movq 0x90(%rsp), %rax
incq (%rax)
leaq 0x8(%rsp), %rsi
movl $0x10, %edx
movq 0x70(%rsp), %r15
movq %r15, %rdi
movq %rcx, %r14
callq 0xd2410
leaq 0x1d6f59(%rip), %rsi    # 0x3b0488
movq 0xb0(%rsp), %rdi
movq %r14, %rdx
xorl %eax, %eax
callq 0x103fe1
movq %r15, %rdi
callq 0xd24e0
movq %rax, %r14
movq %r15, %rdi
xorl %esi, %esi
callq 0xd2207
movq (%rax), %rsi
testb $0x1, %sil
jne 0x1d9877
shrq %rsi
notq %rsi
addq 0x80(%rbx), %rsi
jmp 0x1d987a
movq 0x88(%rsp), %rax
incq (%rax)
jmp 0x1d98db
testb $0x1, %r14b
je 0x1d94fc
movq %rcx, 0x20(%rsp)
movq 0x58(%rbx), %rax
testq %rax, %rax
je 0x1d9910
cmpq %r14, 0x8(%rax)
jbe 0x1d9910
movl 0x10(%rax), %edx
cmpq $0x41, %rdx
jae 0x1d9910
movq 0x98(%rsp), %r15
movq (%rax), %rdi
movq %rdx, %rsi
imulq %r14, %rsi
callq 0x2f37dc
cmpl $0x3, %eax
je 0x1d9614
movq 0x58(%rbx), %rax
testq %rax, %rax
je 0x1d9915
cmpq %r14, 0x8(%rax)
jbe 0x1d9915
movl 0x10(%rax), %edx
cmpq $0x41, %rdx
jae 0x1d9915
movq 0xa0(%rsp), %r15
movq (%rax), %rdi
movq %rdx, %rsi
imulq %r14, %rsi
callq 0x2f37dc
cmpl $0x1, %eax
jne 0x1d9622
incq (%r15)
movl $0xffffffff, %r12d      # imm = 0xFFFFFFFF
jmp 0x1d98db
movq 0x58(%rbx), %rax
testq %rax, %rax
je 0x1d991a
cmpq %r14, 0x8(%rax)
jbe 0x1d991a
movl 0x10(%rax), %edx
cmpq $0x41, %rdx
jae 0x1d991a
movq (%rax), %rdi
imulq %rdx, %r14
movl $0x3, %ecx
movq %r14, %rsi
callq 0x2f388c
movq 0x60(%rbx), %rax
testq %rax, %rax
je 0x1d9836
movl $0xffffffff, %r12d      # imm = 0xFFFFFFFF
xorl %r14d, %r14d
movq 0x8(%rsp), %rsi
incq %rsi
cmpq %rsi, 0x8(%rax)
jbe 0x1d9836
movl 0x10(%rax), %edx
cmpq $0x41, %rdx
jae 0x1d9836
movq (%rax), %rdi
imulq %rdx, %rsi
callq 0x2f37dc
movq %rax, %rbp
movq 0x60(%rbx), %rax
testq %rax, %rax
je 0x1d98ed
movq 0x8(%rsp), %rsi
cmpq %rsi, 0x8(%rax)
jbe 0x1d98ed
movl 0x10(%rax), %edx
cmpq $0x41, %rdx
jae 0x1d98ed
movq (%rax), %rdi
imulq %rdx, %rsi
callq 0x2f37dc
subq %rax, %rbp
cmpq %rbp, %r14
jae 0x1d983b
movq 0x60(%rbx), %rax
testq %rax, %rax
je 0x1d98f2
movq 0x8(%rsp), %rsi
cmpq %rsi, 0x8(%rax)
jbe 0x1d98f2
movl 0x10(%rax), %edx
cmpq $0x41, %rdx
jae 0x1d98f2
movq 0x88(%rbx), %r15
movq (%rax), %rdi
imulq %rdx, %rsi
callq 0x2f37dc
testq %r15, %r15
je 0x1d98f7
addq %r14, %rax
cmpq %rax, 0x8(%r15)
jbe 0x1d98f7
movl 0x10(%r15), %edx
cmpq $0x41, %rdx
jae 0x1d98f7
movq (%r15), %rdi
imulq %rdx, %rax
movq %rax, %rsi
callq 0x2f37dc
movq %rax, %rbp
movq 0x90(%rbx), %rdi
callq 0x2f09dd
movl $0xffffffff, %edx       # imm = 0xFFFFFFFF
movl %eax, %ecx
shll %cl, %edx
notl %edx
addl %edx, %edx
movslq %edx, %rax
andq %rbp, %rax
shrq %rax
cmpq 0x90(%rbx), %rax
je 0x1d9826
movl $0x10, %edx
movq 0x70(%rsp), %r13
movq %r13, %rdi
leaq 0x8(%rsp), %rsi
callq 0xd2410
movq 0x8(%rsp), %rsi
subq $0x8, %rsp
movzbl 0x80(%rsp), %r15d
movq %rbx, %rdi
movq %r14, %rdx
movq 0x20(%rsp), %rcx
movl 0xc(%rsp), %r8d
movq 0x28(%rsp), %r9
pushq 0xb8(%rsp)
pushq 0xb8(%rsp)
pushq 0xb8(%rsp)
pushq 0xb8(%rsp)
pushq 0xb8(%rsp)
pushq 0xb8(%rsp)
pushq 0xb8(%rsp)
pushq %r15
pushq %r13
pushq 0xb8(%rsp)
pushq 0xb8(%rsp)
callq 0x1d932a
addq $0x60, %rsp
movl %eax, %ebp
movq %r13, %rdi
callq 0xd2242
testl %ebp, %ebp
sete %al
cmovel %ebp, %r12d
testb %r15b, %al
jne 0x1d98d8
incq %r14
movq 0x60(%rbx), %rax
testq %rax, %rax
jne 0x1d9670
callq 0x72034
movq 0x58(%rbx), %rax
testq %rax, %rax
je 0x1d991f
movq 0x8(%rsp), %rsi
cmpq %rsi, 0x8(%rax)
jbe 0x1d991f
movl 0x10(%rax), %edx
cmpq $0x41, %rdx
jae 0x1d991f
movq (%rax), %rdi
imulq %rdx, %rsi
movl $0x1, %ecx
callq 0x2f388c
jmp 0x1d98db
shrq %rsi
movq %r13, %rdi
callq 0x1c865e
cmpq $0x2, %r14
jb 0x1d98c8
movl $0x1, %r12d
movq %r15, %rdi
movq %r12, %rsi
callq 0xd2207
movq (%rax), %rsi
testb $0x1, %sil
jne 0x1d98b1
shrq %rsi
notq %rsi
addq 0x80(%rbx), %rsi
jmp 0x1d98b4
shrq %rsi
movq 0x8(%rax), %rdx
movq %r13, %rdi
callq 0x1c84b8
incq %r12
cmpq %r12, %r14
jne 0x1d988e
movq %r13, %rdi
callq 0x1c81ca
movq %r15, %rdi
callq 0xd2242
xorl %r12d, %r12d
movl %r12d, %eax
addq $0x28, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
callq 0x71ffb
callq 0x71fc2
callq 0x71f89
callq 0x721c3
callq 0x7218a
callq 0x72151
callq 0x72118
callq 0x720df
callq 0x720a6
callq 0x7206d
callq 0x71f50