// File: /workspace/github_c_makefile_star2_O1/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, -0x2c(%rbp)
movq %rdi, %r13
movq (%rdi), %rax
movq 0x28(%rax), %r14
movq (%rdx), %rdi
movl $0x1, %esi
callq 0x11820
movq %rax, %rbx
movq 0x8(%r12), %rdi
movl $0x1, %esi
callq 0x11820
movq %rax, %r15
movq (%r12), %rdi
movl $0x1, %esi
callq 0x116f1
cmpl 0x88(%r14), %eax
jle 0x70b2c
movl $0x1, 0x24(%r13)
movb $0x1, 0x29(%r13)
movq (%r13), %rdi
leaq 0xf97d(%rip), %rsi      # 0x80485
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 0x11b32
xorl %ecx, %ecx
cmpl $0x3, -0x2c(%rbp)
jne 0x70bcc
movq 0x10(%r12), %rdi
movl $0x1, %esi
callq 0x11820
movq %rax, -0x38(%rbp)
testq %rax, %rax
je 0x70bc4
movb (%rax), %dl
testb %dl, %dl
sete %cl
cmpq $-0x1, %rax
sete %sil
orb %cl, %sil
jne 0x70b96
xorl %esi, %esi
movl %esi, %ecx
cmpb $-0x40, %dl
jb 0x70b7c
movb 0x1(%rax), %dl
incq %rax
andb $-0x40, %dl
negb %dl
jo 0x70b6d
jmp 0x70b7f
incq %rax
cmpq $-0x1, %rax
je 0x70b8e
leal 0x1(%rcx), %esi
movb (%rax), %dl
testb %dl, %dl
jne 0x70b66
testl %ecx, %ecx
je 0x70c2f
movl $0x1, 0x24(%r13)
movb $0x1, 0x29(%r13)
movq (%r13), %rdi
leaq 0xf8f8(%rip), %rsi      # 0x804a6
movl $0xffffffff, %edx       # imm = 0xFFFFFFFF
movl $0x1, %ecx
movq $-0x1, %r8
callq 0x11b32
xorl %eax, %eax
xorl %ecx, %ecx
testb %al, %al
je 0x70c20
testq %r15, %r15
setne %al
testq %rbx, %rbx
setne %dl
andb %al, %dl
cmpb $0x1, %dl
jne 0x70c20
movq 0x8(%r13), %rax
movq 0x8(%rax), %rdx
movq %rbx, %rdi
movq %r15, %rsi
callq 0x155bd
movq (%r13), %rdi
movslq %eax, %rsi
movzwl 0x8(%rdi), %eax
testl $0x2460, %eax           # imm = 0x2460
je 0x70c17
addq $0x18, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
jmp 0x2b86a
movq %rsi, (%rdi)
movw $0x4, 0x8(%rdi)
addq $0x18, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
leaq -0x38(%rbp), %rdi
callq 0x400f1
movl %eax, %ecx
movb $0x1, %al
jmp 0x70bc8