// File: /workspace/github_c_makefile_star2_O2/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
movq %rdx, %rbx
movq %rsi, %r14
testq %rsi, %rsi
setne %al
testq %rdx, %rdx
setne %dl
testb %dl, %al
jne 0x268272
xorl %r12d, %r12d
cmpq %r14, %rbx
setne %r12b
addl %r12d, %r12d
jmp 0x26858d
movq %rdi, %r8
testq %rdi, %rdi
je 0x268366
cmpb $-0x67, (%r14)
jne 0x268366
movl %ecx, 0x4(%rsp)
leaq 0x10(%rsp), %r12
andq $0x0, (%r12)
movq (%r8), %rdi
pushq $0x1
popq %rbp
pushq $0x41
popq %rcx
movq %rbx, %rsi
movl %ebp, %edx
movq %r8, %r15
movq %r12, %r8
callq 0x267878
movq (%r12), %r13
testq %r13, %r13
je 0x268345
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 0x268732
testq %rax, %rax
je 0x26834e
movq %rax, %rbp
movl 0x8(%rax), %eax
movabsq $0x4000400040004, %rcx  # imm = 0x4000400040004
btq %rax, %rcx
jae 0x26830f
movq %rbp, %rdi
callq 0x2243e3
xorl %r12d, %r12d
movq %rbp, %rdi
movq %r13, %rsi
xorl %edx, %edx
callq 0x2424a0
movl %eax, %r15d
movq %r13, %rdi
callq 0x2245fd
movq %rbp, %rdi
callq 0x2245fd
testl %r15d, %r15d
movl 0x4(%rsp), %ecx
movq 0x8(%rsp), %r8
jne 0x268366
jmp 0x26858d
movl 0x4(%rsp), %ecx
movq %r15, %r8
jmp 0x268366
movq %r13, %rdi
callq 0x2245fd
xorl %edi, %edi
callq 0x2245fd
movl 0x4(%rsp), %ecx
movq 0x8(%rsp), %r8
movl 0x4(%r14), %r13d
movl 0x4(%rbx), %ebp
movl %ebp, %r15d
orl %r13d, %r15d
btl $0xa, %r15d
jb 0x2683df
movzbl (%r14), %eax
movb (%rbx), %dil
cmpb %dil, %al
sete %dl
cmpb $0x47, %al
setne %sil
testb %dl, %sil
jne 0x2683ff
pushq $0x1
popq %r12
cmpl $0x6f, %eax
jne 0x2683c0
movq 0x10(%r14), %rsi
movq %r8, %r15
movq %r8, %rdi
movq %rbx, %rdx
movl %ecx, %ebp
callq 0x26823c
cmpl $0x2, %eax
jb 0x26858d
movb (%rbx), %dil
movl %ebp, %ecx
movq %r15, %r8
cmpb $0x6f, %dil
jne 0x2683f6
movq 0x10(%rbx), %rdx
movq %r8, %rdi
movq %r14, %rsi
callq 0x26823c
cmpl $0x2, %eax
jae 0x2683f6
jmp 0x26858d
andl %ebp, %r13d
btl $0xa, %r13d
jae 0x2683f6
movl 0x8(%r14), %eax
cmpl 0x8(%rbx), %eax
je 0x26858a
pushq $0x2
popq %r12
jmp 0x26858d
movl %eax, %edx
orl $0x2, %edx
cmpl $0xa6, %edx
movl %ecx, 0x4(%rsp)
jne 0x2684fc
xorl %r13d, %ebp
pushq $0x2
popq %r12
testw $0x202, %bp             # imm = 0x202
jne 0x26858d
btl $0xe, %r15d
movl 0x4(%rsp), %ebp
jb 0x26858a
btl $0xb, %r15d
jb 0x26858d
testb $0x8, %r15b
jne 0x268466
movq 0x10(%r14), %rsi
movq 0x10(%rbx), %rdx
movq %r8, %rdi
movl %ebp, %ecx
movq %r8, %r13
callq 0x26823c
movq %r13, %r8
testl %eax, %eax
jne 0x26858d
movq 0x18(%r14), %rsi
movq 0x18(%rbx), %rdx
movq %r8, %rdi
movl %ebp, %ecx
callq 0x26823c
testl %eax, %eax
jne 0x26858d
movq 0x20(%r14), %rdi
movq 0x20(%rbx), %rsi
movl %ebp, %edx
callq 0x2686a9
testl %eax, %eax
jne 0x26858d
movzbl (%r14), %eax
cmpl $0x73, %eax
je 0x26858a
cmpl $0xa7, %eax
je 0x26858a
btl $0xd, %r15d
jb 0x26858a
movzwl 0x30(%r14), %ecx
cmpw 0x30(%rbx), %cx
jne 0x26858d
cmpb $-0x54, %al
jne 0x2684da
movb 0x2(%rbx), %cl
cmpb %cl, 0x2(%r14)
jne 0x26858d
cmpb $0x31, %al
je 0x26858a
movl 0x2c(%r14), %eax
cmpl %ebp, %eax
je 0x26858a
cmpl 0x2c(%rbx), %eax
jne 0x26858d
jmp 0x26858a
movq 0x8(%r14), %rdi
testq %rdi, %rdi
je 0x268414
cmpl $0x6f, %eax
je 0x26859f
cmpl $0x77, %eax
je 0x26858a
cmpl $0xa9, %eax
je 0x268529
cmpl $0xa5, %eax
jne 0x2685ad
movq %r8, 0x8(%rsp)
movq 0x8(%rbx), %rsi
callq 0x221779
pushq $0x2
popq %r12
testl %eax, %eax
jne 0x26858d
movl %r13d, %eax
andl $0x1000000, %eax        # imm = 0x1000000
movl %eax, %ecx
shrl $0x18, %ecx
btl $0x18, %ebp
sbbl $0x0, %ecx
jne 0x26858d
testl %eax, %eax
movq 0x8(%rsp), %r8
je 0x268414
movq 0x40(%r14), %rsi
movq 0x40(%rbx), %rdx
pushq $0x1
popq %rcx
movq %r8, %rdi
callq 0x2685d2
movq 0x8(%rsp), %r8
testl %eax, %eax
jne 0x26858d
movl 0x4(%r14), %r13d
movl 0x4(%rbx), %ebp
jmp 0x268414
xorl %r12d, %r12d
movl %r12d, %eax
addq $0x18, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movq 0x8(%rbx), %rsi
movq %r8, %r12
callq 0x221763
jmp 0x2685c2
movq 0x8(%rbx), %rsi
testq %rsi, %rsi
je 0x268414
movq %r8, %r12
callq 0x179e0
movq %r12, %r8
testl %eax, %eax
jne 0x2683f6
jmp 0x268414