// File: /workspace/github_c_makefile_star2_O2/shifengbin[P]bishe/Output/../Persistence/sqlite3.c
// Function: resolveP2Values
static void resolveP2Values(Vdbe *p, int *pMaxFuncArgs){
  int i;
  int nMaxArgs = *pMaxFuncArgs;
  Op *pOp;
  Parse *pParse = p->pParse;
  int *aLabel = pParse->aLabel;
  p->readOnly = 1;
  p->bIsReader = 0;
  for(pOp=p->aOp, i=p->nOp-1; i>=0; i--, pOp++){
    u8 opcode = pOp->opcode;

    /* NOTE: Be sure to update mkopcodeh.awk when adding or removing
    ** cases from this switch! */
    switch( opcode ){
      case OP_Transaction: {
        if( pOp->p2!=0 ) p->readOnly = 0;
        /* fall thru */
      }
      case OP_AutoCommit:
      case OP_Savepoint: {
        p->bIsReader = 1;
        break;
      }
#ifndef SQLITE_OMIT_WAL
      case OP_Checkpoint:
#endif
      case OP_Vacuum:
      case OP_JournalMode: {
        p->readOnly = 0;
        p->bIsReader = 1;
        break;
      }
#ifndef SQLITE_OMIT_VIRTUALTABLE
      case OP_VUpdate: {
        if( pOp->p2>nMaxArgs ) nMaxArgs = pOp->p2;
        break;
      }
      case OP_VFilter: {
        int n;
        assert( p->nOp - i >= 3 );
        assert( pOp[-1].opcode==OP_Integer );
        n = pOp[-1].p1;
        if( n>nMaxArgs ) nMaxArgs = n;
        break;
      }
#endif
      case OP_Next:
      case OP_NextIfOpen:
      case OP_SorterNext: {
        pOp->p4.xAdvance = sqlite3BtreeNext;
        pOp->p4type = P4_ADVANCE;
        break;
      }
      case OP_Prev:
      case OP_PrevIfOpen: {
        pOp->p4.xAdvance = sqlite3BtreePrevious;
        pOp->p4type = P4_ADVANCE;
        break;
      }
    }

    pOp->opflags = sqlite3OpcodeProperty[opcode];
    if( (pOp->opflags & OPFLG_JUMP)!=0 && pOp->p2<0 ){
      assert( ADDR(pOp->p2)<pParse->nLabel );
      pOp->p2 = aLabel[ADDR(pOp->p2)];
    }
  }
  sqlite3DbFree(p->db, pParse->aLabel);
  pParse->aLabel = 0;
  pParse->nLabel = 0;
  *pMaxFuncArgs = nMaxArgs;
  assert( p->bIsReader!=0 || DbMaskAllZero(p->btreeMask) );
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movq %rsi, %rbx
movl (%rsi), %r14d
movq 0x8(%rdi), %rax
movq 0x30(%rdi), %r15
movq 0x80(%r15), %rcx
movl $0xffffff3f, %edx       # imm = 0xFFFFFF3F
movl 0x8c(%rdi), %esi
andl %edx, %esi
orl $0x40, %esi
movw %si, 0x8c(%rdi)
movl 0x3c(%rdi), %esi
addq $0x10, %rax
leaq 0x31606(%rip), %r8      # 0x69d90
leaq 0x30153(%rip), %r9      # 0x688e4
leaq -0x8d1e(%rip), %r10     # 0x2fa7a
leaq -0x8cd1(%rip), %r11     # 0x2face
testl %esi, %esi
jle 0x3883e
movzbl -0x10(%rax), %r12d
leal -0x1(%r12), %r13d
cmpl $0xc, %r13d
ja 0x38811
movslq (%r9,%r13,4), %r13
addq %r9, %r13
jmpq *%r13
movq %r10, (%rax)
jmp 0x387e4
movl 0x8c(%rdi), %r13d
andl %edx, %r13d
orl $0x80, %r13d
movw %r13w, 0x8c(%rdi)
jmp 0x38811
movq %r11, (%rax)
movb $-0x13, -0xf(%rax)
jmp 0x38811
movl -0x24(%rax), %r13d
jmp 0x387f4
movl -0x8(%rax), %r13d
cmpl %r14d, %r13d
cmovgl %r13d, %r14d
jmp 0x38811
cmpl $0x0, -0x8(%rax)
je 0x3880a
andb $-0x41, 0x8c(%rdi)
orb $-0x80, 0x8c(%rdi)
movb (%r12,%r8), %r12b
movb %r12b, -0xe(%rax)
testb $0x1, %r12b
je 0x38833
movl -0x8(%rax), %r12d
testl %r12d, %r12d
jns 0x38833
notl %r12d
movl (%rcx,%r12,4), %r12d
movl %r12d, -0x8(%rax)
addq $0x18, %rax
decl %esi
jmp 0x3879f
movq (%rdi), %rdi
movq 0x80(%r15), %rsi
callq 0xb856
andq $0x0, 0x80(%r15)
andl $0x0, 0x7c(%r15)
movl %r14d, (%rbx)
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq