// File: /workspace/github_c_makefile_star2_O0/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
subq $0x50, %rsp
movq %rdi, -0x8(%rbp)
movl %esi, -0xc(%rbp)
movq %rdx, -0x18(%rbp)
movl $0x0, -0x2c(%rbp)
movq -0x8(%rbp), %rdi
callq 0xb580
movq %rax, -0x38(%rbp)
movq -0x18(%rbp), %rax
movq (%rax), %rdi
callq 0xb960
movq %rax, -0x28(%rbp)
movq -0x18(%rbp), %rax
movq 0x8(%rax), %rdi
callq 0xb960
movq %rax, -0x20(%rbp)
movq -0x18(%rbp), %rax
movq (%rax), %rdi
callq 0xb6f0
movl %eax, -0x30(%rbp)
movl -0x30(%rbp), %eax
movq -0x38(%rbp), %rcx
cmpl 0x88(%rcx), %eax
jle 0x966d0
movq -0x8(%rbp), %rdi
leaq 0x12712(%rip), %rsi     # 0xa8dd3
movl $0xffffffff, %edx       # imm = 0xFFFFFFFF
callq 0xb240
jmp 0x96768
cmpl $0x3, -0xc(%rbp)
jne 0x96726
movq -0x18(%rbp), %rax
movq 0x10(%rax), %rdi
callq 0xb960
movq %rax, -0x40(%rbp)
cmpq $0x0, -0x40(%rbp)
jne 0x966f0
jmp 0x96768
movq -0x40(%rbp), %rdi
movl $0xffffffff, %esi       # imm = 0xFFFFFFFF
callq 0x58550
cmpl $0x1, %eax
je 0x9671a
movq -0x8(%rbp), %rdi
leaq 0x126e6(%rip), %rsi     # 0xa8df4
movl $0xffffffff, %edx       # imm = 0xFFFFFFFF
callq 0xb240
jmp 0x96768
leaq -0x40(%rbp), %rdi
callq 0x57a90
movl %eax, -0x2c(%rbp)
cmpq $0x0, -0x20(%rbp)
je 0x96768
cmpq $0x0, -0x28(%rbp)
je 0x96768
movq -0x8(%rbp), %rdi
callq 0xb130
movq %rax, -0x48(%rbp)
movq -0x8(%rbp), %rax
movq %rax, -0x50(%rbp)
movq -0x28(%rbp), %rdi
movq -0x20(%rbp), %rsi
movq -0x48(%rbp), %rdx
movl -0x2c(%rbp), %ecx
callq 0x18c30
movq -0x50(%rbp), %rdi
movl %eax, %esi
callq 0xb2c0
addq $0x50, %rsp
popq %rbp
retq
nop