// File: /workspace/github_c_makefile_star2_O2/genometools[P]genometools/src/match/rdj-contigs-graph.c
// Function: gt_contigs_graph_append_vertex
GtUword gt_contigs_graph_append_vertex(GtContigsGraph *cg,
    GtUword nof_spm_o, GtUword nof_spm_i,
    GtUword nof_units)
{
  unsigned int incoming;
  gt_assert(cg->nof_v <= cg->alloc_v);
  gt_log_log("append_vertex(nof_spm_o="GT_WU", nof_spm_i="GT_WU", nof_units="
             GT_WU")", nof_spm_o, nof_spm_i, nof_units);
  if (cg->nof_v == cg->alloc_v)
  {
    cg->alloc_v += GT_CONTIGS_GRAPH_V_INC;
    cg->v_spm[0] = gt_realloc(cg->v_spm[0],
        sizeof (*(cg->v_spm[0])) * (cg->alloc_v + 1UL));
    cg->v_spm[1] = gt_realloc(cg->v_spm[1],
        sizeof (*(cg->v_spm[1])) * (cg->alloc_v + 1UL));
    cg->v_cmp = gt_realloc(cg->v_cmp,
        sizeof (*cg->v_cmp) * (cg->alloc_v - cg->nof_simple_v));
    /* cg->v_scf = gt_realloc(cg->v_scf,
        sizeof (*cg->v_scf) * (cg->alloc_v + 1UL)); */
    cg->v_d = gt_realloc(cg->v_d, sizeof (*cg->v_d) * (cg->alloc_v));
    cg->v_m = gt_realloc(cg->v_m, sizeof (*cg->v_m) * (cg->alloc_v));
  }
  for (incoming = 0; incoming < 2U; incoming++)
  {
    GtUword nof_e = incoming ? nof_spm_i : nof_spm_o;
    GtContigsGraphSpmEdge *edge;
    cg->v_spm[incoming][cg->nof_v].deg = (uint64_t)nof_e;
    cg->v_spm[incoming][cg->nof_v + 1UL].ptr =
      cg->v_spm[incoming][cg->nof_v].ptr + nof_e;
    if (cg->nof_spm_edges[incoming] + nof_e > cg->alloc_spm_edges[incoming])
    {
      cg->alloc_spm_edges[incoming] += GT_MAX(GT_CONTIGS_GRAPH_E_INC, nof_e);
      cg->e_spm[incoming] = gt_realloc(cg->e_spm[incoming],
          sizeof (*(cg->e_spm[incoming])) * cg->alloc_spm_edges[incoming]);
    }
    for (GT_CONTIGS_GRAPH_EACH_SPM_EDGE(cg, cg->nof_v, incoming, edge))
    {
      edge->deleted = false;
    }
  }
  cg->v_cmp[cg->nof_v - cg->nof_simple_v].deg = (uint64_t) nof_units;
  cg->v_cmp[cg->nof_v - cg->nof_simple_v].ptr =
    cg->nof_v == cg->nof_simple_v ? 0 :
    cg->v_cmp[cg->nof_v - 1 - cg->nof_simple_v].ptr +
    cg->v_cmp[cg->nof_v - 1 - cg->nof_simple_v].deg;
  if (nof_units > 0)
  {
    cg->nof_units += nof_units;
    if (cg->nof_units > cg->alloc_units)
    {
      cg->alloc_units += GT_MAX(GT_CONTIGS_GRAPH_U_INC, nof_units);
      cg->units = gt_realloc(cg->units,
          sizeof (*cg->units) * (cg->alloc_units));
    }
    gt_assert(cg->nof_units <= cg->alloc_units);
  }
  cg->v_m[cg->nof_v].deleted = false;
  cg->v_m[cg->nof_v].optional = false;
  cg->nof_v++;
  return cg->nof_v - 1UL;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movq (%rdi), %rax
cmpq 0x8(%rdi), %rax
ja 0x176898
movq %rdx, %r15
movq %rsi, %r12
movq %rdi, %rbx
leaq 0x1d703c(%rip), %rdi    # 0x34d65a
movq %rcx, (%rsp)
xorl %eax, %eax
callq 0x92a82
movq (%rbx), %rax
cmpq 0x8(%rbx), %rax
jne 0x1766dd
leaq 0x80(%rax), %rcx
movq %rcx, 0x8(%rbx)
movq 0x18(%rbx), %rdi
leaq 0x408(,%rax,8), %rsi
leaq 0x1d6f3d(%rip), %r13    # 0x34d591
movq %r13, %rdx
movl $0x126, %ecx            # imm = 0x126
callq 0x93472
movq %rax, 0x18(%rbx)
movq 0x8(%rbx), %rax
movq 0x20(%rbx), %rdi
leaq 0x8(,%rax,8), %rsi
movq %r13, %rdx
movl $0x128, %ecx            # imm = 0x128
callq 0x93472
movq %rax, 0x20(%rbx)
movq 0x8(%rbx), %rsi
movq 0x40(%rbx), %rdi
subq 0x10(%rbx), %rsi
shlq $0x3, %rsi
movq %r13, %rdx
movl $0x12a, %ecx            # imm = 0x12A
callq 0x93472
movq %rax, 0x40(%rbx)
movq 0x8(%rbx), %rsi
movq 0x30(%rbx), %rdi
shlq $0x5, %rsi
movq %r13, %rdx
movl $0x12d, %ecx            # imm = 0x12D
callq 0x93472
movq %rax, 0x30(%rbx)
movq 0x8(%rbx), %rsi
movq 0x38(%rbx), %rdi
movq %r13, %rdx
movl $0x12e, %ecx            # imm = 0x12E
callq 0x93472
movq %rax, 0x38(%rbx)
xorl %ebp, %ebp
movl $0x100, %r14d           # imm = 0x100
leaq 0x1d6ea5(%rip), %r13    # 0x34d591
cmpq $0x2, %rbp
je 0x1767c0
testq %rbp, %rbp
movq %r15, %rax
cmoveq %r12, %rax
movq 0x18(%rbx,%rbp,8), %rcx
movq (%rbx), %rdx
movw %ax, (%rcx,%rdx,8)
movq 0x18(%rbx,%rbp,8), %rcx
movq (%rbx), %rdx
movq %rax, %rsi
shlq $0x10, %rsi
addq (%rcx,%rdx,8), %rsi
movw 0x8(%rcx,%rdx,8), %si
movq %rsi, 0x8(%rcx,%rdx,8)
movq 0x60(%rbx,%rbp,8), %rcx
addq %rax, %rcx
movq 0x70(%rbx,%rbp,8), %rsi
cmpq %rsi, %rcx
jbe 0x176770
cmpq $0x101, %rax            # imm = 0x101
cmovbq %r14, %rax
addq %rax, %rsi
movq %rsi, 0x70(%rbx,%rbp,8)
movq 0x80(%rbx,%rbp,8), %rdi
shlq $0x3, %rsi
movq %r13, %rdx
movl $0x13b, %ecx            # imm = 0x13B
callq 0x93472
movq %rax, 0x80(%rbx,%rbp,8)
jmp 0x176778
movq 0x80(%rbx,%rbp,8), %rax
movq 0x18(%rbx,%rbp,8), %rdx
movq (%rbx), %rsi
movq (%rdx,%rsi,8), %rcx
shrq $0x10, %rcx
leaq (%rax,%rcx,8), %rcx
movq 0x8(%rdx,%rsi,8), %rdx
shrq $0x10, %rdx
leaq (%rax,%rdx,8), %rax
cmpq %rax, %rcx
jae 0x1767b8
andb $-0x41, 0x7(%rcx)
addq $0x8, %rcx
movq 0x18(%rbx,%rbp,8), %rdx
movq 0x80(%rbx,%rbp,8), %rax
movq (%rbx), %rsi
jmp 0x17678c
incq %rbp
jmp 0x1766ec
movq (%rbx), %rax
movq 0x40(%rbx), %rcx
subq 0x10(%rbx), %rax
movq (%rsp), %rdi
movw %di, (%rcx,%rax,8)
movq (%rbx), %rdx
movq 0x10(%rbx), %rsi
movq %rdx, %rax
movq 0x40(%rbx), %rcx
subq %rsi, %rax
jne 0x1767ea
xorl %edx, %edx
jmp 0x176804
notq %rsi
leaq (%rcx,%rdx,8), %rdx
movq (%rdx,%rsi,8), %rsi
movl %esi, %edx
shll $0x10, %edx
addq %rsi, %rdx
andq $-0x10000, %rdx         # imm = 0xFFFF0000
movzwl (%rcx,%rax,8), %esi
orq %rdx, %rsi
movq %rsi, (%rcx,%rax,8)
testq %rdi, %rdi
je 0x176869
movq 0x48(%rbx), %rax
addq %rdi, %rax
movq %rax, 0x48(%rbx)
movq 0x50(%rbx), %rsi
cmpq %rsi, %rax
jbe 0x176864
cmpq $0x101, %rdi            # imm = 0x101
movl $0x100, %eax            # imm = 0x100
cmovaeq %rdi, %rax
addq %rax, %rsi
movq %rsi, 0x50(%rbx)
movq 0x58(%rbx), %rdi
shlq $0x4, %rsi
leaq 0x1d6d43(%rip), %rdx    # 0x34d591
movl $0x14e, %ecx            # imm = 0x14E
callq 0x93472
movq %rax, 0x58(%rbx)
movq 0x48(%rbx), %rax
movq 0x50(%rbx), %rsi
cmpq %rsi, %rax
ja 0x1768c6
movq (%rbx), %rax
movq 0x38(%rbx), %rcx
andb $-0x2, (%rcx,%rax)
movq (%rbx), %rax
movq 0x38(%rbx), %rcx
andb $-0x3, (%rcx,%rax)
movq (%rbx), %rax
leaq 0x1(%rax), %rcx
movq %rcx, (%rbx)
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movq 0x2c16c9(%rip), %rax    # 0x437f68
movq (%rax), %rdi
leaq 0x16e76a(%rip), %rsi    # 0x2e5013
leaq 0x1d6d72(%rip), %rdx    # 0x34d622
leaq 0x1d6d84(%rip), %rcx    # 0x34d63b
leaq 0x1d6cd3(%rip), %r8     # 0x34d591
movl $0x11f, %r9d            # imm = 0x11F
jmp 0x1768f2
movq 0x2c169b(%rip), %rax    # 0x437f68
movq (%rax), %rdi
leaq 0x16e73c(%rip), %rsi    # 0x2e5013
leaq 0x1d6db7(%rip), %rdx    # 0x34d695
leaq 0x1d6d56(%rip), %rcx    # 0x34d63b
leaq 0x1d6ca5(%rip), %r8     # 0x34d591
movl $0x150, %r9d            # imm = 0x150
xorl %eax, %eax
callq 0x17a50
callq 0x17390