// File: /workspace/github_c_makefile_star2_O0/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
movq %rsp, %rbp
subq $0x30, %rsp
movq %rdi, -0x10(%rbp)
movl %esi, -0x14(%rbp)
movq -0x10(%rbp), %rdi
callq 0x3c8da0
cmpl $0x0, %eax
je 0x3c9d8f
movl $0x14960, %edi          # imm = 0x14960
callq 0x3bf6a0
movl %eax, -0x4(%rbp)
jmp 0x3c9ec2
movq -0x10(%rbp), %rax
cmpl $0x2df20da3, 0x24(%rax) # imm = 0x2DF20DA3
jne 0x3c9da6
movq -0x10(%rbp), %rax
cmpl $0x0, 0x34(%rax)
jl 0x3c9de7
movq -0x10(%rbp), %rax
movq (%rax), %rdi
movl $0x15, %esi
callq 0x3c5210
movq -0x10(%rbp), %rax
movq 0xf0(%rax), %rdx
movl $0x15, %edi
leaq 0x1e2469(%rip), %rsi    # 0x5ac237
movb $0x0, %al
callq 0x3c3970
movl $0x14968, %edi          # imm = 0x14968
callq 0x3bf6a0
movl %eax, -0x4(%rbp)
jmp 0x3c9ec2
cmpl $0x1, -0x14(%rbp)
jl 0x3c9dfc
movl -0x14(%rbp), %eax
movq -0x10(%rbp), %rcx
movswl 0x20(%rcx), %ecx
cmpl %ecx, %eax
jle 0x3c9e19
movq -0x10(%rbp), %rax
movq (%rax), %rdi
movl $0x19, %esi
callq 0x3c5210
movl $0x19, -0x4(%rbp)
jmp 0x3c9ec2
movl -0x14(%rbp), %eax
addl $-0x1, %eax
movl %eax, -0x14(%rbp)
movq -0x10(%rbp), %rax
movq 0x80(%rax), %rax
movslq -0x14(%rbp), %rcx
imulq $0x38, %rcx, %rcx
addq %rcx, %rax
movq %rax, -0x20(%rbp)
movq -0x20(%rbp), %rdi
callq 0x3c76d0
movq -0x20(%rbp), %rax
movw $0x1, 0x8(%rax)
movq -0x10(%rbp), %rax
movq (%rax), %rax
movl $0x0, 0x50(%rax)
movq -0x10(%rbp), %rax
cmpl $0x0, 0x114(%rax)
je 0x3c9ebb
movq -0x10(%rbp), %rax
movl 0x114(%rax), %eax
movl %eax, -0x24(%rbp)
cmpl $0x1f, -0x14(%rbp)
jl 0x3c9e87
movl $0x80000000, %eax       # imm = 0x80000000
movl %eax, -0x28(%rbp)
jmp 0x3c9e94
movl -0x14(%rbp), %ecx
movl $0x1, %eax
shll %cl, %eax
movl %eax, -0x28(%rbp)
movl -0x24(%rbp), %eax
movl -0x28(%rbp), %ecx
andl %ecx, %eax
cmpl $0x0, %eax
je 0x3c9ebb
movq -0x10(%rbp), %rax
movw 0xc6(%rax), %cx
andw $-0x4, %cx
orw $0x1, %cx
movw %cx, 0xc6(%rax)
movl $0x0, -0x4(%rbp)
movl -0x4(%rbp), %eax
addq $0x30, %rsp
popq %rbp
retq
nopl (%rax,%rax)