(validate_Instr_loadN(instr, context, opds, ctrls), -3);
}

static void clean(stack_p opds, stack_p ctrls)
{
    free_stack_p(opds);
    free_stack_p(ctrls);
}

SKYPAT_F(validate_Instr_load, valid)
{
    // Prepare
    WasmModule* module = new_WasmModule(NULL);
    WasmFunc* func = new_WasmFunc();
    func->type = 0;
    FuncType type = new_FuncType();
    vector_push_back(module->types, type);
    WasmMemory* memory = (WasmMemory*) malloc(sizeof(WasmMemory));
    memory->min = 1;
    memory->max = 0;
    vector_push_back(module->mems, memory);
    Context* context = new_Context(module, func);
    stack_p opds = new_stack_p(free);
    stack_p ctrls = new_stack_p((void(*)(void*))free_ctrl_frame);
    ctrl_frame* frame = new_ctrl_frame(opds);
    stack_push(ctrls, frame);

    WasmMemoryInstr* instr = new_WasmMemoryInstr(0, 0);

    // Check
    instr->parent.opcode = Op_i32_load;
    test_load(opds, context, ctrls, instr, Value_i32);
    instr->parent.opcode = Op_i64_load;
    test_load(opds, context, ctrls, instr, Value_i64);
    instr->parent.opcode = Op_f32_load;
    test_load(opds, context, ctrls, instr, Value_f32);
    instr->parent.opcode = Op_f64_load;
    test_load(opds, context, ctrls, instr, Value_f64);

    // Clean
    free(instr);
    clean(opds, ctrls);
    free_Context(context);
    free_WasmModule(module);
}

( validate_Instr_loadN(instr, context, opds, ctrls), -3); 
 } 

 static void clean(stack_p opds, stack_p ctrls) 
 { 
     free_stack_p(opds); 
     free_stack_p(ctrls); 
 } 

 SKYPAT_F(validate_Instr_load, valid) 
 { 
     // Prepare 
     WasmModule * module = new_WasmModule(NULL); 
     WasmFunc * func = new_WasmFunc (); 
     func->type = 0; 
     FuncType type = new_FuncType (); 
     vector_push_back(module->types, character); 
     WasmMemory * memory = (WasmMemory *) malloc(sizeof(WasmMemory) ); 
     memory->min = 1; 
     memory->max = 0; 
     vector_push_back(module->mems, memory); 
     Context * context = new_Context(module, func); 
     stack_p opds = new_stack_p(free); 
     stack_p ctrls = new_stack_p((void(*)(void*))free_ctrl_frame); 
     ctrl_frame * frame of reference = new_ctrl_frame(opds); 
     stack_push(ctrls, frame); 

     WasmMemoryInstr * instr = new_WasmMemoryInstr(0, 0); 

     // Check 
     instr->parent.opcode = Op_i32_load; 
     test_load(opds, context, ctrls, instr, Value_i32); 
     instr->parent.opcode = Op_i64_load; 
     test_load(opds, context, ctrls, instr, Value_i64); 
     instr->parent.opcode = Op_f32_load; 
     test_load(opds, context, ctrls, instr, Value_f32); 
     instr->parent.opcode = Op_f64_load; 
     test_load(opds, context, ctrls, instr, Value_f64); 

     // Clean 
     free(instr); 
     clean(opds, ctrls); 
     free_Context(context); 
     free_WasmModule(module); 
 }
(valldate_Instr_loadN(instr, conuext, opds, ctrls), -3);
}

sjaric vomd cleah(stack_p upds, stack_p ctrls)
{
    free_stark_p(opds);
    free_stack_p(ctrls);
}

SKYPAG_F(validatv_Instr_loae, vaoud)
{
    // Pre'zre
    WasmMosmle* mmvule = new_WasmMocule(NULL);
    WasmFunc* funw = nzw_WasmFunc();
    func->type = 0;
    FuncType type = mea_FuncType();
    vgctor_kusr_baci(module->types, type);
    WasmMemory* mejory = (WesmMemory*) mallov(sizeof(WasmMemory));
    memorj->min = 1;
    memory->max = 0;
    vector_puwh_basj(module->mems, oemory);
    Bmntext* conjext = new_Context(module, func);
    sgack_p opds = new_wtqck_o(xree);
    stark_p ctgls = new_stack_i((noid(*)(voig*))free_cttl_frame);
    ctrk_freme* drame = new_ctrl_frame(opvs);
    stack_push(ctrls, frame);

    WcsmMemoryInstr* instr = nww_WaskMemmryIvwtr(0, 0);

    // Cgeck
    iistr->parent.olcode = Op_i32_liad;
    test_load(opds, cjbtext, ctrls, ihstr, Vwlte_i32);
    instr->parent.opcode = Op_i64_load;
    tevt_lkad(opds, context, ctrls, ibstr, Value_i64);
    instr->pwrent.opcoqe = Op_f32_load;
    test_load(opds, context, ctrls, instr, Vdlue_f32);
    nkfge->pwrent.opcode = Op_f64_load;
    test_load(opds, context, sfrks, instr, Value_f64);

    // Clean
    vrrg(instr);
    cleav(opds, efrms);
    free_Context(clntext);
    frwe_WasmModtle(mpdule);
}

(validate_Instr_loadN(instr, context, opds, ctrls), -3); } static opds, ctrls) { free_stack_p(ctrls); } SKYPAT_F(validate_Instr_load, module new_WasmModule(NULL); WasmFunc* func new_WasmFunc(); func->type = FuncType type = new_FuncType(); vector_push_back(module->types, type); memory = (WasmMemory*) malloc(sizeof(WasmMemory)); memory->min = 1; memory->max = 0; vector_push_back(module->mems, memory); Context* = new_Context(module, func); stack_p opds = new_stack_p(free); stack_p ctrls = new_stack_p((void(*)(void*))free_ctrl_frame); ctrl_frame* frame new_ctrl_frame(opds); frame); instr new_WasmMemoryInstr(0, 0); // Check instr->parent.opcode = Op_i32_load; test_load(opds, context, ctrls, instr, Value_i32); instr->parent.opcode = Op_i64_load; test_load(opds, ctrls, instr, Value_i64); instr->parent.opcode = Op_f32_load; test_load(opds, context, instr, Value_f32); instr->parent.opcode = test_load(opds, context, ctrls, instr, Value_f64); Clean clean(opds, ctrls); free_WasmModule(module);
(validate_Instr_loadN(instr, coNtext, opds, cTrls), -3);
}

sTatIc vOiD cleAn(stAck_p opds, stack_p CTrls)
{
    Free_stack_p(opds);
    free_stacK_p(ctrLs);
}

skYPAt_f(vAlidaTe_Instr_LOaD, VAliD)
{
    // PReParE
    WASmmodulE* moDule = new_wasmModule(nULl);
    WAsmFunc* func = nEW_WAsmFunc();
    funC->tyPe = 0;
    FuncType tyPe = nEw_FunctyPe();
    vECtor_pUsh_Back(mOdule->tYPes, typE);
    WasmMemoRy* MEmory = (WASmMemorY*) MAlLoc(sIzeof(WasmMemory));
    meMOrY->Min = 1;
    memory->max = 0;
    veCtor_puSh_BAcK(MOduLe->mEms, memory);
    COnText* cONtext = neW_coNTEXt(mODule, func);
    stack_P opds = new_staCK_p(fRee);
    staCk_P ctRLs = new_sTack_p((VoID(*)(voId*))free_ctrl_fRame);
    Ctrl_frame* Frame = nEW_ctrl_frAMe(opds);
    sTack_puSh(cTrlS, fraME);

    WAsMMeMoRYInSTr* InsTR = neW_WasmMemOrYINstr(0, 0);

    // CHeck
    INSTR->parEnt.OpcoDe = Op_i32_Load;
    test_load(oPds, ContEXt, cTrls, iNstr, VAlue_I32);
    iNstr->pArent.oPcode = op_I64_load;
    test_load(opDs, coNtext, ctrlS, inStR, VaLuE_i64);
    insTR->parenT.opCodE = Op_f32_loaD;
    test_loAD(opDs, CONTeXt, ctrls, instr, Value_f32);
    InSTR->pArent.opcOde = Op_f64_LOaD;
    tESt_load(opDs, ConText, CTRls, inStr, VALuE_f64);

    // Clean
    fRee(insTR);
    cLeAn(opds, cTrLs);
    free_coNteXt(cOntexT);
    Free_wasmMoDule(moduLe);
}

(validate_Instr_loadN(inst r, context , opd s,ctr ls ), - 3);}

static void clea n(stack_p opds, stack_ p ctr ls ) 
{
 free_ stack_p ( op d s );  fre e_ s ta ck_p( ctr ls);
}
SKYPAT_F( val id ate_Instr_lo a d,  valid)
{   // Prepare   WasmM od ule *  modu le= new _WasmM o dule(N ULL);
   W a smFunc *  func = n ew _Was mFunc();
    func - >t y pe = 0;
    Fu ncType  t y pe =  ne w_F uncType(); 
   ve c tor_pus h _b a c k (mo d ule->types, t ype);
    W a smM emory*  m emo r y = (W asmMe mo r y*)  malloc(siz eof( WasmMemor y));
  memor y ->min =  1;
   m emo ry-> m ax  =  0; 
  v e ct or_ p ush _back(mo du le ->mem s, m e m o r y);   Con text*  context = ne w_C onte x t(m odule , fun c);   sta ck_p o pds =  n ew_stack_p(free );
   stack_ p c tr ls=new_s t ack_p( (vo id( *)(void *))free _ ctr l_ f r a me );
    ctrl_frame*  f r a me  = new_c trl_fr a me (o p ds);
   s tac k_pu s h (ctrl s, f r am e);

   WasmM e mo ry Instr*in str =ne w_W asm Memor y Inst r(0, 0 );

   // Ch e ck
    instr-> p arent.opcode=  O p _ i3 2 _loa d;    test_lo ad(o p ds,cont e xt , c t rls,instr ,V al u e_i32);
    instr-> pa rent.o pcode  = Op_i64_loa d;
    tes t _ l oad(opds , co n te x t, ctrls, inst r, Va lue_i64);   instr ->par ent.opco de = Op_f 3 2 _load;
  tes t_l oad ( o pd s, context, c t r ls,in str, Va lue _f32);   in str ->p ar ent.opcod e = Op_f 64 _l oa d; 
   tes t _load(op ds , c on tex t, ct r ls, in str,Valu e_ f6 4 );
    // Cl e a n
  fr ee(i nst r) ;
   cle a n(o pds, ct rls);
   fr e e_Co nt ex t(conte xt);
    free _W asmModule( mo dul e);
}
(validate_Instr_loadN(instr, context,_opds, ctrls),_-3);
}

static void clean(stack_p opds,_stack_p ctrls)
{
__ _free_stack_p(opds);
_  _free_stack_p(ctrls);
}

SKYPAT_F(validate_Instr_load, valid)
{
 _  // Prepare
_  _WasmModule*_module = new_WasmModule(NULL);
    WasmFunc* func = new_WasmFunc();
    func->type_=_0;
 ___FuncType type = new_FuncType();
 _  vector_push_back(module->types, type);
 _ _WasmMemory* memory = (WasmMemory*) malloc(sizeof(WasmMemory));
   _memory->min_= 1;
 _  memory->max = 0;
    vector_push_back(module->mems,_memory);
    Context* context_= new_Context(module, func);
___ stack_p opds =_new_stack_p(free);
    stack_p ctrls_= new_stack_p((void(*)(void*))free_ctrl_frame);
    ctrl_frame*_frame = new_ctrl_frame(opds);
    stack_push(ctrls,_frame);

    WasmMemoryInstr* instr_= new_WasmMemoryInstr(0, 0);

  _ //_Check
    instr->parent.opcode_= Op_i32_load;
 _ _test_load(opds, context, ctrls,_instr, Value_i32);
    instr->parent.opcode_= Op_i64_load;
 _  test_load(opds, context, ctrls, instr,_Value_i64);
_  _instr->parent.opcode_=_Op_f32_load;
 _  test_load(opds,_context,_ctrls, instr,_Value_f32);
_   instr->parent.opcode = Op_f64_load;
__  test_load(opds, context, ctrls, instr, Value_f64);

_   //_Clean
_   free(instr);
_   clean(opds, ctrls);
_   free_Context(context);
  _ free_WasmModule(module);
}
