text: // Generated by Haxe 4.1.3
  (function ($global) { "use strict";
  function $extend(from, fields) {
  	var proto = Object.create(from);
  	for (var name in fields) proto[name] = fields[name];
  	if( fields.toString !== Object.prototype.toString ) proto.toString = fields.toString;
  	return proto;
  }
  var MainProgram = function() { };
  MainProgram.__name__ = true;
  MainProgram.main = function() {
  	sample_Program.Main(null);
  };
  Math.__name__ = true;
  var Std = function() { };
  Std.__name__ = true;
  Std.string = function(s) {
  	return js_Boot.__string_rec(s,"");
  };
  var TestControl = function() {
  	this.m_bYesNo = false;
  	this.m_i = 0;
  	this.m_callstack = [];
  	this.m_bEnd = false;
  	this.m_noWait = false;
  };
  TestControl.__name__ = true;
  TestControl.prototype = {
  	Update: function() {
  		while(true) {
  			var bFirst = false;
  			if(this.m_nextfunc != null) {
  				this.m_curfunc = this.m_nextfunc;
  				this.m_nextfunc = null;
  				bFirst = true;
  			}
  			this.m_noWait = false;
  			if(this.m_curfunc != null) {
  				this.m_curfunc(bFirst);
  			}
  			if(!this.m_noWait) {
  				break;
  			}
  		}
  	}
  	,Goto: function(func) {
  		this.m_nextfunc = func;
  	}
  	,CheckState: function(func) {
  		return this.m_curfunc == func;
  	}
  	,HasNextState: function() {
  		return this.m_nextfunc != null;
  	}
  	,NoWait: function() {
  		this.m_noWait = true;
  	}
  	,GoSubState: function(nextstate,returnstate) {
  		this.m_callstack.splice(0,0,returnstate);
  		this.Goto(nextstate);
  	}
  	,ReturnState: function() {
  		var nextstate = this.m_callstack[0];
  		this.m_callstack.splice(0,1);
  		this.Goto(nextstate);
  	}
  	,Start: function() {
  		this.Goto($bind(this,this.S_START));
  	}
  	,IsEnd: function() {
  		return this.m_bEnd;
  	}
  	,Run: function() {
  		var LOOPMAX = 100000;
  		this.Start();
  		var loop = 0;
  		while(loop <= LOOPMAX) {
  			if(loop >= LOOPMAX) {
  				throw haxe_Exception.thrown(new system_SystemException("Unexpected.{82BA5316-DD53-447F-8A67-8D76453B4A4C}"));
  			}
  			this.Update();
  			if(this.IsEnd()) {
  				break;
  			}
  			++loop;
  		}
  	}
  	,S_END: function(bFirst) {
  		this.m_bEnd = true;
  	}
  	,S_EVEN_OR_ODD: function(bFirst) {
  		if(this.m_i % 2 == 0) {
  			this.Goto($bind(this,this.S_PRINT_EVEN));
  		} else {
  			this.Goto($bind(this,this.S_PRINT_ODD));
  		}
  	}
  	,S_GOSUB: function(bFirst) {
  		this.GoSubState($bind(this,this.S_SUBSTART1),$bind(this,this.S_LOOP));
  		this.NoWait();
  	}
  	,S_LOOP: function(bFirst) {
  		this.m_i = 0;
  		this.Goto($bind(this,this.S_LOOP_LoopCheckAndGosub____));
  		this.NoWait();
  	}
  	,S_LOOP_LoopCheckAndGosub____: function(bFirst) {
  		if(this.m_i < 10) {
  			this.GoSubState($bind(this,this.S_SUBSTART),$bind(this,this.S_LOOP_LoopNext____));
  		} else {
  			this.Goto($bind(this,this.S_END));
  		}
  		this.NoWait();
  	}
  	,S_LOOP_LoopNext____: function(bFirst) {
  		this.m_i++;
  		this.Goto($bind(this,this.S_LOOP_LoopCheckAndGosub____));
  		this.NoWait();
  	}
  	,S_PRINT_EVEN: function(bFirst) {
  		if(bFirst) {
  			system_Console.WriteLine(Std.string(this.m_i) + ".. EVEN");
  		}
  		if(!this.HasNextState()) {
  			this.Goto($bind(this,this.S_SUBRETURN));
  		}
  	}
  	,S_PRINT_ODD: function(bFirst) {
  		if(bFirst) {
  			system_Console.WriteLine(Std.string(this.m_i) + ".. ODD");
  		}
  		if(!this.HasNextState()) {
  			this.Goto($bind(this,this.S_SUBRETURN));
  		}
  	}
  	,S_START: function(bFirst) {
  		this.m_bEnd = false;
  		this.Goto($bind(this,this.S_GOSUB));
  		this.NoWait();
  	}
  	,S_SUBRETURN: function(bFirst) {
  		this.ReturnState();
  		this.NoWait();
  	}
  	,S_SUBRETURN1: function(bFirst) {
  		this.ReturnState();
  		this.NoWait();
  	}
  	,S_SUBSTART: function(bFirst) {
  		this.Goto($bind(this,this.S_EVEN_OR_ODD));
  		this.NoWait();
  	}
  	,S_SUBSTART1: function(bFirst) {
  		this.Goto($bind(this,this.S_WORK));
  		this.NoWait();
  	}
  	,S_WORK: function(bFirst) {
  		if(bFirst) {
  			system_Console.WriteLine("!!!");
  		}
  		if(!this.HasNextState()) {
  			this.Goto($bind(this,this.S_SUBRETURN1));
  		}
  	}
  	,br_YES: function(st) {
  		if(!this.HasNextState()) {
  			if(this.m_bYesNo) {
  				this.Goto(st);
  			}
  		}
  	}
  	,br_NO: function(st) {
  		if(!this.HasNextState()) {
  			if(!this.m_bYesNo) {
  				this.Goto(st);
  			}
  		}
  	}
  };
  var haxe_Exception = function(message,previous,native) {
  	Error.call(this,message);
  	this.message = message;
  	this.__previousException = previous;
  	this.__nativeException = native != null ? native : this;
  };
  haxe_Exception.__name__ = true;
  haxe_Exception.thrown = function(value) {
  	if(((value) instanceof haxe_Exception)) {
  		return value.get_native();
  	} else if(((value) instanceof Error)) {
  		return value;
  	} else {
  		var e = new haxe_ValueException(value);
  		return e;
  	}
  };
  haxe_Exception.__super__ = Error;
  haxe_Exception.prototype = $extend(Error.prototype,{
  	get_native: function() {
  		return this.__nativeException;
  	}
  });
  var haxe_ValueException = function(value,previous,native) {
  	haxe_Exception.call(this,String(value),previous,native);
  	this.value = value;
  };
  haxe_ValueException.__name__ = true;
  haxe_ValueException.__super__ = haxe_Exception;
  haxe_ValueException.prototype = $extend(haxe_Exception.prototype,{
  });
  var haxe_iterators_ArrayIterator = function(array) {
  	this.current = 0;
  	this.array = array;
  };
  haxe_iterators_ArrayIterator.__name__ = true;
  haxe_iterators_ArrayIterator.prototype = {
  	hasNext: function() {
  		return this.current < this.array.length;
  	}
  	,next: function() {
  		return this.array[this.current++];
  	}
  };
  var js_Boot = function() { };
  js_Boot.__name__ = true;
  js_Boot.__string_rec = function(o,s) {
  	if(o == null) {
  		return "null";
  	}
  	if(s.length >= 5) {
  		return "<...>";
  	}
  	var t = typeof(o);
  	if(t == "function" && (o.__name__ || o.__ename__)) {
  		t = "object";
  	}
  	switch(t) {
  	case "function":
  		return "<function>";
  	case "object":
  		if(((o) instanceof Array)) {
  			var str = "[";
  			s += "\t";
  			var _g = 0;
  			var _g1 = o.length;
  			while(_g < _g1) {
  				var i = _g++;
  				str += (i > 0 ? "," : "") + js_Boot.__string_rec(o[i],s);
  			}
  			str += "]";
  			return str;
  		}
  		var tostr;
  		try {
  			tostr = o.toString;
  		} catch( _g ) {
  			return "???";
  		}
  		if(tostr != null && tostr != Object.toString && typeof(tostr) == "function") {
  			var s2 = o.toString();
  			if(s2 != "[object Object]") {
  				return s2;
  			}
  		}
  		var str = "{\n";
  		s += "\t";
  		var hasp = o.hasOwnProperty != null;
  		var k = null;
  		for( k in o ) {
  		if(hasp && !o.hasOwnProperty(k)) {
  			continue;
  		}
  		if(k == "prototype" || k == "__class__" || k == "__super__" || k == "__interfaces__" || k == "__properties__") {
  			continue;
  		}
  		if(str.length != 2) {
  			str += ", \n";
  		}
  		str += s + k + " : " + js_Boot.__string_rec(o[k],s);
  		}
  		s = s.substring(1);
  		str += "\n" + s + "}";
  		return str;
  	case "string":
  		return o;
  	default:
  		return String(o);
  	}
  };
  var sample_Program = function() {
  };
  sample_Program.__name__ = true;
  sample_Program.Main = function(args) {
  	system_Console.WriteLine("Hello World!");
  	var sm = new TestControl();
  	sm.Run();
  };
  var system_Console = function() { };
  system_Console.__name__ = true;
  system_Console.WriteLine = function(s) {
  	console.log("sys_js/system/Console.hx:7:",s);
  };
  var system_SystemException = function(s) {
  	throw haxe_Exception.thrown(s);
  };
  system_SystemException.__name__ = true;
  var $_;
  function $bind(o,m) { if( m == null ) return null; if( m.__id__ == null ) m.__id__ = $global.$haxeUID++; var f; if( o.hx__closures__ == null ) o.hx__closures__ = {}; else f = o.hx__closures__[m.__id__]; if( f == null ) { f = m.bind(o); o.hx__closures__[m.__id__] = f; } return f; }
  $global.$haxeUID |= 0;
  String.__name__ = true;
  Array.__name__ = true;
  js_Boot.__toStr = ({ }).toString;
  MainProgram.main();
  })(typeof window != "undefined" ? window : typeof global != "undefined" ? global : typeof self != "undefined" ? self : this);
  