// File: /workspace/github_c_makefile_star2_O1/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, %r13d
movq %rdx, %rbx
movq %rsi, %r14
testq %rsi, %rsi
setne %al
testq %rdx, %rdx
setne %cl
testb %cl, %al
jne 0x2ca560
xorl %r12d, %r12d
cmpq %r14, %rbx
setne %r12b
addl %r12d, %r12d
jmp 0x2ca7b0
movq %rdi, %r15
testq %rdi, %rdi
je 0x2ca64f
cmpb $-0x67, (%r14)
jne 0x2ca64f
movl %r13d, 0x8(%rsp)
leaq 0x10(%rsp), %r12
movq $0x0, (%r12)
movq (%r15), %rdi
movl $0x1, %ebp
movq %rbx, %rsi
movl $0x1, %edx
movl $0x41, %ecx
movq %r12, %r8
callq 0x2c9ac1
movq (%r12), %r13
testq %r13, %r13
je 0x2ca64a
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 0x138(%r15), %rdi
callq 0x2caa6a
movq %rax, %rbp
testq %rax, %rax
je 0x2ca63a
movl 0x8(%rbp), %eax
movabsq $0x4000400040004, %rcx  # imm = 0x4000400040004
btq %rax, %rcx
jae 0x2ca605
movq %rbp, %rdi
movl $0x1, %esi
callq 0x281c96
xorl %r12d, %r12d
movq %rbp, %rdi
movq %r13, %rsi
xorl %edx, %edx
callq 0x2a45bb
movl %eax, 0xc(%rsp)
movq %r13, %rdi
callq 0x281de6
movq %rbp, %rdi
callq 0x281de6
cmpl $0x0, 0xc(%rsp)
movl 0x8(%rsp), %r13d
jne 0x2ca64f
jmp 0x2ca7b0
movq %r13, %rdi
callq 0x281de6
movq %rbp, %rdi
callq 0x281de6
movl 0x8(%rsp), %r13d
movl 0x4(%r14), %eax
movl 0x4(%rbx), %ecx
movl %ecx, %ebp
orl %eax, %ebp
btl $0xa, %ebp
jb 0x2ca750
movzbl (%r14), %edx
cmpl $0x47, %edx
je 0x2ca766
cmpb (%rbx), %dl
jne 0x2ca766
movl %edx, %esi
orl $0x2, %esi
cmpl $0xa6, %esi
jne 0x2ca7c2
movl 0x4(%rbx), %eax
xorl 0x4(%r14), %eax
movl $0x2, %r12d
testl $0x202, %eax            # imm = 0x202
jne 0x2ca7b0
btl $0xe, %ebp
jb 0x2ca761
btl $0xb, %ebp
jb 0x2ca7b0
testb $0x8, %bpl
jne 0x2ca6d7
movq 0x10(%r14), %rsi
movq 0x10(%rbx), %rdx
movq %r15, %rdi
movl %r13d, %ecx
callq 0x2ca527
testl %eax, %eax
jne 0x2ca7b0
movq 0x18(%r14), %rsi
movq 0x18(%rbx), %rdx
movq %r15, %rdi
movl %r13d, %ecx
callq 0x2ca527
testl %eax, %eax
jne 0x2ca7b0
movq 0x20(%r14), %rdi
movq 0x20(%rbx), %rsi
movl %r13d, %edx
callq 0x2ca9c8
testl %eax, %eax
jne 0x2ca7b0
movzbl (%r14), %eax
cmpl $0x73, %eax
je 0x2ca761
cmpl $0xa7, %eax
je 0x2ca761
btl $0xd, %ebp
jb 0x2ca761
movzwl 0x30(%r14), %ecx
cmpw 0x30(%rbx), %cx
jne 0x2ca7b0
cmpb $-0x54, %al
jne 0x2ca73c
movb 0x2(%rbx), %cl
cmpb %cl, 0x2(%r14)
jne 0x2ca7b0
cmpb $0x31, %al
je 0x2ca761
movl 0x2c(%r14), %eax
cmpl %r13d, %eax
je 0x2ca761
cmpl 0x2c(%rbx), %eax
jne 0x2ca7b0
jmp 0x2ca761
andl %ecx, %eax
btl $0xa, %eax
jae 0x2ca7aa
movl 0x8(%r14), %eax
cmpl 0x8(%rbx), %eax
jne 0x2ca7aa
xorl %r12d, %r12d
jmp 0x2ca7b0
cmpl $0x6f, %edx
jne 0x2ca788
movq 0x10(%r14), %rsi
movq %r15, %rdi
movq %rbx, %rdx
movl %r13d, %ecx
callq 0x2ca527
movl $0x1, %r12d
cmpl $0x2, %eax
jb 0x2ca7b0
cmpb $0x6f, (%rbx)
jne 0x2ca7aa
movq 0x10(%rbx), %rdx
movq %r15, %rdi
movq %r14, %rsi
movl %r13d, %ecx
callq 0x2ca527
movl $0x1, %r12d
cmpl $0x2, %eax
jb 0x2ca7b0
movl $0x2, %r12d
movl %r12d, %eax
addq $0x18, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movq 0x8(%r14), %rdi
testq %rdi, %rdi
je 0x2ca68a
cmpl $0xa4, %edx
jg 0x2ca7ee
cmpl $0x6f, %edx
je 0x2ca89a
cmpl $0x77, %edx
je 0x2ca761
jmp 0x2ca875
cmpl $0xa9, %edx
je 0x2ca7fe
cmpl $0xa5, %edx
jne 0x2ca875
movq 0x8(%rbx), %rdx
xorl %esi, %esi
leaq 0x110255(%rip), %r8     # 0x3daa60
movzbl (%rdi,%rsi), %r9d
movzbl (%rdx,%rsi), %r10d
cmpb %r10b, %r9b
jne 0x2ca821
testq %r9, %r9
jne 0x2ca82b
jmp 0x2ca830
movb (%r9,%r8), %r11b
cmpb (%r10,%r8), %r11b
jne 0x2ca830
incq %rsi
jmp 0x2ca80b
movl $0x2, %r12d
cmpb %r10b, %r9b
jne 0x2ca7b0
andl $0x1000000, %eax        # imm = 0x1000000
movl %eax, %edx
shrl $0x18, %edx
btl $0x18, %ecx
sbbl $0x0, %edx
jne 0x2ca7b0
testl %eax, %eax
je 0x2ca68a
movq 0x40(%r14), %rsi
movq 0x40(%rbx), %rdx
movq %r15, %rdi
movl $0x1, %ecx
callq 0x2ca8e1
jmp 0x2ca88d
movq 0x8(%rbx), %rsi
testq %rsi, %rsi
je 0x2ca68a
callq 0x17a40
movl $0x2, %r12d
testl %eax, %eax
jne 0x2ca7b0
jmp 0x2ca68a
movq 0x8(%rbx), %rax
movl $0x2, %r12d
testq %rax, %rax
je 0x2ca7b0
xorl %ecx, %ecx
leaq 0x1101aa(%rip), %rdx    # 0x3daa60
movzbl (%rdi,%rcx), %esi
movzbl (%rax,%rcx), %r8d
cmpb %r8b, %sil
jne 0x2ca8ce
testq %rsi, %rsi
jne 0x2ca8dc
jmp 0x2ca68a
movb (%rsi,%rdx), %sil
cmpb (%r8,%rdx), %sil
jne 0x2ca7b0
incq %rcx
jmp 0x2ca8b6