// File: /workspace/github_c_makefile_star2_O0/genometools[P]genometools/src/core/queue.c
// Function: check_space
static void check_space(GtQueue *q)
{
  if (!q->allocated) { /* empty queue without allocated memory */
    q->contents = gt_dynalloc(q->contents, &q->allocated, sizeof (void*));
    q->size = q->allocated / sizeof (void*);
  }
  else if (q->front < q->back) { /* no wraparound */
    if (q->back == q->size) {
      if (q->front)
        q->back = 0; /* perform wraparound */
      else { /* extend contents buffer */
        q->contents = gt_dynalloc(q->contents, &q->allocated,
                                  q->allocated + sizeof (void*));
        q->size = q->allocated / sizeof (void*);
      }
    }
  }
  else if (q->back && (q->back == q->front)) { /* wraparound */
    q->contents = gt_dynalloc(q->contents, &q->allocated,
                              q->allocated + q->front * sizeof (void*));
    memcpy(q->contents + q->size, q->contents, q->front * sizeof (void*));
    /* dynalloc() always doubles the already allocated memory region, which
       means we always have some additional space after the copied memory region
       left to set the back pointer to (otherwise we would have to reset the
       back pointer to 0).
     */
    gt_assert((size_t) q->front + q->size < q->allocated / sizeof (void*));
    q->back = q->front + q->size;
    q->size = q->allocated / sizeof (void*);
  }
}

// Assembly:
pushq %rax
movq %rdi, (%rsp)
movq (%rsp), %rax
cmpq $0x0, 0x20(%rax)
jne 0x90aac
movq (%rsp), %rax
movq (%rax), %rdi
movq (%rsp), %rsi
addq $0x20, %rsi
movl $0x8, %edx
callq 0x7f2b0
movq %rax, %rcx
movq (%rsp), %rax
movq %rcx, (%rax)
movq (%rsp), %rax
movq 0x20(%rax), %rcx
shrq $0x3, %rcx
movq (%rsp), %rax
movq %rcx, 0x18(%rax)
jmp 0x90c41
movq (%rsp), %rax
movq 0x8(%rax), %rax
movq (%rsp), %rcx
cmpq 0x10(%rcx), %rax
jge 0x90b2e
movq (%rsp), %rax
movq 0x10(%rax), %rax
movq (%rsp), %rcx
cmpq 0x18(%rcx), %rax
jne 0x90b29
movq (%rsp), %rax
cmpq $0x0, 0x8(%rax)
je 0x90ae9
movq (%rsp), %rax
movq $0x0, 0x10(%rax)
jmp 0x90b27
movq (%rsp), %rax
movq (%rax), %rdi
movq (%rsp), %rsi
addq $0x20, %rsi
movq (%rsp), %rax
movq 0x20(%rax), %rdx
addq $0x8, %rdx
callq 0x7f2b0
movq %rax, %rcx
movq (%rsp), %rax
movq %rcx, (%rax)
movq (%rsp), %rax
movq 0x20(%rax), %rcx
shrq $0x3, %rcx
movq (%rsp), %rax
movq %rcx, 0x18(%rax)
jmp 0x90b29
jmp 0x90c3f
movq (%rsp), %rax
cmpq $0x0, 0x10(%rax)
je 0x90c3d
movq (%rsp), %rax
movq 0x10(%rax), %rax
movq (%rsp), %rcx
cmpq 0x8(%rcx), %rax
jne 0x90c3d
movq (%rsp), %rax
movq (%rax), %rdi
movq (%rsp), %rsi
addq $0x20, %rsi
movq (%rsp), %rax
movq 0x20(%rax), %rdx
movq (%rsp), %rax
movq 0x8(%rax), %rax
shlq $0x3, %rax
addq %rax, %rdx
callq 0x7f2b0
movq %rax, %rcx
movq (%rsp), %rax
movq %rcx, (%rax)
movq (%rsp), %rax
movq (%rax), %rdi
movq (%rsp), %rax
movq 0x18(%rax), %rax
shlq $0x3, %rax
addq %rax, %rdi
movq (%rsp), %rax
movq (%rax), %rsi
movq (%rsp), %rax
movq 0x8(%rax), %rdx
shlq $0x3, %rdx
callq 0xb500
movq (%rsp), %rax
movq 0x8(%rax), %rax
movq (%rsp), %rcx
addq 0x18(%rcx), %rax
movq (%rsp), %rcx
movq 0x20(%rcx), %rcx
shrq $0x3, %rcx
cmpq %rcx, %rax
jb 0x90c0f
movq 0x1233fa(%rip), %rax    # 0x1b3fd8
movq (%rax), %rdi
leaq 0xcd47e(%rip), %rsi     # 0x15e066
leaq 0xdf2eb(%rip), %rdx     # 0x16feda
leaq 0xdf320(%rip), %rcx     # 0x16ff16
leaq 0xdefd7(%rip), %r8      # 0x16fbd4
movl $0x5c, %r9d
movb $0x0, %al
callq 0xb890
callq 0xb2e0
jmp 0x90c11
movq (%rsp), %rax
movq 0x8(%rax), %rcx
movq (%rsp), %rax
addq 0x18(%rax), %rcx
movq (%rsp), %rax
movq %rcx, 0x10(%rax)
movq (%rsp), %rax
movq 0x20(%rax), %rcx
shrq $0x3, %rcx
movq (%rsp), %rax
movq %rcx, 0x18(%rax)
jmp 0x90c3f
jmp 0x90c41
popq %rax
retq
nopw %cs:(%rax,%rax)