// File: /workspace/github_c_makefile_star2_O3/jkbenaim[P]psfrag/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->zName = sqlite3DbStrDup(db, pOldItem->zName);
    pItem->zSpan = sqlite3DbStrDup(db, pOldItem->zSpan);
    pItem->sortFlags = pOldItem->sortFlags;
    pItem->done = 0;
    pItem->bNulls = pOldItem->bNulls;
    pItem->bSpanIsTab = pOldItem->bSpanIsTab;
    pItem->bSorterRef = pOldItem->bSorterRef;
    pItem->u = pOldItem->u;
  }
  return pNew;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x18, %rsp
movl %edx, 0xc(%rsp)
testq %rsi, %rsi
je 0x5a666
movq %rsi, %r14
movq %rdi, %r15
testq %rdi, %rdi
je 0x5a542
cmpq %r14, 0x198(%r15)
ja 0x5a542
cmpq %r14, 0x1a0(%r15)
jbe 0x5a542
movzwl 0x174(%r15), %eax
jmp 0x5a54b
movq %r14, %rdi
callq *0x4ed7d(%rip)          # 0xa92c8
movslq %eax, %rsi
movq %r15, %rdi
callq 0x1b6e3
testq %rax, %rax
je 0x5a666
movq %rax, %r12
movl (%r14), %eax
movl %eax, (%r12)
testl %eax, %eax
jle 0x5a669
movq $0x0, 0x10(%rsp)
movl $0x24, %ebp
xorl %ebx, %ebx
movq -0x1c(%r14,%rbp), %r13
testq %r13, %r13
je 0x5a5c5
movq %r15, %rdi
movq %r13, %rsi
movl 0xc(%rsp), %edx
xorl %ecx, %ecx
callq 0x59f79
movq %rax, -0x1c(%r12,%rbp)
cmpb $-0x53, (%r13)
setne %cl
testq %rax, %rax
sete %dl
orb %cl, %dl
jne 0x5a5dd
cmpw $0x0, 0x30(%rax)
je 0x5a5d0
movq 0x10(%rsp), %rcx
movq %rcx, 0x10(%rax)
jmp 0x5a5dd
movq $0x0, -0x1c(%r12,%rbp)
jmp 0x5a5dd
movq 0x18(%rax), %rdx
movq %rdx, 0x10(%rsp)
movq %rdx, 0x10(%rax)
movq -0x14(%r14,%rbp), %rsi
movq %r15, %rdi
callq 0x11b20
movq %rax, -0x14(%r12,%rbp)
movq -0xc(%r14,%rbp), %rsi
movq %r15, %rdi
callq 0x11b20
movq %rax, -0xc(%r12,%rbp)
movb -0x4(%r14,%rbp), %al
movb %al, -0x4(%r12,%rbp)
movb -0x3(%r12,%rbp), %al
movl %eax, %ecx
andb $-0x2, %cl
movb %cl, -0x3(%r12,%rbp)
movb -0x3(%r14,%rbp), %cl
andb $0x10, %cl
andb $-0x12, %al
orb %cl, %al
movb %al, -0x3(%r12,%rbp)
movb -0x3(%r14,%rbp), %cl
andb $0x2, %cl
andb $-0x4, %al
orb %cl, %al
movb %al, -0x3(%r12,%rbp)
movb -0x3(%r14,%rbp), %cl
andb $0x8, %cl
andb $-0xa, %al
orb %cl, %al
movb %al, -0x3(%r12,%rbp)
movl (%r14,%rbp), %eax
movl %eax, (%r12,%rbp)
incl %ebx
addq $0x20, %rbp
cmpl (%r14), %ebx
jl 0x5a581
jmp 0x5a669
xorl %r12d, %r12d
movq %r12, %rax
addq $0x18, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq