// File: /workspace/github_c_makefile_star2_O0/shifengbin[P]bishe/Output/../Persistence/sqlite3.c
// Function: sqlite3_step
SQLITE_STDCALL sqlite3_step(sqlite3_stmt *pStmt){
  int rc = SQLITE_OK;      /* Result from sqlite3Step() */
  int rc2 = SQLITE_OK;     /* Result from sqlite3Reprepare() */
  Vdbe *v = (Vdbe*)pStmt;  /* the prepared statement */
  int cnt = 0;             /* Counter to prevent infinite loop of reprepares */
  sqlite3 *db;             /* The database connection */

  if( vdbeSafetyNotNull(v) ){
    return SQLITE_MISUSE_BKPT;
  }
  db = v->db;
  sqlite3_mutex_enter(db->mutex);
  v->doingRerun = 0;
  while( (rc = sqlite3Step(v))==SQLITE_SCHEMA
         && cnt++ < SQLITE_MAX_SCHEMA_RETRY ){
    int savedPc = v->pc;
    rc2 = rc = sqlite3Reprepare(v);
    if( rc!=SQLITE_OK) break;
    sqlite3_reset(pStmt);
    if( savedPc>=0 ) v->doingRerun = 1;
    assert( v->expired==0 );
  }
  if( rc2!=SQLITE_OK ){
    /* This case occurs after failing to recompile an sql statement. 
    ** The error message from the SQL compiler has already been loaded 
    ** into the database handle. This block copies the error message 
    ** from the database handle into the statement and sets the statement
    ** program counter to 0 to ensure that when the statement is 
    ** finalized or reset the parser error message is available via
    ** sqlite3_errmsg() and sqlite3_errcode().
    */
    const char *zErr = (const char *)sqlite3_value_text(db->pErr); 
    sqlite3DbFree(db, v->zErrMsg);
    if( !db->mallocFailed ){
      v->zErrMsg = sqlite3DbStrDup(db, zErr);
      v->rc = rc2;
    } else {
      v->zErrMsg = 0;
      v->rc = rc = SQLITE_NOMEM;
    }
  }
  rc = sqlite3ApiExit(db, rc);
  sqlite3_mutex_leave(db->mutex);
  return rc;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x50, %rsp
movq %rdi, -0x10(%rbp)
movl $0x0, -0x14(%rbp)
movl $0x0, -0x18(%rbp)
movq -0x10(%rbp), %rax
movq %rax, -0x20(%rbp)
movl $0x0, -0x24(%rbp)
movq -0x20(%rbp), %rdi
callq 0x15450
cmpl $0x0, %eax
je 0x152e9
movl $0x11adc, %edi          # imm = 0x11ADC
callq 0xc850
movl %eax, -0x4(%rbp)
jmp 0x15446
movq -0x20(%rbp), %rax
movq (%rax), %rax
movq %rax, -0x30(%rbp)
movq -0x30(%rbp), %rax
movq 0x18(%rax), %rdi
callq 0xb550
movq -0x20(%rbp), %rax
movw 0x8c(%rax), %cx
andw $0xfdff, %cx            # imm = 0xFDFF
orw $0x0, %cx
movw %cx, 0x8c(%rax)
movq -0x20(%rbp), %rdi
callq 0x154a0
movl %eax, %ecx
movl %ecx, -0x14(%rbp)
xorl %eax, %eax
cmpl $0x11, %ecx
movb %al, -0x41(%rbp)
jne 0x15348
movl -0x24(%rbp), %eax
movl %eax, %ecx
addl $0x1, %ecx
movl %ecx, -0x24(%rbp)
cmpl $0x32, %eax
setl %al
movb %al, -0x41(%rbp)
movb -0x41(%rbp), %al
testb $0x1, %al
jne 0x15351
jmp 0x153a5
movq -0x20(%rbp), %rax
movl 0x80(%rax), %eax
movl %eax, -0x34(%rbp)
movq -0x20(%rbp), %rdi
callq 0x15750
movl %eax, -0x14(%rbp)
movl %eax, -0x18(%rbp)
cmpl $0x0, -0x14(%rbp)
je 0x15375
jmp 0x153a5
movq -0x10(%rbp), %rdi
callq 0xb120
cmpl $0x0, -0x34(%rbp)
jl 0x153a0
movq -0x20(%rbp), %rax
movw 0x8c(%rax), %cx
andw $0xfdff, %cx            # imm = 0xFDFF
orw $0x200, %cx             # imm = 0x200
movw %cx, 0x8c(%rax)
jmp 0x1531c
cmpl $0x0, -0x18(%rbp)
je 0x15424
movq -0x30(%rbp), %rax
movq 0x140(%rax), %rdi
callq 0xb960
movq %rax, -0x40(%rbp)
movq -0x30(%rbp), %rdi
movq -0x20(%rbp), %rax
movq 0x48(%rax), %rsi
callq 0xd260
movq -0x30(%rbp), %rax
cmpb $0x0, 0x51(%rax)
jne 0x15401
movq -0x30(%rbp), %rdi
movq -0x40(%rbp), %rsi
callq 0x15800
movq %rax, %rcx
movq -0x20(%rbp), %rax
movq %rcx, 0x48(%rax)
movl -0x18(%rbp), %ecx
movq -0x20(%rbp), %rax
movl %ecx, 0x84(%rax)
jmp 0x15422
movq -0x20(%rbp), %rax
movq $0x0, 0x48(%rax)
movl $0x7, -0x14(%rbp)
movq -0x20(%rbp), %rax
movl $0x7, 0x84(%rax)
jmp 0x15424
movq -0x30(%rbp), %rdi
movl -0x14(%rbp), %esi
callq 0x13be0
movl %eax, -0x14(%rbp)
movq -0x30(%rbp), %rax
movq 0x18(%rax), %rdi
callq 0xb4f0
movl -0x14(%rbp), %eax
movl %eax, -0x4(%rbp)
movl -0x4(%rbp), %eax
addq $0x50, %rsp
popq %rbp
retq
nop