// File: /workspace/github_c_makefile_star2_O1/genometools[P]genometools/src/external/sqlite-3.33.0/sqlite3.c
// Function: vdbeUnbind
static int vdbeUnbind(Vdbe *p, int i){
  Mem *pVar;
  if( vdbeSafetyNotNull(p) ){
    return SQLITE_MISUSE_BKPT;
  }
  sqlite3_mutex_enter(p->db->mutex);
  if( p->magic!=VDBE_MAGIC_RUN || p->pc>=0 ){
    sqlite3Error(p->db, SQLITE_MISUSE);
    sqlite3_mutex_leave(p->db->mutex);
    sqlite3_log(SQLITE_MISUSE,
        "bind on a busy prepared statement: [%s]", p->zSql);
    return SQLITE_MISUSE_BKPT;
  }
  if( i<1 || i>p->nVar ){
    sqlite3Error(p->db, SQLITE_RANGE);
    sqlite3_mutex_leave(p->db->mutex);
    return SQLITE_RANGE;
  }
  i--;
  pVar = &p->aVar[i];
  sqlite3VdbeMemRelease(pVar);
  pVar->flags = MEM_Null;
  p->db->errCode = SQLITE_OK;

  /* If the bit corresponding to this variable in Vdbe.expmask is set, then
  ** binding a new value to this variable invalidates the current query plan.
  **
  ** IMPLEMENTATION-OF: R-57496-20354 If the specific value bound to a host
  ** parameter in the WHERE clause might influence the choice of query plan
  ** for a statement, then the statement will be automatically recompiled,
  ** as if there had been a schema change, on the first sqlite3_step() call
  ** following any change to the bindings of that parameter.
  */
  assert( (p->prepFlags & SQLITE_PREPARE_SAVESQL)!=0 || p->expmask==0 );
  if( p->expmask!=0 && (p->expmask & (i>=31 ? 0x80000000 : (u32)1<<i))!=0 ){
    p->expired = 1;
  }
  return SQLITE_OK;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
movl %esi, %r14d
movq %rdi, %rbx
callq 0x283330
testl %eax, %eax
je 0x283a78
leaq 0x15b8c6(%rip), %rsi    # 0x3df31f
leaq 0x16013c(%rip), %rdx    # 0x3e3b9c
leaq 0x15b71e(%rip), %r8     # 0x3df185
movl $0x15, %ebp
movl $0x15, %edi
movl $0x14960, %ecx          # imm = 0x14960
jmp 0x283ad9
cmpl $0x2df20da3, 0x24(%rbx) # imm = 0x2DF20DA3
jne 0x283a87
cmpl $0x0, 0x34(%rbx)
js 0x283aeb
movq (%rbx), %rdi
movl $0x15, 0x50(%rdi)
movl $0x15, %ebp
movl $0x15, %esi
callq 0x28e696
movq 0xf0(%rbx), %rdx
leaq 0x15ca4d(%rip), %rsi    # 0x3e04fb
movl $0x15, %edi
xorl %eax, %eax
callq 0x27e637
leaq 0x15b85e(%rip), %rsi    # 0x3df31f
leaq 0x1600d4(%rip), %rdx    # 0x3e3b9c
leaq 0x15b6b6(%rip), %r8     # 0x3df185
movl $0x15, %edi
movl $0x14968, %ecx          # imm = 0x14968
xorl %eax, %eax
callq 0x27e637
movl %ebp, %eax
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
testl %r14d, %r14d
jle 0x283af9
movswl 0x20(%rbx), %eax
cmpl %r14d, %eax
jge 0x283b14
movq (%rbx), %rdi
movl $0x19, 0x50(%rdi)
movl $0x19, %ebp
movl $0x19, %esi
callq 0x28e696
jmp 0x283ae0
leal -0x1(%r14), %r15d
movq 0x80(%rbx), %rax
imulq $0x38, %r15, %rcx
leaq (%rax,%rcx), %r12
testb $0x24, 0x9(%rax,%rcx)
jne 0x283b36
cmpl $0x0, 0x20(%r12)
je 0x283b3e
movq %r12, %rdi
callq 0x29b45b
movw $0x1, 0x8(%r12)
movq (%rbx), %rax
movl $0x0, 0x50(%rax)
movl 0x114(%rbx), %eax
xorl %ebp, %ebp
testl %eax, %eax
je 0x283ae0
movl $0x1, %edx
movl %r15d, %ecx
shll %cl, %edx
cmpl $0x20, %r14d
movl $0x80000000, %ecx       # imm = 0x80000000
cmovll %edx, %ecx
testl %ecx, %eax
je 0x283ae0
movzwl 0xc6(%rbx), %eax
andl $-0x4, %eax
incl %eax
movw %ax, 0xc6(%rbx)
jmp 0x283ae0