// File: /workspace/github_c_makefile_star2_O0/shifengbin[P]bishe/Output/../Persistence/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( p->flags & EP_Generic ) break;
    if( op==TK_CAST || op==TK_UPLUS ){
      p = p->pLeft;
      continue;
    }
    if( op==TK_COLLATE || (op==TK_REGISTER && p->op2==TK_COLLATE) ){
      pColl = sqlite3GetCollSeq(pParse, ENC(db), 0, p->u.zToken);
      break;
    }
    if( (op==TK_AGG_COLUMN || op==TK_COLUMN
          || op==TK_REGISTER || op==TK_TRIGGER)
     && p->pTab!=0
    ){
      /* op==TK_REGISTER && p->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->pTab->aCol[j].zColl;
        pColl = sqlite3FindCollSeq(db, ENC(db), zColl, 0);
      }
      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 0x6ea2e
movq -0x28(%rbp), %rax
movzbl (%rax), %eax
movl %eax, -0x2c(%rbp)
movq -0x28(%rbp), %rax
movl 0x4(%rax), %eax
andl $0x200, %eax            # imm = 0x200
cmpl $0x0, %eax
je 0x6e866
jmp 0x6ea2e
cmpl $0x26, -0x2c(%rbp)
je 0x6e875
cmpl $0x9c, -0x2c(%rbp)
jne 0x6e883
movq -0x28(%rbp), %rax
movq 0x10(%rax), %rax
movq %rax, -0x28(%rbp)
jmp 0x6e83b
cmpl $0x5f, -0x2c(%rbp)
je 0x6e89f
cmpl $0x9d, -0x2c(%rbp)
jne 0x6e8c5
movq -0x28(%rbp), %rax
movzbl 0x36(%rax), %eax
cmpl $0x5f, %eax
jne 0x6e8c5
movq -0x8(%rbp), %rdi
movq -0x18(%rbp), %rax
movb 0x4e(%rax), %al
movq -0x28(%rbp), %rcx
movq 0x8(%rcx), %rcx
xorl %edx, %edx
movzbl %al, %esi
callq 0x6c820
movq %rax, -0x20(%rbp)
jmp 0x6ea2e
cmpl $0x9a, -0x2c(%rbp)
je 0x6e8e6
cmpl $0x98, -0x2c(%rbp)
je 0x6e8e6
cmpl $0x9d, -0x2c(%rbp)
je 0x6e8e6
cmpl $0x3e, -0x2c(%rbp)
jne 0x6e943
movq -0x28(%rbp), %rax
cmpq $0x0, 0x40(%rax)
je 0x6e943
movq -0x28(%rbp), %rax
movswl 0x30(%rax), %eax
movl %eax, -0x30(%rbp)
cmpl $0x0, -0x30(%rbp)
jl 0x6e93e
movq -0x28(%rbp), %rax
movq 0x40(%rax), %rax
movq 0x8(%rax), %rax
movslq -0x30(%rbp), %rcx
imulq $0x30, %rcx, %rcx
addq %rcx, %rax
movq 0x20(%rax), %rax
movq %rax, -0x38(%rbp)
movq -0x18(%rbp), %rdi
movq -0x18(%rbp), %rax
movb 0x4e(%rax), %al
movq -0x38(%rbp), %rdx
xorl %ecx, %ecx
movzbl %al, %esi
callq 0x6c7b0
movq %rax, -0x20(%rbp)
jmp 0x6ea2e
movq -0x28(%rbp), %rax
movl 0x4(%rax), %eax
andl $0x100, %eax            # imm = 0x100
cmpl $0x0, %eax
je 0x6ea27
movq -0x28(%rbp), %rax
cmpq $0x0, 0x10(%rax)
je 0x6e989
movq -0x28(%rbp), %rax
movq 0x10(%rax), %rax
movl 0x4(%rax), %eax
andl $0x100, %eax            # imm = 0x100
cmpl $0x0, %eax
je 0x6e989
movq -0x28(%rbp), %rax
movq 0x10(%rax), %rax
movq %rax, -0x28(%rbp)
jmp 0x6ea25
movq -0x28(%rbp), %rax
movq 0x18(%rax), %rax
movq %rax, -0x40(%rbp)
movq -0x28(%rbp), %rax
cmpq $0x0, 0x20(%rax)
je 0x6ea1d
movq -0x28(%rbp), %rax
movl 0x4(%rax), %eax
andl $0x800, %eax            # imm = 0x800
cmpl $0x0, %eax
jne 0x6ea1d
movl $0x0, -0x44(%rbp)
movl -0x44(%rbp), %eax
movq -0x28(%rbp), %rcx
movq 0x20(%rcx), %rcx
cmpl (%rcx), %eax
jge 0x6ea1b
movq -0x28(%rbp), %rax
movq 0x20(%rax), %rax
movq 0x8(%rax), %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 0x6ea0e
movq -0x28(%rbp), %rax
movq 0x20(%rax), %rax
movq 0x8(%rax), %rax
movslq -0x44(%rbp), %rcx
shlq $0x5, %rcx
addq %rcx, %rax
movq (%rax), %rax
movq %rax, -0x40(%rbp)
jmp 0x6ea1b
jmp 0x6ea10
movl -0x44(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x44(%rbp)
jmp 0x6e9b8
jmp 0x6ea1d
movq -0x40(%rbp), %rax
movq %rax, -0x28(%rbp)
jmp 0x6ea29
jmp 0x6ea2e
jmp 0x6e83b
movq -0x8(%rbp), %rdi
movq -0x20(%rbp), %rsi
callq 0x72470
cmpl $0x0, %eax
je 0x6ea48
movq $0x0, -0x20(%rbp)
movq -0x20(%rbp), %rax
addq $0x50, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)