// File: /workspace/github_c_makefile_star2_O0/barabo[P]advanced-shell-history/src/sqlite3.c
// Function: sqlite3ExprCompare
SQLITE_PRIVATE int sqlite3ExprCompare(Expr *pA, Expr *pB, int iTab){
  if( pA==0||pB==0 ){
    return pB==pA ? 0 : 2;
  }
  assert( !ExprHasAnyProperty(pA, EP_TokenOnly|EP_Reduced) );
  assert( !ExprHasAnyProperty(pB, EP_TokenOnly|EP_Reduced) );
  if( ExprHasProperty(pA, EP_xIsSelect) || ExprHasProperty(pB, EP_xIsSelect) ){
    return 2;
  }
  if( (pA->flags & EP_Distinct)!=(pB->flags & EP_Distinct) ) return 2;
  if( pA->op!=pB->op && (pA->op!=TK_REGISTER || pA->op2!=pB->op) ){
    if( pA->op==TK_COLLATE && sqlite3ExprCompare(pA->pLeft, pB, iTab)<2 ){
      return 1;
    }
    if( pB->op==TK_COLLATE && sqlite3ExprCompare(pA, pB->pLeft, iTab)<2 ){
      return 1;
    }
    return 2;
  }
  if( sqlite3ExprCompare(pA->pLeft, pB->pLeft, iTab) ) return 2;
  if( sqlite3ExprCompare(pA->pRight, pB->pRight, iTab) ) return 2;
  if( sqlite3ExprListCompare(pA->x.pList, pB->x.pList, iTab) ) return 2;
  if( pA->iColumn!=pB->iColumn ) return 2;
  if( pA->iTable!=pB->iTable 
   && pA->op!=TK_REGISTER
   && (pA->iTable!=iTab || NEVER(pB->iTable>=0)) ) return 2;
  if( ExprHasProperty(pA, EP_IntValue) ){
    if( !ExprHasProperty(pB, EP_IntValue) || pA->u.iValue!=pB->u.iValue ){
      return 2;
    }
  }else if( pA->op!=TK_COLUMN && ALWAYS(pA->op!=TK_AGG_COLUMN) && pA->u.zToken){
    if( ExprHasProperty(pB, EP_IntValue) || NEVER(pB->u.zToken==0) ) return 2;
    if( strcmp(pA->u.zToken,pB->u.zToken)!=0 ){
      return pA->op==TK_COLLATE ? 1 : 2;
    }
  }
  return 0;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x20, %rsp
movq %rdi, -0x10(%rbp)
movq %rsi, -0x18(%rbp)
movl %edx, -0x1c(%rbp)
cmpq $0x0, -0x10(%rbp)
je 0x66241
cmpq $0x0, -0x18(%rbp)
jne 0x6625e
movq -0x18(%rbp), %rdx
movq -0x10(%rbp), %rsi
movl $0x2, %eax
xorl %ecx, %ecx
cmpq %rsi, %rdx
cmovel %ecx, %eax
movl %eax, -0x4(%rbp)
jmp 0x66511
movq -0x10(%rbp), %rax
movzwl 0x2(%rax), %eax
andl $0x800, %eax            # imm = 0x800
cmpl $0x800, %eax            # imm = 0x800
je 0x66286
movq -0x18(%rbp), %rax
movzwl 0x2(%rax), %eax
andl $0x800, %eax            # imm = 0x800
cmpl $0x800, %eax            # imm = 0x800
jne 0x66292
movl $0x2, -0x4(%rbp)
jmp 0x66511
movq -0x10(%rbp), %rax
movzwl 0x2(%rax), %eax
andl $0x10, %eax
movq -0x18(%rbp), %rcx
movzwl 0x2(%rcx), %ecx
andl $0x10, %ecx
cmpl %ecx, %eax
je 0x662b8
movl $0x2, -0x4(%rbp)
jmp 0x66511
movq -0x10(%rbp), %rax
movzbl (%rax), %eax
movq -0x18(%rbp), %rcx
movzbl (%rcx), %ecx
cmpl %ecx, %eax
je 0x6635d
movq -0x10(%rbp), %rax
movzbl (%rax), %eax
cmpl $0x84, %eax
jne 0x662ef
movq -0x10(%rbp), %rax
movzbl 0x37(%rax), %eax
movq -0x18(%rbp), %rcx
movzbl (%rcx), %ecx
cmpl %ecx, %eax
je 0x6635d
movq -0x10(%rbp), %rax
movzbl (%rax), %eax
cmpl $0x5c, %eax
jne 0x66320
movq -0x10(%rbp), %rax
movq 0x10(%rax), %rdi
movq -0x18(%rbp), %rsi
movl -0x1c(%rbp), %edx
callq 0x66220
cmpl $0x2, %eax
jge 0x66320
movl $0x1, -0x4(%rbp)
jmp 0x66511
movq -0x18(%rbp), %rax
movzbl (%rax), %eax
cmpl $0x5c, %eax
jne 0x66351
movq -0x10(%rbp), %rdi
movq -0x18(%rbp), %rax
movq 0x10(%rax), %rsi
movl -0x1c(%rbp), %edx
callq 0x66220
cmpl $0x2, %eax
jge 0x66351
movl $0x1, -0x4(%rbp)
jmp 0x66511
movl $0x2, -0x4(%rbp)
jmp 0x66511
movq -0x10(%rbp), %rax
movq 0x10(%rax), %rdi
movq -0x18(%rbp), %rax
movq 0x10(%rax), %rsi
movl -0x1c(%rbp), %edx
callq 0x66220
cmpl $0x0, %eax
je 0x66386
movl $0x2, -0x4(%rbp)
jmp 0x66511
movq -0x10(%rbp), %rax
movq 0x18(%rax), %rdi
movq -0x18(%rbp), %rax
movq 0x18(%rax), %rsi
movl -0x1c(%rbp), %edx
callq 0x66220
cmpl $0x0, %eax
je 0x663af
movl $0x2, -0x4(%rbp)
jmp 0x66511
movq -0x10(%rbp), %rax
movq 0x20(%rax), %rdi
movq -0x18(%rbp), %rax
movq 0x20(%rax), %rsi
movl -0x1c(%rbp), %edx
callq 0x66650
cmpl $0x0, %eax
je 0x663d8
movl $0x2, -0x4(%rbp)
jmp 0x66511
movq -0x10(%rbp), %rax
movswl 0x30(%rax), %eax
movq -0x18(%rbp), %rcx
movswl 0x30(%rcx), %ecx
cmpl %ecx, %eax
je 0x663f8
movl $0x2, -0x4(%rbp)
jmp 0x66511
movq -0x10(%rbp), %rax
movl 0x2c(%rax), %eax
movq -0x18(%rbp), %rcx
cmpl 0x2c(%rcx), %eax
je 0x66438
movq -0x10(%rbp), %rax
movzbl (%rax), %eax
cmpl $0x84, %eax
je 0x66438
movq -0x10(%rbp), %rax
movl 0x2c(%rax), %eax
cmpl -0x1c(%rbp), %eax
jne 0x6642c
movq -0x18(%rbp), %rax
cmpl $0x0, 0x2c(%rax)
jl 0x66438
movl $0x2, -0x4(%rbp)
jmp 0x66511
movq -0x10(%rbp), %rax
movzwl 0x2(%rax), %eax
andl $0x400, %eax            # imm = 0x400
cmpl $0x400, %eax            # imm = 0x400
jne 0x66481
movq -0x18(%rbp), %rax
movzwl 0x2(%rax), %eax
andl $0x400, %eax            # imm = 0x400
cmpl $0x400, %eax            # imm = 0x400
jne 0x66470
movq -0x10(%rbp), %rax
movl 0x8(%rax), %eax
movq -0x18(%rbp), %rcx
cmpl 0x8(%rcx), %eax
je 0x6647c
movl $0x2, -0x4(%rbp)
jmp 0x66511
jmp 0x6650a
movq -0x10(%rbp), %rax
movzbl (%rax), %eax
cmpl $0x98, %eax
je 0x66508
movq -0x10(%rbp), %rax
movzbl (%rax), %eax
cmpl $0x9a, %eax
je 0x66508
movq -0x10(%rbp), %rax
cmpq $0x0, 0x8(%rax)
je 0x66508
movq -0x18(%rbp), %rax
movzwl 0x2(%rax), %eax
andl $0x400, %eax            # imm = 0x400
cmpl $0x400, %eax            # imm = 0x400
je 0x664c7
movq -0x18(%rbp), %rax
cmpq $0x0, 0x8(%rax)
jne 0x664d0
movl $0x2, -0x4(%rbp)
jmp 0x66511
movq -0x10(%rbp), %rax
movq 0x8(%rax), %rdi
movq -0x18(%rbp), %rax
movq 0x8(%rax), %rsi
callq 0x85d0
cmpl $0x0, %eax
je 0x66506
movq -0x10(%rbp), %rax
movzbl (%rax), %edx
movl $0x2, %eax
movl $0x1, %ecx
cmpl $0x5c, %edx
cmovel %ecx, %eax
movl %eax, -0x4(%rbp)
jmp 0x66511
jmp 0x66508
jmp 0x6650a
movl $0x0, -0x4(%rbp)
movl -0x4(%rbp), %eax
addq $0x20, %rsp
popq %rbp
retq
nopw (%rax,%rax)