// File: /workspace/github_c_makefile_star2_O0/genometools[P]genometools/src/match/rdj-contigs-graph.c
// Function: gt_contigs_graph_create_spm_edges_for_vertex
static void gt_contigs_graph_create_spm_edges_for_vertex(GtContigEdgesLink *v,
    GtContigsGraphSpmEdge *e, GtUword cnum, GtUword *nextfree_edge,
    GtContigJunctionInfo *j_info, GtUword nofjinfos, bool inwards)
{
  GtContigJunctionInfo *j_elem, key;
  uint32_t degree, j;
  key.junction_num = (GtUword)v[cnum].ptr;
  v[cnum].ptr = (uint64_t)(*nextfree_edge);
  degree = v[cnum].deg;
  if (degree > 0)
  {
    j_elem = bsearch(&key, j_info, (size_t)nofjinfos,
        sizeof (*j_info), gt_contigs_graph_jinfo_cmp);
    gt_assert(j_elem != NULL);
    while (j_elem != j_info && (j_elem - 1)->junction_num == key.junction_num)
      j_elem--;
    for (j = 0; j < degree; j++, (*nextfree_edge)++, j_elem++)
    {
      gt_assert(j_elem->junction_num == key.junction_num);
      e[*nextfree_edge].dest = j_elem->contig_num;
      e[*nextfree_edge].ovlen = (unsigned int) j_elem->length;
      e[*nextfree_edge].reverse = inwards
        ? (j_elem->firstnode == 1U ? true : false)
        : (j_elem->firstnode == 1U ? false : true);
      e[*nextfree_edge].deleted = false;
    }
  }
}

// Assembly:
subq $0x68, %rsp
movb 0x70(%rsp), %al
movq %rdi, 0x60(%rsp)
movq %rsi, 0x58(%rsp)
movq %rdx, 0x50(%rsp)
movq %rcx, 0x48(%rsp)
movq %r8, 0x40(%rsp)
movq %r9, 0x38(%rsp)
andb $0x1, %al
movb %al, 0x37(%rsp)
movq 0x60(%rsp), %rax
movq 0x50(%rsp), %rcx
movq (%rax,%rcx,8), %rax
shrq $0x10, %rax
movq %rax, 0x18(%rsp)
movq 0x48(%rsp), %rax
movq (%rax), %rsi
movq 0x60(%rsp), %rax
movq 0x50(%rsp), %rcx
movq (%rax,%rcx,8), %rdx
movabsq $0xffffffffffff, %rdi   # imm = 0xFFFFFFFFFFFF
andq %rdi, %rsi
shlq $0x10, %rsi
andq $0xffff, %rdx           # imm = 0xFFFF
orq %rsi, %rdx
movq %rdx, (%rax,%rcx,8)
movq 0x60(%rsp), %rax
movq 0x50(%rsp), %rcx
movq (%rax,%rcx,8), %rax
andq $0xffff, %rax           # imm = 0xFFFF
movl %eax, 0x14(%rsp)
cmpl $0x0, 0x14(%rsp)
jbe 0x28190d
movq 0x40(%rsp), %rsi
movq 0x38(%rsp), %rdx
leaq 0x18(%rsp), %rdi
movl $0x10, %ecx
leaq -0xd6(%rip), %r8        # 0x281640
callq 0x198e0
movq %rax, 0x28(%rsp)
cmpq $0x0, 0x28(%rsp)
jne 0x281760
movq 0x3ba871(%rip), %rax    # 0x63bfa0
movq (%rax), %rdi
leaq 0x2948da(%rip), %rsi    # 0x516013
leaq 0x2ff171(%rip), %rdx    # 0x5808b1
leaq 0x2ff179(%rip), %rcx    # 0x5808c0
leaq 0x2fe5e3(%rip), %r8     # 0x57fd31
movl $0x1b7, %r9d            # imm = 0x1B7
movb $0x0, %al
callq 0x199f0
callq 0x19370
jmp 0x281762
jmp 0x281764
movq 0x28(%rsp), %rcx
xorl %eax, %eax
cmpq 0x40(%rsp), %rcx
movb %al, 0xf(%rsp)
je 0x28178b
movq 0x28(%rsp), %rax
movq -0x10(%rax), %rax
cmpq 0x18(%rsp), %rax
sete %al
movb %al, 0xf(%rsp)
movb 0xf(%rsp), %al
testb $0x1, %al
jne 0x281795
jmp 0x2817a5
movq 0x28(%rsp), %rax
addq $-0x10, %rax
movq %rax, 0x28(%rsp)
jmp 0x281764
movl $0x0, 0x10(%rsp)
movl 0x10(%rsp), %eax
cmpl 0x14(%rsp), %eax
jae 0x28190b
jmp 0x2817bd
movq 0x28(%rsp), %rax
movq (%rax), %rax
cmpq 0x18(%rsp), %rax
je 0x281804
movq 0x3ba7cd(%rip), %rax    # 0x63bfa0
movq (%rax), %rdi
leaq 0x294836(%rip), %rsi    # 0x516013
leaq 0x2ff109(%rip), %rdx    # 0x5808ed
leaq 0x2ff0d5(%rip), %rcx    # 0x5808c0
leaq 0x2fe53f(%rip), %r8     # 0x57fd31
movl $0x1bc, %r9d            # imm = 0x1BC
movb $0x0, %al
callq 0x199f0
callq 0x19370
jmp 0x281806
movq 0x28(%rsp), %rax
movl 0x8(%rax), %edx
movq 0x58(%rsp), %rax
movq 0x48(%rsp), %rcx
movq (%rcx), %rcx
movl %edx, (%rax,%rcx,8)
movq 0x28(%rsp), %rax
movl 0xc(%rax), %esi
andl $0x7fffffff, %esi       # imm = 0x7FFFFFFF
movq 0x58(%rsp), %rax
movq 0x48(%rsp), %rcx
movq (%rcx), %rcx
movl 0x4(%rax,%rcx,8), %edx
andl $0x1fffffff, %esi       # imm = 0x1FFFFFFF
andl $0xe0000000, %edx       # imm = 0xE0000000
orl %esi, %edx
movl %edx, 0x4(%rax,%rcx,8)
testb $0x1, 0x37(%rsp)
je 0x281874
movq 0x28(%rsp), %rax
movl 0xc(%rax), %edx
shrl $0x1f, %edx
xorl %eax, %eax
movl $0x1, %ecx
cmpl $0x1, %edx
cmovel %ecx, %eax
movl %eax, 0x8(%rsp)
jmp 0x281890
movq 0x28(%rsp), %rax
movl 0xc(%rax), %edx
shrl $0x1f, %edx
movl $0x1, %eax
xorl %ecx, %ecx
cmpl $0x1, %edx
cmovel %ecx, %eax
movl %eax, 0x8(%rsp)
movl 0x8(%rsp), %eax
cmpl $0x0, %eax
setne %dl
movq 0x58(%rsp), %rax
movq 0x48(%rsp), %rcx
movq (%rcx), %rcx
andb $0x1, %dl
movzbl %dl, %esi
movl 0x4(%rax,%rcx,8), %edx
shll $0x1d, %esi
andl $0xdfffffff, %edx       # imm = 0xDFFFFFFF
orl %esi, %edx
movl %edx, 0x4(%rax,%rcx,8)
movq 0x58(%rsp), %rax
movq 0x48(%rsp), %rcx
movq (%rcx), %rcx
movl 0x4(%rax,%rcx,8), %edx
andl $0xbfffffff, %edx       # imm = 0xBFFFFFFF
orl $0x0, %edx
movl %edx, 0x4(%rax,%rcx,8)
movl 0x10(%rsp), %eax
addl $0x1, %eax
movl %eax, 0x10(%rsp)
movq 0x48(%rsp), %rax
movq (%rax), %rcx
addq $0x1, %rcx
movq %rcx, (%rax)
movq 0x28(%rsp), %rax
addq $0x10, %rax
movq %rax, 0x28(%rsp)
jmp 0x2817ad
jmp 0x28190d
addq $0x68, %rsp
retq
nopw %cs:(%rax,%rax)