anchor.diff:  begin
    result:=false;
   
  - Input:=ThreadLocalState.Input;
  - InputLength:=ThreadLocalState.InputLength;
  -
  - CurrentThreadList:=@ThreadLocalState.ThreadLists[0];
  - NewThreadList:=@ThreadLocalState.ThreadLists[1];
  + Input:=ThreadLocalStorage.Input;
  + InputLength:=ThreadLocalStorage.InputLength;
  +
  + CurrentThreadList:=@ThreadLocalStorage.ThreadLists[0];
  + NewThreadList:=@ThreadLocalStorage.ThreadLists[1];
   
    CurrentThreadList^.Count:=0;
    NewThreadList^.Count:=0;
   
  - SubMatches:=ThreadLocalState.SubMatchesAllocate(CountSubMatches,0);
  -
  - inc(ThreadLocalState.Generation);
  + SubMatches:=ThreadLocalStorage.SubMatchesAllocate(CountSubMatches,0);
  +
  + inc(ThreadLocalStorage.Generation);
    if UnanchoredStart then begin
  -  ThreadLocalState.AddThread(ThreadLocalState,CurrentThreadList,UnanchoredStartInstruction,SubMatches,StartPosition);
  +  ThreadLocalStorage.AddThread(CurrentThreadList,UnanchoredStartInstruction,SubMatches,StartPosition);
    end else begin
  -  ThreadLocalState.AddThread(ThreadLocalState,CurrentThreadList,AnchoredStartInstruction,SubMatches,StartPosition);
  +  ThreadLocalStorage.AddThread(CurrentThreadList,AnchoredStartInstruction,SubMatches,StartPosition);
    end;
   
    Matched:=nil;
  
positive.code:       end;*)
       end;
      end;
      result:=SearchMatchParallelNFA(ThreadLocalState,Captures,StartPosition,UntilExcludingPosition,UnanchoredStart);
     end;
     break;
    until true;
   finally
    ThreadLocalStateCriticalSection.Enter;
    try
     ThreadLocalState.FreeNext:=FreeThreadLocalStates;
     FreeThreadLocalStates:=ThreadLocalState;
    finally
     ThreadLocalStateCriticalSection.Leave;
    end;
   end;
  end;
  
negative.code:  end;
  end;
  
  procedure TFLREThreadLocalStorage.DFAFreeUsedStatePool;
  var Pool,NextPool:PFLREDFAStatePool;
      State:PFLREDFAState;
  begin
  