// File: /workspace/github_c_makefile_star2_O0/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:
subq $0x18, %rsp
movq %rdi, 0x10(%rsp)
movq %rsi, 0x8(%rsp)
movq %rdx, (%rsp)
cmpq $0x0, 0x10(%rsp)
jne 0x1d0ba2
movq 0x46b42f(%rip), %rax    # 0x63bfa0
movq (%rax), %rdi
leaq 0x345498(%rip), %rsi    # 0x516013
leaq 0x393b63(%rip), %rdx    # 0x5646e5
leaq 0x393b20(%rip), %rcx    # 0x5646a9
leaq 0x393963(%rip), %r8     # 0x5644f3
movl $0x159, %r9d            # imm = 0x159
movb $0x0, %al
callq 0x199f0
callq 0x19370
jmp 0x1d0ba4
jmp 0x1d0ba6
movq 0x10(%rsp), %rax
cmpq $0x0, (%rax)
jne 0x1d0be9
movq 0x46b3e8(%rip), %rax    # 0x63bfa0
movq (%rax), %rdi
leaq 0x345451(%rip), %rsi    # 0x516013
leaq 0x393af7(%rip), %rdx    # 0x5646c0
leaq 0x393ad9(%rip), %rcx    # 0x5646a9
leaq 0x39391c(%rip), %r8     # 0x5644f3
movl $0x15a, %r9d            # imm = 0x15A
movb $0x0, %al
callq 0x199f0
callq 0x19370
jmp 0x1d0beb
movq 0x10(%rsp), %rax
movq 0x20(%rax), %rcx
addq $0x1, %rcx
movq %rcx, 0x20(%rax)
movq 0x10(%rsp), %rax
movq 0x20(%rax), %rax
movq 0x10(%rsp), %rcx
cmpq 0x8(%rcx), %rax
jne 0x1d0cf4
movq 0x10(%rsp), %rax
movq 0x8(%rax), %rax
movl $0x64, %ecx
xorl %edx, %edx
divq %rcx
movq %rax, %rcx
addq $0xa, %rcx
movq 0x10(%rsp), %rax
addq 0x8(%rax), %rcx
movq %rcx, 0x8(%rax)
movq 0x10(%rsp), %rax
movq (%rax), %rdi
movq 0x10(%rsp), %rax
movq 0x8(%rax), %rsi
shlq $0x3, %rsi
leaq 0x39389c(%rip), %rdx    # 0x5644f3
movl $0x162, %ecx            # imm = 0x162
callq 0xe8540
movq %rax, %rcx
movq 0x10(%rsp), %rax
movq %rcx, (%rax)
movq 0x10(%rsp), %rax
cmpl $0x1, 0x40(%rax)
jne 0x1d0cf2
jmp 0x1d0c79
movq 0x10(%rsp), %rax
cmpq $0x0, 0x38(%rax)
jne 0x1d0cbd
movq 0x46b314(%rip), %rax    # 0x63bfa0
movq (%rax), %rdi
leaq 0x34537d(%rip), %rsi    # 0x516013
leaq 0x393a39(%rip), %rdx    # 0x5646d6
leaq 0x393a05(%rip), %rcx    # 0x5646a9
leaq 0x393848(%rip), %r8     # 0x5644f3
movl $0x164, %r9d            # imm = 0x164
movb $0x0, %al
callq 0x199f0
callq 0x19370
jmp 0x1d0cbf
movq 0x10(%rsp), %rax
movq 0x38(%rax), %rdi
movq 0x10(%rsp), %rax
movq 0x8(%rax), %rsi
shlq $0x3, %rsi
leaq 0x393817(%rip), %rdx    # 0x5644f3
movl $0x167, %ecx            # imm = 0x167
callq 0xe8540
movq %rax, %rcx
movq 0x10(%rsp), %rax
movq %rcx, 0x38(%rax)
jmp 0x1d0cf4
movq 0x10(%rsp), %rax
cmpl $0x1, 0x40(%rax)
jne 0x1d0d1f
movq (%rsp), %rdx
movq 0x10(%rsp), %rax
movq 0x38(%rax), %rax
movq 0x10(%rsp), %rcx
movq 0x20(%rcx), %rcx
subq $0x1, %rcx
movq %rdx, (%rax,%rcx,8)
jmp 0x1d0d72
jmp 0x1d0d21
movq (%rsp), %rax
movq 0x10(%rsp), %rcx
xorl %edx, %edx
divq 0x30(%rcx)
cmpq $0x0, %rdx
je 0x1d0d6e
movq 0x46b263(%rip), %rax    # 0x63bfa0
movq (%rax), %rdi
leaq 0x3452cc(%rip), %rsi    # 0x516013
leaq 0x3939a0(%rip), %rdx    # 0x5646ee
leaq 0x393954(%rip), %rcx    # 0x5646a9
leaq 0x393797(%rip), %r8     # 0x5644f3
movl $0x16d, %r9d            # imm = 0x16D
movb $0x0, %al
callq 0x199f0
callq 0x19370
jmp 0x1d0d70
jmp 0x1d0d72
movq 0x8(%rsp), %rdx
movq 0x10(%rsp), %rax
movq (%rax), %rax
movq 0x10(%rsp), %rcx
movq 0x20(%rcx), %rcx
subq $0x1, %rcx
movq %rdx, (%rax,%rcx,8)
addq $0x18, %rsp
retq
nopw %cs:(%rax,%rax)