// File: /workspace/github_c_makefile_star2_O3/shifengbin[P]bishe/Output/../Persistence/sqlite3.c
// Function: likeFunc
static void likeFunc(
  sqlite3_context *context, 
  int argc, 
  sqlite3_value **argv
){
  const unsigned char *zA, *zB;
  u32 escape = 0;
  int nPat;
  sqlite3 *db = sqlite3_context_db_handle(context);

#ifdef SQLITE_LIKE_DOESNT_MATCH_BLOBS
  if( sqlite3_value_type(argv[0])==SQLITE_BLOB
   || sqlite3_value_type(argv[1])==SQLITE_BLOB
  ){
#ifdef SQLITE_TEST
    sqlite3_like_count++;
#endif
    sqlite3_result_int(context, 0);
    return;
  }
#endif
  zB = sqlite3_value_text(argv[0]);
  zA = sqlite3_value_text(argv[1]);

  /* Limit the length of the LIKE or GLOB pattern to avoid problems
  ** of deep recursion and N*N behavior in patternCompare().
  */
  nPat = sqlite3_value_bytes(argv[0]);
  testcase( nPat==db->aLimit[SQLITE_LIMIT_LIKE_PATTERN_LENGTH] );
  testcase( nPat==db->aLimit[SQLITE_LIMIT_LIKE_PATTERN_LENGTH]+1 );
  if( nPat > db->aLimit[SQLITE_LIMIT_LIKE_PATTERN_LENGTH] ){
    sqlite3_result_error(context, "LIKE or GLOB pattern too complex", -1);
    return;
  }
  assert( zB==sqlite3_value_text(argv[0]) );  /* Encoding did not change */

  if( argc==3 ){
    /* The escape character string must consist of a single UTF-8 character.
    ** Otherwise, return an error.
    */
    const unsigned char *zEsc = sqlite3_value_text(argv[2]);
    if( zEsc==0 ) return;
    if( sqlite3Utf8CharLen((char*)zEsc, -1)!=1 ){
      sqlite3_result_error(context, 
          "ESCAPE expression must be a single character", -1);
      return;
    }
    escape = sqlite3Utf8Read(&zEsc);
  }
  if( zA && zB ){
    struct compareInfo *pInfo = sqlite3_user_data(context);
#ifdef SQLITE_TEST
    sqlite3_like_count++;
#endif
    
    sqlite3_result_int(context, patternCompare(zB, zA, pInfo, escape));
  }
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x18, %rsp
movq %rdx, %r12
movl %esi, %r13d
movq %rdi, %rbx
movq (%rdi), %rax
movq 0x28(%rax), %r14
movq (%rdx), %rdi
movl $0x1, %esi
callq 0x118a2
movq %rax, -0x30(%rbp)
movq 0x8(%r12), %rdi
movl $0x1, %esi
callq 0x118a2
movq %rax, %r15
movq (%r12), %rdi
movl $0x1, %esi
callq 0x11773
cmpl 0x88(%r14), %eax
jle 0x6f5c9
movl $0x1, 0x24(%rbx)
movb $0x1, 0x29(%rbx)
movq (%rbx), %rdi
leaq 0xeef0(%rip), %rsi      # 0x7e495
movl $0xffffffff, %edx       # imm = 0xFFFFFFFF
movl $0x1, %ecx
movq $-0x1, %r8
addq $0x18, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
jmp 0x11bc0
xorl %ecx, %ecx
cmpl $0x3, %r13d
jne 0x6f66f
movq 0x10(%r12), %rdi
movl $0x1, %esi
callq 0x118a2
movq %rax, -0x38(%rbp)
testq %rax, %rax
je 0x6f6c3
movb (%rax), %cl
testb %cl, %cl
sete %dl
cmpq $-0x1, %rax
sete %sil
orb %dl, %sil
jne 0x6f637
xorl %esi, %esi
movl %esi, %edx
cmpb $-0x40, %cl
jb 0x6f621
movb 0x1(%rax), %cl
incq %rax
movl %ecx, %esi
andb $-0x40, %sil
negb %sil
jo 0x6f60e
jmp 0x6f626
incq %rax
movb (%rax), %cl
testb %cl, %cl
je 0x6f633
leal 0x1(%rdx), %esi
cmpq $-0x1, %rax
jne 0x6f607
testl %edx, %edx
je 0x6f664
movl $0x1, 0x24(%rbx)
movb $0x1, 0x29(%rbx)
movq (%rbx), %rdi
leaq 0xee6a(%rip), %rsi      # 0x7e4b6
movl $0xffffffff, %edx       # imm = 0xFFFFFFFF
movl $0x1, %ecx
movq $-0x1, %r8
callq 0x11bc0
jmp 0x6f6c3
leaq -0x38(%rbp), %rdi
callq 0x3f100
movl %eax, %ecx
testq %r15, %r15
setne %al
movq -0x30(%rbp), %rdi
testq %rdi, %rdi
setne %dl
andb %al, %dl
cmpb $0x1, %dl
jne 0x6f6c3
movq 0x8(%rbx), %rax
movq 0x8(%rax), %rdx
movq %r15, %rsi
callq 0x15633
movq (%rbx), %rdi
movslq %eax, %rsi
movzwl 0x8(%rdi), %eax
testl $0x2460, %eax           # imm = 0x2460
je 0x6f6ba
addq $0x18, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
jmp 0x2b3da
movq %rsi, (%rdi)
movw $0x4, 0x8(%rdi)
addq $0x18, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq