// File: /workspace/github_c_makefile_star2_O0/barabo[P]advanced-shell-history/src/sqlite3.c
// Function: sqlite3BitvecClear
SQLITE_PRIVATE void sqlite3BitvecClear(Bitvec *p, u32 i, void *pBuf){
  if( p==0 ) return;
  assert( i>0 );
  i--;
  while( p->iDivisor ){
    u32 bin = i/p->iDivisor;
    i = i%p->iDivisor;
    p = p->u.apSub[bin];
    if (!p) {
      return;
    }
  }
  if( p->iSize<=BITVEC_NBIT ){
    p->u.aBitmap[i/BITVEC_SZELEM] &= ~(1 << (i&(BITVEC_SZELEM-1)));
  }else{
    unsigned int j;
    u32 *aiValues = pBuf;
    memcpy(aiValues, p->u.aHash, sizeof(p->u.aHash));
    memset(p->u.aHash, 0, sizeof(p->u.aHash));
    p->nSet = 0;
    for(j=0; j<BITVEC_NINT; j++){
      if( aiValues[j] && aiValues[j]!=(i+1) ){
        u32 h = BITVEC_HASH(aiValues[j]-1);
        p->nSet++;
        while( p->u.aHash[h] ){
          h++;
          if( h>=BITVEC_NINT ) h = 0;
        }
        p->u.aHash[h] = aiValues[j];
      }
    }
  }
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x30, %rsp
movq %rdi, -0x8(%rbp)
movl %esi, -0xc(%rbp)
movq %rdx, -0x18(%rbp)
cmpq $0x0, -0x8(%rbp)
jne 0x2e12f
jmp 0x2e2ac
movl -0xc(%rbp), %eax
addl $-0x1, %eax
movl %eax, -0xc(%rbp)
movq -0x8(%rbp), %rax
cmpl $0x0, 0x8(%rax)
je 0x2e17e
movl -0xc(%rbp), %eax
movq -0x8(%rbp), %rcx
xorl %edx, %edx
divl 0x8(%rcx)
movl %eax, -0x1c(%rbp)
movl -0xc(%rbp), %eax
movq -0x8(%rbp), %rcx
xorl %edx, %edx
divl 0x8(%rcx)
movl %edx, -0xc(%rbp)
movq -0x8(%rbp), %rax
movl -0x1c(%rbp), %ecx
movq 0x10(%rax,%rcx,8), %rax
movq %rax, -0x8(%rbp)
cmpq $0x0, -0x8(%rbp)
jne 0x2e17c
jmp 0x2e2ac
jmp 0x2e138
movq -0x8(%rbp), %rax
movl (%rax), %eax
cmpq $0xf80, %rax            # imm = 0xF80
ja 0x2e1b8
movl -0xc(%rbp), %ecx
andl $0x7, %ecx
movl $0x1, %esi
shll %cl, %esi
xorl $-0x1, %esi
movq -0x8(%rbp), %rax
movl -0xc(%rbp), %ecx
shrl $0x3, %ecx
movl %ecx, %ecx
movzbl 0x10(%rax,%rcx), %edx
andl %esi, %edx
movb %dl, 0x10(%rax,%rcx)
jmp 0x2e2ac
movq -0x18(%rbp), %rax
movq %rax, -0x28(%rbp)
movq -0x28(%rbp), %rdi
movq -0x8(%rbp), %rsi
addq $0x10, %rsi
movl $0x1f0, %edx            # imm = 0x1F0
callq 0x82f0
movq -0x8(%rbp), %rdi
addq $0x10, %rdi
xorl %esi, %esi
movl $0x1f0, %edx            # imm = 0x1F0
callq 0x8200
movq -0x8(%rbp), %rax
movl $0x0, 0x4(%rax)
movl $0x0, -0x20(%rbp)
movl -0x20(%rbp), %eax
cmpq $0x7c, %rax
jae 0x2e2aa
movq -0x28(%rbp), %rax
movl -0x20(%rbp), %ecx
cmpl $0x0, (%rax,%rcx,4)
je 0x2e29a
movq -0x28(%rbp), %rax
movl -0x20(%rbp), %ecx
movl (%rax,%rcx,4), %eax
movl -0xc(%rbp), %ecx
addl $0x1, %ecx
cmpl %ecx, %eax
je 0x2e29a
movq -0x28(%rbp), %rax
movl -0x20(%rbp), %ecx
movl (%rax,%rcx,4), %eax
subl $0x1, %eax
shll $0x0, %eax
movl %eax, %eax
movl $0x7c, %ecx
xorl %edx, %edx
divq %rcx
movl %edx, %eax
movl %eax, -0x2c(%rbp)
movq -0x8(%rbp), %rax
movl 0x4(%rax), %ecx
addl $0x1, %ecx
movl %ecx, 0x4(%rax)
movq -0x8(%rbp), %rax
movl -0x2c(%rbp), %ecx
cmpl $0x0, 0x10(%rax,%rcx,4)
je 0x2e285
movl -0x2c(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x2c(%rbp)
movl -0x2c(%rbp), %eax
cmpq $0x7c, %rax
jb 0x2e283
movl $0x0, -0x2c(%rbp)
jmp 0x2e25c
movq -0x28(%rbp), %rax
movl -0x20(%rbp), %ecx
movl (%rax,%rcx,4), %edx
movq -0x8(%rbp), %rax
movl -0x2c(%rbp), %ecx
movl %edx, 0x10(%rax,%rcx,4)
jmp 0x2e29c
movl -0x20(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x20(%rbp)
jmp 0x2e1fc
jmp 0x2e2ac
addq $0x30, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)