#include "byte_code.h"

class obj {
public:
   int value;
virtual void _init_() {
	int arg1,arg2;
	const char * ptr;
	void * ptr1;
	void * var[2];
	var[0] = (void*)this;
	int temp1;
	int temp2;
L0:
	ALOAD(0)
L1:
	INVOKESPECIAL(java::lang::Object,_init_,"()V")
L4:
	ALOAD(0)
L5:
	IPUSH(100)
L7:
	PUTFIELD(obj,value,"I")
L10:
	RETURN()
}

virtual void run() {
	int arg1,arg2;
	const char * ptr;
	void * ptr1;
	void * var[3];
	var[0] = (void*)this;
	int temp1;
	int temp2;
	int temp3;
L0:
	ALOAD(0)
L1:
	DUP()
L2:
	GETFIELD(obj,value,"I")
L5:
	IPUSH(1)
L6:
	IADD()
L7:
	PUTFIELD(obj,value,"I")
L10:
	LDC("VALUE = ")
L12:
	INVOKESTATIC(IO::print,"(Ljava/lang/String;)V")
L15:
	ALOAD(0)
L16:
	GETFIELD(obj,value,"I")
L19:
	INVOKESTATIC(IO::printInt,"(I)V")
L22:
	LDC("Hello, World!")
L24:
	INVOKESTATIC(IO::println,"(Ljava/lang/String;)V")
L27:
	RETURN()
}

static void main(string_vector_type & args) {
	int arg1,arg2;
	const char * ptr;
	void * ptr1;
	void * var[2];
	int temp1;
	int temp2;
L0:
	NEW(obj)
L3:
	DUP()
L4:
	INVOKESPECIAL(obj,_init_,"()V")
L7:
	ASTORE(1)
L8:
	ALOAD(1)
L9:
	INVOKEVIRTUAL(obj,run,"()V")
L12:
	RETURN()
}

};

int
main(int argc, char ** argv)
{
   try {
      string_vector_type args;
      stack_type rt_stack;
      the_stack = &rt_stack;
      for(int i = 1; i < argc; i++)
         args.push_back(argv[i]);
      obj::main(args);
   }
   catch(...) {
      cerr << "exception..." << endl;
      exit(1);
   }
   return 0;
}
