#include "byte_code.h"

class HelloWorld {
public:
virtual void _init_() {
	int arg1,arg2;
	const char * ptr;
	void * ptr1;
	void * var[4];
	var[0] = (void*)this;
	int temp1;
	int temp2;
	int temp3;
	int temp4;
L0:
	ALOAD(temp0)
L1:
	INVOKESPECIAL(java::lang::Object,_init_,"()V")
L4:
	RETURN()
}

static void java_main(string_vector_type & args) {
	int arg1,arg2;
	const char * ptr;
	void * ptr1;
	void * var[4];
	int temp1;
	int temp2;
	int temp3;
	int temp4;
L0:
	IPUSH(100)
L2:
	ISTORE(1)
L3:
	IPUSH(10)
L5:
	ISTORE(2)
L6:
	IPUSH(1)
L7:
	ISTORE(3)
L8:
	ILOAD(1)
L9:
	ILOAD(2)
L10:
	IADD()
L11:
	ILOAD(3)
L12:
	IADD()
L13:
	ISTORE(4)
L15:
	ILOAD(4)
L17:
	IPUSH(111)
L19:
	IF_ICMPNE(L55)
L22:
	IPUSH(0)
L23:
	ISTORE(5)
L25:
	ILOAD(5)
L27:
	IPUSH(5)
L28:
	IF_ICMPGE(L55)
L31:
	LDC("Hello, world!")
L33:
	INVOKESTATIC(IO::println,"(Ljava/lang/String;)V")
L36:
	LDC("i=")
L38:
	INVOKESTATIC(IO::print,"(Ljava/lang/String;)V")
L41:
	ILOAD(5)
L43:
	INVOKESTATIC(IO::printInt,"(I)V")
L46:
	ILOAD(5)
L48:
	IPUSH(1)
L49:
	IADD()
L50:
	ISTORE(5)
L52:
	GOTO(L25)
L55:
	LDC("d=")
L57:
	INVOKESTATIC(IO::print,"(Ljava/lang/String;)V")
L60:
	ILOAD(4)
L62:
	INVOKESTATIC(IO::printInt,"(I)V")
L65:
	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]);
      HelloWorld::java_main(args);
   }
   catch(...) {
      cerr << "exception..." << endl;
      exit(1);
   }
   return 0;
}
