// File: /workspace/github_c_makefile_star2_O0/genometools[P]genometools/src/extended/intset_16.c
// Function: gt_intset_16_add
void gt_intset_16_add(GtIntset *intset, GtUword elem)
{
  GtIntset16 *intset_16 = gt_intset_16_cast(intset);
  GtIntsetMembers *members = intset->members;
  GtUword *sectionstart = members->sectionstart;
  gt_assert(members->nextfree < members->num_of_elems);
  gt_assert(elem <= members->maxelement);
  gt_assert(members->previouselem == ULONG_MAX || members->previouselem < elem);
  while (elem >= GT_SECTIONMINELEM(members->currentsectionnum + 1)) {
    gt_assert(members->currentsectionnum < members->numofsections);
    sectionstart[members->currentsectionnum + 1] = members->nextfree;
    members->currentsectionnum++;
  }
  gt_assert(GT_SECTIONMINELEM(members->currentsectionnum) <= elem &&
            elem < GT_SECTIONMINELEM(members->currentsectionnum+1) &&
            GT_ELEM2SECTION_M(elem) == members->currentsectionnum);
  intset_16->elements[members->nextfree++] = (uint16_t) elem;
  members->previouselem = elem;
}

// Assembly:
subq $0x28, %rsp
movq %rdi, 0x20(%rsp)
movq %rsi, 0x18(%rsp)
callq 0x492bd0
movq %rax, %rdi
movq 0x20(%rsp), %rsi
callq 0x1968d0
movq %rax, 0x10(%rsp)
movq 0x20(%rsp), %rax
movq 0x8(%rax), %rax
movq %rax, 0x8(%rsp)
movq 0x8(%rsp), %rax
movq (%rax), %rax
movq %rax, (%rsp)
movq 0x8(%rsp), %rax
movq 0x20(%rax), %rax
movq 0x8(%rsp), %rcx
cmpq 0x28(%rcx), %rax
jb 0x49331b
movq 0x1a8cb6(%rip), %rax    # 0x63bfa0
movq (%rax), %rdi
leaq 0x82d1f(%rip), %rsi     # 0x516013
leaq 0x12026a(%rip), %rdx    # 0x5b3565
leaq 0x12028d(%rip), %rcx    # 0x5b358f
leaq 0x120193(%rip), %r8     # 0x5b349c
movl $0xd8, %r9d
movb $0x0, %al
callq 0x199f0
callq 0x19370
jmp 0x49331d
jmp 0x49331f
movq 0x18(%rsp), %rax
movq 0x8(%rsp), %rcx
cmpq 0x18(%rcx), %rax
jbe 0x493367
movq 0x1a8c6a(%rip), %rax    # 0x63bfa0
movq (%rax), %rdi
leaq 0x82cd3(%rip), %rsi     # 0x516013
leaq 0x120259(%rip), %rdx    # 0x5b35a0
leaq 0x120241(%rip), %rcx    # 0x5b358f
leaq 0x120147(%rip), %r8     # 0x5b349c
movl $0xd9, %r9d
movb $0x0, %al
callq 0x199f0
callq 0x19370
jmp 0x493369
jmp 0x49336b
movq 0x8(%rsp), %rax
cmpq $-0x1, 0x38(%rax)
je 0x4933bf
movq 0x8(%rsp), %rax
movq 0x38(%rax), %rax
cmpq 0x18(%rsp), %rax
jb 0x4933bf
movq 0x1a8c12(%rip), %rax    # 0x63bfa0
movq (%rax), %rdi
leaq 0x82c7b(%rip), %rsi     # 0x516013
leaq 0x12021d(%rip), %rdx    # 0x5b35bc
leaq 0x1201e9(%rip), %rcx    # 0x5b358f
leaq 0x1200ef(%rip), %r8     # 0x5b349c
movl $0xda, %r9d
movb $0x0, %al
callq 0x199f0
callq 0x19370
jmp 0x4933c1
jmp 0x4933c3
movq 0x18(%rsp), %rax
movq 0x8(%rsp), %rcx
movq 0x10(%rcx), %rdx
addq $0x1, %rdx
movq 0x8(%rsp), %rcx
movq 0x8(%rcx), %rcx
shlq %cl, %rdx
movq %rdx, %rcx
cmpq %rcx, %rax
jb 0x49346e
jmp 0x4933ef
movq 0x8(%rsp), %rax
movq 0x10(%rax), %rax
movq 0x8(%rsp), %rcx
cmpq 0x30(%rcx), %rax
jb 0x49343b
movq 0x1a8b96(%rip), %rax    # 0x63bfa0
movq (%rax), %rdi
leaq 0x82bff(%rip), %rsi     # 0x516013
leaq 0x1201e4(%rip), %rdx    # 0x5b35ff
leaq 0x12016d(%rip), %rcx    # 0x5b358f
leaq 0x120073(%rip), %r8     # 0x5b349c
movl $0xdc, %r9d
movb $0x0, %al
callq 0x199f0
callq 0x19370
jmp 0x49343d
movq 0x8(%rsp), %rax
movq 0x20(%rax), %rdx
movq (%rsp), %rax
movq 0x8(%rsp), %rcx
movq 0x10(%rcx), %rcx
movq %rdx, 0x8(%rax,%rcx,8)
movq 0x8(%rsp), %rax
movq 0x10(%rax), %rcx
addq $0x1, %rcx
movq %rcx, 0x10(%rax)
jmp 0x4933c3
jmp 0x493470
movq 0x8(%rsp), %rax
movq 0x10(%rax), %rax
movq 0x8(%rsp), %rcx
movq 0x8(%rcx), %rcx
shlq %cl, %rax
cmpq 0x18(%rsp), %rax
ja 0x4934ce
movq 0x18(%rsp), %rax
movq 0x8(%rsp), %rcx
movq 0x10(%rcx), %rdx
addq $0x1, %rdx
movq 0x8(%rsp), %rcx
movq 0x8(%rcx), %rcx
shlq %cl, %rdx
movq %rdx, %rcx
cmpq %rcx, %rax
jae 0x4934ce
movq 0x18(%rsp), %rax
movq 0x8(%rsp), %rcx
movq 0x8(%rcx), %rcx
shrq %cl, %rax
movq 0x8(%rsp), %rcx
cmpq 0x10(%rcx), %rax
je 0x493506
movq 0x1a8acb(%rip), %rax    # 0x63bfa0
movq (%rax), %rdi
leaq 0x82b34(%rip), %rsi     # 0x516013
leaq 0x12014d(%rip), %rdx    # 0x5b3633
leaq 0x1200a2(%rip), %rcx    # 0x5b358f
leaq 0x11ffa8(%rip), %r8     # 0x5b349c
movl $0xe2, %r9d
movb $0x0, %al
callq 0x199f0
callq 0x19370
jmp 0x493508
movq 0x18(%rsp), %rax
movw %ax, %dx
movq 0x10(%rsp), %rax
movq 0x10(%rax), %rax
movq 0x8(%rsp), %rsi
movq 0x20(%rsi), %rcx
movq %rcx, %rdi
addq $0x1, %rdi
movq %rdi, 0x20(%rsi)
movw %dx, (%rax,%rcx,2)
movq 0x18(%rsp), %rcx
movq 0x8(%rsp), %rax
movq %rcx, 0x38(%rax)
addq $0x28, %rsp
retq
nopw %cs:(%rax,%rax)