// File: /workspace/github_c_makefile_star2_O1/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 $0x68, %rsp
movq %r8, %r14
movq %rcx, -0x78(%rbp)
movq %rdx, -0x68(%rbp)
movq %rsi, %rbx
movq %rdi, %r15
movq $0x0, -0x30(%rbp)
callq 0x15e93
testl %eax, %eax
je 0x15a42
movq %r14, -0x58(%rbp)
testq %rbx, %rbx
leaq 0x6a68a(%rip), %r14     # 0x80091
cmovneq %rbx, %r14
movq 0x18(%r15), %rdi
testq %rdi, %rdi
movq %r15, %rbx
je 0x15a1d
callq *0x7d98b(%rip)          # 0x933a8
movl $0x0, 0x44(%rbx)
movq 0x140(%rbx), %rdi
testq %rdi, %rdi
je 0x15a71
movzwl 0x8(%rdi), %eax
testl $0x2460, %eax           # imm = 0x2460
je 0x15a6b
callq 0x2a646
jmp 0x15a71
leaq 0x6ba49(%rip), %rsi     # 0x81492
leaq 0x6772d(%rip), %rcx     # 0x7d17d
movl $0x15, %edi
movl $0x199c1, %edx          # imm = 0x199C1
xorl %eax, %eax
callq 0xa4b0
movl $0x15, %eax
jmp 0x15e48
movw $0x1, 0x8(%rdi)
movq $0x0, -0x38(%rbp)
leaq -0x50(%rbp), %r12
movq %rbx, -0x48(%rbp)
cmpb $0x0, (%r14)
je 0x15d67
movq $0x0, -0x30(%rbp)
movq %r12, (%rsp)
movq %rbx, %rdi
movq %r14, %rsi
movl $0xffffffff, %edx       # imm = 0xFFFFFFFF
movl $0x1, %ecx
xorl %r8d, %r8d
leaq -0x30(%rbp), %r9
callq 0x166c6
movl $0x2, %r13d
testl %eax, %eax
jne 0x15d52
movq -0x30(%rbp), %rax
testq %rax, %rax
je 0x15d42
movzwl 0x88(%rax), %eax
movq %rax, -0x70(%rbp)
shll $0x4, %eax
incq %rax
movq %rax, -0x80(%rbp)
xorl %r12d, %r12d
xorl %r15d, %r15d
leaq 0x64950(%rip), %rbx     # 0x7a440
movq -0x30(%rbp), %rdi
callq 0xa2d0
movl %eax, %ecx
cmpq $0x0, -0x68(%rbp)
je 0x15c93
cmpl $0x64, %ecx
jne 0x15c0d
movq %r15, -0x60(%rbp)
testl %r12d, %r12d
movl %ecx, -0x3c(%rbp)
movq -0x70(%rbp), %r13
movq -0x80(%rbp), %r15
je 0x15c2a
cmpl $0x64, %ecx
movq -0x60(%rbp), %r15
jne 0x15b98
movq -0x38(%rbp), %rax
leaq (%rax,%r13,8), %r15
testq %r13, %r13
je 0x15b98
xorl %r12d, %r12d
movq -0x30(%rbp), %rdi
movl %r12d, %esi
callq 0xa390
movq %rax, (%r15,%r12,8)
testq %rax, %rax
jne 0x15b90
movq -0x30(%rbp), %r13
movq %r13, %rdi
movl %r12d, %esi
callq 0x12fa9
movq %r15, %rbx
movl 0x8(%rax), %r15d
movq %r13, %rdi
movq -0x70(%rbp), %r13
callq 0x1304a
movl $0xaaaaaaaa, %eax       # imm = 0xAAAAAAAA
btl %r15d, %eax
movq %rbx, %r15
leaq 0x648b6(%rip), %rbx     # 0x7a440
jae 0x15d03
incq %r12
cmpq %r12, %r13
jne 0x15b40
movq -0x78(%rbp), %rdi
movl %r13d, %esi
movq %r15, %rdx
movq -0x38(%rbp), %rcx
callq *-0x68(%rbp)
testl %eax, %eax
je 0x15c8a
movq -0x30(%rbp), %rdi
callq 0x113bc
movq $0x0, -0x30(%rbp)
movq -0x48(%rbp), %rax
movl $0x4, 0x44(%rax)
movq 0x140(%rax), %rdi
movl $0x6, %r13d
movl $0x1, %r12d
movl $0x4, %eax
testq %rdi, %rdi
je 0x15cce
movzwl 0x8(%rdi), %ecx
testl $0x2460, %ecx           # imm = 0x2460
je 0x15cf3
callq 0x2a646
movl $0x4, %eax
jmp 0x15cce
movl %ecx, %eax
xorl $0x65, %eax
orl %r12d, %eax
jne 0x15c93
movq -0x48(%rbp), %rax
testb $0x1, 0x2d(%rax)
jne 0x15b0f
xorl %r12d, %r12d
jmp 0x15c93
movq -0x48(%rbp), %rdi
movq %r15, %rsi
callq 0x144ee
movq %rax, -0x38(%rbp)
testq %rax, %rax
je 0x15cd9
movq -0x38(%rbp), %rdi
xorl %esi, %esi
movq %r15, %rdx
callq 0xa210
testq %r13, %r13
je 0x15cfb
movq -0x30(%rbp), %r12
movq %r13, %r15
xorl %r13d, %r13d
movq %r12, %rdi
movl %r13d, %esi
callq 0xa130
movq -0x38(%rbp), %rcx
movq %rax, (%rcx,%r13,8)
incq %r13
cmpq %r13, %r15
jne 0x15c64
movl -0x3c(%rbp), %ecx
movq %r15, %r13
jmp 0x15b27
movl $0x1, %r12d
movl -0x3c(%rbp), %ecx
cmpl $0x64, %ecx
jne 0x15ca2
xorl %r13d, %r13d
movl $0x64, %eax
jmp 0x15cce
movq -0x30(%rbp), %rdi
callq 0x113bc
movq $0x0, -0x30(%rbp)
movq -0x50(%rbp), %r14
decq %r14
movzbl 0x1(%r14), %ecx
incq %r14
testb $0x1, (%rcx,%rbx)
jne 0x15cba
movl $0x5, %r13d
testl %r13d, %r13d
je 0x15af0
jmp 0x15d19
movl $0x6, %r13d
movq $0x0, -0x38(%rbp)
xorl %r12d, %r12d
movl -0x3c(%rbp), %eax
movq -0x60(%rbp), %r15
jmp 0x15cce
movw $0x1, 0x8(%rdi)
jmp 0x15cce
movl -0x3c(%rbp), %ecx
jmp 0x15b27
movq -0x48(%rbp), %rax
movb $0x1, 0x51(%rax)
movl $0x6, %r13d
movl $0x1, %r12d
jmp 0x15c9b
cmpl $0x5, %r13d
jne 0x15d4a
movq -0x48(%rbp), %rbx
movq %rbx, %rdi
movq -0x38(%rbp), %rsi
movl %eax, %r15d
callq 0xb6df
movl %r15d, %eax
movq $0x0, -0x38(%rbp)
xorl %r13d, %r13d
jmp 0x15d4e
xorl %eax, %eax
movq -0x50(%rbp), %r14
jmp 0x15d52
movq -0x48(%rbp), %rbx
leaq -0x50(%rbp), %r12
testl %r13d, %r13d
je 0x15d5d
cmpl $0x2, %r13d
jne 0x15d6b
testl %eax, %eax
je 0x15a81
jmp 0x15d75
xorl %eax, %eax
jmp 0x15d75
cmpl $0x6, %r13d
jne 0x15df7
movl %eax, %r14d
movq -0x30(%rbp), %rdi
testq %rdi, %rdi
je 0x15d86
callq 0x113bc
movq %rbx, %rdi
movq -0x38(%rbp), %rsi
callq 0xb6df
movl %r14d, %eax
cmpl $0xc0a, %r14d           # imm = 0xC0A
movq -0x58(%rbp), %r14
je 0x15dad
cmpb $0x0, 0x51(%rbx)
jne 0x15dad
andl 0x48(%rbx), %eax
jmp 0x15dba
movq %rbx, %rdi
callq 0x28aa8
movl $0x7, %eax
testq %r14, %r14
je 0x15de9
testl %eax, %eax
je 0x15de9
movl %eax, %r12d
movq %rbx, %rdi
callq 0xa290
testq %rax, %rax
je 0x15df9
movq %rax, %rdi
callq 0xa190
movq %rax, %rbx
andl $0x3fffffff, %ebx       # imm = 0x3FFFFFFF
incq %rbx
jmp 0x15dfe
testq %r14, %r14
je 0x15e35
movq $0x0, (%r14)
jmp 0x15e35
jmp 0x15e48
movl $0x1, %ebx
movq %rbx, %rdi
callq 0xbf9b
movq %rax, %r14
movq -0x58(%rbp), %rax
movq %r14, (%rax)
testq %r14, %r14
je 0x15e57
movq -0x48(%rbp), %r15
movq %r15, %rdi
callq 0xa290
movq %r14, %rdi
movq %rax, %rsi
movq %rbx, %rdx
movq %r15, %rbx
callq 0xa310
movl %r12d, %eax
movq 0x18(%rbx), %rdi
testq %rdi, %rdi
je 0x15e48
movl %eax, %ebx
callq *0x7d572(%rip)          # 0x933b8
movl %ebx, %eax
addq $0x68, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movq -0x48(%rbp), %rbx
movl $0x7, 0x44(%rbx)
movq 0x140(%rbx), %rdi
movl $0x7, %eax
testq %rdi, %rdi
je 0x15e35
movzwl 0x8(%rdi), %ecx
testl $0x2460, %ecx           # imm = 0x2460
je 0x15e8b
callq 0x2a646
movl $0x7, %eax
jmp 0x15e35
movw $0x1, 0x8(%rdi)
jmp 0x15e35