// File: /workspace/github_c_makefile_star2_O2/shifengbin[P]bishe/Output/../Persistence/sqlite3.c
// Function: sqlite3_exec
SQLITE_STDCALL sqlite3_exec(
  sqlite3 *db,                /* The database on which the SQL executes */
  const char *zSql,           /* The SQL to be executed */
  sqlite3_callback xCallback, /* Invoke this callback routine */
  void *pArg,                 /* First argument to xCallback() */
  char **pzErrMsg             /* Write error messages here */
){
  int rc = SQLITE_OK;         /* Return code */
  const char *zLeftover;      /* Tail of unprocessed SQL */
  sqlite3_stmt *pStmt = 0;    /* The current SQL statement */
  char **azCols = 0;          /* Names of result columns */
  int callbackIsInit;         /* True if callback data is initialized */

  if( !sqlite3SafetyCheckOk(db) ) return SQLITE_MISUSE_BKPT;
  if( zSql==0 ) zSql = "";

  sqlite3_mutex_enter(db->mutex);
  sqlite3Error(db, SQLITE_OK);
  while( rc==SQLITE_OK && zSql[0] ){
    int nCol;
    char **azVals = 0;

    pStmt = 0;
    rc = sqlite3_prepare_v2(db, zSql, -1, &pStmt, &zLeftover);
    assert( rc==SQLITE_OK || pStmt==0 );
    if( rc!=SQLITE_OK ){
      continue;
    }
    if( !pStmt ){
      /* this happens for a comment or white-space */
      zSql = zLeftover;
      continue;
    }

    callbackIsInit = 0;
    nCol = sqlite3_column_count(pStmt);

    while( 1 ){
      int i;
      rc = sqlite3_step(pStmt);

      /* Invoke the callback function if required */
      if( xCallback && (SQLITE_ROW==rc || 
          (SQLITE_DONE==rc && !callbackIsInit
                           && db->flags&SQLITE_NullCallback)) ){
        if( !callbackIsInit ){
          azCols = sqlite3DbMallocZero(db, 2*nCol*sizeof(const char*) + 1);
          if( azCols==0 ){
            goto exec_out;
          }
          for(i=0; i<nCol; i++){
            azCols[i] = (char *)sqlite3_column_name(pStmt, i);
            /* sqlite3VdbeSetColName() installs column names as UTF8
            ** strings so there is no way for sqlite3_column_name() to fail. */
            assert( azCols[i]!=0 );
          }
          callbackIsInit = 1;
        }
        if( rc==SQLITE_ROW ){
          azVals = &azCols[nCol];
          for(i=0; i<nCol; i++){
            azVals[i] = (char *)sqlite3_column_text(pStmt, i);
            if( !azVals[i] && sqlite3_column_type(pStmt, i)!=SQLITE_NULL ){
              db->mallocFailed = 1;
              goto exec_out;
            }
          }
        }
        if( xCallback(pArg, nCol, azVals, azCols) ){
          /* EVIDENCE-OF: R-38229-40159 If the callback function to
          ** sqlite3_exec() returns non-zero, then sqlite3_exec() will
          ** return SQLITE_ABORT. */
          rc = SQLITE_ABORT;
          sqlite3VdbeFinalize((Vdbe *)pStmt);
          pStmt = 0;
          sqlite3Error(db, SQLITE_ABORT);
          goto exec_out;
        }
      }

      if( rc!=SQLITE_ROW ){
        rc = sqlite3VdbeFinalize((Vdbe *)pStmt);
        pStmt = 0;
        zSql = zLeftover;
        while( sqlite3Isspace(zSql[0]) ) zSql++;
        break;
      }
    }

    sqlite3DbFree(db, azCols);
    azCols = 0;
  }

exec_out:
  if( pStmt ) sqlite3VdbeFinalize((Vdbe *)pStmt);
  sqlite3DbFree(db, azCols);

  rc = sqlite3ApiExit(db, rc);
  if( rc!=SQLITE_OK && pzErrMsg ){
    int nErrMsg = 1 + sqlite3Strlen30(sqlite3_errmsg(db));
    *pzErrMsg = sqlite3Malloc(nErrMsg);
    if( *pzErrMsg ){
      memcpy(*pzErrMsg, sqlite3_errmsg(db), nErrMsg);
    }else{
      rc = SQLITE_NOMEM;
      sqlite3Error(db, SQLITE_NOMEM);
    }
  }else if( pzErrMsg ){
    *pzErrMsg = 0;
  }

  assert( (rc&db->errMask)==rc );
  sqlite3_mutex_leave(db->mutex);
  return rc;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x48, %rsp
movq %r8, %r13
movq %rcx, -0x68(%rbp)
movq %rdx, %r14
movq %rsi, %rbx
movq %rdi, %r15
andq $0x0, -0x30(%rbp)
callq 0x1490e
testl %eax, %eax
je 0x147fa
movq %r14, -0x48(%rbp)
testq %rbx, %rbx
leaq 0x5aa6b(%rip), %r14     # 0x6f091
cmovneq %rbx, %r14
movq 0x18(%r15), %rdi
testq %rdi, %rdi
je 0x14639
callq *0x6ee6f(%rip)          # 0x834a8
movq %r15, %rdi
xorl %esi, %esi
callq 0xe9aa
pushq $-0x1
popq %rbx
xorl %r12d, %r12d
movq %r13, -0x60(%rbp)
testl %r12d, %r12d
jne 0x14810
cmpb $0x0, (%r14)
je 0x1480d
andq $0x0, -0x30(%rbp)
movq %r15, %rdi
movq %r14, %rsi
movl %ebx, %edx
leaq -0x30(%rbp), %rcx
leaq -0x50(%rbp), %r8
callq 0xa650
movl %eax, %r12d
testl %eax, %eax
jne 0x1464d
movq -0x30(%rbp), %rax
testq %rax, %rax
je 0x147ee
movq %r15, -0x38(%rbp)
movzwl 0x88(%rax), %r15d
movl %r15d, %eax
shll $0x4, %eax
incq %rax
movq %rax, -0x58(%rbp)
xorl %r13d, %r13d
xorl %ebx, %ebx
movq $0x0, -0x40(%rbp)
movq -0x48(%rbp), %r14
movq -0x30(%rbp), %rdi
callq 0xa360
movl %eax, %r12d
testq %r14, %r14
je 0x147a0
cmpl $0x64, %r12d
jne 0x146d9
testl %ebx, %ebx
jne 0x1473d
jmp 0x146f9
cmpl $0x65, %r12d
jne 0x147aa
testl %ebx, %ebx
jne 0x147aa
movq -0x38(%rbp), %rax
testb $0x1, 0x2d(%rax)
je 0x147aa
movq -0x38(%rbp), %rdi
movq -0x58(%rbp), %rsi
callq 0x12153
testq %rax, %rax
je 0x14902
movq %rax, %r13
movq -0x30(%rbp), %rbx
xorl %r14d, %r14d
cmpq %r14, %r15
je 0x14733
movq %rbx, %rdi
movl %r14d, %esi
callq 0xa140
movq %rax, (%r13,%r14,8)
incq %r14
jmp 0x14719
cmpl $0x64, %r12d
movq -0x48(%rbp), %r14
jne 0x14784
leaq (,%r15,8), %rax
addq %r13, %rax
movq %rax, -0x40(%rbp)
xorl %ebx, %ebx
cmpq %rbx, %r15
je 0x14784
movq -0x30(%rbp), %rdi
movl %ebx, %esi
callq 0xa450
movq -0x40(%rbp), %rcx
movq %rax, (%rcx,%rbx,8)
testq %rax, %rax
jne 0x1477f
movq -0x30(%rbp), %rdi
movl %ebx, %esi
callq 0xa350
cmpl $0x5, %eax
jne 0x148ca
incq %rbx
jmp 0x1474e
movq -0x68(%rbp), %rdi
movl %r15d, %esi
movq -0x40(%rbp), %rdx
movq %r13, %rcx
callq *%r14
testl %eax, %eax
jne 0x148dc
pushq $0x1
popq %rbx
cmpl $0x64, %r12d
je 0x146b8
movq -0x30(%rbp), %rdi
callq 0x10895
andq $0x0, -0x30(%rbp)
movl %eax, %r12d
movq -0x50(%rbp), %r14
decq %r14
pushq $-0x1
popq %rbx
leaq 0x54c74(%rip), %rcx     # 0x69440
movzbl 0x1(%r14), %eax
incq %r14
testb $0x1, (%rax,%rcx)
jne 0x147cc
movq -0x38(%rbp), %r15
movq %r15, %rdi
movq %r13, %rsi
callq 0xb856
jmp 0x1464d
xorl %r12d, %r12d
movq -0x50(%rbp), %r14
jmp 0x1464d
movl $0x199c1, %edi          # imm = 0x199C1
callq 0xb14d
pushq $0x15
popq %r14
jmp 0x148b8
xorl %r12d, %r12d
xorl %r13d, %r13d
movq -0x30(%rbp), %rdi
testq %rdi, %rdi
je 0x14821
callq 0x10895
movq %r15, %rdi
movq %r13, %rsi
callq 0xb856
movq %r15, %rdi
movl %r12d, %esi
callq 0x108ce
movl %eax, %r14d
movq -0x60(%rbp), %r13
testq %r13, %r13
je 0x1488b
testl %r14d, %r14d
je 0x1488b
movq %r15, %rdi
callq 0xa310
movq %rax, %rdi
callq 0xb080
movl %eax, %ebx
incl %ebx
movq %rbx, %rdi
callq 0xc13f
movq %r15, %r12
movq %rax, (%r13)
testq %rax, %rax
je 0x14897
movq %rax, %r15
movq %r12, %rdi
callq 0xa310
movq %r15, %rdi
movq %rax, %rsi
movq %rbx, %rdx
callq 0xa3b0
jmp 0x148a6
testq %r13, %r13
je 0x148a9
andq $0x0, (%r13)
jmp 0x148a9
pushq $0x7
popq %r14
movq %r12, %rdi
movl %r14d, %esi
callq 0xe9aa
movq %r12, %r15
movq 0x18(%r15), %rdi
testq %rdi, %rdi
je 0x148b8
callq *0x6ec00(%rip)          # 0x834b8
movl %r14d, %eax
addq $0x48, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movq -0x38(%rbp), %r15
movb $0x1, 0x51(%r15)
pushq $0x64
popq %r12
jmp 0x14813
movq -0x30(%rbp), %rdi
callq 0x10895
andq $0x0, -0x30(%rbp)
pushq $0x4
popq %r12
movq -0x38(%rbp), %r15
movq %r15, %rdi
movl %r12d, %esi
callq 0xe9aa
jmp 0x14813
xorl %r13d, %r13d
movq -0x38(%rbp), %r15
jmp 0x14813