/* -*-c-*- *********************************************************/
/*******************************************************************/
/*******************************************************************/
/**
  This file is VM main loop.
  
  ----
  This file is auto generated by insns2vm.rb
  DO NOT TOUCH!

  If you want to fix something, you must edit 'insns.c'
 */



INSN_ENTRY(nop){

{





  DEBUG_ENTER_INSN("nop");
  ADD_PC(1+0);
  PREFETCH(GET_PC());
  #define CURRENT_INSN_nop 1
  #define INSN_IS_SC()     0
  #define INSN_LABEL(lab)  LABEL_nop_##lab
  #define LABEL_IS_SC(lab) LABEL_##lab##_##t
  USAGE_ANALYSIS_INSN(BIN(nop));
{
#line 42 "insns.def"
    /* none */
#line 36 "vm.inc"


#undef CURRENT_INSN_nop
#undef INSN_IS_SC
#undef INSN_LABEL
#undef LABEL_IS_SC
  END_INSN(nop);
}}
}


INSN_ENTRY(getlocal){

{
  VALUE val;

  lindex_t idx = (lindex_t)GET_OPERAND(1);


  DEBUG_ENTER_INSN("getlocal");
  ADD_PC(1+1);
  PREFETCH(GET_PC());
  #define CURRENT_INSN_getlocal 1
  #define INSN_IS_SC()     0
  #define INSN_LABEL(lab)  LABEL_getlocal_##lab
  #define LABEL_IS_SC(lab) LABEL_##lab##_##t
  USAGE_ANALYSIS_INSN(BIN(getlocal));
  USAGE_ANALYSIS_OPERAND(BIN(getlocal), 0, idx);
{
#line 60 "insns.def"
    val = *(GET_LFP() - idx);
#line 68 "vm.inc"
  PUSH(val);

#undef CURRENT_INSN_getlocal
#undef INSN_IS_SC
#undef INSN_LABEL
#undef LABEL_IS_SC
  END_INSN(getlocal);
}}
}


INSN_ENTRY(setlocal){

{


  lindex_t idx = (lindex_t)GET_OPERAND(1);
  VALUE val = TOPN(0);

  DEBUG_ENTER_INSN("setlocal");
  ADD_PC(1+1);
  PREFETCH(GET_PC());
  POPN(1);
  #define CURRENT_INSN_setlocal 1
  #define INSN_IS_SC()     0
  #define INSN_LABEL(lab)  LABEL_setlocal_##lab
  #define LABEL_IS_SC(lab) LABEL_##lab##_##t
  USAGE_ANALYSIS_INSN(BIN(setlocal));
  USAGE_ANALYSIS_OPERAND(BIN(setlocal), 0, idx);
{
#line 74 "insns.def"
    (*(GET_LFP() - idx)) = val;
#line 101 "vm.inc"


#undef CURRENT_INSN_setlocal
#undef INSN_IS_SC
#undef INSN_LABEL
#undef LABEL_IS_SC
  END_INSN(setlocal);
}}
}


INSN_ENTRY(getspecial){

{
  VALUE val;

  num_t type = (num_t)GET_OPERAND(2);
  num_t idx = (num_t)GET_OPERAND(1);


  DEBUG_ENTER_INSN("getspecial");
  ADD_PC(1+2);
  PREFETCH(GET_PC());
  #define CURRENT_INSN_getspecial 1
  #define INSN_IS_SC()     0
  #define INSN_LABEL(lab)  LABEL_getspecial_##lab
  #define LABEL_IS_SC(lab) LABEL_##lab##_##t
  USAGE_ANALYSIS_INSN(BIN(getspecial));
  USAGE_ANALYSIS_OPERAND(BIN(getspecial), 0, idx);
  USAGE_ANALYSIS_OPERAND(BIN(getspecial), 1, type);
{
#line 88 "insns.def"
    if (type == 0) {
	VALUE *pv = lfp_svar(GET_LFP(), idx);
	val = *pv;
    }
    else {
	VALUE backref = *lfp_svar(GET_LFP(), 1);
	if (type & 0x01) {
	    switch (type >> 1) {
	    case '&':
		val = rb_reg_last_match(backref);
		break;
	    case '`':
		val = rb_reg_match_pre(backref);
		break;
	    case '\'':
		val = rb_reg_match_post(backref);
		break;
	    case '+':
		val = rb_reg_match_last(backref);
		break;
	    default:
		rb_bug("unexpected back-ref");
	    }
	}
	else {
	    val = rb_reg_nth_match(type >> 1, backref);
	}
    }
#line 162 "vm.inc"
  PUSH(val);

#undef CURRENT_INSN_getspecial
#undef INSN_IS_SC
#undef INSN_LABEL
#undef LABEL_IS_SC
  END_INSN(getspecial);
}}
}


INSN_ENTRY(setspecial){

{


  num_t idx = (num_t)GET_OPERAND(1);
  VALUE obj = TOPN(0);

  DEBUG_ENTER_INSN("setspecial");
  ADD_PC(1+1);
  PREFETCH(GET_PC());
  POPN(1);
  #define CURRENT_INSN_setspecial 1
  #define INSN_IS_SC()     0
  #define INSN_LABEL(lab)  LABEL_setspecial_##lab
  #define LABEL_IS_SC(lab) LABEL_##lab##_##t
  USAGE_ANALYSIS_INSN(BIN(setspecial));
  USAGE_ANALYSIS_OPERAND(BIN(setspecial), 0, idx);
{
#line 129 "insns.def"
    VALUE *pv = lfp_svar(GET_LFP(), idx);
    *pv = obj;
#line 196 "vm.inc"


#undef CURRENT_INSN_setspecial
#undef INSN_IS_SC
#undef INSN_LABEL
#undef LABEL_IS_SC
  END_INSN(setspecial);
}}
}


INSN_ENTRY(getdynamic){

{
  VALUE val;

  num_t level = (num_t)GET_OPERAND(2);
  dindex_t idx = (dindex_t)GET_OPERAND(1);


  DEBUG_ENTER_INSN("getdynamic");
  ADD_PC(1+2);
  PREFETCH(GET_PC());
  #define CURRENT_INSN_getdynamic 1
  #define INSN_IS_SC()     0
  #define INSN_LABEL(lab)  LABEL_getdynamic_##lab
  #define LABEL_IS_SC(lab) LABEL_##lab##_##t
  USAGE_ANALYSIS_INSN(BIN(getdynamic));
  USAGE_ANALYSIS_OPERAND(BIN(getdynamic), 0, idx);
  USAGE_ANALYSIS_OPERAND(BIN(getdynamic), 1, level);
{
#line 146 "insns.def"
    int i;
    VALUE *dfp2 = GET_DFP();
    for (i = 0; i < level; i++) {
	dfp2 = GET_PREV_DFP(dfp2);
    }
    val = *(dfp2 - idx);
#line 235 "vm.inc"
  PUSH(val);

#undef CURRENT_INSN_getdynamic
#undef INSN_IS_SC
#undef INSN_LABEL
#undef LABEL_IS_SC
  END_INSN(getdynamic);
}}
}


INSN_ENTRY(setdynamic){

{


  num_t level = (num_t)GET_OPERAND(2);
  dindex_t idx = (dindex_t)GET_OPERAND(1);
  VALUE val = TOPN(0);

  DEBUG_ENTER_INSN("setdynamic");
  ADD_PC(1+2);
  PREFETCH(GET_PC());
  POPN(1);
  #define CURRENT_INSN_setdynamic 1
  #define INSN_IS_SC()     0
  #define INSN_LABEL(lab)  LABEL_setdynamic_##lab
  #define LABEL_IS_SC(lab) LABEL_##lab##_##t
  USAGE_ANALYSIS_INSN(BIN(setdynamic));
  USAGE_ANALYSIS_OPERAND(BIN(setdynamic), 0, idx);
  USAGE_ANALYSIS_OPERAND(BIN(setdynamic), 1, level);
{
#line 167 "insns.def"
    int i;
    VALUE *dfp2 = GET_DFP();
    for (i = 0; i < level; i++) {
	dfp2 = GET_PREV_DFP(dfp2);
    }
    *(dfp2 - idx) = val;
#line 275 "vm.inc"


#undef CURRENT_INSN_setdynamic
#undef INSN_IS_SC
#undef INSN_LABEL
#undef LABEL_IS_SC
  END_INSN(setdynamic);
}}
}


INSN_ENTRY(getinstancevariable){

{
  VALUE val;

  ID id = (ID)GET_OPERAND(1);


  DEBUG_ENTER_INSN("getinstancevariable");
  ADD_PC(1+1);
  PREFETCH(GET_PC());
  #define CURRENT_INSN_getinstancevariable 1
  #define INSN_IS_SC()     0
  #define INSN_LABEL(lab)  LABEL_getinstancevariable_##lab
  #define LABEL_IS_SC(lab) LABEL_##lab##_##t
  USAGE_ANALYSIS_INSN(BIN(getinstancevariable));
  USAGE_ANALYSIS_OPERAND(BIN(getinstancevariable), 0, id);
{
#line 188 "insns.def"
    val = rb_ivar_get(GET_SELF(), id);
#line 307 "vm.inc"
  PUSH(val);

#undef CURRENT_INSN_getinstancevariable
#undef INSN_IS_SC
#undef INSN_LABEL
#undef LABEL_IS_SC
  END_INSN(getinstancevariable);
}}
}


INSN_ENTRY(setinstancevariable){

{


  ID id = (ID)GET_OPERAND(1);
  VALUE val = TOPN(0);

  DEBUG_ENTER_INSN("setinstancevariable");
  ADD_PC(1+1);
  PREFETCH(GET_PC());
  POPN(1);
  #define CURRENT_INSN_setinstancevariable 1
  #define INSN_IS_SC()     0
  #define INSN_LABEL(lab)  LABEL_setinstancevariable_##lab
  #define LABEL_IS_SC(lab) LABEL_##lab##_##t
  USAGE_ANALYSIS_INSN(BIN(setinstancevariable));
  USAGE_ANALYSIS_OPERAND(BIN(setinstancevariable), 0, id);
{
#line 204 "insns.def"
    rb_ivar_set(GET_SELF(), id, val);
#line 340 "vm.inc"


#undef CURRENT_INSN_setinstancevariable
#undef INSN_IS_SC
#undef INSN_LABEL
#undef LABEL_IS_SC
  END_INSN(setinstancevariable);
}}
}


INSN_ENTRY(getclassvariable){

{
  VALUE val;

  ID id = (ID)GET_OPERAND(1);


  DEBUG_ENTER_INSN("getclassvariable");
  ADD_PC(1+1);
  PREFETCH(GET_PC());
  #define CURRENT_INSN_getclassvariable 1
  #define INSN_IS_SC()     0
  #define INSN_LABEL(lab)  LABEL_getclassvariable_##lab
  #define LABEL_IS_SC(lab) LABEL_##lab##_##t
  USAGE_ANALYSIS_INSN(BIN(getclassvariable));
  USAGE_ANALYSIS_OPERAND(BIN(getclassvariable), 0, id);
{
#line 218 "insns.def"
    VALUE klass = eval_get_cvar_base(th, GET_ISEQ());
    val = rb_cvar_get(klass, id);
#line 373 "vm.inc"
  PUSH(val);

#undef CURRENT_INSN_getclassvariable
#undef INSN_IS_SC
#undef INSN_LABEL
#undef LABEL_IS_SC
  END_INSN(getclassvariable);
}}
}


INSN_ENTRY(setclassvariable){

{


  ID id = (ID)GET_OPERAND(1);
  VALUE val = TOPN(0);

  DEBUG_ENTER_INSN("setclassvariable");
  ADD_PC(1+1);
  PREFETCH(GET_PC());
  POPN(1);
  #define CURRENT_INSN_setclassvariable 1
  #define INSN_IS_SC()     0
  #define INSN_LABEL(lab)  LABEL_setclassvariable_##lab
  #define LABEL_IS_SC(lab) LABEL_##lab##_##t
  USAGE_ANALYSIS_INSN(BIN(setclassvariable));
  USAGE_ANALYSIS_OPERAND(BIN(setclassvariable), 0, id);
{
#line 233 "insns.def"
    rb_cvar_set(eval_get_cvar_base(th, GET_ISEQ()), id, val);
#line 406 "vm.inc"


#undef CURRENT_INSN_setclassvariable
#undef INSN_IS_SC
#undef INSN_LABEL
#undef LABEL_IS_SC
  END_INSN(setclassvariable);
}}
}


INSN_ENTRY(getconstant){

{
  VALUE val;

  ID id = (ID)GET_OPERAND(1);
  VALUE klass = TOPN(0);

  DEBUG_ENTER_INSN("getconstant");
  ADD_PC(1+1);
  PREFETCH(GET_PC());
  POPN(1);
  #define CURRENT_INSN_getconstant 1
  #define INSN_IS_SC()     0
  #define INSN_LABEL(lab)  LABEL_getconstant_##lab
  #define LABEL_IS_SC(lab) LABEL_##lab##_##t
  USAGE_ANALYSIS_INSN(BIN(getconstant));
  USAGE_ANALYSIS_OPERAND(BIN(getconstant), 0, id);
{
#line 254 "insns.def"
    val = eval_get_ev_const(th, GET_ISEQ(), klass, id, 0);
#line 439 "vm.inc"
  PUSH(val);

#undef CURRENT_INSN_getconstant
#undef INSN_IS_SC
#undef INSN_LABEL
#undef LABEL_IS_SC
  END_INSN(getconstant);
}}
}


INSN_ENTRY(setconstant){

{


  ID id = (ID)GET_OPERAND(1);
  VALUE val = TOPN(1);
  VALUE klass = TOPN(0);

  DEBUG_ENTER_INSN("setconstant");
  ADD_PC(1+1);
  PREFETCH(GET_PC());
  POPN(2);
  #define CURRENT_INSN_setconstant 1
  #define INSN_IS_SC()     0
  #define INSN_LABEL(lab)  LABEL_setconstant_##lab
  #define LABEL_IS_SC(lab) LABEL_##lab##_##t
  USAGE_ANALYSIS_INSN(BIN(setconstant));
  USAGE_ANALYSIS_OPERAND(BIN(setconstant), 0, id);
{
#line 277 "insns.def"
    if (klass == Qnil) {
	klass = th_get_cbase(th);
    }
    if (NIL_P(klass)) {
	rb_raise(rb_eTypeError, "no class/module to define constant");
    }

    switch (TYPE(klass)) {
    case T_CLASS:
    case T_MODULE:
	break;
    default:
	rb_raise(rb_eTypeError, "%s is not a class/module",
		 RSTRING_PTR(rb_obj_as_string(klass)));
    }

    rb_const_set(klass, id, val);
    INC_VM_STATE_VERSION();
#line 490 "vm.inc"


#undef CURRENT_INSN_setconstant
#undef INSN_IS_SC
#undef INSN_LABEL
#undef LABEL_IS_SC
  END_INSN(setconstant);
}}
}


INSN_ENTRY(getglobal){

{
  VALUE val;

  GENTRY entry = (GENTRY)GET_OPERAND(1);


  DEBUG_ENTER_INSN("getglobal");
  ADD_PC(1+1);
  PREFETCH(GET_PC());
  #define CURRENT_INSN_getglobal 1
  #define INSN_IS_SC()     0
  #define INSN_LABEL(lab)  LABEL_getglobal_##lab
  #define LABEL_IS_SC(lab) LABEL_##lab##_##t
  USAGE_ANALYSIS_INSN(BIN(getglobal));
  USAGE_ANALYSIS_OPERAND(BIN(getglobal), 0, entry);
{
#line 308 "insns.def"
    val = GET_GLOBAL(entry);
#line 522 "vm.inc"
  PUSH(val);

#undef CURRENT_INSN_getglobal
#undef INSN_IS_SC
#undef INSN_LABEL
#undef LABEL_IS_SC
  END_INSN(getglobal);
}}
}


INSN_ENTRY(setglobal){

{


  GENTRY entry = (GENTRY)GET_OPERAND(1);
  VALUE val = TOPN(0);

  DEBUG_ENTER_INSN("setglobal");
  ADD_PC(1+1);
  PREFETCH(GET_PC());
  POPN(1);
  #define CURRENT_INSN_setglobal 1
  #define INSN_IS_SC()     0
  #define INSN_LABEL(lab)  LABEL_setglobal_##lab
  #define LABEL_IS_SC(lab) LABEL_##lab##_##t
  USAGE_ANALYSIS_INSN(BIN(setglobal));
  USAGE_ANALYSIS_OPERAND(BIN(setglobal), 0, entry);
{
#line 322 "insns.def"
    SET_GLOBAL(entry, val);
#line 555 "vm.inc"


#undef CURRENT_INSN_setglobal
#undef INSN_IS_SC
#undef INSN_LABEL
#undef LABEL_IS_SC
  END_INSN(setglobal);
}}
}


INSN_ENTRY(putnil){

{
  VALUE val;




  DEBUG_ENTER_INSN("putnil");
  ADD_PC(1+0);
  PREFETCH(GET_PC());
  #define CURRENT_INSN_putnil 1
  #define INSN_IS_SC()     0
  #define INSN_LABEL(lab)  LABEL_putnil_##lab
  #define LABEL_IS_SC(lab) LABEL_##lab##_##t
  USAGE_ANALYSIS_INSN(BIN(putnil));
{
#line 341 "insns.def"
    val = Qnil;
#line 586 "vm.inc"
  PUSH(val);

#undef CURRENT_INSN_putnil
#undef INSN_IS_SC
#undef INSN_LABEL
#undef LABEL_IS_SC
  END_INSN(putnil);
}}
}


INSN_ENTRY(putself){

{
  VALUE val;




  DEBUG_ENTER_INSN("putself");
  ADD_PC(1+0);
  PREFETCH(GET_PC());
  #define CURRENT_INSN_putself 1
  #define INSN_IS_SC()     0
  #define INSN_LABEL(lab)  LABEL_putself_##lab
  #define LABEL_IS_SC(lab) LABEL_##lab##_##t
  USAGE_ANALYSIS_INSN(BIN(putself));
{
#line 355 "insns.def"
    val = GET_SELF();
#line 617 "vm.inc"
  PUSH(val);

#undef CURRENT_INSN_putself
#undef INSN_IS_SC
#undef INSN_LABEL
#undef LABEL_IS_SC
  END_INSN(putself);
}}
}


INSN_ENTRY(putundef){

{
  VALUE val;




  DEBUG_ENTER_INSN("putundef");
  ADD_PC(1+0);
  PREFETCH(GET_PC());
  #define CURRENT_INSN_putundef 1
  #define INSN_IS_SC()     0
  #define INSN_LABEL(lab)  LABEL_putundef_##lab
  #define LABEL_IS_SC(lab) LABEL_##lab##_##t
  USAGE_ANALYSIS_INSN(BIN(putundef));
{
#line 369 "insns.def"
    val = Qundef;
#line 648 "vm.inc"
  PUSH(val);

#undef CURRENT_INSN_putundef
#undef INSN_IS_SC
#undef INSN_LABEL
#undef LABEL_IS_SC
  END_INSN(putundef);
}}
}


INSN_ENTRY(putobject){

{


  VALUE val = (VALUE)GET_OPERAND(1);


  DEBUG_ENTER_INSN("putobject");
  ADD_PC(1+1);
  PREFETCH(GET_PC());
  #define CURRENT_INSN_putobject 1
  #define INSN_IS_SC()     0
  #define INSN_LABEL(lab)  LABEL_putobject_##lab
  #define LABEL_IS_SC(lab) LABEL_##lab##_##t
  USAGE_ANALYSIS_INSN(BIN(putobject));
  USAGE_ANALYSIS_OPERAND(BIN(putobject), 0, val);
{
#line 384 "insns.def"
    /* */
#line 680 "vm.inc"
  PUSH(val);

#undef CURRENT_INSN_putobject
#undef INSN_IS_SC
#undef INSN_LABEL
#undef LABEL_IS_SC
  END_INSN(putobject);
}}
}


INSN_ENTRY(putstring){

{


  VALUE val = (VALUE)GET_OPERAND(1);


  DEBUG_ENTER_INSN("putstring");
  ADD_PC(1+1);
  PREFETCH(GET_PC());
  #define CURRENT_INSN_putstring 1
  #define INSN_IS_SC()     0
  #define INSN_LABEL(lab)  LABEL_putstring_##lab
  #define LABEL_IS_SC(lab) LABEL_##lab##_##t
  USAGE_ANALYSIS_INSN(BIN(putstring));
  USAGE_ANALYSIS_OPERAND(BIN(putstring), 0, val);
{
#line 399 "insns.def"
    val = rb_str_new3(val);
#line 712 "vm.inc"
  PUSH(val);

#undef CURRENT_INSN_putstring
#undef INSN_IS_SC
#undef INSN_LABEL
#undef LABEL_IS_SC
  END_INSN(putstring);
}}
}


INSN_ENTRY(concatstrings){

{
  VALUE val;

  num_t num = (num_t)GET_OPERAND(1);


  DEBUG_ENTER_INSN("concatstrings");
  ADD_PC(1+1);
  PREFETCH(GET_PC());
  #define CURRENT_INSN_concatstrings 1
  #define INSN_IS_SC()     0
  #define INSN_LABEL(lab)  LABEL_concatstrings_##lab
  #define LABEL_IS_SC(lab) LABEL_##lab##_##t
  USAGE_ANALYSIS_INSN(BIN(concatstrings));
  USAGE_ANALYSIS_OPERAND(BIN(concatstrings), 0, num);
{
#line 413 "insns.def"
    int i;
    VALUE v;

    val = rb_str_new(0, 0);
    for (i = num - 1; i >= 0; i--) {
	v = TOPN(i);
	rb_str_append(val, v);
    }
    POPN(num);
#line 752 "vm.inc"
  PUSH(val);

#undef CURRENT_INSN_concatstrings
#undef INSN_IS_SC
#undef INSN_LABEL
#undef LABEL_IS_SC
  END_INSN(concatstrings);
}}
}


INSN_ENTRY(tostring){

{



  VALUE val = TOPN(0);

  DEBUG_ENTER_INSN("tostring");
  ADD_PC(1+0);
  PREFETCH(GET_PC());
  POPN(1);
  #define CURRENT_INSN_tostring 1
  #define INSN_IS_SC()     0
  #define INSN_LABEL(lab)  LABEL_tostring_##lab
  #define LABEL_IS_SC(lab) LABEL_##lab##_##t
  USAGE_ANALYSIS_INSN(BIN(tostring));
{
#line 435 "insns.def"
    val = rb_obj_as_string(val);
#line 784 "vm.inc"
  PUSH(val);

#undef CURRENT_INSN_tostring
#undef INSN_IS_SC
#undef INSN_LABEL
#undef LABEL_IS_SC
  END_INSN(tostring);
}}
}


INSN_ENTRY(toregexp){

{
  VALUE val;

  num_t flag = (num_t)GET_OPERAND(1);
  VALUE str = TOPN(0);

  DEBUG_ENTER_INSN("toregexp");
  ADD_PC(1+1);
  PREFETCH(GET_PC());
  POPN(1);
  #define CURRENT_INSN_toregexp 1
  #define INSN_IS_SC()     0
  #define INSN_LABEL(lab)  LABEL_toregexp_##lab
  #define LABEL_IS_SC(lab) LABEL_##lab##_##t
  USAGE_ANALYSIS_INSN(BIN(toregexp));
  USAGE_ANALYSIS_OPERAND(BIN(toregexp), 0, flag);
{
#line 449 "insns.def"
    val = rb_reg_new(RSTRING_PTR(str), RSTRING_LEN(str), flag);
#line 817 "vm.inc"
  PUSH(val);

#undef CURRENT_INSN_toregexp
#undef INSN_IS_SC
#undef INSN_LABEL
#undef LABEL_IS_SC
  END_INSN(toregexp);
}}
}


INSN_ENTRY(newarray){

{
  VALUE val;

  num_t num = (num_t)GET_OPERAND(1);


  DEBUG_ENTER_INSN("newarray");
  ADD_PC(1+1);
  PREFETCH(GET_PC());
  #define CURRENT_INSN_newarray 1
  #define INSN_IS_SC()     0
  #define INSN_LABEL(lab)  LABEL_newarray_##lab
  #define LABEL_IS_SC(lab) LABEL_##lab##_##t
  USAGE_ANALYSIS_INSN(BIN(newarray));
  USAGE_ANALYSIS_OPERAND(BIN(newarray), 0, num);
{
#line 463 "insns.def"
    val = rb_ary_new4((long)num, STACK_ADDR_FROM_TOP(num));
    POPN(num);
#line 850 "vm.inc"
  PUSH(val);

#undef CURRENT_INSN_newarray
#undef INSN_IS_SC
#undef INSN_LABEL
#undef LABEL_IS_SC
  END_INSN(newarray);
}}
}


INSN_ENTRY(duparray){

{
  VALUE val;

  VALUE ary = (VALUE)GET_OPERAND(1);


  DEBUG_ENTER_INSN("duparray");
  ADD_PC(1+1);
  PREFETCH(GET_PC());
  #define CURRENT_INSN_duparray 1
  #define INSN_IS_SC()     0
  #define INSN_LABEL(lab)  LABEL_duparray_##lab
  #define LABEL_IS_SC(lab) LABEL_##lab##_##t
  USAGE_ANALYSIS_INSN(BIN(duparray));
  USAGE_ANALYSIS_OPERAND(BIN(duparray), 0, ary);
{
#line 478 "insns.def"
    val = rb_ary_dup(ary);
#line 882 "vm.inc"
  PUSH(val);

#undef CURRENT_INSN_duparray
#undef INSN_IS_SC
#undef INSN_LABEL
#undef LABEL_IS_SC
  END_INSN(duparray);
}}
}


INSN_ENTRY(expandarray){

{


  num_t flag = (num_t)GET_OPERAND(2);
  num_t num = (num_t)GET_OPERAND(1);
  VALUE ary = TOPN(0);

  DEBUG_ENTER_INSN("expandarray");
  ADD_PC(1+2);
  PREFETCH(GET_PC());
  POPN(1);
  #define CURRENT_INSN_expandarray 1
  #define INSN_IS_SC()     0
  #define INSN_LABEL(lab)  LABEL_expandarray_##lab
  #define LABEL_IS_SC(lab) LABEL_##lab##_##t
  USAGE_ANALYSIS_INSN(BIN(expandarray));
  USAGE_ANALYSIS_OPERAND(BIN(expandarray), 0, num);
  USAGE_ANALYSIS_OPERAND(BIN(expandarray), 1, flag);
{
#line 496 "insns.def"
    int i;
    if ((long)num >= 0) {
	int len;
	if (TYPE(ary) != T_ARRAY) {
	    ary = rb_ary_to_ary(ary);
	}
	len = RARRAY_LEN(ary);
	for (i = 0; i < len && i < num; i++) {
	    PUSH(RARRAY_PTR(ary)[i]);
	}
	for (; i < num; i++) {
	    PUSH(Qnil);
	}
	if (flag) {
	    if (len > num) {
		PUSH(rb_ary_new4(len - num, &RARRAY_PTR(ary)[num]));
	    }
	    else {
		PUSH(rb_ary_new());
	    }
	}
    }
    else {
	long holdnum = -num;
	VALUE val;

	val = rb_ary_new4(holdnum, STACK_ADDR_FROM_TOP(holdnum));
	if (CLASS_OF(ary) == rb_cArray) {
	    val = rb_ary_concat(val, ary);
	}
	else {
	    rb_ary_push(val, ary);
	}
	POPN(holdnum);
	PUSH(val);
    }
#line 952 "vm.inc"


#undef CURRENT_INSN_expandarray
#undef INSN_IS_SC
#undef INSN_LABEL
#undef LABEL_IS_SC
  END_INSN(expandarray);
}}
}


INSN_ENTRY(concatarray){

{
  VALUE ary;


  VALUE ary1 = TOPN(1);
  VALUE ary2st = TOPN(0);

  DEBUG_ENTER_INSN("concatarray");
  ADD_PC(1+0);
  PREFETCH(GET_PC());
  POPN(2);
  #define CURRENT_INSN_concatarray 1
  #define INSN_IS_SC()     0
  #define INSN_LABEL(lab)  LABEL_concatarray_##lab
  #define LABEL_IS_SC(lab) LABEL_##lab##_##t
  USAGE_ANALYSIS_INSN(BIN(concatarray));
{
#line 545 "insns.def"
    VALUE ary2 = ary2st;

    if (ary2 == Qnil) {
	ary = ary1;
    }
    else {
	VALUE tmp1 = rb_check_convert_type(ary1, T_ARRAY, "Array", "to_splat");
	VALUE tmp2 = rb_check_convert_type(ary2, T_ARRAY, "Array", "to_splat");

	if (NIL_P(tmp1)) {
	    tmp1 = rb_ary_new3(1, ary1);
	}
	
	if (NIL_P(tmp2)) {
	    tmp2 = rb_ary_new3(1, ary2);
	}

	if (tmp1 == ary1) {
	    tmp1 = rb_ary_dup(ary1);
	}
	ary = rb_ary_concat(tmp1, tmp2);
    }
#line 1006 "vm.inc"
  PUSH(ary);

#undef CURRENT_INSN_concatarray
#undef INSN_IS_SC
#undef INSN_LABEL
#undef LABEL_IS_SC
  END_INSN(concatarray);
}}
}


INSN_ENTRY(splatarray){

{
  VALUE obj;

  VALUE flag = (VALUE)GET_OPERAND(1);
  VALUE ary = TOPN(0);

  DEBUG_ENTER_INSN("splatarray");
  ADD_PC(1+1);
  PREFETCH(GET_PC());
  POPN(1);
  #define CURRENT_INSN_splatarray 1
  #define INSN_IS_SC()     0
  #define INSN_LABEL(lab)  LABEL_splatarray_##lab
  #define LABEL_IS_SC(lab) LABEL_##lab##_##t
  USAGE_ANALYSIS_INSN(BIN(splatarray));
  USAGE_ANALYSIS_OPERAND(BIN(splatarray), 0, flag);
{
#line 580 "insns.def"
    VALUE tmp = rb_check_convert_type(ary, T_ARRAY, "Array", "to_splat");
    if (NIL_P(tmp)) {
	tmp = rb_ary_new3(1, ary);
    }
    obj = tmp;
    
    if (0) {
	if (flag == Qfalse) {
	    /* NODE_SPLAT */
	    obj = rb_Array(ary);
	}
	else {
	    /* NODE_SVALUE */
	    if (RARRAY_LEN(ary) == 0) {
		obj = Qnil;
	    }
	    else if (RARRAY_LEN(ary) == 1) {
		obj = RARRAY_PTR(ary)[0];
	    }
	    else {
		obj = ary;
	    }
	}
    }
#line 1062 "vm.inc"
  PUSH(obj);

#undef CURRENT_INSN_splatarray
#undef INSN_IS_SC
#undef INSN_LABEL
#undef LABEL_IS_SC
  END_INSN(splatarray);
}}
}


INSN_ENTRY(checkincludearray){

{
  VALUE result;

  VALUE flag = (VALUE)GET_OPERAND(1);
  VALUE obj = TOPN(1);
  VALUE ary = TOPN(0);

  DEBUG_ENTER_INSN("checkincludearray");
  ADD_PC(1+1);
  PREFETCH(GET_PC());
  POPN(2);
  #define CURRENT_INSN_checkincludearray 1
  #define INSN_IS_SC()     0
  #define INSN_LABEL(lab)  LABEL_checkincludearray_##lab
  #define LABEL_IS_SC(lab) LABEL_##lab##_##t
  USAGE_ANALYSIS_INSN(BIN(checkincludearray));
  USAGE_ANALYSIS_OPERAND(BIN(checkincludearray), 0, flag);
{
#line 617 "insns.def"
    int i;
    result = Qfalse;

    if (TYPE(ary) != T_ARRAY) {
	ary = rb_Array(ary);
    }

    if (flag == Qtrue) {
	/* NODE_CASE */
	for (i = 0; i < RARRAY_LEN(ary); i++) {
	    /* TODO: fix me (use another method dispatch) */
	    if (RTEST(rb_funcall2(RARRAY_PTR(ary)[i], idEqq, 1, &obj))) {
		result = Qtrue;
		break;
	    }
	}
    }
    else {
	obj = Qfalse;
	/* NODE_WHEN */
	for (i = 0; i < RARRAY_LEN(ary); i++) {
	    if (RTEST(RARRAY_PTR(ary)[i])) {
		obj = result = Qtrue;
		break;
	    }
	}
    }
#line 1122 "vm.inc"
  PUSH(obj);
  PUSH(result);

#undef CURRENT_INSN_checkincludearray
#undef INSN_IS_SC
#undef INSN_LABEL
#undef LABEL_IS_SC
  END_INSN(checkincludearray);
}}
}


INSN_ENTRY(newhash){

{
  VALUE val;

  num_t num = (num_t)GET_OPERAND(1);


  DEBUG_ENTER_INSN("newhash");
  ADD_PC(1+1);
  PREFETCH(GET_PC());
  #define CURRENT_INSN_newhash 1
  #define INSN_IS_SC()     0
  #define INSN_LABEL(lab)  LABEL_newhash_##lab
  #define LABEL_IS_SC(lab) LABEL_##lab##_##t
  USAGE_ANALYSIS_INSN(BIN(newhash));
  USAGE_ANALYSIS_OPERAND(BIN(newhash), 0, num);
{
#line 657 "insns.def"
    int i;
    VALUE k, v;
    val = rb_hash_new();

    for (i = num; i > 0; i -= 2) {
	v = TOPN(i - 2);
	k = TOPN(i - 1);
	rb_hash_aset(val, k, v);
    }
    POPN(num);
#line 1164 "vm.inc"
  PUSH(val);

#undef CURRENT_INSN_newhash
#undef INSN_IS_SC
#undef INSN_LABEL
#undef LABEL_IS_SC
  END_INSN(newhash);
}}
}


INSN_ENTRY(newrange){

{
  VALUE val;

  num_t flag = (num_t)GET_OPERAND(1);
  VALUE low = TOPN(1);
  VALUE high = TOPN(0);

  DEBUG_ENTER_INSN("newrange");
  ADD_PC(1+1);
  PREFETCH(GET_PC());
  POPN(2);
  #define CURRENT_INSN_newrange 1
  #define INSN_IS_SC()     0
  #define INSN_LABEL(lab)  LABEL_newrange_##lab
  #define LABEL_IS_SC(lab) LABEL_##lab##_##t
  USAGE_ANALYSIS_INSN(BIN(newrange));
  USAGE_ANALYSIS_OPERAND(BIN(newrange), 0, flag);
{
#line 680 "insns.def"
    val = rb_range_new(low, high, flag);
#line 1198 "vm.inc"
  PUSH(val);

#undef CURRENT_INSN_newrange
#undef INSN_IS_SC
#undef INSN_LABEL
#undef LABEL_IS_SC
  END_INSN(newrange);
}}
}


INSN_ENTRY(putnot){

{
  VALUE val;


  VALUE obj = TOPN(0);

  DEBUG_ENTER_INSN("putnot");
  ADD_PC(1+0);
  PREFETCH(GET_PC());
  POPN(1);
  #define CURRENT_INSN_putnot 1
  #define INSN_IS_SC()     0
  #define INSN_LABEL(lab)  LABEL_putnot_##lab
  #define LABEL_IS_SC(lab) LABEL_##lab##_##t
  USAGE_ANALYSIS_INSN(BIN(putnot));
{
#line 694 "insns.def"
    if (RTEST(obj)) {
	val = Qfalse;
    }
    else {
	val = Qtrue;
    }
#line 1235 "vm.inc"
  PUSH(val);

#undef CURRENT_INSN_putnot
#undef INSN_IS_SC
#undef INSN_LABEL
#undef LABEL_IS_SC
  END_INSN(putnot);
}}
}


INSN_ENTRY(pop){

{



  VALUE val = TOPN(0);

  DEBUG_ENTER_INSN("pop");
  ADD_PC(1+0);
  PREFETCH(GET_PC());
  POPN(1);
  #define CURRENT_INSN_pop 1
  #define INSN_IS_SC()     0
  #define INSN_LABEL(lab)  LABEL_pop_##lab
  #define LABEL_IS_SC(lab) LABEL_##lab##_##t
  USAGE_ANALYSIS_INSN(BIN(pop));
{
#line 718 "insns.def"
    val = val;
    /* none */
#line 1268 "vm.inc"


#undef CURRENT_INSN_pop
#undef INSN_IS_SC
#undef INSN_LABEL
#undef LABEL_IS_SC
  END_INSN(pop);
}}
}


INSN_ENTRY(dup){

{
  VALUE val2;
  VALUE val1;


  VALUE val = TOPN(0);

  DEBUG_ENTER_INSN("dup");
  ADD_PC(1+0);
  PREFETCH(GET_PC());
  POPN(1);
  #define CURRENT_INSN_dup 1
  #define INSN_IS_SC()     0
  #define INSN_LABEL(lab)  LABEL_dup_##lab
  #define LABEL_IS_SC(lab) LABEL_##lab##_##t
  USAGE_ANALYSIS_INSN(BIN(dup));
{
#line 733 "insns.def"
    val1 = val2 = val;
#line 1301 "vm.inc"
  PUSH(val1);
  PUSH(val2);

#undef CURRENT_INSN_dup
#undef INSN_IS_SC
#undef INSN_LABEL
#undef LABEL_IS_SC
  END_INSN(dup);
}}
}


INSN_ENTRY(dupn){

{


  num_t n = (num_t)GET_OPERAND(1);


  DEBUG_ENTER_INSN("dupn");
  ADD_PC(1+1);
  PREFETCH(GET_PC());
  #define CURRENT_INSN_dupn 1
  #define INSN_IS_SC()     0
  #define INSN_LABEL(lab)  LABEL_dupn_##lab
  #define LABEL_IS_SC(lab) LABEL_##lab##_##t
  USAGE_ANALYSIS_INSN(BIN(dupn));
  USAGE_ANALYSIS_OPERAND(BIN(dupn), 0, n);
{
#line 747 "insns.def"
    int i;
    VALUE *sp = STACK_ADDR_FROM_TOP(n);
    for (i = 0; i < n; i++) {
	GET_SP()[i] = sp[i];
    }
    INC_SP(n);
#line 1339 "vm.inc"


#undef CURRENT_INSN_dupn
#undef INSN_IS_SC
#undef INSN_LABEL
#undef LABEL_IS_SC
  END_INSN(dupn);
}}
}


INSN_ENTRY(swap){

{



  VALUE val = TOPN(1);
  VALUE obj = TOPN(0);

  DEBUG_ENTER_INSN("swap");
  ADD_PC(1+0);
  PREFETCH(GET_PC());
  POPN(2);
  #define CURRENT_INSN_swap 1
  #define INSN_IS_SC()     0
  #define INSN_LABEL(lab)  LABEL_swap_##lab
  #define LABEL_IS_SC(lab) LABEL_##lab##_##t
  USAGE_ANALYSIS_INSN(BIN(swap));
{
#line 767 "insns.def"
    /* none */
#line 1372 "vm.inc"
  PUSH(obj);
  PUSH(val);

#undef CURRENT_INSN_swap
#undef INSN_IS_SC
#undef INSN_LABEL
#undef LABEL_IS_SC
  END_INSN(swap);
}}
}


INSN_ENTRY(reput){

{



  VALUE val = TOPN(0);

  DEBUG_ENTER_INSN("reput");
  ADD_PC(1+0);
  PREFETCH(GET_PC());
  POPN(1);
  #define CURRENT_INSN_reput 1
  #define INSN_IS_SC()     0
  #define INSN_LABEL(lab)  LABEL_reput_##lab
  #define LABEL_IS_SC(lab) LABEL_##lab##_##t
  USAGE_ANALYSIS_INSN(BIN(reput));
{
#line 781 "insns.def"
    /* none */
#line 1405 "vm.inc"
  PUSH(val);

#undef CURRENT_INSN_reput
#undef INSN_IS_SC
#undef INSN_LABEL
#undef LABEL_IS_SC
  END_INSN(reput);
}}
}


INSN_ENTRY(topn){

{
  VALUE val;

  num_t n = (num_t)GET_OPERAND(1);


  DEBUG_ENTER_INSN("topn");
  ADD_PC(1+1);
  PREFETCH(GET_PC());
  #define CURRENT_INSN_topn 1
  #define INSN_IS_SC()     0
  #define INSN_LABEL(lab)  LABEL_topn_##lab
  #define LABEL_IS_SC(lab) LABEL_##lab##_##t
  USAGE_ANALYSIS_INSN(BIN(topn));
  USAGE_ANALYSIS_OPERAND(BIN(topn), 0, n);
{
#line 795 "insns.def"
    val = TOPN(n);
#line 1437 "vm.inc"
  PUSH(val);

#undef CURRENT_INSN_topn
#undef INSN_IS_SC
#undef INSN_LABEL
#undef LABEL_IS_SC
  END_INSN(topn);
}}
}


INSN_ENTRY(setn){

{


  num_t n = (num_t)GET_OPERAND(1);
  VALUE val = TOPN(0);

  DEBUG_ENTER_INSN("setn");
  ADD_PC(1+1);
  PREFETCH(GET_PC());
  POPN(1);
  #define CURRENT_INSN_setn 1
  #define INSN_IS_SC()     0
  #define INSN_LABEL(lab)  LABEL_setn_##lab
  #define LABEL_IS_SC(lab) LABEL_##lab##_##t
  USAGE_ANALYSIS_INSN(BIN(setn));
  USAGE_ANALYSIS_OPERAND(BIN(setn), 0, n);
{
#line 809 "insns.def"
    GET_SP()[-n] = val;
#line 1470 "vm.inc"
  PUSH(val);

#undef CURRENT_INSN_setn
#undef INSN_IS_SC
#undef INSN_LABEL
#undef LABEL_IS_SC
  END_INSN(setn);
}}
}


INSN_ENTRY(emptstack){

{





  DEBUG_ENTER_INSN("emptstack");
  ADD_PC(1+0);
  PREFETCH(GET_PC());
  #define CURRENT_INSN_emptstack 1
  #define INSN_IS_SC()     0
  #define INSN_LABEL(lab)  LABEL_emptstack_##lab
  #define LABEL_IS_SC(lab) LABEL_##lab##_##t
  USAGE_ANALYSIS_INSN(BIN(emptstack));
{
#line 823 "insns.def"
    SET_SP(GET_CFP()->bp);
#line 1501 "vm.inc"


#undef CURRENT_INSN_emptstack
#undef INSN_IS_SC
#undef INSN_LABEL
#undef LABEL_IS_SC
  END_INSN(emptstack);
}}
}


INSN_ENTRY(definemethod){

{


  num_t is_singleton = (num_t)GET_OPERAND(3);
  ISEQ body = (ISEQ)GET_OPERAND(2);
  ID id = (ID)GET_OPERAND(1);
  VALUE obj = TOPN(0);

  DEBUG_ENTER_INSN("definemethod");
  ADD_PC(1+3);
  PREFETCH(GET_PC());
  POPN(1);
  #define CURRENT_INSN_definemethod 1
  #define INSN_IS_SC()     0
  #define INSN_LABEL(lab)  LABEL_definemethod_##lab
  #define LABEL_IS_SC(lab) LABEL_##lab##_##t
  USAGE_ANALYSIS_INSN(BIN(definemethod));
  USAGE_ANALYSIS_OPERAND(BIN(definemethod), 0, id);
  USAGE_ANALYSIS_OPERAND(BIN(definemethod), 1, body);
  USAGE_ANALYSIS_OPERAND(BIN(definemethod), 2, is_singleton);
{
#line 842 "insns.def"
    eval_define_method(th, obj, id, body, is_singleton,
		       get_cref(GET_ISEQ(), GET_LFP()));
#line 1539 "vm.inc"


#undef CURRENT_INSN_definemethod
#undef INSN_IS_SC
#undef INSN_LABEL
#undef LABEL_IS_SC
  END_INSN(definemethod);
}}
}


INSN_ENTRY(alias){

{


  ID id2 = (ID)GET_OPERAND(3);
  ID id1 = (ID)GET_OPERAND(2);
  VALUE v_p = (VALUE)GET_OPERAND(1);


  DEBUG_ENTER_INSN("alias");
  ADD_PC(1+3);
  PREFETCH(GET_PC());
  #define CURRENT_INSN_alias 1
  #define INSN_IS_SC()     0
  #define INSN_LABEL(lab)  LABEL_alias_##lab
  #define LABEL_IS_SC(lab) LABEL_##lab##_##t
  USAGE_ANALYSIS_INSN(BIN(alias));
  USAGE_ANALYSIS_OPERAND(BIN(alias), 0, v_p);
  USAGE_ANALYSIS_OPERAND(BIN(alias), 1, id1);
  USAGE_ANALYSIS_OPERAND(BIN(alias), 2, id2);
{
#line 858 "insns.def"
    VALUE klass;

    if (v_p == Qtrue) {
	rb_alias_variable(id1, id2);
    }
    else {
	klass = get_cref(GET_ISEQ(), GET_LFP())->nd_clss;
	rb_alias(klass, id1, id2);
    }
#line 1583 "vm.inc"


#undef CURRENT_INSN_alias
#undef INSN_IS_SC
#undef INSN_LABEL
#undef LABEL_IS_SC
  END_INSN(alias);
}}
}


INSN_ENTRY(undef){

{


  ID id = (ID)GET_OPERAND(1);


  DEBUG_ENTER_INSN("undef");
  ADD_PC(1+1);
  PREFETCH(GET_PC());
  #define CURRENT_INSN_undef 1
  #define INSN_IS_SC()     0
  #define INSN_LABEL(lab)  LABEL_undef_##lab
  #define LABEL_IS_SC(lab) LABEL_##lab##_##t
  USAGE_ANALYSIS_INSN(BIN(undef));
  USAGE_ANALYSIS_OPERAND(BIN(undef), 0, id);
{
#line 880 "insns.def"
    VALUE klass = get_cref(GET_ISEQ(), GET_LFP())->nd_clss;
    rb_undef(klass, id);
    INC_VM_STATE_VERSION();
#line 1617 "vm.inc"


#undef CURRENT_INSN_undef
#undef INSN_IS_SC
#undef INSN_LABEL
#undef LABEL_IS_SC
  END_INSN(undef);
}}
}


INSN_ENTRY(defined){

{
  VALUE val;

  VALUE needstr = (VALUE)GET_OPERAND(3);
  VALUE obj = (VALUE)GET_OPERAND(2);
  num_t type = (num_t)GET_OPERAND(1);
  VALUE v = TOPN(0);

  DEBUG_ENTER_INSN("defined");
  ADD_PC(1+3);
  PREFETCH(GET_PC());
  POPN(1);
  #define CURRENT_INSN_defined 1
  #define INSN_IS_SC()     0
  #define INSN_LABEL(lab)  LABEL_defined_##lab
  #define LABEL_IS_SC(lab) LABEL_##lab##_##t
  USAGE_ANALYSIS_INSN(BIN(defined));
  USAGE_ANALYSIS_OPERAND(BIN(defined), 0, type);
  USAGE_ANALYSIS_OPERAND(BIN(defined), 1, obj);
  USAGE_ANALYSIS_OPERAND(BIN(defined), 2, needstr);
{
#line 896 "insns.def"
    VALUE klass;
    char *expr_type = 0;
    char buf[0x10];
    
    val = Qnil;

    switch (type) {
      case DEFINED_IVAR:
	if (rb_ivar_defined(GET_SELF(), SYM2ID(obj))) {
	    expr_type = "instance-variable";
	}
	break;
      case DEFINED_IVAR2:
	klass = get_cref(GET_ISEQ(), GET_LFP())->nd_clss;
	break;
      case DEFINED_GVAR:
	if (rb_gvar_defined((struct global_entry *)(obj & ~1))) {
	    expr_type = "global-variable";
	}
	break;
      case DEFINED_CVAR:
	klass = get_cref(GET_ISEQ(), GET_LFP())->nd_clss;
	if (rb_cvar_defined(klass, SYM2ID(obj))) {
	    expr_type = "class variable";
	}
	break;
      case DEFINED_CONST:
	klass = v;
	if (eval_get_ev_const(th, GET_ISEQ(), klass, SYM2ID(obj), 1)) {
	    expr_type = "constant";
	}
	break;
      case DEFINED_FUNC:
	klass = CLASS_OF(v);
	if (rb_method_boundp(klass, SYM2ID(obj), 0)) {
	    expr_type = "method";
	}
	break;
      case DEFINED_METHOD:{
	  VALUE klass = CLASS_OF(v);
	  NODE *method = (NODE *) rb_method_node(klass, SYM2ID(obj));

	  if (method) {
	      if (!(method->nd_noex & NOEX_PRIVATE)) {
		  if (!((method->nd_noex & NOEX_PROTECTED) &&
			!rb_obj_is_kind_of(GET_SELF(),
					   rb_class_real(klass)))) {
		      expr_type = "method";
		  }
	      }
	  }
	  break;
      }
      case DEFINED_YIELD:
	if (GET_BLOCK_PTR()) {
	    expr_type = "yield";
	}
	break;
      case DEFINED_ZSUPER:{
	  rb_iseq_t *ip = GET_ISEQ();
	  while (ip) {
	      if (ip->defined_method_id) {
		  break;
	      }
	      ip = ip->parent_iseq;
	  }
	  if (ip) {
	      VALUE klass = search_super_klass(ip->klass, GET_SELF());
	      if (rb_method_boundp(klass, ip->defined_method_id, 0)) {
		  expr_type = "super";
	      }
	  }
	  break;
      }
      case DEFINED_REF:{
	  int nth = FIX2INT(obj);
	  VALUE backref = *lfp_svar(GET_LFP(), 1);
	  
	  if (rb_reg_nth_match(nth, backref) != Qnil) {
	      snprintf(buf, 0x10, "$%d", nth);
	      expr_type = buf;
	  }
	  break;
      }
      default:
	rb_bug("unimplemented defined? type (VM)");
	break;
    }
    if (expr_type != 0) {
	if (needstr != Qfalse) {
	    val = rb_str_new2(expr_type);
	}
	else {
	    val = Qtrue;
	}
    }
#line 1749 "vm.inc"
  PUSH(val);

#undef CURRENT_INSN_defined
#undef INSN_IS_SC
#undef INSN_LABEL
#undef LABEL_IS_SC
  END_INSN(defined);
}}
}


INSN_ENTRY(postexe){

{


  ISEQ blockiseq = (ISEQ)GET_OPERAND(1);


  DEBUG_ENTER_INSN("postexe");
  ADD_PC(1+1);
  PREFETCH(GET_PC());
  #define CURRENT_INSN_postexe 1
  #define INSN_IS_SC()     0
  #define INSN_LABEL(lab)  LABEL_postexe_##lab
  #define LABEL_IS_SC(lab) LABEL_##lab##_##t
  USAGE_ANALYSIS_INSN(BIN(postexe));
  USAGE_ANALYSIS_OPERAND(BIN(postexe), 0, blockiseq);
{
#line 1005 "insns.def"
    rb_block_t *blockptr;
    VALUE proc;

    blockptr = RUBY_VM_GET_BLOCK_PTR_IN_CFP(GET_CFP());
    blockptr->iseq = blockiseq;
    blockptr->proc = 0;

    proc = th_make_proc(th, GET_CFP(), blockptr);
    rb_set_end_proc(call_yarv_end_proc, proc);
#line 1789 "vm.inc"


#undef CURRENT_INSN_postexe
#undef INSN_IS_SC
#undef INSN_LABEL
#undef LABEL_IS_SC
  END_INSN(postexe);
}}
}


INSN_ENTRY(trace){

{


  VALUE args = (VALUE)GET_OPERAND(2);
  num_t flag = (num_t)GET_OPERAND(1);


  DEBUG_ENTER_INSN("trace");
  ADD_PC(1+2);
  PREFETCH(GET_PC());
  #define CURRENT_INSN_trace 1
  #define INSN_IS_SC()     0
  #define INSN_LABEL(lab)  LABEL_trace_##lab
  #define LABEL_IS_SC(lab) LABEL_##lab##_##t
  USAGE_ANALYSIS_INSN(BIN(trace));
  USAGE_ANALYSIS_OPERAND(BIN(trace), 0, flag);
  USAGE_ANALYSIS_OPERAND(BIN(trace), 1, args);
{
#line 1027 "insns.def"
    /* TODO: trace instruction design */
    if (th->vm->trace_flag & flag) {
	/* */
	args = Qnil;
    }
#line 1827 "vm.inc"


#undef CURRENT_INSN_trace
#undef INSN_IS_SC
#undef INSN_LABEL
#undef LABEL_IS_SC
  END_INSN(trace);
}}
}


INSN_ENTRY(defineclass){

{
  VALUE val;

  num_t define_type = (num_t)GET_OPERAND(3);
  ISEQ klass_iseq = (ISEQ)GET_OPERAND(2);
  ID id = (ID)GET_OPERAND(1);
  VALUE cbase = TOPN(1);
  VALUE super = TOPN(0);

  DEBUG_ENTER_INSN("defineclass");
  ADD_PC(1+3);
  PREFETCH(GET_PC());
  POPN(2);
  #define CURRENT_INSN_defineclass 1
  #define INSN_IS_SC()     0
  #define INSN_LABEL(lab)  LABEL_defineclass_##lab
  #define LABEL_IS_SC(lab) LABEL_##lab##_##t
  USAGE_ANALYSIS_INSN(BIN(defineclass));
  USAGE_ANALYSIS_OPERAND(BIN(defineclass), 0, id);
  USAGE_ANALYSIS_OPERAND(BIN(defineclass), 1, klass_iseq);
  USAGE_ANALYSIS_OPERAND(BIN(defineclass), 2, define_type);
{
#line 1053 "insns.def"
    VALUE klass;

    if (define_type == 0) {
	/* val is dummy.  classdef returns class scope value */

	if (super == Qnil) {
	    super = rb_cObject;
	}

	if (cbase == Qnil) {
	    cbase = th_get_cbase(th);
	}

	/* find klass */
	if (rb_const_defined_at(cbase, id)) {
	    /* already exist */
	    klass = rb_const_get_at(cbase, id);
	    if (TYPE(klass) != T_CLASS) {
		rb_raise(rb_eTypeError, "%s is not a class", rb_id2name(id));
	    }

	    if (super != rb_cObject) {
		VALUE tmp;
		tmp = rb_class_real(RCLASS(klass)->super);

		if (tmp != super) {
		    rb_raise(rb_eTypeError, "superclass mismatch for class %s",
			     rb_id2name(id));
		}
	    }
	}
	else {
	    /* new class declaration */
	    klass = rb_define_class_id(id, super);
	    rb_set_class_path(klass, cbase, rb_id2name(id));
	    rb_const_set(cbase, id, klass);
	    rb_class_inherited(super, klass);
	}
    }
    else if (define_type == 1) {
	/* val is dummy.  classdef returns class scope value */
	/* super is dummy */
	klass = rb_singleton_class(cbase);
    }
    else if (define_type == 2) {
	/* val is dummy.  classdef returns class scope value */
	/* super is dummy */
	if (cbase == Qnil) {
	    cbase = th_get_cbase(th);
	}

	/* find klass */
	if (rb_const_defined_at(cbase, id)) {
	    klass = rb_const_get_at(cbase, id);
	    /* already exist */
	    if (TYPE(klass) != T_MODULE) {
		rb_raise(rb_eTypeError, "%s is not a module", rb_id2name(id));
	    }
	}
	else {
	    /* new module declaration */
	    klass = rb_define_module_id(id);
	    rb_set_class_path(klass, cbase, rb_id2name(id));
	    rb_const_set(cbase, id, klass);
	}
    }
    else {
	rb_bug("unknown defineclass type: %d", define_type);
    }
    
    COPY_CREF(klass_iseq->cref_stack, th_cref_push(th, klass, NOEX_PUBLIC));
    
    /* enter scope */
    push_frame(th, klass_iseq,
	       FRAME_MAGIC_CLASS, klass, (VALUE) GET_DFP() | 0x02,
	       klass_iseq->iseq_encoded, GET_SP(), 0,
	       klass_iseq->local_size);
    RESTORE_REGS();

    INC_VM_STATE_VERSION();
    NEXT_INSN();
#line 1945 "vm.inc"
  PUSH(val);

#undef CURRENT_INSN_defineclass
#undef INSN_IS_SC
#undef INSN_LABEL
#undef LABEL_IS_SC
  END_INSN(defineclass);
}}
}


INSN_ENTRY(send){

{
  VALUE val;

  IC ic = (IC)GET_OPERAND(5);
  num_t op_flag = (num_t)GET_OPERAND(4);
  ISEQ blockiseq = (ISEQ)GET_OPERAND(3);
  num_t op_argc = (num_t)GET_OPERAND(2);
  ID op_id = (ID)GET_OPERAND(1);


  DEBUG_ENTER_INSN("send");
  ADD_PC(1+5);
  PREFETCH(GET_PC());
  #define CURRENT_INSN_send 1
  #define INSN_IS_SC()     0
  #define INSN_LABEL(lab)  LABEL_send_##lab
  #define LABEL_IS_SC(lab) LABEL_##lab##_##t
  USAGE_ANALYSIS_INSN(BIN(send));
  USAGE_ANALYSIS_OPERAND(BIN(send), 0, op_id);
  USAGE_ANALYSIS_OPERAND(BIN(send), 1, op_argc);
  USAGE_ANALYSIS_OPERAND(BIN(send), 2, blockiseq);
  USAGE_ANALYSIS_OPERAND(BIN(send), 3, op_flag);
  USAGE_ANALYSIS_OPERAND(BIN(send), 4, ic);
{
#line 1156 "insns.def"
    NODE *mn;
    VALUE recv;
    VALUE klass;
    rb_block_t *blockptr = 0;
    num_t num = op_argc;
    num_t flag = op_flag;
    ID id = op_id;

    macro_eval_setup_send_arguments(num, blockptr, flag, blockiseq);

    if (flag & VM_CALL_FCALL_BIT) {
	/* method(...) */
	recv = GET_SELF();
    }
    else {
	/* recv.method(...) */
	recv = TOPN(num);
    }

    klass = CLASS_OF(recv);

    mn = eval_method_search(id, klass, ic);

    if ((flag & VM_CALL_SEND_BIT) && mn && nd_type(mn->nd_body) == NODE_CFUNC) {
	NODE *node = mn->nd_body;
	extern VALUE rb_f_funcall(int argc, VALUE *argv, VALUE recv);
	extern VALUE rb_f_send(int argc, VALUE *argv, VALUE recv);

	if (node->nd_cfnc == rb_f_funcall || node->nd_cfnc == rb_f_send) {
	    int i;
	    VALUE sym = TOPN(num - 1);
	    id = SYMBOL_P(sym) ? SYM2ID(sym) : rb_to_id(sym);

	    /* shift arguments */
	    for (i=1; i<num; i++) {
		GET_SP()[-num+i-1] = GET_SP()[(-num+i-1)+1];
	    }

	    mn = rb_method_node(klass, id);

	    num -= 1;
	    INC_SP(-1);
	}

	if (node->nd_cfnc == rb_f_funcall) {
	    flag |= VM_CALL_FCALL_BIT;
	}
    }

#if CURRENT_INSN_send || CURRENT_INSN_send_SC_xx_ax
#if !YARV_AOT_COMPILED
    if (0) {
	if (0) {
	    LABEL_IS_SC(start_init_in_send_for_opt_1):
	    num = 1;
	    recv = TOPN(1);
	}
	else if (0) {
	    LABEL_IS_SC(start_init_in_send_for_opt_2):
	    num = 2;
	    recv = TOPN(2);
	}
	flag = 0;
	id = tmp_id;
	klass = CLASS_OF(recv);
	blockptr = 0;
	mn = rb_method_node(klass, id);
    }
    if (0) {
	LABEL_IS_SC(start_init_in_super):
	{
	    rb_iseq_t *iseq = GET_ISEQ();
	    rb_iseq_t *ip = iseq;

	    num = tmp_num;
	    flag = VM_CALL_FCALL_BIT;
	    recv = GET_SELF();

	    while (ip && !ip->klass) {
		ip = ip->parent_iseq;
	    }

	    if (ip == 0) {
		rb_raise(rb_eNoMethodError, "super called outside of method");
	    }

	    id = ip->defined_method_id;
	    
	    if (ip != ip->local_iseq) {
		/* defined by method_defined() */
		rb_control_frame_t *lcfp = GET_CFP();

		while (lcfp->iseq != ip) {
		    VALUE *tdfp = GET_PREV_DFP(lcfp->dfp);
		    while (1) {
			lcfp = RUBY_VM_PREVIOUS_CONTROL_FRAME(lcfp);
			if (lcfp->dfp == tdfp) {
			    break;
			}
		    }
		}

		/* dirty hack */
		id    = (ID) ((VALUE *)(lcfp+1)->block_iseq)[0];
		klass =      ((VALUE *)(lcfp+1)->block_iseq)[1];

		if (TOPN(num) == Qfalse) {
		    /* for ZSUPER */
		    int i;
		    POPN(num);
		    num = ip->argc;
		    for (i = 0; i < ip->argc; i++) {
			PUSH(lcfp->dfp[i - ip->local_size]);
		    }
		}
	    }
	    klass = search_super_klass(ip->klass, recv);
	    flag = VM_CALL_SUPER_BIT | VM_CALL_FCALL_BIT;
	    blockptr = tmp_blockptr;
	    mn = rb_method_node(klass, id);
	}
    }
    LABEL_IS_SC(start_method_dispatch):
#endif
#endif
    macro_eval_invoke_method(recv, klass, id, num, mn, blockptr);
    RUBY_VM_CHECK_INTS();
#line 2111 "vm.inc"
  PUSH(val);

#undef CURRENT_INSN_send
#undef INSN_IS_SC
#undef INSN_LABEL
#undef LABEL_IS_SC
  END_INSN(send);
}}
}


INSN_ENTRY(invokesuper){

{
  VALUE val;

  num_t flag = (num_t)GET_OPERAND(3);
  ISEQ blockiseq = (ISEQ)GET_OPERAND(2);
  num_t op_argc = (num_t)GET_OPERAND(1);


  DEBUG_ENTER_INSN("invokesuper");
  ADD_PC(1+3);
  PREFETCH(GET_PC());
  #define CURRENT_INSN_invokesuper 1
  #define INSN_IS_SC()     0
  #define INSN_LABEL(lab)  LABEL_invokesuper_##lab
  #define LABEL_IS_SC(lab) LABEL_##lab##_##t
  USAGE_ANALYSIS_INSN(BIN(invokesuper));
  USAGE_ANALYSIS_OPERAND(BIN(invokesuper), 0, op_argc);
  USAGE_ANALYSIS_OPERAND(BIN(invokesuper), 1, blockiseq);
  USAGE_ANALYSIS_OPERAND(BIN(invokesuper), 2, flag);
{
#line 1296 "insns.def"
#if YARV_AOT_COMPILED
    /* TODO: */
    rb_bug("...");
#else
    tmp_num = op_argc;
    tmp_blockptr = 0;
    macro_eval_setup_send_arguments(tmp_num, tmp_blockptr, flag, blockiseq);
    if (!tmp_blockptr && !(flag & VM_CALL_ARGS_BLOCKARG_BIT)) {
	tmp_blockptr = GET_BLOCK_PTR();
    }
    goto LABEL_IS_SC(start_init_in_super);
#endif
#line 2158 "vm.inc"
  PUSH(val);

#undef CURRENT_INSN_invokesuper
#undef INSN_IS_SC
#undef INSN_LABEL
#undef LABEL_IS_SC
  END_INSN(invokesuper);
}}
}


INSN_ENTRY(invokeblock){

{
  VALUE val;

  num_t flag = (num_t)GET_OPERAND(2);
  num_t num = (num_t)GET_OPERAND(1);


  DEBUG_ENTER_INSN("invokeblock");
  ADD_PC(1+2);
  PREFETCH(GET_PC());
  #define CURRENT_INSN_invokeblock 1
  #define INSN_IS_SC()     0
  #define INSN_LABEL(lab)  LABEL_invokeblock_##lab
  #define LABEL_IS_SC(lab) LABEL_##lab##_##t
  USAGE_ANALYSIS_INSN(BIN(invokeblock));
  USAGE_ANALYSIS_OPERAND(BIN(invokeblock), 0, num);
  USAGE_ANALYSIS_OPERAND(BIN(invokeblock), 1, flag);
{
#line 1321 "insns.def"
    rb_block_t *block = GET_BLOCK_PTR();
    rb_iseq_t *iseq;
    int argc = num;

    if (GET_ISEQ()->local_iseq->type != ISEQ_TYPE_METHOD || block == 0) {
	th_localjump_error("no block given (yield)", Qnil, 0);
    }
    iseq = block->iseq;

    if (BUILTIN_TYPE(iseq) != T_NODE) {
	if (flag & VM_CALL_ARGS_SPLAT_BIT) {
	    VALUE ary = TOPN(0);
	    if (CLASS_OF(ary) != rb_cArray) {
		/* not a [BUG] */
	    }
	    else {
		VALUE *ptr = RARRAY_PTR(ary);
		VALUE *dst = GET_SP() - 1;
		int i, len = RARRAY_LEN(ary);
		for (i = 0; i < len; i++) {
		    dst[i] = ptr[i];
		}
		argc += i - 1;
		INC_SP(i - 1);
	    }
	}

	INC_SP(-argc);
	argc = th_yield_setup_args(iseq, argc, GET_SP());
	INC_SP(argc);

	push_frame(th, iseq,
		   FRAME_MAGIC_BLOCK, block->self, (VALUE) block->dfp,
		   iseq->iseq_encoded, GET_SP(), block->lfp,
		   iseq->local_size - argc);

	reg_cfp->sp -= argc;
	RESTORE_REGS();
	NEXT_INSN();
	/* unreachable */
    }
    else {
	val = th_invoke_yield_cfunc(th, block, block->self,
				    num, STACK_ADDR_FROM_TOP(num));
	POPN(num);
    }
#line 2237 "vm.inc"
  PUSH(val);

#undef CURRENT_INSN_invokeblock
#undef INSN_IS_SC
#undef INSN_LABEL
#undef LABEL_IS_SC
  END_INSN(invokeblock);
}}
}


INSN_ENTRY(leave){

{



  VALUE val = TOPN(0);

  DEBUG_ENTER_INSN("leave");
  ADD_PC(1+0);
  PREFETCH(GET_PC());
  POPN(1);
  #define CURRENT_INSN_leave 1
  #define INSN_IS_SC()     0
  #define INSN_LABEL(lab)  LABEL_leave_##lab
  #define LABEL_IS_SC(lab) LABEL_##lab##_##t
  USAGE_ANALYSIS_INSN(BIN(leave));
{
#line 1380 "insns.def"
    if (OPT_CHECKED_RUN) {
	if (reg_cfp->sp != reg_cfp->bp) {
	    rb_bug("Stack consistency error (sp: %p, bp: %p)",
		   reg_cfp->sp, reg_cfp->bp);
	}
    }

    RUBY_VM_CHECK_INTS();
    pop_frame(th);
    RESTORE_REGS();
#line 2278 "vm.inc"
  PUSH(val);

#undef CURRENT_INSN_leave
#undef INSN_IS_SC
#undef INSN_LABEL
#undef LABEL_IS_SC
  END_INSN(leave);
}}
}


INSN_ENTRY(finish){

{



  VALUE val = TOPN(0);

  DEBUG_ENTER_INSN("finish");
  ADD_PC(1+0);
  PREFETCH(GET_PC());
  POPN(1);
  #define CURRENT_INSN_finish 1
  #define INSN_IS_SC()     0
  #define INSN_LABEL(lab)  LABEL_finish_##lab
  #define LABEL_IS_SC(lab) LABEL_##lab##_##t
  USAGE_ANALYSIS_INSN(BIN(finish));
{
#line 1403 "insns.def"
    th->cfp++;
    return val;
#line 2311 "vm.inc"
  PUSH(val);

#undef CURRENT_INSN_finish
#undef INSN_IS_SC
#undef INSN_LABEL
#undef LABEL_IS_SC
  END_INSN(finish);
}}
}


INSN_ENTRY(throw){

{
  VALUE val;

  num_t throw_state = (num_t)GET_OPERAND(1);
  VALUE throwobj = TOPN(0);

  DEBUG_ENTER_INSN("throw");
  ADD_PC(1+1);
  PREFETCH(GET_PC());
  POPN(1);
  #define CURRENT_INSN_throw 1
  #define INSN_IS_SC()     0
  #define INSN_LABEL(lab)  LABEL_throw_##lab
  #define LABEL_IS_SC(lab) LABEL_##lab##_##t
  USAGE_ANALYSIS_INSN(BIN(throw));
  USAGE_ANALYSIS_OPERAND(BIN(throw), 0, throw_state);
{
#line 1422 "insns.def"
    num_t state = throw_state & 0xff;
    num_t flag = throw_state & 0x8000;
    num_t level = throw_state >> 16;
    val = Qnil;			/* dummy */

    if (state != 0) {
	VALUE *pt;
	int i;
	if (flag != 0) {
	    if (throw_state & 0x4000) {
		pt = (void *)1;
	    }
	    else {
		pt = 0;
	    }
	}
	else {
	    if (state == TAG_BREAK || state == TAG_RETRY) {
		pt = GC_GUARDED_PTR_REF((VALUE *) * GET_DFP());
		for (i = 0; i < level; i++) {
		    pt = GC_GUARDED_PTR_REF((VALUE *) * pt);
		}
	    }
	    else if (state == TAG_RETURN) {
		rb_control_frame_t *cfp = GET_CFP();
		int is_orphan = 1;
		VALUE *dfp = GET_DFP();
		
		/* check orphan */
		while ((VALUE *) cfp < th->stack + th->stack_size) {
		    if (GET_LFP() == cfp->lfp) {
			is_orphan = 0;
			break;
		    }
		    else if (dfp == cfp->dfp) {
			/* return from lambda{} */
			if (cfp->magic == FRAME_MAGIC_LAMBDA) {
			    is_orphan = 0;
			    break;
			}
			dfp = GC_GUARDED_PTR_REF(*cfp->dfp);
		    }
		    cfp++;
		}
		if (is_orphan) {
		    th_localjump_error("unexpected return", throwobj,
				       TAG_RETURN);
		}

		/* set current lfp */
		pt = GET_LFP();
	    }
	    else {
		rb_bug("isns(throw): unsupport thorw type");
	    }
	}
	th->state = state;
	return (VALUE) NEW_THROW_OBJECT(throwobj, (VALUE) pt, state);
    }
    else {
	/* continue throw */
	VALUE err = throwobj;

	if (FIXNUM_P(err)) {
	    th->state = FIX2INT(err);
	}
	else if (SYMBOL_P(err)) {
	    th->state = TAG_THROW;
	}
	else if (BUILTIN_TYPE(err) == T_NODE) {
	    th->state = GET_THROWOBJ_STATE(err);
	}
	else {
	    th->state = FIX2INT(rb_ivar_get(err, idThrowState));
	}
	return err;
    }
    /* unreachable */
#line 2421 "vm.inc"
  PUSH(val);

#undef CURRENT_INSN_throw
#undef INSN_IS_SC
#undef INSN_LABEL
#undef LABEL_IS_SC
  END_INSN(throw);
}}
}


INSN_ENTRY(jump){

{


  OFFSET dst = (OFFSET)GET_OPERAND(1);


  DEBUG_ENTER_INSN("jump");
  ADD_PC(1+1);
  PREFETCH(GET_PC());
  #define CURRENT_INSN_jump 1
  #define INSN_IS_SC()     0
  #define INSN_LABEL(lab)  LABEL_jump_##lab
  #define LABEL_IS_SC(lab) LABEL_##lab##_##t
  USAGE_ANALYSIS_INSN(BIN(jump));
  USAGE_ANALYSIS_OPERAND(BIN(jump), 0, dst);
{
#line 1517 "insns.def"
    RUBY_VM_CHECK_INTS();
    JUMP(dst);
#line 2454 "vm.inc"


#undef CURRENT_INSN_jump
#undef INSN_IS_SC
#undef INSN_LABEL
#undef LABEL_IS_SC
  END_INSN(jump);
}}
}


INSN_ENTRY(branchif){

{


  OFFSET dst = (OFFSET)GET_OPERAND(1);
  VALUE val = TOPN(0);

  DEBUG_ENTER_INSN("branchif");
  ADD_PC(1+1);
  PREFETCH(GET_PC());
  POPN(1);
  #define CURRENT_INSN_branchif 1
  #define INSN_IS_SC()     0
  #define INSN_LABEL(lab)  LABEL_branchif_##lab
  #define LABEL_IS_SC(lab) LABEL_##lab##_##t
  USAGE_ANALYSIS_INSN(BIN(branchif));
  USAGE_ANALYSIS_OPERAND(BIN(branchif), 0, dst);
{
#line 1532 "insns.def"
    if (RTEST(val)) {
	RUBY_VM_CHECK_INTS();
	JUMP(dst);
    }
#line 2490 "vm.inc"


#undef CURRENT_INSN_branchif
#undef INSN_IS_SC
#undef INSN_LABEL
#undef LABEL_IS_SC
  END_INSN(branchif);
}}
}


INSN_ENTRY(branchunless){

{


  OFFSET dst = (OFFSET)GET_OPERAND(1);
  VALUE val = TOPN(0);

  DEBUG_ENTER_INSN("branchunless");
  ADD_PC(1+1);
  PREFETCH(GET_PC());
  POPN(1);
  #define CURRENT_INSN_branchunless 1
  #define INSN_IS_SC()     0
  #define INSN_LABEL(lab)  LABEL_branchunless_##lab
  #define LABEL_IS_SC(lab) LABEL_##lab##_##t
  USAGE_ANALYSIS_INSN(BIN(branchunless));
  USAGE_ANALYSIS_OPERAND(BIN(branchunless), 0, dst);
{
#line 1549 "insns.def"
    if (!RTEST(val)) {
	RUBY_VM_CHECK_INTS();
	JUMP(dst);
    }
#line 2526 "vm.inc"


#undef CURRENT_INSN_branchunless
#undef INSN_IS_SC
#undef INSN_LABEL
#undef LABEL_IS_SC
  END_INSN(branchunless);
}}
}


INSN_ENTRY(getinlinecache){

{
  VALUE val;

  OFFSET dst = (OFFSET)GET_OPERAND(2);
  IC ic = (IC)GET_OPERAND(1);


  DEBUG_ENTER_INSN("getinlinecache");
  ADD_PC(1+2);
  PREFETCH(GET_PC());
  #define CURRENT_INSN_getinlinecache 1
  #define INSN_IS_SC()     0
  #define INSN_LABEL(lab)  LABEL_getinlinecache_##lab
  #define LABEL_IS_SC(lab) LABEL_##lab##_##t
  USAGE_ANALYSIS_INSN(BIN(getinlinecache));
  USAGE_ANALYSIS_OPERAND(BIN(getinlinecache), 0, ic);
  USAGE_ANALYSIS_OPERAND(BIN(getinlinecache), 1, dst);
{
#line 1571 "insns.def"
    if (ic->ic_vmstat == GET_VM_STATE_VERSION()) {
	val = ic->ic_value;
	JUMP(dst);
    }
    else {
	/* none */
	val = Qnil;
    }
#line 2567 "vm.inc"
  PUSH(val);

#undef CURRENT_INSN_getinlinecache
#undef INSN_IS_SC
#undef INSN_LABEL
#undef LABEL_IS_SC
  END_INSN(getinlinecache);
}}
}


INSN_ENTRY(onceinlinecache){

{
  VALUE val;

  OFFSET dst = (OFFSET)GET_OPERAND(2);
  IC ic = (IC)GET_OPERAND(1);


  DEBUG_ENTER_INSN("onceinlinecache");
  ADD_PC(1+2);
  PREFETCH(GET_PC());
  #define CURRENT_INSN_onceinlinecache 1
  #define INSN_IS_SC()     0
  #define INSN_LABEL(lab)  LABEL_onceinlinecache_##lab
  #define LABEL_IS_SC(lab) LABEL_##lab##_##t
  USAGE_ANALYSIS_INSN(BIN(onceinlinecache));
  USAGE_ANALYSIS_OPERAND(BIN(onceinlinecache), 0, ic);
  USAGE_ANALYSIS_OPERAND(BIN(onceinlinecache), 1, dst);
{
#line 1592 "insns.def"
    if (ic->ic_vmstat) {
	val = ic->ic_value;
	JUMP(dst);
    }
    else {
	/* none */
	val = Qnil;
    }
#line 2608 "vm.inc"
  PUSH(val);

#undef CURRENT_INSN_onceinlinecache
#undef INSN_IS_SC
#undef INSN_LABEL
#undef LABEL_IS_SC
  END_INSN(onceinlinecache);
}}
}


INSN_ENTRY(setinlinecache){

{


  OFFSET dst = (OFFSET)GET_OPERAND(1);
  VALUE val = TOPN(0);

  DEBUG_ENTER_INSN("setinlinecache");
  ADD_PC(1+1);
  PREFETCH(GET_PC());
  POPN(1);
  #define CURRENT_INSN_setinlinecache 1
  #define INSN_IS_SC()     0
  #define INSN_LABEL(lab)  LABEL_setinlinecache_##lab
  #define LABEL_IS_SC(lab) LABEL_##lab##_##t
  USAGE_ANALYSIS_INSN(BIN(setinlinecache));
  USAGE_ANALYSIS_OPERAND(BIN(setinlinecache), 0, dst);
{
#line 1613 "insns.def"
    IC ic = (IC) * (GET_PC() + dst + 1);

    ic->ic_value = val;
    ic->ic_vmstat = GET_VM_STATE_VERSION();
#line 2644 "vm.inc"
  PUSH(val);

#undef CURRENT_INSN_setinlinecache
#undef INSN_IS_SC
#undef INSN_LABEL
#undef LABEL_IS_SC
  END_INSN(setinlinecache);
}}
}


INSN_ENTRY(opt_case_dispatch){

{


  OFFSET else_offset = (OFFSET)GET_OPERAND(2);
  CDHASH hash = (CDHASH)GET_OPERAND(1);
  VALUE key = TOPN(0);

  DEBUG_ENTER_INSN("opt_case_dispatch");
  ADD_PC(1+2);
  PREFETCH(GET_PC());
  POPN(1);
  #define CURRENT_INSN_opt_case_dispatch 1
  #define INSN_IS_SC()     0
  #define INSN_LABEL(lab)  LABEL_opt_case_dispatch_##lab
  #define LABEL_IS_SC(lab) LABEL_##lab##_##t
  USAGE_ANALYSIS_INSN(BIN(opt_case_dispatch));
  USAGE_ANALYSIS_OPERAND(BIN(opt_case_dispatch), 0, hash);
  USAGE_ANALYSIS_OPERAND(BIN(opt_case_dispatch), 1, else_offset);
{
#line 1630 "insns.def"
    if (0) {
	/* if some === method is overrided */
    }
    else {
	VALUE val;
	if (st_lookup(RHASH(hash)->tbl, key, &val)) {
	    JUMP(FIX2INT(val));
	}
	else {
	    JUMP(else_offset);
	}
    }
#line 2690 "vm.inc"


#undef CURRENT_INSN_opt_case_dispatch
#undef INSN_IS_SC
#undef INSN_LABEL
#undef LABEL_IS_SC
  END_INSN(opt_case_dispatch);
}}
}


INSN_ENTRY(opt_checkenv){

{





  DEBUG_ENTER_INSN("opt_checkenv");
  ADD_PC(1+0);
  PREFETCH(GET_PC());
  #define CURRENT_INSN_opt_checkenv 1
  #define INSN_IS_SC()     0
  #define INSN_LABEL(lab)  LABEL_opt_checkenv_##lab
  #define LABEL_IS_SC(lab) LABEL_##lab##_##t
  USAGE_ANALYSIS_INSN(BIN(opt_checkenv));
{
#line 1655 "insns.def"
    if (GET_CFP()->bp != GET_DFP() + 1) {
	VALUE *new_dfp = GET_CFP()->bp - 1;
	/* TODO: copy env and clean stack at creating env? */
	*new_dfp = *GET_DFP();
	SET_DFP(new_dfp);
    }
#line 2726 "vm.inc"


#undef CURRENT_INSN_opt_checkenv
#undef INSN_IS_SC
#undef INSN_LABEL
#undef LABEL_IS_SC
  END_INSN(opt_checkenv);
}}
}


INSN_ENTRY(opt_plus){

{
  VALUE val;


  VALUE recv = TOPN(1);
  VALUE obj = TOPN(0);

  DEBUG_ENTER_INSN("opt_plus");
  ADD_PC(1+0);
  PREFETCH(GET_PC());
  POPN(2);
  #define CURRENT_INSN_opt_plus 1
  #define INSN_IS_SC()     0
  #define INSN_LABEL(lab)  LABEL_opt_plus_##lab
  #define LABEL_IS_SC(lab) LABEL_##lab##_##t
  USAGE_ANALYSIS_INSN(BIN(opt_plus));
{
#line 1678 "insns.def"
    if (0) {

    }
#if 1
    else if (FIXNUM_2_P(recv, obj) &&
	     BASIC_OP_UNREDEFINED_P(BOP_PLUS)) {
	/* fixnum + fixnum */
	val = (recv + (obj & (~1)));
	if ((~(recv ^ obj) & (recv ^ val)) &
	    ((VALUE)0x01 << ((sizeof(VALUE) * CHAR_BIT) - 1))) {
	    val = rb_big_plus(rb_int2big(FIX2INT(recv)),
			      rb_int2big(FIX2INT(obj)));
	}
    }
#endif

    else if (!SPECIAL_CONST_P(recv) && !SPECIAL_CONST_P(obj)) {
	if (0) {
	}
#if 1
	else if (HEAP_CLASS_OF(recv) == rb_cFloat &&
		 HEAP_CLASS_OF(obj) == rb_cFloat &&
		 BASIC_OP_UNREDEFINED_P(BOP_PLUS)) {
	    val = rb_float_new(RFLOAT(recv)->value + RFLOAT(obj)->value);
	}
#endif

#if 1
	else if (HEAP_CLASS_OF(recv) == rb_cString &&
		 HEAP_CLASS_OF(obj) == rb_cString &&
		 BASIC_OP_UNREDEFINED_P(BOP_PLUS)) {
	    val = rb_str_plus(recv, obj);
	}
#endif
#if 1
	else if (HEAP_CLASS_OF(recv) == rb_cArray &&
		 BASIC_OP_UNREDEFINED_P(BOP_PLUS)) {
	    val = rb_ary_plus(recv, obj);
	}
#endif
	else {
	    goto INSN_LABEL(normal_dispatch);
	}
    }
    else {
      INSN_LABEL(normal_dispatch):

#ifdef YARV_AOT_COMPILED
	val = rb_funcall(recv, idPLUS, 1, obj);
#else
	PUSH(recv);
	PUSH(obj);
	tmp_id = idPLUS;
	goto LABEL_IS_SC(start_init_in_send_for_opt_1);
#endif
    }
#line 2814 "vm.inc"
  PUSH(val);

#undef CURRENT_INSN_opt_plus
#undef INSN_IS_SC
#undef INSN_LABEL
#undef LABEL_IS_SC
  END_INSN(opt_plus);
}}
}


INSN_ENTRY(opt_minus){

{
  VALUE val;


  VALUE recv = TOPN(1);
  VALUE obj = TOPN(0);

  DEBUG_ENTER_INSN("opt_minus");
  ADD_PC(1+0);
  PREFETCH(GET_PC());
  POPN(2);
  #define CURRENT_INSN_opt_minus 1
  #define INSN_IS_SC()     0
  #define INSN_LABEL(lab)  LABEL_opt_minus_##lab
  #define LABEL_IS_SC(lab) LABEL_##lab##_##t
  USAGE_ANALYSIS_INSN(BIN(opt_minus));
{
#line 1747 "insns.def"
    if (FIXNUM_2_P(recv, obj) &&
	BASIC_OP_UNREDEFINED_P(BOP_MINUS)) {
	long a, b, c;

	a = FIX2LONG(recv);
	b = FIX2LONG(obj);
	c = a - b;
	val = LONG2FIX(c);

	if (FIX2LONG(val) != c) {
	    val = rb_big_minus(rb_int2big(a), rb_int2big(b));
	}
    }
    else {
	/* other */
#ifdef YARV_AOT_COMPILED
	val = rb_funcall(recv, idMINUS, 1, obj);
#else
	PUSH(recv);
	PUSH(obj);
	tmp_id = idMINUS;
	goto LABEL_IS_SC(start_init_in_send_for_opt_1);
#endif
    }
#line 2870 "vm.inc"
  PUSH(val);

#undef CURRENT_INSN_opt_minus
#undef INSN_IS_SC
#undef INSN_LABEL
#undef LABEL_IS_SC
  END_INSN(opt_minus);
}}
}


INSN_ENTRY(opt_mult){

{
  VALUE val;


  VALUE recv = TOPN(1);
  VALUE obj = TOPN(0);

  DEBUG_ENTER_INSN("opt_mult");
  ADD_PC(1+0);
  PREFETCH(GET_PC());
  POPN(2);
  #define CURRENT_INSN_opt_mult 1
  #define INSN_IS_SC()     0
  #define INSN_LABEL(lab)  LABEL_opt_mult_##lab
  #define LABEL_IS_SC(lab) LABEL_##lab##_##t
  USAGE_ANALYSIS_INSN(BIN(opt_mult));
{
#line 1784 "insns.def"
    if (FIXNUM_2_P(recv, obj) &&
	BASIC_OP_UNREDEFINED_P(BOP_MULT)) {
	long a, b, c;

	a = FIX2LONG(recv);
	if (a == 0) {
	    val = recv;
	}
	else {
	    b = FIX2LONG(obj);
	    c = a * b;
	    val = LONG2FIX(c);

	    if (FIX2LONG(val) != c || c / a != b) {
		val = rb_big_mul(rb_int2big(a), rb_int2big(b));
	    }
	}
    }
    else if (!SPECIAL_CONST_P(recv) && !SPECIAL_CONST_P(obj)) {
	if (0) {
	}
#if 1
	else if (HEAP_CLASS_OF(recv) == rb_cFloat &&
		 HEAP_CLASS_OF(obj) == rb_cFloat  &&
		 BASIC_OP_UNREDEFINED_P(BOP_MULT)) {
	    val = rb_float_new(RFLOAT(recv)->value * RFLOAT(obj)->value);
	}
#endif
	else {
	    goto INSN_LABEL(normal_dispatch);
	}
    }
    else {
      INSN_LABEL(normal_dispatch):

	/* other */
#ifdef YARV_AOT_COMPILED
	val = rb_funcall(recv, idMULT, 1, obj);
#else
	PUSH(recv);
	PUSH(obj);
	tmp_id = idMULT;
	goto LABEL_IS_SC(start_init_in_send_for_opt_1);
#endif
    }
#line 2947 "vm.inc"
  PUSH(val);

#undef CURRENT_INSN_opt_mult
#undef INSN_IS_SC
#undef INSN_LABEL
#undef LABEL_IS_SC
  END_INSN(opt_mult);
}}
}


INSN_ENTRY(opt_div){

{
  VALUE val;


  VALUE recv = TOPN(1);
  VALUE obj = TOPN(0);

  DEBUG_ENTER_INSN("opt_div");
  ADD_PC(1+0);
  PREFETCH(GET_PC());
  POPN(2);
  #define CURRENT_INSN_opt_div 1
  #define INSN_IS_SC()     0
  #define INSN_LABEL(lab)  LABEL_opt_div_##lab
  #define LABEL_IS_SC(lab) LABEL_##lab##_##t
  USAGE_ANALYSIS_INSN(BIN(opt_div));
{
#line 1842 "insns.def"
    if (FIXNUM_2_P(recv, obj) &&
	BASIC_OP_UNREDEFINED_P(BOP_DIV)) {
	long x, y, div;

	x = FIX2LONG(recv);
	y = FIX2LONG(obj);
	{
	    /* copied from numeric.c#fixdivmod */
	    long mod;
	    if (y == 0)
		rb_num_zerodiv();
	    if (y < 0) {
		if (x < 0)
		    div = -x / -y;
		else
		    div = -(x / -y);
	    }
	    else {
		if (x < 0)
		    div = -(-x / y);
		else
		    div = x / y;
	    }
	    mod = x - div * y;
	    if ((mod < 0 && y > 0) || (mod > 0 && y < 0)) {
		mod += y;
		div -= 1;
	    }
	}
	val = LONG2FIX(div);
    }
    else if (!SPECIAL_CONST_P(recv) && !SPECIAL_CONST_P(obj)) {
	if (0) {
	}
#if 1
	else if (HEAP_CLASS_OF(recv) == rb_cFloat &&
		 HEAP_CLASS_OF(obj) == rb_cFloat  &&
		 BASIC_OP_UNREDEFINED_P(BOP_DIV)) {
	    val = rb_float_new(RFLOAT(recv)->value / RFLOAT(obj)->value);
	}
#endif
	else {
	    goto INSN_LABEL(normal_dispatch);
	}
    }
    else {
      INSN_LABEL(normal_dispatch):

	/* other */
#ifdef YARV_AOT_COMPILED
	val = rb_funcall(recv, idDIV, 1, obj);
#else
	PUSH(recv);
	PUSH(obj);
	tmp_id = idDIV;
	goto LABEL_IS_SC(start_init_in_send_for_opt_1);
#endif
    }
#line 3037 "vm.inc"
  PUSH(val);

#undef CURRENT_INSN_opt_div
#undef INSN_IS_SC
#undef INSN_LABEL
#undef LABEL_IS_SC
  END_INSN(opt_div);
}}
}


INSN_ENTRY(opt_mod){

{
  VALUE val;


  VALUE recv = TOPN(1);
  VALUE obj = TOPN(0);

  DEBUG_ENTER_INSN("opt_mod");
  ADD_PC(1+0);
  PREFETCH(GET_PC());
  POPN(2);
  #define CURRENT_INSN_opt_mod 1
  #define INSN_IS_SC()     0
  #define INSN_LABEL(lab)  LABEL_opt_mod_##lab
  #define LABEL_IS_SC(lab) LABEL_##lab##_##t
  USAGE_ANALYSIS_INSN(BIN(opt_mod));
{
#line 1913 "insns.def"
    if (FIXNUM_2_P(recv, obj) &&
	BASIC_OP_UNREDEFINED_P(BOP_MOD)) {
	long x, y, mod;

	x = FIX2LONG(recv);
	y = FIX2LONG(obj);
	{
	    /* copied from numeric.c#fixdivmod */
	    long div;

	    if (y == 0)
		rb_num_zerodiv();
	    if (y < 0) {
		if (x < 0)
		    div = -x / -y;
		else
		    div = -(x / -y);
	    }
	    else {
		if (x < 0)
		    div = -(-x / y);
		else
		    div = x / y;
	    }
	    mod = x - div * y;
	    if ((mod < 0 && y > 0) || (mod > 0 && y < 0)) {
		mod += y;
		div -= 1;
	    }
	}
	val = LONG2FIX(mod);
    }
    else if (!SPECIAL_CONST_P(recv) && !SPECIAL_CONST_P(obj)) {
	if (0) {
	}
	else if (HEAP_CLASS_OF(recv) == rb_cFloat &&
		 HEAP_CLASS_OF(obj) == rb_cFloat &&
		 BASIC_OP_UNREDEFINED_P(BOP_MOD)) {
	    double x = RFLOAT(recv)->value;
	    double y = RFLOAT(obj)->value;
	    double div, mod;

	    /* copied from numeric.c#flodivmod */
#if 0 && defined(HAVE_FMOD) && !__x86_64__	/* temporary */
	    mod = fmod(x, y);
	    printf("-- %f %% %f = %f\n", x, y, mod);
#else
	    {
		double z;

		modf(x / y, &z);
		mod = x - z * y;
	    }
#endif
	    div = (x - mod) / y;
	    if (y * mod < 0) {
		mod += y;
		div -= 1.0;
	    }
	    val = rb_float_new(mod);
	}
	else {
	    goto INSN_LABEL(normal_dispatch);
	}
    }
    else {
      INSN_LABEL(normal_dispatch):

	/* other */
#ifdef YARV_AOT_COMPILED
	val = rb_funcall(recv, idMOD, 1, obj);
#else
	PUSH(recv);
	PUSH(obj);
	tmp_id = idMOD;
	goto LABEL_IS_SC(start_init_in_send_for_opt_1);
#endif
    }
#line 3147 "vm.inc"
  PUSH(val);

#undef CURRENT_INSN_opt_mod
#undef INSN_IS_SC
#undef INSN_LABEL
#undef LABEL_IS_SC
  END_INSN(opt_mod);
}}
}


INSN_ENTRY(opt_eq){

{
  VALUE val;


  VALUE recv = TOPN(1);
  VALUE obj = TOPN(0);

  DEBUG_ENTER_INSN("opt_eq");
  ADD_PC(1+0);
  PREFETCH(GET_PC());
  POPN(2);
  #define CURRENT_INSN_opt_eq 1
  #define INSN_IS_SC()     0
  #define INSN_LABEL(lab)  LABEL_opt_eq_##lab
  #define LABEL_IS_SC(lab) LABEL_##lab##_##t
  USAGE_ANALYSIS_INSN(BIN(opt_eq));
{
#line 2004 "insns.def"
    if (FIXNUM_2_P(recv, obj) &&
	BASIC_OP_UNREDEFINED_P(BOP_EQ)) {
	long a = FIX2LONG(recv), b = FIX2LONG(obj);

	if (a == b) {
	    val = Qtrue;
	}
	else {
	    val = Qfalse;
	}
    }
    else if (!SPECIAL_CONST_P(recv) && !SPECIAL_CONST_P(obj)) {
	if (0) {
	}
	else if (HEAP_CLASS_OF(recv) == rb_cFloat &&
		 HEAP_CLASS_OF(obj) == rb_cFloat &&
		 BASIC_OP_UNREDEFINED_P(BOP_EQ)) {
	    double a = RFLOAT(recv)->value;
	    double b = RFLOAT(obj)->value;

	    if (isnan(a) || isnan(b)) {
		val = Qfalse;
	    }
	    else if (a == b) {
		val = Qtrue;
	    }
	    else {
		val = Qfalse;
	    }
	}
	else if (HEAP_CLASS_OF(recv) == rb_cString &&
		 HEAP_CLASS_OF(obj) == rb_cString &&
		 BASIC_OP_UNREDEFINED_P(BOP_EQ)) {

	    VALUE str1 = recv;
	    VALUE str2 = obj;
	    if (str1 == str2) {
		val = Qtrue;
	    }
	    else if (RSTRING_LEN(str1) == RSTRING_LEN(str2) &&
		     rb_memcmp(RSTRING_PTR(str1), RSTRING_PTR(str2),
			       RSTRING_LEN(str1)) == 0) {
		val = Qtrue;
	    }
	    else {
		val = Qfalse;
	    }
	}
	else {
	    goto INSN_LABEL(normal_dispatch);
	}
    }
    else {
      INSN_LABEL(normal_dispatch):
	/* other */
#ifdef YARV_AOT_COMPILED
	val = rb_funcall(recv, idEq, 1, obj);
#else
	PUSH(recv);
	PUSH(obj);
	tmp_id = idEq;
	goto LABEL_IS_SC(start_init_in_send_for_opt_1);
#endif
    }
#line 3243 "vm.inc"
  PUSH(val);

#undef CURRENT_INSN_opt_eq
#undef INSN_IS_SC
#undef INSN_LABEL
#undef LABEL_IS_SC
  END_INSN(opt_eq);
}}
}


INSN_ENTRY(opt_lt){

{
  VALUE val;


  VALUE recv = TOPN(1);
  VALUE obj = TOPN(0);

  DEBUG_ENTER_INSN("opt_lt");
  ADD_PC(1+0);
  PREFETCH(GET_PC());
  POPN(2);
  #define CURRENT_INSN_opt_lt 1
  #define INSN_IS_SC()     0
  #define INSN_LABEL(lab)  LABEL_opt_lt_##lab
  #define LABEL_IS_SC(lab) LABEL_##lab##_##t
  USAGE_ANALYSIS_INSN(BIN(opt_lt));
{
#line 2082 "insns.def"
    if (FIXNUM_2_P(recv, obj) &&
	BASIC_OP_UNREDEFINED_P(BOP_LT)) {
	long a = FIX2LONG(recv), b = FIX2LONG(obj);

	if (a < b) {
	    val = Qtrue;
	}
	else {
	    val = Qfalse;
	}
    }
    else {
	/* other */
#ifdef YARV_AOT_COMPILED
	val = rb_funcall(recv, idLT, 1, obj);
#else
	PUSH(recv);
	PUSH(obj);
	tmp_id = idLT;
	goto LABEL_IS_SC(start_init_in_send_for_opt_1);
#endif
    }
#line 3297 "vm.inc"
  PUSH(val);

#undef CURRENT_INSN_opt_lt
#undef INSN_IS_SC
#undef INSN_LABEL
#undef LABEL_IS_SC
  END_INSN(opt_lt);
}}
}


INSN_ENTRY(opt_le){

{
  VALUE val;


  VALUE recv = TOPN(1);
  VALUE obj = TOPN(0);

  DEBUG_ENTER_INSN("opt_le");
  ADD_PC(1+0);
  PREFETCH(GET_PC());
  POPN(2);
  #define CURRENT_INSN_opt_le 1
  #define INSN_IS_SC()     0
  #define INSN_LABEL(lab)  LABEL_opt_le_##lab
  #define LABEL_IS_SC(lab) LABEL_##lab##_##t
  USAGE_ANALYSIS_INSN(BIN(opt_le));
{
#line 2117 "insns.def"
    if (FIXNUM_2_P(recv, obj) &&
	BASIC_OP_UNREDEFINED_P(BOP_LE)) {
	long a = FIX2LONG(recv), b = FIX2LONG(obj);

	if (a <= b) {
	    val = Qtrue;
	}
	else {
	    val = Qfalse;
	}
    }
    else {
	/* other */
#ifdef YARV_AOT_COMPILED
	val = rb_funcall(recv, idLE, 1, obj);
#else
	PUSH(recv);
	PUSH(obj);
	tmp_id = idLE;
	goto LABEL_IS_SC(start_init_in_send_for_opt_1);
#endif
    }
#line 3351 "vm.inc"
  PUSH(val);

#undef CURRENT_INSN_opt_le
#undef INSN_IS_SC
#undef INSN_LABEL
#undef LABEL_IS_SC
  END_INSN(opt_le);
}}
}


INSN_ENTRY(opt_ltlt){

{
  VALUE val;


  VALUE recv = TOPN(1);
  VALUE obj = TOPN(0);

  DEBUG_ENTER_INSN("opt_ltlt");
  ADD_PC(1+0);
  PREFETCH(GET_PC());
  POPN(2);
  #define CURRENT_INSN_opt_ltlt 1
  #define INSN_IS_SC()     0
  #define INSN_LABEL(lab)  LABEL_opt_ltlt_##lab
  #define LABEL_IS_SC(lab) LABEL_##lab##_##t
  USAGE_ANALYSIS_INSN(BIN(opt_ltlt));
{
#line 2152 "insns.def"
    if (!SPECIAL_CONST_P(recv)) {
	if (0) {
	}
	else if (HEAP_CLASS_OF(recv) == rb_cString &&
		 BASIC_OP_UNREDEFINED_P(BOP_LTLT)) {
	    val = rb_str_concat(recv, obj);
	}
	else if (HEAP_CLASS_OF(recv) == rb_cArray &&
		 BASIC_OP_UNREDEFINED_P(BOP_LTLT)) {
	    val = rb_ary_push(recv, obj);
	}
	else {
	    goto INSN_LABEL(normal_dispatch);
	}
    }
    else {
      INSN_LABEL(normal_dispatch):
	/* other */
#ifdef YARV_AOT_COMPILED
	val = rb_funcall(recv, idLTLT, 1, obj);
#else
	PUSH(recv);
	PUSH(obj);
	tmp_id = idLTLT;
	goto LABEL_IS_SC(start_init_in_send_for_opt_1);
#endif
    }
#line 3410 "vm.inc"
  PUSH(val);

#undef CURRENT_INSN_opt_ltlt
#undef INSN_IS_SC
#undef INSN_LABEL
#undef LABEL_IS_SC
  END_INSN(opt_ltlt);
}}
}


INSN_ENTRY(opt_aref){

{
  VALUE val;


  VALUE recv = TOPN(1);
  VALUE obj = TOPN(0);

  DEBUG_ENTER_INSN("opt_aref");
  ADD_PC(1+0);
  PREFETCH(GET_PC());
  POPN(2);
  #define CURRENT_INSN_opt_aref 1
  #define INSN_IS_SC()     0
  #define INSN_LABEL(lab)  LABEL_opt_aref_##lab
  #define LABEL_IS_SC(lab) LABEL_##lab##_##t
  USAGE_ANALYSIS_INSN(BIN(opt_aref));
{
#line 2192 "insns.def"
    if (!SPECIAL_CONST_P(recv) && BASIC_OP_UNREDEFINED_P(BOP_AREF)) {
	if (HEAP_CLASS_OF(recv) == rb_cArray && FIXNUM_P(obj)) {
	    val = rb_ary_entry(recv, FIX2LONG(obj));
	}
	else if (HEAP_CLASS_OF(recv) == rb_cHash) {
	    val = rb_hash_aref(recv, obj);
	}
	else {
	    goto INSN_LABEL(normal_dispatch);
	}
    }
    else {
      INSN_LABEL(normal_dispatch):
	/* other */
#ifdef YARV_AOT_COMPILED
	val = rb_funcall(recv, idAREF, 1, obj);
#else
	PUSH(recv);
	PUSH(obj);
	tmp_id = idAREF;
	goto LABEL_IS_SC(start_init_in_send_for_opt_1);
#endif
    }
#line 3465 "vm.inc"
  PUSH(val);

#undef CURRENT_INSN_opt_aref
#undef INSN_IS_SC
#undef INSN_LABEL
#undef LABEL_IS_SC
  END_INSN(opt_aref);
}}
}


INSN_ENTRY(opt_aset){

{
  VALUE val;


  VALUE recv = TOPN(2);
  VALUE obj = TOPN(1);
  VALUE set = TOPN(0);

  DEBUG_ENTER_INSN("opt_aset");
  ADD_PC(1+0);
  PREFETCH(GET_PC());
  POPN(3);
  #define CURRENT_INSN_opt_aset 1
  #define INSN_IS_SC()     0
  #define INSN_LABEL(lab)  LABEL_opt_aset_##lab
  #define LABEL_IS_SC(lab) LABEL_##lab##_##t
  USAGE_ANALYSIS_INSN(BIN(opt_aset));
{
#line 2228 "insns.def"
    if (!SPECIAL_CONST_P(recv) &&
	BASIC_OP_UNREDEFINED_P(BOP_ASET)) {
	if (HEAP_CLASS_OF(recv) == rb_cArray && FIXNUM_P(obj)) {
	    rb_ary_store(recv, FIX2LONG(obj), set);
	    val = set;
	}
	else if (HEAP_CLASS_OF(recv) == rb_cHash) {
	    rb_hash_aset(recv, obj, set);
	    val = set;
	}
	else {
	    goto INSN_LABEL(normal_dispatch);
	}
    }
    else {
      INSN_LABEL(normal_dispatch):
	/* other */
#ifdef YARV_AOT_COMPILED
	val = rb_funcall(recv, idASET, 2, obj, set);
#else
	PUSH(recv);
	PUSH(obj);
	PUSH(set);
	tmp_id = idASET;
	goto LABEL_IS_SC(start_init_in_send_for_opt_2);
#endif
    }
#line 3525 "vm.inc"
  PUSH(val);

#undef CURRENT_INSN_opt_aset
#undef INSN_IS_SC
#undef INSN_LABEL
#undef LABEL_IS_SC
  END_INSN(opt_aset);
}}
}


INSN_ENTRY(opt_length){

{
  VALUE val;


  VALUE recv = TOPN(0);

  DEBUG_ENTER_INSN("opt_length");
  ADD_PC(1+0);
  PREFETCH(GET_PC());
  POPN(1);
  #define CURRENT_INSN_opt_length 1
  #define INSN_IS_SC()     0
  #define INSN_LABEL(lab)  LABEL_opt_length_##lab
  #define LABEL_IS_SC(lab) LABEL_##lab##_##t
  USAGE_ANALYSIS_INSN(BIN(opt_length));
{
#line 2268 "insns.def"
    if (!SPECIAL_CONST_P(recv) &&
	BASIC_OP_UNREDEFINED_P(BOP_LENGTH)) {
	if (HEAP_CLASS_OF(recv) == rb_cArray) {
	    val = LONG2NUM(RARRAY_LEN(recv));
	}
	else if (HEAP_CLASS_OF(recv) == rb_cString) {
	    val = LONG2NUM(RSTRING_LEN(recv));
	}
	else if (HEAP_CLASS_OF(recv) == rb_cHash) {
	    val = INT2FIX(RHASH(recv)->tbl->num_entries);
	}
	else {
	    goto INSN_LABEL(normal_dispatch);
	}
    }
    else {
      INSN_LABEL(normal_dispatch):
	/* other */
#ifdef YARV_AOT_COMPILED
	val = rb_funcall(recv, idLength, 0);
#else
	val = rb_funcall(recv, idLength, 0);
#endif
    }
#line 3580 "vm.inc"
  PUSH(val);

#undef CURRENT_INSN_opt_length
#undef INSN_IS_SC
#undef INSN_LABEL
#undef LABEL_IS_SC
  END_INSN(opt_length);
}}
}


INSN_ENTRY(opt_succ){

{
  VALUE val;


  VALUE recv = TOPN(0);

  DEBUG_ENTER_INSN("opt_succ");
  ADD_PC(1+0);
  PREFETCH(GET_PC());
  POPN(1);
  #define CURRENT_INSN_opt_succ 1
  #define INSN_IS_SC()     0
  #define INSN_LABEL(lab)  LABEL_opt_succ_##lab
  #define LABEL_IS_SC(lab) LABEL_##lab##_##t
  USAGE_ANALYSIS_INSN(BIN(opt_succ));
{
#line 2305 "insns.def"
    if (SPECIAL_CONST_P(recv)) {
	if (FIXNUM_P(recv) &&
	    BASIC_OP_UNREDEFINED_P(BOP_SUCC)) {
	    const VALUE obj = INT2FIX(1);
	    /* fixnum + INT2FIX(1) */
	    val = (recv + (obj & (~1)));
	    if ((~(recv ^ obj) & (recv ^ val)) & 0x80000000) {
		val = rb_big_plus(rb_int2big(INT2FIX(recv)),
				  rb_int2big(INT2FIX(obj)));
	    }
	}
	else {
	    goto INSN_LABEL(normal_dispatch);
	}
    }
    else {
	if (HEAP_CLASS_OF(recv) == rb_cString &&
	    BASIC_OP_UNREDEFINED_P(BOP_SUCC)) {
	    val = rb_str_succ(recv);
	}
	else if (HEAP_CLASS_OF(recv) == rb_cTime &&
		 BASIC_OP_UNREDEFINED_P(BOP_SUCC)) {
	    val = rb_time_succ(recv);
	}
	else {
	    goto INSN_LABEL(normal_dispatch);
	}
    }
    if (0) {
      INSN_LABEL(normal_dispatch):
	/* other */
#ifdef YARV_AOT_COMPILED
	val = rb_funcall(recv, idSucc, 0);
#else
	val = rb_funcall(recv, idSucc, 0);
#endif
    }
#line 3648 "vm.inc"
  PUSH(val);

#undef CURRENT_INSN_opt_succ
#undef INSN_IS_SC
#undef INSN_LABEL
#undef LABEL_IS_SC
  END_INSN(opt_succ);
}}
}


INSN_ENTRY(opt_regexpmatch1){

{
  VALUE val;

  VALUE r = (VALUE)GET_OPERAND(1);
  VALUE obj = TOPN(0);

  DEBUG_ENTER_INSN("opt_regexpmatch1");
  ADD_PC(1+1);
  PREFETCH(GET_PC());
  POPN(1);
  #define CURRENT_INSN_opt_regexpmatch1 1
  #define INSN_IS_SC()     0
  #define INSN_LABEL(lab)  LABEL_opt_regexpmatch1_##lab
  #define LABEL_IS_SC(lab) LABEL_##lab##_##t
  USAGE_ANALYSIS_INSN(BIN(opt_regexpmatch1));
  USAGE_ANALYSIS_OPERAND(BIN(opt_regexpmatch1), 0, r);
{
#line 2355 "insns.def"
    val = rb_reg_match(r, obj);
#line 3681 "vm.inc"
  PUSH(val);

#undef CURRENT_INSN_opt_regexpmatch1
#undef INSN_IS_SC
#undef INSN_LABEL
#undef LABEL_IS_SC
  END_INSN(opt_regexpmatch1);
}}
}


INSN_ENTRY(opt_regexpmatch2){

{
  VALUE val;


  VALUE obj2 = TOPN(1);
  VALUE obj1 = TOPN(0);

  DEBUG_ENTER_INSN("opt_regexpmatch2");
  ADD_PC(1+0);
  PREFETCH(GET_PC());
  POPN(2);
  #define CURRENT_INSN_opt_regexpmatch2 1
  #define INSN_IS_SC()     0
  #define INSN_LABEL(lab)  LABEL_opt_regexpmatch2_##lab
  #define LABEL_IS_SC(lab) LABEL_##lab##_##t
  USAGE_ANALYSIS_INSN(BIN(opt_regexpmatch2));
{
#line 2369 "insns.def"
    if (TYPE(obj2) == T_STRING) {
	val = rb_reg_match(obj1, obj2);
    }
    else {
	val = rb_funcall(obj2, idEqTilde, 1, obj1);
    }
#line 3719 "vm.inc"
  PUSH(val);

#undef CURRENT_INSN_opt_regexpmatch2
#undef INSN_IS_SC
#undef INSN_LABEL
#undef LABEL_IS_SC
  END_INSN(opt_regexpmatch2);
}}
}


INSN_ENTRY(opt_call_native_compiled){

{





  DEBUG_ENTER_INSN("opt_call_native_compiled");
  ADD_PC(1+0);
  PREFETCH(GET_PC());
  #define CURRENT_INSN_opt_call_native_compiled 1
  #define INSN_IS_SC()     0
  #define INSN_LABEL(lab)  LABEL_opt_call_native_compiled_##lab
  #define LABEL_IS_SC(lab) LABEL_##lab##_##t
  USAGE_ANALYSIS_INSN(BIN(opt_call_native_compiled));
{
#line 2388 "insns.def"
#if __GNUC__ && OPT_USE_JIT_COMPILE
    rb_iseq_t *iseq = GET_ISEQ();
    void *label = (void *)iseq->jit_compiled;

    breakpoint();
    SET_PC(iseq->iseq_orig);
    goto *label;
#else
    rb_bug("opt_call_native_compiled is not supported");
#endif
#line 3759 "vm.inc"


#undef CURRENT_INSN_opt_call_native_compiled
#undef INSN_IS_SC
#undef INSN_LABEL
#undef LABEL_IS_SC
  END_INSN(opt_call_native_compiled);
}}
}


INSN_ENTRY(bitblt){

{
  VALUE ret;




  DEBUG_ENTER_INSN("bitblt");
  ADD_PC(1+0);
  PREFETCH(GET_PC());
  #define CURRENT_INSN_bitblt 1
  #define INSN_IS_SC()     0
  #define INSN_LABEL(lab)  LABEL_bitblt_##lab
  #define LABEL_IS_SC(lab) LABEL_##lab##_##t
  USAGE_ANALYSIS_INSN(BIN(bitblt));
{
#line 2411 "insns.def"
    ret = rb_str_new2("a bit of bacon, lettuce and tomato");
#line 3790 "vm.inc"
  PUSH(ret);

#undef CURRENT_INSN_bitblt
#undef INSN_IS_SC
#undef INSN_LABEL
#undef LABEL_IS_SC
  END_INSN(bitblt);
}}
}


INSN_ENTRY(answer){

{
  VALUE ret;




  DEBUG_ENTER_INSN("answer");
  ADD_PC(1+0);
  PREFETCH(GET_PC());
  #define CURRENT_INSN_answer 1
  #define INSN_IS_SC()     0
  #define INSN_LABEL(lab)  LABEL_answer_##lab
  #define LABEL_IS_SC(lab) LABEL_##lab##_##t
  USAGE_ANALYSIS_INSN(BIN(answer));
{
#line 2425 "insns.def"
    ret = INT2FIX(42);
#line 3821 "vm.inc"
  PUSH(ret);

#undef CURRENT_INSN_answer
#undef INSN_IS_SC
#undef INSN_LABEL
#undef LABEL_IS_SC
  END_INSN(answer);
}}
}


