// File: /workspace/github_c_makefile_star2_O1/genometools[P]genometools/src/external/sqlite-3.33.0/sqlite3.c
// Function: sqlite3SrcListDup
SQLITE_PRIVATE SrcList *sqlite3SrcListDup(sqlite3 *db, SrcList *p, int flags){
  SrcList *pNew;
  int i;
  int nByte;
  assert( db!=0 );
  if( p==0 ) return 0;
  nByte = sizeof(*p) + (p->nSrc>0 ? sizeof(p->a[0]) * (p->nSrc-1) : 0);
  pNew = sqlite3DbMallocRawNN(db, nByte );
  if( pNew==0 ) return 0;
  pNew->nSrc = pNew->nAlloc = p->nSrc;
  for(i=0; i<p->nSrc; i++){
    struct SrcList_item *pNewItem = &pNew->a[i];
    struct SrcList_item *pOldItem = &p->a[i];
    Table *pTab;
    pNewItem->pSchema = pOldItem->pSchema;
    pNewItem->zDatabase = sqlite3DbStrDup(db, pOldItem->zDatabase);
    pNewItem->zName = sqlite3DbStrDup(db, pOldItem->zName);
    pNewItem->zAlias = sqlite3DbStrDup(db, pOldItem->zAlias);
    pNewItem->fg = pOldItem->fg;
    pNewItem->iCursor = pOldItem->iCursor;
    pNewItem->addrFillSub = pOldItem->addrFillSub;
    pNewItem->regReturn = pOldItem->regReturn;
    if( pNewItem->fg.isIndexedBy ){
      pNewItem->u1.zIndexedBy = sqlite3DbStrDup(db, pOldItem->u1.zIndexedBy);
    }
    pNewItem->pIBIndex = pOldItem->pIBIndex;
    if( pNewItem->fg.isTabFunc ){
      pNewItem->u1.pFuncArg =
          sqlite3ExprListDup(db, pOldItem->u1.pFuncArg, flags);
    }
    pTab = pNewItem->pTab = pOldItem->pTab;
    if( pTab ){
      pTab->nTabRef++;
    }
    pNewItem->pSelect = sqlite3SelectDup(db, pOldItem->pSelect, flags);
    pNewItem->pOn = sqlite3ExprDup(db, pOldItem->pOn, flags);
    pNewItem->pUsing = sqlite3IdListDup(db, pOldItem->pUsing);
    pNewItem->colUsed = pOldItem->colUsed;
  }
  return pNew;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
testq %rsi, %rsi
je 0x2cc999
movl %edx, %ebx
movq %rsi, %r14
movq %rdi, %r15
movl (%rsi), %eax
imull $0x70, %eax, %ecx
orl $0x8, %ecx
testl %eax, %eax
movl $0x78, %eax
cmovgl %ecx, %eax
movslq %eax, %rsi
callq 0x28c518
testq %rax, %rax
je 0x2cc999
movq %rax, %r12
movl (%r14), %eax
movl %eax, 0x4(%r12)
movl %eax, (%r12)
cmpl $0x0, (%r14)
jle 0x2cc99c
movl $0x70, %r13d
xorl %ebp, %ebp
movq -0x68(%r14,%r13), %rax
movq %rax, -0x68(%r12,%r13)
movq -0x60(%r14,%r13), %rsi
movq %r15, %rdi
callq 0x283365
movq %rax, -0x60(%r12,%r13)
movq -0x58(%r14,%r13), %rsi
movq %r15, %rdi
callq 0x283365
movq %rax, -0x58(%r12,%r13)
movq -0x50(%r14,%r13), %rsi
movq %r15, %rdi
callq 0x283365
movq %rax, -0x50(%r12,%r13)
movl -0x2c(%r14,%r13), %eax
movl %eax, -0x2c(%r12,%r13)
movl -0x28(%r14,%r13), %eax
movl %eax, -0x28(%r12,%r13)
movl -0x38(%r14,%r13), %eax
movl %eax, -0x38(%r12,%r13)
movl -0x34(%r14,%r13), %eax
movl %eax, -0x34(%r12,%r13)
testb $0x2, -0x2b(%r12,%r13)
je 0x2cc8ff
movq -0x8(%r14,%r13), %rsi
movq %r15, %rdi
callq 0x283365
movq %rax, -0x8(%r12,%r13)
movq (%r14,%r13), %rax
movq %rax, (%r12,%r13)
testb $0x4, -0x2b(%r12,%r13)
je 0x2cc923
movq -0x8(%r14,%r13), %rsi
movq %r15, %rdi
movl %ebx, %edx
callq 0x2cc525
movq %rax, -0x8(%r12,%r13)
movq -0x48(%r14,%r13), %rax
movq %rax, -0x48(%r12,%r13)
testq %rax, %rax
je 0x2cc935
incl 0x3c(%rax)
movq -0x40(%r14,%r13), %rsi
movq %r15, %rdi
movl %ebx, %edx
callq 0x2cc285
movq %rax, -0x40(%r12,%r13)
movq -0x20(%r14,%r13), %rsi
testq %rsi, %rsi
je 0x2cc961
movq %r15, %rdi
movl %ebx, %edx
xorl %ecx, %ecx
callq 0x2cbf97
jmp 0x2cc963
xorl %eax, %eax
movq %rax, -0x20(%r12,%r13)
movq -0x18(%r14,%r13), %rsi
movq %r15, %rdi
callq 0x2cc9ae
movq %rax, -0x18(%r12,%r13)
movq -0x10(%r14,%r13), %rax
movq %rax, -0x10(%r12,%r13)
incq %rbp
movslq (%r14), %rax
addq $0x70, %r13
cmpq %rax, %rbp
jl 0x2cc87d
jmp 0x2cc99c
xorl %r12d, %r12d
movq %r12, %rax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq