// File: /workspace/github_c_makefile_star2_O3/genometools[P]genometools/src/external/sqlite-3.33.0/sqlite3.c
// Function: sqlite3ExprCompare
SQLITE_PRIVATE int sqlite3ExprCompare(Parse *pParse, Expr *pA, Expr *pB, int iTab){
  u32 combinedFlags;
  if( pA==0 || pB==0 ){
    return pB==pA ? 0 : 2;
  }
  if( pParse && pA->op==TK_VARIABLE && exprCompareVariable(pParse, pA, pB) ){
    return 0;
  }
  combinedFlags = pA->flags | pB->flags;
  if( combinedFlags & EP_IntValue ){
    if( (pA->flags&pB->flags&EP_IntValue)!=0 && pA->u.iValue==pB->u.iValue ){
      return 0;
    }
    return 2;
  }
  if( pA->op!=pB->op || pA->op==TK_RAISE ){
    if( pA->op==TK_COLLATE && sqlite3ExprCompare(pParse, pA->pLeft,pB,iTab)<2 ){
      return 1;
    }
    if( pB->op==TK_COLLATE && sqlite3ExprCompare(pParse, pA,pB->pLeft,iTab)<2 ){
      return 1;
    }
    return 2;
  }
  if( pA->op!=TK_COLUMN && pA->op!=TK_AGG_COLUMN && pA->u.zToken ){
    if( pA->op==TK_FUNCTION || pA->op==TK_AGG_FUNCTION ){
      if( sqlite3StrICmp(pA->u.zToken,pB->u.zToken)!=0 ) return 2;
#ifndef SQLITE_OMIT_WINDOWFUNC
      assert( pA->op==pB->op );
      if( ExprHasProperty(pA,EP_WinFunc)!=ExprHasProperty(pB,EP_WinFunc) ){
        return 2;
      }
      if( ExprHasProperty(pA,EP_WinFunc) ){
        if( sqlite3WindowCompare(pParse, pA->y.pWin, pB->y.pWin, 1)!=0 ){
          return 2;
        }
      }
#endif
    }else if( pA->op==TK_NULL ){
      return 0;
    }else if( pA->op==TK_COLLATE ){
      if( sqlite3_stricmp(pA->u.zToken,pB->u.zToken)!=0 ) return 2;
    }else if( ALWAYS(pB->u.zToken!=0) && strcmp(pA->u.zToken,pB->u.zToken)!=0 ){
      return 2;
    }
  }
  if( (pA->flags & (EP_Distinct|EP_Commuted))
     != (pB->flags & (EP_Distinct|EP_Commuted)) ) return 2;
  if( ALWAYS((combinedFlags & EP_TokenOnly)==0) ){
    if( combinedFlags & EP_xIsSelect ) return 2;
    if( (combinedFlags & EP_FixedCol)==0
     && sqlite3ExprCompare(pParse, pA->pLeft, pB->pLeft, iTab) ) return 2;
    if( sqlite3ExprCompare(pParse, pA->pRight, pB->pRight, iTab) ) return 2;
    if( sqlite3ExprListCompare(pA->x.pList, pB->x.pList, iTab) ) return 2;
    if( pA->op!=TK_STRING
     && pA->op!=TK_TRUEFALSE
     && ALWAYS((combinedFlags & EP_Reduced)==0)
    ){
      if( pA->iColumn!=pB->iColumn ) return 2;
      if( pA->op2!=pB->op2 && pA->op==TK_TRUTH ) return 2;
      if( pA->op!=TK_IN && pA->iTable!=pB->iTable && pA->iTable!=iTab ){
        return 2;
      }
    }
  }
  return 0;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x18, %rsp
movl %ecx, %r9d
movq %rdx, %rbx
movq %rsi, %r14
testq %rsi, %rsi
setne %al
testq %rdx, %rdx
setne %cl
testb %cl, %al
jne 0x2c0dd1
xorl %r12d, %r12d
cmpq %r14, %rbx
setne %r12b
addl %r12d, %r12d
jmp 0x2c1075
movq %rdi, %r10
testq %rdi, %rdi
je 0x2c0ed1
cmpb $-0x67, (%r14)
jne 0x2c0ed1
movl %r9d, 0x4(%rsp)
leaq 0x10(%rsp), %r12
movq $0x0, (%r12)
movq (%r10), %rdi
movl $0x1, %ebp
movq %rbx, %rsi
movl $0x1, %edx
movl $0x41, %ecx
movq %r12, %r8
movq %r10, %r15
callq 0x2c0365
movq (%r12), %r13
testq %r13, %r13
je 0x2c0eb5
movswl 0x30(%r14), %esi
leal -0x1(%rsi), %ecx
shll %cl, %ebp
cmpl $0x20, %esi
movq 0x10(%r15), %rax
movl $0x80000000, %ecx       # imm = 0x80000000
cmovll %ebp, %ecx
orl %ecx, 0x114(%rax)
movq %r15, 0x8(%rsp)
movq 0x138(%r15), %rdi
callq 0x2c130d
testq %rax, %rax
je 0x2c0ebf
movq %rax, %rbp
movl 0x8(%rax), %eax
movabsq $0x4000400040004, %rcx  # imm = 0x4000400040004
btq %rax, %rcx
jae 0x2c0e7e
movq %rbp, %rdi
movl $0x1, %esi
callq 0x278305
xorl %r12d, %r12d
movq %rbp, %rdi
movq %r13, %rsi
xorl %edx, %edx
callq 0x29b4b8
movl %eax, %r15d
movq %r13, %rdi
callq 0x278453
movq %rbp, %rdi
callq 0x278453
testl %r15d, %r15d
movl 0x4(%rsp), %r9d
movq 0x8(%rsp), %r10
jne 0x2c0ed1
jmp 0x2c1075
movl 0x4(%rsp), %r9d
movq %r15, %r10
jmp 0x2c0ed1
movq %r13, %rdi
callq 0x278453
movl 0x4(%rsp), %r9d
movq 0x8(%rsp), %r10
movl 0x4(%r14), %r13d
movl 0x4(%rbx), %ebp
movl %ebp, %r15d
orl %r13d, %r15d
btl $0xa, %r15d
jb 0x2c0f56
movzbl (%r14), %eax
movb (%rbx), %cl
cmpb %cl, %al
sete %dl
cmpb $0x47, %al
setne %sil
testb %dl, %sil
jne 0x2c0f78
cmpl $0x6f, %eax
jne 0x2c0f2f
movq 0x10(%r14), %rsi
movq %r10, %rdi
movq %rbx, %rdx
movl %r9d, %ecx
movl %r9d, %ebp
movq %r10, %r15
callq 0x2c0d98
movl $0x1, %r12d
cmpl $0x2, %eax
jb 0x2c1075
movq %r15, %r10
movl %ebp, %r9d
movb (%rbx), %cl
cmpb $0x6f, %cl
jne 0x2c0f6d
movq 0x10(%rbx), %rdx
movq %r10, %rdi
movq %r14, %rsi
movl %r9d, %ecx
callq 0x2c0d98
movl $0x1, %r12d
cmpl $0x2, %eax
jae 0x2c0f6d
jmp 0x2c1075
andl %ebp, %r13d
btl $0xa, %r13d
jae 0x2c0f6d
movl 0x8(%r14), %eax
cmpl 0x8(%rbx), %eax
je 0x2c1072
movl $0x2, %r12d
jmp 0x2c1075
movl %eax, %ecx
orl $0x2, %ecx
cmpl $0xa6, %ecx
jne 0x2c1050
xorl %r13d, %ebp
movl $0x2, %r12d
testl $0x202, %ebp            # imm = 0x202
jne 0x2c1075
btl $0xe, %r15d
jb 0x2c1072
btl $0xb, %r15d
jb 0x2c1075
testb $0x8, %r15b
jne 0x2c0fe1
movq 0x10(%r14), %rsi
movq 0x10(%rbx), %rdx
movq %r10, %rdi
movl %r9d, %ecx
movl %r9d, %ebp
movq %r10, %r13
callq 0x2c0d98
movq %r13, %r10
movl %ebp, %r9d
testl %eax, %eax
jne 0x2c1075
movq 0x18(%r14), %rsi
movq 0x18(%rbx), %rdx
movq %r10, %rdi
movl %r9d, %ecx
movl %r9d, %ebp
callq 0x2c0d98
testl %eax, %eax
jne 0x2c1075
movq 0x20(%r14), %rdi
movq 0x20(%rbx), %rsi
movl %ebp, %edx
callq 0x2c128a
testl %eax, %eax
jne 0x2c1075
movzbl (%r14), %eax
cmpl $0x73, %eax
je 0x2c1072
cmpl $0xa7, %eax
je 0x2c1072
btl $0xd, %r15d
jb 0x2c1072
movzwl 0x30(%r14), %ecx
cmpw 0x30(%rbx), %cx
jne 0x2c1075
cmpb $-0x54, %al
jne 0x2c103d
movb 0x2(%rbx), %cl
cmpb %cl, 0x2(%r14)
jne 0x2c1075
cmpb $0x31, %al
je 0x2c1072
movl 0x2c(%r14), %eax
cmpl %ebp, %eax
je 0x2c1072
cmpl 0x2c(%rbx), %eax
jne 0x2c1075
jmp 0x2c1072
movq 0x8(%r14), %rdi
testq %rdi, %rdi
je 0x2c0f89
cmpl $0xa4, %eax
jg 0x2c1087
cmpl $0x6f, %eax
je 0x2c115c
cmpl $0x77, %eax
jne 0x2c10ca
xorl %r12d, %r12d
movl %r12d, %eax
addq $0x18, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
cmpl $0xa9, %eax
je 0x2c1095
cmpl $0xa5, %eax
jne 0x2c10ca
movq 0x8(%rbx), %rax
xorl %ecx, %ecx
leaq 0x11023e(%rip), %rdx    # 0x3d12e0
movzbl (%rdi,%rcx), %esi
movzbl (%rax,%rcx), %r8d
cmpb %r8b, %sil
jne 0x2c10b7
testq %rsi, %rsi
jne 0x2c10c5
jmp 0x2c10ff
movb (%rsi,%rdx), %sil
cmpb (%r8,%rdx), %sil
jne 0x2c0f6d
incq %rcx
jmp 0x2c10a2
movq 0x8(%rbx), %rsi
testq %rsi, %rsi
je 0x2c0f89
movl %r9d, 0x4(%rsp)
movq %r10, %r12
callq 0x17a40
movq %r12, %r10
movl 0x4(%rsp), %r9d
movl $0x2, %r12d
testl %eax, %eax
jne 0x2c1075
jmp 0x2c0f89
movl %r13d, %eax
andl $0x1000000, %eax        # imm = 0x1000000
movl %eax, %ecx
shrl $0x18, %ecx
movl $0x2, %r12d
btl $0x18, %ebp
sbbl $0x0, %ecx
jne 0x2c1075
testl %eax, %eax
je 0x2c0f89
movq 0x40(%r14), %rsi
movq 0x40(%rbx), %rdx
movq %r10, %rdi
movl $0x1, %ecx
movl %r9d, %ebp
movq %r10, %r13
callq 0x2c11a3
testl %eax, %eax
jne 0x2c1075
movq %r13, %r10
movl %ebp, %r9d
movl 0x4(%r14), %r13d
movl 0x4(%rbx), %ebp
jmp 0x2c0f89
movq 0x8(%rbx), %rax
movl $0x2, %r12d
testq %rax, %rax
je 0x2c1075
xorl %ecx, %ecx
leaq 0x110168(%rip), %rdx    # 0x3d12e0
movzbl (%rdi,%rcx), %esi
movzbl (%rax,%rcx), %r8d
cmpb %r8b, %sil
jne 0x2c1190
testq %rsi, %rsi
jne 0x2c119e
jmp 0x2c0f89
movb (%rsi,%rdx), %sil
cmpb (%r8,%rdx), %sil
jne 0x2c1075
incq %rcx
jmp 0x2c1178