// File: /workspace/github_c_makefile_star2_O0/skeeto[P]flappy/sqlite3.c
// Function: sqlite3VdbeChangeP4
SQLITE_PRIVATE void sqlite3VdbeChangeP4(Vdbe *p, int addr, const char *zP4, int n){
  Op *pOp;
  sqlite3 *db;
  assert( p!=0 );
  db = p->db;
  assert( p->magic==VDBE_MAGIC_INIT );
  if( p->aOp==0 || db->mallocFailed ){
    if( n!=P4_VTAB ){
      freeP4(db, n, (void*)*(char**)&zP4);
    }
    return;
  }
  assert( p->nOp>0 );
  assert( addr<p->nOp );
  if( addr<0 ){
    addr = p->nOp - 1;
  }
  pOp = &p->aOp[addr];
  assert( pOp->p4type==P4_NOTUSED || pOp->p4type==P4_INT32 );
  freeP4(db, pOp->p4type, pOp->p4.p);
  pOp->p4.p = 0;
  if( n==P4_INT32 ){
    /* Note: this cast is safe, because the origin data point was an int
    ** that was cast to a (const char *). */
    pOp->p4.i = SQLITE_PTR_TO_INT(zP4);
    pOp->p4type = P4_INT32;
  }else if( zP4==0 ){
    pOp->p4.p = 0;
    pOp->p4type = P4_NOTUSED;
  }else if( n==P4_KEYINFO ){
    pOp->p4.p = (void*)zP4;
    pOp->p4type = P4_KEYINFO;
  }else if( n==P4_VTAB ){
    pOp->p4.p = (void*)zP4;
    pOp->p4type = P4_VTAB;
    sqlite3VtabLock((VTable *)zP4);
    assert( ((VTable *)zP4)->db==p->db );
  }else if( n<0 ){
    pOp->p4.p = (void*)zP4;
    pOp->p4type = (signed char)n;
  }else{
    if( n==0 ) n = sqlite3Strlen30(zP4);
    pOp->p4.z = sqlite3DbStrNDup(p->db, zP4, n);
    pOp->p4type = P4_DYNAMIC;
  }
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x30, %rsp
movq %rdi, -0x8(%rbp)
movl %esi, -0xc(%rbp)
movq %rdx, -0x18(%rbp)
movl %ecx, -0x1c(%rbp)
movq -0x8(%rbp), %rax
movq (%rax), %rax
movq %rax, -0x30(%rbp)
movq -0x8(%rbp), %rax
cmpq $0x0, 0x8(%rax)
je 0x16e79
movq -0x30(%rbp), %rax
movzbl 0x50(%rax), %eax
cmpl $0x0, %eax
je 0x16e94
cmpl $-0xa, -0x1c(%rbp)
je 0x16e8f
movq -0x30(%rbp), %rdi
movl -0x1c(%rbp), %esi
movq -0x18(%rbp), %rdx
callq 0x327e0
jmp 0x16fc7
cmpl $0x0, -0xc(%rbp)
jge 0x16ea7
movq -0x8(%rbp), %rax
movl 0x34(%rax), %eax
subl $0x1, %eax
movl %eax, -0xc(%rbp)
movq -0x8(%rbp), %rax
movq 0x8(%rax), %rax
movslq -0xc(%rbp), %rcx
imulq $0x18, %rcx, %rcx
addq %rcx, %rax
movq %rax, -0x28(%rbp)
movq -0x30(%rbp), %rdi
movq -0x28(%rbp), %rax
movsbl 0x1(%rax), %esi
movq -0x28(%rbp), %rax
movq 0x10(%rax), %rdx
callq 0x327e0
movq -0x28(%rbp), %rax
movq $0x0, 0x10(%rax)
cmpl $-0xe, -0x1c(%rbp)
jne 0x16f03
movq -0x18(%rbp), %rax
movl %eax, %ecx
movq -0x28(%rbp), %rax
movl %ecx, 0x10(%rax)
movq -0x28(%rbp), %rax
movb $-0xe, 0x1(%rax)
jmp 0x16fc7
cmpq $0x0, -0x18(%rbp)
jne 0x16f23
movq -0x28(%rbp), %rax
movq $0x0, 0x10(%rax)
movq -0x28(%rbp), %rax
movb $0x0, 0x1(%rax)
jmp 0x16fc5
cmpl $-0x6, -0x1c(%rbp)
jne 0x16f42
movq -0x18(%rbp), %rcx
movq -0x28(%rbp), %rax
movq %rcx, 0x10(%rax)
movq -0x28(%rbp), %rax
movb $-0x6, 0x1(%rax)
jmp 0x16fc3
cmpl $-0xa, -0x1c(%rbp)
jne 0x16f67
movq -0x18(%rbp), %rcx
movq -0x28(%rbp), %rax
movq %rcx, 0x10(%rax)
movq -0x28(%rbp), %rax
movb $-0xa, 0x1(%rax)
movq -0x18(%rbp), %rdi
callq 0x4d9b0
jmp 0x16fc1
cmpl $0x0, -0x1c(%rbp)
jge 0x16f87
movq -0x18(%rbp), %rcx
movq -0x28(%rbp), %rax
movq %rcx, 0x10(%rax)
movl -0x1c(%rbp), %eax
movb %al, %cl
movq -0x28(%rbp), %rax
movb %cl, 0x1(%rax)
jmp 0x16fbf
cmpl $0x0, -0x1c(%rbp)
jne 0x16f99
movq -0x18(%rbp), %rdi
callq 0xbcc0
movl %eax, -0x1c(%rbp)
movq -0x8(%rbp), %rax
movq (%rax), %rdi
movq -0x18(%rbp), %rsi
movl -0x1c(%rbp), %edx
callq 0x4ed70
movq %rax, %rcx
movq -0x28(%rbp), %rax
movq %rcx, 0x10(%rax)
movq -0x28(%rbp), %rax
movb $-0x1, 0x1(%rax)
jmp 0x16fc1
jmp 0x16fc3
jmp 0x16fc5
jmp 0x16fc7
addq $0x30, %rsp
popq %rbp
retq
nopl (%rax)