// File: /workspace/github_c_makefile_star2_O3/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 0x2c3253
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 0x282a35
testq %rax, %rax
je 0x2c3253
movq %rax, %r12
movl (%r14), %eax
movl %eax, 0x4(%r12)
movl %eax, (%r12)
testl %eax, %eax
jle 0x2c3256
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 0x279928
movq %rax, -0x60(%r12,%r13)
movq -0x58(%r14,%r13), %rsi
movq %r15, %rdi
callq 0x279928
movq %rax, -0x58(%r12,%r13)
movq -0x50(%r14,%r13), %rsi
movq %r15, %rdi
callq 0x279928
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 0x2c31bd
movq -0x8(%r14,%r13), %rsi
movq %r15, %rdi
callq 0x279928
movq %rax, -0x8(%r12,%r13)
movb -0x2b(%r12,%r13), %al
movq (%r14,%r13), %rcx
movq %rcx, (%r12,%r13)
testb $0x4, %al
je 0x2c31dd
movq -0x8(%r14,%r13), %rsi
movq %r15, %rdi
movl %ebx, %edx
callq 0x2c2deb
movq %rax, -0x8(%r12,%r13)
movq -0x48(%r14,%r13), %rax
movq %rax, -0x48(%r12,%r13)
testq %rax, %rax
je 0x2c31ef
incl 0x3c(%rax)
movq -0x40(%r14,%r13), %rsi
movq %r15, %rdi
movl %ebx, %edx
callq 0x2c2b4a
movq %rax, -0x40(%r12,%r13)
movq -0x20(%r14,%r13), %rsi
testq %rsi, %rsi
je 0x2c321b
movq %r15, %rdi
movl %ebx, %edx
xorl %ecx, %ecx
callq 0x2c2864
jmp 0x2c321d
xorl %eax, %eax
movq %rax, -0x20(%r12,%r13)
movq -0x18(%r14,%r13), %rsi
movq %r15, %rdi
callq 0x2c3268
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 0x2c3141
jmp 0x2c3256
xorl %r12d, %r12d
movq %r12, %rax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq