// File: /workspace/github_c_makefile_star2_O0/jkbenaim[P]psfrag/sqlite3.c
// Function: sqlite3ExprCollSeq
SQLITE_PRIVATE CollSeq *sqlite3ExprCollSeq(Parse *pParse, Expr *pExpr){
  sqlite3 *db = pParse->db;
  CollSeq *pColl = 0;
  Expr *p = pExpr;
  while( p ){
    int op = p->op;
    if( op==TK_REGISTER ) op = p->op2;
    if( (op==TK_AGG_COLUMN || op==TK_COLUMN || op==TK_TRIGGER)
     && p->y.pTab!=0
    ){
      /* op==TK_REGISTER && p->y.pTab!=0 happens when pExpr was originally
      ** a TK_COLUMN but was previously evaluated and cached in a register */
      int j = p->iColumn;
      if( j>=0 ){
        const char *zColl = p->y.pTab->aCol[j].zColl;
        pColl = sqlite3FindCollSeq(db, ENC(db), zColl, 0);
      }
      break;
    }
    if( op==TK_CAST || op==TK_UPLUS ){
      p = p->pLeft;
      continue;
    }
    if( op==TK_COLLATE ){
      pColl = sqlite3GetCollSeq(pParse, ENC(db), 0, p->u.zToken);
      break;
    }
    if( p->flags & EP_Collate ){
      if( p->pLeft && (p->pLeft->flags & EP_Collate)!=0 ){
        p = p->pLeft;
      }else{
        Expr *pNext  = p->pRight;
        /* The Expr.x union is never used at the same time as Expr.pRight */
        assert( p->x.pList==0 || p->pRight==0 );
        /* p->flags holds EP_Collate and p->pLeft->flags does not.  And
        ** p->x.pSelect cannot.  So if p->x.pLeft exists, it must hold at
        ** least one EP_Collate. Thus the following two ALWAYS. */
        if( p->x.pList!=0 && ALWAYS(!ExprHasProperty(p, EP_xIsSelect)) ){
          int i;
          for(i=0; ALWAYS(i<p->x.pList->nExpr); i++){
            if( ExprHasProperty(p->x.pList->a[i].pExpr, EP_Collate) ){
              pNext = p->x.pList->a[i].pExpr;
              break;
            }
          }
        }
        p = pNext;
      }
    }else{
      break;
    }
  }
  if( sqlite3CheckCollSeq(pParse, pColl) ){ 
    pColl = 0;
  }
  return pColl;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x50, %rsp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq -0x8(%rbp), %rax
movq (%rax), %rax
movq %rax, -0x18(%rbp)
movq $0x0, -0x20(%rbp)
movq -0x10(%rbp), %rax
movq %rax, -0x28(%rbp)
cmpq $0x0, -0x28(%rbp)
je 0x5d9b0
movq -0x28(%rbp), %rax
movzbl (%rax), %eax
movl %eax, -0x2c(%rbp)
cmpl $0xab, -0x2c(%rbp)
jne 0x5d804
movq -0x28(%rbp), %rax
movzbl 0x36(%rax), %eax
movl %eax, -0x2c(%rbp)
cmpl $0xa4, -0x2c(%rbp)
je 0x5d81c
cmpl $0xa2, -0x2c(%rbp)
je 0x5d81c
cmpl $0x4d, -0x2c(%rbp)
jne 0x5d879
movq -0x28(%rbp), %rax
cmpq $0x0, 0x40(%rax)
je 0x5d879
movq -0x28(%rbp), %rax
movswl 0x30(%rax), %eax
movl %eax, -0x30(%rbp)
cmpl $0x0, -0x30(%rbp)
jl 0x5d874
movq -0x28(%rbp), %rax
movq 0x40(%rax), %rax
movq 0x8(%rax), %rax
movslq -0x30(%rbp), %rcx
shlq $0x5, %rcx
addq %rcx, %rax
movq 0x10(%rax), %rax
movq %rax, -0x38(%rbp)
movq -0x18(%rbp), %rdi
movq -0x18(%rbp), %rax
movb 0x5e(%rax), %al
movq -0x38(%rbp), %rdx
xorl %ecx, %ecx
movzbl %al, %esi
callq 0x5d9e0
movq %rax, -0x20(%rbp)
jmp 0x5d9b0
cmpl $0x24, -0x2c(%rbp)
je 0x5d888
cmpl $0xa9, -0x2c(%rbp)
jne 0x5d899
movq -0x28(%rbp), %rax
movq 0x10(%rax), %rax
movq %rax, -0x28(%rbp)
jmp 0x5d7db
cmpl $0x6d, -0x2c(%rbp)
jne 0x5d8c5
movq -0x8(%rbp), %rdi
movq -0x18(%rbp), %rax
movb 0x5e(%rax), %al
movq -0x28(%rbp), %rcx
movq 0x8(%rcx), %rcx
xorl %edx, %edx
movzbl %al, %esi
callq 0x5da50
movq %rax, -0x20(%rbp)
jmp 0x5d9b0
movq -0x28(%rbp), %rax
movl 0x4(%rax), %eax
andl $0x100, %eax            # imm = 0x100
cmpl $0x0, %eax
je 0x5d9a9
movq -0x28(%rbp), %rax
cmpq $0x0, 0x10(%rax)
je 0x5d90b
movq -0x28(%rbp), %rax
movq 0x10(%rax), %rax
movl 0x4(%rax), %eax
andl $0x100, %eax            # imm = 0x100
cmpl $0x0, %eax
je 0x5d90b
movq -0x28(%rbp), %rax
movq 0x10(%rax), %rax
movq %rax, -0x28(%rbp)
jmp 0x5d9a7
movq -0x28(%rbp), %rax
movq 0x18(%rax), %rax
movq %rax, -0x40(%rbp)
movq -0x28(%rbp), %rax
cmpq $0x0, 0x20(%rax)
je 0x5d99f
movq -0x28(%rbp), %rax
movl 0x4(%rax), %eax
andl $0x800, %eax            # imm = 0x800
cmpl $0x0, %eax
jne 0x5d99f
movl $0x0, -0x44(%rbp)
movl -0x44(%rbp), %eax
movq -0x28(%rbp), %rcx
movq 0x20(%rcx), %rcx
cmpl (%rcx), %eax
jge 0x5d99d
movq -0x28(%rbp), %rax
movq 0x20(%rax), %rax
addq $0x8, %rax
movslq -0x44(%rbp), %rcx
shlq $0x5, %rcx
addq %rcx, %rax
movq (%rax), %rax
movl 0x4(%rax), %eax
andl $0x100, %eax            # imm = 0x100
cmpl $0x0, %eax
je 0x5d990
movq -0x28(%rbp), %rax
movq 0x20(%rax), %rax
addq $0x8, %rax
movslq -0x44(%rbp), %rcx
shlq $0x5, %rcx
addq %rcx, %rax
movq (%rax), %rax
movq %rax, -0x40(%rbp)
jmp 0x5d99d
jmp 0x5d992
movl -0x44(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x44(%rbp)
jmp 0x5d93a
jmp 0x5d99f
movq -0x40(%rbp), %rax
movq %rax, -0x28(%rbp)
jmp 0x5d9ab
jmp 0x5d9b0
jmp 0x5d7db
movq -0x8(%rbp), %rdi
movq -0x20(%rbp), %rsi
callq 0x5db40
cmpl $0x0, %eax
je 0x5d9ca
movq $0x0, -0x20(%rbp)
movq -0x20(%rbp), %rax
addq $0x50, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)