// File: /workspace/github_c_makefile_star2_O3/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 $0x58, %rsp
movq %r8, %r12
movq %rcx, -0x68(%rbp)
movq %rdx, -0x50(%rbp)
movq %rsi, %r14
movq %rdi, %r15
movq $0x0, -0x30(%rbp)
callq 0x15e3a
testl %eax, %eax
je 0x15a7e
testq %r14, %r14
leaq 0x6865c(%rip), %rbx     # 0x7e0a1
cmovneq %r14, %rbx
movq 0x18(%r15), %rdi
testq %rdi, %rdi
je 0x15a58
callq *0x7b960(%rip)          # 0x913b8
movl $0x0, 0x44(%r15)
movq 0x140(%r15), %rdi
testq %rdi, %rdi
je 0x15aad
movzwl 0x8(%rdi), %eax
testl $0x2460, %eax           # imm = 0x2460
je 0x15aa7
callq 0x2a210
jmp 0x15aad
leaq 0x69a1d(%rip), %rsi     # 0x7f4a2
leaq 0x65701(%rip), %rcx     # 0x7b18d
movl $0x15, %edi
movl $0x199c1, %edx          # imm = 0x199C1
xorl %eax, %eax
callq 0xa4c0
movl $0x15, %eax
jmp 0x15e1b
movw $0x1, 0x8(%rdi)
xorl %r14d, %r14d
movq %r15, -0x40(%rbp)
movq %r12, -0x48(%rbp)
cmpb $0x0, (%rbx)
je 0x15de8
movq $0x0, -0x30(%rbp)
leaq -0x58(%rbp), %rax
movq %rax, (%rsp)
movq %r15, %rdi
movq %rbx, %rsi
movl $0xffffffff, %edx       # imm = 0xFFFFFFFF
movl $0x1, %ecx
xorl %r8d, %r8d
leaq -0x30(%rbp), %r9
callq 0x16736
testl %eax, %eax
jne 0x15cac
movq -0x30(%rbp), %rax
testq %rax, %rax
je 0x15c8a
movzwl 0x88(%rax), %r12d
movl %r12d, %eax
shll $0x4, %eax
incq %rax
movq %rax, -0x60(%rbp)
xorl %r14d, %r14d
xorl %ebx, %ebx
xorl %r13d, %r13d
movq %r12, -0x70(%rbp)
movq -0x30(%rbp), %rdi
callq 0xa2e0
cmpq $0x0, -0x50(%rbp)
je 0x15c37
cmpl $0x64, %eax
movl %eax, -0x34(%rbp)
jne 0x15b45
testl %ebx, %ebx
jne 0x15bb6
jmp 0x15b64
cmpl $0x65, %eax
jne 0x15c40
testl %ebx, %ebx
jne 0x15c40
movq -0x40(%rbp), %rax
testb $0x1, 0x2d(%rax)
je 0x15c40
movq -0x40(%rbp), %rdi
movq -0x60(%rbp), %rbx
movq %rbx, %rsi
callq 0x145aa
testq %rax, %rax
je 0x15dd5
movq %rax, %r14
movq %rax, %rdi
xorl %esi, %esi
movq %rbx, %rdx
callq 0xa220
testq %r12, %r12
je 0x15bb0
movq -0x30(%rbp), %rbx
xorl %r15d, %r15d
movq %rbx, %rdi
movl %r15d, %esi
callq 0xa130
movq %rax, (%r14,%r15,8)
incq %r15
cmpq %r15, %r12
jne 0x15b99
cmpl $0x64, -0x34(%rbp)
jne 0x15c17
leaq (%r14,%r12,8), %r13
testq %r12, %r12
je 0x15c17
xorl %ebx, %ebx
movq -0x30(%rbp), %rdi
movl %ebx, %esi
callq 0xa3a0
movq %rax, (%r13,%rbx,8)
testq %rax, %rax
jne 0x15c0f
movq -0x30(%rbp), %r15
movq %r15, %rdi
movl %ebx, %esi
callq 0x13003
movq %r14, %r12
movq %r13, %r14
movl 0x8(%rax), %r13d
movq %r15, %rdi
callq 0x130ad
movl $0xaaaaaaaa, %eax       # imm = 0xAAAAAAAA
btl %r13d, %eax
movq %r14, %r13
movq %r12, %r14
movq -0x70(%rbp), %r12
jae 0x15c9a
incq %rbx
cmpq %rbx, %r12
jne 0x15bc1
movq -0x68(%rbp), %rdi
movl %r12d, %esi
movq %r13, %rdx
movq %r14, %rcx
callq *-0x50(%rbp)
movl $0x1, %ebx
testl %eax, %eax
jne 0x15d96
movl -0x34(%rbp), %eax
cmpl $0x64, %eax
je 0x15b23
movq -0x30(%rbp), %rdi
callq 0x11437
movl %eax, %r13d
movq $0x0, -0x30(%rbp)
movq -0x58(%rbp), %rbx
decq %rbx
leaq 0x6282e(%rip), %rcx     # 0x78490
movzbl 0x1(%rbx), %eax
incq %rbx
testb $0x1, (%rax,%rcx)
jne 0x15c62
movq -0x40(%rbp), %r15
movq %r15, %rdi
movq %r14, %rsi
callq 0xb752
movq -0x48(%rbp), %r12
movl %r13d, %eax
xorl %r14d, %r14d
jmp 0x15c90
xorl %eax, %eax
movq -0x58(%rbp), %rbx
testl %eax, %eax
je 0x15ab8
jmp 0x15cac
movq -0x40(%rbp), %r15
movb $0x1, 0x51(%r15)
movl $0x64, %eax
movq -0x48(%rbp), %r12
movl %eax, %ebx
movq -0x30(%rbp), %rdi
testq %rdi, %rdi
je 0x15cbc
callq 0x11437
movq %r15, %rdi
movq %r14, %rsi
callq 0xb752
cmpl $0xc0a, %ebx            # imm = 0xC0A
je 0x15cde
cmpb $0x0, 0x51(%r15)
jne 0x15cde
movl %ebx, %eax
andl 0x48(%r15), %eax
jmp 0x15ceb
movq %r15, %rdi
callq 0x28667
movl $0x7, %eax
testq %r12, %r12
je 0x15d1a
testl %eax, %eax
je 0x15d1a
movl %eax, %r13d
movq %r15, %rdi
callq 0xa2a0
testq %rax, %rax
je 0x15d30
movq %rax, %rdi
callq 0xa190
movq %rax, %rbx
andl $0x3fffffff, %ebx       # imm = 0x3FFFFFFF
incq %rbx
jmp 0x15d35
testq %r12, %r12
je 0x15e08
movq $0x0, (%r12)
jmp 0x15e08
movl $0x1, %ebx
movq %rbx, %rdi
callq 0xc0e2
movq %rax, (%r12)
testq %rax, %rax
je 0x15d67
movq %rax, %r14
movq %r15, %rdi
callq 0xa2a0
movq %r14, %rdi
movq %rax, %rsi
movq %rbx, %rdx
callq 0xa320
movl %r13d, %eax
jmp 0x15e08
movl $0x7, 0x44(%r15)
movq 0x140(%r15), %rdi
movl $0x7, %eax
testq %rdi, %rdi
je 0x15e08
movzwl 0x8(%rdi), %eax
testl $0x2460, %eax           # imm = 0x2460
je 0x15dfd
callq 0x2a210
jmp 0x15e03
movq -0x30(%rbp), %rdi
callq 0x11437
movq $0x0, -0x30(%rbp)
movq -0x40(%rbp), %r15
movl $0x4, 0x44(%r15)
movq 0x140(%r15), %rdi
testq %rdi, %rdi
je 0x15def
movzwl 0x8(%rdi), %eax
testl $0x2460, %eax           # imm = 0x2460
movq -0x48(%rbp), %r12
je 0x15e2a
callq 0x2a210
jmp 0x15e30
movq -0x40(%rbp), %r15
movq -0x48(%rbp), %r12
movl -0x34(%rbp), %eax
xorl %r14d, %r14d
jmp 0x15cac
xorl %eax, %eax
jmp 0x15cac
movl $0x4, %ebx
movq -0x48(%rbp), %r12
jmp 0x15cbc
movw $0x1, 0x8(%rdi)
movl $0x7, %eax
movq 0x18(%r15), %rdi
testq %rdi, %rdi
je 0x15e1b
movl %eax, %ebx
callq *0x7b5af(%rip)          # 0x913c8
movl %ebx, %eax
addq $0x58, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movw $0x1, 0x8(%rdi)
movl $0x4, %eax
jmp 0x15cac