// File: /workspace/github_c_makefile_star2_O0/genometools[P]genometools/src/external/sqlite-3.33.0/sqlite3.c
// Function: sqlite3_step
SQLITE_API int sqlite3_step(sqlite3_stmt *pStmt){
  int rc = SQLITE_OK;      /* Result from sqlite3Step() */
  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;
    rc = sqlite3Reprepare(v);
    if( rc!=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 = rc = sqlite3ApiExit(db, rc);
      } else {
        v->zErrMsg = 0;
        v->rc = rc = SQLITE_NOMEM_BKPT;
      }
      break;
    }
    sqlite3_reset(pStmt);
    if( savedPc>=0 ) v->doingRerun = 1;
    assert( v->expired==0 );
  }
  sqlite3_mutex_leave(db->mutex);
  return rc;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x50, %rsp
movq %rdi, -0x10(%rbp)
movl $0x0, -0x14(%rbp)
movq -0x10(%rbp), %rax
movq %rax, -0x20(%rbp)
movl $0x0, -0x24(%rbp)
movq -0x20(%rbp), %rdi
callq 0x3c8da0
cmpl $0x0, %eax
je 0x3c8c72
movl $0x1471f, %edi          # imm = 0x1471F
callq 0x3bf6a0
movl %eax, -0x4(%rbp)
jmp 0x3c8d8f
movq -0x20(%rbp), %rax
movq (%rax), %rax
movq %rax, -0x30(%rbp)
movq -0x20(%rbp), %rax
movb $0x0, 0xc5(%rax)
movq -0x20(%rbp), %rdi
callq 0x3c8df0
movl %eax, %ecx
movl %ecx, -0x14(%rbp)
xorl %eax, %eax
cmpl $0x11, %ecx
movb %al, -0x41(%rbp)
jne 0x3c8cb4
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 0x3c8cc0
jmp 0x3c8d89
movq -0x20(%rbp), %rax
movl 0x34(%rax), %eax
movl %eax, -0x34(%rbp)
movq -0x20(%rbp), %rdi
callq 0x3c90e0
movl %eax, -0x14(%rbp)
cmpl $0x0, -0x14(%rbp)
je 0x3c8d6a
movq -0x30(%rbp), %rax
movq 0x160(%rax), %rdi
callq 0x3c7880
movq %rax, -0x40(%rbp)
movq -0x30(%rbp), %rdi
movq -0x20(%rbp), %rax
movq 0xa8(%rax), %rsi
callq 0x3c00a0
movq -0x30(%rbp), %rax
cmpb $0x0, 0x61(%rax)
jne 0x3c8d47
movq -0x30(%rbp), %rdi
movq -0x40(%rbp), %rsi
callq 0x3c91a0
movq %rax, %rcx
movq -0x20(%rbp), %rax
movq %rcx, 0xa8(%rax)
movq -0x30(%rbp), %rdi
movl -0x14(%rbp), %esi
callq 0x3c7380
movl %eax, %ecx
movl %ecx, -0x14(%rbp)
movq -0x20(%rbp), %rax
movl %ecx, 0x38(%rax)
jmp 0x3c8d68
movq -0x20(%rbp), %rax
movq $0x0, 0xa8(%rax)
movl $0x7, -0x14(%rbp)
movq -0x20(%rbp), %rax
movl $0x7, 0x38(%rax)
jmp 0x3c8d89
movq -0x10(%rbp), %rdi
callq 0x3c73d0
cmpl $0x0, -0x34(%rbp)
jl 0x3c8d84
movq -0x20(%rbp), %rax
movb $0x1, 0xc5(%rax)
jmp 0x3c8c88
movl -0x14(%rbp), %eax
movl %eax, -0x4(%rbp)
movl -0x4(%rbp), %eax
addq $0x50, %rsp
popq %rbp
retq
nopl (%rax,%rax)