missile-v20221120.js 325 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919920921922923924925926927928929930931932933934935936937938939940941942943944945946947948949950951952953954955956957958959960961962963964965966967968969970971972973974975976977978979980981982983984985986987988989990991992993994995996997998999100010011002100310041005100610071008100910101011101210131014101510161017101810191020102110221023102410251026102710281029103010311032103310341035103610371038103910401041104210431044104510461047104810491050105110521053105410551056105710581059106010611062106310641065106610671068106910701071107210731074107510761077107810791080108110821083108410851086108710881089109010911092109310941095109610971098109911001101110211031104110511061107110811091110111111121113111411151116111711181119112011211122112311241125112611271128112911301131113211331134113511361137113811391140114111421143114411451146114711481149115011511152115311541155115611571158115911601161116211631164116511661167116811691170117111721173117411751176117711781179118011811182118311841185118611871188118911901191119211931194119511961197119811991200120112021203120412051206120712081209121012111212121312141215121612171218121912201221122212231224122512261227122812291230123112321233123412351236123712381239124012411242124312441245124612471248124912501251125212531254125512561257125812591260126112621263126412651266126712681269127012711272127312741275127612771278127912801281128212831284128512861287128812891290129112921293129412951296129712981299130013011302130313041305130613071308130913101311131213131314131513161317131813191320132113221323132413251326132713281329133013311332133313341335133613371338133913401341134213431344134513461347134813491350135113521353135413551356135713581359136013611362136313641365136613671368136913701371137213731374137513761377137813791380138113821383138413851386138713881389139013911392139313941395139613971398139914001401140214031404140514061407140814091410141114121413141414151416141714181419142014211422142314241425142614271428142914301431143214331434143514361437143814391440144114421443144414451446144714481449145014511452145314541455145614571458145914601461146214631464146514661467146814691470147114721473147414751476147714781479148014811482148314841485148614871488148914901491149214931494149514961497149814991500150115021503150415051506150715081509151015111512151315141515151615171518151915201521152215231524152515261527152815291530153115321533153415351536153715381539154015411542154315441545154615471548154915501551155215531554155515561557155815591560156115621563156415651566156715681569157015711572157315741575157615771578157915801581158215831584158515861587158815891590159115921593159415951596159715981599160016011602160316041605160616071608160916101611161216131614161516161617161816191620162116221623162416251626162716281629163016311632163316341635163616371638163916401641164216431644164516461647164816491650165116521653165416551656165716581659166016611662166316641665166616671668166916701671167216731674167516761677167816791680168116821683168416851686168716881689169016911692169316941695169616971698169917001701170217031704170517061707170817091710171117121713171417151716171717181719172017211722172317241725172617271728172917301731173217331734173517361737173817391740174117421743174417451746174717481749175017511752175317541755175617571758175917601761176217631764176517661767176817691770177117721773177417751776177717781779178017811782178317841785178617871788178917901791179217931794179517961797179817991800180118021803180418051806180718081809181018111812181318141815181618171818181918201821182218231824182518261827182818291830183118321833183418351836183718381839184018411842184318441845184618471848184918501851185218531854185518561857185818591860186118621863186418651866186718681869187018711872187318741875187618771878187918801881188218831884188518861887188818891890189118921893189418951896189718981899190019011902190319041905190619071908190919101911191219131914191519161917191819191920192119221923192419251926192719281929193019311932193319341935193619371938193919401941194219431944194519461947194819491950195119521953195419551956195719581959196019611962196319641965196619671968196919701971197219731974197519761977197819791980198119821983198419851986198719881989199019911992199319941995199619971998199920002001200220032004200520062007200820092010201120122013201420152016201720182019202020212022202320242025202620272028202920302031203220332034203520362037203820392040204120422043204420452046204720482049205020512052205320542055205620572058205920602061206220632064206520662067206820692070207120722073207420752076207720782079208020812082208320842085208620872088208920902091209220932094209520962097209820992100210121022103210421052106210721082109211021112112211321142115211621172118211921202121212221232124212521262127212821292130213121322133213421352136213721382139214021412142214321442145214621472148214921502151215221532154215521562157215821592160216121622163216421652166216721682169217021712172217321742175217621772178217921802181218221832184218521862187218821892190219121922193219421952196219721982199220022012202220322042205220622072208220922102211221222132214221522162217221822192220222122222223222422252226222722282229223022312232223322342235223622372238223922402241224222432244224522462247224822492250225122522253225422552256225722582259226022612262226322642265226622672268226922702271227222732274227522762277227822792280228122822283228422852286228722882289229022912292229322942295229622972298229923002301230223032304230523062307230823092310231123122313231423152316231723182319232023212322232323242325232623272328232923302331233223332334233523362337233823392340234123422343234423452346234723482349235023512352235323542355235623572358235923602361236223632364236523662367236823692370237123722373237423752376237723782379238023812382238323842385238623872388238923902391239223932394239523962397239823992400240124022403240424052406240724082409241024112412241324142415241624172418241924202421242224232424242524262427242824292430243124322433243424352436243724382439244024412442244324442445244624472448244924502451245224532454245524562457245824592460246124622463246424652466246724682469247024712472247324742475247624772478247924802481248224832484248524862487248824892490249124922493249424952496249724982499250025012502250325042505250625072508250925102511251225132514251525162517251825192520252125222523252425252526252725282529253025312532253325342535253625372538253925402541254225432544254525462547254825492550255125522553255425552556255725582559256025612562256325642565256625672568256925702571257225732574257525762577257825792580258125822583258425852586258725882589259025912592259325942595259625972598259926002601260226032604260526062607260826092610261126122613261426152616261726182619262026212622262326242625262626272628262926302631263226332634263526362637263826392640264126422643264426452646264726482649265026512652265326542655265626572658265926602661266226632664266526662667266826692670267126722673267426752676267726782679268026812682268326842685268626872688268926902691269226932694269526962697269826992700270127022703270427052706270727082709271027112712271327142715271627172718271927202721272227232724272527262727272827292730273127322733273427352736273727382739274027412742274327442745274627472748274927502751275227532754275527562757275827592760276127622763276427652766276727682769277027712772277327742775277627772778277927802781278227832784278527862787278827892790279127922793279427952796279727982799280028012802280328042805280628072808280928102811281228132814281528162817281828192820282128222823282428252826282728282829283028312832283328342835283628372838283928402841284228432844284528462847284828492850285128522853285428552856285728582859286028612862286328642865286628672868286928702871287228732874287528762877287828792880288128822883288428852886288728882889289028912892289328942895289628972898289929002901290229032904290529062907290829092910291129122913291429152916291729182919292029212922292329242925292629272928292929302931293229332934293529362937293829392940294129422943294429452946294729482949295029512952295329542955295629572958295929602961296229632964296529662967296829692970297129722973297429752976297729782979298029812982298329842985298629872988298929902991299229932994299529962997299829993000300130023003300430053006300730083009301030113012301330143015301630173018301930203021302230233024302530263027302830293030303130323033303430353036303730383039304030413042304330443045304630473048304930503051305230533054305530563057305830593060306130623063306430653066306730683069307030713072307330743075307630773078307930803081308230833084308530863087308830893090309130923093309430953096309730983099310031013102310331043105310631073108310931103111311231133114311531163117311831193120312131223123312431253126312731283129313031313132313331343135313631373138313931403141314231433144314531463147314831493150315131523153315431553156315731583159316031613162316331643165316631673168316931703171317231733174317531763177317831793180318131823183318431853186318731883189319031913192319331943195319631973198319932003201320232033204320532063207320832093210321132123213321432153216321732183219322032213222322332243225322632273228322932303231323232333234323532363237323832393240324132423243324432453246324732483249325032513252325332543255325632573258325932603261326232633264326532663267326832693270327132723273327432753276327732783279328032813282328332843285328632873288328932903291329232933294329532963297329832993300330133023303330433053306330733083309331033113312331333143315331633173318331933203321332233233324332533263327332833293330333133323333333433353336333733383339334033413342334333443345334633473348334933503351335233533354335533563357335833593360336133623363336433653366336733683369337033713372337333743375337633773378337933803381338233833384338533863387338833893390339133923393339433953396339733983399340034013402340334043405340634073408340934103411341234133414341534163417341834193420342134223423342434253426342734283429343034313432343334343435343634373438343934403441344234433444344534463447344834493450345134523453345434553456345734583459346034613462346334643465346634673468346934703471347234733474347534763477347834793480348134823483348434853486348734883489349034913492349334943495349634973498349935003501350235033504350535063507350835093510351135123513351435153516351735183519352035213522352335243525352635273528352935303531353235333534353535363537353835393540354135423543354435453546354735483549355035513552355335543555355635573558355935603561356235633564356535663567356835693570357135723573357435753576357735783579358035813582358335843585358635873588358935903591359235933594359535963597359835993600360136023603360436053606360736083609361036113612361336143615361636173618361936203621362236233624362536263627362836293630363136323633363436353636363736383639364036413642364336443645364636473648364936503651365236533654365536563657365836593660366136623663366436653666366736683669367036713672367336743675367636773678367936803681368236833684368536863687368836893690369136923693369436953696369736983699370037013702370337043705370637073708370937103711371237133714371537163717371837193720372137223723372437253726372737283729373037313732373337343735373637373738373937403741374237433744374537463747374837493750375137523753375437553756375737583759376037613762376337643765376637673768376937703771377237733774377537763777377837793780378137823783378437853786378737883789379037913792379337943795379637973798379938003801380238033804380538063807380838093810381138123813381438153816381738183819382038213822382338243825382638273828382938303831383238333834383538363837383838393840384138423843384438453846384738483849385038513852385338543855385638573858385938603861386238633864386538663867386838693870387138723873387438753876387738783879388038813882388338843885388638873888388938903891389238933894389538963897389838993900390139023903390439053906390739083909391039113912391339143915391639173918391939203921392239233924392539263927392839293930393139323933393439353936393739383939394039413942394339443945394639473948394939503951395239533954395539563957395839593960396139623963396439653966396739683969397039713972397339743975397639773978397939803981398239833984398539863987398839893990399139923993399439953996399739983999400040014002400340044005400640074008400940104011401240134014401540164017401840194020402140224023402440254026402740284029403040314032403340344035403640374038403940404041404240434044404540464047404840494050405140524053405440554056405740584059406040614062406340644065406640674068406940704071407240734074407540764077407840794080408140824083408440854086408740884089409040914092409340944095409640974098409941004101410241034104410541064107410841094110411141124113411441154116411741184119412041214122412341244125412641274128412941304131413241334134413541364137413841394140414141424143414441454146414741484149415041514152415341544155415641574158415941604161416241634164416541664167416841694170417141724173417441754176417741784179418041814182418341844185418641874188418941904191419241934194419541964197419841994200420142024203420442054206420742084209421042114212421342144215421642174218421942204221422242234224422542264227422842294230423142324233423442354236423742384239424042414242424342444245424642474248424942504251425242534254425542564257425842594260426142624263426442654266426742684269427042714272427342744275427642774278427942804281428242834284428542864287428842894290429142924293429442954296429742984299430043014302430343044305430643074308430943104311431243134314431543164317431843194320432143224323432443254326432743284329433043314332433343344335433643374338433943404341434243434344434543464347434843494350435143524353435443554356435743584359436043614362436343644365436643674368436943704371437243734374437543764377437843794380438143824383438443854386438743884389439043914392439343944395439643974398439944004401440244034404440544064407440844094410441144124413441444154416441744184419442044214422442344244425442644274428442944304431443244334434443544364437443844394440444144424443444444454446444744484449445044514452445344544455445644574458445944604461446244634464446544664467446844694470447144724473447444754476447744784479448044814482448344844485448644874488448944904491449244934494449544964497449844994500450145024503450445054506450745084509451045114512451345144515451645174518451945204521452245234524452545264527452845294530453145324533453445354536453745384539454045414542454345444545454645474548454945504551455245534554455545564557455845594560456145624563456445654566456745684569457045714572457345744575457645774578457945804581458245834584458545864587458845894590459145924593459445954596459745984599460046014602460346044605460646074608460946104611461246134614461546164617461846194620462146224623462446254626462746284629463046314632463346344635463646374638463946404641464246434644464546464647464846494650465146524653465446554656465746584659466046614662466346644665466646674668466946704671467246734674467546764677467846794680468146824683468446854686468746884689469046914692469346944695469646974698469947004701470247034704470547064707470847094710471147124713471447154716471747184719472047214722472347244725472647274728472947304731473247334734473547364737473847394740474147424743474447454746474747484749475047514752475347544755475647574758475947604761476247634764476547664767476847694770477147724773477447754776477747784779478047814782478347844785478647874788478947904791479247934794479547964797479847994800480148024803480448054806480748084809481048114812481348144815481648174818481948204821482248234824482548264827482848294830483148324833483448354836483748384839484048414842484348444845484648474848484948504851485248534854485548564857485848594860486148624863486448654866486748684869487048714872487348744875487648774878487948804881488248834884488548864887488848894890489148924893489448954896489748984899490049014902490349044905490649074908490949104911491249134914491549164917491849194920492149224923492449254926492749284929493049314932493349344935493649374938493949404941494249434944494549464947494849494950495149524953495449554956495749584959496049614962496349644965496649674968496949704971497249734974497549764977497849794980498149824983498449854986498749884989499049914992499349944995499649974998499950005001500250035004500550065007500850095010501150125013501450155016501750185019502050215022502350245025502650275028502950305031503250335034503550365037503850395040504150425043504450455046504750485049505050515052505350545055505650575058505950605061506250635064506550665067506850695070507150725073507450755076507750785079508050815082508350845085508650875088508950905091509250935094509550965097509850995100510151025103510451055106510751085109511051115112511351145115511651175118511951205121512251235124512551265127512851295130513151325133513451355136513751385139514051415142514351445145514651475148514951505151515251535154515551565157515851595160516151625163516451655166516751685169517051715172517351745175517651775178517951805181518251835184518551865187518851895190519151925193519451955196519751985199520052015202520352045205520652075208520952105211521252135214521552165217521852195220522152225223522452255226522752285229523052315232523352345235523652375238523952405241524252435244524552465247524852495250525152525253525452555256525752585259526052615262526352645265526652675268526952705271527252735274527552765277527852795280528152825283528452855286528752885289529052915292529352945295529652975298529953005301530253035304530553065307530853095310531153125313531453155316531753185319532053215322532353245325532653275328532953305331533253335334533553365337533853395340534153425343534453455346534753485349535053515352535353545355535653575358535953605361536253635364536553665367536853695370537153725373537453755376537753785379538053815382538353845385538653875388538953905391539253935394539553965397539853995400540154025403540454055406540754085409541054115412541354145415541654175418541954205421542254235424542554265427542854295430543154325433543454355436543754385439544054415442544354445445544654475448544954505451545254535454545554565457545854595460546154625463546454655466546754685469547054715472547354745475547654775478547954805481548254835484548554865487548854895490549154925493549454955496549754985499550055015502550355045505550655075508550955105511551255135514551555165517551855195520552155225523552455255526552755285529553055315532553355345535553655375538553955405541554255435544554555465547554855495550555155525553555455555556555755585559556055615562556355645565556655675568556955705571557255735574557555765577557855795580558155825583558455855586558755885589559055915592559355945595559655975598559956005601560256035604560556065607560856095610561156125613561456155616561756185619562056215622562356245625562656275628562956305631563256335634563556365637563856395640564156425643564456455646564756485649565056515652565356545655565656575658565956605661566256635664566556665667566856695670567156725673567456755676567756785679568056815682568356845685568656875688568956905691569256935694569556965697569856995700570157025703570457055706570757085709571057115712571357145715571657175718571957205721572257235724572557265727572857295730573157325733573457355736573757385739574057415742574357445745574657475748574957505751575257535754575557565757575857595760576157625763576457655766576757685769577057715772577357745775577657775778577957805781578257835784578557865787578857895790579157925793579457955796579757985799580058015802580358045805580658075808580958105811581258135814581558165817581858195820582158225823582458255826582758285829583058315832583358345835583658375838583958405841584258435844584558465847584858495850585158525853585458555856585758585859586058615862586358645865586658675868586958705871587258735874587558765877587858795880588158825883588458855886588758885889589058915892589358945895589658975898589959005901590259035904590559065907590859095910591159125913591459155916591759185919592059215922592359245925592659275928592959305931593259335934593559365937593859395940594159425943594459455946594759485949595059515952595359545955595659575958595959605961596259635964596559665967596859695970597159725973597459755976597759785979598059815982598359845985598659875988598959905991599259935994599559965997599859996000600160026003600460056006600760086009601060116012601360146015601660176018601960206021602260236024602560266027602860296030603160326033603460356036603760386039604060416042604360446045604660476048604960506051605260536054605560566057605860596060606160626063606460656066606760686069607060716072607360746075607660776078607960806081608260836084608560866087608860896090609160926093609460956096609760986099610061016102610361046105610661076108610961106111611261136114611561166117611861196120612161226123612461256126612761286129613061316132613361346135613661376138613961406141614261436144614561466147614861496150615161526153615461556156615761586159616061616162616361646165616661676168616961706171617261736174617561766177617861796180618161826183618461856186618761886189619061916192619361946195619661976198619962006201620262036204620562066207620862096210621162126213621462156216621762186219622062216222622362246225622662276228622962306231623262336234623562366237623862396240624162426243624462456246624762486249625062516252625362546255625662576258625962606261626262636264626562666267626862696270627162726273627462756276627762786279628062816282628362846285628662876288628962906291629262936294629562966297629862996300630163026303630463056306630763086309631063116312631363146315631663176318631963206321632263236324632563266327632863296330633163326333633463356336633763386339634063416342634363446345634663476348634963506351635263536354635563566357635863596360636163626363636463656366636763686369637063716372637363746375637663776378637963806381638263836384638563866387638863896390639163926393639463956396639763986399640064016402640364046405640664076408640964106411641264136414641564166417641864196420642164226423642464256426642764286429643064316432643364346435643664376438643964406441644264436444644564466447644864496450645164526453645464556456645764586459646064616462646364646465646664676468646964706471647264736474647564766477647864796480648164826483648464856486648764886489649064916492649364946495649664976498649965006501650265036504650565066507650865096510651165126513651465156516651765186519652065216522652365246525652665276528652965306531653265336534653565366537653865396540654165426543654465456546654765486549655065516552655365546555655665576558655965606561656265636564656565666567656865696570657165726573657465756576657765786579658065816582658365846585658665876588658965906591659265936594659565966597659865996600660166026603660466056606660766086609661066116612661366146615661666176618661966206621662266236624662566266627662866296630663166326633663466356636663766386639664066416642664366446645664666476648664966506651665266536654665566566657665866596660666166626663666466656666666766686669667066716672667366746675667666776678667966806681668266836684668566866687668866896690669166926693669466956696669766986699670067016702670367046705670667076708670967106711671267136714671567166717671867196720672167226723672467256726672767286729673067316732673367346735673667376738673967406741674267436744674567466747674867496750675167526753675467556756675767586759676067616762676367646765676667676768676967706771677267736774677567766777677867796780678167826783678467856786678767886789679067916792679367946795679667976798679968006801680268036804680568066807680868096810681168126813681468156816681768186819682068216822682368246825682668276828682968306831683268336834683568366837683868396840684168426843684468456846684768486849685068516852685368546855685668576858685968606861686268636864686568666867686868696870687168726873687468756876687768786879688068816882688368846885688668876888688968906891689268936894689568966897689868996900690169026903690469056906690769086909691069116912691369146915691669176918691969206921692269236924692569266927692869296930693169326933693469356936693769386939694069416942694369446945694669476948694969506951695269536954695569566957695869596960696169626963696469656966696769686969697069716972697369746975697669776978697969806981698269836984698569866987698869896990699169926993699469956996699769986999700070017002700370047005700670077008700970107011701270137014701570167017701870197020702170227023702470257026702770287029703070317032703370347035703670377038703970407041704270437044704570467047704870497050705170527053705470557056705770587059706070617062
  1. var ENVIRONMENT_IS_PTHREAD = true;
  2. var Module = typeof Module !== "undefined" ? Module : {};
  3. var moduleOverrides = {};
  4. var key;
  5. for (key in Module) {
  6. if (Module.hasOwnProperty(key)) {
  7. moduleOverrides[key] = Module[key]
  8. }
  9. }
  10. var arguments_ = [];
  11. var thisProgram = "./this.program";
  12. var quit_ = function(status, toThrow) {
  13. throw toThrow
  14. };
  15. var ENVIRONMENT_IS_WEB = false;
  16. var ENVIRONMENT_IS_WORKER = false;
  17. var ENVIRONMENT_IS_NODE = false;
  18. var ENVIRONMENT_HAS_NODE = false;
  19. var ENVIRONMENT_IS_SHELL = false;
  20. ENVIRONMENT_IS_WEB = typeof window === "object";
  21. ENVIRONMENT_IS_WORKER = typeof importScripts === "function";
  22. ENVIRONMENT_HAS_NODE = typeof process === "object" && typeof process.versions === "object" && typeof process.versions.node === "string";
  23. ENVIRONMENT_IS_NODE = ENVIRONMENT_HAS_NODE && !ENVIRONMENT_IS_WEB && !ENVIRONMENT_IS_WORKER;
  24. ENVIRONMENT_IS_SHELL = !ENVIRONMENT_IS_WEB && !ENVIRONMENT_IS_NODE && !ENVIRONMENT_IS_WORKER;
  25. if (Module["ENVIRONMENT"]) {
  26. throw new Error("Module.ENVIRONMENT has been deprecated. To force the environment, use the ENVIRONMENT compile-time option (for example, -s ENVIRONMENT=web or -s ENVIRONMENT=node)")
  27. }
  28. var scriptDirectory = "";
  29. function locateFile(path) {
  30. if (Module["locateFile"]) {
  31. return Module["locateFile"](path, scriptDirectory)
  32. }
  33. return scriptDirectory + path
  34. }
  35. var read_, readAsync, readBinary, setWindowTitle;
  36. if (ENVIRONMENT_IS_NODE) {
  37. scriptDirectory = __dirname + "/";
  38. var nodeFS;
  39. var nodePath;
  40. read_ = function shell_read(filename, binary) {
  41. var ret;
  42. if (!nodeFS) nodeFS = require("fs");
  43. if (!nodePath) nodePath = require("path");
  44. filename = nodePath["normalize"](filename);
  45. ret = nodeFS["readFileSync"](filename);
  46. return binary ? ret : ret.toString()
  47. };
  48. readBinary = function readBinary(filename) {
  49. var ret = read_(filename, true);
  50. if (!ret.buffer) {
  51. ret = new Uint8Array(ret)
  52. }
  53. assert(ret.buffer);
  54. return ret
  55. };
  56. if (process["argv"].length > 1) {
  57. thisProgram = process["argv"][1].replace(/\\/g, "/")
  58. }
  59. arguments_ = process["argv"].slice(2);
  60. if (typeof module !== "undefined") {
  61. module["exports"] = Module
  62. }
  63. process["on"]("uncaughtException", function(ex) {
  64. if (!(ex instanceof ExitStatus)) {
  65. throw ex
  66. }
  67. });
  68. process["on"]("unhandledRejection", abort);
  69. quit_ = function(status) {
  70. process["exit"](status)
  71. };
  72. Module["inspect"] = function() {
  73. return "[Emscripten Module object]"
  74. }
  75. } else if (ENVIRONMENT_IS_SHELL) {
  76. if (typeof read != "undefined") {
  77. read_ = function shell_read(f) {
  78. return read(f)
  79. }
  80. }
  81. readBinary = function readBinary(f) {
  82. var data;
  83. if (typeof readbuffer === "function") {
  84. return new Uint8Array(readbuffer(f))
  85. }
  86. data = read(f, "binary");
  87. assert(typeof data === "object");
  88. return data
  89. };
  90. if (typeof scriptArgs != "undefined") {
  91. arguments_ = scriptArgs
  92. } else if (typeof arguments != "undefined") {
  93. arguments_ = arguments
  94. }
  95. if (typeof quit === "function") {
  96. quit_ = function(status) {
  97. quit(status)
  98. }
  99. }
  100. if (typeof print !== "undefined") {
  101. if (typeof console === "undefined") console = {};
  102. console.log = print;
  103. console.warn = console.error = typeof printErr !== "undefined" ? printErr : print
  104. }
  105. } else if (ENVIRONMENT_IS_WEB || ENVIRONMENT_IS_WORKER) {
  106. if (ENVIRONMENT_IS_WORKER) {
  107. scriptDirectory = self.location.href
  108. } else if (document.currentScript) {
  109. scriptDirectory = document.currentScript.src
  110. }
  111. if (scriptDirectory.indexOf("blob:") !== 0) {
  112. scriptDirectory = scriptDirectory.substr(0, scriptDirectory.lastIndexOf("/") + 1)
  113. } else {
  114. scriptDirectory = ""
  115. }
  116. read_ = function shell_read(url) {
  117. var xhr = new XMLHttpRequest;
  118. xhr.open("GET", url, false);
  119. xhr.send(null);
  120. return xhr.responseText
  121. };
  122. if (ENVIRONMENT_IS_WORKER) {
  123. readBinary = function readBinary(url) {
  124. var xhr = new XMLHttpRequest;
  125. xhr.open("GET", url, false);
  126. xhr.responseType = "arraybuffer";
  127. xhr.send(null);
  128. return new Uint8Array(xhr.response)
  129. }
  130. }
  131. readAsync = function readAsync(url, onload, onerror) {
  132. var xhr = new XMLHttpRequest;
  133. xhr.open("GET", url, true);
  134. xhr.responseType = "arraybuffer";
  135. xhr.onload = function xhr_onload() {
  136. if (xhr.status == 200 || xhr.status == 0 && xhr.response) {
  137. onload(xhr.response);
  138. return
  139. }
  140. onerror()
  141. };
  142. xhr.onerror = onerror;
  143. xhr.send(null)
  144. };
  145. setWindowTitle = function(title) {
  146. document.title = title
  147. }
  148. } else {
  149. throw new Error("environment detection error")
  150. }
  151. var out = Module["print"] || console.log.bind(console);
  152. var err = Module["printErr"] || console.warn.bind(console);
  153. for (key in moduleOverrides) {
  154. if (moduleOverrides.hasOwnProperty(key)) {
  155. Module[key] = moduleOverrides[key]
  156. }
  157. }
  158. moduleOverrides = null;
  159. if (Module["arguments"]) arguments_ = Module["arguments"];
  160. if (!Object.getOwnPropertyDescriptor(Module, "arguments")) Object.defineProperty(Module, "arguments", {
  161. configurable: true,
  162. get: function() {
  163. abort("Module.arguments has been replaced with plain arguments_")
  164. }
  165. });
  166. if (Module["thisProgram"]) thisProgram = Module["thisProgram"];
  167. if (!Object.getOwnPropertyDescriptor(Module, "thisProgram")) Object.defineProperty(Module, "thisProgram", {
  168. configurable: true,
  169. get: function() {
  170. abort("Module.thisProgram has been replaced with plain thisProgram")
  171. }
  172. });
  173. if (Module["quit"]) quit_ = Module["quit"];
  174. if (!Object.getOwnPropertyDescriptor(Module, "quit")) Object.defineProperty(Module, "quit", {
  175. configurable: true,
  176. get: function() {
  177. abort("Module.quit has been replaced with plain quit_")
  178. }
  179. });
  180. assert(typeof Module["memoryInitializerPrefixURL"] === "undefined", "Module.memoryInitializerPrefixURL option was removed, use Module.locateFile instead");
  181. assert(typeof Module["pthreadMainPrefixURL"] === "undefined", "Module.pthreadMainPrefixURL option was removed, use Module.locateFile instead");
  182. assert(typeof Module["cdInitializerPrefixURL"] === "undefined", "Module.cdInitializerPrefixURL option was removed, use Module.locateFile instead");
  183. assert(typeof Module["filePackagePrefixURL"] === "undefined", "Module.filePackagePrefixURL option was removed, use Module.locateFile instead");
  184. assert(typeof Module["read"] === "undefined", "Module.read option was removed (modify read_ in JS)");
  185. assert(typeof Module["readAsync"] === "undefined", "Module.readAsync option was removed (modify readAsync in JS)");
  186. assert(typeof Module["readBinary"] === "undefined", "Module.readBinary option was removed (modify readBinary in JS)");
  187. assert(typeof Module["setWindowTitle"] === "undefined", "Module.setWindowTitle option was removed (modify setWindowTitle in JS)");
  188. if (!Object.getOwnPropertyDescriptor(Module, "read")) Object.defineProperty(Module, "read", {
  189. configurable: true,
  190. get: function() {
  191. abort("Module.read has been replaced with plain read_")
  192. }
  193. });
  194. if (!Object.getOwnPropertyDescriptor(Module, "readAsync")) Object.defineProperty(Module, "readAsync", {
  195. configurable: true,
  196. get: function() {
  197. abort("Module.readAsync has been replaced with plain readAsync")
  198. }
  199. });
  200. if (!Object.getOwnPropertyDescriptor(Module, "readBinary")) Object.defineProperty(Module, "readBinary", {
  201. configurable: true,
  202. get: function() {
  203. abort("Module.readBinary has been replaced with plain readBinary")
  204. }
  205. });
  206. stackSave = stackRestore = stackAlloc = function() {
  207. abort("cannot use the stack before compiled code is ready to run, and has provided stack access")
  208. };
  209. function dynamicAlloc(size) {
  210. assert(DYNAMICTOP_PTR);
  211. var ret = HEAP32[DYNAMICTOP_PTR >> 2];
  212. var end = ret + size + 15 & -16;
  213. if (end > _emscripten_get_heap_size()) {
  214. abort("failure to dynamicAlloc - memory growth etc. is not supported there, call malloc/sbrk directly")
  215. }
  216. HEAP32[DYNAMICTOP_PTR >> 2] = end;
  217. return ret
  218. }
  219. function getNativeTypeSize(type) {
  220. switch (type) {
  221. case "i1":
  222. case "i8":
  223. return 1;
  224. case "i16":
  225. return 2;
  226. case "i32":
  227. return 4;
  228. case "i64":
  229. return 8;
  230. case "float":
  231. return 4;
  232. case "double":
  233. return 8;
  234. default: {
  235. if (type[type.length - 1] === "*") {
  236. return 4
  237. } else if (type[0] === "i") {
  238. var bits = parseInt(type.substr(1));
  239. assert(bits % 8 === 0, "getNativeTypeSize invalid bits " + bits + ", type " + type);
  240. return bits / 8
  241. } else {
  242. return 0
  243. }
  244. }
  245. }
  246. }
  247. function warnOnce(text) {
  248. if (!warnOnce.shown) warnOnce.shown = {};
  249. if (!warnOnce.shown[text]) {
  250. warnOnce.shown[text] = 1;
  251. err(text)
  252. }
  253. }
  254. var asm2wasmImports = {
  255. "f64-rem": function(x, y) {
  256. return x % y
  257. },
  258. "debugger": function() {
  259. debugger
  260. }
  261. };
  262. var jsCallStartIndex = 1;
  263. var functionPointers = new Array(35);
  264. function addFunction(func, sig) {
  265. assert(typeof func !== "undefined");
  266. var base = 0;
  267. for (var i = base; i < base + 35; i++) {
  268. if (!functionPointers[i]) {
  269. functionPointers[i] = func;
  270. return jsCallStartIndex + i
  271. }
  272. }
  273. throw "Finished up all reserved function pointers. Use a higher value for RESERVED_FUNCTION_POINTERS."
  274. }
  275. function removeFunction(index) {
  276. functionPointers[index - jsCallStartIndex] = null
  277. }
  278. var tempRet0 = 0;
  279. var getTempRet0 = function() {
  280. return tempRet0
  281. };
  282. var wasmBinary;
  283. if (Module["wasmBinary"]) wasmBinary = Module["wasmBinary"];
  284. if (!Object.getOwnPropertyDescriptor(Module, "wasmBinary")) Object.defineProperty(Module, "wasmBinary", {
  285. configurable: true,
  286. get: function() {
  287. abort("Module.wasmBinary has been replaced with plain wasmBinary")
  288. }
  289. });
  290. var noExitRuntime;
  291. if (Module["noExitRuntime"]) noExitRuntime = Module["noExitRuntime"];
  292. if (!Object.getOwnPropertyDescriptor(Module, "noExitRuntime")) Object.defineProperty(Module, "noExitRuntime", {
  293. configurable: true,
  294. get: function() {
  295. abort("Module.noExitRuntime has been replaced with plain noExitRuntime")
  296. }
  297. });
  298. if (typeof WebAssembly !== "object") {
  299. abort("No WebAssembly support found. Build with -s WASM=0 to target JavaScript instead.")
  300. }
  301. function setValue(ptr, value, type, noSafe) {
  302. type = type || "i8";
  303. if (type.charAt(type.length - 1) === "*") type = "i32";
  304. switch (type) {
  305. case "i1":
  306. HEAP8[ptr >> 0] = value;
  307. break;
  308. case "i8":
  309. HEAP8[ptr >> 0] = value;
  310. break;
  311. case "i16":
  312. HEAP16[ptr >> 1] = value;
  313. break;
  314. case "i32":
  315. HEAP32[ptr >> 2] = value;
  316. break;
  317. case "i64":
  318. tempI64 = [value >>> 0, (tempDouble = value, +Math_abs(tempDouble) >= 1 ? tempDouble > 0 ? (Math_min(+Math_floor(tempDouble / 4294967296), 4294967295) | 0) >>> 0 : ~~+Math_ceil((tempDouble - +(~~tempDouble >>> 0)) / 4294967296) >>> 0 : 0)], HEAP32[ptr >> 2] = tempI64[0], HEAP32[ptr + 4 >> 2] = tempI64[1];
  319. break;
  320. case "float":
  321. HEAPF32[ptr >> 2] = value;
  322. break;
  323. case "double":
  324. HEAPF64[ptr >> 3] = value;
  325. break;
  326. default:
  327. abort("invalid type for setValue: " + type)
  328. }
  329. }
  330. var wasmMemory;
  331. var wasmTable = new WebAssembly.Table({
  332. "initial": 4928,
  333. "element": "anyfunc"
  334. });
  335. var ABORT = false;
  336. var EXITSTATUS = 0;
  337. function assert(condition, text) {
  338. if (!condition) {
  339. abort("Assertion failed: " + text)
  340. }
  341. }
  342. function getCFunc(ident) {
  343. var func = Module["_" + ident];
  344. assert(func, "Cannot call unknown function " + ident + ", make sure it is exported");
  345. return func
  346. }
  347. function ccall(ident, returnType, argTypes, args, opts) {
  348. var toC = {
  349. "string": function(str) {
  350. var ret = 0;
  351. if (str !== null && str !== undefined && str !== 0) {
  352. var len = (str.length << 2) + 1;
  353. ret = stackAlloc(len);
  354. stringToUTF8(str, ret, len)
  355. }
  356. return ret
  357. },
  358. "array": function(arr) {
  359. var ret = stackAlloc(arr.length);
  360. writeArrayToMemory(arr, ret);
  361. return ret
  362. }
  363. };
  364. function convertReturnValue(ret) {
  365. if (returnType === "string") return UTF8ToString(ret);
  366. if (returnType === "boolean") return Boolean(ret);
  367. return ret
  368. }
  369. var func = getCFunc(ident);
  370. var cArgs = [];
  371. var stack = 0;
  372. assert(returnType !== "array", 'Return type should not be "array".');
  373. if (args) {
  374. for (var i = 0; i < args.length; i++) {
  375. var converter = toC[argTypes[i]];
  376. if (converter) {
  377. if (stack === 0) stack = stackSave();
  378. cArgs[i] = converter(args[i])
  379. } else {
  380. cArgs[i] = args[i]
  381. }
  382. }
  383. }
  384. var ret = func.apply(null, cArgs);
  385. ret = convertReturnValue(ret);
  386. if (stack !== 0) stackRestore(stack);
  387. return ret
  388. }
  389. function cwrap(ident, returnType, argTypes, opts) {
  390. return function() {
  391. return ccall(ident, returnType, argTypes, arguments, opts)
  392. }
  393. }
  394. var ALLOC_NORMAL = 0;
  395. var ALLOC_NONE = 3;
  396. function allocate(slab, types, allocator, ptr) {
  397. var zeroinit, size;
  398. if (typeof slab === "number") {
  399. zeroinit = true;
  400. size = slab
  401. } else {
  402. zeroinit = false;
  403. size = slab.length
  404. }
  405. var singleType = typeof types === "string" ? types : null;
  406. var ret;
  407. if (allocator == ALLOC_NONE) {
  408. ret = ptr
  409. } else {
  410. ret = [_malloc, stackAlloc, dynamicAlloc][allocator](Math.max(size, singleType ? 1 : types.length))
  411. }
  412. if (zeroinit) {
  413. var stop;
  414. ptr = ret;
  415. assert((ret & 3) == 0);
  416. stop = ret + (size & ~3);
  417. for (; ptr < stop; ptr += 4) {
  418. HEAP32[ptr >> 2] = 0
  419. }
  420. stop = ret + size;
  421. while (ptr < stop) {
  422. HEAP8[ptr++ >> 0] = 0
  423. }
  424. return ret
  425. }
  426. if (singleType === "i8") {
  427. if (slab.subarray || slab.slice) {
  428. HEAPU8.set(slab, ret)
  429. } else {
  430. HEAPU8.set(new Uint8Array(slab), ret)
  431. }
  432. return ret
  433. }
  434. var i = 0,
  435. type, typeSize, previousType;
  436. while (i < size) {
  437. var curr = slab[i];
  438. type = singleType || types[i];
  439. if (type === 0) {
  440. i++;
  441. continue
  442. }
  443. assert(type, "Must know what type to store in allocate!");
  444. if (type == "i64") type = "i32";
  445. setValue(ret + i, curr, type);
  446. if (previousType !== type) {
  447. typeSize = getNativeTypeSize(type);
  448. previousType = type
  449. }
  450. i += typeSize
  451. }
  452. return ret
  453. }
  454. function getMemory(size) {
  455. if (!runtimeInitialized) return dynamicAlloc(size);
  456. return _malloc(size)
  457. }
  458. var UTF8Decoder = typeof TextDecoder !== "undefined" ? new TextDecoder("utf8") : undefined;
  459. function UTF8ArrayToString(u8Array, idx, maxBytesToRead) {
  460. var endIdx = idx + maxBytesToRead;
  461. var endPtr = idx;
  462. while (u8Array[endPtr] && !(endPtr >= endIdx)) ++endPtr;
  463. if (endPtr - idx > 16 && u8Array.subarray && UTF8Decoder) {
  464. return UTF8Decoder.decode(u8Array.subarray(idx, endPtr))
  465. } else {
  466. var str = "";
  467. while (idx < endPtr) {
  468. var u0 = u8Array[idx++];
  469. if (!(u0 & 128)) {
  470. str += String.fromCharCode(u0);
  471. continue
  472. }
  473. var u1 = u8Array[idx++] & 63;
  474. if ((u0 & 224) == 192) {
  475. str += String.fromCharCode((u0 & 31) << 6 | u1);
  476. continue
  477. }
  478. var u2 = u8Array[idx++] & 63;
  479. if ((u0 & 240) == 224) {
  480. u0 = (u0 & 15) << 12 | u1 << 6 | u2
  481. } else {
  482. if ((u0 & 248) != 240) warnOnce("Invalid UTF-8 leading byte 0x" + u0.toString(16) + " encountered when deserializing a UTF-8 string on the asm.js/wasm heap to a JS string!");
  483. u0 = (u0 & 7) << 18 | u1 << 12 | u2 << 6 | u8Array[idx++] & 63
  484. }
  485. if (u0 < 65536) {
  486. str += String.fromCharCode(u0)
  487. } else {
  488. var ch = u0 - 65536;
  489. str += String.fromCharCode(55296 | ch >> 10, 56320 | ch & 1023)
  490. }
  491. }
  492. }
  493. return str
  494. }
  495. function UTF8ToString(ptr, maxBytesToRead) {
  496. return ptr ? UTF8ArrayToString(HEAPU8, ptr, maxBytesToRead) : ""
  497. }
  498. function stringToUTF8Array(str, outU8Array, outIdx, maxBytesToWrite) {
  499. if (!(maxBytesToWrite > 0)) return 0;
  500. var startIdx = outIdx;
  501. var endIdx = outIdx + maxBytesToWrite - 1;
  502. for (var i = 0; i < str.length; ++i) {
  503. var u = str.charCodeAt(i);
  504. if (u >= 55296 && u <= 57343) {
  505. var u1 = str.charCodeAt(++i);
  506. u = 65536 + ((u & 1023) << 10) | u1 & 1023
  507. }
  508. if (u <= 127) {
  509. if (outIdx >= endIdx) break;
  510. outU8Array[outIdx++] = u
  511. } else if (u <= 2047) {
  512. if (outIdx + 1 >= endIdx) break;
  513. outU8Array[outIdx++] = 192 | u >> 6;
  514. outU8Array[outIdx++] = 128 | u & 63
  515. } else if (u <= 65535) {
  516. if (outIdx + 2 >= endIdx) break;
  517. outU8Array[outIdx++] = 224 | u >> 12;
  518. outU8Array[outIdx++] = 128 | u >> 6 & 63;
  519. outU8Array[outIdx++] = 128 | u & 63
  520. } else {
  521. if (outIdx + 3 >= endIdx) break;
  522. if (u >= 2097152) warnOnce("Invalid Unicode code point 0x" + u.toString(16) + " encountered when serializing a JS string to an UTF-8 string on the asm.js/wasm heap! (Valid unicode code points should be in range 0-0x1FFFFF).");
  523. outU8Array[outIdx++] = 240 | u >> 18;
  524. outU8Array[outIdx++] = 128 | u >> 12 & 63;
  525. outU8Array[outIdx++] = 128 | u >> 6 & 63;
  526. outU8Array[outIdx++] = 128 | u & 63
  527. }
  528. }
  529. outU8Array[outIdx] = 0;
  530. return outIdx - startIdx
  531. }
  532. function stringToUTF8(str, outPtr, maxBytesToWrite) {
  533. assert(typeof maxBytesToWrite == "number", "stringToUTF8(str, outPtr, maxBytesToWrite) is missing the third parameter that specifies the length of the output buffer!");
  534. return stringToUTF8Array(str, HEAPU8, outPtr, maxBytesToWrite)
  535. }
  536. function lengthBytesUTF8(str) {
  537. var len = 0;
  538. for (var i = 0; i < str.length; ++i) {
  539. var u = str.charCodeAt(i);
  540. if (u >= 55296 && u <= 57343) u = 65536 + ((u & 1023) << 10) | str.charCodeAt(++i) & 1023;
  541. if (u <= 127) ++len;
  542. else if (u <= 2047) len += 2;
  543. else if (u <= 65535) len += 3;
  544. else len += 4
  545. }
  546. return len
  547. }
  548. var UTF16Decoder = typeof TextDecoder !== "undefined" ? new TextDecoder("utf-16le") : undefined;
  549. function allocateUTF8(str) {
  550. var size = lengthBytesUTF8(str) + 1;
  551. var ret = _malloc(size);
  552. if (ret) stringToUTF8Array(str, HEAP8, ret, size);
  553. return ret
  554. }
  555. function allocateUTF8OnStack(str) {
  556. var size = lengthBytesUTF8(str) + 1;
  557. var ret = stackAlloc(size);
  558. stringToUTF8Array(str, HEAP8, ret, size);
  559. return ret
  560. }
  561. function writeArrayToMemory(array, buffer) {
  562. assert(array.length >= 0, "writeArrayToMemory array must have a length (should be an array or typed array)");
  563. HEAP8.set(array, buffer)
  564. }
  565. function writeAsciiToMemory(str, buffer, dontAddNull) {
  566. for (var i = 0; i < str.length; ++i) {
  567. assert(str.charCodeAt(i) === str.charCodeAt(i) & 255);
  568. HEAP8[buffer++ >> 0] = str.charCodeAt(i)
  569. }
  570. if (!dontAddNull) HEAP8[buffer >> 0] = 0
  571. }
  572. var PAGE_SIZE = 16384;
  573. var WASM_PAGE_SIZE = 65536;
  574. var buffer, HEAP8, HEAPU8, HEAP16, HEAPU16, HEAP32, HEAPU32, HEAPF32, HEAPF64;
  575. function updateGlobalBufferAndViews(buf) {
  576. buffer = buf;
  577. Module["HEAP8"] = HEAP8 = new Int8Array(buf);
  578. Module["HEAP16"] = HEAP16 = new Int16Array(buf);
  579. Module["HEAP32"] = HEAP32 = new Int32Array(buf);
  580. Module["HEAPU8"] = HEAPU8 = new Uint8Array(buf);
  581. Module["HEAPU16"] = HEAPU16 = new Uint16Array(buf);
  582. Module["HEAPU32"] = HEAPU32 = new Uint32Array(buf);
  583. Module["HEAPF32"] = HEAPF32 = new Float32Array(buf);
  584. Module["HEAPF64"] = HEAPF64 = new Float64Array(buf)
  585. }
  586. var STACK_BASE = 1398224,
  587. STACK_MAX = 6641104,
  588. DYNAMIC_BASE = 6641104,
  589. DYNAMICTOP_PTR = 1398e3;
  590. assert(STACK_BASE % 16 === 0, "stack must start aligned");
  591. assert(DYNAMIC_BASE % 16 === 0, "heap must start aligned");
  592. var TOTAL_STACK = 5242880;
  593. if (Module["TOTAL_STACK"]) assert(TOTAL_STACK === Module["TOTAL_STACK"], "the stack size can no longer be determined at runtime");
  594. var INITIAL_TOTAL_MEMORY = Module["TOTAL_MEMORY"] || 2147483648;
  595. if (!Object.getOwnPropertyDescriptor(Module, "TOTAL_MEMORY")) Object.defineProperty(Module, "TOTAL_MEMORY", {
  596. configurable: true,
  597. get: function() {
  598. abort("Module.TOTAL_MEMORY has been replaced with plain INITIAL_TOTAL_MEMORY")
  599. }
  600. });
  601. assert(INITIAL_TOTAL_MEMORY >= TOTAL_STACK, "TOTAL_MEMORY should be larger than TOTAL_STACK, was " + INITIAL_TOTAL_MEMORY + "! (TOTAL_STACK=" + TOTAL_STACK + ")");
  602. assert(typeof Int32Array !== "undefined" && typeof Float64Array !== "undefined" && Int32Array.prototype.subarray !== undefined && Int32Array.prototype.set !== undefined, "JS engine does not provide full typed array support");
  603. if (Module["wasmMemory"]) {
  604. wasmMemory = Module["wasmMemory"]
  605. } else {
  606. wasmMemory = new WebAssembly.Memory({
  607. "initial": INITIAL_TOTAL_MEMORY / WASM_PAGE_SIZE,
  608. "maximum": INITIAL_TOTAL_MEMORY / WASM_PAGE_SIZE
  609. })
  610. }
  611. if (wasmMemory) {
  612. buffer = wasmMemory.buffer
  613. }
  614. INITIAL_TOTAL_MEMORY = buffer.byteLength;
  615. assert(INITIAL_TOTAL_MEMORY % WASM_PAGE_SIZE === 0);
  616. updateGlobalBufferAndViews(buffer);
  617. HEAP32[DYNAMICTOP_PTR >> 2] = DYNAMIC_BASE;
  618. function writeStackCookie() {
  619. assert((STACK_MAX & 3) == 0);
  620. HEAPU32[(STACK_MAX >> 2) - 1] = 34821223;
  621. HEAPU32[(STACK_MAX >> 2) - 2] = 2310721022;
  622. HEAP32[0] = 1668509029
  623. }
  624. function checkStackCookie() {
  625. var cookie1 = HEAPU32[(STACK_MAX >> 2) - 1];
  626. var cookie2 = HEAPU32[(STACK_MAX >> 2) - 2];
  627. if (cookie1 != 34821223 || cookie2 != 2310721022) {
  628. abort("Stack overflow! Stack cookie has been overwritten, expected hex dwords 0x89BACDFE and 0x02135467, but received 0x" + cookie2.toString(16) + " " + cookie1.toString(16))
  629. }
  630. if (HEAP32[0] !== 1668509029) abort("Runtime error: The application has corrupted its heap memory area (address zero)!")
  631. }
  632. function abortStackOverflow(allocSize) {
  633. abort("Stack overflow! Attempted to allocate " + allocSize + " bytes on the stack, but stack has only " + (STACK_MAX - stackSave() + allocSize) + " bytes available!")
  634. }(function() {
  635. var h16 = new Int16Array(1);
  636. var h8 = new Int8Array(h16.buffer);
  637. h16[0] = 25459;
  638. if (h8[0] !== 115 || h8[1] !== 99) throw "Runtime error: expected the system to be little-endian!"
  639. })();
  640. function abortFnPtrError(ptr, sig) {
  641. var possibleSig = "";
  642. for (var x in debug_tables) {
  643. var tbl = debug_tables[x];
  644. if (tbl[ptr]) {
  645. possibleSig += 'as sig "' + x + '" pointing to function ' + tbl[ptr] + ", "
  646. }
  647. }
  648. abort("Invalid function pointer " + ptr + " called with signature '" + sig + "'. Perhaps this is an invalid value (e.g. caused by calling a virtual method on a NULL pointer)? Or calling a function with an incorrect type, which will fail? (it is worth building your source files with -Werror (warnings are errors), as warnings can indicate undefined behavior which can cause this). This pointer might make sense in another type signature: " + possibleSig)
  649. }
  650. function callRuntimeCallbacks(callbacks) {
  651. while (callbacks.length > 0) {
  652. var callback = callbacks.shift();
  653. if (typeof callback == "function") {
  654. callback();
  655. continue
  656. }
  657. var func = callback.func;
  658. if (typeof func === "number") {
  659. if (callback.arg === undefined) {
  660. Module["dynCall_v"](func)
  661. } else {
  662. Module["dynCall_vi"](func, callback.arg)
  663. }
  664. } else {
  665. func(callback.arg === undefined ? null : callback.arg)
  666. }
  667. }
  668. }
  669. var __ATPRERUN__ = [];
  670. var __ATINIT__ = [];
  671. var __ATMAIN__ = [];
  672. var __ATPOSTRUN__ = [];
  673. var runtimeInitialized = false;
  674. var runtimeExited = false;
  675. function preRun() {
  676. if (Module["preRun"]) {
  677. if (typeof Module["preRun"] == "function") Module["preRun"] = [Module["preRun"]];
  678. while (Module["preRun"].length) {
  679. addOnPreRun(Module["preRun"].shift())
  680. }
  681. }
  682. callRuntimeCallbacks(__ATPRERUN__)
  683. }
  684. function initRuntime() {
  685. checkStackCookie();
  686. assert(!runtimeInitialized);
  687. runtimeInitialized = true;
  688. if (!Module["noFSInit"] && !FS.init.initialized) FS.init();
  689. TTY.init();
  690. callRuntimeCallbacks(__ATINIT__)
  691. }
  692. function preMain() {
  693. checkStackCookie();
  694. FS.ignorePermissions = false;
  695. callRuntimeCallbacks(__ATMAIN__)
  696. }
  697. function exitRuntime() {
  698. checkStackCookie();
  699. runtimeExited = true
  700. }
  701. function postRun() {
  702. checkStackCookie();
  703. if (Module["postRun"]) {
  704. if (typeof Module["postRun"] == "function") Module["postRun"] = [Module["postRun"]];
  705. while (Module["postRun"].length) {
  706. addOnPostRun(Module["postRun"].shift())
  707. }
  708. }
  709. callRuntimeCallbacks(__ATPOSTRUN__)
  710. }
  711. function addOnPreRun(cb) {
  712. __ATPRERUN__.unshift(cb)
  713. }
  714. function addOnPostRun(cb) {
  715. __ATPOSTRUN__.unshift(cb)
  716. }
  717. assert(Math.imul, "This browser does not support Math.imul(), build with LEGACY_VM_SUPPORT or POLYFILL_OLD_MATH_FUNCTIONS to add in a polyfill");
  718. assert(Math.fround, "This browser does not support Math.fround(), build with LEGACY_VM_SUPPORT or POLYFILL_OLD_MATH_FUNCTIONS to add in a polyfill");
  719. assert(Math.clz32, "This browser does not support Math.clz32(), build with LEGACY_VM_SUPPORT or POLYFILL_OLD_MATH_FUNCTIONS to add in a polyfill");
  720. assert(Math.trunc, "This browser does not support Math.trunc(), build with LEGACY_VM_SUPPORT or POLYFILL_OLD_MATH_FUNCTIONS to add in a polyfill");
  721. var Math_abs = Math.abs;
  722. var Math_ceil = Math.ceil;
  723. var Math_floor = Math.floor;
  724. var Math_min = Math.min;
  725. var Math_trunc = Math.trunc;
  726. var runDependencies = 0;
  727. var runDependencyWatcher = null;
  728. var dependenciesFulfilled = null;
  729. var runDependencyTracking = {};
  730. function getUniqueRunDependency(id) {
  731. var orig = id;
  732. while (1) {
  733. if (!runDependencyTracking[id]) return id;
  734. id = orig + Math.random()
  735. }
  736. return id
  737. }
  738. function addRunDependency(id) {
  739. runDependencies++;
  740. if (Module["monitorRunDependencies"]) {
  741. Module["monitorRunDependencies"](runDependencies)
  742. }
  743. if (id) {
  744. assert(!runDependencyTracking[id]);
  745. runDependencyTracking[id] = 1;
  746. if (runDependencyWatcher === null && typeof setInterval !== "undefined") {
  747. runDependencyWatcher = setInterval(function() {
  748. if (ABORT) {
  749. clearInterval(runDependencyWatcher);
  750. runDependencyWatcher = null;
  751. return
  752. }
  753. var shown = false;
  754. for (var dep in runDependencyTracking) {
  755. if (!shown) {
  756. shown = true;
  757. err("still waiting on run dependencies:")
  758. }
  759. err("dependency: " + dep)
  760. }
  761. if (shown) {
  762. err("(end of list)")
  763. }
  764. }, 1e4)
  765. }
  766. } else {
  767. err("warning: run dependency added without ID")
  768. }
  769. }
  770. function removeRunDependency(id) {
  771. runDependencies--;
  772. if (Module["monitorRunDependencies"]) {
  773. Module["monitorRunDependencies"](runDependencies)
  774. }
  775. if (id) {
  776. assert(runDependencyTracking[id]);
  777. delete runDependencyTracking[id]
  778. } else {
  779. err("warning: run dependency removed without ID")
  780. }
  781. if (runDependencies == 0) {
  782. if (runDependencyWatcher !== null) {
  783. clearInterval(runDependencyWatcher);
  784. runDependencyWatcher = null
  785. }
  786. if (dependenciesFulfilled) {
  787. var callback = dependenciesFulfilled;
  788. dependenciesFulfilled = null;
  789. callback()
  790. }
  791. }
  792. }
  793. Module["preloadedImages"] = {};
  794. Module["preloadedAudios"] = {};
  795. function abort(what) {
  796. if (Module["onAbort"]) {
  797. Module["onAbort"](what)
  798. }
  799. what += "";
  800. out(what);
  801. err(what);
  802. ABORT = true;
  803. EXITSTATUS = 1;
  804. var extra = "";
  805. var output = "abort(" + what + ") at " + stackTrace() + extra;
  806. throw output
  807. }
  808. var dataURIPrefix = "data:application/octet-stream;base64,";
  809. function isDataURI(filename) {
  810. return String.prototype.startsWith ? filename.startsWith(dataURIPrefix) : filename.indexOf(dataURIPrefix) === 0
  811. }
  812. var wasmBinaryFile = "missile-v20221120.wasm";
  813. if (!isDataURI(wasmBinaryFile)) {
  814. wasmBinaryFile = locateFile(wasmBinaryFile)
  815. }
  816. function getBinary() {
  817. try {
  818. if (wasmBinary) {
  819. return new Uint8Array(wasmBinary)
  820. }
  821. if (readBinary) {
  822. return readBinary(wasmBinaryFile)
  823. } else {
  824. throw "both async and sync fetching of the wasm failed"
  825. }
  826. } catch (err) {
  827. abort(err)
  828. }
  829. }
  830. function getBinaryPromise() {
  831. if (!wasmBinary && (ENVIRONMENT_IS_WEB || ENVIRONMENT_IS_WORKER) && typeof fetch === "function") {
  832. return fetch(wasmBinaryFile, {
  833. credentials: "same-origin"
  834. }).then(function(response) {
  835. if (!response["ok"]) {
  836. throw "failed to load wasm binary file at '" + wasmBinaryFile + "'"
  837. }
  838. return response["arrayBuffer"]()
  839. }).catch(function() {
  840. return getBinary()
  841. })
  842. }
  843. return new Promise(function(resolve, reject) {
  844. resolve(getBinary())
  845. })
  846. }
  847. function createWasm() {
  848. var info = {
  849. "env": asmLibraryArg,
  850. "wasi_unstable": asmLibraryArg,
  851. "global": {
  852. "NaN": NaN,
  853. Infinity: Infinity
  854. },
  855. "global.Math": Math,
  856. "asm2wasm": asm2wasmImports
  857. };
  858. function receiveInstance(instance, module) {
  859. var exports = instance.exports;
  860. Module["asm"] = exports;
  861. removeRunDependency("wasm-instantiate")
  862. }
  863. addRunDependency("wasm-instantiate");
  864. var trueModule = Module;
  865. function receiveInstantiatedSource(output) {
  866. assert(Module === trueModule, "the Module object should not be replaced during async compilation - perhaps the order of HTML elements is wrong?");
  867. trueModule = null;
  868. receiveInstance(output["instance"])
  869. }
  870. function instantiateArrayBuffer(receiver) {
  871. return getBinaryPromise().then(function(binary) {
  872. return WebAssembly.instantiate(binary, info)
  873. }).then(receiver, function(reason) {
  874. err("failed to asynchronously prepare wasm: " + reason);
  875. abort(reason)
  876. })
  877. }
  878. function instantiateAsync() {
  879. if (!wasmBinary && typeof WebAssembly.instantiateStreaming === "function" && !isDataURI(wasmBinaryFile) && typeof fetch === "function") {
  880. fetch(wasmBinaryFile, {
  881. credentials: "same-origin"
  882. }).then(function(response) {
  883. var result = WebAssembly.instantiateStreaming(response, info);
  884. return result.then(receiveInstantiatedSource, function(reason) {
  885. err("wasm streaming compile failed: " + reason);
  886. err("falling back to ArrayBuffer instantiation");
  887. instantiateArrayBuffer(receiveInstantiatedSource)
  888. })
  889. })
  890. } else {
  891. return instantiateArrayBuffer(receiveInstantiatedSource)
  892. }
  893. }
  894. if (Module["instantiateWasm"]) {
  895. try {
  896. var exports = Module["instantiateWasm"](info, receiveInstance);
  897. return exports
  898. } catch (e) {
  899. err("Module.instantiateWasm callback failed with error: " + e);
  900. return false
  901. }
  902. }
  903. instantiateAsync();
  904. return {}
  905. }
  906. Module["asm"] = createWasm;
  907. var tempDouble;
  908. var tempI64;
  909. var ASM_CONSTS = [function() {
  910. if (typeof window != "undefined") {
  911. window.dispatchEvent(new CustomEvent("wasmLoaded"))
  912. } else {}
  913. }];
  914. function _emscripten_asm_const_i(code) {
  915. return ASM_CONSTS[code]()
  916. }
  917. __ATINIT__.push({
  918. func: function() {
  919. ___emscripten_environ_constructor()
  920. }
  921. });
  922. var tempDoublePtr = 1398208;
  923. assert(tempDoublePtr % 8 == 0);
  924. function demangle(func) {
  925. warnOnce("warning: build with -s DEMANGLE_SUPPORT=1 to link in libcxxabi demangling");
  926. return func
  927. }
  928. function demangleAll(text) {
  929. var regex = /\b__Z[\w\d_]+/g;
  930. return text.replace(regex, function(x) {
  931. var y = demangle(x);
  932. return x === y ? x : y + " [" + x + "]"
  933. })
  934. }
  935. function jsStackTrace() {
  936. var err = new Error;
  937. if (!err.stack) {
  938. try {
  939. throw new Error(0)
  940. } catch (e) {
  941. err = e
  942. }
  943. if (!err.stack) {
  944. return "(no stack trace available)"
  945. }
  946. }
  947. return err.stack.toString()
  948. }
  949. function stackTrace() {
  950. var js = jsStackTrace();
  951. if (Module["extraStackTrace"]) js += "\n" + Module["extraStackTrace"]();
  952. return demangleAll(js)
  953. }
  954. var ENV = {};
  955. function ___buildEnvironment(environ) {
  956. var MAX_ENV_VALUES = 64;
  957. var TOTAL_ENV_SIZE = 1024;
  958. var poolPtr;
  959. var envPtr;
  960. if (!___buildEnvironment.called) {
  961. ___buildEnvironment.called = true;
  962. ENV["USER"] = "web_user";
  963. ENV["LOGNAME"] = "web_user";
  964. ENV["PATH"] = "/";
  965. ENV["PWD"] = "/";
  966. ENV["HOME"] = "/home/web_user";
  967. ENV["LANG"] = (typeof navigator === "object" && navigator.languages && navigator.languages[0] || "C").replace("-", "_") + ".UTF-8";
  968. ENV["_"] = thisProgram;
  969. poolPtr = getMemory(TOTAL_ENV_SIZE);
  970. envPtr = getMemory(MAX_ENV_VALUES * 4);
  971. HEAP32[envPtr >> 2] = poolPtr;
  972. HEAP32[environ >> 2] = envPtr
  973. } else {
  974. envPtr = HEAP32[environ >> 2];
  975. poolPtr = HEAP32[envPtr >> 2]
  976. }
  977. var strings = [];
  978. var totalSize = 0;
  979. for (var key in ENV) {
  980. if (typeof ENV[key] === "string") {
  981. var line = key + "=" + ENV[key];
  982. strings.push(line);
  983. totalSize += line.length
  984. }
  985. }
  986. if (totalSize > TOTAL_ENV_SIZE) {
  987. throw new Error("Environment size exceeded TOTAL_ENV_SIZE!")
  988. }
  989. var ptrSize = 4;
  990. for (var i = 0; i < strings.length; i++) {
  991. var line = strings[i];
  992. writeAsciiToMemory(line, poolPtr);
  993. HEAP32[envPtr + i * ptrSize >> 2] = poolPtr;
  994. poolPtr += line.length + 1
  995. }
  996. HEAP32[envPtr + strings.length * ptrSize >> 2] = 0
  997. }
  998. function ___lock() {}
  999. function ___setErrNo(value) {
  1000. if (Module["___errno_location"]) HEAP32[Module["___errno_location"]() >> 2] = value;
  1001. else err("failed to set errno from JS");
  1002. return value
  1003. }
  1004. var PATH = {
  1005. splitPath: function(filename) {
  1006. var splitPathRe = /^(\/?|)([\s\S]*?)((?:\.{1,2}|[^\/]+?|)(\.[^.\/]*|))(?:[\/]*)$/;
  1007. return splitPathRe.exec(filename).slice(1)
  1008. },
  1009. normalizeArray: function(parts, allowAboveRoot) {
  1010. var up = 0;
  1011. for (var i = parts.length - 1; i >= 0; i--) {
  1012. var last = parts[i];
  1013. if (last === ".") {
  1014. parts.splice(i, 1)
  1015. } else if (last === "..") {
  1016. parts.splice(i, 1);
  1017. up++
  1018. } else if (up) {
  1019. parts.splice(i, 1);
  1020. up--
  1021. }
  1022. }
  1023. if (allowAboveRoot) {
  1024. for (; up; up--) {
  1025. parts.unshift("..")
  1026. }
  1027. }
  1028. return parts
  1029. },
  1030. normalize: function(path) {
  1031. var isAbsolute = path.charAt(0) === "/",
  1032. trailingSlash = path.substr(-1) === "/";
  1033. path = PATH.normalizeArray(path.split("/").filter(function(p) {
  1034. return !!p
  1035. }), !isAbsolute).join("/");
  1036. if (!path && !isAbsolute) {
  1037. path = "."
  1038. }
  1039. if (path && trailingSlash) {
  1040. path += "/"
  1041. }
  1042. return (isAbsolute ? "/" : "") + path
  1043. },
  1044. dirname: function(path) {
  1045. var result = PATH.splitPath(path),
  1046. root = result[0],
  1047. dir = result[1];
  1048. if (!root && !dir) {
  1049. return "."
  1050. }
  1051. if (dir) {
  1052. dir = dir.substr(0, dir.length - 1)
  1053. }
  1054. return root + dir
  1055. },
  1056. basename: function(path) {
  1057. if (path === "/") return "/";
  1058. var lastSlash = path.lastIndexOf("/");
  1059. if (lastSlash === -1) return path;
  1060. return path.substr(lastSlash + 1)
  1061. },
  1062. extname: function(path) {
  1063. return PATH.splitPath(path)[3]
  1064. },
  1065. join: function() {
  1066. var paths = Array.prototype.slice.call(arguments, 0);
  1067. return PATH.normalize(paths.join("/"))
  1068. },
  1069. join2: function(l, r) {
  1070. return PATH.normalize(l + "/" + r)
  1071. }
  1072. };
  1073. var PATH_FS = {
  1074. resolve: function() {
  1075. var resolvedPath = "",
  1076. resolvedAbsolute = false;
  1077. for (var i = arguments.length - 1; i >= -1 && !resolvedAbsolute; i--) {
  1078. var path = i >= 0 ? arguments[i] : FS.cwd();
  1079. if (typeof path !== "string") {
  1080. throw new TypeError("Arguments to path.resolve must be strings")
  1081. } else if (!path) {
  1082. return ""
  1083. }
  1084. resolvedPath = path + "/" + resolvedPath;
  1085. resolvedAbsolute = path.charAt(0) === "/"
  1086. }
  1087. resolvedPath = PATH.normalizeArray(resolvedPath.split("/").filter(function(p) {
  1088. return !!p
  1089. }), !resolvedAbsolute).join("/");
  1090. return (resolvedAbsolute ? "/" : "") + resolvedPath || "."
  1091. },
  1092. relative: function(from, to) {
  1093. from = PATH_FS.resolve(from).substr(1);
  1094. to = PATH_FS.resolve(to).substr(1);
  1095. function trim(arr) {
  1096. var start = 0;
  1097. for (; start < arr.length; start++) {
  1098. if (arr[start] !== "") break
  1099. }
  1100. var end = arr.length - 1;
  1101. for (; end >= 0; end--) {
  1102. if (arr[end] !== "") break
  1103. }
  1104. if (start > end) return [];
  1105. return arr.slice(start, end - start + 1)
  1106. }
  1107. var fromParts = trim(from.split("/"));
  1108. var toParts = trim(to.split("/"));
  1109. var length = Math.min(fromParts.length, toParts.length);
  1110. var samePartsLength = length;
  1111. for (var i = 0; i < length; i++) {
  1112. if (fromParts[i] !== toParts[i]) {
  1113. samePartsLength = i;
  1114. break
  1115. }
  1116. }
  1117. var outputParts = [];
  1118. for (var i = samePartsLength; i < fromParts.length; i++) {
  1119. outputParts.push("..")
  1120. }
  1121. outputParts = outputParts.concat(toParts.slice(samePartsLength));
  1122. return outputParts.join("/")
  1123. }
  1124. };
  1125. var TTY = {
  1126. ttys: [],
  1127. init: function() {},
  1128. shutdown: function() {},
  1129. register: function(dev, ops) {
  1130. TTY.ttys[dev] = {
  1131. input: [],
  1132. output: [],
  1133. ops: ops
  1134. };
  1135. FS.registerDevice(dev, TTY.stream_ops)
  1136. },
  1137. stream_ops: {
  1138. open: function(stream) {
  1139. var tty = TTY.ttys[stream.node.rdev];
  1140. if (!tty) {
  1141. throw new FS.ErrnoError(43)
  1142. }
  1143. stream.tty = tty;
  1144. stream.seekable = false
  1145. },
  1146. close: function(stream) {
  1147. stream.tty.ops.flush(stream.tty)
  1148. },
  1149. flush: function(stream) {
  1150. stream.tty.ops.flush(stream.tty)
  1151. },
  1152. read: function(stream, buffer, offset, length, pos) {
  1153. if (!stream.tty || !stream.tty.ops.get_char) {
  1154. throw new FS.ErrnoError(60)
  1155. }
  1156. var bytesRead = 0;
  1157. for (var i = 0; i < length; i++) {
  1158. var result;
  1159. try {
  1160. result = stream.tty.ops.get_char(stream.tty)
  1161. } catch (e) {
  1162. throw new FS.ErrnoError(29)
  1163. }
  1164. if (result === undefined && bytesRead === 0) {
  1165. throw new FS.ErrnoError(6)
  1166. }
  1167. if (result === null || result === undefined) break;
  1168. bytesRead++;
  1169. buffer[offset + i] = result
  1170. }
  1171. if (bytesRead) {
  1172. stream.node.timestamp = Date.now()
  1173. }
  1174. return bytesRead
  1175. },
  1176. write: function(stream, buffer, offset, length, pos) {
  1177. if (!stream.tty || !stream.tty.ops.put_char) {
  1178. throw new FS.ErrnoError(60)
  1179. }
  1180. try {
  1181. for (var i = 0; i < length; i++) {
  1182. stream.tty.ops.put_char(stream.tty, buffer[offset + i])
  1183. }
  1184. } catch (e) {
  1185. throw new FS.ErrnoError(29)
  1186. }
  1187. if (length) {
  1188. stream.node.timestamp = Date.now()
  1189. }
  1190. return i
  1191. }
  1192. },
  1193. default_tty_ops: {
  1194. get_char: function(tty) {
  1195. if (!tty.input.length) {
  1196. var result = null;
  1197. if (ENVIRONMENT_IS_NODE) {
  1198. var BUFSIZE = 256;
  1199. var buf = Buffer.alloc ? Buffer.alloc(BUFSIZE) : new Buffer(BUFSIZE);
  1200. var bytesRead = 0;
  1201. try {
  1202. bytesRead = fs.readSync(process.stdin.fd, buf, 0, BUFSIZE, null)
  1203. } catch (e) {
  1204. if (e.toString().indexOf("EOF") != -1) bytesRead = 0;
  1205. else throw e
  1206. }
  1207. if (bytesRead > 0) {
  1208. result = buf.slice(0, bytesRead).toString("utf-8")
  1209. } else {
  1210. result = null
  1211. }
  1212. } else if (typeof window != "undefined" && typeof window.prompt == "function") {
  1213. result = window.prompt("Input: ");
  1214. if (result !== null) {
  1215. result += "\n"
  1216. }
  1217. } else if (typeof readline == "function") {
  1218. result = readline();
  1219. if (result !== null) {
  1220. result += "\n"
  1221. }
  1222. }
  1223. if (!result) {
  1224. return null
  1225. }
  1226. tty.input = intArrayFromString(result, true)
  1227. }
  1228. return tty.input.shift()
  1229. },
  1230. put_char: function(tty, val) {
  1231. if (val === null || val === 10) {
  1232. out(UTF8ArrayToString(tty.output, 0));
  1233. tty.output = []
  1234. } else {
  1235. if (val != 0) tty.output.push(val)
  1236. }
  1237. },
  1238. flush: function(tty) {
  1239. if (tty.output && tty.output.length > 0) {
  1240. out(UTF8ArrayToString(tty.output, 0));
  1241. tty.output = []
  1242. }
  1243. }
  1244. },
  1245. default_tty1_ops: {
  1246. put_char: function(tty, val) {
  1247. if (val === null || val === 10) {
  1248. err(UTF8ArrayToString(tty.output, 0));
  1249. tty.output = []
  1250. } else {
  1251. if (val != 0) tty.output.push(val)
  1252. }
  1253. },
  1254. flush: function(tty) {
  1255. if (tty.output && tty.output.length > 0) {
  1256. err(UTF8ArrayToString(tty.output, 0));
  1257. tty.output = []
  1258. }
  1259. }
  1260. }
  1261. };
  1262. var MEMFS = {
  1263. ops_table: null,
  1264. mount: function(mount) {
  1265. return MEMFS.createNode(null, "/", 16384 | 511, 0)
  1266. },
  1267. createNode: function(parent, name, mode, dev) {
  1268. if (FS.isBlkdev(mode) || FS.isFIFO(mode)) {
  1269. throw new FS.ErrnoError(63)
  1270. }
  1271. if (!MEMFS.ops_table) {
  1272. MEMFS.ops_table = {
  1273. dir: {
  1274. node: {
  1275. getattr: MEMFS.node_ops.getattr,
  1276. setattr: MEMFS.node_ops.setattr,
  1277. lookup: MEMFS.node_ops.lookup,
  1278. mknod: MEMFS.node_ops.mknod,
  1279. rename: MEMFS.node_ops.rename,
  1280. unlink: MEMFS.node_ops.unlink,
  1281. rmdir: MEMFS.node_ops.rmdir,
  1282. readdir: MEMFS.node_ops.readdir,
  1283. symlink: MEMFS.node_ops.symlink
  1284. },
  1285. stream: {
  1286. llseek: MEMFS.stream_ops.llseek
  1287. }
  1288. },
  1289. file: {
  1290. node: {
  1291. getattr: MEMFS.node_ops.getattr,
  1292. setattr: MEMFS.node_ops.setattr
  1293. },
  1294. stream: {
  1295. llseek: MEMFS.stream_ops.llseek,
  1296. read: MEMFS.stream_ops.read,
  1297. write: MEMFS.stream_ops.write,
  1298. allocate: MEMFS.stream_ops.allocate,
  1299. mmap: MEMFS.stream_ops.mmap,
  1300. msync: MEMFS.stream_ops.msync
  1301. }
  1302. },
  1303. link: {
  1304. node: {
  1305. getattr: MEMFS.node_ops.getattr,
  1306. setattr: MEMFS.node_ops.setattr,
  1307. readlink: MEMFS.node_ops.readlink
  1308. },
  1309. stream: {}
  1310. },
  1311. chrdev: {
  1312. node: {
  1313. getattr: MEMFS.node_ops.getattr,
  1314. setattr: MEMFS.node_ops.setattr
  1315. },
  1316. stream: FS.chrdev_stream_ops
  1317. }
  1318. }
  1319. }
  1320. var node = FS.createNode(parent, name, mode, dev);
  1321. if (FS.isDir(node.mode)) {
  1322. node.node_ops = MEMFS.ops_table.dir.node;
  1323. node.stream_ops = MEMFS.ops_table.dir.stream;
  1324. node.contents = {}
  1325. } else if (FS.isFile(node.mode)) {
  1326. node.node_ops = MEMFS.ops_table.file.node;
  1327. node.stream_ops = MEMFS.ops_table.file.stream;
  1328. node.usedBytes = 0;
  1329. node.contents = null
  1330. } else if (FS.isLink(node.mode)) {
  1331. node.node_ops = MEMFS.ops_table.link.node;
  1332. node.stream_ops = MEMFS.ops_table.link.stream
  1333. } else if (FS.isChrdev(node.mode)) {
  1334. node.node_ops = MEMFS.ops_table.chrdev.node;
  1335. node.stream_ops = MEMFS.ops_table.chrdev.stream
  1336. }
  1337. node.timestamp = Date.now();
  1338. if (parent) {
  1339. parent.contents[name] = node
  1340. }
  1341. return node
  1342. },
  1343. getFileDataAsRegularArray: function(node) {
  1344. if (node.contents && node.contents.subarray) {
  1345. var arr = [];
  1346. for (var i = 0; i < node.usedBytes; ++i) arr.push(node.contents[i]);
  1347. return arr
  1348. }
  1349. return node.contents
  1350. },
  1351. getFileDataAsTypedArray: function(node) {
  1352. if (!node.contents) return new Uint8Array;
  1353. if (node.contents.subarray) return node.contents.subarray(0, node.usedBytes);
  1354. return new Uint8Array(node.contents)
  1355. },
  1356. expandFileStorage: function(node, newCapacity) {
  1357. var prevCapacity = node.contents ? node.contents.length : 0;
  1358. if (prevCapacity >= newCapacity) return;
  1359. var CAPACITY_DOUBLING_MAX = 1024 * 1024;
  1360. newCapacity = Math.max(newCapacity, prevCapacity * (prevCapacity < CAPACITY_DOUBLING_MAX ? 2 : 1.125) | 0);
  1361. if (prevCapacity != 0) newCapacity = Math.max(newCapacity, 256);
  1362. var oldContents = node.contents;
  1363. node.contents = new Uint8Array(newCapacity);
  1364. if (node.usedBytes > 0) node.contents.set(oldContents.subarray(0, node.usedBytes), 0);
  1365. return
  1366. },
  1367. resizeFileStorage: function(node, newSize) {
  1368. if (node.usedBytes == newSize) return;
  1369. if (newSize == 0) {
  1370. node.contents = null;
  1371. node.usedBytes = 0;
  1372. return
  1373. }
  1374. if (!node.contents || node.contents.subarray) {
  1375. var oldContents = node.contents;
  1376. node.contents = new Uint8Array(new ArrayBuffer(newSize));
  1377. if (oldContents) {
  1378. node.contents.set(oldContents.subarray(0, Math.min(newSize, node.usedBytes)))
  1379. }
  1380. node.usedBytes = newSize;
  1381. return
  1382. }
  1383. if (!node.contents) node.contents = [];
  1384. if (node.contents.length > newSize) node.contents.length = newSize;
  1385. else
  1386. while (node.contents.length < newSize) node.contents.push(0);
  1387. node.usedBytes = newSize
  1388. },
  1389. node_ops: {
  1390. getattr: function(node) {
  1391. var attr = {};
  1392. attr.dev = FS.isChrdev(node.mode) ? node.id : 1;
  1393. attr.ino = node.id;
  1394. attr.mode = node.mode;
  1395. attr.nlink = 1;
  1396. attr.uid = 0;
  1397. attr.gid = 0;
  1398. attr.rdev = node.rdev;
  1399. if (FS.isDir(node.mode)) {
  1400. attr.size = 4096
  1401. } else if (FS.isFile(node.mode)) {
  1402. attr.size = node.usedBytes
  1403. } else if (FS.isLink(node.mode)) {
  1404. attr.size = node.link.length
  1405. } else {
  1406. attr.size = 0
  1407. }
  1408. attr.atime = new Date(node.timestamp);
  1409. attr.mtime = new Date(node.timestamp);
  1410. attr.ctime = new Date(node.timestamp);
  1411. attr.blksize = 4096;
  1412. attr.blocks = Math.ceil(attr.size / attr.blksize);
  1413. return attr
  1414. },
  1415. setattr: function(node, attr) {
  1416. if (attr.mode !== undefined) {
  1417. node.mode = attr.mode
  1418. }
  1419. if (attr.timestamp !== undefined) {
  1420. node.timestamp = attr.timestamp
  1421. }
  1422. if (attr.size !== undefined) {
  1423. MEMFS.resizeFileStorage(node, attr.size)
  1424. }
  1425. },
  1426. lookup: function(parent, name) {
  1427. throw FS.genericErrors[44]
  1428. },
  1429. mknod: function(parent, name, mode, dev) {
  1430. return MEMFS.createNode(parent, name, mode, dev)
  1431. },
  1432. rename: function(old_node, new_dir, new_name) {
  1433. if (FS.isDir(old_node.mode)) {
  1434. var new_node;
  1435. try {
  1436. new_node = FS.lookupNode(new_dir, new_name)
  1437. } catch (e) {}
  1438. if (new_node) {
  1439. for (var i in new_node.contents) {
  1440. throw new FS.ErrnoError(55)
  1441. }
  1442. }
  1443. }
  1444. delete old_node.parent.contents[old_node.name];
  1445. old_node.name = new_name;
  1446. new_dir.contents[new_name] = old_node;
  1447. old_node.parent = new_dir
  1448. },
  1449. unlink: function(parent, name) {
  1450. delete parent.contents[name]
  1451. },
  1452. rmdir: function(parent, name) {
  1453. var node = FS.lookupNode(parent, name);
  1454. for (var i in node.contents) {
  1455. throw new FS.ErrnoError(55)
  1456. }
  1457. delete parent.contents[name]
  1458. },
  1459. readdir: function(node) {
  1460. var entries = [".", ".."];
  1461. for (var key in node.contents) {
  1462. if (!node.contents.hasOwnProperty(key)) {
  1463. continue
  1464. }
  1465. entries.push(key)
  1466. }
  1467. return entries
  1468. },
  1469. symlink: function(parent, newname, oldpath) {
  1470. var node = MEMFS.createNode(parent, newname, 511 | 40960, 0);
  1471. node.link = oldpath;
  1472. return node
  1473. },
  1474. readlink: function(node) {
  1475. if (!FS.isLink(node.mode)) {
  1476. throw new FS.ErrnoError(28)
  1477. }
  1478. return node.link
  1479. }
  1480. },
  1481. stream_ops: {
  1482. read: function(stream, buffer, offset, length, position) {
  1483. var contents = stream.node.contents;
  1484. if (position >= stream.node.usedBytes) return 0;
  1485. var size = Math.min(stream.node.usedBytes - position, length);
  1486. assert(size >= 0);
  1487. if (size > 8 && contents.subarray) {
  1488. buffer.set(contents.subarray(position, position + size), offset)
  1489. } else {
  1490. for (var i = 0; i < size; i++) buffer[offset + i] = contents[position + i]
  1491. }
  1492. return size
  1493. },
  1494. write: function(stream, buffer, offset, length, position, canOwn) {
  1495. if (!length) return 0;
  1496. var node = stream.node;
  1497. node.timestamp = Date.now();
  1498. if (buffer.subarray && (!node.contents || node.contents.subarray)) {
  1499. if (canOwn) {
  1500. assert(position === 0, "canOwn must imply no weird position inside the file");
  1501. node.contents = buffer.subarray(offset, offset + length);
  1502. node.usedBytes = length;
  1503. return length
  1504. } else if (node.usedBytes === 0 && position === 0) {
  1505. node.contents = new Uint8Array(buffer.subarray(offset, offset + length));
  1506. node.usedBytes = length;
  1507. return length
  1508. } else if (position + length <= node.usedBytes) {
  1509. node.contents.set(buffer.subarray(offset, offset + length), position);
  1510. return length
  1511. }
  1512. }
  1513. MEMFS.expandFileStorage(node, position + length);
  1514. if (node.contents.subarray && buffer.subarray) node.contents.set(buffer.subarray(offset, offset + length), position);
  1515. else {
  1516. for (var i = 0; i < length; i++) {
  1517. node.contents[position + i] = buffer[offset + i]
  1518. }
  1519. }
  1520. node.usedBytes = Math.max(node.usedBytes, position + length);
  1521. return length
  1522. },
  1523. llseek: function(stream, offset, whence) {
  1524. var position = offset;
  1525. if (whence === 1) {
  1526. position += stream.position
  1527. } else if (whence === 2) {
  1528. if (FS.isFile(stream.node.mode)) {
  1529. position += stream.node.usedBytes
  1530. }
  1531. }
  1532. if (position < 0) {
  1533. throw new FS.ErrnoError(28)
  1534. }
  1535. return position
  1536. },
  1537. allocate: function(stream, offset, length) {
  1538. MEMFS.expandFileStorage(stream.node, offset + length);
  1539. stream.node.usedBytes = Math.max(stream.node.usedBytes, offset + length)
  1540. },
  1541. mmap: function(stream, buffer, offset, length, position, prot, flags) {
  1542. if (!FS.isFile(stream.node.mode)) {
  1543. throw new FS.ErrnoError(43)
  1544. }
  1545. var ptr;
  1546. var allocated;
  1547. var contents = stream.node.contents;
  1548. if (!(flags & 2) && (contents.buffer === buffer || contents.buffer === buffer.buffer)) {
  1549. allocated = false;
  1550. ptr = contents.byteOffset
  1551. } else {
  1552. if (position > 0 || position + length < stream.node.usedBytes) {
  1553. if (contents.subarray) {
  1554. contents = contents.subarray(position, position + length)
  1555. } else {
  1556. contents = Array.prototype.slice.call(contents, position, position + length)
  1557. }
  1558. }
  1559. allocated = true;
  1560. var fromHeap = buffer.buffer == HEAP8.buffer;
  1561. ptr = _malloc(length);
  1562. if (!ptr) {
  1563. throw new FS.ErrnoError(48)
  1564. }(fromHeap ? HEAP8 : buffer).set(contents, ptr)
  1565. }
  1566. return {
  1567. ptr: ptr,
  1568. allocated: allocated
  1569. }
  1570. },
  1571. msync: function(stream, buffer, offset, length, mmapFlags) {
  1572. if (!FS.isFile(stream.node.mode)) {
  1573. throw new FS.ErrnoError(43)
  1574. }
  1575. if (mmapFlags & 2) {
  1576. return 0
  1577. }
  1578. var bytesWritten = MEMFS.stream_ops.write(stream, buffer, 0, length, offset, false);
  1579. return 0
  1580. }
  1581. }
  1582. };
  1583. var IDBFS = {
  1584. dbs: {},
  1585. indexedDB: function() {
  1586. if (typeof indexedDB !== "undefined") return indexedDB;
  1587. var ret = null;
  1588. if (typeof window === "object") ret = window.indexedDB || window.mozIndexedDB || window.webkitIndexedDB || window.msIndexedDB;
  1589. assert(ret, "IDBFS used, but indexedDB not supported");
  1590. return ret
  1591. },
  1592. DB_VERSION: 21,
  1593. DB_STORE_NAME: "FILE_DATA",
  1594. mount: function(mount) {
  1595. return MEMFS.mount.apply(null, arguments)
  1596. },
  1597. syncfs: function(mount, populate, callback) {
  1598. IDBFS.getLocalSet(mount, function(err, local) {
  1599. if (err) return callback(err);
  1600. IDBFS.getRemoteSet(mount, function(err, remote) {
  1601. if (err) return callback(err);
  1602. var src = populate ? remote : local;
  1603. var dst = populate ? local : remote;
  1604. IDBFS.reconcile(src, dst, callback)
  1605. })
  1606. })
  1607. },
  1608. getDB: function(name, callback) {
  1609. var db = IDBFS.dbs[name];
  1610. if (db) {
  1611. return callback(null, db)
  1612. }
  1613. var req;
  1614. try {
  1615. req = IDBFS.indexedDB().open(name, IDBFS.DB_VERSION)
  1616. } catch (e) {
  1617. return callback(e)
  1618. }
  1619. if (!req) {
  1620. return callback("Unable to connect to IndexedDB")
  1621. }
  1622. req.onupgradeneeded = function(e) {
  1623. var db = e.target.result;
  1624. var transaction = e.target.transaction;
  1625. var fileStore;
  1626. if (db.objectStoreNames.contains(IDBFS.DB_STORE_NAME)) {
  1627. fileStore = transaction.objectStore(IDBFS.DB_STORE_NAME)
  1628. } else {
  1629. fileStore = db.createObjectStore(IDBFS.DB_STORE_NAME)
  1630. }
  1631. if (!fileStore.indexNames.contains("timestamp")) {
  1632. fileStore.createIndex("timestamp", "timestamp", {
  1633. unique: false
  1634. })
  1635. }
  1636. };
  1637. req.onsuccess = function() {
  1638. db = req.result;
  1639. IDBFS.dbs[name] = db;
  1640. callback(null, db)
  1641. };
  1642. req.onerror = function(e) {
  1643. callback(this.error);
  1644. e.preventDefault()
  1645. }
  1646. },
  1647. getLocalSet: function(mount, callback) {
  1648. var entries = {};
  1649. function isRealDir(p) {
  1650. return p !== "." && p !== ".."
  1651. }
  1652. function toAbsolute(root) {
  1653. return function(p) {
  1654. return PATH.join2(root, p)
  1655. }
  1656. }
  1657. var check = FS.readdir(mount.mountpoint).filter(isRealDir).map(toAbsolute(mount.mountpoint));
  1658. while (check.length) {
  1659. var path = check.pop();
  1660. var stat;
  1661. try {
  1662. stat = FS.stat(path)
  1663. } catch (e) {
  1664. return callback(e)
  1665. }
  1666. if (FS.isDir(stat.mode)) {
  1667. check.push.apply(check, FS.readdir(path).filter(isRealDir).map(toAbsolute(path)))
  1668. }
  1669. entries[path] = {
  1670. timestamp: stat.mtime
  1671. }
  1672. }
  1673. return callback(null, {
  1674. type: "local",
  1675. entries: entries
  1676. })
  1677. },
  1678. getRemoteSet: function(mount, callback) {
  1679. var entries = {};
  1680. IDBFS.getDB(mount.mountpoint, function(err, db) {
  1681. if (err) return callback(err);
  1682. try {
  1683. var transaction = db.transaction([IDBFS.DB_STORE_NAME], "readonly");
  1684. transaction.onerror = function(e) {
  1685. callback(this.error);
  1686. e.preventDefault()
  1687. };
  1688. var store = transaction.objectStore(IDBFS.DB_STORE_NAME);
  1689. var index = store.index("timestamp");
  1690. index.openKeyCursor().onsuccess = function(event) {
  1691. var cursor = event.target.result;
  1692. if (!cursor) {
  1693. return callback(null, {
  1694. type: "remote",
  1695. db: db,
  1696. entries: entries
  1697. })
  1698. }
  1699. entries[cursor.primaryKey] = {
  1700. timestamp: cursor.key
  1701. };
  1702. cursor.continue()
  1703. }
  1704. } catch (e) {
  1705. return callback(e)
  1706. }
  1707. })
  1708. },
  1709. loadLocalEntry: function(path, callback) {
  1710. var stat, node;
  1711. try {
  1712. var lookup = FS.lookupPath(path);
  1713. node = lookup.node;
  1714. stat = FS.stat(path)
  1715. } catch (e) {
  1716. return callback(e)
  1717. }
  1718. if (FS.isDir(stat.mode)) {
  1719. return callback(null, {
  1720. timestamp: stat.mtime,
  1721. mode: stat.mode
  1722. })
  1723. } else if (FS.isFile(stat.mode)) {
  1724. node.contents = MEMFS.getFileDataAsTypedArray(node);
  1725. return callback(null, {
  1726. timestamp: stat.mtime,
  1727. mode: stat.mode,
  1728. contents: node.contents
  1729. })
  1730. } else {
  1731. return callback(new Error("node type not supported"))
  1732. }
  1733. },
  1734. storeLocalEntry: function(path, entry, callback) {
  1735. try {
  1736. if (FS.isDir(entry.mode)) {
  1737. FS.mkdir(path, entry.mode)
  1738. } else if (FS.isFile(entry.mode)) {
  1739. FS.writeFile(path, entry.contents, {
  1740. canOwn: true
  1741. })
  1742. } else {
  1743. return callback(new Error("node type not supported"))
  1744. }
  1745. FS.chmod(path, entry.mode);
  1746. FS.utime(path, entry.timestamp, entry.timestamp)
  1747. } catch (e) {
  1748. return callback(e)
  1749. }
  1750. callback(null)
  1751. },
  1752. removeLocalEntry: function(path, callback) {
  1753. try {
  1754. var lookup = FS.lookupPath(path);
  1755. var stat = FS.stat(path);
  1756. if (FS.isDir(stat.mode)) {
  1757. FS.rmdir(path)
  1758. } else if (FS.isFile(stat.mode)) {
  1759. FS.unlink(path)
  1760. }
  1761. } catch (e) {
  1762. return callback(e)
  1763. }
  1764. callback(null)
  1765. },
  1766. loadRemoteEntry: function(store, path, callback) {
  1767. var req = store.get(path);
  1768. req.onsuccess = function(event) {
  1769. callback(null, event.target.result)
  1770. };
  1771. req.onerror = function(e) {
  1772. callback(this.error);
  1773. e.preventDefault()
  1774. }
  1775. },
  1776. storeRemoteEntry: function(store, path, entry, callback) {
  1777. var req = store.put(entry, path);
  1778. req.onsuccess = function() {
  1779. callback(null)
  1780. };
  1781. req.onerror = function(e) {
  1782. callback(this.error);
  1783. e.preventDefault()
  1784. }
  1785. },
  1786. removeRemoteEntry: function(store, path, callback) {
  1787. var req = store.delete(path);
  1788. req.onsuccess = function() {
  1789. callback(null)
  1790. };
  1791. req.onerror = function(e) {
  1792. callback(this.error);
  1793. e.preventDefault()
  1794. }
  1795. },
  1796. reconcile: function(src, dst, callback) {
  1797. var total = 0;
  1798. var create = [];
  1799. Object.keys(src.entries).forEach(function(key) {
  1800. var e = src.entries[key];
  1801. var e2 = dst.entries[key];
  1802. if (!e2 || e.timestamp > e2.timestamp) {
  1803. create.push(key);
  1804. total++
  1805. }
  1806. });
  1807. var remove = [];
  1808. Object.keys(dst.entries).forEach(function(key) {
  1809. var e = dst.entries[key];
  1810. var e2 = src.entries[key];
  1811. if (!e2) {
  1812. remove.push(key);
  1813. total++
  1814. }
  1815. });
  1816. if (!total) {
  1817. return callback(null)
  1818. }
  1819. var errored = false;
  1820. var db = src.type === "remote" ? src.db : dst.db;
  1821. var transaction = db.transaction([IDBFS.DB_STORE_NAME], "readwrite");
  1822. var store = transaction.objectStore(IDBFS.DB_STORE_NAME);
  1823. function done(err) {
  1824. if (err && !errored) {
  1825. errored = true;
  1826. return callback(err)
  1827. }
  1828. }
  1829. transaction.onerror = function(e) {
  1830. done(this.error);
  1831. e.preventDefault()
  1832. };
  1833. transaction.oncomplete = function(e) {
  1834. if (!errored) {
  1835. callback(null)
  1836. }
  1837. };
  1838. create.sort().forEach(function(path) {
  1839. if (dst.type === "local") {
  1840. IDBFS.loadRemoteEntry(store, path, function(err, entry) {
  1841. if (err) return done(err);
  1842. IDBFS.storeLocalEntry(path, entry, done)
  1843. })
  1844. } else {
  1845. IDBFS.loadLocalEntry(path, function(err, entry) {
  1846. if (err) return done(err);
  1847. IDBFS.storeRemoteEntry(store, path, entry, done)
  1848. })
  1849. }
  1850. });
  1851. remove.sort().reverse().forEach(function(path) {
  1852. if (dst.type === "local") {
  1853. IDBFS.removeLocalEntry(path, done)
  1854. } else {
  1855. IDBFS.removeRemoteEntry(store, path, done)
  1856. }
  1857. })
  1858. }
  1859. };
  1860. var ERRNO_CODES = {
  1861. EPERM: 63,
  1862. ENOENT: 44,
  1863. ESRCH: 71,
  1864. EINTR: 27,
  1865. EIO: 29,
  1866. ENXIO: 60,
  1867. E2BIG: 1,
  1868. ENOEXEC: 45,
  1869. EBADF: 8,
  1870. ECHILD: 12,
  1871. EAGAIN: 6,
  1872. EWOULDBLOCK: 6,
  1873. ENOMEM: 48,
  1874. EACCES: 2,
  1875. EFAULT: 21,
  1876. ENOTBLK: 105,
  1877. EBUSY: 10,
  1878. EEXIST: 20,
  1879. EXDEV: 75,
  1880. ENODEV: 43,
  1881. ENOTDIR: 54,
  1882. EISDIR: 31,
  1883. EINVAL: 28,
  1884. ENFILE: 41,
  1885. EMFILE: 33,
  1886. ENOTTY: 59,
  1887. ETXTBSY: 74,
  1888. EFBIG: 22,
  1889. ENOSPC: 51,
  1890. ESPIPE: 70,
  1891. EROFS: 69,
  1892. EMLINK: 34,
  1893. EPIPE: 64,
  1894. EDOM: 18,
  1895. ERANGE: 68,
  1896. ENOMSG: 49,
  1897. EIDRM: 24,
  1898. ECHRNG: 106,
  1899. EL2NSYNC: 156,
  1900. EL3HLT: 107,
  1901. EL3RST: 108,
  1902. ELNRNG: 109,
  1903. EUNATCH: 110,
  1904. ENOCSI: 111,
  1905. EL2HLT: 112,
  1906. EDEADLK: 16,
  1907. ENOLCK: 46,
  1908. EBADE: 113,
  1909. EBADR: 114,
  1910. EXFULL: 115,
  1911. ENOANO: 104,
  1912. EBADRQC: 103,
  1913. EBADSLT: 102,
  1914. EDEADLOCK: 16,
  1915. EBFONT: 101,
  1916. ENOSTR: 100,
  1917. ENODATA: 116,
  1918. ETIME: 117,
  1919. ENOSR: 118,
  1920. ENONET: 119,
  1921. ENOPKG: 120,
  1922. EREMOTE: 121,
  1923. ENOLINK: 47,
  1924. EADV: 122,
  1925. ESRMNT: 123,
  1926. ECOMM: 124,
  1927. EPROTO: 65,
  1928. EMULTIHOP: 36,
  1929. EDOTDOT: 125,
  1930. EBADMSG: 9,
  1931. ENOTUNIQ: 126,
  1932. EBADFD: 127,
  1933. EREMCHG: 128,
  1934. ELIBACC: 129,
  1935. ELIBBAD: 130,
  1936. ELIBSCN: 131,
  1937. ELIBMAX: 132,
  1938. ELIBEXEC: 133,
  1939. ENOSYS: 52,
  1940. ENOTEMPTY: 55,
  1941. ENAMETOOLONG: 37,
  1942. ELOOP: 32,
  1943. EOPNOTSUPP: 138,
  1944. EPFNOSUPPORT: 139,
  1945. ECONNRESET: 15,
  1946. ENOBUFS: 42,
  1947. EAFNOSUPPORT: 5,
  1948. EPROTOTYPE: 67,
  1949. ENOTSOCK: 57,
  1950. ENOPROTOOPT: 50,
  1951. ESHUTDOWN: 140,
  1952. ECONNREFUSED: 14,
  1953. EADDRINUSE: 3,
  1954. ECONNABORTED: 13,
  1955. ENETUNREACH: 40,
  1956. ENETDOWN: 38,
  1957. ETIMEDOUT: 73,
  1958. EHOSTDOWN: 142,
  1959. EHOSTUNREACH: 23,
  1960. EINPROGRESS: 26,
  1961. EALREADY: 7,
  1962. EDESTADDRREQ: 17,
  1963. EMSGSIZE: 35,
  1964. EPROTONOSUPPORT: 66,
  1965. ESOCKTNOSUPPORT: 137,
  1966. EADDRNOTAVAIL: 4,
  1967. ENETRESET: 39,
  1968. EISCONN: 30,
  1969. ENOTCONN: 53,
  1970. ETOOMANYREFS: 141,
  1971. EUSERS: 136,
  1972. EDQUOT: 19,
  1973. ESTALE: 72,
  1974. ENOTSUP: 138,
  1975. ENOMEDIUM: 148,
  1976. EILSEQ: 25,
  1977. EOVERFLOW: 61,
  1978. ECANCELED: 11,
  1979. ENOTRECOVERABLE: 56,
  1980. EOWNERDEAD: 62,
  1981. ESTRPIPE: 135
  1982. };
  1983. var NODEFS = {
  1984. isWindows: false,
  1985. staticInit: function() {
  1986. NODEFS.isWindows = !!process.platform.match(/^win/);
  1987. var flags = process["binding"]("constants");
  1988. if (flags["fs"]) {
  1989. flags = flags["fs"]
  1990. }
  1991. NODEFS.flagsForNodeMap = {
  1992. 1024: flags["O_APPEND"],
  1993. 64: flags["O_CREAT"],
  1994. 128: flags["O_EXCL"],
  1995. 0: flags["O_RDONLY"],
  1996. 2: flags["O_RDWR"],
  1997. 4096: flags["O_SYNC"],
  1998. 512: flags["O_TRUNC"],
  1999. 1: flags["O_WRONLY"]
  2000. }
  2001. },
  2002. bufferFrom: function(arrayBuffer) {
  2003. return Buffer["alloc"] ? Buffer.from(arrayBuffer) : new Buffer(arrayBuffer)
  2004. },
  2005. convertNodeCode: function(e) {
  2006. var code = e.code;
  2007. assert(code in ERRNO_CODES);
  2008. return ERRNO_CODES[code]
  2009. },
  2010. mount: function(mount) {
  2011. assert(ENVIRONMENT_HAS_NODE);
  2012. return NODEFS.createNode(null, "/", NODEFS.getMode(mount.opts.root), 0)
  2013. },
  2014. createNode: function(parent, name, mode, dev) {
  2015. if (!FS.isDir(mode) && !FS.isFile(mode) && !FS.isLink(mode)) {
  2016. throw new FS.ErrnoError(28)
  2017. }
  2018. var node = FS.createNode(parent, name, mode);
  2019. node.node_ops = NODEFS.node_ops;
  2020. node.stream_ops = NODEFS.stream_ops;
  2021. return node
  2022. },
  2023. getMode: function(path) {
  2024. var stat;
  2025. try {
  2026. stat = fs.lstatSync(path);
  2027. if (NODEFS.isWindows) {
  2028. stat.mode = stat.mode | (stat.mode & 292) >> 2
  2029. }
  2030. } catch (e) {
  2031. if (!e.code) throw e;
  2032. throw new FS.ErrnoError(NODEFS.convertNodeCode(e))
  2033. }
  2034. return stat.mode
  2035. },
  2036. realPath: function(node) {
  2037. var parts = [];
  2038. while (node.parent !== node) {
  2039. parts.push(node.name);
  2040. node = node.parent
  2041. }
  2042. parts.push(node.mount.opts.root);
  2043. parts.reverse();
  2044. return PATH.join.apply(null, parts)
  2045. },
  2046. flagsForNode: function(flags) {
  2047. flags &= ~2097152;
  2048. flags &= ~2048;
  2049. flags &= ~32768;
  2050. flags &= ~524288;
  2051. var newFlags = 0;
  2052. for (var k in NODEFS.flagsForNodeMap) {
  2053. if (flags & k) {
  2054. newFlags |= NODEFS.flagsForNodeMap[k];
  2055. flags ^= k
  2056. }
  2057. }
  2058. if (!flags) {
  2059. return newFlags
  2060. } else {
  2061. throw new FS.ErrnoError(28)
  2062. }
  2063. },
  2064. node_ops: {
  2065. getattr: function(node) {
  2066. var path = NODEFS.realPath(node);
  2067. var stat;
  2068. try {
  2069. stat = fs.lstatSync(path)
  2070. } catch (e) {
  2071. if (!e.code) throw e;
  2072. throw new FS.ErrnoError(NODEFS.convertNodeCode(e))
  2073. }
  2074. if (NODEFS.isWindows && !stat.blksize) {
  2075. stat.blksize = 4096
  2076. }
  2077. if (NODEFS.isWindows && !stat.blocks) {
  2078. stat.blocks = (stat.size + stat.blksize - 1) / stat.blksize | 0
  2079. }
  2080. return {
  2081. dev: stat.dev,
  2082. ino: stat.ino,
  2083. mode: stat.mode,
  2084. nlink: stat.nlink,
  2085. uid: stat.uid,
  2086. gid: stat.gid,
  2087. rdev: stat.rdev,
  2088. size: stat.size,
  2089. atime: stat.atime,
  2090. mtime: stat.mtime,
  2091. ctime: stat.ctime,
  2092. blksize: stat.blksize,
  2093. blocks: stat.blocks
  2094. }
  2095. },
  2096. setattr: function(node, attr) {
  2097. var path = NODEFS.realPath(node);
  2098. try {
  2099. if (attr.mode !== undefined) {
  2100. fs.chmodSync(path, attr.mode);
  2101. node.mode = attr.mode
  2102. }
  2103. if (attr.timestamp !== undefined) {
  2104. var date = new Date(attr.timestamp);
  2105. fs.utimesSync(path, date, date)
  2106. }
  2107. if (attr.size !== undefined) {
  2108. fs.truncateSync(path, attr.size)
  2109. }
  2110. } catch (e) {
  2111. if (!e.code) throw e;
  2112. throw new FS.ErrnoError(NODEFS.convertNodeCode(e))
  2113. }
  2114. },
  2115. lookup: function(parent, name) {
  2116. var path = PATH.join2(NODEFS.realPath(parent), name);
  2117. var mode = NODEFS.getMode(path);
  2118. return NODEFS.createNode(parent, name, mode)
  2119. },
  2120. mknod: function(parent, name, mode, dev) {
  2121. var node = NODEFS.createNode(parent, name, mode, dev);
  2122. var path = NODEFS.realPath(node);
  2123. try {
  2124. if (FS.isDir(node.mode)) {
  2125. fs.mkdirSync(path, node.mode)
  2126. } else {
  2127. fs.writeFileSync(path, "", {
  2128. mode: node.mode
  2129. })
  2130. }
  2131. } catch (e) {
  2132. if (!e.code) throw e;
  2133. throw new FS.ErrnoError(NODEFS.convertNodeCode(e))
  2134. }
  2135. return node
  2136. },
  2137. rename: function(oldNode, newDir, newName) {
  2138. var oldPath = NODEFS.realPath(oldNode);
  2139. var newPath = PATH.join2(NODEFS.realPath(newDir), newName);
  2140. try {
  2141. fs.renameSync(oldPath, newPath)
  2142. } catch (e) {
  2143. if (!e.code) throw e;
  2144. throw new FS.ErrnoError(NODEFS.convertNodeCode(e))
  2145. }
  2146. },
  2147. unlink: function(parent, name) {
  2148. var path = PATH.join2(NODEFS.realPath(parent), name);
  2149. try {
  2150. fs.unlinkSync(path)
  2151. } catch (e) {
  2152. if (!e.code) throw e;
  2153. throw new FS.ErrnoError(NODEFS.convertNodeCode(e))
  2154. }
  2155. },
  2156. rmdir: function(parent, name) {
  2157. var path = PATH.join2(NODEFS.realPath(parent), name);
  2158. try {
  2159. fs.rmdirSync(path)
  2160. } catch (e) {
  2161. if (!e.code) throw e;
  2162. throw new FS.ErrnoError(NODEFS.convertNodeCode(e))
  2163. }
  2164. },
  2165. readdir: function(node) {
  2166. var path = NODEFS.realPath(node);
  2167. try {
  2168. return fs.readdirSync(path)
  2169. } catch (e) {
  2170. if (!e.code) throw e;
  2171. throw new FS.ErrnoError(NODEFS.convertNodeCode(e))
  2172. }
  2173. },
  2174. symlink: function(parent, newName, oldPath) {
  2175. var newPath = PATH.join2(NODEFS.realPath(parent), newName);
  2176. try {
  2177. fs.symlinkSync(oldPath, newPath)
  2178. } catch (e) {
  2179. if (!e.code) throw e;
  2180. throw new FS.ErrnoError(NODEFS.convertNodeCode(e))
  2181. }
  2182. },
  2183. readlink: function(node) {
  2184. var path = NODEFS.realPath(node);
  2185. try {
  2186. path = fs.readlinkSync(path);
  2187. path = NODEJS_PATH.relative(NODEJS_PATH.resolve(node.mount.opts.root), path);
  2188. return path
  2189. } catch (e) {
  2190. if (!e.code) throw e;
  2191. throw new FS.ErrnoError(NODEFS.convertNodeCode(e))
  2192. }
  2193. }
  2194. },
  2195. stream_ops: {
  2196. open: function(stream) {
  2197. var path = NODEFS.realPath(stream.node);
  2198. try {
  2199. if (FS.isFile(stream.node.mode)) {
  2200. stream.nfd = fs.openSync(path, NODEFS.flagsForNode(stream.flags))
  2201. }
  2202. } catch (e) {
  2203. if (!e.code) throw e;
  2204. throw new FS.ErrnoError(NODEFS.convertNodeCode(e))
  2205. }
  2206. },
  2207. close: function(stream) {
  2208. try {
  2209. if (FS.isFile(stream.node.mode) && stream.nfd) {
  2210. fs.closeSync(stream.nfd)
  2211. }
  2212. } catch (e) {
  2213. if (!e.code) throw e;
  2214. throw new FS.ErrnoError(NODEFS.convertNodeCode(e))
  2215. }
  2216. },
  2217. read: function(stream, buffer, offset, length, position) {
  2218. if (length === 0) return 0;
  2219. try {
  2220. return fs.readSync(stream.nfd, NODEFS.bufferFrom(buffer.buffer), offset, length, position)
  2221. } catch (e) {
  2222. throw new FS.ErrnoError(NODEFS.convertNodeCode(e))
  2223. }
  2224. },
  2225. write: function(stream, buffer, offset, length, position) {
  2226. try {
  2227. return fs.writeSync(stream.nfd, NODEFS.bufferFrom(buffer.buffer), offset, length, position)
  2228. } catch (e) {
  2229. throw new FS.ErrnoError(NODEFS.convertNodeCode(e))
  2230. }
  2231. },
  2232. llseek: function(stream, offset, whence) {
  2233. var position = offset;
  2234. if (whence === 1) {
  2235. position += stream.position
  2236. } else if (whence === 2) {
  2237. if (FS.isFile(stream.node.mode)) {
  2238. try {
  2239. var stat = fs.fstatSync(stream.nfd);
  2240. position += stat.size
  2241. } catch (e) {
  2242. throw new FS.ErrnoError(NODEFS.convertNodeCode(e))
  2243. }
  2244. }
  2245. }
  2246. if (position < 0) {
  2247. throw new FS.ErrnoError(28)
  2248. }
  2249. return position
  2250. }
  2251. }
  2252. };
  2253. var WORKERFS = {
  2254. DIR_MODE: 16895,
  2255. FILE_MODE: 33279,
  2256. reader: null,
  2257. mount: function(mount) {
  2258. assert(ENVIRONMENT_IS_WORKER);
  2259. if (!WORKERFS.reader) WORKERFS.reader = new FileReaderSync;
  2260. var root = WORKERFS.createNode(null, "/", WORKERFS.DIR_MODE, 0);
  2261. var createdParents = {};
  2262. function ensureParent(path) {
  2263. var parts = path.split("/");
  2264. var parent = root;
  2265. for (var i = 0; i < parts.length - 1; i++) {
  2266. var curr = parts.slice(0, i + 1).join("/");
  2267. if (!createdParents[curr]) {
  2268. createdParents[curr] = WORKERFS.createNode(parent, parts[i], WORKERFS.DIR_MODE, 0)
  2269. }
  2270. parent = createdParents[curr]
  2271. }
  2272. return parent
  2273. }
  2274. function base(path) {
  2275. var parts = path.split("/");
  2276. return parts[parts.length - 1]
  2277. }
  2278. Array.prototype.forEach.call(mount.opts["files"] || [], function(file) {
  2279. WORKERFS.createNode(ensureParent(file.name), base(file.name), WORKERFS.FILE_MODE, 0, file, file.lastModifiedDate)
  2280. });
  2281. (mount.opts["blobs"] || []).forEach(function(obj) {
  2282. WORKERFS.createNode(ensureParent(obj["name"]), base(obj["name"]), WORKERFS.FILE_MODE, 0, obj["data"])
  2283. });
  2284. (mount.opts["packages"] || []).forEach(function(pack) {
  2285. pack["metadata"].files.forEach(function(file) {
  2286. var name = file.filename.substr(1);
  2287. WORKERFS.createNode(ensureParent(name), base(name), WORKERFS.FILE_MODE, 0, pack["blob"].slice(file.start, file.end))
  2288. })
  2289. });
  2290. return root
  2291. },
  2292. createNode: function(parent, name, mode, dev, contents, mtime) {
  2293. var node = FS.createNode(parent, name, mode);
  2294. node.mode = mode;
  2295. node.node_ops = WORKERFS.node_ops;
  2296. node.stream_ops = WORKERFS.stream_ops;
  2297. node.timestamp = (mtime || new Date).getTime();
  2298. assert(WORKERFS.FILE_MODE !== WORKERFS.DIR_MODE);
  2299. if (mode === WORKERFS.FILE_MODE) {
  2300. node.size = contents.size;
  2301. node.contents = contents
  2302. } else {
  2303. node.size = 4096;
  2304. node.contents = {}
  2305. }
  2306. if (parent) {
  2307. parent.contents[name] = node
  2308. }
  2309. return node
  2310. },
  2311. node_ops: {
  2312. getattr: function(node) {
  2313. return {
  2314. dev: 1,
  2315. ino: undefined,
  2316. mode: node.mode,
  2317. nlink: 1,
  2318. uid: 0,
  2319. gid: 0,
  2320. rdev: undefined,
  2321. size: node.size,
  2322. atime: new Date(node.timestamp),
  2323. mtime: new Date(node.timestamp),
  2324. ctime: new Date(node.timestamp),
  2325. blksize: 4096,
  2326. blocks: Math.ceil(node.size / 4096)
  2327. }
  2328. },
  2329. setattr: function(node, attr) {
  2330. if (attr.mode !== undefined) {
  2331. node.mode = attr.mode
  2332. }
  2333. if (attr.timestamp !== undefined) {
  2334. node.timestamp = attr.timestamp
  2335. }
  2336. },
  2337. lookup: function(parent, name) {
  2338. throw new FS.ErrnoError(44)
  2339. },
  2340. mknod: function(parent, name, mode, dev) {
  2341. throw new FS.ErrnoError(63)
  2342. },
  2343. rename: function(oldNode, newDir, newName) {
  2344. throw new FS.ErrnoError(63)
  2345. },
  2346. unlink: function(parent, name) {
  2347. throw new FS.ErrnoError(63)
  2348. },
  2349. rmdir: function(parent, name) {
  2350. throw new FS.ErrnoError(63)
  2351. },
  2352. readdir: function(node) {
  2353. var entries = [".", ".."];
  2354. for (var key in node.contents) {
  2355. if (!node.contents.hasOwnProperty(key)) {
  2356. continue
  2357. }
  2358. entries.push(key)
  2359. }
  2360. return entries
  2361. },
  2362. symlink: function(parent, newName, oldPath) {
  2363. throw new FS.ErrnoError(63)
  2364. },
  2365. readlink: function(node) {
  2366. throw new FS.ErrnoError(63)
  2367. }
  2368. },
  2369. stream_ops: {
  2370. read: function(stream, buffer, offset, length, position) {
  2371. if (position >= stream.node.size) return 0;
  2372. var chunk = stream.node.contents.slice(position, position + length);
  2373. var ab = WORKERFS.reader.readAsArrayBuffer(chunk);
  2374. buffer.set(new Uint8Array(ab), offset);
  2375. return chunk.size
  2376. },
  2377. write: function(stream, buffer, offset, length, position) {
  2378. throw new FS.ErrnoError(29)
  2379. },
  2380. llseek: function(stream, offset, whence) {
  2381. var position = offset;
  2382. if (whence === 1) {
  2383. position += stream.position
  2384. } else if (whence === 2) {
  2385. if (FS.isFile(stream.node.mode)) {
  2386. position += stream.node.size
  2387. }
  2388. }
  2389. if (position < 0) {
  2390. throw new FS.ErrnoError(28)
  2391. }
  2392. return position
  2393. }
  2394. }
  2395. };
  2396. var ERRNO_MESSAGES = {
  2397. 0: "Success",
  2398. 1: "Arg list too long",
  2399. 2: "Permission denied",
  2400. 3: "Address already in use",
  2401. 4: "Address not available",
  2402. 5: "Address family not supported by protocol family",
  2403. 6: "No more processes",
  2404. 7: "Socket already connected",
  2405. 8: "Bad file number",
  2406. 9: "Trying to read unreadable message",
  2407. 10: "Mount device busy",
  2408. 11: "Operation canceled",
  2409. 12: "No children",
  2410. 13: "Connection aborted",
  2411. 14: "Connection refused",
  2412. 15: "Connection reset by peer",
  2413. 16: "File locking deadlock error",
  2414. 17: "Destination address required",
  2415. 18: "Math arg out of domain of func",
  2416. 19: "Quota exceeded",
  2417. 20: "File exists",
  2418. 21: "Bad address",
  2419. 22: "File too large",
  2420. 23: "Host is unreachable",
  2421. 24: "Identifier removed",
  2422. 25: "Illegal byte sequence",
  2423. 26: "Connection already in progress",
  2424. 27: "Interrupted system call",
  2425. 28: "Invalid argument",
  2426. 29: "I/O error",
  2427. 30: "Socket is already connected",
  2428. 31: "Is a directory",
  2429. 32: "Too many symbolic links",
  2430. 33: "Too many open files",
  2431. 34: "Too many links",
  2432. 35: "Message too long",
  2433. 36: "Multihop attempted",
  2434. 37: "File or path name too long",
  2435. 38: "Network interface is not configured",
  2436. 39: "Connection reset by network",
  2437. 40: "Network is unreachable",
  2438. 41: "Too many open files in system",
  2439. 42: "No buffer space available",
  2440. 43: "No such device",
  2441. 44: "No such file or directory",
  2442. 45: "Exec format error",
  2443. 46: "No record locks available",
  2444. 47: "The link has been severed",
  2445. 48: "Not enough core",
  2446. 49: "No message of desired type",
  2447. 50: "Protocol not available",
  2448. 51: "No space left on device",
  2449. 52: "Function not implemented",
  2450. 53: "Socket is not connected",
  2451. 54: "Not a directory",
  2452. 55: "Directory not empty",
  2453. 56: "State not recoverable",
  2454. 57: "Socket operation on non-socket",
  2455. 59: "Not a typewriter",
  2456. 60: "No such device or address",
  2457. 61: "Value too large for defined data type",
  2458. 62: "Previous owner died",
  2459. 63: "Not super-user",
  2460. 64: "Broken pipe",
  2461. 65: "Protocol error",
  2462. 66: "Unknown protocol",
  2463. 67: "Protocol wrong type for socket",
  2464. 68: "Math result not representable",
  2465. 69: "Read only file system",
  2466. 70: "Illegal seek",
  2467. 71: "No such process",
  2468. 72: "Stale file handle",
  2469. 73: "Connection timed out",
  2470. 74: "Text file busy",
  2471. 75: "Cross-device link",
  2472. 100: "Device not a stream",
  2473. 101: "Bad font file fmt",
  2474. 102: "Invalid slot",
  2475. 103: "Invalid request code",
  2476. 104: "No anode",
  2477. 105: "Block device required",
  2478. 106: "Channel number out of range",
  2479. 107: "Level 3 halted",
  2480. 108: "Level 3 reset",
  2481. 109: "Link number out of range",
  2482. 110: "Protocol driver not attached",
  2483. 111: "No CSI structure available",
  2484. 112: "Level 2 halted",
  2485. 113: "Invalid exchange",
  2486. 114: "Invalid request descriptor",
  2487. 115: "Exchange full",
  2488. 116: "No data (for no delay io)",
  2489. 117: "Timer expired",
  2490. 118: "Out of streams resources",
  2491. 119: "Machine is not on the network",
  2492. 120: "Package not installed",
  2493. 121: "The object is remote",
  2494. 122: "Advertise error",
  2495. 123: "Srmount error",
  2496. 124: "Communication error on send",
  2497. 125: "Cross mount point (not really error)",
  2498. 126: "Given log. name not unique",
  2499. 127: "f.d. invalid for this operation",
  2500. 128: "Remote address changed",
  2501. 129: "Can access a needed shared lib",
  2502. 130: "Accessing a corrupted shared lib",
  2503. 131: ".lib section in a.out corrupted",
  2504. 132: "Attempting to link in too many libs",
  2505. 133: "Attempting to exec a shared library",
  2506. 135: "Streams pipe error",
  2507. 136: "Too many users",
  2508. 137: "Socket type not supported",
  2509. 138: "Not supported",
  2510. 139: "Protocol family not supported",
  2511. 140: "Can't send after socket shutdown",
  2512. 141: "Too many references",
  2513. 142: "Host is down",
  2514. 148: "No medium (in tape drive)",
  2515. 156: "Level 2 not synchronized"
  2516. };
  2517. var FS = {
  2518. root: null,
  2519. mounts: [],
  2520. devices: {},
  2521. streams: [],
  2522. nextInode: 1,
  2523. nameTable: null,
  2524. currentPath: "/",
  2525. initialized: false,
  2526. ignorePermissions: true,
  2527. trackingDelegate: {},
  2528. tracking: {
  2529. openFlags: {
  2530. READ: 1,
  2531. WRITE: 2
  2532. }
  2533. },
  2534. ErrnoError: null,
  2535. genericErrors: {},
  2536. filesystems: null,
  2537. syncFSRequests: 0,
  2538. handleFSError: function(e) {
  2539. if (!(e instanceof FS.ErrnoError)) throw e + " : " + stackTrace();
  2540. return ___setErrNo(e.errno)
  2541. },
  2542. lookupPath: function(path, opts) {
  2543. path = PATH_FS.resolve(FS.cwd(), path);
  2544. opts = opts || {};
  2545. if (!path) return {
  2546. path: "",
  2547. node: null
  2548. };
  2549. var defaults = {
  2550. follow_mount: true,
  2551. recurse_count: 0
  2552. };
  2553. for (var key in defaults) {
  2554. if (opts[key] === undefined) {
  2555. opts[key] = defaults[key]
  2556. }
  2557. }
  2558. if (opts.recurse_count > 8) {
  2559. throw new FS.ErrnoError(32)
  2560. }
  2561. var parts = PATH.normalizeArray(path.split("/").filter(function(p) {
  2562. return !!p
  2563. }), false);
  2564. var current = FS.root;
  2565. var current_path = "/";
  2566. for (var i = 0; i < parts.length; i++) {
  2567. var islast = i === parts.length - 1;
  2568. if (islast && opts.parent) {
  2569. break
  2570. }
  2571. current = FS.lookupNode(current, parts[i]);
  2572. current_path = PATH.join2(current_path, parts[i]);
  2573. if (FS.isMountpoint(current)) {
  2574. if (!islast || islast && opts.follow_mount) {
  2575. current = current.mounted.root
  2576. }
  2577. }
  2578. if (!islast || opts.follow) {
  2579. var count = 0;
  2580. while (FS.isLink(current.mode)) {
  2581. var link = FS.readlink(current_path);
  2582. current_path = PATH_FS.resolve(PATH.dirname(current_path), link);
  2583. var lookup = FS.lookupPath(current_path, {
  2584. recurse_count: opts.recurse_count
  2585. });
  2586. current = lookup.node;
  2587. if (count++ > 40) {
  2588. throw new FS.ErrnoError(32)
  2589. }
  2590. }
  2591. }
  2592. }
  2593. return {
  2594. path: current_path,
  2595. node: current
  2596. }
  2597. },
  2598. getPath: function(node) {
  2599. var path;
  2600. while (true) {
  2601. if (FS.isRoot(node)) {
  2602. var mount = node.mount.mountpoint;
  2603. if (!path) return mount;
  2604. return mount[mount.length - 1] !== "/" ? mount + "/" + path : mount + path
  2605. }
  2606. path = path ? node.name + "/" + path : node.name;
  2607. node = node.parent
  2608. }
  2609. },
  2610. hashName: function(parentid, name) {
  2611. var hash = 0;
  2612. for (var i = 0; i < name.length; i++) {
  2613. hash = (hash << 5) - hash + name.charCodeAt(i) | 0
  2614. }
  2615. return (parentid + hash >>> 0) % FS.nameTable.length
  2616. },
  2617. hashAddNode: function(node) {
  2618. var hash = FS.hashName(node.parent.id, node.name);
  2619. node.name_next = FS.nameTable[hash];
  2620. FS.nameTable[hash] = node
  2621. },
  2622. hashRemoveNode: function(node) {
  2623. var hash = FS.hashName(node.parent.id, node.name);
  2624. if (FS.nameTable[hash] === node) {
  2625. FS.nameTable[hash] = node.name_next
  2626. } else {
  2627. var current = FS.nameTable[hash];
  2628. while (current) {
  2629. if (current.name_next === node) {
  2630. current.name_next = node.name_next;
  2631. break
  2632. }
  2633. current = current.name_next
  2634. }
  2635. }
  2636. },
  2637. lookupNode: function(parent, name) {
  2638. var err = FS.mayLookup(parent);
  2639. if (err) {
  2640. throw new FS.ErrnoError(err, parent)
  2641. }
  2642. var hash = FS.hashName(parent.id, name);
  2643. for (var node = FS.nameTable[hash]; node; node = node.name_next) {
  2644. var nodeName = node.name;
  2645. if (node.parent.id === parent.id && nodeName === name) {
  2646. return node
  2647. }
  2648. }
  2649. return FS.lookup(parent, name)
  2650. },
  2651. createNode: function(parent, name, mode, rdev) {
  2652. if (!FS.FSNode) {
  2653. FS.FSNode = function(parent, name, mode, rdev) {
  2654. if (!parent) {
  2655. parent = this
  2656. }
  2657. this.parent = parent;
  2658. this.mount = parent.mount;
  2659. this.mounted = null;
  2660. this.id = FS.nextInode++;
  2661. this.name = name;
  2662. this.mode = mode;
  2663. this.node_ops = {};
  2664. this.stream_ops = {};
  2665. this.rdev = rdev
  2666. };
  2667. FS.FSNode.prototype = {};
  2668. var readMode = 292 | 73;
  2669. var writeMode = 146;
  2670. Object.defineProperties(FS.FSNode.prototype, {
  2671. read: {
  2672. get: function() {
  2673. return (this.mode & readMode) === readMode
  2674. },
  2675. set: function(val) {
  2676. val ? this.mode |= readMode : this.mode &= ~readMode
  2677. }
  2678. },
  2679. write: {
  2680. get: function() {
  2681. return (this.mode & writeMode) === writeMode
  2682. },
  2683. set: function(val) {
  2684. val ? this.mode |= writeMode : this.mode &= ~writeMode
  2685. }
  2686. },
  2687. isFolder: {
  2688. get: function() {
  2689. return FS.isDir(this.mode)
  2690. }
  2691. },
  2692. isDevice: {
  2693. get: function() {
  2694. return FS.isChrdev(this.mode)
  2695. }
  2696. }
  2697. })
  2698. }
  2699. var node = new FS.FSNode(parent, name, mode, rdev);
  2700. FS.hashAddNode(node);
  2701. return node
  2702. },
  2703. destroyNode: function(node) {
  2704. FS.hashRemoveNode(node)
  2705. },
  2706. isRoot: function(node) {
  2707. return node === node.parent
  2708. },
  2709. isMountpoint: function(node) {
  2710. return !!node.mounted
  2711. },
  2712. isFile: function(mode) {
  2713. return (mode & 61440) === 32768
  2714. },
  2715. isDir: function(mode) {
  2716. return (mode & 61440) === 16384
  2717. },
  2718. isLink: function(mode) {
  2719. return (mode & 61440) === 40960
  2720. },
  2721. isChrdev: function(mode) {
  2722. return (mode & 61440) === 8192
  2723. },
  2724. isBlkdev: function(mode) {
  2725. return (mode & 61440) === 24576
  2726. },
  2727. isFIFO: function(mode) {
  2728. return (mode & 61440) === 4096
  2729. },
  2730. isSocket: function(mode) {
  2731. return (mode & 49152) === 49152
  2732. },
  2733. flagModes: {
  2734. "r": 0,
  2735. "rs": 1052672,
  2736. "r+": 2,
  2737. "w": 577,
  2738. "wx": 705,
  2739. "xw": 705,
  2740. "w+": 578,
  2741. "wx+": 706,
  2742. "xw+": 706,
  2743. "a": 1089,
  2744. "ax": 1217,
  2745. "xa": 1217,
  2746. "a+": 1090,
  2747. "ax+": 1218,
  2748. "xa+": 1218
  2749. },
  2750. modeStringToFlags: function(str) {
  2751. var flags = FS.flagModes[str];
  2752. if (typeof flags === "undefined") {
  2753. throw new Error("Unknown file open mode: " + str)
  2754. }
  2755. return flags
  2756. },
  2757. flagsToPermissionString: function(flag) {
  2758. var perms = ["r", "w", "rw"][flag & 3];
  2759. if (flag & 512) {
  2760. perms += "w"
  2761. }
  2762. return perms
  2763. },
  2764. nodePermissions: function(node, perms) {
  2765. if (FS.ignorePermissions) {
  2766. return 0
  2767. }
  2768. if (perms.indexOf("r") !== -1 && !(node.mode & 292)) {
  2769. return 2
  2770. } else if (perms.indexOf("w") !== -1 && !(node.mode & 146)) {
  2771. return 2
  2772. } else if (perms.indexOf("x") !== -1 && !(node.mode & 73)) {
  2773. return 2
  2774. }
  2775. return 0
  2776. },
  2777. mayLookup: function(dir) {
  2778. var err = FS.nodePermissions(dir, "x");
  2779. if (err) return err;
  2780. if (!dir.node_ops.lookup) return 2;
  2781. return 0
  2782. },
  2783. mayCreate: function(dir, name) {
  2784. try {
  2785. var node = FS.lookupNode(dir, name);
  2786. return 20
  2787. } catch (e) {}
  2788. return FS.nodePermissions(dir, "wx")
  2789. },
  2790. mayDelete: function(dir, name, isdir) {
  2791. var node;
  2792. try {
  2793. node = FS.lookupNode(dir, name)
  2794. } catch (e) {
  2795. return e.errno
  2796. }
  2797. var err = FS.nodePermissions(dir, "wx");
  2798. if (err) {
  2799. return err
  2800. }
  2801. if (isdir) {
  2802. if (!FS.isDir(node.mode)) {
  2803. return 54
  2804. }
  2805. if (FS.isRoot(node) || FS.getPath(node) === FS.cwd()) {
  2806. return 10
  2807. }
  2808. } else {
  2809. if (FS.isDir(node.mode)) {
  2810. return 31
  2811. }
  2812. }
  2813. return 0
  2814. },
  2815. mayOpen: function(node, flags) {
  2816. if (!node) {
  2817. return 44
  2818. }
  2819. if (FS.isLink(node.mode)) {
  2820. return 32
  2821. } else if (FS.isDir(node.mode)) {
  2822. if (FS.flagsToPermissionString(flags) !== "r" || flags & 512) {
  2823. return 31
  2824. }
  2825. }
  2826. return FS.nodePermissions(node, FS.flagsToPermissionString(flags))
  2827. },
  2828. MAX_OPEN_FDS: 4096,
  2829. nextfd: function(fd_start, fd_end) {
  2830. fd_start = fd_start || 0;
  2831. fd_end = fd_end || FS.MAX_OPEN_FDS;
  2832. for (var fd = fd_start; fd <= fd_end; fd++) {
  2833. if (!FS.streams[fd]) {
  2834. return fd
  2835. }
  2836. }
  2837. throw new FS.ErrnoError(33)
  2838. },
  2839. getStream: function(fd) {
  2840. return FS.streams[fd]
  2841. },
  2842. createStream: function(stream, fd_start, fd_end) {
  2843. if (!FS.FSStream) {
  2844. FS.FSStream = function() {};
  2845. FS.FSStream.prototype = {};
  2846. Object.defineProperties(FS.FSStream.prototype, {
  2847. object: {
  2848. get: function() {
  2849. return this.node
  2850. },
  2851. set: function(val) {
  2852. this.node = val
  2853. }
  2854. },
  2855. isRead: {
  2856. get: function() {
  2857. return (this.flags & 2097155) !== 1
  2858. }
  2859. },
  2860. isWrite: {
  2861. get: function() {
  2862. return (this.flags & 2097155) !== 0
  2863. }
  2864. },
  2865. isAppend: {
  2866. get: function() {
  2867. return this.flags & 1024
  2868. }
  2869. }
  2870. })
  2871. }
  2872. var newStream = new FS.FSStream;
  2873. for (var p in stream) {
  2874. newStream[p] = stream[p]
  2875. }
  2876. stream = newStream;
  2877. var fd = FS.nextfd(fd_start, fd_end);
  2878. stream.fd = fd;
  2879. FS.streams[fd] = stream;
  2880. return stream
  2881. },
  2882. closeStream: function(fd) {
  2883. FS.streams[fd] = null
  2884. },
  2885. chrdev_stream_ops: {
  2886. open: function(stream) {
  2887. var device = FS.getDevice(stream.node.rdev);
  2888. stream.stream_ops = device.stream_ops;
  2889. if (stream.stream_ops.open) {
  2890. stream.stream_ops.open(stream)
  2891. }
  2892. },
  2893. llseek: function() {
  2894. throw new FS.ErrnoError(70)
  2895. }
  2896. },
  2897. major: function(dev) {
  2898. return dev >> 8
  2899. },
  2900. minor: function(dev) {
  2901. return dev & 255
  2902. },
  2903. makedev: function(ma, mi) {
  2904. return ma << 8 | mi
  2905. },
  2906. registerDevice: function(dev, ops) {
  2907. FS.devices[dev] = {
  2908. stream_ops: ops
  2909. }
  2910. },
  2911. getDevice: function(dev) {
  2912. return FS.devices[dev]
  2913. },
  2914. getMounts: function(mount) {
  2915. var mounts = [];
  2916. var check = [mount];
  2917. while (check.length) {
  2918. var m = check.pop();
  2919. mounts.push(m);
  2920. check.push.apply(check, m.mounts)
  2921. }
  2922. return mounts
  2923. },
  2924. syncfs: function(populate, callback) {
  2925. if (typeof populate === "function") {
  2926. callback = populate;
  2927. populate = false
  2928. }
  2929. FS.syncFSRequests++;
  2930. if (FS.syncFSRequests > 1) {
  2931. console.log("warning: " + FS.syncFSRequests + " FS.syncfs operations in flight at once, probably just doing extra work")
  2932. }
  2933. var mounts = FS.getMounts(FS.root.mount);
  2934. var completed = 0;
  2935. function doCallback(err) {
  2936. assert(FS.syncFSRequests > 0);
  2937. FS.syncFSRequests--;
  2938. return callback(err)
  2939. }
  2940. function done(err) {
  2941. if (err) {
  2942. if (!done.errored) {
  2943. done.errored = true;
  2944. return doCallback(err)
  2945. }
  2946. return
  2947. }
  2948. if (++completed >= mounts.length) {
  2949. doCallback(null)
  2950. }
  2951. }
  2952. mounts.forEach(function(mount) {
  2953. if (!mount.type.syncfs) {
  2954. return done(null)
  2955. }
  2956. mount.type.syncfs(mount, populate, done)
  2957. })
  2958. },
  2959. mount: function(type, opts, mountpoint) {
  2960. var root = mountpoint === "/";
  2961. var pseudo = !mountpoint;
  2962. var node;
  2963. if (root && FS.root) {
  2964. throw new FS.ErrnoError(10)
  2965. } else if (!root && !pseudo) {
  2966. var lookup = FS.lookupPath(mountpoint, {
  2967. follow_mount: false
  2968. });
  2969. mountpoint = lookup.path;
  2970. node = lookup.node;
  2971. if (FS.isMountpoint(node)) {
  2972. throw new FS.ErrnoError(10)
  2973. }
  2974. if (!FS.isDir(node.mode)) {
  2975. throw new FS.ErrnoError(54)
  2976. }
  2977. }
  2978. var mount = {
  2979. type: type,
  2980. opts: opts,
  2981. mountpoint: mountpoint,
  2982. mounts: []
  2983. };
  2984. var mountRoot = type.mount(mount);
  2985. mountRoot.mount = mount;
  2986. mount.root = mountRoot;
  2987. if (root) {
  2988. FS.root = mountRoot
  2989. } else if (node) {
  2990. node.mounted = mount;
  2991. if (node.mount) {
  2992. node.mount.mounts.push(mount)
  2993. }
  2994. }
  2995. return mountRoot
  2996. },
  2997. unmount: function(mountpoint) {
  2998. var lookup = FS.lookupPath(mountpoint, {
  2999. follow_mount: false
  3000. });
  3001. if (!FS.isMountpoint(lookup.node)) {
  3002. throw new FS.ErrnoError(28)
  3003. }
  3004. var node = lookup.node;
  3005. var mount = node.mounted;
  3006. var mounts = FS.getMounts(mount);
  3007. Object.keys(FS.nameTable).forEach(function(hash) {
  3008. var current = FS.nameTable[hash];
  3009. while (current) {
  3010. var next = current.name_next;
  3011. if (mounts.indexOf(current.mount) !== -1) {
  3012. FS.destroyNode(current)
  3013. }
  3014. current = next
  3015. }
  3016. });
  3017. node.mounted = null;
  3018. var idx = node.mount.mounts.indexOf(mount);
  3019. assert(idx !== -1);
  3020. node.mount.mounts.splice(idx, 1)
  3021. },
  3022. lookup: function(parent, name) {
  3023. return parent.node_ops.lookup(parent, name)
  3024. },
  3025. mknod: function(path, mode, dev) {
  3026. var lookup = FS.lookupPath(path, {
  3027. parent: true
  3028. });
  3029. var parent = lookup.node;
  3030. var name = PATH.basename(path);
  3031. if (!name || name === "." || name === "..") {
  3032. throw new FS.ErrnoError(28)
  3033. }
  3034. var err = FS.mayCreate(parent, name);
  3035. if (err) {
  3036. throw new FS.ErrnoError(err)
  3037. }
  3038. if (!parent.node_ops.mknod) {
  3039. throw new FS.ErrnoError(63)
  3040. }
  3041. return parent.node_ops.mknod(parent, name, mode, dev)
  3042. },
  3043. create: function(path, mode) {
  3044. mode = mode !== undefined ? mode : 438;
  3045. mode &= 4095;
  3046. mode |= 32768;
  3047. return FS.mknod(path, mode, 0)
  3048. },
  3049. mkdir: function(path, mode) {
  3050. mode = mode !== undefined ? mode : 511;
  3051. mode &= 511 | 512;
  3052. mode |= 16384;
  3053. return FS.mknod(path, mode, 0)
  3054. },
  3055. mkdirTree: function(path, mode) {
  3056. var dirs = path.split("/");
  3057. var d = "";
  3058. for (var i = 0; i < dirs.length; ++i) {
  3059. if (!dirs[i]) continue;
  3060. d += "/" + dirs[i];
  3061. try {
  3062. FS.mkdir(d, mode)
  3063. } catch (e) {
  3064. if (e.errno != 20) throw e
  3065. }
  3066. }
  3067. },
  3068. mkdev: function(path, mode, dev) {
  3069. if (typeof dev === "undefined") {
  3070. dev = mode;
  3071. mode = 438
  3072. }
  3073. mode |= 8192;
  3074. return FS.mknod(path, mode, dev)
  3075. },
  3076. symlink: function(oldpath, newpath) {
  3077. if (!PATH_FS.resolve(oldpath)) {
  3078. throw new FS.ErrnoError(44)
  3079. }
  3080. var lookup = FS.lookupPath(newpath, {
  3081. parent: true
  3082. });
  3083. var parent = lookup.node;
  3084. if (!parent) {
  3085. throw new FS.ErrnoError(44)
  3086. }
  3087. var newname = PATH.basename(newpath);
  3088. var err = FS.mayCreate(parent, newname);
  3089. if (err) {
  3090. throw new FS.ErrnoError(err)
  3091. }
  3092. if (!parent.node_ops.symlink) {
  3093. throw new FS.ErrnoError(63)
  3094. }
  3095. return parent.node_ops.symlink(parent, newname, oldpath)
  3096. },
  3097. rename: function(old_path, new_path) {
  3098. var old_dirname = PATH.dirname(old_path);
  3099. var new_dirname = PATH.dirname(new_path);
  3100. var old_name = PATH.basename(old_path);
  3101. var new_name = PATH.basename(new_path);
  3102. var lookup, old_dir, new_dir;
  3103. try {
  3104. lookup = FS.lookupPath(old_path, {
  3105. parent: true
  3106. });
  3107. old_dir = lookup.node;
  3108. lookup = FS.lookupPath(new_path, {
  3109. parent: true
  3110. });
  3111. new_dir = lookup.node
  3112. } catch (e) {
  3113. throw new FS.ErrnoError(10)
  3114. }
  3115. if (!old_dir || !new_dir) throw new FS.ErrnoError(44);
  3116. if (old_dir.mount !== new_dir.mount) {
  3117. throw new FS.ErrnoError(75)
  3118. }
  3119. var old_node = FS.lookupNode(old_dir, old_name);
  3120. var relative = PATH_FS.relative(old_path, new_dirname);
  3121. if (relative.charAt(0) !== ".") {
  3122. throw new FS.ErrnoError(28)
  3123. }
  3124. relative = PATH_FS.relative(new_path, old_dirname);
  3125. if (relative.charAt(0) !== ".") {
  3126. throw new FS.ErrnoError(55)
  3127. }
  3128. var new_node;
  3129. try {
  3130. new_node = FS.lookupNode(new_dir, new_name)
  3131. } catch (e) {}
  3132. if (old_node === new_node) {
  3133. return
  3134. }
  3135. var isdir = FS.isDir(old_node.mode);
  3136. var err = FS.mayDelete(old_dir, old_name, isdir);
  3137. if (err) {
  3138. throw new FS.ErrnoError(err)
  3139. }
  3140. err = new_node ? FS.mayDelete(new_dir, new_name, isdir) : FS.mayCreate(new_dir, new_name);
  3141. if (err) {
  3142. throw new FS.ErrnoError(err)
  3143. }
  3144. if (!old_dir.node_ops.rename) {
  3145. throw new FS.ErrnoError(63)
  3146. }
  3147. if (FS.isMountpoint(old_node) || new_node && FS.isMountpoint(new_node)) {
  3148. throw new FS.ErrnoError(10)
  3149. }
  3150. if (new_dir !== old_dir) {
  3151. err = FS.nodePermissions(old_dir, "w");
  3152. if (err) {
  3153. throw new FS.ErrnoError(err)
  3154. }
  3155. }
  3156. try {
  3157. if (FS.trackingDelegate["willMovePath"]) {
  3158. FS.trackingDelegate["willMovePath"](old_path, new_path)
  3159. }
  3160. } catch (e) {
  3161. console.log("FS.trackingDelegate['willMovePath']('" + old_path + "', '" + new_path + "') threw an exception: " + e.message)
  3162. }
  3163. FS.hashRemoveNode(old_node);
  3164. try {
  3165. old_dir.node_ops.rename(old_node, new_dir, new_name)
  3166. } catch (e) {
  3167. throw e
  3168. } finally {
  3169. FS.hashAddNode(old_node)
  3170. }
  3171. try {
  3172. if (FS.trackingDelegate["onMovePath"]) FS.trackingDelegate["onMovePath"](old_path, new_path)
  3173. } catch (e) {
  3174. console.log("FS.trackingDelegate['onMovePath']('" + old_path + "', '" + new_path + "') threw an exception: " + e.message)
  3175. }
  3176. },
  3177. rmdir: function(path) {
  3178. var lookup = FS.lookupPath(path, {
  3179. parent: true
  3180. });
  3181. var parent = lookup.node;
  3182. var name = PATH.basename(path);
  3183. var node = FS.lookupNode(parent, name);
  3184. var err = FS.mayDelete(parent, name, true);
  3185. if (err) {
  3186. throw new FS.ErrnoError(err)
  3187. }
  3188. if (!parent.node_ops.rmdir) {
  3189. throw new FS.ErrnoError(63)
  3190. }
  3191. if (FS.isMountpoint(node)) {
  3192. throw new FS.ErrnoError(10)
  3193. }
  3194. try {
  3195. if (FS.trackingDelegate["willDeletePath"]) {
  3196. FS.trackingDelegate["willDeletePath"](path)
  3197. }
  3198. } catch (e) {
  3199. console.log("FS.trackingDelegate['willDeletePath']('" + path + "') threw an exception: " + e.message)
  3200. }
  3201. parent.node_ops.rmdir(parent, name);
  3202. FS.destroyNode(node);
  3203. try {
  3204. if (FS.trackingDelegate["onDeletePath"]) FS.trackingDelegate["onDeletePath"](path)
  3205. } catch (e) {
  3206. console.log("FS.trackingDelegate['onDeletePath']('" + path + "') threw an exception: " + e.message)
  3207. }
  3208. },
  3209. readdir: function(path) {
  3210. var lookup = FS.lookupPath(path, {
  3211. follow: true
  3212. });
  3213. var node = lookup.node;
  3214. if (!node.node_ops.readdir) {
  3215. throw new FS.ErrnoError(54)
  3216. }
  3217. return node.node_ops.readdir(node)
  3218. },
  3219. unlink: function(path) {
  3220. var lookup = FS.lookupPath(path, {
  3221. parent: true
  3222. });
  3223. var parent = lookup.node;
  3224. var name = PATH.basename(path);
  3225. var node = FS.lookupNode(parent, name);
  3226. var err = FS.mayDelete(parent, name, false);
  3227. if (err) {
  3228. throw new FS.ErrnoError(err)
  3229. }
  3230. if (!parent.node_ops.unlink) {
  3231. throw new FS.ErrnoError(63)
  3232. }
  3233. if (FS.isMountpoint(node)) {
  3234. throw new FS.ErrnoError(10)
  3235. }
  3236. try {
  3237. if (FS.trackingDelegate["willDeletePath"]) {
  3238. FS.trackingDelegate["willDeletePath"](path)
  3239. }
  3240. } catch (e) {
  3241. console.log("FS.trackingDelegate['willDeletePath']('" + path + "') threw an exception: " + e.message)
  3242. }
  3243. parent.node_ops.unlink(parent, name);
  3244. FS.destroyNode(node);
  3245. try {
  3246. if (FS.trackingDelegate["onDeletePath"]) FS.trackingDelegate["onDeletePath"](path)
  3247. } catch (e) {
  3248. console.log("FS.trackingDelegate['onDeletePath']('" + path + "') threw an exception: " + e.message)
  3249. }
  3250. },
  3251. readlink: function(path) {
  3252. var lookup = FS.lookupPath(path);
  3253. var link = lookup.node;
  3254. if (!link) {
  3255. throw new FS.ErrnoError(44)
  3256. }
  3257. if (!link.node_ops.readlink) {
  3258. throw new FS.ErrnoError(28)
  3259. }
  3260. return PATH_FS.resolve(FS.getPath(link.parent), link.node_ops.readlink(link))
  3261. },
  3262. stat: function(path, dontFollow) {
  3263. var lookup = FS.lookupPath(path, {
  3264. follow: !dontFollow
  3265. });
  3266. var node = lookup.node;
  3267. if (!node) {
  3268. throw new FS.ErrnoError(44)
  3269. }
  3270. if (!node.node_ops.getattr) {
  3271. throw new FS.ErrnoError(63)
  3272. }
  3273. return node.node_ops.getattr(node)
  3274. },
  3275. lstat: function(path) {
  3276. return FS.stat(path, true)
  3277. },
  3278. chmod: function(path, mode, dontFollow) {
  3279. var node;
  3280. if (typeof path === "string") {
  3281. var lookup = FS.lookupPath(path, {
  3282. follow: !dontFollow
  3283. });
  3284. node = lookup.node
  3285. } else {
  3286. node = path
  3287. }
  3288. if (!node.node_ops.setattr) {
  3289. throw new FS.ErrnoError(63)
  3290. }
  3291. node.node_ops.setattr(node, {
  3292. mode: mode & 4095 | node.mode & ~4095,
  3293. timestamp: Date.now()
  3294. })
  3295. },
  3296. lchmod: function(path, mode) {
  3297. FS.chmod(path, mode, true)
  3298. },
  3299. fchmod: function(fd, mode) {
  3300. var stream = FS.getStream(fd);
  3301. if (!stream) {
  3302. throw new FS.ErrnoError(8)
  3303. }
  3304. FS.chmod(stream.node, mode)
  3305. },
  3306. chown: function(path, uid, gid, dontFollow) {
  3307. var node;
  3308. if (typeof path === "string") {
  3309. var lookup = FS.lookupPath(path, {
  3310. follow: !dontFollow
  3311. });
  3312. node = lookup.node
  3313. } else {
  3314. node = path
  3315. }
  3316. if (!node.node_ops.setattr) {
  3317. throw new FS.ErrnoError(63)
  3318. }
  3319. node.node_ops.setattr(node, {
  3320. timestamp: Date.now()
  3321. })
  3322. },
  3323. lchown: function(path, uid, gid) {
  3324. FS.chown(path, uid, gid, true)
  3325. },
  3326. fchown: function(fd, uid, gid) {
  3327. var stream = FS.getStream(fd);
  3328. if (!stream) {
  3329. throw new FS.ErrnoError(8)
  3330. }
  3331. FS.chown(stream.node, uid, gid)
  3332. },
  3333. truncate: function(path, len) {
  3334. if (len < 0) {
  3335. throw new FS.ErrnoError(28)
  3336. }
  3337. var node;
  3338. if (typeof path === "string") {
  3339. var lookup = FS.lookupPath(path, {
  3340. follow: true
  3341. });
  3342. node = lookup.node
  3343. } else {
  3344. node = path
  3345. }
  3346. if (!node.node_ops.setattr) {
  3347. throw new FS.ErrnoError(63)
  3348. }
  3349. if (FS.isDir(node.mode)) {
  3350. throw new FS.ErrnoError(31)
  3351. }
  3352. if (!FS.isFile(node.mode)) {
  3353. throw new FS.ErrnoError(28)
  3354. }
  3355. var err = FS.nodePermissions(node, "w");
  3356. if (err) {
  3357. throw new FS.ErrnoError(err)
  3358. }
  3359. node.node_ops.setattr(node, {
  3360. size: len,
  3361. timestamp: Date.now()
  3362. })
  3363. },
  3364. ftruncate: function(fd, len) {
  3365. var stream = FS.getStream(fd);
  3366. if (!stream) {
  3367. throw new FS.ErrnoError(8)
  3368. }
  3369. if ((stream.flags & 2097155) === 0) {
  3370. throw new FS.ErrnoError(28)
  3371. }
  3372. FS.truncate(stream.node, len)
  3373. },
  3374. utime: function(path, atime, mtime) {
  3375. var lookup = FS.lookupPath(path, {
  3376. follow: true
  3377. });
  3378. var node = lookup.node;
  3379. node.node_ops.setattr(node, {
  3380. timestamp: Math.max(atime, mtime)
  3381. })
  3382. },
  3383. open: function(path, flags, mode, fd_start, fd_end) {
  3384. if (path === "") {
  3385. throw new FS.ErrnoError(44)
  3386. }
  3387. flags = typeof flags === "string" ? FS.modeStringToFlags(flags) : flags;
  3388. mode = typeof mode === "undefined" ? 438 : mode;
  3389. if (flags & 64) {
  3390. mode = mode & 4095 | 32768
  3391. } else {
  3392. mode = 0
  3393. }
  3394. var node;
  3395. if (typeof path === "object") {
  3396. node = path
  3397. } else {
  3398. path = PATH.normalize(path);
  3399. try {
  3400. var lookup = FS.lookupPath(path, {
  3401. follow: !(flags & 131072)
  3402. });
  3403. node = lookup.node
  3404. } catch (e) {}
  3405. }
  3406. var created = false;
  3407. if (flags & 64) {
  3408. if (node) {
  3409. if (flags & 128) {
  3410. throw new FS.ErrnoError(20)
  3411. }
  3412. } else {
  3413. node = FS.mknod(path, mode, 0);
  3414. created = true
  3415. }
  3416. }
  3417. if (!node) {
  3418. throw new FS.ErrnoError(44)
  3419. }
  3420. if (FS.isChrdev(node.mode)) {
  3421. flags &= ~512
  3422. }
  3423. if (flags & 65536 && !FS.isDir(node.mode)) {
  3424. throw new FS.ErrnoError(54)
  3425. }
  3426. if (!created) {
  3427. var err = FS.mayOpen(node, flags);
  3428. if (err) {
  3429. throw new FS.ErrnoError(err)
  3430. }
  3431. }
  3432. if (flags & 512) {
  3433. FS.truncate(node, 0)
  3434. }
  3435. flags &= ~(128 | 512);
  3436. var stream = FS.createStream({
  3437. node: node,
  3438. path: FS.getPath(node),
  3439. flags: flags,
  3440. seekable: true,
  3441. position: 0,
  3442. stream_ops: node.stream_ops,
  3443. ungotten: [],
  3444. error: false
  3445. }, fd_start, fd_end);
  3446. if (stream.stream_ops.open) {
  3447. stream.stream_ops.open(stream)
  3448. }
  3449. if (Module["logReadFiles"] && !(flags & 1)) {
  3450. if (!FS.readFiles) FS.readFiles = {};
  3451. if (!(path in FS.readFiles)) {
  3452. FS.readFiles[path] = 1;
  3453. console.log("FS.trackingDelegate error on read file: " + path)
  3454. }
  3455. }
  3456. try {
  3457. if (FS.trackingDelegate["onOpenFile"]) {
  3458. var trackingFlags = 0;
  3459. if ((flags & 2097155) !== 1) {
  3460. trackingFlags |= FS.tracking.openFlags.READ
  3461. }
  3462. if ((flags & 2097155) !== 0) {
  3463. trackingFlags |= FS.tracking.openFlags.WRITE
  3464. }
  3465. FS.trackingDelegate["onOpenFile"](path, trackingFlags)
  3466. }
  3467. } catch (e) {
  3468. console.log("FS.trackingDelegate['onOpenFile']('" + path + "', flags) threw an exception: " + e.message)
  3469. }
  3470. return stream
  3471. },
  3472. close: function(stream) {
  3473. if (FS.isClosed(stream)) {
  3474. throw new FS.ErrnoError(8)
  3475. }
  3476. if (stream.getdents) stream.getdents = null;
  3477. try {
  3478. if (stream.stream_ops.close) {
  3479. stream.stream_ops.close(stream)
  3480. }
  3481. } catch (e) {
  3482. throw e
  3483. } finally {
  3484. FS.closeStream(stream.fd)
  3485. }
  3486. stream.fd = null
  3487. },
  3488. isClosed: function(stream) {
  3489. return stream.fd === null
  3490. },
  3491. llseek: function(stream, offset, whence) {
  3492. if (FS.isClosed(stream)) {
  3493. throw new FS.ErrnoError(8)
  3494. }
  3495. if (!stream.seekable || !stream.stream_ops.llseek) {
  3496. throw new FS.ErrnoError(70)
  3497. }
  3498. if (whence != 0 && whence != 1 && whence != 2) {
  3499. throw new FS.ErrnoError(28)
  3500. }
  3501. stream.position = stream.stream_ops.llseek(stream, offset, whence);
  3502. stream.ungotten = [];
  3503. return stream.position
  3504. },
  3505. read: function(stream, buffer, offset, length, position) {
  3506. if (length < 0 || position < 0) {
  3507. throw new FS.ErrnoError(28)
  3508. }
  3509. if (FS.isClosed(stream)) {
  3510. throw new FS.ErrnoError(8)
  3511. }
  3512. if ((stream.flags & 2097155) === 1) {
  3513. throw new FS.ErrnoError(8)
  3514. }
  3515. if (FS.isDir(stream.node.mode)) {
  3516. throw new FS.ErrnoError(31)
  3517. }
  3518. if (!stream.stream_ops.read) {
  3519. throw new FS.ErrnoError(28)
  3520. }
  3521. var seeking = typeof position !== "undefined";
  3522. if (!seeking) {
  3523. position = stream.position
  3524. } else if (!stream.seekable) {
  3525. throw new FS.ErrnoError(70)
  3526. }
  3527. var bytesRead = stream.stream_ops.read(stream, buffer, offset, length, position);
  3528. if (!seeking) stream.position += bytesRead;
  3529. return bytesRead
  3530. },
  3531. write: function(stream, buffer, offset, length, position, canOwn) {
  3532. if (length < 0 || position < 0) {
  3533. throw new FS.ErrnoError(28)
  3534. }
  3535. if (FS.isClosed(stream)) {
  3536. throw new FS.ErrnoError(8)
  3537. }
  3538. if ((stream.flags & 2097155) === 0) {
  3539. throw new FS.ErrnoError(8)
  3540. }
  3541. if (FS.isDir(stream.node.mode)) {
  3542. throw new FS.ErrnoError(31)
  3543. }
  3544. if (!stream.stream_ops.write) {
  3545. throw new FS.ErrnoError(28)
  3546. }
  3547. if (stream.flags & 1024) {
  3548. FS.llseek(stream, 0, 2)
  3549. }
  3550. var seeking = typeof position !== "undefined";
  3551. if (!seeking) {
  3552. position = stream.position
  3553. } else if (!stream.seekable) {
  3554. throw new FS.ErrnoError(70)
  3555. }
  3556. var bytesWritten = stream.stream_ops.write(stream, buffer, offset, length, position, canOwn);
  3557. if (!seeking) stream.position += bytesWritten;
  3558. try {
  3559. if (stream.path && FS.trackingDelegate["onWriteToFile"]) FS.trackingDelegate["onWriteToFile"](stream.path)
  3560. } catch (e) {
  3561. console.log("FS.trackingDelegate['onWriteToFile']('" + stream.path + "') threw an exception: " + e.message)
  3562. }
  3563. return bytesWritten
  3564. },
  3565. allocate: function(stream, offset, length) {
  3566. if (FS.isClosed(stream)) {
  3567. throw new FS.ErrnoError(8)
  3568. }
  3569. if (offset < 0 || length <= 0) {
  3570. throw new FS.ErrnoError(28)
  3571. }
  3572. if ((stream.flags & 2097155) === 0) {
  3573. throw new FS.ErrnoError(8)
  3574. }
  3575. if (!FS.isFile(stream.node.mode) && !FS.isDir(stream.node.mode)) {
  3576. throw new FS.ErrnoError(43)
  3577. }
  3578. if (!stream.stream_ops.allocate) {
  3579. throw new FS.ErrnoError(138)
  3580. }
  3581. stream.stream_ops.allocate(stream, offset, length)
  3582. },
  3583. mmap: function(stream, buffer, offset, length, position, prot, flags) {
  3584. if ((prot & 2) !== 0 && (flags & 2) === 0 && (stream.flags & 2097155) !== 2) {
  3585. throw new FS.ErrnoError(2)
  3586. }
  3587. if ((stream.flags & 2097155) === 1) {
  3588. throw new FS.ErrnoError(2)
  3589. }
  3590. if (!stream.stream_ops.mmap) {
  3591. throw new FS.ErrnoError(43)
  3592. }
  3593. return stream.stream_ops.mmap(stream, buffer, offset, length, position, prot, flags)
  3594. },
  3595. msync: function(stream, buffer, offset, length, mmapFlags) {
  3596. if (!stream || !stream.stream_ops.msync) {
  3597. return 0
  3598. }
  3599. return stream.stream_ops.msync(stream, buffer, offset, length, mmapFlags)
  3600. },
  3601. munmap: function(stream) {
  3602. return 0
  3603. },
  3604. ioctl: function(stream, cmd, arg) {
  3605. if (!stream.stream_ops.ioctl) {
  3606. throw new FS.ErrnoError(59)
  3607. }
  3608. return stream.stream_ops.ioctl(stream, cmd, arg)
  3609. },
  3610. readFile: function(path, opts) {
  3611. opts = opts || {};
  3612. opts.flags = opts.flags || "r";
  3613. opts.encoding = opts.encoding || "binary";
  3614. if (opts.encoding !== "utf8" && opts.encoding !== "binary") {
  3615. throw new Error('Invalid encoding type "' + opts.encoding + '"')
  3616. }
  3617. var ret;
  3618. var stream = FS.open(path, opts.flags);
  3619. var stat = FS.stat(path);
  3620. var length = stat.size;
  3621. var buf = new Uint8Array(length);
  3622. FS.read(stream, buf, 0, length, 0);
  3623. if (opts.encoding === "utf8") {
  3624. ret = UTF8ArrayToString(buf, 0)
  3625. } else if (opts.encoding === "binary") {
  3626. ret = buf
  3627. }
  3628. FS.close(stream);
  3629. return ret
  3630. },
  3631. writeFile: function(path, data, opts) {
  3632. opts = opts || {};
  3633. opts.flags = opts.flags || "w";
  3634. var stream = FS.open(path, opts.flags, opts.mode);
  3635. if (typeof data === "string") {
  3636. var buf = new Uint8Array(lengthBytesUTF8(data) + 1);
  3637. var actualNumBytes = stringToUTF8Array(data, buf, 0, buf.length);
  3638. FS.write(stream, buf, 0, actualNumBytes, undefined, opts.canOwn)
  3639. } else if (ArrayBuffer.isView(data)) {
  3640. FS.write(stream, data, 0, data.byteLength, undefined, opts.canOwn)
  3641. } else {
  3642. throw new Error("Unsupported data type")
  3643. }
  3644. FS.close(stream)
  3645. },
  3646. cwd: function() {
  3647. return FS.currentPath
  3648. },
  3649. chdir: function(path) {
  3650. var lookup = FS.lookupPath(path, {
  3651. follow: true
  3652. });
  3653. if (lookup.node === null) {
  3654. throw new FS.ErrnoError(44)
  3655. }
  3656. if (!FS.isDir(lookup.node.mode)) {
  3657. throw new FS.ErrnoError(54)
  3658. }
  3659. var err = FS.nodePermissions(lookup.node, "x");
  3660. if (err) {
  3661. throw new FS.ErrnoError(err)
  3662. }
  3663. FS.currentPath = lookup.path
  3664. },
  3665. createDefaultDirectories: function() {
  3666. FS.mkdir("/tmp");
  3667. FS.mkdir("/home");
  3668. FS.mkdir("/home/web_user")
  3669. },
  3670. createDefaultDevices: function() {
  3671. FS.mkdir("/dev");
  3672. FS.registerDevice(FS.makedev(1, 3), {
  3673. read: function() {
  3674. return 0
  3675. },
  3676. write: function(stream, buffer, offset, length, pos) {
  3677. return length
  3678. }
  3679. });
  3680. FS.mkdev("/dev/null", FS.makedev(1, 3));
  3681. TTY.register(FS.makedev(5, 0), TTY.default_tty_ops);
  3682. TTY.register(FS.makedev(6, 0), TTY.default_tty1_ops);
  3683. FS.mkdev("/dev/tty", FS.makedev(5, 0));
  3684. FS.mkdev("/dev/tty1", FS.makedev(6, 0));
  3685. var random_device;
  3686. if (typeof crypto === "object" && typeof crypto["getRandomValues"] === "function") {
  3687. var randomBuffer = new Uint8Array(1);
  3688. random_device = function() {
  3689. crypto.getRandomValues(randomBuffer);
  3690. return randomBuffer[0]
  3691. }
  3692. } else if (ENVIRONMENT_IS_NODE) {
  3693. try {
  3694. var crypto_module = require("crypto");
  3695. random_device = function() {
  3696. return crypto_module["randomBytes"](1)[0]
  3697. }
  3698. } catch (e) {}
  3699. } else {}
  3700. if (!random_device) {
  3701. random_device = function() {
  3702. abort("no cryptographic support found for random_device. consider polyfilling it if you want to use something insecure like Math.random(), e.g. put this in a --pre-js: var crypto = { getRandomValues: function(array) { for (var i = 0; i < array.length; i++) array[i] = (Math.random()*256)|0 } };")
  3703. }
  3704. }
  3705. FS.createDevice("/dev", "random", random_device);
  3706. FS.createDevice("/dev", "urandom", random_device);
  3707. FS.mkdir("/dev/shm");
  3708. FS.mkdir("/dev/shm/tmp")
  3709. },
  3710. createSpecialDirectories: function() {
  3711. FS.mkdir("/proc");
  3712. FS.mkdir("/proc/self");
  3713. FS.mkdir("/proc/self/fd");
  3714. FS.mount({
  3715. mount: function() {
  3716. var node = FS.createNode("/proc/self", "fd", 16384 | 511, 73);
  3717. node.node_ops = {
  3718. lookup: function(parent, name) {
  3719. var fd = +name;
  3720. var stream = FS.getStream(fd);
  3721. if (!stream) throw new FS.ErrnoError(8);
  3722. var ret = {
  3723. parent: null,
  3724. mount: {
  3725. mountpoint: "fake"
  3726. },
  3727. node_ops: {
  3728. readlink: function() {
  3729. return stream.path
  3730. }
  3731. }
  3732. };
  3733. ret.parent = ret;
  3734. return ret
  3735. }
  3736. };
  3737. return node
  3738. }
  3739. }, {}, "/proc/self/fd")
  3740. },
  3741. createStandardStreams: function() {
  3742. if (Module["stdin"]) {
  3743. FS.createDevice("/dev", "stdin", Module["stdin"])
  3744. } else {
  3745. FS.symlink("/dev/tty", "/dev/stdin")
  3746. }
  3747. if (Module["stdout"]) {
  3748. FS.createDevice("/dev", "stdout", null, Module["stdout"])
  3749. } else {
  3750. FS.symlink("/dev/tty", "/dev/stdout")
  3751. }
  3752. if (Module["stderr"]) {
  3753. FS.createDevice("/dev", "stderr", null, Module["stderr"])
  3754. } else {
  3755. FS.symlink("/dev/tty1", "/dev/stderr")
  3756. }
  3757. var stdin = FS.open("/dev/stdin", "r");
  3758. var stdout = FS.open("/dev/stdout", "w");
  3759. var stderr = FS.open("/dev/stderr", "w");
  3760. assert(stdin.fd === 0, "invalid handle for stdin (" + stdin.fd + ")");
  3761. assert(stdout.fd === 1, "invalid handle for stdout (" + stdout.fd + ")");
  3762. assert(stderr.fd === 2, "invalid handle for stderr (" + stderr.fd + ")")
  3763. },
  3764. ensureErrnoError: function() {
  3765. if (FS.ErrnoError) return;
  3766. FS.ErrnoError = function ErrnoError(errno, node) {
  3767. this.node = node;
  3768. this.setErrno = function(errno) {
  3769. this.errno = errno;
  3770. for (var key in ERRNO_CODES) {
  3771. if (ERRNO_CODES[key] === errno) {
  3772. this.code = key;
  3773. break
  3774. }
  3775. }
  3776. };
  3777. this.setErrno(errno);
  3778. this.message = ERRNO_MESSAGES[errno];
  3779. if (this.stack) {
  3780. Object.defineProperty(this, "stack", {
  3781. value: (new Error).stack,
  3782. writable: true
  3783. });
  3784. this.stack = demangleAll(this.stack)
  3785. }
  3786. };
  3787. FS.ErrnoError.prototype = new Error;
  3788. FS.ErrnoError.prototype.constructor = FS.ErrnoError;
  3789. [44].forEach(function(code) {
  3790. FS.genericErrors[code] = new FS.ErrnoError(code);
  3791. FS.genericErrors[code].stack = "<generic error, no stack>"
  3792. })
  3793. },
  3794. staticInit: function() {
  3795. FS.ensureErrnoError();
  3796. FS.nameTable = new Array(4096);
  3797. FS.mount(MEMFS, {}, "/");
  3798. FS.createDefaultDirectories();
  3799. FS.createDefaultDevices();
  3800. FS.createSpecialDirectories();
  3801. FS.filesystems = {
  3802. "MEMFS": MEMFS,
  3803. "IDBFS": IDBFS,
  3804. "NODEFS": NODEFS,
  3805. "WORKERFS": WORKERFS
  3806. }
  3807. },
  3808. init: function(input, output, error) {
  3809. assert(!FS.init.initialized, "FS.init was previously called. If you want to initialize later with custom parameters, remove any earlier calls (note that one is automatically added to the generated code)");
  3810. FS.init.initialized = true;
  3811. FS.ensureErrnoError();
  3812. Module["stdin"] = input || Module["stdin"];
  3813. Module["stdout"] = output || Module["stdout"];
  3814. Module["stderr"] = error || Module["stderr"];
  3815. FS.createStandardStreams()
  3816. },
  3817. quit: function() {
  3818. FS.init.initialized = false;
  3819. var fflush = Module["_fflush"];
  3820. if (fflush) fflush(0);
  3821. for (var i = 0; i < FS.streams.length; i++) {
  3822. var stream = FS.streams[i];
  3823. if (!stream) {
  3824. continue
  3825. }
  3826. FS.close(stream)
  3827. }
  3828. },
  3829. getMode: function(canRead, canWrite) {
  3830. var mode = 0;
  3831. if (canRead) mode |= 292 | 73;
  3832. if (canWrite) mode |= 146;
  3833. return mode
  3834. },
  3835. joinPath: function(parts, forceRelative) {
  3836. var path = PATH.join.apply(null, parts);
  3837. if (forceRelative && path[0] == "/") path = path.substr(1);
  3838. return path
  3839. },
  3840. absolutePath: function(relative, base) {
  3841. return PATH_FS.resolve(base, relative)
  3842. },
  3843. standardizePath: function(path) {
  3844. return PATH.normalize(path)
  3845. },
  3846. findObject: function(path, dontResolveLastLink) {
  3847. var ret = FS.analyzePath(path, dontResolveLastLink);
  3848. if (ret.exists) {
  3849. return ret.object
  3850. } else {
  3851. ___setErrNo(ret.error);
  3852. return null
  3853. }
  3854. },
  3855. analyzePath: function(path, dontResolveLastLink) {
  3856. try {
  3857. var lookup = FS.lookupPath(path, {
  3858. follow: !dontResolveLastLink
  3859. });
  3860. path = lookup.path
  3861. } catch (e) {}
  3862. var ret = {
  3863. isRoot: false,
  3864. exists: false,
  3865. error: 0,
  3866. name: null,
  3867. path: null,
  3868. object: null,
  3869. parentExists: false,
  3870. parentPath: null,
  3871. parentObject: null
  3872. };
  3873. try {
  3874. var lookup = FS.lookupPath(path, {
  3875. parent: true
  3876. });
  3877. ret.parentExists = true;
  3878. ret.parentPath = lookup.path;
  3879. ret.parentObject = lookup.node;
  3880. ret.name = PATH.basename(path);
  3881. lookup = FS.lookupPath(path, {
  3882. follow: !dontResolveLastLink
  3883. });
  3884. ret.exists = true;
  3885. ret.path = lookup.path;
  3886. ret.object = lookup.node;
  3887. ret.name = lookup.node.name;
  3888. ret.isRoot = lookup.path === "/"
  3889. } catch (e) {
  3890. ret.error = e.errno
  3891. }
  3892. return ret
  3893. },
  3894. createFolder: function(parent, name, canRead, canWrite) {
  3895. var path = PATH.join2(typeof parent === "string" ? parent : FS.getPath(parent), name);
  3896. var mode = FS.getMode(canRead, canWrite);
  3897. return FS.mkdir(path, mode)
  3898. },
  3899. createPath: function(parent, path, canRead, canWrite) {
  3900. parent = typeof parent === "string" ? parent : FS.getPath(parent);
  3901. var parts = path.split("/").reverse();
  3902. while (parts.length) {
  3903. var part = parts.pop();
  3904. if (!part) continue;
  3905. var current = PATH.join2(parent, part);
  3906. try {
  3907. FS.mkdir(current)
  3908. } catch (e) {}
  3909. parent = current
  3910. }
  3911. return current
  3912. },
  3913. createFile: function(parent, name, properties, canRead, canWrite) {
  3914. var path = PATH.join2(typeof parent === "string" ? parent : FS.getPath(parent), name);
  3915. var mode = FS.getMode(canRead, canWrite);
  3916. return FS.create(path, mode)
  3917. },
  3918. createDataFile: function(parent, name, data, canRead, canWrite, canOwn) {
  3919. var path = name ? PATH.join2(typeof parent === "string" ? parent : FS.getPath(parent), name) : parent;
  3920. var mode = FS.getMode(canRead, canWrite);
  3921. var node = FS.create(path, mode);
  3922. if (data) {
  3923. if (typeof data === "string") {
  3924. var arr = new Array(data.length);
  3925. for (var i = 0, len = data.length; i < len; ++i) arr[i] = data.charCodeAt(i);
  3926. data = arr
  3927. }
  3928. FS.chmod(node, mode | 146);
  3929. var stream = FS.open(node, "w");
  3930. FS.write(stream, data, 0, data.length, 0, canOwn);
  3931. FS.close(stream);
  3932. FS.chmod(node, mode)
  3933. }
  3934. return node
  3935. },
  3936. createDevice: function(parent, name, input, output) {
  3937. var path = PATH.join2(typeof parent === "string" ? parent : FS.getPath(parent), name);
  3938. var mode = FS.getMode(!!input, !!output);
  3939. if (!FS.createDevice.major) FS.createDevice.major = 64;
  3940. var dev = FS.makedev(FS.createDevice.major++, 0);
  3941. FS.registerDevice(dev, {
  3942. open: function(stream) {
  3943. stream.seekable = false
  3944. },
  3945. close: function(stream) {
  3946. if (output && output.buffer && output.buffer.length) {
  3947. output(10)
  3948. }
  3949. },
  3950. read: function(stream, buffer, offset, length, pos) {
  3951. var bytesRead = 0;
  3952. for (var i = 0; i < length; i++) {
  3953. var result;
  3954. try {
  3955. result = input()
  3956. } catch (e) {
  3957. throw new FS.ErrnoError(29)
  3958. }
  3959. if (result === undefined && bytesRead === 0) {
  3960. throw new FS.ErrnoError(6)
  3961. }
  3962. if (result === null || result === undefined) break;
  3963. bytesRead++;
  3964. buffer[offset + i] = result
  3965. }
  3966. if (bytesRead) {
  3967. stream.node.timestamp = Date.now()
  3968. }
  3969. return bytesRead
  3970. },
  3971. write: function(stream, buffer, offset, length, pos) {
  3972. for (var i = 0; i < length; i++) {
  3973. try {
  3974. output(buffer[offset + i])
  3975. } catch (e) {
  3976. throw new FS.ErrnoError(29)
  3977. }
  3978. }
  3979. if (length) {
  3980. stream.node.timestamp = Date.now()
  3981. }
  3982. return i
  3983. }
  3984. });
  3985. return FS.mkdev(path, mode, dev)
  3986. },
  3987. createLink: function(parent, name, target, canRead, canWrite) {
  3988. var path = PATH.join2(typeof parent === "string" ? parent : FS.getPath(parent), name);
  3989. return FS.symlink(target, path)
  3990. },
  3991. forceLoadFile: function(obj) {
  3992. if (obj.isDevice || obj.isFolder || obj.link || obj.contents) return true;
  3993. var success = true;
  3994. if (typeof XMLHttpRequest !== "undefined") {
  3995. throw new Error("Lazy loading should have been performed (contents set) in createLazyFile, but it was not. Lazy loading only works in web workers. Use --embed-file or --preload-file in emcc on the main thread.")
  3996. } else if (read_) {
  3997. try {
  3998. obj.contents = intArrayFromString(read_(obj.url), true);
  3999. obj.usedBytes = obj.contents.length
  4000. } catch (e) {
  4001. success = false
  4002. }
  4003. } else {
  4004. throw new Error("Cannot load without read() or XMLHttpRequest.")
  4005. }
  4006. if (!success) ___setErrNo(29);
  4007. return success
  4008. },
  4009. createLazyFile: function(parent, name, url, canRead, canWrite) {
  4010. function LazyUint8Array() {
  4011. this.lengthKnown = false;
  4012. this.chunks = []
  4013. }
  4014. LazyUint8Array.prototype.get = function LazyUint8Array_get(idx) {
  4015. if (idx > this.length - 1 || idx < 0) {
  4016. return undefined
  4017. }
  4018. var chunkOffset = idx % this.chunkSize;
  4019. var chunkNum = idx / this.chunkSize | 0;
  4020. return this.getter(chunkNum)[chunkOffset]
  4021. };
  4022. LazyUint8Array.prototype.setDataGetter = function LazyUint8Array_setDataGetter(getter) {
  4023. this.getter = getter
  4024. };
  4025. LazyUint8Array.prototype.cacheLength = function LazyUint8Array_cacheLength() {
  4026. var xhr = new XMLHttpRequest;
  4027. xhr.open("HEAD", url, false);
  4028. xhr.send(null);
  4029. if (!(xhr.status >= 200 && xhr.status < 300 || xhr.status === 304)) throw new Error("Couldn't load " + url + ". Status: " + xhr.status);
  4030. var datalength = Number(xhr.getResponseHeader("Content-length"));
  4031. var header;
  4032. var hasByteServing = (header = xhr.getResponseHeader("Accept-Ranges")) && header === "bytes";
  4033. var usesGzip = (header = xhr.getResponseHeader("Content-Encoding")) && header === "gzip";
  4034. var chunkSize = 1024 * 1024;
  4035. if (!hasByteServing) chunkSize = datalength;
  4036. var doXHR = function(from, to) {
  4037. if (from > to) throw new Error("invalid range (" + from + ", " + to + ") or no bytes requested!");
  4038. if (to > datalength - 1) throw new Error("only " + datalength + " bytes available! programmer error!");
  4039. var xhr = new XMLHttpRequest;
  4040. xhr.open("GET", url, false);
  4041. if (datalength !== chunkSize) xhr.setRequestHeader("Range", "bytes=" + from + "-" + to);
  4042. if (typeof Uint8Array != "undefined") xhr.responseType = "arraybuffer";
  4043. if (xhr.overrideMimeType) {
  4044. xhr.overrideMimeType("text/plain; charset=x-user-defined")
  4045. }
  4046. xhr.send(null);
  4047. if (!(xhr.status >= 200 && xhr.status < 300 || xhr.status === 304)) throw new Error("Couldn't load " + url + ". Status: " + xhr.status);
  4048. if (xhr.response !== undefined) {
  4049. return new Uint8Array(xhr.response || [])
  4050. } else {
  4051. return intArrayFromString(xhr.responseText || "", true)
  4052. }
  4053. };
  4054. var lazyArray = this;
  4055. lazyArray.setDataGetter(function(chunkNum) {
  4056. var start = chunkNum * chunkSize;
  4057. var end = (chunkNum + 1) * chunkSize - 1;
  4058. end = Math.min(end, datalength - 1);
  4059. if (typeof lazyArray.chunks[chunkNum] === "undefined") {
  4060. lazyArray.chunks[chunkNum] = doXHR(start, end)
  4061. }
  4062. if (typeof lazyArray.chunks[chunkNum] === "undefined") throw new Error("doXHR failed!");
  4063. return lazyArray.chunks[chunkNum]
  4064. });
  4065. if (usesGzip || !datalength) {
  4066. chunkSize = datalength = 1;
  4067. datalength = this.getter(0).length;
  4068. chunkSize = datalength;
  4069. console.log("LazyFiles on gzip forces download of the whole file when length is accessed")
  4070. }
  4071. this._length = datalength;
  4072. this._chunkSize = chunkSize;
  4073. this.lengthKnown = true
  4074. };
  4075. if (typeof XMLHttpRequest !== "undefined") {
  4076. if (!ENVIRONMENT_IS_WORKER) throw "Cannot do synchronous binary XHRs outside webworkers in modern browsers. Use --embed-file or --preload-file in emcc";
  4077. var lazyArray = new LazyUint8Array;
  4078. Object.defineProperties(lazyArray, {
  4079. length: {
  4080. get: function() {
  4081. if (!this.lengthKnown) {
  4082. this.cacheLength()
  4083. }
  4084. return this._length
  4085. }
  4086. },
  4087. chunkSize: {
  4088. get: function() {
  4089. if (!this.lengthKnown) {
  4090. this.cacheLength()
  4091. }
  4092. return this._chunkSize
  4093. }
  4094. }
  4095. });
  4096. var properties = {
  4097. isDevice: false,
  4098. contents: lazyArray
  4099. }
  4100. } else {
  4101. var properties = {
  4102. isDevice: false,
  4103. url: url
  4104. }
  4105. }
  4106. var node = FS.createFile(parent, name, properties, canRead, canWrite);
  4107. if (properties.contents) {
  4108. node.contents = properties.contents
  4109. } else if (properties.url) {
  4110. node.contents = null;
  4111. node.url = properties.url
  4112. }
  4113. Object.defineProperties(node, {
  4114. usedBytes: {
  4115. get: function() {
  4116. return this.contents.length
  4117. }
  4118. }
  4119. });
  4120. var stream_ops = {};
  4121. var keys = Object.keys(node.stream_ops);
  4122. keys.forEach(function(key) {
  4123. var fn = node.stream_ops[key];
  4124. stream_ops[key] = function forceLoadLazyFile() {
  4125. if (!FS.forceLoadFile(node)) {
  4126. throw new FS.ErrnoError(29)
  4127. }
  4128. return fn.apply(null, arguments)
  4129. }
  4130. });
  4131. stream_ops.read = function stream_ops_read(stream, buffer, offset, length, position) {
  4132. if (!FS.forceLoadFile(node)) {
  4133. throw new FS.ErrnoError(29)
  4134. }
  4135. var contents = stream.node.contents;
  4136. if (position >= contents.length) return 0;
  4137. var size = Math.min(contents.length - position, length);
  4138. assert(size >= 0);
  4139. if (contents.slice) {
  4140. for (var i = 0; i < size; i++) {
  4141. buffer[offset + i] = contents[position + i]
  4142. }
  4143. } else {
  4144. for (var i = 0; i < size; i++) {
  4145. buffer[offset + i] = contents.get(position + i)
  4146. }
  4147. }
  4148. return size
  4149. };
  4150. node.stream_ops = stream_ops;
  4151. return node
  4152. },
  4153. createPreloadedFile: function(parent, name, url, canRead, canWrite, onload, onerror, dontCreateFile, canOwn, preFinish) {
  4154. Browser.init();
  4155. var fullname = name ? PATH_FS.resolve(PATH.join2(parent, name)) : parent;
  4156. var dep = getUniqueRunDependency("cp " + fullname);
  4157. function processData(byteArray) {
  4158. function finish(byteArray) {
  4159. if (preFinish) preFinish();
  4160. if (!dontCreateFile) {
  4161. FS.createDataFile(parent, name, byteArray, canRead, canWrite, canOwn)
  4162. }
  4163. if (onload) onload();
  4164. removeRunDependency(dep)
  4165. }
  4166. var handled = false;
  4167. Module["preloadPlugins"].forEach(function(plugin) {
  4168. if (handled) return;
  4169. if (plugin["canHandle"](fullname)) {
  4170. plugin["handle"](byteArray, fullname, finish, function() {
  4171. if (onerror) onerror();
  4172. removeRunDependency(dep)
  4173. });
  4174. handled = true
  4175. }
  4176. });
  4177. if (!handled) finish(byteArray)
  4178. }
  4179. addRunDependency(dep);
  4180. if (typeof url == "string") {
  4181. Browser.asyncLoad(url, function(byteArray) {
  4182. processData(byteArray)
  4183. }, onerror)
  4184. } else {
  4185. processData(url)
  4186. }
  4187. },
  4188. indexedDB: function() {
  4189. return window.indexedDB || window.mozIndexedDB || window.webkitIndexedDB || window.msIndexedDB
  4190. },
  4191. DB_NAME: function() {
  4192. return "EM_FS_" + window.location.pathname
  4193. },
  4194. DB_VERSION: 20,
  4195. DB_STORE_NAME: "FILE_DATA",
  4196. saveFilesToDB: function(paths, onload, onerror) {
  4197. onload = onload || function() {};
  4198. onerror = onerror || function() {};
  4199. var indexedDB = FS.indexedDB();
  4200. try {
  4201. var openRequest = indexedDB.open(FS.DB_NAME(), FS.DB_VERSION)
  4202. } catch (e) {
  4203. return onerror(e)
  4204. }
  4205. openRequest.onupgradeneeded = function openRequest_onupgradeneeded() {
  4206. console.log("creating db");
  4207. var db = openRequest.result;
  4208. db.createObjectStore(FS.DB_STORE_NAME)
  4209. };
  4210. openRequest.onsuccess = function openRequest_onsuccess() {
  4211. var db = openRequest.result;
  4212. var transaction = db.transaction([FS.DB_STORE_NAME], "readwrite");
  4213. var files = transaction.objectStore(FS.DB_STORE_NAME);
  4214. var ok = 0,
  4215. fail = 0,
  4216. total = paths.length;
  4217. function finish() {
  4218. if (fail == 0) onload();
  4219. else onerror()
  4220. }
  4221. paths.forEach(function(path) {
  4222. var putRequest = files.put(FS.analyzePath(path).object.contents, path);
  4223. putRequest.onsuccess = function putRequest_onsuccess() {
  4224. ok++;
  4225. if (ok + fail == total) finish()
  4226. };
  4227. putRequest.onerror = function putRequest_onerror() {
  4228. fail++;
  4229. if (ok + fail == total) finish()
  4230. }
  4231. });
  4232. transaction.onerror = onerror
  4233. };
  4234. openRequest.onerror = onerror
  4235. },
  4236. loadFilesFromDB: function(paths, onload, onerror) {
  4237. onload = onload || function() {};
  4238. onerror = onerror || function() {};
  4239. var indexedDB = FS.indexedDB();
  4240. try {
  4241. var openRequest = indexedDB.open(FS.DB_NAME(), FS.DB_VERSION)
  4242. } catch (e) {
  4243. return onerror(e)
  4244. }
  4245. openRequest.onupgradeneeded = onerror;
  4246. openRequest.onsuccess = function openRequest_onsuccess() {
  4247. var db = openRequest.result;
  4248. try {
  4249. var transaction = db.transaction([FS.DB_STORE_NAME], "readonly")
  4250. } catch (e) {
  4251. onerror(e);
  4252. return
  4253. }
  4254. var files = transaction.objectStore(FS.DB_STORE_NAME);
  4255. var ok = 0,
  4256. fail = 0,
  4257. total = paths.length;
  4258. function finish() {
  4259. if (fail == 0) onload();
  4260. else onerror()
  4261. }
  4262. paths.forEach(function(path) {
  4263. var getRequest = files.get(path);
  4264. getRequest.onsuccess = function getRequest_onsuccess() {
  4265. if (FS.analyzePath(path).exists) {
  4266. FS.unlink(path)
  4267. }
  4268. FS.createDataFile(PATH.dirname(path), PATH.basename(path), getRequest.result, true, true, true);
  4269. ok++;
  4270. if (ok + fail == total) finish()
  4271. };
  4272. getRequest.onerror = function getRequest_onerror() {
  4273. fail++;
  4274. if (ok + fail == total) finish()
  4275. }
  4276. });
  4277. transaction.onerror = onerror
  4278. };
  4279. openRequest.onerror = onerror
  4280. }
  4281. };
  4282. var SYSCALLS = {
  4283. DEFAULT_POLLMASK: 5,
  4284. mappings: {},
  4285. umask: 511,
  4286. calculateAt: function(dirfd, path) {
  4287. if (path[0] !== "/") {
  4288. var dir;
  4289. if (dirfd === -100) {
  4290. dir = FS.cwd()
  4291. } else {
  4292. var dirstream = FS.getStream(dirfd);
  4293. if (!dirstream) throw new FS.ErrnoError(8);
  4294. dir = dirstream.path
  4295. }
  4296. path = PATH.join2(dir, path)
  4297. }
  4298. return path
  4299. },
  4300. doStat: function(func, path, buf) {
  4301. try {
  4302. var stat = func(path)
  4303. } catch (e) {
  4304. if (e && e.node && PATH.normalize(path) !== PATH.normalize(FS.getPath(e.node))) {
  4305. return -54
  4306. }
  4307. throw e
  4308. }
  4309. HEAP32[buf >> 2] = stat.dev;
  4310. HEAP32[buf + 4 >> 2] = 0;
  4311. HEAP32[buf + 8 >> 2] = stat.ino;
  4312. HEAP32[buf + 12 >> 2] = stat.mode;
  4313. HEAP32[buf + 16 >> 2] = stat.nlink;
  4314. HEAP32[buf + 20 >> 2] = stat.uid;
  4315. HEAP32[buf + 24 >> 2] = stat.gid;
  4316. HEAP32[buf + 28 >> 2] = stat.rdev;
  4317. HEAP32[buf + 32 >> 2] = 0;
  4318. tempI64 = [stat.size >>> 0, (tempDouble = stat.size, +Math_abs(tempDouble) >= 1 ? tempDouble > 0 ? (Math_min(+Math_floor(tempDouble / 4294967296), 4294967295) | 0) >>> 0 : ~~+Math_ceil((tempDouble - +(~~tempDouble >>> 0)) / 4294967296) >>> 0 : 0)], HEAP32[buf + 40 >> 2] = tempI64[0], HEAP32[buf + 44 >> 2] = tempI64[1];
  4319. HEAP32[buf + 48 >> 2] = 4096;
  4320. HEAP32[buf + 52 >> 2] = stat.blocks;
  4321. HEAP32[buf + 56 >> 2] = stat.atime.getTime() / 1e3 | 0;
  4322. HEAP32[buf + 60 >> 2] = 0;
  4323. HEAP32[buf + 64 >> 2] = stat.mtime.getTime() / 1e3 | 0;
  4324. HEAP32[buf + 68 >> 2] = 0;
  4325. HEAP32[buf + 72 >> 2] = stat.ctime.getTime() / 1e3 | 0;
  4326. HEAP32[buf + 76 >> 2] = 0;
  4327. tempI64 = [stat.ino >>> 0, (tempDouble = stat.ino, +Math_abs(tempDouble) >= 1 ? tempDouble > 0 ? (Math_min(+Math_floor(tempDouble / 4294967296), 4294967295) | 0) >>> 0 : ~~+Math_ceil((tempDouble - +(~~tempDouble >>> 0)) / 4294967296) >>> 0 : 0)], HEAP32[buf + 80 >> 2] = tempI64[0], HEAP32[buf + 84 >> 2] = tempI64[1];
  4328. return 0
  4329. },
  4330. doMsync: function(addr, stream, len, flags) {
  4331. var buffer = new Uint8Array(HEAPU8.subarray(addr, addr + len));
  4332. FS.msync(stream, buffer, 0, len, flags)
  4333. },
  4334. doMkdir: function(path, mode) {
  4335. path = PATH.normalize(path);
  4336. if (path[path.length - 1] === "/") path = path.substr(0, path.length - 1);
  4337. FS.mkdir(path, mode, 0);
  4338. return 0
  4339. },
  4340. doMknod: function(path, mode, dev) {
  4341. switch (mode & 61440) {
  4342. case 32768:
  4343. case 8192:
  4344. case 24576:
  4345. case 4096:
  4346. case 49152:
  4347. break;
  4348. default:
  4349. return -28
  4350. }
  4351. FS.mknod(path, mode, dev);
  4352. return 0
  4353. },
  4354. doReadlink: function(path, buf, bufsize) {
  4355. if (bufsize <= 0) return -28;
  4356. var ret = FS.readlink(path);
  4357. var len = Math.min(bufsize, lengthBytesUTF8(ret));
  4358. var endChar = HEAP8[buf + len];
  4359. stringToUTF8(ret, buf, bufsize + 1);
  4360. HEAP8[buf + len] = endChar;
  4361. return len
  4362. },
  4363. doAccess: function(path, amode) {
  4364. if (amode & ~7) {
  4365. return -28
  4366. }
  4367. var node;
  4368. var lookup = FS.lookupPath(path, {
  4369. follow: true
  4370. });
  4371. node = lookup.node;
  4372. if (!node) {
  4373. return -44
  4374. }
  4375. var perms = "";
  4376. if (amode & 4) perms += "r";
  4377. if (amode & 2) perms += "w";
  4378. if (amode & 1) perms += "x";
  4379. if (perms && FS.nodePermissions(node, perms)) {
  4380. return -2
  4381. }
  4382. return 0
  4383. },
  4384. doDup: function(path, flags, suggestFD) {
  4385. var suggest = FS.getStream(suggestFD);
  4386. if (suggest) FS.close(suggest);
  4387. return FS.open(path, flags, 0, suggestFD, suggestFD).fd
  4388. },
  4389. doReadv: function(stream, iov, iovcnt, offset) {
  4390. var ret = 0;
  4391. for (var i = 0; i < iovcnt; i++) {
  4392. var ptr = HEAP32[iov + i * 8 >> 2];
  4393. var len = HEAP32[iov + (i * 8 + 4) >> 2];
  4394. var curr = FS.read(stream, HEAP8, ptr, len, offset);
  4395. if (curr < 0) return -1;
  4396. ret += curr;
  4397. if (curr < len) break
  4398. }
  4399. return ret
  4400. },
  4401. doWritev: function(stream, iov, iovcnt, offset) {
  4402. var ret = 0;
  4403. for (var i = 0; i < iovcnt; i++) {
  4404. var ptr = HEAP32[iov + i * 8 >> 2];
  4405. var len = HEAP32[iov + (i * 8 + 4) >> 2];
  4406. var curr = FS.write(stream, HEAP8, ptr, len, offset);
  4407. if (curr < 0) return -1;
  4408. ret += curr
  4409. }
  4410. return ret
  4411. },
  4412. varargs: 0,
  4413. get: function(varargs) {
  4414. SYSCALLS.varargs += 4;
  4415. var ret = HEAP32[SYSCALLS.varargs - 4 >> 2];
  4416. return ret
  4417. },
  4418. getStr: function() {
  4419. var ret = UTF8ToString(SYSCALLS.get());
  4420. return ret
  4421. },
  4422. getStreamFromFD: function(fd) {
  4423. if (fd === undefined) fd = SYSCALLS.get();
  4424. var stream = FS.getStream(fd);
  4425. if (!stream) throw new FS.ErrnoError(8);
  4426. return stream
  4427. },
  4428. get64: function() {
  4429. var low = SYSCALLS.get(),
  4430. high = SYSCALLS.get();
  4431. if (low >= 0) assert(high === 0);
  4432. else assert(high === -1);
  4433. return low
  4434. },
  4435. getZero: function() {
  4436. assert(SYSCALLS.get() === 0)
  4437. }
  4438. };
  4439. function ___syscall221(which, varargs) {
  4440. SYSCALLS.varargs = varargs;
  4441. try {
  4442. var stream = SYSCALLS.getStreamFromFD(),
  4443. cmd = SYSCALLS.get();
  4444. switch (cmd) {
  4445. case 0: {
  4446. var arg = SYSCALLS.get();
  4447. if (arg < 0) {
  4448. return -28
  4449. }
  4450. var newStream;
  4451. newStream = FS.open(stream.path, stream.flags, 0, arg);
  4452. return newStream.fd
  4453. }
  4454. case 1:
  4455. case 2:
  4456. return 0;
  4457. case 3:
  4458. return stream.flags;
  4459. case 4: {
  4460. var arg = SYSCALLS.get();
  4461. stream.flags |= arg;
  4462. return 0
  4463. }
  4464. case 12: {
  4465. var arg = SYSCALLS.get();
  4466. var offset = 0;
  4467. HEAP16[arg + offset >> 1] = 2;
  4468. return 0
  4469. }
  4470. case 13:
  4471. case 14:
  4472. return 0;
  4473. case 16:
  4474. case 8:
  4475. return -28;
  4476. case 9:
  4477. ___setErrNo(28);
  4478. return -1;
  4479. default: {
  4480. return -28
  4481. }
  4482. }
  4483. } catch (e) {
  4484. if (typeof FS === "undefined" || !(e instanceof FS.ErrnoError)) abort(e);
  4485. return -e.errno
  4486. }
  4487. }
  4488. function ___syscall3(which, varargs) {
  4489. SYSCALLS.varargs = varargs;
  4490. try {
  4491. var stream = SYSCALLS.getStreamFromFD(),
  4492. buf = SYSCALLS.get(),
  4493. count = SYSCALLS.get();
  4494. return FS.read(stream, HEAP8, buf, count)
  4495. } catch (e) {
  4496. if (typeof FS === "undefined" || !(e instanceof FS.ErrnoError)) abort(e);
  4497. return -e.errno
  4498. }
  4499. }
  4500. function ___syscall5(which, varargs) {
  4501. SYSCALLS.varargs = varargs;
  4502. try {
  4503. var pathname = SYSCALLS.getStr(),
  4504. flags = SYSCALLS.get(),
  4505. mode = SYSCALLS.get();
  4506. var stream = FS.open(pathname, flags, mode);
  4507. return stream.fd
  4508. } catch (e) {
  4509. if (typeof FS === "undefined" || !(e instanceof FS.ErrnoError)) abort(e);
  4510. return -e.errno
  4511. }
  4512. }
  4513. function ___unlock() {}
  4514. function _fd_close(fd) {
  4515. try {
  4516. var stream = SYSCALLS.getStreamFromFD(fd);
  4517. FS.close(stream);
  4518. return 0
  4519. } catch (e) {
  4520. if (typeof FS === "undefined" || !(e instanceof FS.ErrnoError)) abort(e);
  4521. return e.errno
  4522. }
  4523. }
  4524. function ___wasi_fd_close() {
  4525. return _fd_close.apply(null, arguments)
  4526. }
  4527. function _fd_fdstat_get(fd, pbuf) {
  4528. try {
  4529. var stream = SYSCALLS.getStreamFromFD(fd);
  4530. var type = stream.tty ? 2 : FS.isDir(stream.mode) ? 3 : FS.isLink(stream.mode) ? 7 : 4;
  4531. HEAP8[pbuf >> 0] = type;
  4532. return 0
  4533. } catch (e) {
  4534. if (typeof FS === "undefined" || !(e instanceof FS.ErrnoError)) abort(e);
  4535. return e.errno
  4536. }
  4537. }
  4538. function ___wasi_fd_fdstat_get() {
  4539. return _fd_fdstat_get.apply(null, arguments)
  4540. }
  4541. function _fd_seek(fd, offset_low, offset_high, whence, newOffset) {
  4542. try {
  4543. var stream = SYSCALLS.getStreamFromFD(fd);
  4544. var HIGH_OFFSET = 4294967296;
  4545. var offset = offset_high * HIGH_OFFSET + (offset_low >>> 0);
  4546. var DOUBLE_LIMIT = 9007199254740992;
  4547. if (offset <= -DOUBLE_LIMIT || offset >= DOUBLE_LIMIT) {
  4548. return -61
  4549. }
  4550. FS.llseek(stream, offset, whence);
  4551. tempI64 = [stream.position >>> 0, (tempDouble = stream.position, +Math_abs(tempDouble) >= 1 ? tempDouble > 0 ? (Math_min(+Math_floor(tempDouble / 4294967296), 4294967295) | 0) >>> 0 : ~~+Math_ceil((tempDouble - +(~~tempDouble >>> 0)) / 4294967296) >>> 0 : 0)], HEAP32[newOffset >> 2] = tempI64[0], HEAP32[newOffset + 4 >> 2] = tempI64[1];
  4552. if (stream.getdents && offset === 0 && whence === 0) stream.getdents = null;
  4553. return 0
  4554. } catch (e) {
  4555. if (typeof FS === "undefined" || !(e instanceof FS.ErrnoError)) abort(e);
  4556. return e.errno
  4557. }
  4558. }
  4559. function ___wasi_fd_seek() {
  4560. return _fd_seek.apply(null, arguments)
  4561. }
  4562. function _fd_write(fd, iov, iovcnt, pnum) {
  4563. try {
  4564. var stream = SYSCALLS.getStreamFromFD(fd);
  4565. var num = SYSCALLS.doWritev(stream, iov, iovcnt);
  4566. HEAP32[pnum >> 2] = num;
  4567. return 0
  4568. } catch (e) {
  4569. if (typeof FS === "undefined" || !(e instanceof FS.ErrnoError)) abort(e);
  4570. return e.errno
  4571. }
  4572. }
  4573. function ___wasi_fd_write() {
  4574. return _fd_write.apply(null, arguments)
  4575. }
  4576. function __emscripten_fetch_free(id) {
  4577. delete Fetch.xhrs[id - 1]
  4578. }
  4579. function _abort() {
  4580. abort()
  4581. }
  4582. function _clock() {
  4583. if (_clock.start === undefined) _clock.start = Date.now();
  4584. return (Date.now() - _clock.start) * (1e6 / 1e3) | 0
  4585. }
  4586. function _emscripten_get_now() {
  4587. abort()
  4588. }
  4589. function _emscripten_get_now_is_monotonic() {
  4590. return 0 || ENVIRONMENT_IS_NODE || typeof dateNow !== "undefined" || typeof performance === "object" && performance && typeof performance["now"] === "function"
  4591. }
  4592. function _clock_gettime(clk_id, tp) {
  4593. var now;
  4594. if (clk_id === 0) {
  4595. now = Date.now()
  4596. } else if (clk_id === 1 && _emscripten_get_now_is_monotonic()) {
  4597. now = _emscripten_get_now()
  4598. } else {
  4599. ___setErrNo(28);
  4600. return -1
  4601. }
  4602. HEAP32[tp >> 2] = now / 1e3 | 0;
  4603. HEAP32[tp + 4 >> 2] = now % 1e3 * 1e3 * 1e3 | 0;
  4604. return 0
  4605. }
  4606. function _emscripten_get_heap_size() {
  4607. return HEAP8.length
  4608. }
  4609. function _emscripten_is_main_browser_thread() {
  4610. return !ENVIRONMENT_IS_WORKER
  4611. }
  4612. function abortOnCannotGrowMemory(requestedSize) {
  4613. abort("Cannot enlarge memory arrays to size " + requestedSize + " bytes (OOM). Either (1) compile with -s TOTAL_MEMORY=X with X higher than the current value " + HEAP8.length + ", (2) compile with -s ALLOW_MEMORY_GROWTH=1 which allows increasing the size at runtime, or (3) if you want malloc to return NULL (0) instead of this abort, compile with -s ABORTING_MALLOC=0 ")
  4614. }
  4615. function _emscripten_resize_heap(requestedSize) {
  4616. abortOnCannotGrowMemory(requestedSize)
  4617. }
  4618. var Fetch = {
  4619. xhrs: [],
  4620. setu64: function(addr, val) {
  4621. HEAPU32[addr >> 2] = val;
  4622. HEAPU32[addr + 4 >> 2] = val / 4294967296 | 0
  4623. },
  4624. openDatabase: function(dbname, dbversion, onsuccess, onerror) {
  4625. try {
  4626. var openRequest = indexedDB.open(dbname, dbversion)
  4627. } catch (e) {
  4628. return onerror(e)
  4629. }
  4630. openRequest.onupgradeneeded = function(event) {
  4631. var db = event.target.result;
  4632. if (db.objectStoreNames.contains("FILES")) {
  4633. db.deleteObjectStore("FILES")
  4634. }
  4635. db.createObjectStore("FILES")
  4636. };
  4637. openRequest.onsuccess = function(event) {
  4638. onsuccess(event.target.result)
  4639. };
  4640. openRequest.onerror = function(error) {
  4641. onerror(error)
  4642. }
  4643. },
  4644. staticInit: function() {
  4645. var isMainThread = typeof ENVIRONMENT_IS_FETCH_WORKER === "undefined";
  4646. var onsuccess = function(db) {
  4647. Fetch.dbInstance = db;
  4648. if (isMainThread) {
  4649. removeRunDependency("library_fetch_init")
  4650. }
  4651. };
  4652. var onerror = function() {
  4653. Fetch.dbInstance = false;
  4654. if (isMainThread) {
  4655. removeRunDependency("library_fetch_init")
  4656. }
  4657. };
  4658. Fetch.openDatabase("emscripten_filesystem", 1, onsuccess, onerror);
  4659. if (typeof ENVIRONMENT_IS_FETCH_WORKER === "undefined" || !ENVIRONMENT_IS_FETCH_WORKER) addRunDependency("library_fetch_init")
  4660. }
  4661. };
  4662. function __emscripten_fetch_xhr(fetch, onsuccess, onerror, onprogress, onreadystatechange) {
  4663. var url = HEAPU32[fetch + 8 >> 2];
  4664. if (!url) {
  4665. onerror(fetch, 0, "no url specified!");
  4666. return
  4667. }
  4668. var url_ = UTF8ToString(url);
  4669. var fetch_attr = fetch + 112;
  4670. var requestMethod = UTF8ToString(fetch_attr);
  4671. if (!requestMethod) requestMethod = "GET";
  4672. var userData = HEAPU32[fetch_attr + 32 >> 2];
  4673. var fetchAttributes = HEAPU32[fetch_attr + 52 >> 2];
  4674. var timeoutMsecs = HEAPU32[fetch_attr + 56 >> 2];
  4675. var withCredentials = !!HEAPU32[fetch_attr + 60 >> 2];
  4676. var destinationPath = HEAPU32[fetch_attr + 64 >> 2];
  4677. var userName = HEAPU32[fetch_attr + 68 >> 2];
  4678. var password = HEAPU32[fetch_attr + 72 >> 2];
  4679. var requestHeaders = HEAPU32[fetch_attr + 76 >> 2];
  4680. var overriddenMimeType = HEAPU32[fetch_attr + 80 >> 2];
  4681. var dataPtr = HEAPU32[fetch_attr + 84 >> 2];
  4682. var dataLength = HEAPU32[fetch_attr + 88 >> 2];
  4683. var fetchAttrLoadToMemory = !!(fetchAttributes & 1);
  4684. var fetchAttrStreamData = !!(fetchAttributes & 2);
  4685. var fetchAttrPersistFile = !!(fetchAttributes & 4);
  4686. var fetchAttrAppend = !!(fetchAttributes & 8);
  4687. var fetchAttrReplace = !!(fetchAttributes & 16);
  4688. var fetchAttrSynchronous = !!(fetchAttributes & 64);
  4689. var fetchAttrWaitable = !!(fetchAttributes & 128);
  4690. var userNameStr = userName ? UTF8ToString(userName) : undefined;
  4691. var passwordStr = password ? UTF8ToString(password) : undefined;
  4692. var overriddenMimeTypeStr = overriddenMimeType ? UTF8ToString(overriddenMimeType) : undefined;
  4693. var xhr = new XMLHttpRequest;
  4694. xhr.withCredentials = withCredentials;
  4695. xhr.open(requestMethod, url_, !fetchAttrSynchronous, userNameStr, passwordStr);
  4696. if (!fetchAttrSynchronous) xhr.timeout = timeoutMsecs;
  4697. xhr.url_ = url_;
  4698. assert(!fetchAttrStreamData, "streaming uses moz-chunked-arraybuffer which is no longer supported; TODO: rewrite using fetch()");
  4699. xhr.responseType = "arraybuffer";
  4700. if (overriddenMimeType) {
  4701. xhr.overrideMimeType(overriddenMimeTypeStr)
  4702. }
  4703. if (requestHeaders) {
  4704. for (;;) {
  4705. var key = HEAPU32[requestHeaders >> 2];
  4706. if (!key) break;
  4707. var value = HEAPU32[requestHeaders + 4 >> 2];
  4708. if (!value) break;
  4709. requestHeaders += 8;
  4710. var keyStr = UTF8ToString(key);
  4711. var valueStr = UTF8ToString(value);
  4712. xhr.setRequestHeader(keyStr, valueStr)
  4713. }
  4714. }
  4715. Fetch.xhrs.push(xhr);
  4716. var id = Fetch.xhrs.length;
  4717. HEAPU32[fetch + 0 >> 2] = id;
  4718. var data = dataPtr && dataLength ? HEAPU8.slice(dataPtr, dataPtr + dataLength) : null;
  4719. xhr.onload = function(e) {
  4720. var len = xhr.response ? xhr.response.byteLength : 0;
  4721. var ptr = 0;
  4722. var ptrLen = 0;
  4723. if (fetchAttrLoadToMemory && !fetchAttrStreamData) {
  4724. ptrLen = len;
  4725. ptr = _malloc(ptrLen);
  4726. HEAPU8.set(new Uint8Array(xhr.response), ptr)
  4727. }
  4728. HEAPU32[fetch + 12 >> 2] = ptr;
  4729. Fetch.setu64(fetch + 16, ptrLen);
  4730. Fetch.setu64(fetch + 24, 0);
  4731. if (len) {
  4732. Fetch.setu64(fetch + 32, len)
  4733. }
  4734. HEAPU16[fetch + 40 >> 1] = xhr.readyState;
  4735. if (xhr.readyState === 4 && xhr.status === 0) {
  4736. if (len > 0) xhr.status = 200;
  4737. else xhr.status = 404
  4738. }
  4739. HEAPU16[fetch + 42 >> 1] = xhr.status;
  4740. if (xhr.statusText) stringToUTF8(xhr.statusText, fetch + 44, 64);
  4741. if (xhr.status >= 200 && xhr.status < 300) {
  4742. if (onsuccess) onsuccess(fetch, xhr, e)
  4743. } else {
  4744. if (onerror) onerror(fetch, xhr, e)
  4745. }
  4746. };
  4747. xhr.onerror = function(e) {
  4748. var status = xhr.status;
  4749. if (xhr.readyState === 4 && status === 0) status = 404;
  4750. HEAPU32[fetch + 12 >> 2] = 0;
  4751. Fetch.setu64(fetch + 16, 0);
  4752. Fetch.setu64(fetch + 24, 0);
  4753. Fetch.setu64(fetch + 32, 0);
  4754. HEAPU16[fetch + 40 >> 1] = xhr.readyState;
  4755. HEAPU16[fetch + 42 >> 1] = status;
  4756. if (onerror) onerror(fetch, xhr, e)
  4757. };
  4758. xhr.ontimeout = function(e) {
  4759. if (onerror) onerror(fetch, xhr, e)
  4760. };
  4761. xhr.onprogress = function(e) {
  4762. var ptrLen = fetchAttrLoadToMemory && fetchAttrStreamData && xhr.response ? xhr.response.byteLength : 0;
  4763. var ptr = 0;
  4764. if (fetchAttrLoadToMemory && fetchAttrStreamData) {
  4765. ptr = _malloc(ptrLen);
  4766. HEAPU8.set(new Uint8Array(xhr.response), ptr)
  4767. }
  4768. HEAPU32[fetch + 12 >> 2] = ptr;
  4769. Fetch.setu64(fetch + 16, ptrLen);
  4770. Fetch.setu64(fetch + 24, e.loaded - ptrLen);
  4771. Fetch.setu64(fetch + 32, e.total);
  4772. HEAPU16[fetch + 40 >> 1] = xhr.readyState;
  4773. if (xhr.readyState >= 3 && xhr.status === 0 && e.loaded > 0) xhr.status = 200;
  4774. HEAPU16[fetch + 42 >> 1] = xhr.status;
  4775. if (xhr.statusText) stringToUTF8(xhr.statusText, fetch + 44, 64);
  4776. if (onprogress) onprogress(fetch, xhr, e)
  4777. };
  4778. xhr.onreadystatechange = function(e) {
  4779. HEAPU16[fetch + 40 >> 1] = xhr.readyState;
  4780. if (xhr.readyState >= 2) {
  4781. HEAPU16[fetch + 42 >> 1] = xhr.status
  4782. }
  4783. if (onreadystatechange) onreadystatechange(fetch, xhr, e)
  4784. };
  4785. try {
  4786. xhr.send(data)
  4787. } catch (e) {
  4788. if (onerror) onerror(fetch, xhr, e)
  4789. }
  4790. }
  4791. function __emscripten_fetch_cache_data(db, fetch, data, onsuccess, onerror) {
  4792. if (!db) {
  4793. onerror(fetch, 0, "IndexedDB not available!");
  4794. return
  4795. }
  4796. var fetch_attr = fetch + 112;
  4797. var destinationPath = HEAPU32[fetch_attr + 64 >> 2];
  4798. if (!destinationPath) destinationPath = HEAPU32[fetch + 8 >> 2];
  4799. var destinationPathStr = UTF8ToString(destinationPath);
  4800. try {
  4801. var transaction = db.transaction(["FILES"], "readwrite");
  4802. var packages = transaction.objectStore("FILES");
  4803. var putRequest = packages.put(data, destinationPathStr);
  4804. putRequest.onsuccess = function(event) {
  4805. HEAPU16[fetch + 40 >> 1] = 4;
  4806. HEAPU16[fetch + 42 >> 1] = 200;
  4807. stringToUTF8("OK", fetch + 44, 64);
  4808. onsuccess(fetch, 0, destinationPathStr)
  4809. };
  4810. putRequest.onerror = function(error) {
  4811. HEAPU16[fetch + 40 >> 1] = 4;
  4812. HEAPU16[fetch + 42 >> 1] = 413;
  4813. stringToUTF8("Payload Too Large", fetch + 44, 64);
  4814. onerror(fetch, 0, error)
  4815. }
  4816. } catch (e) {
  4817. onerror(fetch, 0, e)
  4818. }
  4819. }
  4820. function __emscripten_fetch_load_cached_data(db, fetch, onsuccess, onerror) {
  4821. if (!db) {
  4822. onerror(fetch, 0, "IndexedDB not available!");
  4823. return
  4824. }
  4825. var fetch_attr = fetch + 112;
  4826. var path = HEAPU32[fetch_attr + 64 >> 2];
  4827. if (!path) path = HEAPU32[fetch + 8 >> 2];
  4828. var pathStr = UTF8ToString(path);
  4829. try {
  4830. var transaction = db.transaction(["FILES"], "readonly");
  4831. var packages = transaction.objectStore("FILES");
  4832. var getRequest = packages.get(pathStr);
  4833. getRequest.onsuccess = function(event) {
  4834. if (event.target.result) {
  4835. var value = event.target.result;
  4836. var len = value.byteLength || value.length;
  4837. var ptr = _malloc(len);
  4838. HEAPU8.set(new Uint8Array(value), ptr);
  4839. HEAPU32[fetch + 12 >> 2] = ptr;
  4840. Fetch.setu64(fetch + 16, len);
  4841. Fetch.setu64(fetch + 24, 0);
  4842. Fetch.setu64(fetch + 32, len);
  4843. HEAPU16[fetch + 40 >> 1] = 4;
  4844. HEAPU16[fetch + 42 >> 1] = 200;
  4845. stringToUTF8("OK", fetch + 44, 64);
  4846. onsuccess(fetch, 0, value)
  4847. } else {
  4848. HEAPU16[fetch + 40 >> 1] = 4;
  4849. HEAPU16[fetch + 42 >> 1] = 404;
  4850. stringToUTF8("Not Found", fetch + 44, 64);
  4851. onerror(fetch, 0, "no data")
  4852. }
  4853. };
  4854. getRequest.onerror = function(error) {
  4855. HEAPU16[fetch + 40 >> 1] = 4;
  4856. HEAPU16[fetch + 42 >> 1] = 404;
  4857. stringToUTF8("Not Found", fetch + 44, 64);
  4858. onerror(fetch, 0, error)
  4859. }
  4860. } catch (e) {
  4861. onerror(fetch, 0, e)
  4862. }
  4863. }
  4864. function __emscripten_fetch_delete_cached_data(db, fetch, onsuccess, onerror) {
  4865. if (!db) {
  4866. onerror(fetch, 0, "IndexedDB not available!");
  4867. return
  4868. }
  4869. var fetch_attr = fetch + 112;
  4870. var path = HEAPU32[fetch_attr + 64 >> 2];
  4871. if (!path) path = HEAPU32[fetch + 8 >> 2];
  4872. var pathStr = UTF8ToString(path);
  4873. try {
  4874. var transaction = db.transaction(["FILES"], "readwrite");
  4875. var packages = transaction.objectStore("FILES");
  4876. var request = packages.delete(pathStr);
  4877. request.onsuccess = function(event) {
  4878. var value = event.target.result;
  4879. HEAPU32[fetch + 12 >> 2] = 0;
  4880. Fetch.setu64(fetch + 16, 0);
  4881. Fetch.setu64(fetch + 24, 0);
  4882. Fetch.setu64(fetch + 32, 0);
  4883. HEAPU16[fetch + 40 >> 1] = 4;
  4884. HEAPU16[fetch + 42 >> 1] = 200;
  4885. stringToUTF8("OK", fetch + 44, 64);
  4886. onsuccess(fetch, 0, value)
  4887. };
  4888. request.onerror = function(error) {
  4889. HEAPU16[fetch + 40 >> 1] = 4;
  4890. HEAPU16[fetch + 42 >> 1] = 404;
  4891. stringToUTF8("Not Found", fetch + 44, 64);
  4892. onerror(fetch, 0, error)
  4893. }
  4894. } catch (e) {
  4895. onerror(fetch, 0, e)
  4896. }
  4897. }
  4898. function _emscripten_start_fetch(fetch, successcb, errorcb, progresscb, readystatechangecb) {
  4899. if (typeof noExitRuntime !== "undefined") noExitRuntime = true;
  4900. var fetch_attr = fetch + 112;
  4901. var requestMethod = UTF8ToString(fetch_attr);
  4902. var onsuccess = HEAPU32[fetch_attr + 36 >> 2];
  4903. var onerror = HEAPU32[fetch_attr + 40 >> 2];
  4904. var onprogress = HEAPU32[fetch_attr + 44 >> 2];
  4905. var onreadystatechange = HEAPU32[fetch_attr + 48 >> 2];
  4906. var fetchAttributes = HEAPU32[fetch_attr + 52 >> 2];
  4907. var fetchAttrLoadToMemory = !!(fetchAttributes & 1);
  4908. var fetchAttrStreamData = !!(fetchAttributes & 2);
  4909. var fetchAttrPersistFile = !!(fetchAttributes & 4);
  4910. var fetchAttrNoDownload = !!(fetchAttributes & 32);
  4911. var fetchAttrAppend = !!(fetchAttributes & 8);
  4912. var fetchAttrReplace = !!(fetchAttributes & 16);
  4913. var reportSuccess = function(fetch, xhr, e) {
  4914. if (onsuccess) dynCall_vi(onsuccess, fetch);
  4915. else if (successcb) successcb(fetch)
  4916. };
  4917. var reportProgress = function(fetch, xhr, e) {
  4918. if (onprogress) dynCall_vi(onprogress, fetch);
  4919. else if (progresscb) progresscb(fetch)
  4920. };
  4921. var reportError = function(fetch, xhr, e) {
  4922. if (onerror) dynCall_vi(onerror, fetch);
  4923. else if (errorcb) errorcb(fetch)
  4924. };
  4925. var reportReadyStateChange = function(fetch, xhr, e) {
  4926. if (onreadystatechange) dynCall_vi(onreadystatechange, fetch);
  4927. else if (readystatechangecb) readystatechangecb(fetch)
  4928. };
  4929. var performUncachedXhr = function(fetch, xhr, e) {
  4930. __emscripten_fetch_xhr(fetch, reportSuccess, reportError, reportProgress, reportReadyStateChange)
  4931. };
  4932. var cacheResultAndReportSuccess = function(fetch, xhr, e) {
  4933. var storeSuccess = function(fetch, xhr, e) {
  4934. if (onsuccess) dynCall_vi(onsuccess, fetch);
  4935. else if (successcb) successcb(fetch)
  4936. };
  4937. var storeError = function(fetch, xhr, e) {
  4938. if (onsuccess) dynCall_vi(onsuccess, fetch);
  4939. else if (successcb) successcb(fetch)
  4940. };
  4941. __emscripten_fetch_cache_data(Fetch.dbInstance, fetch, xhr.response, storeSuccess, storeError)
  4942. };
  4943. var performCachedXhr = function(fetch, xhr, e) {
  4944. __emscripten_fetch_xhr(fetch, cacheResultAndReportSuccess, reportError, reportProgress, reportReadyStateChange)
  4945. };
  4946. if (requestMethod === "EM_IDB_STORE") {
  4947. var ptr = HEAPU32[fetch_attr + 84 >> 2];
  4948. __emscripten_fetch_cache_data(Fetch.dbInstance, fetch, HEAPU8.slice(ptr, ptr + HEAPU32[fetch_attr + 88 >> 2]), reportSuccess, reportError)
  4949. } else if (requestMethod === "EM_IDB_DELETE") {
  4950. __emscripten_fetch_delete_cached_data(Fetch.dbInstance, fetch, reportSuccess, reportError)
  4951. } else if (!fetchAttrReplace) {
  4952. __emscripten_fetch_load_cached_data(Fetch.dbInstance, fetch, reportSuccess, fetchAttrNoDownload ? reportError : fetchAttrPersistFile ? performCachedXhr : performUncachedXhr)
  4953. } else if (!fetchAttrNoDownload) {
  4954. __emscripten_fetch_xhr(fetch, fetchAttrPersistFile ? cacheResultAndReportSuccess : reportSuccess, reportError, reportProgress, reportReadyStateChange)
  4955. } else {
  4956. return 0
  4957. }
  4958. return fetch
  4959. }
  4960. var _fabs = Math_abs;
  4961. function _getenv(name) {
  4962. if (name === 0) return 0;
  4963. name = UTF8ToString(name);
  4964. if (!ENV.hasOwnProperty(name)) return 0;
  4965. if (_getenv.ret) _free(_getenv.ret);
  4966. _getenv.ret = allocateUTF8(ENV[name]);
  4967. return _getenv.ret
  4968. }
  4969. function _gettimeofday(ptr) {
  4970. var now = Date.now();
  4971. HEAP32[ptr >> 2] = now / 1e3 | 0;
  4972. HEAP32[ptr + 4 >> 2] = now % 1e3 * 1e3 | 0;
  4973. return 0
  4974. }
  4975. var ___tm_timezone = (stringToUTF8("GMT", 1398096, 4), 1398096);
  4976. function _gmtime_r(time, tmPtr) {
  4977. var date = new Date(HEAP32[time >> 2] * 1e3);
  4978. HEAP32[tmPtr >> 2] = date.getUTCSeconds();
  4979. HEAP32[tmPtr + 4 >> 2] = date.getUTCMinutes();
  4980. HEAP32[tmPtr + 8 >> 2] = date.getUTCHours();
  4981. HEAP32[tmPtr + 12 >> 2] = date.getUTCDate();
  4982. HEAP32[tmPtr + 16 >> 2] = date.getUTCMonth();
  4983. HEAP32[tmPtr + 20 >> 2] = date.getUTCFullYear() - 1900;
  4984. HEAP32[tmPtr + 24 >> 2] = date.getUTCDay();
  4985. HEAP32[tmPtr + 36 >> 2] = 0;
  4986. HEAP32[tmPtr + 32 >> 2] = 0;
  4987. var start = Date.UTC(date.getUTCFullYear(), 0, 1, 0, 0, 0, 0);
  4988. var yday = (date.getTime() - start) / (1e3 * 60 * 60 * 24) | 0;
  4989. HEAP32[tmPtr + 28 >> 2] = yday;
  4990. HEAP32[tmPtr + 40 >> 2] = ___tm_timezone;
  4991. return tmPtr
  4992. }
  4993. function _llvm_exp2_f32(x) {
  4994. return Math.pow(2, x)
  4995. }
  4996. function _llvm_exp2_f64(a0) {
  4997. return _llvm_exp2_f32(a0)
  4998. }
  4999. function _llvm_log2_f32(x) {
  5000. return Math.log(x) / Math.LN2
  5001. }
  5002. function _llvm_stackrestore(p) {
  5003. var self = _llvm_stacksave;
  5004. var ret = self.LLVM_SAVEDSTACKS[p];
  5005. self.LLVM_SAVEDSTACKS.splice(p, 1);
  5006. stackRestore(ret)
  5007. }
  5008. function _llvm_stacksave() {
  5009. var self = _llvm_stacksave;
  5010. if (!self.LLVM_SAVEDSTACKS) {
  5011. self.LLVM_SAVEDSTACKS = []
  5012. }
  5013. self.LLVM_SAVEDSTACKS.push(stackSave());
  5014. return self.LLVM_SAVEDSTACKS.length - 1
  5015. }
  5016. var _llvm_trunc_f64 = Math_trunc;
  5017. function _tzset() {
  5018. if (_tzset.called) return;
  5019. _tzset.called = true;
  5020. HEAP32[__get_timezone() >> 2] = (new Date).getTimezoneOffset() * 60;
  5021. var currentYear = (new Date).getFullYear();
  5022. var winter = new Date(currentYear, 0, 1);
  5023. var summer = new Date(currentYear, 6, 1);
  5024. HEAP32[__get_daylight() >> 2] = Number(winter.getTimezoneOffset() != summer.getTimezoneOffset());
  5025. function extractZone(date) {
  5026. var match = date.toTimeString().match(/\(([A-Za-z ]+)\)$/);
  5027. return match ? match[1] : "GMT"
  5028. }
  5029. var winterName = extractZone(winter);
  5030. var summerName = extractZone(summer);
  5031. var winterNamePtr = allocate(intArrayFromString(winterName), "i8", ALLOC_NORMAL);
  5032. var summerNamePtr = allocate(intArrayFromString(summerName), "i8", ALLOC_NORMAL);
  5033. if (summer.getTimezoneOffset() < winter.getTimezoneOffset()) {
  5034. HEAP32[__get_tzname() >> 2] = winterNamePtr;
  5035. HEAP32[__get_tzname() + 4 >> 2] = summerNamePtr
  5036. } else {
  5037. HEAP32[__get_tzname() >> 2] = summerNamePtr;
  5038. HEAP32[__get_tzname() + 4 >> 2] = winterNamePtr
  5039. }
  5040. }
  5041. function _localtime_r(time, tmPtr) {
  5042. _tzset();
  5043. var date = new Date(HEAP32[time >> 2] * 1e3);
  5044. HEAP32[tmPtr >> 2] = date.getSeconds();
  5045. HEAP32[tmPtr + 4 >> 2] = date.getMinutes();
  5046. HEAP32[tmPtr + 8 >> 2] = date.getHours();
  5047. HEAP32[tmPtr + 12 >> 2] = date.getDate();
  5048. HEAP32[tmPtr + 16 >> 2] = date.getMonth();
  5049. HEAP32[tmPtr + 20 >> 2] = date.getFullYear() - 1900;
  5050. HEAP32[tmPtr + 24 >> 2] = date.getDay();
  5051. var start = new Date(date.getFullYear(), 0, 1);
  5052. var yday = (date.getTime() - start.getTime()) / (1e3 * 60 * 60 * 24) | 0;
  5053. HEAP32[tmPtr + 28 >> 2] = yday;
  5054. HEAP32[tmPtr + 36 >> 2] = -(date.getTimezoneOffset() * 60);
  5055. var summerOffset = new Date(date.getFullYear(), 6, 1).getTimezoneOffset();
  5056. var winterOffset = start.getTimezoneOffset();
  5057. var dst = (summerOffset != winterOffset && date.getTimezoneOffset() == Math.min(winterOffset, summerOffset)) | 0;
  5058. HEAP32[tmPtr + 32 >> 2] = dst;
  5059. var zonePtr = HEAP32[__get_tzname() + (dst ? 4 : 0) >> 2];
  5060. HEAP32[tmPtr + 40 >> 2] = zonePtr;
  5061. return tmPtr
  5062. }
  5063. function _emscripten_memcpy_big(dest, src, num) {
  5064. HEAPU8.set(HEAPU8.subarray(src, src + num), dest)
  5065. }
  5066. function _usleep(useconds) {
  5067. var msec = useconds / 1e3;
  5068. if ((ENVIRONMENT_IS_WEB || ENVIRONMENT_IS_WORKER) && self["performance"] && self["performance"]["now"]) {
  5069. var start = self["performance"]["now"]();
  5070. while (self["performance"]["now"]() - start < msec) {}
  5071. } else {
  5072. var start = Date.now();
  5073. while (Date.now() - start < msec) {}
  5074. }
  5075. return 0
  5076. }
  5077. Module["_usleep"] = _usleep;
  5078. function _nanosleep(rqtp, rmtp) {
  5079. if (rqtp === 0) {
  5080. ___setErrNo(28);
  5081. return -1
  5082. }
  5083. var seconds = HEAP32[rqtp >> 2];
  5084. var nanoseconds = HEAP32[rqtp + 4 >> 2];
  5085. if (nanoseconds < 0 || nanoseconds > 999999999 || seconds < 0) {
  5086. ___setErrNo(28);
  5087. return -1
  5088. }
  5089. if (rmtp !== 0) {
  5090. HEAP32[rmtp >> 2] = 0;
  5091. HEAP32[rmtp + 4 >> 2] = 0
  5092. }
  5093. return _usleep(seconds * 1e6 + nanoseconds / 1e3)
  5094. }
  5095. function _pthread_cond_destroy() {
  5096. return 0
  5097. }
  5098. function _pthread_cond_init() {
  5099. return 0
  5100. }
  5101. function _pthread_create() {
  5102. return 6
  5103. }
  5104. function _pthread_join() {}
  5105. function __isLeapYear(year) {
  5106. return year % 4 === 0 && (year % 100 !== 0 || year % 400 === 0)
  5107. }
  5108. function __arraySum(array, index) {
  5109. var sum = 0;
  5110. for (var i = 0; i <= index; sum += array[i++]);
  5111. return sum
  5112. }
  5113. var __MONTH_DAYS_LEAP = [31, 29, 31, 30, 31, 30, 31, 31, 30, 31, 30, 31];
  5114. var __MONTH_DAYS_REGULAR = [31, 28, 31, 30, 31, 30, 31, 31, 30, 31, 30, 31];
  5115. function __addDays(date, days) {
  5116. var newDate = new Date(date.getTime());
  5117. while (days > 0) {
  5118. var leap = __isLeapYear(newDate.getFullYear());
  5119. var currentMonth = newDate.getMonth();
  5120. var daysInCurrentMonth = (leap ? __MONTH_DAYS_LEAP : __MONTH_DAYS_REGULAR)[currentMonth];
  5121. if (days > daysInCurrentMonth - newDate.getDate()) {
  5122. days -= daysInCurrentMonth - newDate.getDate() + 1;
  5123. newDate.setDate(1);
  5124. if (currentMonth < 11) {
  5125. newDate.setMonth(currentMonth + 1)
  5126. } else {
  5127. newDate.setMonth(0);
  5128. newDate.setFullYear(newDate.getFullYear() + 1)
  5129. }
  5130. } else {
  5131. newDate.setDate(newDate.getDate() + days);
  5132. return newDate
  5133. }
  5134. }
  5135. return newDate
  5136. }
  5137. function _strftime(s, maxsize, format, tm) {
  5138. var tm_zone = HEAP32[tm + 40 >> 2];
  5139. var date = {
  5140. tm_sec: HEAP32[tm >> 2],
  5141. tm_min: HEAP32[tm + 4 >> 2],
  5142. tm_hour: HEAP32[tm + 8 >> 2],
  5143. tm_mday: HEAP32[tm + 12 >> 2],
  5144. tm_mon: HEAP32[tm + 16 >> 2],
  5145. tm_year: HEAP32[tm + 20 >> 2],
  5146. tm_wday: HEAP32[tm + 24 >> 2],
  5147. tm_yday: HEAP32[tm + 28 >> 2],
  5148. tm_isdst: HEAP32[tm + 32 >> 2],
  5149. tm_gmtoff: HEAP32[tm + 36 >> 2],
  5150. tm_zone: tm_zone ? UTF8ToString(tm_zone) : ""
  5151. };
  5152. var pattern = UTF8ToString(format);
  5153. var EXPANSION_RULES_1 = {
  5154. "%c": "%a %b %d %H:%M:%S %Y",
  5155. "%D": "%m/%d/%y",
  5156. "%F": "%Y-%m-%d",
  5157. "%h": "%b",
  5158. "%r": "%I:%M:%S %p",
  5159. "%R": "%H:%M",
  5160. "%T": "%H:%M:%S",
  5161. "%x": "%m/%d/%y",
  5162. "%X": "%H:%M:%S",
  5163. "%Ec": "%c",
  5164. "%EC": "%C",
  5165. "%Ex": "%m/%d/%y",
  5166. "%EX": "%H:%M:%S",
  5167. "%Ey": "%y",
  5168. "%EY": "%Y",
  5169. "%Od": "%d",
  5170. "%Oe": "%e",
  5171. "%OH": "%H",
  5172. "%OI": "%I",
  5173. "%Om": "%m",
  5174. "%OM": "%M",
  5175. "%OS": "%S",
  5176. "%Ou": "%u",
  5177. "%OU": "%U",
  5178. "%OV": "%V",
  5179. "%Ow": "%w",
  5180. "%OW": "%W",
  5181. "%Oy": "%y"
  5182. };
  5183. for (var rule in EXPANSION_RULES_1) {
  5184. pattern = pattern.replace(new RegExp(rule, "g"), EXPANSION_RULES_1[rule])
  5185. }
  5186. var WEEKDAYS = ["Sunday", "Monday", "Tuesday", "Wednesday", "Thursday", "Friday", "Saturday"];
  5187. var MONTHS = ["January", "February", "March", "April", "May", "June", "July", "August", "September", "October", "November", "December"];
  5188. function leadingSomething(value, digits, character) {
  5189. var str = typeof value === "number" ? value.toString() : value || "";
  5190. while (str.length < digits) {
  5191. str = character[0] + str
  5192. }
  5193. return str
  5194. }
  5195. function leadingNulls(value, digits) {
  5196. return leadingSomething(value, digits, "0")
  5197. }
  5198. function compareByDay(date1, date2) {
  5199. function sgn(value) {
  5200. return value < 0 ? -1 : value > 0 ? 1 : 0
  5201. }
  5202. var compare;
  5203. if ((compare = sgn(date1.getFullYear() - date2.getFullYear())) === 0) {
  5204. if ((compare = sgn(date1.getMonth() - date2.getMonth())) === 0) {
  5205. compare = sgn(date1.getDate() - date2.getDate())
  5206. }
  5207. }
  5208. return compare
  5209. }
  5210. function getFirstWeekStartDate(janFourth) {
  5211. switch (janFourth.getDay()) {
  5212. case 0:
  5213. return new Date(janFourth.getFullYear() - 1, 11, 29);
  5214. case 1:
  5215. return janFourth;
  5216. case 2:
  5217. return new Date(janFourth.getFullYear(), 0, 3);
  5218. case 3:
  5219. return new Date(janFourth.getFullYear(), 0, 2);
  5220. case 4:
  5221. return new Date(janFourth.getFullYear(), 0, 1);
  5222. case 5:
  5223. return new Date(janFourth.getFullYear() - 1, 11, 31);
  5224. case 6:
  5225. return new Date(janFourth.getFullYear() - 1, 11, 30)
  5226. }
  5227. }
  5228. function getWeekBasedYear(date) {
  5229. var thisDate = __addDays(new Date(date.tm_year + 1900, 0, 1), date.tm_yday);
  5230. var janFourthThisYear = new Date(thisDate.getFullYear(), 0, 4);
  5231. var janFourthNextYear = new Date(thisDate.getFullYear() + 1, 0, 4);
  5232. var firstWeekStartThisYear = getFirstWeekStartDate(janFourthThisYear);
  5233. var firstWeekStartNextYear = getFirstWeekStartDate(janFourthNextYear);
  5234. if (compareByDay(firstWeekStartThisYear, thisDate) <= 0) {
  5235. if (compareByDay(firstWeekStartNextYear, thisDate) <= 0) {
  5236. return thisDate.getFullYear() + 1
  5237. } else {
  5238. return thisDate.getFullYear()
  5239. }
  5240. } else {
  5241. return thisDate.getFullYear() - 1
  5242. }
  5243. }
  5244. var EXPANSION_RULES_2 = {
  5245. "%a": function(date) {
  5246. return WEEKDAYS[date.tm_wday].substring(0, 3)
  5247. },
  5248. "%A": function(date) {
  5249. return WEEKDAYS[date.tm_wday]
  5250. },
  5251. "%b": function(date) {
  5252. return MONTHS[date.tm_mon].substring(0, 3)
  5253. },
  5254. "%B": function(date) {
  5255. return MONTHS[date.tm_mon]
  5256. },
  5257. "%C": function(date) {
  5258. var year = date.tm_year + 1900;
  5259. return leadingNulls(year / 100 | 0, 2)
  5260. },
  5261. "%d": function(date) {
  5262. return leadingNulls(date.tm_mday, 2)
  5263. },
  5264. "%e": function(date) {
  5265. return leadingSomething(date.tm_mday, 2, " ")
  5266. },
  5267. "%g": function(date) {
  5268. return getWeekBasedYear(date).toString().substring(2)
  5269. },
  5270. "%G": function(date) {
  5271. return getWeekBasedYear(date)
  5272. },
  5273. "%H": function(date) {
  5274. return leadingNulls(date.tm_hour, 2)
  5275. },
  5276. "%I": function(date) {
  5277. var twelveHour = date.tm_hour;
  5278. if (twelveHour == 0) twelveHour = 12;
  5279. else if (twelveHour > 12) twelveHour -= 12;
  5280. return leadingNulls(twelveHour, 2)
  5281. },
  5282. "%j": function(date) {
  5283. return leadingNulls(date.tm_mday + __arraySum(__isLeapYear(date.tm_year + 1900) ? __MONTH_DAYS_LEAP : __MONTH_DAYS_REGULAR, date.tm_mon - 1), 3)
  5284. },
  5285. "%m": function(date) {
  5286. return leadingNulls(date.tm_mon + 1, 2)
  5287. },
  5288. "%M": function(date) {
  5289. return leadingNulls(date.tm_min, 2)
  5290. },
  5291. "%n": function() {
  5292. return "\n"
  5293. },
  5294. "%p": function(date) {
  5295. if (date.tm_hour >= 0 && date.tm_hour < 12) {
  5296. return "AM"
  5297. } else {
  5298. return "PM"
  5299. }
  5300. },
  5301. "%S": function(date) {
  5302. return leadingNulls(date.tm_sec, 2)
  5303. },
  5304. "%t": function() {
  5305. return "\t"
  5306. },
  5307. "%u": function(date) {
  5308. return date.tm_wday || 7
  5309. },
  5310. "%U": function(date) {
  5311. var janFirst = new Date(date.tm_year + 1900, 0, 1);
  5312. var firstSunday = janFirst.getDay() === 0 ? janFirst : __addDays(janFirst, 7 - janFirst.getDay());
  5313. var endDate = new Date(date.tm_year + 1900, date.tm_mon, date.tm_mday);
  5314. if (compareByDay(firstSunday, endDate) < 0) {
  5315. var februaryFirstUntilEndMonth = __arraySum(__isLeapYear(endDate.getFullYear()) ? __MONTH_DAYS_LEAP : __MONTH_DAYS_REGULAR, endDate.getMonth() - 1) - 31;
  5316. var firstSundayUntilEndJanuary = 31 - firstSunday.getDate();
  5317. var days = firstSundayUntilEndJanuary + februaryFirstUntilEndMonth + endDate.getDate();
  5318. return leadingNulls(Math.ceil(days / 7), 2)
  5319. }
  5320. return compareByDay(firstSunday, janFirst) === 0 ? "01" : "00"
  5321. },
  5322. "%V": function(date) {
  5323. var janFourthThisYear = new Date(date.tm_year + 1900, 0, 4);
  5324. var janFourthNextYear = new Date(date.tm_year + 1901, 0, 4);
  5325. var firstWeekStartThisYear = getFirstWeekStartDate(janFourthThisYear);
  5326. var firstWeekStartNextYear = getFirstWeekStartDate(janFourthNextYear);
  5327. var endDate = __addDays(new Date(date.tm_year + 1900, 0, 1), date.tm_yday);
  5328. if (compareByDay(endDate, firstWeekStartThisYear) < 0) {
  5329. return "53"
  5330. }
  5331. if (compareByDay(firstWeekStartNextYear, endDate) <= 0) {
  5332. return "01"
  5333. }
  5334. var daysDifference;
  5335. if (firstWeekStartThisYear.getFullYear() < date.tm_year + 1900) {
  5336. daysDifference = date.tm_yday + 32 - firstWeekStartThisYear.getDate()
  5337. } else {
  5338. daysDifference = date.tm_yday + 1 - firstWeekStartThisYear.getDate()
  5339. }
  5340. return leadingNulls(Math.ceil(daysDifference / 7), 2)
  5341. },
  5342. "%w": function(date) {
  5343. return date.tm_wday
  5344. },
  5345. "%W": function(date) {
  5346. var janFirst = new Date(date.tm_year, 0, 1);
  5347. var firstMonday = janFirst.getDay() === 1 ? janFirst : __addDays(janFirst, janFirst.getDay() === 0 ? 1 : 7 - janFirst.getDay() + 1);
  5348. var endDate = new Date(date.tm_year + 1900, date.tm_mon, date.tm_mday);
  5349. if (compareByDay(firstMonday, endDate) < 0) {
  5350. var februaryFirstUntilEndMonth = __arraySum(__isLeapYear(endDate.getFullYear()) ? __MONTH_DAYS_LEAP : __MONTH_DAYS_REGULAR, endDate.getMonth() - 1) - 31;
  5351. var firstMondayUntilEndJanuary = 31 - firstMonday.getDate();
  5352. var days = firstMondayUntilEndJanuary + februaryFirstUntilEndMonth + endDate.getDate();
  5353. return leadingNulls(Math.ceil(days / 7), 2)
  5354. }
  5355. return compareByDay(firstMonday, janFirst) === 0 ? "01" : "00"
  5356. },
  5357. "%y": function(date) {
  5358. return (date.tm_year + 1900).toString().substring(2)
  5359. },
  5360. "%Y": function(date) {
  5361. return date.tm_year + 1900
  5362. },
  5363. "%z": function(date) {
  5364. var off = date.tm_gmtoff;
  5365. var ahead = off >= 0;
  5366. off = Math.abs(off) / 60;
  5367. off = off / 60 * 100 + off % 60;
  5368. return (ahead ? "+" : "-") + String("0000" + off).slice(-4)
  5369. },
  5370. "%Z": function(date) {
  5371. return date.tm_zone
  5372. },
  5373. "%%": function() {
  5374. return "%"
  5375. }
  5376. };
  5377. for (var rule in EXPANSION_RULES_2) {
  5378. if (pattern.indexOf(rule) >= 0) {
  5379. pattern = pattern.replace(new RegExp(rule, "g"), EXPANSION_RULES_2[rule](date))
  5380. }
  5381. }
  5382. var bytes = intArrayFromString(pattern, false);
  5383. if (bytes.length > maxsize) {
  5384. return 0
  5385. }
  5386. writeArrayToMemory(bytes, s);
  5387. return bytes.length - 1
  5388. }
  5389. function _sysconf(name) {
  5390. switch (name) {
  5391. case 30:
  5392. return PAGE_SIZE;
  5393. case 85:
  5394. var maxHeapSize = 2 * 1024 * 1024 * 1024 - 65536;
  5395. maxHeapSize = HEAPU8.length;
  5396. return maxHeapSize / PAGE_SIZE;
  5397. case 132:
  5398. case 133:
  5399. case 12:
  5400. case 137:
  5401. case 138:
  5402. case 15:
  5403. case 235:
  5404. case 16:
  5405. case 17:
  5406. case 18:
  5407. case 19:
  5408. case 20:
  5409. case 149:
  5410. case 13:
  5411. case 10:
  5412. case 236:
  5413. case 153:
  5414. case 9:
  5415. case 21:
  5416. case 22:
  5417. case 159:
  5418. case 154:
  5419. case 14:
  5420. case 77:
  5421. case 78:
  5422. case 139:
  5423. case 80:
  5424. case 81:
  5425. case 82:
  5426. case 68:
  5427. case 67:
  5428. case 164:
  5429. case 11:
  5430. case 29:
  5431. case 47:
  5432. case 48:
  5433. case 95:
  5434. case 52:
  5435. case 51:
  5436. case 46:
  5437. return 200809;
  5438. case 79:
  5439. return 0;
  5440. case 27:
  5441. case 246:
  5442. case 127:
  5443. case 128:
  5444. case 23:
  5445. case 24:
  5446. case 160:
  5447. case 161:
  5448. case 181:
  5449. case 182:
  5450. case 242:
  5451. case 183:
  5452. case 184:
  5453. case 243:
  5454. case 244:
  5455. case 245:
  5456. case 165:
  5457. case 178:
  5458. case 179:
  5459. case 49:
  5460. case 50:
  5461. case 168:
  5462. case 169:
  5463. case 175:
  5464. case 170:
  5465. case 171:
  5466. case 172:
  5467. case 97:
  5468. case 76:
  5469. case 32:
  5470. case 173:
  5471. case 35:
  5472. return -1;
  5473. case 176:
  5474. case 177:
  5475. case 7:
  5476. case 155:
  5477. case 8:
  5478. case 157:
  5479. case 125:
  5480. case 126:
  5481. case 92:
  5482. case 93:
  5483. case 129:
  5484. case 130:
  5485. case 131:
  5486. case 94:
  5487. case 91:
  5488. return 1;
  5489. case 74:
  5490. case 60:
  5491. case 69:
  5492. case 70:
  5493. case 4:
  5494. return 1024;
  5495. case 31:
  5496. case 42:
  5497. case 72:
  5498. return 32;
  5499. case 87:
  5500. case 26:
  5501. case 33:
  5502. return 2147483647;
  5503. case 34:
  5504. case 1:
  5505. return 47839;
  5506. case 38:
  5507. case 36:
  5508. return 99;
  5509. case 43:
  5510. case 37:
  5511. return 2048;
  5512. case 0:
  5513. return 2097152;
  5514. case 3:
  5515. return 65536;
  5516. case 28:
  5517. return 32768;
  5518. case 44:
  5519. return 32767;
  5520. case 75:
  5521. return 16384;
  5522. case 39:
  5523. return 1e3;
  5524. case 89:
  5525. return 700;
  5526. case 71:
  5527. return 256;
  5528. case 40:
  5529. return 255;
  5530. case 2:
  5531. return 100;
  5532. case 180:
  5533. return 64;
  5534. case 25:
  5535. return 20;
  5536. case 5:
  5537. return 16;
  5538. case 6:
  5539. return 6;
  5540. case 73:
  5541. return 4;
  5542. case 84: {
  5543. if (typeof navigator === "object") return navigator["hardwareConcurrency"] || 1;
  5544. return 1
  5545. }
  5546. }
  5547. ___setErrNo(28);
  5548. return -1
  5549. }
  5550. function _time(ptr) {
  5551. var ret = Date.now() / 1e3 | 0;
  5552. if (ptr) {
  5553. HEAP32[ptr >> 2] = ret
  5554. }
  5555. return ret
  5556. }
  5557. FS.staticInit();
  5558. if (ENVIRONMENT_HAS_NODE) {
  5559. var fs = require("fs");
  5560. var NODEJS_PATH = require("path");
  5561. NODEFS.staticInit()
  5562. }
  5563. if (ENVIRONMENT_IS_NODE) {
  5564. _emscripten_get_now = function _emscripten_get_now_actual() {
  5565. var t = process["hrtime"]();
  5566. return t[0] * 1e3 + t[1] / 1e6
  5567. }
  5568. } else if (typeof dateNow !== "undefined") {
  5569. _emscripten_get_now = dateNow
  5570. } else if (typeof performance === "object" && performance && typeof performance["now"] === "function") {
  5571. _emscripten_get_now = function() {
  5572. return performance["now"]()
  5573. }
  5574. } else {
  5575. _emscripten_get_now = Date.now
  5576. }
  5577. Fetch.staticInit();
  5578. function intArrayFromString(stringy, dontAddNull, length) {
  5579. var len = length > 0 ? length : lengthBytesUTF8(stringy) + 1;
  5580. var u8array = new Array(len);
  5581. var numBytesWritten = stringToUTF8Array(stringy, u8array, 0, u8array.length);
  5582. if (dontAddNull) u8array.length = numBytesWritten;
  5583. return u8array
  5584. }
  5585. var debug_table_dd = [0, "jsCall_dd_0", "jsCall_dd_1", "jsCall_dd_2", "jsCall_dd_3", "jsCall_dd_4", "jsCall_dd_5", "jsCall_dd_6", "jsCall_dd_7", "jsCall_dd_8", "jsCall_dd_9", "jsCall_dd_10", "jsCall_dd_11", "jsCall_dd_12", "jsCall_dd_13", "jsCall_dd_14", "jsCall_dd_15", "jsCall_dd_16", "jsCall_dd_17", "jsCall_dd_18", "jsCall_dd_19", "jsCall_dd_20", "jsCall_dd_21", "jsCall_dd_22", "jsCall_dd_23", "jsCall_dd_24", "jsCall_dd_25", "jsCall_dd_26", "jsCall_dd_27", "jsCall_dd_28", "jsCall_dd_29", "jsCall_dd_30", "jsCall_dd_31", "jsCall_dd_32", "jsCall_dd_33", "jsCall_dd_34", "_sinh", "_cosh", "_tanh", "_sin", "_cos", "_tan", "_atan", "_asin", "_acos", "_exp", "_log", "_fabs", "_etime", 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0];
  5586. var debug_table_did = [0, "jsCall_did_0", "jsCall_did_1", "jsCall_did_2", "jsCall_did_3", "jsCall_did_4", "jsCall_did_5", "jsCall_did_6", "jsCall_did_7", "jsCall_did_8", "jsCall_did_9", "jsCall_did_10", "jsCall_did_11", "jsCall_did_12", "jsCall_did_13", "jsCall_did_14", "jsCall_did_15", "jsCall_did_16", "jsCall_did_17", "jsCall_did_18", "jsCall_did_19", "jsCall_did_20", "jsCall_did_21", "jsCall_did_22", "jsCall_did_23", "jsCall_did_24", "jsCall_did_25", "jsCall_did_26", "jsCall_did_27", "jsCall_did_28", "jsCall_did_29", "jsCall_did_30", "jsCall_did_31", "jsCall_did_32", "jsCall_did_33", "jsCall_did_34", 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0];
  5587. var debug_table_didd = [0, "jsCall_didd_0", "jsCall_didd_1", "jsCall_didd_2", "jsCall_didd_3", "jsCall_didd_4", "jsCall_didd_5", "jsCall_didd_6", "jsCall_didd_7", "jsCall_didd_8", "jsCall_didd_9", "jsCall_didd_10", "jsCall_didd_11", "jsCall_didd_12", "jsCall_didd_13", "jsCall_didd_14", "jsCall_didd_15", "jsCall_didd_16", "jsCall_didd_17", "jsCall_didd_18", "jsCall_didd_19", "jsCall_didd_20", "jsCall_didd_21", "jsCall_didd_22", "jsCall_didd_23", "jsCall_didd_24", "jsCall_didd_25", "jsCall_didd_26", "jsCall_didd_27", "jsCall_didd_28", "jsCall_didd_29", "jsCall_didd_30", "jsCall_didd_31", "jsCall_didd_32", "jsCall_didd_33", "jsCall_didd_34", 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0];
  5588. var debug_table_fii = [0, "jsCall_fii_0", "jsCall_fii_1", "jsCall_fii_2", "jsCall_fii_3", "jsCall_fii_4", "jsCall_fii_5", "jsCall_fii_6", "jsCall_fii_7", "jsCall_fii_8", "jsCall_fii_9", "jsCall_fii_10", "jsCall_fii_11", "jsCall_fii_12", "jsCall_fii_13", "jsCall_fii_14", "jsCall_fii_15", "jsCall_fii_16", "jsCall_fii_17", "jsCall_fii_18", "jsCall_fii_19", "jsCall_fii_20", "jsCall_fii_21", "jsCall_fii_22", "jsCall_fii_23", "jsCall_fii_24", "jsCall_fii_25", "jsCall_fii_26", "jsCall_fii_27", "jsCall_fii_28", "jsCall_fii_29", "jsCall_fii_30", "jsCall_fii_31", "jsCall_fii_32", "jsCall_fii_33", "jsCall_fii_34", "_sbr_sum_square_c", 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0];
  5589. var debug_table_fiii = [0, "jsCall_fiii_0", "jsCall_fiii_1", "jsCall_fiii_2", "jsCall_fiii_3", "jsCall_fiii_4", "jsCall_fiii_5", "jsCall_fiii_6", "jsCall_fiii_7", "jsCall_fiii_8", "jsCall_fiii_9", "jsCall_fiii_10", "jsCall_fiii_11", "jsCall_fiii_12", "jsCall_fiii_13", "jsCall_fiii_14", "jsCall_fiii_15", "jsCall_fiii_16", "jsCall_fiii_17", "jsCall_fiii_18", "jsCall_fiii_19", "jsCall_fiii_20", "jsCall_fiii_21", "jsCall_fiii_22", "jsCall_fiii_23", "jsCall_fiii_24", "jsCall_fiii_25", "jsCall_fiii_26", "jsCall_fiii_27", "jsCall_fiii_28", "jsCall_fiii_29", "jsCall_fiii_30", "jsCall_fiii_31", "jsCall_fiii_32", "jsCall_fiii_33", "jsCall_fiii_34", "_avpriv_scalarproduct_float_c", 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0];
  5590. var debug_table_ii = [0, "jsCall_ii_0", "jsCall_ii_1", "jsCall_ii_2", "jsCall_ii_3", "jsCall_ii_4", "jsCall_ii_5", "jsCall_ii_6", "jsCall_ii_7", "jsCall_ii_8", "jsCall_ii_9", "jsCall_ii_10", "jsCall_ii_11", "jsCall_ii_12", "jsCall_ii_13", "jsCall_ii_14", "jsCall_ii_15", "jsCall_ii_16", "jsCall_ii_17", "jsCall_ii_18", "jsCall_ii_19", "jsCall_ii_20", "jsCall_ii_21", "jsCall_ii_22", "jsCall_ii_23", "jsCall_ii_24", "jsCall_ii_25", "jsCall_ii_26", "jsCall_ii_27", "jsCall_ii_28", "jsCall_ii_29", "jsCall_ii_30", "jsCall_ii_31", "jsCall_ii_32", "jsCall_ii_33", "jsCall_ii_34", "_avi_probe", "_avi_read_header", "_avi_read_close", "_av_default_item_name", "_ff_avio_child_class_next", "_flv_probe", "_flv_read_header", "_flv_read_close", "_live_flv_probe", "_h264_probe", "_ff_raw_video_read_header", "_hevc_probe", "_mpeg4video_probe", "_matroska_probe", "_matroska_read_header", "_matroska_read_close", "_mov_probe", "_mov_read_header", "_mov_read_close", "_mp3_read_probe", "_mp3_read_header", "_mpegps_probe", "_mpegps_read_header", "_mpegts_probe", "_mpegts_read_header", "_mpegts_read_close", "_mpegvideo_probe", "_format_to_name", "_format_child_class_next", "_get_category", "_pcm_read_header", "_urlcontext_to_name", "_ff_urlcontext_child_class_next", "_sws_context_to_name", "_ff_bsf_child_class_next", "_hevc_mp4toannexb_init", "_hevc_init_thread_copy", "_hevc_decode_init", "_hevc_decode_free", "_decode_init", "_context_to_name", "_codec_child_class_next", "_get_category_2911", "_pcm_decode_init", "_pcm_decode_close", "_aac_decode_init", "_aac_decode_close", "_init", "_context_to_name_6198", "_resample_flush", "___stdio_close", "___emscripten_stdout_close", "_releaseSniffStreamFunc", "_naluLListLengthFunc", "_hflv_releaseFunc", "_hflv_getBufferLength", "_g711_releaseFunc", "_g711_decodeVideoFrameFunc", "_g711_getBufferLength", "_initializeDecoderFunc", "__getFrame", "_closeVideoFunc", "_releaseFunc", "_initializeDemuxerFunc", "_getPacketFunc", "_releaseDemuxerFunc", "_io_short_seek", "_avio_rb16", "_avio_rl16", "_av_buffer_allocz", "_frame_worker_thread", "_av_buffer_alloc", "_thread_worker", 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0];
  5591. var debug_table_iid = [0, "jsCall_iid_0", "jsCall_iid_1", "jsCall_iid_2", "jsCall_iid_3", "jsCall_iid_4", "jsCall_iid_5", "jsCall_iid_6", "jsCall_iid_7", "jsCall_iid_8", "jsCall_iid_9", "jsCall_iid_10", "jsCall_iid_11", "jsCall_iid_12", "jsCall_iid_13", "jsCall_iid_14", "jsCall_iid_15", "jsCall_iid_16", "jsCall_iid_17", "jsCall_iid_18", "jsCall_iid_19", "jsCall_iid_20", "jsCall_iid_21", "jsCall_iid_22", "jsCall_iid_23", "jsCall_iid_24", "jsCall_iid_25", "jsCall_iid_26", "jsCall_iid_27", "jsCall_iid_28", "jsCall_iid_29", "jsCall_iid_30", "jsCall_iid_31", "jsCall_iid_32", "jsCall_iid_33", "jsCall_iid_34", "_seekBufferFunc", 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0];
  5592. var debug_table_iidiiii = [0, "jsCall_iidiiii_0", "jsCall_iidiiii_1", "jsCall_iidiiii_2", "jsCall_iidiiii_3", "jsCall_iidiiii_4", "jsCall_iidiiii_5", "jsCall_iidiiii_6", "jsCall_iidiiii_7", "jsCall_iidiiii_8", "jsCall_iidiiii_9", "jsCall_iidiiii_10", "jsCall_iidiiii_11", "jsCall_iidiiii_12", "jsCall_iidiiii_13", "jsCall_iidiiii_14", "jsCall_iidiiii_15", "jsCall_iidiiii_16", "jsCall_iidiiii_17", "jsCall_iidiiii_18", "jsCall_iidiiii_19", "jsCall_iidiiii_20", "jsCall_iidiiii_21", "jsCall_iidiiii_22", "jsCall_iidiiii_23", "jsCall_iidiiii_24", "jsCall_iidiiii_25", "jsCall_iidiiii_26", "jsCall_iidiiii_27", "jsCall_iidiiii_28", "jsCall_iidiiii_29", "jsCall_iidiiii_30", "jsCall_iidiiii_31", "jsCall_iidiiii_32", "jsCall_iidiiii_33", "jsCall_iidiiii_34", "_fmt_fp", 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0];
  5593. var debug_table_iii = [0, "jsCall_iii_0", "jsCall_iii_1", "jsCall_iii_2", "jsCall_iii_3", "jsCall_iii_4", "jsCall_iii_5", "jsCall_iii_6", "jsCall_iii_7", "jsCall_iii_8", "jsCall_iii_9", "jsCall_iii_10", "jsCall_iii_11", "jsCall_iii_12", "jsCall_iii_13", "jsCall_iii_14", "jsCall_iii_15", "jsCall_iii_16", "jsCall_iii_17", "jsCall_iii_18", "jsCall_iii_19", "jsCall_iii_20", "jsCall_iii_21", "jsCall_iii_22", "jsCall_iii_23", "jsCall_iii_24", "jsCall_iii_25", "jsCall_iii_26", "jsCall_iii_27", "jsCall_iii_28", "jsCall_iii_29", "jsCall_iii_30", "jsCall_iii_31", "jsCall_iii_32", "jsCall_iii_33", "jsCall_iii_34", "_avi_read_packet", "_ff_avio_child_next", "_flv_read_packet", "_ff_raw_read_partial_packet", "_matroska_read_packet", "_mov_read_packet", "_mp3_read_packet", "_mpegps_read_packet", "_mpegts_read_packet", "_mpegts_raw_read_packet", "_format_child_next", "_ff_pcm_read_packet", "_urlcontext_child_next", "_bsf_child_next", "_hevc_mp4toannexb_filter", "_hevc_update_thread_context", "_null_filter", "_codec_child_next", "_initSniffStreamFunc", "_hflv_initFunc", "_hflv_getPacketFunc", "_g711_initFunc", "_io_read_pause", "_descriptor_compare", "_hls_decode_entry", "_avcodec_default_get_format", "_ff_startcode_find_candidate_c", "_color_table_compare"];
  5594. var debug_table_iiii = [0, "jsCall_iiii_0", "jsCall_iiii_1", "jsCall_iiii_2", "jsCall_iiii_3", "jsCall_iiii_4", "jsCall_iiii_5", "jsCall_iiii_6", "jsCall_iiii_7", "jsCall_iiii_8", "jsCall_iiii_9", "jsCall_iiii_10", "jsCall_iiii_11", "jsCall_iiii_12", "jsCall_iiii_13", "jsCall_iiii_14", "jsCall_iiii_15", "jsCall_iiii_16", "jsCall_iiii_17", "jsCall_iiii_18", "jsCall_iiii_19", "jsCall_iiii_20", "jsCall_iiii_21", "jsCall_iiii_22", "jsCall_iiii_23", "jsCall_iiii_24", "jsCall_iiii_25", "jsCall_iiii_26", "jsCall_iiii_27", "jsCall_iiii_28", "jsCall_iiii_29", "jsCall_iiii_30", "jsCall_iiii_31", "jsCall_iiii_32", "jsCall_iiii_33", "jsCall_iiii_34", "_mov_read_aclr", "_mov_read_avid", "_mov_read_ares", "_mov_read_avss", "_mov_read_av1c", "_mov_read_chpl", "_mov_read_stco", "_mov_read_colr", "_mov_read_ctts", "_mov_read_default", "_mov_read_dpxe", "_mov_read_dref", "_mov_read_elst", "_mov_read_enda", "_mov_read_fiel", "_mov_read_adrm", "_mov_read_ftyp", "_mov_read_glbl", "_mov_read_hdlr", "_mov_read_ilst", "_mov_read_jp2h", "_mov_read_mdat", "_mov_read_mdhd", "_mov_read_meta", "_mov_read_moof", "_mov_read_moov", "_mov_read_mvhd", "_mov_read_svq3", "_mov_read_alac", "_mov_read_pasp", "_mov_read_sidx", "_mov_read_stps", "_mov_read_strf", "_mov_read_stsc", "_mov_read_stsd", "_mov_read_stss", "_mov_read_stsz", "_mov_read_stts", "_mov_read_tkhd", "_mov_read_tfdt", "_mov_read_tfhd", "_mov_read_trak", "_mov_read_tmcd", "_mov_read_chap", "_mov_read_trex", "_mov_read_trun", "_mov_read_wave", "_mov_read_esds", "_mov_read_dac3", "_mov_read_dec3", "_mov_read_ddts", "_mov_read_wide", "_mov_read_wfex", "_mov_read_cmov", "_mov_read_chan", "_mov_read_dvc1", "_mov_read_sbgp", "_mov_read_uuid", "_mov_read_targa_y216", "_mov_read_free", "_mov_read_custom", "_mov_read_frma", "_mov_read_senc", "_mov_read_saiz", "_mov_read_saio", "_mov_read_pssh", "_mov_read_schm", "_mov_read_tenc", "_mov_read_dfla", "_mov_read_st3d", "_mov_read_sv3d", "_mov_read_dops", "_mov_read_smdm", "_mov_read_coll", "_mov_read_vpcc", "_mov_read_mdcv", "_mov_read_clli", "_h264_split", "_hevc_split", "_set_compensation", "___stdio_write", "_sn_write", "_read_stream_live", "_read_stream_vod", "_getSniffStreamPacketFunc", "_hflv_read_stream_live", "_g711_read_stream_live", "_setCodecTypeFunc", "_read_packet", "_io_write_packet", "_io_read_packet", "_dyn_buf_write", "_mov_read_keys", "_mov_read_udta_string", "_ff_crcA001_update", "_avcodec_default_get_buffer2", "_do_read", 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0];
  5595. var debug_table_iiiii = [0, "jsCall_iiiii_0", "jsCall_iiiii_1", "jsCall_iiiii_2", "jsCall_iiiii_3", "jsCall_iiiii_4", "jsCall_iiiii_5", "jsCall_iiiii_6", "jsCall_iiiii_7", "jsCall_iiiii_8", "jsCall_iiiii_9", "jsCall_iiiii_10", "jsCall_iiiii_11", "jsCall_iiiii_12", "jsCall_iiiii_13", "jsCall_iiiii_14", "jsCall_iiiii_15", "jsCall_iiiii_16", "jsCall_iiiii_17", "jsCall_iiiii_18", "jsCall_iiiii_19", "jsCall_iiiii_20", "jsCall_iiiii_21", "jsCall_iiiii_22", "jsCall_iiiii_23", "jsCall_iiiii_24", "jsCall_iiiii_25", "jsCall_iiiii_26", "jsCall_iiiii_27", "jsCall_iiiii_28", "jsCall_iiiii_29", "jsCall_iiiii_30", "jsCall_iiiii_31", "jsCall_iiiii_32", "jsCall_iiiii_33", "jsCall_iiiii_34", "_hevc_decode_frame", "_decode_frame", "_pcm_decode_frame", "_aac_decode_frame", "_hflv_pushBufferFunc", "_g711_pushBufferFunc", "_demuxBoxFunc", "_mov_metadata_int8_no_padding", "_mov_metadata_track_or_disc_number", "_mov_metadata_gnre", "_mov_metadata_int8_bypass_padding", "_lum_planar_vscale", "_chr_planar_vscale", "_any_vscale", "_packed_vscale", "_gamma_convert", "_lum_convert", "_lum_h_scale", "_chr_convert", "_chr_h_scale", "_no_chr_scale", "_hls_decode_entry_wpp", 0, 0, 0, 0, 0, 0];
  5596. var debug_table_iiiiii = [0, "jsCall_iiiiii_0", "jsCall_iiiiii_1", "jsCall_iiiiii_2", "jsCall_iiiiii_3", "jsCall_iiiiii_4", "jsCall_iiiiii_5", "jsCall_iiiiii_6", "jsCall_iiiiii_7", "jsCall_iiiiii_8", "jsCall_iiiiii_9", "jsCall_iiiiii_10", "jsCall_iiiiii_11", "jsCall_iiiiii_12", "jsCall_iiiiii_13", "jsCall_iiiiii_14", "jsCall_iiiiii_15", "jsCall_iiiiii_16", "jsCall_iiiiii_17", "jsCall_iiiiii_18", "jsCall_iiiiii_19", "jsCall_iiiiii_20", "jsCall_iiiiii_21", "jsCall_iiiiii_22", "jsCall_iiiiii_23", "jsCall_iiiiii_24", "jsCall_iiiiii_25", "jsCall_iiiiii_26", "jsCall_iiiiii_27", "jsCall_iiiiii_28", "jsCall_iiiiii_29", "jsCall_iiiiii_30", "jsCall_iiiiii_31", "jsCall_iiiiii_32", "jsCall_iiiiii_33", "jsCall_iiiiii_34", "_pushBufferFunc", "_g711_setSniffStreamCodecTypeFunc", "_decodeCodecContextFunc", "_io_open_default", "_avcodec_default_execute2", "_thread_execute2", "_sbr_lf_gen", "_resample_common_int16", "_resample_linear_int16", "_resample_common_int32", "_resample_linear_int32", "_resample_common_float", "_resample_linear_float", "_resample_common_double", "_resample_linear_double", 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0];
  5597. var debug_table_iiiiiii = [0, "jsCall_iiiiiii_0", "jsCall_iiiiiii_1", "jsCall_iiiiiii_2", "jsCall_iiiiiii_3", "jsCall_iiiiiii_4", "jsCall_iiiiiii_5", "jsCall_iiiiiii_6", "jsCall_iiiiiii_7", "jsCall_iiiiiii_8", "jsCall_iiiiiii_9", "jsCall_iiiiiii_10", "jsCall_iiiiiii_11", "jsCall_iiiiiii_12", "jsCall_iiiiiii_13", "jsCall_iiiiiii_14", "jsCall_iiiiiii_15", "jsCall_iiiiiii_16", "jsCall_iiiiiii_17", "jsCall_iiiiiii_18", "jsCall_iiiiiii_19", "jsCall_iiiiiii_20", "jsCall_iiiiiii_21", "jsCall_iiiiiii_22", "jsCall_iiiiiii_23", "jsCall_iiiiiii_24", "jsCall_iiiiiii_25", "jsCall_iiiiiii_26", "jsCall_iiiiiii_27", "jsCall_iiiiiii_28", "jsCall_iiiiiii_29", "jsCall_iiiiiii_30", "jsCall_iiiiiii_31", "jsCall_iiiiiii_32", "jsCall_iiiiiii_33", "jsCall_iiiiiii_34", "_h264_parse", "_hevc_parse", "_mpegaudio_parse", "_multiple_resample", "_invert_initial_buffer", "_hflv_decodeVideoFrameFunc", "_avcodec_default_execute", "_thread_execute", "_sbr_x_gen", 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0];
  5598. var debug_table_iiiiiiidiiddii = [0, "jsCall_iiiiiiidiiddii_0", "jsCall_iiiiiiidiiddii_1", "jsCall_iiiiiiidiiddii_2", "jsCall_iiiiiiidiiddii_3", "jsCall_iiiiiiidiiddii_4", "jsCall_iiiiiiidiiddii_5", "jsCall_iiiiiiidiiddii_6", "jsCall_iiiiiiidiiddii_7", "jsCall_iiiiiiidiiddii_8", "jsCall_iiiiiiidiiddii_9", "jsCall_iiiiiiidiiddii_10", "jsCall_iiiiiiidiiddii_11", "jsCall_iiiiiiidiiddii_12", "jsCall_iiiiiiidiiddii_13", "jsCall_iiiiiiidiiddii_14", "jsCall_iiiiiiidiiddii_15", "jsCall_iiiiiiidiiddii_16", "jsCall_iiiiiiidiiddii_17", "jsCall_iiiiiiidiiddii_18", "jsCall_iiiiiiidiiddii_19", "jsCall_iiiiiiidiiddii_20", "jsCall_iiiiiiidiiddii_21", "jsCall_iiiiiiidiiddii_22", "jsCall_iiiiiiidiiddii_23", "jsCall_iiiiiiidiiddii_24", "jsCall_iiiiiiidiiddii_25", "jsCall_iiiiiiidiiddii_26", "jsCall_iiiiiiidiiddii_27", "jsCall_iiiiiiidiiddii_28", "jsCall_iiiiiiidiiddii_29", "jsCall_iiiiiiidiiddii_30", "jsCall_iiiiiiidiiddii_31", "jsCall_iiiiiiidiiddii_32", "jsCall_iiiiiiidiiddii_33", "jsCall_iiiiiiidiiddii_34", "_resample_init", 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0];
  5599. var debug_table_iiiiiiii = [0, "jsCall_iiiiiiii_0", "jsCall_iiiiiiii_1", "jsCall_iiiiiiii_2", "jsCall_iiiiiiii_3", "jsCall_iiiiiiii_4", "jsCall_iiiiiiii_5", "jsCall_iiiiiiii_6", "jsCall_iiiiiiii_7", "jsCall_iiiiiiii_8", "jsCall_iiiiiiii_9", "jsCall_iiiiiiii_10", "jsCall_iiiiiiii_11", "jsCall_iiiiiiii_12", "jsCall_iiiiiiii_13", "jsCall_iiiiiiii_14", "jsCall_iiiiiiii_15", "jsCall_iiiiiiii_16", "jsCall_iiiiiiii_17", "jsCall_iiiiiiii_18", "jsCall_iiiiiiii_19", "jsCall_iiiiiiii_20", "jsCall_iiiiiiii_21", "jsCall_iiiiiiii_22", "jsCall_iiiiiiii_23", "jsCall_iiiiiiii_24", "jsCall_iiiiiiii_25", "jsCall_iiiiiiii_26", "jsCall_iiiiiiii_27", "jsCall_iiiiiiii_28", "jsCall_iiiiiiii_29", "jsCall_iiiiiiii_30", "jsCall_iiiiiiii_31", "jsCall_iiiiiiii_32", "jsCall_iiiiiiii_33", "jsCall_iiiiiiii_34", "_decodeVideoFrameFunc", "_hflv_setSniffStreamCodecTypeFunc", "_swscale", "_ff_sws_alphablendaway", "_yuv2rgb_c_32", "_yuva2rgba_c", "_yuv2rgb_c_bgr48", "_yuv2rgb_c_48", "_yuva2argb_c", "_yuv2rgb_c_24_rgb", "_yuv2rgb_c_24_bgr", "_yuv2rgb_c_16_ordered_dither", "_yuv2rgb_c_15_ordered_dither", "_yuv2rgb_c_12_ordered_dither", "_yuv2rgb_c_8_ordered_dither", "_yuv2rgb_c_4_ordered_dither", "_yuv2rgb_c_4b_ordered_dither", "_yuv2rgb_c_1_ordered_dither", "_planarToP01xWrapper", "_planar8ToP01xleWrapper", "_yvu9ToYv12Wrapper", "_bgr24ToYv12Wrapper", "_rgbToRgbWrapper", "_planarRgbToplanarRgbWrapper", "_planarRgbToRgbWrapper", "_planarRgbaToRgbWrapper", "_Rgb16ToPlanarRgb16Wrapper", "_planarRgb16ToRgb16Wrapper", "_rgbToPlanarRgbWrapper", "_bayer_to_rgb24_wrapper", "_bayer_to_yv12_wrapper", "_bswap_16bpc", "_palToRgbWrapper", "_yuv422pToYuy2Wrapper", "_yuv422pToUyvyWrapper", "_uint_y_to_float_y_wrapper", "_float_y_to_uint_y_wrapper", "_planarToYuy2Wrapper", "_planarToUyvyWrapper", "_yuyvToYuv420Wrapper", "_uyvyToYuv420Wrapper", "_yuyvToYuv422Wrapper", "_uyvyToYuv422Wrapper", "_packedCopyWrapper", "_planarCopyWrapper", "_planarToNv12Wrapper", "_planarToNv24Wrapper", "_nv12ToPlanarWrapper", "_nv24ToPlanarWrapper", 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0];
  5600. var debug_table_iiiiiiiid = [0, "jsCall_iiiiiiiid_0", "jsCall_iiiiiiiid_1", "jsCall_iiiiiiiid_2", "jsCall_iiiiiiiid_3", "jsCall_iiiiiiiid_4", "jsCall_iiiiiiiid_5", "jsCall_iiiiiiiid_6", "jsCall_iiiiiiiid_7", "jsCall_iiiiiiiid_8", "jsCall_iiiiiiiid_9", "jsCall_iiiiiiiid_10", "jsCall_iiiiiiiid_11", "jsCall_iiiiiiiid_12", "jsCall_iiiiiiiid_13", "jsCall_iiiiiiiid_14", "jsCall_iiiiiiiid_15", "jsCall_iiiiiiiid_16", "jsCall_iiiiiiiid_17", "jsCall_iiiiiiiid_18", "jsCall_iiiiiiiid_19", "jsCall_iiiiiiiid_20", "jsCall_iiiiiiiid_21", "jsCall_iiiiiiiid_22", "jsCall_iiiiiiiid_23", "jsCall_iiiiiiiid_24", "jsCall_iiiiiiiid_25", "jsCall_iiiiiiiid_26", "jsCall_iiiiiiiid_27", "jsCall_iiiiiiiid_28", "jsCall_iiiiiiiid_29", "jsCall_iiiiiiiid_30", "jsCall_iiiiiiiid_31", "jsCall_iiiiiiiid_32", "jsCall_iiiiiiiid_33", "jsCall_iiiiiiiid_34", "_setSniffStreamCodecTypeFunc", 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0];
  5601. var debug_table_iiiiij = [0, "jsCall_iiiiij_0", "jsCall_iiiiij_1", "jsCall_iiiiij_2", "jsCall_iiiiij_3", "jsCall_iiiiij_4", "jsCall_iiiiij_5", "jsCall_iiiiij_6", "jsCall_iiiiij_7", "jsCall_iiiiij_8", "jsCall_iiiiij_9", "jsCall_iiiiij_10", "jsCall_iiiiij_11", "jsCall_iiiiij_12", "jsCall_iiiiij_13", "jsCall_iiiiij_14", "jsCall_iiiiij_15", "jsCall_iiiiij_16", "jsCall_iiiiij_17", "jsCall_iiiiij_18", "jsCall_iiiiij_19", "jsCall_iiiiij_20", "jsCall_iiiiij_21", "jsCall_iiiiij_22", "jsCall_iiiiij_23", "jsCall_iiiiij_24", "jsCall_iiiiij_25", "jsCall_iiiiij_26", "jsCall_iiiiij_27", "jsCall_iiiiij_28", "jsCall_iiiiij_29", "jsCall_iiiiij_30", "jsCall_iiiiij_31", "jsCall_iiiiij_32", "jsCall_iiiiij_33", "jsCall_iiiiij_34", "_mpegts_push_data", 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0];
  5602. var debug_table_iiiji = [0, "jsCall_iiiji_0", "jsCall_iiiji_1", "jsCall_iiiji_2", "jsCall_iiiji_3", "jsCall_iiiji_4", "jsCall_iiiji_5", "jsCall_iiiji_6", "jsCall_iiiji_7", "jsCall_iiiji_8", "jsCall_iiiji_9", "jsCall_iiiji_10", "jsCall_iiiji_11", "jsCall_iiiji_12", "jsCall_iiiji_13", "jsCall_iiiji_14", "jsCall_iiiji_15", "jsCall_iiiji_16", "jsCall_iiiji_17", "jsCall_iiiji_18", "jsCall_iiiji_19", "jsCall_iiiji_20", "jsCall_iiiji_21", "jsCall_iiiji_22", "jsCall_iiiji_23", "jsCall_iiiji_24", "jsCall_iiiji_25", "jsCall_iiiji_26", "jsCall_iiiji_27", "jsCall_iiiji_28", "jsCall_iiiji_29", "jsCall_iiiji_30", "jsCall_iiiji_31", "jsCall_iiiji_32", "jsCall_iiiji_33", "jsCall_iiiji_34", "_avi_read_seek", "_flv_read_seek", "_matroska_read_seek", "_mov_read_seek", "_mp3_seek", "_ff_pcm_read_seek", 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0];
  5603. var debug_table_iiijjji = [0, "jsCall_iiijjji_0", "jsCall_iiijjji_1", "jsCall_iiijjji_2", "jsCall_iiijjji_3", "jsCall_iiijjji_4", "jsCall_iiijjji_5", "jsCall_iiijjji_6", "jsCall_iiijjji_7", "jsCall_iiijjji_8", "jsCall_iiijjji_9", "jsCall_iiijjji_10", "jsCall_iiijjji_11", "jsCall_iiijjji_12", "jsCall_iiijjji_13", "jsCall_iiijjji_14", "jsCall_iiijjji_15", "jsCall_iiijjji_16", "jsCall_iiijjji_17", "jsCall_iiijjji_18", "jsCall_iiijjji_19", "jsCall_iiijjji_20", "jsCall_iiijjji_21", "jsCall_iiijjji_22", "jsCall_iiijjji_23", "jsCall_iiijjji_24", "jsCall_iiijjji_25", "jsCall_iiijjji_26", "jsCall_iiijjji_27", "jsCall_iiijjji_28", "jsCall_iiijjji_29", "jsCall_iiijjji_30", "jsCall_iiijjji_31", "jsCall_iiijjji_32", "jsCall_iiijjji_33", "jsCall_iiijjji_34", 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0];
  5604. var debug_table_jii = [0, "jsCall_jii_0", "jsCall_jii_1", "jsCall_jii_2", "jsCall_jii_3", "jsCall_jii_4", "jsCall_jii_5", "jsCall_jii_6", "jsCall_jii_7", "jsCall_jii_8", "jsCall_jii_9", "jsCall_jii_10", "jsCall_jii_11", "jsCall_jii_12", "jsCall_jii_13", "jsCall_jii_14", "jsCall_jii_15", "jsCall_jii_16", "jsCall_jii_17", "jsCall_jii_18", "jsCall_jii_19", "jsCall_jii_20", "jsCall_jii_21", "jsCall_jii_22", "jsCall_jii_23", "jsCall_jii_24", "jsCall_jii_25", "jsCall_jii_26", "jsCall_jii_27", "jsCall_jii_28", "jsCall_jii_29", "jsCall_jii_30", "jsCall_jii_31", "jsCall_jii_32", "jsCall_jii_33", "jsCall_jii_34", "_get_out_samples", 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0];
  5605. var debug_table_jiiij = [0, "jsCall_jiiij_0", "jsCall_jiiij_1", "jsCall_jiiij_2", "jsCall_jiiij_3", "jsCall_jiiij_4", "jsCall_jiiij_5", "jsCall_jiiij_6", "jsCall_jiiij_7", "jsCall_jiiij_8", "jsCall_jiiij_9", "jsCall_jiiij_10", "jsCall_jiiij_11", "jsCall_jiiij_12", "jsCall_jiiij_13", "jsCall_jiiij_14", "jsCall_jiiij_15", "jsCall_jiiij_16", "jsCall_jiiij_17", "jsCall_jiiij_18", "jsCall_jiiij_19", "jsCall_jiiij_20", "jsCall_jiiij_21", "jsCall_jiiij_22", "jsCall_jiiij_23", "jsCall_jiiij_24", "jsCall_jiiij_25", "jsCall_jiiij_26", "jsCall_jiiij_27", "jsCall_jiiij_28", "jsCall_jiiij_29", "jsCall_jiiij_30", "jsCall_jiiij_31", "jsCall_jiiij_32", "jsCall_jiiij_33", "jsCall_jiiij_34", "_mpegps_read_dts", "_mpegts_get_dts", 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0];
  5606. var debug_table_jiiji = [0, "jsCall_jiiji_0", "jsCall_jiiji_1", "jsCall_jiiji_2", "jsCall_jiiji_3", "jsCall_jiiji_4", "jsCall_jiiji_5", "jsCall_jiiji_6", "jsCall_jiiji_7", "jsCall_jiiji_8", "jsCall_jiiji_9", "jsCall_jiiji_10", "jsCall_jiiji_11", "jsCall_jiiji_12", "jsCall_jiiji_13", "jsCall_jiiji_14", "jsCall_jiiji_15", "jsCall_jiiji_16", "jsCall_jiiji_17", "jsCall_jiiji_18", "jsCall_jiiji_19", "jsCall_jiiji_20", "jsCall_jiiji_21", "jsCall_jiiji_22", "jsCall_jiiji_23", "jsCall_jiiji_24", "jsCall_jiiji_25", "jsCall_jiiji_26", "jsCall_jiiji_27", "jsCall_jiiji_28", "jsCall_jiiji_29", "jsCall_jiiji_30", "jsCall_jiiji_31", "jsCall_jiiji_32", "jsCall_jiiji_33", "jsCall_jiiji_34", "_io_read_seek", 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0];
  5607. var debug_table_jij = [0, "jsCall_jij_0", "jsCall_jij_1", "jsCall_jij_2", "jsCall_jij_3", "jsCall_jij_4", "jsCall_jij_5", "jsCall_jij_6", "jsCall_jij_7", "jsCall_jij_8", "jsCall_jij_9", "jsCall_jij_10", "jsCall_jij_11", "jsCall_jij_12", "jsCall_jij_13", "jsCall_jij_14", "jsCall_jij_15", "jsCall_jij_16", "jsCall_jij_17", "jsCall_jij_18", "jsCall_jij_19", "jsCall_jij_20", "jsCall_jij_21", "jsCall_jij_22", "jsCall_jij_23", "jsCall_jij_24", "jsCall_jij_25", "jsCall_jij_26", "jsCall_jij_27", "jsCall_jij_28", "jsCall_jij_29", "jsCall_jij_30", "jsCall_jij_31", "jsCall_jij_32", "jsCall_jij_33", "jsCall_jij_34", "_get_delay", 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0];
  5608. var debug_table_jiji = [0, "jsCall_jiji_0", "jsCall_jiji_1", "jsCall_jiji_2", "jsCall_jiji_3", "jsCall_jiji_4", "jsCall_jiji_5", "jsCall_jiji_6", "jsCall_jiji_7", "jsCall_jiji_8", "jsCall_jiji_9", "jsCall_jiji_10", "jsCall_jiji_11", "jsCall_jiji_12", "jsCall_jiji_13", "jsCall_jiji_14", "jsCall_jiji_15", "jsCall_jiji_16", "jsCall_jiji_17", "jsCall_jiji_18", "jsCall_jiji_19", "jsCall_jiji_20", "jsCall_jiji_21", "jsCall_jiji_22", "jsCall_jiji_23", "jsCall_jiji_24", "jsCall_jiji_25", "jsCall_jiji_26", "jsCall_jiji_27", "jsCall_jiji_28", "jsCall_jiji_29", "jsCall_jiji_30", "jsCall_jiji_31", "jsCall_jiji_32", "jsCall_jiji_33", "jsCall_jiji_34", "___stdio_seek", "___emscripten_stdout_seek", "_seek_in_buffer", "_io_seek", "_dyn_buf_seek", 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0];
  5609. var debug_table_v = [0, "jsCall_v_0", "jsCall_v_1", "jsCall_v_2", "jsCall_v_3", "jsCall_v_4", "jsCall_v_5", "jsCall_v_6", "jsCall_v_7", "jsCall_v_8", "jsCall_v_9", "jsCall_v_10", "jsCall_v_11", "jsCall_v_12", "jsCall_v_13", "jsCall_v_14", "jsCall_v_15", "jsCall_v_16", "jsCall_v_17", "jsCall_v_18", "jsCall_v_19", "jsCall_v_20", "jsCall_v_21", "jsCall_v_22", "jsCall_v_23", "jsCall_v_24", "jsCall_v_25", "jsCall_v_26", "jsCall_v_27", "jsCall_v_28", "jsCall_v_29", "jsCall_v_30", "jsCall_v_31", "jsCall_v_32", "jsCall_v_33", "jsCall_v_34", "_init_ff_cos_tabs_16", "_init_ff_cos_tabs_32", "_init_ff_cos_tabs_64", "_init_ff_cos_tabs_128", "_init_ff_cos_tabs_256", "_init_ff_cos_tabs_512", "_init_ff_cos_tabs_1024", "_init_ff_cos_tabs_2048", "_init_ff_cos_tabs_4096", "_init_ff_cos_tabs_8192", "_init_ff_cos_tabs_16384", "_init_ff_cos_tabs_32768", "_init_ff_cos_tabs_65536", "_init_ff_cos_tabs_131072", "_introduce_mine", "_introduceMineFunc", "_av_format_init_next", "_av_codec_init_static", "_av_codec_init_next", "_ff_init_mpadsp_tabs_float", "_ff_init_mpadsp_tabs_fixed", "_aac_static_table_init", "_AV_CRC_8_ATM_init_table_once", "_AV_CRC_8_EBU_init_table_once", "_AV_CRC_16_ANSI_init_table_once", "_AV_CRC_16_CCITT_init_table_once", "_AV_CRC_24_IEEE_init_table_once", "_AV_CRC_32_IEEE_init_table_once", "_AV_CRC_32_IEEE_LE_init_table_once", "_AV_CRC_16_ANSI_LE_init_table_once", 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0];
  5610. var debug_table_vdiidiiiii = [0, "jsCall_vdiidiiiii_0", "jsCall_vdiidiiiii_1", "jsCall_vdiidiiiii_2", "jsCall_vdiidiiiii_3", "jsCall_vdiidiiiii_4", "jsCall_vdiidiiiii_5", "jsCall_vdiidiiiii_6", "jsCall_vdiidiiiii_7", "jsCall_vdiidiiiii_8", "jsCall_vdiidiiiii_9", "jsCall_vdiidiiiii_10", "jsCall_vdiidiiiii_11", "jsCall_vdiidiiiii_12", "jsCall_vdiidiiiii_13", "jsCall_vdiidiiiii_14", "jsCall_vdiidiiiii_15", "jsCall_vdiidiiiii_16", "jsCall_vdiidiiiii_17", "jsCall_vdiidiiiii_18", "jsCall_vdiidiiiii_19", "jsCall_vdiidiiiii_20", "jsCall_vdiidiiiii_21", "jsCall_vdiidiiiii_22", "jsCall_vdiidiiiii_23", "jsCall_vdiidiiiii_24", "jsCall_vdiidiiiii_25", "jsCall_vdiidiiiii_26", "jsCall_vdiidiiiii_27", "jsCall_vdiidiiiii_28", "jsCall_vdiidiiiii_29", "jsCall_vdiidiiiii_30", "jsCall_vdiidiiiii_31", "jsCall_vdiidiiiii_32", "jsCall_vdiidiiiii_33", "jsCall_vdiidiiiii_34", 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0];
  5611. var debug_table_vdiidiiiiii = [0, "jsCall_vdiidiiiiii_0", "jsCall_vdiidiiiiii_1", "jsCall_vdiidiiiiii_2", "jsCall_vdiidiiiiii_3", "jsCall_vdiidiiiiii_4", "jsCall_vdiidiiiiii_5", "jsCall_vdiidiiiiii_6", "jsCall_vdiidiiiiii_7", "jsCall_vdiidiiiiii_8", "jsCall_vdiidiiiiii_9", "jsCall_vdiidiiiiii_10", "jsCall_vdiidiiiiii_11", "jsCall_vdiidiiiiii_12", "jsCall_vdiidiiiiii_13", "jsCall_vdiidiiiiii_14", "jsCall_vdiidiiiiii_15", "jsCall_vdiidiiiiii_16", "jsCall_vdiidiiiiii_17", "jsCall_vdiidiiiiii_18", "jsCall_vdiidiiiiii_19", "jsCall_vdiidiiiiii_20", "jsCall_vdiidiiiiii_21", "jsCall_vdiidiiiiii_22", "jsCall_vdiidiiiiii_23", "jsCall_vdiidiiiiii_24", "jsCall_vdiidiiiiii_25", "jsCall_vdiidiiiiii_26", "jsCall_vdiidiiiiii_27", "jsCall_vdiidiiiiii_28", "jsCall_vdiidiiiiii_29", "jsCall_vdiidiiiiii_30", "jsCall_vdiidiiiiii_31", "jsCall_vdiidiiiiii_32", "jsCall_vdiidiiiiii_33", "jsCall_vdiidiiiiii_34", 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0];
  5612. var debug_table_vi = [0, "jsCall_vi_0", "jsCall_vi_1", "jsCall_vi_2", "jsCall_vi_3", "jsCall_vi_4", "jsCall_vi_5", "jsCall_vi_6", "jsCall_vi_7", "jsCall_vi_8", "jsCall_vi_9", "jsCall_vi_10", "jsCall_vi_11", "jsCall_vi_12", "jsCall_vi_13", "jsCall_vi_14", "jsCall_vi_15", "jsCall_vi_16", "jsCall_vi_17", "jsCall_vi_18", "jsCall_vi_19", "jsCall_vi_20", "jsCall_vi_21", "jsCall_vi_22", "jsCall_vi_23", "jsCall_vi_24", "jsCall_vi_25", "jsCall_vi_26", "jsCall_vi_27", "jsCall_vi_28", "jsCall_vi_29", "jsCall_vi_30", "jsCall_vi_31", "jsCall_vi_32", "jsCall_vi_33", "jsCall_vi_34", "_free_geobtag", "_free_apic", "_free_chapter", "_free_priv", "_hevc_decode_flush", "_flush", "_flush_3915", "_fft4", "_fft8", "_fft16", "_fft32", "_fft64", "_fft128", "_fft256", "_fft512", "_fft1024", "_fft2048", "_fft4096", "_fft8192", "_fft16384", "_fft32768", "_fft65536", "_fft131072", "_h264_close", "_hevc_parser_close", "_ff_parse_close", "_resample_free", "_logRequest_downloadSucceeded", "_logRequest_downloadFailed", "_downloadSucceeded", "_downloadFailed", "_transform_4x4_luma_9", "_idct_4x4_dc_9", "_idct_8x8_dc_9", "_idct_16x16_dc_9", "_idct_32x32_dc_9", "_transform_4x4_luma_10", "_idct_4x4_dc_10", "_idct_8x8_dc_10", "_idct_16x16_dc_10", "_idct_32x32_dc_10", "_transform_4x4_luma_12", "_idct_4x4_dc_12", "_idct_8x8_dc_12", "_idct_16x16_dc_12", "_idct_32x32_dc_12", "_transform_4x4_luma_8", "_idct_4x4_dc_8", "_idct_8x8_dc_8", "_idct_16x16_dc_8", "_idct_32x32_dc_8", "_main_function", "_sbr_sum64x5_c", "_sbr_neg_odd_64_c", "_sbr_qmf_pre_shuffle_c", 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0];
  5613. var debug_table_vii = [0, "jsCall_vii_0", "jsCall_vii_1", "jsCall_vii_2", "jsCall_vii_3", "jsCall_vii_4", "jsCall_vii_5", "jsCall_vii_6", "jsCall_vii_7", "jsCall_vii_8", "jsCall_vii_9", "jsCall_vii_10", "jsCall_vii_11", "jsCall_vii_12", "jsCall_vii_13", "jsCall_vii_14", "jsCall_vii_15", "jsCall_vii_16", "jsCall_vii_17", "jsCall_vii_18", "jsCall_vii_19", "jsCall_vii_20", "jsCall_vii_21", "jsCall_vii_22", "jsCall_vii_23", "jsCall_vii_24", "jsCall_vii_25", "jsCall_vii_26", "jsCall_vii_27", "jsCall_vii_28", "jsCall_vii_29", "jsCall_vii_30", "jsCall_vii_31", "jsCall_vii_32", "jsCall_vii_33", "jsCall_vii_34", "_io_close_default", "_lumRangeFromJpeg_c", "_lumRangeToJpeg_c", "_lumRangeFromJpeg16_c", "_lumRangeToJpeg16_c", "_decode_data_free", "_dequant_9", "_idct_4x4_9", "_idct_8x8_9", "_idct_16x16_9", "_idct_32x32_9", "_dequant_10", "_idct_4x4_10", "_idct_8x8_10", "_idct_16x16_10", "_idct_32x32_10", "_dequant_12", "_idct_4x4_12", "_idct_8x8_12", "_idct_16x16_12", "_idct_32x32_12", "_dequant_8", "_idct_4x4_8", "_idct_8x8_8", "_idct_16x16_8", "_idct_32x32_8", "_ff_dct32_fixed", "_imdct_and_windowing", "_apply_ltp", "_update_ltp", "_imdct_and_windowing_ld", "_imdct_and_windowing_eld", "_imdct_and_windowing_960", "_ff_dct32_float", "_dct32_func", "_dct_calc_I_c", "_dct_calc_II_c", "_dct_calc_III_c", "_dst_calc_I_c", "_fft_permute_c", "_fft_calc_c", "_ff_h264_chroma_dc_dequant_idct_9_c", "_ff_h264_chroma422_dc_dequant_idct_9_c", "_ff_h264_chroma_dc_dequant_idct_10_c", "_ff_h264_chroma422_dc_dequant_idct_10_c", "_ff_h264_chroma_dc_dequant_idct_12_c", "_ff_h264_chroma422_dc_dequant_idct_12_c", "_ff_h264_chroma_dc_dequant_idct_14_c", "_ff_h264_chroma422_dc_dequant_idct_14_c", "_ff_h264_chroma_dc_dequant_idct_8_c", "_ff_h264_chroma422_dc_dequant_idct_8_c", "_hevc_pps_free", "_rdft_calc_c", "_sbr_qmf_post_shuffle_c", "_sbr_qmf_deint_neg_c", "_sbr_autocorrelate_c", "_av_buffer_default_free", "_pool_release_buffer", "_sha1_transform", "_sha256_transform", "_pop_arg_long_double", 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0];
  5614. var debug_table_viidi = [0, "jsCall_viidi_0", "jsCall_viidi_1", "jsCall_viidi_2", "jsCall_viidi_3", "jsCall_viidi_4", "jsCall_viidi_5", "jsCall_viidi_6", "jsCall_viidi_7", "jsCall_viidi_8", "jsCall_viidi_9", "jsCall_viidi_10", "jsCall_viidi_11", "jsCall_viidi_12", "jsCall_viidi_13", "jsCall_viidi_14", "jsCall_viidi_15", "jsCall_viidi_16", "jsCall_viidi_17", "jsCall_viidi_18", "jsCall_viidi_19", "jsCall_viidi_20", "jsCall_viidi_21", "jsCall_viidi_22", "jsCall_viidi_23", "jsCall_viidi_24", "jsCall_viidi_25", "jsCall_viidi_26", "jsCall_viidi_27", "jsCall_viidi_28", "jsCall_viidi_29", "jsCall_viidi_30", "jsCall_viidi_31", "jsCall_viidi_32", "jsCall_viidi_33", "jsCall_viidi_34", "_vector_dmac_scalar_c", "_vector_dmul_scalar_c", 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0];
  5615. var debug_table_viifi = [0, "jsCall_viifi_0", "jsCall_viifi_1", "jsCall_viifi_2", "jsCall_viifi_3", "jsCall_viifi_4", "jsCall_viifi_5", "jsCall_viifi_6", "jsCall_viifi_7", "jsCall_viifi_8", "jsCall_viifi_9", "jsCall_viifi_10", "jsCall_viifi_11", "jsCall_viifi_12", "jsCall_viifi_13", "jsCall_viifi_14", "jsCall_viifi_15", "jsCall_viifi_16", "jsCall_viifi_17", "jsCall_viifi_18", "jsCall_viifi_19", "jsCall_viifi_20", "jsCall_viifi_21", "jsCall_viifi_22", "jsCall_viifi_23", "jsCall_viifi_24", "jsCall_viifi_25", "jsCall_viifi_26", "jsCall_viifi_27", "jsCall_viifi_28", "jsCall_viifi_29", "jsCall_viifi_30", "jsCall_viifi_31", "jsCall_viifi_32", "jsCall_viifi_33", "jsCall_viifi_34", "_vector_fmac_scalar_c", "_vector_fmul_scalar_c", 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0];
  5616. var debug_table_viii = [0, "jsCall_viii_0", "jsCall_viii_1", "jsCall_viii_2", "jsCall_viii_3", "jsCall_viii_4", "jsCall_viii_5", "jsCall_viii_6", "jsCall_viii_7", "jsCall_viii_8", "jsCall_viii_9", "jsCall_viii_10", "jsCall_viii_11", "jsCall_viii_12", "jsCall_viii_13", "jsCall_viii_14", "jsCall_viii_15", "jsCall_viii_16", "jsCall_viii_17", "jsCall_viii_18", "jsCall_viii_19", "jsCall_viii_20", "jsCall_viii_21", "jsCall_viii_22", "jsCall_viii_23", "jsCall_viii_24", "jsCall_viii_25", "jsCall_viii_26", "jsCall_viii_27", "jsCall_viii_28", "jsCall_viii_29", "jsCall_viii_30", "jsCall_viii_31", "jsCall_viii_32", "jsCall_viii_33", "jsCall_viii_34", "_avcHandleFrame", "_handleFrame", "_sdt_cb", "_pat_cb", "_pmt_cb", "_scte_data_cb", "_m4sl_cb", "_chrRangeFromJpeg_c", "_chrRangeToJpeg_c", "_chrRangeFromJpeg16_c", "_chrRangeToJpeg16_c", "_rgb15to16_c", "_rgb15tobgr24_c", "_rgb15to32_c", "_rgb16tobgr24_c", "_rgb16to32_c", "_rgb16to15_c", "_rgb24tobgr16_c", "_rgb24tobgr15_c", "_rgb24tobgr32_c", "_rgb32to16_c", "_rgb32to15_c", "_rgb32tobgr24_c", "_rgb24to15_c", "_rgb24to16_c", "_rgb24tobgr24_c", "_shuffle_bytes_0321_c", "_shuffle_bytes_2103_c", "_shuffle_bytes_1230_c", "_shuffle_bytes_3012_c", "_shuffle_bytes_3210_c", "_rgb32tobgr16_c", "_rgb32tobgr15_c", "_rgb48tobgr48_bswap", "_rgb48tobgr64_bswap", "_rgb48to64_bswap", "_rgb64to48_bswap", "_rgb48tobgr48_nobswap", "_rgb48tobgr64_nobswap", "_rgb48to64_nobswap", "_rgb64tobgr48_nobswap", "_rgb64tobgr48_bswap", "_rgb64to48_nobswap", "_rgb12to15", "_rgb15to24", "_rgb16to24", "_rgb32to24", "_rgb24to32", "_rgb12tobgr12", "_rgb15tobgr15", "_rgb16tobgr15", "_rgb15tobgr16", "_rgb16tobgr16", "_rgb15tobgr32", "_rgb16tobgr32", "_add_residual4x4_9", "_add_residual8x8_9", "_add_residual16x16_9", "_add_residual32x32_9", "_transform_rdpcm_9", "_add_residual4x4_10", "_add_residual8x8_10", "_add_residual16x16_10", "_add_residual32x32_10", "_transform_rdpcm_10", "_add_residual4x4_12", "_add_residual8x8_12", "_add_residual16x16_12", "_add_residual32x32_12", "_transform_rdpcm_12", "_add_residual4x4_8", "_add_residual8x8_8", "_add_residual16x16_8", "_add_residual32x32_8", "_transform_rdpcm_8", "_just_return", "_bswap_buf", "_bswap16_buf", "_ff_imdct_calc_c", "_ff_imdct_half_c", "_ff_mdct_calc_c", "_ff_h264_add_pixels4_16_c", "_ff_h264_add_pixels4_8_c", "_ff_h264_add_pixels8_16_c", "_ff_h264_add_pixels8_8_c", "_ff_h264_idct_add_9_c", "_ff_h264_idct8_add_9_c", "_ff_h264_idct_dc_add_9_c", "_ff_h264_idct8_dc_add_9_c", "_ff_h264_luma_dc_dequant_idct_9_c", "_ff_h264_idct_add_10_c", "_ff_h264_idct8_add_10_c", "_ff_h264_idct_dc_add_10_c", "_ff_h264_idct8_dc_add_10_c", "_ff_h264_luma_dc_dequant_idct_10_c", "_ff_h264_idct_add_12_c", "_ff_h264_idct8_add_12_c", "_ff_h264_idct_dc_add_12_c", "_ff_h264_idct8_dc_add_12_c", "_ff_h264_luma_dc_dequant_idct_12_c", "_ff_h264_idct_add_14_c", "_ff_h264_idct8_add_14_c", "_ff_h264_idct_dc_add_14_c", "_ff_h264_idct8_dc_add_14_c", "_ff_h264_luma_dc_dequant_idct_14_c", "_ff_h264_idct_add_8_c", "_ff_h264_idct8_add_8_c", "_ff_h264_idct_dc_add_8_c", "_ff_h264_idct8_dc_add_8_c", "_ff_h264_luma_dc_dequant_idct_8_c", "_sbr_qmf_deint_bfly_c", "_ps_add_squares_c", "_butterflies_float_c", "_cpy1", "_cpy2", "_cpy4", "_cpy8", 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0];
  5617. var debug_table_viiid = [0, "jsCall_viiid_0", "jsCall_viiid_1", "jsCall_viiid_2", "jsCall_viiid_3", "jsCall_viiid_4", "jsCall_viiid_5", "jsCall_viiid_6", "jsCall_viiid_7", "jsCall_viiid_8", "jsCall_viiid_9", "jsCall_viiid_10", "jsCall_viiid_11", "jsCall_viiid_12", "jsCall_viiid_13", "jsCall_viiid_14", "jsCall_viiid_15", "jsCall_viiid_16", "jsCall_viiid_17", "jsCall_viiid_18", "jsCall_viiid_19", "jsCall_viiid_20", "jsCall_viiid_21", "jsCall_viiid_22", "jsCall_viiid_23", "jsCall_viiid_24", "jsCall_viiid_25", "jsCall_viiid_26", "jsCall_viiid_27", "jsCall_viiid_28", "jsCall_viiid_29", "jsCall_viiid_30", "jsCall_viiid_31", "jsCall_viiid_32", "jsCall_viiid_33", "jsCall_viiid_34", 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0];
  5618. var debug_table_viiii = [0, "jsCall_viiii_0", "jsCall_viiii_1", "jsCall_viiii_2", "jsCall_viiii_3", "jsCall_viiii_4", "jsCall_viiii_5", "jsCall_viiii_6", "jsCall_viiii_7", "jsCall_viiii_8", "jsCall_viiii_9", "jsCall_viiii_10", "jsCall_viiii_11", "jsCall_viiii_12", "jsCall_viiii_13", "jsCall_viiii_14", "jsCall_viiii_15", "jsCall_viiii_16", "jsCall_viiii_17", "jsCall_viiii_18", "jsCall_viiii_19", "jsCall_viiii_20", "jsCall_viiii_21", "jsCall_viiii_22", "jsCall_viiii_23", "jsCall_viiii_24", "jsCall_viiii_25", "jsCall_viiii_26", "jsCall_viiii_27", "jsCall_viiii_28", "jsCall_viiii_29", "jsCall_viiii_30", "jsCall_viiii_31", "jsCall_viiii_32", "jsCall_viiii_33", "jsCall_viiii_34", "_planar_rgb9le_to_y", "_planar_rgb10le_to_a", "_planar_rgb10le_to_y", "_planar_rgb12le_to_a", "_planar_rgb12le_to_y", "_planar_rgb14le_to_y", "_planar_rgb16le_to_a", "_planar_rgb16le_to_y", "_planar_rgb9be_to_y", "_planar_rgb10be_to_a", "_planar_rgb10be_to_y", "_planar_rgb12be_to_a", "_planar_rgb12be_to_y", "_planar_rgb14be_to_y", "_planar_rgb16be_to_a", "_planar_rgb16be_to_y", "_planar_rgb_to_a", "_planar_rgb_to_y", "_gray8aToPacked32", "_gray8aToPacked32_1", "_gray8aToPacked24", "_sws_convertPalette8ToPacked32", "_sws_convertPalette8ToPacked24", "_intra_pred_2_9", "_intra_pred_3_9", "_intra_pred_4_9", "_intra_pred_5_9", "_pred_planar_0_9", "_pred_planar_1_9", "_pred_planar_2_9", "_pred_planar_3_9", "_intra_pred_2_10", "_intra_pred_3_10", "_intra_pred_4_10", "_intra_pred_5_10", "_pred_planar_0_10", "_pred_planar_1_10", "_pred_planar_2_10", "_pred_planar_3_10", "_intra_pred_2_12", "_intra_pred_3_12", "_intra_pred_4_12", "_intra_pred_5_12", "_pred_planar_0_12", "_pred_planar_1_12", "_pred_planar_2_12", "_pred_planar_3_12", "_intra_pred_2_8", "_intra_pred_3_8", "_intra_pred_4_8", "_intra_pred_5_8", "_pred_planar_0_8", "_pred_planar_1_8", "_pred_planar_2_8", "_pred_planar_3_8", "_apply_tns", "_windowing_and_mdct_ltp", "_h264_v_loop_filter_luma_intra_9_c", "_h264_h_loop_filter_luma_intra_9_c", "_h264_h_loop_filter_luma_mbaff_intra_9_c", "_h264_v_loop_filter_chroma_intra_9_c", "_h264_h_loop_filter_chroma_intra_9_c", "_h264_h_loop_filter_chroma422_intra_9_c", "_h264_h_loop_filter_chroma_mbaff_intra_9_c", "_h264_h_loop_filter_chroma422_mbaff_intra_9_c", "_h264_v_loop_filter_luma_intra_10_c", "_h264_h_loop_filter_luma_intra_10_c", "_h264_h_loop_filter_luma_mbaff_intra_10_c", "_h264_v_loop_filter_chroma_intra_10_c", "_h264_h_loop_filter_chroma_intra_10_c", "_h264_h_loop_filter_chroma422_intra_10_c", "_h264_h_loop_filter_chroma_mbaff_intra_10_c", "_h264_h_loop_filter_chroma422_mbaff_intra_10_c", "_h264_v_loop_filter_luma_intra_12_c", "_h264_h_loop_filter_luma_intra_12_c", "_h264_h_loop_filter_luma_mbaff_intra_12_c", "_h264_v_loop_filter_chroma_intra_12_c", "_h264_h_loop_filter_chroma_intra_12_c", "_h264_h_loop_filter_chroma422_intra_12_c", "_h264_h_loop_filter_chroma_mbaff_intra_12_c", "_h264_h_loop_filter_chroma422_mbaff_intra_12_c", "_h264_v_loop_filter_luma_intra_14_c", "_h264_h_loop_filter_luma_intra_14_c", "_h264_h_loop_filter_luma_mbaff_intra_14_c", "_h264_v_loop_filter_chroma_intra_14_c", "_h264_h_loop_filter_chroma_intra_14_c", "_h264_h_loop_filter_chroma422_intra_14_c", "_h264_h_loop_filter_chroma_mbaff_intra_14_c", "_h264_h_loop_filter_chroma422_mbaff_intra_14_c", "_h264_v_loop_filter_luma_intra_8_c", "_h264_h_loop_filter_luma_intra_8_c", "_h264_h_loop_filter_luma_mbaff_intra_8_c", "_h264_v_loop_filter_chroma_intra_8_c", "_h264_h_loop_filter_chroma_intra_8_c", "_h264_h_loop_filter_chroma422_intra_8_c", "_h264_h_loop_filter_chroma_mbaff_intra_8_c", "_h264_h_loop_filter_chroma422_mbaff_intra_8_c", "_fft15_c", "_mdct15", "_imdct15_half", "_ps_mul_pair_single_c", "_ps_hybrid_analysis_ileave_c", "_ps_hybrid_synthesis_deint_c", "_vector_fmul_c", "_vector_dmul_c", "_vector_fmul_reverse_c", "_av_log_default_callback", "_mix6to2_s16", "_mix8to2_s16", "_mix6to2_clip_s16", "_mix8to2_clip_s16", "_mix6to2_float", "_mix8to2_float", "_mix6to2_double", "_mix8to2_double", "_mix6to2_s32", "_mix8to2_s32", 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0];
  5619. var debug_table_viiiifii = [0, "jsCall_viiiifii_0", "jsCall_viiiifii_1", "jsCall_viiiifii_2", "jsCall_viiiifii_3", "jsCall_viiiifii_4", "jsCall_viiiifii_5", "jsCall_viiiifii_6", "jsCall_viiiifii_7", "jsCall_viiiifii_8", "jsCall_viiiifii_9", "jsCall_viiiifii_10", "jsCall_viiiifii_11", "jsCall_viiiifii_12", "jsCall_viiiifii_13", "jsCall_viiiifii_14", "jsCall_viiiifii_15", "jsCall_viiiifii_16", "jsCall_viiiifii_17", "jsCall_viiiifii_18", "jsCall_viiiifii_19", "jsCall_viiiifii_20", "jsCall_viiiifii_21", "jsCall_viiiifii_22", "jsCall_viiiifii_23", "jsCall_viiiifii_24", "jsCall_viiiifii_25", "jsCall_viiiifii_26", "jsCall_viiiifii_27", "jsCall_viiiifii_28", "jsCall_viiiifii_29", "jsCall_viiiifii_30", "jsCall_viiiifii_31", "jsCall_viiiifii_32", "jsCall_viiiifii_33", "jsCall_viiiifii_34", "_sbr_hf_gen_c", 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0];
  5620. var debug_table_viiiii = [0, "jsCall_viiiii_0", "jsCall_viiiii_1", "jsCall_viiiii_2", "jsCall_viiiii_3", "jsCall_viiiii_4", "jsCall_viiiii_5", "jsCall_viiiii_6", "jsCall_viiiii_7", "jsCall_viiiii_8", "jsCall_viiiii_9", "jsCall_viiiii_10", "jsCall_viiiii_11", "jsCall_viiiii_12", "jsCall_viiiii_13", "jsCall_viiiii_14", "jsCall_viiiii_15", "jsCall_viiiii_16", "jsCall_viiiii_17", "jsCall_viiiii_18", "jsCall_viiiii_19", "jsCall_viiiii_20", "jsCall_viiiii_21", "jsCall_viiiii_22", "jsCall_viiiii_23", "jsCall_viiiii_24", "jsCall_viiiii_25", "jsCall_viiiii_26", "jsCall_viiiii_27", "jsCall_viiiii_28", "jsCall_viiiii_29", "jsCall_viiiii_30", "jsCall_viiiii_31", "jsCall_viiiii_32", "jsCall_viiiii_33", "jsCall_viiiii_34", "_conv_AV_SAMPLE_FMT_U8_to_AV_SAMPLE_FMT_U8", "_conv_AV_SAMPLE_FMT_U8_to_AV_SAMPLE_FMT_S16", "_conv_AV_SAMPLE_FMT_U8_to_AV_SAMPLE_FMT_S32", "_conv_AV_SAMPLE_FMT_U8_to_AV_SAMPLE_FMT_FLT", "_conv_AV_SAMPLE_FMT_U8_to_AV_SAMPLE_FMT_DBL", "_conv_AV_SAMPLE_FMT_U8_to_AV_SAMPLE_FMT_S64", "_conv_AV_SAMPLE_FMT_S16_to_AV_SAMPLE_FMT_U8", "_conv_AV_SAMPLE_FMT_S16_to_AV_SAMPLE_FMT_S16", "_conv_AV_SAMPLE_FMT_S16_to_AV_SAMPLE_FMT_S32", "_conv_AV_SAMPLE_FMT_S16_to_AV_SAMPLE_FMT_FLT", "_conv_AV_SAMPLE_FMT_S16_to_AV_SAMPLE_FMT_DBL", "_conv_AV_SAMPLE_FMT_S16_to_AV_SAMPLE_FMT_S64", "_conv_AV_SAMPLE_FMT_S32_to_AV_SAMPLE_FMT_U8", "_conv_AV_SAMPLE_FMT_S32_to_AV_SAMPLE_FMT_S16", "_conv_AV_SAMPLE_FMT_S32_to_AV_SAMPLE_FMT_S32", "_conv_AV_SAMPLE_FMT_S32_to_AV_SAMPLE_FMT_FLT", "_conv_AV_SAMPLE_FMT_S32_to_AV_SAMPLE_FMT_DBL", "_conv_AV_SAMPLE_FMT_S32_to_AV_SAMPLE_FMT_S64", "_conv_AV_SAMPLE_FMT_FLT_to_AV_SAMPLE_FMT_U8", "_conv_AV_SAMPLE_FMT_FLT_to_AV_SAMPLE_FMT_S16", "_conv_AV_SAMPLE_FMT_FLT_to_AV_SAMPLE_FMT_S32", "_conv_AV_SAMPLE_FMT_FLT_to_AV_SAMPLE_FMT_FLT", "_conv_AV_SAMPLE_FMT_FLT_to_AV_SAMPLE_FMT_DBL", "_conv_AV_SAMPLE_FMT_FLT_to_AV_SAMPLE_FMT_S64", "_conv_AV_SAMPLE_FMT_DBL_to_AV_SAMPLE_FMT_U8", "_conv_AV_SAMPLE_FMT_DBL_to_AV_SAMPLE_FMT_S16", "_conv_AV_SAMPLE_FMT_DBL_to_AV_SAMPLE_FMT_S32", "_conv_AV_SAMPLE_FMT_DBL_to_AV_SAMPLE_FMT_FLT", "_conv_AV_SAMPLE_FMT_DBL_to_AV_SAMPLE_FMT_DBL", "_conv_AV_SAMPLE_FMT_DBL_to_AV_SAMPLE_FMT_S64", "_conv_AV_SAMPLE_FMT_S64_to_AV_SAMPLE_FMT_U8", "_conv_AV_SAMPLE_FMT_S64_to_AV_SAMPLE_FMT_S16", "_conv_AV_SAMPLE_FMT_S64_to_AV_SAMPLE_FMT_S32", "_conv_AV_SAMPLE_FMT_S64_to_AV_SAMPLE_FMT_FLT", "_conv_AV_SAMPLE_FMT_S64_to_AV_SAMPLE_FMT_DBL", "_conv_AV_SAMPLE_FMT_S64_to_AV_SAMPLE_FMT_S64", "_planar_rgb9le_to_uv", "_planar_rgb10le_to_uv", "_planar_rgb12le_to_uv", "_planar_rgb14le_to_uv", "_planar_rgb16le_to_uv", "_planar_rgb9be_to_uv", "_planar_rgb10be_to_uv", "_planar_rgb12be_to_uv", "_planar_rgb14be_to_uv", "_planar_rgb16be_to_uv", "_planar_rgb_to_uv", "_yuv2p010l1_LE_c", "_yuv2p010l1_BE_c", "_yuv2plane1_16LE_c", "_yuv2plane1_16BE_c", "_yuv2plane1_9LE_c", "_yuv2plane1_9BE_c", "_yuv2plane1_10LE_c", "_yuv2plane1_10BE_c", "_yuv2plane1_12LE_c", "_yuv2plane1_12BE_c", "_yuv2plane1_14LE_c", "_yuv2plane1_14BE_c", "_yuv2plane1_floatBE_c", "_yuv2plane1_floatLE_c", "_yuv2plane1_8_c", "_bayer_bggr8_to_rgb24_copy", "_bayer_bggr8_to_rgb24_interpolate", "_bayer_bggr16le_to_rgb24_copy", "_bayer_bggr16le_to_rgb24_interpolate", "_bayer_bggr16be_to_rgb24_copy", "_bayer_bggr16be_to_rgb24_interpolate", "_bayer_rggb8_to_rgb24_copy", "_bayer_rggb8_to_rgb24_interpolate", "_bayer_rggb16le_to_rgb24_copy", "_bayer_rggb16le_to_rgb24_interpolate", "_bayer_rggb16be_to_rgb24_copy", "_bayer_rggb16be_to_rgb24_interpolate", "_bayer_gbrg8_to_rgb24_copy", "_bayer_gbrg8_to_rgb24_interpolate", "_bayer_gbrg16le_to_rgb24_copy", "_bayer_gbrg16le_to_rgb24_interpolate", "_bayer_gbrg16be_to_rgb24_copy", "_bayer_gbrg16be_to_rgb24_interpolate", "_bayer_grbg8_to_rgb24_copy", "_bayer_grbg8_to_rgb24_interpolate", "_bayer_grbg16le_to_rgb24_copy", "_bayer_grbg16le_to_rgb24_interpolate", "_bayer_grbg16be_to_rgb24_copy", "_bayer_grbg16be_to_rgb24_interpolate", "_hevc_h_loop_filter_chroma_9", "_hevc_v_loop_filter_chroma_9", "_hevc_h_loop_filter_chroma_10", "_hevc_v_loop_filter_chroma_10", "_hevc_h_loop_filter_chroma_12", "_hevc_v_loop_filter_chroma_12", "_hevc_h_loop_filter_chroma_8", "_hevc_v_loop_filter_chroma_8", "_ff_mpadsp_apply_window_float", "_ff_mpadsp_apply_window_fixed", "_worker_func", "_sbr_hf_assemble", "_sbr_hf_inverse_filter", "_ff_h264_idct_add16_9_c", "_ff_h264_idct8_add4_9_c", "_ff_h264_idct_add8_9_c", "_ff_h264_idct_add8_422_9_c", "_ff_h264_idct_add16intra_9_c", "_h264_v_loop_filter_luma_9_c", "_h264_h_loop_filter_luma_9_c", "_h264_h_loop_filter_luma_mbaff_9_c", "_h264_v_loop_filter_chroma_9_c", "_h264_h_loop_filter_chroma_9_c", "_h264_h_loop_filter_chroma422_9_c", "_h264_h_loop_filter_chroma_mbaff_9_c", "_h264_h_loop_filter_chroma422_mbaff_9_c", "_ff_h264_idct_add16_10_c", "_ff_h264_idct8_add4_10_c", "_ff_h264_idct_add8_10_c", "_ff_h264_idct_add8_422_10_c", "_ff_h264_idct_add16intra_10_c", "_h264_v_loop_filter_luma_10_c", "_h264_h_loop_filter_luma_10_c", "_h264_h_loop_filter_luma_mbaff_10_c", "_h264_v_loop_filter_chroma_10_c", "_h264_h_loop_filter_chroma_10_c", "_h264_h_loop_filter_chroma422_10_c", "_h264_h_loop_filter_chroma_mbaff_10_c", "_h264_h_loop_filter_chroma422_mbaff_10_c", "_ff_h264_idct_add16_12_c", "_ff_h264_idct8_add4_12_c", "_ff_h264_idct_add8_12_c", "_ff_h264_idct_add8_422_12_c", "_ff_h264_idct_add16intra_12_c", "_h264_v_loop_filter_luma_12_c", "_h264_h_loop_filter_luma_12_c", "_h264_h_loop_filter_luma_mbaff_12_c", "_h264_v_loop_filter_chroma_12_c", "_h264_h_loop_filter_chroma_12_c", "_h264_h_loop_filter_chroma422_12_c", "_h264_h_loop_filter_chroma_mbaff_12_c", "_h264_h_loop_filter_chroma422_mbaff_12_c", "_ff_h264_idct_add16_14_c", "_ff_h264_idct8_add4_14_c", "_ff_h264_idct_add8_14_c", "_ff_h264_idct_add8_422_14_c", "_ff_h264_idct_add16intra_14_c", "_h264_v_loop_filter_luma_14_c", "_h264_h_loop_filter_luma_14_c", "_h264_h_loop_filter_luma_mbaff_14_c", "_h264_v_loop_filter_chroma_14_c", "_h264_h_loop_filter_chroma_14_c", "_h264_h_loop_filter_chroma422_14_c", "_h264_h_loop_filter_chroma_mbaff_14_c", "_h264_h_loop_filter_chroma422_mbaff_14_c", "_ff_h264_idct_add16_8_c", "_ff_h264_idct8_add4_8_c", "_ff_h264_idct_add8_8_c", "_ff_h264_idct_add8_422_8_c", "_ff_h264_idct_add16intra_8_c", "_h264_v_loop_filter_luma_8_c", "_h264_h_loop_filter_luma_8_c", "_h264_h_loop_filter_luma_mbaff_8_c", "_h264_v_loop_filter_chroma_8_c", "_h264_h_loop_filter_chroma_8_c", "_h264_h_loop_filter_chroma422_8_c", "_h264_h_loop_filter_chroma_mbaff_8_c", "_h264_h_loop_filter_chroma422_mbaff_8_c", "_postrotate_c", "_sbr_hf_g_filt_c", "_ps_hybrid_analysis_c", "_ps_stereo_interpolate_c", "_ps_stereo_interpolate_ipdopd_c", "_vector_fmul_window_c", "_vector_fmul_add_c", "_copy_s16", "_copy_clip_s16", "_copy_float", "_copy_double", "_copy_s32", 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0];
  5621. var debug_table_viiiiidd = [0, "jsCall_viiiiidd_0", "jsCall_viiiiidd_1", "jsCall_viiiiidd_2", "jsCall_viiiiidd_3", "jsCall_viiiiidd_4", "jsCall_viiiiidd_5", "jsCall_viiiiidd_6", "jsCall_viiiiidd_7", "jsCall_viiiiidd_8", "jsCall_viiiiidd_9", "jsCall_viiiiidd_10", "jsCall_viiiiidd_11", "jsCall_viiiiidd_12", "jsCall_viiiiidd_13", "jsCall_viiiiidd_14", "jsCall_viiiiidd_15", "jsCall_viiiiidd_16", "jsCall_viiiiidd_17", "jsCall_viiiiidd_18", "jsCall_viiiiidd_19", "jsCall_viiiiidd_20", "jsCall_viiiiidd_21", "jsCall_viiiiidd_22", "jsCall_viiiiidd_23", "jsCall_viiiiidd_24", "jsCall_viiiiidd_25", "jsCall_viiiiidd_26", "jsCall_viiiiidd_27", "jsCall_viiiiidd_28", "jsCall_viiiiidd_29", "jsCall_viiiiidd_30", "jsCall_viiiiidd_31", "jsCall_viiiiidd_32", "jsCall_viiiiidd_33", "jsCall_viiiiidd_34", 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0];
  5622. var debug_table_viiiiiddi = [0, "jsCall_viiiiiddi_0", "jsCall_viiiiiddi_1", "jsCall_viiiiiddi_2", "jsCall_viiiiiddi_3", "jsCall_viiiiiddi_4", "jsCall_viiiiiddi_5", "jsCall_viiiiiddi_6", "jsCall_viiiiiddi_7", "jsCall_viiiiiddi_8", "jsCall_viiiiiddi_9", "jsCall_viiiiiddi_10", "jsCall_viiiiiddi_11", "jsCall_viiiiiddi_12", "jsCall_viiiiiddi_13", "jsCall_viiiiiddi_14", "jsCall_viiiiiddi_15", "jsCall_viiiiiddi_16", "jsCall_viiiiiddi_17", "jsCall_viiiiiddi_18", "jsCall_viiiiiddi_19", "jsCall_viiiiiddi_20", "jsCall_viiiiiddi_21", "jsCall_viiiiiddi_22", "jsCall_viiiiiddi_23", "jsCall_viiiiiddi_24", "jsCall_viiiiiddi_25", "jsCall_viiiiiddi_26", "jsCall_viiiiiddi_27", "jsCall_viiiiiddi_28", "jsCall_viiiiiddi_29", "jsCall_viiiiiddi_30", "jsCall_viiiiiddi_31", "jsCall_viiiiiddi_32", "jsCall_viiiiiddi_33", "jsCall_viiiiiddi_34", 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0];
  5623. var debug_table_viiiiii = [0, "jsCall_viiiiii_0", "jsCall_viiiiii_1", "jsCall_viiiiii_2", "jsCall_viiiiii_3", "jsCall_viiiiii_4", "jsCall_viiiiii_5", "jsCall_viiiiii_6", "jsCall_viiiiii_7", "jsCall_viiiiii_8", "jsCall_viiiiii_9", "jsCall_viiiiii_10", "jsCall_viiiiii_11", "jsCall_viiiiii_12", "jsCall_viiiiii_13", "jsCall_viiiiii_14", "jsCall_viiiiii_15", "jsCall_viiiiii_16", "jsCall_viiiiii_17", "jsCall_viiiiii_18", "jsCall_viiiiii_19", "jsCall_viiiiii_20", "jsCall_viiiiii_21", "jsCall_viiiiii_22", "jsCall_viiiiii_23", "jsCall_viiiiii_24", "jsCall_viiiiii_25", "jsCall_viiiiii_26", "jsCall_viiiiii_27", "jsCall_viiiiii_28", "jsCall_viiiiii_29", "jsCall_viiiiii_30", "jsCall_viiiiii_31", "jsCall_viiiiii_32", "jsCall_viiiiii_33", "jsCall_viiiiii_34", "_read_geobtag", "_read_apic", "_read_chapter", "_read_priv", "_ff_hyscale_fast_c", "_bswap16Y_c", "_read_ya16le_gray_c", "_read_ya16be_gray_c", "_read_ayuv64le_Y_c", "_yuy2ToY_c", "_uyvyToY_c", "_bgr24ToY_c", "_bgr16leToY_c", "_bgr16beToY_c", "_bgr15leToY_c", "_bgr15beToY_c", "_bgr12leToY_c", "_bgr12beToY_c", "_rgb24ToY_c", "_rgb16leToY_c", "_rgb16beToY_c", "_rgb15leToY_c", "_rgb15beToY_c", "_rgb12leToY_c", "_rgb12beToY_c", "_palToY_c", "_monoblack2Y_c", "_monowhite2Y_c", "_bgr32ToY_c", "_bgr321ToY_c", "_rgb32ToY_c", "_rgb321ToY_c", "_rgb48BEToY_c", "_rgb48LEToY_c", "_bgr48BEToY_c", "_bgr48LEToY_c", "_rgb64BEToY_c", "_rgb64LEToY_c", "_bgr64BEToY_c", "_bgr64LEToY_c", "_p010LEToY_c", "_p010BEToY_c", "_grayf32ToY16_c", "_grayf32ToY16_bswap_c", "_rgba64leToA_c", "_rgba64beToA_c", "_rgbaToA_c", "_abgrToA_c", "_read_ya16le_alpha_c", "_read_ya16be_alpha_c", "_read_ayuv64le_A_c", "_palToA_c", "_put_pcm_9", "_hevc_h_loop_filter_luma_9", "_hevc_v_loop_filter_luma_9", "_put_pcm_10", "_hevc_h_loop_filter_luma_10", "_hevc_v_loop_filter_luma_10", "_put_pcm_12", "_hevc_h_loop_filter_luma_12", "_hevc_v_loop_filter_luma_12", "_put_pcm_8", "_hevc_h_loop_filter_luma_8", "_hevc_v_loop_filter_luma_8", "_pred_dc_9", "_pred_angular_0_9", "_pred_angular_1_9", "_pred_angular_2_9", "_pred_angular_3_9", "_pred_dc_10", "_pred_angular_0_10", "_pred_angular_1_10", "_pred_angular_2_10", "_pred_angular_3_10", "_pred_dc_12", "_pred_angular_0_12", "_pred_angular_1_12", "_pred_angular_2_12", "_pred_angular_3_12", "_pred_dc_8", "_pred_angular_0_8", "_pred_angular_1_8", "_pred_angular_2_8", "_pred_angular_3_8", "_ff_imdct36_blocks_float", "_ff_imdct36_blocks_fixed", "_weight_h264_pixels16_9_c", "_weight_h264_pixels8_9_c", "_weight_h264_pixels4_9_c", "_weight_h264_pixels2_9_c", "_weight_h264_pixels16_10_c", "_weight_h264_pixels8_10_c", "_weight_h264_pixels4_10_c", "_weight_h264_pixels2_10_c", "_weight_h264_pixels16_12_c", "_weight_h264_pixels8_12_c", "_weight_h264_pixels4_12_c", "_weight_h264_pixels2_12_c", "_weight_h264_pixels16_14_c", "_weight_h264_pixels8_14_c", "_weight_h264_pixels4_14_c", "_weight_h264_pixels2_14_c", "_weight_h264_pixels16_8_c", "_weight_h264_pixels8_8_c", "_weight_h264_pixels4_8_c", "_weight_h264_pixels2_8_c", "_sbr_hf_apply_noise_0", "_sbr_hf_apply_noise_1", "_sbr_hf_apply_noise_2", "_sbr_hf_apply_noise_3", "_aes_decrypt", "_aes_encrypt", "_image_copy_plane", 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0];
  5624. var debug_table_viiiiiifi = [0, "jsCall_viiiiiifi_0", "jsCall_viiiiiifi_1", "jsCall_viiiiiifi_2", "jsCall_viiiiiifi_3", "jsCall_viiiiiifi_4", "jsCall_viiiiiifi_5", "jsCall_viiiiiifi_6", "jsCall_viiiiiifi_7", "jsCall_viiiiiifi_8", "jsCall_viiiiiifi_9", "jsCall_viiiiiifi_10", "jsCall_viiiiiifi_11", "jsCall_viiiiiifi_12", "jsCall_viiiiiifi_13", "jsCall_viiiiiifi_14", "jsCall_viiiiiifi_15", "jsCall_viiiiiifi_16", "jsCall_viiiiiifi_17", "jsCall_viiiiiifi_18", "jsCall_viiiiiifi_19", "jsCall_viiiiiifi_20", "jsCall_viiiiiifi_21", "jsCall_viiiiiifi_22", "jsCall_viiiiiifi_23", "jsCall_viiiiiifi_24", "jsCall_viiiiiifi_25", "jsCall_viiiiiifi_26", "jsCall_viiiiiifi_27", "jsCall_viiiiiifi_28", "jsCall_viiiiiifi_29", "jsCall_viiiiiifi_30", "jsCall_viiiiiifi_31", "jsCall_viiiiiifi_32", "jsCall_viiiiiifi_33", "jsCall_viiiiiifi_34", "_ps_decorrelate_c", 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0];
  5625. var debug_table_viiiiiii = [0, "jsCall_viiiiiii_0", "jsCall_viiiiiii_1", "jsCall_viiiiiii_2", "jsCall_viiiiiii_3", "jsCall_viiiiiii_4", "jsCall_viiiiiii_5", "jsCall_viiiiiii_6", "jsCall_viiiiiii_7", "jsCall_viiiiiii_8", "jsCall_viiiiiii_9", "jsCall_viiiiiii_10", "jsCall_viiiiiii_11", "jsCall_viiiiiii_12", "jsCall_viiiiiii_13", "jsCall_viiiiiii_14", "jsCall_viiiiiii_15", "jsCall_viiiiiii_16", "jsCall_viiiiiii_17", "jsCall_viiiiiii_18", "jsCall_viiiiiii_19", "jsCall_viiiiiii_20", "jsCall_viiiiiii_21", "jsCall_viiiiiii_22", "jsCall_viiiiiii_23", "jsCall_viiiiiii_24", "jsCall_viiiiiii_25", "jsCall_viiiiiii_26", "jsCall_viiiiiii_27", "jsCall_viiiiiii_28", "jsCall_viiiiiii_29", "jsCall_viiiiiii_30", "jsCall_viiiiiii_31", "jsCall_viiiiiii_32", "jsCall_viiiiiii_33", "jsCall_viiiiiii_34", "_hScale8To15_c", "_hScale8To19_c", "_hScale16To19_c", "_hScale16To15_c", "_yuy2ToUV_c", "_yvy2ToUV_c", "_uyvyToUV_c", "_nv12ToUV_c", "_nv21ToUV_c", "_palToUV_c", "_bswap16UV_c", "_read_ayuv64le_UV_c", "_p010LEToUV_c", "_p010BEToUV_c", "_p016LEToUV_c", "_p016BEToUV_c", "_gbr24pToUV_half_c", "_rgb64BEToUV_half_c", "_rgb64LEToUV_half_c", "_bgr64BEToUV_half_c", "_bgr64LEToUV_half_c", "_rgb48BEToUV_half_c", "_rgb48LEToUV_half_c", "_bgr48BEToUV_half_c", "_bgr48LEToUV_half_c", "_bgr32ToUV_half_c", "_bgr321ToUV_half_c", "_bgr24ToUV_half_c", "_bgr16leToUV_half_c", "_bgr16beToUV_half_c", "_bgr15leToUV_half_c", "_bgr15beToUV_half_c", "_bgr12leToUV_half_c", "_bgr12beToUV_half_c", "_rgb32ToUV_half_c", "_rgb321ToUV_half_c", "_rgb24ToUV_half_c", "_rgb16leToUV_half_c", "_rgb16beToUV_half_c", "_rgb15leToUV_half_c", "_rgb15beToUV_half_c", "_rgb12leToUV_half_c", "_rgb12beToUV_half_c", "_rgb64BEToUV_c", "_rgb64LEToUV_c", "_bgr64BEToUV_c", "_bgr64LEToUV_c", "_rgb48BEToUV_c", "_rgb48LEToUV_c", "_bgr48BEToUV_c", "_bgr48LEToUV_c", "_bgr32ToUV_c", "_bgr321ToUV_c", "_bgr24ToUV_c", "_bgr16leToUV_c", "_bgr16beToUV_c", "_bgr15leToUV_c", "_bgr15beToUV_c", "_bgr12leToUV_c", "_bgr12beToUV_c", "_rgb32ToUV_c", "_rgb321ToUV_c", "_rgb24ToUV_c", "_rgb16leToUV_c", "_rgb16beToUV_c", "_rgb15leToUV_c", "_rgb15beToUV_c", "_rgb12leToUV_c", "_rgb12beToUV_c", "_yuv2p010lX_LE_c", "_yuv2p010lX_BE_c", "_yuv2p010cX_c", "_yuv2planeX_16LE_c", "_yuv2planeX_16BE_c", "_yuv2p016cX_c", "_yuv2planeX_9LE_c", "_yuv2planeX_9BE_c", "_yuv2planeX_10LE_c", "_yuv2planeX_10BE_c", "_yuv2planeX_12LE_c", "_yuv2planeX_12BE_c", "_yuv2planeX_14LE_c", "_yuv2planeX_14BE_c", "_yuv2planeX_floatBE_c", "_yuv2planeX_floatLE_c", "_yuv2planeX_8_c", "_yuv2nv12cX_c", "_sao_edge_filter_9", "_put_hevc_pel_pixels_9", "_put_hevc_qpel_h_9", "_put_hevc_qpel_v_9", "_put_hevc_qpel_hv_9", "_put_hevc_epel_h_9", "_put_hevc_epel_v_9", "_put_hevc_epel_hv_9", "_sao_edge_filter_10", "_put_hevc_pel_pixels_10", "_put_hevc_qpel_h_10", "_put_hevc_qpel_v_10", "_put_hevc_qpel_hv_10", "_put_hevc_epel_h_10", "_put_hevc_epel_v_10", "_put_hevc_epel_hv_10", "_sao_edge_filter_12", "_put_hevc_pel_pixels_12", "_put_hevc_qpel_h_12", "_put_hevc_qpel_v_12", "_put_hevc_qpel_hv_12", "_put_hevc_epel_h_12", "_put_hevc_epel_v_12", "_put_hevc_epel_hv_12", "_sao_edge_filter_8", "_put_hevc_pel_pixels_8", "_put_hevc_qpel_h_8", "_put_hevc_qpel_v_8", "_put_hevc_qpel_hv_8", "_put_hevc_epel_h_8", "_put_hevc_epel_v_8", "_put_hevc_epel_hv_8", "_sum2_s16", "_sum2_clip_s16", "_sum2_float", "_sum2_double", "_sum2_s32", 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0];
  5626. var debug_table_viiiiiiii = [0, "jsCall_viiiiiiii_0", "jsCall_viiiiiiii_1", "jsCall_viiiiiiii_2", "jsCall_viiiiiiii_3", "jsCall_viiiiiiii_4", "jsCall_viiiiiiii_5", "jsCall_viiiiiiii_6", "jsCall_viiiiiiii_7", "jsCall_viiiiiiii_8", "jsCall_viiiiiiii_9", "jsCall_viiiiiiii_10", "jsCall_viiiiiiii_11", "jsCall_viiiiiiii_12", "jsCall_viiiiiiii_13", "jsCall_viiiiiiii_14", "jsCall_viiiiiiii_15", "jsCall_viiiiiiii_16", "jsCall_viiiiiiii_17", "jsCall_viiiiiiii_18", "jsCall_viiiiiiii_19", "jsCall_viiiiiiii_20", "jsCall_viiiiiiii_21", "jsCall_viiiiiiii_22", "jsCall_viiiiiiii_23", "jsCall_viiiiiiii_24", "jsCall_viiiiiiii_25", "jsCall_viiiiiiii_26", "jsCall_viiiiiiii_27", "jsCall_viiiiiiii_28", "jsCall_viiiiiiii_29", "jsCall_viiiiiiii_30", "jsCall_viiiiiiii_31", "jsCall_viiiiiiii_32", "jsCall_viiiiiiii_33", "jsCall_viiiiiiii_34", "_ff_hcscale_fast_c", "_bayer_bggr8_to_yv12_copy", "_bayer_bggr8_to_yv12_interpolate", "_bayer_bggr16le_to_yv12_copy", "_bayer_bggr16le_to_yv12_interpolate", "_bayer_bggr16be_to_yv12_copy", "_bayer_bggr16be_to_yv12_interpolate", "_bayer_rggb8_to_yv12_copy", "_bayer_rggb8_to_yv12_interpolate", "_bayer_rggb16le_to_yv12_copy", "_bayer_rggb16le_to_yv12_interpolate", "_bayer_rggb16be_to_yv12_copy", "_bayer_rggb16be_to_yv12_interpolate", "_bayer_gbrg8_to_yv12_copy", "_bayer_gbrg8_to_yv12_interpolate", "_bayer_gbrg16le_to_yv12_copy", "_bayer_gbrg16le_to_yv12_interpolate", "_bayer_gbrg16be_to_yv12_copy", "_bayer_gbrg16be_to_yv12_interpolate", "_bayer_grbg8_to_yv12_copy", "_bayer_grbg8_to_yv12_interpolate", "_bayer_grbg16le_to_yv12_copy", "_bayer_grbg16le_to_yv12_interpolate", "_bayer_grbg16be_to_yv12_copy", "_bayer_grbg16be_to_yv12_interpolate", "_sao_band_filter_9", "_put_hevc_pel_uni_pixels_9", "_put_hevc_qpel_uni_h_9", "_put_hevc_qpel_uni_v_9", "_put_hevc_qpel_uni_hv_9", "_put_hevc_epel_uni_h_9", "_put_hevc_epel_uni_v_9", "_put_hevc_epel_uni_hv_9", "_sao_band_filter_10", "_put_hevc_pel_uni_pixels_10", "_put_hevc_qpel_uni_h_10", "_put_hevc_qpel_uni_v_10", "_put_hevc_qpel_uni_hv_10", "_put_hevc_epel_uni_h_10", "_put_hevc_epel_uni_v_10", "_put_hevc_epel_uni_hv_10", "_sao_band_filter_12", "_put_hevc_pel_uni_pixels_12", "_put_hevc_qpel_uni_h_12", "_put_hevc_qpel_uni_v_12", "_put_hevc_qpel_uni_hv_12", "_put_hevc_epel_uni_h_12", "_put_hevc_epel_uni_v_12", "_put_hevc_epel_uni_hv_12", "_sao_band_filter_8", "_put_hevc_pel_uni_pixels_8", "_put_hevc_qpel_uni_h_8", "_put_hevc_qpel_uni_v_8", "_put_hevc_qpel_uni_hv_8", "_put_hevc_epel_uni_h_8", "_put_hevc_epel_uni_v_8", "_put_hevc_epel_uni_hv_8", "_biweight_h264_pixels16_9_c", "_biweight_h264_pixels8_9_c", "_biweight_h264_pixels4_9_c", "_biweight_h264_pixels2_9_c", "_biweight_h264_pixels16_10_c", "_biweight_h264_pixels8_10_c", "_biweight_h264_pixels4_10_c", "_biweight_h264_pixels2_10_c", "_biweight_h264_pixels16_12_c", "_biweight_h264_pixels8_12_c", "_biweight_h264_pixels4_12_c", "_biweight_h264_pixels2_12_c", "_biweight_h264_pixels16_14_c", "_biweight_h264_pixels8_14_c", "_biweight_h264_pixels4_14_c", "_biweight_h264_pixels2_14_c", "_biweight_h264_pixels16_8_c", "_biweight_h264_pixels8_8_c", "_biweight_h264_pixels4_8_c", "_biweight_h264_pixels2_8_c", 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0];
  5627. var debug_table_viiiiiiiid = [0, "jsCall_viiiiiiiid_0", "jsCall_viiiiiiiid_1", "jsCall_viiiiiiiid_2", "jsCall_viiiiiiiid_3", "jsCall_viiiiiiiid_4", "jsCall_viiiiiiiid_5", "jsCall_viiiiiiiid_6", "jsCall_viiiiiiiid_7", "jsCall_viiiiiiiid_8", "jsCall_viiiiiiiid_9", "jsCall_viiiiiiiid_10", "jsCall_viiiiiiiid_11", "jsCall_viiiiiiiid_12", "jsCall_viiiiiiiid_13", "jsCall_viiiiiiiid_14", "jsCall_viiiiiiiid_15", "jsCall_viiiiiiiid_16", "jsCall_viiiiiiiid_17", "jsCall_viiiiiiiid_18", "jsCall_viiiiiiiid_19", "jsCall_viiiiiiiid_20", "jsCall_viiiiiiiid_21", "jsCall_viiiiiiiid_22", "jsCall_viiiiiiiid_23", "jsCall_viiiiiiiid_24", "jsCall_viiiiiiiid_25", "jsCall_viiiiiiiid_26", "jsCall_viiiiiiiid_27", "jsCall_viiiiiiiid_28", "jsCall_viiiiiiiid_29", "jsCall_viiiiiiiid_30", "jsCall_viiiiiiiid_31", "jsCall_viiiiiiiid_32", "jsCall_viiiiiiiid_33", "jsCall_viiiiiiiid_34", 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0];
  5628. var debug_table_viiiiiiiidi = [0, "jsCall_viiiiiiiidi_0", "jsCall_viiiiiiiidi_1", "jsCall_viiiiiiiidi_2", "jsCall_viiiiiiiidi_3", "jsCall_viiiiiiiidi_4", "jsCall_viiiiiiiidi_5", "jsCall_viiiiiiiidi_6", "jsCall_viiiiiiiidi_7", "jsCall_viiiiiiiidi_8", "jsCall_viiiiiiiidi_9", "jsCall_viiiiiiiidi_10", "jsCall_viiiiiiiidi_11", "jsCall_viiiiiiiidi_12", "jsCall_viiiiiiiidi_13", "jsCall_viiiiiiiidi_14", "jsCall_viiiiiiiidi_15", "jsCall_viiiiiiiidi_16", "jsCall_viiiiiiiidi_17", "jsCall_viiiiiiiidi_18", "jsCall_viiiiiiiidi_19", "jsCall_viiiiiiiidi_20", "jsCall_viiiiiiiidi_21", "jsCall_viiiiiiiidi_22", "jsCall_viiiiiiiidi_23", "jsCall_viiiiiiiidi_24", "jsCall_viiiiiiiidi_25", "jsCall_viiiiiiiidi_26", "jsCall_viiiiiiiidi_27", "jsCall_viiiiiiiidi_28", "jsCall_viiiiiiiidi_29", "jsCall_viiiiiiiidi_30", "jsCall_viiiiiiiidi_31", "jsCall_viiiiiiiidi_32", "jsCall_viiiiiiiidi_33", "jsCall_viiiiiiiidi_34", 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0];
  5629. var debug_table_viiiiiiiii = [0, "jsCall_viiiiiiiii_0", "jsCall_viiiiiiiii_1", "jsCall_viiiiiiiii_2", "jsCall_viiiiiiiii_3", "jsCall_viiiiiiiii_4", "jsCall_viiiiiiiii_5", "jsCall_viiiiiiiii_6", "jsCall_viiiiiiiii_7", "jsCall_viiiiiiiii_8", "jsCall_viiiiiiiii_9", "jsCall_viiiiiiiii_10", "jsCall_viiiiiiiii_11", "jsCall_viiiiiiiii_12", "jsCall_viiiiiiiii_13", "jsCall_viiiiiiiii_14", "jsCall_viiiiiiiii_15", "jsCall_viiiiiiiii_16", "jsCall_viiiiiiiii_17", "jsCall_viiiiiiiii_18", "jsCall_viiiiiiiii_19", "jsCall_viiiiiiiii_20", "jsCall_viiiiiiiii_21", "jsCall_viiiiiiiii_22", "jsCall_viiiiiiiii_23", "jsCall_viiiiiiiii_24", "jsCall_viiiiiiiii_25", "jsCall_viiiiiiiii_26", "jsCall_viiiiiiiii_27", "jsCall_viiiiiiiii_28", "jsCall_viiiiiiiii_29", "jsCall_viiiiiiiii_30", "jsCall_viiiiiiiii_31", "jsCall_viiiiiiiii_32", "jsCall_viiiiiiiii_33", "jsCall_viiiiiiiii_34", "_yuv2rgba32_full_1_c", "_yuv2rgbx32_full_1_c", "_yuv2argb32_full_1_c", "_yuv2xrgb32_full_1_c", "_yuv2bgra32_full_1_c", "_yuv2bgrx32_full_1_c", "_yuv2abgr32_full_1_c", "_yuv2xbgr32_full_1_c", "_yuv2rgba64le_full_1_c", "_yuv2rgbx64le_full_1_c", "_yuv2rgba64be_full_1_c", "_yuv2rgbx64be_full_1_c", "_yuv2bgra64le_full_1_c", "_yuv2bgrx64le_full_1_c", "_yuv2bgra64be_full_1_c", "_yuv2bgrx64be_full_1_c", "_yuv2rgb24_full_1_c", "_yuv2bgr24_full_1_c", "_yuv2rgb48le_full_1_c", "_yuv2bgr48le_full_1_c", "_yuv2rgb48be_full_1_c", "_yuv2bgr48be_full_1_c", "_yuv2bgr4_byte_full_1_c", "_yuv2rgb4_byte_full_1_c", "_yuv2bgr8_full_1_c", "_yuv2rgb8_full_1_c", "_yuv2rgbx64le_1_c", "_yuv2rgba64le_1_c", "_yuv2rgbx64be_1_c", "_yuv2rgba64be_1_c", "_yuv2bgrx64le_1_c", "_yuv2bgra64le_1_c", "_yuv2bgrx64be_1_c", "_yuv2bgra64be_1_c", "_yuv2rgba32_1_c", "_yuv2rgbx32_1_c", "_yuv2rgba32_1_1_c", "_yuv2rgbx32_1_1_c", "_yuv2rgb16_1_c", "_yuv2rgb15_1_c", "_yuv2rgb12_1_c", "_yuv2rgb8_1_c", "_yuv2rgb4_1_c", "_yuv2rgb4b_1_c", "_yuv2rgb48le_1_c", "_yuv2rgb48be_1_c", "_yuv2bgr48le_1_c", "_yuv2bgr48be_1_c", "_yuv2rgb24_1_c", "_yuv2bgr24_1_c", "_yuv2monowhite_1_c", "_yuv2monoblack_1_c", "_yuv2yuyv422_1_c", "_yuv2yvyu422_1_c", "_yuv2uyvy422_1_c", "_yuv2ya8_1_c", "_yuv2ya16le_1_c", "_yuv2ya16be_1_c", "_yuy2toyv12_c", "_put_hevc_pel_bi_pixels_9", "_put_hevc_qpel_bi_h_9", "_put_hevc_qpel_bi_v_9", "_put_hevc_qpel_bi_hv_9", "_put_hevc_epel_bi_h_9", "_put_hevc_epel_bi_v_9", "_put_hevc_epel_bi_hv_9", "_put_hevc_pel_bi_pixels_10", "_put_hevc_qpel_bi_h_10", "_put_hevc_qpel_bi_v_10", "_put_hevc_qpel_bi_hv_10", "_put_hevc_epel_bi_h_10", "_put_hevc_epel_bi_v_10", "_put_hevc_epel_bi_hv_10", "_put_hevc_pel_bi_pixels_12", "_put_hevc_qpel_bi_h_12", "_put_hevc_qpel_bi_v_12", "_put_hevc_qpel_bi_hv_12", "_put_hevc_epel_bi_h_12", "_put_hevc_epel_bi_v_12", "_put_hevc_epel_bi_hv_12", "_put_hevc_pel_bi_pixels_8", "_put_hevc_qpel_bi_h_8", "_put_hevc_qpel_bi_v_8", "_put_hevc_qpel_bi_hv_8", "_put_hevc_epel_bi_h_8", "_put_hevc_epel_bi_v_8", "_put_hevc_epel_bi_hv_8", 0, 0, 0, 0, 0];
  5630. var debug_table_viiiiiiiiii = [0, "jsCall_viiiiiiiiii_0", "jsCall_viiiiiiiiii_1", "jsCall_viiiiiiiiii_2", "jsCall_viiiiiiiiii_3", "jsCall_viiiiiiiiii_4", "jsCall_viiiiiiiiii_5", "jsCall_viiiiiiiiii_6", "jsCall_viiiiiiiiii_7", "jsCall_viiiiiiiiii_8", "jsCall_viiiiiiiiii_9", "jsCall_viiiiiiiiii_10", "jsCall_viiiiiiiiii_11", "jsCall_viiiiiiiiii_12", "jsCall_viiiiiiiiii_13", "jsCall_viiiiiiiiii_14", "jsCall_viiiiiiiiii_15", "jsCall_viiiiiiiiii_16", "jsCall_viiiiiiiiii_17", "jsCall_viiiiiiiiii_18", "jsCall_viiiiiiiiii_19", "jsCall_viiiiiiiiii_20", "jsCall_viiiiiiiiii_21", "jsCall_viiiiiiiiii_22", "jsCall_viiiiiiiiii_23", "jsCall_viiiiiiiiii_24", "jsCall_viiiiiiiiii_25", "jsCall_viiiiiiiiii_26", "jsCall_viiiiiiiiii_27", "jsCall_viiiiiiiiii_28", "jsCall_viiiiiiiiii_29", "jsCall_viiiiiiiiii_30", "jsCall_viiiiiiiiii_31", "jsCall_viiiiiiiiii_32", "jsCall_viiiiiiiiii_33", "jsCall_viiiiiiiiii_34", "_yuv2rgba32_full_2_c", "_yuv2rgbx32_full_2_c", "_yuv2argb32_full_2_c", "_yuv2xrgb32_full_2_c", "_yuv2bgra32_full_2_c", "_yuv2bgrx32_full_2_c", "_yuv2abgr32_full_2_c", "_yuv2xbgr32_full_2_c", "_yuv2rgba64le_full_2_c", "_yuv2rgbx64le_full_2_c", "_yuv2rgba64be_full_2_c", "_yuv2rgbx64be_full_2_c", "_yuv2bgra64le_full_2_c", "_yuv2bgrx64le_full_2_c", "_yuv2bgra64be_full_2_c", "_yuv2bgrx64be_full_2_c", "_yuv2rgb24_full_2_c", "_yuv2bgr24_full_2_c", "_yuv2rgb48le_full_2_c", "_yuv2bgr48le_full_2_c", "_yuv2rgb48be_full_2_c", "_yuv2bgr48be_full_2_c", "_yuv2bgr4_byte_full_2_c", "_yuv2rgb4_byte_full_2_c", "_yuv2bgr8_full_2_c", "_yuv2rgb8_full_2_c", "_yuv2rgbx64le_2_c", "_yuv2rgba64le_2_c", "_yuv2rgbx64be_2_c", "_yuv2rgba64be_2_c", "_yuv2bgrx64le_2_c", "_yuv2bgra64le_2_c", "_yuv2bgrx64be_2_c", "_yuv2bgra64be_2_c", "_yuv2rgba32_2_c", "_yuv2rgbx32_2_c", "_yuv2rgba32_1_2_c", "_yuv2rgbx32_1_2_c", "_yuv2rgb16_2_c", "_yuv2rgb15_2_c", "_yuv2rgb12_2_c", "_yuv2rgb8_2_c", "_yuv2rgb4_2_c", "_yuv2rgb4b_2_c", "_yuv2rgb48le_2_c", "_yuv2rgb48be_2_c", "_yuv2bgr48le_2_c", "_yuv2bgr48be_2_c", "_yuv2rgb24_2_c", "_yuv2bgr24_2_c", "_yuv2monowhite_2_c", "_yuv2monoblack_2_c", "_yuv2yuyv422_2_c", "_yuv2yvyu422_2_c", "_yuv2uyvy422_2_c", "_yuv2ya8_2_c", "_yuv2ya16le_2_c", "_yuv2ya16be_2_c", "_vu9_to_vu12_c", "_yvu9_to_yuy2_c", "_ff_emulated_edge_mc_8", "_ff_emulated_edge_mc_16", 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0];
  5631. var debug_table_viiiiiiiiiii = [0, "jsCall_viiiiiiiiiii_0", "jsCall_viiiiiiiiiii_1", "jsCall_viiiiiiiiiii_2", "jsCall_viiiiiiiiiii_3", "jsCall_viiiiiiiiiii_4", "jsCall_viiiiiiiiiii_5", "jsCall_viiiiiiiiiii_6", "jsCall_viiiiiiiiiii_7", "jsCall_viiiiiiiiiii_8", "jsCall_viiiiiiiiiii_9", "jsCall_viiiiiiiiiii_10", "jsCall_viiiiiiiiiii_11", "jsCall_viiiiiiiiiii_12", "jsCall_viiiiiiiiiii_13", "jsCall_viiiiiiiiiii_14", "jsCall_viiiiiiiiiii_15", "jsCall_viiiiiiiiiii_16", "jsCall_viiiiiiiiiii_17", "jsCall_viiiiiiiiiii_18", "jsCall_viiiiiiiiiii_19", "jsCall_viiiiiiiiiii_20", "jsCall_viiiiiiiiiii_21", "jsCall_viiiiiiiiiii_22", "jsCall_viiiiiiiiiii_23", "jsCall_viiiiiiiiiii_24", "jsCall_viiiiiiiiiii_25", "jsCall_viiiiiiiiiii_26", "jsCall_viiiiiiiiiii_27", "jsCall_viiiiiiiiiii_28", "jsCall_viiiiiiiiiii_29", "jsCall_viiiiiiiiiii_30", "jsCall_viiiiiiiiiii_31", "jsCall_viiiiiiiiiii_32", "jsCall_viiiiiiiiiii_33", "jsCall_viiiiiiiiiii_34", "_put_hevc_pel_uni_w_pixels_9", "_put_hevc_qpel_uni_w_h_9", "_put_hevc_qpel_uni_w_v_9", "_put_hevc_qpel_uni_w_hv_9", "_put_hevc_epel_uni_w_h_9", "_put_hevc_epel_uni_w_v_9", "_put_hevc_epel_uni_w_hv_9", "_put_hevc_pel_uni_w_pixels_10", "_put_hevc_qpel_uni_w_h_10", "_put_hevc_qpel_uni_w_v_10", "_put_hevc_qpel_uni_w_hv_10", "_put_hevc_epel_uni_w_h_10", "_put_hevc_epel_uni_w_v_10", "_put_hevc_epel_uni_w_hv_10", "_put_hevc_pel_uni_w_pixels_12", "_put_hevc_qpel_uni_w_h_12", "_put_hevc_qpel_uni_w_v_12", "_put_hevc_qpel_uni_w_hv_12", "_put_hevc_epel_uni_w_h_12", "_put_hevc_epel_uni_w_v_12", "_put_hevc_epel_uni_w_hv_12", "_put_hevc_pel_uni_w_pixels_8", "_put_hevc_qpel_uni_w_h_8", "_put_hevc_qpel_uni_w_v_8", "_put_hevc_qpel_uni_w_hv_8", "_put_hevc_epel_uni_w_h_8", "_put_hevc_epel_uni_w_v_8", "_put_hevc_epel_uni_w_hv_8"];
  5632. var debug_table_viiiiiiiiiiii = [0, "jsCall_viiiiiiiiiiii_0", "jsCall_viiiiiiiiiiii_1", "jsCall_viiiiiiiiiiii_2", "jsCall_viiiiiiiiiiii_3", "jsCall_viiiiiiiiiiii_4", "jsCall_viiiiiiiiiiii_5", "jsCall_viiiiiiiiiiii_6", "jsCall_viiiiiiiiiiii_7", "jsCall_viiiiiiiiiiii_8", "jsCall_viiiiiiiiiiii_9", "jsCall_viiiiiiiiiiii_10", "jsCall_viiiiiiiiiiii_11", "jsCall_viiiiiiiiiiii_12", "jsCall_viiiiiiiiiiii_13", "jsCall_viiiiiiiiiiii_14", "jsCall_viiiiiiiiiiii_15", "jsCall_viiiiiiiiiiii_16", "jsCall_viiiiiiiiiiii_17", "jsCall_viiiiiiiiiiii_18", "jsCall_viiiiiiiiiiii_19", "jsCall_viiiiiiiiiiii_20", "jsCall_viiiiiiiiiiii_21", "jsCall_viiiiiiiiiiii_22", "jsCall_viiiiiiiiiiii_23", "jsCall_viiiiiiiiiiii_24", "jsCall_viiiiiiiiiiii_25", "jsCall_viiiiiiiiiiii_26", "jsCall_viiiiiiiiiiii_27", "jsCall_viiiiiiiiiiii_28", "jsCall_viiiiiiiiiiii_29", "jsCall_viiiiiiiiiiii_30", "jsCall_viiiiiiiiiiii_31", "jsCall_viiiiiiiiiiii_32", "jsCall_viiiiiiiiiiii_33", "jsCall_viiiiiiiiiiii_34", "_yuv2rgba32_full_X_c", "_yuv2rgbx32_full_X_c", "_yuv2argb32_full_X_c", "_yuv2xrgb32_full_X_c", "_yuv2bgra32_full_X_c", "_yuv2bgrx32_full_X_c", "_yuv2abgr32_full_X_c", "_yuv2xbgr32_full_X_c", "_yuv2rgba64le_full_X_c", "_yuv2rgbx64le_full_X_c", "_yuv2rgba64be_full_X_c", "_yuv2rgbx64be_full_X_c", "_yuv2bgra64le_full_X_c", "_yuv2bgrx64le_full_X_c", "_yuv2bgra64be_full_X_c", "_yuv2bgrx64be_full_X_c", "_yuv2rgb24_full_X_c", "_yuv2bgr24_full_X_c", "_yuv2rgb48le_full_X_c", "_yuv2bgr48le_full_X_c", "_yuv2rgb48be_full_X_c", "_yuv2bgr48be_full_X_c", "_yuv2bgr4_byte_full_X_c", "_yuv2rgb4_byte_full_X_c", "_yuv2bgr8_full_X_c", "_yuv2rgb8_full_X_c", "_yuv2gbrp_full_X_c", "_yuv2gbrp16_full_X_c", "_yuv2rgbx64le_X_c", "_yuv2rgba64le_X_c", "_yuv2rgbx64be_X_c", "_yuv2rgba64be_X_c", "_yuv2bgrx64le_X_c", "_yuv2bgra64le_X_c", "_yuv2bgrx64be_X_c", "_yuv2bgra64be_X_c", "_yuv2rgba32_X_c", "_yuv2rgbx32_X_c", "_yuv2rgba32_1_X_c", "_yuv2rgbx32_1_X_c", "_yuv2rgb16_X_c", "_yuv2rgb15_X_c", "_yuv2rgb12_X_c", "_yuv2rgb8_X_c", "_yuv2rgb4_X_c", "_yuv2rgb4b_X_c", "_yuv2rgb48le_X_c", "_yuv2rgb48be_X_c", "_yuv2bgr48le_X_c", "_yuv2bgr48be_X_c", "_yuv2rgb24_X_c", "_yuv2bgr24_X_c", "_yuv2monowhite_X_c", "_yuv2ayuv64le_X_c", "_yuv2monoblack_X_c", "_yuv2yuyv422_X_c", "_yuv2yvyu422_X_c", "_yuv2uyvy422_X_c", "_yuv2ya8_X_c", "_yuv2ya16le_X_c", "_yuv2ya16be_X_c", "_sao_edge_restore_0_9", "_sao_edge_restore_1_9", "_sao_edge_restore_0_10", "_sao_edge_restore_1_10", "_sao_edge_restore_0_12", "_sao_edge_restore_1_12", "_sao_edge_restore_0_8", "_sao_edge_restore_1_8", 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0];
  5633. var debug_table_viiiiiiiiiiiiii = [0, "jsCall_viiiiiiiiiiiiii_0", "jsCall_viiiiiiiiiiiiii_1", "jsCall_viiiiiiiiiiiiii_2", "jsCall_viiiiiiiiiiiiii_3", "jsCall_viiiiiiiiiiiiii_4", "jsCall_viiiiiiiiiiiiii_5", "jsCall_viiiiiiiiiiiiii_6", "jsCall_viiiiiiiiiiiiii_7", "jsCall_viiiiiiiiiiiiii_8", "jsCall_viiiiiiiiiiiiii_9", "jsCall_viiiiiiiiiiiiii_10", "jsCall_viiiiiiiiiiiiii_11", "jsCall_viiiiiiiiiiiiii_12", "jsCall_viiiiiiiiiiiiii_13", "jsCall_viiiiiiiiiiiiii_14", "jsCall_viiiiiiiiiiiiii_15", "jsCall_viiiiiiiiiiiiii_16", "jsCall_viiiiiiiiiiiiii_17", "jsCall_viiiiiiiiiiiiii_18", "jsCall_viiiiiiiiiiiiii_19", "jsCall_viiiiiiiiiiiiii_20", "jsCall_viiiiiiiiiiiiii_21", "jsCall_viiiiiiiiiiiiii_22", "jsCall_viiiiiiiiiiiiii_23", "jsCall_viiiiiiiiiiiiii_24", "jsCall_viiiiiiiiiiiiii_25", "jsCall_viiiiiiiiiiiiii_26", "jsCall_viiiiiiiiiiiiii_27", "jsCall_viiiiiiiiiiiiii_28", "jsCall_viiiiiiiiiiiiii_29", "jsCall_viiiiiiiiiiiiii_30", "jsCall_viiiiiiiiiiiiii_31", "jsCall_viiiiiiiiiiiiii_32", "jsCall_viiiiiiiiiiiiii_33", "jsCall_viiiiiiiiiiiiii_34", "_put_hevc_pel_bi_w_pixels_9", "_put_hevc_qpel_bi_w_h_9", "_put_hevc_qpel_bi_w_v_9", "_put_hevc_qpel_bi_w_hv_9", "_put_hevc_epel_bi_w_h_9", "_put_hevc_epel_bi_w_v_9", "_put_hevc_epel_bi_w_hv_9", "_put_hevc_pel_bi_w_pixels_10", "_put_hevc_qpel_bi_w_h_10", "_put_hevc_qpel_bi_w_v_10", "_put_hevc_qpel_bi_w_hv_10", "_put_hevc_epel_bi_w_h_10", "_put_hevc_epel_bi_w_v_10", "_put_hevc_epel_bi_w_hv_10", "_put_hevc_pel_bi_w_pixels_12", "_put_hevc_qpel_bi_w_h_12", "_put_hevc_qpel_bi_w_v_12", "_put_hevc_qpel_bi_w_hv_12", "_put_hevc_epel_bi_w_h_12", "_put_hevc_epel_bi_w_v_12", "_put_hevc_epel_bi_w_hv_12", "_put_hevc_pel_bi_w_pixels_8", "_put_hevc_qpel_bi_w_h_8", "_put_hevc_qpel_bi_w_v_8", "_put_hevc_qpel_bi_w_hv_8", "_put_hevc_epel_bi_w_h_8", "_put_hevc_epel_bi_w_v_8", "_put_hevc_epel_bi_w_hv_8"];
  5634. var debug_table_viiijj = [0, "jsCall_viiijj_0", "jsCall_viiijj_1", "jsCall_viiijj_2", "jsCall_viiijj_3", "jsCall_viiijj_4", "jsCall_viiijj_5", "jsCall_viiijj_6", "jsCall_viiijj_7", "jsCall_viiijj_8", "jsCall_viiijj_9", "jsCall_viiijj_10", "jsCall_viiijj_11", "jsCall_viiijj_12", "jsCall_viiijj_13", "jsCall_viiijj_14", "jsCall_viiijj_15", "jsCall_viiijj_16", "jsCall_viiijj_17", "jsCall_viiijj_18", "jsCall_viiijj_19", "jsCall_viiijj_20", "jsCall_viiijj_21", "jsCall_viiijj_22", "jsCall_viiijj_23", "jsCall_viiijj_24", "jsCall_viiijj_25", "jsCall_viiijj_26", "jsCall_viiijj_27", "jsCall_viiijj_28", "jsCall_viiijj_29", "jsCall_viiijj_30", "jsCall_viiijj_31", "jsCall_viiijj_32", "jsCall_viiijj_33", "jsCall_viiijj_34", "_resample_one_int16", "_resample_one_int32", "_resample_one_float", "_resample_one_double", 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0];
  5635. var debug_tables = {
  5636. "dd": debug_table_dd,
  5637. "did": debug_table_did,
  5638. "didd": debug_table_didd,
  5639. "fii": debug_table_fii,
  5640. "fiii": debug_table_fiii,
  5641. "ii": debug_table_ii,
  5642. "iid": debug_table_iid,
  5643. "iidiiii": debug_table_iidiiii,
  5644. "iii": debug_table_iii,
  5645. "iiii": debug_table_iiii,
  5646. "iiiii": debug_table_iiiii,
  5647. "iiiiii": debug_table_iiiiii,
  5648. "iiiiiii": debug_table_iiiiiii,
  5649. "iiiiiiidiiddii": debug_table_iiiiiiidiiddii,
  5650. "iiiiiiii": debug_table_iiiiiiii,
  5651. "iiiiiiiid": debug_table_iiiiiiiid,
  5652. "iiiiij": debug_table_iiiiij,
  5653. "iiiji": debug_table_iiiji,
  5654. "iiijjji": debug_table_iiijjji,
  5655. "jii": debug_table_jii,
  5656. "jiiij": debug_table_jiiij,
  5657. "jiiji": debug_table_jiiji,
  5658. "jij": debug_table_jij,
  5659. "jiji": debug_table_jiji,
  5660. "v": debug_table_v,
  5661. "vdiidiiiii": debug_table_vdiidiiiii,
  5662. "vdiidiiiiii": debug_table_vdiidiiiiii,
  5663. "vi": debug_table_vi,
  5664. "vii": debug_table_vii,
  5665. "viidi": debug_table_viidi,
  5666. "viifi": debug_table_viifi,
  5667. "viii": debug_table_viii,
  5668. "viiid": debug_table_viiid,
  5669. "viiii": debug_table_viiii,
  5670. "viiiifii": debug_table_viiiifii,
  5671. "viiiii": debug_table_viiiii,
  5672. "viiiiidd": debug_table_viiiiidd,
  5673. "viiiiiddi": debug_table_viiiiiddi,
  5674. "viiiiii": debug_table_viiiiii,
  5675. "viiiiiifi": debug_table_viiiiiifi,
  5676. "viiiiiii": debug_table_viiiiiii,
  5677. "viiiiiiii": debug_table_viiiiiiii,
  5678. "viiiiiiiid": debug_table_viiiiiiiid,
  5679. "viiiiiiiidi": debug_table_viiiiiiiidi,
  5680. "viiiiiiiii": debug_table_viiiiiiiii,
  5681. "viiiiiiiiii": debug_table_viiiiiiiiii,
  5682. "viiiiiiiiiii": debug_table_viiiiiiiiiii,
  5683. "viiiiiiiiiiii": debug_table_viiiiiiiiiiii,
  5684. "viiiiiiiiiiiiii": debug_table_viiiiiiiiiiiiii,
  5685. "viiijj": debug_table_viiijj
  5686. };
  5687. function nullFunc_dd(x) {
  5688. abortFnPtrError(x, "dd")
  5689. }
  5690. function nullFunc_did(x) {
  5691. abortFnPtrError(x, "did")
  5692. }
  5693. function nullFunc_didd(x) {
  5694. abortFnPtrError(x, "didd")
  5695. }
  5696. function nullFunc_fii(x) {
  5697. abortFnPtrError(x, "fii")
  5698. }
  5699. function nullFunc_fiii(x) {
  5700. abortFnPtrError(x, "fiii")
  5701. }
  5702. function nullFunc_ii(x) {
  5703. abortFnPtrError(x, "ii")
  5704. }
  5705. function nullFunc_iid(x) {
  5706. abortFnPtrError(x, "iid")
  5707. }
  5708. function nullFunc_iidiiii(x) {
  5709. abortFnPtrError(x, "iidiiii")
  5710. }
  5711. function nullFunc_iii(x) {
  5712. abortFnPtrError(x, "iii")
  5713. }
  5714. function nullFunc_iiii(x) {
  5715. abortFnPtrError(x, "iiii")
  5716. }
  5717. function nullFunc_iiiii(x) {
  5718. abortFnPtrError(x, "iiiii")
  5719. }
  5720. function nullFunc_iiiiii(x) {
  5721. abortFnPtrError(x, "iiiiii")
  5722. }
  5723. function nullFunc_iiiiiii(x) {
  5724. abortFnPtrError(x, "iiiiiii")
  5725. }
  5726. function nullFunc_iiiiiiidiiddii(x) {
  5727. abortFnPtrError(x, "iiiiiiidiiddii")
  5728. }
  5729. function nullFunc_iiiiiiii(x) {
  5730. abortFnPtrError(x, "iiiiiiii")
  5731. }
  5732. function nullFunc_iiiiiiiid(x) {
  5733. abortFnPtrError(x, "iiiiiiiid")
  5734. }
  5735. function nullFunc_iiiiij(x) {
  5736. abortFnPtrError(x, "iiiiij")
  5737. }
  5738. function nullFunc_iiiji(x) {
  5739. abortFnPtrError(x, "iiiji")
  5740. }
  5741. function nullFunc_iiijjji(x) {
  5742. abortFnPtrError(x, "iiijjji")
  5743. }
  5744. function nullFunc_jii(x) {
  5745. abortFnPtrError(x, "jii")
  5746. }
  5747. function nullFunc_jiiij(x) {
  5748. abortFnPtrError(x, "jiiij")
  5749. }
  5750. function nullFunc_jiiji(x) {
  5751. abortFnPtrError(x, "jiiji")
  5752. }
  5753. function nullFunc_jij(x) {
  5754. abortFnPtrError(x, "jij")
  5755. }
  5756. function nullFunc_jiji(x) {
  5757. abortFnPtrError(x, "jiji")
  5758. }
  5759. function nullFunc_v(x) {
  5760. abortFnPtrError(x, "v")
  5761. }
  5762. function nullFunc_vdiidiiiii(x) {
  5763. abortFnPtrError(x, "vdiidiiiii")
  5764. }
  5765. function nullFunc_vdiidiiiiii(x) {
  5766. abortFnPtrError(x, "vdiidiiiiii")
  5767. }
  5768. function nullFunc_vi(x) {
  5769. abortFnPtrError(x, "vi")
  5770. }
  5771. function nullFunc_vii(x) {
  5772. abortFnPtrError(x, "vii")
  5773. }
  5774. function nullFunc_viidi(x) {
  5775. abortFnPtrError(x, "viidi")
  5776. }
  5777. function nullFunc_viifi(x) {
  5778. abortFnPtrError(x, "viifi")
  5779. }
  5780. function nullFunc_viii(x) {
  5781. abortFnPtrError(x, "viii")
  5782. }
  5783. function nullFunc_viiid(x) {
  5784. abortFnPtrError(x, "viiid")
  5785. }
  5786. function nullFunc_viiii(x) {
  5787. abortFnPtrError(x, "viiii")
  5788. }
  5789. function nullFunc_viiiifii(x) {
  5790. abortFnPtrError(x, "viiiifii")
  5791. }
  5792. function nullFunc_viiiii(x) {
  5793. abortFnPtrError(x, "viiiii")
  5794. }
  5795. function nullFunc_viiiiidd(x) {
  5796. abortFnPtrError(x, "viiiiidd")
  5797. }
  5798. function nullFunc_viiiiiddi(x) {
  5799. abortFnPtrError(x, "viiiiiddi")
  5800. }
  5801. function nullFunc_viiiiii(x) {
  5802. abortFnPtrError(x, "viiiiii")
  5803. }
  5804. function nullFunc_viiiiiifi(x) {
  5805. abortFnPtrError(x, "viiiiiifi")
  5806. }
  5807. function nullFunc_viiiiiii(x) {
  5808. abortFnPtrError(x, "viiiiiii")
  5809. }
  5810. function nullFunc_viiiiiiii(x) {
  5811. abortFnPtrError(x, "viiiiiiii")
  5812. }
  5813. function nullFunc_viiiiiiiid(x) {
  5814. abortFnPtrError(x, "viiiiiiiid")
  5815. }
  5816. function nullFunc_viiiiiiiidi(x) {
  5817. abortFnPtrError(x, "viiiiiiiidi")
  5818. }
  5819. function nullFunc_viiiiiiiii(x) {
  5820. abortFnPtrError(x, "viiiiiiiii")
  5821. }
  5822. function nullFunc_viiiiiiiiii(x) {
  5823. abortFnPtrError(x, "viiiiiiiiii")
  5824. }
  5825. function nullFunc_viiiiiiiiiii(x) {
  5826. abortFnPtrError(x, "viiiiiiiiiii")
  5827. }
  5828. function nullFunc_viiiiiiiiiiii(x) {
  5829. abortFnPtrError(x, "viiiiiiiiiiii")
  5830. }
  5831. function nullFunc_viiiiiiiiiiiiii(x) {
  5832. abortFnPtrError(x, "viiiiiiiiiiiiii")
  5833. }
  5834. function nullFunc_viiijj(x) {
  5835. abortFnPtrError(x, "viiijj")
  5836. }
  5837. function jsCall_dd(index, a1) {
  5838. return functionPointers[index](a1)
  5839. }
  5840. function jsCall_did(index, a1, a2) {
  5841. return functionPointers[index](a1, a2)
  5842. }
  5843. function jsCall_didd(index, a1, a2, a3) {
  5844. return functionPointers[index](a1, a2, a3)
  5845. }
  5846. function jsCall_fii(index, a1, a2) {
  5847. return functionPointers[index](a1, a2)
  5848. }
  5849. function jsCall_fiii(index, a1, a2, a3) {
  5850. return functionPointers[index](a1, a2, a3)
  5851. }
  5852. function jsCall_ii(index, a1) {
  5853. return functionPointers[index](a1)
  5854. }
  5855. function jsCall_iid(index, a1, a2) {
  5856. return functionPointers[index](a1, a2)
  5857. }
  5858. function jsCall_iidiiii(index, a1, a2, a3, a4, a5, a6) {
  5859. return functionPointers[index](a1, a2, a3, a4, a5, a6)
  5860. }
  5861. function jsCall_iii(index, a1, a2) {
  5862. return functionPointers[index](a1, a2)
  5863. }
  5864. function jsCall_iiii(index, a1, a2, a3) {
  5865. return functionPointers[index](a1, a2, a3)
  5866. }
  5867. function jsCall_iiiii(index, a1, a2, a3, a4) {
  5868. return functionPointers[index](a1, a2, a3, a4)
  5869. }
  5870. function jsCall_iiiiii(index, a1, a2, a3, a4, a5) {
  5871. return functionPointers[index](a1, a2, a3, a4, a5)
  5872. }
  5873. function jsCall_iiiiiii(index, a1, a2, a3, a4, a5, a6) {
  5874. return functionPointers[index](a1, a2, a3, a4, a5, a6)
  5875. }
  5876. function jsCall_iiiiiiidiiddii(index, a1, a2, a3, a4, a5, a6, a7, a8, a9, a10, a11, a12, a13) {
  5877. return functionPointers[index](a1, a2, a3, a4, a5, a6, a7, a8, a9, a10, a11, a12, a13)
  5878. }
  5879. function jsCall_iiiiiiii(index, a1, a2, a3, a4, a5, a6, a7) {
  5880. return functionPointers[index](a1, a2, a3, a4, a5, a6, a7)
  5881. }
  5882. function jsCall_iiiiiiiid(index, a1, a2, a3, a4, a5, a6, a7, a8) {
  5883. return functionPointers[index](a1, a2, a3, a4, a5, a6, a7, a8)
  5884. }
  5885. function jsCall_iiiiij(index, a1, a2, a3, a4, a5) {
  5886. return functionPointers[index](a1, a2, a3, a4, a5)
  5887. }
  5888. function jsCall_iiiji(index, a1, a2, a3, a4) {
  5889. return functionPointers[index](a1, a2, a3, a4)
  5890. }
  5891. function jsCall_iiijjji(index, a1, a2, a3, a4, a5, a6) {
  5892. return functionPointers[index](a1, a2, a3, a4, a5, a6)
  5893. }
  5894. function jsCall_jii(index, a1, a2) {
  5895. return functionPointers[index](a1, a2)
  5896. }
  5897. function jsCall_jiiij(index, a1, a2, a3, a4) {
  5898. return functionPointers[index](a1, a2, a3, a4)
  5899. }
  5900. function jsCall_jiiji(index, a1, a2, a3, a4) {
  5901. return functionPointers[index](a1, a2, a3, a4)
  5902. }
  5903. function jsCall_jij(index, a1, a2) {
  5904. return functionPointers[index](a1, a2)
  5905. }
  5906. function jsCall_jiji(index, a1, a2, a3) {
  5907. return functionPointers[index](a1, a2, a3)
  5908. }
  5909. function jsCall_v(index) {
  5910. functionPointers[index]()
  5911. }
  5912. function jsCall_vdiidiiiii(index, a1, a2, a3, a4, a5, a6, a7, a8, a9) {
  5913. functionPointers[index](a1, a2, a3, a4, a5, a6, a7, a8, a9)
  5914. }
  5915. function jsCall_vdiidiiiiii(index, a1, a2, a3, a4, a5, a6, a7, a8, a9, a10) {
  5916. functionPointers[index](a1, a2, a3, a4, a5, a6, a7, a8, a9, a10)
  5917. }
  5918. function jsCall_vi(index, a1) {
  5919. functionPointers[index](a1)
  5920. }
  5921. function jsCall_vii(index, a1, a2) {
  5922. functionPointers[index](a1, a2)
  5923. }
  5924. function jsCall_viidi(index, a1, a2, a3, a4) {
  5925. functionPointers[index](a1, a2, a3, a4)
  5926. }
  5927. function jsCall_viifi(index, a1, a2, a3, a4) {
  5928. functionPointers[index](a1, a2, a3, a4)
  5929. }
  5930. function jsCall_viii(index, a1, a2, a3) {
  5931. functionPointers[index](a1, a2, a3)
  5932. }
  5933. function jsCall_viiid(index, a1, a2, a3, a4) {
  5934. functionPointers[index](a1, a2, a3, a4)
  5935. }
  5936. function jsCall_viiii(index, a1, a2, a3, a4) {
  5937. functionPointers[index](a1, a2, a3, a4)
  5938. }
  5939. function jsCall_viiiifii(index, a1, a2, a3, a4, a5, a6, a7) {
  5940. functionPointers[index](a1, a2, a3, a4, a5, a6, a7)
  5941. }
  5942. function jsCall_viiiii(index, a1, a2, a3, a4, a5) {
  5943. functionPointers[index](a1, a2, a3, a4, a5)
  5944. }
  5945. function jsCall_viiiiidd(index, a1, a2, a3, a4, a5, a6, a7) {
  5946. functionPointers[index](a1, a2, a3, a4, a5, a6, a7)
  5947. }
  5948. function jsCall_viiiiiddi(index, a1, a2, a3, a4, a5, a6, a7, a8) {
  5949. functionPointers[index](a1, a2, a3, a4, a5, a6, a7, a8)
  5950. }
  5951. function jsCall_viiiiii(index, a1, a2, a3, a4, a5, a6) {
  5952. functionPointers[index](a1, a2, a3, a4, a5, a6)
  5953. }
  5954. function jsCall_viiiiiifi(index, a1, a2, a3, a4, a5, a6, a7, a8) {
  5955. functionPointers[index](a1, a2, a3, a4, a5, a6, a7, a8)
  5956. }
  5957. function jsCall_viiiiiii(index, a1, a2, a3, a4, a5, a6, a7) {
  5958. functionPointers[index](a1, a2, a3, a4, a5, a6, a7)
  5959. }
  5960. function jsCall_viiiiiiii(index, a1, a2, a3, a4, a5, a6, a7, a8) {
  5961. functionPointers[index](a1, a2, a3, a4, a5, a6, a7, a8)
  5962. }
  5963. function jsCall_viiiiiiiid(index, a1, a2, a3, a4, a5, a6, a7, a8, a9) {
  5964. functionPointers[index](a1, a2, a3, a4, a5, a6, a7, a8, a9)
  5965. }
  5966. function jsCall_viiiiiiiidi(index, a1, a2, a3, a4, a5, a6, a7, a8, a9, a10) {
  5967. functionPointers[index](a1, a2, a3, a4, a5, a6, a7, a8, a9, a10)
  5968. }
  5969. function jsCall_viiiiiiiii(index, a1, a2, a3, a4, a5, a6, a7, a8, a9) {
  5970. functionPointers[index](a1, a2, a3, a4, a5, a6, a7, a8, a9)
  5971. }
  5972. function jsCall_viiiiiiiiii(index, a1, a2, a3, a4, a5, a6, a7, a8, a9, a10) {
  5973. functionPointers[index](a1, a2, a3, a4, a5, a6, a7, a8, a9, a10)
  5974. }
  5975. function jsCall_viiiiiiiiiii(index, a1, a2, a3, a4, a5, a6, a7, a8, a9, a10, a11) {
  5976. functionPointers[index](a1, a2, a3, a4, a5, a6, a7, a8, a9, a10, a11)
  5977. }
  5978. function jsCall_viiiiiiiiiiii(index, a1, a2, a3, a4, a5, a6, a7, a8, a9, a10, a11, a12) {
  5979. functionPointers[index](a1, a2, a3, a4, a5, a6, a7, a8, a9, a10, a11, a12)
  5980. }
  5981. function jsCall_viiiiiiiiiiiiii(index, a1, a2, a3, a4, a5, a6, a7, a8, a9, a10, a11, a12, a13, a14) {
  5982. functionPointers[index](a1, a2, a3, a4, a5, a6, a7, a8, a9, a10, a11, a12, a13, a14)
  5983. }
  5984. function jsCall_viiijj(index, a1, a2, a3, a4, a5) {
  5985. functionPointers[index](a1, a2, a3, a4, a5)
  5986. }
  5987. var asmGlobalArg = {};
  5988. var asmLibraryArg = {
  5989. "___buildEnvironment": ___buildEnvironment,
  5990. "___lock": ___lock,
  5991. "___syscall221": ___syscall221,
  5992. "___syscall3": ___syscall3,
  5993. "___syscall5": ___syscall5,
  5994. "___unlock": ___unlock,
  5995. "___wasi_fd_close": ___wasi_fd_close,
  5996. "___wasi_fd_fdstat_get": ___wasi_fd_fdstat_get,
  5997. "___wasi_fd_seek": ___wasi_fd_seek,
  5998. "___wasi_fd_write": ___wasi_fd_write,
  5999. "__emscripten_fetch_free": __emscripten_fetch_free,
  6000. "__memory_base": 1024,
  6001. "__table_base": 0,
  6002. "_abort": _abort,
  6003. "_clock": _clock,
  6004. "_clock_gettime": _clock_gettime,
  6005. "_emscripten_asm_const_i": _emscripten_asm_const_i,
  6006. "_emscripten_get_heap_size": _emscripten_get_heap_size,
  6007. "_emscripten_is_main_browser_thread": _emscripten_is_main_browser_thread,
  6008. "_emscripten_memcpy_big": _emscripten_memcpy_big,
  6009. "_emscripten_resize_heap": _emscripten_resize_heap,
  6010. "_emscripten_start_fetch": _emscripten_start_fetch,
  6011. "_fabs": _fabs,
  6012. "_getenv": _getenv,
  6013. "_gettimeofday": _gettimeofday,
  6014. "_gmtime_r": _gmtime_r,
  6015. "_llvm_exp2_f64": _llvm_exp2_f64,
  6016. "_llvm_log2_f32": _llvm_log2_f32,
  6017. "_llvm_stackrestore": _llvm_stackrestore,
  6018. "_llvm_stacksave": _llvm_stacksave,
  6019. "_llvm_trunc_f64": _llvm_trunc_f64,
  6020. "_localtime_r": _localtime_r,
  6021. "_nanosleep": _nanosleep,
  6022. "_pthread_cond_destroy": _pthread_cond_destroy,
  6023. "_pthread_cond_init": _pthread_cond_init,
  6024. "_pthread_create": _pthread_create,
  6025. "_pthread_join": _pthread_join,
  6026. "_strftime": _strftime,
  6027. "_sysconf": _sysconf,
  6028. "_time": _time,
  6029. "abortStackOverflow": abortStackOverflow,
  6030. "getTempRet0": getTempRet0,
  6031. "jsCall_dd": jsCall_dd,
  6032. "jsCall_did": jsCall_did,
  6033. "jsCall_didd": jsCall_didd,
  6034. "jsCall_fii": jsCall_fii,
  6035. "jsCall_fiii": jsCall_fiii,
  6036. "jsCall_ii": jsCall_ii,
  6037. "jsCall_iid": jsCall_iid,
  6038. "jsCall_iidiiii": jsCall_iidiiii,
  6039. "jsCall_iii": jsCall_iii,
  6040. "jsCall_iiii": jsCall_iiii,
  6041. "jsCall_iiiii": jsCall_iiiii,
  6042. "jsCall_iiiiii": jsCall_iiiiii,
  6043. "jsCall_iiiiiii": jsCall_iiiiiii,
  6044. "jsCall_iiiiiiidiiddii": jsCall_iiiiiiidiiddii,
  6045. "jsCall_iiiiiiii": jsCall_iiiiiiii,
  6046. "jsCall_iiiiiiiid": jsCall_iiiiiiiid,
  6047. "jsCall_iiiiij": jsCall_iiiiij,
  6048. "jsCall_iiiji": jsCall_iiiji,
  6049. "jsCall_iiijjji": jsCall_iiijjji,
  6050. "jsCall_jii": jsCall_jii,
  6051. "jsCall_jiiij": jsCall_jiiij,
  6052. "jsCall_jiiji": jsCall_jiiji,
  6053. "jsCall_jij": jsCall_jij,
  6054. "jsCall_jiji": jsCall_jiji,
  6055. "jsCall_v": jsCall_v,
  6056. "jsCall_vdiidiiiii": jsCall_vdiidiiiii,
  6057. "jsCall_vdiidiiiiii": jsCall_vdiidiiiiii,
  6058. "jsCall_vi": jsCall_vi,
  6059. "jsCall_vii": jsCall_vii,
  6060. "jsCall_viidi": jsCall_viidi,
  6061. "jsCall_viifi": jsCall_viifi,
  6062. "jsCall_viii": jsCall_viii,
  6063. "jsCall_viiid": jsCall_viiid,
  6064. "jsCall_viiii": jsCall_viiii,
  6065. "jsCall_viiiifii": jsCall_viiiifii,
  6066. "jsCall_viiiii": jsCall_viiiii,
  6067. "jsCall_viiiiidd": jsCall_viiiiidd,
  6068. "jsCall_viiiiiddi": jsCall_viiiiiddi,
  6069. "jsCall_viiiiii": jsCall_viiiiii,
  6070. "jsCall_viiiiiifi": jsCall_viiiiiifi,
  6071. "jsCall_viiiiiii": jsCall_viiiiiii,
  6072. "jsCall_viiiiiiii": jsCall_viiiiiiii,
  6073. "jsCall_viiiiiiiid": jsCall_viiiiiiiid,
  6074. "jsCall_viiiiiiiidi": jsCall_viiiiiiiidi,
  6075. "jsCall_viiiiiiiii": jsCall_viiiiiiiii,
  6076. "jsCall_viiiiiiiiii": jsCall_viiiiiiiiii,
  6077. "jsCall_viiiiiiiiiii": jsCall_viiiiiiiiiii,
  6078. "jsCall_viiiiiiiiiiii": jsCall_viiiiiiiiiiii,
  6079. "jsCall_viiiiiiiiiiiiii": jsCall_viiiiiiiiiiiiii,
  6080. "jsCall_viiijj": jsCall_viiijj,
  6081. "memory": wasmMemory,
  6082. "nullFunc_dd": nullFunc_dd,
  6083. "nullFunc_did": nullFunc_did,
  6084. "nullFunc_didd": nullFunc_didd,
  6085. "nullFunc_fii": nullFunc_fii,
  6086. "nullFunc_fiii": nullFunc_fiii,
  6087. "nullFunc_ii": nullFunc_ii,
  6088. "nullFunc_iid": nullFunc_iid,
  6089. "nullFunc_iidiiii": nullFunc_iidiiii,
  6090. "nullFunc_iii": nullFunc_iii,
  6091. "nullFunc_iiii": nullFunc_iiii,
  6092. "nullFunc_iiiii": nullFunc_iiiii,
  6093. "nullFunc_iiiiii": nullFunc_iiiiii,
  6094. "nullFunc_iiiiiii": nullFunc_iiiiiii,
  6095. "nullFunc_iiiiiiidiiddii": nullFunc_iiiiiiidiiddii,
  6096. "nullFunc_iiiiiiii": nullFunc_iiiiiiii,
  6097. "nullFunc_iiiiiiiid": nullFunc_iiiiiiiid,
  6098. "nullFunc_iiiiij": nullFunc_iiiiij,
  6099. "nullFunc_iiiji": nullFunc_iiiji,
  6100. "nullFunc_iiijjji": nullFunc_iiijjji,
  6101. "nullFunc_jii": nullFunc_jii,
  6102. "nullFunc_jiiij": nullFunc_jiiij,
  6103. "nullFunc_jiiji": nullFunc_jiiji,
  6104. "nullFunc_jij": nullFunc_jij,
  6105. "nullFunc_jiji": nullFunc_jiji,
  6106. "nullFunc_v": nullFunc_v,
  6107. "nullFunc_vdiidiiiii": nullFunc_vdiidiiiii,
  6108. "nullFunc_vdiidiiiiii": nullFunc_vdiidiiiiii,
  6109. "nullFunc_vi": nullFunc_vi,
  6110. "nullFunc_vii": nullFunc_vii,
  6111. "nullFunc_viidi": nullFunc_viidi,
  6112. "nullFunc_viifi": nullFunc_viifi,
  6113. "nullFunc_viii": nullFunc_viii,
  6114. "nullFunc_viiid": nullFunc_viiid,
  6115. "nullFunc_viiii": nullFunc_viiii,
  6116. "nullFunc_viiiifii": nullFunc_viiiifii,
  6117. "nullFunc_viiiii": nullFunc_viiiii,
  6118. "nullFunc_viiiiidd": nullFunc_viiiiidd,
  6119. "nullFunc_viiiiiddi": nullFunc_viiiiiddi,
  6120. "nullFunc_viiiiii": nullFunc_viiiiii,
  6121. "nullFunc_viiiiiifi": nullFunc_viiiiiifi,
  6122. "nullFunc_viiiiiii": nullFunc_viiiiiii,
  6123. "nullFunc_viiiiiiii": nullFunc_viiiiiiii,
  6124. "nullFunc_viiiiiiiid": nullFunc_viiiiiiiid,
  6125. "nullFunc_viiiiiiiidi": nullFunc_viiiiiiiidi,
  6126. "nullFunc_viiiiiiiii": nullFunc_viiiiiiiii,
  6127. "nullFunc_viiiiiiiiii": nullFunc_viiiiiiiiii,
  6128. "nullFunc_viiiiiiiiiii": nullFunc_viiiiiiiiiii,
  6129. "nullFunc_viiiiiiiiiiii": nullFunc_viiiiiiiiiiii,
  6130. "nullFunc_viiiiiiiiiiiiii": nullFunc_viiiiiiiiiiiiii,
  6131. "nullFunc_viiijj": nullFunc_viiijj,
  6132. "table": wasmTable
  6133. };
  6134. var asm = Module["asm"](asmGlobalArg, asmLibraryArg, buffer);
  6135. Module["asm"] = asm;
  6136. var _AVPlayerInit = Module["_AVPlayerInit"] = function() {
  6137. assert(runtimeInitialized, "you need to wait for the runtime to be ready (e.g. wait for main() to be called)");
  6138. assert(!runtimeExited, "the runtime was exited (use NO_EXIT_RUNTIME to keep it alive after main() exits)");
  6139. return Module["asm"]["_AVPlayerInit"].apply(null, arguments)
  6140. };
  6141. var _AVSniffHttpFlvInit = Module["_AVSniffHttpFlvInit"] = function() {
  6142. assert(runtimeInitialized, "you need to wait for the runtime to be ready (e.g. wait for main() to be called)");
  6143. assert(!runtimeExited, "the runtime was exited (use NO_EXIT_RUNTIME to keep it alive after main() exits)");
  6144. return Module["asm"]["_AVSniffHttpFlvInit"].apply(null, arguments)
  6145. };
  6146. var _AVSniffHttpG711Init = Module["_AVSniffHttpG711Init"] = function() {
  6147. assert(runtimeInitialized, "you need to wait for the runtime to be ready (e.g. wait for main() to be called)");
  6148. assert(!runtimeExited, "the runtime was exited (use NO_EXIT_RUNTIME to keep it alive after main() exits)");
  6149. return Module["asm"]["_AVSniffHttpG711Init"].apply(null, arguments)
  6150. };
  6151. var _AVSniffStreamInit = Module["_AVSniffStreamInit"] = function() {
  6152. assert(runtimeInitialized, "you need to wait for the runtime to be ready (e.g. wait for main() to be called)");
  6153. assert(!runtimeExited, "the runtime was exited (use NO_EXIT_RUNTIME to keep it alive after main() exits)");
  6154. return Module["asm"]["_AVSniffStreamInit"].apply(null, arguments)
  6155. };
  6156. var ___emscripten_environ_constructor = Module["___emscripten_environ_constructor"] = function() {
  6157. assert(runtimeInitialized, "you need to wait for the runtime to be ready (e.g. wait for main() to be called)");
  6158. assert(!runtimeExited, "the runtime was exited (use NO_EXIT_RUNTIME to keep it alive after main() exits)");
  6159. return Module["asm"]["___emscripten_environ_constructor"].apply(null, arguments)
  6160. };
  6161. var ___errno_location = Module["___errno_location"] = function() {
  6162. assert(runtimeInitialized, "you need to wait for the runtime to be ready (e.g. wait for main() to be called)");
  6163. assert(!runtimeExited, "the runtime was exited (use NO_EXIT_RUNTIME to keep it alive after main() exits)");
  6164. return Module["asm"]["___errno_location"].apply(null, arguments)
  6165. };
  6166. var __get_daylight = Module["__get_daylight"] = function() {
  6167. assert(runtimeInitialized, "you need to wait for the runtime to be ready (e.g. wait for main() to be called)");
  6168. assert(!runtimeExited, "the runtime was exited (use NO_EXIT_RUNTIME to keep it alive after main() exits)");
  6169. return Module["asm"]["__get_daylight"].apply(null, arguments)
  6170. };
  6171. var __get_timezone = Module["__get_timezone"] = function() {
  6172. assert(runtimeInitialized, "you need to wait for the runtime to be ready (e.g. wait for main() to be called)");
  6173. assert(!runtimeExited, "the runtime was exited (use NO_EXIT_RUNTIME to keep it alive after main() exits)");
  6174. return Module["asm"]["__get_timezone"].apply(null, arguments)
  6175. };
  6176. var __get_tzname = Module["__get_tzname"] = function() {
  6177. assert(runtimeInitialized, "you need to wait for the runtime to be ready (e.g. wait for main() to be called)");
  6178. assert(!runtimeExited, "the runtime was exited (use NO_EXIT_RUNTIME to keep it alive after main() exits)");
  6179. return Module["asm"]["__get_tzname"].apply(null, arguments)
  6180. };
  6181. var _closeVideo = Module["_closeVideo"] = function() {
  6182. assert(runtimeInitialized, "you need to wait for the runtime to be ready (e.g. wait for main() to be called)");
  6183. assert(!runtimeExited, "the runtime was exited (use NO_EXIT_RUNTIME to keep it alive after main() exits)");
  6184. return Module["asm"]["_closeVideo"].apply(null, arguments)
  6185. };
  6186. var _decodeCodecContext = Module["_decodeCodecContext"] = function() {
  6187. assert(runtimeInitialized, "you need to wait for the runtime to be ready (e.g. wait for main() to be called)");
  6188. assert(!runtimeExited, "the runtime was exited (use NO_EXIT_RUNTIME to keep it alive after main() exits)");
  6189. return Module["asm"]["_decodeCodecContext"].apply(null, arguments)
  6190. };
  6191. var _decodeG711Frame = Module["_decodeG711Frame"] = function() {
  6192. assert(runtimeInitialized, "you need to wait for the runtime to be ready (e.g. wait for main() to be called)");
  6193. assert(!runtimeExited, "the runtime was exited (use NO_EXIT_RUNTIME to keep it alive after main() exits)");
  6194. return Module["asm"]["_decodeG711Frame"].apply(null, arguments)
  6195. };
  6196. var _decodeHttpFlvVideoFrame = Module["_decodeHttpFlvVideoFrame"] = function() {
  6197. assert(runtimeInitialized, "you need to wait for the runtime to be ready (e.g. wait for main() to be called)");
  6198. assert(!runtimeExited, "the runtime was exited (use NO_EXIT_RUNTIME to keep it alive after main() exits)");
  6199. return Module["asm"]["_decodeHttpFlvVideoFrame"].apply(null, arguments)
  6200. };
  6201. var _decodeVideoFrame = Module["_decodeVideoFrame"] = function() {
  6202. assert(runtimeInitialized, "you need to wait for the runtime to be ready (e.g. wait for main() to be called)");
  6203. assert(!runtimeExited, "the runtime was exited (use NO_EXIT_RUNTIME to keep it alive after main() exits)");
  6204. return Module["asm"]["_decodeVideoFrame"].apply(null, arguments)
  6205. };
  6206. var _demuxBox = Module["_demuxBox"] = function() {
  6207. assert(runtimeInitialized, "you need to wait for the runtime to be ready (e.g. wait for main() to be called)");
  6208. assert(!runtimeExited, "the runtime was exited (use NO_EXIT_RUNTIME to keep it alive after main() exits)");
  6209. return Module["asm"]["_demuxBox"].apply(null, arguments)
  6210. };
  6211. var _exitMissile = Module["_exitMissile"] = function() {
  6212. assert(runtimeInitialized, "you need to wait for the runtime to be ready (e.g. wait for main() to be called)");
  6213. assert(!runtimeExited, "the runtime was exited (use NO_EXIT_RUNTIME to keep it alive after main() exits)");
  6214. return Module["asm"]["_exitMissile"].apply(null, arguments)
  6215. };
  6216. var _exitTsMissile = Module["_exitTsMissile"] = function() {
  6217. assert(runtimeInitialized, "you need to wait for the runtime to be ready (e.g. wait for main() to be called)");
  6218. assert(!runtimeExited, "the runtime was exited (use NO_EXIT_RUNTIME to keep it alive after main() exits)");
  6219. return Module["asm"]["_exitTsMissile"].apply(null, arguments)
  6220. };
  6221. var _fflush = Module["_fflush"] = function() {
  6222. assert(runtimeInitialized, "you need to wait for the runtime to be ready (e.g. wait for main() to be called)");
  6223. assert(!runtimeExited, "the runtime was exited (use NO_EXIT_RUNTIME to keep it alive after main() exits)");
  6224. return Module["asm"]["_fflush"].apply(null, arguments)
  6225. };
  6226. var _free = Module["_free"] = function() {
  6227. assert(runtimeInitialized, "you need to wait for the runtime to be ready (e.g. wait for main() to be called)");
  6228. assert(!runtimeExited, "the runtime was exited (use NO_EXIT_RUNTIME to keep it alive after main() exits)");
  6229. return Module["asm"]["_free"].apply(null, arguments)
  6230. };
  6231. var _getAudioCodecID = Module["_getAudioCodecID"] = function() {
  6232. assert(runtimeInitialized, "you need to wait for the runtime to be ready (e.g. wait for main() to be called)");
  6233. assert(!runtimeExited, "the runtime was exited (use NO_EXIT_RUNTIME to keep it alive after main() exits)");
  6234. return Module["asm"]["_getAudioCodecID"].apply(null, arguments)
  6235. };
  6236. var _getBufferLengthApi = Module["_getBufferLengthApi"] = function() {
  6237. assert(runtimeInitialized, "you need to wait for the runtime to be ready (e.g. wait for main() to be called)");
  6238. assert(!runtimeExited, "the runtime was exited (use NO_EXIT_RUNTIME to keep it alive after main() exits)");
  6239. return Module["asm"]["_getBufferLengthApi"].apply(null, arguments)
  6240. };
  6241. var _getExtensionInfo = Module["_getExtensionInfo"] = function() {
  6242. assert(runtimeInitialized, "you need to wait for the runtime to be ready (e.g. wait for main() to be called)");
  6243. assert(!runtimeExited, "the runtime was exited (use NO_EXIT_RUNTIME to keep it alive after main() exits)");
  6244. return Module["asm"]["_getExtensionInfo"].apply(null, arguments)
  6245. };
  6246. var _getG711BufferLengthApi = Module["_getG711BufferLengthApi"] = function() {
  6247. assert(runtimeInitialized, "you need to wait for the runtime to be ready (e.g. wait for main() to be called)");
  6248. assert(!runtimeExited, "the runtime was exited (use NO_EXIT_RUNTIME to keep it alive after main() exits)");
  6249. return Module["asm"]["_getG711BufferLengthApi"].apply(null, arguments)
  6250. };
  6251. var _getMediaInfo = Module["_getMediaInfo"] = function() {
  6252. assert(runtimeInitialized, "you need to wait for the runtime to be ready (e.g. wait for main() to be called)");
  6253. assert(!runtimeExited, "the runtime was exited (use NO_EXIT_RUNTIME to keep it alive after main() exits)");
  6254. return Module["asm"]["_getMediaInfo"].apply(null, arguments)
  6255. };
  6256. var _getPPS = Module["_getPPS"] = function() {
  6257. assert(runtimeInitialized, "you need to wait for the runtime to be ready (e.g. wait for main() to be called)");
  6258. assert(!runtimeExited, "the runtime was exited (use NO_EXIT_RUNTIME to keep it alive after main() exits)");
  6259. return Module["asm"]["_getPPS"].apply(null, arguments)
  6260. };
  6261. var _getPPSLen = Module["_getPPSLen"] = function() {
  6262. assert(runtimeInitialized, "you need to wait for the runtime to be ready (e.g. wait for main() to be called)");
  6263. assert(!runtimeExited, "the runtime was exited (use NO_EXIT_RUNTIME to keep it alive after main() exits)");
  6264. return Module["asm"]["_getPPSLen"].apply(null, arguments)
  6265. };
  6266. var _getPacket = Module["_getPacket"] = function() {
  6267. assert(runtimeInitialized, "you need to wait for the runtime to be ready (e.g. wait for main() to be called)");
  6268. assert(!runtimeExited, "the runtime was exited (use NO_EXIT_RUNTIME to keep it alive after main() exits)");
  6269. return Module["asm"]["_getPacket"].apply(null, arguments)
  6270. };
  6271. var _getSEI = Module["_getSEI"] = function() {
  6272. assert(runtimeInitialized, "you need to wait for the runtime to be ready (e.g. wait for main() to be called)");
  6273. assert(!runtimeExited, "the runtime was exited (use NO_EXIT_RUNTIME to keep it alive after main() exits)");
  6274. return Module["asm"]["_getSEI"].apply(null, arguments)
  6275. };
  6276. var _getSEILen = Module["_getSEILen"] = function() {
  6277. assert(runtimeInitialized, "you need to wait for the runtime to be ready (e.g. wait for main() to be called)");
  6278. assert(!runtimeExited, "the runtime was exited (use NO_EXIT_RUNTIME to keep it alive after main() exits)");
  6279. return Module["asm"]["_getSEILen"].apply(null, arguments)
  6280. };
  6281. var _getSPS = Module["_getSPS"] = function() {
  6282. assert(runtimeInitialized, "you need to wait for the runtime to be ready (e.g. wait for main() to be called)");
  6283. assert(!runtimeExited, "the runtime was exited (use NO_EXIT_RUNTIME to keep it alive after main() exits)");
  6284. return Module["asm"]["_getSPS"].apply(null, arguments)
  6285. };
  6286. var _getSPSLen = Module["_getSPSLen"] = function() {
  6287. assert(runtimeInitialized, "you need to wait for the runtime to be ready (e.g. wait for main() to be called)");
  6288. assert(!runtimeExited, "the runtime was exited (use NO_EXIT_RUNTIME to keep it alive after main() exits)");
  6289. return Module["asm"]["_getSPSLen"].apply(null, arguments)
  6290. };
  6291. var _getSniffHttpFlvPkg = Module["_getSniffHttpFlvPkg"] = function() {
  6292. assert(runtimeInitialized, "you need to wait for the runtime to be ready (e.g. wait for main() to be called)");
  6293. assert(!runtimeExited, "the runtime was exited (use NO_EXIT_RUNTIME to keep it alive after main() exits)");
  6294. return Module["asm"]["_getSniffHttpFlvPkg"].apply(null, arguments)
  6295. };
  6296. var _getSniffHttpFlvPkgNoCheckProbe = Module["_getSniffHttpFlvPkgNoCheckProbe"] = function() {
  6297. assert(runtimeInitialized, "you need to wait for the runtime to be ready (e.g. wait for main() to be called)");
  6298. assert(!runtimeExited, "the runtime was exited (use NO_EXIT_RUNTIME to keep it alive after main() exits)");
  6299. return Module["asm"]["_getSniffHttpFlvPkgNoCheckProbe"].apply(null, arguments)
  6300. };
  6301. var _getSniffStreamPkg = Module["_getSniffStreamPkg"] = function() {
  6302. assert(runtimeInitialized, "you need to wait for the runtime to be ready (e.g. wait for main() to be called)");
  6303. assert(!runtimeExited, "the runtime was exited (use NO_EXIT_RUNTIME to keep it alive after main() exits)");
  6304. return Module["asm"]["_getSniffStreamPkg"].apply(null, arguments)
  6305. };
  6306. var _getSniffStreamPkgNoCheckProbe = Module["_getSniffStreamPkgNoCheckProbe"] = function() {
  6307. assert(runtimeInitialized, "you need to wait for the runtime to be ready (e.g. wait for main() to be called)");
  6308. assert(!runtimeExited, "the runtime was exited (use NO_EXIT_RUNTIME to keep it alive after main() exits)");
  6309. return Module["asm"]["_getSniffStreamPkgNoCheckProbe"].apply(null, arguments)
  6310. };
  6311. var _getVLC = Module["_getVLC"] = function() {
  6312. assert(runtimeInitialized, "you need to wait for the runtime to be ready (e.g. wait for main() to be called)");
  6313. assert(!runtimeExited, "the runtime was exited (use NO_EXIT_RUNTIME to keep it alive after main() exits)");
  6314. return Module["asm"]["_getVLC"].apply(null, arguments)
  6315. };
  6316. var _getVLCLen = Module["_getVLCLen"] = function() {
  6317. assert(runtimeInitialized, "you need to wait for the runtime to be ready (e.g. wait for main() to be called)");
  6318. assert(!runtimeExited, "the runtime was exited (use NO_EXIT_RUNTIME to keep it alive after main() exits)");
  6319. return Module["asm"]["_getVLCLen"].apply(null, arguments)
  6320. };
  6321. var _getVPS = Module["_getVPS"] = function() {
  6322. assert(runtimeInitialized, "you need to wait for the runtime to be ready (e.g. wait for main() to be called)");
  6323. assert(!runtimeExited, "the runtime was exited (use NO_EXIT_RUNTIME to keep it alive after main() exits)");
  6324. return Module["asm"]["_getVPS"].apply(null, arguments)
  6325. };
  6326. var _getVPSLen = Module["_getVPSLen"] = function() {
  6327. assert(runtimeInitialized, "you need to wait for the runtime to be ready (e.g. wait for main() to be called)");
  6328. assert(!runtimeExited, "the runtime was exited (use NO_EXIT_RUNTIME to keep it alive after main() exits)");
  6329. return Module["asm"]["_getVPSLen"].apply(null, arguments)
  6330. };
  6331. var _getVideoCodecID = Module["_getVideoCodecID"] = function() {
  6332. assert(runtimeInitialized, "you need to wait for the runtime to be ready (e.g. wait for main() to be called)");
  6333. assert(!runtimeExited, "the runtime was exited (use NO_EXIT_RUNTIME to keep it alive after main() exits)");
  6334. return Module["asm"]["_getVideoCodecID"].apply(null, arguments)
  6335. };
  6336. var _initTsMissile = Module["_initTsMissile"] = function() {
  6337. assert(runtimeInitialized, "you need to wait for the runtime to be ready (e.g. wait for main() to be called)");
  6338. assert(!runtimeExited, "the runtime was exited (use NO_EXIT_RUNTIME to keep it alive after main() exits)");
  6339. return Module["asm"]["_initTsMissile"].apply(null, arguments)
  6340. };
  6341. var _initializeDecoder = Module["_initializeDecoder"] = function() {
  6342. assert(runtimeInitialized, "you need to wait for the runtime to be ready (e.g. wait for main() to be called)");
  6343. assert(!runtimeExited, "the runtime was exited (use NO_EXIT_RUNTIME to keep it alive after main() exits)");
  6344. return Module["asm"]["_initializeDecoder"].apply(null, arguments)
  6345. };
  6346. var _initializeDemuxer = Module["_initializeDemuxer"] = function() {
  6347. assert(runtimeInitialized, "you need to wait for the runtime to be ready (e.g. wait for main() to be called)");
  6348. assert(!runtimeExited, "the runtime was exited (use NO_EXIT_RUNTIME to keep it alive after main() exits)");
  6349. return Module["asm"]["_initializeDemuxer"].apply(null, arguments)
  6350. };
  6351. var _initializeSniffG711Module = Module["_initializeSniffG711Module"] = function() {
  6352. assert(runtimeInitialized, "you need to wait for the runtime to be ready (e.g. wait for main() to be called)");
  6353. assert(!runtimeExited, "the runtime was exited (use NO_EXIT_RUNTIME to keep it alive after main() exits)");
  6354. return Module["asm"]["_initializeSniffG711Module"].apply(null, arguments)
  6355. };
  6356. var _initializeSniffHttpFlvModule = Module["_initializeSniffHttpFlvModule"] = function() {
  6357. assert(runtimeInitialized, "you need to wait for the runtime to be ready (e.g. wait for main() to be called)");
  6358. assert(!runtimeExited, "the runtime was exited (use NO_EXIT_RUNTIME to keep it alive after main() exits)");
  6359. return Module["asm"]["_initializeSniffHttpFlvModule"].apply(null, arguments)
  6360. };
  6361. var _initializeSniffHttpFlvModuleWithAOpt = Module["_initializeSniffHttpFlvModuleWithAOpt"] = function() {
  6362. assert(runtimeInitialized, "you need to wait for the runtime to be ready (e.g. wait for main() to be called)");
  6363. assert(!runtimeExited, "the runtime was exited (use NO_EXIT_RUNTIME to keep it alive after main() exits)");
  6364. return Module["asm"]["_initializeSniffHttpFlvModuleWithAOpt"].apply(null, arguments)
  6365. };
  6366. var _initializeSniffStreamModule = Module["_initializeSniffStreamModule"] = function() {
  6367. assert(runtimeInitialized, "you need to wait for the runtime to be ready (e.g. wait for main() to be called)");
  6368. assert(!runtimeExited, "the runtime was exited (use NO_EXIT_RUNTIME to keep it alive after main() exits)");
  6369. return Module["asm"]["_initializeSniffStreamModule"].apply(null, arguments)
  6370. };
  6371. var _initializeSniffStreamModuleWithAOpt = Module["_initializeSniffStreamModuleWithAOpt"] = function() {
  6372. assert(runtimeInitialized, "you need to wait for the runtime to be ready (e.g. wait for main() to be called)");
  6373. assert(!runtimeExited, "the runtime was exited (use NO_EXIT_RUNTIME to keep it alive after main() exits)");
  6374. return Module["asm"]["_initializeSniffStreamModuleWithAOpt"].apply(null, arguments)
  6375. };
  6376. var _main = Module["_main"] = function() {
  6377. assert(runtimeInitialized, "you need to wait for the runtime to be ready (e.g. wait for main() to be called)");
  6378. assert(!runtimeExited, "the runtime was exited (use NO_EXIT_RUNTIME to keep it alive after main() exits)");
  6379. return Module["asm"]["_main"].apply(null, arguments)
  6380. };
  6381. var _malloc = Module["_malloc"] = function() {
  6382. assert(runtimeInitialized, "you need to wait for the runtime to be ready (e.g. wait for main() to be called)");
  6383. assert(!runtimeExited, "the runtime was exited (use NO_EXIT_RUNTIME to keep it alive after main() exits)");
  6384. return Module["asm"]["_malloc"].apply(null, arguments)
  6385. };
  6386. var _naluLListLength = Module["_naluLListLength"] = function() {
  6387. assert(runtimeInitialized, "you need to wait for the runtime to be ready (e.g. wait for main() to be called)");
  6388. assert(!runtimeExited, "the runtime was exited (use NO_EXIT_RUNTIME to keep it alive after main() exits)");
  6389. return Module["asm"]["_naluLListLength"].apply(null, arguments)
  6390. };
  6391. var _pushSniffG711FlvData = Module["_pushSniffG711FlvData"] = function() {
  6392. assert(runtimeInitialized, "you need to wait for the runtime to be ready (e.g. wait for main() to be called)");
  6393. assert(!runtimeExited, "the runtime was exited (use NO_EXIT_RUNTIME to keep it alive after main() exits)");
  6394. return Module["asm"]["_pushSniffG711FlvData"].apply(null, arguments)
  6395. };
  6396. var _pushSniffHttpFlvData = Module["_pushSniffHttpFlvData"] = function() {
  6397. assert(runtimeInitialized, "you need to wait for the runtime to be ready (e.g. wait for main() to be called)");
  6398. assert(!runtimeExited, "the runtime was exited (use NO_EXIT_RUNTIME to keep it alive after main() exits)");
  6399. return Module["asm"]["_pushSniffHttpFlvData"].apply(null, arguments)
  6400. };
  6401. var _pushSniffStreamData = Module["_pushSniffStreamData"] = function() {
  6402. assert(runtimeInitialized, "you need to wait for the runtime to be ready (e.g. wait for main() to be called)");
  6403. assert(!runtimeExited, "the runtime was exited (use NO_EXIT_RUNTIME to keep it alive after main() exits)");
  6404. return Module["asm"]["_pushSniffStreamData"].apply(null, arguments)
  6405. };
  6406. var _registerPlayer = Module["_registerPlayer"] = function() {
  6407. assert(runtimeInitialized, "you need to wait for the runtime to be ready (e.g. wait for main() to be called)");
  6408. assert(!runtimeExited, "the runtime was exited (use NO_EXIT_RUNTIME to keep it alive after main() exits)");
  6409. return Module["asm"]["_registerPlayer"].apply(null, arguments)
  6410. };
  6411. var _release = Module["_release"] = function() {
  6412. assert(runtimeInitialized, "you need to wait for the runtime to be ready (e.g. wait for main() to be called)");
  6413. assert(!runtimeExited, "the runtime was exited (use NO_EXIT_RUNTIME to keep it alive after main() exits)");
  6414. return Module["asm"]["_release"].apply(null, arguments)
  6415. };
  6416. var _releaseG711 = Module["_releaseG711"] = function() {
  6417. assert(runtimeInitialized, "you need to wait for the runtime to be ready (e.g. wait for main() to be called)");
  6418. assert(!runtimeExited, "the runtime was exited (use NO_EXIT_RUNTIME to keep it alive after main() exits)");
  6419. return Module["asm"]["_releaseG711"].apply(null, arguments)
  6420. };
  6421. var _releaseHttpFLV = Module["_releaseHttpFLV"] = function() {
  6422. assert(runtimeInitialized, "you need to wait for the runtime to be ready (e.g. wait for main() to be called)");
  6423. assert(!runtimeExited, "the runtime was exited (use NO_EXIT_RUNTIME to keep it alive after main() exits)");
  6424. return Module["asm"]["_releaseHttpFLV"].apply(null, arguments)
  6425. };
  6426. var _releaseSniffHttpFlv = Module["_releaseSniffHttpFlv"] = function() {
  6427. assert(runtimeInitialized, "you need to wait for the runtime to be ready (e.g. wait for main() to be called)");
  6428. assert(!runtimeExited, "the runtime was exited (use NO_EXIT_RUNTIME to keep it alive after main() exits)");
  6429. return Module["asm"]["_releaseSniffHttpFlv"].apply(null, arguments)
  6430. };
  6431. var _releaseSniffStream = Module["_releaseSniffStream"] = function() {
  6432. assert(runtimeInitialized, "you need to wait for the runtime to be ready (e.g. wait for main() to be called)");
  6433. assert(!runtimeExited, "the runtime was exited (use NO_EXIT_RUNTIME to keep it alive after main() exits)");
  6434. return Module["asm"]["_releaseSniffStream"].apply(null, arguments)
  6435. };
  6436. var _setCodecType = Module["_setCodecType"] = function() {
  6437. assert(runtimeInitialized, "you need to wait for the runtime to be ready (e.g. wait for main() to be called)");
  6438. assert(!runtimeExited, "the runtime was exited (use NO_EXIT_RUNTIME to keep it alive after main() exits)");
  6439. return Module["asm"]["_setCodecType"].apply(null, arguments)
  6440. };
  6441. var establishStackSpace = Module["establishStackSpace"] = function() {
  6442. assert(runtimeInitialized, "you need to wait for the runtime to be ready (e.g. wait for main() to be called)");
  6443. assert(!runtimeExited, "the runtime was exited (use NO_EXIT_RUNTIME to keep it alive after main() exits)");
  6444. return Module["asm"]["establishStackSpace"].apply(null, arguments)
  6445. };
  6446. var stackAlloc = Module["stackAlloc"] = function() {
  6447. assert(runtimeInitialized, "you need to wait for the runtime to be ready (e.g. wait for main() to be called)");
  6448. assert(!runtimeExited, "the runtime was exited (use NO_EXIT_RUNTIME to keep it alive after main() exits)");
  6449. return Module["asm"]["stackAlloc"].apply(null, arguments)
  6450. };
  6451. var stackRestore = Module["stackRestore"] = function() {
  6452. assert(runtimeInitialized, "you need to wait for the runtime to be ready (e.g. wait for main() to be called)");
  6453. assert(!runtimeExited, "the runtime was exited (use NO_EXIT_RUNTIME to keep it alive after main() exits)");
  6454. return Module["asm"]["stackRestore"].apply(null, arguments)
  6455. };
  6456. var stackSave = Module["stackSave"] = function() {
  6457. assert(runtimeInitialized, "you need to wait for the runtime to be ready (e.g. wait for main() to be called)");
  6458. assert(!runtimeExited, "the runtime was exited (use NO_EXIT_RUNTIME to keep it alive after main() exits)");
  6459. return Module["asm"]["stackSave"].apply(null, arguments)
  6460. };
  6461. var dynCall_v = Module["dynCall_v"] = function() {
  6462. assert(runtimeInitialized, "you need to wait for the runtime to be ready (e.g. wait for main() to be called)");
  6463. assert(!runtimeExited, "the runtime was exited (use NO_EXIT_RUNTIME to keep it alive after main() exits)");
  6464. return Module["asm"]["dynCall_v"].apply(null, arguments)
  6465. };
  6466. var dynCall_vi = Module["dynCall_vi"] = function() {
  6467. assert(runtimeInitialized, "you need to wait for the runtime to be ready (e.g. wait for main() to be called)");
  6468. assert(!runtimeExited, "the runtime was exited (use NO_EXIT_RUNTIME to keep it alive after main() exits)");
  6469. return Module["asm"]["dynCall_vi"].apply(null, arguments)
  6470. };
  6471. Module["asm"] = asm;
  6472. if (!Object.getOwnPropertyDescriptor(Module, "intArrayFromString")) Module["intArrayFromString"] = function() {
  6473. abort("'intArrayFromString' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)")
  6474. };
  6475. if (!Object.getOwnPropertyDescriptor(Module, "intArrayToString")) Module["intArrayToString"] = function() {
  6476. abort("'intArrayToString' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)")
  6477. };
  6478. Module["ccall"] = ccall;
  6479. Module["cwrap"] = cwrap;
  6480. if (!Object.getOwnPropertyDescriptor(Module, "setValue")) Module["setValue"] = function() {
  6481. abort("'setValue' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)")
  6482. };
  6483. if (!Object.getOwnPropertyDescriptor(Module, "getValue")) Module["getValue"] = function() {
  6484. abort("'getValue' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)")
  6485. };
  6486. if (!Object.getOwnPropertyDescriptor(Module, "allocate")) Module["allocate"] = function() {
  6487. abort("'allocate' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)")
  6488. };
  6489. if (!Object.getOwnPropertyDescriptor(Module, "getMemory")) Module["getMemory"] = function() {
  6490. abort("'getMemory' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ). Alternatively, forcing filesystem support (-s FORCE_FILESYSTEM=1) can export this for you")
  6491. };
  6492. if (!Object.getOwnPropertyDescriptor(Module, "AsciiToString")) Module["AsciiToString"] = function() {
  6493. abort("'AsciiToString' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)")
  6494. };
  6495. if (!Object.getOwnPropertyDescriptor(Module, "stringToAscii")) Module["stringToAscii"] = function() {
  6496. abort("'stringToAscii' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)")
  6497. };
  6498. if (!Object.getOwnPropertyDescriptor(Module, "UTF8ArrayToString")) Module["UTF8ArrayToString"] = function() {
  6499. abort("'UTF8ArrayToString' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)")
  6500. };
  6501. if (!Object.getOwnPropertyDescriptor(Module, "UTF8ToString")) Module["UTF8ToString"] = function() {
  6502. abort("'UTF8ToString' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)")
  6503. };
  6504. if (!Object.getOwnPropertyDescriptor(Module, "stringToUTF8Array")) Module["stringToUTF8Array"] = function() {
  6505. abort("'stringToUTF8Array' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)")
  6506. };
  6507. if (!Object.getOwnPropertyDescriptor(Module, "stringToUTF8")) Module["stringToUTF8"] = function() {
  6508. abort("'stringToUTF8' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)")
  6509. };
  6510. if (!Object.getOwnPropertyDescriptor(Module, "lengthBytesUTF8")) Module["lengthBytesUTF8"] = function() {
  6511. abort("'lengthBytesUTF8' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)")
  6512. };
  6513. if (!Object.getOwnPropertyDescriptor(Module, "UTF16ToString")) Module["UTF16ToString"] = function() {
  6514. abort("'UTF16ToString' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)")
  6515. };
  6516. if (!Object.getOwnPropertyDescriptor(Module, "stringToUTF16")) Module["stringToUTF16"] = function() {
  6517. abort("'stringToUTF16' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)")
  6518. };
  6519. if (!Object.getOwnPropertyDescriptor(Module, "lengthBytesUTF16")) Module["lengthBytesUTF16"] = function() {
  6520. abort("'lengthBytesUTF16' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)")
  6521. };
  6522. if (!Object.getOwnPropertyDescriptor(Module, "UTF32ToString")) Module["UTF32ToString"] = function() {
  6523. abort("'UTF32ToString' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)")
  6524. };
  6525. if (!Object.getOwnPropertyDescriptor(Module, "stringToUTF32")) Module["stringToUTF32"] = function() {
  6526. abort("'stringToUTF32' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)")
  6527. };
  6528. if (!Object.getOwnPropertyDescriptor(Module, "lengthBytesUTF32")) Module["lengthBytesUTF32"] = function() {
  6529. abort("'lengthBytesUTF32' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)")
  6530. };
  6531. if (!Object.getOwnPropertyDescriptor(Module, "allocateUTF8")) Module["allocateUTF8"] = function() {
  6532. abort("'allocateUTF8' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)")
  6533. };
  6534. if (!Object.getOwnPropertyDescriptor(Module, "stackTrace")) Module["stackTrace"] = function() {
  6535. abort("'stackTrace' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)")
  6536. };
  6537. if (!Object.getOwnPropertyDescriptor(Module, "addOnPreRun")) Module["addOnPreRun"] = function() {
  6538. abort("'addOnPreRun' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)")
  6539. };
  6540. if (!Object.getOwnPropertyDescriptor(Module, "addOnInit")) Module["addOnInit"] = function() {
  6541. abort("'addOnInit' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)")
  6542. };
  6543. if (!Object.getOwnPropertyDescriptor(Module, "addOnPreMain")) Module["addOnPreMain"] = function() {
  6544. abort("'addOnPreMain' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)")
  6545. };
  6546. if (!Object.getOwnPropertyDescriptor(Module, "addOnExit")) Module["addOnExit"] = function() {
  6547. abort("'addOnExit' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)")
  6548. };
  6549. if (!Object.getOwnPropertyDescriptor(Module, "addOnPostRun")) Module["addOnPostRun"] = function() {
  6550. abort("'addOnPostRun' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)")
  6551. };
  6552. if (!Object.getOwnPropertyDescriptor(Module, "writeStringToMemory")) Module["writeStringToMemory"] = function() {
  6553. abort("'writeStringToMemory' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)")
  6554. };
  6555. if (!Object.getOwnPropertyDescriptor(Module, "writeArrayToMemory")) Module["writeArrayToMemory"] = function() {
  6556. abort("'writeArrayToMemory' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)")
  6557. };
  6558. if (!Object.getOwnPropertyDescriptor(Module, "writeAsciiToMemory")) Module["writeAsciiToMemory"] = function() {
  6559. abort("'writeAsciiToMemory' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)")
  6560. };
  6561. if (!Object.getOwnPropertyDescriptor(Module, "addRunDependency")) Module["addRunDependency"] = function() {
  6562. abort("'addRunDependency' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ). Alternatively, forcing filesystem support (-s FORCE_FILESYSTEM=1) can export this for you")
  6563. };
  6564. if (!Object.getOwnPropertyDescriptor(Module, "removeRunDependency")) Module["removeRunDependency"] = function() {
  6565. abort("'removeRunDependency' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ). Alternatively, forcing filesystem support (-s FORCE_FILESYSTEM=1) can export this for you")
  6566. };
  6567. if (!Object.getOwnPropertyDescriptor(Module, "ENV")) Module["ENV"] = function() {
  6568. abort("'ENV' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)")
  6569. };
  6570. if (!Object.getOwnPropertyDescriptor(Module, "FS")) Module["FS"] = function() {
  6571. abort("'FS' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)")
  6572. };
  6573. if (!Object.getOwnPropertyDescriptor(Module, "FS_createFolder")) Module["FS_createFolder"] = function() {
  6574. abort("'FS_createFolder' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ). Alternatively, forcing filesystem support (-s FORCE_FILESYSTEM=1) can export this for you")
  6575. };
  6576. if (!Object.getOwnPropertyDescriptor(Module, "FS_createPath")) Module["FS_createPath"] = function() {
  6577. abort("'FS_createPath' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ). Alternatively, forcing filesystem support (-s FORCE_FILESYSTEM=1) can export this for you")
  6578. };
  6579. if (!Object.getOwnPropertyDescriptor(Module, "FS_createDataFile")) Module["FS_createDataFile"] = function() {
  6580. abort("'FS_createDataFile' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ). Alternatively, forcing filesystem support (-s FORCE_FILESYSTEM=1) can export this for you")
  6581. };
  6582. if (!Object.getOwnPropertyDescriptor(Module, "FS_createPreloadedFile")) Module["FS_createPreloadedFile"] = function() {
  6583. abort("'FS_createPreloadedFile' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ). Alternatively, forcing filesystem support (-s FORCE_FILESYSTEM=1) can export this for you")
  6584. };
  6585. if (!Object.getOwnPropertyDescriptor(Module, "FS_createLazyFile")) Module["FS_createLazyFile"] = function() {
  6586. abort("'FS_createLazyFile' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ). Alternatively, forcing filesystem support (-s FORCE_FILESYSTEM=1) can export this for you")
  6587. };
  6588. if (!Object.getOwnPropertyDescriptor(Module, "FS_createLink")) Module["FS_createLink"] = function() {
  6589. abort("'FS_createLink' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ). Alternatively, forcing filesystem support (-s FORCE_FILESYSTEM=1) can export this for you")
  6590. };
  6591. if (!Object.getOwnPropertyDescriptor(Module, "FS_createDevice")) Module["FS_createDevice"] = function() {
  6592. abort("'FS_createDevice' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ). Alternatively, forcing filesystem support (-s FORCE_FILESYSTEM=1) can export this for you")
  6593. };
  6594. if (!Object.getOwnPropertyDescriptor(Module, "FS_unlink")) Module["FS_unlink"] = function() {
  6595. abort("'FS_unlink' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ). Alternatively, forcing filesystem support (-s FORCE_FILESYSTEM=1) can export this for you")
  6596. };
  6597. if (!Object.getOwnPropertyDescriptor(Module, "GL")) Module["GL"] = function() {
  6598. abort("'GL' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)")
  6599. };
  6600. if (!Object.getOwnPropertyDescriptor(Module, "dynamicAlloc")) Module["dynamicAlloc"] = function() {
  6601. abort("'dynamicAlloc' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)")
  6602. };
  6603. if (!Object.getOwnPropertyDescriptor(Module, "loadDynamicLibrary")) Module["loadDynamicLibrary"] = function() {
  6604. abort("'loadDynamicLibrary' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)")
  6605. };
  6606. if (!Object.getOwnPropertyDescriptor(Module, "loadWebAssemblyModule")) Module["loadWebAssemblyModule"] = function() {
  6607. abort("'loadWebAssemblyModule' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)")
  6608. };
  6609. if (!Object.getOwnPropertyDescriptor(Module, "getLEB")) Module["getLEB"] = function() {
  6610. abort("'getLEB' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)")
  6611. };
  6612. if (!Object.getOwnPropertyDescriptor(Module, "getFunctionTables")) Module["getFunctionTables"] = function() {
  6613. abort("'getFunctionTables' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)")
  6614. };
  6615. if (!Object.getOwnPropertyDescriptor(Module, "alignFunctionTables")) Module["alignFunctionTables"] = function() {
  6616. abort("'alignFunctionTables' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)")
  6617. };
  6618. if (!Object.getOwnPropertyDescriptor(Module, "registerFunctions")) Module["registerFunctions"] = function() {
  6619. abort("'registerFunctions' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)")
  6620. };
  6621. Module["addFunction"] = addFunction;
  6622. Module["removeFunction"] = removeFunction;
  6623. if (!Object.getOwnPropertyDescriptor(Module, "getFuncWrapper")) Module["getFuncWrapper"] = function() {
  6624. abort("'getFuncWrapper' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)")
  6625. };
  6626. if (!Object.getOwnPropertyDescriptor(Module, "prettyPrint")) Module["prettyPrint"] = function() {
  6627. abort("'prettyPrint' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)")
  6628. };
  6629. if (!Object.getOwnPropertyDescriptor(Module, "makeBigInt")) Module["makeBigInt"] = function() {
  6630. abort("'makeBigInt' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)")
  6631. };
  6632. if (!Object.getOwnPropertyDescriptor(Module, "dynCall")) Module["dynCall"] = function() {
  6633. abort("'dynCall' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)")
  6634. };
  6635. if (!Object.getOwnPropertyDescriptor(Module, "getCompilerSetting")) Module["getCompilerSetting"] = function() {
  6636. abort("'getCompilerSetting' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)")
  6637. };
  6638. if (!Object.getOwnPropertyDescriptor(Module, "stackSave")) Module["stackSave"] = function() {
  6639. abort("'stackSave' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)")
  6640. };
  6641. if (!Object.getOwnPropertyDescriptor(Module, "stackRestore")) Module["stackRestore"] = function() {
  6642. abort("'stackRestore' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)")
  6643. };
  6644. if (!Object.getOwnPropertyDescriptor(Module, "stackAlloc")) Module["stackAlloc"] = function() {
  6645. abort("'stackAlloc' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)")
  6646. };
  6647. if (!Object.getOwnPropertyDescriptor(Module, "establishStackSpace")) Module["establishStackSpace"] = function() {
  6648. abort("'establishStackSpace' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)")
  6649. };
  6650. if (!Object.getOwnPropertyDescriptor(Module, "print")) Module["print"] = function() {
  6651. abort("'print' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)")
  6652. };
  6653. if (!Object.getOwnPropertyDescriptor(Module, "printErr")) Module["printErr"] = function() {
  6654. abort("'printErr' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)")
  6655. };
  6656. if (!Object.getOwnPropertyDescriptor(Module, "getTempRet0")) Module["getTempRet0"] = function() {
  6657. abort("'getTempRet0' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)")
  6658. };
  6659. if (!Object.getOwnPropertyDescriptor(Module, "setTempRet0")) Module["setTempRet0"] = function() {
  6660. abort("'setTempRet0' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)")
  6661. };
  6662. if (!Object.getOwnPropertyDescriptor(Module, "callMain")) Module["callMain"] = function() {
  6663. abort("'callMain' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)")
  6664. };
  6665. if (!Object.getOwnPropertyDescriptor(Module, "abort")) Module["abort"] = function() {
  6666. abort("'abort' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)")
  6667. };
  6668. if (!Object.getOwnPropertyDescriptor(Module, "Pointer_stringify")) Module["Pointer_stringify"] = function() {
  6669. abort("'Pointer_stringify' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)")
  6670. };
  6671. if (!Object.getOwnPropertyDescriptor(Module, "warnOnce")) Module["warnOnce"] = function() {
  6672. abort("'warnOnce' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)")
  6673. };
  6674. if (!Object.getOwnPropertyDescriptor(Module, "ALLOC_NORMAL")) Object.defineProperty(Module, "ALLOC_NORMAL", {
  6675. configurable: true,
  6676. get: function() {
  6677. abort("'ALLOC_NORMAL' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)")
  6678. }
  6679. });
  6680. if (!Object.getOwnPropertyDescriptor(Module, "ALLOC_STACK")) Object.defineProperty(Module, "ALLOC_STACK", {
  6681. configurable: true,
  6682. get: function() {
  6683. abort("'ALLOC_STACK' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)")
  6684. }
  6685. });
  6686. if (!Object.getOwnPropertyDescriptor(Module, "ALLOC_DYNAMIC")) Object.defineProperty(Module, "ALLOC_DYNAMIC", {
  6687. configurable: true,
  6688. get: function() {
  6689. abort("'ALLOC_DYNAMIC' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)")
  6690. }
  6691. });
  6692. if (!Object.getOwnPropertyDescriptor(Module, "ALLOC_NONE")) Object.defineProperty(Module, "ALLOC_NONE", {
  6693. configurable: true,
  6694. get: function() {
  6695. abort("'ALLOC_NONE' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)")
  6696. }
  6697. });
  6698. if (!Object.getOwnPropertyDescriptor(Module, "calledRun")) Object.defineProperty(Module, "calledRun", {
  6699. configurable: true,
  6700. get: function() {
  6701. abort("'calledRun' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ). Alternatively, forcing filesystem support (-s FORCE_FILESYSTEM=1) can export this for you")
  6702. }
  6703. });
  6704. var calledRun;
  6705. function ExitStatus(status) {
  6706. this.name = "ExitStatus";
  6707. this.message = "Program terminated with exit(" + status + ")";
  6708. this.status = status
  6709. }
  6710. var calledMain = false;
  6711. dependenciesFulfilled = function runCaller() {
  6712. if (!calledRun) run();
  6713. if (!calledRun) dependenciesFulfilled = runCaller
  6714. };
  6715. function callMain(args) {
  6716. assert(runDependencies == 0, 'cannot call main when async dependencies remain! (listen on Module["onRuntimeInitialized"])');
  6717. assert(__ATPRERUN__.length == 0, "cannot call main when preRun functions remain to be called");
  6718. args = args || [];
  6719. var argc = args.length + 1;
  6720. var argv = stackAlloc((argc + 1) * 4);
  6721. HEAP32[argv >> 2] = allocateUTF8OnStack(thisProgram);
  6722. for (var i = 1; i < argc; i++) {
  6723. HEAP32[(argv >> 2) + i] = allocateUTF8OnStack(args[i - 1])
  6724. }
  6725. HEAP32[(argv >> 2) + argc] = 0;
  6726. try {
  6727. var ret = Module["_main"](argc, argv);
  6728. exit(ret, true)
  6729. } catch (e) {
  6730. if (e instanceof ExitStatus) {
  6731. return
  6732. } else if (e == "SimulateInfiniteLoop") {
  6733. noExitRuntime = true;
  6734. return
  6735. } else {
  6736. var toLog = e;
  6737. if (e && typeof e === "object" && e.stack) {
  6738. toLog = [e, e.stack]
  6739. }
  6740. err("exception thrown: " + toLog);
  6741. quit_(1, e)
  6742. }
  6743. } finally {
  6744. calledMain = true
  6745. }
  6746. }
  6747. function run(args) {
  6748. args = args || arguments_;
  6749. if (runDependencies > 0) {
  6750. return
  6751. }
  6752. writeStackCookie();
  6753. preRun();
  6754. if (runDependencies > 0) return;
  6755. function doRun() {
  6756. if (calledRun) return;
  6757. calledRun = true;
  6758. if (ABORT) return;
  6759. initRuntime();
  6760. preMain();
  6761. if (Module["onRuntimeInitialized"]) Module["onRuntimeInitialized"]();
  6762. if (shouldRunNow) callMain(args);
  6763. postRun()
  6764. }
  6765. if (Module["setStatus"]) {
  6766. Module["setStatus"]("Running...");
  6767. setTimeout(function() {
  6768. setTimeout(function() {
  6769. Module["setStatus"]("")
  6770. }, 1);
  6771. doRun()
  6772. }, 1)
  6773. } else {
  6774. doRun()
  6775. }
  6776. checkStackCookie()
  6777. }
  6778. Module["run"] = run;
  6779. function checkUnflushedContent() {
  6780. var print = out;
  6781. var printErr = err;
  6782. var has = false;
  6783. out = err = function(x) {
  6784. has = true
  6785. };
  6786. try {
  6787. var flush = Module["_fflush"];
  6788. if (flush) flush(0);
  6789. ["stdout", "stderr"].forEach(function(name) {
  6790. var info = FS.analyzePath("/dev/" + name);
  6791. if (!info) return;
  6792. var stream = info.object;
  6793. var rdev = stream.rdev;
  6794. var tty = TTY.ttys[rdev];
  6795. if (tty && tty.output && tty.output.length) {
  6796. has = true
  6797. }
  6798. })
  6799. } catch (e) {}
  6800. out = print;
  6801. err = printErr;
  6802. if (has) {
  6803. warnOnce("stdio streams had content in them that was not flushed. you should set EXIT_RUNTIME to 1 (see the FAQ), or make sure to emit a newline when you printf etc.")
  6804. }
  6805. }
  6806. function exit(status, implicit) {
  6807. checkUnflushedContent();
  6808. if (implicit && noExitRuntime && status === 0) {
  6809. return
  6810. }
  6811. if (noExitRuntime) {
  6812. if (!implicit) {
  6813. err("exit(" + status + ") called, but EXIT_RUNTIME is not set, so halting execution but not exiting the runtime or preventing further async execution (build with EXIT_RUNTIME=1, if you want a true shutdown)")
  6814. }
  6815. } else {
  6816. ABORT = true;
  6817. EXITSTATUS = status;
  6818. exitRuntime();
  6819. if (Module["onExit"]) Module["onExit"](status)
  6820. }
  6821. quit_(status, new ExitStatus(status))
  6822. }
  6823. if (Module["preInit"]) {
  6824. if (typeof Module["preInit"] == "function") Module["preInit"] = [Module["preInit"]];
  6825. while (Module["preInit"].length > 0) {
  6826. Module["preInit"].pop()()
  6827. }
  6828. }
  6829. var shouldRunNow = true;
  6830. if (Module["noInitialRun"]) shouldRunNow = false;
  6831. noExitRuntime = true;
  6832. run();