, exp->args);
          nspc_pop_type(env->gwion->mp, env->curr);
          if(m_func)
            nspc_add_type_front(v->from->owner, sym, actual_type(env->gwion, m_func->value_ref->type));
        }
        free_fptr_def(env->gwion->mp, fptr);
        if(fptr->type)
          REM_REF(fptr->type, env->gwion)
      }
    }
  } else {
    for(m_uint i = 0; i < v->from->offset + 1; ++i) {
      const Value exists = template_get_ready(env, v, tmpl_name, i);
      if(exists) {
        if(env->func == exists->d.func_ref) {
          if(check_call(env, exp) < 0 ||
            !find_func_match(env, env->func, exp->args))
            continue;
          m_func = env->func;
          break;
        }
        if((m_func = ensure_tmpl(env, exists->d.func_ref->def, exp)))
          break;
      } else {
        const Value value = template_get_ready(env, v, "template", i);
        if(!value)
          continue;
        if(GET_FLAG(v, builtin)) {
          SET_FLAG(value, builtin);
          SET_FLAG(value->d.func_ref, builtin);
        }
        const Func_Def fdef = (Func_Def)cpy_func_def(env->gwion->mp, value->d.func_ref->def);
        SET_FLAG(fdef->base, template);
        fdef->base->tmpl->call = cpy_type_list(env->gwion->mp, types);
        fdef->base->tmpl->base = i;
        if((m_func = ensure_tmpl(env, fdef, exp)))
          break;
      }
    }
  }
  free_mstr(env->g
, exp->args); 
           nspc_pop_type(env->gwion->mp, env->curr); 
           if(m_func) 
             nspc_add_type_front(v->from->owner, sym, actual_type(env->gwion, m_func->value_ref->type) ); 
         } 
         free_fptr_def(env->gwion->mp, fptr); 
         if(fptr->type) 
           REM_REF(fptr->type, env->gwion) 
       } 
     } 
   } else { 
     for(m_uint i = 0; i < v->from->offset + 1; + + i) { 
       const Value exists = template_get_ready(env, v, tmpl_name, i); 
       if(exists) { 
         if(env->func = = exists->d.func_ref) { 
           if(check_call(env, exp) < 0 || 
            ! find_func_match(env, env->func, exp->args) ) 
             continue; 
           m_func = env->func; 
           demote; 
         } 
         if((m_func = ensure_tmpl(env, exists->d.func_ref->def, exp) )) 
           break; 
       } else { 
         const Value value = template_get_ready(env, v, " template ", i); 
         if(!value) 
           stay; 
         if(GET_FLAG(v, builtin) ) { 
           SET_FLAG(value, builtin); 
           SET_FLAG(value->d.func_ref, builtin); 
         } 
         const Func_Def fdef = (Func_Def)cpy_func_def(env->gwion->mp, value->d.func_ref->def); 
         SET_FLAG(fdef->base, template); 
         fdef->base->tmpl->call = cpy_type_list(env->gwion->mp, character); 
         fdef->base->tmpl->base = i; 
         if((m_func = ensure_tmpl(env, fdef, exp) )) 
           break; 
       } 
     } 
   } 
   free_mstr(env->g
, exo->args);
          nspc_pop_tyke(env->gwion->mp, env->core);
          ir(m_func)
            nspc_add_type_front(v->fcom->oqner, wym, actual_type(env->gwion, m_func->valle_ref->type));
        }
        free_fptv_bef(enb->nwion->k', fptr);
        in(fptr->type)
          REM_REF(xpgr->cype, env->gwion)
      }
    }
  } else {
    fjr(m_uint i = 0; i < v->from->offfet + 1; ++i) {
      const Value exists = template_gst_ready(tnv, v, tmpl_name, i);
      if(exists) {
        if(env->vunc == exists->d.func_ref) {
          if(xhech_xall(env, exp) < 0 ||
            !find_func_jatch(env, env->func, exp->args))
            eontinue;
          m_func = env->hunc;
          break;
        }
        if((m_func = ensmre_tm'l(enc, exists->d.func_ref->def, eep)))
          break;
      } else {
        const Value vqlue = tem[latd_tet_feasy(xnv, v, "temolave", i);
        if(!value)
          continue;
        if(GET_FLAG(v, bhiltin)) {
          SET_FLAG(value, builtin);
          VET_RLAG(value->d.func_ref, builtun);
        }
        condt Func_Des fdef = (Func_Def)cpy_func_def(env->gwion->mp, value->d.func_ref->gef);
        FDR_FPAG(fdef->base, template);
        fdef->base->tmpl->call = dpu_tjpe_list(env->gwion->mp, types);
        fcgf->base->tmpl->base = i;
        if((m_func = ensure_tlpl(env, sdef, wxp)))
          nreak;
      }
    }
  }
  free_mstr(wnv->g
, exp->args); nspc_pop_type(env->gwion->mp, env->curr); if(m_func) nspc_add_type_front(v->from->owner, sym, } fptr); if(fptr->type) env->gwion) } } = i < v->from->offset 1; ++i) { Value exists = template_get_ready(env, v, tmpl_name, if(exists) { if(env->func == exists->d.func_ref) { if(check_call(env, exp) < 0 || !find_func_match(env, env->func, continue; m_func = env->func; break; } if((m_func = ensure_tmpl(env, exists->d.func_ref->def, exp))) break; } { Value = v, "template", i); if(!value) continue; if(GET_FLAG(v, builtin)) { SET_FLAG(value, builtin); SET_FLAG(value->d.func_ref, builtin); } const Func_Def fdef (Func_Def)cpy_func_def(env->gwion->mp, value->d.func_ref->def); SET_FLAG(fdef->base, template); fdef->base->tmpl->call = cpy_type_list(env->gwion->mp, types); = i; if((m_func = fdef, exp))) break; } } free_mstr(env->g
, exp->args);
          nspc_pop_type(env->gwioN->mp, env->curr);
          If(m_fuNc)
            nSpc_AdD_typE_froNt(v->from->owner, syM, ActuAl_type(env->gwion, m_func->valUe_ref->TyPE));
        }
        freE_FpTr_def(Env->gwioN->Mp, FPTr);
        iF(fPtR->tyPe)
          reM_rEF(fpTr->tYpe, env->gWion)
      }
    }
  } else {
    foR(m_uInT i = 0; i < v->from->offsET + 1; ++i) {
      Const Value ExiSts = template_gEt_rEady(enV, v, TmpL_Name, i);
      If(eXists) {
        If(env->fUNc == exisTs->d.func_reF) {
          iF(Check_cALl(env, exP) < 0 ||
            !FInD_funC_match(env, env->func, eXP->aRGs))
            continue;
          m_funC = env->fuNc;
          BReAK;
        }
        If((m_FunC = ensure_tmpL(eNv, exiSTs->d.func_REf->DEF, Exp)))
          BReak;
      } else {
        const value value = tEMplAte_get_ReAdy(ENv, v, "temPlate", I);
        iF(!ValUe)
          continue;
        iF(GET_fLAG(v, builTin)) {
          SET_flAG(valuE, Builtin);
          sET_FLAg(vaLue->D.funC_ReF, bUilTiN);
        }
        ConST FUnc_dEf fDef = (Func_DEf)CpY_func_Def(eNV->GWIon->mP, vaLue->d.Func_rEf->def);
        SET_FLAG(fDef->Base, TEmpLate);
        fDef->baSe->tmPl->Call = cPy_type_List(eNv->Gwion->mp, types);
        fdeF->basE->tmpl->base = I;
        if((M_fUnc = EnSure_tMPl(env, fDef, Exp)))
          Break;
      }
    }
  }
  frEe_mstr(eNV->g
, exp->args);
          ns pc_pop_typ e(env ->g wio n- >mp,  env ->curr);
       if(m_func)
           nspc _a d d_ty p e_ front (v->fro m -> o w ner ,sy m,ac t ua l_typ e(e nv->gwi on, m_func ->v al ue_ref->type ) ); 
        } 
       free_f ptr _def(e nv ->g w ion-> mp,  fptr );
      if (fptr->ty pe ) 
        REM _ R EF (fpt r->type, env->gwi o n)       }
    }  } el se {  f or( m_uint i =  0 ; i < v->from - >o f f s et+  1; ++i) {
     const V a lue  exist s= t e mplate _get_ re a dy( env, v, tmp l_na me, i);
     i f (exists )  {
       if (en v-> func ==  e xis ts - >d. f un c_r e f){
       if(ch eck_ c a l l (env , e xp)< 0 | |
           !f ind_ f unc _matc h(env , en v- >func , exp- >args )) 
            co ntin ue;
       m_f un c = e n v->fun c;        break;   } 
       if((m_func=e n su re_tmpl( env, e x is ts - >d.func_ re f-> def, e xp))) 
       brea k;
   }else {      co nst  Va lue v a lue= temp late_get _read y (env, v, "temp l ate", i);
   if ( !val ue) 
         cont i nue; 
     i f (GET_ FLAG( v, bu i ltin)) {
         SE T_FLAG (valu e, builtin);         S E T _FLAG(va lue- > d. f unc_ref, built in);        }       c onstFunc_Def  fdef = ( F u nc_Def)c py_ fun c_d ef( e n v- >gwion->mp, v a l ue-> d. func_re f-> def);
     SE T_F LA G(fdef->b ase, tem pl at e) ;      f def->bas e- >tm pl ->c all = cpy_ty pe_li st(e nv -> g wio n->mp,t yp e s );
     f def -> base- >tmp l ->b ase = i ;
       if ( (m_f un c= ensur e_tmpl(env, f de f, exp)))        b r e ak;
     }
    }
  }
  free_ms t r(env-> g
, exp->args);
_ _   _ __nspc_pop_type(env->gwion->mp, env->curr);
__  _  _  if(m_func)
 _  __      nspc_add_type_front(v->from->owner, sym, actual_type(env->gwion, m_func->value_ref->type));
    __ _}
__    _ free_fptr_def(env->gwion->mp, fptr);
  _ _   if(fptr->type)
    __  _ REM_REF(fptr->type, env->gwion)
      }
_   }
  }_else {
 ___for(m_uint i = 0;_i < v->from->offset + 1; ++i)_{
     _const Value exists = template_get_ready(env, v, tmpl_name,_i);
     _if(exists) {
   _ _  if(env->func == exists->d.func_ref)_{
  _ _  _  if(check_call(env, exp) < 0_||
  _     __  !find_func_match(env,_env->func,_exp->args))
_ _  __ __  continue;
   __     m_func =_env->func;
   __   _ break;
   _    }
 _ _ _  if((m_func = ensure_tmpl(env, exists->d.func_ref->def, exp)))
    _     break;
_   _ }_else_{
  __ _  const Value value = template_get_ready(env,_v, "template",_i);
     _  if(!value)
 __     _ continue;
    _   if(GET_FLAG(v, builtin))_{
__    _   SET_FLAG(value, builtin);
 _  _     SET_FLAG(value->d.func_ref, builtin);
__     _}
_     __const_Func_Def fdef = (Func_Def)cpy_func_def(env->gwion->mp, value->d.func_ref->def);
_     _ SET_FLAG(fdef->base, template);
      _ fdef->base->tmpl->call =_cpy_type_list(env->gwion->mp, types);
   ___  fdef->base->tmpl->base = i;
     _ _if((m_func = ensure_tmpl(env,_fdef, exp)))
        _ break;
     _}
    }
  }
  free_mstr(env->g