// File: /workspace/github_c_makefile_star2_O0/shifengbin[P]bishe/Output/../Persistence/sqlite3.c
// Function: sqlite3MemCompare
SQLITE_PRIVATE int sqlite3MemCompare(const Mem *pMem1, const Mem *pMem2, const CollSeq *pColl){
  int f1, f2;
  int combined_flags;

  f1 = pMem1->flags;
  f2 = pMem2->flags;
  combined_flags = f1|f2;
  assert( (combined_flags & MEM_RowSet)==0 );
 
  /* If one value is NULL, it is less than the other. If both values
  ** are NULL, return 0.
  */
  if( combined_flags&MEM_Null ){
    return (f2&MEM_Null) - (f1&MEM_Null);
  }

  /* At least one of the two values is a number
  */
  if( combined_flags&(MEM_Int|MEM_Real) ){
    if( (f1 & f2 & MEM_Int)!=0 ){
      if( pMem1->u.i < pMem2->u.i ) return -1;
      if( pMem1->u.i > pMem2->u.i ) return +1;
      return 0;
    }
    if( (f1 & f2 & MEM_Real)!=0 ){
      if( pMem1->u.r < pMem2->u.r ) return -1;
      if( pMem1->u.r > pMem2->u.r ) return +1;
      return 0;
    }
    if( (f1&MEM_Int)!=0 ){
      if( (f2&MEM_Real)!=0 ){
        return sqlite3IntFloatCompare(pMem1->u.i, pMem2->u.r);
      }else{
        return -1;
      }
    }
    if( (f1&MEM_Real)!=0 ){
      if( (f2&MEM_Int)!=0 ){
        return -sqlite3IntFloatCompare(pMem2->u.i, pMem1->u.r);
      }else{
        return -1;
      }
    }
    return +1;
  }

  /* If one value is a string and the other is a blob, the string is less.
  ** If both are strings, compare using the collating functions.
  */
  if( combined_flags&MEM_Str ){
    if( (f1 & MEM_Str)==0 ){
      return 1;
    }
    if( (f2 & MEM_Str)==0 ){
      return -1;
    }

    assert( pMem1->enc==pMem2->enc || pMem1->db->mallocFailed );
    assert( pMem1->enc==SQLITE_UTF8 || 
            pMem1->enc==SQLITE_UTF16LE || pMem1->enc==SQLITE_UTF16BE );

    /* The collation sequence must be defined at this point, even if
    ** the user deletes the collation sequence after the vdbe program is
    ** compiled (this was not always the case).
    */
    assert( !pColl || pColl->xCmp );

    if( pColl ){
      return vdbeCompareMemString(pMem1, pMem2, pColl, 0);
    }
    /* If a NULL pointer was passed as the collate function, fall through
    ** to the blob case and use memcmp().  */
  }
 
  /* Both values must be blobs.  Compare using memcmp().  */
  return sqlite3BlobCompare(pMem1, pMem2);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x30, %rsp
movq %rdi, -0x10(%rbp)
movq %rsi, -0x18(%rbp)
movq %rdx, -0x20(%rbp)
movq -0x10(%rbp), %rax
movzwl 0x8(%rax), %eax
movl %eax, -0x24(%rbp)
movq -0x18(%rbp), %rax
movzwl 0x8(%rax), %eax
movl %eax, -0x28(%rbp)
movl -0x24(%rbp), %eax
orl -0x28(%rbp), %eax
movl %eax, -0x2c(%rbp)
movl -0x2c(%rbp), %eax
andl $0x1, %eax
cmpl $0x0, %eax
je 0x43154
movl -0x28(%rbp), %eax
andl $0x1, %eax
movl -0x24(%rbp), %ecx
andl $0x1, %ecx
subl %ecx, %eax
movl %eax, -0x4(%rbp)
jmp 0x432fa
movl -0x2c(%rbp), %eax
andl $0xc, %eax
cmpl $0x0, %eax
je 0x43294
movl -0x24(%rbp), %eax
andl -0x28(%rbp), %eax
andl $0x4, %eax
cmpl $0x0, %eax
je 0x431b5
movq -0x10(%rbp), %rax
movq (%rax), %rax
movq -0x18(%rbp), %rcx
cmpq (%rcx), %rax
jge 0x4318d
movl $0xffffffff, -0x4(%rbp) # imm = 0xFFFFFFFF
jmp 0x432fa
movq -0x10(%rbp), %rax
movq (%rax), %rax
movq -0x18(%rbp), %rcx
cmpq (%rcx), %rax
jle 0x431a9
movl $0x1, -0x4(%rbp)
jmp 0x432fa
movl $0x0, -0x4(%rbp)
jmp 0x432fa
movl -0x24(%rbp), %eax
andl -0x28(%rbp), %eax
andl $0x8, %eax
cmpl $0x0, %eax
je 0x4320f
movq -0x10(%rbp), %rax
movsd (%rax), %xmm1
movq -0x18(%rbp), %rax
movsd (%rax), %xmm0
ucomisd %xmm1, %xmm0
jbe 0x431e5
movl $0xffffffff, -0x4(%rbp) # imm = 0xFFFFFFFF
jmp 0x432fa
movq -0x10(%rbp), %rax
movsd (%rax), %xmm0
movq -0x18(%rbp), %rax
ucomisd (%rax), %xmm0
jbe 0x43203
movl $0x1, -0x4(%rbp)
jmp 0x432fa
movl $0x0, -0x4(%rbp)
jmp 0x432fa
movl -0x24(%rbp), %eax
andl $0x4, %eax
cmpl $0x0, %eax
je 0x4324d
movl -0x28(%rbp), %eax
andl $0x8, %eax
cmpl $0x0, %eax
je 0x43241
movq -0x10(%rbp), %rax
movq (%rax), %rdi
movq -0x18(%rbp), %rax
movsd (%rax), %xmm0
callq 0x484b0
movl %eax, -0x4(%rbp)
jmp 0x432fa
movl $0xffffffff, -0x4(%rbp) # imm = 0xFFFFFFFF
jmp 0x432fa
movl -0x24(%rbp), %eax
andl $0x8, %eax
cmpl $0x0, %eax
je 0x4328b
movl -0x28(%rbp), %eax
andl $0x4, %eax
cmpl $0x0, %eax
je 0x43282
movq -0x18(%rbp), %rax
movq (%rax), %rdi
movq -0x10(%rbp), %rax
movsd (%rax), %xmm0
callq 0x484b0
movl %eax, %ecx
xorl %eax, %eax
subl %ecx, %eax
movl %eax, -0x4(%rbp)
jmp 0x432fa
movl $0xffffffff, -0x4(%rbp) # imm = 0xFFFFFFFF
jmp 0x432fa
movl $0x1, -0x4(%rbp)
jmp 0x432fa
movl -0x2c(%rbp), %eax
andl $0x2, %eax
cmpl $0x0, %eax
je 0x432ea
movl -0x24(%rbp), %eax
andl $0x2, %eax
cmpl $0x0, %eax
jne 0x432b3
movl $0x1, -0x4(%rbp)
jmp 0x432fa
movl -0x28(%rbp), %eax
andl $0x2, %eax
cmpl $0x0, %eax
jne 0x432c7
movl $0xffffffff, -0x4(%rbp) # imm = 0xFFFFFFFF
jmp 0x432fa
cmpq $0x0, -0x20(%rbp)
je 0x432e8
movq -0x10(%rbp), %rdi
movq -0x18(%rbp), %rsi
movq -0x20(%rbp), %rdx
xorl %eax, %eax
movl %eax, %ecx
callq 0x48510
movl %eax, -0x4(%rbp)
jmp 0x432fa
jmp 0x432ea
movq -0x10(%rbp), %rdi
movq -0x18(%rbp), %rsi
callq 0x486b0
movl %eax, -0x4(%rbp)
movl -0x4(%rbp), %eax
addq $0x30, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)