// File: /workspace/github_c_makefile_star2_O1/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
movl %r8d, 0x14(%rsp)
movq %rcx, 0x18(%rsp)
movq 0x60(%rdi), %rax
testq %rax, %rax
je 0x1e3137
movq %rsi, %r13
cmpq %rsi, 0x8(%rax)
jbe 0x1e3137
movq %rdx, %r12
movl 0x10(%rax), %edx
cmpq $0x41, %rdx
jae 0x1e3137
movq %r9, %r15
movq %rdi, %rbx
movq 0x88(%rdi), %r14
movq (%rax), %rdi
movq %rdx, %rsi
imulq %r13, %rsi
callq 0x2fcc2c
testq %r14, %r14
je 0x1e313c
addq %r12, %rax
cmpq %rax, 0x8(%r14)
jbe 0x1e313c
movl 0x10(%r14), %edx
cmpq $0x41, %rdx
jae 0x1e313c
movq (%r14), %rdi
imulq %rdx, %rax
movq %rax, %rsi
callq 0x2fcc2c
movq %rax, %r14
movq 0x80(%rbx), %rdi
callq 0x2f9d41
movl $0xffffffff, %ebp       # imm = 0xFFFFFFFF
movl %eax, %ecx
shll %cl, %ebp
notl %ebp
movq 0x90(%rbx), %rdi
callq 0x2f9d41
leal 0x1(%rax), %ecx
shll %cl, %ebp
movslq %ebp, %rbp
andq %r14, %rbp
movq 0x90(%rbx), %rdi
callq 0x2f9d41
leal 0x1(%rax), %ecx
shrq %cl, %rbp
movq %rbp, (%rsp)
movq 0x60(%rbx), %rax
testq %rax, %rax
je 0x1e3141
cmpq %r13, 0x8(%rax)
jbe 0x1e3141
movl 0x10(%rax), %edx
cmpq $0x41, %rdx
jae 0x1e3141
movq 0x88(%rbx), %r14
movq (%rax), %rdi
imulq %rdx, %r13
movq %r13, %rsi
callq 0x2fcc2c
testq %r14, %r14
je 0x1e3146
addq %r12, %rax
cmpq %rax, 0x8(%r14)
jbe 0x1e3146
movl 0x10(%r14), %edx
cmpq $0x41, %rdx
jae 0x1e3146
movq 0x80(%rsp), %r12
movq (%r14), %rdi
imulq %rdx, %rax
movq %rax, %rsi
callq 0x2fcc2c
movq %rax, %r14
movq 0x90(%rbx), %rdi
callq 0x2f9d41
movl %eax, %ecx
movl $0xffffffff, %eax       # imm = 0xFFFFFFFF
movl $0xffffffff, %edx       # imm = 0xFFFFFFFF
shll %cl, %edx
notl %edx
addl %edx, %edx
movslq %edx, %rbp
andq %r14, %rbp
shrq %rbp
movq %rbp, 0x8(%rsp)
addq %r15, %rbp
cmpq 0x68(%rsp), %rbp
jbe 0x1e2cfb
incq (%r12)
jmp 0x1e2dc9
movq 0xa8(%rsp), %r13
movq 0x70(%rsp), %r15
movq (%rsp), %rsi
movq %rsi, %rax
shrq %rax
cmpq 0x18(%rsp), %rax
movl 0x14(%rsp), %eax
jne 0x1e2d43
testl %eax, %eax
je 0x1e303e
cmpl $0x2, %eax
je 0x1e3048
cmpl $0x1, %eax
jne 0x1e2d43
testl %eax, %eax
sete %al
orb %sil, %al
testb $0x1, %al
jne 0x1e3048
movq 0x58(%rbx), %rax
testq %rax, %rax
je 0x1e314b
cmpq %rsi, 0x8(%rax)
jbe 0x1e314b
movl 0x10(%rax), %edx
cmpq $0x41, %rdx
jae 0x1e314b
movq 0x98(%rsp), %r14
movq (%rax), %rdi
imulq %rdx, %rsi
callq 0x2fcc2c
cmpl $0x3, %eax
je 0x1e2dc1
movq 0x58(%rbx), %rax
testq %rax, %rax
je 0x1e3150
movq (%rsp), %rsi
cmpq %rsi, 0x8(%rax)
jbe 0x1e3150
movl 0x10(%rax), %edx
cmpq $0x41, %rdx
jae 0x1e3150
movq 0xa0(%rsp), %r14
movq (%rax), %rdi
imulq %rdx, %rsi
callq 0x2fcc2c
cmpl $0x1, %eax
jne 0x1e2dd8
incq (%r14)
movl $0xffffffff, %eax       # imm = 0xFFFFFFFF
addq $0x28, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movq %rbp, 0x20(%rsp)
movq 0x58(%rbx), %rax
testq %rax, %rax
je 0x1e3155
movq (%rsp), %rsi
cmpq %rsi, 0x8(%rax)
jbe 0x1e3155
movl 0x10(%rax), %edx
cmpq $0x41, %rdx
jae 0x1e3155
movq (%rax), %rdi
imulq %rdx, %rsi
movl $0x3, %ecx
callq 0x2fcd13
movq 0x60(%rbx), %rax
testq %rax, %rax
je 0x1e2ff9
movl $0xffffffff, %ebp       # imm = 0xFFFFFFFF
xorl %r12d, %r12d
movq (%rsp), %rsi
incq %rsi
cmpq %rsi, 0x8(%rax)
jbe 0x1e2ff9
movl 0x10(%rax), %edx
cmpq $0x41, %rdx
jae 0x1e2ff9
movq (%rax), %rdi
imulq %rdx, %rsi
callq 0x2fcc2c
movq %rax, %r14
movq 0x60(%rbx), %rax
testq %rax, %rax
je 0x1e3128
movq (%rsp), %rsi
cmpq %rsi, 0x8(%rax)
jbe 0x1e3128
movl 0x10(%rax), %edx
cmpq $0x41, %rdx
jae 0x1e3128
movq (%rax), %rdi
imulq %rdx, %rsi
callq 0x2fcc2c
subq %rax, %r14
cmpq %r14, %r12
jae 0x1e2ffe
movq 0x60(%rbx), %rax
testq %rax, %rax
je 0x1e312d
movq (%rsp), %rsi
cmpq %rsi, 0x8(%rax)
jbe 0x1e312d
movl 0x10(%rax), %edx
cmpq $0x41, %rdx
jae 0x1e312d
movq 0x88(%rbx), %r14
movq (%rax), %rdi
imulq %rdx, %rsi
callq 0x2fcc2c
testq %r14, %r14
je 0x1e3132
addq %r12, %rax
cmpq %rax, 0x8(%r14)
jbe 0x1e3132
movl 0x10(%r14), %edx
cmpq $0x41, %rdx
jae 0x1e3132
movq (%r14), %rdi
imulq %rdx, %rax
movq %rax, %rsi
callq 0x2fcc2c
movq %rax, %r14
movq 0x90(%rbx), %rdi
callq 0x2f9d41
movl $0xffffffff, %edx       # imm = 0xFFFFFFFF
movl %eax, %ecx
shll %cl, %edx
notl %edx
addl %edx, %edx
movslq %edx, %rax
andq %r14, %rax
shrq %rax
cmpq 0x90(%rbx), %rax
je 0x1e2fe9
movl $0x10, %edx
movq 0x70(%rsp), %r13
movq %r13, %rdi
movq %rsp, %rsi
callq 0xd49ce
movq (%rsp), %rsi
subq $0x8, %rsp
movzbl 0x80(%rsp), %r15d
movq %rbx, %rdi
movq %r12, %rdx
movq 0x20(%rsp), %rcx
movl 0x1c(%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 0x1e2b6c
addq $0x60, %rsp
movl %eax, %r14d
movq %r13, %rdi
callq 0xd47f5
xorl %eax, %eax
testb %r15b, %r15b
movl $0x0, %ecx
cmovnel %ebp, %ecx
testl %r14d, %r14d
sete %dl
cmovel %ecx, %ebp
testb %r15b, %dl
jne 0x1e2dc9
incq %r12
movq 0x60(%rbx), %rax
testq %rax, %rax
jne 0x1e2e2b
callq 0x73c16
movq 0x58(%rbx), %rax
testq %rax, %rax
je 0x1e315a
movq (%rsp), %rsi
cmpq %rsi, 0x8(%rax)
jbe 0x1e315a
movl 0x10(%rax), %edx
cmpq $0x41, %rdx
jae 0x1e315a
movq (%rax), %rdi
imulq %rdx, %rsi
movl $0x1, %ecx
callq 0x2fcd13
movl %ebp, %eax
jmp 0x1e2dc9
testb $0x1, %sil
jne 0x1e2d43
cmpq 0x60(%rsp), %rbp
jbe 0x1e30b0
movq 0x90(%rsp), %rax
incq (%rax)
movq %rsp, %rsi
movl $0x10, %edx
movq %r15, %rdi
callq 0xd49ce
leaq 0x1d6a17(%rip), %rsi    # 0x3b9a88
movq 0xb0(%rsp), %rdi
movq %rbp, %rdx
xorl %eax, %eax
callq 0x10906e
movq %r15, %rdi
callq 0xd4a9a
movq %rax, %r14
movq %r15, %rdi
xorl %esi, %esi
callq 0xd47ba
movq (%rax), %rsi
testb $0x1, %sil
jne 0x1e30c0
shrq %rsi
notq %rsi
addq 0x80(%rbx), %rsi
jmp 0x1e30c3
movq 0x88(%rsp), %rax
incq (%rax)
jmp 0x1e2dc4
shrq %rsi
movq %r13, %rdi
callq 0x1d18b4
cmpq $0x2, %r14
jb 0x1e3111
movl $0x1, %r12d
movq %r15, %rdi
movq %r12, %rsi
callq 0xd47ba
movq (%rax), %rsi
testb $0x1, %sil
jne 0x1e30fa
shrq %rsi
notq %rsi
addq 0x80(%rbx), %rsi
jmp 0x1e30fd
shrq %rsi
movq 0x8(%rax), %rdx
movq %r13, %rdi
callq 0x1d1714
incq %r12
cmpq %r12, %r14
jne 0x1e30d7
movq %r13, %rdi
callq 0x1d1426
movq %r15, %rdi
callq 0xd47f5
xorl %eax, %eax
jmp 0x1e2dc9
callq 0x73bdd
callq 0x73ba4
callq 0x73b6b
callq 0x73da5
callq 0x73d6c
callq 0x73d33
callq 0x73cfa
callq 0x73cc1
callq 0x73c88
callq 0x73c4f
callq 0x73b32