// File: /workspace/github_c_makefile_star2_O3/shifengbin[P]bishe/Output/../Persistence/sqlite3.c
// Function: sqlite3SelectDup
SQLITE_PRIVATE Select *sqlite3SelectDup(sqlite3 *db, Select *p, int flags){
  Select *pNew, *pPrior;
  if( p==0 ) return 0;
  pNew = sqlite3DbMallocRaw(db, sizeof(*p) );
  if( pNew==0 ) return 0;
  pNew->pEList = sqlite3ExprListDup(db, p->pEList, flags);
  pNew->pSrc = sqlite3SrcListDup(db, p->pSrc, flags);
  pNew->pWhere = sqlite3ExprDup(db, p->pWhere, flags);
  pNew->pGroupBy = sqlite3ExprListDup(db, p->pGroupBy, flags);
  pNew->pHaving = sqlite3ExprDup(db, p->pHaving, flags);
  pNew->pOrderBy = sqlite3ExprListDup(db, p->pOrderBy, flags);
  pNew->op = p->op;
  pNew->pPrior = pPrior = sqlite3SelectDup(db, p->pPrior, flags);
  if( pPrior ) pPrior->pNext = pNew;
  pNew->pNext = 0;
  pNew->pLimit = sqlite3ExprDup(db, p->pLimit, flags);
  pNew->pOffset = sqlite3ExprDup(db, p->pOffset, flags);
  pNew->iLimit = 0;
  pNew->iOffset = 0;
  pNew->selFlags = p->selFlags & ~SF_UsesEphemeral;
  pNew->addrOpenEphm[0] = -1;
  pNew->addrOpenEphm[1] = -1;
  pNew->nSelectRow = p->nSelectRow;
  pNew->pWith = withDup(db, p->pWith);
  sqlite3SelectSetName(pNew, p->zSelName);
  return pNew;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
testq %rsi, %rsi
je 0x53d05
movl %edx, %r12d
movq %rsi, %r15
movq %rdi, %r14
movl $0x78, %esi
callq 0x145aa
testq %rax, %rax
je 0x53d05
movq %rax, %rbx
movq (%r15), %rsi
movq %r14, %rdi
movl %r12d, %edx
callq 0x53d22
movq %rax, (%rbx)
movq 0x28(%r15), %rsi
movq %r14, %rdi
movl %r12d, %edx
callq 0x53eb8
movq %rax, 0x28(%rbx)
movq 0x30(%r15), %rsi
movq %r14, %rdi
movl %r12d, %edx
xorl %ecx, %ecx
callq 0x5388d
movq %rax, 0x30(%rbx)
movq 0x38(%r15), %rsi
movq %r14, %rdi
movl %r12d, %edx
callq 0x53d22
movq %rax, 0x38(%rbx)
movq 0x40(%r15), %rsi
movq %r14, %rdi
movl %r12d, %edx
xorl %ecx, %ecx
callq 0x5388d
movq %rax, 0x40(%rbx)
movq 0x48(%r15), %rsi
movq %r14, %rdi
movl %r12d, %edx
callq 0x53d22
movq %rax, 0x48(%rbx)
movb 0x8(%r15), %al
movb %al, 0x8(%rbx)
movq 0x50(%r15), %rsi
movq %r14, %rdi
movl %r12d, %edx
callq 0x53b46
movq %rax, 0x50(%rbx)
testq %rax, %rax
je 0x53c13
movq %rbx, 0x58(%rax)
xorl %r13d, %r13d
movq %r13, 0x58(%rbx)
movq 0x60(%r15), %rsi
movq %r14, %rdi
movl %r12d, %edx
xorl %ecx, %ecx
callq 0x5388d
movq %rax, 0x60(%rbx)
movq 0x68(%r15), %rsi
movq %r14, %rdi
movl %r12d, %edx
xorl %ecx, %ecx
callq 0x5388d
movq %rax, 0x68(%rbx)
movq %r13, 0xc(%rbx)
movzwl 0xa(%r15), %eax
andl $-0x11, %eax
movw %ax, 0xa(%rbx)
movq $-0x1, 0x14(%rbx)
movq 0x20(%r15), %rax
movq %rax, 0x20(%rbx)
movq 0x70(%r15), %r12
testq %r12, %r12
je 0x53d0c
movl (%r12), %eax
shll $0x5, %eax
orl $0x10, %eax
movslq %eax, %r15
movq %r14, %rdi
movq %r15, %rsi
callq 0x145aa
testq %rax, %rax
je 0x53d09
movq %rax, %r13
movq %rax, %rdi
xorl %esi, %esi
movq %r15, %rdx
callq 0xa220
movl (%r12), %eax
movl %eax, (%r13)
testl %eax, %eax
jle 0x53d0c
movq %rbx, -0x30(%rbp)
movl $0x20, %r15d
xorl %ebx, %ebx
movq (%r12,%r15), %rsi
movq %r14, %rdi
xorl %edx, %edx
callq 0x53b46
movq %rax, (%r13,%r15)
movq -0x8(%r12,%r15), %rsi
movq %r14, %rdi
xorl %edx, %edx
callq 0x53d22
movq %rax, -0x8(%r13,%r15)
movq -0x10(%r12,%r15), %rsi
movq %r14, %rdi
callq 0x12d65
movq %rax, -0x10(%r13,%r15)
incq %rbx
movslq (%r12), %rax
addq $0x20, %r15
cmpq %rax, %rbx
jl 0x53cb6
movq -0x30(%rbp), %rbx
jmp 0x53d0c
xorl %ebx, %ebx
jmp 0x53d10
xorl %r13d, %r13d
movq %r13, 0x70(%rbx)
movq %rbx, %rax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq