// File: /workspace/github_c_makefile_star2_O0/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
subq $0x40, %rsp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq -0x10(%rbp), %rax
movl (%rax), %eax
movl %eax, -0x18(%rbp)
movq -0x8(%rbp), %rax
movq 0x30(%rax), %rax
movq %rax, -0x28(%rbp)
movq -0x28(%rbp), %rax
movq 0x80(%rax), %rax
movq %rax, -0x30(%rbp)
movq -0x8(%rbp), %rax
movw 0x8c(%rax), %cx
andw $-0x41, %cx
orw $0x40, %cx
movw %cx, 0x8c(%rax)
movq -0x8(%rbp), %rax
movw 0x8c(%rax), %cx
andw $0xff7f, %cx            # imm = 0xFF7F
orw $0x0, %cx
movw %cx, 0x8c(%rax)
movq -0x8(%rbp), %rax
movq 0x8(%rax), %rax
movq %rax, -0x20(%rbp)
movq -0x8(%rbp), %rax
movl 0x3c(%rax), %eax
subl $0x1, %eax
movl %eax, -0x14(%rbp)
cmpl $0x0, -0x14(%rbp)
jl 0x57109
movq -0x20(%rbp), %rax
movb (%rax), %al
movb %al, -0x31(%rbp)
movzbl -0x31(%rbp), %eax
decl %eax
movl %eax, %ecx
movq %rcx, -0x40(%rbp)
subl $0xc, %eax
ja 0x5709f
movq -0x40(%rbp), %rax
leaq 0x4ab33(%rip), %rcx     # 0xa1ae8
movslq (%rcx,%rax,4), %rax
addq %rcx, %rax
jmpq *%rax
movq -0x20(%rbp), %rax
cmpl $0x0, 0x8(%rax)
je 0x56fe2
movq -0x8(%rbp), %rax
movw 0x8c(%rax), %cx
andw $-0x41, %cx
orw $0x0, %cx
movw %cx, 0x8c(%rax)
jmp 0x56fe4
movq -0x8(%rbp), %rax
movw 0x8c(%rax), %cx
andw $0xff7f, %cx            # imm = 0xFF7F
orw $0x80, %cx
movw %cx, 0x8c(%rax)
jmp 0x5709f
movq -0x8(%rbp), %rax
movw 0x8c(%rax), %cx
andw $-0x41, %cx
orw $0x0, %cx
movw %cx, 0x8c(%rax)
movq -0x8(%rbp), %rax
movw 0x8c(%rax), %cx
andw $0xff7f, %cx            # imm = 0xFF7F
orw $0x80, %cx
movw %cx, 0x8c(%rax)
jmp 0x5709f
movq -0x20(%rbp), %rax
movl 0x8(%rax), %eax
cmpl -0x18(%rbp), %eax
jle 0x57053
movq -0x20(%rbp), %rax
movl 0x8(%rax), %eax
movl %eax, -0x18(%rbp)
jmp 0x5709f
movq -0x20(%rbp), %rax
movl -0x14(%rax), %eax
movl %eax, -0x38(%rbp)
movl -0x38(%rbp), %eax
cmpl -0x18(%rbp), %eax
jle 0x5706d
movl -0x38(%rbp), %eax
movl %eax, -0x18(%rbp)
jmp 0x5709f
movq -0x20(%rbp), %rax
leaq -0x1265a(%rip), %rcx    # 0x44a20
movq %rcx, 0x10(%rax)
movq -0x20(%rbp), %rax
movb $-0x13, 0x1(%rax)
jmp 0x5709f
movq -0x20(%rbp), %rax
leaq -0x12583(%rip), %rcx    # 0x44b10
movq %rcx, 0x10(%rax)
movq -0x20(%rbp), %rax
movb $-0x13, 0x1(%rax)
movzbl -0x31(%rbp), %eax
movl %eax, %ecx
leaq 0x4c6b4(%rip), %rax     # 0xa3760
movb (%rax,%rcx), %cl
movq -0x20(%rbp), %rax
movb %cl, 0x2(%rax)
movq -0x20(%rbp), %rax
movzbl 0x2(%rax), %eax
andl $0x1, %eax
cmpl $0x0, %eax
je 0x570ed
movq -0x20(%rbp), %rax
cmpl $0x0, 0x8(%rax)
jge 0x570ed
movq -0x30(%rbp), %rax
movq -0x20(%rbp), %rdx
movl $0xffffffff, %ecx       # imm = 0xFFFFFFFF
subl 0x8(%rdx), %ecx
movslq %ecx, %rcx
movl (%rax,%rcx,4), %ecx
movq -0x20(%rbp), %rax
movl %ecx, 0x8(%rax)
jmp 0x570ef
movl -0x14(%rbp), %eax
addl $-0x1, %eax
movl %eax, -0x14(%rbp)
movq -0x20(%rbp), %rax
addq $0x18, %rax
movq %rax, -0x20(%rbp)
jmp 0x56f82
movq -0x8(%rbp), %rax
movq (%rax), %rdi
movq -0x28(%rbp), %rax
movq 0x80(%rax), %rsi
callq 0xd260
movq -0x28(%rbp), %rax
movq $0x0, 0x80(%rax)
movq -0x28(%rbp), %rax
movl $0x0, 0x7c(%rax)
movl -0x18(%rbp), %ecx
movq -0x10(%rbp), %rax
movl %ecx, (%rax)
addq $0x40, %rsp
popq %rbp
retq
nopl (%rax)