// File: /workspace/github_c_makefile_star2_O2/genometools[P]genometools/src/extended/sampling.c
// Function: gt_sampling_add_sample
void gt_sampling_add_sample(GtSampling *sampling,
                            size_t position,
                            GtUword element_num)
{
  gt_assert(sampling);
  gt_assert(sampling->samplingtab);

  sampling->numofsamples++;

  if (sampling->numofsamples == sampling->arraysize) {
    sampling->arraysize += sampling->arraysize/100 + 10;
    sampling->samplingtab = gt_realloc(sampling->samplingtab,
                                       (size_t) sampling->arraysize *
                                         sizeof (*sampling->samplingtab));
    if (sampling->method == GT_SAMPLING_PAGES) {
      gt_assert(sampling->page_sampling);
      sampling->page_sampling = gt_realloc(sampling->page_sampling,
                                           (size_t) sampling->arraysize *
                                             sizeof (*sampling->page_sampling));
    }
  }
  if (sampling->method == GT_SAMPLING_PAGES)
    sampling->page_sampling[sampling->numofsamples -1] = element_num;
  else
    gt_assert(element_num % sampling->sampling_rate == 0);
  sampling->samplingtab[sampling->numofsamples -1] = position;
}

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
testq %rdi, %rdi
je 0x1147c2
movq %rdi, %r14
movq (%rdi), %rdi
testq %rdi, %rdi
je 0x1147f3
movq %rdx, %r15
movq %rsi, %rbx
movq 0x20(%r14), %rcx
leaq 0x1(%rcx), %rax
movq %rax, 0x20(%r14)
cmpq 0x8(%r14), %rax
jne 0x11478c
pushq $0x64
popq %rsi
xorl %edx, %edx
divq %rsi
leaq (%rcx,%rax), %rdx
addq %rcx, %rax
addq $0xb, %rax
movq %rax, 0x8(%r14)
leaq 0x58(,%rdx,8), %rsi
leaq 0x21d888(%rip), %rdx    # 0x331fd6
movl $0x162, %ecx            # imm = 0x162
callq 0x93472
movq %rax, (%r14)
cmpl $0x1, 0x40(%r14)
jne 0x11478c
movq 0x38(%r14), %rdi
testq %rdi, %rdi
je 0x11484f
movq 0x8(%r14), %rsi
shlq $0x3, %rsi
leaq 0x21d858(%rip), %rdx    # 0x331fd6
movl $0x167, %ecx            # imm = 0x167
callq 0x93472
movq %rax, 0x38(%r14)
cmpl $0x1, 0x40(%r14)
jne 0x1147a2
movq 0x20(%r14), %rax
movq 0x38(%r14), %rcx
movq %r15, -0x8(%rcx,%rax,8)
jmp 0x1147b0
movq %r15, %rax
xorl %edx, %edx
divq 0x30(%r14)
testq %rdx, %rdx
jne 0x114821
movq (%r14), %rax
movq 0x20(%r14), %rcx
movq %rbx, -0x8(%rax,%rcx,8)
popq %rbx
popq %r14
popq %r15
retq
movq 0x32379f(%rip), %rax    # 0x437f68
movq (%rax), %rdi
leaq 0x1d0840(%rip), %rsi    # 0x2e5013
leaq 0x21d9ee(%rip), %rdx    # 0x3321c8
leaq 0x21d9ab(%rip), %rcx    # 0x33218c
leaq 0x21d7ee(%rip), %r8     # 0x331fd6
movl $0x159, %r9d            # imm = 0x159
jmp 0x11487b
movq 0x32376e(%rip), %rax    # 0x437f68
movq (%rax), %rdi
leaq 0x1d080f(%rip), %rsi    # 0x2e5013
leaq 0x21d998(%rip), %rdx    # 0x3321a3
leaq 0x21d97a(%rip), %rcx    # 0x33218c
leaq 0x21d7bd(%rip), %r8     # 0x331fd6
movl $0x15a, %r9d            # imm = 0x15A
jmp 0x11487b
movq 0x323740(%rip), %rax    # 0x437f68
movq (%rax), %rdi
leaq 0x1d07e1(%rip), %rsi    # 0x2e5013
leaq 0x21d998(%rip), %rdx    # 0x3321d1
leaq 0x21d94c(%rip), %rcx    # 0x33218c
leaq 0x21d78f(%rip), %r8     # 0x331fd6
movl $0x16d, %r9d            # imm = 0x16D
jmp 0x11487b
movq 0x323712(%rip), %rax    # 0x437f68
movq (%rax), %rdi
leaq 0x1d07b3(%rip), %rsi    # 0x2e5013
leaq 0x21d952(%rip), %rdx    # 0x3321b9
leaq 0x21d91e(%rip), %rcx    # 0x33218c
leaq 0x21d761(%rip), %r8     # 0x331fd6
movl $0x164, %r9d            # imm = 0x164
xorl %eax, %eax
callq 0x17a50
callq 0x17390