// File: /workspace/github_c_makefile_star2_O2/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 0x26a153
movl %edx, %ebx
movq %rsi, %r14
movq %rdi, %r15
movl (%rsi), %eax
imull $0x70, %eax, %ecx
orl $0x8, %ecx
testl %eax, %eax
pushq $0x78
popq %rax
cmovgl %ecx, %eax
movslq %eax, %rsi
callq 0x22d205
testq %rax, %rax
je 0x26a153
movq %rax, %r12
movl (%r14), %eax
movl %eax, 0x4(%r12)
movl %eax, (%r12)
pushq $0x70
popq %r13
xorl %ebp, %ebp
cltq
cmpq %rax, %rbp
jge 0x26a156
movq -0x68(%r14,%r13), %rax
movq %rax, -0x68(%r12,%r13)
movq -0x60(%r14,%r13), %rsi
movq %r15, %rdi
callq 0x22572a
movq %rax, -0x60(%r12,%r13)
movq -0x58(%r14,%r13), %rsi
movq %r15, %rdi
callq 0x22572a
movq %rax, -0x58(%r12,%r13)
movq -0x50(%r14,%r13), %rsi
movq %r15, %rdi
callq 0x22572a
movq %rax, -0x50(%r12,%r13)
movl -0x2c(%r14,%r13), %eax
movl %eax, -0x2c(%r12,%r13)
movl -0x28(%r14,%r13), %ecx
movl %ecx, -0x28(%r12,%r13)
movq -0x38(%r14,%r13), %rcx
movq %rcx, -0x38(%r12,%r13)
shrl $0x8, %eax
testb $0x2, %al
je 0x26a0ce
movq -0x8(%r14,%r13), %rsi
movq %r15, %rdi
callq 0x22572a
movq %rax, -0x8(%r12,%r13)
movb -0x2b(%r12,%r13), %al
movq (%r14,%r13), %rcx
movq %rcx, (%r12,%r13)
testb $0x4, %al
je 0x26a0ee
movq -0x8(%r14,%r13), %rsi
movq %r15, %rdi
movl %ebx, %edx
callq 0x269d84
movq %rax, -0x8(%r12,%r13)
movq -0x48(%r14,%r13), %rax
movq %rax, -0x48(%r12,%r13)
testq %rax, %rax
je 0x26a100
incl 0x3c(%rax)
movq -0x40(%r14,%r13), %rsi
movq %r15, %rdi
movl %ebx, %edx
callq 0x269b29
movq %rax, -0x40(%r12,%r13)
movq -0x20(%r14,%r13), %rsi
movq %r15, %rdi
movl %ebx, %edx
callq 0x267197
movq %rax, -0x20(%r12,%r13)
movq -0x18(%r14,%r13), %rsi
movq %r15, %rdi
callq 0x26a168
movq %rax, -0x18(%r12,%r13)
movq -0x10(%r14,%r13), %rax
movq %rax, -0x10(%r12,%r13)
incq %rbp
movl (%r14), %eax
addq $0x70, %r13
jmp 0x26a047
xorl %r12d, %r12d
movq %r12, %rax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq