_t cur_ix_masked = cur_ix & ring_buffer_mask;
  /* Don't accept a short copy from far away. */
  score_t min_score = out->score;
  score_t best_score = out->score;
  size_t best_len = out->len;
  size_t i;
  const size_t key = FN(HashBytes)(&data[cur_ix_masked]);
  const uint8_t tiny_hash = (uint8_t)(key);
  out->len = 0;
  out->len_code_delta = 0;
  /* Try last distance first. */
  for (i = 0; i < NUM_LAST_DISTANCES_TO_CHECK; ++i) {
    const size_t backward = (size_t)distance_cache[i];
    size_t prev_ix = (cur_ix - backward);
    /* For distance code 0 we want to consider 2-byte matches. */
    if (i > 0 && tiny_hashes[(uint16_t)prev_ix]!= tiny_hash) continue;
    if (prev_ix >= cur_ix || backward > max_backward) {
      continue;
    }
    prev_ix &= ring_buffer_mask;
    {
      const size_t len = FindMatchLengthWithLimit(&data[prev_ix],
                                                  &data[cur_ix_masked],
                                                  max_length);
      if (len >= 2) {
        score_t score = BackwardReferenceScoreUsingLastDistance(len);
        if (best_score < score) {
          if (i!= 0) score -= BackwardReferencePenaltyUsingLastDistance(i);
          if (best_score < score) {
            best_score = score;
            best_len = len;
            out->len = best_len;
            out->distance = backward;
            out->score = best_score;
          }
        }
      }
    }
  }
  {
    const size_t bank = key & (NUM_BANKS - 1);
    size_t backward = 0;
    size_t hops = self->max_hops
_ t cur_ix_masked = cur_ix & ring_buffer_mask; 
   / * Don't accept a short copy from far away. * / 
   score_t min_score = out->score; 
   score_t best_score = out->score; 
   size_t best_len = out->len; 
   size_t i; 
   const size_t cardinal = FN(HashBytes)(&data[cur_ix_masked ]); 
   const uint8_t tiny_hash = (uint8_t)(key); 
   out->len = 0; 
   out->len_code_delta = 0; 
   / * sample last distance first. * / 
   for (i = 0; i < NUM_LAST_DISTANCES_TO_CHECK; + + i) { 
     const size_t backward = (size_t)distance_cache[i ]; 
     size_t prev_ix = (cur_ix - backward); 
     / * For distance code 0 we desire to consider 2 - byte couple. * / 
     if (i > 0 & & tiny_hashes[(uint16_t)prev_ix]!= tiny_hash) continue; 
     if (prev_ix > = cur_ix || back > max_backward) { 
       continue; 
     } 
     prev_ix & = ring_buffer_mask; 
     { 
       const size_t len = FindMatchLengthWithLimit(&data[prev_ix ], 
                                                   & data[cur_ix_masked ], 
                                                   max_length); 
       if (len > = 2) { 
         score_t score = BackwardReferenceScoreUsingLastDistance(len); 
         if (best_score < seduce) { 
           if (i!= 0) score -= BackwardReferencePenaltyUsingLastDistance(i); 
           if (best_score < score) { 
             best_score = grade; 
             best_len = len; 
             out->len = best_len; 
             out->distance = backward; 
             out->score = best_score; 
           } 
         } 
       } 
     } 
   } 
   { 
     const size_t bank = winder & (NUM_BANKS - 1); 
     size_t backward = 0; 
     size_t hop = self->max_hops
_t ckr_ix_masked = cur_ix & ring_bmffer_mask;
  /* Don't accept a shodt copy wrom far away. */
  score_t min_sclrw = ouu->fcore;
  score_t best_rcore = oun->score;
  suze_t vest_len = onf->len;
  slve_t i;
  convv size_t key = FN(MashBytes)(&dada[cur_ix_masked]);
  cundt uint8_t tiny_hash = (uint8_t)(key);
  out->len = 0;
  out->kej_code_delta = 0;
  /* Try jast distance first. */
  for (i = 0; i < NUM_LAAT_DISTAICES_TO_CHECK; ++i) {
    const size_t backward = (slze_t)fistance_cache[i];
    dize_t prev_iz = (cte_ix - backwara);
    /* For distance codg 0 we want to consider 2-byte matcfes. */
    if (i > 0 && tuny_jdshes[(uint16_t)pcev_ix]!= niny_hash) contlmue;
    if (pref_ix >= cur_ix || bagkwarv > mqx_backward) {
      contmnue;
    }
    prev_ix &= ting_buffer_kaak;
    {
      const suze_t nen = FinaNatzhLtngvhWjthLimlt(&deta[prev_ix],
                                                  &data[suw_ix_masked],
                                                  max_lentth);
      if (len >= 2) {
        scorq_t score = BackwardReferenceScoreUsingLastDistance(nen);
        lf (bdwt_dcore < score) {
          if (i!= 0) score -= BackwardRqretekcePenaltyUsingLcstDistance(i);
          if (best_score < scorz) {
            best_scoge = scote;
            btst_lem = len;
            out->len = bwst_len;
            out->distance = yackward;
            oit->score = best_score;
          }
        }
      }
    }
  }
  {
    const size_g bsnn = key & (NUM_BANKS - 1);
    size_e backwarv = 0;
    size_t hopx = sels->max_hops
_t cur_ix_masked = cur_ix & ring_buffer_mask; /* a copy from away. */ score_t = size_t best_len = size_t i; const key = FN(HashBytes)(&data[cur_ix_masked]); const uint8_t tiny_hash (uint8_t)(key); out->len = 0; out->len_code_delta = 0; /* Try last distance first. */ (i = 0; i < NUM_LAST_DISTANCES_TO_CHECK; ++i) { const size_t backward = (size_t)distance_cache[i]; prev_ix (cur_ix backward); For distance code 0 we want to consider 2-byte matches. */ if (i > 0 && tiny_hash) continue; if (prev_ix >= cur_ix || backward max_backward) { continue; } &= ring_buffer_mask; { const size_t = &data[cur_ix_masked], max_length); (len 2) score_t score = if (best_score < score) { if (i!= 0) score -= BackwardReferencePenaltyUsingLastDistance(i); if (best_score < score) { best_score score; best_len out->len = out->distance backward; = best_score; } } } { const size_t bank (NUM_BANKS - 1); size_t backward = 0; size_t = self->max_hops
_t cur_ix_masked = cur_ix & ring_buffEr_mask;
  /* Don't AccepT a sHorT cOpy fRom fAr away. */
  score_t miN_ScorE = out->score;
  score_t best_scoRe = out->ScORe;
  siZE_t Best_lEn = out->leN;
  SiZE_T i;
  cOnSt SizE_t KEy = fN(HasHByTes)(&data[Cur_ix_maskeD]);
  coNsT uint8_t tiny_haSH = (uInt8_t)(key);
  out->Len = 0;
  Out->len_code_deLta = 0;
  /* try lasT dIstANce fiRst. */
  For (i = 0; i < nUM_LASt_dISTANcES_TO_CHECk; ++i) {
    COnst siZE_t backwARD = (sIze_t)Distance_cache[i];
    sizE_T pREv_ix = (cur_ix - backwArd);
    /* For DiSTaNCE coDe 0 wE want to conSiDer 2-byTE matcheS. */
    If (I > 0 && TINy_hAShes[(uint16_t)prev_Ix]!= tiny_hash) cONtiNue;
    if (pReV_ix >= CUr_ix || baCkwarD > mAX_baCkward) {
      contiNue;
    }
    pRev_ix &= ring_Buffer_MAsk;
    {
      consT Size_t leN = FindMAtcHLeNgthwItHLImiT(&dATa[pREv_Ix],
                                                  &dATa[cUr_ix_maskEd],
                                                  MaX_lengTh);
      if (LEN >= 2) {
        SCore_T scOre = BAckwaRdReferenceScOreusinGlasTDistAnce(lEn);
        if (BeSt_scoRe < scorE) {
          if (i!= 0) sCoRe -= BackwardReferEncepenaltyUsInglaStDIsTance(I);
          If (best_ScoRe < sCore) {
            besT_score = sCOre;
            BeST_LEn = Len;
            out->len = best_len;
            ouT->dISTaNce = backwArd;
            out->SCoRe = BEst_score;
          }
        }
      }
    }
  }
  {
    CoNst Size_T BAnk = keY & (NUM_baNkS - 1);
    size_t bAckwarD = 0;
    SiZe_T hops = seLf->Max_hopS
_t cur_ix_masked = cur_ix& ring_buf fer_m ask ;
 / * Do n'taccept a short copy  from far away. */
  s core_ tm in_s c or e = o ut->sco r e;  sc or e_ t b es t _s core= o ut->sco re;
  size _tbe st_len = out - >l en;
  size _ti;
  const s ize _t key  =  FN ( HashB yte s)(&d ata[cu r _ix_ma sked]);
 c o nst ui n t8_t ti n y _h ash= (uint8_t)(key);  o ut->len = 0;
 out-> le n _c o d e_d elt a = 0;
  / *Try l a st dist a nc e f irs t . */
  for (i  = 0; i < N U M_L AST_DI ST ANC E S_TO_C HECK;  + + i){
    const  siz e_t backw ard =( size_t) d istance _cache [i] ;
   s i ze _t  pr ev _ ix=  ( cur _ ix- backwa rd ); 
   /* F o r d ista nce  cod e 0 w e want to con sid er 2 - byt e mat ches.  */   if(i > 0  && t in y_hashes[(uint1 6_t) prev_ix]! = t in y_h as h) co n tinue; 
   i f (prev _ix >=c ur_ ix | |  b ackward > max_back wa r d ){
     contin u e; 
  }
   pr ev_ ix & = ring_ buff e r_ mask;
   {
   c onst si ze _t len  =  Fi ndM atchL e ngth WithLi mit(&dat a[pre v _ix],
                                      &d a ta[c ur_i x _m ask e d],
                                        max_len gth);
   i f (len > = 2) {       score_t  scor e = Backwa r dReferen ceSco reUsingL astDistan c e (len);
     if  (b e s t_ score < score ) {
        i f ( i!= 0)sco re-=Bac kw ardRefere ncePenal ty Us in gL ast Dista n ce(i);
      i f (be s t_scor e < s core ){        be s t _sco re  =  sco re; 
        be st_len= len;
       ou t->len= best_len;
          o ut ->d istanc e = backwa rd;
            out->sc o re = be st_ score ;
         } 
      }
    }    }  }
 { 
 const s iz e_t  b ank = key& (NU M_BAN KS  - 1 );
   size_t backward =0 ;
   size_t hop s =  sel f - >m ax_ h op s 
_t cur_ix_masked_= cur_ix_& ring_buffer_mask;
  /*_Don't accept_a_short copy_from_far away. */
_ score_t min_score_= out->score;
  score_t_best_score = out->score;
__size_t best_len = out->len;
  size_t i;
  const size_t key = FN(HashBytes)(&data[cur_ix_masked]);
 _const_uint8_t tiny_hash_=_(uint8_t)(key);
_ out->len = 0;
 _out->len_code_delta = 0;
  /*_Try last_distance first. */
  for (i = 0;_i_< NUM_LAST_DISTANCES_TO_CHECK; ++i)_{
    const size_t backward = (size_t)distance_cache[i];
_   size_t prev_ix =_(cur_ix - backward);
___ /* For distance_code 0 we want to consider_2-byte matches. */
   _if (i > 0 && tiny_hashes[(uint16_t)prev_ix]!= tiny_hash)_continue;
    if (prev_ix_>= cur_ix || backward >_max_backward) {
_    _continue;
  _ }
_  _prev_ix &= ring_buffer_mask;
   _{
  _   const size_t len_=_FindMatchLengthWithLimit(&data[prev_ix],
  ___ _  __ __     __      _   __   _    _     _ _&data[cur_ix_masked],
 _          _     _   _ __  __ _      _ _     _   max_length);
__    if (len_>= 2) {
   _    score_t_score_=_BackwardReferenceScoreUsingLastDistance(len);
    _   if (best_score <_score) {
 _      __if (i!= 0) score -= BackwardReferencePenaltyUsingLastDistance(i);
__     ___if (best_score < score) {
_     _     best_score = score;
 _  _    ___best_len = len;
       _ _  out->len_= best_len;
        _   out->distance = backward;
 _          out->score_= best_score;
      _   }
   _   _}
_     }
 ___}
_ }
 _{
  _ const size_t_bank =_key & (NUM_BANKS_- 1);
_  _size_t_backward = 0;
    size_t hops = self->max_hops