// File: /workspace/github_c_makefile_star2_O1/genometools[P]genometools/src/external/sqlite-3.33.0/sqlite3.c
// Function: sqlite3SelectNew
SQLITE_PRIVATE Select *sqlite3SelectNew(
  Parse *pParse,        /* Parsing context */
  ExprList *pEList,     /* which columns to include in the result */
  SrcList *pSrc,        /* the FROM clause -- which tables to scan */
  Expr *pWhere,         /* the WHERE clause */
  ExprList *pGroupBy,   /* the GROUP BY clause */
  Expr *pHaving,        /* the HAVING clause */
  ExprList *pOrderBy,   /* the ORDER BY clause */
  u32 selFlags,         /* Flag parameters, such as SF_Distinct */
  Expr *pLimit          /* LIMIT value.  NULL means not used */
){
  Select *pNew, *pAllocated;
  Select standin;
  pAllocated = pNew = sqlite3DbMallocRawNN(pParse->db, sizeof(*pNew) );
  if( pNew==0 ){
    assert( pParse->db->mallocFailed );
    pNew = &standin;
  }
  if( pEList==0 ){
    pEList = sqlite3ExprListAppend(pParse, 0,
                                   sqlite3Expr(pParse->db,TK_ASTERISK,0));
  }
  pNew->pEList = pEList;
  pNew->op = TK_SELECT;
  pNew->selFlags = selFlags;
  pNew->iLimit = 0;
  pNew->iOffset = 0;
  pNew->selId = ++pParse->nSelect;
  pNew->addrOpenEphm[0] = -1;
  pNew->addrOpenEphm[1] = -1;
  pNew->nSelectRow = 0;
  if( pSrc==0 ) pSrc = sqlite3DbMallocZero(pParse->db, sizeof(*pSrc));
  pNew->pSrc = pSrc;
  pNew->pWhere = pWhere;
  pNew->pGroupBy = pGroupBy;
  pNew->pHaving = pHaving;
  pNew->pOrderBy = pOrderBy;
  pNew->pPrior = 0;
  pNew->pNext = 0;
  pNew->pLimit = pLimit;
  pNew->pWith = 0;
#ifndef SQLITE_OMIT_WINDOWFUNC
  pNew->pWin = 0;
  pNew->pWinDefn = 0;
#endif
  if( pParse->db->mallocFailed ) {
    clearSelect(pParse->db, pNew, pNew!=&standin);
    pAllocated = 0;
  }else{
    assert( pNew->pSrc!=0 || pParse->nErr>0 );
  }
  return pAllocated;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0xa8, %rsp
movq %r9, 0x10(%rsp)
movq %r8, 0x8(%rsp)
movq %rcx, (%rsp)
movq %rdx, %r12
movq %rsi, %r13
movq %rdi, %r14
movq (%rdi), %rdi
movl $0x80, %esi
callq 0x28c518
movq %rax, %rbx
testq %rax, %rax
leaq 0x28(%rsp), %rbp
movq %rax, %r15
cmoveq %rbp, %r15
testq %r13, %r13
jne 0x2bb0ba
movq (%r14), %rdi
leaq 0x18(%rsp), %rdx
movq $0x0, (%rdx)
movl $0x0, 0x8(%rdx)
movl $0xb1, %esi
xorl %ecx, %ecx
callq 0x2bb38d
movq %r14, %rdi
xorl %esi, %esi
movq %rax, %rdx
callq 0x2bb1a3
movq %rax, %r13
movq 0xf0(%rsp), %rdx
testq %rbx, %rbx
movq %rbx, %rax
cmoveq %rbp, %rax
movq 0xe0(%rsp), %rsi
movq %r13, 0x20(%rax)
movb $-0x78, (%r15)
movl 0xe8(%rsp), %ecx
movl %ecx, 0x4(%rax)
movq $0x0, 0x8(%rax)
movl 0x84(%r14), %ecx
incl %ecx
movl %ecx, 0x84(%r14)
movl %ecx, 0x10(%rax)
movq $-0x1, 0x14(%rax)
movw $0x0, 0x2(%rax)
testq %r12, %r12
jne 0x2bb130
movq (%r14), %rdi
movq %rsi, %r13
movl $0x78, %esi
movq %rdx, %r12
callq 0x283569
movq %r13, %rsi
movq %r12, %rdx
movq %rax, %r12
testq %rbx, %rbx
movq %rbx, %rax
cmoveq %rbp, %rax
movq %r12, 0x28(%rax)
movq (%rsp), %rcx
movq %rcx, 0x30(%rax)
movq 0x8(%rsp), %rcx
movq %rcx, 0x38(%rax)
movq 0x10(%rsp), %rcx
movq %rcx, 0x40(%rax)
movq %rsi, 0x48(%rax)
xorps %xmm0, %xmm0
movups %xmm0, 0x50(%rax)
movq %rdx, 0x60(%rax)
movups %xmm0, 0x68(%rax)
movq $0x0, 0x78(%rax)
movq (%r14), %rdi
cmpb $0x0, 0x61(%rdi)
je 0x2bb18e
xorl %edx, %edx
cmpq %rbp, %r15
setne %dl
movq %r15, %rsi
callq 0x2afecb
xorl %ebx, %ebx
movq %rbx, %rax
addq $0xa8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq