mirror of
https://github.com/DaanVandenBosch/phantasmal-world.git
synced 2025-04-05 07:18:29 +08:00
1 line
89 KiB
JavaScript
1 line
89 KiB
JavaScript
!function(i){var e={};function o(d){if(e[d])return e[d].exports;var v=e[d]={i:d,l:!1,exports:{}};return i[d].call(v.exports,v,v.exports,o),v.l=!0,v.exports}o.m=i,o.c=e,o.d=function(i,e,d){o.o(i,e)||Object.defineProperty(i,e,{enumerable:!0,get:d})},o.r=function(i){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(i,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(i,"__esModule",{value:!0})},o.t=function(i,e){if(1&e&&(i=o(i)),8&e)return i;if(4&e&&"object"==typeof i&&i&&i.__esModule)return i;var d=Object.create(null);if(o.r(d),Object.defineProperty(d,"default",{enumerable:!0,value:i}),2&e&&"string"!=typeof i)for(var v in i)o.d(d,v,function(e){return i[e]}.bind(null,v));return d},o.n=function(i){var e=i&&i.__esModule?function(){return i.default}:function(){return i};return o.d(e,"a",e),e},o.o=function(i,e){return Object.prototype.hasOwnProperty.call(i,e)},o.p="",o(o.s="yL6M")}({yL6M:function(i,e,o){"use strict";var d,v;o.r(e),function(i){i[i.NewAssembly=0]="NewAssembly",i[i.AssemblyChange=1]="AssemblyChange",i[i.SignatureHelp=2]="SignatureHelp",i[i.Definition=3]="Definition",i[i.SettingsChange=4]="SettingsChange"}(d||(d={})),function(i){i[i.NewObjectCode=0]="NewObjectCode",i[i.SignatureHelp=1]="SignatureHelp",i[i.Definition=2]="Definition"}(v||(v={}));const t=new DataView(new ArrayBuffer(4));var n,s;!function(i){i[i.Int=0]="Int",i[i.Float=1]="Float",i[i.InvalidNumber=2]="InvalidNumber",i[i.Register=3]="Register",i[i.Label=4]="Label",i[i.CodeSection=5]="CodeSection",i[i.DataSection=6]="DataSection",i[i.StringSection=7]="StringSection",i[i.InvalidSection=8]="InvalidSection",i[i.String=9]="String",i[i.UnterminatedString=10]="UnterminatedString",i[i.Ident=11]="Ident",i[i.InvalidIdent=12]="InvalidIdent",i[i.ArgSeparator=13]="ArgSeparator"}(n||(n={}));class r{constructor(){this.index=0,this._mark=0}get col(){return this.index+1}tokenize_line(i){this.line=i,this.index=0,this._mark=0;const e=[];for(;this.has_next();){const i=this.peek();let o;if("/"===i){if(this.skip(),"/"===this.peek())break;this.back()}/\s/.test(i)?this.skip():(/[-\d]/.test(i)?o=this.tokenize_number_or_label():","===i?(o={type:n.ArgSeparator,col:this.col,len:1},this.skip()):o="."===i?this.tokenize_section():'"'===i?this.tokenize_string():"r"===i?this.tokenize_register_or_ident():this.tokenize_ident(),e.push(o))}return e}has_next(){return this.index<this.line.length}next(){return this.line.charAt(this.index++)}peek(){return this.line.charAt(this.index)}skip(){this.index++}back(){this.index--}mark(){this._mark=this.index}marked_len(){return this.index-this._mark}slice(){return this.line.slice(this._mark,this.index)}eat_rest_of_token(){for(;this.has_next();){const i=this.next();if(/[\s,]/.test(i)){this.back();break}}}tokenize_number_or_label(){this.mark();const i=this.col;this.skip();let e=!1;for(;this.has_next();){const o=this.peek();if("."===o||"e"===o)return this.tokenize_float(i);if("x"===o)return this.tokenize_hex_number(i);if(":"===o){e=!0,this.skip();break}if(/[\s,]/.test(o))break;this.skip()}const o=parseInt(this.slice(),10);return{type:Number.isInteger(o)?e?n.Label:n.Int:n.InvalidNumber,col:i,len:this.marked_len(),value:o}}tokenize_hex_number(i){this.eat_rest_of_token();const e=this.slice();if(/^0x[\da-fA-F]+$/.test(e)){const o=parseInt(e,16);if(Number.isInteger(o))return{type:n.Int,col:i,len:this.marked_len(),value:o}}return{type:n.InvalidNumber,col:i,len:this.marked_len()}}tokenize_float(i){this.eat_rest_of_token();const e=this.slice();if(/^-?\d+(\.\d+)?(e-?\d+)?$/.test(e)){const o=parseFloat(e);if(Number.isFinite(o))return{type:n.Float,col:i,len:this.marked_len(),value:o}}return{type:n.InvalidNumber,col:i,len:this.marked_len()}}tokenize_register_or_ident(){const i=this.col;this.skip(),this.mark();let e=!1;for(;this.has_next();){const i=this.peek();if(!/\d/.test(i))break;e=!0,this.skip()}if(e){const e=parseInt(this.slice(),10);return{type:n.Register,col:i,len:this.marked_len()+1,value:e}}return this.back(),this.tokenize_ident()}tokenize_section(){const i=this.col;for(this.mark();this.has_next()&&!/\s/.test(this.peek());)this.skip();switch(this.slice()){case".code":return{type:n.CodeSection,col:i,len:5};case".data":return{type:n.DataSection,col:i,len:5};case".string":return{type:n.StringSection,col:i,len:7};default:return{type:n.InvalidSection,col:i,len:this.marked_len()}}}tokenize_string(){const i=this.col;this.mark(),this.skip();let e,o=!1,d=!1;i:for(;this.has_next();)switch(this.next()){case"\\":o=!0;break;case'"':if(!o){d=!0;break i}o=!1;break;default:o=!1}return e=d?JSON.parse(this.slice()):JSON.parse(this.slice()+'"'),{type:d?n.String:n.UnterminatedString,col:i,len:this.marked_len(),value:e}}tokenize_ident(){const i=this.col;for(this.mark();this.has_next();){const i=this.peek();if(/[\s,]/.test(i))break;if("/"===i){if(this.skip(),"/"===this.peek()){this.back();break}}else this.skip()}const e=this.slice(),o=/^[a-z][a-z0-9_=<>!]*$/.test(e)?n.Ident:n.InvalidIdent;return o===n.Ident?{type:o,col:i,len:this.marked_len(),value:e}:{type:o,col:i,len:this.marked_len()}}}!function(i){i[i.Any=0]="Any",i[i.Byte=1]="Byte",i[i.Word=2]="Word",i[i.DWord=3]="DWord",i[i.Float=4]="Float",i[i.Label=5]="Label",i[i.ILabel=6]="ILabel",i[i.DLabel=7]="DLabel",i[i.SLabel=8]="SLabel",i[i.String=9]="String",i[i.ILabelVar=10]="ILabelVar",i[i.RegRef=11]="RegRef",i[i.RegTupRef=12]="RegTupRef",i[i.RegRefVar=13]="RegRefVar",i[i.Pointer=14]="Pointer"}(s||(s={}));const a={kind:s.Any},u={kind:s.Byte},_={kind:s.Word},l={kind:s.DWord},p={kind:s.Float},g={kind:s.Label},f={kind:s.ILabel},k={kind:s.DLabel},R={kind:s.SLabel},c={kind:s.String},h={kind:s.ILabelVar},w={kind:s.RegRef},b={kind:s.RegRefVar},m={kind:s.Pointer};Math.pow(2,31),Math.pow(2,31),Math.pow(2,32);var T,y;function P(i,e,o){return{type:i,doc:e,access:o}}!function(i){i[i.Read=0]="Read",i[i.Write=1]="Write",i[i.ReadWrite=2]="ReadWrite"}(T||(T={})),function(i){i[i.Push=0]="Push",i[i.Pop=1]="Pop"}(y||(y={}));const W=[],S=new Map;function x(i,e,o,d,v){return{code:i,mnemonic:e,doc:o,size:i<256?1:2,params:d,stack:v}}W[0]=x(0,"nop","No operation, does nothing.",[],void 0),W[1]=x(1,"ret","Returns control to caller.",[],void 0),W[2]=x(2,"sync","Yields control for the rest of the current frame. Execution will continue the following frame.",[],void 0),W[3]=x(3,"exit",void 0,[P(l,void 0,void 0)],y.Pop),W[4]=x(4,"thread","Starts a new thread. Thread execution will start at the given label.\nOften used to check a register every frame. Make sure to yield control with sync when looping.",[P(f,void 0,void 0)],void 0),W[5]=x(5,"va_start","Initializes a variable argument list.\nMake sure to call va_end after va_start and va_call.",[],void 0),W[6]=x(6,"va_end","Restores the registers overwritten by arg_push* instructions.\nCalled after va_call.",[],void 0),W[7]=x(7,"va_call","Calls the variable argument function at the given label.\nCalled after initializing the argument list with va_start and pushing arguments onto the stack with arg_push* instructions. Make sure to call va_end afterwards.",[P(f,void 0,void 0)],void 0),W[8]=x(8,"let","Sets the first register's value to second one's value.",[P({kind:s.RegTupRef,register_tuples:[P(l,void 0,T.Write)]},void 0,void 0),P({kind:s.RegTupRef,register_tuples:[P(l,void 0,T.Read)]},void 0,void 0)],void 0),W[9]=x(9,"leti","Sets a register to the given value.",[P({kind:s.RegTupRef,register_tuples:[P(l,void 0,T.Write)]},void 0,void 0),P(l,void 0,void 0)],void 0),W[10]=x(10,"letb","Sets a register to the given value.",[P({kind:s.RegTupRef,register_tuples:[P(u,void 0,T.Write)]},void 0,void 0),P(u,void 0,void 0)],void 0),W[11]=x(11,"letw","Sets a register to the given value.",[P({kind:s.RegTupRef,register_tuples:[P(_,void 0,T.Write)]},void 0,void 0),P(_,void 0,void 0)],void 0),W[12]=x(12,"leta","Sets the first register to the memory address of the second register. Not used by Sega.",[P({kind:s.RegTupRef,register_tuples:[P(m,void 0,T.Write)]},void 0,void 0),P({kind:s.RegTupRef,register_tuples:[P(a,void 0,T.Read)]},void 0,void 0)],void 0),W[13]=x(13,"leto","Sets a register to the memory address of the given label. Not used by Sega.",[P({kind:s.RegTupRef,register_tuples:[P(m,void 0,T.Write)]},void 0,void 0),P(g,void 0,void 0)],void 0),W[14]=x(14,"unknown_0e",void 0,[],void 0),W[15]=x(15,"unknown_0f",void 0,[],void 0),W[16]=x(16,"set","Sets a register to 1.",[P({kind:s.RegTupRef,register_tuples:[P(l,void 0,T.Write)]},void 0,void 0)],void 0),W[17]=x(17,"clear","Sets a register to 0.",[P({kind:s.RegTupRef,register_tuples:[P(l,void 0,T.Write)]},void 0,void 0)],void 0),W[18]=x(18,"rev","Sets a register to 1 if its current value is 0, otherwise sets it to 0.",[P({kind:s.RegTupRef,register_tuples:[P(l,void 0,T.ReadWrite)]},void 0,void 0)],void 0),W[19]=x(19,"gset",void 0,[P(_,void 0,void 0)],void 0),W[20]=x(20,"gclear",void 0,[P(_,void 0,void 0)],void 0),W[21]=x(21,"grev",void 0,[P(_,void 0,void 0)],void 0),W[22]=x(22,"glet",void 0,[P(_,void 0,void 0)],void 0),W[23]=x(23,"gget","Sets a register to value of the given flag.",[P(_,void 0,void 0),P({kind:s.RegTupRef,register_tuples:[P(_,void 0,T.Write)]},void 0,void 0)],void 0),W[24]=x(24,"add",void 0,[P({kind:s.RegTupRef,register_tuples:[P(l,void 0,T.Write)]},void 0,void 0),P({kind:s.RegTupRef,register_tuples:[P(l,void 0,T.Read)]},void 0,void 0)],void 0),W[25]=x(25,"addi",void 0,[P({kind:s.RegTupRef,register_tuples:[P(l,void 0,T.Write)]},void 0,void 0),P(l,void 0,void 0)],void 0),W[26]=x(26,"sub",void 0,[P({kind:s.RegTupRef,register_tuples:[P(l,void 0,T.Write)]},void 0,void 0),P({kind:s.RegTupRef,register_tuples:[P(l,void 0,T.Read)]},void 0,void 0)],void 0),W[27]=x(27,"subi",void 0,[P({kind:s.RegTupRef,register_tuples:[P(l,void 0,T.Write)]},void 0,void 0),P(l,void 0,void 0)],void 0),W[28]=x(28,"mul",void 0,[P({kind:s.RegTupRef,register_tuples:[P(l,void 0,T.Write)]},void 0,void 0),P({kind:s.RegTupRef,register_tuples:[P(l,void 0,T.Read)]},void 0,void 0)],void 0),W[29]=x(29,"muli",void 0,[P({kind:s.RegTupRef,register_tuples:[P(l,void 0,T.Write)]},void 0,void 0),P(l,void 0,void 0)],void 0),W[30]=x(30,"div",void 0,[P({kind:s.RegTupRef,register_tuples:[P(l,void 0,T.Write)]},void 0,void 0),P({kind:s.RegTupRef,register_tuples:[P(l,void 0,T.Read)]},void 0,void 0)],void 0),W[31]=x(31,"divi",void 0,[P({kind:s.RegTupRef,register_tuples:[P(l,void 0,T.Write)]},void 0,void 0),P(l,void 0,void 0)],void 0),W[32]=x(32,"and",void 0,[P({kind:s.RegTupRef,register_tuples:[P(l,void 0,T.Write)]},void 0,void 0),P({kind:s.RegTupRef,register_tuples:[P(l,void 0,T.Read)]},void 0,void 0)],void 0),W[33]=x(33,"andi",void 0,[P({kind:s.RegTupRef,register_tuples:[P(l,void 0,T.Write)]},void 0,void 0),P(l,void 0,void 0)],void 0),W[34]=x(34,"or",void 0,[P({kind:s.RegTupRef,register_tuples:[P(l,void 0,T.Write)]},void 0,void 0),P({kind:s.RegTupRef,register_tuples:[P(l,void 0,T.Read)]},void 0,void 0)],void 0),W[35]=x(35,"ori",void 0,[P({kind:s.RegTupRef,register_tuples:[P(l,void 0,T.Write)]},void 0,void 0),P(l,void 0,void 0)],void 0),W[36]=x(36,"xor",void 0,[P({kind:s.RegTupRef,register_tuples:[P(l,void 0,T.Write)]},void 0,void 0),P({kind:s.RegTupRef,register_tuples:[P(l,void 0,T.Read)]},void 0,void 0)],void 0),W[37]=x(37,"xori",void 0,[P({kind:s.RegTupRef,register_tuples:[P(l,void 0,T.Write)]},void 0,void 0),P(l,void 0,void 0)],void 0),W[38]=x(38,"mod",void 0,[P({kind:s.RegTupRef,register_tuples:[P(l,void 0,T.Write)]},void 0,void 0),P({kind:s.RegTupRef,register_tuples:[P(l,void 0,T.Read)]},void 0,void 0)],void 0),W[39]=x(39,"modi",void 0,[P({kind:s.RegTupRef,register_tuples:[P(l,void 0,T.Write)]},void 0,void 0),P(l,void 0,void 0)],void 0),W[40]=x(40,"jmp",void 0,[P(f,void 0,void 0)],void 0),W[41]=x(41,"call",void 0,[P(f,void 0,void 0)],void 0),W[42]=x(42,"jmp_on",void 0,[P(f,void 0,void 0),P(b,void 0,T.Read)],void 0),W[43]=x(43,"jmp_off",void 0,[P(f,void 0,void 0),P(b,void 0,T.Read)],void 0),W[44]=x(44,"jmp_=",void 0,[P({kind:s.RegTupRef,register_tuples:[P(a,void 0,T.Read)]},void 0,void 0),P({kind:s.RegTupRef,register_tuples:[P(a,void 0,T.Read)]},void 0,void 0),P(f,void 0,void 0)],void 0),W[45]=x(45,"jmpi_=",void 0,[P({kind:s.RegTupRef,register_tuples:[P(l,void 0,T.Read)]},void 0,void 0),P(l,void 0,void 0),P(f,void 0,void 0)],void 0),W[46]=x(46,"jmp_!=",void 0,[P({kind:s.RegTupRef,register_tuples:[P(a,void 0,T.Read)]},void 0,void 0),P({kind:s.RegTupRef,register_tuples:[P(a,void 0,T.Read)]},void 0,void 0),P(f,void 0,void 0)],void 0),W[47]=x(47,"jmpi_!=",void 0,[P({kind:s.RegTupRef,register_tuples:[P(l,void 0,T.Read)]},void 0,void 0),P(l,void 0,void 0),P(f,void 0,void 0)],void 0),W[48]=x(48,"ujmp_>",void 0,[P({kind:s.RegTupRef,register_tuples:[P(l,void 0,T.Read)]},void 0,void 0),P({kind:s.RegTupRef,register_tuples:[P(l,void 0,T.Read)]},void 0,void 0),P(f,void 0,void 0)],void 0),W[49]=x(49,"ujmpi_>",void 0,[P({kind:s.RegTupRef,register_tuples:[P(l,void 0,T.Read)]},void 0,void 0),P(l,void 0,void 0),P(f,void 0,void 0)],void 0),W[50]=x(50,"jmp_>",void 0,[P({kind:s.RegTupRef,register_tuples:[P(l,void 0,T.Read)]},void 0,void 0),P({kind:s.RegTupRef,register_tuples:[P(l,void 0,T.Read)]},void 0,void 0),P(f,void 0,void 0)],void 0),W[51]=x(51,"jmpi_>",void 0,[P({kind:s.RegTupRef,register_tuples:[P(l,void 0,T.Read)]},void 0,void 0),P(l,void 0,void 0),P(f,void 0,void 0)],void 0),W[52]=x(52,"ujmp_<",void 0,[P({kind:s.RegTupRef,register_tuples:[P(l,void 0,T.Read)]},void 0,void 0),P({kind:s.RegTupRef,register_tuples:[P(l,void 0,T.Read)]},void 0,void 0),P(f,void 0,void 0)],void 0),W[53]=x(53,"ujmpi_<",void 0,[P({kind:s.RegTupRef,register_tuples:[P(l,void 0,T.Read)]},void 0,void 0),P(l,void 0,void 0),P(f,void 0,void 0)],void 0),W[54]=x(54,"jmp_<",void 0,[P({kind:s.RegTupRef,register_tuples:[P(l,void 0,T.Read)]},void 0,void 0),P({kind:s.RegTupRef,register_tuples:[P(l,void 0,T.Read)]},void 0,void 0),P(f,void 0,void 0)],void 0),W[55]=x(55,"jmpi_<",void 0,[P({kind:s.RegTupRef,register_tuples:[P(l,void 0,T.Read)]},void 0,void 0),P(l,void 0,void 0),P(f,void 0,void 0)],void 0),W[56]=x(56,"ujmp_>=",void 0,[P({kind:s.RegTupRef,register_tuples:[P(l,void 0,T.Read)]},void 0,void 0),P({kind:s.RegTupRef,register_tuples:[P(l,void 0,T.Read)]},void 0,void 0),P(f,void 0,void 0)],void 0),W[57]=x(57,"ujmpi_>=",void 0,[P({kind:s.RegTupRef,register_tuples:[P(l,void 0,T.Read)]},void 0,void 0),P(l,void 0,void 0),P(f,void 0,void 0)],void 0),W[58]=x(58,"jmp_>=",void 0,[P({kind:s.RegTupRef,register_tuples:[P(l,void 0,T.Read)]},void 0,void 0),P({kind:s.RegTupRef,register_tuples:[P(l,void 0,T.Read)]},void 0,void 0),P(f,void 0,void 0)],void 0),W[59]=x(59,"jmpi_>=",void 0,[P({kind:s.RegTupRef,register_tuples:[P(l,void 0,T.Read)]},void 0,void 0),P(l,void 0,void 0),P(f,void 0,void 0)],void 0),W[60]=x(60,"ujmp_<=",void 0,[P({kind:s.RegTupRef,register_tuples:[P(l,void 0,T.Read)]},void 0,void 0),P({kind:s.RegTupRef,register_tuples:[P(l,void 0,T.Read)]},void 0,void 0),P(f,void 0,void 0)],void 0),W[61]=x(61,"ujmpi_<=",void 0,[P({kind:s.RegTupRef,register_tuples:[P(l,void 0,T.Read)]},void 0,void 0),P(l,void 0,void 0),P(f,void 0,void 0)],void 0),W[62]=x(62,"jmp_<=",void 0,[P({kind:s.RegTupRef,register_tuples:[P(l,void 0,T.Read)]},void 0,void 0),P({kind:s.RegTupRef,register_tuples:[P(l,void 0,T.Read)]},void 0,void 0),P(f,void 0,void 0)],void 0),W[63]=x(63,"jmpi_<=",void 0,[P({kind:s.RegTupRef,register_tuples:[P(l,void 0,T.Read)]},void 0,void 0),P(l,void 0,void 0),P(f,void 0,void 0)],void 0),W[64]=x(64,"switch_jmp",void 0,[P({kind:s.RegTupRef,register_tuples:[P(l,void 0,T.Read)]},void 0,void 0),P(h,void 0,void 0)],void 0),W[65]=x(65,"switch_call",void 0,[P({kind:s.RegTupRef,register_tuples:[P(l,void 0,T.Read)]},void 0,void 0),P(h,void 0,void 0)],void 0),W[66]=x(66,"stack_push",void 0,[P({kind:s.RegTupRef,register_tuples:[P(a,void 0,T.Read)]},void 0,void 0)],void 0),W[67]=x(67,"stack_pop",void 0,[P({kind:s.RegTupRef,register_tuples:[P(a,void 0,T.Write)]},void 0,void 0)],void 0),W[68]=x(68,"stack_pushm","Pushes the values of an arbitrary amount of registers onto the stack.",[P(w,void 0,T.Read),P(l,void 0,void 0)],void 0),W[69]=x(69,"stack_popm","Pops an arbitrary amount of values from the stack and writes them to registers.",[P(w,void 0,T.Write),P(l,void 0,void 0)],void 0),W[70]=x(70,"unknown_46",void 0,[],void 0),W[71]=x(71,"unknown_47",void 0,[],void 0);const I=W[72]=x(72,"arg_pushr","Pushes the value of the given register onto the stack.",[P({kind:s.RegTupRef,register_tuples:[P(a,void 0,T.Read)]},void 0,void 0)],y.Push),j=W[73]=x(73,"arg_pushl","Pushes the given value onto the stack.",[P(l,void 0,void 0)],y.Push),L=W[74]=x(74,"arg_pushb","Pushes the given value onto the stack.",[P(u,void 0,void 0)],y.Push),D=W[75]=x(75,"arg_pushw","Pushes the given value onto the stack.",[P(_,void 0,void 0)],y.Push),z=(W[76]=x(76,"arg_pusha","Pushes the memory address of the given register onto the stack. Not used by Sega.",[P({kind:s.RegTupRef,register_tuples:[P(a,void 0,T.Read)]},void 0,void 0)],y.Push),W[77]=x(77,"arg_pusho","Pushes the memory address of the given label onto the stack. Not used by Sega.",[P(g,void 0,void 0)],y.Push),W[78]=x(78,"arg_pushs","Pushes the given value onto the stack.",[P(c,void 0,void 0)],y.Push)),$=(W[79]=x(79,"unknown_4f",void 0,[P({kind:s.RegTupRef,register_tuples:[P(a,void 0,T.Read)]},void 0,void 0),P({kind:s.RegTupRef,register_tuples:[P(a,void 0,T.Read)]},void 0,void 0)],void 0),W[80]=x(80,"message",void 0,[P(l,void 0,void 0),P(c,void 0,void 0)],y.Pop),W[81]=x(81,"list","Used to display a list of items and retrieve the item selected by the player.\nList items should be seperated by newlines. The selected item's index will be written to the given register.",[P({kind:s.RegTupRef,register_tuples:[P(u,void 0,T.Write)]},void 0,void 0),P(c,void 0,void 0)],y.Pop),W[82]=x(82,"fadein",void 0,[],void 0),W[83]=x(83,"fadeout",void 0,[],void 0),W[84]=x(84,"se",void 0,[P(l,void 0,void 0)],y.Pop),W[85]=x(85,"bgm",void 0,[P(l,void 0,void 0)],y.Pop),W[86]=x(86,"unknown_56",void 0,[],void 0),W[87]=x(87,"unknown_57",void 0,[],void 0),W[88]=x(88,"enable",void 0,[P(l,void 0,void 0)],y.Pop),W[89]=x(89,"disable",void 0,[P(l,void 0,void 0)],y.Pop),W[90]=x(90,"window_msg",void 0,[P(c,void 0,void 0)],y.Pop),W[91]=x(91,"add_msg",void 0,[P(c,void 0,void 0)],y.Pop),W[92]=x(92,"mesend",void 0,[],void 0),W[93]=x(93,"gettime",void 0,[P({kind:s.RegTupRef,register_tuples:[P(l,void 0,T.Write)]},void 0,void 0)],void 0),W[94]=x(94,"winend",void 0,[],void 0),W[95]=x(95,"unknown_5f",void 0,[],void 0),W[96]=x(96,"npc_crt_v3",void 0,[P({kind:s.RegTupRef,register_tuples:[P(a,void 0,T.Read)]},void 0,void 0)],void 0),W[97]=x(97,"npc_stop",void 0,[P(l,void 0,void 0)],y.Pop),W[98]=x(98,"npc_play",void 0,[P(l,void 0,void 0)],y.Pop),W[99]=x(99,"npc_kill",void 0,[P(l,void 0,void 0)],y.Pop),W[100]=x(100,"npc_nont",void 0,[],void 0),W[101]=x(101,"npc_talk",void 0,[],void 0),W[102]=x(102,"npc_crp_v3",void 0,[P({kind:s.RegTupRef,register_tuples:[P(a,void 0,T.Read),P(a,void 0,T.Read),P(a,void 0,T.Read),P(f,void 0,T.Read),P(a,void 0,T.Read),P(a,void 0,T.Read)]},void 0,void 0)],void 0),W[103]=x(103,"unknown_67",void 0,[],void 0),W[104]=x(104,"create_pipe",void 0,[P(l,void 0,void 0)],y.Pop),W[105]=x(105,"p_hpstat_v3",void 0,[P({kind:s.RegTupRef,register_tuples:[P(a,void 0,T.Read)]},void 0,void 0),P(l,void 0,void 0)],y.Pop),W[106]=x(106,"p_dead_v3",void 0,[P({kind:s.RegTupRef,register_tuples:[P(l,void 0,T.Write)]},void 0,void 0),P(l,"Player slot.",void 0)],y.Pop),W[107]=x(107,"p_disablewarp",void 0,[],void 0),W[108]=x(108,"p_enablewarp",void 0,[],void 0),W[109]=x(109,"p_move_v3",void 0,[P({kind:s.RegTupRef,register_tuples:[P(a,void 0,T.Read)]},void 0,void 0)],void 0),W[110]=x(110,"p_look",void 0,[P(l,void 0,void 0)],y.Pop),W[111]=x(111,"unknown_6f",void 0,[],void 0),W[112]=x(112,"p_action_disable",void 0,[],void 0),W[113]=x(113,"p_action_enable",void 0,[],void 0),W[114]=x(114,"disable_movement1",void 0,[P(l,void 0,void 0)],y.Pop),W[115]=x(115,"enable_movement1",void 0,[P(l,void 0,void 0)],y.Pop),W[116]=x(116,"p_noncol",void 0,[],void 0),W[117]=x(117,"p_col",void 0,[],void 0),W[118]=x(118,"p_setpos","Sets a player's position.",[P(l,"Player slot.",void 0),P({kind:s.RegTupRef,register_tuples:[P(l,"X coordinate.",T.Read),P(l,"Y coordinate.",T.Read),P(l,"Z coordinate.",T.Read),P(l,"Y-axis rotation.",T.Read)]},void 0,void 0)],y.Pop),W[119]=x(119,"p_return_guild",void 0,[],void 0),W[120]=x(120,"p_talk_guild",void 0,[P(l,void 0,void 0)],y.Pop),W[121]=x(121,"npc_talk_pl_v3",void 0,[P({kind:s.RegTupRef,register_tuples:[P(a,void 0,T.Read)]},void 0,void 0)],void 0),W[122]=x(122,"npc_talk_kill",void 0,[P(l,void 0,void 0)],y.Pop),W[123]=x(123,"npc_crtpk_v3",void 0,[P({kind:s.RegTupRef,register_tuples:[P(a,void 0,T.Read)]},void 0,void 0)],void 0),W[124]=x(124,"npc_crppk_v3",void 0,[P({kind:s.RegTupRef,register_tuples:[P(a,void 0,T.Read)]},void 0,void 0)],void 0),W[125]=x(125,"npc_crptalk_v3",void 0,[P({kind:s.RegTupRef,register_tuples:[P(a,void 0,T.Read)]},void 0,void 0)],void 0),W[126]=x(126,"p_look_at_v1",void 0,[P(l,void 0,void 0),P(l,void 0,void 0)],y.Pop),W[127]=x(127,"npc_crp_id_v3",void 0,[P({kind:s.RegTupRef,register_tuples:[P(a,void 0,T.Read)]},void 0,void 0)],void 0),W[128]=x(128,"cam_quake",void 0,[],void 0),W[129]=x(129,"cam_adj",void 0,[],void 0),W[130]=x(130,"cam_zmin",void 0,[],void 0),W[131]=x(131,"cam_zmout",void 0,[],void 0),W[132]=x(132,"cam_pan_v3",void 0,[P({kind:s.RegTupRef,register_tuples:[P(l,void 0,T.Read),P(l,void 0,T.Read),P(l,void 0,T.Read),P(l,void 0,T.Read),P(l,void 0,T.Read)]},void 0,void 0)],void 0),W[133]=x(133,"game_lev_super",void 0,[],void 0),W[134]=x(134,"game_lev_reset",void 0,[],void 0),W[135]=x(135,"pos_pipe_v3","Create a telepipe at a specific position for the given player slot that takes players back to Pioneer 2 or the Lab.",[P({kind:s.RegTupRef,register_tuples:[P(l,"X coordinate.",T.Read),P(l,"Y coordinate.",T.Read),P(l,"Z coordinate.",T.Read),P(l,"Player slot.",T.Read)]},void 0,void 0)],void 0),W[136]=x(136,"if_zone_clear",void 0,[P({kind:s.RegTupRef,register_tuples:[P(l,void 0,T.Write)]},void 0,void 0),P({kind:s.RegTupRef,register_tuples:[P(l,void 0,T.Read),P(l,void 0,T.Read)]},void 0,void 0)],void 0),W[137]=x(137,"chk_ene_num","Retrieves the amount of enemies killed during the quest.",[P({kind:s.RegTupRef,register_tuples:[P(l,void 0,T.Write)]},void 0,void 0)],void 0),W[138]=x(138,"unhide_obj",void 0,[P({kind:s.RegTupRef,register_tuples:[P(l,void 0,T.Read),P(l,void 0,T.Read),P(l,void 0,T.Read)]},void 0,void 0)],void 0),W[139]=x(139,"unhide_ene",void 0,[P({kind:s.RegTupRef,register_tuples:[P(l,void 0,T.Read),P(l,void 0,T.Read),P(l,void 0,T.Read),P(l,void 0,T.Read)]},void 0,void 0)],void 0),W[140]=x(140,"at_coords_call",void 0,[P({kind:s.RegTupRef,register_tuples:[P(l,void 0,T.Read),P(l,void 0,T.Read),P(l,void 0,T.Read),P(l,void 0,T.Read),P(f,void 0,T.Read)]},void 0,void 0)],void 0),W[141]=x(141,"at_coords_talk",void 0,[P({kind:s.RegTupRef,register_tuples:[P(l,void 0,T.Read),P(l,void 0,T.Read),P(l,void 0,T.Read),P(l,void 0,T.Read),P(f,void 0,T.Read)]},void 0,void 0)],void 0),W[142]=x(142,"col_npcin",void 0,[P({kind:s.RegTupRef,register_tuples:[P(l,void 0,T.Read),P(l,void 0,T.Read),P(l,void 0,T.Read),P(l,void 0,T.Read),P(f,void 0,T.Read)]},void 0,void 0)],void 0),W[143]=x(143,"col_npcinr",void 0,[P({kind:s.RegTupRef,register_tuples:[P(a,void 0,T.Read)]},void 0,void 0)],void 0),W[144]=x(144,"switch_on",void 0,[P(l,void 0,void 0)],y.Pop),W[145]=x(145,"switch_off",void 0,[P(l,void 0,void 0)],y.Pop),W[146]=x(146,"playbgm_epi",void 0,[P(l,void 0,void 0)],y.Pop),W[147]=x(147,"set_mainwarp",void 0,[P(l,void 0,void 0)],y.Pop),W[148]=x(148,"set_obj_param","Creates a targetable object.",[P({kind:s.RegTupRef,register_tuples:[P(l,"X coordinate.",T.Read),P(l,"Y coordinate.",T.Read),P(l,"Z coordinate.",T.Read),P(l,"Collision radius.",T.Read),P(f,"Function label.",T.Read),P(l,"Vertical position of the cursor.",T.Read)]},void 0,void 0),P({kind:s.RegTupRef,register_tuples:[P(a,void 0,T.Write)]},"Object handle.",void 0)],void 0),W[149]=x(149,"set_floor_handler",void 0,[P(l,"Floor number.",void 0),P(f,"Handler function label.",void 0)],y.Pop),W[150]=x(150,"clr_floor_handler",void 0,[P(l,"Floor number.",void 0)],y.Pop),W[151]=x(151,"col_plinaw",void 0,[P({kind:s.RegTupRef,register_tuples:[P(a,void 0,T.Read)]},void 0,void 0)],void 0),W[152]=x(152,"hud_hide",void 0,[],void 0),W[153]=x(153,"hud_show",void 0,[],void 0),W[154]=x(154,"cine_enable",void 0,[],void 0),W[155]=x(155,"cine_disable",void 0,[],void 0),W[156]=x(156,"unknown_9c",void 0,[],void 0),W[157]=x(157,"unknown_9d",void 0,[],void 0),W[158]=x(158,"unknown_9e",void 0,[],void 0),W[159]=x(159,"unknown_9f",void 0,[],void 0),W[160]=x(160,"unknown_a0",void 0,[],void 0),W[161]=x(161,"set_qt_failure",void 0,[P(f,void 0,void 0)],void 0),W[162]=x(162,"set_qt_success",void 0,[P(f,void 0,void 0)],void 0),W[163]=x(163,"clr_qt_failure",void 0,[],void 0),W[164]=x(164,"clr_qt_success",void 0,[],void 0),W[165]=x(165,"set_qt_cancel",void 0,[P(f,void 0,void 0)],void 0),W[166]=x(166,"clr_qt_cancel",void 0,[],void 0),W[167]=x(167,"unknown_a7",void 0,[],void 0),W[168]=x(168,"pl_walk_v3",void 0,[P({kind:s.RegTupRef,register_tuples:[P(a,void 0,T.Read)]},void 0,void 0)],void 0),W[169]=x(169,"unknown_a9",void 0,[],void 0),W[170]=x(170,"unknown_aa",void 0,[],void 0),W[171]=x(171,"unknown_ab",void 0,[],void 0),W[172]=x(172,"unknown_ac",void 0,[],void 0),W[173]=x(173,"unknown_ad",void 0,[],void 0),W[174]=x(174,"unknown_ae",void 0,[],void 0),W[175]=x(175,"unknown_af",void 0,[],void 0),W[176]=x(176,"pl_add_meseta",void 0,[P(l,void 0,void 0),P(l,void 0,void 0)],y.Pop),W[177]=x(177,"thread_stg",void 0,[P(f,void 0,void 0)],void 0),W[178]=x(178,"del_obj_param",void 0,[P({kind:s.RegTupRef,register_tuples:[P(a,void 0,T.Read)]},"Object handle.",void 0)],void 0),W[179]=x(179,"item_create",void 0,[P({kind:s.RegTupRef,register_tuples:[P(a,void 0,T.Read)]},void 0,void 0),P({kind:s.RegTupRef,register_tuples:[P(a,void 0,T.Read)]},void 0,void 0)],void 0),W[180]=x(180,"item_create2",void 0,[P({kind:s.RegTupRef,register_tuples:[P(a,void 0,T.Read)]},void 0,void 0),P({kind:s.RegTupRef,register_tuples:[P(a,void 0,T.Read)]},void 0,void 0)],void 0),W[181]=x(181,"item_delete",void 0,[P({kind:s.RegTupRef,register_tuples:[P(a,void 0,T.Read)]},void 0,void 0),P({kind:s.RegTupRef,register_tuples:[P(a,void 0,T.Read)]},void 0,void 0)],void 0),W[182]=x(182,"item_delete2","Deletes an item from the player's inventory.",[P({kind:s.RegTupRef,register_tuples:[P(l,void 0,T.Read),P(l,void 0,T.Read),P(l,void 0,T.Read)]},void 0,void 0),P({kind:s.RegTupRef,register_tuples:[P(a,void 0,T.Write)]},void 0,void 0)],void 0),W[183]=x(183,"item_check",void 0,[P({kind:s.RegTupRef,register_tuples:[P(a,void 0,T.Read)]},void 0,void 0),P({kind:s.RegTupRef,register_tuples:[P(a,void 0,T.Read)]},void 0,void 0)],void 0),W[184]=x(184,"setevt",void 0,[P(l,void 0,void 0)],y.Pop),W[185]=x(185,"get_difflvl","Sets the given register to the current difficulty. 0 For normal, 1 for hard and 2 for both very hard and ultimate.\nUse get_difficulty_level2 if you want to differentiate between very hard and ultimate.",[P({kind:s.RegTupRef,register_tuples:[P(l,void 0,T.Write)]},void 0,void 0)],void 0),W[186]=x(186,"set_qt_exit",void 0,[P(f,void 0,void 0)],void 0),W[187]=x(187,"clr_qt_exit",void 0,[],void 0),W[188]=x(188,"unknown_bc",void 0,[],void 0),W[189]=x(189,"unknown_bd",void 0,[],void 0),W[190]=x(190,"unknown_be",void 0,[],void 0),W[191]=x(191,"unknown_bf",void 0,[],void 0),W[192]=x(192,"particle_v3",void 0,[P({kind:s.RegTupRef,register_tuples:[P(a,void 0,T.Read)]},void 0,void 0)],void 0),W[193]=x(193,"npc_text",void 0,[P(l,void 0,void 0),P(c,void 0,void 0)],y.Pop),W[194]=x(194,"npc_chkwarp",void 0,[],void 0),W[195]=x(195,"pl_pkoff",void 0,[],void 0),W[196]=x(196,"map_designate",void 0,[P({kind:s.RegTupRef,register_tuples:[P(a,void 0,T.Read)]},void 0,void 0)],void 0),W[197]=x(197,"masterkey_on",void 0,[],void 0),W[198]=x(198,"masterkey_off",void 0,[],void 0),W[199]=x(199,"window_time",void 0,[],void 0),W[200]=x(200,"winend_time",void 0,[],void 0),W[201]=x(201,"winset_time",void 0,[P({kind:s.RegTupRef,register_tuples:[P(l,void 0,T.Write)]},void 0,void 0)],void 0),W[202]=x(202,"getmtime",void 0,[P({kind:s.RegTupRef,register_tuples:[P(a,void 0,T.Write)]},void 0,void 0)],void 0),W[203]=x(203,"set_quest_board_handler",void 0,[P(l,void 0,void 0),P(f,void 0,void 0),P(c,void 0,void 0)],y.Pop),W[204]=x(204,"clear_quest_board_handler",void 0,[P(l,void 0,void 0)],y.Pop),W[205]=x(205,"particle_id_v3",void 0,[P({kind:s.RegTupRef,register_tuples:[P(l,void 0,T.Read),P(l,void 0,T.Read),P(l,void 0,T.Read),P(l,void 0,T.Read)]},void 0,void 0)],void 0),W[206]=x(206,"npc_crptalk_id_v3",void 0,[P({kind:s.RegTupRef,register_tuples:[P(a,void 0,T.Read)]},void 0,void 0)],void 0),W[207]=x(207,"npc_lang_clean",void 0,[],void 0),W[208]=x(208,"pl_pkon",void 0,[],void 0),W[209]=x(209,"pl_chk_item2",void 0,[P({kind:s.RegTupRef,register_tuples:[P(a,void 0,T.Read)]},void 0,void 0),P({kind:s.RegTupRef,register_tuples:[P(a,void 0,T.Read)]},void 0,void 0)],void 0),W[210]=x(210,"enable_mainmenu",void 0,[],void 0),W[211]=x(211,"disable_mainmenu",void 0,[],void 0),W[212]=x(212,"start_battlebgm",void 0,[],void 0),W[213]=x(213,"end_battlebgm",void 0,[],void 0),W[214]=x(214,"disp_msg_qb",void 0,[P(c,void 0,void 0)],y.Pop),W[215]=x(215,"close_msg_qb",void 0,[],void 0),W[216]=x(216,"set_eventflag_v3",void 0,[P(l,void 0,void 0),P(l,void 0,void 0)],y.Pop),W[217]=x(217,"sync_leti",void 0,[P({kind:s.RegTupRef,register_tuples:[P(l,void 0,T.Write)]},void 0,void 0),P(l,void 0,void 0)],void 0),W[218]=x(218,"set_returnhunter",void 0,[],void 0),W[219]=x(219,"set_returncity",void 0,[],void 0),W[220]=x(220,"load_pvr",void 0,[],void 0),W[221]=x(221,"load_midi",void 0,[],void 0),W[222]=x(222,"unknown_de",void 0,[],void 0),W[223]=x(223,"npc_param_v3",void 0,[P({kind:s.RegTupRef,register_tuples:[P(a,void 0,T.Read)]},void 0,void 0),P(l,void 0,void 0)],y.Pop),W[224]=x(224,"pad_dragon",void 0,[],void 0),W[225]=x(225,"clear_mainwarp",void 0,[P(l,void 0,void 0)],y.Pop),W[226]=x(226,"pcam_param_v3",void 0,[P({kind:s.RegTupRef,register_tuples:[P(a,void 0,T.Read)]},void 0,void 0)],void 0),W[227]=x(227,"start_setevt_v3",void 0,[P({kind:s.RegTupRef,register_tuples:[P(a,void 0,T.Read)]},void 0,void 0),P(l,void 0,void 0)],y.Pop),W[228]=x(228,"warp_on",void 0,[],void 0),W[229]=x(229,"warp_off",void 0,[],void 0),W[230]=x(230,"get_slotnumber",void 0,[P({kind:s.RegTupRef,register_tuples:[P(l,void 0,T.Write)]},void 0,void 0)],void 0),W[231]=x(231,"get_servernumber",void 0,[P({kind:s.RegTupRef,register_tuples:[P(l,void 0,T.Write)]},void 0,void 0)],void 0),W[232]=x(232,"set_eventflag2",void 0,[P(l,void 0,void 0),P({kind:s.RegTupRef,register_tuples:[P(a,void 0,T.Read)]},void 0,void 0)],y.Pop),W[233]=x(233,"res",void 0,[P({kind:s.RegTupRef,register_tuples:[P(a,void 0,T.Read)]},void 0,void 0),P({kind:s.RegTupRef,register_tuples:[P(a,void 0,T.Read)]},void 0,void 0)],void 0),W[234]=x(234,"unknown_ea",void 0,[P({kind:s.RegTupRef,register_tuples:[P(a,void 0,T.Read)]},void 0,void 0),P(l,void 0,void 0)],void 0),W[235]=x(235,"enable_bgmctrl",void 0,[P(l,void 0,void 0)],y.Pop),W[236]=x(236,"sw_send",void 0,[P({kind:s.RegTupRef,register_tuples:[P(a,void 0,T.Read)]},void 0,void 0)],void 0),W[237]=x(237,"create_bgmctrl",void 0,[],void 0),W[238]=x(238,"pl_add_meseta2",void 0,[P(l,void 0,void 0)],y.Pop),W[239]=x(239,"sync_register",void 0,[P({kind:s.RegTupRef,register_tuples:[P(l,void 0,T.Write)]},void 0,void 0),P(l,void 0,void 0)],y.Pop),W[240]=x(240,"send_regwork",void 0,[],void 0),W[241]=x(241,"leti_fixed_camera_v3",void 0,[P({kind:s.RegTupRef,register_tuples:[P(l,void 0,T.Read),P(l,void 0,T.Read),P(l,void 0,T.Read),P(l,void 0,T.Read),P(l,void 0,T.Read),P(l,void 0,T.Read)]},void 0,void 0)],void 0),W[242]=x(242,"default_camera_pos1",void 0,[],void 0),W[243]=x(243,"unknown_f3",void 0,[],void 0),W[244]=x(244,"unknown_f4",void 0,[],void 0),W[245]=x(245,"unknown_f5",void 0,[],void 0),W[246]=x(246,"unknown_f6",void 0,[],void 0),W[247]=x(247,"unknown_f7",void 0,[],void 0),W[248]=x(248,"unknown_f8",void 0,[P({kind:s.RegTupRef,register_tuples:[P(a,void 0,T.Read)]},void 0,void 0)],void 0),W[249]=x(249,"unknown_f9",void 0,[],void 0),W[250]=x(250,"get_gc_number",void 0,[P({kind:s.RegTupRef,register_tuples:[P(a,void 0,T.Write)]},void 0,void 0)],void 0),W[251]=x(251,"unknown_fb",void 0,[P(_,void 0,void 0)],void 0),W[252]=x(252,"unknown_fc",void 0,[],void 0),W[253]=x(253,"unknown_fd",void 0,[],void 0),W[254]=x(254,"unknown_fe",void 0,[],void 0),W[255]=x(255,"unknown_ff",void 0,[],void 0),W[63488]=x(63488,"unknown_f800",void 0,[],void 0),W[63489]=x(63489,"set_chat_callback",void 0,[P({kind:s.RegTupRef,register_tuples:[P(a,void 0,T.Read)]},void 0,void 0),P(c,void 0,void 0)],y.Pop),W[63490]=x(63490,"unknown_f802",void 0,[],void 0),W[63491]=x(63491,"unknown_f803",void 0,[],void 0),W[63492]=x(63492,"unknown_f804",void 0,[],void 0),W[63493]=x(63493,"unknown_f805",void 0,[],void 0),W[63494]=x(63494,"unknown_f806",void 0,[],void 0),W[63495]=x(63495,"unknown_f807",void 0,[],void 0),W[63496]=x(63496,"get_difficulty_level2","Sets the given register to the current difficulty. 0 For normal, 1 for hard, 2 for very hard and 3 for ultimate.",[P({kind:s.RegTupRef,register_tuples:[P(l,void 0,T.Write)]},void 0,void 0)],void 0),W[63497]=x(63497,"get_number_of_player1","Set the given register to the current number of players. Either 1, 2, 3 or 4.",[P({kind:s.RegTupRef,register_tuples:[P(l,void 0,T.Write)]},void 0,void 0)],void 0),W[63498]=x(63498,"get_coord_of_player","Retrieves a player's position.",[P({kind:s.RegTupRef,register_tuples:[P(l,"X coordinate.",T.Write),P(l,"Y coordinate.",T.Write),P(l,"Z coordinate.",T.Write)]},void 0,void 0),P({kind:s.RegTupRef,register_tuples:[P(l,"Player slot.",T.Read)]},void 0,void 0)],void 0),W[63499]=x(63499,"enable_map",void 0,[],void 0),W[63500]=x(63500,"disable_map",void 0,[],void 0),W[63501]=x(63501,"map_designate_ex",void 0,[P({kind:s.RegTupRef,register_tuples:[P(l,void 0,T.Read),P(l,void 0,T.Read),P(l,void 0,T.Read),P(l,void 0,T.Read),P(l,void 0,T.Read)]},void 0,void 0)],void 0),W[63502]=x(63502,"unknown_f80e",void 0,[P(l,void 0,void 0)],y.Pop),W[63503]=x(63503,"unknown_f80f",void 0,[P(l,void 0,void 0)],y.Pop),W[63504]=x(63504,"ba_initial_floor",void 0,[P(l,void 0,void 0)],y.Pop),W[63505]=x(63505,"set_ba_rules",void 0,[],void 0),W[63506]=x(63506,"unknown_f812",void 0,[P(l,void 0,void 0)],y.Pop),W[63507]=x(63507,"unknown_f813",void 0,[P(l,void 0,void 0)],y.Pop),W[63508]=x(63508,"unknown_f814",void 0,[P(l,void 0,void 0)],y.Pop),W[63509]=x(63509,"unknown_f815",void 0,[P(l,void 0,void 0)],y.Pop),W[63510]=x(63510,"unknown_f816",void 0,[P(l,void 0,void 0)],y.Pop),W[63511]=x(63511,"unknown_f817",void 0,[P(l,void 0,void 0)],y.Pop),W[63512]=x(63512,"unknown_f818",void 0,[P(l,void 0,void 0)],y.Pop),W[63513]=x(63513,"unknown_f819",void 0,[P(l,void 0,void 0)],y.Pop),W[63514]=x(63514,"unknown_f81a",void 0,[P(l,void 0,void 0)],y.Pop),W[63515]=x(63515,"unknown_f81b",void 0,[P(l,void 0,void 0)],y.Pop),W[63516]=x(63516,"ba_disp_msg",void 0,[P(c,void 0,void 0)],y.Pop),W[63517]=x(63517,"death_lvl_up",void 0,[P(l,void 0,void 0)],y.Pop),W[63518]=x(63518,"death_tech_lvl_up",void 0,[P(l,void 0,void 0)],y.Pop),W[63519]=x(63519,"unknown_f81f",void 0,[],void 0),W[63520]=x(63520,"cmode_stage",void 0,[P(l,void 0,void 0)],y.Pop),W[63521]=x(63521,"unknown_f821",void 0,[],void 0),W[63522]=x(63522,"unknown_f822",void 0,[],void 0),W[63523]=x(63523,"unknown_f823",void 0,[P(l,void 0,void 0)],y.Pop),W[63524]=x(63524,"unknown_f824",void 0,[P(l,void 0,void 0)],y.Pop),W[63525]=x(63525,"exp_multiplication",void 0,[P({kind:s.RegTupRef,register_tuples:[P(a,void 0,T.Write)]},void 0,void 0)],void 0),W[63526]=x(63526,"exp_division",void 0,[P({kind:s.RegTupRef,register_tuples:[P(a,void 0,T.Write)]},void 0,void 0)],void 0),W[63527]=x(63527,"get_user_is_dead",void 0,[P({kind:s.RegTupRef,register_tuples:[P(a,void 0,T.Write)]},void 0,void 0)],void 0),W[63528]=x(63528,"go_floor","Sends a player to the given floor.",[P({kind:s.RegTupRef,register_tuples:[P(l,"Player slot.",T.Read)]},void 0,void 0),P({kind:s.RegTupRef,register_tuples:[P(l,"Floor ID.",T.Read)]},void 0,void 0)],void 0),W[63529]=x(63529,"unknown_f829",void 0,[],void 0),W[63530]=x(63530,"unknown_f82a",void 0,[],void 0),W[63531]=x(63531,"unlock_door2",void 0,[P(l,void 0,void 0),P(l,void 0,void 0)],y.Pop),W[63532]=x(63532,"lock_door2",void 0,[P(l,void 0,void 0),P(l,void 0,void 0)],y.Pop),W[63533]=x(63533,"if_switch_not_pressed",void 0,[P({kind:s.RegTupRef,register_tuples:[P(l,void 0,T.Read),P(l,void 0,T.Write)]},void 0,void 0)],void 0),W[63534]=x(63534,"if_switch_pressed",void 0,[P({kind:s.RegTupRef,register_tuples:[P(l,"Floor ID.",T.Read),P(l,"Switch ID.",T.Read),P(l,"Will be set to 1 if the switch is pressed, 0 otherwise.",T.Write)]},void 0,void 0)],void 0),W[63535]=x(63535,"unknown_f82f",void 0,[P(l,void 0,void 0),P(l,void 0,void 0)],y.Pop),W[63536]=x(63536,"control_dragon",void 0,[P({kind:s.RegTupRef,register_tuples:[P(l,void 0,T.Read)]},void 0,void 0)],void 0),W[63537]=x(63537,"release_dragon",void 0,[],void 0),W[63538]=x(63538,"unknown_f832",void 0,[],void 0),W[63539]=x(63539,"unknown_f833",void 0,[],void 0),W[63540]=x(63540,"unknown_f834",void 0,[],void 0),W[63541]=x(63541,"unknown_f835",void 0,[],void 0),W[63542]=x(63542,"unknown_f836",void 0,[],void 0),W[63543]=x(63543,"unknown_f837",void 0,[],void 0),W[63544]=x(63544,"shrink",void 0,[P({kind:s.RegTupRef,register_tuples:[P(l,"Player slot.",T.Read)]},void 0,void 0)],void 0),W[63545]=x(63545,"unshrink",void 0,[P({kind:s.RegTupRef,register_tuples:[P(l,"Player slot.",T.Read)]},void 0,void 0)],void 0),W[63546]=x(63546,"unknown_f83a",void 0,[],void 0),W[63547]=x(63547,"unknown_f83b",void 0,[],void 0),W[63548]=x(63548,"display_clock2",void 0,[P({kind:s.RegTupRef,register_tuples:[P(l,void 0,T.Read)]},void 0,void 0)],void 0),W[63549]=x(63549,"unknown_f83d",void 0,[P(l,void 0,void 0)],y.Pop),W[63550]=x(63550,"delete_area_title",void 0,[P(l,void 0,void 0)],y.Pop),W[63551]=x(63551,"unknown_f83f",void 0,[],void 0),W[63552]=x(63552,"load_npc_data",void 0,[],void 0),W[63553]=x(63553,"get_npc_data",void 0,[P(k,void 0,void 0)],void 0),W[63554]=x(63554,"unknown_f842",void 0,[],void 0),W[63555]=x(63555,"unknown_f843",void 0,[],void 0),W[63556]=x(63556,"unknown_f844",void 0,[],void 0),W[63557]=x(63557,"unknown_f845",void 0,[],void 0),W[63558]=x(63558,"unknown_f846",void 0,[],void 0),W[63559]=x(63559,"unknown_f847",void 0,[],void 0),W[63560]=x(63560,"give_damage_score",void 0,[P({kind:s.RegTupRef,register_tuples:[P(l,void 0,T.Write)]},void 0,void 0)],void 0),W[63561]=x(63561,"take_damage_score",void 0,[P({kind:s.RegTupRef,register_tuples:[P(l,void 0,T.Write)]},void 0,void 0)],void 0),W[63562]=x(63562,"unk_score_f84a",void 0,[P({kind:s.RegTupRef,register_tuples:[P(l,void 0,T.Write)]},void 0,void 0)],void 0),W[63563]=x(63563,"unk_score_f84b",void 0,[P({kind:s.RegTupRef,register_tuples:[P(l,void 0,T.Write)]},void 0,void 0)],void 0),W[63564]=x(63564,"kill_score",void 0,[P({kind:s.RegTupRef,register_tuples:[P(l,void 0,T.Write)]},void 0,void 0)],void 0),W[63565]=x(63565,"death_score",void 0,[P({kind:s.RegTupRef,register_tuples:[P(l,void 0,T.Write)]},void 0,void 0)],void 0),W[63566]=x(63566,"unk_score_f84e",void 0,[P({kind:s.RegTupRef,register_tuples:[P(l,void 0,T.Write)]},void 0,void 0)],void 0),W[63567]=x(63567,"enemy_death_score",void 0,[P({kind:s.RegTupRef,register_tuples:[P(l,void 0,T.Write)]},void 0,void 0)],void 0),W[63568]=x(63568,"meseta_score",void 0,[P({kind:s.RegTupRef,register_tuples:[P(l,void 0,T.Write)]},void 0,void 0)],void 0),W[63569]=x(63569,"unknown_f851",void 0,[P({kind:s.RegTupRef,register_tuples:[P(l,void 0,T.Write)]},void 0,void 0)],void 0),W[63570]=x(63570,"unknown_f852",void 0,[P(l,void 0,void 0)],y.Pop),W[63571]=x(63571,"reverse_warps",void 0,[],void 0),W[63572]=x(63572,"unreverse_warps",void 0,[],void 0),W[63573]=x(63573,"set_ult_map",void 0,[],void 0),W[63574]=x(63574,"unset_ult_map",void 0,[],void 0),W[63575]=x(63575,"set_area_title",void 0,[P(c,void 0,void 0)],y.Pop),W[63576]=x(63576,"unknown_f858",void 0,[],void 0),W[63577]=x(63577,"unknown_f859",void 0,[],void 0),W[63578]=x(63578,"equip_item",void 0,[P({kind:s.RegTupRef,register_tuples:[P(l,void 0,T.Read)]},void 0,void 0)],void 0),W[63579]=x(63579,"unequip_item",void 0,[P(l,void 0,void 0),P(l,void 0,void 0)],y.Pop),W[63580]=x(63580,"unknown_f85c",void 0,[],void 0),W[63581]=x(63581,"unknown_f85d",void 0,[],void 0),W[63582]=x(63582,"unknown_f85e",void 0,[P(l,void 0,void 0)],y.Pop),W[63583]=x(63583,"unknown_f85f",void 0,[P(l,void 0,void 0)],y.Pop),W[63584]=x(63584,"unknown_f860",void 0,[],void 0),W[63585]=x(63585,"unknown_f861",void 0,[P(l,void 0,void 0)],y.Pop),W[63586]=x(63586,"unknown_f862",void 0,[],void 0),W[63587]=x(63587,"unknown_f863",void 0,[],void 0),W[63588]=x(63588,"cmode_rank",void 0,[P(l,void 0,void 0),P(c,void 0,void 0)],y.Pop),W[63589]=x(63589,"award_item_name",void 0,[],void 0),W[63590]=x(63590,"award_item_select",void 0,[],void 0),W[63591]=x(63591,"award_item_give_to",void 0,[P({kind:s.RegTupRef,register_tuples:[P(l,void 0,T.Read)]},void 0,void 0)],void 0),W[63592]=x(63592,"unknown_f868",void 0,[P({kind:s.RegTupRef,register_tuples:[P(a,void 0,T.Write)]},void 0,void 0),P({kind:s.RegTupRef,register_tuples:[P(a,void 0,T.Write)]},void 0,void 0)],void 0),W[63593]=x(63593,"unknown_f869",void 0,[P({kind:s.RegTupRef,register_tuples:[P(a,void 0,T.Write)]},void 0,void 0),P({kind:s.RegTupRef,register_tuples:[P(a,void 0,T.Write)]},void 0,void 0)],void 0),W[63594]=x(63594,"item_create_cmode",void 0,[P({kind:s.RegTupRef,register_tuples:[P(a,void 0,T.Write)]},void 0,void 0),P({kind:s.RegTupRef,register_tuples:[P(a,void 0,T.Write)]},void 0,void 0)],void 0),W[63595]=x(63595,"unknown_f86b",void 0,[P({kind:s.RegTupRef,register_tuples:[P(a,void 0,T.Read)]},void 0,void 0)],void 0),W[63596]=x(63596,"award_item_ok",void 0,[P({kind:s.RegTupRef,register_tuples:[P(a,void 0,T.Write)]},void 0,void 0)],void 0),W[63597]=x(63597,"unknown_f86d",void 0,[],void 0),W[63598]=x(63598,"unknown_f86e",void 0,[],void 0),W[63599]=x(63599,"ba_set_lives",void 0,[P(l,void 0,void 0)],y.Pop),W[63600]=x(63600,"ba_set_tech_lvl",void 0,[P(l,void 0,void 0)],y.Pop),W[63601]=x(63601,"ba_set_lvl",void 0,[P(l,void 0,void 0)],y.Pop),W[63602]=x(63602,"ba_set_time_limit",void 0,[P(l,void 0,void 0)],y.Pop),W[63603]=x(63603,"boss_is_dead",void 0,[P({kind:s.RegTupRef,register_tuples:[P(a,void 0,T.Write)]},void 0,void 0)],void 0),W[63604]=x(63604,"unknown_f874",void 0,[],void 0),W[63605]=x(63605,"unknown_f875",void 0,[],void 0),W[63606]=x(63606,"unknown_f876",void 0,[],void 0),W[63607]=x(63607,"enable_techs","Enables technique use for the given player.",[P({kind:s.RegTupRef,register_tuples:[P(l,"Player slot.",T.Read)]},void 0,void 0)],void 0),W[63608]=x(63608,"disable_techs","Disables technique use for the given player.",[P({kind:s.RegTupRef,register_tuples:[P(l,"Player slot.",T.Read)]},void 0,void 0)],void 0),W[63609]=x(63609,"get_gender","Retrieves the player's gender. 0 If male, 1 if female.",[P({kind:s.RegTupRef,register_tuples:[P(l,"Player slot.",T.Read)]},void 0,void 0),P({kind:s.RegTupRef,register_tuples:[P(l,"Player gender.",T.Write)]},void 0,void 0)],void 0),W[63610]=x(63610,"get_chara_class","Retrieves the player's race and character class.",[P({kind:s.RegTupRef,register_tuples:[P(l,"Player slot.",T.Read)]},void 0,void 0),P({kind:s.RegTupRef,register_tuples:[P(l,"Player race. 0 If human, 1 if newman, 2 if cast.",T.Write),P(l,"Player class. 0 If hunter, 1 if ranger, 2 if force.",T.Write)]},void 0,void 0)],void 0),W[63611]=x(63611,"take_slot_meseta","Takes an amount of meseta from a player's inventory.",[P({kind:s.RegTupRef,register_tuples:[P(l,"Player slot.",T.Read),P(l,"Amount of meseta to take.",T.Read)]},void 0,void 0),P({kind:s.RegTupRef,register_tuples:[P(l,"Will be set to 1 if the meseta was taken, 0 otherwise.",T.Write)]},void 0,void 0)],void 0),W[63612]=x(63612,"unknown_f87c",void 0,[],void 0),W[63613]=x(63613,"unknown_f87d",void 0,[],void 0),W[63614]=x(63614,"unknown_f87e",void 0,[],void 0),W[63615]=x(63615,"read_guildcard_flag",void 0,[P({kind:s.RegTupRef,register_tuples:[P(a,void 0,T.Write)]},void 0,void 0),P({kind:s.RegTupRef,register_tuples:[P(a,void 0,T.Write)]},void 0,void 0)],void 0),W[63616]=x(63616,"unknown_f880",void 0,[P({kind:s.RegTupRef,register_tuples:[P(a,void 0,T.Write)]},void 0,void 0)],void 0),W[63617]=x(63617,"get_pl_name","Sets the value of <pl_name> to the given player's name.",[P({kind:s.RegTupRef,register_tuples:[P(l,"Player slot.",T.Read)]},void 0,void 0)],void 0),W[63618]=x(63618,"get_pl_job","Sets the value of <pl_job> to the given player's job (Hunter/Ranger/Force).",[P({kind:s.RegTupRef,register_tuples:[P(l,"Player slot.",T.Read)]},void 0,void 0)],void 0),W[63619]=x(63619,"unknown_f883",void 0,[P({kind:s.RegTupRef,register_tuples:[P(a,void 0,T.Write)]},void 0,void 0),P({kind:s.RegTupRef,register_tuples:[P(a,void 0,T.Write)]},void 0,void 0)],void 0),W[63620]=x(63620,"unknown_f884",void 0,[],void 0),W[63621]=x(63621,"unknown_f885",void 0,[],void 0),W[63622]=x(63622,"unknown_f886",void 0,[],void 0),W[63623]=x(63623,"unknown_f887",void 0,[],void 0),W[63624]=x(63624,"unknown_f888",void 0,[],void 0),W[63625]=x(63625,"unknown_f889",void 0,[],void 0),W[63626]=x(63626,"get_player_status",void 0,[P({kind:s.RegTupRef,register_tuples:[P(a,void 0,T.Write)]},void 0,void 0),P({kind:s.RegTupRef,register_tuples:[P(a,void 0,T.Write)]},void 0,void 0)],void 0),W[63627]=x(63627,"send_mail",void 0,[P({kind:s.RegTupRef,register_tuples:[P(a,void 0,T.Read)]},void 0,void 0),P(c,void 0,void 0)],y.Pop),W[63628]=x(63628,"online_check",void 0,[P({kind:s.RegTupRef,register_tuples:[P(a,void 0,T.Write)]},void 0,void 0)],void 0),W[63629]=x(63629,"chl_set_timerecord",void 0,[P({kind:s.RegTupRef,register_tuples:[P(a,void 0,T.Read)]},void 0,void 0)],void 0),W[63630]=x(63630,"chl_get_timerecord",void 0,[P({kind:s.RegTupRef,register_tuples:[P(a,void 0,T.Write)]},void 0,void 0)],void 0),W[63631]=x(63631,"unknown_f88f",void 0,[P({kind:s.RegTupRef,register_tuples:[P(a,void 0,T.Write)]},void 0,void 0)],void 0),W[63632]=x(63632,"unknown_f890",void 0,[],void 0),W[63633]=x(63633,"load_enemy_data",void 0,[P(l,void 0,void 0)],y.Pop),W[63634]=x(63634,"get_physical_data",void 0,[P(_,void 0,void 0)],void 0),W[63635]=x(63635,"get_attack_data",void 0,[P(_,void 0,void 0)],void 0),W[63636]=x(63636,"get_resist_data",void 0,[P(_,void 0,void 0)],void 0),W[63637]=x(63637,"get_movement_data",void 0,[P(_,void 0,void 0)],void 0),W[63638]=x(63638,"unknown_f896",void 0,[],void 0),W[63639]=x(63639,"unknown_f897",void 0,[],void 0),W[63640]=x(63640,"shift_left",void 0,[P({kind:s.RegTupRef,register_tuples:[P(l,void 0,T.Write)]},void 0,void 0),P({kind:s.RegTupRef,register_tuples:[P(l,void 0,T.Read)]},void 0,void 0)],void 0),W[63641]=x(63641,"shift_right",void 0,[P({kind:s.RegTupRef,register_tuples:[P(l,void 0,T.Write)]},void 0,void 0),P({kind:s.RegTupRef,register_tuples:[P(l,void 0,T.Read)]},void 0,void 0)],void 0),W[63642]=x(63642,"get_random",void 0,[P({kind:s.RegTupRef,register_tuples:[P(l,void 0,T.Read),P(l,void 0,T.Read)]},void 0,void 0),P({kind:s.RegTupRef,register_tuples:[P(l,void 0,T.Write)]},void 0,void 0)],void 0),W[63643]=x(63643,"reset_map","Sets all registers to 0 and resets the quest.",[],void 0),W[63644]=x(63644,"disp_chl_retry_menu",void 0,[P({kind:s.RegTupRef,register_tuples:[P(a,void 0,T.Write)]},void 0,void 0)],void 0),W[63645]=x(63645,"chl_reverser",void 0,[],void 0),W[63646]=x(63646,"unknown_f89e",void 0,[P(l,void 0,void 0)],y.Pop),W[63647]=x(63647,"unknown_f89f",void 0,[P({kind:s.RegTupRef,register_tuples:[P(a,void 0,T.Write)]},void 0,void 0)],void 0),W[63648]=x(63648,"unknown_f8a0",void 0,[],void 0),W[63649]=x(63649,"unknown_f8a1",void 0,[],void 0),W[63650]=x(63650,"unknown_f8a2",void 0,[],void 0),W[63651]=x(63651,"unknown_f8a3",void 0,[],void 0),W[63652]=x(63652,"unknown_f8a4",void 0,[],void 0),W[63653]=x(63653,"unknown_f8a5",void 0,[],void 0),W[63654]=x(63654,"unknown_f8a6",void 0,[],void 0),W[63655]=x(63655,"unknown_f8a7",void 0,[],void 0),W[63656]=x(63656,"unknown_f8a8",void 0,[P(l,void 0,void 0)],y.Pop),W[63657]=x(63657,"unknown_f8a9",void 0,[P({kind:s.RegTupRef,register_tuples:[P(a,void 0,T.Write)]},void 0,void 0)],void 0),W[63658]=x(63658,"unknown_f8aa",void 0,[],void 0),W[63659]=x(63659,"unknown_f8ab",void 0,[],void 0),W[63660]=x(63660,"unknown_f8ac",void 0,[],void 0),W[63661]=x(63661,"get_number_of_player2",void 0,[P({kind:s.RegTupRef,register_tuples:[P(a,void 0,T.Write)]},void 0,void 0)],void 0),W[63662]=x(63662,"unknown_f8ae",void 0,[],void 0),W[63663]=x(63663,"unknown_f8af",void 0,[],void 0),W[63664]=x(63664,"unknown_f8b0",void 0,[],void 0),W[63665]=x(63665,"unknown_f8b1",void 0,[],void 0),W[63666]=x(63666,"unknown_f8b2",void 0,[],void 0),W[63667]=x(63667,"unknown_f8b3",void 0,[],void 0),W[63668]=x(63668,"unknown_f8b4",void 0,[],void 0),W[63669]=x(63669,"unknown_f8b5",void 0,[],void 0),W[63670]=x(63670,"unknown_f8b6",void 0,[],void 0),W[63671]=x(63671,"unknown_f8b7",void 0,[],void 0),W[63672]=x(63672,"unknown_f8b8",void 0,[],void 0),W[63673]=x(63673,"chl_recovery",void 0,[],void 0),W[63674]=x(63674,"unknown_f8ba",void 0,[],void 0),W[63675]=x(63675,"unknown_f8bb",void 0,[],void 0),W[63676]=x(63676,"set_episode",void 0,[P(l,void 0,void 0)],void 0),W[63677]=x(63677,"unknown_f8bd",void 0,[],void 0),W[63678]=x(63678,"unknown_f8be",void 0,[],void 0),W[63679]=x(63679,"unknown_f8bf",void 0,[],void 0),W[63680]=x(63680,"file_dl_req",void 0,[P(l,void 0,void 0),P(c,void 0,void 0)],y.Pop),W[63681]=x(63681,"get_dl_status",void 0,[P({kind:s.RegTupRef,register_tuples:[P(a,void 0,T.Write)]},void 0,void 0)],void 0),W[63682]=x(63682,"gba_unknown4",void 0,[],void 0),W[63683]=x(63683,"get_gba_state",void 0,[P({kind:s.RegTupRef,register_tuples:[P(a,void 0,T.Write)]},void 0,void 0)],void 0),W[63684]=x(63684,"unknown_f8c4",void 0,[P({kind:s.RegTupRef,register_tuples:[P(a,void 0,T.Write)]},void 0,void 0)],void 0),W[63685]=x(63685,"unknown_f8c5",void 0,[P({kind:s.RegTupRef,register_tuples:[P(a,void 0,T.Write)]},void 0,void 0)],void 0),W[63686]=x(63686,"qexit",void 0,[],void 0),W[63687]=x(63687,"use_animation",void 0,[P({kind:s.RegTupRef,register_tuples:[P(l,"Player slot.",T.Read)]},void 0,void 0),P({kind:s.RegTupRef,register_tuples:[P(l,"Animation ID.",T.Read),P(l,"Animation duration in number of frames.",T.Read)]},void 0,void 0)],void 0),W[63688]=x(63688,"stop_animation",void 0,[P({kind:s.RegTupRef,register_tuples:[P(l,"Player slot.",T.Read)]},void 0,void 0)],void 0),W[63689]=x(63689,"run_to_coord",void 0,[P({kind:s.RegTupRef,register_tuples:[P(a,void 0,T.Read)]},void 0,void 0),P({kind:s.RegTupRef,register_tuples:[P(a,void 0,T.Read)]},void 0,void 0)],void 0),W[63690]=x(63690,"set_slot_invincible",void 0,[P({kind:s.RegTupRef,register_tuples:[P(l,"Player slot.",T.Read)]},void 0,void 0),P({kind:s.RegTupRef,register_tuples:[P(l,void 0,T.Read)]},void 0,void 0)],void 0),W[63691]=x(63691,"unknown_f8cb",void 0,[P({kind:s.RegTupRef,register_tuples:[P(a,void 0,T.Read)]},void 0,void 0)],void 0),W[63692]=x(63692,"set_slot_poison",void 0,[P({kind:s.RegTupRef,register_tuples:[P(l,"Player slot.",T.Read)]},void 0,void 0)],void 0),W[63693]=x(63693,"set_slot_paralyze",void 0,[P({kind:s.RegTupRef,register_tuples:[P(l,"Player slot.",T.Read)]},void 0,void 0)],void 0),W[63694]=x(63694,"set_slot_shock",void 0,[P({kind:s.RegTupRef,register_tuples:[P(l,"Player slot.",T.Read)]},void 0,void 0)],void 0),W[63695]=x(63695,"set_slot_freeze",void 0,[P({kind:s.RegTupRef,register_tuples:[P(l,"Player slot.",T.Read)]},void 0,void 0)],void 0),W[63696]=x(63696,"set_slot_slow",void 0,[P({kind:s.RegTupRef,register_tuples:[P(l,"Player slot.",T.Read)]},void 0,void 0)],void 0),W[63697]=x(63697,"set_slot_confuse",void 0,[P({kind:s.RegTupRef,register_tuples:[P(l,"Player slot.",T.Read)]},void 0,void 0)],void 0),W[63698]=x(63698,"set_slot_shifta",void 0,[P({kind:s.RegTupRef,register_tuples:[P(l,"Player slot.",T.Read)]},void 0,void 0)],void 0),W[63699]=x(63699,"set_slot_deband",void 0,[P({kind:s.RegTupRef,register_tuples:[P(l,"Player slot.",T.Read)]},void 0,void 0)],void 0),W[63700]=x(63700,"set_slot_jellen",void 0,[P({kind:s.RegTupRef,register_tuples:[P(l,"Player slot.",T.Read)]},void 0,void 0)],void 0),W[63701]=x(63701,"set_slot_zalure",void 0,[P({kind:s.RegTupRef,register_tuples:[P(l,"Player slot.",T.Read)]},void 0,void 0)],void 0),W[63702]=x(63702,"fleti_fixed_camera",void 0,[P({kind:s.RegTupRef,register_tuples:[P(a,void 0,T.Read)]},void 0,void 0)],y.Pop),W[63703]=x(63703,"fleti_locked_camera",void 0,[P(l,void 0,void 0),P({kind:s.RegTupRef,register_tuples:[P(a,void 0,T.Read)]},void 0,void 0)],y.Pop),W[63704]=x(63704,"default_camera_pos2",void 0,[],void 0),W[63705]=x(63705,"set_motion_blur",void 0,[],void 0),W[63706]=x(63706,"set_screen_bw",void 0,[],void 0),W[63707]=x(63707,"unknown_f8db",void 0,[P(l,void 0,void 0),P(l,void 0,void 0),P(l,void 0,void 0),P(l,void 0,void 0),P({kind:s.RegTupRef,register_tuples:[P(a,void 0,T.Read)]},void 0,void 0),P(_,void 0,void 0)],y.Pop),W[63708]=x(63708,"npc_action_string",void 0,[P({kind:s.RegTupRef,register_tuples:[P(l,void 0,T.Read)]},void 0,void 0),P({kind:s.RegTupRef,register_tuples:[P(l,void 0,T.Read)]},void 0,void 0),P(R,void 0,void 0)],void 0),W[63709]=x(63709,"get_pad_cond",void 0,[P({kind:s.RegTupRef,register_tuples:[P(a,void 0,T.Write)]},void 0,void 0),P({kind:s.RegTupRef,register_tuples:[P(a,void 0,T.Write)]},void 0,void 0)],void 0),W[63710]=x(63710,"get_button_cond",void 0,[P({kind:s.RegTupRef,register_tuples:[P(a,void 0,T.Write)]},void 0,void 0),P({kind:s.RegTupRef,register_tuples:[P(a,void 0,T.Write)]},void 0,void 0)],void 0),W[63711]=x(63711,"freeze_enemies",void 0,[],void 0),W[63712]=x(63712,"unfreeze_enemies",void 0,[],void 0),W[63713]=x(63713,"freeze_everything",void 0,[],void 0),W[63714]=x(63714,"unfreeze_everything",void 0,[],void 0),W[63715]=x(63715,"restore_hp",void 0,[P({kind:s.RegTupRef,register_tuples:[P(a,void 0,T.Read)]},void 0,void 0)],void 0),W[63716]=x(63716,"restore_tp",void 0,[P({kind:s.RegTupRef,register_tuples:[P(a,void 0,T.Read)]},void 0,void 0)],void 0),W[63717]=x(63717,"close_chat_bubble",void 0,[P({kind:s.RegTupRef,register_tuples:[P(a,void 0,T.Read)]},void 0,void 0)],void 0),W[63718]=x(63718,"move_coords_object",void 0,[P({kind:s.RegTupRef,register_tuples:[P(a,void 0,T.Read)]},void 0,void 0),P({kind:s.RegTupRef,register_tuples:[P(a,void 0,T.Read)]},void 0,void 0)],void 0),W[63719]=x(63719,"at_coords_call_ex",void 0,[P({kind:s.RegTupRef,register_tuples:[P(a,void 0,T.Read)]},void 0,void 0),P({kind:s.RegTupRef,register_tuples:[P(a,void 0,T.Read)]},void 0,void 0)],void 0),W[63720]=x(63720,"unknown_f8e8",void 0,[P({kind:s.RegTupRef,register_tuples:[P(a,void 0,T.Read)]},void 0,void 0),P({kind:s.RegTupRef,register_tuples:[P(a,void 0,T.Read)]},void 0,void 0)],void 0),W[63721]=x(63721,"unknown_f8e9",void 0,[P({kind:s.RegTupRef,register_tuples:[P(a,void 0,T.Read)]},void 0,void 0),P({kind:s.RegTupRef,register_tuples:[P(a,void 0,T.Read)]},void 0,void 0)],void 0),W[63722]=x(63722,"unknown_f8ea",void 0,[P({kind:s.RegTupRef,register_tuples:[P(a,void 0,T.Read)]},void 0,void 0),P({kind:s.RegTupRef,register_tuples:[P(a,void 0,T.Read)]},void 0,void 0)],void 0),W[63723]=x(63723,"unknown_f8eb",void 0,[P({kind:s.RegTupRef,register_tuples:[P(a,void 0,T.Read)]},void 0,void 0),P({kind:s.RegTupRef,register_tuples:[P(a,void 0,T.Read)]},void 0,void 0)],void 0),W[63724]=x(63724,"unknown_f8ec",void 0,[P({kind:s.RegTupRef,register_tuples:[P(a,void 0,T.Read)]},void 0,void 0),P({kind:s.RegTupRef,register_tuples:[P(a,void 0,T.Read)]},void 0,void 0)],void 0),W[63725]=x(63725,"animation_check",void 0,[P({kind:s.RegTupRef,register_tuples:[P(a,void 0,T.Read)]},void 0,void 0),P({kind:s.RegTupRef,register_tuples:[P(a,void 0,T.Read)]},void 0,void 0)],void 0),W[63726]=x(63726,"call_image_data",void 0,[P(l,void 0,void 0),P(_,void 0,void 0)],y.Pop),W[63727]=x(63727,"unknown_f8ef",void 0,[],void 0),W[63728]=x(63728,"turn_off_bgm_p2",void 0,[],void 0),W[63729]=x(63729,"turn_on_bgm_p2",void 0,[],void 0),W[63730]=x(63730,"load_unk_data",void 0,[P(l,void 0,void 0),P(l,void 0,void 0),P(l,void 0,void 0),P(l,void 0,void 0),P({kind:s.RegTupRef,register_tuples:[P(a,void 0,T.Read)]},void 0,void 0),P(k,void 0,void 0)],y.Pop),W[63731]=x(63731,"particle2",void 0,[P({kind:s.RegTupRef,register_tuples:[P(a,void 0,T.Read)]},void 0,void 0),P(l,void 0,void 0),P(p,void 0,void 0)],y.Pop),W[63732]=x(63732,"unknown_f8f4",void 0,[],void 0),W[63733]=x(63733,"unknown_f8f5",void 0,[],void 0),W[63734]=x(63734,"unknown_f8f6",void 0,[],void 0),W[63735]=x(63735,"unknown_f8f7",void 0,[],void 0),W[63736]=x(63736,"unknown_f8f8",void 0,[],void 0),W[63737]=x(63737,"unknown_f8f9",void 0,[],void 0),W[63738]=x(63738,"unknown_f8fa",void 0,[],void 0),W[63739]=x(63739,"unknown_f8fb",void 0,[],void 0),W[63740]=x(63740,"unknown_f8fc",void 0,[],void 0),W[63741]=x(63741,"unknown_f8fd",void 0,[],void 0),W[63742]=x(63742,"unknown_f8fe",void 0,[],void 0),W[63743]=x(63743,"unknown_f8ff",void 0,[],void 0),W[63744]=x(63744,"unknown_f900",void 0,[],void 0),W[63745]=x(63745,"dec2float",void 0,[P({kind:s.RegTupRef,register_tuples:[P(p,void 0,T.Write)]},void 0,void 0),P({kind:s.RegTupRef,register_tuples:[P(l,void 0,T.Read)]},void 0,void 0)],void 0),W[63746]=x(63746,"float2dec",void 0,[P({kind:s.RegTupRef,register_tuples:[P(l,void 0,T.Write)]},void 0,void 0),P({kind:s.RegTupRef,register_tuples:[P(p,void 0,T.Read)]},void 0,void 0)],void 0),W[63747]=x(63747,"flet",void 0,[P({kind:s.RegTupRef,register_tuples:[P(p,void 0,T.Write)]},void 0,void 0),P({kind:s.RegTupRef,register_tuples:[P(p,void 0,T.Read)]},void 0,void 0)],void 0),W[63748]=x(63748,"fleti",void 0,[P({kind:s.RegTupRef,register_tuples:[P(p,void 0,T.Write)]},void 0,void 0),P(p,void 0,void 0)],void 0),W[63749]=x(63749,"unknown_f905",void 0,[],void 0),W[63750]=x(63750,"unknown_f906",void 0,[],void 0),W[63751]=x(63751,"unknown_f907",void 0,[],void 0),W[63752]=x(63752,"fadd",void 0,[P({kind:s.RegTupRef,register_tuples:[P(p,void 0,T.Write)]},void 0,void 0),P({kind:s.RegTupRef,register_tuples:[P(p,void 0,T.Read)]},void 0,void 0)],void 0),W[63753]=x(63753,"faddi",void 0,[P({kind:s.RegTupRef,register_tuples:[P(p,void 0,T.Write)]},void 0,void 0),P(p,void 0,void 0)],void 0),W[63754]=x(63754,"fsub",void 0,[P({kind:s.RegTupRef,register_tuples:[P(p,void 0,T.Write)]},void 0,void 0),P({kind:s.RegTupRef,register_tuples:[P(p,void 0,T.Read)]},void 0,void 0)],void 0),W[63755]=x(63755,"fsubi",void 0,[P({kind:s.RegTupRef,register_tuples:[P(p,void 0,T.Write)]},void 0,void 0),P(p,void 0,void 0)],void 0),W[63756]=x(63756,"fmul",void 0,[P({kind:s.RegTupRef,register_tuples:[P(p,void 0,T.Write)]},void 0,void 0),P({kind:s.RegTupRef,register_tuples:[P(p,void 0,T.Read)]},void 0,void 0)],void 0),W[63757]=x(63757,"fmuli",void 0,[P({kind:s.RegTupRef,register_tuples:[P(p,void 0,T.Write)]},void 0,void 0),P(p,void 0,void 0)],void 0),W[63758]=x(63758,"fdiv",void 0,[P({kind:s.RegTupRef,register_tuples:[P(p,void 0,T.Write)]},void 0,void 0),P({kind:s.RegTupRef,register_tuples:[P(p,void 0,T.Read)]},void 0,void 0)],void 0),W[63759]=x(63759,"fdivi",void 0,[P({kind:s.RegTupRef,register_tuples:[P(p,void 0,T.Write)]},void 0,void 0),P(p,void 0,void 0)],void 0),W[63760]=x(63760,"get_unknown_count",void 0,[P(l,void 0,void 0),P({kind:s.RegTupRef,register_tuples:[P(l,void 0,T.Write)]},void 0,void 0)],y.Pop),W[63761]=x(63761,"get_stackable_item_count",void 0,[P({kind:s.RegTupRef,register_tuples:[P(l,"Player slot.",T.Read),P(l,void 0,T.Read),P(l,void 0,T.Read),P(l,void 0,T.Read)]},void 0,void 0),P({kind:s.RegTupRef,register_tuples:[P(l,void 0,T.Write)]},void 0,void 0)],void 0),W[63762]=x(63762,"freeze_and_hide_equip",void 0,[],void 0),W[63763]=x(63763,"thaw_and_show_equip",void 0,[],void 0),W[63764]=x(63764,"set_palettex_callback",void 0,[P(l,"Player slot.",void 0),P(f,void 0,void 0)],y.Pop),W[63765]=x(63765,"activate_palettex",void 0,[P(l,"Player slot.",void 0)],y.Pop),W[63766]=x(63766,"enable_palettex",void 0,[P(l,"Player slot.",void 0)],y.Pop),W[63767]=x(63767,"restore_palettex",void 0,[P(l,"Player slot.",void 0)],y.Pop),W[63768]=x(63768,"disable_palettex",void 0,[P(l,"Player slot.",void 0)],y.Pop),W[63769]=x(63769,"get_palettex_activated",void 0,[P(l,"Player slot.",void 0),P({kind:s.RegTupRef,register_tuples:[P(l,void 0,T.Write)]},void 0,void 0)],y.Pop),W[63770]=x(63770,"get_unknown_palettex_status",void 0,[P(l,void 0,void 0),P({kind:s.RegTupRef,register_tuples:[P(l,void 0,T.Write)]},void 0,void 0)],y.Pop),W[63771]=x(63771,"disable_movement2",void 0,[P(l,"Player slot.",void 0)],y.Pop),W[63772]=x(63772,"enable_movement2",void 0,[P(l,"Player slot.",void 0)],y.Pop),W[63773]=x(63773,"get_time_played",void 0,[P({kind:s.RegTupRef,register_tuples:[P(l,void 0,T.Write)]},void 0,void 0)],void 0),W[63774]=x(63774,"get_guildcard_total",void 0,[P({kind:s.RegTupRef,register_tuples:[P(l,void 0,T.Write)]},void 0,void 0)],void 0),W[63775]=x(63775,"get_slot_meseta",void 0,[P({kind:s.RegTupRef,register_tuples:[P(l,void 0,T.Write)]},void 0,void 0)],void 0),W[63776]=x(63776,"get_player_level",void 0,[P(l,"Player slot.",void 0),P({kind:s.RegTupRef,register_tuples:[P(l,void 0,T.Write)]},void 0,void 0)],y.Pop),W[63777]=x(63777,"get_section_id",void 0,[P(l,"Player slot.",void 0),P({kind:s.RegTupRef,register_tuples:[P(l,void 0,T.Write)]},void 0,void 0)],y.Pop),W[63778]=x(63778,"get_player_hp",void 0,[P(l,"Player slot.",void 0),P({kind:s.RegTupRef,register_tuples:[P(l,"Maximum HP.",T.Write),P(l,"Current HP.",T.Write),P(l,"Maximum TP.",T.Write),P(l,"Current TP.",T.Write)]},void 0,void 0)],y.Pop),W[63779]=x(63779,"get_floor_number",void 0,[P(l,"Player slot.",void 0),P({kind:s.RegTupRef,register_tuples:[P(l,void 0,T.Write)]},void 0,void 0)],y.Pop),W[63780]=x(63780,"get_coord_player_detect",void 0,[P({kind:s.RegTupRef,register_tuples:[P(a,"Player slot.",T.Read)]},void 0,void 0),P({kind:s.RegTupRef,register_tuples:[P(a,void 0,T.Read)]},void 0,void 0)],void 0),W[63781]=x(63781,"read_global_flag",void 0,[P(l,void 0,void 0),P({kind:s.RegTupRef,register_tuples:[P(l,void 0,T.Write)]},void 0,void 0)],y.Pop),W[63782]=x(63782,"write_global_flag",void 0,[P(l,void 0,void 0),P(l,void 0,void 0)],y.Pop),W[63783]=x(63783,"unknown_f927",void 0,[P({kind:s.RegTupRef,register_tuples:[P(a,void 0,T.Write)]},void 0,void 0),P({kind:s.RegTupRef,register_tuples:[P(a,void 0,T.Write)]},void 0,void 0)],void 0),W[63784]=x(63784,"floor_player_detect",void 0,[P({kind:s.RegTupRef,register_tuples:[P(l,void 0,T.Write),P(l,void 0,T.Write),P(l,void 0,T.Write),P(l,void 0,T.Write)]},void 0,void 0)],void 0),W[63785]=x(63785,"read_disk_file",void 0,[P(c,void 0,void 0)],y.Pop),W[63786]=x(63786,"open_pack_select",void 0,[],void 0),W[63787]=x(63787,"item_select",void 0,[P({kind:s.RegTupRef,register_tuples:[P(a,void 0,T.Write)]},void 0,void 0)],void 0),W[63788]=x(63788,"get_item_id",void 0,[P({kind:s.RegTupRef,register_tuples:[P(a,void 0,T.Write)]},void 0,void 0)],void 0),W[63789]=x(63789,"color_change",void 0,[P(l,void 0,void 0),P(l,void 0,void 0),P(l,void 0,void 0),P(l,void 0,void 0),P(l,void 0,void 0)],y.Pop),W[63790]=x(63790,"send_statistic",void 0,[P(l,void 0,void 0),P(l,void 0,void 0),P(l,void 0,void 0),P(l,void 0,void 0),P(l,void 0,void 0),P(l,void 0,void 0),P(l,void 0,void 0),P(l,void 0,void 0)],y.Pop),W[63791]=x(63791,"unknown_f92f",void 0,[P(l,void 0,void 0),P(l,void 0,void 0)],y.Pop),W[63792]=x(63792,"chat_box",void 0,[P(l,void 0,void 0),P(l,void 0,void 0),P(l,void 0,void 0),P(l,void 0,void 0),P(l,void 0,void 0),P(c,void 0,void 0)],y.Pop),W[63793]=x(63793,"chat_bubble",void 0,[P(l,void 0,void 0),P(c,void 0,void 0)],y.Pop),W[63794]=x(63794,"unknown_f932",void 0,[],void 0),W[63795]=x(63795,"unknown_f933",void 0,[P({kind:s.RegTupRef,register_tuples:[P(a,void 0,T.Write)]},void 0,void 0)],void 0),W[63796]=x(63796,"scroll_text",void 0,[P(l,void 0,void 0),P(l,void 0,void 0),P(l,void 0,void 0),P(l,void 0,void 0),P(l,void 0,void 0),P(p,void 0,void 0),P({kind:s.RegTupRef,register_tuples:[P(l,void 0,T.Write)]},void 0,void 0),P(c,void 0,void 0)],y.Pop),W[63797]=x(63797,"gba_unknown1",void 0,[],void 0),W[63798]=x(63798,"gba_unknown2",void 0,[],void 0),W[63799]=x(63799,"gba_unknown3",void 0,[],void 0),W[63800]=x(63800,"add_damage_to",void 0,[P(l,void 0,void 0),P(l,void 0,void 0)],y.Pop),W[63801]=x(63801,"item_delete3",void 0,[P(l,void 0,void 0)],y.Pop),W[63802]=x(63802,"get_item_info",void 0,[P(l,void 0,void 0),P({kind:s.RegTupRef,register_tuples:[P(a,void 0,T.Write)]},void 0,void 0)],y.Pop),W[63803]=x(63803,"item_packing1",void 0,[P(l,void 0,void 0)],y.Pop),W[63804]=x(63804,"item_packing2",void 0,[P(l,void 0,void 0),P(l,void 0,void 0)],y.Pop),W[63805]=x(63805,"get_lang_setting",void 0,[P({kind:s.RegTupRef,register_tuples:[P(a,void 0,T.Write)]},void 0,void 0)],y.Pop),W[63806]=x(63806,"prepare_statistic",void 0,[P(l,void 0,void 0),P(f,void 0,void 0),P(f,void 0,void 0)],y.Pop),W[63807]=x(63807,"keyword_detect",void 0,[],void 0),W[63808]=x(63808,"keyword",void 0,[P({kind:s.RegTupRef,register_tuples:[P(l,void 0,T.Write)]},void 0,void 0),P(l,"Player slot.",void 0),P(c,void 0,void 0)],y.Pop),W[63809]=x(63809,"get_guildcard_num",void 0,[P(l,"Player slot.",void 0),P({kind:s.RegTupRef,register_tuples:[P(l,void 0,T.Write)]},void 0,void 0)],y.Pop),W[63810]=x(63810,"unknown_f942",void 0,[],void 0),W[63811]=x(63811,"unknown_f943",void 0,[],void 0),W[63812]=x(63812,"get_wrap_status",void 0,[P(l,"Player slot.",void 0),P({kind:s.RegTupRef,register_tuples:[P(l,void 0,T.Write)]},void 0,void 0)],y.Pop),W[63813]=x(63813,"initial_floor",void 0,[P(l,void 0,void 0)],y.Pop),W[63814]=x(63814,"sin",void 0,[P({kind:s.RegTupRef,register_tuples:[P(l,void 0,T.Write)]},void 0,void 0),P(l,void 0,void 0)],y.Pop),W[63815]=x(63815,"cos",void 0,[P({kind:s.RegTupRef,register_tuples:[P(l,void 0,T.Write)]},void 0,void 0),P(l,void 0,void 0)],y.Pop),W[63816]=x(63816,"unknown_f948",void 0,[],void 0),W[63817]=x(63817,"unknown_f949",void 0,[],void 0),W[63818]=x(63818,"boss_is_dead2",void 0,[P({kind:s.RegTupRef,register_tuples:[P(l,void 0,T.Write)]},void 0,void 0)],void 0),W[63819]=x(63819,"unknown_f94b",void 0,[P({kind:s.RegTupRef,register_tuples:[P(l,void 0,T.Write)]},void 0,void 0)],void 0),W[63820]=x(63820,"unknown_f94c",void 0,[P({kind:s.RegTupRef,register_tuples:[P(l,void 0,T.Write)]},void 0,void 0)],void 0),W[63821]=x(63821,"is_there_cardbattle",void 0,[P({kind:s.RegTupRef,register_tuples:[P(l,void 0,T.Write)]},void 0,void 0)],void 0),W[63822]=x(63822,"unknown_f94e",void 0,[],void 0),W[63823]=x(63823,"unknown_f94f",void 0,[],void 0),W[63824]=x(63824,"bb_p2_menu",void 0,[P(l,void 0,void 0)],y.Pop),W[63825]=x(63825,"bb_map_designate",void 0,[P(u,void 0,void 0),P(_,void 0,void 0),P(u,void 0,void 0),P(u,void 0,void 0)],void 0));W[63826]=x(63826,"bb_get_number_in_pack",void 0,[P({kind:s.RegTupRef,register_tuples:[P(l,void 0,T.Write)]},void 0,void 0)],void 0),W[63827]=x(63827,"bb_swap_item",void 0,[P(l,void 0,void 0),P(l,void 0,void 0),P(l,void 0,void 0),P(l,void 0,void 0),P(l,void 0,void 0),P(l,void 0,void 0),P(f,void 0,void 0),P(f,void 0,void 0)],y.Pop),W[63828]=x(63828,"bb_check_wrap",void 0,[P(l,void 0,void 0),P({kind:s.RegTupRef,register_tuples:[P(l,void 0,T.Write)]},void 0,void 0)],y.Pop),W[63829]=x(63829,"bb_exchange_pd_item",void 0,[P(l,void 0,void 0),P(l,void 0,void 0),P(l,void 0,void 0),P(f,void 0,void 0),P(f,void 0,void 0)],y.Pop),W[63830]=x(63830,"bb_exchange_pd_srank",void 0,[P(l,void 0,void 0),P(l,void 0,void 0),P(l,void 0,void 0),P(l,void 0,void 0),P(l,void 0,void 0),P(f,void 0,void 0),P(f,void 0,void 0)],y.Pop),W[63831]=x(63831,"bb_exchange_pd_special",void 0,[P(l,void 0,void 0),P(l,void 0,void 0),P(l,void 0,void 0),P(l,void 0,void 0),P(l,void 0,void 0),P(l,void 0,void 0),P(f,void 0,void 0),P(f,void 0,void 0)],y.Pop),W[63832]=x(63832,"bb_exchange_pd_percent",void 0,[P(l,void 0,void 0),P(l,void 0,void 0),P(l,void 0,void 0),P(l,void 0,void 0),P(l,void 0,void 0),P(l,void 0,void 0),P(f,void 0,void 0),P(f,void 0,void 0)],y.Pop),W[63833]=x(63833,"unknown_f959",void 0,[P(l,void 0,void 0)],y.Pop),W[63834]=x(63834,"unknown_f95a",void 0,[],void 0),W[63835]=x(63835,"unknown_f95b",void 0,[],void 0),W[63836]=x(63836,"bb_exchange_slt",void 0,[P(l,void 0,void 0),P({kind:s.RegTupRef,register_tuples:[P(l,void 0,T.Write)]},void 0,void 0),P(f,void 0,void 0),P(f,void 0,void 0)],y.Pop),W[63837]=x(63837,"bb_exchange_pc",void 0,[],void 0),W[63838]=x(63838,"bb_box_create_bp",void 0,[P(l,void 0,void 0),P(p,void 0,void 0),P(p,void 0,void 0)],y.Pop),W[63839]=x(63839,"bb_exchange_pt",void 0,[P({kind:s.RegTupRef,register_tuples:[P(l,void 0,T.Write)]},void 0,void 0),P({kind:s.RegTupRef,register_tuples:[P(l,void 0,T.Write)]},void 0,void 0),P(l,void 0,void 0),P(f,void 0,void 0),P(f,void 0,void 0)],y.Pop),W[63840]=x(63840,"unknown_f960",void 0,[P(l,void 0,void 0)],y.Pop),W[63841]=x(63841,"unknown_f961",void 0,[],void 0),W[63842]=x(63842,"unknown_f962",void 0,[],void 0),W[63843]=x(63843,"unknown_f963",void 0,[],void 0),W[63844]=x(63844,"unknown_f964",void 0,[],void 0),W[63845]=x(63845,"unknown_f965",void 0,[],void 0),W[63846]=x(63846,"unknown_f966",void 0,[],void 0),W[63847]=x(63847,"unknown_f967",void 0,[],void 0),W[63848]=x(63848,"unknown_f968",void 0,[],void 0),W[63849]=x(63849,"unknown_f969",void 0,[],void 0),W[63850]=x(63850,"unknown_f96a",void 0,[],void 0),W[63851]=x(63851,"unknown_f96b",void 0,[],void 0),W[63852]=x(63852,"unknown_f96c",void 0,[],void 0),W[63853]=x(63853,"unknown_f96d",void 0,[],void 0),W[63854]=x(63854,"unknown_f96e",void 0,[],void 0),W[63855]=x(63855,"unknown_f96f",void 0,[],void 0),W[63856]=x(63856,"unknown_f970",void 0,[],void 0),W[63857]=x(63857,"unknown_f971",void 0,[],void 0),W[63858]=x(63858,"unknown_f972",void 0,[],void 0),W[63859]=x(63859,"unknown_f973",void 0,[],void 0),W[63860]=x(63860,"unknown_f974",void 0,[],void 0),W[63861]=x(63861,"unknown_f975",void 0,[],void 0),W[63862]=x(63862,"unknown_f976",void 0,[],void 0),W[63863]=x(63863,"unknown_f977",void 0,[],void 0),W[63864]=x(63864,"unknown_f978",void 0,[],void 0),W[63865]=x(63865,"unknown_f979",void 0,[],void 0),W[63866]=x(63866,"unknown_f97a",void 0,[],void 0),W[63867]=x(63867,"unknown_f97b",void 0,[],void 0),W[63868]=x(63868,"unknown_f97c",void 0,[],void 0),W[63869]=x(63869,"unknown_f97d",void 0,[],void 0),W[63870]=x(63870,"unknown_f97e",void 0,[],void 0),W[63871]=x(63871,"unknown_f97f",void 0,[],void 0),W[63872]=x(63872,"unknown_f980",void 0,[],void 0),W[63873]=x(63873,"unknown_f981",void 0,[],void 0),W[63874]=x(63874,"unknown_f982",void 0,[],void 0),W[63875]=x(63875,"unknown_f983",void 0,[],void 0),W[63876]=x(63876,"unknown_f984",void 0,[],void 0),W[63877]=x(63877,"unknown_f985",void 0,[],void 0),W[63878]=x(63878,"unknown_f986",void 0,[],void 0),W[63879]=x(63879,"unknown_f987",void 0,[],void 0),W[63880]=x(63880,"unknown_f988",void 0,[],void 0),W[63881]=x(63881,"unknown_f989",void 0,[],void 0),W[63882]=x(63882,"unknown_f98a",void 0,[],void 0),W[63883]=x(63883,"unknown_f98b",void 0,[],void 0),W[63884]=x(63884,"unknown_f98c",void 0,[],void 0),W[63885]=x(63885,"unknown_f98d",void 0,[],void 0),W[63886]=x(63886,"unknown_f98e",void 0,[],void 0),W[63887]=x(63887,"unknown_f98f",void 0,[],void 0),W[63888]=x(63888,"unknown_f990",void 0,[],void 0),W[63889]=x(63889,"unknown_f991",void 0,[],void 0),W[63890]=x(63890,"unknown_f992",void 0,[],void 0),W[63891]=x(63891,"unknown_f993",void 0,[],void 0),W[63892]=x(63892,"unknown_f994",void 0,[],void 0),W[63893]=x(63893,"unknown_f995",void 0,[],void 0),W[63894]=x(63894,"unknown_f996",void 0,[],void 0),W[63895]=x(63895,"unknown_f997",void 0,[],void 0),W[63896]=x(63896,"unknown_f998",void 0,[],void 0),W[63897]=x(63897,"unknown_f999",void 0,[],void 0),W[63898]=x(63898,"unknown_f99a",void 0,[],void 0),W[63899]=x(63899,"unknown_f99b",void 0,[],void 0),W[63900]=x(63900,"unknown_f99c",void 0,[],void 0),W[63901]=x(63901,"unknown_f99d",void 0,[],void 0),W[63902]=x(63902,"unknown_f99e",void 0,[],void 0),W[63903]=x(63903,"unknown_f99f",void 0,[],void 0),W[63904]=x(63904,"unknown_f9a0",void 0,[],void 0),W[63905]=x(63905,"unknown_f9a1",void 0,[],void 0),W[63906]=x(63906,"unknown_f9a2",void 0,[],void 0),W[63907]=x(63907,"unknown_f9a3",void 0,[],void 0),W[63908]=x(63908,"unknown_f9a4",void 0,[],void 0),W[63909]=x(63909,"unknown_f9a5",void 0,[],void 0),W[63910]=x(63910,"unknown_f9a6",void 0,[],void 0),W[63911]=x(63911,"unknown_f9a7",void 0,[],void 0),W[63912]=x(63912,"unknown_f9a8",void 0,[],void 0),W[63913]=x(63913,"unknown_f9a9",void 0,[],void 0),W[63914]=x(63914,"unknown_f9aa",void 0,[],void 0),W[63915]=x(63915,"unknown_f9ab",void 0,[],void 0),W[63916]=x(63916,"unknown_f9ac",void 0,[],void 0),W[63917]=x(63917,"unknown_f9ad",void 0,[],void 0),W[63918]=x(63918,"unknown_f9ae",void 0,[],void 0),W[63919]=x(63919,"unknown_f9af",void 0,[],void 0),W[63920]=x(63920,"unknown_f9b0",void 0,[],void 0),W[63921]=x(63921,"unknown_f9b1",void 0,[],void 0),W[63922]=x(63922,"unknown_f9b2",void 0,[],void 0),W[63923]=x(63923,"unknown_f9b3",void 0,[],void 0),W[63924]=x(63924,"unknown_f9b4",void 0,[],void 0),W[63925]=x(63925,"unknown_f9b5",void 0,[],void 0),W[63926]=x(63926,"unknown_f9b6",void 0,[],void 0),W[63927]=x(63927,"unknown_f9b7",void 0,[],void 0),W[63928]=x(63928,"unknown_f9b8",void 0,[],void 0),W[63929]=x(63929,"unknown_f9b9",void 0,[],void 0),W[63930]=x(63930,"unknown_f9ba",void 0,[],void 0),W[63931]=x(63931,"unknown_f9bb",void 0,[],void 0),W[63932]=x(63932,"unknown_f9bc",void 0,[],void 0),W[63933]=x(63933,"unknown_f9bd",void 0,[],void 0),W[63934]=x(63934,"unknown_f9be",void 0,[],void 0),W[63935]=x(63935,"unknown_f9bf",void 0,[],void 0),W[63936]=x(63936,"unknown_f9c0",void 0,[],void 0),W[63937]=x(63937,"unknown_f9c1",void 0,[],void 0),W[63938]=x(63938,"unknown_f9c2",void 0,[],void 0),W[63939]=x(63939,"unknown_f9c3",void 0,[],void 0),W[63940]=x(63940,"unknown_f9c4",void 0,[],void 0),W[63941]=x(63941,"unknown_f9c5",void 0,[],void 0),W[63942]=x(63942,"unknown_f9c6",void 0,[],void 0),W[63943]=x(63943,"unknown_f9c7",void 0,[],void 0),W[63944]=x(63944,"unknown_f9c8",void 0,[],void 0),W[63945]=x(63945,"unknown_f9c9",void 0,[],void 0),W[63946]=x(63946,"unknown_f9ca",void 0,[],void 0),W[63947]=x(63947,"unknown_f9cb",void 0,[],void 0),W[63948]=x(63948,"unknown_f9cc",void 0,[],void 0),W[63949]=x(63949,"unknown_f9cd",void 0,[],void 0),W[63950]=x(63950,"unknown_f9ce",void 0,[],void 0),W[63951]=x(63951,"unknown_f9cf",void 0,[],void 0),W[63952]=x(63952,"unknown_f9d0",void 0,[],void 0),W[63953]=x(63953,"unknown_f9d1",void 0,[],void 0),W[63954]=x(63954,"unknown_f9d2",void 0,[],void 0),W[63955]=x(63955,"unknown_f9d3",void 0,[],void 0),W[63956]=x(63956,"unknown_f9d4",void 0,[],void 0),W[63957]=x(63957,"unknown_f9d5",void 0,[],void 0),W[63958]=x(63958,"unknown_f9d6",void 0,[],void 0),W[63959]=x(63959,"unknown_f9d7",void 0,[],void 0),W[63960]=x(63960,"unknown_f9d8",void 0,[],void 0),W[63961]=x(63961,"unknown_f9d9",void 0,[],void 0),W[63962]=x(63962,"unknown_f9da",void 0,[],void 0),W[63963]=x(63963,"unknown_f9db",void 0,[],void 0),W[63964]=x(63964,"unknown_f9dc",void 0,[],void 0),W[63965]=x(63965,"unknown_f9dd",void 0,[],void 0),W[63966]=x(63966,"unknown_f9de",void 0,[],void 0),W[63967]=x(63967,"unknown_f9df",void 0,[],void 0),W[63968]=x(63968,"unknown_f9e0",void 0,[],void 0),W[63969]=x(63969,"unknown_f9e1",void 0,[],void 0),W[63970]=x(63970,"unknown_f9e2",void 0,[],void 0),W[63971]=x(63971,"unknown_f9e3",void 0,[],void 0),W[63972]=x(63972,"unknown_f9e4",void 0,[],void 0),W[63973]=x(63973,"unknown_f9e5",void 0,[],void 0),W[63974]=x(63974,"unknown_f9e6",void 0,[],void 0),W[63975]=x(63975,"unknown_f9e7",void 0,[],void 0),W[63976]=x(63976,"unknown_f9e8",void 0,[],void 0),W[63977]=x(63977,"unknown_f9e9",void 0,[],void 0),W[63978]=x(63978,"unknown_f9ea",void 0,[],void 0),W[63979]=x(63979,"unknown_f9eb",void 0,[],void 0),W[63980]=x(63980,"unknown_f9ec",void 0,[],void 0),W[63981]=x(63981,"unknown_f9ed",void 0,[],void 0),W[63982]=x(63982,"unknown_f9ee",void 0,[],void 0),W[63983]=x(63983,"unknown_f9ef",void 0,[],void 0),W[63984]=x(63984,"unknown_f9f0",void 0,[],void 0),W[63985]=x(63985,"unknown_f9f1",void 0,[],void 0),W[63986]=x(63986,"unknown_f9f2",void 0,[],void 0),W[63987]=x(63987,"unknown_f9f3",void 0,[],void 0),W[63988]=x(63988,"unknown_f9f4",void 0,[],void 0),W[63989]=x(63989,"unknown_f9f5",void 0,[],void 0),W[63990]=x(63990,"unknown_f9f6",void 0,[],void 0),W[63991]=x(63991,"unknown_f9f7",void 0,[],void 0),W[63992]=x(63992,"unknown_f9f8",void 0,[],void 0),W[63993]=x(63993,"unknown_f9f9",void 0,[],void 0),W[63994]=x(63994,"unknown_f9fa",void 0,[],void 0),W[63995]=x(63995,"unknown_f9fb",void 0,[],void 0),W[63996]=x(63996,"unknown_f9fc",void 0,[],void 0),W[63997]=x(63997,"unknown_f9fd",void 0,[],void 0),W[63998]=x(63998,"unknown_f9fe",void 0,[],void 0),W[63999]=x(63999,"unknown_f9ff",void 0,[],void 0);function A(i,e){if(!i){let i="Assertion Error";throw e&&(i+=": "+(e instanceof Function?e():e)),new Error(i)}}var M,F;function q(i){const e=Object.values(i),o=e.filter(i=>"number"==typeof i);return o.length?o:e}W.forEach(i=>{S.set(i.mnemonic,i)}),function(i){i[i.Instructions=0]="Instructions",i[i.Data=1]="Data",i[i.String=2]="String"}(M||(M={}));!function(i){i[i.Trace=0]="Trace",i[i.Debug=1]="Debug",i[i.Info=2]="Info",i[i.Warn=3]="Warn",i[i.Error=4]="Error",i[i.Off=5]="Off"}(F||(F={}));q(F);function C(i,e){return i.toString().padStart(e,"0")}class E{constructor(i){this.name=i,this.trace=(i,e)=>{this.handle(F.Trace,i,e)},this.debug=(i,e)=>{this.handle(F.Debug,i,e)},this.info=(i,e)=>{this.handle(F.Info,i,e)},this.warn=(i,e)=>{this.handle(F.Warn,i,e)},this.error=(i,e)=>{this.handle(F.Error,i,e)}}get level(){var i;return null!=(i=this._level)?i:N.default_level}set level(i){this._level=i}get handler(){var i;return null!=(i=this._handler)?i:N.default_handler}set handler(i){this._handler=i}handle(i,e,o){i>=this.level&&this.handler({time:new Date,message:e,level:i,logger:this,cause:o},this.name)}}class N{static get(i){let e=this.loggers.get(i);return e||(e=new E(i),this.loggers.set(i,e)),e}static with_default_handler(i,e){const o=this.default_handler;let d=!1;try{this.default_handler=i;const v=e();return v instanceof Promise?(d=!0,v.finally(()=>this.default_handler=o)):v}finally{d||(this.default_handler=o)}}}N.loggers=new Map,N.default_level=function(i){const e=F[i.slice(0,1).toUpperCase()+i.slice(1).toLowerCase()];return A(null!=e,()=>`"${i}" is not a valid log level.`),e}("INFO"),N.default_handler=function({time:i,message:e,level:o,logger:d,cause:v}){const t=`${function(i){const e=C(i.getHours(),2),o=C(i.getMinutes(),2),d=C(i.getSeconds(),2),v=C(i.getMilliseconds(),3);return`${e}:${o}:${d}.${v}`}(i)} [${F[o]}] ${d.name} - ${e}`;let n;switch(o){case F.Trace:n=console.trace;break;case F.Debug:n=console.debug;break;case F.Info:n=console.info;break;case F.Warn:n=console.warn;break;case F.Error:n=console.error;break;default:n=console.log}null==v?n.call(console,t):n.call(console,t,v)};const O=N.get("quest_editor/scripting/assembly");class U{constructor(i,e){this.assembly=i,this.manual_stack=e,this.lexer=new r,this.section=M.Instructions,this.first_section_marker=!0,this.prev_line_had_label=!1}assemble(){this.line_no=1,this.object_code=[],this.warnings=[],this.errors=[],this.labels=new Set,this.section=M.Instructions,this.first_section_marker=!0,this.prev_line_had_label=!1;for(const i of this.assembly){if(this.tokens=this.lexer.tokenize_line(i),this.tokens.length>0){const i=this.tokens.shift();let e=!1;switch(i.type){case n.Label:this.parse_label(i),e=!0;break;case n.CodeSection:case n.DataSection:case n.StringSection:this.parse_section(i);break;case n.Int:this.section===M.Data?this.parse_bytes(i):this.add_error({col:i.col,length:i.len,message:"Unexpected token."});break;case n.String:this.section===M.String?this.parse_string(i):this.add_error({col:i.col,length:i.len,message:"Unexpected token."});break;case n.Ident:this.section===M.Instructions?this.parse_instruction(i):this.add_error({col:i.col,length:i.len,message:"Unexpected token."});break;case n.InvalidSection:this.add_error({col:i.col,length:i.len,message:"Invalid section type."});break;case n.InvalidIdent:this.add_error({col:i.col,length:i.len,message:"Invalid identifier."});break;default:this.add_error({col:i.col,length:i.len,message:"Unexpected token."})}this.prev_line_had_label=e}this.line_no++}return{object_code:this.object_code,warnings:this.warnings,errors:this.errors}}add_instruction(i,e,o,d,v,t){if(this.segment)this.segment.type===M.Instructions?this.segment.instructions.push(function(i,e,o){const d=Math.min(i.params.length,e.length),v=[];let t=0;for(let o=0;o<d;o++){const d=i.params[o].type,n=e[o];switch(v[o]=[],d.kind){case s.ILabelVar:case s.RegRefVar:t++;for(let i=o;i<e.length;i++)v[o].push(e[i]),t+=e[i].size;break;default:t+=n.size,v[o].push(n)}}return{opcode:i,args:e,arg_size:t,size:i.size+t,param_to_args:v,asm:o}}(i,e,{mnemonic:d&&{line_no:this.line_no,col:d.col,len:d.len},args:v.map(i=>({line_no:this.line_no,col:i.col,len:i.len})),stack_args:t.map((i,e)=>({line_no:this.line_no,col:i.col,len:i.len,value:o[e].value}))})):O.error(`Line ${this.line_no}: Expected instructions segment.`);else{const i={labels:[],type:M.Instructions,instructions:[],asm:{labels:[]}};this.segment=i,this.object_code.push(i)}}add_bytes(i){if(this.segment)if(this.segment.type===M.Data){const e=new ArrayBuffer(this.segment.data.byteLength+i.length),o=new Uint8Array(e);o.set(new Uint8Array(this.segment.data)),o.set(new Uint8Array(i),this.segment.data.byteLength),this.segment.data=e}else O.error(`Line ${this.line_no}: Expected data segment.`);else{const e={labels:[],type:M.Data,data:new Uint8Array(i).buffer,asm:{labels:[]}};this.segment=e,this.object_code.push(e)}}add_string(i){if(this.segment)this.segment.type===M.String?this.segment.value+=i:O.error(`Line ${this.line_no}: Expected string segment.`);else{const e={labels:[],type:M.String,value:i,asm:{labels:[]}};this.segment=e,this.object_code.push(e)}}add_error({col:i,length:e,message:o}){this.errors.push({line_no:this.line_no,col:i,length:e,message:o})}add_warning({col:i,length:e,message:o}){this.warnings.push({line_no:this.line_no,col:i,length:e,message:o})}parse_label({col:i,len:e,value:o}){this.labels.has(o)&&this.add_error({col:i,length:e,message:"Duplicate label."}),this.labels.add(o);const d=this.tokens.shift(),v={line_no:this.line_no,col:i,len:e};if(this.prev_line_had_label){const i=this.object_code[this.object_code.length-1];i.labels.push(o),i.asm.labels.push(v)}switch(this.section){case M.Instructions:this.prev_line_had_label||(this.segment={type:M.Instructions,labels:[o],instructions:[],asm:{labels:[v]}},this.object_code.push(this.segment)),d&&(d.type===n.Ident?this.parse_instruction(d):this.add_error({col:d.col,length:d.len,message:"Expected opcode mnemonic."}));break;case M.Data:this.prev_line_had_label||(this.segment={type:M.Data,labels:[o],data:new ArrayBuffer(0),asm:{labels:[v]}},this.object_code.push(this.segment)),d&&(d.type===n.Int?this.parse_bytes(d):this.add_error({col:d.col,length:d.len,message:"Expected bytes."}));break;case M.String:this.prev_line_had_label||(this.segment={type:M.String,labels:[o],value:"",asm:{labels:[v]}},this.object_code.push(this.segment)),d&&(d.type===n.String?this.parse_string(d):this.add_error({col:d.col,length:d.len,message:"Expected a string."}))}}parse_section({type:i,col:e,len:o}){let d;switch(i){case n.CodeSection:d=M.Instructions;break;case n.DataSection:d=M.Data;break;case n.StringSection:d=M.String}this.section!==d||this.first_section_marker||this.add_warning({col:e,length:o,message:"Unnecessary section marker."}),this.section=d,this.first_section_marker=!1;const v=this.tokens.shift();v&&this.add_error({col:v.col,length:v.len,message:"Unexpected token."})}parse_instruction(i){const{col:e,len:o,value:d}=i,v=S.get(d);if(v){const o=-1!==v.params.findIndex(i=>i.type.kind===s.ILabelVar||i.type.kind===s.RegRefVar),d=this.manual_stack&&v.stack===y.Pop?0:v.params.length;let a=0;for(const i of this.tokens)i.type!==n.ArgSeparator&&a++;const u=this.tokens[this.tokens.length-1],_=u?u.col+u.len-e:0,l=[],p=[];if(!o&&a!==d)return void this.add_error({col:e,length:_,message:`Expected ${d} argument${1===d?"":"s"}, got ${a}.`});if(o&&a<d)return void this.add_error({col:e,length:_,message:`Expected at least ${d} argument${1===d?"":"s"}, got ${a}.`});if(v.stack!==y.Pop){if(!this.parse_args(v.params,l,!1))return}else{if(!this.parse_args(v.params,p,!0))return;for(let i=0;i<v.params.length;i++){const e=v.params[i],o=p[i];if(null==o)continue;const[d,a]=o;if(a.type===n.Register)e.type.kind===s.RegTupRef?this.add_instruction(L,[d],[],void 0,[a],[]):this.add_instruction(I,[d],[],void 0,[a],[]);else switch(e.type.kind){case s.Byte:case s.RegRef:case s.RegTupRef:this.add_instruction(L,[d],[],void 0,[a],[]);break;case s.Word:case s.Label:case s.ILabel:case s.DLabel:case s.SLabel:this.add_instruction(D,[d],[],void 0,[a],[]);break;case s.DWord:this.add_instruction(j,[d],[],void 0,[a],[]);break;case s.Float:this.add_instruction(j,[{value:(r=d.value,t.setFloat32(0,r),t.getInt32(0)),size:4}],[],void 0,[a],[]);break;case s.String:this.add_instruction(z,[d],[],void 0,[a],[]);break;default:O.error(`Line ${this.line_no}: Type ${s[e.type.kind]} not implemented.`)}}}const g=[],f=[],k=[],R=[];for(const[i,e]of l)g.push(i),f.push(e);for(const[i,e]of p)k.push(i),R.push(e);this.add_instruction(v,g,k,i,f,R)}else this.add_error({col:e,length:o,message:"Unknown instruction."});var r}parse_args(i,e,o){let d=!0,v=!0,t=0;for(let r=0;r<this.tokens.length;r++){const a=this.tokens[r],u=i[t];if(a.type===n.ArgSeparator)v?this.add_error({col:a.col,length:a.len,message:"Expected an argument."}):u.type.kind!==s.ILabelVar&&u.type.kind!==s.RegRefVar&&t++,v=!0;else{if(!v){const i=this.tokens[r-1],e=i.col+i.len;this.add_error({col:e,length:a.col-e,message:"Expected a comma."})}let i;switch(v=!1,a.type){case n.Int:switch(u.type.kind){case s.Byte:i=!0,this.parse_int(1,a,e);break;case s.Word:case s.Label:case s.ILabel:case s.DLabel:case s.SLabel:case s.ILabelVar:i=!0,this.parse_int(2,a,e);break;case s.DWord:i=!0,this.parse_int(4,a,e);break;case s.Float:i=!0,e.push([{value:a.value,size:4},a]);break;default:i=!1}break;case n.Float:i=u.type.kind===s.Float,i&&e.push([{value:a.value,size:4},a]);break;case n.Register:i=o||u.type.kind===s.RegRef||u.type.kind===s.RegRefVar||u.type.kind===s.RegTupRef,this.parse_register(a,e);break;case n.String:i=u.type.kind===s.String,i&&e.push([{value:a.value,size:2*a.value.length+2},a]);break;default:i=!1}if(!i){let i;switch(d=!1,u.type.kind){case s.Byte:i="an 8-bit integer";break;case s.Word:i="a 16-bit integer";break;case s.DWord:i="a 32-bit integer";break;case s.Float:i="a float";break;case s.Label:i="a label";break;case s.ILabel:case s.ILabelVar:i="an instruction label";break;case s.DLabel:i="a data label";break;case s.SLabel:i="a string label";break;case s.String:i="a string";break;case s.RegRef:case s.RegRefVar:case s.RegTupRef:i="a register reference"}i?this.add_error({col:a.col,length:a.len,message:`Expected ${i}.`}):this.add_error({col:a.col,length:a.len,message:"Unexpected token."})}}}return this.tokens=[],d}parse_int(i,e,o){const{value:d,col:v,len:t}=e,n=8*i,s=-Math.pow(2,n-1),r=Math.pow(2,n)-1;d<s?this.add_error({col:v,length:t,message:`${n}-Bit integer can't be less than ${s}.`}):d>r?this.add_error({col:v,length:t,message:`${n}-Bit integer can't be greater than ${r}.`}):o.push([{value:d,size:i},e])}parse_register(i,e){const{col:o,len:d,value:v}=i;v>255?this.add_error({col:o,length:d,message:"Invalid register reference, expected r0-r255."}):e.push([{value:v,size:1},i])}parse_bytes(i){const e=[];let o=i,d=0;for(;o.type===n.Int&&(o.value<0?this.add_error({col:o.col,length:o.len,message:"Unsigned 8-bit integer can't be less than 0."}):o.value>255&&this.add_error({col:o.col,length:o.len,message:"Unsigned 8-bit integer can't be greater than 255."}),e.push(o.value),d<this.tokens.length);)o=this.tokens[d++];d<this.tokens.length&&this.add_error({col:o.col,length:o.len,message:"Expected an unsigned 8-bit integer."}),this.add_bytes(e)}parse_string(i){const e=this.tokens.shift();e&&this.add_error({col:e.col,length:e.len,message:"Unexpected token."}),this.add_string(i.value.replace(/\n/g,"<cr>"))}}const V=self;let B=[],H=[];const Y=[],X=new Map,Z=[];let J;const G={manual_stack:!1};function K(){if(0!==Z.length)for(const i of Z.splice(0,Z.length))switch(i.type){case d.NewAssembly:B=i.assembly,di();break;case d.AssemblyChange:Q(i);break;case d.SignatureHelp:ii(i);break;case d.Definition:ei(i);break;case d.SettingsChange:oi(i)}}function Q(i){for(const e of i.changes){const{start_line_no:i,end_line_no:o,start_col:d,end_col:v,new_text:t}=e,n=o-i+1,s=t.split("\n");1===n?vi(i,d,v,s):1===s.length?ri(i,o,d,v,s[0]):(ni(i,d,s[0]),ti(o,v,s[s.length-1]),si(i+1,o-1,s.slice(1,s.length-1)))}di()}function ii(i){let e,o=-1;if(i.line_no<=B.length){const d=B[i.line_no-1],v=(new r).tokenize_line(d),t=v.find(i=>i.type===n.Ident);if(t&&(e=S.get(t.value),e))for(const e of v){if(e.col+e.len>i.col)break;e.type===n.Ident&&-1===o?o=0:e.type===n.ArgSeparator&&o++}}const d={type:v.SignatureHelp,id:i.id,opcode:e,active_param:o};V.postMessage(d)}function ei(i){const e=function(i,e){const o=Y[i];if(!o)return;const d=H[o.segment_index];if(!d||d.type!==M.Instructions)return;for(const v of o.instruction_indices){const o=d.instructions[v];if(o&&o.asm){const d=o.opcode.params;for(let v=0;v<o.asm.args.length;v++){const t=v<d.length?d[v]:d[d.length-1],n=o.asm.args[v];if((t.type.kind===s.ILabel||t.type.kind===s.DLabel||t.type.kind===s.SLabel||t.type.kind===s.ILabelVar)&&ui(i,e,n))return o.args[v].value}for(let v=0;v<o.asm.stack_args.length;v++){const t=v<d.length?d[v]:d[d.length-1],n=o.asm.stack_args[v];if((t.type.kind===s.ILabel||t.type.kind===s.DLabel||t.type.kind===s.SLabel||t.type.kind===s.ILabelVar)&&ui(i,e,n))return n.value}}}return}(i.line_no,i.col);let o;if(null!=e){const i=function(i){let e=X.get(i);if(void 0===e){e=null;for(const o of H)if(o.labels.includes(i)){e=o;break}X.set(i,e)}return e||void 0}(e);if(i){const d=i.labels.indexOf(e);-1!==d&&(o=i.asm.labels[d])}}const d=Object.assign({type:v.Definition,id:i.id},o);V.postMessage(d)}function oi(i){null!=i.settings.manual_stack&&(G.manual_stack=i.settings.manual_stack)}function di(){const i=function(i,e=!1){O.trace("assemble start");const o=new U(i,e).assemble();return O.trace(`assemble end with ${o.warnings.length} warnings and ${o.errors.length} errors.`),o}(B,G.manual_stack);H=i.object_code,X.clear(),Y.splice(0,1/0);const e=new Map;for(let i=0;i<H.length;i++){const o=H[i];if(o.type===M.Instructions){if(o.labels.includes(0))for(const i of o.instructions)i.opcode.code===$.code&&e.set(i.args[0].value,i.args[2].value);for(let e=0;e<o.instructions.length;e++){const d=o.instructions[e];if(d.asm){d.asm.mnemonic&&ai(d.asm.mnemonic.line_no,i,e);for(const o of d.asm.args)ai(o.line_no,i,e)}}}}const o=Object.assign({type:v.NewObjectCode,map_designations:e},i);V.postMessage(o)}function vi(i,e,o,d){const v=B[i-1],t=v.slice(0,e-1),n=v.slice(o-1);1===d.length?B.splice(i-1,1,t+d[0]+n):B.splice(i-1,1,t+d[0],...d.slice(1,d.length-1),d[d.length-1]+n)}function ti(i,e,o){B.splice(i-1,1,o+B[i-1].slice(e-1))}function ni(i,e,o){B.splice(i-1,1,B[i-1].slice(0,e-1)+o)}function si(i,e,o){B.splice(i-1,e-i+1,...o)}function ri(i,e,o,d,v){const t=B[i-1],n=B[e-1],s=t.slice(0,o-1),r=n.slice(d-1);B.splice(i-1,e-i+1,s+v+r)}function ai(i,e,o){let d=Y[i];d||(d={segment_index:e,instruction_indices:[]},Y[i]=d),d.instruction_indices.push(o)}function ui(i,e,o){return!!o&&(i===o.line_no&&e>=o.col&&e<=o.col+o.len)}V.onmessage=i=>{Z.push(i.data),J||(K(),J=setTimeout(()=>{J=void 0,K()},100))}}}); |