// File: /workspace/github_c_makefile_star2_O0/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
movq %rsp, %rbp
subq $0xd0, %rsp
movq 0x20(%rbp), %rax
movl 0x18(%rbp), %eax
movq 0x10(%rbp), %rax
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq %rdx, -0x18(%rbp)
movq %rcx, -0x20(%rbp)
movq %r8, -0x28(%rbp)
movq %r9, -0x30(%rbp)
movq -0x8(%rbp), %rax
movq (%rax), %rdi
movl $0x80, %esi
callq 0x3d62a0
movq %rax, -0x38(%rbp)
movq %rax, -0x40(%rbp)
cmpq $0x0, -0x38(%rbp)
jne 0x41d229
leaq -0xc0(%rbp), %rax
movq %rax, -0x38(%rbp)
cmpq $0x0, -0x10(%rbp)
jne 0x41d267
movq -0x8(%rbp), %rax
movq %rax, -0xc8(%rbp)
movq -0x8(%rbp), %rax
movq (%rax), %rdi
movl $0xb1, %esi
xorl %eax, %eax
movl %eax, %edx
callq 0x41d620
movq -0xc8(%rbp), %rdi
movq %rax, %rdx
xorl %eax, %eax
movl %eax, %esi
callq 0x41d3c0
movq %rax, -0x10(%rbp)
movq -0x10(%rbp), %rcx
movq -0x38(%rbp), %rax
movq %rcx, 0x20(%rax)
movq -0x38(%rbp), %rax
movb $-0x78, (%rax)
movl 0x18(%rbp), %ecx
movq -0x38(%rbp), %rax
movl %ecx, 0x4(%rax)
movq -0x38(%rbp), %rax
movl $0x0, 0x8(%rax)
movq -0x38(%rbp), %rax
movl $0x0, 0xc(%rax)
movq -0x8(%rbp), %rax
movl 0x84(%rax), %ecx
addl $0x1, %ecx
movl %ecx, 0x84(%rax)
movq -0x38(%rbp), %rax
movl %ecx, 0x10(%rax)
movq -0x38(%rbp), %rax
movl $0xffffffff, 0x14(%rax) # imm = 0xFFFFFFFF
movq -0x38(%rbp), %rax
movl $0xffffffff, 0x18(%rax) # imm = 0xFFFFFFFF
movq -0x38(%rbp), %rax
movw $0x0, 0x2(%rax)
cmpq $0x0, -0x18(%rbp)
jne 0x41d2f0
movq -0x8(%rbp), %rax
movq (%rax), %rdi
movl $0x78, %esi
callq 0x3c9520
movq %rax, -0x18(%rbp)
movq -0x18(%rbp), %rcx
movq -0x38(%rbp), %rax
movq %rcx, 0x28(%rax)
movq -0x20(%rbp), %rcx
movq -0x38(%rbp), %rax
movq %rcx, 0x30(%rax)
movq -0x28(%rbp), %rcx
movq -0x38(%rbp), %rax
movq %rcx, 0x38(%rax)
movq -0x30(%rbp), %rcx
movq -0x38(%rbp), %rax
movq %rcx, 0x40(%rax)
movq 0x10(%rbp), %rcx
movq -0x38(%rbp), %rax
movq %rcx, 0x48(%rax)
movq -0x38(%rbp), %rax
movq $0x0, 0x50(%rax)
movq -0x38(%rbp), %rax
movq $0x0, 0x58(%rax)
movq 0x20(%rbp), %rcx
movq -0x38(%rbp), %rax
movq %rcx, 0x60(%rax)
movq -0x38(%rbp), %rax
movq $0x0, 0x68(%rax)
movq -0x38(%rbp), %rax
movq $0x0, 0x70(%rax)
movq -0x38(%rbp), %rax
movq $0x0, 0x78(%rax)
movq -0x8(%rbp), %rax
movq (%rax), %rax
cmpb $0x0, 0x61(%rax)
je 0x41d3ae
movq -0x8(%rbp), %rax
movq (%rax), %rdi
movq -0x38(%rbp), %rsi
leaq -0xc0(%rbp), %rax
cmpq %rax, -0x38(%rbp)
setne %al
andb $0x1, %al
movzbl %al, %edx
callq 0x40c8c0
movq $0x0, -0x40(%rbp)
jmp 0x41d3b0
jmp 0x41d3b0
movq -0x40(%rbp), %rax
addq $0xd0, %rsp
popq %rbp
retq
nopl (%rax)