// File: /workspace/github_c_makefile_star2_O3/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 %r15
pushq %r14
pushq %r12
pushq %rbx
pushq %rax
testq %rdi, %rdi
je 0x27a075
movq %rdi, %r14
movq (%rdi), %rdi
testq %rdi, %rdi
je 0x27a07e
cmpl $0x2df20da3, 0x24(%r14) # imm = 0x2DF20DA3
jne 0x27a024
cmpl $0x0, 0x34(%r14)
js 0x27a0ca
movl $0x15, 0x50(%rdi)
movl $0x15, %ebx
movl $0x15, %esi
callq 0x284b1f
movq 0xf0(%r14), %rdx
leaq 0x15cd5e(%rip), %rsi    # 0x3d6da6
movl $0x15, %edi
xorl %eax, %eax
callq 0x274d08
leaq 0x15bb70(%rip), %rsi    # 0x3d5bcb
leaq 0x1603e5(%rip), %rdx    # 0x3da447
leaq 0x15b9c8(%rip), %r8     # 0x3d5a31
movl $0x15, %edi
movl $0x14968, %ecx          # imm = 0x14968
jmp 0x27a0b5
leaq 0x15bd67(%rip), %rsi    # 0x3d5de3
jmp 0x27a085
leaq 0x15bcc3(%rip), %rsi    # 0x3d5d48
movl $0x15, %ebx
movl $0x15, %edi
xorl %eax, %eax
callq 0x274d08
leaq 0x15bb2e(%rip), %rsi    # 0x3d5bcb
leaq 0x1603a3(%rip), %rdx    # 0x3da447
leaq 0x15b986(%rip), %r8     # 0x3d5a31
movl $0x15, %edi
movl $0x14960, %ecx          # imm = 0x14960
xorl %eax, %eax
callq 0x274d08
movl %ebx, %eax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
retq
movl %esi, %r15d
testl %esi, %esi
jle 0x27a0db
movswl 0x20(%r14), %eax
cmpl %r15d, %eax
jge 0x27a0f3
movl $0x19, 0x50(%rdi)
movl $0x19, %ebx
movl $0x19, %esi
callq 0x284b1f
jmp 0x27a0bc
leal -0x1(%r15), %r12d
movq 0x80(%r14), %rax
imulq $0x38, %r12, %rcx
leaq (%rax,%rcx), %rbx
testb $0x24, 0x9(%rax,%rcx)
jne 0x27a113
cmpl $0x0, 0x20(%rbx)
je 0x27a11e
movq %rbx, %rdi
callq 0x291775
movq (%r14), %rdi
movw $0x1, 0x8(%rbx)
movl $0x0, 0x50(%rdi)
movl 0x114(%r14), %eax
xorl %ebx, %ebx
testl %eax, %eax
je 0x27a0bc
movl $0x1, %edx
movl %r12d, %ecx
shll %cl, %edx
cmpl $0x20, %r15d
movl $0x80000000, %ecx       # imm = 0x80000000
cmovbl %edx, %ecx
testl %ecx, %eax
je 0x27a0bc
movzwl 0xc6(%r14), %eax
andl $-0x4, %eax
incl %eax
movw %ax, 0xc6(%r14)
jmp 0x27a0bc