// File: /workspace/github_c_makefile_star2_O3/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 0x1c651d
movq %rcx, %r14
movq %rdx, %r15
movq %rsi, %r12
movq %rdi, %rbx
leaq 0x1e7077(%rip), %rdi    # 0x3ad30a
xorl %eax, %eax
callq 0x103d72
movq (%rbx), %rcx
cmpq 0x8(%rbx), %rcx
movq %r14, (%rsp)
jne 0x1c6355
leaq 0x80(%rcx), %rax
movq %rax, 0x8(%rbx)
movq 0x18(%rbx), %rdi
leaq 0x408(,%rcx,8), %rsi
leaq 0x1e6f78(%rip), %r13    # 0x3ad241
movq %r13, %rdx
movl $0x126, %ecx            # imm = 0x126
callq 0x104461
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 0x104461
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 0x104461
movq %rax, 0x40(%rbx)
movq 0x8(%rbx), %rsi
movq 0x30(%rbx), %rdi
shlq $0x5, %rsi
movq %r13, %rdx
movl $0x12d, %ecx            # imm = 0x12D
callq 0x104461
movq %rax, 0x30(%rbx)
movq 0x8(%rbx), %rsi
movq 0x38(%rbx), %rdi
movq %r13, %rdx
movl $0x12e, %ecx            # imm = 0x12E
callq 0x104461
movq %rax, 0x38(%rbx)
movq (%rbx), %rcx
movb $0x1, %bpl
xorl %r14d, %r14d
leaq 0x1e6edf(%rip), %r13    # 0x3ad241
testb $0x1, %bpl
movq %r15, %rax
cmovneq %r12, %rax
movq 0x18(%rbx,%r14,8), %rdx
movw %ax, (%rdx,%rcx,8)
movq 0x18(%rbx,%r14,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,%r14,8), %rcx
addq %rax, %rcx
movq 0x70(%rbx,%r14,8), %rsi
cmpq %rsi, %rcx
jbe 0x1c63df
cmpq $0x101, %rax            # imm = 0x101
movl $0x100, %ecx            # imm = 0x100
cmovbq %rcx, %rax
addq %rax, %rsi
movq %rsi, 0x70(%rbx,%r14,8)
movq 0x80(%rbx,%r14,8), %rdi
shlq $0x3, %rsi
movq %r13, %rdx
movl $0x13b, %ecx            # imm = 0x13B
callq 0x104461
movq %rax, 0x80(%rbx,%r14,8)
jmp 0x1c63e7
movq 0x80(%rbx,%r14,8), %rax
movq 0x18(%rbx,%r14,8), %rsi
movq (%rbx), %rcx
movq (%rsi,%rcx,8), %rdx
movq 0x8(%rsi,%rcx,8), %rsi
shrq $0x10, %rdx
shrq $0x10, %rsi
cmpq %rsi, %rdx
jae 0x1c6433
leaq (%rax,%rdx,8), %rax
andb $-0x41, 0x7(%rax)
addq $0x8, %rax
movq 0x18(%rbx,%r14,8), %rdx
movq (%rbx), %rcx
movq 0x8(%rdx,%rcx,8), %rdx
shrq $0xd, %rdx
andq $-0x8, %rdx
addq 0x80(%rbx,%r14,8), %rdx
cmpq %rdx, %rax
jb 0x1c6409
movl $0x1, %r14d
testb $0x1, %bpl
movl $0x0, %ebp
jne 0x1c6362
movq 0x40(%rbx), %rax
subq 0x10(%rbx), %rcx
movq (%rsp), %rdi
movw %di, (%rax,%rcx,8)
movq (%rbx), %rdx
movq 0x10(%rbx), %rsi
movq %rdx, %rax
movq 0x40(%rbx), %rcx
subq %rsi, %rax
jne 0x1c646f
xorl %edx, %edx
jmp 0x1c6489
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 0x1c64ee
movq 0x48(%rbx), %rax
addq %rdi, %rax
movq %rax, 0x48(%rbx)
movq 0x50(%rbx), %rsi
cmpq %rsi, %rax
jbe 0x1c64e9
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 0x1e6d6e(%rip), %rdx    # 0x3ad241
movl $0x14e, %ecx            # imm = 0x14E
callq 0x104461
movq %rax, 0x58(%rbx)
movq 0x48(%rbx), %rax
movq 0x50(%rbx), %rsi
cmpq %rsi, %rax
ja 0x1c6522
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
callq 0x69e99
callq 0x69e60