// File: /workspace/github_c_makefile_star2_O0/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
movq %rsp, %rbp
subq $0x70, %rsp
movq %rdi, -0x10(%rbp)
movq %rsi, -0x18(%rbp)
movq %rdx, -0x20(%rbp)
movq %rcx, -0x28(%rbp)
movq %r8, -0x30(%rbp)
movq %r9, -0x38(%rbp)
movq -0x20(%rbp), %rax
movq $0x0, (%rax)
cmpq $0x0, -0x30(%rbp)
je 0x3ce0fc
movq -0x30(%rbp), %rax
movl $0x0, (%rax)
cmpq $0x0, -0x28(%rbp)
je 0x3ce10d
movq -0x28(%rbp), %rax
movl $0x0, (%rax)
cmpq $0x0, -0x38(%rbp)
je 0x3ce11f
movq -0x38(%rbp), %rax
movq $0x0, (%rax)
movq $0x0, -0x60(%rbp)
movl $0x0, -0x54(%rbp)
movl $0x0, -0x50(%rbp)
movl $0x1, -0x4c(%rbp)
movl $0x14, -0x58(%rbp)
movl $0x0, -0x48(%rbp)
movl -0x58(%rbp), %eax
movl %eax, %edi
shlq $0x3, %rdi
callq 0x3c07c0
movq %rax, -0x68(%rbp)
cmpq $0x0, -0x68(%rbp)
jne 0x3ce17a
movq -0x10(%rbp), %rax
movl $0x7, 0x50(%rax)
movl $0x7, -0x4(%rbp)
jmp 0x3ce2c8
movq -0x68(%rbp), %rax
movq $0x0, (%rax)
movq -0x10(%rbp), %rdi
movq -0x18(%rbp), %rsi
movq -0x38(%rbp), %r8
leaq 0x148(%rip), %rdx       # 0x3ce2e0
leaq -0x68(%rbp), %rcx
callq 0x3ccf40
movl %eax, -0x3c(%rbp)
movl -0x4c(%rbp), %eax
movl %eax, %ecx
movq -0x68(%rbp), %rax
movq %rcx, (%rax)
movl -0x3c(%rbp), %eax
andl $0xff, %eax
cmpl $0x4, %eax
jne 0x3ce21e
movq -0x68(%rbp), %rdi
addq $0x8, %rdi
callq 0x3ce520
cmpq $0x0, -0x60(%rbp)
je 0x3ce209
cmpq $0x0, -0x38(%rbp)
je 0x3ce200
movq -0x38(%rbp), %rax
movq (%rax), %rdi
callq 0x3c0800
movq -0x60(%rbp), %rsi
leaq 0x1cde32(%rip), %rdi    # 0x59c021
movb $0x0, %al
callq 0x3c3780
movq %rax, %rcx
movq -0x38(%rbp), %rax
movq %rcx, (%rax)
movq -0x60(%rbp), %rdi
callq 0x3c0800
movl -0x48(%rbp), %ecx
movq -0x10(%rbp), %rax
movl %ecx, 0x50(%rax)
movl -0x48(%rbp), %eax
movl %eax, -0x4(%rbp)
jmp 0x3ce2c8
movq -0x60(%rbp), %rdi
callq 0x3c0800
cmpl $0x0, -0x3c(%rbp)
je 0x3ce245
movq -0x68(%rbp), %rdi
addq $0x8, %rdi
callq 0x3ce520
movl -0x3c(%rbp), %eax
movl %eax, -0x4(%rbp)
jmp 0x3ce2c8
movl -0x58(%rbp), %eax
cmpl -0x4c(%rbp), %eax
jbe 0x3ce293
movq -0x68(%rbp), %rdi
movl -0x4c(%rbp), %eax
movl %eax, %esi
shlq $0x3, %rsi
callq 0x3c0910
movq %rax, -0x70(%rbp)
cmpq $0x0, -0x70(%rbp)
jne 0x3ce28b
movq -0x68(%rbp), %rdi
addq $0x8, %rdi
callq 0x3ce520
movq -0x10(%rbp), %rax
movl $0x7, 0x50(%rax)
movl $0x7, -0x4(%rbp)
jmp 0x3ce2c8
movq -0x70(%rbp), %rax
movq %rax, -0x68(%rbp)
movq -0x68(%rbp), %rcx
addq $0x8, %rcx
movq -0x20(%rbp), %rax
movq %rcx, (%rax)
cmpq $0x0, -0x30(%rbp)
je 0x3ce2b2
movl -0x50(%rbp), %ecx
movq -0x30(%rbp), %rax
movl %ecx, (%rax)
cmpq $0x0, -0x28(%rbp)
je 0x3ce2c2
movl -0x54(%rbp), %ecx
movq -0x28(%rbp), %rax
movl %ecx, (%rax)
movl -0x3c(%rbp), %eax
movl %eax, -0x4(%rbp)
movl -0x4(%rbp), %eax
addq $0x70, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)