// File: /workspace/github_c_makefile_star2_O2/genometools[P]genometools/src/extended/linspace_management.c
// Function: gt_linspace_management_check_generic
static void gt_linspace_management_check_generic(GtLinspaceManagement
                                                 *spacemanager,
                                                 GtUword ulen, GtUword vlen,
                                                 size_t valuesize,
                                                 size_t rtabsize,
                                                 size_t crosspointsize,
                                                 bool local)
{
  size_t space = 0, localspace = 0; /* space in bytes */
  /*if (spacemanager == NULL)
    spacemanager = gt_new_linspace_management();*/

  gt_assert(spacemanager != NULL);

  if (spacemanager->valueTabsize < (ulen+1)*valuesize)
  {
    spacemanager->valueTabspace = gt_realloc(spacemanager->valueTabspace,
                                            (ulen+1)*valuesize);
    spacemanager->valueTabsize = (ulen+1)*valuesize;
  }

  if (spacemanager->rTabsize < (ulen+1)*rtabsize)
  {
    spacemanager->rTabspace = gt_realloc(spacemanager->rTabspace,
                                        (ulen+1)*rtabsize);
    spacemanager->rTabsize = (ulen+1)*rtabsize;
  }
  if (spacemanager->crosspointTabsize < (vlen+1)*crosspointsize)
  {
    spacemanager->crosspointTabspace =
           gt_realloc(spacemanager->crosspointTabspace,(vlen+1)*crosspointsize);
    spacemanager->crosspointTabsize = (vlen+1)*crosspointsize;
  }
  if (local)
  {
    if (spacemanager->maxscoordvaluespace == NULL)
      spacemanager->maxscoordvaluespace = gt_maxcoordvalue_new();
    else
      gt_maxcoordvalue_reset(spacemanager->maxscoordvaluespace);
  }
  if (spacemanager->maxscoordvaluespace != NULL)
    localspace = 2 * sizeof (GtUwordPair) + sizeof (GtWord);
            /* = sizeof (GtMaxcoordvalue)*/

  /* determine space peak */
  space = spacemanager->valueTabsize + spacemanager->rTabsize +
          spacemanager->crosspointTabsize + localspace;

  if (space > spacemanager->spacepeak)
    spacemanager->spacepeak = space;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
testq %rdi, %rdi
je 0xf981e
movq %r9, %r15
movq %r8, %r13
movq %rcx, %rbp
movq %rdx, %r14
movq %rsi, %r12
movq %rdi, %rbx
incq %r12
imulq %r12, %rbp
cmpq %rbp, 0x28(%rdi)
jae 0xf9772
movq (%rbx), %rdi
leaq 0x22cde4(%rip), %rdx    # 0x326544
pushq $0x5d
popq %rcx
movq %rbp, %rsi
callq 0x93472
movq %rax, (%rbx)
movq %rbp, 0x28(%rbx)
imulq %r13, %r12
cmpq %r12, 0x30(%rbx)
jae 0xf979a
movq 0x8(%rbx), %rdi
leaq 0x22cdbd(%rip), %rdx    # 0x326544
pushq $0x64
popq %rcx
movq %r12, %rsi
callq 0x93472
movq %rax, 0x8(%rbx)
movq %r12, 0x30(%rbx)
movb 0x40(%rsp), %bpl
incq %r14
imulq %r15, %r14
cmpq %r14, 0x38(%rbx)
jae 0xf97ca
movq 0x10(%rbx), %rdi
leaq 0x22cd8d(%rip), %rdx    # 0x326544
pushq $0x6a
popq %rcx
movq %r14, %rsi
callq 0x93472
movq %rax, 0x10(%rbx)
movq %r14, 0x38(%rbx)
testb %bpl, %bpl
je 0xf97e8
movq 0x48(%rbx), %rdi
testq %rdi, %rdi
je 0xf97df
callq 0xff8f2
jmp 0xf97e8
callq 0xff598
movq %rax, 0x48(%rbx)
movq 0x48(%rbx), %rax
testq %rax, %rax
pushq $0x28
popq %rcx
cmoveq %rax, %rcx
movq 0x30(%rbx), %rax
addq 0x28(%rbx), %rax
addq %rcx, %rax
addq 0x38(%rbx), %rax
cmpq 0x40(%rbx), %rax
jbe 0xf980f
movq %rax, 0x40(%rbx)
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movq 0x33e743(%rip), %rax    # 0x437f68
movq (%rax), %rdi
leaq 0x1eb7e4(%rip), %rsi    # 0x2e5013
leaq 0x22cd31(%rip), %rdx    # 0x326567
leaq 0x22ce35(%rip), %rcx    # 0x326672
leaq 0x22cd00(%rip), %r8     # 0x326544
pushq $0x58
popq %r9
xorl %eax, %eax
callq 0x17a50
callq 0x17390