KoboldAI-Client/userscripts/examples/haxe_transcend.min.lua

47 lines
276 KiB
Lua

-- 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 <https://www.gnu.org/licenses/>.
--------------------------------------------------------------------------------
-- 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"<userdata>"end elseif o=="function"then return"<function>"elseif o=="thread"then return"<thread>"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 y<x do local d=g[y]v[d]=true;w[d]=g[y+1]y=y+2 end;return setmetatable(w,t)end;local function z()return setmetatable({__fields__={}},t)end;local function A(i)return setmetatable(i,t)end;local function B(C)return setmetatable({__fields__={}},{__newindex=s,__index=C,__tostring=_hx_tostring})end;function _hx_field_arr(i)res={}idx=0;if i.__fields__~=nil then i=i.__fields__ end;for c,d in pairs(i)do if a[c]==nil then res[idx]=c;idx=idx+1 end end;return _hx_tab_array(res,idx)end;local D={}local E=z()local F=z()local G=z()local H=z()local I=z()local J=z()local _hx_exports=_hx_exports or{}local K=z()___BigInt_BigInt_Impl_=z()__lua_lib_lrexlib_Rex={flags=function()return{CASELESS=1,DOTALL=1,MULTILINE=1,UCP=1,UTF8=1}end,gsub=function()return""end,new=function()return{}end}__lua_lib_luautf8_Utf8={byte=_G.string.byte,find=_G.string.find,gmatch=_G.string.gmatch,gsub=_G.string.gsub,lower=_G.string.lower,match=_G.string.match,reverse=_G.string.reverse,sub=_G.string.sub,upper=_G.string.upper}for c,d in pairs(_G.utf8)do __lua_lib_luautf8_Utf8[c]=d end;local L=z()local M=z()local N=z()local O=z()local P=z()local Q=z()local R=z()__haxe_Exception=z()__haxe_Log=z()__haxe_NativeStackTrace=z()__haxe_ValueException=z()__haxe_exceptions_PosException=z()__haxe_io_Bytes=z()__haxe_iterators_ArrayIterator=z()__haxe_iterators_ArrayKeyValueIterator=z()__lua_Boot=z()__lua_UserData=z()__lua_Thread=z()local S,T,U,V,W,X,Y,Z,_,a0,a1;local a2={}local a3={}K.new=function()local self=B(K.prototype)K.super(self)return self end;K.super=function(self)_hx_tab_array(self,0)end;K.__name__=true;K.prototype=z()K.prototype.concat=function(self,a4)local a5=_hx_tab_array({},0)local a6=0;local a7=self;while a6<a7.length do local n=a7[a6]a6=a6+1;a5:push(n)end;local w=a5;local a5=0;while a5<a4.length do local n=a4[a5]a5=a5+1;w:push(n)end;do return w end end;K.prototype.join=function(self,a8)local a9={}local aa=0;local ab=self;while aa<ab.length do aa=aa+1;local n=ab[aa-1]_G.table.insert(a9,R.string(n))end;do return _G.table.concat(a9,a8)end end;K.prototype.pop=function(self)if self.length==0 then do return nil end end;local w=self[self.length-1]self[self.length-1]=nil;self.length=self.length-1;do return w end end;K.prototype.push=function(self,ac)self[self.length]=ac;do return self.length end end;K.prototype.reverse=function(self)local ad;local n=0;while n<R.int(self.length/2)do ad=self[n]self[n]=self[self.length-n-1]self[self.length-n-1]=ad;n=n+1 end end;K.prototype.shift=function(self)if self.length==0 then do return nil end end;local w=self[0]if self.length==1 then self[0]=nil else if self.length>1 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 a5<a6 do a5=a5+1;local n=a5-1;w:push(self[n])end;do return w end end;K.prototype.sort=function(self,ag)local n=0;local ah=self.length;while n<ah do local ai=false;local aj=0;local x=ah-n-1;while aj<x do if ag(self[aj],self[aj+1])>0 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 a5<a6 do a5=a5+1;local n=a5-1;w:push(self[n])self[n]=self[n+e]end;local a5=ae+e;local a6=self.length;while a5<a6 do a5=a5+1;local n=a5-1;self[n]=self[n+e]end;local ad=self;ad.length=ad.length-e;do return w end end;K.prototype.toString=function(self)local a9={}_G.table.insert(a9,"[")_G.table.insert(a9,self:join(","))_G.table.insert(a9,"]")do return _G.table.concat(a9,"")end end;K.prototype.unshift=function(self,ac)local e=self.length;local a5=0;local a6=e;while a5<a6 do a5=a5+1;local n=a5-1;self[e-n]=self[e-n-1]end;self[0]=ac end;K.prototype.insert=function(self,ae,ac)if ae>self.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<a6 do a5=a5+1;local n=a5-1;if self[n]==ac then local a5=n;local a6=self.length-1;while a5<a6 do a5=a5+1;local aj=a5-1;self[aj]=self[aj+1]end;self[self.length-1]=nil;self.length=self.length-1;do return true end end end;do return false end end;K.prototype.contains=function(self,ac)local a5=0;local a6=self.length;while a5<a6 do a5=a5+1;local n=a5-1;if self[n]==ac then do return true end end end;do return false end end;K.prototype.indexOf=function(self,ac,al)local af=self.length;if al==nil then al=0 else if al<0 then al=self.length+al;if al<0 then al=0 end end end;local a5=al;local a6=af;while a5<a6 do a5=a5+1;local n=a5-1;if ac==self[n]then do return n end end end;do return-1 end end;K.prototype.lastIndexOf=function(self,ac,al)if al==nil or al>=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 a6<a7.length do local n=a7[a6]a6=a6+1;a5:push(n)end;do return a5 end end;K.prototype.map=function(self,ag)local a5=_hx_tab_array({},0)local a6=0;local a7=self;while a6<a7.length do local n=a7[a6]a6=a6+1;a5:push(ag(n))end;do return a5 end end;K.prototype.filter=function(self,ag)local a5=_hx_tab_array({},0)local a6=0;local a7=self;while a6<a7.length do local n=a7[a6]a6=a6+1;if ag(n)then a5:push(n)end end;do return a5 end end;K.prototype.iterator=function(self)do return __haxe_iterators_ArrayIterator.new(self)end end;K.prototype.keyValueIterator=function(self)do return __haxe_iterators_ArrayKeyValueIterator.new(self)end end;K.prototype.resize=function(self,e)if self.length<e then self.length=e else if self.length>e then local a5=e;local a6=self.length;while a5<a6 do a5=a5+1;local n=a5-1;self[n]=nil end;self.length=e end end end;K.prototype.__class__=K;___BigInt_BigInt_Impl_.new={}___BigInt_BigInt_Impl_.__name__=true;___BigInt_BigInt_Impl_._new=function(am)local an=am;do return an end end;___BigInt_BigInt_Impl_.get=function(an,n)do return an.chunks[an.start+n]end end;___BigInt_BigInt_Impl_.set=function(an,n,d)an.chunks[an.start+n]=d end;___BigInt_BigInt_Impl_.push=function(an,d)an["end"]=an["end"]+1;an.chunks:push(d)end;___BigInt_BigInt_Impl_.unshift=function(an,d)an["end"]=an["end"]+1;an.chunks:unshift(d)end;___BigInt_BigInt_Impl_.splitHigh=function(an,ao)local am=N.new(an.chunks)if ao>=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<ao and an.chunks[an.start+n]==0 do n=n+1 end;if n==ao then do return nil end else local am=N.new(an.chunks)am.start=an.start;am["end"]=an.start+ao;do return am end end end;___BigInt_BigInt_Impl_.truncateZeroChunks=function(an,ap)local n=an["end"]-an.start;while true do n=n-1;if not(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 a5<a6 do a5=a5+1;local n=a5-1;local d=an.chunks[an.start+n]am["end"]=am["end"]+1;am.chunks:push(d)end;am.isNegative=an.isNegative;local an=am;do return an end end;___BigInt_BigInt_Impl_.negCopy=function(an)local am=N.new()local a5=0;local a6=an["end"]-an.start;while a5<a6 do a5=a5+1;local n=a5-1;local d=an.chunks[an.start+n]am["end"]=am["end"]+1;am.chunks:push(d)end;am.isNegative=not an.isNegative;local an=am;do return an end end;___BigInt_BigInt_Impl_.clone=function(an)local am=N.new(an.chunks)am.start=an.start;am["end"]=an["end"]am.isNegative=an.isNegative;local an=am;do return an end end;___BigInt_BigInt_Impl_.negClone=function(an)local am=N.new(an.chunks)am.start=an.start;am["end"]=an["end"]am.isNegative=not an.isNegative;local an=am;do return an end end;___BigInt_BigInt_Impl_.get_isNegative=function(an)do return an.isNegative end end;___BigInt_BigInt_Impl_.get_isPositive=function(an)do return not an.isNegative end end;___BigInt_BigInt_Impl_.get_length=function(an)do return an["end"]-an.start end end;___BigInt_BigInt_Impl_.get_isZero=function(an)do return an==nil end end;___BigInt_BigInt_Impl_.fromInt=function(n)local n=n;local am;if n==0 then am=nil else local aq=N.new()if n<0 then aq.isNegative=true;n=-n end;while n~=0 do aq["end"]=aq["end"]+1;aq.chunks:push(T.band(n,32767))n=T.rshift(n,15)end;am=aq end;local an=am;do return an end end;___BigInt_BigInt_Impl_.toInt=function(an)if an==nil then do return 0 end end;if an["end"]-an.start==0 then do return 0 end else local ar=0;local ad=0;local a5=0;local a6=an["end"]-an.start;while a5<a6 do a5=a5+1;local n=a5-1;ad=an.chunks[an.start+n]if T.arshift(T.lshift(ad,n*15),n*15)~=ad then _G.error(__haxe_Exception.thrown(R.string(R.string("Error, BigInt with ")..R.string(15*(an["end"]-an.start-1)+M.bitsize(ad)))..R.string(" bits is to big for native Integer length")),0)end;ar=ar+T.lshift(ad,n*15)end;if an.isNegative then do return-ar end else do return ar end end end end;___BigInt_BigInt_Impl_.fromString=function(as)do return N.createFromBaseString(as)end end;___BigInt_BigInt_Impl_.toString=function(an)if an==nil then do return"0"end end;do return an:toBaseString(10)end end;___BigInt_BigInt_Impl_.fromBinaryString=function(at)do return N.createFromBaseString(at,2)end end;___BigInt_BigInt_Impl_.fromHexString=function(au)do return N.createFromBaseString(au,16)end end;___BigInt_BigInt_Impl_.fromOctalString=function(av)do return N.createFromBaseString(av,8)end end;___BigInt_BigInt_Impl_.fromBaseString=function(aw,ax)if ax==nil then ax=10 end;do return N.createFromBaseString(aw,ax)end end;___BigInt_BigInt_Impl_.toBinaryString=function(an,ay,az)if az==nil then az=true end;if ay==nil then ay=0 end;if an==nil then if az and ay>0 then local a5=_hx_tab_array({},0)local a6=0;local a7=ay;while a6<a7 do a6=a6+1;local n=a6-1;a5:push("0")end;do return a5:join("")end else do return"0"end end end;local ay=ay;local az=az;if az==nil then az=true end;if ay==nil then ay=0 end;local as=""local aA;local bit;local aj=0;local a5=0;local a6=an["end"]-an.start;while a5<a6 do a5=a5+1;local n=a5-1;aA=an.chunks[an.start+n]bit=1;while bit<32768 do if ay>0 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<a7 do a6=a6+1;local n=a6-1;a5:push("0")end;as=R.string(a5:join(""))..R.string(as)end;as=L.new("^(0+\\s)+",""):replace(as,"")else as=N.regexLeadingZeros:replace(as,"")end;do return R.string((function()local aD;if an.isNegative then aD="-"else aD=""end;return aD end)())..R.string(as)end end;___BigInt_BigInt_Impl_.toOctalString=function(an,ay,az)if az==nil then az=true end;if ay==nil then ay=0 end;if an==nil then if az and ay>0 then local a5=_hx_tab_array({},0)local a6=0;local a7=ay;while a6<a7 do a6=a6+1;local n=a6-1;a5:push("0")end;do return a5:join("")end else do return"0"end end end;do return an:toBaseString(8,ay,az)end end;___BigInt_BigInt_Impl_.toHexString=function(an,ay,az)if az==nil then az=true end;if ay==nil then ay=0 end;if an==nil then if az and ay>0 then local a5=_hx_tab_array({},0)local a6=0;local a7=ay;while a6<a7 do a6=a6+1;local n=a6-1;a5:push("0")end;do return a5:join("")end else do return"0"end end end;do return an:toHexString(ay,az)end end;___BigInt_BigInt_Impl_.toBaseString=function(an,ax,ay,az)if az==nil then az=false end;if ay==nil then ay=0 end;if ax==nil then ax=10 end;if an==nil then if az and ay>0 then local a5=_hx_tab_array({},0)local a6=0;local a7=ay;while a6<a7 do a6=a6+1;local n=a6-1;a5:push("0")end;do return a5:join("")end else do return"0"end end end;do return an:toBaseString(ax,ay,az)end end;___BigInt_BigInt_Impl_.fromBytes=function(aE)if aE.length==1 and aE.b[0]==0 then do return nil end else local am=N.new()local ah=aE.length;if aE.b[ah-1]==0 then am.isNegative=true;ah=ah-1 end;local aF=(ah-1)*8+M.bitsize(aE.b[ah-1],8)local aG=R.int((aF-1)/15)+1;local a5=0;local a6=aG;while a5<a6 do a5=a5+1;local n=a5-1;local d=0;local aH=0;local a5=0;local aI=n*15;local aJ=R.int(aI/8)local af=R.int((aI+15)/8)local aK=aI-aJ*8;local aL=8-aK;local aM=aI+15-af*8;local aN;local aO;local w=K.new()local a6=aJ;local a7=af+1;while a6<a7 do a6=a6+1;local n=a6-1;if n==ah then break end;if n==aJ and n==af then aN=aK;aO=aM-aN else if n==aJ then aN=aK;aO=aL else if n==af then aO=aM;aN=0 else aO=8;aN=0 end end end;w:push(A({__fields__={index=true,offset=true,size=true},index=n,offset=aN,size=aO}))end;local a6=w;while a5<a6.length do local a4=a6[a5]a5=a5+1;d=T.bor(d,T.lshift(T.band(T.rshift(aE.b[a4.index],a4.offset),T.lshift(1,a4.size)-1),aH))aH=aH+a4.size end;am["end"]=am["end"]+1;am.chunks:push(d)end;local an=am;do return an end end end;___BigInt_BigInt_Impl_.toBytes=function(an)if an==nil then local aP=__haxe_io_Bytes.alloc(1)aP.b[0]=0;do return aP end end;do return an:toBytes()end end;___BigInt_BigInt_Impl_.abs=function(an)if an==nil then do return nil end end;if an.isNegative then local am=N.new()local a5=0;local a6=an["end"]-an.start;while a5<a6 do a5=a5+1;local n=a5-1;local d=an.chunks[an.start+n]am["end"]=am["end"]+1;am.chunks:push(d)end;am.isNegative=not an.isNegative;local an=am;do return an end end;local am=N.new()local a5=0;local a6=an["end"]-an.start;while a5<a6 do a5=a5+1;local n=a5-1;local d=an.chunks[an.start+n]am["end"]=am["end"]+1;am.chunks:push(d)end;am.isNegative=an.isNegative;local an=am;do return an end end;___BigInt_BigInt_Impl_.opAdd=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<a6 do a5=a5+1;local n=a5-1;local d=aP.chunks[aP.start+n]am["end"]=am["end"]+1;am.chunks:push(d)end;am.isNegative=aP.isNegative;local an=am;do return an end end else if aP==nil then local am=N.new()local a5=0;local a6=an["end"]-an.start;while a5<a6 do a5=a5+1;local n=a5-1;local d=an.chunks[an.start+n]am["end"]=am["end"]+1;am.chunks:push(d)end;am.isNegative=an.isNegative;local an=am;do return an end else if an.isNegative then if aP.isNegative then 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 a5<a6 do a5=a5+1;local n=a5-1;local d=an.chunks[an.start+n]am["end"]=am["end"]+1;am.chunks:push(d)end;am.isNegative=an.isNegative;local an=am;local a4=an;local a5=0;local a6=aP["end"]-aP.start;while a5<a6 do a5=a5+1;local aR=a5-1;local d=aP.chunks[aP.start+aR]local ac;local a5=aR;local a6=a4["end"]-a4.start;while a5<a6 do a5=a5+1;local n=a5-1;ac=a4.chunks[a4.start+n]+d;if T.band(ac,32768)==0 then a4.chunks[a4.start+n]=ac;d=0;break end;a4.chunks[a4.start+n]=T.band(ac,32767)d=1 end;if d>0 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 a5<a6 do a5=a5+1;local n=a5-1;local d=aP.chunks[aP.start+n]am["end"]=am["end"]+1;am.chunks:push(d)end;am.isNegative=aP.isNegative;local aS=am;local a4=aS;local a5=0;local a6=an["end"]-an.start;while a5<a6 do a5=a5+1;local aR=a5-1;local d=an.chunks[an.start+aR]local ac;local a5=aR;local a6=a4["end"]-a4.start;while a5<a6 do a5=a5+1;local n=a5-1;ac=a4.chunks[a4.start+n]+d;if T.band(ac,32768)==0 then a4.chunks[a4.start+n]=ac;d=0;break end;a4.chunks[a4.start+n]=T.band(ac,32767)d=1 end;if d>0 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<a6 do a5=a5+1;local n=a5-1;local d=aP.chunks[aP.start+n]am["end"]=am["end"]+1;am.chunks:push(d)end;am.isNegative=aP.isNegative;local an=am;local a4=an;local a5=0;local a6=aT["end"]-aT.start;while a5<a6 do a5=a5+1;local aR=a5-1;local d=aT.chunks[aT.start+aR]local a5=aR;local a6=a4["end"]-a4.start;while a5<a6 do a5=a5+1;local n=a5-1;local ac=a4.chunks[a4.start+n]if ac>=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<a6 do a5=a5+1;local n=a5-1;local d=aT.chunks[aT.start+n]am["end"]=am["end"]+1;am.chunks:push(d)end;am.isNegative=aT.isNegative;local an=am;local a4=an;local a5=0;local a6=aP["end"]-aP.start;while a5<a6 do a5=a5+1;local aR=a5-1;local d=aP.chunks[aP.start+aR]local a5=aR;local a6=a4["end"]-a4.start;while a5<a6 do a5=a5+1;local n=a5-1;local ac=a4.chunks[a4.start+n]if ac>=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<a6 do a5=a5+1;local n=a5-1;local d=an.chunks[an.start+n]am["end"]=am["end"]+1;am.chunks:push(d)end;am.isNegative=an.isNegative;local an=am;local a4=an;local a5=0;local a6=aP["end"]-aP.start;while a5<a6 do a5=a5+1;local aR=a5-1;local d=aP.chunks[aP.start+aR]local a5=aR;local a6=a4["end"]-a4.start;while a5<a6 do a5=a5+1;local n=a5-1;local ac=a4.chunks[a4.start+n]if ac>=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<a6 do a5=a5+1;local n=a5-1;local d=aP.chunks[aP.start+n]am["end"]=am["end"]+1;am.chunks:push(d)end;am.isNegative=aP.isNegative;local aQ=am;local a4=aQ;local a5=0;local a6=an["end"]-an.start;while a5<a6 do a5=a5+1;local aR=a5-1;local d=an.chunks[an.start+aR]local a5=aR;local a6=a4["end"]-a4.start;while a5<a6 do a5=a5+1;local n=a5-1;local ac=a4.chunks[a4.start+n]if ac>=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 a5<a6 do a5=a5+1;local n=a5-1;local d=an.chunks[an.start+n]am["end"]=am["end"]+1;am.chunks:push(d)end;am.isNegative=an.isNegative;local an=am;local a4=an;local a5=0;local a6=aP["end"]-aP.start;while a5<a6 do a5=a5+1;local aR=a5-1;local d=aP.chunks[aP.start+aR]local ac;local a5=aR;local a6=a4["end"]-a4.start;while a5<a6 do a5=a5+1;local n=a5-1;ac=a4.chunks[a4.start+n]+d;if T.band(ac,32768)==0 then a4.chunks[a4.start+n]=ac;d=0;break end;a4.chunks[a4.start+n]=T.band(ac,32767)d=1 end;if d>0 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 a5<a6 do a5=a5+1;local n=a5-1;local d=aP.chunks[aP.start+n]am["end"]=am["end"]+1;am.chunks:push(d)end;am.isNegative=aP.isNegative;local aQ=am;local a4=aQ;local a5=0;local a6=an["end"]-an.start;while a5<a6 do a5=a5+1;local aR=a5-1;local d=an.chunks[an.start+aR]local ac;local a5=aR;local a6=a4["end"]-a4.start;while a5<a6 do a5=a5+1;local n=a5-1;ac=a4.chunks[a4.start+n]+d;if T.band(ac,32768)==0 then a4.chunks[a4.start+n]=ac;d=0;break end;a4.chunks[a4.start+n]=T.band(ac,32767)d=1 end;if d>0 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 a5<a6 do a5=a5+1;local n=a5-1;local d=aP.chunks[aP.start+n]am["end"]=am["end"]+1;am.chunks:push(d)end;am.isNegative=aP.isNegative;local an=am;do return an end end else if aP==nil then local am=N.new()local a5=0;local a6=a4["end"]-a4.start;while a5<a6 do a5=a5+1;local n=a5-1;local d=a4.chunks[a4.start+n]am["end"]=am["end"]+1;am.chunks:push(d)end;am.isNegative=a4.isNegative;local an=am;do return an end else if a4.isNegative then if aP.isNegative then 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 a5<a6 do a5=a5+1;local n=a5-1;local d=a4.chunks[a4.start+n]am["end"]=am["end"]+1;am.chunks:push(d)end;am.isNegative=a4.isNegative;local aQ=am;local a4=aQ;local a5=0;local a6=aP["end"]-aP.start;while a5<a6 do a5=a5+1;local aR=a5-1;local d=aP.chunks[aP.start+aR]local ac;local a5=aR;local a6=a4["end"]-a4.start;while a5<a6 do a5=a5+1;local n=a5-1;ac=a4.chunks[a4.start+n]+d;if T.band(ac,32768)==0 then a4.chunks[a4.start+n]=ac;d=0;break end;a4.chunks[a4.start+n]=T.band(ac,32767)d=1 end;if d>0 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 a5<a6 do a5=a5+1;local n=a5-1;local d=aP.chunks[aP.start+n]am["end"]=am["end"]+1;am.chunks:push(d)end;am.isNegative=aP.isNegative;local aQ=am;local aU=aQ;local a5=0;local a6=a4["end"]-a4.start;while a5<a6 do a5=a5+1;local aR=a5-1;local d=a4.chunks[a4.start+aR]local ac;local a5=aR;local a6=aU["end"]-aU.start;while a5<a6 do a5=a5+1;local n=a5-1;ac=aU.chunks[aU.start+n]+d;if T.band(ac,32768)==0 then aU.chunks[aU.start+n]=ac;d=0;break end;aU.chunks[aU.start+n]=T.band(ac,32767)d=1 end;if d>0 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<a6 do a5=a5+1;local n=a5-1;local d=aP.chunks[aP.start+n]am["end"]=am["end"]+1;am.chunks:push(d)end;am.isNegative=aP.isNegative;local an=am;local a4=an;local a5=0;local a6=aT["end"]-aT.start;while a5<a6 do a5=a5+1;local aR=a5-1;local d=aT.chunks[aT.start+aR]local a5=aR;local a6=a4["end"]-a4.start;while a5<a6 do a5=a5+1;local n=a5-1;local ac=a4.chunks[a4.start+n]if ac>=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<a6 do a5=a5+1;local n=a5-1;local d=aT.chunks[aT.start+n]am["end"]=am["end"]+1;am.chunks:push(d)end;am.isNegative=aT.isNegative;local an=am;local a4=an;local a5=0;local a6=aP["end"]-aP.start;while a5<a6 do a5=a5+1;local aR=a5-1;local d=aP.chunks[aP.start+aR]local a5=aR;local a6=a4["end"]-a4.start;while a5<a6 do a5=a5+1;local n=a5-1;local ac=a4.chunks[a4.start+n]if ac>=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<a6 do a5=a5+1;local n=a5-1;local d=a4.chunks[a4.start+n]am["end"]=am["end"]+1;am.chunks:push(d)end;am.isNegative=a4.isNegative;local an=am;local a4=an;local a5=0;local a6=aP["end"]-aP.start;while a5<a6 do a5=a5+1;local aR=a5-1;local d=aP.chunks[aP.start+aR]local a5=aR;local a6=a4["end"]-a4.start;while a5<a6 do a5=a5+1;local n=a5-1;local ac=a4.chunks[a4.start+n]if ac>=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<a6 do a5=a5+1;local n=a5-1;local d=aP.chunks[aP.start+n]am["end"]=am["end"]+1;am.chunks:push(d)end;am.isNegative=aP.isNegative;local an=am;local aU=an;local a5=0;local a6=a4["end"]-a4.start;while a5<a6 do a5=a5+1;local aR=a5-1;local d=a4.chunks[a4.start+aR]local a5=aR;local a6=aU["end"]-aU.start;while a5<a6 do a5=a5+1;local n=a5-1;local ac=aU.chunks[aU.start+n]if ac>=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 a5<a6 do a5=a5+1;local n=a5-1;local d=a4.chunks[a4.start+n]am["end"]=am["end"]+1;am.chunks:push(d)end;am.isNegative=a4.isNegative;local an=am;local a4=an;local a5=0;local a6=aP["end"]-aP.start;while a5<a6 do a5=a5+1;local aR=a5-1;local d=aP.chunks[aP.start+aR]local ac;local a5=aR;local a6=a4["end"]-a4.start;while a5<a6 do a5=a5+1;local n=a5-1;ac=a4.chunks[a4.start+n]+d;if T.band(ac,32768)==0 then a4.chunks[a4.start+n]=ac;d=0;break end;a4.chunks[a4.start+n]=T.band(ac,32767)d=1 end;if d>0 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 a5<a6 do a5=a5+1;local n=a5-1;local d=aP.chunks[aP.start+n]am["end"]=am["end"]+1;am.chunks:push(d)end;am.isNegative=aP.isNegative;local an=am;local aU=an;local a5=0;local a6=a4["end"]-a4.start;while a5<a6 do a5=a5+1;local aR=a5-1;local d=a4.chunks[a4.start+aR]local ac;local a5=aR;local a6=aU["end"]-aU.start;while a5<a6 do a5=a5+1;local n=a5-1;ac=aU.chunks[aU.start+n]+d;if T.band(ac,32768)==0 then aU.chunks[aU.start+n]=ac;d=0;break end;aU.chunks[aU.start+n]=T.band(ac,32767)d=1 end;if d>0 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<a6 do a5=a5+1;local n=a5-1;local d=an.chunks[an.start+n]am["end"]=am["end"]+1;am.chunks:push(d)end;am.isNegative=an.isNegative;local aQ=am;local w=aQ;if an.isNegative then 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<a6 do a5=a5+1;local n=a5-1;local ac=an.chunks[an.start+n]if ac>=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 a5<a6 do a5=a5+1;local n=a5-1;ac=an.chunks[an.start+n]+d;if T.band(ac,32768)==0 then an.chunks[an.start+n]=ac;d=0;break end;an.chunks[an.start+n]=T.band(ac,32767)d=1 end;if d>0 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<a6 do a5=a5+1;local n=a5-1;local ac=an.chunks[an.start+n]if ac>=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<a6 do a5=a5+1;local n=a5-1;local d=an.chunks[an.start+n]am["end"]=am["end"]+1;am.chunks:push(d)end;am.isNegative=an.isNegative;local an=am;do return an end end else local d=1;local ac;local a5=0;local a6=an["end"]-an.start;while a5<a6 do a5=a5+1;local n=a5-1;ac=an.chunks[an.start+n]+d;if T.band(ac,32768)==0 then an.chunks[an.start+n]=ac;d=0;break end;an.chunks[an.start+n]=T.band(ac,32767)d=1 end;if d>0 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<a6 do a5=a5+1;local n=a5-1;local d=an.chunks[an.start+n]am["end"]=am["end"]+1;am.chunks:push(d)end;am.isNegative=an.isNegative;local an=am;do return an end end end;___BigInt_BigInt_Impl_._add=function(a4,aP)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<a6 do a5=a5+1;local n=a5-1;local d=aP.chunks[aP.start+n]am["end"]=am["end"]+1;am.chunks:push(d)end;am.isNegative=aP.isNegative;local an=am;do return an end end end;if aP==nil then local am=N.new()local a5=0;local a6=a4["end"]-a4.start;while a5<a6 do a5=a5+1;local n=a5-1;local d=a4.chunks[a4.start+n]am["end"]=am["end"]+1;am.chunks:push(d)end;am.isNegative=a4.isNegative;local an=am;do return an end end;if a4.isNegative then if aP.isNegative then 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 a5<a6 do a5=a5+1;local n=a5-1;local d=a4.chunks[a4.start+n]am["end"]=am["end"]+1;am.chunks:push(d)end;am.isNegative=a4.isNegative;local aQ=am;local a4=aQ;local a5=0;local a6=aP["end"]-aP.start;while a5<a6 do a5=a5+1;local aR=a5-1;local d=aP.chunks[aP.start+aR]local ac;local a5=aR;local a6=a4["end"]-a4.start;while a5<a6 do a5=a5+1;local n=a5-1;ac=a4.chunks[a4.start+n]+d;if T.band(ac,32768)==0 then a4.chunks[a4.start+n]=ac;d=0;break end;a4.chunks[a4.start+n]=T.band(ac,32767)d=1 end;if d>0 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 a5<a6 do a5=a5+1;local n=a5-1;local d=aP.chunks[aP.start+n]am["end"]=am["end"]+1;am.chunks:push(d)end;am.isNegative=aP.isNegative;local aQ=am;local aU=aQ;local a5=0;local a6=a4["end"]-a4.start;while a5<a6 do a5=a5+1;local aR=a5-1;local d=a4.chunks[a4.start+aR]local ac;local a5=aR;local a6=aU["end"]-aU.start;while a5<a6 do a5=a5+1;local n=a5-1;ac=aU.chunks[aU.start+n]+d;if T.band(ac,32768)==0 then aU.chunks[aU.start+n]=ac;d=0;break end;aU.chunks[aU.start+n]=T.band(ac,32767)d=1 end;if d>0 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<a6 do a5=a5+1;local n=a5-1;local d=aP.chunks[aP.start+n]am["end"]=am["end"]+1;am.chunks:push(d)end;am.isNegative=aP.isNegative;local an=am;local a4=an;local a5=0;local a6=aT["end"]-aT.start;while a5<a6 do a5=a5+1;local aR=a5-1;local d=aT.chunks[aT.start+aR]local a5=aR;local a6=a4["end"]-a4.start;while a5<a6 do a5=a5+1;local n=a5-1;local ac=a4.chunks[a4.start+n]if ac>=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<a6 do a5=a5+1;local n=a5-1;local d=aT.chunks[aT.start+n]am["end"]=am["end"]+1;am.chunks:push(d)end;am.isNegative=aT.isNegative;local an=am;local a4=an;local a5=0;local a6=aP["end"]-aP.start;while a5<a6 do a5=a5+1;local aR=a5-1;local d=aP.chunks[aP.start+aR]local a5=aR;local a6=a4["end"]-a4.start;while a5<a6 do a5=a5+1;local n=a5-1;local ac=a4.chunks[a4.start+n]if ac>=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<a6 do a5=a5+1;local n=a5-1;local d=a4.chunks[a4.start+n]am["end"]=am["end"]+1;am.chunks:push(d)end;am.isNegative=a4.isNegative;local an=am;local a4=an;local a5=0;local a6=aP["end"]-aP.start;while a5<a6 do a5=a5+1;local aR=a5-1;local d=aP.chunks[aP.start+aR]local a5=aR;local a6=a4["end"]-a4.start;while a5<a6 do a5=a5+1;local n=a5-1;local ac=a4.chunks[a4.start+n]if ac>=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<a6 do a5=a5+1;local n=a5-1;local d=aP.chunks[aP.start+n]am["end"]=am["end"]+1;am.chunks:push(d)end;am.isNegative=aP.isNegative;local an=am;local aU=an;local a5=0;local a6=a4["end"]-a4.start;while a5<a6 do a5=a5+1;local aR=a5-1;local d=a4.chunks[a4.start+aR]local a5=aR;local a6=aU["end"]-aU.start;while a5<a6 do a5=a5+1;local n=a5-1;local ac=aU.chunks[aU.start+n]if ac>=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 a5<a6 do a5=a5+1;local n=a5-1;local d=a4.chunks[a4.start+n]am["end"]=am["end"]+1;am.chunks:push(d)end;am.isNegative=a4.isNegative;local an=am;local a4=an;local a5=0;local a6=aP["end"]-aP.start;while a5<a6 do a5=a5+1;local aR=a5-1;local d=aP.chunks[aP.start+aR]local ac;local a5=aR;local a6=a4["end"]-a4.start;while a5<a6 do a5=a5+1;local n=a5-1;ac=a4.chunks[a4.start+n]+d;if T.band(ac,32768)==0 then a4.chunks[a4.start+n]=ac;d=0;break end;a4.chunks[a4.start+n]=T.band(ac,32767)d=1 end;if d>0 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 a5<a6 do a5=a5+1;local n=a5-1;local d=aP.chunks[aP.start+n]am["end"]=am["end"]+1;am.chunks:push(d)end;am.isNegative=aP.isNegative;local an=am;local aU=an;local a5=0;local a6=a4["end"]-a4.start;while a5<a6 do a5=a5+1;local aR=a5-1;local d=a4.chunks[a4.start+aR]local ac;local a5=aR;local a6=aU["end"]-aU.start;while a5<a6 do a5=a5+1;local n=a5-1;ac=aU.chunks[aU.start+n]+d;if T.band(ac,32768)==0 then aU.chunks[aU.start+n]=ac;d=0;break end;aU.chunks[aU.start+n]=T.band(ac,32767)d=1 end;if d>0 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 a5<a6 do a5=a5+1;local n=a5-1;local d=a4.chunks[a4.start+n]am["end"]=am["end"]+1;am.chunks:push(d)end;am.isNegative=a4.isNegative;local an=am;local a4=an;local a5=0;local a6=aP["end"]-aP.start;while a5<a6 do a5=a5+1;local aR=a5-1;local d=aP.chunks[aP.start+aR]local ac;local a5=aR;local a6=a4["end"]-a4.start;while a5<a6 do a5=a5+1;local n=a5-1;ac=a4.chunks[a4.start+n]+d;if T.band(ac,32768)==0 then a4.chunks[a4.start+n]=ac;d=0;break end;a4.chunks[a4.start+n]=T.band(ac,32767)d=1 end;if d>0 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 a5<a6 do a5=a5+1;local n=a5-1;local d=aP.chunks[aP.start+n]am["end"]=am["end"]+1;am.chunks:push(d)end;am.isNegative=aP.isNegative;local an=am;local aU=an;local a5=0;local a6=a4["end"]-a4.start;while a5<a6 do a5=a5+1;local aR=a5-1;local d=a4.chunks[a4.start+aR]local ac;local a5=aR;local a6=aU["end"]-aU.start;while a5<a6 do a5=a5+1;local n=a5-1;ac=aU.chunks[aU.start+n]+d;if T.band(ac,32768)==0 then aU.chunks[aU.start+n]=ac;d=0;break end;aU.chunks[aU.start+n]=T.band(ac,32767)d=1 end;if d>0 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 a5<a6 do a5=a5+1;local aR=a5-1;local d=aP.chunks[aP.start+aR]local ac;local a5=aR;local a6=a4["end"]-a4.start;while a5<a6 do a5=a5+1;local n=a5-1;ac=a4.chunks[a4.start+n]+d;if T.band(ac,32768)==0 then a4.chunks[a4.start+n]=ac;d=0;break end;a4.chunks[a4.start+n]=T.band(ac,32767)d=1 end;if d>0 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 a5<a6 do a5=a5+1;local n=a5-1;ac=a4.chunks[a4.start+n]+d;if T.band(ac,32768)==0 then a4.chunks[a4.start+n]=ac;d=0;break end;a4.chunks[a4.start+n]=T.band(ac,32767)d=1 end;if d>0 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<a6 do a5=a5+1;local n=a5-1;local d=aP.chunks[aP.start+n]am["end"]=am["end"]+1;am.chunks:push(d)end;am.isNegative=not aP.isNegative;local an=am;do return an end end else if aP==nil then local am=N.new()local a5=0;local a6=an["end"]-an.start;while a5<a6 do a5=a5+1;local n=a5-1;local d=an.chunks[an.start+n]am["end"]=am["end"]+1;am.chunks:push(d)end;am.isNegative=an.isNegative;local an=am;do return an end else if an.isNegative then 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 a4=aQ;local am=N.new(an.chunks)am.start=an.start;am["end"]=an["end"]am.isNegative=not an.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<a6 do a5=a5+1;local n=a5-1;local d=a4.chunks[a4.start+n]am["end"]=am["end"]+1;am.chunks:push(d)end;am.isNegative=a4.isNegative;local an=am;local a4=an;local a5=0;local a6=aP["end"]-aP.start;while a5<a6 do a5=a5+1;local aR=a5-1;local d=aP.chunks[aP.start+aR]local a5=aR;local a6=a4["end"]-a4.start;while a5<a6 do a5=a5+1;local n=a5-1;local ac=a4.chunks[a4.start+n]if ac>=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<a6 do a5=a5+1;local n=a5-1;local d=aP.chunks[aP.start+n]am["end"]=am["end"]+1;am.chunks:push(d)end;am.isNegative=aP.isNegative;local an=am;local aU=an;local a5=0;local a6=a4["end"]-a4.start;while a5<a6 do a5=a5+1;local aR=a5-1;local d=a4.chunks[a4.start+aR]local a5=aR;local a6=aU["end"]-aU.start;while a5<a6 do a5=a5+1;local n=a5-1;local ac=aU.chunks[aU.start+n]if ac>=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 a5<a6 do a5=a5+1;local n=a5-1;local d=an.chunks[an.start+n]am["end"]=am["end"]+1;am.chunks:push(d)end;am.isNegative=an.isNegative;local an=am;local a4=an;local a5=0;local a6=aP["end"]-aP.start;while a5<a6 do a5=a5+1;local aR=a5-1;local d=aP.chunks[aP.start+aR]local ac;local a5=aR;local a6=a4["end"]-a4.start;while a5<a6 do a5=a5+1;local n=a5-1;ac=a4.chunks[a4.start+n]+d;if T.band(ac,32768)==0 then a4.chunks[a4.start+n]=ac;d=0;break end;a4.chunks[a4.start+n]=T.band(ac,32767)d=1 end;if d>0 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 a5<a6 do a5=a5+1;local n=a5-1;local d=aP.chunks[aP.start+n]am["end"]=am["end"]+1;am.chunks:push(d)end;am.isNegative=aP.isNegative;local aS=am;local a4=aS;local a5=0;local a6=an["end"]-an.start;while a5<a6 do a5=a5+1;local aR=a5-1;local d=an.chunks[an.start+aR]local ac;local a5=aR;local a6=a4["end"]-a4.start;while a5<a6 do a5=a5+1;local n=a5-1;ac=a4.chunks[a4.start+n]+d;if T.band(ac,32768)==0 then a4.chunks[a4.start+n]=ac;d=0;break end;a4.chunks[a4.start+n]=T.band(ac,32767)d=1 end;if d>0 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 a5<a6 do a5=a5+1;local n=a5-1;local d=an.chunks[an.start+n]am["end"]=am["end"]+1;am.chunks:push(d)end;am.isNegative=an.isNegative;local an=am;local a4=an;local a5=0;local a6=aZ-aY;while a5<a6 do a5=a5+1;local aR=a5-1;local d=aV[aY+aR]local ac;local a5=aR;local a6=a4["end"]-a4.start;while a5<a6 do a5=a5+1;local n=a5-1;ac=a4.chunks[a4.start+n]+d;if T.band(ac,32768)==0 then a4.chunks[a4.start+n]=ac;d=0;break end;a4.chunks[a4.start+n]=T.band(ac,32767)d=1 end;if d>0 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 a5<a6 do a5=a5+1;local n=a5-1;local d=aV[aY+n]am["end"]=am["end"]+1;am.chunks:push(d)end;am.isNegative=aX;local aQ=am;local a4=aQ;local a5=0;local a6=an["end"]-an.start;while a5<a6 do a5=a5+1;local aR=a5-1;local d=an.chunks[an.start+aR]local ac;local a5=aR;local a6=a4["end"]-a4.start;while a5<a6 do a5=a5+1;local n=a5-1;ac=a4.chunks[a4.start+n]+d;if T.band(ac,32768)==0 then a4.chunks[a4.start+n]=ac;d=0;break end;a4.chunks[a4.start+n]=T.band(ac,32767)d=1 end;if d>0 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<a6 do a5=a5+1;local n=a5-1;local d=an.chunks[an.start+n]am["end"]=am["end"]+1;am.chunks:push(d)end;am.isNegative=an.isNegative;local an=am;local a4=an;local a5=0;local a6=aP["end"]-aP.start;while a5<a6 do a5=a5+1;local aR=a5-1;local d=aP.chunks[aP.start+aR]local a5=aR;local a6=a4["end"]-a4.start;while a5<a6 do a5=a5+1;local n=a5-1;local ac=a4.chunks[a4.start+n]if ac>=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<a6 do a5=a5+1;local n=a5-1;local d=aP.chunks[aP.start+n]am["end"]=am["end"]+1;am.chunks:push(d)end;am.isNegative=aP.isNegative;local aQ=am;local a4=aQ;local a5=0;local a6=an["end"]-an.start;while a5<a6 do a5=a5+1;local aR=a5-1;local d=an.chunks[an.start+aR]local a5=aR;local a6=a4["end"]-a4.start;while a5<a6 do a5=a5+1;local n=a5-1;local ac=a4.chunks[a4.start+n]if ac>=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<a6 do a5=a5+1;local n=a5-1;local d=aP.chunks[aP.start+n]am["end"]=am["end"]+1;am.chunks:push(d)end;am.isNegative=not aP.isNegative;local an=am;do return an end end else if aP==nil then local am=N.new()local a5=0;local a6=a4["end"]-a4.start;while a5<a6 do a5=a5+1;local n=a5-1;local d=a4.chunks[a4.start+n]am["end"]=am["end"]+1;am.chunks:push(d)end;am.isNegative=a4.isNegative;local an=am;do return an end else if a4.isNegative then 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 aU=an;local am=N.new(a4.chunks)am.start=a4.start;am["end"]=a4["end"]am.isNegative=not a4.isNegative;local an=am;local aP=an;local d;if ___BigInt_BigInt_Impl_.greater(aU,aP)then local am=N.new()local a5=0;local a6=aU["end"]-aU.start;while a5<a6 do a5=a5+1;local n=a5-1;local d=aU.chunks[aU.start+n]am["end"]=am["end"]+1;am.chunks:push(d)end;am.isNegative=aU.isNegative;local an=am;local a4=an;local a5=0;local a6=aP["end"]-aP.start;while a5<a6 do a5=a5+1;local aR=a5-1;local d=aP.chunks[aP.start+aR]local a5=aR;local a6=a4["end"]-a4.start;while a5<a6 do a5=a5+1;local n=a5-1;local ac=a4.chunks[a4.start+n]if ac>=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<a6 do a5=a5+1;local n=a5-1;local d=aP.chunks[aP.start+n]am["end"]=am["end"]+1;am.chunks:push(d)end;am.isNegative=aP.isNegative;local an=am;local a4=an;local a5=0;local a6=aU["end"]-aU.start;while a5<a6 do a5=a5+1;local aR=a5-1;local d=aU.chunks[aU.start+aR]local a5=aR;local a6=a4["end"]-a4.start;while a5<a6 do a5=a5+1;local n=a5-1;local ac=a4.chunks[a4.start+n]if ac>=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 a5<a6 do a5=a5+1;local n=a5-1;local d=a4.chunks[a4.start+n]am["end"]=am["end"]+1;am.chunks:push(d)end;am.isNegative=a4.isNegative;local aQ=am;local a4=aQ;local a5=0;local a6=aP["end"]-aP.start;while a5<a6 do a5=a5+1;local aR=a5-1;local d=aP.chunks[aP.start+aR]local ac;local a5=aR;local a6=a4["end"]-a4.start;while a5<a6 do a5=a5+1;local n=a5-1;ac=a4.chunks[a4.start+n]+d;if T.band(ac,32768)==0 then a4.chunks[a4.start+n]=ac;d=0;break end;a4.chunks[a4.start+n]=T.band(ac,32767)d=1 end;if d>0 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 a5<a6 do a5=a5+1;local n=a5-1;local d=aP.chunks[aP.start+n]am["end"]=am["end"]+1;am.chunks:push(d)end;am.isNegative=aP.isNegative;local aQ=am;local aU=aQ;local a5=0;local a6=a4["end"]-a4.start;while a5<a6 do a5=a5+1;local aR=a5-1;local d=a4.chunks[a4.start+aR]local ac;local a5=aR;local a6=aU["end"]-aU.start;while a5<a6 do a5=a5+1;local n=a5-1;ac=aU.chunks[aU.start+n]+d;if T.band(ac,32768)==0 then aU.chunks[aU.start+n]=ac;d=0;break end;aU.chunks[aU.start+n]=T.band(ac,32767)d=1 end;if d>0 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 a5<a6 do a5=a5+1;local n=a5-1;local d=a4.chunks[a4.start+n]am["end"]=am["end"]+1;am.chunks:push(d)end;am.isNegative=a4.isNegative;local an=am;local a4=an;local a5=0;local a6=aZ-aY;while a5<a6 do a5=a5+1;local aR=a5-1;local d=aV[aY+aR]local ac;local a5=aR;local a6=a4["end"]-a4.start;while a5<a6 do a5=a5+1;local n=a5-1;ac=a4.chunks[a4.start+n]+d;if T.band(ac,32768)==0 then a4.chunks[a4.start+n]=ac;d=0;break end;a4.chunks[a4.start+n]=T.band(ac,32767)d=1 end;if d>0 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 a5<a6 do a5=a5+1;local n=a5-1;local d=aV[aY+n]am["end"]=am["end"]+1;am.chunks:push(d)end;am.isNegative=aX;local an=am;local aU=an;local a5=0;local a6=a4["end"]-a4.start;while a5<a6 do a5=a5+1;local aR=a5-1;local d=a4.chunks[a4.start+aR]local ac;local a5=aR;local a6=aU["end"]-aU.start;while a5<a6 do a5=a5+1;local n=a5-1;ac=aU.chunks[aU.start+n]+d;if T.band(ac,32768)==0 then aU.chunks[aU.start+n]=ac;d=0;break end;aU.chunks[aU.start+n]=T.band(ac,32767)d=1 end;if d>0 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<a6 do a5=a5+1;local n=a5-1;local d=a4.chunks[a4.start+n]am["end"]=am["end"]+1;am.chunks:push(d)end;am.isNegative=a4.isNegative;local an=am;local a4=an;local a5=0;local a6=aP["end"]-aP.start;while a5<a6 do a5=a5+1;local aR=a5-1;local d=aP.chunks[aP.start+aR]local a5=aR;local a6=a4["end"]-a4.start;while a5<a6 do a5=a5+1;local n=a5-1;local ac=a4.chunks[a4.start+n]if ac>=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<a6 do a5=a5+1;local n=a5-1;local d=aP.chunks[aP.start+n]am["end"]=am["end"]+1;am.chunks:push(d)end;am.isNegative=aP.isNegative;local an=am;local aU=an;local a5=0;local a6=a4["end"]-a4.start;while a5<a6 do a5=a5+1;local aR=a5-1;local d=a4.chunks[a4.start+aR]local a5=aR;local a6=aU["end"]-aU.start;while a5<a6 do a5=a5+1;local n=a5-1;local ac=aU.chunks[aU.start+n]if ac>=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 a5<a6 do a5=a5+1;local n=a5-1;local d=an.chunks[an.start+n]am["end"]=am["end"]+1;am.chunks:push(d)end;am.isNegative=an.isNegative;local aQ=am;local w=aQ;if an.isNegative then local d=1;local ac;local a5=0;local a6=an["end"]-an.start;while a5<a6 do a5=a5+1;local n=a5-1;ac=an.chunks[an.start+n]+d;if T.band(ac,32768)==0 then an.chunks[an.start+n]=ac;d=0;break end;an.chunks[an.start+n]=T.band(ac,32767)d=1 end;if d>0 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<a6 do a5=a5+1;local n=a5-1;local ac=an.chunks[an.start+n]if ac>=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 a5<a6 do a5=a5+1;local n=a5-1;ac=an.chunks[an.start+n]+d;if T.band(ac,32768)==0 then an.chunks[an.start+n]=ac;d=0;break end;an.chunks[an.start+n]=T.band(ac,32767)d=1 end;if d>0 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<a6 do a5=a5+1;local n=a5-1;local d=an.chunks[an.start+n]am["end"]=am["end"]+1;am.chunks:push(d)end;am.isNegative=an.isNegative;local an=am;do return an end else 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<a6 do a5=a5+1;local n=a5-1;local ac=an.chunks[an.start+n]if ac>=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<a6 do a5=a5+1;local n=a5-1;local d=an.chunks[an.start+n]am["end"]=am["end"]+1;am.chunks:push(d)end;am.isNegative=an.isNegative;local an=am;do return an end end end end;___BigInt_BigInt_Impl_._subtract=function(a4,aP)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<a6 do a5=a5+1;local n=a5-1;local d=aP.chunks[aP.start+n]am["end"]=am["end"]+1;am.chunks:push(d)end;am.isNegative=not aP.isNegative;local an=am;do return an end end end;if aP==nil then local am=N.new()local a5=0;local a6=a4["end"]-a4.start;while a5<a6 do a5=a5+1;local n=a5-1;local d=a4.chunks[a4.start+n]am["end"]=am["end"]+1;am.chunks:push(d)end;am.isNegative=a4.isNegative;local an=am;do return an end end;if a4.isNegative then 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 aU=an;local am=N.new(a4.chunks)am.start=a4.start;am["end"]=a4["end"]am.isNegative=not a4.isNegative;local an=am;local aP=an;local d;if ___BigInt_BigInt_Impl_.greater(aU,aP)then local am=N.new()local a5=0;local a6=aU["end"]-aU.start;while a5<a6 do a5=a5+1;local n=a5-1;local d=aU.chunks[aU.start+n]am["end"]=am["end"]+1;am.chunks:push(d)end;am.isNegative=aU.isNegative;local an=am;local a4=an;local a5=0;local a6=aP["end"]-aP.start;while a5<a6 do a5=a5+1;local aR=a5-1;local d=aP.chunks[aP.start+aR]local a5=aR;local a6=a4["end"]-a4.start;while a5<a6 do a5=a5+1;local n=a5-1;local ac=a4.chunks[a4.start+n]if ac>=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<a6 do a5=a5+1;local n=a5-1;local d=aP.chunks[aP.start+n]am["end"]=am["end"]+1;am.chunks:push(d)end;am.isNegative=aP.isNegative;local an=am;local a4=an;local a5=0;local a6=aU["end"]-aU.start;while a5<a6 do a5=a5+1;local aR=a5-1;local d=aU.chunks[aU.start+aR]local a5=aR;local a6=a4["end"]-a4.start;while a5<a6 do a5=a5+1;local n=a5-1;local ac=a4.chunks[a4.start+n]if ac>=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 a5<a6 do a5=a5+1;local n=a5-1;local d=a4.chunks[a4.start+n]am["end"]=am["end"]+1;am.chunks:push(d)end;am.isNegative=a4.isNegative;local aQ=am;local a4=aQ;local a5=0;local a6=aP["end"]-aP.start;while a5<a6 do a5=a5+1;local aR=a5-1;local d=aP.chunks[aP.start+aR]local ac;local a5=aR;local a6=a4["end"]-a4.start;while a5<a6 do a5=a5+1;local n=a5-1;ac=a4.chunks[a4.start+n]+d;if T.band(ac,32768)==0 then a4.chunks[a4.start+n]=ac;d=0;break end;a4.chunks[a4.start+n]=T.band(ac,32767)d=1 end;if d>0 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 a5<a6 do a5=a5+1;local n=a5-1;local d=aP.chunks[aP.start+n]am["end"]=am["end"]+1;am.chunks:push(d)end;am.isNegative=aP.isNegative;local aQ=am;local aU=aQ;local a5=0;local a6=a4["end"]-a4.start;while a5<a6 do a5=a5+1;local aR=a5-1;local d=a4.chunks[a4.start+aR]local ac;local a5=aR;local a6=aU["end"]-aU.start;while a5<a6 do a5=a5+1;local n=a5-1;ac=aU.chunks[aU.start+n]+d;if T.band(ac,32768)==0 then aU.chunks[aU.start+n]=ac;d=0;break end;aU.chunks[aU.start+n]=T.band(ac,32767)d=1 end;if d>0 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 a5<a6 do a5=a5+1;local n=a5-1;local d=a4.chunks[a4.start+n]am["end"]=am["end"]+1;am.chunks:push(d)end;am.isNegative=a4.isNegative;local an=am;local a4=an;local a5=0;local a6=aZ-aY;while a5<a6 do a5=a5+1;local aR=a5-1;local d=aV[aY+aR]local ac;local a5=aR;local a6=a4["end"]-a4.start;while a5<a6 do a5=a5+1;local n=a5-1;ac=a4.chunks[a4.start+n]+d;if T.band(ac,32768)==0 then a4.chunks[a4.start+n]=ac;d=0;break end;a4.chunks[a4.start+n]=T.band(ac,32767)d=1 end;if d>0 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 a5<a6 do a5=a5+1;local n=a5-1;local d=aV[aY+n]am["end"]=am["end"]+1;am.chunks:push(d)end;am.isNegative=aX;local an=am;local aU=an;local a5=0;local a6=a4["end"]-a4.start;while a5<a6 do a5=a5+1;local aR=a5-1;local d=a4.chunks[a4.start+aR]local ac;local a5=aR;local a6=aU["end"]-aU.start;while a5<a6 do a5=a5+1;local n=a5-1;ac=aU.chunks[aU.start+n]+d;if T.band(ac,32768)==0 then aU.chunks[aU.start+n]=ac;d=0;break end;aU.chunks[aU.start+n]=T.band(ac,32767)d=1 end;if d>0 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<a6 do a5=a5+1;local n=a5-1;local d=a4.chunks[a4.start+n]am["end"]=am["end"]+1;am.chunks:push(d)end;am.isNegative=a4.isNegative;local an=am;local a4=an;local a5=0;local a6=aP["end"]-aP.start;while a5<a6 do a5=a5+1;local aR=a5-1;local d=aP.chunks[aP.start+aR]local a5=aR;local a6=a4["end"]-a4.start;while a5<a6 do a5=a5+1;local n=a5-1;local ac=a4.chunks[a4.start+n]if ac>=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<a6 do a5=a5+1;local n=a5-1;local d=aP.chunks[aP.start+n]am["end"]=am["end"]+1;am.chunks:push(d)end;am.isNegative=aP.isNegative;local an=am;local aU=an;local a5=0;local a6=a4["end"]-a4.start;while a5<a6 do a5=a5+1;local aR=a5-1;local d=a4.chunks[a4.start+aR]local a5=aR;local a6=aU["end"]-aU.start;while a5<a6 do a5=a5+1;local n=a5-1;local ac=aU.chunks[aU.start+n]if ac>=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<a6 do a5=a5+1;local n=a5-1;local d=a4.chunks[a4.start+n]am["end"]=am["end"]+1;am.chunks:push(d)end;am.isNegative=a4.isNegative;local an=am;local a4=an;local a5=0;local a6=aP["end"]-aP.start;while a5<a6 do a5=a5+1;local aR=a5-1;local d=aP.chunks[aP.start+aR]local a5=aR;local a6=a4["end"]-a4.start;while a5<a6 do a5=a5+1;local n=a5-1;local ac=a4.chunks[a4.start+n]if ac>=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<a6 do a5=a5+1;local n=a5-1;local d=aP.chunks[aP.start+n]am["end"]=am["end"]+1;am.chunks:push(d)end;am.isNegative=aP.isNegative;local an=am;local aU=an;local a5=0;local a6=a4["end"]-a4.start;while a5<a6 do a5=a5+1;local aR=a5-1;local d=a4.chunks[a4.start+aR]local a5=aR;local a6=aU["end"]-aU.start;while a5<a6 do a5=a5+1;local n=a5-1;local ac=aU.chunks[aU.start+n]if ac>=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<a6 do a5=a5+1;local aR=a5-1;local d=aP.chunks[aP.start+aR]local a5=aR;local a6=a4["end"]-a4.start;while a5<a6 do a5=a5+1;local n=a5-1;local ac=a4.chunks[a4.start+n]if ac>=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<a6 do a5=a5+1;local n=a5-1;local ac=a4.chunks[a4.start+n]if ac>=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 a5<a6 do a5=a5+1;local n=a5-1;local d=an.chunks[an.start+n]am["end"]=am["end"]+1;am.chunks:push(d)end;am.isNegative=not an.isNegative;do return am end end;___BigInt_BigInt_Impl_.opMulticplicate=function(an,aP)if an==nil or aP==nil then do return nil end end;if an.isNegative~=aP.isNegative then local an=___BigInt_BigInt_Impl_.mul(an,aP)an.isNegative=true;do return an end end;do return ___BigInt_BigInt_Impl_.mul(an,aP)end end;___BigInt_BigInt_Impl_.opMulticplicateInt=function(a4,aP)do return ___BigInt_BigInt_Impl_.opMulticplicate(aP,___BigInt_BigInt_Impl_.fromInt(a4))end end;___BigInt_BigInt_Impl_.mulLittle=function(a4,d)if d==1 then local am=N.new()local a5=0;local a6=a4["end"]-a4.start;while a5<a6 do a5=a5+1;local n=a5-1;local d=a4.chunks[a4.start+n]am["end"]=am["end"]+1;am.chunks:push(d)end;am.isNegative=a4.isNegative;local an=am;do return an end end;if d<0 then d=-d end;local ac=0;local an=N.new()local aP=an;local a5=0;local a6=a4["end"]-a4.start;while a5<a6 do a5=a5+1;local n=a5-1;ac=a4.chunks[a4.start+n]*d+ac;aP["end"]=aP["end"]+1;aP.chunks:push(T.band(ac,32767))ac=T.rshift(ac,15)end;if ac>0 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 a5<a6 do a5=a5+1;local n=a5-1;local d=aP.chunks[aP.start+n]am["end"]=am["end"]+1;am.chunks:push(d)end;am.isNegative=aP.isNegative;local an=am;do return an end else if d<0 then d=-d end;local ac=0;local an=N.new()local aT=an;local a5=0;local a6=aP["end"]-aP.start;while a5<a6 do a5=a5+1;local n=a5-1;ac=aP.chunks[aP.start+n]*d+ac;aT["end"]=aT["end"]+1;aT.chunks:push(T.band(ac,32767))ac=T.rshift(ac,15)end;if ac>0 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 a5<a6 do a5=a5+1;local n=a5-1;local d=a4.chunks[a4.start+n]am["end"]=am["end"]+1;am.chunks:push(d)end;am.isNegative=a4.isNegative;local an=am;do return an end else if d<0 then d=-d end;local ac=0;local an=N.new()local aP=an;local a5=0;local a6=a4["end"]-a4.start;while a5<a6 do a5=a5+1;local n=a5-1;ac=a4.chunks[a4.start+n]*d+ac;aP["end"]=aP["end"]+1;aP.chunks:push(T.band(ac,32767))ac=T.rshift(ac,15)end;if ac>0 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<b0 and a4.chunks[a4.start+n]==0 do n=n+1 end;local b1;if n==b0 then b1=nil else local am=N.new(a4.chunks)am.start=a4.start;am["end"]=a4.start+b0;b1=am end;local b1=b1;local am=N.new(aP.chunks)local b2;if ao>=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 n<b0 and aP.chunks[aP.start+n]==0 do n=n+1 end;local b3;if n==b0 then b3=nil else local am=N.new(aP.chunks)am.start=aP.start;am["end"]=aP.start+b0;b3=am end;local b3=b3;local b4=___BigInt_BigInt_Impl_.mul(a_,b2)local b5=___BigInt_BigInt_Impl_.mul(b1,b3)local a4=b4;local aP;if a_==nil then if b1==nil then aP=nil else local am=N.new()local a5=0;local a6=b1["end"]-b1.start;while a5<a6 do a5=a5+1;local n=a5-1;local d=b1.chunks[b1.start+n]am["end"]=am["end"]+1;am.chunks:push(d)end;am.isNegative=b1.isNegative;local an=am;aP=an end else if b1==nil then local am=N.new()local a5=0;local a6=a_["end"]-a_.start;while a5<a6 do a5=a5+1;local n=a5-1;local d=a_.chunks[a_.start+n]am["end"]=am["end"]+1;am.chunks:push(d)end;am.isNegative=a_.isNegative;local an=am;aP=an else if a_.isNegative then if b1.isNegative then local an;if a_["end"]-a_.start>b1["end"]-b1.start then local am=N.new()local a5=0;local a6=a_["end"]-a_.start;while a5<a6 do a5=a5+1;local n=a5-1;local d=a_.chunks[a_.start+n]am["end"]=am["end"]+1;am.chunks:push(d)end;am.isNegative=a_.isNegative;local aQ=am;local a4=aQ;local a5=0;local a6=b1["end"]-b1.start;while a5<a6 do a5=a5+1;local aR=a5-1;local d=b1.chunks[b1.start+aR]local ac;local a5=aR;local a6=a4["end"]-a4.start;while a5<a6 do a5=a5+1;local n=a5-1;ac=a4.chunks[a4.start+n]+d;if T.band(ac,32768)==0 then a4.chunks[a4.start+n]=ac;d=0;break end;a4.chunks[a4.start+n]=T.band(ac,32767)d=1 end;if d>0 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 a5<a6 do a5=a5+1;local n=a5-1;local d=b1.chunks[b1.start+n]am["end"]=am["end"]+1;am.chunks:push(d)end;am.isNegative=b1.isNegative;local aQ=am;local a4=aQ;local a5=0;local a6=a_["end"]-a_.start;while a5<a6 do a5=a5+1;local aR=a5-1;local d=a_.chunks[a_.start+aR]local ac;local a5=aR;local a6=a4["end"]-a4.start;while a5<a6 do a5=a5+1;local n=a5-1;ac=a4.chunks[a4.start+n]+d;if T.band(ac,32768)==0 then a4.chunks[a4.start+n]=ac;d=0;break end;a4.chunks[a4.start+n]=T.band(ac,32767)d=1 end;if d>0 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<a6 do a5=a5+1;local n=a5-1;local d=b1.chunks[b1.start+n]am["end"]=am["end"]+1;am.chunks:push(d)end;am.isNegative=b1.isNegative;local an=am;local a4=an;local a5=0;local a6=aT["end"]-aT.start;while a5<a6 do a5=a5+1;local aR=a5-1;local d=aT.chunks[aT.start+aR]local a5=aR;local a6=a4["end"]-a4.start;while a5<a6 do a5=a5+1;local n=a5-1;local ac=a4.chunks[a4.start+n]if ac>=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<a6 do a5=a5+1;local n=a5-1;local d=aT.chunks[aT.start+n]am["end"]=am["end"]+1;am.chunks:push(d)end;am.isNegative=aT.isNegative;local an=am;local a4=an;local a5=0;local a6=b1["end"]-b1.start;while a5<a6 do a5=a5+1;local aR=a5-1;local d=b1.chunks[b1.start+aR]local a5=aR;local a6=a4["end"]-a4.start;while a5<a6 do a5=a5+1;local n=a5-1;local ac=a4.chunks[a4.start+n]if ac>=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<a6 do a5=a5+1;local n=a5-1;local d=a_.chunks[a_.start+n]am["end"]=am["end"]+1;am.chunks:push(d)end;am.isNegative=a_.isNegative;local an=am;local a4=an;local a5=0;local a6=aT["end"]-aT.start;while a5<a6 do a5=a5+1;local aR=a5-1;local d=aT.chunks[aT.start+aR]local a5=aR;local a6=a4["end"]-a4.start;while a5<a6 do a5=a5+1;local n=a5-1;local ac=a4.chunks[a4.start+n]if ac>=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<a6 do a5=a5+1;local n=a5-1;local d=aT.chunks[aT.start+n]am["end"]=am["end"]+1;am.chunks:push(d)end;am.isNegative=aT.isNegative;local an=am;local a4=an;local a5=0;local a6=a_["end"]-a_.start;while a5<a6 do a5=a5+1;local aR=a5-1;local d=a_.chunks[a_.start+aR]local a5=aR;local a6=a4["end"]-a4.start;while a5<a6 do a5=a5+1;local n=a5-1;local ac=a4.chunks[a4.start+n]if ac>=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 a5<a6 do a5=a5+1;local n=a5-1;local d=a_.chunks[a_.start+n]am["end"]=am["end"]+1;am.chunks:push(d)end;am.isNegative=a_.isNegative;local an=am;local a4=an;local a5=0;local a6=b1["end"]-b1.start;while a5<a6 do a5=a5+1;local aR=a5-1;local d=b1.chunks[b1.start+aR]local ac;local a5=aR;local a6=a4["end"]-a4.start;while a5<a6 do a5=a5+1;local n=a5-1;ac=a4.chunks[a4.start+n]+d;if T.band(ac,32768)==0 then a4.chunks[a4.start+n]=ac;d=0;break end;a4.chunks[a4.start+n]=T.band(ac,32767)d=1 end;if d>0 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 a5<a6 do a5=a5+1;local n=a5-1;local d=b1.chunks[b1.start+n]am["end"]=am["end"]+1;am.chunks:push(d)end;am.isNegative=b1.isNegative;local an=am;local a4=an;local a5=0;local a6=a_["end"]-a_.start;while a5<a6 do a5=a5+1;local aR=a5-1;local d=a_.chunks[a_.start+aR]local ac;local a5=aR;local a6=a4["end"]-a4.start;while a5<a6 do a5=a5+1;local n=a5-1;ac=a4.chunks[a4.start+n]+d;if T.band(ac,32768)==0 then a4.chunks[a4.start+n]=ac;d=0;break end;a4.chunks[a4.start+n]=T.band(ac,32767)d=1 end;if d>0 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 a5<a6 do a5=a5+1;local n=a5-1;local d=b3.chunks[b3.start+n]am["end"]=am["end"]+1;am.chunks:push(d)end;am.isNegative=b3.isNegative;local an=am;aT=an end else if b3==nil then local am=N.new()local a5=0;local a6=b2["end"]-b2.start;while a5<a6 do a5=a5+1;local n=a5-1;local d=b2.chunks[b2.start+n]am["end"]=am["end"]+1;am.chunks:push(d)end;am.isNegative=b2.isNegative;local an=am;aT=an else if b2.isNegative then if b3.isNegative then local an;if b2["end"]-b2.start>b3["end"]-b3.start then local am=N.new()local a5=0;local a6=b2["end"]-b2.start;while a5<a6 do a5=a5+1;local n=a5-1;local d=b2.chunks[b2.start+n]am["end"]=am["end"]+1;am.chunks:push(d)end;am.isNegative=b2.isNegative;local aQ=am;local a4=aQ;local a5=0;local a6=b3["end"]-b3.start;while a5<a6 do a5=a5+1;local aR=a5-1;local d=b3.chunks[b3.start+aR]local ac;local a5=aR;local a6=a4["end"]-a4.start;while a5<a6 do a5=a5+1;local n=a5-1;ac=a4.chunks[a4.start+n]+d;if T.band(ac,32768)==0 then a4.chunks[a4.start+n]=ac;d=0;break end;a4.chunks[a4.start+n]=T.band(ac,32767)d=1 end;if d>0 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 a5<a6 do a5=a5+1;local n=a5-1;local d=b3.chunks[b3.start+n]am["end"]=am["end"]+1;am.chunks:push(d)end;am.isNegative=b3.isNegative;local aQ=am;local a4=aQ;local a5=0;local a6=b2["end"]-b2.start;while a5<a6 do a5=a5+1;local aR=a5-1;local d=b2.chunks[b2.start+aR]local ac;local a5=aR;local a6=a4["end"]-a4.start;while a5<a6 do a5=a5+1;local n=a5-1;ac=a4.chunks[a4.start+n]+d;if T.band(ac,32768)==0 then a4.chunks[a4.start+n]=ac;d=0;break end;a4.chunks[a4.start+n]=T.band(ac,32767)d=1 end;if d>0 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<a6 do a5=a5+1;local n=a5-1;local d=b3.chunks[b3.start+n]am["end"]=am["end"]+1;am.chunks:push(d)end;am.isNegative=b3.isNegative;local an=am;local a4=an;local a5=0;local a6=aP["end"]-aP.start;while a5<a6 do a5=a5+1;local aR=a5-1;local d=aP.chunks[aP.start+aR]local a5=aR;local a6=a4["end"]-a4.start;while a5<a6 do a5=a5+1;local n=a5-1;local ac=a4.chunks[a4.start+n]if ac>=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<a6 do a5=a5+1;local n=a5-1;local d=aP.chunks[aP.start+n]am["end"]=am["end"]+1;am.chunks:push(d)end;am.isNegative=aP.isNegative;local an=am;local a4=an;local a5=0;local a6=b3["end"]-b3.start;while a5<a6 do a5=a5+1;local aR=a5-1;local d=b3.chunks[b3.start+aR]local a5=aR;local a6=a4["end"]-a4.start;while a5<a6 do a5=a5+1;local n=a5-1;local ac=a4.chunks[a4.start+n]if ac>=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<a6 do a5=a5+1;local n=a5-1;local d=b2.chunks[b2.start+n]am["end"]=am["end"]+1;am.chunks:push(d)end;am.isNegative=b2.isNegative;local an=am;local a4=an;local a5=0;local a6=aP["end"]-aP.start;while a5<a6 do a5=a5+1;local aR=a5-1;local d=aP.chunks[aP.start+aR]local a5=aR;local a6=a4["end"]-a4.start;while a5<a6 do a5=a5+1;local n=a5-1;local ac=a4.chunks[a4.start+n]if ac>=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<a6 do a5=a5+1;local n=a5-1;local d=aP.chunks[aP.start+n]am["end"]=am["end"]+1;am.chunks:push(d)end;am.isNegative=aP.isNegative;local an=am;local a4=an;local a5=0;local a6=b2["end"]-b2.start;while a5<a6 do a5=a5+1;local aR=a5-1;local d=b2.chunks[b2.start+aR]local a5=aR;local a6=a4["end"]-a4.start;while a5<a6 do a5=a5+1;local n=a5-1;local ac=a4.chunks[a4.start+n]if ac>=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 a5<a6 do a5=a5+1;local n=a5-1;local d=b2.chunks[b2.start+n]am["end"]=am["end"]+1;am.chunks:push(d)end;am.isNegative=b2.isNegative;local an=am;local a4=an;local a5=0;local a6=b3["end"]-b3.start;while a5<a6 do a5=a5+1;local aR=a5-1;local d=b3.chunks[b3.start+aR]local ac;local a5=aR;local a6=a4["end"]-a4.start;while a5<a6 do a5=a5+1;local n=a5-1;ac=a4.chunks[a4.start+n]+d;if T.band(ac,32768)==0 then a4.chunks[a4.start+n]=ac;d=0;break end;a4.chunks[a4.start+n]=T.band(ac,32767)d=1 end;if d>0 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 a5<a6 do a5=a5+1;local n=a5-1;local d=b3.chunks[b3.start+n]am["end"]=am["end"]+1;am.chunks:push(d)end;am.isNegative=b3.isNegative;local an=am;local a4=an;local a5=0;local a6=b2["end"]-b2.start;while a5<a6 do a5=a5+1;local aR=a5-1;local d=b2.chunks[b2.start+aR]local ac;local a5=aR;local a6=a4["end"]-a4.start;while a5<a6 do a5=a5+1;local n=a5-1;ac=a4.chunks[a4.start+n]+d;if T.band(ac,32768)==0 then a4.chunks[a4.start+n]=ac;d=0;break end;a4.chunks[a4.start+n]=T.band(ac,32767)d=1 end;if d>0 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 a5<a6 do a5=a5+1;local n=a5-1;local d=b5.chunks[b5.start+n]am["end"]=am["end"]+1;am.chunks:push(d)end;am.isNegative=b5.isNegative;local an=am;aT=an end else if b5==nil then local am=N.new()local a5=0;local a6=b4["end"]-b4.start;while a5<a6 do a5=a5+1;local n=a5-1;local d=b4.chunks[b4.start+n]am["end"]=am["end"]+1;am.chunks:push(d)end;am.isNegative=b4.isNegative;local an=am;aT=an else if b4.isNegative then if b5.isNegative then local an;if b4["end"]-b4.start>b5["end"]-b5.start then local am=N.new()local a5=0;local a6=b4["end"]-b4.start;while a5<a6 do a5=a5+1;local n=a5-1;local d=b4.chunks[b4.start+n]am["end"]=am["end"]+1;am.chunks:push(d)end;am.isNegative=b4.isNegative;local aQ=am;local a4=aQ;local a5=0;local a6=b5["end"]-b5.start;while a5<a6 do a5=a5+1;local aR=a5-1;local d=b5.chunks[b5.start+aR]local ac;local a5=aR;local a6=a4["end"]-a4.start;while a5<a6 do a5=a5+1;local n=a5-1;ac=a4.chunks[a4.start+n]+d;if T.band(ac,32768)==0 then a4.chunks[a4.start+n]=ac;d=0;break end;a4.chunks[a4.start+n]=T.band(ac,32767)d=1 end;if d>0 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 a5<a6 do a5=a5+1;local n=a5-1;local d=b5.chunks[b5.start+n]am["end"]=am["end"]+1;am.chunks:push(d)end;am.isNegative=b5.isNegative;local aQ=am;local a4=aQ;local a5=0;local a6=b4["end"]-b4.start;while a5<a6 do a5=a5+1;local aR=a5-1;local d=b4.chunks[b4.start+aR]local ac;local a5=aR;local a6=a4["end"]-a4.start;while a5<a6 do a5=a5+1;local n=a5-1;ac=a4.chunks[a4.start+n]+d;if T.band(ac,32768)==0 then a4.chunks[a4.start+n]=ac;d=0;break end;a4.chunks[a4.start+n]=T.band(ac,32767)d=1 end;if d>0 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<a6 do a5=a5+1;local n=a5-1;local d=b5.chunks[b5.start+n]am["end"]=am["end"]+1;am.chunks:push(d)end;am.isNegative=b5.isNegative;local an=am;local a4=an;local a5=0;local a6=aP["end"]-aP.start;while a5<a6 do a5=a5+1;local aR=a5-1;local d=aP.chunks[aP.start+aR]local a5=aR;local a6=a4["end"]-a4.start;while a5<a6 do a5=a5+1;local n=a5-1;local ac=a4.chunks[a4.start+n]if ac>=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<a6 do a5=a5+1;local n=a5-1;local d=aP.chunks[aP.start+n]am["end"]=am["end"]+1;am.chunks:push(d)end;am.isNegative=aP.isNegative;local an=am;local a4=an;local a5=0;local a6=b5["end"]-b5.start;while a5<a6 do a5=a5+1;local aR=a5-1;local d=b5.chunks[b5.start+aR]local a5=aR;local a6=a4["end"]-a4.start;while a5<a6 do a5=a5+1;local n=a5-1;local ac=a4.chunks[a4.start+n]if ac>=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<a6 do a5=a5+1;local n=a5-1;local d=b4.chunks[b4.start+n]am["end"]=am["end"]+1;am.chunks:push(d)end;am.isNegative=b4.isNegative;local an=am;local a4=an;local a5=0;local a6=aP["end"]-aP.start;while a5<a6 do a5=a5+1;local aR=a5-1;local d=aP.chunks[aP.start+aR]local a5=aR;local a6=a4["end"]-a4.start;while a5<a6 do a5=a5+1;local n=a5-1;local ac=a4.chunks[a4.start+n]if ac>=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<a6 do a5=a5+1;local n=a5-1;local d=aP.chunks[aP.start+n]am["end"]=am["end"]+1;am.chunks:push(d)end;am.isNegative=aP.isNegative;local an=am;local a4=an;local a5=0;local a6=b4["end"]-b4.start;while a5<a6 do a5=a5+1;local aR=a5-1;local d=b4.chunks[b4.start+aR]local a5=aR;local a6=a4["end"]-a4.start;while a5<a6 do a5=a5+1;local n=a5-1;local ac=a4.chunks[a4.start+n]if ac>=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 a5<a6 do a5=a5+1;local n=a5-1;local d=b4.chunks[b4.start+n]am["end"]=am["end"]+1;am.chunks:push(d)end;am.isNegative=b4.isNegative;local an=am;local a4=an;local a5=0;local a6=b5["end"]-b5.start;while a5<a6 do a5=a5+1;local aR=a5-1;local d=b5.chunks[b5.start+aR]local ac;local a5=aR;local a6=a4["end"]-a4.start;while a5<a6 do a5=a5+1;local n=a5-1;ac=a4.chunks[a4.start+n]+d;if T.band(ac,32768)==0 then a4.chunks[a4.start+n]=ac;d=0;break end;a4.chunks[a4.start+n]=T.band(ac,32767)d=1 end;if d>0 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 a5<a6 do a5=a5+1;local n=a5-1;local d=b5.chunks[b5.start+n]am["end"]=am["end"]+1;am.chunks:push(d)end;am.isNegative=b5.isNegative;local an=am;local a4=an;local a5=0;local a6=b4["end"]-b4.start;while a5<a6 do a5=a5+1;local aR=a5-1;local d=b4.chunks[b4.start+aR]local ac;local a5=aR;local a6=a4["end"]-a4.start;while a5<a6 do a5=a5+1;local n=a5-1;ac=a4.chunks[a4.start+n]+d;if T.band(ac,32768)==0 then a4.chunks[a4.start+n]=ac;d=0;break end;a4.chunks[a4.start+n]=T.band(ac,32767)d=1 end;if d>0 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 a5<a6 do a5=a5+1;local n=a5-1;am["end"]=am["end"]+1;am.chunks:push(0)end else local a5=0;local a6=ao;while a5<a6 do a5=a5+1;local n=a5-1;if n<b5["end"]-b5.start then local d=b5.chunks[b5.start+n]am["end"]=am["end"]+1;am.chunks:push(d)else if aP==nil and a4==nil then break end;am["end"]=am["end"]+1;am.chunks:push(0)end end;if b5["end"]-b5.start>ao 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 a5<a6 do a5=a5+1;local n=a5-1;local d=aT.chunks[aT.start+n]am["end"]=am["end"]+1;am.chunks:push(d)end;am.isNegative=aT.isNegative;local an=am;aP=an end else if aT==nil then local am=N.new()local a5=0;local a6=aP["end"]-aP.start;while a5<a6 do a5=a5+1;local n=a5-1;local d=aP.chunks[aP.start+n]am["end"]=am["end"]+1;am.chunks:push(d)end;am.isNegative=aP.isNegative;local an=am;aP=an else if aP.isNegative then if aT.isNegative then local an;if aP["end"]-aP.start>aT["end"]-aT.start then local am=N.new()local a5=0;local a6=aP["end"]-aP.start;while a5<a6 do a5=a5+1;local n=a5-1;local d=aP.chunks[aP.start+n]am["end"]=am["end"]+1;am.chunks:push(d)end;am.isNegative=aP.isNegative;local aQ=am;local a4=aQ;local a5=0;local a6=aT["end"]-aT.start;while a5<a6 do a5=a5+1;local aR=a5-1;local d=aT.chunks[aT.start+aR]local ac;local a5=aR;local a6=a4["end"]-a4.start;while a5<a6 do a5=a5+1;local n=a5-1;ac=a4.chunks[a4.start+n]+d;if T.band(ac,32768)==0 then a4.chunks[a4.start+n]=ac;d=0;break end;a4.chunks[a4.start+n]=T.band(ac,32767)d=1 end;if d>0 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 a5<a6 do a5=a5+1;local n=a5-1;local d=aT.chunks[aT.start+n]am["end"]=am["end"]+1;am.chunks:push(d)end;am.isNegative=aT.isNegative;local aQ=am;local a4=aQ;local a5=0;local a6=aP["end"]-aP.start;while a5<a6 do a5=a5+1;local aR=a5-1;local d=aP.chunks[aP.start+aR]local ac;local a5=aR;local a6=a4["end"]-a4.start;while a5<a6 do a5=a5+1;local n=a5-1;ac=a4.chunks[a4.start+n]+d;if T.band(ac,32768)==0 then a4.chunks[a4.start+n]=ac;d=0;break end;a4.chunks[a4.start+n]=T.band(ac,32767)d=1 end;if d>0 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<a6 do a5=a5+1;local n=a5-1;local d=aT.chunks[aT.start+n]am["end"]=am["end"]+1;am.chunks:push(d)end;am.isNegative=aT.isNegative;local an=am;local a4=an;local a5=0;local a6=b6["end"]-b6.start;while a5<a6 do a5=a5+1;local aR=a5-1;local d=b6.chunks[b6.start+aR]local a5=aR;local a6=a4["end"]-a4.start;while a5<a6 do a5=a5+1;local n=a5-1;local ac=a4.chunks[a4.start+n]if ac>=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<a6 do a5=a5+1;local n=a5-1;local d=b6.chunks[b6.start+n]am["end"]=am["end"]+1;am.chunks:push(d)end;am.isNegative=b6.isNegative;local an=am;local a4=an;local a5=0;local a6=aT["end"]-aT.start;while a5<a6 do a5=a5+1;local aR=a5-1;local d=aT.chunks[aT.start+aR]local a5=aR;local a6=a4["end"]-a4.start;while a5<a6 do a5=a5+1;local n=a5-1;local ac=a4.chunks[a4.start+n]if ac>=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<a6 do a5=a5+1;local n=a5-1;local d=aP.chunks[aP.start+n]am["end"]=am["end"]+1;am.chunks:push(d)end;am.isNegative=aP.isNegative;local an=am;local a4=an;local a5=0;local a6=aT["end"]-aT.start;while a5<a6 do a5=a5+1;local aR=a5-1;local d=aT.chunks[aT.start+aR]local a5=aR;local a6=a4["end"]-a4.start;while a5<a6 do a5=a5+1;local n=a5-1;local ac=a4.chunks[a4.start+n]if ac>=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<a6 do a5=a5+1;local n=a5-1;local d=aT.chunks[aT.start+n]am["end"]=am["end"]+1;am.chunks:push(d)end;am.isNegative=aT.isNegative;local an=am;local a4=an;local a5=0;local a6=aP["end"]-aP.start;while a5<a6 do a5=a5+1;local aR=a5-1;local d=aP.chunks[aP.start+aR]local a5=aR;local a6=a4["end"]-a4.start;while a5<a6 do a5=a5+1;local n=a5-1;local ac=a4.chunks[a4.start+n]if ac>=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 a5<a6 do a5=a5+1;local n=a5-1;local d=aP.chunks[aP.start+n]am["end"]=am["end"]+1;am.chunks:push(d)end;am.isNegative=aP.isNegative;local an=am;local a4=an;local a5=0;local a6=aT["end"]-aT.start;while a5<a6 do a5=a5+1;local aR=a5-1;local d=aT.chunks[aT.start+aR]local ac;local a5=aR;local a6=a4["end"]-a4.start;while a5<a6 do a5=a5+1;local n=a5-1;ac=a4.chunks[a4.start+n]+d;if T.band(ac,32768)==0 then a4.chunks[a4.start+n]=ac;d=0;break end;a4.chunks[a4.start+n]=T.band(ac,32767)d=1 end;if d>0 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 a5<a6 do a5=a5+1;local n=a5-1;local d=aT.chunks[aT.start+n]am["end"]=am["end"]+1;am.chunks:push(d)end;am.isNegative=aT.isNegative;local an=am;local a4=an;local a5=0;local a6=aP["end"]-aP.start;while a5<a6 do a5=a5+1;local aR=a5-1;local d=aP.chunks[aP.start+aR]local ac;local a5=aR;local a6=a4["end"]-a4.start;while a5<a6 do a5=a5+1;local n=a5-1;ac=a4.chunks[a4.start+n]+d;if T.band(ac,32768)==0 then a4.chunks[a4.start+n]=ac;d=0;break end;a4.chunks[a4.start+n]=T.band(ac,32767)d=1 end;if d>0 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 a5<a6 do a5=a5+1;local n=a5-1;am["end"]=am["end"]+1;am.chunks:push(0)end end else local a5=0;local a6=ao;while a5<a6 do a5=a5+1;local n=a5-1;if n<aP["end"]-aP.start then local d=aP.chunks[aP.start+n]am["end"]=am["end"]+1;am.chunks:push(d)else if a4==nil then break end;am["end"]=am["end"]+1;am.chunks:push(0)end end;if aP["end"]-aP.start>ao 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 a5<a6 do a5=a5+1;local n=a5-1;local d=aP.chunks[aP.start+n]am["end"]=am["end"]+1;am.chunks:push(d)end;am.isNegative=aP.isNegative;local an=am;a4=an end else if aP==nil then local am=N.new()local a5=0;local a6=a4["end"]-a4.start;while a5<a6 do a5=a5+1;local n=a5-1;local d=a4.chunks[a4.start+n]am["end"]=am["end"]+1;am.chunks:push(d)end;am.isNegative=a4.isNegative;local an=am;a4=an else if a4.isNegative then if aP.isNegative then 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 a5<a6 do a5=a5+1;local n=a5-1;local d=a4.chunks[a4.start+n]am["end"]=am["end"]+1;am.chunks:push(d)end;am.isNegative=a4.isNegative;local aQ=am;local a4=aQ;local a5=0;local a6=aP["end"]-aP.start;while a5<a6 do a5=a5+1;local aR=a5-1;local d=aP.chunks[aP.start+aR]local ac;local a5=aR;local a6=a4["end"]-a4.start;while a5<a6 do a5=a5+1;local n=a5-1;ac=a4.chunks[a4.start+n]+d;if T.band(ac,32768)==0 then a4.chunks[a4.start+n]=ac;d=0;break end;a4.chunks[a4.start+n]=T.band(ac,32767)d=1 end;if d>0 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 a5<a6 do a5=a5+1;local n=a5-1;local d=aP.chunks[aP.start+n]am["end"]=am["end"]+1;am.chunks:push(d)end;am.isNegative=aP.isNegative;local aQ=am;local aU=aQ;local a5=0;local a6=a4["end"]-a4.start;while a5<a6 do a5=a5+1;local aR=a5-1;local d=a4.chunks[a4.start+aR]local ac;local a5=aR;local a6=aU["end"]-aU.start;while a5<a6 do a5=a5+1;local n=a5-1;ac=aU.chunks[aU.start+n]+d;if T.band(ac,32768)==0 then aU.chunks[aU.start+n]=ac;d=0;break end;aU.chunks[aU.start+n]=T.band(ac,32767)d=1 end;if d>0 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<a6 do a5=a5+1;local n=a5-1;local d=aP.chunks[aP.start+n]am["end"]=am["end"]+1;am.chunks:push(d)end;am.isNegative=aP.isNegative;local an=am;local aU=an;local a5=0;local a6=aT["end"]-aT.start;while a5<a6 do a5=a5+1;local aR=a5-1;local d=aT.chunks[aT.start+aR]local a5=aR;local a6=aU["end"]-aU.start;while a5<a6 do a5=a5+1;local n=a5-1;local ac=aU.chunks[aU.start+n]if ac>=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<a6 do a5=a5+1;local n=a5-1;local d=aT.chunks[aT.start+n]am["end"]=am["end"]+1;am.chunks:push(d)end;am.isNegative=aT.isNegative;local an=am;local aU=an;local a5=0;local a6=aP["end"]-aP.start;while a5<a6 do a5=a5+1;local aR=a5-1;local d=aP.chunks[aP.start+aR]local a5=aR;local a6=aU["end"]-aU.start;while a5<a6 do a5=a5+1;local n=a5-1;local ac=aU.chunks[aU.start+n]if ac>=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<a6 do a5=a5+1;local n=a5-1;local d=a4.chunks[a4.start+n]am["end"]=am["end"]+1;am.chunks:push(d)end;am.isNegative=a4.isNegative;local an=am;local aU=an;local a5=0;local a6=aP["end"]-aP.start;while a5<a6 do a5=a5+1;local aR=a5-1;local d=aP.chunks[aP.start+aR]local a5=aR;local a6=aU["end"]-aU.start;while a5<a6 do a5=a5+1;local n=a5-1;local ac=aU.chunks[aU.start+n]if ac>=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<a6 do a5=a5+1;local n=a5-1;local d=aP.chunks[aP.start+n]am["end"]=am["end"]+1;am.chunks:push(d)end;am.isNegative=aP.isNegative;local an=am;local aU=an;local a5=0;local a6=a4["end"]-a4.start;while a5<a6 do a5=a5+1;local aR=a5-1;local d=a4.chunks[a4.start+aR]local a5=aR;local a6=aU["end"]-aU.start;while a5<a6 do a5=a5+1;local n=a5-1;local ac=aU.chunks[aU.start+n]if ac>=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 a5<a6 do a5=a5+1;local n=a5-1;local d=a4.chunks[a4.start+n]am["end"]=am["end"]+1;am.chunks:push(d)end;am.isNegative=a4.isNegative;local an=am;local aU=an;local a5=0;local a6=aP["end"]-aP.start;while a5<a6 do a5=a5+1;local aR=a5-1;local d=aP.chunks[aP.start+aR]local ac;local a5=aR;local a6=aU["end"]-aU.start;while a5<a6 do a5=a5+1;local n=a5-1;ac=aU.chunks[aU.start+n]+d;if T.band(ac,32768)==0 then aU.chunks[aU.start+n]=ac;d=0;break end;aU.chunks[aU.start+n]=T.band(ac,32767)d=1 end;if d>0 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 a5<a6 do a5=a5+1;local n=a5-1;local d=aP.chunks[aP.start+n]am["end"]=am["end"]+1;am.chunks:push(d)end;am.isNegative=aP.isNegative;local an=am;local aU=an;local a5=0;local a6=a4["end"]-a4.start;while a5<a6 do a5=a5+1;local aR=a5-1;local d=a4.chunks[a4.start+aR]local ac;local a5=aR;local a6=aU["end"]-aU.start;while a5<a6 do a5=a5+1;local n=a5-1;ac=aU.chunks[aU.start+n]+d;if T.band(ac,32768)==0 then aU.chunks[aU.start+n]=ac;d=0;break end;aU.chunks[aU.start+n]=T.band(ac,32767)d=1 end;if d>0 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<a6 do a5=a5+1;local n=a5-1;local d=a4.chunks[a4.start+n]am["end"]=am["end"]+1;am.chunks:push(d)end end;do return am end end;___BigInt_BigInt_Impl_.join=function(ao,a4,aP,b7)local am=N.new()if b7==nil then local a5=0;local a6=ao;while a5<a6 do a5=a5+1;local n=a5-1;am["end"]=am["end"]+1;am.chunks:push(0)end else local a5=0;local a6=ao;while a5<a6 do a5=a5+1;local n=a5-1;if n<b7["end"]-b7.start then local d=b7.chunks[b7.start+n]am["end"]=am["end"]+1;am.chunks:push(d)else if aP==nil and a4==nil then break end;am["end"]=am["end"]+1;am.chunks:push(0)end end;if b7["end"]-b7.start>ao 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 a5<a6 do a5=a5+1;local n=a5-1;local d=aT.chunks[aT.start+n]am["end"]=am["end"]+1;am.chunks:push(d)end;am.isNegative=aT.isNegative;local an=am;aP=an end else if aT==nil then local am=N.new()local a5=0;local a6=aP["end"]-aP.start;while a5<a6 do a5=a5+1;local n=a5-1;local d=aP.chunks[aP.start+n]am["end"]=am["end"]+1;am.chunks:push(d)end;am.isNegative=aP.isNegative;local an=am;aP=an else if aP.isNegative then if aT.isNegative then local an;if aP["end"]-aP.start>aT["end"]-aT.start then local am=N.new()local a5=0;local a6=aP["end"]-aP.start;while a5<a6 do a5=a5+1;local n=a5-1;local d=aP.chunks[aP.start+n]am["end"]=am["end"]+1;am.chunks:push(d)end;am.isNegative=aP.isNegative;local aQ=am;local a4=aQ;local a5=0;local a6=aT["end"]-aT.start;while a5<a6 do a5=a5+1;local aR=a5-1;local d=aT.chunks[aT.start+aR]local ac;local a5=aR;local a6=a4["end"]-a4.start;while a5<a6 do a5=a5+1;local n=a5-1;ac=a4.chunks[a4.start+n]+d;if T.band(ac,32768)==0 then a4.chunks[a4.start+n]=ac;d=0;break end;a4.chunks[a4.start+n]=T.band(ac,32767)d=1 end;if d>0 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 a5<a6 do a5=a5+1;local n=a5-1;local d=aT.chunks[aT.start+n]am["end"]=am["end"]+1;am.chunks:push(d)end;am.isNegative=aT.isNegative;local aQ=am;local a4=aQ;local a5=0;local a6=aP["end"]-aP.start;while a5<a6 do a5=a5+1;local aR=a5-1;local d=aP.chunks[aP.start+aR]local ac;local a5=aR;local a6=a4["end"]-a4.start;while a5<a6 do a5=a5+1;local n=a5-1;ac=a4.chunks[a4.start+n]+d;if T.band(ac,32768)==0 then a4.chunks[a4.start+n]=ac;d=0;break end;a4.chunks[a4.start+n]=T.band(ac,32767)d=1 end;if d>0 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<a6 do a5=a5+1;local n=a5-1;local d=aT.chunks[aT.start+n]am["end"]=am["end"]+1;am.chunks:push(d)end;am.isNegative=aT.isNegative;local an=am;local a4=an;local a5=0;local a6=b6["end"]-b6.start;while a5<a6 do a5=a5+1;local aR=a5-1;local d=b6.chunks[b6.start+aR]local a5=aR;local a6=a4["end"]-a4.start;while a5<a6 do a5=a5+1;local n=a5-1;local ac=a4.chunks[a4.start+n]if ac>=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<a6 do a5=a5+1;local n=a5-1;local d=b6.chunks[b6.start+n]am["end"]=am["end"]+1;am.chunks:push(d)end;am.isNegative=b6.isNegative;local an=am;local a4=an;local a5=0;local a6=aT["end"]-aT.start;while a5<a6 do a5=a5+1;local aR=a5-1;local d=aT.chunks[aT.start+aR]local a5=aR;local a6=a4["end"]-a4.start;while a5<a6 do a5=a5+1;local n=a5-1;local ac=a4.chunks[a4.start+n]if ac>=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<a6 do a5=a5+1;local n=a5-1;local d=aP.chunks[aP.start+n]am["end"]=am["end"]+1;am.chunks:push(d)end;am.isNegative=aP.isNegative;local an=am;local a4=an;local a5=0;local a6=aT["end"]-aT.start;while a5<a6 do a5=a5+1;local aR=a5-1;local d=aT.chunks[aT.start+aR]local a5=aR;local a6=a4["end"]-a4.start;while a5<a6 do a5=a5+1;local n=a5-1;local ac=a4.chunks[a4.start+n]if ac>=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<a6 do a5=a5+1;local n=a5-1;local d=aT.chunks[aT.start+n]am["end"]=am["end"]+1;am.chunks:push(d)end;am.isNegative=aT.isNegative;local an=am;local a4=an;local a5=0;local a6=aP["end"]-aP.start;while a5<a6 do a5=a5+1;local aR=a5-1;local d=aP.chunks[aP.start+aR]local a5=aR;local a6=a4["end"]-a4.start;while a5<a6 do a5=a5+1;local n=a5-1;local ac=a4.chunks[a4.start+n]if ac>=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 a5<a6 do a5=a5+1;local n=a5-1;local d=aP.chunks[aP.start+n]am["end"]=am["end"]+1;am.chunks:push(d)end;am.isNegative=aP.isNegative;local an=am;local a4=an;local a5=0;local a6=aT["end"]-aT.start;while a5<a6 do a5=a5+1;local aR=a5-1;local d=aT.chunks[aT.start+aR]local ac;local a5=aR;local a6=a4["end"]-a4.start;while a5<a6 do a5=a5+1;local n=a5-1;ac=a4.chunks[a4.start+n]+d;if T.band(ac,32768)==0 then a4.chunks[a4.start+n]=ac;d=0;break end;a4.chunks[a4.start+n]=T.band(ac,32767)d=1 end;if d>0 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 a5<a6 do a5=a5+1;local n=a5-1;local d=aT.chunks[aT.start+n]am["end"]=am["end"]+1;am.chunks:push(d)end;am.isNegative=aT.isNegative;local an=am;local a4=an;local a5=0;local a6=aP["end"]-aP.start;while a5<a6 do a5=a5+1;local aR=a5-1;local d=aP.chunks[aP.start+aR]local ac;local a5=aR;local a6=a4["end"]-a4.start;while a5<a6 do a5=a5+1;local n=a5-1;ac=a4.chunks[a4.start+n]+d;if T.band(ac,32768)==0 then a4.chunks[a4.start+n]=ac;d=0;break end;a4.chunks[a4.start+n]=T.band(ac,32767)d=1 end;if d>0 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 a5<a6 do a5=a5+1;local n=a5-1;am["end"]=am["end"]+1;am.chunks:push(0)end end else local a5=0;local a6=ao;while a5<a6 do a5=a5+1;local n=a5-1;if n<aP["end"]-aP.start then local d=aP.chunks[aP.start+n]am["end"]=am["end"]+1;am.chunks:push(d)else if a4==nil then break end;am["end"]=am["end"]+1;am.chunks:push(0)end end;if aP["end"]-aP.start>ao 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 a5<a6 do a5=a5+1;local n=a5-1;local d=aP.chunks[aP.start+n]am["end"]=am["end"]+1;am.chunks:push(d)end;am.isNegative=aP.isNegative;local an=am;a4=an end else if aP==nil then local am=N.new()local a5=0;local a6=a4["end"]-a4.start;while a5<a6 do a5=a5+1;local n=a5-1;local d=a4.chunks[a4.start+n]am["end"]=am["end"]+1;am.chunks:push(d)end;am.isNegative=a4.isNegative;local an=am;a4=an else if a4.isNegative then if aP.isNegative then 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 a5<a6 do a5=a5+1;local n=a5-1;local d=a4.chunks[a4.start+n]am["end"]=am["end"]+1;am.chunks:push(d)end;am.isNegative=a4.isNegative;local aQ=am;local a4=aQ;local a5=0;local a6=aP["end"]-aP.start;while a5<a6 do a5=a5+1;local aR=a5-1;local d=aP.chunks[aP.start+aR]local ac;local a5=aR;local a6=a4["end"]-a4.start;while a5<a6 do a5=a5+1;local n=a5-1;ac=a4.chunks[a4.start+n]+d;if T.band(ac,32768)==0 then a4.chunks[a4.start+n]=ac;d=0;break end;a4.chunks[a4.start+n]=T.band(ac,32767)d=1 end;if d>0 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 a5<a6 do a5=a5+1;local n=a5-1;local d=aP.chunks[aP.start+n]am["end"]=am["end"]+1;am.chunks:push(d)end;am.isNegative=aP.isNegative;local aQ=am;local aU=aQ;local a5=0;local a6=a4["end"]-a4.start;while a5<a6 do a5=a5+1;local aR=a5-1;local d=a4.chunks[a4.start+aR]local ac;local a5=aR;local a6=aU["end"]-aU.start;while a5<a6 do a5=a5+1;local n=a5-1;ac=aU.chunks[aU.start+n]+d;if T.band(ac,32768)==0 then aU.chunks[aU.start+n]=ac;d=0;break end;aU.chunks[aU.start+n]=T.band(ac,32767)d=1 end;if d>0 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<a6 do a5=a5+1;local n=a5-1;local d=aP.chunks[aP.start+n]am["end"]=am["end"]+1;am.chunks:push(d)end;am.isNegative=aP.isNegative;local an=am;local aU=an;local a5=0;local a6=aT["end"]-aT.start;while a5<a6 do a5=a5+1;local aR=a5-1;local d=aT.chunks[aT.start+aR]local a5=aR;local a6=aU["end"]-aU.start;while a5<a6 do a5=a5+1;local n=a5-1;local ac=aU.chunks[aU.start+n]if ac>=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<a6 do a5=a5+1;local n=a5-1;local d=aT.chunks[aT.start+n]am["end"]=am["end"]+1;am.chunks:push(d)end;am.isNegative=aT.isNegative;local an=am;local aU=an;local a5=0;local a6=aP["end"]-aP.start;while a5<a6 do a5=a5+1;local aR=a5-1;local d=aP.chunks[aP.start+aR]local a5=aR;local a6=aU["end"]-aU.start;while a5<a6 do a5=a5+1;local n=a5-1;local ac=aU.chunks[aU.start+n]if ac>=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<a6 do a5=a5+1;local n=a5-1;local d=a4.chunks[a4.start+n]am["end"]=am["end"]+1;am.chunks:push(d)end;am.isNegative=a4.isNegative;local an=am;local aU=an;local a5=0;local a6=aP["end"]-aP.start;while a5<a6 do a5=a5+1;local aR=a5-1;local d=aP.chunks[aP.start+aR]local a5=aR;local a6=aU["end"]-aU.start;while a5<a6 do a5=a5+1;local n=a5-1;local ac=aU.chunks[aU.start+n]if ac>=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<a6 do a5=a5+1;local n=a5-1;local d=aP.chunks[aP.start+n]am["end"]=am["end"]+1;am.chunks:push(d)end;am.isNegative=aP.isNegative;local an=am;local aU=an;local a5=0;local a6=a4["end"]-a4.start;while a5<a6 do a5=a5+1;local aR=a5-1;local d=a4.chunks[a4.start+aR]local a5=aR;local a6=aU["end"]-aU.start;while a5<a6 do a5=a5+1;local n=a5-1;local ac=aU.chunks[aU.start+n]if ac>=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 a5<a6 do a5=a5+1;local n=a5-1;local d=a4.chunks[a4.start+n]am["end"]=am["end"]+1;am.chunks:push(d)end;am.isNegative=a4.isNegative;local an=am;local aU=an;local a5=0;local a6=aP["end"]-aP.start;while a5<a6 do a5=a5+1;local aR=a5-1;local d=aP.chunks[aP.start+aR]local ac;local a5=aR;local a6=aU["end"]-aU.start;while a5<a6 do a5=a5+1;local n=a5-1;ac=aU.chunks[aU.start+n]+d;if T.band(ac,32768)==0 then aU.chunks[aU.start+n]=ac;d=0;break end;aU.chunks[aU.start+n]=T.band(ac,32767)d=1 end;if d>0 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 a5<a6 do a5=a5+1;local n=a5-1;local d=aP.chunks[aP.start+n]am["end"]=am["end"]+1;am.chunks:push(d)end;am.isNegative=aP.isNegative;local an=am;local aU=an;local a5=0;local a6=a4["end"]-a4.start;while a5<a6 do a5=a5+1;local aR=a5-1;local d=a4.chunks[a4.start+aR]local ac;local a5=aR;local a6=aU["end"]-aU.start;while a5<a6 do a5=a5+1;local n=a5-1;ac=aU.chunks[aU.start+n]+d;if T.band(ac,32768)==0 then aU.chunks[aU.start+n]=ac;d=0;break end;aU.chunks[aU.start+n]=T.band(ac,32767)d=1 end;if d>0 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<a6 do a5=a5+1;local n=a5-1;local d=a4.chunks[a4.start+n]am["end"]=am["end"]+1;am.chunks:push(d)end end;do return am end end;___BigInt_BigInt_Impl_.opDiv=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<a6 do a5=a5+1;local n=a5-1;local d=an.chunks[an.start+n]am["end"]=am["end"]+1;am.chunks:push(d)end;am.isNegative=an.isNegative;local an=am;ad=A({__fields__={quotient=true,remainder=true},quotient=an,remainder=nil})else if ___BigInt_BigInt_Impl_.equal(an,aP)then ad=A({__fields__={quotient=true,remainder=true},quotient=___BigInt_BigInt_Impl_.fromInt(1),remainder=nil})else local w;if an.isNegative then if aP.isNegative then 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;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 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.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<a6 do a5=a5+1;local n=a5-1;local d=ba.chunks[ba.start+n]am["end"]=am["end"]+1;am.chunks:push(d)end;am.isNegative=ba.isNegative;local an=am;ad=A({__fields__={quotient=true,remainder=true},quotient=an,remainder=nil})else if ___BigInt_BigInt_Impl_.equal(ba,aP)then ad=A({__fields__={quotient=true,remainder=true},quotient=___BigInt_BigInt_Impl_.fromInt(1),remainder=nil})else local w;if ba.isNegative then if aP.isNegative then 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;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 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.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<a6 do a5=a5+1;local n=a5-1;local d=an.chunks[an.start+n]am["end"]=am["end"]+1;am.chunks:push(d)end;am.isNegative=an.isNegative;local an=am;ad=A({__fields__={quotient=true,remainder=true},quotient=an,remainder=nil})else if ___BigInt_BigInt_Impl_.equal(an,aP)then ad=A({__fields__={quotient=true,remainder=true},quotient=___BigInt_BigInt_Impl_.fromInt(1),remainder=nil})else local w;if an.isNegative then if aP.isNegative then 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;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 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.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<a6 do a5=a5+1;local n=a5-1;local d=ba.chunks[ba.start+n]am["end"]=am["end"]+1;am.chunks:push(d)end;am.isNegative=ba.isNegative;local an=am;ad=A({__fields__={quotient=true,remainder=true},quotient=an,remainder=nil})else if ___BigInt_BigInt_Impl_.equal(ba,aP)then ad=A({__fields__={quotient=true,remainder=true},quotient=___BigInt_BigInt_Impl_.fromInt(1),remainder=nil})else local w;if ba.isNegative then if aP.isNegative then 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;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 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.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<a6 do a5=a5+1;local n=a5-1;local d=ba.chunks[ba.start+n]am["end"]=am["end"]+1;am.chunks:push(d)end;am.isNegative=ba.isNegative;local an=am;do return A({__fields__={quotient=true,remainder=true},quotient=an,remainder=nil})end end;if ___BigInt_BigInt_Impl_.equal(ba,bb)then do return A({__fields__={quotient=true,remainder=true},quotient=___BigInt_BigInt_Impl_.fromInt(1),remainder=nil})end end;local w;if ba.isNegative then if bb.isNegative then 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;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 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.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<a6 do a5=a5+1;local n=a5-1;local d=a4.chunks[a4.start+n]am["end"]=am["end"]+1;am.chunks:push(d)end;am.isNegative=a4.isNegative;local an=am;do return an end end;if a4["end"]-a4.start<=2 then do return ___BigInt_BigInt_Impl_.fromInt(R.int(___BigInt_BigInt_Impl_.toInt(a4)/d))end end;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;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<a6 do a5=a5+1;local n=a5-1;local d=aU.chunks[aU.start+n]am["end"]=am["end"]+1;am.chunks:push(d)end;am.isNegative=aU.isNegative;local an=am;b8=an else if aU["end"]-aU.start<=2 then b8=___BigInt_BigInt_Impl_.fromInt(R.int(___BigInt_BigInt_Impl_.toInt(aU)/ac))else local n=aU["end"]-aU.start-1;local be=T.lshift(aU.chunks[aU.start+n],15)n=n-1;local be=T.bor(be,aU.chunks[aU.start+n])local bf=___BigInt_BigInt_Impl_.fromInt(R.int(be/ac))local b9=R.int(_G.math.fmod(be,ac))local b7;while true do n=n-1;be=T.bor(T.lshift(b9,15),aU.chunks[aU.start+n])b7=R.int(be/ac)if b7>=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<a6 do a5=a5+1;local n=a5-1;local d=a4.chunks[a4.start+n]am["end"]=am["end"]+1;am.chunks:push(d)end;am.isNegative=a4.isNegative;local an=am;bf=an else if a4["end"]-a4.start<=2 then bf=___BigInt_BigInt_Impl_.fromInt(R.int(___BigInt_BigInt_Impl_.toInt(a4)/ac))else local n=a4["end"]-a4.start-1;local be=T.lshift(a4.chunks[a4.start+n],15)n=n-1;local be=T.bor(be,a4.chunks[a4.start+n])local b8=___BigInt_BigInt_Impl_.fromInt(R.int(be/ac))local b9=R.int(_G.math.fmod(be,ac))local b7;while true do n=n-1;be=T.bor(T.lshift(b9,15),a4.chunks[a4.start+n])b7=R.int(be/ac)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(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<a6 do a5=a5+1;local n=a5-1;local ac=b8.chunks[b8.start+n]if ac>=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<a6 do a5=a5+1;local n=a5-1;local d=an.chunks[an.start+n]am["end"]=am["end"]+1;am.chunks:push(d)end;am.isNegative=an.isNegative;do return am end end;local bit;local ao;local bh;local l=___BigInt_BigInt_Impl_.fromInt(1)local ax=an;local a5=0;local a6=bg["end"]-bg.start;while a5<a6 do a5=a5+1;local n=a5-1;ao=bg.chunks[bg.start+n]bit=1;if n==bg["end"]-bg.start-1 then bh=T.lshift(1,M.bitsize(ao))else bh=32768 end;while bit<bh do if T.band(bit,ao)~=0 then l=___BigInt_BigInt_Impl_.opMulticplicate(l,ax)end;ax=___BigInt_BigInt_Impl_.opMulticplicate(ax,ax)bit=T.lshift(bit,1)end end;do return l end end;___BigInt_BigInt_Impl_.powMod=function(an,bg,bi)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 bi==nil then _G.error(__haxe_Exception.thrown("Error 'powMod', modulus can't be 0"),0)end;if ___BigInt_BigInt_Impl_.equal(bi,___BigInt_BigInt_Impl_.fromInt(1))then do return nil end 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 if bi==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(bi,___BigInt_BigInt_Impl_.fromInt(1))then local am=N.new()local a5=0;local a6=an["end"]-an.start;while a5<a6 do a5=a5+1;local n=a5-1;local d=an.chunks[an.start+n]am["end"]=am["end"]+1;am.chunks:push(d)end;am.isNegative=an.isNegative;local an=am;ad=A({__fields__={quotient=true,remainder=true},quotient=an,remainder=nil})else if ___BigInt_BigInt_Impl_.equal(an,bi)then ad=A({__fields__={quotient=true,remainder=true},quotient=___BigInt_BigInt_Impl_.fromInt(1),remainder=nil})else local w;if an.isNegative then if bi.isNegative then 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;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 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.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<a6 do a5=a5+1;local n=a5-1;local d=an.chunks[an.start+n]am["end"]=am["end"]+1;am.chunks:push(d)end;am.isNegative=an.isNegative;local an=am;ax=A({__fields__={quotient=true,remainder=true},quotient=an,remainder=nil})else if ___BigInt_BigInt_Impl_.equal(an,bi)then ax=A({__fields__={quotient=true,remainder=true},quotient=___BigInt_BigInt_Impl_.fromInt(1),remainder=nil})else local w;if an.isNegative then if bi.isNegative then 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;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 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.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<a6 do a5=a5+1;local n=a5-1;ao=bg.chunks[bg.start+n]bit=1;if n==bg["end"]-bg.start-1 then bh=T.lshift(1,M.bitsize(ao))else bh=32768 end;while bit<bh do if T.band(bit,ao)~=0 then local ba=___BigInt_BigInt_Impl_.opMulticplicate(l,ax)if bi==nil then _G.error(__haxe_Exception.thrown("Error '/', divisor can't be 0"),0)end;local bj;if ba==nil then bj=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<a6 do a5=a5+1;local n=a5-1;local d=ba.chunks[ba.start+n]am["end"]=am["end"]+1;am.chunks:push(d)end;am.isNegative=ba.isNegative;local an=am;bj=A({__fields__={quotient=true,remainder=true},quotient=an,remainder=nil})else if ___BigInt_BigInt_Impl_.equal(ba,bi)then bj=A({__fields__={quotient=true,remainder=true},quotient=___BigInt_BigInt_Impl_.fromInt(1),remainder=nil})else local w;if ba.isNegative then if bi.isNegative then 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;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 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.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<a6 do a5=a5+1;local n=a5-1;local d=ba.chunks[ba.start+n]am["end"]=am["end"]+1;am.chunks:push(d)end;am.isNegative=ba.isNegative;local an=am;bk=A({__fields__={quotient=true,remainder=true},quotient=an,remainder=nil})else if ___BigInt_BigInt_Impl_.equal(ba,bi)then bk=A({__fields__={quotient=true,remainder=true},quotient=___BigInt_BigInt_Impl_.fromInt(1),remainder=nil})else local w;if ba.isNegative then if bi.isNegative then 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;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 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.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.start<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 false end else do return true end end 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_.intGreater=function(a4,aP)do return ___BigInt_BigInt_Impl_.lesser(aP,___BigInt_BigInt_Impl_.fromInt(a4))end end;___BigInt_BigInt_Impl_.greaterOrEqual=function(an,aP)if an==nil then if aP==nil then do return true 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.start<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 false end else do return true end end 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_.intGreaterOrEqual=function(a4,aP)do return ___BigInt_BigInt_Impl_.lesserOrEqual(aP,___BigInt_BigInt_Impl_.fromInt(a4))end end;___BigInt_BigInt_Impl_.lesser=function(an,aP)if an==nil then if aP==nil then do return false 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.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.start>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 false end else do return true end end 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.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.start>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 false end else do return true end end 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 a5<a6 do a5=a5+1;local n=a5-1;d=T.bor(T.lshift(an.chunks[an.start+n],1),(function()local aB;if T.band(d,32768)>0 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<a6 do a5=a5+1;local n=a5-1;local d=an.chunks[an.start+n]am["end"]=am["end"]+1;am.chunks:push(d)end;am.isNegative=not an.isNegative;w=am;local d=1;local a5=0;local a6=w["end"]-w.start;while a5<a6 do a5=a5+1;local n=a5-1;local ac=w.chunks[w.start+n]if ac>=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 a5<a6 do a5=a5+1;local n=a5-1;local d=an.chunks[an.start+n]am["end"]=am["end"]+1;am.chunks:push(d)end;am.isNegative=an.isNegative;w=am;local d=1;local ac;local a5=0;local a6=w["end"]-w.start;while a5<a6 do a5=a5+1;local n=a5-1;ac=w.chunks[w.start+n]+d;if T.band(ac,32768)==0 then w.chunks[w.start+n]=ac;d=0;break end;w.chunks[w.start+n]=T.band(ac,32767)d=1 end;if d>0 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<a6 do a5=a5+1;local n=a5-1;local d=an.chunks[an.start+n]am["end"]=am["end"]+1;am.chunks:push(d)end;am.isNegative=an.isNegative;do return am end end;if an.isNegative then _G.error(__haxe_Exception.thrown("ERROR '>>>', 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 a5<a6 do a5=a5+1;local n=a5-1;local d=an.chunks[an.start+n]l["end"]=l["end"]+1;l.chunks:push(d)end else local d;local bm=0;local n=an["end"]-an.start;while true do n=n-1;if not(n+1>ah)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 a5<a6 do a5=a5+1;local n=a5-1;local d=an.chunks[an.start+n]am["end"]=am["end"]+1;am.chunks:push(d)end;am.isNegative=an.isNegative;do return am end end;if an.isNegative then if aP<0 then do return ___BigInt_BigInt_Impl_.fromInt(-1)end end;if an["end"]-an.start==1 and an.chunks[an.start]==1 then do return ___BigInt_BigInt_Impl_.fromInt(-1)end end;local an=___BigInt_BigInt_Impl_.opNOT(an)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 a5<a6 do a5=a5+1;local n=a5-1;local d=an.chunks[an.start+n]l["end"]=l["end"]+1;l.chunks:push(d)end else local d;local bm=0;local n=an["end"]-an.start;while true do n=n-1;if not(n+1>ah)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 a5<a6 do a5=a5+1;local n=a5-1;local d=an.chunks[an.start+n]l["end"]=l["end"]+1;l.chunks:push(d)end else local d;local bm=0;local n=an["end"]-an.start;while true do n=n-1;if not(n+1>ah)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 a5<a6 do a5=a5+1;local n=a5-1;local d=an.chunks[an.start+n]l["end"]=l["end"]+1;l.chunks:push(d)end else local d;local bm=0;local n=an["end"]-an.start;while true do n=n-1;if not(n+1>ah)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 a5<a6 do a5=a5+1;local n=a5-1;local d=an.chunks[an.start+n]am["end"]=am["end"]+1;am.chunks:push(d)end;am.isNegative=an.isNegative;do return am end end;if aP<0 then _G.error(__haxe_Exception.thrown("ERROR '<<', can't negative-shift-left a negative value"),0)end;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 a5<a6 do a5=a5+1;local n=a5-1;l["end"]=l["end"]+1;l.chunks:push(0)end;if b9==0 then local a5=0;local a6=an["end"]-an.start;while a5<a6 do a5=a5+1;local n=a5-1;local d=an.chunks[an.start+n]l["end"]=l["end"]+1;l.chunks:push(d)end else local d;local bm=0;local a5=0;local a6=an["end"]-an.start;while a5<a6 do a5=a5+1;local n=a5-1;d=an.chunks[an.start+n]l["end"]=l["end"]+1;l.chunks:push(T.bor(T.band(T.lshift(d,b9),32767),bm))bm=T.rshift(d,15-b9)end;if bm>0 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 a5<a6 do a5=a5+1;local n=a5-1;l["end"]=l["end"]+1;l.chunks:push(0)end;if b9==0 then local a5=0;local a6=an["end"]-an.start;while a5<a6 do a5=a5+1;local n=a5-1;local d=an.chunks[an.start+n]l["end"]=l["end"]+1;l.chunks:push(d)end else local d;local bm=0;local a5=0;local a6=an["end"]-an.start;while a5<a6 do a5=a5+1;local n=a5-1;d=an.chunks[an.start+n]l["end"]=l["end"]+1;l.chunks:push(T.bor(T.band(T.lshift(d,b9),32767),bm))bm=T.rshift(d,15-b9)end;if bm>0 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.start<aP["end"]-aP.start then aB=an["end"]-an.start else aB=aP["end"]-aP.start end;return aB end)()while true do n=n-1;if not(n+1>0)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.start<aP["end"]-aP.start then aB=an["end"]-an.start else aB=aP["end"]-aP.start end;return aB end)()while true do n=n-1;if not(n+1>0)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.start<aP["end"]-aP.start then aB=an["end"]-an.start else aB=aP["end"]-aP.start end;return aB end)()local a5=0;local a6=ah;while a5<a6 do a5=a5+1;local n=a5-1;local d=T.bor(an.chunks[an.start+n],aP.chunks[aP.start+n])l["end"]=l["end"]+1;l.chunks:push(d)end;if an["end"]-an.start<aP["end"]-aP.start then local a5=ah;local a6=aP["end"]-aP.start;while a5<a6 do a5=a5+1;local n=a5-1;local d=aP.chunks[aP.start+n]l["end"]=l["end"]+1;l.chunks:push(d)end else if an["end"]-an.start>aP["end"]-aP.start then local a5=ah;local a6=an["end"]-an.start;while a5<a6 do a5=a5+1;local n=a5-1;local d=an.chunks[an.start+n]l["end"]=l["end"]+1;l.chunks:push(d)end end end;do return l end end;___BigInt_BigInt_Impl_._opOR=function(an,aP)local aQ=N.new()local l=aQ;local ah=(function()local aB;if an["end"]-an.start<aP["end"]-aP.start then aB=an["end"]-an.start else aB=aP["end"]-aP.start end;return aB end)()local a5=0;local a6=ah;while a5<a6 do a5=a5+1;local n=a5-1;local d=T.bor(an.chunks[an.start+n],aP.chunks[aP.start+n])l["end"]=l["end"]+1;l.chunks:push(d)end;if an["end"]-an.start<aP["end"]-aP.start then local a5=ah;local a6=aP["end"]-aP.start;while a5<a6 do a5=a5+1;local n=a5-1;local d=aP.chunks[aP.start+n]l["end"]=l["end"]+1;l.chunks:push(d)end else if an["end"]-an.start>aP["end"]-aP.start then local a5=ah;local a6=an["end"]-an.start;while a5<a6 do a5=a5+1;local n=a5-1;local d=an.chunks[an.start+n]l["end"]=l["end"]+1;l.chunks:push(d)end end end;do return l end end;___BigInt_BigInt_Impl_.opOrInt=function(a4,aP)do return ___BigInt_BigInt_Impl_.opOR(aP,___BigInt_BigInt_Impl_.fromInt(a4))end end;___BigInt_BigInt_Impl_.opXOR=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.start<aP["end"]-aP.start then aB=an["end"]-an.start else aB=aP["end"]-aP.start end;return aB end)()local a5=0;local a6=ah;while a5<a6 do a5=a5+1;local n=a5-1;local d=T.bxor(an.chunks[an.start+n],aP.chunks[aP.start+n])l["end"]=l["end"]+1;l.chunks:push(d)end;if an["end"]-an.start<aP["end"]-aP.start then local a5=ah;local a6=aP["end"]-aP.start;while a5<a6 do a5=a5+1;local n=a5-1;local d=aP.chunks[aP.start+n]l["end"]=l["end"]+1;l.chunks:push(d)end else if an["end"]-an.start>aP["end"]-aP.start then local a5=ah;local a6=an["end"]-an.start;while a5<a6 do a5=a5+1;local n=a5-1;local d=an.chunks[an.start+n]l["end"]=l["end"]+1;l.chunks:push(d)end end end;do return l end end;___BigInt_BigInt_Impl_._opXOR=function(an,aP)local aQ=N.new()local l=aQ;local ah=(function()local aB;if an["end"]-an.start<aP["end"]-aP.start then aB=an["end"]-an.start else aB=aP["end"]-aP.start end;return aB end)()local a5=0;local a6=ah;while a5<a6 do a5=a5+1;local n=a5-1;local d=T.bxor(an.chunks[an.start+n],aP.chunks[aP.start+n])l["end"]=l["end"]+1;l.chunks:push(d)end;if an["end"]-an.start<aP["end"]-aP.start then local a5=ah;local a6=aP["end"]-aP.start;while a5<a6 do a5=a5+1;local n=a5-1;local d=aP.chunks[aP.start+n]l["end"]=l["end"]+1;l.chunks:push(d)end else if an["end"]-an.start>aP["end"]-aP.start then local a5=ah;local a6=an["end"]-an.start;while a5<a6 do a5=a5+1;local n=a5-1;local d=an.chunks[an.start+n]l["end"]=l["end"]+1;l.chunks:push(d)end end end;do return l end end;___BigInt_BigInt_Impl_.opXORInt=function(a4,aP)do return ___BigInt_BigInt_Impl_.opXOR(aP,___BigInt_BigInt_Impl_.fromInt(a4))end end;L.new=function(b9,bn)local self=B(L.prototype)L.super(self,b9,bn)return self end;L.super=function(self,b9,bn)local bo=0;local a5=0;local a6=__lua_lib_luautf8_Utf8.len(bn)while a5<a6 do a5=a5+1;local n=a5-1;local a5=__lua_lib_luautf8_Utf8.sub(bn,n+1,n+1)if a5=="g"then self.global=true elseif a5=="i"then bo=T.bor(bo,L.FLAGS.CASELESS)elseif a5=="m"then bo=T.bor(bo,L.FLAGS.MULTILINE)elseif a5=="s"then bo=T.bor(bo,L.FLAGS.DOTALL)else end end;bo=T.bor(bo,L.FLAGS.UTF8)bo=T.bor(bo,L.FLAGS.UCP)if self.global==nil then self.global=false end;self.r=__lua_lib_lrexlib_Rex.new(b9,bo)end;L.__name__=true;L.prototype=z()L.prototype.match=function(self,as)if as==nil then do return false end else self.m=a0.pack(self.r:exec(as,1))self.s=as;do return self.m[1]~=nil end end end;L.prototype.replace=function(self,as,bp)local idx=1;local w=_hx_tab_array({},0)while idx~=nil do local bq=0;if __lua_lib_luautf8_Utf8.len("$$")>0 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 a6<aW.length do local aA=aW[a6]a6=a6+1;a5:push(__lua_lib_lrexlib_Rex.gsub(aA,"\\$(\\d)","%%%1",1))end;aW=a5;bp=aW:join("$")do return __lua_lib_lrexlib_Rex.gsub(as,self.r,bp,(function()local aB;if self.global then aB=nil else aB=1 end;return aB end)())end end;L.prototype.__class__=L;M.new={}M.__name__=true;M.nextPowerOfTwo=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 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 a5<a6 do a5=a5+1;local n=a5-1;local d=aP.chunks[aP.start+n]am["end"]=am["end"]+1;am.chunks:push(d)end;am.isNegative=aP.isNegative;local an=am;aT=an else if d<0 then d=-d end;local ac=0;local an=N.new()local b6=an;local a5=0;local a6=aP["end"]-aP.start;while a5<a6 do a5=a5+1;local n=a5-1;ac=aP.chunks[aP.start+n]*d+ac;b6["end"]=b6["end"]+1;b6.chunks:push(T.band(ac,32767))ac=T.rshift(ac,15)end;if ac>0 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 a5<a6 do a5=a5+1;local n=a5-1;local d=aT.chunks[aT.start+n]am["end"]=am["end"]+1;am.chunks:push(d)end;am.isNegative=aT.isNegative;local an=am;bG=an end else if aT==nil then local am=N.new()local a5=0;local a6=bG["end"]-bG.start;while a5<a6 do a5=a5+1;local n=a5-1;local d=bG.chunks[bG.start+n]am["end"]=am["end"]+1;am.chunks:push(d)end;am.isNegative=bG.isNegative;local an=am;bG=an else if bG.isNegative then if aT.isNegative then local an;if bG["end"]-bG.start>aT["end"]-aT.start then local am=N.new()local a5=0;local a6=bG["end"]-bG.start;while a5<a6 do a5=a5+1;local n=a5-1;local d=bG.chunks[bG.start+n]am["end"]=am["end"]+1;am.chunks:push(d)end;am.isNegative=bG.isNegative;local aQ=am;local a4=aQ;local a5=0;local a6=aT["end"]-aT.start;while a5<a6 do a5=a5+1;local aR=a5-1;local d=aT.chunks[aT.start+aR]local ac;local a5=aR;local a6=a4["end"]-a4.start;while a5<a6 do a5=a5+1;local n=a5-1;ac=a4.chunks[a4.start+n]+d;if T.band(ac,32768)==0 then a4.chunks[a4.start+n]=ac;d=0;break end;a4.chunks[a4.start+n]=T.band(ac,32767)d=1 end;if d>0 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 a5<a6 do a5=a5+1;local n=a5-1;local d=aT.chunks[aT.start+n]am["end"]=am["end"]+1;am.chunks:push(d)end;am.isNegative=aT.isNegative;local aQ=am;local a4=aQ;local a5=0;local a6=bG["end"]-bG.start;while a5<a6 do a5=a5+1;local aR=a5-1;local d=bG.chunks[bG.start+aR]local ac;local a5=aR;local a6=a4["end"]-a4.start;while a5<a6 do a5=a5+1;local n=a5-1;ac=a4.chunks[a4.start+n]+d;if T.band(ac,32768)==0 then a4.chunks[a4.start+n]=ac;d=0;break end;a4.chunks[a4.start+n]=T.band(ac,32767)d=1 end;if d>0 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<a6 do a5=a5+1;local n=a5-1;local d=aT.chunks[aT.start+n]am["end"]=am["end"]+1;am.chunks:push(d)end;am.isNegative=aT.isNegative;local an=am;local a4=an;local a5=0;local a6=aP["end"]-aP.start;while a5<a6 do a5=a5+1;local aR=a5-1;local d=aP.chunks[aP.start+aR]local a5=aR;local a6=a4["end"]-a4.start;while a5<a6 do a5=a5+1;local n=a5-1;local ac=a4.chunks[a4.start+n]if ac>=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<a6 do a5=a5+1;local n=a5-1;local d=aP.chunks[aP.start+n]am["end"]=am["end"]+1;am.chunks:push(d)end;am.isNegative=aP.isNegative;local an=am;local a4=an;local a5=0;local a6=aT["end"]-aT.start;while a5<a6 do a5=a5+1;local aR=a5-1;local d=aT.chunks[aT.start+aR]local a5=aR;local a6=a4["end"]-a4.start;while a5<a6 do a5=a5+1;local n=a5-1;local ac=a4.chunks[a4.start+n]if ac>=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<a6 do a5=a5+1;local n=a5-1;local d=bG.chunks[bG.start+n]am["end"]=am["end"]+1;am.chunks:push(d)end;am.isNegative=bG.isNegative;local an=am;local a4=an;local a5=0;local a6=aP["end"]-aP.start;while a5<a6 do a5=a5+1;local aR=a5-1;local d=aP.chunks[aP.start+aR]local a5=aR;local a6=a4["end"]-a4.start;while a5<a6 do a5=a5+1;local n=a5-1;local ac=a4.chunks[a4.start+n]if ac>=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<a6 do a5=a5+1;local n=a5-1;local d=aP.chunks[aP.start+n]am["end"]=am["end"]+1;am.chunks:push(d)end;am.isNegative=aP.isNegative;local an=am;local a4=an;local a5=0;local a6=bG["end"]-bG.start;while a5<a6 do a5=a5+1;local aR=a5-1;local d=bG.chunks[bG.start+aR]local a5=aR;local a6=a4["end"]-a4.start;while a5<a6 do a5=a5+1;local n=a5-1;local ac=a4.chunks[a4.start+n]if ac>=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 a5<a6 do a5=a5+1;local n=a5-1;local d=bG.chunks[bG.start+n]am["end"]=am["end"]+1;am.chunks:push(d)end;am.isNegative=bG.isNegative;local an=am;local a4=an;local a5=0;local a6=aT["end"]-aT.start;while a5<a6 do a5=a5+1;local aR=a5-1;local d=aT.chunks[aT.start+aR]local ac;local a5=aR;local a6=a4["end"]-a4.start;while a5<a6 do a5=a5+1;local n=a5-1;ac=a4.chunks[a4.start+n]+d;if T.band(ac,32768)==0 then a4.chunks[a4.start+n]=ac;d=0;break end;a4.chunks[a4.start+n]=T.band(ac,32767)d=1 end;if d>0 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 a5<a6 do a5=a5+1;local n=a5-1;local d=aT.chunks[aT.start+n]am["end"]=am["end"]+1;am.chunks:push(d)end;am.isNegative=aT.isNegative;local an=am;local a4=an;local a5=0;local a6=bG["end"]-bG.start;while a5<a6 do a5=a5+1;local aR=a5-1;local d=bG.chunks[bG.start+aR]local ac;local a5=aR;local a6=a4["end"]-a4.start;while a5<a6 do a5=a5+1;local n=a5-1;ac=a4.chunks[a4.start+n]+d;if T.band(ac,32768)==0 then a4.chunks[a4.start+n]=ac;d=0;break end;a4.chunks[a4.start+n]=T.band(ac,32767)d=1 end;if d>0 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 a5<a6 do a5=a5+1;local n=a5-1;local d=aP.chunks[aP.start+n]am["end"]=am["end"]+1;am.chunks:push(d)end;am.isNegative=aP.isNegative;local an=am;aT=an else if d<0 then d=-d end;local ac=0;local an=N.new()local b6=an;local a5=0;local a6=aP["end"]-aP.start;while a5<a6 do a5=a5+1;local n=a5-1;ac=aP.chunks[aP.start+n]*d+ac;b6["end"]=b6["end"]+1;b6.chunks:push(T.band(ac,32767))ac=T.rshift(ac,15)end;if ac>0 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 a5<a6 do a5=a5+1;local n=a5-1;local d=aT.chunks[aT.start+n]am["end"]=am["end"]+1;am.chunks:push(d)end;am.isNegative=aT.isNegative;local an=am;bG=an end else if aT==nil then local am=N.new()local a5=0;local a6=bG["end"]-bG.start;while a5<a6 do a5=a5+1;local n=a5-1;local d=bG.chunks[bG.start+n]am["end"]=am["end"]+1;am.chunks:push(d)end;am.isNegative=bG.isNegative;local an=am;bG=an else if bG.isNegative then if aT.isNegative then local an;if bG["end"]-bG.start>aT["end"]-aT.start then local am=N.new()local a5=0;local a6=bG["end"]-bG.start;while a5<a6 do a5=a5+1;local n=a5-1;local d=bG.chunks[bG.start+n]am["end"]=am["end"]+1;am.chunks:push(d)end;am.isNegative=bG.isNegative;local aQ=am;local a4=aQ;local a5=0;local a6=aT["end"]-aT.start;while a5<a6 do a5=a5+1;local aR=a5-1;local d=aT.chunks[aT.start+aR]local ac;local a5=aR;local a6=a4["end"]-a4.start;while a5<a6 do a5=a5+1;local n=a5-1;ac=a4.chunks[a4.start+n]+d;if T.band(ac,32768)==0 then a4.chunks[a4.start+n]=ac;d=0;break end;a4.chunks[a4.start+n]=T.band(ac,32767)d=1 end;if d>0 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 a5<a6 do a5=a5+1;local n=a5-1;local d=aT.chunks[aT.start+n]am["end"]=am["end"]+1;am.chunks:push(d)end;am.isNegative=aT.isNegative;local aQ=am;local a4=aQ;local a5=0;local a6=bG["end"]-bG.start;while a5<a6 do a5=a5+1;local aR=a5-1;local d=bG.chunks[bG.start+aR]local ac;local a5=aR;local a6=a4["end"]-a4.start;while a5<a6 do a5=a5+1;local n=a5-1;ac=a4.chunks[a4.start+n]+d;if T.band(ac,32768)==0 then a4.chunks[a4.start+n]=ac;d=0;break end;a4.chunks[a4.start+n]=T.band(ac,32767)d=1 end;if d>0 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<a6 do a5=a5+1;local n=a5-1;local d=aT.chunks[aT.start+n]am["end"]=am["end"]+1;am.chunks:push(d)end;am.isNegative=aT.isNegative;local an=am;local a4=an;local a5=0;local a6=aP["end"]-aP.start;while a5<a6 do a5=a5+1;local aR=a5-1;local d=aP.chunks[aP.start+aR]local a5=aR;local a6=a4["end"]-a4.start;while a5<a6 do a5=a5+1;local n=a5-1;local ac=a4.chunks[a4.start+n]if ac>=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<a6 do a5=a5+1;local n=a5-1;local d=aP.chunks[aP.start+n]am["end"]=am["end"]+1;am.chunks:push(d)end;am.isNegative=aP.isNegative;local an=am;local a4=an;local a5=0;local a6=aT["end"]-aT.start;while a5<a6 do a5=a5+1;local aR=a5-1;local d=aT.chunks[aT.start+aR]local a5=aR;local a6=a4["end"]-a4.start;while a5<a6 do a5=a5+1;local n=a5-1;local ac=a4.chunks[a4.start+n]if ac>=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<a6 do a5=a5+1;local n=a5-1;local d=bG.chunks[bG.start+n]am["end"]=am["end"]+1;am.chunks:push(d)end;am.isNegative=bG.isNegative;local an=am;local a4=an;local a5=0;local a6=aP["end"]-aP.start;while a5<a6 do a5=a5+1;local aR=a5-1;local d=aP.chunks[aP.start+aR]local a5=aR;local a6=a4["end"]-a4.start;while a5<a6 do a5=a5+1;local n=a5-1;local ac=a4.chunks[a4.start+n]if ac>=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<a6 do a5=a5+1;local n=a5-1;local d=aP.chunks[aP.start+n]am["end"]=am["end"]+1;am.chunks:push(d)end;am.isNegative=aP.isNegative;local an=am;local a4=an;local a5=0;local a6=bG["end"]-bG.start;while a5<a6 do a5=a5+1;local aR=a5-1;local d=bG.chunks[bG.start+aR]local a5=aR;local a6=a4["end"]-a4.start;while a5<a6 do a5=a5+1;local n=a5-1;local ac=a4.chunks[a4.start+n]if ac>=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 a5<a6 do a5=a5+1;local n=a5-1;local d=bG.chunks[bG.start+n]am["end"]=am["end"]+1;am.chunks:push(d)end;am.isNegative=bG.isNegative;local an=am;local a4=an;local a5=0;local a6=aT["end"]-aT.start;while a5<a6 do a5=a5+1;local aR=a5-1;local d=aT.chunks[aT.start+aR]local ac;local a5=aR;local a6=a4["end"]-a4.start;while a5<a6 do a5=a5+1;local n=a5-1;ac=a4.chunks[a4.start+n]+d;if T.band(ac,32768)==0 then a4.chunks[a4.start+n]=ac;d=0;break end;a4.chunks[a4.start+n]=T.band(ac,32767)d=1 end;if d>0 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 a5<a6 do a5=a5+1;local n=a5-1;local d=aT.chunks[aT.start+n]am["end"]=am["end"]+1;am.chunks:push(d)end;am.isNegative=aT.isNegative;local an=am;local a4=an;local a5=0;local a6=bG["end"]-bG.start;while a5<a6 do a5=a5+1;local aR=a5-1;local d=bG.chunks[bG.start+aR]local ac;local a5=aR;local a6=a4["end"]-a4.start;while a5<a6 do a5=a5+1;local n=a5-1;ac=a4.chunks[a4.start+n]+d;if T.band(ac,32768)==0 then a4.chunks[a4.start+n]=ac;d=0;break end;a4.chunks[a4.start+n]=T.band(ac,32767)d=1 end;if d>0 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 a5<a6 do a5=a5+1;local n=a5-1;local d=aP.chunks[aP.start+n]am["end"]=am["end"]+1;am.chunks:push(d)end;am.isNegative=aP.isNegative;local an=am;aT=an else if d<0 then d=-d end;local ac=0;local an=N.new()local b6=an;local a5=0;local a6=aP["end"]-aP.start;while a5<a6 do a5=a5+1;local n=a5-1;ac=aP.chunks[aP.start+n]*d+ac;b6["end"]=b6["end"]+1;b6.chunks:push(T.band(ac,32767))ac=T.rshift(ac,15)end;if ac>0 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 a5<a6 do a5=a5+1;local n=a5-1;local d=aT.chunks[aT.start+n]am["end"]=am["end"]+1;am.chunks:push(d)end;am.isNegative=aT.isNegative;local an=am;bG=an end else if aT==nil then local am=N.new()local a5=0;local a6=bG["end"]-bG.start;while a5<a6 do a5=a5+1;local n=a5-1;local d=bG.chunks[bG.start+n]am["end"]=am["end"]+1;am.chunks:push(d)end;am.isNegative=bG.isNegative;local an=am;bG=an else if bG.isNegative then if aT.isNegative then local an;if bG["end"]-bG.start>aT["end"]-aT.start then local am=N.new()local a5=0;local a6=bG["end"]-bG.start;while a5<a6 do a5=a5+1;local n=a5-1;local d=bG.chunks[bG.start+n]am["end"]=am["end"]+1;am.chunks:push(d)end;am.isNegative=bG.isNegative;local aQ=am;local a4=aQ;local a5=0;local a6=aT["end"]-aT.start;while a5<a6 do a5=a5+1;local aR=a5-1;local d=aT.chunks[aT.start+aR]local ac;local a5=aR;local a6=a4["end"]-a4.start;while a5<a6 do a5=a5+1;local n=a5-1;ac=a4.chunks[a4.start+n]+d;if T.band(ac,32768)==0 then a4.chunks[a4.start+n]=ac;d=0;break end;a4.chunks[a4.start+n]=T.band(ac,32767)d=1 end;if d>0 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 a5<a6 do a5=a5+1;local n=a5-1;local d=aT.chunks[aT.start+n]am["end"]=am["end"]+1;am.chunks:push(d)end;am.isNegative=aT.isNegative;local aQ=am;local a4=aQ;local a5=0;local a6=bG["end"]-bG.start;while a5<a6 do a5=a5+1;local aR=a5-1;local d=bG.chunks[bG.start+aR]local ac;local a5=aR;local a6=a4["end"]-a4.start;while a5<a6 do a5=a5+1;local n=a5-1;ac=a4.chunks[a4.start+n]+d;if T.band(ac,32768)==0 then a4.chunks[a4.start+n]=ac;d=0;break end;a4.chunks[a4.start+n]=T.band(ac,32767)d=1 end;if d>0 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<a6 do a5=a5+1;local n=a5-1;local d=aT.chunks[aT.start+n]am["end"]=am["end"]+1;am.chunks:push(d)end;am.isNegative=aT.isNegative;local an=am;local a4=an;local a5=0;local a6=aP["end"]-aP.start;while a5<a6 do a5=a5+1;local aR=a5-1;local d=aP.chunks[aP.start+aR]local a5=aR;local a6=a4["end"]-a4.start;while a5<a6 do a5=a5+1;local n=a5-1;local ac=a4.chunks[a4.start+n]if ac>=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<a6 do a5=a5+1;local n=a5-1;local d=aP.chunks[aP.start+n]am["end"]=am["end"]+1;am.chunks:push(d)end;am.isNegative=aP.isNegative;local an=am;local a4=an;local a5=0;local a6=aT["end"]-aT.start;while a5<a6 do a5=a5+1;local aR=a5-1;local d=aT.chunks[aT.start+aR]local a5=aR;local a6=a4["end"]-a4.start;while a5<a6 do a5=a5+1;local n=a5-1;local ac=a4.chunks[a4.start+n]if ac>=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<a6 do a5=a5+1;local n=a5-1;local d=bG.chunks[bG.start+n]am["end"]=am["end"]+1;am.chunks:push(d)end;am.isNegative=bG.isNegative;local an=am;local a4=an;local a5=0;local a6=aP["end"]-aP.start;while a5<a6 do a5=a5+1;local aR=a5-1;local d=aP.chunks[aP.start+aR]local a5=aR;local a6=a4["end"]-a4.start;while a5<a6 do a5=a5+1;local n=a5-1;local ac=a4.chunks[a4.start+n]if ac>=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<a6 do a5=a5+1;local n=a5-1;local d=aP.chunks[aP.start+n]am["end"]=am["end"]+1;am.chunks:push(d)end;am.isNegative=aP.isNegative;local an=am;local a4=an;local a5=0;local a6=bG["end"]-bG.start;while a5<a6 do a5=a5+1;local aR=a5-1;local d=bG.chunks[bG.start+aR]local a5=aR;local a6=a4["end"]-a4.start;while a5<a6 do a5=a5+1;local n=a5-1;local ac=a4.chunks[a4.start+n]if ac>=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 a5<a6 do a5=a5+1;local n=a5-1;local d=bG.chunks[bG.start+n]am["end"]=am["end"]+1;am.chunks:push(d)end;am.isNegative=bG.isNegative;local an=am;local a4=an;local a5=0;local a6=aT["end"]-aT.start;while a5<a6 do a5=a5+1;local aR=a5-1;local d=aT.chunks[aT.start+aR]local ac;local a5=aR;local a6=a4["end"]-a4.start;while a5<a6 do a5=a5+1;local n=a5-1;ac=a4.chunks[a4.start+n]+d;if T.band(ac,32768)==0 then a4.chunks[a4.start+n]=ac;d=0;break end;a4.chunks[a4.start+n]=T.band(ac,32767)d=1 end;if d>0 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 a5<a6 do a5=a5+1;local n=a5-1;local d=aT.chunks[aT.start+n]am["end"]=am["end"]+1;am.chunks:push(d)end;am.isNegative=aT.isNegative;local an=am;local a4=an;local a5=0;local a6=bG["end"]-bG.start;while a5<a6 do a5=a5+1;local aR=a5-1;local d=bG.chunks[bG.start+aR]local ac;local a5=aR;local a6=a4["end"]-a4.start;while a5<a6 do a5=a5+1;local n=a5-1;ac=a4.chunks[a4.start+n]+d;if T.band(ac,32768)==0 then a4.chunks[a4.start+n]=ac;d=0;break end;a4.chunks[a4.start+n]=T.band(ac,32767)d=1 end;if d>0 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 a6<a7 do a6=a6+1;local n=a6-1;a5:push("0")end;do return a5:join("")end end;N.fromBaseString=function(as,ax,bF)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 a5<a6 do a5=a5+1;local n=a5-1;local d=aP.chunks[aP.start+n]am["end"]=am["end"]+1;am.chunks:push(d)end;am.isNegative=aP.isNegative;local an=am;aT=an else if d<0 then d=-d end;local ac=0;local an=N.new()local b6=an;local a5=0;local a6=aP["end"]-aP.start;while a5<a6 do a5=a5+1;local n=a5-1;ac=aP.chunks[aP.start+n]*d+ac;b6["end"]=b6["end"]+1;b6.chunks:push(T.band(ac,32767))ac=T.rshift(ac,15)end;if ac>0 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 a5<a6 do a5=a5+1;local n=a5-1;local d=aT.chunks[aT.start+n]am["end"]=am["end"]+1;am.chunks:push(d)end;am.isNegative=aT.isNegative;local an=am;bG=an end else if aT==nil then local am=N.new()local a5=0;local a6=bG["end"]-bG.start;while a5<a6 do a5=a5+1;local n=a5-1;local d=bG.chunks[bG.start+n]am["end"]=am["end"]+1;am.chunks:push(d)end;am.isNegative=bG.isNegative;local an=am;bG=an else if bG.isNegative then if aT.isNegative then local an;if bG["end"]-bG.start>aT["end"]-aT.start then local am=N.new()local a5=0;local a6=bG["end"]-bG.start;while a5<a6 do a5=a5+1;local n=a5-1;local d=bG.chunks[bG.start+n]am["end"]=am["end"]+1;am.chunks:push(d)end;am.isNegative=bG.isNegative;local aQ=am;local a4=aQ;local a5=0;local a6=aT["end"]-aT.start;while a5<a6 do a5=a5+1;local aR=a5-1;local d=aT.chunks[aT.start+aR]local ac;local a5=aR;local a6=a4["end"]-a4.start;while a5<a6 do a5=a5+1;local n=a5-1;ac=a4.chunks[a4.start+n]+d;if T.band(ac,32768)==0 then a4.chunks[a4.start+n]=ac;d=0;break end;a4.chunks[a4.start+n]=T.band(ac,32767)d=1 end;if d>0 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 a5<a6 do a5=a5+1;local n=a5-1;local d=aT.chunks[aT.start+n]am["end"]=am["end"]+1;am.chunks:push(d)end;am.isNegative=aT.isNegative;local aQ=am;local a4=aQ;local a5=0;local a6=bG["end"]-bG.start;while a5<a6 do a5=a5+1;local aR=a5-1;local d=bG.chunks[bG.start+aR]local ac;local a5=aR;local a6=a4["end"]-a4.start;while a5<a6 do a5=a5+1;local n=a5-1;ac=a4.chunks[a4.start+n]+d;if T.band(ac,32768)==0 then a4.chunks[a4.start+n]=ac;d=0;break end;a4.chunks[a4.start+n]=T.band(ac,32767)d=1 end;if d>0 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<a6 do a5=a5+1;local n=a5-1;local d=aT.chunks[aT.start+n]am["end"]=am["end"]+1;am.chunks:push(d)end;am.isNegative=aT.isNegative;local an=am;local a4=an;local a5=0;local a6=aP["end"]-aP.start;while a5<a6 do a5=a5+1;local aR=a5-1;local d=aP.chunks[aP.start+aR]local a5=aR;local a6=a4["end"]-a4.start;while a5<a6 do a5=a5+1;local n=a5-1;local ac=a4.chunks[a4.start+n]if ac>=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<a6 do a5=a5+1;local n=a5-1;local d=aP.chunks[aP.start+n]am["end"]=am["end"]+1;am.chunks:push(d)end;am.isNegative=aP.isNegative;local an=am;local a4=an;local a5=0;local a6=aT["end"]-aT.start;while a5<a6 do a5=a5+1;local aR=a5-1;local d=aT.chunks[aT.start+aR]local a5=aR;local a6=a4["end"]-a4.start;while a5<a6 do a5=a5+1;local n=a5-1;local ac=a4.chunks[a4.start+n]if ac>=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<a6 do a5=a5+1;local n=a5-1;local d=bG.chunks[bG.start+n]am["end"]=am["end"]+1;am.chunks:push(d)end;am.isNegative=bG.isNegative;local an=am;local a4=an;local a5=0;local a6=aP["end"]-aP.start;while a5<a6 do a5=a5+1;local aR=a5-1;local d=aP.chunks[aP.start+aR]local a5=aR;local a6=a4["end"]-a4.start;while a5<a6 do a5=a5+1;local n=a5-1;local ac=a4.chunks[a4.start+n]if ac>=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<a6 do a5=a5+1;local n=a5-1;local d=aP.chunks[aP.start+n]am["end"]=am["end"]+1;am.chunks:push(d)end;am.isNegative=aP.isNegative;local an=am;local a4=an;local a5=0;local a6=bG["end"]-bG.start;while a5<a6 do a5=a5+1;local aR=a5-1;local d=bG.chunks[bG.start+aR]local a5=aR;local a6=a4["end"]-a4.start;while a5<a6 do a5=a5+1;local n=a5-1;local ac=a4.chunks[a4.start+n]if ac>=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 a5<a6 do a5=a5+1;local n=a5-1;local d=bG.chunks[bG.start+n]am["end"]=am["end"]+1;am.chunks:push(d)end;am.isNegative=bG.isNegative;local an=am;local a4=an;local a5=0;local a6=aT["end"]-aT.start;while a5<a6 do a5=a5+1;local aR=a5-1;local d=aT.chunks[aT.start+aR]local ac;local a5=aR;local a6=a4["end"]-a4.start;while a5<a6 do a5=a5+1;local n=a5-1;ac=a4.chunks[a4.start+n]+d;if T.band(ac,32768)==0 then a4.chunks[a4.start+n]=ac;d=0;break end;a4.chunks[a4.start+n]=T.band(ac,32767)d=1 end;if d>0 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 a5<a6 do a5=a5+1;local n=a5-1;local d=aT.chunks[aT.start+n]am["end"]=am["end"]+1;am.chunks:push(d)end;am.isNegative=aT.isNegative;local an=am;local a4=an;local a5=0;local a6=bG["end"]-bG.start;while a5<a6 do a5=a5+1;local aR=a5-1;local d=bG.chunks[bG.start+aR]local ac;local a5=aR;local a6=a4["end"]-a4.start;while a5<a6 do a5=a5+1;local n=a5-1;ac=a4.chunks[a4.start+n]+d;if T.band(ac,32768)==0 then a4.chunks[a4.start+n]=ac;d=0;break end;a4.chunks[a4.start+n]=T.band(ac,32767)d=1 end;if d>0 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<a6 do a5=a5+1;local n=a5-1;local d=0;local aH=0;local a5=0;local aI=n*15;local aJ=R.int(aI/8)local af=R.int((aI+15)/8)local aK=aI-aJ*8;local aL=8-aK;local aM=aI+15-af*8;local aN;local aO;local w=K.new()local a6=aJ;local a7=af+1;while a6<a7 do a6=a6+1;local n=a6-1;if n==ah then break end;if n==aJ and n==af then aN=aK;aO=aM-aN else if n==aJ then aN=aK;aO=aL else if n==af then aO=aM;aN=0 else aO=8;aN=0 end end end;w:push(A({__fields__={index=true,offset=true,size=true},index=n,offset=aN,size=aO}))end;local a6=w;while a5<a6.length do local a4=a6[a5]a5=a5+1;d=T.bor(d,T.lshift(T.band(T.rshift(aP.b[a4.index],a4.offset),T.lshift(1,a4.size)-1),aH))aH=aH+a4.size end;am["end"]=am["end"]+1;am.chunks:push(d)end;local an=am;do return an end end;N.mapFromBitPosition=function(aI,bJ,bK,h)local aJ=R.int(aI/bJ)local af=R.int((aI+bK)/bJ)local aK=aI-aJ*bJ;local aL=bJ-aK;local aM=aI+bK-af*bJ;local aN;local aO;local w=K.new()local a5=aJ;local a6=af+1;while a5<a6 do a5=a5+1;local n=a5-1;if n==h then break end;if n==aJ and n==af then aN=aK;aO=aM-aN else if n==aJ then aN=aK;aO=aL else if n==af then aO=aM;aN=0 else aO=bJ;aN=0 end end end;w:push(A({__fields__={index=true,offset=true,size=true},index=n,offset=aN,size=aO}))end;do return w end end;N.prototype=z()N.prototype.get_length=function(self)do return self["end"]-self.start end end;N.prototype.copy=function(self)local am=N.new()local a5=0;local a6=self["end"]-self.start;while a5<a6 do a5=a5+1;local n=a5-1;local d=self.chunks[self.start+n]am["end"]=am["end"]+1;am.chunks:push(d)end;am.isNegative=self.isNegative;do return am end end;N.prototype.negCopy=function(self)local am=N.new()local a5=0;local a6=self["end"]-self.start;while a5<a6 do a5=a5+1;local n=a5-1;local d=self.chunks[self.start+n]am["end"]=am["end"]+1;am.chunks:push(d)end;am.isNegative=not self.isNegative;do return am end end;N.prototype.clone=function(self)local am=N.new(self.chunks)am.start=self.start;am["end"]=self["end"]am.isNegative=self.isNegative;do return am end end;N.prototype.negClone=function(self)local am=N.new(self.chunks)am.start=self.start;am["end"]=self["end"]am.isNegative=not self.isNegative;do return am end end;N.prototype.splitHigh=function(self,ao)local am=N.new(self.chunks)if ao>=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<ao and self.chunks[self.start+n]==0 do n=n+1 end;if n==ao then do return nil end else local am=N.new(self.chunks)am.start=self.start;am["end"]=self.start+ao;do return am end end end;N.prototype.get=function(self,n)do return self.chunks[self.start+n]end end;N.prototype.set=function(self,n,d)self.chunks[self.start+n]=d end;N.prototype.push=function(self,d)self["end"]=self["end"]+1;self.chunks:push(d)end;N.prototype.pop=function(self)self["end"]=self["end"]-1;do return self.chunks:pop()end end;N.prototype.unshift=function(self,d)self["end"]=self["end"]+1;self.chunks:unshift(d)end;N.prototype.truncateZeroChunks=function(self,ap)local n=self["end"]-self.start;while true do n=n-1;if not(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 a5<a6 do a5=a5+1;local n=a5-1;ad=self.chunks[self.start+n]if T.arshift(T.lshift(ad,n*15),n*15)~=ad then _G.error(__haxe_Exception.thrown(R.string(R.string("Error, BigInt with ")..R.string(15*(self["end"]-self.start-1)+M.bitsize(ad)))..R.string(" bits is to big for native Integer length")),0)end;ar=ar+T.lshift(ad,n*15)end;if self.isNegative then do return-ar end else do return ar end end end end;N.prototype.toBaseString=function(self,ax,ay,az)if az==nil then az=false end;if ay==nil then ay=0 end;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 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<a6 do a5=a5+1;local n=a5-1;local d=a4.chunks[a4.start+n]am["end"]=am["end"]+1;am.chunks:push(d)end;am.isNegative=a4.isNegative;local an=am;w=A({__fields__={quotient=true,remainder=true},quotient=an,remainder=nil})else if ___BigInt_BigInt_Impl_.equal(a4,bb)then w=A({__fields__={quotient=true,remainder=true},quotient=___BigInt_BigInt_Impl_.fromInt(1),remainder=nil})else local bL;if a4.isNegative then if bb.isNegative then 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;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.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 a6<a7 do a6=a6+1;local n=a6-1;a5:push("0")end;as=R.string(a5:join(""))..R.string(as)end;as=L.new("^(0+\\s)+",""):replace(as,"")end;do return R.string((function()local aC;if self.isNegative then aC="-"else aC=""end;return aC end)())..R.string(as)end end;N.prototype.toBinaryString=function(self,ay,az)if az==nil then az=true end;if ay==nil then ay=0 end;local as=""local aA;local bit;local aj=0;local a5=0;local a6=self["end"]-self.start;while a5<a6 do a5=a5+1;local n=a5-1;aA=self.chunks[self.start+n]bit=1;while bit<32768 do if ay>0 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<a7 do a6=a6+1;local n=a6-1;a5:push("0")end;as=R.string(a5:join(""))..R.string(as)end;as=L.new("^(0+\\s)+",""):replace(as,"")else as=N.regexLeadingZeros:replace(as,"")end;do return R.string((function()local aD;if self.isNegative then aD="-"else aD=""end;return aD end)())..R.string(as)end end;N.prototype.toHexString=function(self,ay,az)if az==nil then az=true end;if ay==nil then ay=0 end;local as=""local aA=0;local bm=0;local aj=0;local a5=0;local a6=self["end"]-self.start;while a5<a6 do a5=a5+1;local n=a5-1;aA=T.lshift(self.chunks[self.start+n],bm)+aA;while 15+bm>=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<a7 do a6=a6+1;local n=a6-1;a5:push("0")end;as=R.string(a5:join(""))..R.string(as)end;as=L.new("^(0+\\s)+",""):replace(as,"")else as=N.regexLeadingZeros:replace(as,"")end;do return R.string((function()local aD;if self.isNegative then aD="-"else aD=""end;return aD end)())..R.string(as)end end;N.prototype.toBytes=function(self)local aF=(self["end"]-self.start-1)*15+M.bitsize(self.chunks[self.start+self["end"]-self.start-1])local aG=R.int((aF-1)/8)+1;local aP;if self.isNegative then aP=__haxe_io_Bytes.alloc(aG+1)aP.b[aG]=0 else aP=__haxe_io_Bytes.alloc(aG)end;local a5=0;local a6=aG;while a5<a6 do a5=a5+1;local n=a5-1;local d=0;local aH=0;local a5=0;local aI=n*8;local h=self["end"]-self.start;local aJ=R.int(aI/15)local af=R.int((aI+8)/15)local aK=aI-aJ*15;local aL=15-aK;local aM=aI+8-af*15;local aN;local aO;local w=K.new()local a6=aJ;local a7=af+1;while a6<a7 do a6=a6+1;local n=a6-1;if n==h then break end;if n==aJ and n==af then aN=aK;aO=aM-aN else if n==aJ then aN=aK;aO=aL else if n==af then aO=aM;aN=0 else aO=15;aN=0 end end end;w:push(A({__fields__={index=true,offset=true,size=true},index=n,offset=aN,size=aO}))end;local a6=w;while a5<a6.length do local a4=a6[a5]a5=a5+1;d=T.bor(d,T.lshift(T.band(T.rshift(self.chunks[self.start+a4.index],a4.offset),T.lshift(1,a4.size)-1),aH))aH=aH+a4.size end;aP.b[n]=T.band(d,255)end;do return aP end end;N.prototype.__class__=N;O.new={}_hx_exports["Main"]=O;O.__name__=true;O.inmod=function()if not O.shouldRun then do return end end;O.kobold.halt_generation()end;O.outmod=function()if not O.shouldRun then do return end end;while true do local ac=___BigInt_BigInt_Impl_.opDiv(O.i,O.v)if ___BigInt_BigInt_Impl_.equal(ac,___BigInt_BigInt_Impl_.opDiv(___BigInt_BigInt_Impl_.opAdd(O.i,O.t),O.v))then __haxe_Log.trace((function()local aB;if ac==nil then aB="null"else aB=_hx_wrap_if_string_field(___BigInt_BigInt_Impl_,'toString')(ac)end;return aB end)(),A({__fields__={fileName=true,lineNumber=true,className=true,methodName=true},fileName="Main.hx",lineNumber=50,className="Main",methodName="outmod"}))O.kobold.outputs[1]=_hx_wrap_if_string_field(___BigInt_BigInt_Impl_,'toString')(ac)O.t=___BigInt_BigInt_Impl_.opMulticplicate(O.t,___BigInt_BigInt_Impl_.fromInt(10))O.i=___BigInt_BigInt_Impl_.opSubtract(O.i,___BigInt_BigInt_Impl_.opMulticplicate(ac,O.v))O.i=___BigInt_BigInt_Impl_.opMulticplicate(O.i,___BigInt_BigInt_Impl_.fromInt(10))break else O.v=___BigInt_BigInt_Impl_.opMulticplicate(O.v,___BigInt_BigInt_Impl_.opMulticplicate(O.s,O.a))O.i=___BigInt_BigInt_Impl_.opMulticplicate(O.i,O.s)O.s=___BigInt_BigInt_Impl_.opAdd(O.s,___BigInt_BigInt_Impl_.fromInt(8))O.i=___BigInt_BigInt_Impl_.opAdd(O.i,___BigInt_BigInt_Impl_.opMulticplicate(O.e,O.t))O.e=___BigInt_BigInt_Impl_.opAdd(O.e,___BigInt_BigInt_Impl_.fromInt(4))O.i=___BigInt_BigInt_Impl_.opMulticplicate(O.i,O.a)O.a=___BigInt_BigInt_Impl_.opAdd(O.a,___BigInt_BigInt_Impl_.fromInt(4))O.t=___BigInt_BigInt_Impl_.opMulticplicate(O.t,___BigInt_BigInt_Impl_.opMulticplicate(O.f,O.l))O.l=___BigInt_BigInt_Impl_.opAdd(O.l,___BigInt_BigInt_Impl_.fromInt(2))O.f=___BigInt_BigInt_Impl_.opSubtract(O.f,___BigInt_BigInt_Impl_.fromInt(4))end end;O.kobold.restart_generation(1)end;O.main=function()local ag=O.kobold.get_config_file()ag:seek("set")if ag:read(1)==nil then ag:write(O.exampleConfig)end;ag:seek("set")local a4=ag:read("a")ag:close()local l=Z(a0.pack(_G.load(a4)),{"func","message"})__haxe_Log.trace(l,A({__fields__={fileName=true,lineNumber=true,className=true,methodName=true},fileName="Main.hx",lineNumber=83,className="Main",methodName="main"}))if l.message~=nil then _G.error(__haxe_exceptions_PosException.new(l.message,nil,A({__fields__={fileName=true,lineNumber=true,className=true,methodName=true},fileName="Main.hx",lineNumber=84,className="Main",methodName="main"})),0)end;local a5=l:func()O.shouldRun=(function()local aB;if a5==nil then aB=false elseif a5==false then aB=false else aB=true end;return aB end)()end;P.new={}P.__name__=true;P.isNaN=function(ag)do return ag~=ag end end;P.isFinite=function(ag)if ag>-_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 bT<bO then do return __lua_lib_luautf8_Utf8.sub(self,bT+1,bO)end else do return __lua_lib_luautf8_Utf8.sub(self,bO+1,bT)end end end;Q.prototype.charAt=function(self,bH)do return __lua_lib_luautf8_Utf8.sub(self,bH+1,bH+1)end end;Q.prototype.charCodeAt=function(self,bH)do return __lua_lib_luautf8_Utf8.byte(self,bH+1)end end;Q.prototype.substr=function(self,ae,e)if e==nil or e>ae+__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 a5<a6.length do local d=a6[a5]a5=a5+1;m=R.string(m)..R.string(R.string(", ")..R.string(R.string(d)))end end;do return R.string(R.string(bY)..R.string(": "))..R.string(m)end end;__haxe_Log.trace=function(d,bX)local m=__haxe_Log.formatOutput(d,bX)X(m)end;__haxe_NativeStackTrace.new={}__haxe_NativeStackTrace.__name__=true;__haxe_NativeStackTrace.saveStack=function(bZ)end;__haxe_NativeStackTrace.callStack=function()local a5=debug.traceback()if a5==nil then do return _hx_tab_array({},0)end else local as=a5;local idx=1;local w=_hx_tab_array({},0)while idx~=nil do local bq=0;if __lua_lib_luautf8_Utf8.len("\n")>0 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<a6 do a5=a5+1;local n=a5-1;a4:push(0)end;do return __haxe_io_Bytes.new(h,a4)end end;__haxe_io_Bytes.prototype=z()__haxe_io_Bytes.prototype.__class__=__haxe_io_Bytes;__haxe_iterators_ArrayIterator.new=function(b_)local self=B(__haxe_iterators_ArrayIterator.prototype)__haxe_iterators_ArrayIterator.super(self,b_)return self end;__haxe_iterators_ArrayIterator.super=function(self,b_)self.current=0;self.array=b_ end;__haxe_iterators_ArrayIterator.__name__=true;__haxe_iterators_ArrayIterator.prototype=z()__haxe_iterators_ArrayIterator.prototype.hasNext=function(self)do return self.current<self.array.length end end;__haxe_iterators_ArrayIterator.prototype.next=function(self)do return self.array[(function()local c0=self;local c1='current'local c2=c0[c1]c0[c1]=c0[c1]+1;return c2 end)()]end end;__haxe_iterators_ArrayIterator.prototype.__class__=__haxe_iterators_ArrayIterator;__haxe_iterators_ArrayKeyValueIterator.new=function(b_)local self=B(__haxe_iterators_ArrayKeyValueIterator.prototype)__haxe_iterators_ArrayKeyValueIterator.super(self,b_)return self end;__haxe_iterators_ArrayKeyValueIterator.super=function(self,b_)self.array=b_ end;__haxe_iterators_ArrayKeyValueIterator.__name__=true;__haxe_iterators_ArrayKeyValueIterator.prototype=z()__haxe_iterators_ArrayKeyValueIterator.prototype.__class__=__haxe_iterators_ArrayKeyValueIterator;__lua_Boot.new={}__lua_Boot.__name__=true;__lua_Boot.__instanceof=function(f,c3)if c3==nil then do return false end end;local c4=c3;if c4==K then do return __lua_Boot.isArray(f)end elseif c4==H then do return _G.type(f)=="boolean"end elseif c4==F then do return f~=nil end elseif c4==G then do return _G.type(f)=="number"end elseif c4==E then if _G.type(f)=="number"then do return _(f)==f end else do return false end end elseif c4==Q then do return _G.type(f)=="string"end elseif c4==_G.table then do return _G.type(f)=="table"end elseif c4==__lua_Thread then do return _G.type(f)=="thread"end elseif c4==__lua_UserData then do return _G.type(f)=="userdata"end else if f~=nil and _G.type(f)=="table"and _G.type(c3)=="table"then local ad;if __lua_Boot.__instanceof(f,K)then ad=K else if __lua_Boot.__instanceof(f,Q)then ad=Q else local c3=f.__class__;ad=(function()local aB;if c3~=nil then aB=c3 else aB=nil end;return aB end)()end end;if __lua_Boot.extendsOrImplements(ad,c3)then do return true end end;if(function()local aC;if c3==I then aC=f.__name__~=nil else aC=false end;return aC end)()then do return true end end;if(function()local aD;if c3==J then aD=f.__ename__~=nil else aD=false end;return aD end)()then do return true end end;do return f.__enum__==c3 end else do return false end end end end;__lua_Boot.isArray=function(f)if _G.type(f)=="table"then if f.__enum__==nil and _G.getmetatable(f)~=nil then do return _G.getmetatable(f).__index==K.prototype end else do return false end end else do return false end end end;__lua_Boot.extendsOrImplements=function(c4,c5)if c4==nil or c5==nil then do return false end else if c4==c5 then do return true end else if c4.__interfaces__~=nil then local c6=c4.__interfaces__;local a5=1;local a6=a0.maxn(c6)+1;while a5<a6 do a5=a5+1;local n=a5-1;if __lua_Boot.extendsOrImplements(c6[n],c5)then do return true end end end end end end;do return __lua_Boot.extendsOrImplements(c4.__super__,c5)end end;__lua_UserData.new={}__lua_UserData.__name__=true;__lua_Thread.new={}__lua_Thread.__name__=true;pcall(require,'bit')if bit then a1=bit;T=setmetatable({},{__index=a1})else a1={arshift=function(ac,bv)local c7=ac>>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,rshift=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