// File: /workspace/github_c_makefile_star2_O1/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 0x30(%rdi), %r15
movq 0x80(%r15), %rax
movl $0xffffff3f, %ecx       # imm = 0xFFFFFF3F
movl 0x8c(%rdi), %edx
andl %ecx, %edx
orl $0x40, %edx
movw %dx, 0x8c(%rdi)
movl 0x3c(%rdi), %edx
testl %edx, %edx
jle 0x3fcea
movq 0x8(%rdi), %rsi
incl %edx
addq $0x10, %rsi
leaq 0x3b166(%rip), %r8      # 0x7ada0
leaq 0x39cb3(%rip), %r9      # 0x798f4
leaq -0xbdae(%rip), %r10     # 0x33e9a
leaq -0xbd5d(%rip), %r11     # 0x33ef2
movzbl -0x10(%rsi), %r12d
leal -0x1(%r12), %r13d
cmpl $0xc, %r13d
ja 0x3fcb9
movslq (%r9,%r13,4), %r13
addq %r9, %r13
jmpq *%r13
movq %r10, (%rsi)
jmp 0x3fc8c
movl 0x8c(%rdi), %r13d
andl %ecx, %r13d
orl $0x80, %r13d
movw %r13w, 0x8c(%rdi)
jmp 0x3fcb9
movq %r11, (%rsi)
movb $-0x13, -0xf(%rsi)
jmp 0x3fcb9
movl -0x24(%rsi), %r13d
jmp 0x3fc9c
movl -0x8(%rsi), %r13d
cmpl %r14d, %r13d
cmovgl %r13d, %r14d
jmp 0x3fcb9
cmpl $0x0, -0x8(%rsi)
je 0x3fcb2
andb $-0x41, 0x8c(%rdi)
orb $-0x80, 0x8c(%rdi)
movb (%r12,%r8), %r12b
movb %r12b, -0xe(%rsi)
testb $0x1, %r12b
je 0x3fcdb
movl -0x8(%rsi), %r12d
testl %r12d, %r12d
jns 0x3fcdb
notl %r12d
movl (%rax,%r12,4), %r12d
movl %r12d, -0x8(%rsi)
decl %edx
addq $0x18, %rsi
cmpl $0x1, %edx
jg 0x3fc4f
movq (%rdi), %rdi
movq 0x80(%r15), %rsi
callq 0xb6df
movq $0x0, 0x80(%r15)
movl $0x0, 0x7c(%r15)
movl %r14d, (%rbx)
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq