// File: /workspace/github_c_makefile_star2_O1/genometools[P]genometools/src/external/sqlite-3.33.0/sqlite3.c
// Function: sqlite3_get_table
SQLITE_API int sqlite3_get_table(
  sqlite3 *db,                /* The database on which the SQL executes */
  const char *zSql,           /* The SQL to be executed */
  char ***pazResult,          /* Write the result table here */
  int *pnRow,                 /* Write the number of rows in the result here */
  int *pnColumn,              /* Write the number of columns of result here */
  char **pzErrMsg             /* Write error messages here */
){
  int rc;
  TabResult res;

#ifdef SQLITE_ENABLE_API_ARMOR
  if( !sqlite3SafetyCheckOk(db) || pazResult==0 ) return SQLITE_MISUSE_BKPT;
#endif
  *pazResult = 0;
  if( pnColumn ) *pnColumn = 0;
  if( pnRow ) *pnRow = 0;
  if( pzErrMsg ) *pzErrMsg = 0;
  res.zErrMsg = 0;
  res.nRow = 0;
  res.nColumn = 0;
  res.nData = 1;
  res.nAlloc = 20;
  res.rc = SQLITE_OK;
  res.azResult = sqlite3_malloc64(sizeof(char*)*res.nAlloc );
  if( res.azResult==0 ){
     db->errCode = SQLITE_NOMEM;
     return SQLITE_NOMEM_BKPT;
  }
  res.azResult[0] = 0;
  rc = sqlite3_exec(db, zSql, sqlite3_get_table_cb, &res, pzErrMsg);
  assert( sizeof(res.azResult[0])>= sizeof(res.nData) );
  res.azResult[0] = SQLITE_INT_TO_PTR(res.nData);
  if( (rc&0xff)==SQLITE_ABORT ){
    sqlite3_free_table(&res.azResult[1]);
    if( res.zErrMsg ){
      if( pzErrMsg ){
        sqlite3_free(*pzErrMsg);
        *pzErrMsg = sqlite3_mprintf("%s",res.zErrMsg);
      }
      sqlite3_free(res.zErrMsg);
    }
    db->errCode = res.rc;  /* Assume 32-bit assignment is atomic */
    return res.rc;
  }
  sqlite3_free(res.zErrMsg);
  if( rc!=SQLITE_OK ){
    sqlite3_free_table(&res.azResult[1]);
    return rc;
  }
  if( res.nAlloc>res.nData ){
    char **azNew;
    azNew = sqlite3Realloc( res.azResult, sizeof(char*)*res.nData );
    if( azNew==0 ){
      sqlite3_free_table(&res.azResult[1]);
      db->errCode = SQLITE_NOMEM;
      return SQLITE_NOMEM_BKPT;
    }
    res.azResult = azNew;
  }
  *pazResult = &res.azResult[1];
  if( pnColumn ) *pnColumn = res.nColumn;
  if( pnRow ) *pnRow = res.nRow;
  return rc;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x38, %rsp
movq %r9, %r13
movq %r8, %r15
movq %rcx, %r14
movq %rdx, %r12
movq %rsi, %rbp
movq %rdi, %rbx
movq $0x0, (%rdx)
testq %r8, %r8
je 0x286e53
movl $0x0, (%r15)
testq %r14, %r14
je 0x286e5f
movl $0x0, (%r14)
testq %r13, %r13
je 0x286e6c
movq $0x0, (%r13)
movq $0x0, 0x10(%rsp)
movaps 0x158124(%rip), %xmm0   # 0x3defa0
movups %xmm0, 0x18(%rsp)
movl $0x0, 0x28(%rsp)
callq 0x27bed9
testl %eax, %eax
je 0x286e96
xorl %eax, %eax
jmp 0x286ea0
movl $0xa0, %edi
callq 0x27c381
movq %rax, 0x8(%rsp)
testq %rax, %rax
je 0x286f3e
movq $0x0, (%rax)
leaq 0x12f(%rip), %rdx       # 0x286feb
movq %rbx, %rdi
leaq 0x8(%rsp), %rbx
movq %rdi, 0x30(%rsp)
movq %rbp, %rsi
movq %rbx, %rcx
movq %r13, %r8
callq 0x285f46
movl %eax, %ebp
movl 0x1c(%rbx), %eax
movq (%rbx), %rcx
movq %rax, (%rcx)
cmpb $0x4, %bpl
jne 0x286f4f
movq 0x8(%rsp), %rdi
addq $0x8, %rdi
callq 0x28714b
cmpq $0x0, 0x10(%rsp)
movq 0x30(%rsp), %rbx
je 0x286f32
testq %r13, %r13
je 0x286f28
movq (%r13), %rdi
callq 0x27c490
movq 0x10(%rsp), %rsi
leaq 0x14b2b4(%rip), %rdi    # 0x3d21d1
xorl %eax, %eax
callq 0x27e482
movq %rax, (%r13)
movq 0x10(%rsp), %rdi
callq 0x27c490
movl 0x28(%rsp), %ebp
movl %ebp, 0x50(%rbx)
jmp 0x286fda
movl $0x7, 0x50(%rbx)
movl $0x7, %ebp
jmp 0x286fda
movq 0x10(%rsp), %rdi
callq 0x27c490
testl %ebp, %ebp
je 0x286f6d
movq 0x8(%rsp), %rdi
addq $0x8, %rdi
callq 0x28714b
jmp 0x286fda
movl 0x24(%rsp), %esi
cmpl %esi, 0x18(%rsp)
jbe 0x286fb3
movq 0x8(%rsp), %rdi
shlq $0x3, %rsi
callq 0x27c4f3
movq %rax, %r13
testq %rax, %rax
je 0x286f94
movq %r13, 0x8(%rsp)
jmp 0x286fae
movq 0x8(%rsp), %rdi
addq $0x8, %rdi
callq 0x28714b
movq 0x30(%rsp), %rax
movl $0x7, 0x50(%rax)
testq %r13, %r13
je 0x286f45
movq 0x8(%rsp), %rax
addq $0x8, %rax
movq %rax, (%r12)
testq %r15, %r15
je 0x286fcc
movl 0x20(%rsp), %eax
movl %eax, (%r15)
xorl %ebp, %ebp
testq %r14, %r14
je 0x286fda
movl 0x1c(%rsp), %eax
movl %eax, (%r14)
movl %ebp, %eax
addq $0x38, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq