anchor.diff:   end;
    result:=-1;
   end;
  +{$ifend}
   
   function FLREPtrCopy(const Src:PFLRERawByteChar;const From,Len:longint):TFLRERawByteString;
   begin
  
positive.code: {$endif}
  
  function PtrPosBoyerMoore(const Pattern:TFLRERawByteString;const Text:PFLRERawByteChar;const TextLength:longint;const Skip:TFLRECharPatternBitMasks;const Next:TFLREBoyerMooreNext;Position:longint=0):longint;
  var PatternPosition,BadSkip,GoodSkip,PatternLength:longint;
  begin
   PatternLength:=length(Pattern);
  
negative.code:  end;
   result:=-1;
  end;
  {$ifend}
  
  function PtrPosPatternSBNDMQ1(PatternLength:longint;const Text:PFLRERawByteChar;TextLength:longint;const PatternBitMasks:TFLRECharPatternBitMasks;Position:longint=0):longint;
  {$if defined(cpux86_64) and defined(Windows) and not defined(fpc)}assembler; register;
  asm
   // ecx = PatternLength
   // rdx = Text
   // r8d = TextLength
   // r9 = PatternBitMasks
   // r11d = Position
   // eax = result
   // ebx = CheckPosition
   // esi = State
   lea rsp,qword ptr [rsp-32]
   mov qword ptr [rbp-24],rbx
   mov qword ptr [rbp-16],rdi
   mov qword ptr [rbp-8],rsi
   mov r11d,dword ptr [rbp+48]
  
   // inc(Position,PatternLength-1);
   lea eax,dword ptr [ecx-1]
   add r11d,eax
  
   // while Position<TextLength do begin
   jmp @Loop0Start
  
   .align 8
  @Loop0:
  
   // State:=PatternBitMasks[Text[Position]];
   movsxd r10,r11d
   movzx r10d,byte ptr [rdx+r10*1]
   mov esi,dword ptr [r9+r10*4]
  
   // if State<>0 then begin
   test esi,esi
   je @NextPosition
  
   // CheckPosition:=Position-PatternLength;
   mov r10d,r11d
   sub r10d,ecx
   mov ebx,r10d
  
   .align 8
   @Loop1:
  
   // dec(Position);
   sub r11d,1
  
   // if Position<0 then begin
   js @Loop1Break
  //cmp r11d,0
  //jl @Loop1Break
  
   // State:=(State shr 1) and PatternBitMasks[Text[Position]];
   movsxd r10,r11d
   movzx edi,byte ptr [rdx+r10*1]
   mov r10d,esi
   shr r10d,1
   mov edi,dword ptr [r9+rdi*4]
   and r10d,edi
   mov esi,r10d
  
   // until State=0;
   test esi,esi
   jne @Loop1
  @Loop1Break:
  
   // if Position=CheckPosition then begin
   cmp r11d,ebx
   jne @NextPosition
  
   // result:=CheckPosition+1;
   lea r10d,dword ptr [ebx+1]
   mov eax,r10d
  
   // exit;
   jmp @Done
  
  @NextPosition:
   // inc(Position,PatternLength);
   add r11d,ecx
  
  @Loop0Start:
   cmp r11d,r8d
   jl @Loop0
  
   // result:=-1;
   mov eax,-1
  
  @Done:
  
   // end;
   mov rbx,qword ptr [rbp-24]
   mov rdi,qword ptr [rbp-16]
   mov rsi,qword ptr [rbp-8]
  end;
  {$else}
  var CheckPosition:longint;
      State:longword;
  begin
  