-- Haxe transcendental test
-- This is a script written in Haxe that prints the natural logarithm of the
-- golden ratio in base 10 to arbitrarily many digits.
-- This file is part of KoboldAI.
--
-- KoboldAI is free software: you can redistribute it and/or modify
-- it under the terms of the GNU Affero General Public License as published by
-- the Free Software Foundation, either version 3 of the License, or
-- (at your option) any later version.
--
-- This program is distributed in the hope that it will be useful,
-- but WITHOUT ANY WARRANTY; without even the implied warranty of
-- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-- GNU Affero General Public License for more details.
--
-- You should have received a copy of the GNU Affero General Public License
-- along with this program. If not, see .
--------------------------------------------------------------------------------
-- License for littleBigInt:
-- MIT License
--
-- Copyright (c) 2020 Sylvio Sell
--
-- Permission is hereby granted, free of charge, to any person obtaining a copy
-- of this software and associated documentation files (the "Software"), to deal
-- in the Software without restriction, including without limitation the rights
-- to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
-- copies of the Software, and to permit persons to whom the Software is
-- furnished to do so, subject to the following conditions:
--
-- The above copyright notice and this permission notice shall be included in all
-- copies or substantial portions of the Software.
--
-- THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
-- IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
-- FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
-- AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
-- LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
-- OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
-- SOFTWARE.
local a={__id__=true,hx__closures=true,super=true,prototype=true,__fields__=true,__ifields__=true,__class__=true,__properties__=true,__fields__=true,__name__=true}_hx_array_mt={__newindex=function(b,c,d)local e=b.length;b.length=c>=e and c+1 or e;rawset(b,c,d)end}function _hx_is_array(f)return type(f)=="table"and f.__enum__==nil and getmetatable(f)==_hx_array_mt end;function _hx_tab_array(g,h)g.length=h;return setmetatable(g,_hx_array_mt)end;function _hx_print_class(i,j)local k=true;local l=''for c,d in pairs(i)do if a[c]==nil then if k then k=false else l=l..', 'end;if a[c]==nil then l=l..c..':'.._hx_tostring(d,j+1)end end end;return'{ '..l..' }'end;function _hx_print_enum(f,j)if f.length==2 then return f[0]else local m=f[0].."("for n=2,f.length-1 do if n~=2 then m=m..",".._hx_tostring(f[n],j+1)else m=m.._hx_tostring(f[n],j+1)end end;return m..")"end end;function _hx_tostring(i,j)if j==nil then j=0 elseif j>5 then return"<...>"end;local o=_G.type(i)if o=="string"then return i elseif o=="nil"then return"null"elseif o=="number"then if i==_G.math.POSITIVE_INFINITY then return"Infinity"elseif i==_G.math.NEGATIVE_INFINITY then return"-Infinity"elseif i==0 then return"0"elseif i~=i then return"NaN"else return _G.tostring(i)end elseif o=="boolean"then return _G.tostring(i)elseif o=="userdata"then local p=_G.getmetatable(i)if p~=nil and p.__tostring~=nil then return _G.tostring(i)else return""end elseif o=="function"then return""elseif o=="thread"then return""elseif o=="table"then if i.__enum__~=nil then return _hx_print_enum(i,j)elseif i.toString~=nil and not _hx_is_array(i)then return i:toString()elseif _hx_is_array(i)then if i.length>5 then return"[...]"else local m=""for n=0,i.length-1 do if n==0 then m=m.._hx_tostring(i[n],j+1)else m=m..",".._hx_tostring(i[n],j+1)end end;return"["..m.."]"end elseif i.__class__~=nil then return _hx_print_class(i,j)else local q={}local r=i;if i.__fields__~=nil then r=i.__fields__ end;for c,d in pairs(r)do if a[c]==nil then _G.table.insert(q,_hx_tostring(c,j+1)..' : '.._hx_tostring(i[c],j+1))end end;return"{ "..table.concat(q,", ").." }"end else _G.error("Unknown Lua type",0)return""end end;function _hx_error(i)if i.value then _G.print("runtime error:\n ".._hx_tostring(i.value))else _G.print("runtime error:\n "..tostring(i))end;if _G.debug and _G.debug.traceback then _G.print(debug.traceback())end end;local function s(b,c,d)b.__fields__[c]=true;rawset(b,c,d)end;local t={__newindex=s,__tostring=_hx_tostring}local function u(...)local v={}local w={__fields__=v}local x=select('#',...)local g={...}local y=1;while y1 then self[0]=self[1]_G.table.remove(self,1)end end;local ad=self;ad.length=ad.length-1;do return w end end;K.prototype.slice=function(self,ae,af)if af==nil or af>self.length then af=self.length else if af<0 then af=_G.math.fmod(self.length-_G.math.fmod(-af,self.length),self.length)end end;if ae<0 then ae=_G.math.fmod(self.length-_G.math.fmod(-ae,self.length),self.length)end;if ae>af or ae>self.length then do return _hx_tab_array({},0)end end;local w=_hx_tab_array({},0)local a5=ae;local a6=af;while a50 then local ad=self[aj+1]self[aj+1]=self[aj]self[aj]=ad;ai=true end;aj=aj+1 end;if not ai then break end;n=n+1 end end;K.prototype.splice=function(self,ae,e)if e<0 or ae>self.length then do return _hx_tab_array({},0)end else if ae<0 then ae=self.length-_G.math.fmod(-ae,self.length)end end;e=P.min(e,self.length-ae)local w=_hx_tab_array({},0)local a5=ae;local a6=ae+e;while a5self.length then ae=self.length end;if ae<0 then ae=self.length+ae;if ae<0 then ae=0 end end;local ak=self.length;while ak>ae do self[ak]=self[ak-1]ak=ak-1 end;self[ae]=ac end;K.prototype.remove=function(self,ac)local a5=0;local a6=self.length;while a5=self.length then al=self.length-1 else if al<0 then al=self.length+al;if al<0 then do return-1 end end end end;local n=al;while n>=0 do if self[n]==ac then do return n end else n=n-1 end end;do return-1 end end;K.prototype.copy=function(self)local a5=_hx_tab_array({},0)local a6=0;local a7=self;while a6e then local a5=e;local a6=self.length;while a5=an["end"]-an.start then do return nil end else am.start=an.start+ao;am["end"]=an["end"]do return am end end end;___BigInt_BigInt_Impl_.splitLow=function(an,ao)local ao=ao;local n=0;if an.start+ao>an["end"]then ao=an["end"]-an.start end;while n=0)then break end;if an.chunks[an.start+n]==0 then if ap then an["end"]=an["end"]-1;an.chunks:pop()else an["end"]=an["end"]-1 end else n=0 end end end;___BigInt_BigInt_Impl_.setNegative=function(an)an.isNegative=true;do return an end end;___BigInt_BigInt_Impl_.setPositive=function(an)an.isNegative=false;do return an end end;___BigInt_BigInt_Impl_.copy=function(an)local am=N.new()local a5=0;local a6=an["end"]-an.start;while a50 then local a5=_hx_tab_array({},0)local a6=0;local a7=ay;while a60 then as=R.string((function()local aB;if _G.math.fmod(aj,ay)==0 and ay>0 and aj~=0 then aB=" "else aB=""end;return aB end)())..R.string(as)end;as=R.string((function()local aC;if T.band(bit,aA)==0 then aC="0"else aC="1"end;return aC end)())..R.string(as)aj=aj+1;bit=T.lshift(bit,1)end end;if az and ay>0 then if _G.math.fmod(aj,ay)~=0 then local a5=_hx_tab_array({},0)local a6=0;local a7=ay-_G.math.fmod(aj,ay)while a60 then local a5=_hx_tab_array({},0)local a6=0;local a7=ay;while a60 then local a5=_hx_tab_array({},0)local a6=0;local a7=ay;while a60 then local a5=_hx_tab_array({},0)local a6=0;local a7=ay;while a6aP["end"]-aP.start then local am=N.new()local a5=0;local a6=an["end"]-an.start;while a50 then a4["end"]=a4["end"]+1;a4.chunks:push(d)end end;aQ=a4 else local am=N.new()local a5=0;local a6=aP["end"]-aP.start;while a50 then a4["end"]=a4["end"]+1;a4.chunks:push(d)end end;aQ=a4 end;aQ.isNegative=true;do return aQ end else local am=N.new(an.chunks)am.start=an.start;am["end"]=an["end"]am.isNegative=not an.isNegative;local an=am;local aT=an;local d;if ___BigInt_BigInt_Impl_.greater(aP,aT)then local am=N.new()local a5=0;local a6=aP["end"]-aP.start;while a5=d then a4.chunks[a4.start+n]=ac-d;d=0;break end;a4.chunks[a4.start+n]=ac+32768-d;d=1 end end;d=a4;local n=d["end"]-d.start;while true do n=n-1;if not(n>=0)then break end;if d.chunks[d.start+n]==0 then d["end"]=d["end"]-1 else n=0 end end;do return d end else local am=N.new()local a5=0;local a6=aT["end"]-aT.start;while a5=d then a4.chunks[a4.start+n]=ac-d;d=0;break end;a4.chunks[a4.start+n]=ac+32768-d;d=1 end end;d=a4;local n=d["end"]-d.start;while true do n=n-1;if not(n>=0)then break end;if d.chunks[d.start+n]==0 then d["end"]=d["end"]-1 else n=0 end end;if d["end"]-d.start==0 then do return nil end else d.isNegative=true;do return d end end end end else if aP.isNegative then local am=N.new(aP.chunks)am.start=aP.start;am["end"]=aP["end"]am.isNegative=not aP.isNegative;local aQ=am;local aP=aQ;local d;if ___BigInt_BigInt_Impl_.greater(an,aP)then local am=N.new()local a5=0;local a6=an["end"]-an.start;while a5=d then a4.chunks[a4.start+n]=ac-d;d=0;break end;a4.chunks[a4.start+n]=ac+32768-d;d=1 end end;d=a4;local n=d["end"]-d.start;while true do n=n-1;if not(n>=0)then break end;if d.chunks[d.start+n]==0 then d["end"]=d["end"]-1 else n=0 end end;do return d end else local am=N.new()local a5=0;local a6=aP["end"]-aP.start;while a5=d then a4.chunks[a4.start+n]=ac-d;d=0;break end;a4.chunks[a4.start+n]=ac+32768-d;d=1 end end;d=a4;local n=d["end"]-d.start;while true do n=n-1;if not(n>=0)then break end;if d.chunks[d.start+n]==0 then d["end"]=d["end"]-1 else n=0 end end;if d["end"]-d.start==0 then do return nil end else d.isNegative=true;do return d end end end else if an["end"]-an.start>aP["end"]-aP.start then local am=N.new()local a5=0;local a6=an["end"]-an.start;while a50 then a4["end"]=a4["end"]+1;a4.chunks:push(d)end end;do return a4 end else local am=N.new()local a5=0;local a6=aP["end"]-aP.start;while a50 then a4["end"]=a4["end"]+1;a4.chunks:push(d)end end;do return a4 end end end end end end end;___BigInt_BigInt_Impl_.opAddInt=function(a4,aP)local a4=___BigInt_BigInt_Impl_.fromInt(a4)if a4==nil then if aP==nil then do return nil end else local am=N.new()local a5=0;local a6=aP["end"]-aP.start;while a5aP["end"]-aP.start then local am=N.new()local a5=0;local a6=a4["end"]-a4.start;while a50 then a4["end"]=a4["end"]+1;a4.chunks:push(d)end end;an=a4 else local am=N.new()local a5=0;local a6=aP["end"]-aP.start;while a50 then aU["end"]=aU["end"]+1;aU.chunks:push(d)end end;an=aU end;an.isNegative=true;do return an end else local am=N.new(a4.chunks)am.start=a4.start;am["end"]=a4["end"]am.isNegative=not a4.isNegative;local an=am;local aT=an;local d;if ___BigInt_BigInt_Impl_.greater(aP,aT)then local am=N.new()local a5=0;local a6=aP["end"]-aP.start;while a5=d then a4.chunks[a4.start+n]=ac-d;d=0;break end;a4.chunks[a4.start+n]=ac+32768-d;d=1 end end;d=a4;local n=d["end"]-d.start;while true do n=n-1;if not(n>=0)then break end;if d.chunks[d.start+n]==0 then d["end"]=d["end"]-1 else n=0 end end;do return d end else local am=N.new()local a5=0;local a6=aT["end"]-aT.start;while a5=d then a4.chunks[a4.start+n]=ac-d;d=0;break end;a4.chunks[a4.start+n]=ac+32768-d;d=1 end end;d=a4;local n=d["end"]-d.start;while true do n=n-1;if not(n>=0)then break end;if d.chunks[d.start+n]==0 then d["end"]=d["end"]-1 else n=0 end end;if d["end"]-d.start==0 then do return nil end else d.isNegative=true;do return d end end end end else if aP.isNegative then local am=N.new(aP.chunks)am.start=aP.start;am["end"]=aP["end"]am.isNegative=not aP.isNegative;local an=am;local aP=an;local d;if ___BigInt_BigInt_Impl_.greater(a4,aP)then local am=N.new()local a5=0;local a6=a4["end"]-a4.start;while a5=d then a4.chunks[a4.start+n]=ac-d;d=0;break end;a4.chunks[a4.start+n]=ac+32768-d;d=1 end end;d=a4;local n=d["end"]-d.start;while true do n=n-1;if not(n>=0)then break end;if d.chunks[d.start+n]==0 then d["end"]=d["end"]-1 else n=0 end end;do return d end else local am=N.new()local a5=0;local a6=aP["end"]-aP.start;while a5=d then aU.chunks[aU.start+n]=ac-d;d=0;break end;aU.chunks[aU.start+n]=ac+32768-d;d=1 end end;d=aU;local n=d["end"]-d.start;while true do n=n-1;if not(n>=0)then break end;if d.chunks[d.start+n]==0 then d["end"]=d["end"]-1 else n=0 end end;if d["end"]-d.start==0 then do return nil end else d.isNegative=true;do return d end end end else if a4["end"]-a4.start>aP["end"]-aP.start then local am=N.new()local a5=0;local a6=a4["end"]-a4.start;while a50 then a4["end"]=a4["end"]+1;a4.chunks:push(d)end end;do return a4 end else local am=N.new()local a5=0;local a6=aP["end"]-aP.start;while a50 then aU["end"]=aU["end"]+1;aU.chunks:push(d)end end;do return aU end end end end end end end;___BigInt_BigInt_Impl_.opIncrementAfter=function(an)if an==nil then local n=1;if n==0 then an=nil else local am=N.new()if n<0 then am.isNegative=true;n=-n end;while n~=0 do am["end"]=am["end"]+1;am.chunks:push(T.band(n,32767))n=T.rshift(n,15)end;an=am end;do return nil end end;local am=N.new()local a5=0;local a6=an["end"]-an.start;while a5=d then an.chunks[an.start+n]=ac-d;d=0;break end;an.chunks[an.start+n]=ac+32768-d;d=1 end end else local d=1;local ac;local a5=0;local a6=an["end"]-an.start;while a50 then an["end"]=an["end"]+1;an.chunks:push(d)end end;do return w end end;___BigInt_BigInt_Impl_.opIncrementBefore=function(an)if an==nil then local n=1;if n==0 then an=nil else local am=N.new()if n<0 then am.isNegative=true;n=-n end;while n~=0 do am["end"]=am["end"]+1;am.chunks:push(T.band(n,32767))n=T.rshift(n,15)end;an=am end;local n=1;if n==0 then do return nil end else local am=N.new()if n<0 then am.isNegative=true;n=-n end;while n~=0 do am["end"]=am["end"]+1;am.chunks:push(T.band(n,32767))n=T.rshift(n,15)end;do return am end end end;if an.isNegative then if an["end"]-an.start==1 and an.chunks[an.start]==1 then an=nil;do return nil end else local d=1;local a5=0;local a6=an["end"]-an.start;while a5=d then an.chunks[an.start+n]=ac-d;d=0;break end;an.chunks[an.start+n]=ac+32768-d;d=1 end;local am=N.new()local a5=0;local a6=an["end"]-an.start;while a50 then an["end"]=an["end"]+1;an.chunks:push(d)end;local am=N.new()local a5=0;local a6=an["end"]-an.start;while a5aP["end"]-aP.start then local am=N.new()local a5=0;local a6=a4["end"]-a4.start;while a50 then a4["end"]=a4["end"]+1;a4.chunks:push(d)end end;an=a4 else local am=N.new()local a5=0;local a6=aP["end"]-aP.start;while a50 then aU["end"]=aU["end"]+1;aU.chunks:push(d)end end;an=aU end;an.isNegative=true;do return an end end;local am=N.new(a4.chunks)am.start=a4.start;am["end"]=a4["end"]am.isNegative=not a4.isNegative;local an=am;local aT=an;local d;if ___BigInt_BigInt_Impl_.greater(aP,aT)then local am=N.new()local a5=0;local a6=aP["end"]-aP.start;while a5=d then a4.chunks[a4.start+n]=ac-d;d=0;break end;a4.chunks[a4.start+n]=ac+32768-d;d=1 end end;d=a4;local n=d["end"]-d.start;while true do n=n-1;if not(n>=0)then break end;if d.chunks[d.start+n]==0 then d["end"]=d["end"]-1 else n=0 end end;do return d end else local am=N.new()local a5=0;local a6=aT["end"]-aT.start;while a5=d then a4.chunks[a4.start+n]=ac-d;d=0;break end;a4.chunks[a4.start+n]=ac+32768-d;d=1 end end;d=a4;local n=d["end"]-d.start;while true do n=n-1;if not(n>=0)then break end;if d.chunks[d.start+n]==0 then d["end"]=d["end"]-1 else n=0 end end;if d["end"]-d.start==0 then do return nil end else d.isNegative=true;do return d end end end end;if aP.isNegative then local am=N.new(aP.chunks)am.start=aP.start;am["end"]=aP["end"]am.isNegative=not aP.isNegative;local an=am;local aP=an;local d;if ___BigInt_BigInt_Impl_.greater(a4,aP)then local am=N.new()local a5=0;local a6=a4["end"]-a4.start;while a5=d then a4.chunks[a4.start+n]=ac-d;d=0;break end;a4.chunks[a4.start+n]=ac+32768-d;d=1 end end;d=a4;local n=d["end"]-d.start;while true do n=n-1;if not(n>=0)then break end;if d.chunks[d.start+n]==0 then d["end"]=d["end"]-1 else n=0 end end;do return d end else local am=N.new()local a5=0;local a6=aP["end"]-aP.start;while a5=d then aU.chunks[aU.start+n]=ac-d;d=0;break end;aU.chunks[aU.start+n]=ac+32768-d;d=1 end end;d=aU;local n=d["end"]-d.start;while true do n=n-1;if not(n>=0)then break end;if d.chunks[d.start+n]==0 then d["end"]=d["end"]-1 else n=0 end end;if d["end"]-d.start==0 then do return nil end else d.isNegative=true;do return d end end end end;if a4["end"]-a4.start>aP["end"]-aP.start then local am=N.new()local a5=0;local a6=a4["end"]-a4.start;while a50 then a4["end"]=a4["end"]+1;a4.chunks:push(d)end end;do return a4 end else local am=N.new()local a5=0;local a6=aP["end"]-aP.start;while a50 then aU["end"]=aU["end"]+1;aU.chunks:push(d)end end;do return aU end end end;___BigInt_BigInt_Impl_.__add=function(a4,aP)if a4["end"]-a4.start>aP["end"]-aP.start then local am=N.new()local a5=0;local a6=a4["end"]-a4.start;while a50 then a4["end"]=a4["end"]+1;a4.chunks:push(d)end end;do return a4 end end;local am=N.new()local a5=0;local a6=aP["end"]-aP.start;while a50 then aU["end"]=aU["end"]+1;aU.chunks:push(d)end end;do return aU end end;___BigInt_BigInt_Impl_.addLong=function(a4,aP)local a5=0;local a6=aP["end"]-aP.start;while a50 then a4["end"]=a4["end"]+1;a4.chunks:push(d)end end;do return a4 end end;___BigInt_BigInt_Impl_.addLittle=function(a4,d,aR)local ac;local a5=aR;local a6=a4["end"]-a4.start;while a50 then a4["end"]=a4["end"]+1;a4.chunks:push(d)end end;___BigInt_BigInt_Impl_.opSubtract=function(an,aP)if an==nil then if aP==nil then do return nil end else local am=N.new()local a5=0;local a6=aP["end"]-aP.start;while a5=d then a4.chunks[a4.start+n]=ac-d;d=0;break end;a4.chunks[a4.start+n]=ac+32768-d;d=1 end end;d=a4;local n=d["end"]-d.start;while true do n=n-1;if not(n>=0)then break end;if d.chunks[d.start+n]==0 then d["end"]=d["end"]-1 else n=0 end end;do return d end else local am=N.new()local a5=0;local a6=aP["end"]-aP.start;while a5=d then aU.chunks[aU.start+n]=ac-d;d=0;break end;aU.chunks[aU.start+n]=ac+32768-d;d=1 end end;d=aU;local n=d["end"]-d.start;while true do n=n-1;if not(n>=0)then break end;if d.chunks[d.start+n]==0 then d["end"]=d["end"]-1 else n=0 end end;if d["end"]-d.start==0 then do return nil end else d.isNegative=true;do return d end end end else local aQ;if an["end"]-an.start>aP["end"]-aP.start then local am=N.new()local a5=0;local a6=an["end"]-an.start;while a50 then a4["end"]=a4["end"]+1;a4.chunks:push(d)end end;aQ=a4 else local am=N.new()local a5=0;local a6=aP["end"]-aP.start;while a50 then a4["end"]=a4["end"]+1;a4.chunks:push(d)end end;aQ=a4 end;aQ.isNegative=true;do return aQ end end else if aP.isNegative then local aV;local aW=aP.chunks;local aX=false;local aY=0;local aZ=0;if aW~=nil then aV=aW else aV=K.new()end;aY=aP.start;aZ=aP["end"]aX=not aP.isNegative;if an["end"]-an.start>aZ-aY then local am=N.new()local a5=0;local a6=an["end"]-an.start;while a50 then a4["end"]=a4["end"]+1;a4.chunks:push(d)end end;do return a4 end else local am=N.new()local a5=0;local a6=aZ-aY;while a50 then a4["end"]=a4["end"]+1;a4.chunks:push(d)end end;do return a4 end end else local d;if ___BigInt_BigInt_Impl_.greater(an,aP)then local am=N.new()local a5=0;local a6=an["end"]-an.start;while a5=d then a4.chunks[a4.start+n]=ac-d;d=0;break end;a4.chunks[a4.start+n]=ac+32768-d;d=1 end end;d=a4;local n=d["end"]-d.start;while true do n=n-1;if not(n>=0)then break end;if d.chunks[d.start+n]==0 then d["end"]=d["end"]-1 else n=0 end end;do return d end else local am=N.new()local a5=0;local a6=aP["end"]-aP.start;while a5=d then a4.chunks[a4.start+n]=ac-d;d=0;break end;a4.chunks[a4.start+n]=ac+32768-d;d=1 end end;d=a4;local n=d["end"]-d.start;while true do n=n-1;if not(n>=0)then break end;if d.chunks[d.start+n]==0 then d["end"]=d["end"]-1 else n=0 end end;if d["end"]-d.start==0 then do return nil end else d.isNegative=true;do return d end end end end end end end end;___BigInt_BigInt_Impl_.opIntSubtract=function(a4,aP)local a4=___BigInt_BigInt_Impl_.fromInt(a4)if a4==nil then if aP==nil then do return nil end else local am=N.new()local a5=0;local a6=aP["end"]-aP.start;while a5=d then a4.chunks[a4.start+n]=ac-d;d=0;break end;a4.chunks[a4.start+n]=ac+32768-d;d=1 end end;d=a4;local n=d["end"]-d.start;while true do n=n-1;if not(n>=0)then break end;if d.chunks[d.start+n]==0 then d["end"]=d["end"]-1 else n=0 end end;do return d end else local am=N.new()local a5=0;local a6=aP["end"]-aP.start;while a5=d then a4.chunks[a4.start+n]=ac-d;d=0;break end;a4.chunks[a4.start+n]=ac+32768-d;d=1 end end;d=a4;local n=d["end"]-d.start;while true do n=n-1;if not(n>=0)then break end;if d.chunks[d.start+n]==0 then d["end"]=d["end"]-1 else n=0 end end;if d["end"]-d.start==0 then do return nil end else d.isNegative=true;do return d end end end else local an;if a4["end"]-a4.start>aP["end"]-aP.start then local am=N.new()local a5=0;local a6=a4["end"]-a4.start;while a50 then a4["end"]=a4["end"]+1;a4.chunks:push(d)end end;an=a4 else local am=N.new()local a5=0;local a6=aP["end"]-aP.start;while a50 then aU["end"]=aU["end"]+1;aU.chunks:push(d)end end;an=aU end;an.isNegative=true;do return an end end else if aP.isNegative then local aV;local aW=aP.chunks;local aX=false;local aY=0;local aZ=0;if aW~=nil then aV=aW else aV=K.new()end;aY=aP.start;aZ=aP["end"]aX=not aP.isNegative;if a4["end"]-a4.start>aZ-aY then local am=N.new()local a5=0;local a6=a4["end"]-a4.start;while a50 then a4["end"]=a4["end"]+1;a4.chunks:push(d)end end;do return a4 end else local am=N.new()local a5=0;local a6=aZ-aY;while a50 then aU["end"]=aU["end"]+1;aU.chunks:push(d)end end;do return aU end end else local d;if ___BigInt_BigInt_Impl_.greater(a4,aP)then local am=N.new()local a5=0;local a6=a4["end"]-a4.start;while a5=d then a4.chunks[a4.start+n]=ac-d;d=0;break end;a4.chunks[a4.start+n]=ac+32768-d;d=1 end end;d=a4;local n=d["end"]-d.start;while true do n=n-1;if not(n>=0)then break end;if d.chunks[d.start+n]==0 then d["end"]=d["end"]-1 else n=0 end end;do return d end else local am=N.new()local a5=0;local a6=aP["end"]-aP.start;while a5=d then aU.chunks[aU.start+n]=ac-d;d=0;break end;aU.chunks[aU.start+n]=ac+32768-d;d=1 end end;d=aU;local n=d["end"]-d.start;while true do n=n-1;if not(n>=0)then break end;if d.chunks[d.start+n]==0 then d["end"]=d["end"]-1 else n=0 end end;if d["end"]-d.start==0 then do return nil end else d.isNegative=true;do return d end end end end end end end end;___BigInt_BigInt_Impl_.opDecrementAfter=function(an)if an==nil then local n=-1;if n==0 then an=nil else local am=N.new()if n<0 then am.isNegative=true;n=-n end;while n~=0 do am["end"]=am["end"]+1;am.chunks:push(T.band(n,32767))n=T.rshift(n,15)end;an=am end;do return nil end end;local am=N.new()local a5=0;local a6=an["end"]-an.start;while a50 then an["end"]=an["end"]+1;an.chunks:push(d)end else if an["end"]-an.start==1 and an.chunks[an.start]==1 then an=nil else local d=1;local a5=0;local a6=an["end"]-an.start;while a5=d then an.chunks[an.start+n]=ac-d;d=0;break end;an.chunks[an.start+n]=ac+32768-d;d=1 end end end;do return w end end;___BigInt_BigInt_Impl_.opDecrementBefore=function(an)if an==nil then local n=-1;if n==0 then an=nil else local am=N.new()if n<0 then am.isNegative=true;n=-n end;while n~=0 do am["end"]=am["end"]+1;am.chunks:push(T.band(n,32767))n=T.rshift(n,15)end;an=am end;local n=-1;if n==0 then do return nil end else local am=N.new()if n<0 then am.isNegative=true;n=-n end;while n~=0 do am["end"]=am["end"]+1;am.chunks:push(T.band(n,32767))n=T.rshift(n,15)end;do return am end end end;if an.isNegative then local d=1;local ac;local a5=0;local a6=an["end"]-an.start;while a50 then an["end"]=an["end"]+1;an.chunks:push(d)end;local am=N.new()local a5=0;local a6=an["end"]-an.start;while a5=d then an.chunks[an.start+n]=ac-d;d=0;break end;an.chunks[an.start+n]=ac+32768-d;d=1 end;local am=N.new()local a5=0;local a6=an["end"]-an.start;while a5=d then a4.chunks[a4.start+n]=ac-d;d=0;break end;a4.chunks[a4.start+n]=ac+32768-d;d=1 end end;d=a4;local n=d["end"]-d.start;while true do n=n-1;if not(n>=0)then break end;if d.chunks[d.start+n]==0 then d["end"]=d["end"]-1 else n=0 end end;do return d end else local am=N.new()local a5=0;local a6=aP["end"]-aP.start;while a5=d then a4.chunks[a4.start+n]=ac-d;d=0;break end;a4.chunks[a4.start+n]=ac+32768-d;d=1 end end;d=a4;local n=d["end"]-d.start;while true do n=n-1;if not(n>=0)then break end;if d.chunks[d.start+n]==0 then d["end"]=d["end"]-1 else n=0 end end;if d["end"]-d.start==0 then do return nil end else d.isNegative=true;do return d end end end end;local an;if a4["end"]-a4.start>aP["end"]-aP.start then local am=N.new()local a5=0;local a6=a4["end"]-a4.start;while a50 then a4["end"]=a4["end"]+1;a4.chunks:push(d)end end;an=a4 else local am=N.new()local a5=0;local a6=aP["end"]-aP.start;while a50 then aU["end"]=aU["end"]+1;aU.chunks:push(d)end end;an=aU end;an.isNegative=true;do return an end end;if aP.isNegative then local aV;local aW=aP.chunks;local aX=false;local aY=0;local aZ=0;if aW~=nil then aV=aW else aV=K.new()end;aY=aP.start;aZ=aP["end"]aX=not aP.isNegative;if a4["end"]-a4.start>aZ-aY then local am=N.new()local a5=0;local a6=a4["end"]-a4.start;while a50 then a4["end"]=a4["end"]+1;a4.chunks:push(d)end end;do return a4 end else local am=N.new()local a5=0;local a6=aZ-aY;while a50 then aU["end"]=aU["end"]+1;aU.chunks:push(d)end end;do return aU end end end;local d;if ___BigInt_BigInt_Impl_.greater(a4,aP)then local am=N.new()local a5=0;local a6=a4["end"]-a4.start;while a5=d then a4.chunks[a4.start+n]=ac-d;d=0;break end;a4.chunks[a4.start+n]=ac+32768-d;d=1 end end;d=a4;local n=d["end"]-d.start;while true do n=n-1;if not(n>=0)then break end;if d.chunks[d.start+n]==0 then d["end"]=d["end"]-1 else n=0 end end;do return d end else local am=N.new()local a5=0;local a6=aP["end"]-aP.start;while a5=d then aU.chunks[aU.start+n]=ac-d;d=0;break end;aU.chunks[aU.start+n]=ac+32768-d;d=1 end end;d=aU;local n=d["end"]-d.start;while true do n=n-1;if not(n>=0)then break end;if d.chunks[d.start+n]==0 then d["end"]=d["end"]-1 else n=0 end end;if d["end"]-d.start==0 then do return nil end else d.isNegative=true;do return d end end end end;___BigInt_BigInt_Impl_.__subtract=function(a4,aP)local d;if ___BigInt_BigInt_Impl_.greater(a4,aP)then local am=N.new()local a5=0;local a6=a4["end"]-a4.start;while a5=d then a4.chunks[a4.start+n]=ac-d;d=0;break end;a4.chunks[a4.start+n]=ac+32768-d;d=1 end end;d=a4;local n=d["end"]-d.start;while true do n=n-1;if not(n>=0)then break end;if d.chunks[d.start+n]==0 then d["end"]=d["end"]-1 else n=0 end end;do return d end end;local am=N.new()local a5=0;local a6=aP["end"]-aP.start;while a5=d then aU.chunks[aU.start+n]=ac-d;d=0;break end;aU.chunks[aU.start+n]=ac+32768-d;d=1 end end;d=aU;local n=d["end"]-d.start;while true do n=n-1;if not(n>=0)then break end;if d.chunks[d.start+n]==0 then d["end"]=d["end"]-1 else n=0 end end;if d["end"]-d.start==0 then do return nil end else d.isNegative=true;do return d end end end;___BigInt_BigInt_Impl_.subtractLong=function(a4,aP)local a5=0;local a6=aP["end"]-aP.start;while a5=d then a4.chunks[a4.start+n]=ac-d;d=0;break end;a4.chunks[a4.start+n]=ac+32768-d;d=1 end end;do return a4 end end;___BigInt_BigInt_Impl_.subtractLittle=function(a4,d,aR)local a5=aR;local a6=a4["end"]-a4.start;while a5=d then a4.chunks[a4.start+n]=ac-d;d=0;break end;a4.chunks[a4.start+n]=ac+32768-d;d=1 end end;___BigInt_BigInt_Impl_.negation=function(an)if an==nil then do return nil end end;local am=N.new()local a5=0;local a6=an["end"]-an.start;while a50 then aP["end"]=aP["end"]+1;aP.chunks:push(ac)end;do return aP end end;___BigInt_BigInt_Impl_.mul=function(a4,aP)if a4==nil or aP==nil then do return nil end end;if a4["end"]-a4.start==1 then if aP["end"]-aP.start==1 then do return ___BigInt_BigInt_Impl_.fromInt(a4.chunks[a4.start]*aP.chunks[aP.start])end end;local d=a4.chunks[a4.start]if d==1 then local am=N.new()local a5=0;local a6=aP["end"]-aP.start;while a50 then aT["end"]=aT["end"]+1;aT.chunks:push(ac)end;do return aT end end end;if aP["end"]-aP.start==1 then local d=aP.chunks[aP.start]if d==1 then local am=N.new()local a5=0;local a6=a4["end"]-a4.start;while a50 then aP["end"]=aP["end"]+1;aP.chunks:push(ac)end;do return aP end end end;local ao=T.rshift(M.nextPowerOfTwo((function()local aB;if a4["end"]-a4.start>aP["end"]-aP.start then aB=a4["end"]-a4.start else aB=aP["end"]-aP.start end;return aB end)()),1)local am=N.new(a4.chunks)local a_;if ao>=a4["end"]-a4.start then a_=nil else am.start=a4.start+ao;am["end"]=a4["end"]a_=am end;local a_=a_;local b0=ao;local n=0;if a4.start+b0>a4["end"]then b0=a4["end"]-a4.start end;while n=aP["end"]-aP.start then b2=nil else am.start=aP.start+ao;am["end"]=aP["end"]b2=am end;local b2=b2;local b0=ao;local n=0;if aP.start+b0>aP["end"]then b0=aP["end"]-aP.start end;while nb1["end"]-b1.start then local am=N.new()local a5=0;local a6=a_["end"]-a_.start;while a50 then a4["end"]=a4["end"]+1;a4.chunks:push(d)end end;an=a4 else local am=N.new()local a5=0;local a6=b1["end"]-b1.start;while a50 then a4["end"]=a4["end"]+1;a4.chunks:push(d)end end;an=a4 end;an.isNegative=true;aP=an else local am=N.new(a_.chunks)am.start=a_.start;am["end"]=a_["end"]am.isNegative=not a_.isNegative;local an=am;local aT=an;local d;if ___BigInt_BigInt_Impl_.greater(b1,aT)then local am=N.new()local a5=0;local a6=b1["end"]-b1.start;while a5=d then a4.chunks[a4.start+n]=ac-d;d=0;break end;a4.chunks[a4.start+n]=ac+32768-d;d=1 end end;d=a4;local n=d["end"]-d.start;while true do n=n-1;if not(n>=0)then break end;if d.chunks[d.start+n]==0 then d["end"]=d["end"]-1 else n=0 end end;aP=d else local am=N.new()local a5=0;local a6=aT["end"]-aT.start;while a5=d then a4.chunks[a4.start+n]=ac-d;d=0;break end;a4.chunks[a4.start+n]=ac+32768-d;d=1 end end;d=a4;local n=d["end"]-d.start;while true do n=n-1;if not(n>=0)then break end;if d.chunks[d.start+n]==0 then d["end"]=d["end"]-1 else n=0 end end;if d["end"]-d.start==0 then aP=nil else d.isNegative=true;aP=d end end end else if b1.isNegative then local am=N.new(b1.chunks)am.start=b1.start;am["end"]=b1["end"]am.isNegative=not b1.isNegative;local an=am;local aT=an;local d;if ___BigInt_BigInt_Impl_.greater(a_,aT)then local am=N.new()local a5=0;local a6=a_["end"]-a_.start;while a5=d then a4.chunks[a4.start+n]=ac-d;d=0;break end;a4.chunks[a4.start+n]=ac+32768-d;d=1 end end;d=a4;local n=d["end"]-d.start;while true do n=n-1;if not(n>=0)then break end;if d.chunks[d.start+n]==0 then d["end"]=d["end"]-1 else n=0 end end;aP=d else local am=N.new()local a5=0;local a6=aT["end"]-aT.start;while a5=d then a4.chunks[a4.start+n]=ac-d;d=0;break end;a4.chunks[a4.start+n]=ac+32768-d;d=1 end end;d=a4;local n=d["end"]-d.start;while true do n=n-1;if not(n>=0)then break end;if d.chunks[d.start+n]==0 then d["end"]=d["end"]-1 else n=0 end end;if d["end"]-d.start==0 then aP=nil else d.isNegative=true;aP=d end end else if a_["end"]-a_.start>b1["end"]-b1.start then local am=N.new()local a5=0;local a6=a_["end"]-a_.start;while a50 then a4["end"]=a4["end"]+1;a4.chunks:push(d)end end;aP=a4 else local am=N.new()local a5=0;local a6=b1["end"]-b1.start;while a50 then a4["end"]=a4["end"]+1;a4.chunks:push(d)end end;aP=a4 end end end end end;local aT;if b2==nil then if b3==nil then aT=nil else local am=N.new()local a5=0;local a6=b3["end"]-b3.start;while a5b3["end"]-b3.start then local am=N.new()local a5=0;local a6=b2["end"]-b2.start;while a50 then a4["end"]=a4["end"]+1;a4.chunks:push(d)end end;an=a4 else local am=N.new()local a5=0;local a6=b3["end"]-b3.start;while a50 then a4["end"]=a4["end"]+1;a4.chunks:push(d)end end;an=a4 end;an.isNegative=true;aT=an else local am=N.new(b2.chunks)am.start=b2.start;am["end"]=b2["end"]am.isNegative=not b2.isNegative;local an=am;local aP=an;local d;if ___BigInt_BigInt_Impl_.greater(b3,aP)then local am=N.new()local a5=0;local a6=b3["end"]-b3.start;while a5=d then a4.chunks[a4.start+n]=ac-d;d=0;break end;a4.chunks[a4.start+n]=ac+32768-d;d=1 end end;d=a4;local n=d["end"]-d.start;while true do n=n-1;if not(n>=0)then break end;if d.chunks[d.start+n]==0 then d["end"]=d["end"]-1 else n=0 end end;aT=d else local am=N.new()local a5=0;local a6=aP["end"]-aP.start;while a5=d then a4.chunks[a4.start+n]=ac-d;d=0;break end;a4.chunks[a4.start+n]=ac+32768-d;d=1 end end;d=a4;local n=d["end"]-d.start;while true do n=n-1;if not(n>=0)then break end;if d.chunks[d.start+n]==0 then d["end"]=d["end"]-1 else n=0 end end;if d["end"]-d.start==0 then aT=nil else d.isNegative=true;aT=d end end end else if b3.isNegative then local am=N.new(b3.chunks)am.start=b3.start;am["end"]=b3["end"]am.isNegative=not b3.isNegative;local an=am;local aP=an;local d;if ___BigInt_BigInt_Impl_.greater(b2,aP)then local am=N.new()local a5=0;local a6=b2["end"]-b2.start;while a5=d then a4.chunks[a4.start+n]=ac-d;d=0;break end;a4.chunks[a4.start+n]=ac+32768-d;d=1 end end;d=a4;local n=d["end"]-d.start;while true do n=n-1;if not(n>=0)then break end;if d.chunks[d.start+n]==0 then d["end"]=d["end"]-1 else n=0 end end;aT=d else local am=N.new()local a5=0;local a6=aP["end"]-aP.start;while a5=d then a4.chunks[a4.start+n]=ac-d;d=0;break end;a4.chunks[a4.start+n]=ac+32768-d;d=1 end end;d=a4;local n=d["end"]-d.start;while true do n=n-1;if not(n>=0)then break end;if d.chunks[d.start+n]==0 then d["end"]=d["end"]-1 else n=0 end end;if d["end"]-d.start==0 then aT=nil else d.isNegative=true;aT=d end end else if b2["end"]-b2.start>b3["end"]-b3.start then local am=N.new()local a5=0;local a6=b2["end"]-b2.start;while a50 then a4["end"]=a4["end"]+1;a4.chunks:push(d)end end;aT=a4 else local am=N.new()local a5=0;local a6=b3["end"]-b3.start;while a50 then a4["end"]=a4["end"]+1;a4.chunks:push(d)end end;aT=a4 end end end end end;local aP=___BigInt_BigInt_Impl_.mul(aP,aT)local aT;if b4==nil then if b5==nil then aT=nil else local am=N.new()local a5=0;local a6=b5["end"]-b5.start;while a5b5["end"]-b5.start then local am=N.new()local a5=0;local a6=b4["end"]-b4.start;while a50 then a4["end"]=a4["end"]+1;a4.chunks:push(d)end end;an=a4 else local am=N.new()local a5=0;local a6=b5["end"]-b5.start;while a50 then a4["end"]=a4["end"]+1;a4.chunks:push(d)end end;an=a4 end;an.isNegative=true;aT=an else local am=N.new(b4.chunks)am.start=b4.start;am["end"]=b4["end"]am.isNegative=not b4.isNegative;local an=am;local aP=an;local d;if ___BigInt_BigInt_Impl_.greater(b5,aP)then local am=N.new()local a5=0;local a6=b5["end"]-b5.start;while a5=d then a4.chunks[a4.start+n]=ac-d;d=0;break end;a4.chunks[a4.start+n]=ac+32768-d;d=1 end end;d=a4;local n=d["end"]-d.start;while true do n=n-1;if not(n>=0)then break end;if d.chunks[d.start+n]==0 then d["end"]=d["end"]-1 else n=0 end end;aT=d else local am=N.new()local a5=0;local a6=aP["end"]-aP.start;while a5=d then a4.chunks[a4.start+n]=ac-d;d=0;break end;a4.chunks[a4.start+n]=ac+32768-d;d=1 end end;d=a4;local n=d["end"]-d.start;while true do n=n-1;if not(n>=0)then break end;if d.chunks[d.start+n]==0 then d["end"]=d["end"]-1 else n=0 end end;if d["end"]-d.start==0 then aT=nil else d.isNegative=true;aT=d end end end else if b5.isNegative then local am=N.new(b5.chunks)am.start=b5.start;am["end"]=b5["end"]am.isNegative=not b5.isNegative;local an=am;local aP=an;local d;if ___BigInt_BigInt_Impl_.greater(b4,aP)then local am=N.new()local a5=0;local a6=b4["end"]-b4.start;while a5=d then a4.chunks[a4.start+n]=ac-d;d=0;break end;a4.chunks[a4.start+n]=ac+32768-d;d=1 end end;d=a4;local n=d["end"]-d.start;while true do n=n-1;if not(n>=0)then break end;if d.chunks[d.start+n]==0 then d["end"]=d["end"]-1 else n=0 end end;aT=d else local am=N.new()local a5=0;local a6=aP["end"]-aP.start;while a5=d then a4.chunks[a4.start+n]=ac-d;d=0;break end;a4.chunks[a4.start+n]=ac+32768-d;d=1 end end;d=a4;local n=d["end"]-d.start;while true do n=n-1;if not(n>=0)then break end;if d.chunks[d.start+n]==0 then d["end"]=d["end"]-1 else n=0 end end;if d["end"]-d.start==0 then aT=nil else d.isNegative=true;aT=d end end else if b4["end"]-b4.start>b5["end"]-b5.start then local am=N.new()local a5=0;local a6=b4["end"]-b4.start;while a50 then a4["end"]=a4["end"]+1;a4.chunks:push(d)end end;aT=a4 else local am=N.new()local a5=0;local a6=b5["end"]-b5.start;while a50 then a4["end"]=a4["end"]+1;a4.chunks:push(d)end end;aT=a4 end end end end end;local aP=___BigInt_BigInt_Impl_.opSubtract(aP,aT)local am=N.new()if b5==nil then local a5=0;local a6=ao;while a5ao then local am=N.new(b5.chunks)local aT;if ao>=b5["end"]-b5.start then aT=nil else am.start=b5.start+ao;am["end"]=b5["end"]aT=am end;local aT=aT;if aP==nil then if aT==nil then aP=nil else local am=N.new()local a5=0;local a6=aT["end"]-aT.start;while a5aT["end"]-aT.start then local am=N.new()local a5=0;local a6=aP["end"]-aP.start;while a50 then a4["end"]=a4["end"]+1;a4.chunks:push(d)end end;an=a4 else local am=N.new()local a5=0;local a6=aT["end"]-aT.start;while a50 then a4["end"]=a4["end"]+1;a4.chunks:push(d)end end;an=a4 end;an.isNegative=true;aP=an else local am=N.new(aP.chunks)am.start=aP.start;am["end"]=aP["end"]am.isNegative=not aP.isNegative;local an=am;local b6=an;local d;if ___BigInt_BigInt_Impl_.greater(aT,b6)then local am=N.new()local a5=0;local a6=aT["end"]-aT.start;while a5=d then a4.chunks[a4.start+n]=ac-d;d=0;break end;a4.chunks[a4.start+n]=ac+32768-d;d=1 end end;d=a4;local n=d["end"]-d.start;while true do n=n-1;if not(n>=0)then break end;if d.chunks[d.start+n]==0 then d["end"]=d["end"]-1 else n=0 end end;aP=d else local am=N.new()local a5=0;local a6=b6["end"]-b6.start;while a5=d then a4.chunks[a4.start+n]=ac-d;d=0;break end;a4.chunks[a4.start+n]=ac+32768-d;d=1 end end;d=a4;local n=d["end"]-d.start;while true do n=n-1;if not(n>=0)then break end;if d.chunks[d.start+n]==0 then d["end"]=d["end"]-1 else n=0 end end;if d["end"]-d.start==0 then aP=nil else d.isNegative=true;aP=d end end end else if aT.isNegative then local am=N.new(aT.chunks)am.start=aT.start;am["end"]=aT["end"]am.isNegative=not aT.isNegative;local an=am;local aT=an;local d;if ___BigInt_BigInt_Impl_.greater(aP,aT)then local am=N.new()local a5=0;local a6=aP["end"]-aP.start;while a5=d then a4.chunks[a4.start+n]=ac-d;d=0;break end;a4.chunks[a4.start+n]=ac+32768-d;d=1 end end;d=a4;local n=d["end"]-d.start;while true do n=n-1;if not(n>=0)then break end;if d.chunks[d.start+n]==0 then d["end"]=d["end"]-1 else n=0 end end;aP=d else local am=N.new()local a5=0;local a6=aT["end"]-aT.start;while a5=d then a4.chunks[a4.start+n]=ac-d;d=0;break end;a4.chunks[a4.start+n]=ac+32768-d;d=1 end end;d=a4;local n=d["end"]-d.start;while true do n=n-1;if not(n>=0)then break end;if d.chunks[d.start+n]==0 then d["end"]=d["end"]-1 else n=0 end end;if d["end"]-d.start==0 then aP=nil else d.isNegative=true;aP=d end end else if aP["end"]-aP.start>aT["end"]-aT.start then local am=N.new()local a5=0;local a6=aP["end"]-aP.start;while a50 then a4["end"]=a4["end"]+1;a4.chunks:push(d)end end;aP=a4 else local am=N.new()local a5=0;local a6=aT["end"]-aT.start;while a50 then a4["end"]=a4["end"]+1;a4.chunks:push(d)end end;aP=a4 end end end end end end end;if aP==nil then if a4~=nil then local a5=0;local a6=ao;while a5ao then local am=N.new(aP.chunks)local aT;if ao>=aP["end"]-aP.start then aT=nil else am.start=aP.start+ao;am["end"]=aP["end"]aT=am end;local aP=aT;if a4==nil then if aP==nil then a4=nil else local am=N.new()local a5=0;local a6=aP["end"]-aP.start;while a5aP["end"]-aP.start then local am=N.new()local a5=0;local a6=a4["end"]-a4.start;while a50 then a4["end"]=a4["end"]+1;a4.chunks:push(d)end end;an=a4 else local am=N.new()local a5=0;local a6=aP["end"]-aP.start;while a50 then aU["end"]=aU["end"]+1;aU.chunks:push(d)end end;an=aU end;an.isNegative=true;a4=an else local am=N.new(a4.chunks)am.start=a4.start;am["end"]=a4["end"]am.isNegative=not a4.isNegative;local an=am;local aT=an;local d;if ___BigInt_BigInt_Impl_.greater(aP,aT)then local am=N.new()local a5=0;local a6=aP["end"]-aP.start;while a5=d then aU.chunks[aU.start+n]=ac-d;d=0;break end;aU.chunks[aU.start+n]=ac+32768-d;d=1 end end;d=aU;local n=d["end"]-d.start;while true do n=n-1;if not(n>=0)then break end;if d.chunks[d.start+n]==0 then d["end"]=d["end"]-1 else n=0 end end;a4=d else local am=N.new()local a5=0;local a6=aT["end"]-aT.start;while a5=d then aU.chunks[aU.start+n]=ac-d;d=0;break end;aU.chunks[aU.start+n]=ac+32768-d;d=1 end end;d=aU;local n=d["end"]-d.start;while true do n=n-1;if not(n>=0)then break end;if d.chunks[d.start+n]==0 then d["end"]=d["end"]-1 else n=0 end end;if d["end"]-d.start==0 then a4=nil else d.isNegative=true;a4=d end end end else if aP.isNegative then local am=N.new(aP.chunks)am.start=aP.start;am["end"]=aP["end"]am.isNegative=not aP.isNegative;local an=am;local aP=an;local d;if ___BigInt_BigInt_Impl_.greater(a4,aP)then local am=N.new()local a5=0;local a6=a4["end"]-a4.start;while a5=d then aU.chunks[aU.start+n]=ac-d;d=0;break end;aU.chunks[aU.start+n]=ac+32768-d;d=1 end end;d=aU;local n=d["end"]-d.start;while true do n=n-1;if not(n>=0)then break end;if d.chunks[d.start+n]==0 then d["end"]=d["end"]-1 else n=0 end end;a4=d else local am=N.new()local a5=0;local a6=aP["end"]-aP.start;while a5=d then aU.chunks[aU.start+n]=ac-d;d=0;break end;aU.chunks[aU.start+n]=ac+32768-d;d=1 end end;d=aU;local n=d["end"]-d.start;while true do n=n-1;if not(n>=0)then break end;if d.chunks[d.start+n]==0 then d["end"]=d["end"]-1 else n=0 end end;if d["end"]-d.start==0 then a4=nil else d.isNegative=true;a4=d end end else if a4["end"]-a4.start>aP["end"]-aP.start then local am=N.new()local a5=0;local a6=a4["end"]-a4.start;while a50 then aU["end"]=aU["end"]+1;aU.chunks:push(d)end end;a4=aU else local am=N.new()local a5=0;local a6=aP["end"]-aP.start;while a50 then aU["end"]=aU["end"]+1;aU.chunks:push(d)end end;a4=aU end end end end end end end;if a4~=nil then local a5=0;local a6=a4["end"]-a4.start;while a5ao then local am=N.new(b7.chunks)local aT;if ao>=b7["end"]-b7.start then aT=nil else am.start=b7.start+ao;am["end"]=b7["end"]aT=am end;local aT=aT;if aP==nil then if aT==nil then aP=nil else local am=N.new()local a5=0;local a6=aT["end"]-aT.start;while a5aT["end"]-aT.start then local am=N.new()local a5=0;local a6=aP["end"]-aP.start;while a50 then a4["end"]=a4["end"]+1;a4.chunks:push(d)end end;an=a4 else local am=N.new()local a5=0;local a6=aT["end"]-aT.start;while a50 then a4["end"]=a4["end"]+1;a4.chunks:push(d)end end;an=a4 end;an.isNegative=true;aP=an else local am=N.new(aP.chunks)am.start=aP.start;am["end"]=aP["end"]am.isNegative=not aP.isNegative;local an=am;local b6=an;local d;if ___BigInt_BigInt_Impl_.greater(aT,b6)then local am=N.new()local a5=0;local a6=aT["end"]-aT.start;while a5=d then a4.chunks[a4.start+n]=ac-d;d=0;break end;a4.chunks[a4.start+n]=ac+32768-d;d=1 end end;d=a4;local n=d["end"]-d.start;while true do n=n-1;if not(n>=0)then break end;if d.chunks[d.start+n]==0 then d["end"]=d["end"]-1 else n=0 end end;aP=d else local am=N.new()local a5=0;local a6=b6["end"]-b6.start;while a5=d then a4.chunks[a4.start+n]=ac-d;d=0;break end;a4.chunks[a4.start+n]=ac+32768-d;d=1 end end;d=a4;local n=d["end"]-d.start;while true do n=n-1;if not(n>=0)then break end;if d.chunks[d.start+n]==0 then d["end"]=d["end"]-1 else n=0 end end;if d["end"]-d.start==0 then aP=nil else d.isNegative=true;aP=d end end end else if aT.isNegative then local am=N.new(aT.chunks)am.start=aT.start;am["end"]=aT["end"]am.isNegative=not aT.isNegative;local an=am;local aT=an;local d;if ___BigInt_BigInt_Impl_.greater(aP,aT)then local am=N.new()local a5=0;local a6=aP["end"]-aP.start;while a5=d then a4.chunks[a4.start+n]=ac-d;d=0;break end;a4.chunks[a4.start+n]=ac+32768-d;d=1 end end;d=a4;local n=d["end"]-d.start;while true do n=n-1;if not(n>=0)then break end;if d.chunks[d.start+n]==0 then d["end"]=d["end"]-1 else n=0 end end;aP=d else local am=N.new()local a5=0;local a6=aT["end"]-aT.start;while a5=d then a4.chunks[a4.start+n]=ac-d;d=0;break end;a4.chunks[a4.start+n]=ac+32768-d;d=1 end end;d=a4;local n=d["end"]-d.start;while true do n=n-1;if not(n>=0)then break end;if d.chunks[d.start+n]==0 then d["end"]=d["end"]-1 else n=0 end end;if d["end"]-d.start==0 then aP=nil else d.isNegative=true;aP=d end end else if aP["end"]-aP.start>aT["end"]-aT.start then local am=N.new()local a5=0;local a6=aP["end"]-aP.start;while a50 then a4["end"]=a4["end"]+1;a4.chunks:push(d)end end;aP=a4 else local am=N.new()local a5=0;local a6=aT["end"]-aT.start;while a50 then a4["end"]=a4["end"]+1;a4.chunks:push(d)end end;aP=a4 end end end end end end end;if aP==nil then if a4~=nil then local a5=0;local a6=ao;while a5ao then local am=N.new(aP.chunks)local aT;if ao>=aP["end"]-aP.start then aT=nil else am.start=aP.start+ao;am["end"]=aP["end"]aT=am end;local aP=aT;if a4==nil then if aP==nil then a4=nil else local am=N.new()local a5=0;local a6=aP["end"]-aP.start;while a5aP["end"]-aP.start then local am=N.new()local a5=0;local a6=a4["end"]-a4.start;while a50 then a4["end"]=a4["end"]+1;a4.chunks:push(d)end end;an=a4 else local am=N.new()local a5=0;local a6=aP["end"]-aP.start;while a50 then aU["end"]=aU["end"]+1;aU.chunks:push(d)end end;an=aU end;an.isNegative=true;a4=an else local am=N.new(a4.chunks)am.start=a4.start;am["end"]=a4["end"]am.isNegative=not a4.isNegative;local an=am;local aT=an;local d;if ___BigInt_BigInt_Impl_.greater(aP,aT)then local am=N.new()local a5=0;local a6=aP["end"]-aP.start;while a5=d then aU.chunks[aU.start+n]=ac-d;d=0;break end;aU.chunks[aU.start+n]=ac+32768-d;d=1 end end;d=aU;local n=d["end"]-d.start;while true do n=n-1;if not(n>=0)then break end;if d.chunks[d.start+n]==0 then d["end"]=d["end"]-1 else n=0 end end;a4=d else local am=N.new()local a5=0;local a6=aT["end"]-aT.start;while a5=d then aU.chunks[aU.start+n]=ac-d;d=0;break end;aU.chunks[aU.start+n]=ac+32768-d;d=1 end end;d=aU;local n=d["end"]-d.start;while true do n=n-1;if not(n>=0)then break end;if d.chunks[d.start+n]==0 then d["end"]=d["end"]-1 else n=0 end end;if d["end"]-d.start==0 then a4=nil else d.isNegative=true;a4=d end end end else if aP.isNegative then local am=N.new(aP.chunks)am.start=aP.start;am["end"]=aP["end"]am.isNegative=not aP.isNegative;local an=am;local aP=an;local d;if ___BigInt_BigInt_Impl_.greater(a4,aP)then local am=N.new()local a5=0;local a6=a4["end"]-a4.start;while a5=d then aU.chunks[aU.start+n]=ac-d;d=0;break end;aU.chunks[aU.start+n]=ac+32768-d;d=1 end end;d=aU;local n=d["end"]-d.start;while true do n=n-1;if not(n>=0)then break end;if d.chunks[d.start+n]==0 then d["end"]=d["end"]-1 else n=0 end end;a4=d else local am=N.new()local a5=0;local a6=aP["end"]-aP.start;while a5=d then aU.chunks[aU.start+n]=ac-d;d=0;break end;aU.chunks[aU.start+n]=ac+32768-d;d=1 end end;d=aU;local n=d["end"]-d.start;while true do n=n-1;if not(n>=0)then break end;if d.chunks[d.start+n]==0 then d["end"]=d["end"]-1 else n=0 end end;if d["end"]-d.start==0 then a4=nil else d.isNegative=true;a4=d end end else if a4["end"]-a4.start>aP["end"]-aP.start then local am=N.new()local a5=0;local a6=a4["end"]-a4.start;while a50 then aU["end"]=aU["end"]+1;aU.chunks:push(d)end end;a4=aU else local am=N.new()local a5=0;local a6=aP["end"]-aP.start;while a50 then aU["end"]=aU["end"]+1;aU.chunks:push(d)end end;a4=aU end end end end end end end;if a4~=nil then local a5=0;local a6=a4["end"]-a4.start;while a5=32768 then b8["end"]=b8["end"]+1;b8.chunks:unshift(T.rshift(b7,15))b8["end"]=b8["end"]+1;b8.chunks:unshift(T.band(b7,32767))else b8["end"]=b8["end"]+1;b8.chunks:unshift(b7)end;b9=R.int(_G.math.fmod(ac,d))if not(n>0)then break end end;w=A({__fields__={quotient=true,remainder=true},quotient=b8,remainder=___BigInt_BigInt_Impl_.fromInt(b9)})end else w=___BigInt_BigInt_Impl_.divModLong(a4,aP)end end else w=___BigInt_BigInt_Impl_.divModLong(a4,aP)end;if w.remainder~=nil then local an=w.remainder;an.isNegative=true end else local am=N.new(an.chunks)am.start=an.start;am["end"]=an["end"]am.isNegative=not an.isNegative;local an=am;local a4=an;if aP["end"]-aP.start<=2 then if a4["end"]-a4.start<=2 then w=A({__fields__={quotient=true,remainder=true},quotient=___BigInt_BigInt_Impl_.fromInt(R.int(___BigInt_BigInt_Impl_.toInt(a4)/___BigInt_BigInt_Impl_.toInt(aP))),remainder=___BigInt_BigInt_Impl_.fromInt(R.int(_G.math.fmod(___BigInt_BigInt_Impl_.toInt(a4),___BigInt_BigInt_Impl_.toInt(aP))))})else if aP["end"]-aP.start==1 then if aP.chunks[aP.start]==1 then w=A({__fields__={quotient=true,remainder=true},quotient=a4,remainder=nil})else local d=___BigInt_BigInt_Impl_.toInt(aP)local n=a4["end"]-a4.start-1;local ac=T.lshift(a4.chunks[a4.start+n],15)n=n-1;local ac=T.bor(ac,a4.chunks[a4.start+n])local b8=___BigInt_BigInt_Impl_.fromInt(R.int(ac/d))local b9=R.int(_G.math.fmod(ac,d))local b7;while true do n=n-1;ac=T.bor(T.lshift(b9,15),a4.chunks[a4.start+n])b7=R.int(ac/d)if b7>=32768 then b8["end"]=b8["end"]+1;b8.chunks:unshift(T.rshift(b7,15))b8["end"]=b8["end"]+1;b8.chunks:unshift(T.band(b7,32767))else b8["end"]=b8["end"]+1;b8.chunks:unshift(b7)end;b9=R.int(_G.math.fmod(ac,d))if not(n>0)then break end end;w=A({__fields__={quotient=true,remainder=true},quotient=b8,remainder=___BigInt_BigInt_Impl_.fromInt(b9)})end else w=___BigInt_BigInt_Impl_.divModLong(a4,aP)end end else w=___BigInt_BigInt_Impl_.divModLong(a4,aP)end;if w.quotient~=nil then local an=w.quotient;an.isNegative=true end;if w.remainder~=nil then local an=w.remainder;an.isNegative=true end end else if aP.isNegative then local am=N.new(aP.chunks)am.start=aP.start;am["end"]=aP["end"]am.isNegative=not aP.isNegative;local aQ=am;local aP=aQ;if aP["end"]-aP.start<=2 then if an["end"]-an.start<=2 then w=A({__fields__={quotient=true,remainder=true},quotient=___BigInt_BigInt_Impl_.fromInt(R.int(___BigInt_BigInt_Impl_.toInt(an)/___BigInt_BigInt_Impl_.toInt(aP))),remainder=___BigInt_BigInt_Impl_.fromInt(R.int(_G.math.fmod(___BigInt_BigInt_Impl_.toInt(an),___BigInt_BigInt_Impl_.toInt(aP))))})else if aP["end"]-aP.start==1 then if aP.chunks[aP.start]==1 then w=A({__fields__={quotient=true,remainder=true},quotient=an,remainder=nil})else local d=___BigInt_BigInt_Impl_.toInt(aP)local n=an["end"]-an.start-1;local ac=T.lshift(an.chunks[an.start+n],15)n=n-1;local ac=T.bor(ac,an.chunks[an.start+n])local b8=___BigInt_BigInt_Impl_.fromInt(R.int(ac/d))local b9=R.int(_G.math.fmod(ac,d))local b7;while true do n=n-1;ac=T.bor(T.lshift(b9,15),an.chunks[an.start+n])b7=R.int(ac/d)if b7>=32768 then b8["end"]=b8["end"]+1;b8.chunks:unshift(T.rshift(b7,15))b8["end"]=b8["end"]+1;b8.chunks:unshift(T.band(b7,32767))else b8["end"]=b8["end"]+1;b8.chunks:unshift(b7)end;b9=R.int(_G.math.fmod(ac,d))if not(n>0)then break end end;w=A({__fields__={quotient=true,remainder=true},quotient=b8,remainder=___BigInt_BigInt_Impl_.fromInt(b9)})end else w=___BigInt_BigInt_Impl_.divModLong(an,aP)end end else w=___BigInt_BigInt_Impl_.divModLong(an,aP)end;if w.quotient~=nil then local an=w.quotient;an.isNegative=true end else if aP["end"]-aP.start<=2 then if an["end"]-an.start<=2 then w=A({__fields__={quotient=true,remainder=true},quotient=___BigInt_BigInt_Impl_.fromInt(R.int(___BigInt_BigInt_Impl_.toInt(an)/___BigInt_BigInt_Impl_.toInt(aP))),remainder=___BigInt_BigInt_Impl_.fromInt(R.int(_G.math.fmod(___BigInt_BigInt_Impl_.toInt(an),___BigInt_BigInt_Impl_.toInt(aP))))})else if aP["end"]-aP.start==1 then if aP.chunks[aP.start]==1 then w=A({__fields__={quotient=true,remainder=true},quotient=an,remainder=nil})else local d=___BigInt_BigInt_Impl_.toInt(aP)local n=an["end"]-an.start-1;local ac=T.lshift(an.chunks[an.start+n],15)n=n-1;local ac=T.bor(ac,an.chunks[an.start+n])local b8=___BigInt_BigInt_Impl_.fromInt(R.int(ac/d))local b9=R.int(_G.math.fmod(ac,d))local b7;while true do n=n-1;ac=T.bor(T.lshift(b9,15),an.chunks[an.start+n])b7=R.int(ac/d)if b7>=32768 then b8["end"]=b8["end"]+1;b8.chunks:unshift(T.rshift(b7,15))b8["end"]=b8["end"]+1;b8.chunks:unshift(T.band(b7,32767))else b8["end"]=b8["end"]+1;b8.chunks:unshift(b7)end;b9=R.int(_G.math.fmod(ac,d))if not(n>0)then break end end;w=A({__fields__={quotient=true,remainder=true},quotient=b8,remainder=___BigInt_BigInt_Impl_.fromInt(b9)})end else w=___BigInt_BigInt_Impl_.divModLong(an,aP)end end else w=___BigInt_BigInt_Impl_.divModLong(an,aP)end end end;ad=w end end end;do return ad.quotient end end;___BigInt_BigInt_Impl_.opIntDiv=function(a4,aP)local ba=___BigInt_BigInt_Impl_.fromInt(a4)if aP==nil then _G.error(__haxe_Exception.thrown("Error '/', divisor can't be 0"),0)end;local ad;if ba==nil then ad=A({__fields__={quotient=true,remainder=true},quotient=nil,remainder=nil})else if ___BigInt_BigInt_Impl_.equal(aP,___BigInt_BigInt_Impl_.fromInt(1))then local am=N.new()local a5=0;local a6=ba["end"]-ba.start;while a5=32768 then b8["end"]=b8["end"]+1;b8.chunks:unshift(T.rshift(b7,15))b8["end"]=b8["end"]+1;b8.chunks:unshift(T.band(b7,32767))else b8["end"]=b8["end"]+1;b8.chunks:unshift(b7)end;b9=R.int(_G.math.fmod(ac,d))if not(n>0)then break end end;w=A({__fields__={quotient=true,remainder=true},quotient=b8,remainder=___BigInt_BigInt_Impl_.fromInt(b9)})end else w=___BigInt_BigInt_Impl_.divModLong(a4,aP)end end else w=___BigInt_BigInt_Impl_.divModLong(a4,aP)end;if w.remainder~=nil then local an=w.remainder;an.isNegative=true end else local am=N.new(ba.chunks)am.start=ba.start;am["end"]=ba["end"]am.isNegative=not ba.isNegative;local an=am;local a4=an;if aP["end"]-aP.start<=2 then if a4["end"]-a4.start<=2 then w=A({__fields__={quotient=true,remainder=true},quotient=___BigInt_BigInt_Impl_.fromInt(R.int(___BigInt_BigInt_Impl_.toInt(a4)/___BigInt_BigInt_Impl_.toInt(aP))),remainder=___BigInt_BigInt_Impl_.fromInt(R.int(_G.math.fmod(___BigInt_BigInt_Impl_.toInt(a4),___BigInt_BigInt_Impl_.toInt(aP))))})else if aP["end"]-aP.start==1 then if aP.chunks[aP.start]==1 then w=A({__fields__={quotient=true,remainder=true},quotient=a4,remainder=nil})else local d=___BigInt_BigInt_Impl_.toInt(aP)local n=a4["end"]-a4.start-1;local ac=T.lshift(a4.chunks[a4.start+n],15)n=n-1;local ac=T.bor(ac,a4.chunks[a4.start+n])local b8=___BigInt_BigInt_Impl_.fromInt(R.int(ac/d))local b9=R.int(_G.math.fmod(ac,d))local b7;while true do n=n-1;ac=T.bor(T.lshift(b9,15),a4.chunks[a4.start+n])b7=R.int(ac/d)if b7>=32768 then b8["end"]=b8["end"]+1;b8.chunks:unshift(T.rshift(b7,15))b8["end"]=b8["end"]+1;b8.chunks:unshift(T.band(b7,32767))else b8["end"]=b8["end"]+1;b8.chunks:unshift(b7)end;b9=R.int(_G.math.fmod(ac,d))if not(n>0)then break end end;w=A({__fields__={quotient=true,remainder=true},quotient=b8,remainder=___BigInt_BigInt_Impl_.fromInt(b9)})end else w=___BigInt_BigInt_Impl_.divModLong(a4,aP)end end else w=___BigInt_BigInt_Impl_.divModLong(a4,aP)end;if w.quotient~=nil then local an=w.quotient;an.isNegative=true end;if w.remainder~=nil then local an=w.remainder;an.isNegative=true end end else if aP.isNegative then local am=N.new(aP.chunks)am.start=aP.start;am["end"]=aP["end"]am.isNegative=not aP.isNegative;local an=am;local aP=an;if aP["end"]-aP.start<=2 then if ba["end"]-ba.start<=2 then w=A({__fields__={quotient=true,remainder=true},quotient=___BigInt_BigInt_Impl_.fromInt(R.int(___BigInt_BigInt_Impl_.toInt(ba)/___BigInt_BigInt_Impl_.toInt(aP))),remainder=___BigInt_BigInt_Impl_.fromInt(R.int(_G.math.fmod(___BigInt_BigInt_Impl_.toInt(ba),___BigInt_BigInt_Impl_.toInt(aP))))})else if aP["end"]-aP.start==1 then if aP.chunks[aP.start]==1 then w=A({__fields__={quotient=true,remainder=true},quotient=ba,remainder=nil})else local d=___BigInt_BigInt_Impl_.toInt(aP)local n=ba["end"]-ba.start-1;local ac=T.lshift(ba.chunks[ba.start+n],15)n=n-1;local ac=T.bor(ac,ba.chunks[ba.start+n])local b8=___BigInt_BigInt_Impl_.fromInt(R.int(ac/d))local b9=R.int(_G.math.fmod(ac,d))local b7;while true do n=n-1;ac=T.bor(T.lshift(b9,15),ba.chunks[ba.start+n])b7=R.int(ac/d)if b7>=32768 then b8["end"]=b8["end"]+1;b8.chunks:unshift(T.rshift(b7,15))b8["end"]=b8["end"]+1;b8.chunks:unshift(T.band(b7,32767))else b8["end"]=b8["end"]+1;b8.chunks:unshift(b7)end;b9=R.int(_G.math.fmod(ac,d))if not(n>0)then break end end;w=A({__fields__={quotient=true,remainder=true},quotient=b8,remainder=___BigInt_BigInt_Impl_.fromInt(b9)})end else w=___BigInt_BigInt_Impl_.divModLong(ba,aP)end end else w=___BigInt_BigInt_Impl_.divModLong(ba,aP)end;if w.quotient~=nil then local an=w.quotient;an.isNegative=true end else if aP["end"]-aP.start<=2 then if ba["end"]-ba.start<=2 then w=A({__fields__={quotient=true,remainder=true},quotient=___BigInt_BigInt_Impl_.fromInt(R.int(___BigInt_BigInt_Impl_.toInt(ba)/___BigInt_BigInt_Impl_.toInt(aP))),remainder=___BigInt_BigInt_Impl_.fromInt(R.int(_G.math.fmod(___BigInt_BigInt_Impl_.toInt(ba),___BigInt_BigInt_Impl_.toInt(aP))))})else if aP["end"]-aP.start==1 then if aP.chunks[aP.start]==1 then w=A({__fields__={quotient=true,remainder=true},quotient=ba,remainder=nil})else local d=___BigInt_BigInt_Impl_.toInt(aP)local n=ba["end"]-ba.start-1;local ac=T.lshift(ba.chunks[ba.start+n],15)n=n-1;local ac=T.bor(ac,ba.chunks[ba.start+n])local b8=___BigInt_BigInt_Impl_.fromInt(R.int(ac/d))local b9=R.int(_G.math.fmod(ac,d))local b7;while true do n=n-1;ac=T.bor(T.lshift(b9,15),ba.chunks[ba.start+n])b7=R.int(ac/d)if b7>=32768 then b8["end"]=b8["end"]+1;b8.chunks:unshift(T.rshift(b7,15))b8["end"]=b8["end"]+1;b8.chunks:unshift(T.band(b7,32767))else b8["end"]=b8["end"]+1;b8.chunks:unshift(b7)end;b9=R.int(_G.math.fmod(ac,d))if not(n>0)then break end end;w=A({__fields__={quotient=true,remainder=true},quotient=b8,remainder=___BigInt_BigInt_Impl_.fromInt(b9)})end else w=___BigInt_BigInt_Impl_.divModLong(ba,aP)end end else w=___BigInt_BigInt_Impl_.divModLong(ba,aP)end end end;ad=w end end end;do return ad.quotient end end;___BigInt_BigInt_Impl_.opModulo=function(an,aP)if aP==nil then _G.error(__haxe_Exception.thrown("Error '/', divisor can't be 0"),0)end;local ad;if an==nil then ad=A({__fields__={quotient=true,remainder=true},quotient=nil,remainder=nil})else if ___BigInt_BigInt_Impl_.equal(aP,___BigInt_BigInt_Impl_.fromInt(1))then local am=N.new()local a5=0;local a6=an["end"]-an.start;while a5=32768 then b8["end"]=b8["end"]+1;b8.chunks:unshift(T.rshift(b7,15))b8["end"]=b8["end"]+1;b8.chunks:unshift(T.band(b7,32767))else b8["end"]=b8["end"]+1;b8.chunks:unshift(b7)end;b9=R.int(_G.math.fmod(ac,d))if not(n>0)then break end end;w=A({__fields__={quotient=true,remainder=true},quotient=b8,remainder=___BigInt_BigInt_Impl_.fromInt(b9)})end else w=___BigInt_BigInt_Impl_.divModLong(a4,aP)end end else w=___BigInt_BigInt_Impl_.divModLong(a4,aP)end;if w.remainder~=nil then local an=w.remainder;an.isNegative=true end else local am=N.new(an.chunks)am.start=an.start;am["end"]=an["end"]am.isNegative=not an.isNegative;local an=am;local a4=an;if aP["end"]-aP.start<=2 then if a4["end"]-a4.start<=2 then w=A({__fields__={quotient=true,remainder=true},quotient=___BigInt_BigInt_Impl_.fromInt(R.int(___BigInt_BigInt_Impl_.toInt(a4)/___BigInt_BigInt_Impl_.toInt(aP))),remainder=___BigInt_BigInt_Impl_.fromInt(R.int(_G.math.fmod(___BigInt_BigInt_Impl_.toInt(a4),___BigInt_BigInt_Impl_.toInt(aP))))})else if aP["end"]-aP.start==1 then if aP.chunks[aP.start]==1 then w=A({__fields__={quotient=true,remainder=true},quotient=a4,remainder=nil})else local d=___BigInt_BigInt_Impl_.toInt(aP)local n=a4["end"]-a4.start-1;local ac=T.lshift(a4.chunks[a4.start+n],15)n=n-1;local ac=T.bor(ac,a4.chunks[a4.start+n])local b8=___BigInt_BigInt_Impl_.fromInt(R.int(ac/d))local b9=R.int(_G.math.fmod(ac,d))local b7;while true do n=n-1;ac=T.bor(T.lshift(b9,15),a4.chunks[a4.start+n])b7=R.int(ac/d)if b7>=32768 then b8["end"]=b8["end"]+1;b8.chunks:unshift(T.rshift(b7,15))b8["end"]=b8["end"]+1;b8.chunks:unshift(T.band(b7,32767))else b8["end"]=b8["end"]+1;b8.chunks:unshift(b7)end;b9=R.int(_G.math.fmod(ac,d))if not(n>0)then break end end;w=A({__fields__={quotient=true,remainder=true},quotient=b8,remainder=___BigInt_BigInt_Impl_.fromInt(b9)})end else w=___BigInt_BigInt_Impl_.divModLong(a4,aP)end end else w=___BigInt_BigInt_Impl_.divModLong(a4,aP)end;if w.quotient~=nil then local an=w.quotient;an.isNegative=true end;if w.remainder~=nil then local an=w.remainder;an.isNegative=true end end else if aP.isNegative then local am=N.new(aP.chunks)am.start=aP.start;am["end"]=aP["end"]am.isNegative=not aP.isNegative;local aQ=am;local aP=aQ;if aP["end"]-aP.start<=2 then if an["end"]-an.start<=2 then w=A({__fields__={quotient=true,remainder=true},quotient=___BigInt_BigInt_Impl_.fromInt(R.int(___BigInt_BigInt_Impl_.toInt(an)/___BigInt_BigInt_Impl_.toInt(aP))),remainder=___BigInt_BigInt_Impl_.fromInt(R.int(_G.math.fmod(___BigInt_BigInt_Impl_.toInt(an),___BigInt_BigInt_Impl_.toInt(aP))))})else if aP["end"]-aP.start==1 then if aP.chunks[aP.start]==1 then w=A({__fields__={quotient=true,remainder=true},quotient=an,remainder=nil})else local d=___BigInt_BigInt_Impl_.toInt(aP)local n=an["end"]-an.start-1;local ac=T.lshift(an.chunks[an.start+n],15)n=n-1;local ac=T.bor(ac,an.chunks[an.start+n])local b8=___BigInt_BigInt_Impl_.fromInt(R.int(ac/d))local b9=R.int(_G.math.fmod(ac,d))local b7;while true do n=n-1;ac=T.bor(T.lshift(b9,15),an.chunks[an.start+n])b7=R.int(ac/d)if b7>=32768 then b8["end"]=b8["end"]+1;b8.chunks:unshift(T.rshift(b7,15))b8["end"]=b8["end"]+1;b8.chunks:unshift(T.band(b7,32767))else b8["end"]=b8["end"]+1;b8.chunks:unshift(b7)end;b9=R.int(_G.math.fmod(ac,d))if not(n>0)then break end end;w=A({__fields__={quotient=true,remainder=true},quotient=b8,remainder=___BigInt_BigInt_Impl_.fromInt(b9)})end else w=___BigInt_BigInt_Impl_.divModLong(an,aP)end end else w=___BigInt_BigInt_Impl_.divModLong(an,aP)end;if w.quotient~=nil then local an=w.quotient;an.isNegative=true end else if aP["end"]-aP.start<=2 then if an["end"]-an.start<=2 then w=A({__fields__={quotient=true,remainder=true},quotient=___BigInt_BigInt_Impl_.fromInt(R.int(___BigInt_BigInt_Impl_.toInt(an)/___BigInt_BigInt_Impl_.toInt(aP))),remainder=___BigInt_BigInt_Impl_.fromInt(R.int(_G.math.fmod(___BigInt_BigInt_Impl_.toInt(an),___BigInt_BigInt_Impl_.toInt(aP))))})else if aP["end"]-aP.start==1 then if aP.chunks[aP.start]==1 then w=A({__fields__={quotient=true,remainder=true},quotient=an,remainder=nil})else local d=___BigInt_BigInt_Impl_.toInt(aP)local n=an["end"]-an.start-1;local ac=T.lshift(an.chunks[an.start+n],15)n=n-1;local ac=T.bor(ac,an.chunks[an.start+n])local b8=___BigInt_BigInt_Impl_.fromInt(R.int(ac/d))local b9=R.int(_G.math.fmod(ac,d))local b7;while true do n=n-1;ac=T.bor(T.lshift(b9,15),an.chunks[an.start+n])b7=R.int(ac/d)if b7>=32768 then b8["end"]=b8["end"]+1;b8.chunks:unshift(T.rshift(b7,15))b8["end"]=b8["end"]+1;b8.chunks:unshift(T.band(b7,32767))else b8["end"]=b8["end"]+1;b8.chunks:unshift(b7)end;b9=R.int(_G.math.fmod(ac,d))if not(n>0)then break end end;w=A({__fields__={quotient=true,remainder=true},quotient=b8,remainder=___BigInt_BigInt_Impl_.fromInt(b9)})end else w=___BigInt_BigInt_Impl_.divModLong(an,aP)end end else w=___BigInt_BigInt_Impl_.divModLong(an,aP)end end end;ad=w end end end;do return ad.remainder end end;___BigInt_BigInt_Impl_.opIntModulo=function(a4,aP)local ba=___BigInt_BigInt_Impl_.fromInt(a4)if aP==nil then _G.error(__haxe_Exception.thrown("Error '/', divisor can't be 0"),0)end;local ad;if ba==nil then ad=A({__fields__={quotient=true,remainder=true},quotient=nil,remainder=nil})else if ___BigInt_BigInt_Impl_.equal(aP,___BigInt_BigInt_Impl_.fromInt(1))then local am=N.new()local a5=0;local a6=ba["end"]-ba.start;while a5=32768 then b8["end"]=b8["end"]+1;b8.chunks:unshift(T.rshift(b7,15))b8["end"]=b8["end"]+1;b8.chunks:unshift(T.band(b7,32767))else b8["end"]=b8["end"]+1;b8.chunks:unshift(b7)end;b9=R.int(_G.math.fmod(ac,d))if not(n>0)then break end end;w=A({__fields__={quotient=true,remainder=true},quotient=b8,remainder=___BigInt_BigInt_Impl_.fromInt(b9)})end else w=___BigInt_BigInt_Impl_.divModLong(a4,aP)end end else w=___BigInt_BigInt_Impl_.divModLong(a4,aP)end;if w.remainder~=nil then local an=w.remainder;an.isNegative=true end else local am=N.new(ba.chunks)am.start=ba.start;am["end"]=ba["end"]am.isNegative=not ba.isNegative;local an=am;local a4=an;if aP["end"]-aP.start<=2 then if a4["end"]-a4.start<=2 then w=A({__fields__={quotient=true,remainder=true},quotient=___BigInt_BigInt_Impl_.fromInt(R.int(___BigInt_BigInt_Impl_.toInt(a4)/___BigInt_BigInt_Impl_.toInt(aP))),remainder=___BigInt_BigInt_Impl_.fromInt(R.int(_G.math.fmod(___BigInt_BigInt_Impl_.toInt(a4),___BigInt_BigInt_Impl_.toInt(aP))))})else if aP["end"]-aP.start==1 then if aP.chunks[aP.start]==1 then w=A({__fields__={quotient=true,remainder=true},quotient=a4,remainder=nil})else local d=___BigInt_BigInt_Impl_.toInt(aP)local n=a4["end"]-a4.start-1;local ac=T.lshift(a4.chunks[a4.start+n],15)n=n-1;local ac=T.bor(ac,a4.chunks[a4.start+n])local b8=___BigInt_BigInt_Impl_.fromInt(R.int(ac/d))local b9=R.int(_G.math.fmod(ac,d))local b7;while true do n=n-1;ac=T.bor(T.lshift(b9,15),a4.chunks[a4.start+n])b7=R.int(ac/d)if b7>=32768 then b8["end"]=b8["end"]+1;b8.chunks:unshift(T.rshift(b7,15))b8["end"]=b8["end"]+1;b8.chunks:unshift(T.band(b7,32767))else b8["end"]=b8["end"]+1;b8.chunks:unshift(b7)end;b9=R.int(_G.math.fmod(ac,d))if not(n>0)then break end end;w=A({__fields__={quotient=true,remainder=true},quotient=b8,remainder=___BigInt_BigInt_Impl_.fromInt(b9)})end else w=___BigInt_BigInt_Impl_.divModLong(a4,aP)end end else w=___BigInt_BigInt_Impl_.divModLong(a4,aP)end;if w.quotient~=nil then local an=w.quotient;an.isNegative=true end;if w.remainder~=nil then local an=w.remainder;an.isNegative=true end end else if aP.isNegative then local am=N.new(aP.chunks)am.start=aP.start;am["end"]=aP["end"]am.isNegative=not aP.isNegative;local an=am;local aP=an;if aP["end"]-aP.start<=2 then if ba["end"]-ba.start<=2 then w=A({__fields__={quotient=true,remainder=true},quotient=___BigInt_BigInt_Impl_.fromInt(R.int(___BigInt_BigInt_Impl_.toInt(ba)/___BigInt_BigInt_Impl_.toInt(aP))),remainder=___BigInt_BigInt_Impl_.fromInt(R.int(_G.math.fmod(___BigInt_BigInt_Impl_.toInt(ba),___BigInt_BigInt_Impl_.toInt(aP))))})else if aP["end"]-aP.start==1 then if aP.chunks[aP.start]==1 then w=A({__fields__={quotient=true,remainder=true},quotient=ba,remainder=nil})else local d=___BigInt_BigInt_Impl_.toInt(aP)local n=ba["end"]-ba.start-1;local ac=T.lshift(ba.chunks[ba.start+n],15)n=n-1;local ac=T.bor(ac,ba.chunks[ba.start+n])local b8=___BigInt_BigInt_Impl_.fromInt(R.int(ac/d))local b9=R.int(_G.math.fmod(ac,d))local b7;while true do n=n-1;ac=T.bor(T.lshift(b9,15),ba.chunks[ba.start+n])b7=R.int(ac/d)if b7>=32768 then b8["end"]=b8["end"]+1;b8.chunks:unshift(T.rshift(b7,15))b8["end"]=b8["end"]+1;b8.chunks:unshift(T.band(b7,32767))else b8["end"]=b8["end"]+1;b8.chunks:unshift(b7)end;b9=R.int(_G.math.fmod(ac,d))if not(n>0)then break end end;w=A({__fields__={quotient=true,remainder=true},quotient=b8,remainder=___BigInt_BigInt_Impl_.fromInt(b9)})end else w=___BigInt_BigInt_Impl_.divModLong(ba,aP)end end else w=___BigInt_BigInt_Impl_.divModLong(ba,aP)end;if w.quotient~=nil then local an=w.quotient;an.isNegative=true end else if aP["end"]-aP.start<=2 then if ba["end"]-ba.start<=2 then w=A({__fields__={quotient=true,remainder=true},quotient=___BigInt_BigInt_Impl_.fromInt(R.int(___BigInt_BigInt_Impl_.toInt(ba)/___BigInt_BigInt_Impl_.toInt(aP))),remainder=___BigInt_BigInt_Impl_.fromInt(R.int(_G.math.fmod(___BigInt_BigInt_Impl_.toInt(ba),___BigInt_BigInt_Impl_.toInt(aP))))})else if aP["end"]-aP.start==1 then if aP.chunks[aP.start]==1 then w=A({__fields__={quotient=true,remainder=true},quotient=ba,remainder=nil})else local d=___BigInt_BigInt_Impl_.toInt(aP)local n=ba["end"]-ba.start-1;local ac=T.lshift(ba.chunks[ba.start+n],15)n=n-1;local ac=T.bor(ac,ba.chunks[ba.start+n])local b8=___BigInt_BigInt_Impl_.fromInt(R.int(ac/d))local b9=R.int(_G.math.fmod(ac,d))local b7;while true do n=n-1;ac=T.bor(T.lshift(b9,15),ba.chunks[ba.start+n])b7=R.int(ac/d)if b7>=32768 then b8["end"]=b8["end"]+1;b8.chunks:unshift(T.rshift(b7,15))b8["end"]=b8["end"]+1;b8.chunks:unshift(T.band(b7,32767))else b8["end"]=b8["end"]+1;b8.chunks:unshift(b7)end;b9=R.int(_G.math.fmod(ac,d))if not(n>0)then break end end;w=A({__fields__={quotient=true,remainder=true},quotient=b8,remainder=___BigInt_BigInt_Impl_.fromInt(b9)})end else w=___BigInt_BigInt_Impl_.divModLong(ba,aP)end end else w=___BigInt_BigInt_Impl_.divModLong(ba,aP)end end end;ad=w end end end;do return ad.remainder end end;___BigInt_BigInt_Impl_.divMod=function(ba,bb)if bb==nil then _G.error(__haxe_Exception.thrown("Error '/', divisor can't be 0"),0)end;if ba==nil then do return A({__fields__={quotient=true,remainder=true},quotient=nil,remainder=nil})end end;if ___BigInt_BigInt_Impl_.equal(bb,___BigInt_BigInt_Impl_.fromInt(1))then local am=N.new()local a5=0;local a6=ba["end"]-ba.start;while a5=32768 then b8["end"]=b8["end"]+1;b8.chunks:unshift(T.rshift(b7,15))b8["end"]=b8["end"]+1;b8.chunks:unshift(T.band(b7,32767))else b8["end"]=b8["end"]+1;b8.chunks:unshift(b7)end;b9=R.int(_G.math.fmod(ac,d))if not(n>0)then break end end;w=A({__fields__={quotient=true,remainder=true},quotient=b8,remainder=___BigInt_BigInt_Impl_.fromInt(b9)})end else w=___BigInt_BigInt_Impl_.divModLong(a4,aP)end end else w=___BigInt_BigInt_Impl_.divModLong(a4,aP)end;if w.remainder~=nil then local an=w.remainder;an.isNegative=true end else local am=N.new(ba.chunks)am.start=ba.start;am["end"]=ba["end"]am.isNegative=not ba.isNegative;local an=am;local a4=an;if bb["end"]-bb.start<=2 then if a4["end"]-a4.start<=2 then w=A({__fields__={quotient=true,remainder=true},quotient=___BigInt_BigInt_Impl_.fromInt(R.int(___BigInt_BigInt_Impl_.toInt(a4)/___BigInt_BigInt_Impl_.toInt(bb))),remainder=___BigInt_BigInt_Impl_.fromInt(R.int(_G.math.fmod(___BigInt_BigInt_Impl_.toInt(a4),___BigInt_BigInt_Impl_.toInt(bb))))})else if bb["end"]-bb.start==1 then if bb.chunks[bb.start]==1 then w=A({__fields__={quotient=true,remainder=true},quotient=a4,remainder=nil})else local d=___BigInt_BigInt_Impl_.toInt(bb)local n=a4["end"]-a4.start-1;local ac=T.lshift(a4.chunks[a4.start+n],15)n=n-1;local ac=T.bor(ac,a4.chunks[a4.start+n])local b8=___BigInt_BigInt_Impl_.fromInt(R.int(ac/d))local b9=R.int(_G.math.fmod(ac,d))local b7;while true do n=n-1;ac=T.bor(T.lshift(b9,15),a4.chunks[a4.start+n])b7=R.int(ac/d)if b7>=32768 then b8["end"]=b8["end"]+1;b8.chunks:unshift(T.rshift(b7,15))b8["end"]=b8["end"]+1;b8.chunks:unshift(T.band(b7,32767))else b8["end"]=b8["end"]+1;b8.chunks:unshift(b7)end;b9=R.int(_G.math.fmod(ac,d))if not(n>0)then break end end;w=A({__fields__={quotient=true,remainder=true},quotient=b8,remainder=___BigInt_BigInt_Impl_.fromInt(b9)})end else w=___BigInt_BigInt_Impl_.divModLong(a4,bb)end end else w=___BigInt_BigInt_Impl_.divModLong(a4,bb)end;if w.quotient~=nil then local an=w.quotient;an.isNegative=true end;if w.remainder~=nil then local an=w.remainder;an.isNegative=true end end else if bb.isNegative then local am=N.new(bb.chunks)am.start=bb.start;am["end"]=bb["end"]am.isNegative=not bb.isNegative;local an=am;local aP=an;if aP["end"]-aP.start<=2 then if ba["end"]-ba.start<=2 then w=A({__fields__={quotient=true,remainder=true},quotient=___BigInt_BigInt_Impl_.fromInt(R.int(___BigInt_BigInt_Impl_.toInt(ba)/___BigInt_BigInt_Impl_.toInt(aP))),remainder=___BigInt_BigInt_Impl_.fromInt(R.int(_G.math.fmod(___BigInt_BigInt_Impl_.toInt(ba),___BigInt_BigInt_Impl_.toInt(aP))))})else if aP["end"]-aP.start==1 then if aP.chunks[aP.start]==1 then w=A({__fields__={quotient=true,remainder=true},quotient=ba,remainder=nil})else local d=___BigInt_BigInt_Impl_.toInt(aP)local n=ba["end"]-ba.start-1;local ac=T.lshift(ba.chunks[ba.start+n],15)n=n-1;local ac=T.bor(ac,ba.chunks[ba.start+n])local b8=___BigInt_BigInt_Impl_.fromInt(R.int(ac/d))local b9=R.int(_G.math.fmod(ac,d))local b7;while true do n=n-1;ac=T.bor(T.lshift(b9,15),ba.chunks[ba.start+n])b7=R.int(ac/d)if b7>=32768 then b8["end"]=b8["end"]+1;b8.chunks:unshift(T.rshift(b7,15))b8["end"]=b8["end"]+1;b8.chunks:unshift(T.band(b7,32767))else b8["end"]=b8["end"]+1;b8.chunks:unshift(b7)end;b9=R.int(_G.math.fmod(ac,d))if not(n>0)then break end end;w=A({__fields__={quotient=true,remainder=true},quotient=b8,remainder=___BigInt_BigInt_Impl_.fromInt(b9)})end else w=___BigInt_BigInt_Impl_.divModLong(ba,aP)end end else w=___BigInt_BigInt_Impl_.divModLong(ba,aP)end;if w.quotient~=nil then local an=w.quotient;an.isNegative=true end else if bb["end"]-bb.start<=2 then if ba["end"]-ba.start<=2 then w=A({__fields__={quotient=true,remainder=true},quotient=___BigInt_BigInt_Impl_.fromInt(R.int(___BigInt_BigInt_Impl_.toInt(ba)/___BigInt_BigInt_Impl_.toInt(bb))),remainder=___BigInt_BigInt_Impl_.fromInt(R.int(_G.math.fmod(___BigInt_BigInt_Impl_.toInt(ba),___BigInt_BigInt_Impl_.toInt(bb))))})else if bb["end"]-bb.start==1 then if bb.chunks[bb.start]==1 then w=A({__fields__={quotient=true,remainder=true},quotient=ba,remainder=nil})else local d=___BigInt_BigInt_Impl_.toInt(bb)local n=ba["end"]-ba.start-1;local ac=T.lshift(ba.chunks[ba.start+n],15)n=n-1;local ac=T.bor(ac,ba.chunks[ba.start+n])local b8=___BigInt_BigInt_Impl_.fromInt(R.int(ac/d))local b9=R.int(_G.math.fmod(ac,d))local b7;while true do n=n-1;ac=T.bor(T.lshift(b9,15),ba.chunks[ba.start+n])b7=R.int(ac/d)if b7>=32768 then b8["end"]=b8["end"]+1;b8.chunks:unshift(T.rshift(b7,15))b8["end"]=b8["end"]+1;b8.chunks:unshift(T.band(b7,32767))else b8["end"]=b8["end"]+1;b8.chunks:unshift(b7)end;b9=R.int(_G.math.fmod(ac,d))if not(n>0)then break end end;w=A({__fields__={quotient=true,remainder=true},quotient=b8,remainder=___BigInt_BigInt_Impl_.fromInt(b9)})end else w=___BigInt_BigInt_Impl_.divModLong(ba,bb)end end else w=___BigInt_BigInt_Impl_.divModLong(ba,bb)end end end;do return w end end;___BigInt_BigInt_Impl_._divMod=function(a4,aP)if aP["end"]-aP.start<=2 then if a4["end"]-a4.start<=2 then do return A({__fields__={quotient=true,remainder=true},quotient=___BigInt_BigInt_Impl_.fromInt(R.int(___BigInt_BigInt_Impl_.toInt(a4)/___BigInt_BigInt_Impl_.toInt(aP))),remainder=___BigInt_BigInt_Impl_.fromInt(R.int(_G.math.fmod(___BigInt_BigInt_Impl_.toInt(a4),___BigInt_BigInt_Impl_.toInt(aP))))})end end;if aP["end"]-aP.start==1 then if aP.chunks[aP.start]==1 then do return A({__fields__={quotient=true,remainder=true},quotient=a4,remainder=nil})end end;local d=___BigInt_BigInt_Impl_.toInt(aP)local n=a4["end"]-a4.start-1;local ac=T.lshift(a4.chunks[a4.start+n],15)n=n-1;local ac=T.bor(ac,a4.chunks[a4.start+n])local b8=___BigInt_BigInt_Impl_.fromInt(R.int(ac/d))local b9=R.int(_G.math.fmod(ac,d))local b7;while true do n=n-1;ac=T.bor(T.lshift(b9,15),a4.chunks[a4.start+n])b7=R.int(ac/d)if b7>=32768 then b8["end"]=b8["end"]+1;b8.chunks:unshift(T.rshift(b7,15))b8["end"]=b8["end"]+1;b8.chunks:unshift(T.band(b7,32767))else b8["end"]=b8["end"]+1;b8.chunks:unshift(b7)end;b9=R.int(_G.math.fmod(ac,d))if not(n>0)then break end end;do return A({__fields__={quotient=true,remainder=true},quotient=b8,remainder=___BigInt_BigInt_Impl_.fromInt(b9)})end end;do return ___BigInt_BigInt_Impl_.divModLong(a4,aP)end end;do return ___BigInt_BigInt_Impl_.divModLong(a4,aP)end end;___BigInt_BigInt_Impl_.divModLittle=function(a4,d)local n=a4["end"]-a4.start-1;local ac=T.lshift(a4.chunks[a4.start+n],15)n=n-1;local ac=T.bor(ac,a4.chunks[a4.start+n])local b8=___BigInt_BigInt_Impl_.fromInt(R.int(ac/d))local b9=R.int(_G.math.fmod(ac,d))local b7;while true do n=n-1;ac=T.bor(T.lshift(b9,15),a4.chunks[a4.start+n])b7=R.int(ac/d)if b7>=32768 then b8["end"]=b8["end"]+1;b8.chunks:unshift(T.rshift(b7,15))b8["end"]=b8["end"]+1;b8.chunks:unshift(T.band(b7,32767))else b8["end"]=b8["end"]+1;b8.chunks:unshift(b7)end;b9=R.int(_G.math.fmod(ac,d))if not(n>0)then break end end;do return A({__fields__={quotient=true,remainder=true},quotient=b8,remainder=___BigInt_BigInt_Impl_.fromInt(b9)})end end;___BigInt_BigInt_Impl_.divFast=function(a4,d)if a4==nil then do return nil end end;if ___BigInt_BigInt_Impl_.equal(a4,___BigInt_BigInt_Impl_.fromInt(d))then do return ___BigInt_BigInt_Impl_.fromInt(1)end end;if d==1 then local am=N.new()local a5=0;local a6=a4["end"]-a4.start;while a5=32768 then b8["end"]=b8["end"]+1;b8.chunks:unshift(T.rshift(b7,15))b8["end"]=b8["end"]+1;b8.chunks:unshift(T.band(b7,32767))else b8["end"]=b8["end"]+1;b8.chunks:unshift(b7)end;b9=R.int(_G.math.fmod(ac,d))if not(n>0)then break end end;local bc=b8;local bd=___BigInt_BigInt_Impl_.fromInt(b9)do return bc end end;___BigInt_BigInt_Impl_.divModLong=function(a4,aP)local ao=aP["end"]-aP.start-1;local b9;local ac=aP.chunks[aP.start+ao]local am=N.new(a4.chunks)local aU;if ao>=a4["end"]-a4.start then aU=nil else am.start=a4.start+ao;am["end"]=a4["end"]aU=am end;local aU=aU;local b8;if aU==nil then b8=nil else if ___BigInt_BigInt_Impl_.equal(aU,___BigInt_BigInt_Impl_.fromInt(ac))then b8=___BigInt_BigInt_Impl_.fromInt(1)else if ac==1 then local am=N.new()local a5=0;local a6=aU["end"]-aU.start;while a5=32768 then bf["end"]=bf["end"]+1;bf.chunks:unshift(T.rshift(b7,15))bf["end"]=bf["end"]+1;bf.chunks:unshift(T.band(b7,32767))else bf["end"]=bf["end"]+1;bf.chunks:unshift(b7)end;b9=R.int(_G.math.fmod(be,ac))if not(n>0)then break end end;local bc=bf;local bd=___BigInt_BigInt_Impl_.fromInt(b9)b8=bc end end end end;while true do b9=___BigInt_BigInt_Impl_.opSubtract(a4,___BigInt_BigInt_Impl_.opMulticplicate(b8,aP))if b9~=nil then ___BigInt_BigInt_Impl_.shiftOneBitLeft(b8)local am=N.new(b9.chunks)local a4;if ao>=b9["end"]-b9.start then a4=nil else am.start=b9.start+ao;am["end"]=b9["end"]a4=am end;local a4=a4;local bf;if a4==nil then bf=nil else if ___BigInt_BigInt_Impl_.equal(a4,___BigInt_BigInt_Impl_.fromInt(ac))then bf=___BigInt_BigInt_Impl_.fromInt(1)else if ac==1 then local am=N.new()local a5=0;local a6=a4["end"]-a4.start;while a5=32768 then b8["end"]=b8["end"]+1;b8.chunks:unshift(T.rshift(b7,15))b8["end"]=b8["end"]+1;b8.chunks:unshift(T.band(b7,32767))else b8["end"]=b8["end"]+1;b8.chunks:unshift(b7)end;b9=R.int(_G.math.fmod(be,ac))if not(n>0)then break end end;local bc=b8;local bd=___BigInt_BigInt_Impl_.fromInt(b9)bf=bc end end end end;b8=___BigInt_BigInt_Impl_.opSubtract(b8,bf)___BigInt_BigInt_Impl_.shiftOneBitRight(b8)b9.isNegative=false end;if not ___BigInt_BigInt_Impl_.greaterOrEqual(b9,aP)then break end end;if b9~=nil then b9=___BigInt_BigInt_Impl_.opSubtract(a4,___BigInt_BigInt_Impl_.opMulticplicate(b8,aP))if b9.isNegative then local d=1;local a5=0;local a6=b8["end"]-b8.start;while a5=d then b8.chunks[b8.start+n]=ac-d;d=0;break end;b8.chunks[b8.start+n]=ac+32768-d;d=1 end;b9=___BigInt_BigInt_Impl_.opAdd(b9,aP)end end;do return A({__fields__={quotient=true,remainder=true},quotient=b8,remainder=b9})end end;___BigInt_BigInt_Impl_.pow=function(an,bg)if ___BigInt_BigInt_Impl_.lesser(bg,___BigInt_BigInt_Impl_.fromInt(0))then _G.error(__haxe_Exception.thrown("Error 'powMod', exponent can't be negative"),0)end;if bg==nil then do return ___BigInt_BigInt_Impl_.fromInt(1)end end;if an==nil then do return nil end end;if an["end"]-an.start==1 and an.chunks[an.start]==1 then do return ___BigInt_BigInt_Impl_.fromInt(1)end end;if bg["end"]-bg.start==1 and bg.chunks[bg.start]==1 then local am=N.new()local a5=0;local a6=an["end"]-an.start;while a5=32768 then b8["end"]=b8["end"]+1;b8.chunks:unshift(T.rshift(b7,15))b8["end"]=b8["end"]+1;b8.chunks:unshift(T.band(b7,32767))else b8["end"]=b8["end"]+1;b8.chunks:unshift(b7)end;b9=R.int(_G.math.fmod(ac,d))if not(n>0)then break end end;w=A({__fields__={quotient=true,remainder=true},quotient=b8,remainder=___BigInt_BigInt_Impl_.fromInt(b9)})end else w=___BigInt_BigInt_Impl_.divModLong(a4,aP)end end else w=___BigInt_BigInt_Impl_.divModLong(a4,aP)end;if w.remainder~=nil then local an=w.remainder;an.isNegative=true end else local am=N.new(an.chunks)am.start=an.start;am["end"]=an["end"]am.isNegative=not an.isNegative;local an=am;local a4=an;if bi["end"]-bi.start<=2 then if a4["end"]-a4.start<=2 then w=A({__fields__={quotient=true,remainder=true},quotient=___BigInt_BigInt_Impl_.fromInt(R.int(___BigInt_BigInt_Impl_.toInt(a4)/___BigInt_BigInt_Impl_.toInt(bi))),remainder=___BigInt_BigInt_Impl_.fromInt(R.int(_G.math.fmod(___BigInt_BigInt_Impl_.toInt(a4),___BigInt_BigInt_Impl_.toInt(bi))))})else if bi["end"]-bi.start==1 then if bi.chunks[bi.start]==1 then w=A({__fields__={quotient=true,remainder=true},quotient=a4,remainder=nil})else local d=___BigInt_BigInt_Impl_.toInt(bi)local n=a4["end"]-a4.start-1;local ac=T.lshift(a4.chunks[a4.start+n],15)n=n-1;local ac=T.bor(ac,a4.chunks[a4.start+n])local b8=___BigInt_BigInt_Impl_.fromInt(R.int(ac/d))local b9=R.int(_G.math.fmod(ac,d))local b7;while true do n=n-1;ac=T.bor(T.lshift(b9,15),a4.chunks[a4.start+n])b7=R.int(ac/d)if b7>=32768 then b8["end"]=b8["end"]+1;b8.chunks:unshift(T.rshift(b7,15))b8["end"]=b8["end"]+1;b8.chunks:unshift(T.band(b7,32767))else b8["end"]=b8["end"]+1;b8.chunks:unshift(b7)end;b9=R.int(_G.math.fmod(ac,d))if not(n>0)then break end end;w=A({__fields__={quotient=true,remainder=true},quotient=b8,remainder=___BigInt_BigInt_Impl_.fromInt(b9)})end else w=___BigInt_BigInt_Impl_.divModLong(a4,bi)end end else w=___BigInt_BigInt_Impl_.divModLong(a4,bi)end;if w.quotient~=nil then local an=w.quotient;an.isNegative=true end;if w.remainder~=nil then local an=w.remainder;an.isNegative=true end end else if bi.isNegative then local am=N.new(bi.chunks)am.start=bi.start;am["end"]=bi["end"]am.isNegative=not bi.isNegative;local aQ=am;local aP=aQ;if aP["end"]-aP.start<=2 then if an["end"]-an.start<=2 then w=A({__fields__={quotient=true,remainder=true},quotient=___BigInt_BigInt_Impl_.fromInt(R.int(___BigInt_BigInt_Impl_.toInt(an)/___BigInt_BigInt_Impl_.toInt(aP))),remainder=___BigInt_BigInt_Impl_.fromInt(R.int(_G.math.fmod(___BigInt_BigInt_Impl_.toInt(an),___BigInt_BigInt_Impl_.toInt(aP))))})else if aP["end"]-aP.start==1 then if aP.chunks[aP.start]==1 then w=A({__fields__={quotient=true,remainder=true},quotient=an,remainder=nil})else local d=___BigInt_BigInt_Impl_.toInt(aP)local n=an["end"]-an.start-1;local ac=T.lshift(an.chunks[an.start+n],15)n=n-1;local ac=T.bor(ac,an.chunks[an.start+n])local b8=___BigInt_BigInt_Impl_.fromInt(R.int(ac/d))local b9=R.int(_G.math.fmod(ac,d))local b7;while true do n=n-1;ac=T.bor(T.lshift(b9,15),an.chunks[an.start+n])b7=R.int(ac/d)if b7>=32768 then b8["end"]=b8["end"]+1;b8.chunks:unshift(T.rshift(b7,15))b8["end"]=b8["end"]+1;b8.chunks:unshift(T.band(b7,32767))else b8["end"]=b8["end"]+1;b8.chunks:unshift(b7)end;b9=R.int(_G.math.fmod(ac,d))if not(n>0)then break end end;w=A({__fields__={quotient=true,remainder=true},quotient=b8,remainder=___BigInt_BigInt_Impl_.fromInt(b9)})end else w=___BigInt_BigInt_Impl_.divModLong(an,aP)end end else w=___BigInt_BigInt_Impl_.divModLong(an,aP)end;if w.quotient~=nil then local an=w.quotient;an.isNegative=true end else if bi["end"]-bi.start<=2 then if an["end"]-an.start<=2 then w=A({__fields__={quotient=true,remainder=true},quotient=___BigInt_BigInt_Impl_.fromInt(R.int(___BigInt_BigInt_Impl_.toInt(an)/___BigInt_BigInt_Impl_.toInt(bi))),remainder=___BigInt_BigInt_Impl_.fromInt(R.int(_G.math.fmod(___BigInt_BigInt_Impl_.toInt(an),___BigInt_BigInt_Impl_.toInt(bi))))})else if bi["end"]-bi.start==1 then if bi.chunks[bi.start]==1 then w=A({__fields__={quotient=true,remainder=true},quotient=an,remainder=nil})else local d=___BigInt_BigInt_Impl_.toInt(bi)local n=an["end"]-an.start-1;local ac=T.lshift(an.chunks[an.start+n],15)n=n-1;local ac=T.bor(ac,an.chunks[an.start+n])local b8=___BigInt_BigInt_Impl_.fromInt(R.int(ac/d))local b9=R.int(_G.math.fmod(ac,d))local b7;while true do n=n-1;ac=T.bor(T.lshift(b9,15),an.chunks[an.start+n])b7=R.int(ac/d)if b7>=32768 then b8["end"]=b8["end"]+1;b8.chunks:unshift(T.rshift(b7,15))b8["end"]=b8["end"]+1;b8.chunks:unshift(T.band(b7,32767))else b8["end"]=b8["end"]+1;b8.chunks:unshift(b7)end;b9=R.int(_G.math.fmod(ac,d))if not(n>0)then break end end;w=A({__fields__={quotient=true,remainder=true},quotient=b8,remainder=___BigInt_BigInt_Impl_.fromInt(b9)})end else w=___BigInt_BigInt_Impl_.divModLong(an,bi)end end else w=___BigInt_BigInt_Impl_.divModLong(an,bi)end end end;ad=w end end end;do return ad.remainder end end;local bit;local ao;local bh;local l=___BigInt_BigInt_Impl_.fromInt(1)if bi==nil then _G.error(__haxe_Exception.thrown("Error '/', divisor can't be 0"),0)end;local ax;if an==nil then ax=A({__fields__={quotient=true,remainder=true},quotient=nil,remainder=nil})else if ___BigInt_BigInt_Impl_.equal(bi,___BigInt_BigInt_Impl_.fromInt(1))then local am=N.new()local a5=0;local a6=an["end"]-an.start;while a5=32768 then b8["end"]=b8["end"]+1;b8.chunks:unshift(T.rshift(b7,15))b8["end"]=b8["end"]+1;b8.chunks:unshift(T.band(b7,32767))else b8["end"]=b8["end"]+1;b8.chunks:unshift(b7)end;b9=R.int(_G.math.fmod(ac,d))if not(n>0)then break end end;w=A({__fields__={quotient=true,remainder=true},quotient=b8,remainder=___BigInt_BigInt_Impl_.fromInt(b9)})end else w=___BigInt_BigInt_Impl_.divModLong(a4,aP)end end else w=___BigInt_BigInt_Impl_.divModLong(a4,aP)end;if w.remainder~=nil then local an=w.remainder;an.isNegative=true end else local am=N.new(an.chunks)am.start=an.start;am["end"]=an["end"]am.isNegative=not an.isNegative;local an=am;local a4=an;if bi["end"]-bi.start<=2 then if a4["end"]-a4.start<=2 then w=A({__fields__={quotient=true,remainder=true},quotient=___BigInt_BigInt_Impl_.fromInt(R.int(___BigInt_BigInt_Impl_.toInt(a4)/___BigInt_BigInt_Impl_.toInt(bi))),remainder=___BigInt_BigInt_Impl_.fromInt(R.int(_G.math.fmod(___BigInt_BigInt_Impl_.toInt(a4),___BigInt_BigInt_Impl_.toInt(bi))))})else if bi["end"]-bi.start==1 then if bi.chunks[bi.start]==1 then w=A({__fields__={quotient=true,remainder=true},quotient=a4,remainder=nil})else local d=___BigInt_BigInt_Impl_.toInt(bi)local n=a4["end"]-a4.start-1;local ac=T.lshift(a4.chunks[a4.start+n],15)n=n-1;local ac=T.bor(ac,a4.chunks[a4.start+n])local b8=___BigInt_BigInt_Impl_.fromInt(R.int(ac/d))local b9=R.int(_G.math.fmod(ac,d))local b7;while true do n=n-1;ac=T.bor(T.lshift(b9,15),a4.chunks[a4.start+n])b7=R.int(ac/d)if b7>=32768 then b8["end"]=b8["end"]+1;b8.chunks:unshift(T.rshift(b7,15))b8["end"]=b8["end"]+1;b8.chunks:unshift(T.band(b7,32767))else b8["end"]=b8["end"]+1;b8.chunks:unshift(b7)end;b9=R.int(_G.math.fmod(ac,d))if not(n>0)then break end end;w=A({__fields__={quotient=true,remainder=true},quotient=b8,remainder=___BigInt_BigInt_Impl_.fromInt(b9)})end else w=___BigInt_BigInt_Impl_.divModLong(a4,bi)end end else w=___BigInt_BigInt_Impl_.divModLong(a4,bi)end;if w.quotient~=nil then local an=w.quotient;an.isNegative=true end;if w.remainder~=nil then local an=w.remainder;an.isNegative=true end end else if bi.isNegative then local am=N.new(bi.chunks)am.start=bi.start;am["end"]=bi["end"]am.isNegative=not bi.isNegative;local aQ=am;local aP=aQ;if aP["end"]-aP.start<=2 then if an["end"]-an.start<=2 then w=A({__fields__={quotient=true,remainder=true},quotient=___BigInt_BigInt_Impl_.fromInt(R.int(___BigInt_BigInt_Impl_.toInt(an)/___BigInt_BigInt_Impl_.toInt(aP))),remainder=___BigInt_BigInt_Impl_.fromInt(R.int(_G.math.fmod(___BigInt_BigInt_Impl_.toInt(an),___BigInt_BigInt_Impl_.toInt(aP))))})else if aP["end"]-aP.start==1 then if aP.chunks[aP.start]==1 then w=A({__fields__={quotient=true,remainder=true},quotient=an,remainder=nil})else local d=___BigInt_BigInt_Impl_.toInt(aP)local n=an["end"]-an.start-1;local ac=T.lshift(an.chunks[an.start+n],15)n=n-1;local ac=T.bor(ac,an.chunks[an.start+n])local b8=___BigInt_BigInt_Impl_.fromInt(R.int(ac/d))local b9=R.int(_G.math.fmod(ac,d))local b7;while true do n=n-1;ac=T.bor(T.lshift(b9,15),an.chunks[an.start+n])b7=R.int(ac/d)if b7>=32768 then b8["end"]=b8["end"]+1;b8.chunks:unshift(T.rshift(b7,15))b8["end"]=b8["end"]+1;b8.chunks:unshift(T.band(b7,32767))else b8["end"]=b8["end"]+1;b8.chunks:unshift(b7)end;b9=R.int(_G.math.fmod(ac,d))if not(n>0)then break end end;w=A({__fields__={quotient=true,remainder=true},quotient=b8,remainder=___BigInt_BigInt_Impl_.fromInt(b9)})end else w=___BigInt_BigInt_Impl_.divModLong(an,aP)end end else w=___BigInt_BigInt_Impl_.divModLong(an,aP)end;if w.quotient~=nil then local an=w.quotient;an.isNegative=true end else if bi["end"]-bi.start<=2 then if an["end"]-an.start<=2 then w=A({__fields__={quotient=true,remainder=true},quotient=___BigInt_BigInt_Impl_.fromInt(R.int(___BigInt_BigInt_Impl_.toInt(an)/___BigInt_BigInt_Impl_.toInt(bi))),remainder=___BigInt_BigInt_Impl_.fromInt(R.int(_G.math.fmod(___BigInt_BigInt_Impl_.toInt(an),___BigInt_BigInt_Impl_.toInt(bi))))})else if bi["end"]-bi.start==1 then if bi.chunks[bi.start]==1 then w=A({__fields__={quotient=true,remainder=true},quotient=an,remainder=nil})else local d=___BigInt_BigInt_Impl_.toInt(bi)local n=an["end"]-an.start-1;local ac=T.lshift(an.chunks[an.start+n],15)n=n-1;local ac=T.bor(ac,an.chunks[an.start+n])local b8=___BigInt_BigInt_Impl_.fromInt(R.int(ac/d))local b9=R.int(_G.math.fmod(ac,d))local b7;while true do n=n-1;ac=T.bor(T.lshift(b9,15),an.chunks[an.start+n])b7=R.int(ac/d)if b7>=32768 then b8["end"]=b8["end"]+1;b8.chunks:unshift(T.rshift(b7,15))b8["end"]=b8["end"]+1;b8.chunks:unshift(T.band(b7,32767))else b8["end"]=b8["end"]+1;b8.chunks:unshift(b7)end;b9=R.int(_G.math.fmod(ac,d))if not(n>0)then break end end;w=A({__fields__={quotient=true,remainder=true},quotient=b8,remainder=___BigInt_BigInt_Impl_.fromInt(b9)})end else w=___BigInt_BigInt_Impl_.divModLong(an,bi)end end else w=___BigInt_BigInt_Impl_.divModLong(an,bi)end end end;ax=w end end end;local ax=ax.remainder;local a5=0;local a6=bg["end"]-bg.start;while a5=32768 then b8["end"]=b8["end"]+1;b8.chunks:unshift(T.rshift(b7,15))b8["end"]=b8["end"]+1;b8.chunks:unshift(T.band(b7,32767))else b8["end"]=b8["end"]+1;b8.chunks:unshift(b7)end;b9=R.int(_G.math.fmod(ac,d))if not(n>0)then break end end;w=A({__fields__={quotient=true,remainder=true},quotient=b8,remainder=___BigInt_BigInt_Impl_.fromInt(b9)})end else w=___BigInt_BigInt_Impl_.divModLong(a4,aP)end end else w=___BigInt_BigInt_Impl_.divModLong(a4,aP)end;if w.remainder~=nil then local an=w.remainder;an.isNegative=true end else local am=N.new(ba.chunks)am.start=ba.start;am["end"]=ba["end"]am.isNegative=not ba.isNegative;local an=am;local a4=an;if bi["end"]-bi.start<=2 then if a4["end"]-a4.start<=2 then w=A({__fields__={quotient=true,remainder=true},quotient=___BigInt_BigInt_Impl_.fromInt(R.int(___BigInt_BigInt_Impl_.toInt(a4)/___BigInt_BigInt_Impl_.toInt(bi))),remainder=___BigInt_BigInt_Impl_.fromInt(R.int(_G.math.fmod(___BigInt_BigInt_Impl_.toInt(a4),___BigInt_BigInt_Impl_.toInt(bi))))})else if bi["end"]-bi.start==1 then if bi.chunks[bi.start]==1 then w=A({__fields__={quotient=true,remainder=true},quotient=a4,remainder=nil})else local d=___BigInt_BigInt_Impl_.toInt(bi)local n=a4["end"]-a4.start-1;local ac=T.lshift(a4.chunks[a4.start+n],15)n=n-1;local ac=T.bor(ac,a4.chunks[a4.start+n])local b8=___BigInt_BigInt_Impl_.fromInt(R.int(ac/d))local b9=R.int(_G.math.fmod(ac,d))local b7;while true do n=n-1;ac=T.bor(T.lshift(b9,15),a4.chunks[a4.start+n])b7=R.int(ac/d)if b7>=32768 then b8["end"]=b8["end"]+1;b8.chunks:unshift(T.rshift(b7,15))b8["end"]=b8["end"]+1;b8.chunks:unshift(T.band(b7,32767))else b8["end"]=b8["end"]+1;b8.chunks:unshift(b7)end;b9=R.int(_G.math.fmod(ac,d))if not(n>0)then break end end;w=A({__fields__={quotient=true,remainder=true},quotient=b8,remainder=___BigInt_BigInt_Impl_.fromInt(b9)})end else w=___BigInt_BigInt_Impl_.divModLong(a4,bi)end end else w=___BigInt_BigInt_Impl_.divModLong(a4,bi)end;if w.quotient~=nil then local an=w.quotient;an.isNegative=true end;if w.remainder~=nil then local an=w.remainder;an.isNegative=true end end else if bi.isNegative then local am=N.new(bi.chunks)am.start=bi.start;am["end"]=bi["end"]am.isNegative=not bi.isNegative;local an=am;local aP=an;if aP["end"]-aP.start<=2 then if ba["end"]-ba.start<=2 then w=A({__fields__={quotient=true,remainder=true},quotient=___BigInt_BigInt_Impl_.fromInt(R.int(___BigInt_BigInt_Impl_.toInt(ba)/___BigInt_BigInt_Impl_.toInt(aP))),remainder=___BigInt_BigInt_Impl_.fromInt(R.int(_G.math.fmod(___BigInt_BigInt_Impl_.toInt(ba),___BigInt_BigInt_Impl_.toInt(aP))))})else if aP["end"]-aP.start==1 then if aP.chunks[aP.start]==1 then w=A({__fields__={quotient=true,remainder=true},quotient=ba,remainder=nil})else local d=___BigInt_BigInt_Impl_.toInt(aP)local n=ba["end"]-ba.start-1;local ac=T.lshift(ba.chunks[ba.start+n],15)n=n-1;local ac=T.bor(ac,ba.chunks[ba.start+n])local b8=___BigInt_BigInt_Impl_.fromInt(R.int(ac/d))local b9=R.int(_G.math.fmod(ac,d))local b7;while true do n=n-1;ac=T.bor(T.lshift(b9,15),ba.chunks[ba.start+n])b7=R.int(ac/d)if b7>=32768 then b8["end"]=b8["end"]+1;b8.chunks:unshift(T.rshift(b7,15))b8["end"]=b8["end"]+1;b8.chunks:unshift(T.band(b7,32767))else b8["end"]=b8["end"]+1;b8.chunks:unshift(b7)end;b9=R.int(_G.math.fmod(ac,d))if not(n>0)then break end end;w=A({__fields__={quotient=true,remainder=true},quotient=b8,remainder=___BigInt_BigInt_Impl_.fromInt(b9)})end else w=___BigInt_BigInt_Impl_.divModLong(ba,aP)end end else w=___BigInt_BigInt_Impl_.divModLong(ba,aP)end;if w.quotient~=nil then local an=w.quotient;an.isNegative=true end else if bi["end"]-bi.start<=2 then if ba["end"]-ba.start<=2 then w=A({__fields__={quotient=true,remainder=true},quotient=___BigInt_BigInt_Impl_.fromInt(R.int(___BigInt_BigInt_Impl_.toInt(ba)/___BigInt_BigInt_Impl_.toInt(bi))),remainder=___BigInt_BigInt_Impl_.fromInt(R.int(_G.math.fmod(___BigInt_BigInt_Impl_.toInt(ba),___BigInt_BigInt_Impl_.toInt(bi))))})else if bi["end"]-bi.start==1 then if bi.chunks[bi.start]==1 then w=A({__fields__={quotient=true,remainder=true},quotient=ba,remainder=nil})else local d=___BigInt_BigInt_Impl_.toInt(bi)local n=ba["end"]-ba.start-1;local ac=T.lshift(ba.chunks[ba.start+n],15)n=n-1;local ac=T.bor(ac,ba.chunks[ba.start+n])local b8=___BigInt_BigInt_Impl_.fromInt(R.int(ac/d))local b9=R.int(_G.math.fmod(ac,d))local b7;while true do n=n-1;ac=T.bor(T.lshift(b9,15),ba.chunks[ba.start+n])b7=R.int(ac/d)if b7>=32768 then b8["end"]=b8["end"]+1;b8.chunks:unshift(T.rshift(b7,15))b8["end"]=b8["end"]+1;b8.chunks:unshift(T.band(b7,32767))else b8["end"]=b8["end"]+1;b8.chunks:unshift(b7)end;b9=R.int(_G.math.fmod(ac,d))if not(n>0)then break end end;w=A({__fields__={quotient=true,remainder=true},quotient=b8,remainder=___BigInt_BigInt_Impl_.fromInt(b9)})end else w=___BigInt_BigInt_Impl_.divModLong(ba,bi)end end else w=___BigInt_BigInt_Impl_.divModLong(ba,bi)end end end;bj=w end end end;l=bj.remainder end;local ba=___BigInt_BigInt_Impl_.opMulticplicate(ax,ax)if bi==nil then _G.error(__haxe_Exception.thrown("Error '/', divisor can't be 0"),0)end;local bk;if ba==nil then bk=A({__fields__={quotient=true,remainder=true},quotient=nil,remainder=nil})else if ___BigInt_BigInt_Impl_.equal(bi,___BigInt_BigInt_Impl_.fromInt(1))then local am=N.new()local a5=0;local a6=ba["end"]-ba.start;while a5=32768 then b8["end"]=b8["end"]+1;b8.chunks:unshift(T.rshift(b7,15))b8["end"]=b8["end"]+1;b8.chunks:unshift(T.band(b7,32767))else b8["end"]=b8["end"]+1;b8.chunks:unshift(b7)end;b9=R.int(_G.math.fmod(ac,d))if not(n>0)then break end end;w=A({__fields__={quotient=true,remainder=true},quotient=b8,remainder=___BigInt_BigInt_Impl_.fromInt(b9)})end else w=___BigInt_BigInt_Impl_.divModLong(a4,aP)end end else w=___BigInt_BigInt_Impl_.divModLong(a4,aP)end;if w.remainder~=nil then local an=w.remainder;an.isNegative=true end else local am=N.new(ba.chunks)am.start=ba.start;am["end"]=ba["end"]am.isNegative=not ba.isNegative;local an=am;local a4=an;if bi["end"]-bi.start<=2 then if a4["end"]-a4.start<=2 then w=A({__fields__={quotient=true,remainder=true},quotient=___BigInt_BigInt_Impl_.fromInt(R.int(___BigInt_BigInt_Impl_.toInt(a4)/___BigInt_BigInt_Impl_.toInt(bi))),remainder=___BigInt_BigInt_Impl_.fromInt(R.int(_G.math.fmod(___BigInt_BigInt_Impl_.toInt(a4),___BigInt_BigInt_Impl_.toInt(bi))))})else if bi["end"]-bi.start==1 then if bi.chunks[bi.start]==1 then w=A({__fields__={quotient=true,remainder=true},quotient=a4,remainder=nil})else local d=___BigInt_BigInt_Impl_.toInt(bi)local n=a4["end"]-a4.start-1;local ac=T.lshift(a4.chunks[a4.start+n],15)n=n-1;local ac=T.bor(ac,a4.chunks[a4.start+n])local b8=___BigInt_BigInt_Impl_.fromInt(R.int(ac/d))local b9=R.int(_G.math.fmod(ac,d))local b7;while true do n=n-1;ac=T.bor(T.lshift(b9,15),a4.chunks[a4.start+n])b7=R.int(ac/d)if b7>=32768 then b8["end"]=b8["end"]+1;b8.chunks:unshift(T.rshift(b7,15))b8["end"]=b8["end"]+1;b8.chunks:unshift(T.band(b7,32767))else b8["end"]=b8["end"]+1;b8.chunks:unshift(b7)end;b9=R.int(_G.math.fmod(ac,d))if not(n>0)then break end end;w=A({__fields__={quotient=true,remainder=true},quotient=b8,remainder=___BigInt_BigInt_Impl_.fromInt(b9)})end else w=___BigInt_BigInt_Impl_.divModLong(a4,bi)end end else w=___BigInt_BigInt_Impl_.divModLong(a4,bi)end;if w.quotient~=nil then local an=w.quotient;an.isNegative=true end;if w.remainder~=nil then local an=w.remainder;an.isNegative=true end end else if bi.isNegative then local am=N.new(bi.chunks)am.start=bi.start;am["end"]=bi["end"]am.isNegative=not bi.isNegative;local an=am;local aP=an;if aP["end"]-aP.start<=2 then if ba["end"]-ba.start<=2 then w=A({__fields__={quotient=true,remainder=true},quotient=___BigInt_BigInt_Impl_.fromInt(R.int(___BigInt_BigInt_Impl_.toInt(ba)/___BigInt_BigInt_Impl_.toInt(aP))),remainder=___BigInt_BigInt_Impl_.fromInt(R.int(_G.math.fmod(___BigInt_BigInt_Impl_.toInt(ba),___BigInt_BigInt_Impl_.toInt(aP))))})else if aP["end"]-aP.start==1 then if aP.chunks[aP.start]==1 then w=A({__fields__={quotient=true,remainder=true},quotient=ba,remainder=nil})else local d=___BigInt_BigInt_Impl_.toInt(aP)local n=ba["end"]-ba.start-1;local ac=T.lshift(ba.chunks[ba.start+n],15)n=n-1;local ac=T.bor(ac,ba.chunks[ba.start+n])local b8=___BigInt_BigInt_Impl_.fromInt(R.int(ac/d))local b9=R.int(_G.math.fmod(ac,d))local b7;while true do n=n-1;ac=T.bor(T.lshift(b9,15),ba.chunks[ba.start+n])b7=R.int(ac/d)if b7>=32768 then b8["end"]=b8["end"]+1;b8.chunks:unshift(T.rshift(b7,15))b8["end"]=b8["end"]+1;b8.chunks:unshift(T.band(b7,32767))else b8["end"]=b8["end"]+1;b8.chunks:unshift(b7)end;b9=R.int(_G.math.fmod(ac,d))if not(n>0)then break end end;w=A({__fields__={quotient=true,remainder=true},quotient=b8,remainder=___BigInt_BigInt_Impl_.fromInt(b9)})end else w=___BigInt_BigInt_Impl_.divModLong(ba,aP)end end else w=___BigInt_BigInt_Impl_.divModLong(ba,aP)end;if w.quotient~=nil then local an=w.quotient;an.isNegative=true end else if bi["end"]-bi.start<=2 then if ba["end"]-ba.start<=2 then w=A({__fields__={quotient=true,remainder=true},quotient=___BigInt_BigInt_Impl_.fromInt(R.int(___BigInt_BigInt_Impl_.toInt(ba)/___BigInt_BigInt_Impl_.toInt(bi))),remainder=___BigInt_BigInt_Impl_.fromInt(R.int(_G.math.fmod(___BigInt_BigInt_Impl_.toInt(ba),___BigInt_BigInt_Impl_.toInt(bi))))})else if bi["end"]-bi.start==1 then if bi.chunks[bi.start]==1 then w=A({__fields__={quotient=true,remainder=true},quotient=ba,remainder=nil})else local d=___BigInt_BigInt_Impl_.toInt(bi)local n=ba["end"]-ba.start-1;local ac=T.lshift(ba.chunks[ba.start+n],15)n=n-1;local ac=T.bor(ac,ba.chunks[ba.start+n])local b8=___BigInt_BigInt_Impl_.fromInt(R.int(ac/d))local b9=R.int(_G.math.fmod(ac,d))local b7;while true do n=n-1;ac=T.bor(T.lshift(b9,15),ba.chunks[ba.start+n])b7=R.int(ac/d)if b7>=32768 then b8["end"]=b8["end"]+1;b8.chunks:unshift(T.rshift(b7,15))b8["end"]=b8["end"]+1;b8.chunks:unshift(T.band(b7,32767))else b8["end"]=b8["end"]+1;b8.chunks:unshift(b7)end;b9=R.int(_G.math.fmod(ac,d))if not(n>0)then break end end;w=A({__fields__={quotient=true,remainder=true},quotient=b8,remainder=___BigInt_BigInt_Impl_.fromInt(b9)})end else w=___BigInt_BigInt_Impl_.divModLong(ba,bi)end end else w=___BigInt_BigInt_Impl_.divModLong(ba,bi)end end end;bk=w end end end;ax=bk.remainder;bit=T.lshift(bit,1)end end;do return l end end;___BigInt_BigInt_Impl_.greater=function(an,aP)if an==nil then if aP==nil then do return false end end;if aP.isNegative then do return true end else do return false end end end;if aP==nil then if an.isNegative then do return false end else do return true end end end;if an.isNegative~=aP.isNegative then if an.isNegative then do return false end else do return true end end end;if an["end"]-an.start>aP["end"]-aP.start then if an.isNegative then do return false end else do return true end end end;if an["end"]-an.start0)then break end;if an.chunks[an.start+n]>aP.chunks[aP.start+n]then if an.isNegative then do return false end else do return true end end end;if an.chunks[an.start+n]aP["end"]-aP.start then if an.isNegative then do return false end else do return true end end end;if an["end"]-an.start0)then break end;if an.chunks[an.start+n]>aP.chunks[aP.start+n]then if an.isNegative then do return false end else do return true end end end;if an.chunks[an.start+n]aP["end"]-aP.start then if an.isNegative then do return true end else do return false end end end;local n=an["end"]-an.start;while true do n=n-1;if not(n+1>0)then break end;if an.chunks[an.start+n]aP.chunks[aP.start+n]then if an.isNegative then do return true end else do return false end end end end;do return false end end;___BigInt_BigInt_Impl_.intLesser=function(a4,aP)do return ___BigInt_BigInt_Impl_.greater(aP,___BigInt_BigInt_Impl_.fromInt(a4))end end;___BigInt_BigInt_Impl_.lesserOrEqual=function(an,aP)if an==nil then if aP==nil then do return true end end;if aP.isNegative then do return false end else do return true end end end;if aP==nil then if an.isNegative then do return true end else do return false end end end;if an.isNegative~=aP.isNegative then if an.isNegative then do return true end else do return false end end end;if an["end"]-an.startaP["end"]-aP.start then if an.isNegative then do return true end else do return false end end end;local n=an["end"]-an.start;while true do n=n-1;if not(n+1>0)then break end;if an.chunks[an.start+n]aP.chunks[aP.start+n]then if an.isNegative then do return true end else do return false end end end end;do return true end end;___BigInt_BigInt_Impl_.intLesserOrEqual=function(a4,aP)do return ___BigInt_BigInt_Impl_.greaterOrEqual(aP,___BigInt_BigInt_Impl_.fromInt(a4))end end;___BigInt_BigInt_Impl_.equal=function(an,aP)if an==nil then if aP==nil then do return true end else do return false end end end;if aP==nil then do return false end end;if an.isNegative~=aP.isNegative then do return false end end;if an["end"]-an.start~=aP["end"]-aP.start then do return false end end;local n=an["end"]-an.start;while true do n=n-1;if not(n+1>0)then break end;if an.chunks[an.start+n]~=aP.chunks[aP.start+n]then do return false end end end;do return true end end;___BigInt_BigInt_Impl_.notEqual=function(an,aP)if an==nil then if aP==nil then do return false end else do return true end end end;if aP==nil then do return true end end;if an.isNegative~=aP.isNegative then do return true end end;if an["end"]-an.start~=aP["end"]-aP.start then do return true end end;local n=an["end"]-an.start;while true do n=n-1;if not(n+1>0)then break end;if an.chunks[an.start+n]~=aP.chunks[aP.start+n]then do return true end end end;do return false end end;___BigInt_BigInt_Impl_.shiftOneBitRight=function(an)if an~=nil then local n=an["end"]-an.start-1;local d=an.chunks[an.start+n]local bl=T.band(d,1)>0;d=T.rshift(d,1)if d~=0 then an.chunks[an.start+n]=d else an["end"]=an["end"]-1;an.chunks:pop()end;while true do n=n-1;if not(n+1>0)then break end;d=an.chunks[an.start+n]if bl then d=T.bor(d,32768)end;bl=T.band(d,1)>0;an.chunks[an.start+n]=T.rshift(d,1)end end end;___BigInt_BigInt_Impl_.shiftOneBitLeft=function(an)if an~=nil then local d=0;local a5=0;local a6=an["end"]-an.start;while a50 then aB=1 else aB=0 end;return aB end)())an.chunks[an.start+n]=T.band(d,32767)end;if T.band(d,32768)>0 then an["end"]=an["end"]+1;an.chunks:push(1)end end end;___BigInt_BigInt_Impl_.opNOT=function(an)if an==nil then do return ___BigInt_BigInt_Impl_.fromInt(-1)end end;local w;if an.isNegative then if an["end"]-an.start==1 and an.chunks[an.start]==1 then do return nil end end;local am=N.new()local a5=0;local a6=an["end"]-an.start;while a5=d then w.chunks[w.start+n]=ac-d;d=0;break end;w.chunks[w.start+n]=ac+32768-d;d=1 end;do return w end end;local am=N.new()local a5=0;local a6=an["end"]-an.start;while a50 then w["end"]=w["end"]+1;w.chunks:push(d)end;w.isNegative=true;do return w end end;___BigInt_BigInt_Impl_.opShiftRightUnsigned=function(an,aP)if an==nil then do return nil end end;if aP==0 then local am=N.new()local a5=0;local a6=an["end"]-an.start;while a5>>', can't shift a negative value"),0)end;if aP<0 then do return nil end end;local aQ=N.new()local l=aQ;local ah=R.int(aP/15)local b9=aP-ah*15;if b9==0 then local a5=ah;local a6=an["end"]-an.start;while a5ah)then break end;d=an.chunks[an.start+n]if l["end"]-l.start>0 or T.bor(T.rshift(d,b9),bm)>0 then l["end"]=l["end"]+1;l.chunks:unshift(T.bor(T.rshift(d,b9),bm))end;bm=T.band(T.lshift(d,15-b9),32767)end end;if l["end"]-l.start==0 then do return nil end else if an.isNegative then l.isNegative=true end;do return l end end end;___BigInt_BigInt_Impl_.opShiftRight=function(an,aP)if an==nil then do return nil end end;if aP==0 then local am=N.new()local a5=0;local a6=an["end"]-an.start;while a5ah)then break end;d=an.chunks[an.start+n]if l["end"]-l.start>0 or T.bor(T.rshift(d,b9),bm)>0 then l["end"]=l["end"]+1;l.chunks:unshift(T.bor(T.rshift(d,b9),bm))end;bm=T.band(T.lshift(d,15-b9),32767)end end;local ad;if l["end"]-l.start==0 then ad=nil else if an.isNegative then l.isNegative=true end;ad=l end;do return ___BigInt_BigInt_Impl_.opNOT(ad)end end;if aP<0 then do return nil end end;local aQ=N.new()local l=aQ;local ah=R.int(aP/15)local b9=aP-ah*15;if b9==0 then local a5=ah;local a6=an["end"]-an.start;while a5ah)then break end;d=an.chunks[an.start+n]if l["end"]-l.start>0 or T.bor(T.rshift(d,b9),bm)>0 then l["end"]=l["end"]+1;l.chunks:unshift(T.bor(T.rshift(d,b9),bm))end;bm=T.band(T.lshift(d,15-b9),32767)end end;if l["end"]-l.start==0 then do return nil end else if an.isNegative then l.isNegative=true end;do return l end end end;___BigInt_BigInt_Impl_._opShiftRight=function(an,aP)local aQ=N.new()local l=aQ;local ah=R.int(aP/15)local b9=aP-ah*15;if b9==0 then local a5=ah;local a6=an["end"]-an.start;while a5ah)then break end;d=an.chunks[an.start+n]if l["end"]-l.start>0 or T.bor(T.rshift(d,b9),bm)>0 then l["end"]=l["end"]+1;l.chunks:unshift(T.bor(T.rshift(d,b9),bm))end;bm=T.band(T.lshift(d,15-b9),32767)end end;if l["end"]-l.start==0 then do return nil end end;if an.isNegative then l.isNegative=true end;do return l end end;___BigInt_BigInt_Impl_.opShiftLeft=function(an,aP)if an==nil then do return nil end end;if aP==0 then local am=N.new()local a5=0;local a6=an["end"]-an.start;while a50 then l["end"]=l["end"]+1;l.chunks:push(bm)end end;if an.isNegative then l.isNegative=true end;do return l end end;___BigInt_BigInt_Impl_._opShiftLeft=function(an,aP)local aQ=N.new()local l=aQ;local ah=R.int(aP/15)local b9=aP-ah*15;local a5=0;local a6=ah;while a50 then l["end"]=l["end"]+1;l.chunks:push(bm)end end;if an.isNegative then l.isNegative=true end;do return l end end;___BigInt_BigInt_Impl_.opAND=function(an,aP)if an==nil or aP==nil then do return nil end end;if an.isNegative or aP.isNegative then _G.error(__haxe_Exception.thrown("ERROR '&', emulation of two's complement behavior for '&' with negative numbers is not implemented yet"),0)end;local l=nil;local b9;local n=(function()local aB;if an["end"]-an.start0)then break end;b9=T.band(an.chunks[an.start+n],aP.chunks[aP.start+n])if l~=nil then l["end"]=l["end"]+1;l.chunks:unshift(b9)else if b9~=0 then local an=N.new()l=an;l["end"]=l["end"]+1;l.chunks:unshift(b9)end end end;do return l end end;___BigInt_BigInt_Impl_._opAND=function(an,aP)local l=nil;local b9;local n=(function()local aB;if an["end"]-an.start0)then break end;b9=T.band(an.chunks[an.start+n],aP.chunks[aP.start+n])if l~=nil then l["end"]=l["end"]+1;l.chunks:unshift(b9)else if b9~=0 then local an=N.new()l=an;l["end"]=l["end"]+1;l.chunks:unshift(b9)end end end;do return l end end;___BigInt_BigInt_Impl_.opANDInt=function(a4,aP)do return ___BigInt_BigInt_Impl_.opAND(aP,___BigInt_BigInt_Impl_.fromInt(a4))end end;___BigInt_BigInt_Impl_.opOR=function(an,aP)if an==nil or aP==nil then do return nil end end;if an.isNegative or aP.isNegative then _G.error(__haxe_Exception.thrown("ERROR '&', emulation of two's complement behavior for '|' with negative numbers is not implemented yet"),0)end;local aQ=N.new()local l=aQ;local ah=(function()local aB;if an["end"]-an.startaP["end"]-aP.start then local a5=ah;local a6=an["end"]-an.start;while a5aP["end"]-aP.start then local a5=ah;local a6=an["end"]-an.start;while a5aP["end"]-aP.start then local a5=ah;local a6=an["end"]-an.start;while a5aP["end"]-aP.start then local a5=ah;local a6=an["end"]-an.start;while a50 then bq=__lua_lib_luautf8_Utf8.find(bp,"$$",idx,true)else if idx>=__lua_lib_luautf8_Utf8.len(bp)then bq=nil else bq=idx+1 end end;if bq~=nil then local br=__lua_lib_luautf8_Utf8.sub(bp,idx,bq-1)w:push(br)idx=bq+__lua_lib_luautf8_Utf8.len("$$")else w:push(__lua_lib_luautf8_Utf8.sub(bp,idx,__lua_lib_luautf8_Utf8.len(bp)))idx=nil end end;local aW=w;local a5=_hx_tab_array({},0)local a6=0;while a6n end;return aB end)()then do return n end else local n=n-1;local bv=T.arshift(bs,1)local bw=T.arshift(bs,1)local bx;if T.rshift(n,bv)==1 then bx=bv+1 else bw=T.arshift(bw,1)if bw==0 then local bx;if n==nil then bx="null"else local by=n;bx=R.string((function()local aC;if by<0 then aC=4294967296.0+by else aC=by+0.0 end;return aC end)())end;_G.error(__haxe_Exception.thrown(R.string(R.string("Error calculating intBitLength: ")..R.string(bx))..R.string(" has more bits than maxBitSize")),0)else local a4=T.rshift(n,bv)local bt=false;local bu=a4<0;if(function()local aD;if bt~=bu then aD=bt else aD=1>a4 end;return aD end)()then local bv=bv-bw;local bw=bw;if T.rshift(n,bv)==1 then bx=bv+1 else bw=T.arshift(bw,1)if bw==0 then local bx;if n==nil then bx="null"else local by=n;bx=R.string((function()local bz;if by<0 then bz=4294967296.0+by else bz=by+0.0 end;return bz end)())end;_G.error(__haxe_Exception.thrown(R.string(R.string("Error calculating intBitLength: ")..R.string(bx))..R.string(" has more bits than maxBitSize")),0)else local a4=T.rshift(n,bv)local bt=false;local bu=a4<0;bx=(function()local bA;if(function()local bB;if bt~=bu then bB=bt else bB=1>a4 end;return bB end)()then bA=M._bitsize(n,bv-bw,bw)else bA=M._bitsize(n,bv+bw,bw)end;return bA end)()end end else local bv=bv+bw;local bw=bw;if T.rshift(n,bv)==1 then bx=bv+1 else bw=T.arshift(bw,1)if bw==0 then local bx;if n==nil then bx="null"else local by=n;bx=R.string((function()local bC;if by<0 then bC=4294967296.0+by else bC=by+0.0 end;return bC end)())end;_G.error(__haxe_Exception.thrown(R.string(R.string("Error calculating intBitLength: ")..R.string(bx))..R.string(" has more bits than maxBitSize")),0)else local a4=T.rshift(n,bv)local bt=false;local bu=a4<0;bx=(function()local bD;if(function()local bE;if bt~=bu then bE=bt else bE=1>a4 end;return bE end)()then bD=M._bitsize(n,bv-bw,bw)else bD=M._bitsize(n,bv+bw,bw)end;return bD end)()end end end end end;if bx>=bs then _G.error(__haxe_Exception.thrown(R.string("Error calculating nextPowerOfTwo: reaching maxBitSize of ")..R.string(bs)),0)end;do return T.lshift(1,bx)end end end;M.bitsize=function(n,bs)if bs==nil then bs=32 end;local bt=false;local bu=n<0;if(function()local aB;if bt~=bu then aB=bt else aB=3>n end;return aB end)()then do return n end else bs=T.arshift(bs,1)local bw=bs;if T.rshift(n,bs)==1 then do return bs+1 end else bw=T.arshift(bw,1)if bw==0 then local ad;if n==nil then ad="null"else local by=n;ad=R.string((function()local aC;if by<0 then aC=4294967296.0+by else aC=by+0.0 end;return aC end)())end;_G.error(__haxe_Exception.thrown(R.string(R.string("Error calculating intBitLength: ")..R.string(ad))..R.string(" has more bits than maxBitSize")),0)else local a4=T.rshift(n,bs)local bt=false;local bu=a4<0;if(function()local aD;if bt~=bu then aD=bt else aD=1>a4 end;return aD end)()then local bv=bs-bw;local bw=bw;if T.rshift(n,bv)==1 then do return bv+1 end else bw=T.arshift(bw,1)if bw==0 then local ad;if n==nil then ad="null"else local by=n;ad=R.string((function()local bz;if by<0 then bz=4294967296.0+by else bz=by+0.0 end;return bz end)())end;_G.error(__haxe_Exception.thrown(R.string(R.string("Error calculating intBitLength: ")..R.string(ad))..R.string(" has more bits than maxBitSize")),0)else local a4=T.rshift(n,bv)local bt=false;local bu=a4<0;if(function()local bA;if bt~=bu then bA=bt else bA=1>a4 end;return bA end)()then do return M._bitsize(n,bv-bw,bw)end else do return M._bitsize(n,bv+bw,bw)end end end end else local bv=bs+bw;local bw=bw;if T.rshift(n,bv)==1 then do return bv+1 end else bw=T.arshift(bw,1)if bw==0 then local ad;if n==nil then ad="null"else local by=n;ad=R.string((function()local bB;if by<0 then bB=4294967296.0+by else bB=by+0.0 end;return bB end)())end;_G.error(__haxe_Exception.thrown(R.string(R.string("Error calculating intBitLength: ")..R.string(ad))..R.string(" has more bits than maxBitSize")),0)else local a4=T.rshift(n,bv)local bt=false;local bu=a4<0;if(function()local bC;if bt~=bu then bC=bt else bC=1>a4 end;return bC end)()then do return M._bitsize(n,bv-bw,bw)end else do return M._bitsize(n,bv+bw,bw)end end end end end end end end end;M._bitsize=function(n,bv,bw)if T.rshift(n,bv)==1 then do return bv+1 end else bw=T.arshift(bw,1)if bw==0 then local ad;if n==nil then ad="null"else local by=n;ad=R.string((function()local aB;if by<0 then aB=4294967296.0+by else aB=by+0.0 end;return aB end)())end;_G.error(__haxe_Exception.thrown(R.string(R.string("Error calculating intBitLength: ")..R.string(ad))..R.string(" has more bits than maxBitSize")),0)else local a4=T.rshift(n,bv)local bt=false;local bu=a4<0;if(function()local aC;if bt~=bu then aC=bt else aC=1>a4 end;return aC end)()then do return M._bitsize(n,bv-bw,bw)end else do return M._bitsize(n,bv+bw,bw)end end end end end;N.new=function(aW)local self=B(N.prototype)N.super(self,aW)return self end;N.super=function(self,aW)self["end"]=0;self.start=0;self.isNegative=false;if aW~=nil then self.chunks=aW else self.chunks=K.new()end end;N.__name__=true;N.createFromLittleInt=function(n)if n==0 then do return nil end end;local am=N.new()if n<0 then am.isNegative=true;n=-n end;while n~=0 do am["end"]=am["end"]+1;am.chunks:push(T.band(n,32767))n=T.rshift(n,15)end;do return am end end;N.createFromBaseString=function(as,ax)as=N.regexSpaces:replace(__lua_lib_luautf8_Utf8.lower(as),"")if N.regexZero:match(as)then do return nil end end;local bF=false;if N.regexSign:match(as)then as=N.regexSign:replace(as,"")bF=true end;if ax~=nil then local as=N.regexLeadingZeros:replace(as,"")local ax=ax;if ax==nil then ax=10 end;if ax<2 then _G.error(__haxe_Exception.thrown(R.string(R.string("Error, base ")..R.string(ax))..R.string(" need to be greater or equal 2")),0)end;if ax>16 then _G.error(__haxe_Exception.thrown(R.string(R.string(R.string("Error, base ")..R.string(ax))..R.string(" for string output is to great. Max value can be "))..R.string(N.hexaChars.length)),0)end;local n=__lua_lib_luautf8_Utf8.len(as)local aP=___BigInt_BigInt_Impl_.fromInt(1)local bG=___BigInt_BigInt_Impl_.fromInt(0)local aN;while n>0 do n=n-1;local bH=n;aN=N.hexaChars:indexOf(__lua_lib_luautf8_Utf8.sub(as,bH+1,bH+1))if aN==-1 or aN>=ax then _G.error(__haxe_Exception.thrown(R.string(R.string(R.string(R.string("Error, base ")..R.string(ax))..R.string(" string can only contain \""))..R.string(N.hexaChars:join("")))..R.string("\"")),0)end;local d=aN;local aT;if d==1 then local am=N.new()local a5=0;local a6=aP["end"]-aP.start;while a50 then b6["end"]=b6["end"]+1;b6.chunks:push(ac)end;aT=b6 end;if bG==nil then if aT==nil then bG=nil else local am=N.new()local a5=0;local a6=aT["end"]-aT.start;while a5aT["end"]-aT.start then local am=N.new()local a5=0;local a6=bG["end"]-bG.start;while a50 then a4["end"]=a4["end"]+1;a4.chunks:push(d)end end;an=a4 else local am=N.new()local a5=0;local a6=aT["end"]-aT.start;while a50 then a4["end"]=a4["end"]+1;a4.chunks:push(d)end end;an=a4 end;an.isNegative=true;bG=an else local am=N.new(bG.chunks)am.start=bG.start;am["end"]=bG["end"]am.isNegative=not bG.isNegative;local an=am;local aP=an;local d;if ___BigInt_BigInt_Impl_.greater(aT,aP)then local am=N.new()local a5=0;local a6=aT["end"]-aT.start;while a5=d then a4.chunks[a4.start+n]=ac-d;d=0;break end;a4.chunks[a4.start+n]=ac+32768-d;d=1 end end;d=a4;local n=d["end"]-d.start;while true do n=n-1;if not(n>=0)then break end;if d.chunks[d.start+n]==0 then d["end"]=d["end"]-1 else n=0 end end;bG=d else local am=N.new()local a5=0;local a6=aP["end"]-aP.start;while a5=d then a4.chunks[a4.start+n]=ac-d;d=0;break end;a4.chunks[a4.start+n]=ac+32768-d;d=1 end end;d=a4;local n=d["end"]-d.start;while true do n=n-1;if not(n>=0)then break end;if d.chunks[d.start+n]==0 then d["end"]=d["end"]-1 else n=0 end end;if d["end"]-d.start==0 then bG=nil else d.isNegative=true;bG=d end end end else if aT.isNegative then local am=N.new(aT.chunks)am.start=aT.start;am["end"]=aT["end"]am.isNegative=not aT.isNegative;local an=am;local aP=an;local d;if ___BigInt_BigInt_Impl_.greater(bG,aP)then local am=N.new()local a5=0;local a6=bG["end"]-bG.start;while a5=d then a4.chunks[a4.start+n]=ac-d;d=0;break end;a4.chunks[a4.start+n]=ac+32768-d;d=1 end end;d=a4;local n=d["end"]-d.start;while true do n=n-1;if not(n>=0)then break end;if d.chunks[d.start+n]==0 then d["end"]=d["end"]-1 else n=0 end end;bG=d else local am=N.new()local a5=0;local a6=aP["end"]-aP.start;while a5=d then a4.chunks[a4.start+n]=ac-d;d=0;break end;a4.chunks[a4.start+n]=ac+32768-d;d=1 end end;d=a4;local n=d["end"]-d.start;while true do n=n-1;if not(n>=0)then break end;if d.chunks[d.start+n]==0 then d["end"]=d["end"]-1 else n=0 end end;if d["end"]-d.start==0 then bG=nil else d.isNegative=true;bG=d end end else if bG["end"]-bG.start>aT["end"]-aT.start then local am=N.new()local a5=0;local a6=bG["end"]-bG.start;while a50 then a4["end"]=a4["end"]+1;a4.chunks:push(d)end end;bG=a4 else local am=N.new()local a5=0;local a6=aT["end"]-aT.start;while a50 then a4["end"]=a4["end"]+1;a4.chunks:push(d)end end;bG=a4 end end end end end;aP=___BigInt_BigInt_Impl_.opMulticplicate(aP,___BigInt_BigInt_Impl_.fromInt(ax))end;if bF then bG.isNegative=true;do return bG end else do return bG end end else if N.regexBinary:match(as)then local as=N.regexLeadingZeros:replace(N.regexBinary:replace(as,""),"")local am=N.new()am.isNegative=bF;local n=__lua_lib_luautf8_Utf8.len(as)local bit=1;local aA=0;while n>0 do n=n-1;local bH=n;local a5=__lua_lib_luautf8_Utf8.sub(as,bH+1,bH+1)if a5=="0"then elseif a5=="1"then aA=aA+bit else _G.error(__haxe_Exception.thrown("Error, binary string can only contain \"0\" or \"1\""),0)end;bit=T.lshift(bit,1)if bit==32768 then am["end"]=am["end"]+1;am.chunks:push(aA)bit=1;aA=0 end end;if bit>1 then am["end"]=am["end"]+1;am.chunks:push(aA)end;local an=am;do return an end else if N.regexHex:match(as)then local as=N.regexLeadingZeros:replace(N.regexHex:replace(as,""),"")local am=N.new()am.isNegative=bF;local n=__lua_lib_luautf8_Utf8.len(as)local bit=1;local aA=0;local aN;while n>0 do n=n-1;local bH=n;aN=N.hexaChars:indexOf(__lua_lib_luautf8_Utf8.sub(as,bH+1,bH+1))if aN==-1 then _G.error(__haxe_Exception.thrown(R.string(R.string("Error, hexadecimal string can only contain \"")..R.string(N.hexaChars:join("")))..R.string("\"")),0)end;aA=aA+aN*bit;bit=T.lshift(bit,4)if bit>=32768 then am["end"]=am["end"]+1;am.chunks:push(T.band(aA,32767))if bit==32768 then bit=1 else if bit==65536 then bit=2 else if bit==131072 then bit=4 else bit=8 end end end;aA=T.arshift(aA,15)end end;if aA~=0 then am["end"]=am["end"]+1;am.chunks:push(aA)end;local an=am;do return an end else if N.regexOctal:match(as)then local as=N.regexLeadingZeros:replace(N.regexOctal:replace(as,""),"")local ax=8;if ax==nil then ax=10 end;if ax<2 then _G.error(__haxe_Exception.thrown(R.string(R.string("Error, base ")..R.string(ax))..R.string(" need to be greater or equal 2")),0)end;if ax>16 then _G.error(__haxe_Exception.thrown(R.string(R.string(R.string("Error, base ")..R.string(ax))..R.string(" for string output is to great. Max value can be "))..R.string(N.hexaChars.length)),0)end;local n=__lua_lib_luautf8_Utf8.len(as)local aP=___BigInt_BigInt_Impl_.fromInt(1)local bG=___BigInt_BigInt_Impl_.fromInt(0)local aN;while n>0 do n=n-1;local bH=n;aN=N.hexaChars:indexOf(__lua_lib_luautf8_Utf8.sub(as,bH+1,bH+1))if aN==-1 or aN>=ax then _G.error(__haxe_Exception.thrown(R.string(R.string(R.string(R.string("Error, base ")..R.string(ax))..R.string(" string can only contain \""))..R.string(N.hexaChars:join("")))..R.string("\"")),0)end;local d=aN;local aT;if d==1 then local am=N.new()local a5=0;local a6=aP["end"]-aP.start;while a50 then b6["end"]=b6["end"]+1;b6.chunks:push(ac)end;aT=b6 end;if bG==nil then if aT==nil then bG=nil else local am=N.new()local a5=0;local a6=aT["end"]-aT.start;while a5aT["end"]-aT.start then local am=N.new()local a5=0;local a6=bG["end"]-bG.start;while a50 then a4["end"]=a4["end"]+1;a4.chunks:push(d)end end;an=a4 else local am=N.new()local a5=0;local a6=aT["end"]-aT.start;while a50 then a4["end"]=a4["end"]+1;a4.chunks:push(d)end end;an=a4 end;an.isNegative=true;bG=an else local am=N.new(bG.chunks)am.start=bG.start;am["end"]=bG["end"]am.isNegative=not bG.isNegative;local an=am;local aP=an;local d;if ___BigInt_BigInt_Impl_.greater(aT,aP)then local am=N.new()local a5=0;local a6=aT["end"]-aT.start;while a5=d then a4.chunks[a4.start+n]=ac-d;d=0;break end;a4.chunks[a4.start+n]=ac+32768-d;d=1 end end;d=a4;local n=d["end"]-d.start;while true do n=n-1;if not(n>=0)then break end;if d.chunks[d.start+n]==0 then d["end"]=d["end"]-1 else n=0 end end;bG=d else local am=N.new()local a5=0;local a6=aP["end"]-aP.start;while a5=d then a4.chunks[a4.start+n]=ac-d;d=0;break end;a4.chunks[a4.start+n]=ac+32768-d;d=1 end end;d=a4;local n=d["end"]-d.start;while true do n=n-1;if not(n>=0)then break end;if d.chunks[d.start+n]==0 then d["end"]=d["end"]-1 else n=0 end end;if d["end"]-d.start==0 then bG=nil else d.isNegative=true;bG=d end end end else if aT.isNegative then local am=N.new(aT.chunks)am.start=aT.start;am["end"]=aT["end"]am.isNegative=not aT.isNegative;local an=am;local aP=an;local d;if ___BigInt_BigInt_Impl_.greater(bG,aP)then local am=N.new()local a5=0;local a6=bG["end"]-bG.start;while a5=d then a4.chunks[a4.start+n]=ac-d;d=0;break end;a4.chunks[a4.start+n]=ac+32768-d;d=1 end end;d=a4;local n=d["end"]-d.start;while true do n=n-1;if not(n>=0)then break end;if d.chunks[d.start+n]==0 then d["end"]=d["end"]-1 else n=0 end end;bG=d else local am=N.new()local a5=0;local a6=aP["end"]-aP.start;while a5=d then a4.chunks[a4.start+n]=ac-d;d=0;break end;a4.chunks[a4.start+n]=ac+32768-d;d=1 end end;d=a4;local n=d["end"]-d.start;while true do n=n-1;if not(n>=0)then break end;if d.chunks[d.start+n]==0 then d["end"]=d["end"]-1 else n=0 end end;if d["end"]-d.start==0 then bG=nil else d.isNegative=true;bG=d end end else if bG["end"]-bG.start>aT["end"]-aT.start then local am=N.new()local a5=0;local a6=bG["end"]-bG.start;while a50 then a4["end"]=a4["end"]+1;a4.chunks:push(d)end end;bG=a4 else local am=N.new()local a5=0;local a6=aT["end"]-aT.start;while a50 then a4["end"]=a4["end"]+1;a4.chunks:push(d)end end;bG=a4 end end end end end;aP=___BigInt_BigInt_Impl_.opMulticplicate(aP,___BigInt_BigInt_Impl_.fromInt(ax))end;if bF then bG.isNegative=true;do return bG end else do return bG end end else local as=N.regexLeadingZeros:replace(as,"")local ax=10;if ax==nil then ax=10 end;if ax<2 then _G.error(__haxe_Exception.thrown(R.string(R.string("Error, base ")..R.string(ax))..R.string(" need to be greater or equal 2")),0)end;if ax>16 then _G.error(__haxe_Exception.thrown(R.string(R.string(R.string("Error, base ")..R.string(ax))..R.string(" for string output is to great. Max value can be "))..R.string(N.hexaChars.length)),0)end;local n=__lua_lib_luautf8_Utf8.len(as)local aP=___BigInt_BigInt_Impl_.fromInt(1)local bG=___BigInt_BigInt_Impl_.fromInt(0)local aN;while n>0 do n=n-1;local bH=n;aN=N.hexaChars:indexOf(__lua_lib_luautf8_Utf8.sub(as,bH+1,bH+1))if aN==-1 or aN>=ax then _G.error(__haxe_Exception.thrown(R.string(R.string(R.string(R.string("Error, base ")..R.string(ax))..R.string(" string can only contain \""))..R.string(N.hexaChars:join("")))..R.string("\"")),0)end;local d=aN;local aT;if d==1 then local am=N.new()local a5=0;local a6=aP["end"]-aP.start;while a50 then b6["end"]=b6["end"]+1;b6.chunks:push(ac)end;aT=b6 end;if bG==nil then if aT==nil then bG=nil else local am=N.new()local a5=0;local a6=aT["end"]-aT.start;while a5aT["end"]-aT.start then local am=N.new()local a5=0;local a6=bG["end"]-bG.start;while a50 then a4["end"]=a4["end"]+1;a4.chunks:push(d)end end;an=a4 else local am=N.new()local a5=0;local a6=aT["end"]-aT.start;while a50 then a4["end"]=a4["end"]+1;a4.chunks:push(d)end end;an=a4 end;an.isNegative=true;bG=an else local am=N.new(bG.chunks)am.start=bG.start;am["end"]=bG["end"]am.isNegative=not bG.isNegative;local an=am;local aP=an;local d;if ___BigInt_BigInt_Impl_.greater(aT,aP)then local am=N.new()local a5=0;local a6=aT["end"]-aT.start;while a5=d then a4.chunks[a4.start+n]=ac-d;d=0;break end;a4.chunks[a4.start+n]=ac+32768-d;d=1 end end;d=a4;local n=d["end"]-d.start;while true do n=n-1;if not(n>=0)then break end;if d.chunks[d.start+n]==0 then d["end"]=d["end"]-1 else n=0 end end;bG=d else local am=N.new()local a5=0;local a6=aP["end"]-aP.start;while a5=d then a4.chunks[a4.start+n]=ac-d;d=0;break end;a4.chunks[a4.start+n]=ac+32768-d;d=1 end end;d=a4;local n=d["end"]-d.start;while true do n=n-1;if not(n>=0)then break end;if d.chunks[d.start+n]==0 then d["end"]=d["end"]-1 else n=0 end end;if d["end"]-d.start==0 then bG=nil else d.isNegative=true;bG=d end end end else if aT.isNegative then local am=N.new(aT.chunks)am.start=aT.start;am["end"]=aT["end"]am.isNegative=not aT.isNegative;local an=am;local aP=an;local d;if ___BigInt_BigInt_Impl_.greater(bG,aP)then local am=N.new()local a5=0;local a6=bG["end"]-bG.start;while a5=d then a4.chunks[a4.start+n]=ac-d;d=0;break end;a4.chunks[a4.start+n]=ac+32768-d;d=1 end end;d=a4;local n=d["end"]-d.start;while true do n=n-1;if not(n>=0)then break end;if d.chunks[d.start+n]==0 then d["end"]=d["end"]-1 else n=0 end end;bG=d else local am=N.new()local a5=0;local a6=aP["end"]-aP.start;while a5=d then a4.chunks[a4.start+n]=ac-d;d=0;break end;a4.chunks[a4.start+n]=ac+32768-d;d=1 end end;d=a4;local n=d["end"]-d.start;while true do n=n-1;if not(n>=0)then break end;if d.chunks[d.start+n]==0 then d["end"]=d["end"]-1 else n=0 end end;if d["end"]-d.start==0 then bG=nil else d.isNegative=true;bG=d end end else if bG["end"]-bG.start>aT["end"]-aT.start then local am=N.new()local a5=0;local a6=bG["end"]-bG.start;while a50 then a4["end"]=a4["end"]+1;a4.chunks:push(d)end end;bG=a4 else local am=N.new()local a5=0;local a6=aT["end"]-aT.start;while a50 then a4["end"]=a4["end"]+1;a4.chunks:push(d)end end;bG=a4 end end end end end;aP=___BigInt_BigInt_Impl_.opMulticplicate(aP,___BigInt_BigInt_Impl_.fromInt(ax))end;if bF then bG.isNegative=true;do return bG end else do return bG end end end end end end end;N.getStringOfZeros=function(bI)local a5=_hx_tab_array({},0)local a6=0;local a7=bI;while a616 then _G.error(__haxe_Exception.thrown(R.string(R.string(R.string("Error, base ")..R.string(ax))..R.string(" for string output is to great. Max value can be "))..R.string(N.hexaChars.length)),0)end;local n=__lua_lib_luautf8_Utf8.len(as)local aP=___BigInt_BigInt_Impl_.fromInt(1)local bG=___BigInt_BigInt_Impl_.fromInt(0)local aN;while n>0 do n=n-1;local bH=n;aN=N.hexaChars:indexOf(__lua_lib_luautf8_Utf8.sub(as,bH+1,bH+1))if aN==-1 or aN>=ax then _G.error(__haxe_Exception.thrown(R.string(R.string(R.string(R.string("Error, base ")..R.string(ax))..R.string(" string can only contain \""))..R.string(N.hexaChars:join("")))..R.string("\"")),0)end;local d=aN;local aT;if d==1 then local am=N.new()local a5=0;local a6=aP["end"]-aP.start;while a50 then b6["end"]=b6["end"]+1;b6.chunks:push(ac)end;aT=b6 end;if bG==nil then if aT==nil then bG=nil else local am=N.new()local a5=0;local a6=aT["end"]-aT.start;while a5aT["end"]-aT.start then local am=N.new()local a5=0;local a6=bG["end"]-bG.start;while a50 then a4["end"]=a4["end"]+1;a4.chunks:push(d)end end;an=a4 else local am=N.new()local a5=0;local a6=aT["end"]-aT.start;while a50 then a4["end"]=a4["end"]+1;a4.chunks:push(d)end end;an=a4 end;an.isNegative=true;bG=an else local am=N.new(bG.chunks)am.start=bG.start;am["end"]=bG["end"]am.isNegative=not bG.isNegative;local an=am;local aP=an;local d;if ___BigInt_BigInt_Impl_.greater(aT,aP)then local am=N.new()local a5=0;local a6=aT["end"]-aT.start;while a5=d then a4.chunks[a4.start+n]=ac-d;d=0;break end;a4.chunks[a4.start+n]=ac+32768-d;d=1 end end;d=a4;local n=d["end"]-d.start;while true do n=n-1;if not(n>=0)then break end;if d.chunks[d.start+n]==0 then d["end"]=d["end"]-1 else n=0 end end;bG=d else local am=N.new()local a5=0;local a6=aP["end"]-aP.start;while a5=d then a4.chunks[a4.start+n]=ac-d;d=0;break end;a4.chunks[a4.start+n]=ac+32768-d;d=1 end end;d=a4;local n=d["end"]-d.start;while true do n=n-1;if not(n>=0)then break end;if d.chunks[d.start+n]==0 then d["end"]=d["end"]-1 else n=0 end end;if d["end"]-d.start==0 then bG=nil else d.isNegative=true;bG=d end end end else if aT.isNegative then local am=N.new(aT.chunks)am.start=aT.start;am["end"]=aT["end"]am.isNegative=not aT.isNegative;local an=am;local aP=an;local d;if ___BigInt_BigInt_Impl_.greater(bG,aP)then local am=N.new()local a5=0;local a6=bG["end"]-bG.start;while a5=d then a4.chunks[a4.start+n]=ac-d;d=0;break end;a4.chunks[a4.start+n]=ac+32768-d;d=1 end end;d=a4;local n=d["end"]-d.start;while true do n=n-1;if not(n>=0)then break end;if d.chunks[d.start+n]==0 then d["end"]=d["end"]-1 else n=0 end end;bG=d else local am=N.new()local a5=0;local a6=aP["end"]-aP.start;while a5=d then a4.chunks[a4.start+n]=ac-d;d=0;break end;a4.chunks[a4.start+n]=ac+32768-d;d=1 end end;d=a4;local n=d["end"]-d.start;while true do n=n-1;if not(n>=0)then break end;if d.chunks[d.start+n]==0 then d["end"]=d["end"]-1 else n=0 end end;if d["end"]-d.start==0 then bG=nil else d.isNegative=true;bG=d end end else if bG["end"]-bG.start>aT["end"]-aT.start then local am=N.new()local a5=0;local a6=bG["end"]-bG.start;while a50 then a4["end"]=a4["end"]+1;a4.chunks:push(d)end end;bG=a4 else local am=N.new()local a5=0;local a6=aT["end"]-aT.start;while a50 then a4["end"]=a4["end"]+1;a4.chunks:push(d)end end;bG=a4 end end end end end;aP=___BigInt_BigInt_Impl_.opMulticplicate(aP,___BigInt_BigInt_Impl_.fromInt(ax))end;if bF then bG.isNegative=true;do return bG end else do return bG end end end;N.fromBinaryString=function(as,bF)local am=N.new()am.isNegative=bF;local n=__lua_lib_luautf8_Utf8.len(as)local bit=1;local aA=0;while n>0 do n=n-1;local bH=n;local a5=__lua_lib_luautf8_Utf8.sub(as,bH+1,bH+1)if a5=="0"then elseif a5=="1"then aA=aA+bit else _G.error(__haxe_Exception.thrown("Error, binary string can only contain \"0\" or \"1\""),0)end;bit=T.lshift(bit,1)if bit==32768 then am["end"]=am["end"]+1;am.chunks:push(aA)bit=1;aA=0 end end;if bit>1 then am["end"]=am["end"]+1;am.chunks:push(aA)end;local an=am;do return an end end;N.fromHexString=function(as,bF)local am=N.new()am.isNegative=bF;local n=__lua_lib_luautf8_Utf8.len(as)local bit=1;local aA=0;local aN;while n>0 do n=n-1;local bH=n;aN=N.hexaChars:indexOf(__lua_lib_luautf8_Utf8.sub(as,bH+1,bH+1))if aN==-1 then _G.error(__haxe_Exception.thrown(R.string(R.string("Error, hexadecimal string can only contain \"")..R.string(N.hexaChars:join("")))..R.string("\"")),0)end;aA=aA+aN*bit;bit=T.lshift(bit,4)if bit>=32768 then am["end"]=am["end"]+1;am.chunks:push(T.band(aA,32767))if bit==32768 then bit=1 else if bit==65536 then bit=2 else if bit==131072 then bit=4 else bit=8 end end end;aA=T.arshift(aA,15)end end;if aA~=0 then am["end"]=am["end"]+1;am.chunks:push(aA)end;local an=am;do return an end end;N.fromBytes=function(aP)if aP.length==1 and aP.b[0]==0 then do return nil end end;local am=N.new()local ah=aP.length;if aP.b[ah-1]==0 then am.isNegative=true;ah=ah-1 end;local aF=(ah-1)*8+M.bitsize(aP.b[ah-1],8)local aG=R.int((aF-1)/15)+1;local a5=0;local a6=aG;while a5=self["end"]-self.start then do return nil end end;am.start=self.start+ao;am["end"]=self["end"]do return am end end;N.prototype.splitLow=function(self,ao)local n=0;if self.start+ao>self["end"]then ao=self["end"]-self.start end;while n=0)then break end;if self.chunks[self.start+n]==0 then if ap then self["end"]=self["end"]-1;self.chunks:pop()else self["end"]=self["end"]-1 end else n=0 end end end;N.prototype.toLittleInt=function(self)if self["end"]-self.start==0 then do return 0 end else local ar=0;local ad=0;local a5=0;local a6=self["end"]-self.start;while a516 then _G.error(__haxe_Exception.thrown(R.string(R.string(R.string("Error, base ")..R.string(ax))..R.string(" for string output is to great. Max value can be "))..R.string(N.hexaChars.length)),0)end;local as=""local an=self;local an=an;local am=N.new(an.chunks)am.start=an.start;am["end"]=an["end"]am.isNegative=an.isNegative;local an=am;local an=an;an.isNegative=false;local a4=an;local aj=0;local w;while a4~=nil do local bb=___BigInt_BigInt_Impl_.fromInt(ax)if bb==nil then _G.error(__haxe_Exception.thrown("Error '/', divisor can't be 0"),0)end;if a4==nil then w=A({__fields__={quotient=true,remainder=true},quotient=nil,remainder=nil})else if ___BigInt_BigInt_Impl_.equal(bb,___BigInt_BigInt_Impl_.fromInt(1))then local am=N.new()local a5=0;local a6=a4["end"]-a4.start;while a5=32768 then b8["end"]=b8["end"]+1;b8.chunks:unshift(T.rshift(b7,15))b8["end"]=b8["end"]+1;b8.chunks:unshift(T.band(b7,32767))else b8["end"]=b8["end"]+1;b8.chunks:unshift(b7)end;b9=R.int(_G.math.fmod(ac,d))if not(n>0)then break end end;bL=A({__fields__={quotient=true,remainder=true},quotient=b8,remainder=___BigInt_BigInt_Impl_.fromInt(b9)})end else bL=___BigInt_BigInt_Impl_.divModLong(a4,aP)end end else bL=___BigInt_BigInt_Impl_.divModLong(a4,aP)end;if bL.remainder~=nil then local an=bL.remainder;an.isNegative=true end else local am=N.new(a4.chunks)am.start=a4.start;am["end"]=a4["end"]am.isNegative=not a4.isNegative;local an=am;local a4=an;if bb["end"]-bb.start<=2 then if a4["end"]-a4.start<=2 then bL=A({__fields__={quotient=true,remainder=true},quotient=___BigInt_BigInt_Impl_.fromInt(R.int(___BigInt_BigInt_Impl_.toInt(a4)/___BigInt_BigInt_Impl_.toInt(bb))),remainder=___BigInt_BigInt_Impl_.fromInt(R.int(_G.math.fmod(___BigInt_BigInt_Impl_.toInt(a4),___BigInt_BigInt_Impl_.toInt(bb))))})else if bb["end"]-bb.start==1 then if bb.chunks[bb.start]==1 then bL=A({__fields__={quotient=true,remainder=true},quotient=a4,remainder=nil})else local d=___BigInt_BigInt_Impl_.toInt(bb)local n=a4["end"]-a4.start-1;local ac=T.lshift(a4.chunks[a4.start+n],15)n=n-1;local ac=T.bor(ac,a4.chunks[a4.start+n])local b8=___BigInt_BigInt_Impl_.fromInt(R.int(ac/d))local b9=R.int(_G.math.fmod(ac,d))local b7;while true do n=n-1;ac=T.bor(T.lshift(b9,15),a4.chunks[a4.start+n])b7=R.int(ac/d)if b7>=32768 then b8["end"]=b8["end"]+1;b8.chunks:unshift(T.rshift(b7,15))b8["end"]=b8["end"]+1;b8.chunks:unshift(T.band(b7,32767))else b8["end"]=b8["end"]+1;b8.chunks:unshift(b7)end;b9=R.int(_G.math.fmod(ac,d))if not(n>0)then break end end;bL=A({__fields__={quotient=true,remainder=true},quotient=b8,remainder=___BigInt_BigInt_Impl_.fromInt(b9)})end else bL=___BigInt_BigInt_Impl_.divModLong(a4,bb)end end else bL=___BigInt_BigInt_Impl_.divModLong(a4,bb)end;if bL.quotient~=nil then local an=bL.quotient;an.isNegative=true end;if bL.remainder~=nil then local an=bL.remainder;an.isNegative=true end end else if bb.isNegative then local am=N.new(bb.chunks)am.start=bb.start;am["end"]=bb["end"]am.isNegative=not bb.isNegative;local an=am;local aP=an;if aP["end"]-aP.start<=2 then if a4["end"]-a4.start<=2 then bL=A({__fields__={quotient=true,remainder=true},quotient=___BigInt_BigInt_Impl_.fromInt(R.int(___BigInt_BigInt_Impl_.toInt(a4)/___BigInt_BigInt_Impl_.toInt(aP))),remainder=___BigInt_BigInt_Impl_.fromInt(R.int(_G.math.fmod(___BigInt_BigInt_Impl_.toInt(a4),___BigInt_BigInt_Impl_.toInt(aP))))})else if aP["end"]-aP.start==1 then if aP.chunks[aP.start]==1 then bL=A({__fields__={quotient=true,remainder=true},quotient=a4,remainder=nil})else local d=___BigInt_BigInt_Impl_.toInt(aP)local n=a4["end"]-a4.start-1;local ac=T.lshift(a4.chunks[a4.start+n],15)n=n-1;local ac=T.bor(ac,a4.chunks[a4.start+n])local b8=___BigInt_BigInt_Impl_.fromInt(R.int(ac/d))local b9=R.int(_G.math.fmod(ac,d))local b7;while true do n=n-1;ac=T.bor(T.lshift(b9,15),a4.chunks[a4.start+n])b7=R.int(ac/d)if b7>=32768 then b8["end"]=b8["end"]+1;b8.chunks:unshift(T.rshift(b7,15))b8["end"]=b8["end"]+1;b8.chunks:unshift(T.band(b7,32767))else b8["end"]=b8["end"]+1;b8.chunks:unshift(b7)end;b9=R.int(_G.math.fmod(ac,d))if not(n>0)then break end end;bL=A({__fields__={quotient=true,remainder=true},quotient=b8,remainder=___BigInt_BigInt_Impl_.fromInt(b9)})end else bL=___BigInt_BigInt_Impl_.divModLong(a4,aP)end end else bL=___BigInt_BigInt_Impl_.divModLong(a4,aP)end;if bL.quotient~=nil then local an=bL.quotient;an.isNegative=true end else if bb["end"]-bb.start<=2 then if a4["end"]-a4.start<=2 then bL=A({__fields__={quotient=true,remainder=true},quotient=___BigInt_BigInt_Impl_.fromInt(R.int(___BigInt_BigInt_Impl_.toInt(a4)/___BigInt_BigInt_Impl_.toInt(bb))),remainder=___BigInt_BigInt_Impl_.fromInt(R.int(_G.math.fmod(___BigInt_BigInt_Impl_.toInt(a4),___BigInt_BigInt_Impl_.toInt(bb))))})else if bb["end"]-bb.start==1 then if bb.chunks[bb.start]==1 then bL=A({__fields__={quotient=true,remainder=true},quotient=a4,remainder=nil})else local d=___BigInt_BigInt_Impl_.toInt(bb)local n=a4["end"]-a4.start-1;local ac=T.lshift(a4.chunks[a4.start+n],15)n=n-1;local ac=T.bor(ac,a4.chunks[a4.start+n])local b8=___BigInt_BigInt_Impl_.fromInt(R.int(ac/d))local b9=R.int(_G.math.fmod(ac,d))local b7;while true do n=n-1;ac=T.bor(T.lshift(b9,15),a4.chunks[a4.start+n])b7=R.int(ac/d)if b7>=32768 then b8["end"]=b8["end"]+1;b8.chunks:unshift(T.rshift(b7,15))b8["end"]=b8["end"]+1;b8.chunks:unshift(T.band(b7,32767))else b8["end"]=b8["end"]+1;b8.chunks:unshift(b7)end;b9=R.int(_G.math.fmod(ac,d))if not(n>0)then break end end;bL=A({__fields__={quotient=true,remainder=true},quotient=b8,remainder=___BigInt_BigInt_Impl_.fromInt(b9)})end else bL=___BigInt_BigInt_Impl_.divModLong(a4,bb)end end else bL=___BigInt_BigInt_Impl_.divModLong(a4,bb)end end end;w=bL end end end;a4=w.quotient;if ay>0 then as=R.string((function()local aB;if aj~=0 and _G.math.fmod(aj,ay)==0 then aB=" "else aB=""end;return aB end)())..R.string(as)aj=aj+1 end;as=R.string(N.hexaChars[___BigInt_BigInt_Impl_.toInt(w.remainder)])..R.string(as)end;if az and ay>0 then if _G.math.fmod(aj,ay)~=0 then local a5=_hx_tab_array({},0)local a6=0;local a7=ay-_G.math.fmod(aj,ay)while a60 then as=R.string((function()local aB;if _G.math.fmod(aj,ay)==0 and ay>0 and aj~=0 then aB=" "else aB=""end;return aB end)())..R.string(as)end;as=R.string((function()local aC;if T.band(bit,aA)==0 then aC="0"else aC="1"end;return aC end)())..R.string(as)aj=aj+1;bit=T.lshift(bit,1)end end;if az and ay>0 then if _G.math.fmod(aj,ay)~=0 then local a5=_hx_tab_array({},0)local a6=0;local a7=ay-_G.math.fmod(aj,ay)while a6=4 do if ay>0 then as=R.string((function()local aB;if aj~=0 and _G.math.fmod(aj,ay)==0 then aB=" "else aB=""end;return aB end)())..R.string(as)aj=aj+1 end;as=R.string(N.hexaChars[T.band(aA,15)])..R.string(as)aA=T.arshift(aA,4)bm=bm-4 end;bm=15+bm;local bm=bm;if bm==0 then aA=0 elseif bm==1 then aA=T.band(aA,1)elseif bm==2 then aA=T.band(aA,3)else aA=T.band(aA,7)end end;if bm>0 and aA>0 then if ay>0 then aj=aj+1;as=R.string((function()local aC;if _G.math.fmod(aj-1,ay)==0 then aC=" "else aC=""end;return aC end)())..R.string(as)end;as=R.string(N.hexaChars[T.band(aA,15)])..R.string(as)end;if az and ay>0 then if _G.math.fmod(aj,ay)~=0 then local a5=_hx_tab_array({},0)local a6=0;local a7=ay-_G.math.fmod(aj,ay)while a6-_G.math.huge then do return ag<_G.math.huge end else do return false end end end;P.min=function(a4,aP)if P.isNaN(a4)or P.isNaN(aP)then do return 0/0 end else do return _G.math.min(a4,aP)end end end;Q.new=function(bM)local self=B(Q.prototype)Q.super(self,bM)self=bM;return self end;Q.super=function(self,bM)end;Q.__name__=true;Q.__index=function(as,c)if c=="length"then do return __lua_lib_luautf8_Utf8.len(as)end else local f=Q.prototype;local bN=c;if(function()local aB;if _G.type(f)=="string"and(Q.prototype[bN]~=nil or bN=="length")then aB=true elseif f.__fields__~=nil then aB=f.__fields__[bN]~=nil else aB=f[bN]~=nil end;return aB end)()then do return Q.prototype[c]end else if Q.__oldindex~=nil then if _G.type(Q.__oldindex)=="function"then do return Q.__oldindex(as,c)end else if _G.type(Q.__oldindex)=="table"then do return Q.__oldindex[c]end end end;do return nil end else do return nil end end end end end;Q.indexOfEmpty=function(as,bO)local h=__lua_lib_luautf8_Utf8.len(as)if bO<0 then bO=h+bO;if bO<0 then bO=0 end end;if bO>h then do return h end else do return bO end end end;Q.fromCharCode=function(bP)do return __lua_lib_luautf8_Utf8.char(bP)end end;Q.prototype=z()Q.prototype.toUpperCase=function(self)do return __lua_lib_luautf8_Utf8.upper(self)end end;Q.prototype.toLowerCase=function(self)do return __lua_lib_luautf8_Utf8.lower(self)end end;Q.prototype.indexOf=function(self,m,bO)if bO==nil then bO=1 else bO=bO+1 end;if m==""then do return Q.indexOfEmpty(self,bO-1)end end;local b9=__lua_lib_luautf8_Utf8.find(self,m,bO,true)if b9~=nil and b9>0 then do return b9-1 end else do return-1 end end end;Q.prototype.lastIndexOf=function(self,m,bO)local w=-1;if bO==nil then bO=__lua_lib_luautf8_Utf8.len(self)end;while true do local bQ=w+1;if bQ==nil then bQ=1 else bQ=bQ+1 end;local bR;if m==""then bR=Q.indexOfEmpty(self,bQ-1)else local b9=__lua_lib_luautf8_Utf8.find(self,m,bQ,true)bR=(function()local aB;if b9~=nil and b9>0 then aB=b9-1 else aB=-1 end;return aB end)()end;if bR==-1 or bR>bO or bR==w then break end;w=bR end;do return w end end;Q.prototype.split=function(self,bS)local idx=1;local w=_hx_tab_array({},0)while idx~=nil do local bq=0;if __lua_lib_luautf8_Utf8.len(bS)>0 then bq=__lua_lib_luautf8_Utf8.find(self,bS,idx,true)else if idx>=__lua_lib_luautf8_Utf8.len(self)then bq=nil else bq=idx+1 end end;if bq~=nil then local br=__lua_lib_luautf8_Utf8.sub(self,idx,bq-1)w:push(br)idx=bq+__lua_lib_luautf8_Utf8.len(bS)else w:push(__lua_lib_luautf8_Utf8.sub(self,idx,__lua_lib_luautf8_Utf8.len(self)))idx=nil end end;do return w end end;Q.prototype.toString=function(self)do return self end end;Q.prototype.substring=function(self,bO,bT)if bT==nil then bT=__lua_lib_luautf8_Utf8.len(self)end;if bT<0 then bT=0 end;if bO<0 then bO=0 end;if bTae+__lua_lib_luautf8_Utf8.len(self)then e=__lua_lib_luautf8_Utf8.len(self)else if e<0 then e=__lua_lib_luautf8_Utf8.len(self)+e end end;if ae<0 then ae=__lua_lib_luautf8_Utf8.len(self)+ae end;if ae<0 then ae=0 end;do return __lua_lib_luautf8_Utf8.sub(self,ae+1,ae+e)end end;Q.prototype.__class__=Q;R.new={}R.__name__=true;R.string=function(as)do return _hx_tostring(as,0)end end;R.int=function(ac)if not P.isFinite(ac)or P.isNaN(ac)then do return 0 end else do return _(ac)end end end;__haxe_Exception.new=function(bU,bV,bW)local self=B(__haxe_Exception.prototype)__haxe_Exception.super(self,bU,bV,bW)return self end;__haxe_Exception.super=function(self,bU,bV,bW)self.__skipStack=0;self.__exceptionMessage=bU;self.__previousException=bV;if bW~=nil then self.__nativeException=bW;self.__nativeStack=__haxe_NativeStackTrace.exceptionStack()else self.__nativeException=self;self.__nativeStack=__haxe_NativeStackTrace.callStack()self.__skipStack=1 end end;__haxe_Exception.__name__=true;__haxe_Exception.thrown=function(bG)if __lua_Boot.__instanceof(bG,__haxe_Exception)then do return bG:get_native()end else local ao=__haxe_ValueException.new(bG)ao.__skipStack=ao.__skipStack+1;do return ao end end end;__haxe_Exception.prototype=z()__haxe_Exception.prototype.toString=function(self)do return self:get_message()end end;__haxe_Exception.prototype.get_message=function(self)do return self.__exceptionMessage end end;__haxe_Exception.prototype.get_native=function(self)do return self.__nativeException end end;__haxe_Exception.prototype.__class__=__haxe_Exception;__haxe_Log.new={}__haxe_Log.__name__=true;__haxe_Log.formatOutput=function(d,bX)local m=R.string(d)if bX==nil then do return m end end;local bY=R.string(R.string(bX.fileName)..R.string(":"))..R.string(bX.lineNumber)if bX.customParams~=nil then local a5=0;local a6=bX.customParams;while a50 then bq=__lua_lib_luautf8_Utf8.find(as,"\n",idx,true)else if idx>=__lua_lib_luautf8_Utf8.len(as)then bq=nil else bq=idx+1 end end;if bq~=nil then local br=__lua_lib_luautf8_Utf8.sub(as,idx,bq-1)w:push(br)idx=bq+__lua_lib_luautf8_Utf8.len("\n")else w:push(__lua_lib_luautf8_Utf8.sub(as,idx,__lua_lib_luautf8_Utf8.len(as)))idx=nil end end;do return w:slice(3)end end end;__haxe_NativeStackTrace.exceptionStack=function()do return _hx_tab_array({},0)end end;__haxe_ValueException.new=function(bG,bV,bW)local self=B(__haxe_ValueException.prototype)__haxe_ValueException.super(self,bG,bV,bW)return self end;__haxe_ValueException.super=function(self,bG,bV,bW)__haxe_Exception.super(self,R.string(bG),bV,bW)self.value=bG end;__haxe_ValueException.__name__=true;__haxe_ValueException.prototype=z()__haxe_ValueException.prototype.__class__=__haxe_ValueException;__haxe_ValueException.__super__=__haxe_Exception;setmetatable(__haxe_ValueException.prototype,{__index=__haxe_Exception.prototype})__haxe_exceptions_PosException.new=function(bU,bV,ae)local self=B(__haxe_exceptions_PosException.prototype)__haxe_exceptions_PosException.super(self,bU,bV,ae)return self end;__haxe_exceptions_PosException.super=function(self,bU,bV,ae)__haxe_Exception.super(self,bU,bV)if ae==nil then self.posInfos=A({__fields__={fileName=true,lineNumber=true,className=true,methodName=true},fileName="(unknown)",lineNumber=0,className="(unknown)",methodName="(unknown)"})else self.posInfos=ae end end;__haxe_exceptions_PosException.__name__=true;__haxe_exceptions_PosException.prototype=z()__haxe_exceptions_PosException.prototype.toString=function(self)do return R.string(R.string(R.string(R.string(R.string(R.string(R.string(R.string(R.string("")..R.string(__haxe_Exception.prototype.toString(self)))..R.string(" in "))..R.string(self.posInfos.className))..R.string("."))..R.string(self.posInfos.methodName))..R.string(" at "))..R.string(self.posInfos.fileName))..R.string(":"))..R.string(self.posInfos.lineNumber)end end;__haxe_exceptions_PosException.prototype.__class__=__haxe_exceptions_PosException;__haxe_exceptions_PosException.__super__=__haxe_Exception;setmetatable(__haxe_exceptions_PosException.prototype,{__index=__haxe_Exception.prototype})__haxe_io_Bytes.new=function(h,aP)local self=B(__haxe_io_Bytes.prototype)__haxe_io_Bytes.super(self,h,aP)return self end;__haxe_io_Bytes.super=function(self,h,aP)self.length=h;self.b=aP end;__haxe_io_Bytes.__name__=true;__haxe_io_Bytes.alloc=function(h)local a4=K.new()local a5=0;local a6=h;while a5>bv;if ac<0 then c7=c7|~(-1>>bv)end;return c7 end,band=function(ac,c7)return ac&c7 end,bor=function(ac,c7)return ac|c7 end,bnot=function(ac)return~ac end,bxor=function(ac,c7)return ac~c7 end,lshift=function(ac,bv)return ac<>bv end}T=setmetatable({},{__index=a1})T.bnot=function(...)return _(a1.bnot(...))end;T.bxor=function(...)return _(a1.bxor(...))end end;T.bor=function(...)return _(a1.bor(...))end;T.band=function(...)return _(a1.band(...))end;T.arshift=function(...)return _(a1.arshift(...))end;if a1 then _=function(d)if d<=2147483647 and d>=-2147483648 then if d>0 then return _G.math.floor(d)else return _G.math.ceil(d)end end;if d>2251798999999999 then d=d*2 end;if d~=d or math.abs(d)==_G.math.huge then return nil end;return a1.band(d,2147483647)-math.abs(a1.band(d,2147483648))end else _=function(d)if d<-2147483648 then return-2147483648 elseif d>2147483647 then return 2147483647 elseif d>0 then return _G.math.floor(d)else return _G.math.ceil(d)end end end;_hx_array_mt.__index=K.prototype;local c8=function()if __lua_lib_lrexlib_Rex==nil then _G.error(__haxe_Exception.thrown("Rex is missing. Please install lrexlib-pcre."),0)end;Q.__name__=true;K.__name__=true;L.FLAGS=__lua_lib_lrexlib_Rex.flags()M.MAX_BITSIZE=32;N.BITSIZE=15;N.UPPESTBIT=32768;N.BITMASK=32767;N.regexSpaces=L.new("\\s+","g")N.regexLeadingZeros=L.new("^0*","g")N.regexBinary=L.new("^0b","")N.regexOctal=L.new("^0o","")N.regexHex=L.new("^0x","")N.regexSign=L.new("^-","")N.regexZero=L.new("^-?(0b|0o|0x)?[0\\s]*$","")N.hexaChars=_hx_tab_array({[0]="0","1","2","3","4","5","6","7","8","9","a","b","c","d","e","f"},16)O.kobold=_G.kobold;O.exampleConfig="return true"O.f=___BigInt_BigInt_Impl_.fromInt(-2)O.e=___BigInt_BigInt_Impl_.fromInt(4)O.s=___BigInt_BigInt_Impl_.fromInt(8)O.t=___BigInt_BigInt_Impl_.fromInt(1)O.i=___BigInt_BigInt_Impl_.fromInt(0)O.v=___BigInt_BigInt_Impl_.fromInt(1)O.a=___BigInt_BigInt_Impl_.fromInt(6)O.l=___BigInt_BigInt_Impl_.fromInt(1)end;X=print or function()end;Z=function(ac,c9)res=A({__fields__={}})for n,d in ipairs(c9)do res[d]=ac[n]end;return res end;a0={}a0.pack=_G.table.pack or function(...)return{...}end;a0.unpack=_G.table.unpack or _G.unpack;a0.maxn=_G.table.maxn or function(b)local ca=0;for n in pairs(b)do ca=type(n)=='number'and n>ca and n or ca end;return ca end;_hx_wrap_if_string_field=function(f,cb)if _G.type(f)=='string'then if cb=='length'then return _G.string.len(f)else return Q.prototype[cb]end else return f[cb]end end;c8()local cc;if not xpcall(O.main,function(i)cc=""local cd=_G.print;_G.print=function(...)local ce=table.pack(...)for n=1,ce.n do ce[n]=tostring(ce[n])end;cc=cc..table.concat(ce,"\t").."\n"end;_hx_error(i)_G.print=cd end)then _G.error(cc)return end;return _hx_exports.Main