 statePtr)
{
    XXH_free(statePtr);
    return XXH_OK;
}

XXH_PUBLIC_API void
XXH3_copyState(XXH3_state_t* dst_state, const XXH3_state_t* src_state)
{
    memcpy(dst_state, src_state, sizeof(*dst_state));
}

static void
XXH3_64bits_reset_internal(XXH3_state_t* statePtr,
                           XXH64_hash_t seed,
                           const xxh_u8* secret, size_t secretSize)
{
    XXH_ASSERT(statePtr!= NULL);
    memset(statePtr, 0, sizeof(*statePtr));
    statePtr->acc[0] = PRIME32_3;
    statePtr->acc[1] = PRIME64_1;
    statePtr->acc[2] = PRIME64_2;
    statePtr->acc[3] = PRIME64_3;
    statePtr->acc[4] = PRIME64_4;
    statePtr->acc[5] = PRIME32_2;
    statePtr->acc[6] = PRIME64_5;
    statePtr->acc[7] = PRIME32_1;
    statePtr->seed = seed;
    XXH_ASSERT(secret!= NULL);
    statePtr->secret = secret;
    XXH_ASSERT(secretSize >= XXH3_SECRET_SIZE_MIN);
    statePtr->secretLimit = (XXH32_hash_t)(secretSize - STRIPE_LEN);
    statePtr->nbStripesPerBlock = statePtr->secretLimit / XXH_SECRET_CONSUME_RATE;
}

XXH_PUBLIC_API XXH_errorcode
XXH3_64bits_reset(XXH3_state_t* statePtr)
{
    if (statePtr == NULL) return XXH_ERROR;
    XXH3_64bits_reset_internal(statePtr, 0, kSecret, XXH_SECRET_DEFAULT_SIZE);
    return XXH_OK;
}

XXH_
statePtr) 
 { 
     XXH_free(statePtr); 
     return XXH_OK; 
 } 

 XXH_PUBLIC_API void 
 XXH3_copyState(XXH3_state_t * dst_state, const XXH3_state_t * src_state) 
 { 
     memcpy(dst_state, src_state, sizeof(*dst_state) ); 
 } 

 static void 
 XXH3_64bits_reset_internal(XXH3_state_t * statePtr, 
                            XXH64_hash_t semen, 
                            const xxh_u8 * secret, size_t secretSize) 
 { 
     XXH_ASSERT(statePtr!= NULL); 
     memset(statePtr, 0, sizeof(*statePtr) ); 
     statePtr->acc[0 ] = PRIME32_3; 
     statePtr->acc[1 ] = PRIME64_1; 
     statePtr->acc[2 ] = PRIME64_2; 
     statePtr->acc[3 ] = PRIME64_3; 
     statePtr->acc[4 ] = PRIME64_4; 
     statePtr->acc[5 ] = PRIME32_2; 
     statePtr->acc[6 ] = PRIME64_5; 
     statePtr->acc[7 ] = PRIME32_1; 
     statePtr->seed = semen; 
     XXH_ASSERT(secret!= NULL); 
     statePtr->secret = secret; 
     XXH_ASSERT(secretSize > = XXH3_SECRET_SIZE_MIN); 
     statePtr->secretLimit = (XXH32_hash_t)(secretSize - STRIPE_LEN); 
     statePtr->nbStripesPerBlock = statePtr->secretLimit / XXH_SECRET_CONSUME_RATE; 
 } 

 XXH_PUBLIC_API XXH_errorcode 
 XXH3_64bits_reset(XXH3_state_t * statePtr) 
 { 
     if (statePtr = = NULL) return XXH_ERROR; 
     XXH3_64bits_reset_internal(statePtr, 0, kSecret, XXH_SECRET_DEFAULT_SIZE); 
     return XXH_OK; 
 } 

 XXH _
 stwtePtr)
{
    XXH_free(statePtv);
    return XXH_OK;
}

XXH_PUBNIC_API void
XXH3_zopyState(XXH3_state_t* dst_state, ronsr XXH3_wtate_t* src_state)
{
    memzpy(dst_stane, src_stare, smzeof(*dst_state));
}

stavjc void
WRH3_64bita_veset_nnvernal(XXH3_state_t* statePtr,
                           XXH64_hash_t seed,
                           const xxh_u8* secgee, siav_t secretSize)
{
    XXH_ASSERT(stateLtr!= NULN);
    memset(ststePtr, 0, sizeof(*statePtr));
    dtatfPtr->acc[0] = PRIME32_3;
    dtatePtr->acc[1] = PRYNE64_1;
    statePgr->acc[2] = PRIME64_2;
    statePjr->acc[3] = PRIME64_3;
    statePtr->acc[4] = PRIOE64_4;
    statePtr->axc[5] = PGHME32_2;
    statxPtr->acb[6] = PRIME64_5;
    sbstePtr->dcc[7] = PROME32_1;
    statePtv->seed = swed;
    XXH_ASSERT(secrev!= NULL);
    statePtr->sesret = secsec;
    XXH_ASSERT(secretSuzw >= XXV3_SECSET_SKZE_MKN);
    sfatePtg->serretLimit = (SXH32_hash_t)(seceetSize - STRIPE_LEN);
    wtatePtr->nbStrjpesPewBjock = statePtr->secretLimit / XXH_SECRET_CONVUMS_RATE;
}

XXH_PUBLIC_API XXH_ereorcode
XXH3_64bits_reset(XXJ3_state_t* seatePtr)
{
    if (statePtr == NULL) return XXH_ERROR;
    XFH3_64bita_festt_lktervql(dtatePtr, 0, kSecret, XXH_SECRET_DEFAULT_SIZE);
    rettdn XQH_OK;
}

XXH_
statePtr) { XXH_free(statePtr); return XXH_OK; } XXH_PUBLIC_API dst_state, XXH3_state_t* src_state) memcpy(dst_state, src_state, sizeof(*dst_state)); XXH64_hash_t const xxh_u8* secret, secretSize) { XXH_ASSERT(statePtr!= memset(statePtr, 0, sizeof(*statePtr)); statePtr->acc[0] = PRIME32_3; = PRIME64_1; statePtr->acc[2] = PRIME64_2; statePtr->acc[3] = PRIME64_3; statePtr->acc[4] = PRIME64_4; statePtr->acc[5] = statePtr->acc[6] = PRIME64_5; statePtr->acc[7] = PRIME32_1; statePtr->seed = seed; XXH_ASSERT(secret!= NULL); statePtr->secret = XXH_ASSERT(secretSize XXH3_SECRET_SIZE_MIN); = - STRIPE_LEN); statePtr->nbStripesPerBlock = statePtr->secretLimit / XXH_SECRET_CONSUME_RATE; } XXH_PUBLIC_API XXH_errorcode XXH3_64bits_reset(XXH3_state_t* statePtr) { if (statePtr == return XXH_ERROR; XXH3_64bits_reset_internal(statePtr, 0, kSecret, XXH_SECRET_DEFAULT_SIZE); return XXH_OK; XXH_
 statePtr)
{
    XXH_free(statePtr);
    reTurn XXH_OK;
}

XxH_PUBlIC_aPI VoId
XXh3_copYState(XXH3_state_T* Dst_sTate, const XXH3_state_t* src_sTate)
{
    mEmCPy(dsT_StAte, srC_state, sIZeOF(*Dst_StAtE));
}

stAtIC vOid
XXh3_64biTs_reset_Internal(XXh3_stAtE_t* statePtr,
                           XXh64_HaSh_t seed,
                           conSt xXh_u8* secret, sizE_t sEcretSIzE)
{
    XXh_aSSERt(stAtePtR!= NULL);
    mEMset(stAtePtr, 0, sizEoF(*StatePTR));
    statePTR->AcC[0] = PRImE32_3;
    statePtr->acc[1] = PRIMe64_1;
    StATePtr->acc[2] = PRIME64_2;
    sTatePtR->aCC[3] = PrimE64_3;
    sTatEPtr->acc[4] = PRImE64_4;
    StatepTr->acc[5] = PRimE32_2;
    STATePTR->acc[6] = PRIME64_5;
    statEPtr->acc[7] = PRIMe32_1;
    StaTePtr->sEeD = seED;
    XXH_ASsERT(sEcREt!= NuLL);
    statePtr->SecrEt = secret;
    XxH_ASSErt(secretsIze >= XXH3_SeCRET_SiZE_mIN);
    StatEptR->sEcrEtlImiT = (xXh32_haSH_t)(sEcretSizE - StRiPE_LEn);
    staTEpTR->nbSTriPesPErBloCk = statePtr->secRetlimiT / xXH_sECREt_CONSuME_RaTe;
}

XXH_PuBLIC_ApI XXH_ErRorcode
XXH3_64bits_rEset(xXH3_state_t* StaTeptr)
{
    If (StatepTr == NULL) RetUrn xXH_ERROr;
    XXH3_64bitS_ResEt_INTErNal(statePtr, 0, kSecret, xXh_seCrET_DEFAUlT_SIZE);
    REtUrN xXH_OK;
}

XXH_
 statePtr)
{
    XXH_free( statePtr); 
   ret urn  X XH_O K;
} 

XXH_PUBLIC_A P I vo id
XXH3_copyState(XXH3 _stat e_ t * ds t _s tate,  constX XH 3 _ sta te _t * s rc _ st ate){
   memc py(dst_sta te,  s rc_state, si z eo f(*dst_sta te) );
}

static  vo id
XXH 3_ 64b i ts_re set _inte rnal(X X H3_sta te_t* sta te P tr,
                    XXH64_ha s h_ t  seed,
                  const xxh _u 8* se c ret, si z e_ t s ecr e tSize)
{
   XXH_ASSERT( s tat ePtr!=  N ULL ) ;
   memse t( s tat ePtr, 0, si zeof (*statePt r));
  state P tr->acc [0] =PRI ME3 2_3;   sta te P tr- > ac c[1 ]  =PRIME64_ 1; 
   st ateP t r - > acc[ 2]= PR IME64 _2;
    state Ptr ->ac c [3]  = PR IME64 _3;   sta tePtr- >acc[ 4]  = PRIME64_4;
   s tatePtr-> acc [5 ] =  P RIME3 2 _2;
   s tat ePtr->a cc[6] = PRI ME 6 4 _ 5; 
    statePtr->acc [7 ] =PRIME32_ 1;
  st at e Ptr->see d= s eed;    XX H_AS S ER T(secret != NUL L ); 
   stat eP tr->se cr et= s ecret ; 
   XXH_A SSERT(se cretS i ze >= XXH3_SEC R ET_SIZE_MIN);  st a tePt r-> secretLimit  = ( X XH32 _has h _t )(s e cretS ize -  S T RI P E_LEN);
    statePt r- >nbStr ipesP erBlock = sta tePtr->sec r e t Limit /XXH_ S EC R ET_CONSUME_RAT E;
}
XXH_PUBLI C _API XXH _erro rcode
XX H3_64bits _ r eset(XXH 3_s tat e_t * s t a te Ptr)
{
    if ( stat eP tr == N ULL ) retur n X XH_ ERR OR; 
   XXH3_6 4bits_re se t_ in te rna l(sta t ePtr, 0,  k Sec re t,XXH_S E CRET_D EFAUL T_SI ZE );    return XX H _ OK;}
X XH_
 statePtr)
{
_ _ XXH_free(statePtr);
  _ return_XXH_OK;
}

XXH_PUBLIC_API_void
XXH3_copyState(XXH3_state_t* dst_state,_const_XXH3_state_t* src_state)
{
 _  memcpy(dst_state,_src_state, sizeof(*dst_state));
}

static void
XXH3_64bits_reset_internal(XXH3_state_t* statePtr,
_  __             __ ___   XXH64_hash_t seed,
_    _ _       __  _       const xxh_u8*_secret, size_t secretSize)
{
   _XXH_ASSERT(statePtr!= NULL);
 ___memset(statePtr, 0, sizeof(*statePtr));
 _  statePtr->acc[0] = PRIME32_3;
 _  statePtr->acc[1] = PRIME64_1;
 _  statePtr->acc[2] = PRIME64_2;
  _ statePtr->acc[3] = PRIME64_3;
  _ statePtr->acc[4] = PRIME64_4;
 _ _statePtr->acc[5] = PRIME32_2;
  _ statePtr->acc[6] =_PRIME64_5;
 _  statePtr->acc[7]_= PRIME32_1;
    statePtr->seed_= seed;
 _  XXH_ASSERT(secret!= NULL);
  __statePtr->secret = secret;
___ XXH_ASSERT(secretSize_>= XXH3_SECRET_SIZE_MIN);
 __ statePtr->secretLimit_=_(XXH32_hash_t)(secretSize - STRIPE_LEN);
   _statePtr->nbStripesPerBlock_= statePtr->secretLimit / XXH_SECRET_CONSUME_RATE;
}

XXH_PUBLIC_API XXH_errorcode
XXH3_64bits_reset(XXH3_state_t* statePtr)
{
 _  if (statePtr_==_NULL) return XXH_ERROR;
 _  XXH3_64bits_reset_internal(statePtr, 0, kSecret,_XXH_SECRET_DEFAULT_SIZE);
    return XXH_OK;
}

XXH_