// File: /workspace/github_c_makefile_star2_O0/genometools[P]genometools/src/external/sqlite-3.33.0/sqlite3.c
// Function: sqlite3ExprListDup
SQLITE_PRIVATE ExprList *sqlite3ExprListDup(sqlite3 *db, ExprList *p, int flags){
  ExprList *pNew;
  struct ExprList_item *pItem, *pOldItem;
  int i;
  Expr *pPriorSelectCol = 0;
  assert( db!=0 );
  if( p==0 ) return 0;
  pNew = sqlite3DbMallocRawNN(db, sqlite3DbMallocSize(db, p));
  if( pNew==0 ) return 0;
  pNew->nExpr = p->nExpr;
  pItem = pNew->a;
  pOldItem = p->a;
  for(i=0; i<p->nExpr; i++, pItem++, pOldItem++){
    Expr *pOldExpr = pOldItem->pExpr;
    Expr *pNewExpr;
    pItem->pExpr = sqlite3ExprDup(db, pOldExpr, flags);
    if( pOldExpr
     && pOldExpr->op==TK_SELECT_COLUMN
     && (pNewExpr = pItem->pExpr)!=0
    ){
      assert( pNewExpr->iColumn==0 || i>0 );
      if( pNewExpr->iColumn==0 ){
        assert( pOldExpr->pLeft==pOldExpr->pRight );
        pPriorSelectCol = pNewExpr->pLeft = pNewExpr->pRight;
      }else{
        assert( i>0 );
        assert( pItem[-1].pExpr!=0 );
        assert( pNewExpr->iColumn==pItem[-1].pExpr->iColumn+1 );
        assert( pPriorSelectCol==pItem[-1].pExpr->pLeft );
        pNewExpr->pLeft = pPriorSelectCol;
      }
    }
    pItem->zEName = sqlite3DbStrDup(db, pOldItem->zEName);
    pItem->sortFlags = pOldItem->sortFlags;
    pItem->eEName = pOldItem->eEName;
    pItem->done = 0;
    pItem->bNulls = pOldItem->bNulls;
    pItem->bSorterRef = pOldItem->bSorterRef;
    pItem->u = pOldItem->u;
  }
  return pNew;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x60, %rsp
movq %rdi, -0x10(%rbp)
movq %rsi, -0x18(%rbp)
movl %edx, -0x1c(%rbp)
movq $0x0, -0x48(%rbp)
cmpq $0x0, -0x18(%rbp)
jne 0x43283f
movq $0x0, -0x8(%rbp)
jmp 0x432a10
movq -0x10(%rbp), %rax
movq %rax, -0x60(%rbp)
movq -0x10(%rbp), %rdi
movq -0x18(%rbp), %rsi
callq 0x3c30e0
movq -0x60(%rbp), %rdi
movslq %eax, %rsi
callq 0x3d62a0
movq %rax, -0x28(%rbp)
cmpq $0x0, -0x28(%rbp)
jne 0x432878
movq $0x0, -0x8(%rbp)
jmp 0x432a10
movq -0x18(%rbp), %rax
movl (%rax), %ecx
movq -0x28(%rbp), %rax
movl %ecx, (%rax)
movq -0x28(%rbp), %rax
addq $0x8, %rax
movq %rax, -0x30(%rbp)
movq -0x18(%rbp), %rax
addq $0x8, %rax
movq %rax, -0x38(%rbp)
movl $0x0, -0x3c(%rbp)
movl -0x3c(%rbp), %eax
movq -0x18(%rbp), %rcx
cmpl (%rcx), %eax
jge 0x432a08
movq -0x38(%rbp), %rax
movq (%rax), %rax
movq %rax, -0x50(%rbp)
movq -0x10(%rbp), %rdi
movq -0x50(%rbp), %rsi
movl -0x1c(%rbp), %edx
callq 0x42dee0
movq %rax, %rcx
movq -0x30(%rbp), %rax
movq %rcx, (%rax)
cmpq $0x0, -0x50(%rbp)
je 0x43292e
movq -0x50(%rbp), %rax
movzbl (%rax), %eax
cmpl $0xaf, %eax
jne 0x43292e
movq -0x30(%rbp), %rax
movq (%rax), %rax
movq %rax, -0x58(%rbp)
cmpq $0x0, %rax
je 0x43292e
movq -0x58(%rbp), %rax
movswl 0x30(%rax), %eax
cmpl $0x0, %eax
jne 0x432920
movq -0x58(%rbp), %rax
movq 0x18(%rax), %rax
movq -0x58(%rbp), %rcx
movq %rax, 0x10(%rcx)
movq %rax, -0x48(%rbp)
jmp 0x43292c
movq -0x48(%rbp), %rcx
movq -0x58(%rbp), %rax
movq %rcx, 0x10(%rax)
jmp 0x43292e
movq -0x10(%rbp), %rdi
movq -0x38(%rbp), %rax
movq 0x8(%rax), %rsi
callq 0x3c91a0
movq %rax, %rcx
movq -0x30(%rbp), %rax
movq %rcx, 0x8(%rax)
movq -0x38(%rbp), %rax
movb 0x10(%rax), %cl
movq -0x30(%rbp), %rax
movb %cl, 0x10(%rax)
movq -0x38(%rbp), %rax
movb 0x11(%rax), %al
andb $0x3, %al
movzbl %al, %ecx
movq -0x30(%rbp), %rax
movb %cl, %dl
movb 0x11(%rax), %cl
andb $0x3, %dl
andb $-0x4, %cl
orb %dl, %cl
movb %cl, 0x11(%rax)
movq -0x30(%rbp), %rax
movb 0x11(%rax), %cl
andb $-0x5, %cl
orb $0x0, %cl
movb %cl, 0x11(%rax)
movq -0x38(%rbp), %rax
movb 0x11(%rax), %al
shrb $0x5, %al
andb $0x1, %al
movzbl %al, %ecx
movq -0x30(%rbp), %rax
movb %cl, %dl
movb 0x11(%rax), %cl
andb $0x1, %dl
shlb $0x5, %dl
andb $-0x21, %cl
orb %dl, %cl
movb %cl, 0x11(%rax)
movq -0x38(%rbp), %rax
movb 0x11(%rax), %al
shrb $0x4, %al
andb $0x1, %al
movzbl %al, %ecx
movq -0x30(%rbp), %rax
movb %cl, %dl
movb 0x11(%rax), %cl
andb $0x1, %dl
shlb $0x4, %dl
andb $-0x11, %cl
orb %dl, %cl
movb %cl, 0x11(%rax)
movq -0x30(%rbp), %rax
movq -0x38(%rbp), %rcx
movl 0x14(%rcx), %ecx
movl %ecx, 0x14(%rax)
movl -0x3c(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x3c(%rbp)
movq -0x30(%rbp), %rax
addq $0x18, %rax
movq %rax, -0x30(%rbp)
movq -0x38(%rbp), %rax
addq $0x18, %rax
movq %rax, -0x38(%rbp)
jmp 0x4328a3
movq -0x28(%rbp), %rax
movq %rax, -0x8(%rbp)
movq -0x8(%rbp), %rax
addq $0x60, %rsp
popq %rbp
retq
nopw (%rax,%rax)