diff --git a/Apps/SampleData/MultipartVehicle_part1.czml b/Apps/SampleData/MultipartVehicle_part1.czml new file mode 100644 index 000000000000..c9f1d359fd37 --- /dev/null +++ b/Apps/SampleData/MultipartVehicle_part1.czml @@ -0,0 +1,244 @@ +[ + { + "id":"document", + "version":"1.0" + }, + { + "id":"Vehicle", + "availability":"2012-08-04T16:00:00Z/2012-08-04T17:04:54.9962195740191Z", + "label":{ + "fillColor":[ + { + "interval":"2012-08-04T16:00:00Z/2012-08-04T18:00:00Z", + "rgba":[ + 255,255,0,255 + ] + } + ], + "font":"bold 10pt Segoe UI Semibold", + "horizontalOrigin":"CENTER", + "outlineColor":{ + "rgba":[ + 0,0,0,255 + ] + }, + "pixelOffset":{ + "cartesian2":[ + 0.0,20.0 + ] + }, + "scale":1.0, + "show":[ + { + "interval":"2012-08-04T16:00:00Z/2012-08-04T18:00:00Z", + "boolean":true + } + ], + "style":"FILL", + "text":"Test Vehicle", + "verticalOrigin":"CENTER" + }, + "model":{ + "gltf":"models/CesiumMilkTruck/CesiumMilkTruck.glb", + "minimumPixelSize":100, + "maximumScale":50 + }, + "orientation" : { + "velocityReference": "#position" + }, + "viewFrom": { + "cartesian": [ -2080, -1715, 779 ] + }, + "properties" : { + "fuel_remaining" : { + "epoch":"2012-08-04T16:00:00Z", + "number": [ + 0, 22.5, + 1500, 21.2 + ] + } + }, + "path":{ + "material":{ + "solidColor":{ + "color":{ + "interval":"2012-08-04T16:00:00Z/2012-08-04T18:00:00Z", + "rgba":[ + 255,255,0,255 + ] + } + } + }, + "width":[ + { + "interval":"2012-08-04T16:00:00Z/2012-08-04T18:00:00Z", + "number":5.0 + } + ], + "show":[ + { + "interval":"2012-08-04T16:00:00Z/2012-08-04T18:00:00Z", + "boolean":true + } + ] + }, + "position":{ + "interpolationAlgorithm":"LAGRANGE", + "interpolationDegree":1, + "epoch":"2012-08-04T16:00:00Z", + "cartesian":[ + 0.0,-2379754.6637012,-4665332.88013588,3628133.68924173, + 10.0,-2379510.08905552,-4665419.64840452,3628182.20006795, + 20.0,-2379568.4769522,-4665555.3441867,3627970.83323261, + 30.0,-2379638.93786855,-4665691.63561896,3627750.82085873, + 40.0,-2379709.29834665,-4665827.9679646,3627530.80187124, + 50.0,-2379837.28064915,-4665847.7494347,3627422.12874017, + 60.0,-2379624.98289073,-4665907.50853722,3627484.1191848, + 70.0,-2379386.12743523,-4666029.54174431,3627483.83297459, + 80.0,-2379147.26777171,-4666151.56669944,3627483.5403492, + 90.0,-2378908.40390057,-4666273.58340244,3627483.24130864, + 1e2,-2378663.69301645,-4666379.62408751,3627507.14485116, + 110.0,-2378416.29648478,-4666444.93145547,3627584.82610021, + 120.0,-2378184.75115833,-4666458.05260387,3627718.84628509, + 130.0,-2377958.22637221,-4666461.11592729,3627862.42864636, + 140.0,-2377733.79758374,-4666460.508441,3628009.31669747, + 150.0,-2377509.36460154,-4666459.89268533,3628156.19830638, + 160.0,-2377284.92742603,-4666459.26866028,3628303.07347284, + 170.0,-2377060.48605759,-4666458.63636585,3628449.9421966, + 180.0,-2376835.38472681,-4666459.12413084,3628595.78980713, + 190.0,-2376609.71084875,-4666460.58154837,3628740.75156098, + 2e2,-2376384.03277903,-4666462.03069678,3628885.70687201, + 210.0,-2376158.35051806,-4666463.47157605,3629030.65573998, + 220.0,-2375928.48736859,-4666473.69575712,3629167.08552075, + 230.0,-2375685.23921682,-4666516.66377513,3629270.3788586, + 240.0,-2375437.34307768,-4666580.50029931,3629350.0215939, + 250.0,-2375189.01133306,-4666646.99320452,3629426.53515423, + 260.0,-2374940.52675783,-4666719.29042452,3629495.71527129, + 270.0,-2374695.15633549,-4666818.94185605,3629527.91579302, + 280.0,-2374469.42323533,-4666959.02687352,3629495.69349509, + 290.0,-2374249.06659405,-4667105.51477438,3629451.77975513, + 3e2,-2374028.70574724,-4667251.99442379,3629407.85959417, + 310.0,-2373808.3406953,-4667398.46582147,3629363.9330123, + 320.0,-2373585.10773309,-4667542.05948567,3629325.52597676, + 330.0,-2373360.83645524,-4667684.60869937,3629289.10800226, + 340.0,-2373136.5609746,-4667827.1496603,3629252.68360778, + 350.0,-2372912.28129155,-4667969.68236819,3629216.25279339, + 360.0,-2372687.9974065,-4668112.20682281,3629179.81555915, + 370.0,-2372463.70931983,-4668254.72302389,3629143.37190511, + 380.0,-2372239.41703195,-4668397.2309712,3629106.92183136, + 390.0,-2372018.7615611,-4668543.12509124,3629063.76398058, + 4e2,-2371803.72586004,-4668694.25404103,3629010.24868951, + 410.0,-2371587.17705087,-4668844.01756398,3628959.44085712, + 420.0,-2371365.33472237,-4668989.01539779,3628918.13984128, + 430.0,-2371134.7547923,-4669122.83460485,3628896.77687771, + 440.0,-2370898.14635373,-4669248.94021679,3628889.16522147, + 450.0,-2370660.31892949,-4669372.89697404,3628885.07134974, + 460.0,-2370422.47459187,-4669496.82305927,3628881.00796265, + 470.0,-2370184.62606153,-4669620.7408867,3628876.93815788, + 480.0,-2369946.77333888,-4669744.65045611,3628872.86193545, + 490.0,-2369708.91642433,-4669868.55176729,3628868.77929537, + 5e2,-2369471.05531832,-4669992.44482001,3628864.69023764, + 510.0,-2369233.19002126,-4670116.32961405,3628860.59476226, + 520.0,-2368989.65950726,-4670225.94237244,3628878.39787596, + 530.0,-2368742.64810033,-4670324.93393451,3628912.01606989, + 540.0,-2368494.95906007,-4670419.65546435,3628951.51257903, + 550.0,-2368248.2848424,-4670519.53079746,3628983.74302284, + 560.0,-2368001.37437725,-4670618.8319301,3629016.84097985, + 570.0,-2367753.95809484,-4670715.82368808,3629053.19940679, + 580.0,-2367506.53762994,-4670812.80718267,3629089.55141416, + 590.0,-2367259.11298298,-4670909.78241366,3629125.89700192, + 6e2,-2367011.6841544,-4671006.74938092,3629162.23617, + 610.0,-2366764.25114462,-4671103.70808425,3629198.56891833, + 620.0,-2366516.81395411,-4671200.6585235,3629234.89524684, + 630.0,-2366269.37258329,-4671297.60069848,3629271.21515549, + 640.0,-2366021.9270326,-4671394.53460904,3629307.52864419, + 650.0,-2365774.47730247,-4671491.460255,3629343.8357129, + 660.0,-2365527.02339333,-4671588.37763618,3629380.13636155, + 670.0,-2365279.56530564,-4671685.28675242,3629416.43059006, + 680.0,-2365032.10303983,-4671782.18760355,3629452.71839837, + 690.0,-2364784.63659633,-4671879.0801894,3629488.99978644, + 7e2,-2364537.16597558,-4671975.96450979,3629525.27475418, + 710.0,-2364289.69117801,-4672072.84056456,3629561.54330154, + 720.0,-2364042.21220407,-4672169.70835353,3629597.80542845, + 730.0,-2363794.72905419,-4672266.56787654,3629634.06113485, + 740.0,-2363547.2417288,-4672363.41913342,3629670.31042068, + 750.0,-2363299.75022835,-4672460.26212398,3629706.55328587, + 760.0,-2363052.25455328,-4672557.09684808,3629742.78973036, + 770.0,-2362805.96213832,-4672658.44235501,3629772.46055, + 780.0,-2362566.28756432,-4672777.84646024,3629774.74120741, + 790.0,-2362330.01543718,-4672904.47715606,3629765.56158533, + 8e2,-2362093.73913086,-4673031.09958839,3629756.37554393, + 810.0,-2361857.4586458,-4673157.71375702,3629747.18308323, + 820.0,-2361621.17398239,-4673284.31966172,3629737.98420324, + 830.0,-2361379.13396171,-4673398.62592987,3629748.21496888, + 840.0,-2361130.58722369,-4673488.59963461,3629793.74986512, + 850.0,-2360881.58098042,-4673573.14384665,3629846.50583809, + 860.0,-2360632.51954154,-4673657.07225834,3629900.06533886, + 870.0,-2360383.45393477,-4673740.99239963,3629953.61841672, + 880.0,-2360134.38416057,-4673824.90427038,3630007.16507155, + 890.0,-2359885.31021938,-4673908.80787044,3630060.70530326, + 9e2,-2359636.23211162,-4673992.70319966,3630114.23911177, + 910.0,-2359387.14983775,-4674076.5902579,3630167.76649697, + 920.0,-2359138.06339821,-4674160.469045,3630221.28745878, + 930.0,-2358889.14548278,-4674246.80164025,3630271.54165003, + 940.0,-2358640.17887385,-4674332.39488805,3630322.75317441, + 950.0,-2358391.03374684,-4674415.32432296,3630377.46713032, + 960.0,-2358141.88445605,-4674498.24548602,3630432.17466229, + 970.0,-2357892.7310019,-4674581.15837706,3630486.87577026, + 980.0,-2357643.59031994,-4674664.39449658,3630541.13554932, + 990.0,-2357394.48770584,-4674748.44899573,3630594.30439711, + 1e3,-2357145.38092955,-4674832.4952226,3630647.46682079, + 1010.0,-2356896.26999152,-4674916.53317705,3630700.62282028, + 1020.0,-2356647.15489217,-4675000.56285892,3630753.77239547, + 1030.0,-2356398.03563196,-4675084.58426807,3630806.91554629, + 1040.0,-2356148.91221132,-4675168.59740435,3630860.05227262, + 1050.0,-2355899.78463069,-4675252.60226762,3630913.18257437, + 1060.0,-2355650.65289051,-4675336.59885772,3630966.30645147, + 1070.0,-2355401.51699122,-4675420.58717452,3631019.42390381, + 1080.0,-2355152.37693328,-4675504.56721785,3631072.5349313, + 1090.0,-2354903.2327171,-4675588.53898758,3631125.63953384, + 1.1e3,-2354654.08434313,-4675672.50248355,3631178.73771134, + 1110.0,-2354404.86337217,-4675754.50046618,3631234.37690825, + 1120.0,-2354155.84214723,-4675830.29554952,3631297.80148619, + 1130.0,-2353909.99308372,-4675880.61174319,3631391.75187422, + 1140.0,-2353667.55938687,-4675917.7532863,3631500.33400567, + 1150.0,-2353425.14548842,-4675954.80919402,3631608.99321685, + 1160.0,-2353182.7274392,-4675991.85682064,3631717.64599126, + 1170.0,-2352940.30523964,-4676028.89616608,3631826.29232871, + 1180.0,-2352697.87889015,-4676065.92723028,3631934.93222899, + 1190.0,-2352455.44839119,-4676102.95001317,3632043.56569193, + 1.2e3,-2352213.01374317,-4676139.9645147,3632152.19271733, + 1210.0,-2351970.57494653,-4676176.97073479,3632260.81330501, + 1220.0,-2351728.13200169,-4676213.96867339,3632369.42745476, + 1230.0,-2351485.68490907,-4676250.95833043,3632478.03516641, + 1240.0,-2351243.23366913,-4676287.93970586,3632586.63643975, + 1250.0,-2351000.77828228,-4676324.91279958,3632695.2312746, + 1260.0,-2350758.31874895,-4676361.87761156,3632803.81967077, + 1270.0,-2350515.85506957,-4676398.83414172,3632912.40162807, + 1280.0,-2350273.38724458,-4676435.78239001,3633020.9771463, + 1290.0,-2350029.47875804,-4676477.3914753,3633124.49944636, + 1.3e3,-2349785.42349382,-4676519.45587927,3633227.51421022, + 1310.0,-2349541.36408501,-4676561.51200187,3633330.52253589, + 1320.0,-2349297.30053206,-4676603.55984302,3633433.52442318, + 1330.0,-2349053.2328354,-4676645.59940266,3633536.51987191, + 1340.0,-2348809.16099546,-4676687.63068071,3633639.50888189, + 1350.0,-2348565.08501267,-4676729.65367709,3633742.49145297, + 1360.0,-2348321.00488746,-4676771.66839174,3633845.46758493, + 1370.0,-2348076.92062027,-4676813.67482458,3633948.43727762, + 1380.0,-2347832.83221153,-4676855.67297554,3634051.40053084, + 1390.0,-2347588.73966167,-4676897.66284454,3634154.35734442, + 1.4e3,-2347344.64297113,-4676939.64443151,3634257.30771818, + 1410.0,-2347101.04731466,-4676979.96034855,3634362.04616856, + 1420.0,-2346858.26575513,-4677017.5834931,3634469.6847769, + 1430.0,-2346614.99348312,-4677056.89461847,3634575.46081166, + 1440.0,-2346369.55744615,-4677103.7262244,3634672.99207759, + 1450.0,-2346124.8248997,-4677147.9423086,3634773.39569376, + 1460.0,-2345880.74403986,-4677189.73374292,3634876.46090671, + 1470.0,-2345636.65904236,-4677231.51689469,3634979.51967852, + 1480.0,-2345392.56990766,-4677273.29176384,3635082.57200902, + 1490.0,-2345148.47663614,-4677315.05835029,3635185.61789803, + 1.5e3,-2344904.37922829,-4677356.81665397,3635288.65734536 + ] + } + } +] diff --git a/Apps/SampleData/MultipartVehicle_part2.czml b/Apps/SampleData/MultipartVehicle_part2.czml new file mode 100644 index 000000000000..a1a7f69045b5 --- /dev/null +++ b/Apps/SampleData/MultipartVehicle_part2.czml @@ -0,0 +1,174 @@ +[ + { + "id":"document", + "version":"1.0" + }, + { + "id":"Vehicle", + "properties" : { + "fuel_remaining" : { + "epoch":"2012-08-04T16:00:00Z", + "number": [ + 3000, 19.9 + ] + } + }, + "position":{ + "interpolationAlgorithm":"LAGRANGE", + "interpolationDegree":1, + "epoch":"2012-08-04T16:00:00Z", + "cartesian":[ + 1510.0,-2344660.2776845,-4677398.56667482,3635391.69035084, + 1520.0,-2344416.17200522,-4677440.30841274,3635494.71691428, + 1530.0,-2344172.06219089,-4677482.04186768,3635597.7370355, + 1540.0,-2343927.94824192,-4677523.76703957,3635700.75071434, + 1550.0,-2343683.83015876,-4677565.48392832,3635803.75795058, + 1560.0,-2343439.70794184,-4677607.19253388,3635906.75874406, + 1570.0,-2343195.58159159,-4677648.89285615,3636009.75309461, + 1580.0,-2342951.45110844,-4677690.58489508,3636112.74100204, + 1590.0,-2342707.31649283,-4677732.2686506,3636215.72246616, + 1.6e3,-2342463.17774519,-4677773.94412263,3636318.6974868, + 1610.0,-2342219.03486595,-4677815.61131108,3636421.66606378, + 1620.0,-2341974.88785554,-4677857.2702159,3636524.6281969, + 1630.0,-2341730.7367144,-4677898.92083702,3636627.583886, + 1640.0,-2341486.58144295,-4677940.56317435,3636730.5331309, + 1650.0,-2341242.42204163,-4677982.19722784,3636833.4759314, + 1660.0,-2340998.25851088,-4678023.8229974,3636936.41228734, + 1670.0,-2340754.09085112,-4678065.44048297,3637039.34219853, + 1680.0,-2340509.91906279,-4678107.04968447,3637142.26566479, + 1690.0,-2340265.74314632,-4678148.65060182,3637245.18268593, + 1.7e3,-2340021.56310214,-4678190.24323497,3637348.09326179, + 1710.0,-2339777.37893069,-4678231.82758383,3637450.99739218, + 1720.0,-2339533.1906324,-4678273.40364834,3637553.8950769, + 1730.0,-2339288.99820769,-4678314.97142841,3637656.7863158, + 1740.0,-2339044.80165702,-4678356.530924,3637759.67110868, + 1750.0,-2338800.60098079,-4678398.082135,3637862.54945536, + 1760.0,-2338554.70615885,-4678446.63979812,3637957.53985359, + 1770.0,-2338307.34044549,-4678501.27725608,3638045.68346556, + 1780.0,-2338059.970607,-4678555.90643107,3638133.82063425, + 1790.0,-2337812.5966438,-4678610.527323,3638221.9513595, + 1.8e3,-2337565.21855632,-4678665.13993177,3638310.07564116, + 1810.0,-2337317.836345,-4678719.74425728,3638398.19347906, + 1820.0,-2337070.45001029,-4678774.34029945,3638486.30487305, + 1830.0,-2336823.05955262,-4678828.92805817,3638574.40982299, + 1840.0,-2336575.66497242,-4678883.50753334,3638662.50832871, + 1850.0,-2336327.1545835,-4678945.50581105,3638741.82308353, + 1860.0,-2336079.08419082,-4679004.31007705,3638824.91716907, + 1870.0,-2335832.84388937,-4679053.5438294,3638919.0484984, + 1880.0,-2335586.22540763,-4679104.36395041,3639011.37515412, + 1890.0,-2335339.10405755,-4679157.40812923,3639101.16216049, + 1.9e3,-2335091.77487812,-4679211.48259624,3639189.74611699, + 1910.0,-2334844.32516034,-4679266.14231747,3639277.63977539, + 1920.0,-2334596.87132354,-4679320.79375442,3639365.52698836, + 1930.0,-2334349.41336814,-4679375.436907,3639453.40775576, + 1940.0,-2334101.95129458,-4679430.07177509,3639541.28207743, + 1950.0,-2333854.48510331,-4679484.69835863,3639629.14995324, + 1960.0,-2333607.01479475,-4679539.31665749,3639717.011383, + 1970.0,-2333359.54036938,-4679593.9266716,3639804.86636658, + 1980.0,-2333112.06182757,-4679648.52840084,3639892.71490381, + 1990.0,-2332864.57916982,-4679703.12184515,3639980.55699455, + 2e3,-2332617.09239653,-4679757.70700441,3640068.39263865, + 2010.0,-2332369.60150815,-4679812.28387853,3640156.22183593, + 2020.0,-2332122.10650513,-4679866.85246742,3640244.04458626, + 2030.0,-2331874.6073879,-4679921.41277097,3640331.86088948, + 2040.0,-2331627.10415689,-4679975.96478911,3640419.67074542, + 2050.0,-2331379.59681254,-4680030.50852172,3640507.47415395, + 2060.0,-2331132.08535529,-4680085.04396871,3640595.27111491, + 2070.0,-2330884.56978558,-4680139.57113,3640683.06162813, + 2080.0,-2330637.7285141,-4680190.9395453,3640774.43710409, + 2090.0,-2330396.40663506,-4680225.151778,3640884.18994119, + 2.1e3,-2330163.10529565,-4680238.35673454,3641015.64723137, + 2110.0,-2329932.54342047,-4680245.95830447,3641152.4979079, + 2120.0,-2329701.97743661,-4680253.55158212,3641289.34212236, + 2130.0,-2329471.40734447,-4680261.13656747,3641426.1798745, + 2140.0,-2329240.83314447,-4680268.71326052,3641563.01116407, + 2150.0,-2329010.25483703,-4680276.28166125,3641699.83599085, + 2160.0,-2328779.67242253,-4680283.84176964,3641836.65435457, + 2170.0,-2328549.08590139,-4680291.3935857,3641973.46625501, + 2180.0,-2328318.49527404,-4680298.9371094,3642110.27169193, + 2190.0,-2328087.90054086,-4680306.47234074,3642247.07066509, + 2.2e3,-2327857.30170227,-4680313.99927971,3642383.86317423, + 2210.0,-2327626.69875869,-4680321.51792628,3642520.64921913, + 2220.0,-2327396.09171053,-4680329.02828045,3642657.42879954, + 2230.0,-2327165.48055818,-4680336.53034222,3642794.20191522, + 2240.0,-2326934.86530206,-4680344.02411158,3642930.96856595, + 2250.0,-2326704.24594258,-4680351.50958849,3643067.72875145, + 2260.0,-2326473.62248015,-4680358.98677296,3643204.48247151, + 2270.0,-2326242.99491518,-4680366.45566498,3643341.22972587, + 2280.0,-2326012.36324808,-4680373.91626453,3643477.97051431, + 2290.0,-2325781.72747925,-4680381.36857161,3643614.70483658, + 2.3e3,-2325551.08760911,-4680388.8125862,3643751.43269243, + 2310.0,-2325320.44363806,-4680396.24830829,3643888.15408163, + 2320.0,-2325089.79556653,-4680403.67573787,3644024.86900394, + 2330.0,-2324859.14339491,-4680411.09487493,3644161.57745912, + 2340.0,-2324628.48712361,-4680418.50571946,3644298.27944692, + 2350.0,-2324397.82675305,-4680425.90827145,3644434.97496711, + 2360.0,-2324167.16228363,-4680433.30253088,3644571.66401943, + 2370.0,-2323936.49371575,-4680440.68849774,3644708.34660367, + 2380.0,-2323705.82104985,-4680448.06617203,3644845.02271957, + 2390.0,-2323469.56457492,-4680467.5014928,3644969.83533712, + 2.4e3,-2323221.0622471,-4680536.92026793,3645038.62868541, + 2410.0,-2322977.80807152,-4680647.84474283,3645051.13992706, + 2420.0,-2322736.38267079,-4680764.64879631,3645054.97445125, + 2430.0,-2322494.9531628,-4680881.44457147,3645058.80252916, + 2440.0,-2322246.73779559,-4680970.18567741,3645102.6916578, + 2450.0,-2322002.53536924,-4681011.67497706,3645204.29544116, + 2460.0,-2321760.17882828,-4681045.91276755,3645313.96140727, + 2470.0,-2321513.45780318,-4681097.83227119,3645403.81543108, + 2480.0,-2321264.12028187,-4681176.5278287,3645461.15182806, + 2490.0,-2321016.67956395,-4681275.07588805,3645491.94679701, + 2.5e3,-2320769.58665668,-4681375.58594799,3645519.99961511, + 2510.0,-2320522.489649,-4681476.08772649,3645548.04598517, + 2520.0,-2320275.38854134,-4681576.5812234,3645576.08590716, + 2530.0,-2320027.79132447,-4681674.92626117,3645607.16040563, + 2540.0,-2319780.10642819,-4681772.89945148,3645638.74505341, + 2550.0,-2319532.41743371,-4681870.86435933,3645670.32325269, + 2560.0,-2319284.72434146,-4681968.82098454,3645701.89500342, + 2570.0,-2319037.02715189,-4682066.76932694,3645733.46030553, + 2580.0,-2318789.32586542,-4682164.70938637,3645765.01915898, + 2590.0,-2318542.12778997,-4682264.83612099,3645793.45100625, + 2.6e3,-2318295.04606153,-4682365.47569326,3645821.1355313, + 2610.0,-2318047.960237,-4682466.10698239,3645848.81360781, + 2620.0,-2317814.2136072,-4682593.27748455,3645834.19098143, + 2630.0,-2317595.23970305,-4682740.17783799,3645785.0493345, + 2640.0,-2317367.51895524,-4682877.20966947,3645754.00173306, + 2650.0,-2317125.45200646,-4682991.24847734,3645761.32874791, + 2660.0,-2316877.25477931,-4683085.09280115,3645798.27256564, + 2670.0,-2316627.76750724,-4683171.42599527,3645845.59470414, + 2680.0,-2316378.41358519,-4683244.04371304,3645910.31301292, + 2690.0,-2316132.23045195,-4683290.83587254,3646005.96208532, + 2.7e3,-2315886.04323336,-4683337.61973972,3646101.60469867, + 2710.0,-2315639.85192986,-4683384.3953145,3646197.24085278, + 2720.0,-2315393.65654188,-4683431.1625968,3646292.8705475, + 2730.0,-2315147.45706986,-4683477.92158654,3646388.49378265, + 2740.0,-2314901.25351424,-4683524.67228364,3646484.11055807, + 2750.0,-2314655.04587545,-4683571.41468801,3646579.72087358, + 2760.0,-2314408.83415392,-4683618.14879957,3646675.32472902, + 2770.0,-2314160.70351457,-4683675.04338742,3646759.15642247, + 2780.0,-2313911.58484161,-4683762.87653752,3646804.12173857, + 2790.0,-2313665.46479966,-4683867.13714076,3646826.2202591, + 2.8e3,-2313419.44574948,-4683971.81359651,3646847.70500867, + 2810.0,-2313173.422611,-4684076.48176683,3646869.18330826, + 2820.0,-2312927.39538468,-4684181.14165156,3646890.65515782, + 2830.0,-2312681.36407094,-4684285.79325049,3646912.12055732, + 2840.0,-2312435.3286702,-4684390.43656345,3646933.57950672, + 2850.0,-2312188.68106177,-4684492.14732495,3646959.14603188, + 2860.0,-2311939.2573735,-4684576.69232926,3647008.34294359, + 2870.0,-2311690.53184969,-4684637.85664359,3647086.91208669, + 2880.0,-2311447.74208361,-4684672.93987918,3647195.00103929, + 2890.0,-2311210.79617263,-4684692.62730813,3647319.03447912, + 2.9e3,-2310974.46339778,-4684710.81501905,3647444.57574765, + 2910.0,-2310738.12654788,-4684728.99443131,3647570.11054652, + 2920.0,-2310501.78562334,-4684747.16554491,3647695.63887553, + 2930.0,-2310265.44062458,-4684765.3283598,3647821.16073445, + 2940.0,-2310029.09155203,-4684783.48287596,3647946.67612307, + 2950.0,-2309792.7384061,-4684801.62909336,3648072.18504115, + 2960.0,-2309556.38118721,-4684819.76701196,3648197.6874885, + 2970.0,-2309320.01989578,-4684837.89663174,3648323.18346488, + 2980.0,-2309083.65453223,-4684856.01795267,3648448.67297006, + 2990.0,-2308847.28509697,-4684874.13097471,3648574.15600382, + 3e3,-2308612.03960687,-4684889.78192809,3648702.05314508 + ] + } + } +] diff --git a/Apps/SampleData/MultipartVehicle_part3.czml b/Apps/SampleData/MultipartVehicle_part3.czml new file mode 100644 index 000000000000..610d6cb8ea15 --- /dev/null +++ b/Apps/SampleData/MultipartVehicle_part3.czml @@ -0,0 +1,114 @@ +[ + { + "id":"document", + "version":"1.0" + }, + { + "id":"Vehicle", + "properties" : { + "fuel_remaining" : { + "epoch":"2012-08-04T16:00:00Z", + "number": [ + 4500, 18.6 + ] + } + }, + "position":{ + "interpolationAlgorithm":"LAGRANGE", + "interpolationDegree":1, + "epoch":"2012-08-04T16:00:00Z", + "cartesian":[ + 3010.0,-2308376.92124893,-4684905.13917681,3648830.22535859, + 3020.0,-2308141.79882057,-4684920.48812622,3648958.39109918, + 3030.0,-2307906.6723222,-4684935.82877629,3649086.55036665, + 3040.0,-2307671.54175424,-4684951.161127,3649214.70316074, + 3050.0,-2307436.40711711,-4684966.48517831,3649342.84948124, + 3060.0,-2307201.26841123,-4684981.80093021,3649470.98932793, + 3070.0,-2306966.87575715,-4684995.59988061,3649600.57521538, + 3080.0,-2306740.26452813,-4684994.89962227,3649743.74372413, + 3090.0,-2306534.08725296,-4684964.25689728,3649912.24261594, + 3.1e3,-2306334.50436505,-4684925.31923873,3650087.15846994, + 3110.0,-2306134.91740775,-4684886.37327513,3650262.06783161, + 3120.0,-2305935.32638143,-4684847.41900655,3650436.97070063, + 3130.0,-2305735.73128644,-4684808.45643306,3650611.86707671, + 3140.0,-2305536.13212312,-4684769.48555472,3650786.75695952, + 3150.0,-2305336.52889186,-4684730.50637162,3650961.64034877, + 3160.0,-2305136.92159298,-4684691.51888382,3651136.51724414, + 3170.0,-2304937.31022685,-4684652.5230914,3651311.38764532, + 3180.0,-2304737.69479383,-4684613.51899443,3651486.25155201, + 3190.0,-2304538.07529427,-4684574.50659297,3651661.1089639, + 3.2e3,-2304338.45172854,-4684535.48588711,3651835.95988067, + 3210.0,-2304138.82409697,-4684496.45687691,3652010.80430203, + 3220.0,-2303939.19239993,-4684457.41956245,3652185.64222766, + 3230.0,-2303739.55663778,-4684418.37394379,3652360.47365726, + 3240.0,-2303539.91681086,-4684379.32002102,3652535.29859051, + 3250.0,-2303340.27291955,-4684340.25779419,3652710.11702711, + 3260.0,-2303140.62496419,-4684301.18726339,3652884.92896676, + 3270.0,-2302940.97294513,-4684262.10842868,3653059.73440913, + 3280.0,-2302741.31686273,-4684223.02129014,3653234.53335393, + 3290.0,-2302541.65671735,-4684183.92584784,3653409.32580085, + 3.3e3,-2302341.99250935,-4684144.82210185,3653584.11174957, + 3310.0,-2302142.32423908,-4684105.71005224,3653758.8911998, + 3320.0,-2301942.65190688,-4684066.5896991,3653933.66415121, + 3330.0,-2301742.97551314,-4684027.46104248,3654108.43060351, + 3340.0,-2301543.29505819,-4683988.32408245,3654283.19055638, + 3350.0,-2301343.61054239,-4683949.1788191,3654457.94400952, + 3360.0,-2301143.6827542,-4683910.31378064,3654632.47326169, + 3370.0,-2300935.59009252,-4683881.78114292,3654798.93579703, + 3380.0,-2300718.00641879,-4683866.2483759,3654954.7652541, + 3390.0,-2300494.16379595,-4683860.19477673,3655102.42228967, + 3.4e3,-2300270.31711639,-4683854.13287765,3655250.07283467, + 3410.0,-2300043.34951879,-4683853.58162531,3655392.64057225, + 3420.0,-2299798.57046824,-4683898.20991075,3655488.81767963, + 3430.0,-2299550.24237985,-4683986.73183877,3655531.32743747, + 3440.0,-2299302.19677383,-4684083.86163291,3655562.68543478, + 3450.0,-2299054.1471058,-4684180.98314055,3655594.03696606, + 3460.0,-2298806.09337623,-4684278.0963615,3655625.38203125, + 3470.0,-2298558.03558554,-4684375.2012956,3655656.7206303, + 3480.0,-2298309.97373417,-4684472.29794267,3655688.05276314, + 3490.0,-2298061.90782256,-4684569.38630254,3655719.37842974, + 3.5e3,-2297812.62950649,-4684659.16576897,3655760.74476938, + 3510.0,-2297564.67551281,-4684714.88851845,3655844.61445788, + 3520.0,-2297325.87128825,-4684739.27586645,3655962.6382433, + 3530.0,-2297109.10378606,-4684723.02803401,3656118.60908182, + 3540.0,-2296920.05504158,-4684672.53835408,3656300.84320686, + 3550.0,-2296752.93245501,-4684599.85791996,3656497.61758286, + 3560.0,-2296586.9421969,-4684526.13410832,3656694.99365465, + 3570.0,-2296420.94788222,-4684452.40199052,3656892.36321221, + 3580.0,-2296254.94951125,-4684378.66156669,3657089.72625519, + 3590.0,-2296088.9470843,-4684304.91283696,3657287.08278322, + 3.6e3,-2295922.94060166,-4684231.15580147,3657484.43279599, + 3610.0,-2295756.93006363,-4684157.39046036,3657681.77629313, + 3620.0,-2295590.91547051,-4684083.61681375,3657879.11327429, + 3630.0,-2295424.89682259,-4684009.83486178,3658076.44373913, + 3640.0,-2295258.87412016,-4683936.04460459,3658273.7676873, + 3650.0,-2295092.84736354,-4683862.24604231,3658471.08511845, + 3660.0,-2294926.816553,-4683788.43917507,3658668.39603222, + 3670.0,-2294760.78168886,-4683714.62400301,3658865.70042829, + 3680.0,-2294594.74277139,-4683640.80052626,3659062.99830628, + 3690.0,-2294428.69980091,-4683566.96874495,3659260.28966586, + 3.7e3,-2294262.65277771,-4683493.12865923,3659457.57450667, + 3710.0,-2294096.43623008,-4683419.42772878,3659654.7684149, + 3720.0,-2293929.99691308,-4683345.91340302,3659851.84422781, + 3730.0,-2293763.5535443,-4683272.39077326,3660048.91352102, + 3740.0,-2293597.10612405,-4683198.85983962,3660245.97629416, + 3750.0,-2293430.65465261,-4683125.32060225,3660443.03254689, + 3760.0,-2293260.27703319,-4683055.37159052,3660637.95010862, + 3770.0,-2293061.03795256,-4683015.37278429,3660812.74893793, + 3780.0,-2292840.33611906,-4683005.33804065,3660962.80786551, + 3790.0,-2292608.06534954,-4683013.68106842,3661096.69339637, + 3.8e3,-2292375.79053761,-4683022.01579957,3661230.57243073, + 3810.0,-2292143.51168366,-4683030.3422341,3661364.44496835, + 3820.0,-2291911.22878812,-4683038.66037197,3661498.311009, + 3830.0,-2291675.19260926,-4683056.38281492,3661622.54366342, + 3840.0,-2291444.11976688,-4683176.79169794,3661613.21949622, + 3850.0,-2291484.73184242,-4683029.11180042,3661775.58481802, + 3860.0,-2291570.38402198,-4682848.00432402,3661952.40110212, + 3870.0,-2291504.75912943,-4682707.90868127,3662171.13586741, + 3880.0,-2291437.4576409,-4682568.41526623,3662390.12822003, + 3890.0,-2291370.1520906,-4682428.91355119,3662609.11403735, + 3894.996219574019,-2291336.52323822,-4682359.21232197,3662718.52171165 + ] + } + } +] diff --git a/Apps/Sandcastle/gallery/3D Tiles Clipping Planes.html b/Apps/Sandcastle/gallery/3D Tiles Clipping Planes.html index ca5698c3faa5..df2f4e429d3e 100644 --- a/Apps/Sandcastle/gallery/3D Tiles Clipping Planes.html +++ b/Apps/Sandcastle/gallery/3D Tiles Clipping Planes.html @@ -48,7 +48,6 @@ // Add a clipping plane, a plane geometry to show the representation of the // plane, and control the magnitude of the plane distance with the mouse. -// Clipping planes are not currently supported in Internet Explorer. var viewer = new Cesium.Viewer('cesiumContainer', { infoBox: false, @@ -103,7 +102,7 @@ } }, Cesium.ScreenSpaceEventType.MOUSE_MOVE); -var scratchPlane = new Cesium.Plane(Cesium.Cartesian3.UNIT_X, 0.0); +var scratchPlane = new Cesium.ClippingPlane(Cesium.Cartesian3.UNIT_X, 0.0); function createPlaneUpdateFunction(plane, transform) { return function () { plane.distance = targetY; @@ -114,7 +113,7 @@ var tileset; function loadTileset(url) { var clippingPlanes = [ - new Cesium.Plane(new Cesium.Cartesian3(0.0, 0.0, -1.0), -100.0) + new Cesium.ClippingPlane(new Cesium.Cartesian3(0.0, 0.0, -1.0), -100.0) ]; tileset = viewer.scene.primitives.add(new Cesium.Cesium3DTileset({ @@ -156,7 +155,7 @@ var modelEntityClippingPlanes; function loadModel(url) { var clippingPlanes = [ - new Cesium.Plane(new Cesium.Cartesian3(0.0, 0.0, -1.0), -100.0) + new Cesium.ClippingPlane(new Cesium.Cartesian3(0.0, 0.0, -1.0), -100.0) ]; modelEntityClippingPlanes = new Cesium.ClippingPlaneCollection({ diff --git a/Apps/Sandcastle/gallery/Multi-part CZML.html b/Apps/Sandcastle/gallery/Multi-part CZML.html new file mode 100644 index 000000000000..68b80c6b1fa2 --- /dev/null +++ b/Apps/Sandcastle/gallery/Multi-part CZML.html @@ -0,0 +1,158 @@ + + + + + + + + + Cesium Demo + + + + + + +
+

Loading...

+
+ + + + diff --git a/Apps/Sandcastle/gallery/Multi-part CZML.jpg b/Apps/Sandcastle/gallery/Multi-part CZML.jpg new file mode 100644 index 000000000000..f02df208e50c Binary files /dev/null and b/Apps/Sandcastle/gallery/Multi-part CZML.jpg differ diff --git a/Apps/Sandcastle/gallery/Terrain Clipping Planes.html b/Apps/Sandcastle/gallery/Terrain Clipping Planes.html index faf4a6762e82..ecfa7394c8b0 100644 --- a/Apps/Sandcastle/gallery/Terrain Clipping Planes.html +++ b/Apps/Sandcastle/gallery/Terrain Clipping Planes.html @@ -40,7 +40,6 @@ 'use strict'; //Sandcastle_Begin // Use clipping planes to selectively hide parts of the globe surface. -// Clipping planes are not currently supported in Internet Explorer. var viewer = new Cesium.Viewer('cesiumContainer', { skyAtmosphere: false, @@ -74,10 +73,10 @@ globe.clippingPlanes = new Cesium.ClippingPlaneCollection({ modelMatrix : entity.computeModelMatrix(Cesium.JulianDate.now()), planes : [ - new Cesium.Plane(new Cesium.Cartesian3( 1.0, 0.0, 0.0), -700.0), - new Cesium.Plane(new Cesium.Cartesian3(-1.0, 0.0, 0.0), -700.0), - new Cesium.Plane(new Cesium.Cartesian3( 0.0, 1.0, 0.0), -700.0), - new Cesium.Plane(new Cesium.Cartesian3( 0.0, -1.0, 0.0), -700.0) + new Cesium.ClippingPlane(new Cesium.Cartesian3( 1.0, 0.0, 0.0), -700.0), + new Cesium.ClippingPlane(new Cesium.Cartesian3(-1.0, 0.0, 0.0), -700.0), + new Cesium.ClippingPlane(new Cesium.Cartesian3( 0.0, 1.0, 0.0), -700.0), + new Cesium.ClippingPlane(new Cesium.Cartesian3( 0.0, -1.0, 0.0), -700.0) ], edgeWidth: 1.0, edgeColor: Cesium.Color.WHITE diff --git a/Apps/Sandcastle/gallery/development/Many Clipping Planes.html b/Apps/Sandcastle/gallery/development/Many Clipping Planes.html new file mode 100644 index 000000000000..09bb82d8b791 --- /dev/null +++ b/Apps/Sandcastle/gallery/development/Many Clipping Planes.html @@ -0,0 +1,286 @@ + + + + + + + + + Cesium Demo + + + + + + +
+

Loading...

+
+ + + + + + + +
Distance + + + Plane Count + + +
+ +
+ + + diff --git a/Apps/Sandcastle/gallery/development/Many Clipping Planes.jpg b/Apps/Sandcastle/gallery/development/Many Clipping Planes.jpg new file mode 100644 index 000000000000..7a2f4bb481bd Binary files /dev/null and b/Apps/Sandcastle/gallery/development/Many Clipping Planes.jpg differ diff --git a/CHANGES.md b/CHANGES.md index 66f77c6c12e9..86f0d5c3cce3 100644 --- a/CHANGES.md +++ b/CHANGES.md @@ -6,12 +6,24 @@ Change Log ##### Breaking Changes :mega: * `Camera.distanceToBoundingSphere` now returns the signed distance to the bounding sphere. Positive values indicate that the bounding sphere is in the positive half-plane of the camera position and view direction while a negative value indicates it is in the negative half-plane. +##### Deprecated :hourglass_flowing_sand: +* `ClippingPlaneCollection` is now supported in Internet Explorer, so `ClippingPlaneCollection.isSupported` has been deprecated and will be removed in Cesium 1.45. +* `ClippingPlaneCollection` should now be used with `ClippingPlane` objects instead of `Plane`. Use of `Plane` objects has been deprecated and will be removed in Cesium 1.45. + ##### Additions :tada: +* Added support for glTF models with [Draco geometry compression](https://github.com/fanzhanggoogle/glTF/blob/KHR_mesh_compression/extensions/Khronos/KHR_draco_mesh_compression/README.md). +* `ClippingPlaneCollection` updates [#6201](https://github.com/AnalyticalGraphicsInc/cesium/pull/6201) + * Removed the 6-clipping-plane limit. + * Added support for Internet Explorer. + * Added a `ClippingPlane` object to be used with `ClippingPlaneCollection`. +* Updated `WebMapServiceImageryProvider` so it can take an srs or crs string to pass to the resource query parameters based on the WMS version. [#6223](https://github.com/AnalyticalGraphicsInc/cesium/issues/6223) +* Added a multi-part CZML example to Sandcastle. [#6320](https://github.com/AnalyticalGraphicsInc/cesium/pull/6320) * Added option `logDepthBuffer` to `Viewer`. With this option there is typically a single frustum using logarithmic depth rendered. This increases performance by issuing less draw calls to the GPU and helps to avoid artifacts on the connection of two frustums. [#5851](https://github.com/AnalyticalGraphicsInc/cesium/pull/5851) * Added `Math.log2` to compute the base 2 logarithm of a number. ##### Fixes :wrench: * Fixed support of glTF-supplied tangent vectors. [#6302](https://github.com/AnalyticalGraphicsInc/cesium/pull/6302) +* Fixed improper zoom during model load failure. [#6305](https://github.com/AnalyticalGraphicsInc/cesium/pull/6305) ### 1.43 - 2018-03-01 diff --git a/CONTRIBUTORS.md b/CONTRIBUTORS.md index 8fd79a6ee320..70541a8c23a8 100644 --- a/CONTRIBUTORS.md +++ b/CONTRIBUTORS.md @@ -172,3 +172,4 @@ See [CONTRIBUTING.md](CONTRIBUTING.md) for details on how to contribute to Cesiu * [Nacho Carnicero](https://github.com/nacho-carnicero) * [Y.Selim Abidin](https://github.com/SelimAbidin) * [Tamar Cohen](https://github.com/tamarmot) +* [Stephen Wiseman](https://github.com/srwiseman) diff --git a/LICENSE.md b/LICENSE.md index 7251c3dfd407..8c32b6e919b3 100644 --- a/LICENSE.md +++ b/LICENSE.md @@ -670,6 +670,22 @@ https://github.com/KhronosGroup/glTF-WebGL-PBR >CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE >OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. +### Draco + +https://github.com/google/draco + +>Licensed under the Apache License, Version 2.0 (the "License"); you may not +>use this file except in compliance with the License. You may obtain a copy of +>the License at +> +> +> +>Unless required by applicable law or agreed to in writing, software +>distributed under the License is distributed on an "AS IS" BASIS, WITHOUT +>WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the +>License for the specific language governing permissions and limitations under +>the License. + Tests ===== diff --git a/Source/Core/Cartesian4.js b/Source/Core/Cartesian4.js index a48d1f810dac..479ce4d1f517 100644 --- a/Source/Core/Cartesian4.js +++ b/Source/Core/Cartesian4.js @@ -817,5 +817,93 @@ define([ return '(' + this.x + ', ' + this.y + ', ' + this.z + ', ' + this.w + ')'; }; + var scratchFloatArray = new Float32Array(1); + var SHIFT_LEFT_8 = 256.0; + var SHIFT_LEFT_16 = 65536.0; + var SHIFT_LEFT_24 = 16777216.0; + + var SHIFT_RIGHT_8 = 1.0 / SHIFT_LEFT_8; + var SHIFT_RIGHT_16 = 1.0 / SHIFT_LEFT_16; + var SHIFT_RIGHT_24 = 1.0 / SHIFT_LEFT_24; + + var BIAS = 38.0; + + /** + * Packs an arbitrary floating point value to 4 values representable using uint8. + * + * @param {Number} value A floating point number + * @param {Cartesian4} [result] The Cartesian4 that will contain the packed float. + * @returns {Cartesian4} A Cartesian4 representing the float packed to values in x, y, z, and w. + */ + Cartesian4.packFloat = function(value, result) { + //>>includeStart('debug', pragmas.debug); + Check.typeOf.number('value', value); + //>>includeEnd('debug'); + + if (!defined(result)) { + result = new Cartesian4(); + } + + // Force the value to 32 bit precision + scratchFloatArray[0] = value; + value = scratchFloatArray[0]; + + if (value === 0.0) { + return Cartesian4.clone(Cartesian4.ZERO, result); + } + + var sign = value < 0.0 ? 1.0 : 0.0; + var exponent; + + if (!isFinite(value)) { + value = 0.1; + exponent = BIAS; + } else { + value = Math.abs(value); + exponent = Math.floor(CesiumMath.logBase(value, 10)) + 1.0; + value = value / Math.pow(10.0, exponent); + } + + var temp = value * SHIFT_LEFT_8; + result.x = Math.floor(temp); + temp = (temp - result.x) * SHIFT_LEFT_8; + result.y = Math.floor(temp); + temp = (temp - result.y) * SHIFT_LEFT_8; + result.z = Math.floor(temp); + result.w = (exponent + BIAS) * 2.0 + sign; + + return result; + }; + + /** + * Unpacks a float packed using Cartesian4.packFloat. + * + * @param {Cartesian4} packedFloat A Cartesian4 containing a float packed to 4 values representable using uint8. + * @returns {Number} The unpacked float. + */ + Cartesian4.unpackFloat = function(packedFloat) { + //>>includeStart('debug', pragmas.debug); + Check.typeOf.object('packedFloat', packedFloat); + //>>includeEnd('debug'); + + var temp = packedFloat.w / 2.0; + var exponent = Math.floor(temp); + var sign = (temp - exponent) * 2.0; + exponent = exponent - BIAS; + + sign = sign * 2.0 - 1.0; + sign = -sign; + + if (exponent >= BIAS) { + return sign < 0.0 ? Number.NEGATIVE_INFINITY : Number.POSITIVE_INFINITY; + } + + var unpacked = sign * packedFloat.x * SHIFT_RIGHT_8; + unpacked += sign * packedFloat.y * SHIFT_RIGHT_16; + unpacked += sign * packedFloat.z * SHIFT_RIGHT_24; + + return unpacked * Math.pow(10.0, exponent); + }; + return Cartesian4; }); diff --git a/Source/Core/ClippingPlane.js b/Source/Core/ClippingPlane.js new file mode 100644 index 000000000000..08b652212cc4 --- /dev/null +++ b/Source/Core/ClippingPlane.js @@ -0,0 +1,155 @@ +define([ + './Cartesian3', + './Check', + './defined', + './defineProperties' + ], function( + Cartesian3, + Check, + defined, + defineProperties) { + 'use strict'; + + /** + * A Plane in Hessian Normal form to be used with ClippingPlaneCollection. + * Compatible with mathematics functions in Plane.js + * + * @alias ClippingPlane + * @constructor + * + * @param {Cartesian3} normal The plane's normal (normalized). + * @param {Number} distance The shortest distance from the origin to the plane. The sign of + * distance determines which side of the plane the origin + * is on. If distance is positive, the origin is in the half-space + * in the direction of the normal; if negative, the origin is in the half-space + * opposite to the normal; if zero, the plane passes through the origin. + */ + function ClippingPlane(normal, distance) { + this._distance = distance; + this._normal = new UpdateChangedCartesian3(normal, this); + this.onChangeCallback = undefined; + this.index = -1; // to be set by ClippingPlaneCollection + } + + defineProperties(ClippingPlane.prototype, { + /** + * The shortest distance from the origin to the plane. The sign of + * distance determines which side of the plane the origin + * is on. If distance is positive, the origin is in the half-space + * in the direction of the normal; if negative, the origin is in the half-space + * opposite to the normal; if zero, the plane passes through the origin. + * + * @type {Number} + * @memberof ClippingPlane.prototype + */ + distance : { + get : function() { + return this._distance; + }, + set : function(value) { + //>>includeStart('debug', pragmas.debug); + Check.typeOf.number('value', value); + //>>includeEnd('debug'); + if (defined(this.onChangeCallback) && value !== this._distance) { + this.onChangeCallback(this.index); + } + this._distance = value; + } + }, + /** + * The plane's normal. + * + * @type {Cartesian3} + * @memberof ClippingPlane.prototype + */ + normal : { + get : function() { + return this._normal; + }, + set : function(value) { + //>>includeStart('debug', pragmas.debug); + Check.typeOf.object('value', value); + //>>includeEnd('debug'); + if (defined(this.onChangeCallback) && !Cartesian3.equals(this._normal._cartesian3, value)) { + this.onChangeCallback(this.index); + } + // Set without firing callback again + Cartesian3.clone(value, this._normal._cartesian3); + } + } + }); + + /** + * Create a ClippingPlane from a Plane object. + * + * @param {Plane} plane The plane containing parameters to copy + * @param {ClippingPlane} [result] The object on which to store the result + * @returns {ClippingPlane} The ClippingPlane generated from the plane's parameters. + */ + ClippingPlane.fromPlane = function(plane, result) { + //>>includeStart('debug', pragmas.debug); + Check.typeOf.object('plane', plane); + //>>includeEnd('debug'); + + if (!defined(result)) { + result = new ClippingPlane(plane.normal, plane.distance); + } else { + result.normal = plane.normal; + result.distance = plane.distance; + } + return result; + }; + + /** + * Clones the ClippingPlane without setting its ownership. + * @param {ClippingPlane} clippingPlane The ClippingPlane to be cloned + * @param {ClippingPlane} [result] The object on which to store the cloned parameters. + * @returns {ClippingPlane} a clone of the input ClippingPlane + */ + ClippingPlane.clone = function(clippingPlane, result) { + if (!defined(result)) { + return new ClippingPlane(clippingPlane.normal, clippingPlane.distance); + } + result.normal = clippingPlane.normal; + result.distance = clippingPlane.distance; + return result; + }; + + /** + * Wrapper on Cartesian3 that allows detection of Plane changes from "members of members," for example: + * + * var clippingPlane = new ClippingPlane(...); + * clippingPlane.normal.z = -1.0; + * + * @private + */ + function UpdateChangedCartesian3(normal, clippingPlane) { + this._clippingPlane = clippingPlane; + this._cartesian3 = Cartesian3.clone(normal); + } + + function makeGetterStter(key) { + return { + get : function() { + return this._cartesian3[key]; + }, + set : function(value) { + //>>includeStart('debug', pragmas.debug); + Check.typeOf.number('value', value); + //>>includeEnd('debug'); + if (defined(this._clippingPlane.onChangeCallback) && value !== this._cartesian3[key]) { + this._clippingPlane.onChangeCallback(this._clippingPlane.index); + } + this._cartesian3[key] = value; + } + }; + } + + defineProperties(UpdateChangedCartesian3.prototype, { + x : makeGetterStter('x'), + y : makeGetterStter('y'), + z : makeGetterStter('z') + }); + + return ClippingPlane; +}); diff --git a/Source/Core/ClippingPlaneCollection.js b/Source/Core/ClippingPlaneCollection.js index 56369d69202f..b1ca230c41d8 100644 --- a/Source/Core/ClippingPlaneCollection.js +++ b/Source/Core/ClippingPlaneCollection.js @@ -1,40 +1,68 @@ define([ + './AttributeCompression', + './Cartesian2', './Cartesian3', './Cartesian4', + './Math', './Check', + './ClippingPlane', './Color', './defaultValue', './defined', './defineProperties', + './deprecationWarning', + './destroyObject', './DeveloperError', './FeatureDetection', './Intersect', './Matrix4', - './Plane' + './PixelFormat', + './Plane', + '../Renderer/ContextLimits', + '../Renderer/PixelDatatype', + '../Renderer/Sampler', + '../Renderer/Texture', + '../Renderer/TextureMagnificationFilter', + '../Renderer/TextureMinificationFilter', + '../Renderer/TextureWrap' ], function( + AttributeCompression, + Cartesian2, Cartesian3, Cartesian4, + CesiumMath, Check, + ClippingPlane, Color, defaultValue, defined, defineProperties, + deprecationWarning, + destroyObject, DeveloperError, FeatureDetection, Intersect, Matrix4, - Plane) { + PixelFormat, + Plane, + ContextLimits, + PixelDatatype, + Sampler, + Texture, + TextureMagnificationFilter, + TextureMinificationFilter, + TextureWrap) { 'use strict'; /** * Specifies a set of clipping planes. Clipping planes selectively disable rendering in a region on the - * outside of the specified list of {@link Plane} objects. + * outside of the specified list of {@link ClippingPlane} objects for a single gltf model, 3D Tileset, or the globe. * * @alias ClippingPlaneCollection * @constructor * * @param {Object} [options] Object with the following properties: - * @param {Plane[]} [options.planes=[]] An array of up to 6 {@link Plane} objects used to selectively disable rendering on the outside of each plane. + * @param {ClippingPlane[]} [options.planes=[]] An array of {@link ClippingPlane} objects used to selectively disable rendering on the outside of each plane. * @param {Boolean} [options.enabled=true] Determines whether the clipping planes are active. * @param {Matrix4} [options.modelMatrix=Matrix4.IDENTITY] The 4x4 transformation matrix specifying an additional transform relative to the clipping planes original coordinate system. * @param {Boolean} [options.unionClippingRegions=false] If true, a region will be clipped if included in any plane in the collection. Otherwise, the region to be clipped must intersect the regions defined by all planes in this collection. @@ -44,20 +72,26 @@ define([ function ClippingPlaneCollection(options) { options = defaultValue(options, defaultValue.EMPTY_OBJECT); + this._planes = []; + this._containsUntrackablePlanes = false; + + // Do partial texture updates if just one plane is dirty. + // If many planes are dirty, refresh the entire texture. + this._dirtyIndex = -1; + this._manyDirtyPlanes = false; + + // Add each plane to check if it's actually a Plane object instead of a ClippingPlane. + // Use of Plane objects will be deprecated. var planes = options.planes; if (defined(planes)) { - this._planes = planes.slice(0); - } else { - this._planes = []; + var planesLength = planes.length; + for (var i = 0; i < planesLength; ++i) { + this.add(planes[i]); + } } - /** - * Determines whether the clipping planes are active. - * - * @type {Boolean} - * @default true - */ - this.enabled = defaultValue(options.enabled, true); + this._enabled = false; + this.enabled = defaultValue(options.enabled, true); // set using setter /** * The 4x4 transformation matrix specifying an additional transform relative to the clipping planes @@ -84,9 +118,18 @@ define([ */ this.edgeWidth = defaultValue(options.edgeWidth, 0.0); + // If this ClippingPlaneCollection has an owner, only its owner should update or destroy it. + // This is because in a Cesium3DTileset multiple models may reference the tileset's ClippingPlaneCollection. + this._owner = undefined; + this._testIntersection = undefined; this._unionClippingRegions = undefined; - this.unionClippingRegions = defaultValue(options.unionClippingRegions, false); + this.unionClippingRegions = defaultValue(options.unionClippingRegions, false); // set using setter + + this._uint8View = undefined; + this._float32View = undefined; + + this._clippingPlanesTexture = undefined; } function unionIntersectFunction(value) { @@ -126,34 +169,92 @@ define([ return this._unionClippingRegions; }, set : function(value) { - if (this._unionClippingRegions !== value) { - this._unionClippingRegions = value; - this._testIntersection = value ? unionIntersectFunction : defaultIntersectFunction; + if (this._unionClippingRegions === value) { + return; } + this._unionClippingRegions = value; + this._testIntersection = value ? unionIntersectFunction : defaultIntersectFunction; + } + }, + + /** + * If true, clipping will be enabled. + * + * @memberof ClippingPlaneCollection.prototype + * @type {Boolean} + * @default false + */ + enabled : { + get : function() { + return this._enabled; + }, + set : function(value) { + if (this._enabled === value) { + return; + } + this._enabled = value; + } + }, + + /** + * Returns a texture containing packed, untransformed clipping planes. + * + * @memberof ClippingPlaneCollection.prototype + * @type {Texture} + * @readonly + * @private + */ + texture : { + get : function() { + return this._clippingPlanesTexture; + } + }, + + /** + * A reference to the ClippingPlaneCollection's owner, if any. + * + * @memberof ClippingPlaneCollection.prototype + * @readonly + * @private + */ + owner : { + get : function() { + return this._owner; } } }); + function setIndexDirty(collection, index) { + // If there's already a different _dirtyIndex set, more than one plane has changed since update. + // Entire texture must be reloaded + collection._manyDirtyPlanes = collection._manyDirtyPlanes || (collection._dirtyIndex !== -1 && collection._dirtyIndex !== index); + collection._dirtyIndex = index; + } + /** - * Adds the specified {@link Plane} to the collection to be used to selectively disable rendering + * Adds the specified {@link ClippingPlane} to the collection to be used to selectively disable rendering * on the outside of each plane. Use {@link ClippingPlaneCollection#unionClippingRegions} to modify * how modify the clipping behavior of multiple planes. * - * @param {Plane} plane The plane to add to the collection. - * - * @exception {DeveloperError} The plane added exceeds the maximum number of supported clipping planes. + * @param {ClippingPlane} plane The ClippingPlane to add to the collection. * * @see ClippingPlaneCollection#unionClippingRegions * @see ClippingPlaneCollection#remove * @see ClippingPlaneCollection#removeAll */ ClippingPlaneCollection.prototype.add = function(plane) { - //>>includeStart('debug', pragmas.debug); - if (this.length >= ClippingPlaneCollection.MAX_CLIPPING_PLANES) { - throw new DeveloperError('The maximum number of clipping planes supported is ' + ClippingPlaneCollection.MAX_CLIPPING_PLANES); + var newPlaneIndex = this._planes.length; + if (plane instanceof ClippingPlane) { + var that = this; + plane.onChangeCallback = function(index) { + setIndexDirty(that, index); + }; + plane.index = newPlaneIndex; + } else { + deprecationWarning('ClippingPlaneCollection.add', 'Ability to use Plane objects with ClippingPlaneCollection.add is deprecated and will be removed in Cesium 1.45. Please use ClippingPlane objects instead.'); + this._containsUntrackablePlanes = true; } - //>>includeEnd('debug'); - + setIndexDirty(this, newPlaneIndex); this._planes.push(plane); }; @@ -165,7 +266,7 @@ define([ * in the collection. * * @param {Number} index The zero-based index of the plane. - * @returns {Plane} The plane at the specified index. + * @returns {ClippingPlane} The ClippingPlane at the specified index. * * @see ClippingPlaneCollection#length */ @@ -189,39 +290,53 @@ define([ } /** - * Checks whether this collection contains the given plane. + * Checks whether this collection contains a ClippingPlane equal to the given ClippingPlane. * - * @param {Plane} [plane] The plane to check for. - * @returns {Boolean} true if this collection contains the plane, false otherwise. + * @param {ClippingPlane} [clippingPlane] The ClippingPlane to check for. + * @returns {Boolean} true if this collection contains the ClippingPlane, false otherwise. * * @see ClippingPlaneCollection#get */ - ClippingPlaneCollection.prototype.contains = function(plane) { - return indexOf(this._planes, plane) !== -1; + ClippingPlaneCollection.prototype.contains = function(clippingPlane) { + return indexOf(this._planes, clippingPlane) !== -1; }; /** - * Removes the first occurrence of the given plane from the collection. + * Removes the first occurrence of the given ClippingPlane from the collection. * - * @param {Plane} plane + * @param {ClippingPlane} clippingPlane * @returns {Boolean} true if the plane was removed; false if the plane was not found in the collection. * * @see ClippingPlaneCollection#add * @see ClippingPlaneCollection#contains * @see ClippingPlaneCollection#removeAll */ - ClippingPlaneCollection.prototype.remove = function(plane) { + ClippingPlaneCollection.prototype.remove = function(clippingPlane) { var planes = this._planes; - var index = indexOf(planes, plane); + var index = indexOf(planes, clippingPlane); if (index === -1) { return false; } + // Unlink this ClippingPlaneCollection from the ClippingPlane + if (clippingPlane instanceof ClippingPlane) { + clippingPlane.onChangeCallback = undefined; + clippingPlane.index = -1; + } + + // Shift and update indices var length = planes.length - 1; for (var i = index; i < length; ++i) { - planes[i] = planes[i + 1]; + var planeToKeep = planes[i + 1]; + planes[i] = planeToKeep; + if (planeToKeep instanceof ClippingPlane) { + planeToKeep.index = i; + } } + + // Indicate planes texture is dirty + this._manyDirtyPlanes = true; planes.length = length; return true; @@ -234,53 +349,203 @@ define([ * @see ClippingPlaneCollection#remove */ ClippingPlaneCollection.prototype.removeAll = function() { + // Dereference this ClippingPlaneCollection from all ClippingPlanes + var planes = this._planes; + var planesCount = planes.length; + for (var i = 0; i < planesCount; ++i) { + var plane = planes[i]; + if (plane instanceof ClippingPlane) { + plane.onChangeCallback = undefined; + plane.index = -1; + } + } + this._manyDirtyPlanes = true; this._planes = []; }; - var scratchPlane = new Plane(Cartesian3.UNIT_X, 0.0); - var scratchMatrix = new Matrix4(); + var octEncodeScratch = new Cartesian2(); + var rightShift = 1.0 / 256.0; /** - * Applies the transformations to each plane and packs it into an array. - * @private - * - * @param {Matrix4} viewMatrix The 4x4 matrix to transform the plane into eyespace. - * @param {Cartesian4[]} [array] The array into which the planes will be packed. - * @returns {Cartesian4[]} The array of packed planes. + * Encodes a normalized vector into 4 SNORM values in the range [0-255] following the 'oct' encoding. + * oct32 precision is higher than the default oct16, hence the additional 2 uint16 values. */ - ClippingPlaneCollection.prototype.transformAndPackPlanes = function(viewMatrix, array) { - //>>includeStart('debug', pragmas.debug); - Check.typeOf.object('viewMatrix', viewMatrix); - //>>includeEnd('debug'); + function oct32EncodeNormal(vector, result) { + AttributeCompression.octEncodeInRange(vector, 65535, octEncodeScratch); + result.x = octEncodeScratch.x * rightShift; + result.y = octEncodeScratch.x; + result.z = octEncodeScratch.y * rightShift; + result.w = octEncodeScratch.y; + return result; + } - var planes = this._planes; - var length = planes.length; + var distanceEncodeScratch = new Cartesian4(); + var oct32EncodeScratch = new Cartesian4(); + function packPlanesAsUint8(clippingPlaneCollection, startIndex, endIndex) { + var uint8View = clippingPlaneCollection._uint8View; + var planes = clippingPlaneCollection._planes; + var byteIndex = 0; + for (var i = startIndex; i < endIndex; ++i) { + var plane = planes[i]; - var index = 0; - if (!defined(array)) { - array = new Array(length); - } else { - index = array.length; - array.length = length; - } + var oct32Normal = oct32EncodeNormal(plane.normal, oct32EncodeScratch); + uint8View[byteIndex] = oct32Normal.x; + uint8View[byteIndex + 1] = oct32Normal.y; + uint8View[byteIndex + 2] = oct32Normal.z; + uint8View[byteIndex + 3] = oct32Normal.w; - var i; - for (i = index; i < length; ++i) { - array[i] = new Cartesian4(); + var encodedDistance = Cartesian4.packFloat(plane.distance, distanceEncodeScratch); + uint8View[byteIndex + 4] = encodedDistance.x; + uint8View[byteIndex + 5] = encodedDistance.y; + uint8View[byteIndex + 6] = encodedDistance.z; + uint8View[byteIndex + 7] = encodedDistance.w; + + byteIndex += 8; } + } - var transform = Matrix4.multiply(viewMatrix, this.modelMatrix, scratchMatrix); + // Pack starting at the beginning of the buffer to allow partial update + function packPlanesAsFloats(clippingPlaneCollection, startIndex, endIndex) { + var float32View = clippingPlaneCollection._float32View; + var planes = clippingPlaneCollection._planes; - for (i = 0; i < length; ++i) { + var floatIndex = 0; + for (var i = startIndex; i < endIndex; ++i) { var plane = planes[i]; - var packedPlane = array[i]; + var normal = plane.normal; - Plane.transform(plane, transform, scratchPlane); + float32View[floatIndex] = normal.x; + float32View[floatIndex + 1] = normal.y; + float32View[floatIndex + 2] = normal.z; + float32View[floatIndex + 3] = plane.distance; - Cartesian3.clone(scratchPlane.normal, packedPlane); - packedPlane.w = scratchPlane.distance; + floatIndex += 4; // each plane is 4 floats } + } + + function computeTextureResolution(pixelsNeeded, result) { + var maxSize = ContextLimits.maximumTextureSize; + var width = Math.min(pixelsNeeded, maxSize); + var height = Math.ceil(pixelsNeeded / width); + result.x = width; + result.y = height; + return result; + } - return array; + var textureResolutionScratch = new Cartesian2(); + /** + * Called when {@link Viewer} or {@link CesiumWidget} render the scene to + * build the resources for clipping planes. + *

+ * Do not call this function directly. + *

+ */ + ClippingPlaneCollection.prototype.update = function(frameState) { + var clippingPlanesTexture = this._clippingPlanesTexture; + var context = frameState.context; + var useFloatTexture = ClippingPlaneCollection.useFloatTexture(context); + + // Compute texture requirements for current planes + // In RGBA FLOAT, A plane is 4 floats packed to a RGBA. + // In RGBA UNSIGNED_BYTE, A plane is a float in [0, 1) packed to RGBA and an Oct32 quantized normal, + // so 8 bits or 2 pixels in RGBA. + var pixelsNeeded = useFloatTexture ? this.length : this.length * 2; + var requiredResolution = computeTextureResolution(pixelsNeeded, textureResolutionScratch); + + if (defined(clippingPlanesTexture)) { + var currentPixelCount = clippingPlanesTexture.width * clippingPlanesTexture.height; + // Recreate the texture if it isn't big enough or is 4 times larger than it needs to be + if (currentPixelCount < pixelsNeeded || + pixelsNeeded < 0.25 * currentPixelCount) { + clippingPlanesTexture.destroy(); + clippingPlanesTexture = undefined; + } + } + + if (!defined(clippingPlanesTexture)) { + // Allocate twice as much space as needed to avoid frequent texture reallocation. + requiredResolution.x *= 2; + + var sampler = new Sampler({ + wrapS : TextureWrap.CLAMP_TO_EDGE, + wrapT : TextureWrap.CLAMP_TO_EDGE, + minificationFilter : TextureMinificationFilter.NEAREST, + magnificationFilter : TextureMagnificationFilter.NEAREST + }); + + if (useFloatTexture) { + clippingPlanesTexture = new Texture({ + context : context, + width : requiredResolution.x, + height : requiredResolution.y, + pixelFormat : PixelFormat.RGBA, + pixelDatatype : PixelDatatype.FLOAT, + sampler : sampler, + flipY : false + }); + this._float32View = new Float32Array(requiredResolution.x * requiredResolution.y * 4); + } else { + clippingPlanesTexture = new Texture({ + context : context, + width : requiredResolution.x, + height : requiredResolution.y, + pixelFormat : PixelFormat.RGBA, + pixelDatatype : PixelDatatype.UNSIGNED_BYTE, + sampler : sampler, + flipY : false + }); + this._uint8View = new Uint8Array(requiredResolution.x * requiredResolution.y * 4); + } + + this._clippingPlanesTexture = clippingPlanesTexture; + this._manyDirtyPlanes = true; + } + + // Use of Plane objects will be deprecated. + // But until then, we have no way of telling if they changed since last frame, so we have to do a full udpate. + var refreshFullTexture = this._manyDirtyPlanes || this._containsUntrackablePlanes; + var dirtyIndex = this._dirtyIndex; + + if (!refreshFullTexture && dirtyIndex === -1) { + return; + } + + if (!refreshFullTexture) { + // partial updates possible + var offsetY = Math.floor(dirtyIndex / clippingPlanesTexture.width); + var offsetX = Math.floor(dirtyIndex - offsetY * clippingPlanesTexture.width); + if (useFloatTexture) { + packPlanesAsFloats(this, dirtyIndex, dirtyIndex + 1); + clippingPlanesTexture.copyFrom({ + width : 1, + height : 1, + arrayBufferView : this._float32View + }, offsetX, offsetY); + } else { + packPlanesAsUint8(this, dirtyIndex, dirtyIndex + 1); + clippingPlanesTexture.copyFrom({ + width : 2, + height : 1, + arrayBufferView : this._uint8View + }, offsetX, offsetY); + } + } else if (useFloatTexture) { + packPlanesAsFloats(this, 0, this._planes.length); + clippingPlanesTexture.copyFrom({ + width : clippingPlanesTexture.width, + height : clippingPlanesTexture.height, + arrayBufferView : this._float32View + }); + } else { + packPlanesAsUint8(this, 0, this._planes.length); + clippingPlanesTexture.copyFrom({ + width : clippingPlanesTexture.width, + height : clippingPlanesTexture.height, + arrayBufferView : this._uint8View + }); + } + + this._manyDirtyPlanes = false; + this._dirtyIndex = -1; }; /** @@ -302,12 +567,17 @@ define([ planes.length = length; for (i = index; i < length; ++i) { - result._planes[i] = new Plane(Cartesian3.UNIT_X, 0.0); + result._planes[i] = new ClippingPlane(Cartesian3.UNIT_X, 0.0); } } for (i = 0; i < length; ++i) { - Plane.clone(this._planes[i], result._planes[i]); + var resultPlane = result._planes[i]; + resultPlane.index = i; + resultPlane.onChangeCallback = function(index) { + setIndexDirty(result, index); + }; + ClippingPlane.clone(this._planes[i], resultPlane); } result.enabled = this.enabled; @@ -319,18 +589,20 @@ define([ return result; }; + var scratchMatrix = new Matrix4(); + var scratchPlane = new Plane(Cartesian3.UNIT_X, 0.0); /** - * Determines the type intersection with the planes of this ClippingPlaneCollection instance and the specified {@link BoundingVolume}. + * Determines the type intersection with the planes of this ClippingPlaneCollection instance and the specified {@link TileBoundingVolume}. * @private * - * @param {Object} boundingVolume The volume to determine the intersection with the planes. + * @param {Object} tileBoundingVolume The volume to determine the intersection with the planes. * @param {Matrix4} [transform] An optional, additional matrix to transform the plane to world coordinates. * @returns {Intersect} {@link Intersect.INSIDE} if the entire volume is on the side of the planes * the normal is pointing and should be entirely rendered, {@link Intersect.OUTSIDE} * if the entire volume is on the opposite side and should be clipped, and * {@link Intersect.INTERSECTING} if the volume intersects the planes. */ - ClippingPlaneCollection.prototype.computeIntersectionWithBoundingVolume = function(boundingVolume, transform) { + ClippingPlaneCollection.prototype.computeIntersectionWithBoundingVolume = function(tileBoundingVolume, transform) { var planes = this._planes; var length = planes.length; @@ -351,9 +623,9 @@ define([ for (var i = 0; i < length; ++i) { var plane = planes[i]; - Plane.transform(plane, modelMatrix, scratchPlane); + Plane.transform(plane, modelMatrix, scratchPlane); // ClippingPlane can be used for Plane math - var value = boundingVolume.intersectPlane(scratchPlane); + var value = tileBoundingVolume.intersectPlane(scratchPlane); if (value === Intersect.INTERSECTING) { intersection = value; } else if (this._testIntersection(value)) { @@ -364,22 +636,104 @@ define([ return intersection; }; + /** + * Returns a Number encapsulating the state for this ClippingPlaneCollection. + * + * Clipping mode is encoded in the sign of the number, which is just the plane count. + * Used for checking if shader regeneration is necessary. + * + * @returns {Number} A Number that describes the ClippingPlaneCollection's state. + * @private + */ + ClippingPlaneCollection.prototype.clippingPlanesState = function() { + return this._unionClippingRegions ? this._planes.length : -this._planes.length; + }; + + /** + * Sets the owner for the input ClippingPlaneCollection if there wasn't another owner. + * Destroys the owner's previous ClippingPlaneCollection if setting is successful. + * + * @param {ClippingPlaneCollection} [clippingPlaneCollection] A ClippingPlaneCollection (or undefined) being attached to an object + * @param {Object} owner An Object that should receive the new ClippingPlaneCollection + * @param {String} key The Key for the Object to reference the ClippingPlaneCollection + * @private + */ + ClippingPlaneCollection.setOwnership = function(clippingPlaneCollection, owner, key) { + // Don't destroy the ClippingPlaneCollection if it is already owned by newOwner + if (clippingPlaneCollection === owner[key]) { + return; + } + // Destroy the existing ClippingPlaneCollection, if any + owner[key] = owner[key] && owner[key].destroy(); + if (defined(clippingPlaneCollection)) { + //>>includeStart('debug', pragmas.debug); + if (defined(clippingPlaneCollection._owner)) { + throw new DeveloperError('ClippingPlaneCollection should only be assigned to one object'); + } + //>>includeEnd('debug'); + clippingPlaneCollection._owner = owner; + owner[key] = clippingPlaneCollection; + } + }; + /** * Determines if rendering with clipping planes is supported. * - * @returns {Boolean} true if ClippingPlaneCollections are supported; otherwise, returns false + * @returns {Boolean} true if ClippingPlaneCollections are supported + * @deprecated */ ClippingPlaneCollection.isSupported = function() { - return !FeatureDetection.isInternetExplorer(); + deprecationWarning('ClippingPlaneCollection.isSupported', 'ClippingPlaneCollection.isSupported is deprecated and will be removed in Cesium 1.45. Clipping Planes are now supported on all platforms capable of running Cesium.'); + return true; + }; + + /** + * Function for checking if the context will allow clipping planes with floating point textures. + * + * @param {Context} context The Context that will contain clipped objects and clipping textures. + * @returns {Boolean} true if floating point textures can be used for clipping planes. + * @private + */ + ClippingPlaneCollection.useFloatTexture = function(context) { + return context.floatingPointTexture; + }; + + /** + * Returns true if this object was destroyed; otherwise, false. + *

+ * If this object was destroyed, it should not be used; calling any function other than + * isDestroyed will result in a {@link DeveloperError} exception. + * + * @returns {Boolean} true if this object was destroyed; otherwise, false. + * + * @see ClippingPlaneCollection#destroy + */ + ClippingPlaneCollection.prototype.isDestroyed = function() { + return false; }; /** - * The maximum number of supported clipping planes. + * Destroys the WebGL resources held by this object. Destroying an object allows for deterministic + * release of WebGL resources, instead of relying on the garbage collector to destroy this object. + *

+ * Once an object is destroyed, it should not be used; calling any function other than + * isDestroyed will result in a {@link DeveloperError} exception. Therefore, + * assign the return value (undefined) to the object as done in the example. + * + * @returns {undefined} * - * @type {number} - * @constant + * @exception {DeveloperError} This object was destroyed, i.e., destroy() was called. + * + * + * @example + * clippingPlanes = clippingPlanes && clippingPlanes .destroy(); + * + * @see ClippingPlaneCollection#isDestroyed */ - ClippingPlaneCollection.MAX_CLIPPING_PLANES = 6; + ClippingPlaneCollection.prototype.destroy = function() { + this._clippingPlanesTexture = this._clippingPlanesTexture && this._clippingPlanesTexture.destroy(); + return destroyObject(this); + }; return ClippingPlaneCollection; }); diff --git a/Source/DataSources/ModelGraphics.js b/Source/DataSources/ModelGraphics.js index 5dedd97c6f94..1b6c77f82b32 100644 --- a/Source/DataSources/ModelGraphics.js +++ b/Source/DataSources/ModelGraphics.js @@ -55,7 +55,7 @@ define([ * @param {Property} [options.color=Color.WHITE] A Property specifying the {@link Color} that blends with the model's rendered color. * @param {Property} [options.colorBlendMode=ColorBlendMode.HIGHLIGHT] An enum Property specifying how the color blends with the model. * @param {Property} [options.colorBlendAmount=0.5] A numeric Property specifying the color strength when the colorBlendMode is MIX. A value of 0.0 results in the model's rendered color while a value of 1.0 results in a solid color, with any value in-between resulting in a mix of the two. - * @param {Property} [options.clippingPlanes] A property specifying the {@link ClippingPlaneCollection} used to selectively disable rendering the model. Clipping planes are not currently supported in Internet Explorer. + * @param {Property} [options.clippingPlanes] A property specifying the {@link ClippingPlaneCollection} used to selectively disable rendering the model. * * @see {@link https://cesiumjs.org/tutorials/3D-Models-Tutorial/|3D Models Tutorial} * @demo {@link https://cesiumjs.org/Cesium/Apps/Sandcastle/index.html?src=3D%20Models.html|Cesium Sandcastle 3D Models Demo} diff --git a/Source/DataSources/ModelVisualizer.js b/Source/DataSources/ModelVisualizer.js index 68779e161e51..37954219c7a2 100644 --- a/Source/DataSources/ModelVisualizer.js +++ b/Source/DataSources/ModelVisualizer.js @@ -126,9 +126,6 @@ define([ incrementallyLoadTextures : Property.getValueOrDefault(modelGraphics._incrementallyLoadTextures, time, defaultIncrementallyLoadTextures), scene : this._scene }); - - model.readyPromise.otherwise(onModelError); - model.id = entity; primitives.add(model); @@ -137,9 +134,12 @@ define([ url : resource.url, animationsRunning : false, nodeTransformationsScratch : {}, - originalNodeMatrixHash : {} + originalNodeMatrixHash : {}, + loadFail : false }; modelHash[entity.id] = modelData; + + checkModelLoad(model, entity, modelHash); } model.show = true; @@ -250,7 +250,7 @@ define([ //>>includeEnd('debug'); var modelData = this._modelHash[entity.id]; - if (!defined(modelData)) { + if (!defined(modelData) || modelData.loadFail) { return BoundingSphereState.FAILED; } @@ -324,8 +324,11 @@ define([ } } - function onModelError(error) { - console.error(error); + function checkModelLoad(model, entity, modelHash){ + model.readyPromise.otherwise(function(error){ + console.error(error); + modelHash[entity.id].loadFail = true; + }); } return ModelVisualizer; diff --git a/Source/Renderer/AutomaticUniforms.js b/Source/Renderer/AutomaticUniforms.js index 82c0b64ad9fd..1556c5b2ad9c 100644 --- a/Source/Renderer/AutomaticUniforms.js +++ b/Source/Renderer/AutomaticUniforms.js @@ -912,6 +912,20 @@ define([ } }), + /** + * An automatic GLSL uniform that indicates if the current camera is orthographic in 3D. + * + * @alias czm_orthographicIn3D + * @see UniformState#orthographicIn3D + */ + czm_orthographicIn3D : new AutomaticUniform({ + size : 1, + datatype : WebGLConstants.FLOAT, + getValue : function(uniformState) { + return uniformState.orthographicIn3D ? 1 : 0; + } + }), + /** * An automatic GLSL uniform representing a 3x3 normal transformation matrix that * transforms normal vectors in model coordinates to eye coordinates. diff --git a/Source/Renderer/UniformState.js b/Source/Renderer/UniformState.js index 27ced786160e..7c9194b3ce6d 100644 --- a/Source/Renderer/UniformState.js +++ b/Source/Renderer/UniformState.js @@ -873,6 +873,18 @@ define([ get : function() { return this._invertClassificationColor; } + }, + + /** + * Whether or not the current projection is orthographic in 3D. + * + * @memberOf UniformState.prototype + * @type {Boolean} + */ + orthographicIn3D : { + get : function() { + return this._orthographicIn3D; + } } }); diff --git a/Source/Scene/BatchTable.js b/Source/Scene/BatchTable.js index e32799823b04..bbe799c529c9 100644 --- a/Source/Scene/BatchTable.js +++ b/Source/Scene/BatchTable.js @@ -16,7 +16,8 @@ define([ '../Renderer/Sampler', '../Renderer/Texture', '../Renderer/TextureMagnificationFilter', - '../Renderer/TextureMinificationFilter' + '../Renderer/TextureMinificationFilter', + './getUnpackFloatFunction' ], function( Cartesian2, Cartesian3, @@ -35,7 +36,8 @@ define([ Sampler, Texture, TextureMagnificationFilter, - TextureMinificationFilter) { + TextureMinificationFilter, + getUnpackFloatFunction) { 'use strict'; /** @@ -226,48 +228,18 @@ define([ var scratchPackedFloatCartesian4 = new Cartesian4(); - var SHIFT_LEFT_8 = 256.0; - var SHIFT_LEFT_16 = 65536.0; - var SHIFT_LEFT_24 = 16777216.0; - - var SHIFT_RIGHT_8 = 1.0 / SHIFT_LEFT_8; - var SHIFT_RIGHT_16 = 1.0 / SHIFT_LEFT_16; - var SHIFT_RIGHT_24 = 1.0 / SHIFT_LEFT_24; - - var BIAS = 38.0; - - function unpackFloat(value) { - var temp = value.w / 2.0; - var exponent = Math.floor(temp); - var sign = (temp - exponent) * 2.0; - exponent = exponent - BIAS; - - sign = sign * 2.0 - 1.0; - sign = -sign; - - if (exponent >= BIAS) { - return sign < 0.0 ? Number.NEGATIVE_INFINITY : Number.POSITIVE_INFINITY; - } - - var unpacked = sign * value.x * SHIFT_RIGHT_8; - unpacked += sign * value.y * SHIFT_RIGHT_16; - unpacked += sign * value.z * SHIFT_RIGHT_24; - - return unpacked * Math.pow(10.0, exponent); - } - function getPackedFloat(array, index, result) { var packed = Cartesian4.unpack(array, index, scratchPackedFloatCartesian4); - var x = unpackFloat(packed); + var x = Cartesian4.unpackFloat(packed); packed = Cartesian4.unpack(array, index + 4, scratchPackedFloatCartesian4); - var y = unpackFloat(packed); + var y = Cartesian4.unpackFloat(packed); packed = Cartesian4.unpack(array, index + 8, scratchPackedFloatCartesian4); - var z = unpackFloat(packed); + var z = Cartesian4.unpackFloat(packed); packed = Cartesian4.unpack(array, index + 12, scratchPackedFloatCartesian4); - var w = unpackFloat(packed); + var w = Cartesian4.unpackFloat(packed); return Cartesian4.fromElements(x, y, z, w, result); } @@ -275,50 +247,18 @@ define([ if (!FeatureDetection.supportsTypedArrays()) { return; } - var scratchFloatArray = new Float32Array(1); - - function packFloat(value, result) { - scratchFloatArray[0] = value; - value = scratchFloatArray[0]; - - if (value === 0.0) { - return Cartesian4.clone(Cartesian4.ZERO, result); - } - - var sign = value < 0.0 ? 1.0 : 0.0; - var exponent; - - if (!isFinite(value)) { - value = 0.1; - exponent = BIAS; - } else { - value = Math.abs(value); - exponent = Math.floor(CesiumMath.logBase(value, 10)) + 1.0; - value = value / Math.pow(10.0, exponent); - } - - var temp = value * SHIFT_LEFT_8; - result.x = Math.floor(temp); - temp = (temp - result.x) * SHIFT_LEFT_8; - result.y = Math.floor(temp); - temp = (temp - result.y) * SHIFT_LEFT_8; - result.z = Math.floor(temp); - result.w = (exponent + BIAS) * 2.0 + sign; - - return result; - } function setPackedAttribute(value, array, index) { - var packed = packFloat(value.x, scratchPackedFloatCartesian4); + var packed = Cartesian4.packFloat(value.x, scratchPackedFloatCartesian4); Cartesian4.pack(packed, array, index); - packed = packFloat(value.y, packed); + packed = Cartesian4.packFloat(value.y, packed); Cartesian4.pack(packed, array, index + 4); - packed = packFloat(value.z, packed); + packed = Cartesian4.packFloat(value.z, packed); Cartesian4.pack(packed, array, index + 8); - packed = packFloat(value.w, packed); + packed = Cartesian4.packFloat(value.w, packed); Cartesian4.pack(packed, array, index + 12); } @@ -527,20 +467,7 @@ define([ return ''; } - return 'float unpackFloat(vec4 value) \n' + - '{ \n' + - ' value *= 255.0; \n' + - ' float temp = value.w / 2.0; \n' + - ' float exponent = floor(temp); \n' + - ' float sign = (temp - exponent) * 2.0; \n' + - ' exponent = exponent - float(' + BIAS + '); \n' + - ' sign = sign * 2.0 - 1.0; \n' + - ' sign = -sign; \n' + - ' float unpacked = sign * value.x * float(' + SHIFT_RIGHT_8 + '); \n' + - ' unpacked += sign * value.y * float(' + SHIFT_RIGHT_16 + '); \n' + - ' unpacked += sign * value.z * float(' + SHIFT_RIGHT_24 + '); \n' + - ' return unpacked * pow(10.0, exponent); \n' + - '} \n'; + return getUnpackFloatFunction('unpackFloat'); } function getComponentType(componentsPerAttribute) { diff --git a/Source/Scene/Batched3DModel3DTileContent.js b/Source/Scene/Batched3DModel3DTileContent.js index 5ecb891e1a73..2f6f2a350dd0 100644 --- a/Source/Scene/Batched3DModel3DTileContent.js +++ b/Source/Scene/Batched3DModel3DTileContent.js @@ -1,5 +1,4 @@ define([ - '../Core/ClippingPlaneCollection', '../Core/Color', '../Core/defaultValue', '../Core/defined', @@ -20,7 +19,6 @@ define([ './Model', './ModelUtility' ], function( - ClippingPlaneCollection, Color, defaultValue, defined, @@ -69,6 +67,10 @@ define([ this._batchTable = undefined; this._features = undefined; + // Populate from gltf when available + this._batchIdAttributeName = undefined; + this._diffuseAttributeOrUniformName = {}; + /** * @inheritdoc Cesium3DTileContent#featurePropertiesDirty */ @@ -206,11 +208,15 @@ define([ function getVertexShaderCallback(content) { return function(vs, programId) { var batchTable = content._batchTable; - var gltf = content._model.gltf; var handleTranslucent = !defined(content._tileset.classificationType); - var batchIdAttributeName = getBatchIdAttributeName(gltf); - var diffuseAttributeOrUniformName = ModelUtility.getDiffuseAttributeOrUniform(gltf, programId); - var callback = batchTable.getVertexShaderCallback(handleTranslucent, batchIdAttributeName, diffuseAttributeOrUniformName); + + var gltf = content._model.gltf; + if (defined(gltf)) { + content._batchIdAttributeName = getBatchIdAttributeName(gltf); + content._diffuseAttributeOrUniformName[programId] = ModelUtility.getDiffuseAttributeOrUniform(gltf, programId); + } + + var callback = batchTable.getVertexShaderCallback(handleTranslucent, content._batchIdAttributeName, content._diffuseAttributeOrUniformName[programId]); return defined(callback) ? callback(vs) : vs; }; } @@ -218,9 +224,13 @@ define([ function getPickVertexShaderCallback(content) { return function(vs) { var batchTable = content._batchTable; + var gltf = content._model.gltf; - var batchIdAttributeName = getBatchIdAttributeName(gltf); - var callback = batchTable.getPickVertexShaderCallback(batchIdAttributeName); + if (defined(gltf)) { + content._batchIdAttributeName = getBatchIdAttributeName(gltf); + } + + var callback = batchTable.getPickVertexShaderCallback(content._batchIdAttributeName); return defined(callback) ? callback(vs) : vs; }; } @@ -228,10 +238,13 @@ define([ function getFragmentShaderCallback(content) { return function(fs, programId) { var batchTable = content._batchTable; - var gltf = content._model.gltf; var handleTranslucent = !defined(content._tileset.classificationType); - var diffuseAttributeOrUniformName = ModelUtility.getDiffuseAttributeOrUniform(gltf, programId); - var callback = batchTable.getFragmentShaderCallback(handleTranslucent, diffuseAttributeOrUniformName); + + var gltf = content._model.gltf; + if (defined(gltf)) { + content._diffuseAttributeOrUniformName[programId] = ModelUtility.getDiffuseAttributeOrUniform(gltf, programId); + } + var callback = batchTable.getFragmentShaderCallback(handleTranslucent, content._diffuseAttributeOrUniformName[programId]); return defined(callback) ? callback(fs) : fs; }; } @@ -379,15 +392,6 @@ define([ }; if (!defined(tileset.classificationType)) { - var clippingPlanes; - if (defined(tileset.clippingPlanes)) { - clippingPlanes = tileset.clippingPlanes.clone(); - } else { - clippingPlanes = new ClippingPlaneCollection({ - enabled : false - }); - } - // PERFORMANCE_IDEA: patch the shader on demand, e.g., the first time show/color changes. // The pick shader still needs to be patched. content._model = new Model({ @@ -409,8 +413,7 @@ define([ pickFragmentShaderLoaded : batchTable.getPickFragmentShaderCallback(), pickUniformMapLoaded : batchTable.getPickUniformMapCallback(), addBatchIdToGeneratedShaders : (batchLength > 0), // If the batch table has values in it, generated shaders will need a batchId attribute - pickObject : pickObject, - clippingPlanes : clippingPlanes + pickObject : pickObject }); } else { // This transcodes glTF to an internal representation for geometry so we can take advantage of the re-batching of vector data. @@ -503,12 +506,11 @@ define([ // Update clipping planes var tilesetClippingPlanes = this._tileset.clippingPlanes; - var modelClippingPlanes = this._model.clippingPlanes; - if (defined(tilesetClippingPlanes)) { - tilesetClippingPlanes.clone(modelClippingPlanes); - modelClippingPlanes.enabled = tilesetClippingPlanes.enabled && this._tile._isClipped; - } else if (defined(modelClippingPlanes) && modelClippingPlanes.enabled) { - modelClippingPlanes.enabled = false; + if (this._tile.clippingPlanesDirty && defined(tilesetClippingPlanes)) { + // Dereference the clipping planes from the model if they are irrelevant. + // Link/Dereference directly to avoid ownership checks. + // This will also trigger synchronous shader regeneration to remove or add the clipping plane and color blending code. + this._model._clippingPlanes = (tilesetClippingPlanes.enabled && this._tile._isClipped) ? tilesetClippingPlanes : undefined; } this._model.update(frameState); diff --git a/Source/Scene/Cesium3DTile.js b/Source/Scene/Cesium3DTile.js index 5ffb0114e887..e386a997586b 100644 --- a/Source/Scene/Cesium3DTile.js +++ b/Source/Scene/Cesium3DTile.js @@ -310,6 +310,16 @@ define([ */ this._optimChildrenWithinParent = Cesium3DTileOptimizationHint.NOT_COMPUTED; + /** + * Tracks if the tile's relationship with a ClippingPlaneCollection has changed with regards + * to the ClippingPlaneCollection's state. + * + * @type {Boolean} + * + * @private + */ + this.clippingPlanesDirty = false; + // Members that are updated every frame for tree traversal and rendering optimizations: this._distanceToCamera = 0; this._visibilityPlaneMask = 0; @@ -329,6 +339,7 @@ define([ this._ancestorWithContent = undefined; this._ancestorWithLoadedContent = undefined; this._isClipped = true; + this._clippingPlanesState = 0; // encapsulates (_isClipped, clippingPlanes.enabled) and number/function this._debugBoundingVolume = undefined; this._debugContentBoundingVolume = undefined; @@ -1048,6 +1059,23 @@ define([ content.update(tileset, frameState); } + function updateClippingPlanes(tile, tileset) { + // Compute and compare ClippingPlanes state: + // - enabled-ness - are clipping planes enabled? is this tile clipped? + // - clipping plane count + // - clipping function (union v. intersection) + var clippingPlanes = tileset.clippingPlanes; + var currentClippingPlanesState = 0; + if (defined(clippingPlanes) && tile._isClipped && clippingPlanes.enabled) { + currentClippingPlanesState = clippingPlanes.clippingPlanesState(); + } + // If clippingPlaneState for tile changed, mark clippingPlanesDirty so content can update + if (currentClippingPlanesState !== tile._clippingPlanesState) { + tile._clippingPlanesState = currentClippingPlanesState; + tile.clippingPlanesDirty = true; + } + } + /** * Get the draw commands needed to render this tile. * @@ -1055,9 +1083,12 @@ define([ */ Cesium3DTile.prototype.update = function(tileset, frameState) { var initCommandLength = frameState.commandList.length; + updateClippingPlanes(this, tileset); applyDebugSettings(this, tileset, frameState); updateContent(this, tileset, frameState); this._commandsLength = frameState.commandList.length - initCommandLength; + + this.clippingPlanesDirty = false; // reset after content update }; var scratchCommandList = []; diff --git a/Source/Scene/Cesium3DTileBatchTable.js b/Source/Scene/Cesium3DTileBatchTable.js index 528e2d7caaae..be54a96ac99c 100644 --- a/Source/Scene/Cesium3DTileBatchTable.js +++ b/Source/Scene/Cesium3DTileBatchTable.js @@ -1331,10 +1331,12 @@ define([ for (var i = commandStart; i < commandEnd; ++i) { var command = commandList[i]; var derivedCommands = command.derivedCommands.tileset; - if (!defined(derivedCommands)) { + // Command may be marked dirty from Model shader recompilation for clipping planes + if (!defined(derivedCommands) || command.dirty) { derivedCommands = {}; command.derivedCommands.tileset = derivedCommands; derivedCommands.originalCommand = deriveCommand(command); + command.dirty = false; } updateDerivedCommand(derivedCommands.originalCommand, command); diff --git a/Source/Scene/Cesium3DTileset.js b/Source/Scene/Cesium3DTileset.js index 699fc5d41595..ddfbdcab4d21 100644 --- a/Source/Scene/Cesium3DTileset.js +++ b/Source/Scene/Cesium3DTileset.js @@ -3,6 +3,7 @@ define([ '../Core/Cartesian3', '../Core/Cartographic', '../Core/Check', + '../Core/ClippingPlaneCollection', '../Core/defaultValue', '../Core/defined', '../Core/defineProperties', @@ -46,6 +47,7 @@ define([ Cartesian3, Cartographic, Check, + ClippingPlaneCollection, defaultValue, defined, defineProperties, @@ -111,7 +113,7 @@ define([ * @param {Number} [options.skipLevels=1] When skipLevelOfDetail is true, a constant defining the minimum number of levels to skip when loading tiles. When it is 0, no levels are skipped. Used in conjunction with skipScreenSpaceErrorFactor to determine which tiles to load. * @param {Boolean} [options.immediatelyLoadDesiredLevelOfDetail=false] When skipLevelOfDetail is true, only tiles that meet the maximum screen space error will ever be downloaded. Skipping factors are ignored and just the desired tiles are loaded. * @param {Boolean} [options.loadSiblings=false] When skipLevelOfDetail is true, determines whether siblings of visible tiles are always downloaded during traversal. - * @param {ClippingPlaneCollection} [options.clippingPlanes] The {@link ClippingPlaneCollection} used to selectively disable rendering the tileset. Clipping planes are not currently supported in Internet Explorer. + * @param {ClippingPlaneCollection} [options.clippingPlanes] The {@link ClippingPlaneCollection} used to selectively disable rendering the tileset. * @param {ClassificationType} [options.classificationType] Determines whether terrain, 3D Tiles or both will be classified by this tileset. See {@link Cesium3DTileset#classificationType} for details about restrictions and limitations. * @param {Ellipsoid} [options.ellipsoid=Ellipsoid.WGS84] The ellipsoid determining the size and shape of the globe. * @param {Boolean} [options.debugFreezeFrame=false] For debugging only. Determines if only the tiles from last frame should be used for rendering. @@ -547,11 +549,7 @@ define([ */ this.loadSiblings = defaultValue(options.loadSiblings, false); - /** - * The {@link ClippingPlaneCollection} used to selectively disable rendering the tileset. Clipping planes are not currently supported in Internet Explorer. - * - * @type {ClippingPlaneCollection} - */ + this._clippingPlanes = undefined; this.clippingPlanes = options.clippingPlanes; /** @@ -814,6 +812,19 @@ define([ return this._asset; } }, + /** + * The {@link ClippingPlaneCollection} used to selectively disable rendering the tileset. + * + * @type {ClippingPlaneCollection} + */ + clippingPlanes : { + get : function() { + return this._clippingPlanes; + }, + set : function(value) { + ClippingPlaneCollection.setOwnership(value, this, '_clippingPlanes'); + } + }, /** * Gets the tileset's properties dictionary object, which contains metadata about per-feature properties. @@ -1846,6 +1857,12 @@ define([ this._loadTimestamp = JulianDate.clone(frameState.time); } + // Update clipping planes + var clippingPlanes = this._clippingPlanes; + if (defined(clippingPlanes) && clippingPlanes.enabled) { + clippingPlanes.update(frameState); + } + this._timeSinceLoad = Math.max(JulianDate.secondsDifference(frameState.time, this._loadTimestamp) * 1000, 0.0); this._skipLevelOfDetail = this.skipLevelOfDetail && !defined(this._classificationType) && !this._disableSkipLevelOfDetail; @@ -1930,6 +1947,9 @@ define([ // Destroy debug labels this._tileDebugLabels = this._tileDebugLabels && this._tileDebugLabels.destroy(); + // Destroy clipping plane collection + this._clippingPlanes = this._clippingPlanes && this._clippingPlanes.destroy(); + // Traverse the tree and destroy all tiles if (defined(this._root)) { var stack = scratchStack; diff --git a/Source/Scene/ClassificationType.js b/Source/Scene/ClassificationType.js index 4d5f4f403965..2b92bb5f9d75 100644 --- a/Source/Scene/ClassificationType.js +++ b/Source/Scene/ClassificationType.js @@ -7,7 +7,7 @@ define([ /** * Whether a classification affects terrain, 3D Tiles or both. * - * @exports ClassificationOption + * @exports ClassificationType */ var ClassificationType = { /** diff --git a/Source/Scene/DracoLoader.js b/Source/Scene/DracoLoader.js new file mode 100644 index 000000000000..4821e4dc511c --- /dev/null +++ b/Source/Scene/DracoLoader.js @@ -0,0 +1,197 @@ +define([ + '../Core/arraySlice', + '../Core/ComponentDatatype', + '../Core/defined', + '../Core/FeatureDetection', + '../Core/TaskProcessor', + '../Renderer/Buffer', + '../Renderer/BufferUsage', + '../ThirdParty/GltfPipeline/ForEach', + '../ThirdParty/when' + ], function( + arraySlice, + ComponentDatatype, + defined, + FeatureDetection, + TaskProcessor, + Buffer, + BufferUsage, + ForEach, + when) { + 'use strict'; + + /** + * @private + */ + function DracoLoader() {} + + // Maximum concurrency to use when deocding draco models + DracoLoader._maxDecodingConcurrency = Math.max(FeatureDetection.hardwareConcurrency - 1, 1); + + // Exposed for testing purposes + DracoLoader._decoderTaskProcessor = undefined; + DracoLoader._getDecoderTaskProcessor = function () { + if (!defined(DracoLoader._decoderTaskProcessor)) { + DracoLoader._decoderTaskProcessor = new TaskProcessor('decodeDraco', DracoLoader._maxDecodingConcurrency); + } + + return DracoLoader._decoderTaskProcessor; + }; + + function hasExtension(model) { + return (defined(model.extensionsRequired.KHR_draco_mesh_compression) + || defined(model.extensionsUsed.KHR_draco_mesh_compression)); + } + + function addBufferToModelResources(model, buffer) { + var resourceBuffers = model._rendererResources.buffers; + var bufferViewId = Object.keys(resourceBuffers).length; + resourceBuffers[bufferViewId] = buffer; + model._geometryByteLength += buffer.sizeInBytes; + + return bufferViewId; + } + + function addNewVertexBuffer(typedArray, model, context) { + var vertexBuffer = Buffer.createVertexBuffer({ + context : context, + typedArray : typedArray, + usage : BufferUsage.STATIC_DRAW + }); + vertexBuffer.vertexArrayDestroyable = false; + + return addBufferToModelResources(model, vertexBuffer); + } + + function addNewIndexBuffer(typedArray, model, context) { + var indexBuffer = Buffer.createIndexBuffer({ + context : context, + typedArray : typedArray, + usage : BufferUsage.STATIC_DRAW, + indexDatatype : ComponentDatatype.fromTypedArray(typedArray) + }); + indexBuffer.vertexArrayDestroyable = false; + + var bufferViewId = addBufferToModelResources(model, indexBuffer); + return { + bufferViewId: bufferViewId, + numberOfIndices : indexBuffer.numberOfIndices + }; + } + + function addDecodededBuffers(primitive, model, context) { + return function (result) { + var decodedIndexBuffer = addNewIndexBuffer(result.indexArray, model, context); + + var attributes = {}; + var decodedAttributeData = result.attributeData; + for (var attributeName in decodedAttributeData) { + if (decodedAttributeData.hasOwnProperty(attributeName)) { + var attribute = decodedAttributeData[attributeName]; + var vertexArray = attribute.array; + var vertexBufferView = addNewVertexBuffer(vertexArray, model, context); + + var data = attribute.data; + data.bufferView = vertexBufferView; + + attributes[attributeName] = data; + } + } + + model._decodedData[primitive.mesh + '.primitive.' + primitive.primitive] = { + bufferView : decodedIndexBuffer.bufferViewId, + numberOfIndices : decodedIndexBuffer.numberOfIndices, + attributes : attributes + }; + }; + } + + function scheduleDecodingTask(decoderTaskProcessor, model, loadResources, context) { + var taskData = loadResources.primitivesToDecode.peek(); + if (!defined(taskData)) { + // All primitives are processing + return; + } + + var promise = decoderTaskProcessor.scheduleTask(taskData, [taskData.array.buffer]); + if (!defined(promise)) { + // Cannot schedule another task this frame + return; + } + + loadResources.primitivesToDecode.dequeue(); + return promise.then(addDecodededBuffers(taskData, model, context)); + } + + /** + * Parses draco extension on model primitives and + * adds the decoding data to the model's load resources. + * + * @private + */ + DracoLoader.parse = function(model) { + if (!hasExtension(model)) { + return; + } + + var loadResources = model._loadResources; + loadResources.decoding = true; + + var gltf = model.gltf; + ForEach.mesh(gltf, function(mesh, meshId) { + ForEach.meshPrimitive(mesh, function(primitive, primitiveId) { + if (!defined(primitive.extensions)) { + return; + } + + var compressionData = primitive.extensions.KHR_draco_mesh_compression; + if (!defined(compressionData)) { + return; + } + + var bufferView = gltf.bufferViews[compressionData.bufferView]; + var typedArray = arraySlice(gltf.buffers[bufferView.buffer].extras._pipeline.source, bufferView.byteOffset, bufferView.byteOffset + bufferView.byteLength); + + loadResources.primitivesToDecode.enqueue({ + mesh : meshId, + primitive : primitiveId, + array : typedArray, + bufferView : bufferView, + compressedAttributes : compressionData.attributes + }); + }); + }); + }; + + /** + * Schedules decoding tasks available this frame. + * @private + */ + DracoLoader.decode = function(model, context) { + if (!hasExtension(model)) { + return when.resolve(); + } + + var loadResources = model._loadResources; + if (loadResources.primitivesToDecode.length === 0) { + // No more tasks to schedule + return when.resolve(); + } + + var decoderTaskProcessor = DracoLoader._getDecoderTaskProcessor(); + var decodingPromises = []; + + var promise = scheduleDecodingTask(decoderTaskProcessor, model, loadResources, context); + while (defined(promise)) { + decodingPromises.push(promise); + promise = scheduleDecodingTask(decoderTaskProcessor, model, loadResources, context); + } + + return when.all(decodingPromises).then(function () { + // Done decoding when there are no more active tasks + loadResources.decoding = (decoderTaskProcessor._activeTasks !== 0); + }); + }; + + return DracoLoader; +}); diff --git a/Source/Scene/Globe.js b/Source/Scene/Globe.js index 343295c50c1d..5d391dbebf31 100644 --- a/Source/Scene/Globe.js +++ b/Source/Scene/Globe.js @@ -266,7 +266,7 @@ define([ } }, /** - * A property specifying a {@link ClippingPlaneCollection} used to selectively disable rendering on the outside of each plane. Clipping planes are not currently supported in Internet Explorer. + * A property specifying a {@link ClippingPlaneCollection} used to selectively disable rendering on the outside of each plane. * * @memberof Globe.prototype * @type {ClippingPlaneCollection} diff --git a/Source/Scene/GlobeSurfaceShaderSet.js b/Source/Scene/GlobeSurfaceShaderSet.js index c46fe650b6bf..85c775b1c00c 100644 --- a/Source/Scene/GlobeSurfaceShaderSet.js +++ b/Source/Scene/GlobeSurfaceShaderSet.js @@ -1,22 +1,27 @@ define([ + '../Core/ClippingPlaneCollection', '../Core/defined', '../Core/destroyObject', '../Core/TerrainQuantization', '../Renderer/ShaderProgram', - '../Scene/SceneMode' + '../Scene/SceneMode', + './getClippingFunction' ], function( + ClippingPlaneCollection, defined, destroyObject, TerrainQuantization, ShaderProgram, - SceneMode) { + SceneMode, + getClippingFunction) { 'use strict'; - function GlobeSurfaceShader(numberOfDayTextures, flags, material, shaderProgram) { + function GlobeSurfaceShader(numberOfDayTextures, flags, material, shaderProgram, clippingShaderState) { this.numberOfDayTextures = numberOfDayTextures; this.flags = flags; this.material = material; this.shaderProgram = shaderProgram; + this.clippingShaderState = clippingShaderState; } /** @@ -64,7 +69,7 @@ define([ return useWebMercatorProjection ? get2DYPositionFractionMercatorProjection : get2DYPositionFractionGeographicProjection; } - GlobeSurfaceShaderSet.prototype.getShaderProgram = function(frameState, surfaceTile, numberOfDayTextures, applyBrightness, applyContrast, applyHue, applySaturation, applyGamma, applyAlpha, applySplit, showReflectiveOcean, showOceanWaves, enableLighting, hasVertexNormals, useWebMercatorProjection, enableFog, enableClippingPlanes, unionClippingRegions) { + GlobeSurfaceShaderSet.prototype.getShaderProgram = function(frameState, surfaceTile, numberOfDayTextures, applyBrightness, applyContrast, applyHue, applySaturation, applyGamma, applyAlpha, applySplit, showReflectiveOcean, showOceanWaves, enableLighting, hasVertexNormals, useWebMercatorProjection, enableFog, enableClippingPlanes, clippingPlanes) { var quantization = 0; var quantizationDefine = ''; @@ -93,27 +98,36 @@ define([ (applySplit << 15) | (enableClippingPlanes << 16); + var currentClippingShaderState = 0; + if (defined(clippingPlanes)) { + currentClippingShaderState = enableClippingPlanes ? clippingPlanes.clippingPlanesState() : 0; + } var surfaceShader = surfaceTile.surfaceShader; if (defined(surfaceShader) && surfaceShader.numberOfDayTextures === numberOfDayTextures && surfaceShader.flags === flags && - surfaceShader.material === this.material) { + surfaceShader.material === this.material && + surfaceShader.clippingShaderState === currentClippingShaderState) { return surfaceShader.shaderProgram; } - // New tile, or tile changed number of textures or flags. + // New tile, or tile changed number of textures, flags, or clipping planes var shadersByFlags = this._shadersByTexturesFlags[numberOfDayTextures]; if (!defined(shadersByFlags)) { shadersByFlags = this._shadersByTexturesFlags[numberOfDayTextures] = []; } surfaceShader = shadersByFlags[flags]; - if (!defined(surfaceShader) || surfaceShader.material !== this.material) { + if (!defined(surfaceShader) || surfaceShader.material !== this.material || surfaceShader.clippingShaderState !== currentClippingShaderState) { // Cache miss - we've never seen this combination of numberOfDayTextures and flags before. var vs = this.baseVertexShaderSource.clone(); var fs = this.baseFragmentShaderSource.clone(); + if (currentClippingShaderState !== 0) { + fs.sources.unshift(getClippingFunction(clippingPlanes)); // Need to go before GlobeFS + } + vs.defines.push(quantizationDefine); fs.defines.push('TEXTURE_UNITS ' + numberOfDayTextures); @@ -167,10 +181,6 @@ define([ if (enableClippingPlanes) { fs.defines.push('ENABLE_CLIPPING_PLANES'); - - if (unionClippingRegions) { - fs.defines.push('UNION_CLIPPING_REGIONS'); - } } var computeDayColor = '\ @@ -212,7 +222,7 @@ define([ attributeLocations : terrainEncoding.getAttributeLocations() }); - surfaceShader = shadersByFlags[flags] = new GlobeSurfaceShader(numberOfDayTextures, flags, this.material, shader); + surfaceShader = shadersByFlags[flags] = new GlobeSurfaceShader(numberOfDayTextures, flags, this.material, shader, currentClippingShaderState); } surfaceTile.surfaceShader = surfaceShader; diff --git a/Source/Scene/GlobeSurfaceTileProvider.js b/Source/Scene/GlobeSurfaceTileProvider.js index ddf1fc10d641..9d9ea96e7e7b 100644 --- a/Source/Scene/GlobeSurfaceTileProvider.js +++ b/Source/Scene/GlobeSurfaceTileProvider.js @@ -172,7 +172,7 @@ define([ * @type {ClippingPlaneCollection} * @private */ - this.clippingPlanes = undefined; + this._clippingPlanes = undefined; } defineProperties(GlobeSurfaceTileProvider.prototype, { @@ -302,6 +302,21 @@ define([ this._quadtree.invalidateAllTiles(); } } + }, + /** + * The {@link ClippingPlaneCollection} used to selectively disable rendering the tileset. + * + * @type {ClippingPlaneCollection} + * + * @private + */ + clippingPlanes : { + get : function() { + return this._clippingPlanes; + }, + set : function(value) { + ClippingPlaneCollection.setOwnership(value, this, '_clippingPlanes'); + } } }); @@ -396,7 +411,11 @@ define([ tiles.length = 0; } } - + // update clipping planes + var clippingPlanes = this._clippingPlanes; + if (defined(clippingPlanes) && clippingPlanes.enabled) { + clippingPlanes.update(frameState); + } this._usedDrawCommands = 0; }; @@ -548,7 +567,7 @@ define([ } } - var clippingPlanes = this.clippingPlanes; + var clippingPlanes = this._clippingPlanes; if (defined(clippingPlanes) && clippingPlanes.enabled) { var planeIntersection = clippingPlanes.computeIntersectionWithBoundingVolume(boundingVolume); tile.isClipped = (planeIntersection !== Intersect.INSIDE); @@ -666,6 +685,8 @@ define([ */ GlobeSurfaceTileProvider.prototype.destroy = function() { this._tileProvider = this._tileProvider && this._tileProvider.destroy(); + this._clippingPlanes = this._clippingPlanes && this._clippingPlanes.destroy(); + return destroyObject(this); }; @@ -826,7 +847,8 @@ define([ } }; - function createTileUniformMap(frameState) { + var scratchClippingPlaneMatrix = new Matrix4(); + function createTileUniformMap(frameState, globeSurfaceTileProvider) { var uniformMap = { u_initialColor : function() { return this.properties.initialColor; @@ -914,11 +936,17 @@ define([ u_dayTextureSplit : function() { return this.properties.dayTextureSplit; }, - u_clippingPlanesLength : function() { - return this.properties.clippingPlanes.length; - }, u_clippingPlanes : function() { - return this.properties.clippingPlanes; + var clippingPlanes = globeSurfaceTileProvider._clippingPlanes; + if (defined(clippingPlanes) && defined(clippingPlanes.texture)) { + // Check in case clippingPlanes hasn't been updated yet. + return clippingPlanes.texture; + } + return frameState.context.defaultTexture; + }, + u_clippingPlanesMatrix : function() { + var clippingPlanes = globeSurfaceTileProvider._clippingPlanes; + return defined(clippingPlanes) ? Matrix4.multiply(frameState.context.uniformState.view, clippingPlanes.modelMatrix, scratchClippingPlaneMatrix) : Matrix4.IDENTITY; }, u_clippingPlanesEdgeStyle : function() { var style = this.properties.clippingPlanesEdgeColor; @@ -963,7 +991,6 @@ define([ minMaxHeight : new Cartesian2(), scaleAndBias : new Matrix4(), - clippingPlanes : [], clippingPlanesEdgeColor : Color.clone(Color.WHITE), clippingPlanesEdgeWidth : 0.0 } @@ -1211,7 +1238,7 @@ define([ command.boundingVolume = new BoundingSphere(); command.orientedBoundingBox = undefined; - uniformMap = createTileUniformMap(frameState); + uniformMap = createTileUniformMap(frameState, tileProvider); tileProvider._drawCommands.push(command); tileProvider._uniformMaps.push(uniformMap); @@ -1342,37 +1369,18 @@ define([ Matrix4.clone(encoding.matrix, uniformMapProperties.scaleAndBias); // update clipping planes - var clippingPlanes = tileProvider.clippingPlanes; - var length = 0; - - if (defined(clippingPlanes) && tile.isClipped) { - length = clippingPlanes.length; - } - - var packedPlanes = uniformMapProperties.clippingPlanes; - var packedLength = packedPlanes.length; - if (packedLength !== length) { - packedPlanes.length = length; - - for (var i = packedLength; i < length; ++i) { - packedPlanes[i] = new Cartesian4(); - } - } - - if (defined(clippingPlanes) && clippingPlanes.enabled && tile.isClipped) { - clippingPlanes.transformAndPackPlanes(context.uniformState.view, packedPlanes); + var clippingPlanes = tileProvider._clippingPlanes; + var clippingPlanesEnabled = defined(clippingPlanes) && clippingPlanes.enabled && tile.isClipped; + if (clippingPlanesEnabled) { uniformMapProperties.clippingPlanesEdgeColor = Color.clone(clippingPlanes.edgeColor, uniformMapProperties.clippingPlanesEdgeColor); uniformMapProperties.clippingPlanesEdgeWidth = clippingPlanes.edgeWidth; } - var clippingPlanesEnabled = defined(clippingPlanes) && clippingPlanes.enabled && (uniformMapProperties.clippingPlanes.length > 0) && ClippingPlaneCollection.isSupported(); - var unionClippingRegions = clippingPlanesEnabled ? clippingPlanes.unionClippingRegions : false; - if (defined(tileProvider.uniformMap)) { uniformMap = combine(uniformMap, tileProvider.uniformMap); } - command.shaderProgram = tileProvider._surfaceShaderSet.getShaderProgram(frameState, surfaceTile, numberOfDayTextures, applyBrightness, applyContrast, applyHue, applySaturation, applyGamma, applyAlpha, applySplit, showReflectiveOcean, showOceanWaves, tileProvider.enableLighting, hasVertexNormals, useWebMercatorProjection, applyFog, clippingPlanesEnabled, unionClippingRegions); + command.shaderProgram = tileProvider._surfaceShaderSet.getShaderProgram(frameState, surfaceTile, numberOfDayTextures, applyBrightness, applyContrast, applyHue, applySaturation, applyGamma, applyAlpha, applySplit, showReflectiveOcean, showOceanWaves, tileProvider.enableLighting, hasVertexNormals, useWebMercatorProjection, applyFog, clippingPlanesEnabled, clippingPlanes); command.castShadows = castShadows; command.receiveShadows = receiveShadows; command.renderState = renderState; diff --git a/Source/Scene/Instanced3DModel3DTileContent.js b/Source/Scene/Instanced3DModel3DTileContent.js index 1373144e21bb..01f65513809f 100644 --- a/Source/Scene/Instanced3DModel3DTileContent.js +++ b/Source/Scene/Instanced3DModel3DTileContent.js @@ -1,7 +1,6 @@ define([ '../Core/AttributeCompression', '../Core/Cartesian3', - '../Core/ClippingPlaneCollection', '../Core/Color', '../Core/ComponentDatatype', '../Core/defaultValue', @@ -29,7 +28,6 @@ define([ ], function( AttributeCompression, Cartesian3, - ClippingPlaneCollection, Color, ComponentDatatype, defaultValue, @@ -511,24 +509,21 @@ define([ this._modelInstanceCollection.modelMatrix = this._tile.computedTransform; this._modelInstanceCollection.shadows = this._tileset.shadows; this._modelInstanceCollection.debugWireframe = this._tileset.debugWireframe; - this._modelInstanceCollection.update(frameState); - // Update clipping planes - var tilesetClippingPlanes = this._tileset.clippingPlanes; var model = this._modelInstanceCollection._model; - var modelClippingPlanes = model.clippingPlanes; - if (defined(tilesetClippingPlanes)) { - if (!defined(modelClippingPlanes)) { - model.clippingPlanes = new ClippingPlaneCollection(); - modelClippingPlanes = model.clippingPlanes; - } - tilesetClippingPlanes.clone(modelClippingPlanes); - modelClippingPlanes.enabled = tilesetClippingPlanes.enabled && this._tile._isClipped; - } else if (defined(modelClippingPlanes) && modelClippingPlanes.enabled) { - modelClippingPlanes.enabled = false; + if (defined(model)) { + // Update for clipping planes + var tilesetClippingPlanes = this._tileset.clippingPlanes; + if (this._tile.clippingPlanesDirty && defined(tilesetClippingPlanes)) { + // Dereference the clipping planes from the model if they are irrelevant - saves on shading + // Link/Dereference directly to avoid ownership checks. + model._clippingPlanes = (tilesetClippingPlanes.enabled && this._tile._isClipped) ? tilesetClippingPlanes : undefined; + } } + this._modelInstanceCollection.update(frameState); + // If any commands were pushed, add derived commands var commandEnd = frameState.commandList.length; if ((commandStart < commandEnd) && frameState.passes.render) { diff --git a/Source/Scene/Model.js b/Source/Scene/Model.js index 5a117e19c976..85990ae8a704 100644 --- a/Source/Scene/Model.js +++ b/Source/Scene/Model.js @@ -63,6 +63,8 @@ define([ './Axis', './BlendingState', './ColorBlendMode', + './DracoLoader', + './getClippingFunction', './HeightReference', './JobType', './ModelAnimationCache', @@ -139,6 +141,8 @@ define([ Axis, BlendingState, ColorBlendMode, + DracoLoader, + getClippingFunction, HeightReference, JobType, ModelAnimationCache, @@ -267,7 +271,7 @@ define([ * @param {Number} [options.colorBlendAmount=0.5] Value used to determine the color strength when the colorBlendMode is MIX. A value of 0.0 results in the model's rendered color while a value of 1.0 results in a solid color, with any value in-between resulting in a mix of the two. * @param {Color} [options.silhouetteColor=Color.RED] The silhouette color. If more than 256 models have silhouettes enabled, there is a small chance that overlapping models will have minor artifacts. * @param {Number} [options.silhouetteSize=0.0] The size of the silhouette in pixels. - * @param {ClippingPlaneCollection} [options.clippingPlanes] The {@link ClippingPlaneCollection} used to selectively disable rendering the model. Clipping planes are not currently supported in Internet Explorer. + * @param {ClippingPlaneCollection} [options.clippingPlanes] The {@link ClippingPlaneCollection} used to selectively disable rendering the model. * * @exception {DeveloperError} bgltf is not a valid Binary glTF file. * @exception {DeveloperError} Only glTF Binary version 1 is supported. @@ -490,6 +494,7 @@ define([ this.color = defaultValue(options.color, Color.WHITE); this._color = new Color(); this._colorPreviousAlpha = 1.0; + this._hasPremultipliedAlpha = false; /** * Defines how the color blends with the model. @@ -511,12 +516,12 @@ define([ */ this.colorBlendAmount = defaultValue(options.colorBlendAmount, 0.5); - /** - * The {@link ClippingPlaneCollection} used to selectively disable rendering the model. Clipping planes are not currently supported in Internet Explorer. - * - * @type {ClippingPlaneCollection} - */ + this._colorShadingEnabled = isColorShadingEnabled(this); + + this._clippingPlanes = undefined; this.clippingPlanes = options.clippingPlanes; + // Used for checking if shaders need to be regenerated due to clipping plane changes. + this._clippingPlanesState = 0; /** * This property is for debugging only; it is not for production use nor is it optimized. @@ -616,6 +621,7 @@ define([ this._cachedRendererResources = undefined; this._loadRendererResourcesFromCache = false; this._updatedGltfVersion = false; + this._decodedData = {}; this._cachedGeometryByteLength = 0; this._cachedTexturesByteLength = 0; @@ -623,6 +629,12 @@ define([ this._texturesByteLength = 0; this._trianglesLength = 0; + // Hold references to programs and shaders for shader reconstruction. + // Hold these separately because _cachedGltf may get released (this.releaseGltfJson) + this._sourcePrograms = undefined; + this._sourceShaders = undefined; + this._quantizedVertexShaders = {}; + this._nodeCommands = []; this._pickIds = []; @@ -631,8 +643,6 @@ define([ this._rtcCenterEye = undefined; // in eye coordinates this._rtcCenter3D = undefined; // in world coordinates this._rtcCenter2D = undefined; // in projected world coordinates - - this._packedClippingPlanes = []; } defineProperties(Model.prototype, { @@ -999,6 +1009,26 @@ define([ get : function() { return this._cachedTexturesByteLength; } + }, + + /** + * The {@link ClippingPlaneCollection} used to selectively disable rendering the model. + * + * @memberof Model.prototype + * + * @type {ClippingPlaneCollection} + */ + clippingPlanes : { + get : function() { + return this._clippingPlanes; + }, + set : function(value) { + if (value === this._clippingPlanes) { + return; + } + // Handle destroying, checking of unknown, checking for existing ownership + ClippingPlaneCollection.setOwnership(value, this, '_clippingPlanes'); + } } }); @@ -1006,6 +1036,15 @@ define([ return context.stencilBuffer; } + function isColorShadingEnabled(model) { + return !Color.equals(model.color, Color.WHITE) || (model.colorBlendMode !== ColorBlendMode.HIGHLIGHT); + } + + function isClippingEnabled(model) { + var clippingPlanes = model._clippingPlanes; + return defined(clippingPlanes) && clippingPlanes.enabled; + } + /** * Determines if silhouettes are supported. * @@ -1060,7 +1099,7 @@ define([ * @param {Number} [options.colorBlendAmount=0.5] Value used to determine the color strength when the colorBlendMode is MIX. A value of 0.0 results in the model's rendered color while a value of 1.0 results in a solid color, with any value in-between resulting in a mix of the two. * @param {Color} [options.silhouetteColor=Color.RED] The silhouette color. If more than 256 models have silhouettes enabled, there is a small chance that overlapping models will have minor artifacts. * @param {Number} [options.silhouetteSize=0.0] The size of the silhouette in pixels. - * @param {ClippingPlaneCollection} [options.clippingPlanes] The {@link ClippingPlaneCollection} used to selectively disable rendering the model. Clipping planes are not currently supported in Internet Explorer. + * @param {ClippingPlaneCollection} [options.clippingPlanes] The {@link ClippingPlaneCollection} used to selectively disable rendering the model. * * @returns {Model} The newly created model. * @@ -1304,9 +1343,13 @@ define([ /////////////////////////////////////////////////////////////////////////// function getFailedLoadFunction(model, type, path) { - return function() { + return function(error) { model._state = ModelState.FAILED; - model._readyPromise.reject(new RuntimeError('Failed to load ' + type + ': ' + path)); + var message = 'Failed to load ' + type + ': ' + path; + if (defined(error)) { + message += '\n' + error.message; + } + model._readyPromise.reject(new RuntimeError(message)); }; } @@ -1369,8 +1412,11 @@ define([ // through glTF accessors to create the bufferview's index buffer. ForEach.accessor(model.gltf, function(accessor) { var bufferViewId = accessor.bufferView; - var bufferView = bufferViews[bufferViewId]; + if (!defined(bufferViewId)) { + return; + } + var bufferView = bufferViews[bufferViewId]; if ((bufferView.target === WebGLConstants.ELEMENT_ARRAY_BUFFER) && !defined(indexBufferIds[bufferViewId])) { indexBufferIds[bufferViewId] = true; indexBuffersToCreate.enqueue({ @@ -1875,39 +1921,99 @@ define([ /////////////////////////////////////////////////////////////////////////// + // When building programs for the first time, do not include modifiers for clipping planes and color + // since this is the version of the program that will be cached. function createProgram(id, model, context) { - var programs = model.gltf.programs; - var shaders = model.gltf.shaders; - var program = programs[id]; + var program = model._sourcePrograms[id]; + var shaders = model._sourceShaders; + var quantizedVertexShaders = model._quantizedVertexShaders; - var attributeLocations = createAttributeLocations(model, program.attributes); var vs = shaders[program.vertexShader].extras._pipeline.source; var fs = shaders[program.fragmentShader].extras._pipeline.source; - // Add pre-created attributes to attributeLocations - var attributesLength = program.attributes.length; - var precreatedAttributes = model._precreatedAttributes; - if (defined(precreatedAttributes)) { - for (var attrName in precreatedAttributes) { - if (precreatedAttributes.hasOwnProperty(attrName)) { - attributeLocations[attrName] = attributesLength++; - } + if (model.extensionsUsed.WEB3D_quantized_attributes) { + var quantizedVS = quantizedVertexShaders[id]; + if (!defined(quantizedVS)) { + quantizedVS = modifyShaderForQuantizedAttributes(vs, id, model); + quantizedVertexShaders[id] = quantizedVS; + } + vs = quantizedVS; + } + + var drawVS = modifyShader(vs, id, model._vertexShaderLoaded); + var drawFS = modifyShader(fs, id, model._fragmentShaderLoaded); + + var pickFS, pickVS; + if (model.allowPicking) { + // PERFORMANCE_IDEA: Can optimize this shader with a glTF hint. https://github.com/KhronosGroup/glTF/issues/181 + pickVS = modifyShader(vs, id, model._pickVertexShaderLoaded); + pickFS = modifyShader(fs, id, model._pickFragmentShaderLoaded); + + if (!model._pickFragmentShaderLoaded) { + pickFS = ShaderSource.createPickFragmentShaderSource(fs, 'uniform'); } } + createAttributesAndProgram(id, drawFS, drawVS, pickFS, pickVS, model, context); + } + + function recreateProgram(id, model, context) { + var program = model._sourcePrograms[id]; + var shaders = model._sourceShaders; + var quantizedVertexShaders = model._quantizedVertexShaders; + + var clippingPlaneCollection = model.clippingPlanes; + var addClippingPlaneCode = isClippingEnabled(model); + + var vs = shaders[program.vertexShader].extras._pipeline.source; + var fs = shaders[program.fragmentShader].extras._pipeline.source; if (model.extensionsUsed.WEB3D_quantized_attributes) { - vs = modifyShaderForQuantizedAttributes(vs, id, model); + vs = quantizedVertexShaders[id]; } - var premultipliedAlpha = hasPremultipliedAlpha(model); - var finalFS = modifyShaderForColor(fs, premultipliedAlpha); - if (ClippingPlaneCollection.isSupported()) { - finalFS = modifyShaderForClippingPlanes(finalFS); + var finalFS = fs; + if (isColorShadingEnabled(model)) { + finalFS = Model._modifyShaderForColor(finalFS, model._hasPremultipliedAlpha); + } + if (addClippingPlaneCode) { + finalFS = modifyShaderForClippingPlanes(finalFS, clippingPlaneCollection); } var drawVS = modifyShader(vs, id, model._vertexShaderLoaded); var drawFS = modifyShader(finalFS, id, model._fragmentShaderLoaded); + var pickFS, pickVS; + if (model.allowPicking) { + // PERFORMANCE_IDEA: Can optimize this shader with a glTF hint. https://github.com/KhronosGroup/glTF/issues/181 + pickVS = modifyShader(vs, id, model._pickVertexShaderLoaded); + pickFS = modifyShader(fs, id, model._pickFragmentShaderLoaded); + + if (!model._pickFragmentShaderLoaded) { + pickFS = ShaderSource.createPickFragmentShaderSource(fs, 'uniform'); + } + + if (addClippingPlaneCode) { + pickFS = modifyShaderForClippingPlanes(pickFS, clippingPlaneCollection); + } + } + createAttributesAndProgram(id, drawFS, drawVS, pickFS, pickVS, model, context); + } + + function createAttributesAndProgram(id, drawFS, drawVS, pickFS, pickVS, model, context) { + var program = model._sourcePrograms[id]; + var attributeLocations = createAttributeLocations(model, program.attributes); + + // Add pre-created attributes to attributeLocations + var attributesLength = program.attributes.length; + var precreatedAttributes = model._precreatedAttributes; + if (defined(precreatedAttributes)) { + for (var attrName in precreatedAttributes) { + if (precreatedAttributes.hasOwnProperty(attrName)) { + attributeLocations[attrName] = attributesLength++; + } + } + } + drawVS = ModelUtility.modifyVertexShaderForLogDepth(model.gltf, drawVS); drawFS = ModelUtility.modifyFragmentShaderForLogDepth(drawFS); @@ -1919,14 +2025,6 @@ define([ }); if (model.allowPicking) { - // PERFORMANCE_IDEA: Can optimize this shader with a glTF hint. https://github.com/KhronosGroup/glTF/issues/181 - var pickVS = modifyShader(vs, id, model._pickVertexShaderLoaded); - var pickFS = modifyShader(fs, id, model._pickFragmentShaderLoaded); - - if (!model._pickFragmentShaderLoaded) { - pickFS = ShaderSource.createPickFragmentShaderSource(fs, 'uniform'); - } - pickVS = ModelUtility.modifyVertexShaderForLogDepth(model.gltf, pickVS); pickFS = ModelUtility.modifyFragmentShaderForLogDepth(pickFS); @@ -2393,6 +2491,7 @@ define([ for (var i = 0; i < primitivesLength; ++i) { var primitive = primitives[i]; + var decodedData = model._decodedData[meshId + '.primitive.' + i]; // GLTF_SPEC: This does not take into account attribute arrays, // indicated by when an attribute points to a parameter with a @@ -2412,7 +2511,27 @@ define([ // Skip if the attribute is not used by the material, e.g., because the asset was exported // with an attribute that wasn't used and the asset wasn't optimized. if (defined(attributeLocation)) { + // Use attributes of previously decoded draco geometry + if (defined(decodedData)) { + var decodedAttributes = decodedData.attributes; + if (decodedAttributes.hasOwnProperty(attributeName)) { + var decodedAttribute = decodedAttributes[attributeName]; + attributes.push({ + index : attributeLocation, + vertexBuffer : rendererBuffers[decodedAttribute.bufferView], + componentsPerAttribute : decodedAttribute.componentsPerAttribute, + componentDatatype : decodedAttribute.componentDatatype, + normalize: decodedAttribute.normalized, + offsetInBytes : decodedAttribute.byteOffset, + strideInBytes : decodedAttribute.byteStride + }); + + continue; + } + } + var a = accessors[primitiveAttributes[attributeName]]; + var normalize = false; if (defined(a.normalized) && a.normalized) { normalize = true; @@ -2449,7 +2568,14 @@ define([ var indexBuffer; if (defined(primitive.indices)) { var accessor = accessors[primitive.indices]; - indexBuffer = rendererBuffers[accessor.bufferView]; + var bufferView = accessor.bufferView; + + // Used decoded draco buffer if available + if (defined(decodedData)) { + bufferView = decodedData.bufferView; + } + + indexBuffer = rendererBuffers[bufferView]; } rendererVertexArrays[meshId + '.primitive.' + i] = new VertexArray({ context : context, @@ -2515,7 +2641,7 @@ define([ var polygonOffset = defaultValue(statesFunctions.polygonOffset, [0.0, 0.0]); // Change the render state to use traditional alpha blending instead of premultiplied alpha blending - if (booleanStates[WebGLConstants.BLEND] && hasPremultipliedAlpha(model)) { + if (booleanStates[WebGLConstants.BLEND] && model._hasPremultipliedAlpha) { if ((blendFuncSeparate[0] === WebGLConstants.ONE) && (blendFuncSeparate[1] === WebGLConstants.ONE_MINUS_SRC_ALPHA)) { blendFuncSeparate[0] = WebGLConstants.SRC_ALPHA; blendFuncSeparate[1] = WebGLConstants.ONE_MINUS_SRC_ALPHA; @@ -2800,33 +2926,21 @@ define([ }; } - function createClippingPlanesLengthFunction(model) { - return function() { - return model._packedClippingPlanes.length; - }; - } - - function createClippingPlanesUnionRegionsFunction(model) { + var scratchClippingPlaneMatrix = new Matrix4(); + function createClippingPlanesMatrixFunction(model) { return function() { var clippingPlanes = model.clippingPlanes; if (!defined(clippingPlanes)) { - return false; + return Matrix4.IDENTITY; } - - return clippingPlanes.unionClippingRegions; + return Matrix4.multiply(model._modelViewMatrix, clippingPlanes.modelMatrix, scratchClippingPlaneMatrix); }; } function createClippingPlanesFunction(model) { return function() { var clippingPlanes = model.clippingPlanes; - var packedPlanes = model._packedClippingPlanes; - - if (defined(clippingPlanes) && clippingPlanes.enabled) { - clippingPlanes.transformAndPackPlanes(model._modelViewMatrix, packedPlanes); - } - - return packedPlanes; + return (!defined(clippingPlanes) || !clippingPlanes.enabled) ? model._defaultTexture : clippingPlanes.texture; }; } @@ -2896,6 +3010,7 @@ define([ var material = materials[primitive.material]; var technique = techniques[material.technique]; var programId = technique.program; + var decodedData = model._decodedData[id + '.primitive.' + i]; var boundingSphere; var positionAccessor = primitive.attributes.POSITION; @@ -2909,6 +3024,12 @@ define([ var count; if (defined(ix)) { count = ix.count; + + // Use indices of the previously decoded Draco geometry. + if (defined(decodedData)) { + count = decodedData.numberOfIndices; + } + offset = (ix.byteOffset / IndexDatatype.getSizeInBytes(ix.componentType)); // glTF has offset in bytes. Cesium has offsets in indices } else { @@ -2938,10 +3059,9 @@ define([ uniformMap = combine(uniformMap, { gltf_color : createColorFunction(model), gltf_colorBlend : createColorBlendFunction(model), - gltf_clippingPlanesLength: createClippingPlanesLengthFunction(model), - gltf_clippingPlanesUnionRegions: createClippingPlanesUnionRegionsFunction(model), - gltf_clippingPlanes: createClippingPlanesFunction(model, context), - gltf_clippingPlanesEdgeStyle: createClippingPlanesEdgeStyleFunction(model) + gltf_clippingPlanes: createClippingPlanesFunction(model), + gltf_clippingPlanesEdgeStyle: createClippingPlanesEdgeStyleFunction(model), + gltf_clippingPlanesMatrix: createClippingPlanesMatrixFunction(model) }); // Allow callback to modify the uniformMap @@ -2981,7 +3101,7 @@ define([ vertexArray : vertexArray, count : count, offset : offset, - shaderProgram : rendererPrograms[technique.program], + shaderProgram : rendererPrograms[programId], castShadows : castShadows, receiveShadows : receiveShadows, uniformMap : uniformMap, @@ -3022,7 +3142,7 @@ define([ vertexArray : vertexArray, count : count, offset : offset, - shaderProgram : rendererPickPrograms[technique.program], + shaderProgram : rendererPickPrograms[programId], uniformMap : pickUniformMap, renderState : rs, owner : owner, @@ -3058,12 +3178,13 @@ define([ silhouetteColorCommand2D : undefined, // Generated on demand when color alpha is less than 1.0 translucentCommand : undefined, - translucentCommand2D : undefined + translucentCommand2D : undefined, + // For updating node commands on shader reconstruction + programId : programId }; runtimeNode.commands.push(nodeCommand); nodeCommands.push(nodeCommand); } - } function createRuntimeNodes(model, context, scene3DOnly) { @@ -3192,6 +3313,11 @@ define([ var context = frameState.context; var scene3DOnly = frameState.scene3DOnly; + // Retain references to updated source shaders and programs for rebuilding as needed + model._sourcePrograms = model.gltf.programs; + model._sourceShaders = model.gltf.shaders; + model._hasPremultipliedAlpha = hasPremultipliedAlpha(model); + ModelUtility.checkSupportedGlExtensions(model.gltf.glExtensionsUsed, context); if (model._loadRendererResourcesFromCache) { var resources = model._rendererResources; @@ -3515,14 +3641,14 @@ define([ return translucentCommand; } - function updateColor(model, frameState) { + function updateColor(model, frameState, forceDerive) { // Generate translucent commands when the blend color has an alpha in the range (0.0, 1.0) exclusive var scene3DOnly = frameState.scene3DOnly; var alpha = model.color.alpha; if ((alpha > 0.0) && (alpha < 1.0)) { var nodeCommands = model._nodeCommands; var length = nodeCommands.length; - if (!defined(nodeCommands[0].translucentCommand)) { + if (!defined(nodeCommands[0].translucentCommand) || forceDerive) { for (var i = 0; i < length; ++i) { var nodeCommand = nodeCommands[i]; var command = nodeCommand.command; @@ -3735,42 +3861,29 @@ define([ } } - function modifyShaderForClippingPlanes(shader) { + function modifyShaderForClippingPlanes(shader, clippingPlaneCollection) { shader = ShaderSource.replaceMain(shader, 'gltf_clip_main'); + shader += Model._getClippingFunction(clippingPlaneCollection) + '\n'; shader += - 'uniform int gltf_clippingPlanesLength; \n' + - 'uniform bool gltf_clippingPlanesUnionRegions; \n' + - 'uniform vec4 gltf_clippingPlanes[czm_maxClippingPlanes]; \n' + + 'uniform sampler2D gltf_clippingPlanes; \n' + 'uniform vec4 gltf_clippingPlanesEdgeStyle; \n' + + 'uniform mat4 gltf_clippingPlanesMatrix; \n' + 'void main() \n' + '{ \n' + ' gltf_clip_main(); \n' + - ' if (gltf_clippingPlanesLength > 0) \n' + + ' float clipDistance = clip(gl_FragCoord, gltf_clippingPlanes, gltf_clippingPlanesMatrix);' + + ' vec4 clippingPlanesEdgeColor = vec4(1.0); \n' + + ' clippingPlanesEdgeColor.rgb = gltf_clippingPlanesEdgeStyle.rgb; \n' + + ' float clippingPlanesEdgeWidth = gltf_clippingPlanesEdgeStyle.a; \n' + + ' if (clipDistance > 0.0 && clipDistance < clippingPlanesEdgeWidth) \n' + ' { \n' + - ' float clipDistance; \n' + - ' if (gltf_clippingPlanesUnionRegions) \n' + - ' { \n' + - ' clipDistance = czm_discardIfClippedWithUnion(gltf_clippingPlanes, gltf_clippingPlanesLength); \n' + - ' } \n' + - ' else \n' + - ' { \n' + - ' clipDistance = czm_discardIfClippedWithIntersect(gltf_clippingPlanes, gltf_clippingPlanesLength); \n' + - ' } \n' + - ' \n' + - ' vec4 clippingPlanesEdgeColor = vec4(1.0); \n' + - ' clippingPlanesEdgeColor.rgb = gltf_clippingPlanesEdgeStyle.rgb; \n' + - ' float clippingPlanesEdgeWidth = gltf_clippingPlanesEdgeStyle.a; \n' + - ' if (clipDistance > 0.0 && clipDistance < clippingPlanesEdgeWidth) \n' + - ' { \n' + - ' gl_FragColor = clippingPlanesEdgeColor; \n' + - ' } \n' + + ' gl_FragColor = clippingPlanesEdgeColor;\n' + ' } \n' + '} \n'; - return shader; } - function updateSilhouette(model, frameState) { + function updateSilhouette(model, frameState, force) { // Generate silhouette commands when the silhouette size is greater than 0.0 and the alpha is greater than 0.0 // There are two silhouette commands: // 1. silhouetteModelCommand : render model normally while enabling stencil mask @@ -3787,25 +3900,16 @@ define([ model._colorPreviousAlpha = model.color.alpha; model._silhouetteColorPreviousAlpha = model.silhouetteColor.alpha; - if (dirty) { + if (dirty || force) { createSilhouetteCommands(model, frameState); } } - function updateClippingPlanes(model) { - var clippingPlanes = model.clippingPlanes; - var length = 0; - if (defined(clippingPlanes) && clippingPlanes.enabled) { - length = clippingPlanes.length; - } - - var packedPlanes = model._packedClippingPlanes; - var packedLength = packedPlanes.length; - if (packedLength !== length) { - packedPlanes.length = length; - - for (var i = packedLength; i < length; ++i) { - packedPlanes[i] = new Cartesian4(); + function updateClippingPlanes(model, frameState) { + var clippingPlanes = model._clippingPlanes; + if (defined(clippingPlanes) && clippingPlanes.owner === model) { + if (clippingPlanes.enabled) { + clippingPlanes.update(frameState); } } } @@ -4037,7 +4141,7 @@ define([ // Use renderer resources from cache instead of loading/creating them? var cachedRendererResources; var cacheKey = this.cacheKey; - if (defined(cacheKey)) { + if (defined(cacheKey)) { // cache key given? this model will pull from or contribute to context level cache context.cache.modelRendererResourceCache = defaultValue(context.cache.modelRendererResourceCache, {}); var modelCaches = context.cache.modelRendererResourceCache; @@ -4057,7 +4161,7 @@ define([ modelCaches[this.cacheKey] = cachedRendererResources; } this._cachedRendererResources = cachedRendererResources; - } else { + } else { // cache key not given? this model doesn't care about context level cache at all. Cache is here to simplify freeing on destroy. cachedRendererResources = new CachedRendererResources(context); cachedRendererResources.count = 1; this._cachedRendererResources = cachedRendererResources; @@ -4099,7 +4203,8 @@ define([ // Transition from LOADING -> LOADED once resources are downloaded and created. // Textures may continue to stream in while in the LOADED state. if (loadResources.pendingBufferLoads === 0) { - if (!this._updatedGltfVersion) { + if (!loadResources.initialized) { + // glTF pipeline updates var options = { optimizeForCesium: true, addBatchIdToGeneratedShaders : this._addBatchIdToGeneratedShaders @@ -4111,6 +4216,19 @@ define([ addDefaults(this.gltf); processModelMaterialsCommon(this.gltf, options); processPbrMetallicRoughness(this.gltf, options); + + // Start draco decoding + DracoLoader.parse(this); + + loadResources.initialized = true; + } + + if (!loadResources.finishedDecoding()) { + DracoLoader.decode(this, context) + .otherwise(getFailedLoadFunction(this, 'model', this.basePath)); + } + + if (loadResources.finishedDecoding() && !loadResources.resourcesParsed) { // We do this after to make sure that the ids don't change addBuffersToLoadResources(this); @@ -4126,12 +4244,16 @@ define([ this._boundingSphere = computeBoundingSphere(this); this._initialRadius = this._boundingSphere.radius; - this._updatedGltfVersion = true; + + loadResources.resourcesParsed = true; } - if (this._updatedGltfVersion && loadResources.pendingShaderLoads === 0) { + + if (loadResources.resourcesParsed && + loadResources.pendingShaderLoads === 0) { createResources(this, frameState); } } + if (loadResources.finished() || (incrementallyLoadTextures && loadResources.finishedEverythingButTextureCreation())) { this._state = ModelState.LOADED; @@ -4223,11 +4345,6 @@ define([ } } - var clippingPlanes = this.clippingPlanes; - if (defined(clippingPlanes) && clippingPlanes.enabled) { - Matrix4.multiply(context.uniformState.view3D, modelMatrix, this._modelViewMatrix); - } - // Update modelMatrix throughout the graph as needed if (animated || modelTransformChanged || justLoaded) { updateNodeHierarchyModelMatrix(this, modelTransformChanged, justLoaded, frameState.mapProjection); @@ -4247,9 +4364,32 @@ define([ updateWireframe(this); updateShowBoundingVolume(this); updateShadows(this); - updateColor(this, frameState); - updateSilhouette(this, frameState); updateClippingPlanes(this, frameState); + + // Regnerate shaders if ClippingPlaneCollection state changed or it was removed + var clippingPlanes = this._clippingPlanes; + var currentClippingPlanesState = 0; + if (defined(clippingPlanes) && clippingPlanes.enabled) { + Matrix4.multiply(context.uniformState.view3D, modelMatrix, this._modelViewMatrix); + currentClippingPlanesState = clippingPlanes.clippingPlanesState(); + } + + var shouldRegenerateShaders = this._clippingPlanesState !== currentClippingPlanesState; + this._clippingPlanesState = currentClippingPlanesState; + + // Regenerate shaders if color shading changed from last update + var currentlyColorShadingEnabled = isColorShadingEnabled(this); + if (currentlyColorShadingEnabled !== this._colorShadingEnabled) { + this._colorShadingEnabled = currentlyColorShadingEnabled; + shouldRegenerateShaders = true; + } + + if (shouldRegenerateShaders) { + regenerateShaders(this, frameState); + } else { + updateColor(this, frameState, false); + updateSilhouette(this, frameState, false); + } } if (justLoaded) { @@ -4328,6 +4468,83 @@ define([ } }; + function destroyIfNotCached(rendererResources, cachedRendererResources) { + if (rendererResources.programs !== cachedRendererResources.programs) { + destroy(rendererResources.programs); + } + if (rendererResources.pickPrograms !== cachedRendererResources.pickPrograms) { + destroy(rendererResources.pickPrograms); + } + if (rendererResources.silhouettePrograms !== cachedRendererResources.silhouettePrograms) { + destroy(rendererResources.silhouettePrograms); + } + } + + // Run from update iff: + // - everything is loaded + // - clipping planes state change OR color state set + // Run this from destructor after removing color state and clipping plane state + function regenerateShaders(model, frameState) { + // In regards to _cachedRendererResources: + // Fair to assume that this is data that should just never get modified due to clipping planes or model color. + // So if clipping planes or model color active: + // - delink _rendererResources.*programs and create new dictionaries. + // - do NOT destroy any programs - might be used by copies of the model or by might be needed in the future if clipping planes/model color is deactivated + + // If clipping planes and model color inactive: + // - destroy _rendererResources.*programs + // - relink _rendererResources.*programs to _cachedRendererResources + + // In both cases, need to mark commands as dirty, re-run derived commands (elsewhere) + + var rendererResources = model._rendererResources; + var cachedRendererResources = model._cachedRendererResources; + destroyIfNotCached(rendererResources, cachedRendererResources); + + if (isClippingEnabled(model) || isColorShadingEnabled(model)) { + rendererResources.programs = {}; + rendererResources.pickPrograms = {}; + rendererResources.silhouettePrograms = {}; + + var sourcePrograms = model._sourcePrograms; + + ForEach.object(sourcePrograms, function(program, id) { + recreateProgram(id, model, frameState.context); + }); + } else { + rendererResources.programs = cachedRendererResources.programs; + rendererResources.pickPrograms = cachedRendererResources.pickPrograms; + rendererResources.silhouettePrograms = cachedRendererResources.silhouettePrograms; + } + + // Fix all the commands, marking them as dirty so everything that derives will re-derive + var rendererPrograms = rendererResources.programs; + var rendererPickPrograms = rendererResources.pickPrograms; + + var nodeCommands = model._nodeCommands; + var commandCount = nodeCommands.length; + for (var i = 0; i < commandCount; ++i) { + var nodeCommand = nodeCommands[i]; + var programId = nodeCommand.programId; + + var renderProgram = rendererPrograms[programId]; + var pickProgram = rendererPickPrograms[programId]; + + nodeCommand.command.shaderProgram = renderProgram; + nodeCommand.pickCommand.shaderProgram = pickProgram; + if (defined(nodeCommand.command2D)) { + nodeCommand.command2D.shaderProgram = renderProgram; + } + if (defined(nodeCommand.pickCommand2D)) { + nodeCommand.pickCommand2D.shaderProgram = pickProgram; + } + } + + // Force update silhouette commands/shaders + updateColor(model, frameState, true); + updateSilhouette(model, frameState, true); + } + /** * Returns true if this object was destroyed; otherwise, false. *

@@ -4376,6 +4593,11 @@ define([ this._terrainProviderChangedCallback = undefined; } + // Shaders modified for clipping and for color don't get cached, so destroy these manually + if (defined(this._cachedRendererResources)) { + destroyIfNotCached(this._rendererResources, this._cachedRendererResources); + } + this._rendererResources = undefined; this._cachedRendererResources = this._cachedRendererResources && this._cachedRendererResources.release(); @@ -4386,9 +4608,24 @@ define([ } releaseCachedGltf(this); + this._sourcePrograms = undefined; + this._sourceShaders = undefined; + this._quantizedVertexShaders = undefined; + + // Only destroy the ClippingPlaneCollection if this is the owner - if this model is part of a Cesium3DTileset, + // _clippingPlanes references a ClippingPlaneCollection that this model does not own. + var clippingPlaneCollection = this._clippingPlanes; + if (defined(clippingPlaneCollection) && !clippingPlaneCollection.isDestroyed() && clippingPlaneCollection.owner === this) { + clippingPlaneCollection.destroy(); + } + this._clippingPlanes = undefined; return destroyObject(this); }; + // exposed for testing + Model._getClippingFunction = getClippingFunction; + Model._modifyShaderForColor = modifyShaderForColor; + return Model; }); diff --git a/Source/Scene/ModelInstanceCollection.js b/Source/Scene/ModelInstanceCollection.js index 061abb675f32..e771dfae5857 100644 --- a/Source/Scene/ModelInstanceCollection.js +++ b/Source/Scene/ModelInstanceCollection.js @@ -871,6 +871,32 @@ define([ }; } + function commandsDirty(model) { + var nodeCommands = model._nodeCommands; + var length = nodeCommands.length; + + for (var i = 0; i < length; i++) { + var nc = nodeCommands[i]; + if (nc.command.dirty) { + return true; + } + } + return false; + } + + function generateModelCommands(modelInstanceCollection, instancingSupported) { + modelInstanceCollection._drawCommands = []; + modelInstanceCollection._pickCommands = []; + + var modelCommands = getModelCommands(modelInstanceCollection._model); + if (instancingSupported) { + createCommands(modelInstanceCollection, modelCommands.draw, modelCommands.pick); + } else { + createCommandsNonInstanced(modelInstanceCollection, modelCommands.draw, modelCommands.pick); + updateCommandsNonInstanced(modelInstanceCollection); + } + } + function updateShadows(collection) { if (collection.shadows !== collection._shadows) { collection._shadows = collection.shadows; @@ -916,6 +942,7 @@ define([ var instancingSupported = this._instancingSupported; var model = this._model; + model.update(frameState); if (model.ready && (this._state === LoadState.LOADING)) { @@ -929,12 +956,7 @@ define([ var modelCommands = getModelCommands(model); this._modelCommands = modelCommands.draw; - if (instancingSupported) { - createCommands(this, modelCommands.draw, modelCommands.pick); - } else { - createCommandsNonInstanced(this, modelCommands.draw, modelCommands.pick); - updateCommandsNonInstanced(this); - } + generateModelCommands(this, instancingSupported); this._readyPromise.resolve(this); return; @@ -967,6 +989,11 @@ define([ updateVertexBuffer(this); } + // If the model was set to rebuild shaders during update, rebuild instanced commands. + if (commandsDirty(model)) { + generateModelCommands(this, instancingSupported); + } + // If any node changes due to an animation, update the commands. This could be inefficient if the model is // composed of many nodes and only one changes, however it is probably fine in the general use case. // Only applies when instancing is disabled. The instanced shader automatically handles node transformations. diff --git a/Source/Scene/ModelLoadResources.js b/Source/Scene/ModelLoadResources.js index 04d4ef0d9d4d..f2d1b5027365 100644 --- a/Source/Scene/ModelLoadResources.js +++ b/Source/Scene/ModelLoadResources.js @@ -8,6 +8,9 @@ define([ * @private */ function ModelLoadResources() { + this.initialized = false; + this.resourcesParsed = false; + this.vertexBuffersToCreate = new Queue(); this.indexBuffersToCreate = new Queue(); this.buffers = {}; @@ -31,6 +34,9 @@ define([ this.createUniformMaps = true; this.createRuntimeNodes = true; + this.decoding = false; + this.primitivesToDecode = new Queue(); + this.skinnedNodesIds = []; } @@ -79,11 +85,15 @@ define([ (this.programsToCreate.length === 0) && (this.pendingBufferViewToImage === 0); - return finishedPendingLoads && finishedResourceCreation; + return this.finishedDecoding() && finishedPendingLoads && finishedResourceCreation; + }; + + ModelLoadResources.prototype.finishedDecoding = function() { + return !this.decoding && this.primitivesToDecode.length === 0; }; ModelLoadResources.prototype.finished = function() { - return this.finishedTextureCreation() && this.finishedEverythingButTextureCreation(); + return this.finishedDecoding() && this.finishedTextureCreation() && this.finishedEverythingButTextureCreation(); }; return ModelLoadResources; diff --git a/Source/Scene/ModelUtility.js b/Source/Scene/ModelUtility.js index 642723081012..09b2d1b8b3bf 100644 --- a/Source/Scene/ModelUtility.js +++ b/Source/Scene/ModelUtility.js @@ -145,7 +145,8 @@ define([ extension !== 'KHR_technique_webgl' && extension !== 'KHR_binary_glTF' && extension !== 'KHR_materials_common' && - extension !== 'WEB3D_quantized_attributes') { + extension !== 'WEB3D_quantized_attributes' && + extension !== 'KHR_draco_mesh_compression') { throw new RuntimeError('Unsupported glTF Extension: ' + extension); } } diff --git a/Source/Scene/PointCloud3DTileContent.js b/Source/Scene/PointCloud3DTileContent.js index 4941ee3240af..d50eb6507733 100644 --- a/Source/Scene/PointCloud3DTileContent.js +++ b/Source/Scene/PointCloud3DTileContent.js @@ -35,6 +35,7 @@ define([ './Cesium3DTileBatchTable', './Cesium3DTileFeature', './Cesium3DTileFeatureTable', + './getClippingFunction', './SceneMode', './ShadowMode' ], function( @@ -74,6 +75,7 @@ define([ Cesium3DTileBatchTable, Cesium3DTileFeature, Cesium3DTileFeatureTable, + getClippingFunction, SceneMode, ShadowMode) { 'use strict'; @@ -123,10 +125,6 @@ define([ this._hasNormals = false; this._hasBatchIds = false; - // Used to regenerate shader when clipping on this tile changes - this._isClipped = false; - this._unionClippingRegions = false; - // Use per-point normals to hide back-facing points. this.backFaceCulling = false; this._backFaceCulling = false; @@ -148,7 +146,6 @@ define([ this._features = undefined; - this._packedClippingPlanes = []; this._modelViewMatrix = Matrix4.clone(Matrix4.IDENTITY); /** @@ -479,6 +476,7 @@ define([ var batchIdLocation = 3; var numberOfAttributes = 4; + var scratchClippingPlaneMatrix = new Matrix4(); function createResources(content, frameState) { var context = frameState.context; var parsedContent = content._parsedContent; @@ -541,7 +539,6 @@ define([ } } } - var uniformMap = { u_pointSizeAndTilesetTimeAndGeometricErrorAndDepthMultiplier : function() { var scratch = scratchPointSizeAndTilesetTimeAndGeometricErrorAndDepthMultiplier; @@ -574,15 +571,12 @@ define([ u_constantColor : function() { return content._constantColor; }, - u_clippingPlanesLength : function() { - return content._packedClippingPlanes.length; - }, u_clippingPlanes : function() { - return content._packedClippingPlanes; + var clippingPlanes = content._tileset.clippingPlanes; + return (!defined(clippingPlanes) || !clippingPlanes.enabled) ? context.defaultTexture : clippingPlanes.texture; }, u_clippingPlanesEdgeStyle : function() { var clippingPlanes = content._tileset.clippingPlanes; - if (!defined(clippingPlanes)) { return Color.WHITE.withAlpha(0.0); } @@ -590,6 +584,13 @@ define([ var style = Color.clone(clippingPlanes.edgeColor); style.alpha = clippingPlanes.edgeWidth; return style; + }, + u_clippingPlanesMatrix : function() { + var clippingPlanes = content._tileset.clippingPlanes; + if (!defined(clippingPlanes)) { + return Matrix4.IDENTITY; + } + return Matrix4.multiply(content._modelViewMatrix, clippingPlanes.modelMatrix, scratchClippingPlaneMatrix); } }; @@ -886,7 +887,7 @@ define([ var hasColorStyle = defined(colorStyleFunction); var hasShowStyle = defined(showStyleFunction); var hasPointSizeStyle = defined(pointSizeStyleFunction); - var hasClippedContent = defined(clippingPlanes) && clippingPlanes.enabled && content._tile._isClipped && ClippingPlaneCollection.isSupported(); + var hasClippedContent = defined(clippingPlanes) && clippingPlanes.enabled && content._tile._isClipped; // Get the properties in use by the style var styleableProperties = []; @@ -1119,9 +1120,12 @@ define([ var fs = 'varying vec4 v_color; \n'; if (hasClippedContent) { - fs += 'uniform int u_clippingPlanesLength;' + - 'uniform vec4 u_clippingPlanes[czm_maxClippingPlanes]; \n' + + fs += 'uniform sampler2D u_clippingPlanes; \n' + + 'uniform mat4 u_clippingPlanesMatrix; \n' + 'uniform vec4 u_clippingPlanesEdgeStyle; \n'; + fs += '\n'; + fs += getClippingFunction(clippingPlanes); + fs += '\n'; } fs += 'void main() \n' + @@ -1129,8 +1133,7 @@ define([ ' gl_FragColor = v_color; \n'; if (hasClippedContent) { - var clippingFunction = clippingPlanes.unionClippingRegions ? 'czm_discardIfClippedWithUnion' : 'czm_discardIfClippedWithIntersect'; - fs += ' float clipDistance = ' + clippingFunction + '(u_clippingPlanes, u_clippingPlanesLength); \n' + + fs += ' float clipDistance = clip(gl_FragCoord, u_clippingPlanes, u_clippingPlanesMatrix);\n' + ' vec4 clippingPlanesEdgeColor = vec4(1.0); \n' + ' clippingPlanesEdgeColor.rgb = u_clippingPlanesEdgeStyle.rgb; \n' + ' float clippingPlanesEdgeWidth = u_clippingPlanesEdgeStyle.a; \n' + @@ -1274,27 +1277,6 @@ define([ var context = frameState.context; - // update clipping planes - var clippingPlanes = this._tileset.clippingPlanes; - var clippingEnabled = defined(clippingPlanes) && clippingPlanes.enabled && this._tile._isClipped; - - var unionClippingRegions = false; - var length = 0; - if (clippingEnabled) { - unionClippingRegions = clippingPlanes.unionClippingRegions; - length = clippingPlanes.length; - } - - var packedPlanes = this._packedClippingPlanes; - var packedLength = packedPlanes.length; - if (packedLength !== length) { - packedPlanes.length = length; - - for (var i = 0; i < length; ++i) { - packedPlanes[i] = new Cartesian4(); - } - } - if (!defined(this._drawCommand)) { createResources(this, frameState); createShaders(this, frameState, tileset.style); @@ -1304,13 +1286,18 @@ define([ this._parsedContent = undefined; // Unload } - if (this._isClipped !== clippingEnabled || this._unionClippingRegions !== unionClippingRegions) { - this._isClipped = clippingEnabled; - this._unionClippingRegions = unionClippingRegions; - + // update for clipping planes + if (this._tile.clippingPlanesDirty) { createShaders(this, frameState, tileset.style); } + var clippingPlanes = this._tileset.clippingPlanes; + var clippingEnabled = defined(clippingPlanes) && clippingPlanes.enabled && this._tile._isClipped; + + if (clippingEnabled) { + Matrix4.multiply(context.uniformState.view3D, modelMatrix, this._modelViewMatrix); + } + // Update attenuation var pointCloudShading = this._tileset.pointCloudShading; if (defined(pointCloudShading)) { @@ -1360,11 +1347,6 @@ define([ this._pickCommand.boundingVolume = boundingVolume; } - if (clippingEnabled) { - Matrix4.multiply(context.uniformState.view3D, modelMatrix, this._modelViewMatrix); - clippingPlanes.transformAndPackPlanes(this._modelViewMatrix, packedPlanes); - } - this._drawCommand.castShadows = ShadowMode.castShadows(tileset.shadows); this._drawCommand.receiveShadows = ShadowMode.receiveShadows(tileset.shadows); diff --git a/Source/Scene/WebMapServiceImageryProvider.js b/Source/Scene/WebMapServiceImageryProvider.js index e62309b3443a..581e06f23e70 100644 --- a/Source/Scene/WebMapServiceImageryProvider.js +++ b/Source/Scene/WebMapServiceImageryProvider.js @@ -63,6 +63,8 @@ define([ * likely to result in rendering problems. * @param {Number} [options.maximumLevel] The maximum level-of-detail supported by the imagery provider, or undefined if there is no limit. * If not specified, there is no limit. + * @param {String} [options.crs] CRS specification, for use with WMS specification >= 1.3.0. + * @param {String} [options.srs] SRS specification, for use with WMS specification 1.1.0 or 1.1.1 * @param {Credit|String} [options.credit] A credit for the data source, which is displayed on the canvas. * @param {String|String[]} [options.subdomains='abc'] The subdomains to use for the {s} placeholder in the URL template. * If this parameter is a single string, each character in the string is a subdomain. If it is @@ -133,10 +135,10 @@ define([ // Use CRS with 1.3.0 and going forward. // For GeographicTilingScheme, use CRS:84 vice EPSG:4326 to specify lon, lat (x, y) ordering for // bbox requests. - parameters.crs = options.tilingScheme instanceof WebMercatorTilingScheme ? 'EPSG:3857' : 'CRS:84'; + parameters.crs = defaultValue(options.crs, options.tilingScheme instanceof WebMercatorTilingScheme ? 'EPSG:3857' : 'CRS:84'); } else { // SRS for WMS 1.1.0 or 1.1.1. - parameters.srs = options.tilingScheme instanceof WebMercatorTilingScheme ? 'EPSG:3857' : 'EPSG:4326'; + parameters.srs = defaultValue(options.srs, options.tilingScheme instanceof WebMercatorTilingScheme ? 'EPSG:3857' : 'EPSG:4326'); } resource.setQueryParameters(parameters, true); diff --git a/Source/Scene/getClippingFunction.js b/Source/Scene/getClippingFunction.js new file mode 100644 index 000000000000..495700e3eb87 --- /dev/null +++ b/Source/Scene/getClippingFunction.js @@ -0,0 +1,168 @@ +define([ + '../Core/Check', + '../Renderer/PixelDatatype', + './getUnpackFloatFunction' + ], function( + Check, + PixelDatatype, + getUnpackFloatFunction) { + 'use strict'; + + /** + * Gets the glsl functions needed to retrieve clipping planes from a ClippingPlaneCollection's texture. + * + * @param {ClippingPlaneCollection} clippingPlaneCollection ClippingPlaneCollection with a defined texture. + * @returns {String} A string containing glsl functions for retrieving clipping planes. + * @private + */ + function getClippingFunction(clippingPlaneCollection) { + //>>includeStart('debug', pragmas.debug); + Check.typeOf.object('clippingPlaneCollection', clippingPlaneCollection); + //>>includeEnd('debug'); + var unionClippingRegions = clippingPlaneCollection.unionClippingRegions; + var clippingPlanesLength = clippingPlaneCollection.length; + var texture = clippingPlaneCollection.texture; + var usingFloatTexture = texture.pixelDatatype === PixelDatatype.FLOAT; + var width = texture.width; + var height = texture.height; + + var functions = usingFloatTexture ? getClippingPlaneFloat(width, height) : getClippingPlaneUint8(width, height); + functions += '\n'; + functions += unionClippingRegions ? clippingFunctionUnion(usingFloatTexture, clippingPlanesLength) : clippingFunctionIntersect(usingFloatTexture, clippingPlanesLength); + return functions; + } + + function clippingFunctionUnion(usingFloatTexture, clippingPlanesLength) { + var functionString = + 'float clip(vec4 fragCoord, sampler2D clippingPlanes, mat4 clippingPlanesMatrix)\n' + + '{\n' + + ' vec4 position = czm_windowToEyeCoordinates(fragCoord);\n' + + ' vec3 clipNormal = vec3(0.0);\n' + + ' vec3 clipPosition = vec3(0.0);\n' + + ' float clipAmount = 0.0;\n' + + ' float pixelWidth = czm_metersPerPixel(position);\n' + + ' bool breakAndDiscard = false;\n' + + + ' for (int i = 0; i < ' + clippingPlanesLength + '; ++i)\n' + + ' {\n' + + ' vec4 clippingPlane = getClippingPlane(clippingPlanes, i, clippingPlanesMatrix);\n' + + + ' clipNormal = clippingPlane.xyz;\n' + + ' clipPosition = -clippingPlane.w * clipNormal;\n' + + + ' float amount = dot(clipNormal, (position.xyz - clipPosition)) / pixelWidth;\n' + + ' clipAmount = max(amount, clipAmount);\n' + + + ' if (amount <= 0.0)\n' + + ' {\n' + + ' breakAndDiscard = true;\n' + + ' break;\n' + // HLSL compiler bug if we discard here: https://bugs.chromium.org/p/angleproject/issues/detail?id=1945#c6 + ' }\n' + + ' }\n' + + + ' if (breakAndDiscard) {\n' + + ' discard;\n' + + ' }\n' + + ' return clipAmount;\n' + + '}\n'; + return functionString; + } + + function clippingFunctionIntersect(usingFloatTexture, clippingPlanesLength) { + var functionString = + 'float clip(vec4 fragCoord, sampler2D clippingPlanes, mat4 clippingPlanesMatrix)\n' + + '{\n' + + ' bool clipped = true;\n' + + ' vec4 position = czm_windowToEyeCoordinates(fragCoord);\n' + + ' vec3 clipNormal = vec3(0.0);\n' + + ' vec3 clipPosition = vec3(0.0);\n' + + ' float clipAmount = 0.0;\n' + + ' float pixelWidth = czm_metersPerPixel(position);\n' + + + ' for (int i = 0; i < ' + clippingPlanesLength + '; ++i)\n' + + ' {\n' + + ' vec4 clippingPlane = getClippingPlane(clippingPlanes, i, clippingPlanesMatrix);\n' + + + ' clipNormal = clippingPlane.xyz;\n' + + ' clipPosition = -clippingPlane.w * clipNormal;\n' + + + ' float amount = dot(clipNormal, (position.xyz - clipPosition)) / pixelWidth;\n' + + ' clipAmount = max(amount, clipAmount);\n' + + + ' clipped = clipped && (amount <= 0.0);\n' + + ' }\n' + + + ' if (clipped)\n' + + ' {\n' + + ' discard;\n' + + ' }\n' + + + ' return clipAmount;\n' + + '}\n'; + return functionString; + } + + function getClippingPlaneFloat(width, height) { + var pixelWidth = 1.0 / width; + var pixelHeight = 1.0 / height; + + var pixelWidthString = pixelWidth + ''; + if (pixelWidthString.indexOf('.') === -1) { + pixelWidthString += '.0'; + } + var pixelHeightString = pixelHeight + ''; + if (pixelHeightString.indexOf('.' === -1)) { + pixelHeightString += '.0'; + } + + var functionString = + 'vec4 getClippingPlane(sampler2D packedClippingPlanes, int clippingPlaneNumber, mat4 transform)\n' + + '{\n' + + ' int pixY = clippingPlaneNumber / ' + width + ';\n' + + ' int pixX = clippingPlaneNumber - (pixY * ' + width + ');\n' + + ' float u = (float(pixX) + 0.5) * ' + pixelWidthString + ';\n' + // sample from center of pixel + ' float v = (float(pixY) + 0.5) * ' + pixelHeightString + ';\n' + + ' vec4 plane = texture2D(packedClippingPlanes, vec2(u, v));\n' + + ' return czm_transformPlane(transform, plane);\n' + + '}\n'; + return functionString; + } + + function getClippingPlaneUint8(width, height) { + var pixelWidth = 1.0 / width; + var pixelHeight = 1.0 / height; + + var pixelWidthString = pixelWidth + ''; + if (pixelWidthString.indexOf('.') === -1) { + pixelWidthString += '.0'; + } + var pixelHeightString = pixelHeight + ''; + if (pixelHeightString.indexOf('.' === -1)) { + pixelHeightString += '.0'; + } + + var functionString = + getUnpackFloatFunction('unpackFloatDistance') + + '\n' + + 'vec4 getClippingPlane(sampler2D packedClippingPlanes, int clippingPlaneNumber, mat4 transform)\n' + + '{\n' + + ' int clippingPlaneStartIndex = clippingPlaneNumber * 2;\n' + // clipping planes are two pixels each + ' int pixY = clippingPlaneStartIndex / ' + width + ';\n' + + ' int pixX = clippingPlaneStartIndex - (pixY * ' + width + ');\n' + + ' float u = (float(pixX) + 0.5) * ' + pixelWidthString + ';\n' + // sample from center of pixel + ' float v = (float(pixY) + 0.5) * ' + pixelHeightString + ';\n' + + + ' vec4 oct32 = texture2D(packedClippingPlanes, vec2(u, v)) * 255.0;\n' + + ' vec2 oct = vec2(oct32.x * 256.0 + oct32.y, oct32.z * 256.0 + oct32.w);\n' + + + ' vec4 plane;\n' + + ' plane.xyz = czm_octDecode(oct, 65535.0);\n' + + ' plane.w = unpackFloatDistance(texture2D(packedClippingPlanes, vec2(u + ' + pixelWidthString + ', v)));\n' + + + ' return czm_transformPlane(transform, plane);\n' + + '}\n'; + return functionString; + } + + return getClippingFunction; +}); diff --git a/Source/Scene/getUnpackFloatFunction.js b/Source/Scene/getUnpackFloatFunction.js new file mode 100644 index 000000000000..dae8fb286cab --- /dev/null +++ b/Source/Scene/getUnpackFloatFunction.js @@ -0,0 +1,42 @@ +define([ + '../Core/defined' + ], function( + defined) { + 'use strict'; + + var SHIFT_RIGHT_8 = 1.0 / 256.0; + var SHIFT_RIGHT_16 = 1.0 / 65536.0; + var SHIFT_RIGHT_24 = 1.0 / 16777216.0; + + var BIAS = 38.0; + + /** + * Gets a glsl function that takes a vec4 representing a float packed to Uint8 RGBA and returns the unpacked float. + * + * @param {String} [functionName='unpackFloat'] An optional name for the glsl function. + * @returns {String} A string containing a glsl function that takes a vec4 and returns a float. + * @private + * @see Cartesian4#packFloat + */ + function getUnpackFloatFunction(functionName) { + if (!defined(functionName)) { + functionName = 'unpackFloat'; + } + return 'float ' + functionName + '(vec4 value) \n' + + '{ \n' + + ' value *= 255.0; \n' + + ' float temp = value.w / 2.0; \n' + + ' float exponent = floor(temp); \n' + + ' float sign = (temp - exponent) * 2.0; \n' + + ' exponent = exponent - float(' + BIAS + '); \n' + + ' sign = sign * 2.0 - 1.0; \n' + + ' sign = -sign; \n' + + ' float unpacked = sign * value.x * float(' + SHIFT_RIGHT_8 + '); \n' + + ' unpacked += sign * value.y * float(' + SHIFT_RIGHT_16 + '); \n' + + ' unpacked += sign * value.z * float(' + SHIFT_RIGHT_24 + '); \n' + + ' return unpacked * pow(10.0, exponent); \n' + + '} \n'; + } + + return getUnpackFloatFunction; +}); diff --git a/Source/Shaders/Builtin/Constants/maxClippingPlanes.glsl b/Source/Shaders/Builtin/Constants/maxClippingPlanes.glsl deleted file mode 100644 index 30c377df1668..000000000000 --- a/Source/Shaders/Builtin/Constants/maxClippingPlanes.glsl +++ /dev/null @@ -1,8 +0,0 @@ -/** - * The maximum amount of planes that can be clipped by czm_clipPlanes. - * - * @name czm_maxClippingPlanes - * @glslConstant - * @see czm_clipPlanes - */ -const int czm_maxClippingPlanes = 6; diff --git a/Source/Shaders/Builtin/Functions/discardIfClippedWithIntersect.glsl b/Source/Shaders/Builtin/Functions/discardIfClippedWithIntersect.glsl deleted file mode 100644 index 987dd8d354c8..000000000000 --- a/Source/Shaders/Builtin/Functions/discardIfClippedWithIntersect.glsl +++ /dev/null @@ -1,48 +0,0 @@ -/** - * Clip a fragment by an array of clipping planes. Clipping plane regions are joined by the intersect operation, so - * a fragment must be clipped by all of the planes to be discarded. - * - * @name czm_discardIfClippedWithIntersect - * @glslFunction - * - * @param {vec4[]} clippingPlanes The array of planes used to clip, defined in eyespace. - * @param {int} clippingPlanesLength The number of planes in the array of clipping planes. - * @returns {float} The distance away from a clipped fragment, in eyespace - */ -float czm_discardIfClippedWithIntersect(vec4 clippingPlanes[czm_maxClippingPlanes], int clippingPlanesLength) -{ - if (clippingPlanesLength > 0) - { - bool clipped = true; - vec4 position = czm_windowToEyeCoordinates(gl_FragCoord); - vec3 clipNormal = vec3(0.0); - vec3 clipPosition = vec3(0.0); - float clipAmount = 0.0; - float pixelWidth = czm_metersPerPixel(position); - - for (int i = 0; i < czm_maxClippingPlanes; ++i) - { - if (i == clippingPlanesLength) - { - break; - } - - clipNormal = clippingPlanes[i].xyz; - clipPosition = -clippingPlanes[i].w * clipNormal; - - float amount = dot(clipNormal, (position.xyz - clipPosition)) / pixelWidth; - clipAmount = max(amount, clipAmount); - - clipped = clipped && (amount <= 0.0); - } - - if (clipped) - { - discard; - } - - return clipAmount; - } - - return 0.0; -} diff --git a/Source/Shaders/Builtin/Functions/discardIfClippedWithUnion.glsl b/Source/Shaders/Builtin/Functions/discardIfClippedWithUnion.glsl deleted file mode 100644 index ae6110f8346f..000000000000 --- a/Source/Shaders/Builtin/Functions/discardIfClippedWithUnion.glsl +++ /dev/null @@ -1,45 +0,0 @@ -/** - * Clip a fragment by an array of clipping planes. Clipping plane regions are joined with the union operation, - * therefore if a fragment is clipped by any of the planes, it is discarded. - * - * @name czm_discardIfClippedWithUnion - * @glslFunction - * - * @param {vec4[]} clippingPlanes The array of planes used to clip, defined in eyespace. - * @param {int} clippingPlanesLength The number of planes in the array of clipping planes. - * @returns {float} The distance away from a clipped fragment, in eyespace - */ -float czm_discardIfClippedWithUnion(vec4 clippingPlanes[czm_maxClippingPlanes], int clippingPlanesLength) -{ - if (clippingPlanesLength > 0) - { - vec4 position = czm_windowToEyeCoordinates(gl_FragCoord); - vec3 clipNormal = vec3(0.0); - vec3 clipPosition = vec3(0.0); - float clipAmount = 0.0; - float pixelWidth = czm_metersPerPixel(position); - - for (int i = 0; i < czm_maxClippingPlanes; ++i) - { - if (i == clippingPlanesLength) - { - break; - } - - clipNormal = clippingPlanes[i].xyz; - clipPosition = -clippingPlanes[i].w * clipNormal; - - float amount = dot(clipNormal, (position.xyz - clipPosition)) / pixelWidth; - clipAmount = max(amount, clipAmount); - - if (amount <= 0.0) - { - discard; - } - } - - return clipAmount; - } - - return 0.0; -} diff --git a/Source/Shaders/Builtin/Functions/metersPerPixel.glsl b/Source/Shaders/Builtin/Functions/metersPerPixel.glsl index 953008963e28..f6066d21e0b5 100644 --- a/Source/Shaders/Builtin/Functions/metersPerPixel.glsl +++ b/Source/Shaders/Builtin/Functions/metersPerPixel.glsl @@ -1,6 +1,6 @@ /** * Computes the size of a pixel in meters at a distance from the eye. - + * @name czm_metersPerPixel * @glslFunction * @@ -14,13 +14,13 @@ float czm_metersPerPixel(vec4 positionEC) float height = czm_viewport.w; float pixelWidth; float pixelHeight; - + float top = czm_frustumPlanes.x; float bottom = czm_frustumPlanes.y; float left = czm_frustumPlanes.z; float right = czm_frustumPlanes.w; - - if (czm_sceneMode == czm_sceneMode2D) + + if (czm_sceneMode == czm_sceneMode2D || czm_orthographicIn3D == 1.0) { float frustumWidth = right - left; float frustumHeight = top - bottom; diff --git a/Source/Shaders/Builtin/Functions/octDecode.glsl b/Source/Shaders/Builtin/Functions/octDecode.glsl index ce4df362da12..98b2736f706a 100644 --- a/Source/Shaders/Builtin/Functions/octDecode.glsl +++ b/Source/Shaders/Builtin/Functions/octDecode.glsl @@ -28,7 +28,7 @@ * Decodes a unit-length vector in 'oct' encoding to a normalized 3-component Cartesian vector. * The 'oct' encoding is described in "A Survey of Efficient Representations of Independent Unit Vectors", * Cigolle et al 2014: http://jcgt.org/published/0003/02/01/ - * + * * @name czm_octDecode * @param {vec2} encoded The oct-encoded, unit-length vector * @returns {vec3} The decoded and normalized vector @@ -42,7 +42,7 @@ * Decodes a unit-length vector in 'oct' encoding packed into a floating-point number to a normalized 3-component Cartesian vector. * The 'oct' encoding is described in "A Survey of Efficient Representations of Independent Unit Vectors", * Cigolle et al 2014: http://jcgt.org/published/0003/02/01/ - * + * * @name czm_octDecode * @param {float} encoded The oct-encoded, unit-length vector * @returns {vec3} The decoded and normalized vector @@ -54,12 +54,12 @@ float y = (temp - x) * 256.0; return czm_octDecode(vec2(x, y)); } - + /** * Decodes three unit-length vectors in 'oct' encoding packed into two floating-point numbers to normalized 3-component Cartesian vectors. * The 'oct' encoding is described in "A Survey of Efficient Representations of Independent Unit Vectors", * Cigolle et al 2014: http://jcgt.org/published/0003/02/01/ - * + * * @name czm_octDecode * @param {vec2} encoded The packed oct-encoded, unit-length vectors. * @param {vec3} vector1 One decoded and normalized vector. @@ -80,4 +80,4 @@ vector2 = czm_octDecode(encodedFloat2); vector3 = czm_octDecode(vec2(x, y)); } - + diff --git a/Source/Shaders/Builtin/Functions/transformPlane.glsl b/Source/Shaders/Builtin/Functions/transformPlane.glsl new file mode 100644 index 000000000000..3f0412c891cb --- /dev/null +++ b/Source/Shaders/Builtin/Functions/transformPlane.glsl @@ -0,0 +1,8 @@ +vec4 czm_transformPlane(mat4 transform, vec4 clippingPlane) { + vec3 transformedDirection = normalize((transform * vec4(clippingPlane.xyz, 0.0)).xyz); + vec3 transformedPosition = (transform * vec4(clippingPlane.xyz * -clippingPlane.w, 1.0)).xyz; + vec4 transformedPlane; + transformedPlane.xyz = transformedDirection; + transformedPlane.w = -dot(transformedDirection, transformedPosition); + return transformedPlane; +} diff --git a/Source/Shaders/Builtin/Functions/windowToEyeCoordinates.glsl b/Source/Shaders/Builtin/Functions/windowToEyeCoordinates.glsl index f429c26875ec..91bd5e3164f6 100644 --- a/Source/Shaders/Builtin/Functions/windowToEyeCoordinates.glsl +++ b/Source/Shaders/Builtin/Functions/windowToEyeCoordinates.glsl @@ -31,9 +31,12 @@ vec4 czm_windowToEyeCoordinates(vec4 fragmentCoordinate) vec4 q = vec4(x, y, z, 1.0); q /= fragmentCoordinate.w; - if (czm_inverseProjection != mat4(0.0)) { + if (!(czm_inverseProjection == mat4(0.0))) // IE and Edge sometimes do something weird with != between mat4s + { q = czm_inverseProjection * q; - } else { + } + else + { float top = czm_frustumPlanes.x; float bottom = czm_frustumPlanes.y; float left = czm_frustumPlanes.z; diff --git a/Source/Shaders/GlobeFS.glsl b/Source/Shaders/GlobeFS.glsl index f41b6eb34b31..bf64b95bcdf5 100644 --- a/Source/Shaders/GlobeFS.glsl +++ b/Source/Shaders/GlobeFS.glsl @@ -52,8 +52,8 @@ uniform vec2 u_lightingFadeDistance; #endif #ifdef ENABLE_CLIPPING_PLANES -uniform int u_clippingPlanesLength; -uniform vec4 u_clippingPlanes[czm_maxClippingPlanes]; +uniform sampler2D u_clippingPlanes; +uniform mat4 u_clippingPlanesMatrix; uniform vec4 u_clippingPlanesEdgeStyle; #endif @@ -156,11 +156,7 @@ vec4 computeWaterColor(vec3 positionEyeCoordinates, vec2 textureCoordinates, mat void main() { #ifdef ENABLE_CLIPPING_PLANES - #ifdef UNION_CLIPPING_REGIONS - float clipDistance = czm_discardIfClippedWithUnion(u_clippingPlanes, u_clippingPlanesLength); - #else - float clipDistance = czm_discardIfClippedWithIntersect(u_clippingPlanes, u_clippingPlanesLength); - #endif + float clipDistance = clip(gl_FragCoord, u_clippingPlanes, u_clippingPlanesMatrix); #endif // The clamp below works around an apparent bug in Chrome Canary v23.0.1241.0 diff --git a/Source/ThirdParty/draco-decoder-gltf.js b/Source/ThirdParty/draco-decoder-gltf.js new file mode 100644 index 000000000000..bf59515f91c6 --- /dev/null +++ b/Source/ThirdParty/draco-decoder-gltf.js @@ -0,0 +1,27 @@ +define([], function() { + DracoDecoderModule = {}; + var Module = DracoDecoderModule; // included code may refer to Module (e.g. from file packager), so alias it + +var isRuntimeInitialized=false;var isModuleParsed=false;Module["onRuntimeInitialized"]=(function(){isRuntimeInitialized=true;if(isModuleParsed){if(typeof Module["onModuleLoaded"]==="function"){Module["onModuleLoaded"](Module)}}});Module["onModuleParsed"]=(function(){isModuleParsed=true;if(isRuntimeInitialized){if(typeof Module["onModuleLoaded"]==="function"){Module["onModuleLoaded"](Module)}}});function isVersionSupported(versionString){if(typeof versionString!=="string")return false;const version=versionString.split(".");if(version.length<2||version.length>3)return false;if(version[0]==1&&version[1]>=0&&version[1]<=2)return true;if(version[0]!=0||version[1]>10)return false;return true}Module["isVersionSupported"]=isVersionSupported;var Module;if(!Module)Module=(typeof DracoDecoderModule!=="undefined"?DracoDecoderModule:null)||{};var moduleOverrides={};var key;for(key in Module){if(Module.hasOwnProperty(key)){moduleOverrides[key]=Module[key]}}var ENVIRONMENT_IS_WEB=false;var ENVIRONMENT_IS_WORKER=false;var ENVIRONMENT_IS_NODE=false;var ENVIRONMENT_IS_SHELL=false;if(Module["ENVIRONMENT"]){if(Module["ENVIRONMENT"]==="WEB"){ENVIRONMENT_IS_WEB=true}else if(Module["ENVIRONMENT"]==="WORKER"){ENVIRONMENT_IS_WORKER=true}else if(Module["ENVIRONMENT"]==="NODE"){ENVIRONMENT_IS_NODE=true}else if(Module["ENVIRONMENT"]==="SHELL"){ENVIRONMENT_IS_SHELL=true}else{throw new Error("The provided Module['ENVIRONMENT'] value is not valid. It must be one of: WEB|WORKER|NODE|SHELL.")}}else{ENVIRONMENT_IS_WEB=typeof window==="object";ENVIRONMENT_IS_WORKER=typeof importScripts==="function";ENVIRONMENT_IS_NODE=typeof process==="object"&&typeof require==="function"&&!ENVIRONMENT_IS_WEB&&!ENVIRONMENT_IS_WORKER;ENVIRONMENT_IS_SHELL=!ENVIRONMENT_IS_WEB&&!ENVIRONMENT_IS_NODE&&!ENVIRONMENT_IS_WORKER}if(ENVIRONMENT_IS_NODE){if(!Module["print"])Module["print"]=console.log;if(!Module["printErr"])Module["printErr"]=console.warn;var nodeFS;var nodePath;Module["read"]=function shell_read(filename,binary){var ret;ret=tryParseAsDataURI(filename);if(!ret){if(!nodeFS)nodeFS=require("fs");if(!nodePath)nodePath=require("path");filename=nodePath["normalize"](filename);ret=nodeFS["readFileSync"](filename)}return binary?ret:ret.toString()};Module["readBinary"]=function readBinary(filename){var ret=Module["read"](filename,true);if(!ret.buffer){ret=new Uint8Array(ret)}assert(ret.buffer);return ret};if(!Module["thisProgram"]){if(process["argv"].length>1){Module["thisProgram"]=process["argv"][1].replace(/\\/g,"/")}else{Module["thisProgram"]="unknown-program"}}Module["arguments"]=process["argv"].slice(2);process["on"]("uncaughtException",(function(ex){if(!(ex instanceof ExitStatus)){throw ex}}));Module["inspect"]=(function(){return"[Emscripten Module object]"})}else if(ENVIRONMENT_IS_SHELL){if(!Module["print"])Module["print"]=print;if(typeof printErr!="undefined")Module["printErr"]=printErr;if(typeof read!="undefined"){Module["read"]=function shell_read(f){var data=tryParseAsDataURI(f);if(data){return intArrayToString(data)}return read(f)}}else{Module["read"]=function shell_read(){throw"no read() available"}}Module["readBinary"]=function readBinary(f){var data;data=tryParseAsDataURI(f);if(data){return data}if(typeof readbuffer==="function"){return new Uint8Array(readbuffer(f))}data=read(f,"binary");assert(typeof data==="object");return data};if(typeof scriptArgs!="undefined"){Module["arguments"]=scriptArgs}else if(typeof arguments!="undefined"){Module["arguments"]=arguments}if(typeof quit==="function"){Module["quit"]=(function(status,toThrow){quit(status)})}}else if(ENVIRONMENT_IS_WEB||ENVIRONMENT_IS_WORKER){Module["read"]=function shell_read(url){try{var xhr=new XMLHttpRequest;xhr.open("GET",url,false);xhr.send(null);return xhr.responseText}catch(err){var data=tryParseAsDataURI(url);if(data){return intArrayToString(data)}throw err}};if(ENVIRONMENT_IS_WORKER){Module["readBinary"]=function readBinary(url){try{var xhr=new XMLHttpRequest;xhr.open("GET",url,false);xhr.responseType="arraybuffer";xhr.send(null);return new Uint8Array(xhr.response)}catch(err){var data=tryParseAsDataURI(url);if(data){return data}throw err}}}Module["readAsync"]=function readAsync(url,onload,onerror){var xhr=new XMLHttpRequest;xhr.open("GET",url,true);xhr.responseType="arraybuffer";xhr.onload=function xhr_onload(){if(xhr.status==200||xhr.status==0&&xhr.response){onload(xhr.response);return}var data=tryParseAsDataURI(url);if(data){onload(data.buffer);return}onerror()};xhr.onerror=onerror;xhr.send(null)};if(typeof arguments!="undefined"){Module["arguments"]=arguments}if(typeof console!=="undefined"){if(!Module["print"])Module["print"]=function shell_print(x){console.log(x)};if(!Module["printErr"])Module["printErr"]=function shell_printErr(x){console.warn(x)}}else{var TRY_USE_DUMP=false;if(!Module["print"])Module["print"]=TRY_USE_DUMP&&typeof dump!=="undefined"?(function(x){dump(x)}):(function(x){})}if(typeof Module["setWindowTitle"]==="undefined"){Module["setWindowTitle"]=(function(title){document.title=title})}}else{throw new Error("Unknown runtime environment. Where are we?")}if(!Module["print"]){Module["print"]=(function(){})}if(!Module["printErr"]){Module["printErr"]=Module["print"]}if(!Module["arguments"]){Module["arguments"]=[]}if(!Module["thisProgram"]){Module["thisProgram"]="./this.program"}if(!Module["quit"]){Module["quit"]=(function(status,toThrow){throw toThrow})}Module.print=Module["print"];Module.printErr=Module["printErr"];Module["preRun"]=[];Module["postRun"]=[];for(key in moduleOverrides){if(moduleOverrides.hasOwnProperty(key)){Module[key]=moduleOverrides[key]}}moduleOverrides=undefined;var Runtime={setTempRet0:(function(value){tempRet0=value;return value}),getTempRet0:(function(){return tempRet0}),stackSave:(function(){return STACKTOP}),stackRestore:(function(stackTop){STACKTOP=stackTop}),getNativeTypeSize:(function(type){switch(type){case"i1":case"i8":return 1;case"i16":return 2;case"i32":return 4;case"i64":return 8;case"float":return 4;case"double":return 8;default:{if(type[type.length-1]==="*"){return Runtime.QUANTUM_SIZE}else if(type[0]==="i"){var bits=parseInt(type.substr(1));assert(bits%8===0);return bits/8}else{return 0}}}}),getNativeFieldSize:(function(type){return Math.max(Runtime.getNativeTypeSize(type),Runtime.QUANTUM_SIZE)}),STACK_ALIGN:16,prepVararg:(function(ptr,type){if(type==="double"||type==="i64"){if(ptr&7){assert((ptr&7)===4);ptr+=4}}else{assert((ptr&3)===0)}return ptr}),getAlignSize:(function(type,size,vararg){if(!vararg&&(type=="i64"||type=="double"))return 8;if(!type)return Math.min(size,8);return Math.min(size||(type?Runtime.getNativeFieldSize(type):0),Runtime.QUANTUM_SIZE)}),dynCall:(function(sig,ptr,args){if(args&&args.length){return Module["dynCall_"+sig].apply(null,[ptr].concat(args))}else{return Module["dynCall_"+sig].call(null,ptr)}}),functionPointers:[],addFunction:(function(func){for(var i=0;i>2];var end=(ret+size+15|0)&-16;HEAP32[DYNAMICTOP_PTR>>2]=end;if(end>=TOTAL_MEMORY){var success=enlargeMemory();if(!success){HEAP32[DYNAMICTOP_PTR>>2]=ret;return 0}}return ret}),alignMemory:(function(size,quantum){var ret=size=Math.ceil(size/(quantum?quantum:16))*(quantum?quantum:16);return ret}),makeBigInt:(function(low,high,unsigned){var ret=unsigned?+(low>>>0)+ +(high>>>0)*+4294967296:+(low>>>0)+ +(high|0)*+4294967296;return ret}),GLOBAL_BASE:8,QUANTUM_SIZE:4,__dummy__:0};var ABORT=0;var EXITSTATUS=0;function assert(condition,text){if(!condition){abort("Assertion failed: "+text)}}function getCFunc(ident){var func=Module["_"+ident];assert(func,"Cannot call unknown function "+ident+", make sure it is exported");return func}var JSfuncs={"stackSave":(function(){Runtime.stackSave()}),"stackRestore":(function(){Runtime.stackRestore()}),"arrayToC":(function(arr){var ret=Runtime.stackAlloc(arr.length);writeArrayToMemory(arr,ret);return ret}),"stringToC":(function(str){var ret=0;if(str!==null&&str!==undefined&&str!==0){var len=(str.length<<2)+1;ret=Runtime.stackAlloc(len);stringToUTF8(str,ret,len)}return ret})};var toC={"string":JSfuncs["stringToC"],"array":JSfuncs["arrayToC"]};function ccall(ident,returnType,argTypes,args,opts){var func=getCFunc(ident);var cArgs=[];var stack=0;if(args){for(var i=0;i>0]=value;break;case"i8":HEAP8[ptr>>0]=value;break;case"i16":HEAP16[ptr>>1]=value;break;case"i32":HEAP32[ptr>>2]=value;break;case"i64":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];break;case"float":HEAPF32[ptr>>2]=value;break;case"double":HEAPF64[ptr>>3]=value;break;default:abort("invalid type for setValue: "+type)}}var ALLOC_STATIC=2;var ALLOC_NONE=4;function allocate(slab,types,allocator,ptr){var zeroinit,size;if(typeof slab==="number"){zeroinit=true;size=slab}else{zeroinit=false;size=slab.length}var singleType=typeof types==="string"?types:null;var ret;if(allocator==ALLOC_NONE){ret=ptr}else{ret=[typeof _malloc==="function"?_malloc:Runtime.staticAlloc,Runtime.stackAlloc,Runtime.staticAlloc,Runtime.dynamicAlloc][allocator===undefined?ALLOC_STATIC:allocator](Math.max(size,singleType?1:types.length))}if(zeroinit){var stop;ptr=ret;assert((ret&3)==0);stop=ret+(size&~3);for(;ptr>2]=0}stop=ret+size;while(ptr>0]=0}return ret}if(singleType==="i8"){if(slab.subarray||slab.slice){HEAPU8.set(slab,ret)}else{HEAPU8.set(new Uint8Array(slab),ret)}return ret}var i=0,type,typeSize,previousType;while(i>0];hasUtf|=t;if(t==0&&!length)break;i++;if(length&&i==length)break}if(!length)length=i;var ret="";if(hasUtf<128){var MAX_CHUNK=1024;var curr;while(length>0){curr=String.fromCharCode.apply(String,HEAPU8.subarray(ptr,ptr+Math.min(length,MAX_CHUNK)));ret=ret?ret+curr:curr;ptr+=MAX_CHUNK;length-=MAX_CHUNK}return ret}return Module["UTF8ToString"](ptr)}var UTF8Decoder=typeof TextDecoder!=="undefined"?new TextDecoder("utf8"):undefined;function UTF8ArrayToString(u8Array,idx){var endPtr=idx;while(u8Array[endPtr])++endPtr;if(endPtr-idx>16&&u8Array.subarray&&UTF8Decoder){return UTF8Decoder.decode(u8Array.subarray(idx,endPtr))}else{var u0,u1,u2,u3,u4,u5;var str="";while(1){u0=u8Array[idx++];if(!u0)return str;if(!(u0&128)){str+=String.fromCharCode(u0);continue}u1=u8Array[idx++]&63;if((u0&224)==192){str+=String.fromCharCode((u0&31)<<6|u1);continue}u2=u8Array[idx++]&63;if((u0&240)==224){u0=(u0&15)<<12|u1<<6|u2}else{u3=u8Array[idx++]&63;if((u0&248)==240){u0=(u0&7)<<18|u1<<12|u2<<6|u3}else{u4=u8Array[idx++]&63;if((u0&252)==248){u0=(u0&3)<<24|u1<<18|u2<<12|u3<<6|u4}else{u5=u8Array[idx++]&63;u0=(u0&1)<<30|u1<<24|u2<<18|u3<<12|u4<<6|u5}}}if(u0<65536){str+=String.fromCharCode(u0)}else{var ch=u0-65536;str+=String.fromCharCode(55296|ch>>10,56320|ch&1023)}}}}function stringToUTF8Array(str,outU8Array,outIdx,maxBytesToWrite){if(!(maxBytesToWrite>0))return 0;var startIdx=outIdx;var endIdx=outIdx+maxBytesToWrite-1;for(var i=0;i=55296&&u<=57343)u=65536+((u&1023)<<10)|str.charCodeAt(++i)&1023;if(u<=127){if(outIdx>=endIdx)break;outU8Array[outIdx++]=u}else if(u<=2047){if(outIdx+1>=endIdx)break;outU8Array[outIdx++]=192|u>>6;outU8Array[outIdx++]=128|u&63}else if(u<=65535){if(outIdx+2>=endIdx)break;outU8Array[outIdx++]=224|u>>12;outU8Array[outIdx++]=128|u>>6&63;outU8Array[outIdx++]=128|u&63}else if(u<=2097151){if(outIdx+3>=endIdx)break;outU8Array[outIdx++]=240|u>>18;outU8Array[outIdx++]=128|u>>12&63;outU8Array[outIdx++]=128|u>>6&63;outU8Array[outIdx++]=128|u&63}else if(u<=67108863){if(outIdx+4>=endIdx)break;outU8Array[outIdx++]=248|u>>24;outU8Array[outIdx++]=128|u>>18&63;outU8Array[outIdx++]=128|u>>12&63;outU8Array[outIdx++]=128|u>>6&63;outU8Array[outIdx++]=128|u&63}else{if(outIdx+5>=endIdx)break;outU8Array[outIdx++]=252|u>>30;outU8Array[outIdx++]=128|u>>24&63;outU8Array[outIdx++]=128|u>>18&63;outU8Array[outIdx++]=128|u>>12&63;outU8Array[outIdx++]=128|u>>6&63;outU8Array[outIdx++]=128|u&63}}outU8Array[outIdx]=0;return outIdx-startIdx}function stringToUTF8(str,outPtr,maxBytesToWrite){return stringToUTF8Array(str,HEAPU8,outPtr,maxBytesToWrite)}function lengthBytesUTF8(str){var len=0;for(var i=0;i=55296&&u<=57343)u=65536+((u&1023)<<10)|str.charCodeAt(++i)&1023;if(u<=127){++len}else if(u<=2047){len+=2}else if(u<=65535){len+=3}else if(u<=2097151){len+=4}else if(u<=67108863){len+=5}else{len+=6}}return len}var UTF16Decoder=typeof TextDecoder!=="undefined"?new TextDecoder("utf-16le"):undefined;function demangle(func){return func}function demangleAll(text){var regex=/__Z[\w\d_]+/g;return text.replace(regex,(function(x){var y=demangle(x);return x===y?x:x+" ["+y+"]"}))}function jsStackTrace(){var err=new Error;if(!err.stack){try{throw new Error(0)}catch(e){err=e}if(!err.stack){return"(no stack trace available)"}}return err.stack.toString()}function stackTrace(){var js=jsStackTrace();if(Module["extraStackTrace"])js+="\n"+Module["extraStackTrace"]();return demangleAll(js)}var WASM_PAGE_SIZE=65536;var ASMJS_PAGE_SIZE=16777216;var MIN_TOTAL_MEMORY=16777216;function alignUp(x,multiple){if(x%multiple>0){x+=multiple-x%multiple}return x}var HEAP,buffer,HEAP8,HEAPU8,HEAP16,HEAPU16,HEAP32,HEAPU32,HEAPF32,HEAPF64;function updateGlobalBuffer(buf){Module["buffer"]=buffer=buf}function updateGlobalBufferViews(){Module["HEAP8"]=HEAP8=new Int8Array(buffer);Module["HEAP16"]=HEAP16=new Int16Array(buffer);Module["HEAP32"]=HEAP32=new Int32Array(buffer);Module["HEAPU8"]=HEAPU8=new Uint8Array(buffer);Module["HEAPU16"]=HEAPU16=new Uint16Array(buffer);Module["HEAPU32"]=HEAPU32=new Uint32Array(buffer);Module["HEAPF32"]=HEAPF32=new Float32Array(buffer);Module["HEAPF64"]=HEAPF64=new Float64Array(buffer)}var STATIC_BASE,STATICTOP,staticSealed;var STACK_BASE,STACKTOP,STACK_MAX;var DYNAMIC_BASE,DYNAMICTOP_PTR;STATIC_BASE=STATICTOP=STACK_BASE=STACKTOP=STACK_MAX=DYNAMIC_BASE=DYNAMICTOP_PTR=0;staticSealed=false;function abortOnCannotGrowMemory(){abort("Cannot enlarge memory arrays. Either (1) compile with -s TOTAL_MEMORY=X with X higher than the current value "+TOTAL_MEMORY+", (2) compile with -s ALLOW_MEMORY_GROWTH=1 which allows increasing the size at runtime but prevents some optimizations, (3) set Module.TOTAL_MEMORY to a higher value before the program runs, or (4) if you want malloc to return NULL (0) instead of this abort, compile with -s ABORTING_MALLOC=0 ")}if(!Module["reallocBuffer"])Module["reallocBuffer"]=(function(size){var ret;try{if(ArrayBuffer.transfer){ret=ArrayBuffer.transfer(buffer,size)}else{var oldHEAP8=HEAP8;ret=new ArrayBuffer(size);var temp=new Int8Array(ret);temp.set(oldHEAP8)}}catch(e){return false}var success=_emscripten_replace_memory(ret);if(!success)return false;return ret});function enlargeMemory(){var PAGE_MULTIPLE=Module["usingWasm"]?WASM_PAGE_SIZE:ASMJS_PAGE_SIZE;var LIMIT=2147483648-PAGE_MULTIPLE;if(HEAP32[DYNAMICTOP_PTR>>2]>LIMIT){return false}var OLD_TOTAL_MEMORY=TOTAL_MEMORY;TOTAL_MEMORY=Math.max(TOTAL_MEMORY,MIN_TOTAL_MEMORY);while(TOTAL_MEMORY>2]){if(TOTAL_MEMORY<=536870912){TOTAL_MEMORY=alignUp(2*TOTAL_MEMORY,PAGE_MULTIPLE)}else{TOTAL_MEMORY=Math.min(alignUp((3*TOTAL_MEMORY+2147483648)/4,PAGE_MULTIPLE),LIMIT)}}var replacement=Module["reallocBuffer"](TOTAL_MEMORY);if(!replacement||replacement.byteLength!=TOTAL_MEMORY){TOTAL_MEMORY=OLD_TOTAL_MEMORY;return false}updateGlobalBuffer(replacement);updateGlobalBufferViews();return true}var byteLength;try{byteLength=Function.prototype.call.bind(Object.getOwnPropertyDescriptor(ArrayBuffer.prototype,"byteLength").get);byteLength(new ArrayBuffer(4))}catch(e){byteLength=(function(buffer){return buffer.byteLength})}var TOTAL_STACK=Module["TOTAL_STACK"]||5242880;var TOTAL_MEMORY=Module["TOTAL_MEMORY"]||16777216;if(TOTAL_MEMORY0){var callback=callbacks.shift();if(typeof callback=="function"){callback();continue}var func=callback.func;if(typeof func==="number"){if(callback.arg===undefined){Module["dynCall_v"](func)}else{Module["dynCall_vi"](func,callback.arg)}}else{func(callback.arg===undefined?null:callback.arg)}}}var __ATPRERUN__=[];var __ATINIT__=[];var __ATMAIN__=[];var __ATEXIT__=[];var __ATPOSTRUN__=[];var runtimeInitialized=false;var runtimeExited=false;function preRun(){if(Module["preRun"]){if(typeof Module["preRun"]=="function")Module["preRun"]=[Module["preRun"]];while(Module["preRun"].length){addOnPreRun(Module["preRun"].shift())}}callRuntimeCallbacks(__ATPRERUN__)}function ensureInitRuntime(){if(runtimeInitialized)return;runtimeInitialized=true;callRuntimeCallbacks(__ATINIT__)}function preMain(){callRuntimeCallbacks(__ATMAIN__)}function exitRuntime(){callRuntimeCallbacks(__ATEXIT__);runtimeExited=true}function postRun(){if(Module["postRun"]){if(typeof Module["postRun"]=="function")Module["postRun"]=[Module["postRun"]];while(Module["postRun"].length){addOnPostRun(Module["postRun"].shift())}}callRuntimeCallbacks(__ATPOSTRUN__)}function addOnPreRun(cb){__ATPRERUN__.unshift(cb)}function addOnPreMain(cb){__ATMAIN__.unshift(cb)}function addOnPostRun(cb){__ATPOSTRUN__.unshift(cb)}function writeArrayToMemory(array,buffer){HEAP8.set(array,buffer)}function writeAsciiToMemory(str,buffer,dontAddNull){for(var i=0;i>0]=str.charCodeAt(i)}if(!dontAddNull)HEAP8[buffer>>0]=0}assert(Math["imul"]&&Math["fround"]&&Math["clz32"]&&Math["trunc"],"this is a legacy browser, build with LEGACY_VM_SUPPORT");var Math_abs=Math.abs;var Math_cos=Math.cos;var Math_sin=Math.sin;var Math_tan=Math.tan;var Math_acos=Math.acos;var Math_asin=Math.asin;var Math_atan=Math.atan;var Math_atan2=Math.atan2;var Math_exp=Math.exp;var Math_log=Math.log;var Math_sqrt=Math.sqrt;var Math_ceil=Math.ceil;var Math_floor=Math.floor;var Math_pow=Math.pow;var Math_imul=Math.imul;var Math_fround=Math.fround;var Math_round=Math.round;var Math_min=Math.min;var Math_clz32=Math.clz32;var Math_trunc=Math.trunc;var runDependencies=0;var runDependencyWatcher=null;var dependenciesFulfilled=null;function addRunDependency(id){runDependencies++;if(Module["monitorRunDependencies"]){Module["monitorRunDependencies"](runDependencies)}}function removeRunDependency(id){runDependencies--;if(Module["monitorRunDependencies"]){Module["monitorRunDependencies"](runDependencies)}if(runDependencies==0){if(runDependencyWatcher!==null){clearInterval(runDependencyWatcher);runDependencyWatcher=null}if(dependenciesFulfilled){var callback=dependenciesFulfilled;dependenciesFulfilled=null;callback()}}}Module["preloadedImages"]={};Module["preloadedAudios"]={};var memoryInitializer=null;var ASM_CONSTS=[];STATIC_BASE=Runtime.GLOBAL_BASE;STATICTOP=STATIC_BASE+22656;__ATINIT__.push();memoryInitializer="data:application/octet-stream;base64,UBIAAJgSAAAYAAAAAAAAACgSAAC/EgAAUBIAANwSAAAYAAAAAAAAAFASAAAFEwAAQAAAAAAAAAAoEgAAIRMAAFASAADxFAAAMAAAAAAAAAAoEgAAExUAAFASAAA4FQAAMAAAAAA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ublePtr=STATICTOP;STATICTOP+=16;function ___assert_fail(condition,filename,line,func){ABORT=true;throw"Assertion failed: "+Pointer_stringify(condition)+", at: "+[filename?Pointer_stringify(filename):"unknown filename",line,func?Pointer_stringify(func):"unknown function"]+" at "+stackTrace()}function ___cxa_allocate_exception(size){return _malloc(size)}function __ZSt18uncaught_exceptionv(){return!!__ZSt18uncaught_exceptionv.uncaught_exception}var EXCEPTIONS={last:0,caught:[],infos:{},deAdjust:(function(adjusted){if(!adjusted||EXCEPTIONS.infos[adjusted])return adjusted;for(var ptr in EXCEPTIONS.infos){var info=EXCEPTIONS.infos[ptr];if(info.adjusted===adjusted){return ptr}}return adjusted}),addRef:(function(ptr){if(!ptr)return;var info=EXCEPTIONS.infos[ptr];info.refcount++}),decRef:(function(ptr){if(!ptr)return;var info=EXCEPTIONS.infos[ptr];assert(info.refcount>0);info.refcount--;if(info.refcount===0&&!info.rethrown){if(info.destructor){Module["dynCall_vi"](info.destructor,ptr)}delete EXCEPTIONS.infos[ptr];___cxa_free_exception(ptr)}}),clearRef:(function(ptr){if(!ptr)return;var info=EXCEPTIONS.infos[ptr];info.refcount=0})};function ___cxa_begin_catch(ptr){var info=EXCEPTIONS.infos[ptr];if(info&&!info.caught){info.caught=true;__ZSt18uncaught_exceptionv.uncaught_exception--}if(info)info.rethrown=false;EXCEPTIONS.caught.push(ptr);EXCEPTIONS.addRef(EXCEPTIONS.deAdjust(ptr));return ptr}function ___cxa_pure_virtual(){ABORT=true;throw"Pure virtual function called!"}function ___resumeException(ptr){if(!EXCEPTIONS.last){EXCEPTIONS.last=ptr}throw ptr+" - Exception catching is disabled, this exception cannot be caught. Compile with -s DISABLE_EXCEPTION_CATCHING=0 or DISABLE_EXCEPTION_CATCHING=2 to catch."}function ___cxa_find_matching_catch(){var thrown=EXCEPTIONS.last;if(!thrown){return(Runtime.setTempRet0(0),0)|0}var info=EXCEPTIONS.infos[thrown];var throwntype=info.type;if(!throwntype){return(Runtime.setTempRet0(0),thrown)|0}var typeArray=Array.prototype.slice.call(arguments);var pointer=Module["___cxa_is_pointer_type"](throwntype);if(!___cxa_find_matching_catch.buffer)___cxa_find_matching_catch.buffer=_malloc(4);HEAP32[___cxa_find_matching_catch.buffer>>2]=thrown;thrown=___cxa_find_matching_catch.buffer;for(var i=0;i>2];info.adjusted=thrown;return(Runtime.setTempRet0(typeArray[i]),thrown)|0}}thrown=HEAP32[thrown>>2];return(Runtime.setTempRet0(throwntype),thrown)|0}function ___cxa_throw(ptr,type,destructor){EXCEPTIONS.infos[ptr]={ptr:ptr,adjusted:ptr,type:type,destructor:destructor,refcount:0,caught:false,rethrown:false};EXCEPTIONS.last=ptr;if(!("uncaught_exception"in __ZSt18uncaught_exceptionv)){__ZSt18uncaught_exceptionv.uncaught_exception=1}else{__ZSt18uncaught_exceptionv.uncaught_exception++}throw ptr+" - Exception catching is disabled, this exception cannot be caught. Compile with -s DISABLE_EXCEPTION_CATCHING=0 or DISABLE_EXCEPTION_CATCHING=2 to catch."}var cttz_i8=allocate([8,0,1,0,2,0,1,0,3,0,1,0,2,0,1,0,4,0,1,0,2,0,1,0,3,0,1,0,2,0,1,0,5,0,1,0,2,0,1,0,3,0,1,0,2,0,1,0,4,0,1,0,2,0,1,0,3,0,1,0,2,0,1,0,6,0,1,0,2,0,1,0,3,0,1,0,2,0,1,0,4,0,1,0,2,0,1,0,3,0,1,0,2,0,1,0,5,0,1,0,2,0,1,0,3,0,1,0,2,0,1,0,4,0,1,0,2,0,1,0,3,0,1,0,2,0,1,0,7,0,1,0,2,0,1,0,3,0,1,0,2,0,1,0,4,0,1,0,2,0,1,0,3,0,1,0,2,0,1,0,5,0,1,0,2,0,1,0,3,0,1,0,2,0,1,0,4,0,1,0,2,0,1,0,3,0,1,0,2,0,1,0,6,0,1,0,2,0,1,0,3,0,1,0,2,0,1,0,4,0,1,0,2,0,1,0,3,0,1,0,2,0,1,0,5,0,1,0,2,0,1,0,3,0,1,0,2,0,1,0,4,0,1,0,2,0,1,0,3,0,1,0,2,0,1,0],"i8",ALLOC_STATIC);function ___gxx_personality_v0(){}var SYSCALLS={varargs:0,get:(function(varargs){SYSCALLS.varargs+=4;var ret=HEAP32[SYSCALLS.varargs-4>>2];return ret}),getStr:(function(){var ret=Pointer_stringify(SYSCALLS.get());return ret}),get64:(function(){var low=SYSCALLS.get(),high=SYSCALLS.get();if(low>=0)assert(high===0);else assert(high===-1);return low}),getZero:(function(){assert(SYSCALLS.get()===0)})};function ___syscall140(which,varargs){SYSCALLS.varargs=varargs;try{var stream=SYSCALLS.getStreamFromFD(),offset_high=SYSCALLS.get(),offset_low=SYSCALLS.get(),result=SYSCALLS.get(),whence=SYSCALLS.get();var offset=offset_low;FS.llseek(stream,offset,whence);HEAP32[result>>2]=stream.position;if(stream.getdents&&offset===0&&whence===0)stream.getdents=null;return 0}catch(e){if(typeof FS==="undefined"||!(e instanceof FS.ErrnoError))abort(e);return-e.errno}}function ___syscall146(which,varargs){SYSCALLS.varargs=varargs;try{var stream=SYSCALLS.get(),iov=SYSCALLS.get(),iovcnt=SYSCALLS.get();var ret=0;if(!___syscall146.buffer){___syscall146.buffers=[null,[],[]];___syscall146.printChar=(function(stream,curr){var buffer=___syscall146.buffers[stream];assert(buffer);if(curr===0||curr===10){(stream===1?Module["print"]:Module["printErr"])(UTF8ArrayToString(buffer,0));buffer.length=0}else{buffer.push(curr)}})}for(var i=0;i>2];var len=HEAP32[iov+(i*8+4)>>2];for(var j=0;j>2]=PTHREAD_SPECIFIC_NEXT_KEY;PTHREAD_SPECIFIC[PTHREAD_SPECIFIC_NEXT_KEY]=0;PTHREAD_SPECIFIC_NEXT_KEY++;return 0}function _pthread_once(ptr,func){if(!_pthread_once.seen)_pthread_once.seen={};if(ptr in _pthread_once.seen)return;Module["dynCall_v"](func);_pthread_once.seen[ptr]=1}function _pthread_setspecific(key,value){if(!(key in PTHREAD_SPECIFIC)){return ERRNO_CODES.EINVAL}PTHREAD_SPECIFIC[key]=value;return 0}function ___setErrNo(value){if(Module["___errno_location"])HEAP32[Module["___errno_location"]()>>2]=value;return value}__ATEXIT__.push((function(){var fflush=Module["_fflush"];if(fflush)fflush(0);var printChar=___syscall146.printChar;if(!printChar)return;var buffers=___syscall146.buffers;if(buffers[1].length)printChar(1,10);if(buffers[2].length)printChar(2,10)}));DYNAMICTOP_PTR=Runtime.staticAlloc(4);STACK_BASE=STACKTOP=Runtime.alignMemory(STATICTOP);STACK_MAX=STACK_BASE+TOTAL_STACK;DYNAMIC_BASE=Runtime.alignMemory(STACK_MAX);HEAP32[DYNAMICTOP_PTR>>2]=DYNAMIC_BASE;staticSealed=true;var ASSERTIONS=false;function intArrayFromString(stringy,dontAddNull,length){var len=length>0?length:lengthBytesUTF8(stringy)+1;var u8array=new Array(len);var numBytesWritten=stringToUTF8Array(stringy,u8array,0,u8array.length);if(dontAddNull)u8array.length=numBytesWritten;return u8array}function intArrayToString(array){var ret=[];for(var i=0;i255){if(ASSERTIONS){assert(false,"Character code "+chr+" ("+String.fromCharCode(chr)+") at offset "+i+" not in 0x00-0xFF.")}chr&=255}ret.push(String.fromCharCode(chr))}return ret.join("")}var keyStr="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=";var decodeBase64=typeof atob==="function"?atob:(function(input){var output="";var chr1,chr2,chr3;var enc1,enc2,enc3,enc4;var i=0;input=input.replace(/[^A-Za-z0-9\+\/\=]/g,"");do{enc1=keyStr.indexOf(input.charAt(i++));enc2=keyStr.indexOf(input.charAt(i++));enc3=keyStr.indexOf(input.charAt(i++));enc4=keyStr.indexOf(input.charAt(i++));chr1=enc1<<2|enc2>>4;chr2=(enc2&15)<<4|enc3>>2;chr3=(enc3&3)<<6|enc4;output=output+String.fromCharCode(chr1);if(enc3!==64){output=output+String.fromCharCode(chr2)}if(enc4!==64){output=output+String.fromCharCode(chr3)}}while(i2147483648)return false;b=new a(newBuffer);d=new c(newBuffer);f=new e(newBuffer);h=new g(newBuffer);j=new i(newBuffer);l=new k(newBuffer);n=new m(newBuffer);p=new o(newBuffer);buffer=newBuffer;return true} +// EMSCRIPTEN_START_FUNCS +function yb(a,c,e,g){a=a|0;c=c|0;e=e|0;g=g|0;var i=0,k=0,l=0,m=0,o=La,q=0.0;if(!g){g=0;return g|0}do switch(f[a+28>>2]|0){case 1:{k=a+24|0;i=b[k>>0]|0;if((i<<24>>24>e<<24>>24?e:i)<<24>>24>0){c=f[c>>2]|0;i=f[f[a>>2]>>2]|0;l=a+40|0;c=Qk(f[l>>2]|0,f[l+4>>2]|0,c|0,((c|0)<0)<<31>>31|0)|0;a=a+48|0;a=Hl(c|0,I|0,f[a>>2]|0,f[a+4>>2]|0)|0;c=0;a=i+a|0;while(1){l=b[a>>0]|0;i=g+(c<<3)|0;f[i>>2]=l;f[i+4>>2]=((l|0)<0)<<31>>31;c=c+1|0;i=b[k>>0]|0;if((c|0)>=((i<<24>>24>e<<24>>24?e:i)<<24>>24|0))break;else a=a+1|0}}c=i<<24>>24;if(i<<24>>24>=e<<24>>24){l=1;return l|0}kh(g+(c<<3)|0,0,(e<<24>>24)-c<<3|0)|0;l=1;return l|0}case 2:{k=a+24|0;i=b[k>>0]|0;if((i<<24>>24>e<<24>>24?e:i)<<24>>24>0){c=f[c>>2]|0;l=f[f[a>>2]>>2]|0;i=a+40|0;c=Qk(f[i>>2]|0,f[i+4>>2]|0,c|0,((c|0)<0)<<31>>31|0)|0;a=a+48|0;a=Hl(c|0,I|0,f[a>>2]|0,f[a+4>>2]|0)|0;c=0;a=l+a|0;while(1){i=g+(c<<3)|0;f[i>>2]=h[a>>0];f[i+4>>2]=0;c=c+1|0;i=b[k>>0]|0;if((c|0)>=((i<<24>>24>e<<24>>24?e:i)<<24>>24|0))break;else a=a+1|0}}c=i<<24>>24;if(i<<24>>24>=e<<24>>24){l=1;return l|0}kh(g+(c<<3)|0,0,(e<<24>>24)-c<<3|0)|0;l=1;return l|0}case 3:{k=a+24|0;i=b[k>>0]|0;if((i<<24>>24>e<<24>>24?e:i)<<24>>24>0){c=f[c>>2]|0;l=f[f[a>>2]>>2]|0;i=a+40|0;c=Qk(f[i>>2]|0,f[i+4>>2]|0,c|0,((c|0)<0)<<31>>31|0)|0;a=a+48|0;a=Hl(c|0,I|0,f[a>>2]|0,f[a+4>>2]|0)|0;c=0;a=l+a|0;while(1){l=d[a>>1]|0;i=g+(c<<3)|0;f[i>>2]=l;f[i+4>>2]=((l|0)<0)<<31>>31;c=c+1|0;i=b[k>>0]|0;if((c|0)>=((i<<24>>24>e<<24>>24?e:i)<<24>>24|0))break;else a=a+2|0}}c=i<<24>>24;if(i<<24>>24>=e<<24>>24){l=1;return l|0}kh(g+(c<<3)|0,0,(e<<24>>24)-c<<3|0)|0;l=1;return l|0}case 4:{k=a+24|0;i=b[k>>0]|0;if((i<<24>>24>e<<24>>24?e:i)<<24>>24>0){c=f[c>>2]|0;l=f[f[a>>2]>>2]|0;i=a+40|0;c=Qk(f[i>>2]|0,f[i+4>>2]|0,c|0,((c|0)<0)<<31>>31|0)|0;a=a+48|0;a=Hl(c|0,I|0,f[a>>2]|0,f[a+4>>2]|0)|0;c=0;a=l+a|0;while(1){i=g+(c<<3)|0;f[i>>2]=j[a>>1];f[i+4>>2]=0;c=c+1|0;i=b[k>>0]|0;if((c|0)>=((i<<24>>24>e<<24>>24?e:i)<<24>>24|0))break;else a=a+2|0}}c=i<<24>>24;if(i<<24>>24>=e<<24>>24){l=1;return l|0}kh(g+(c<<3)|0,0,(e<<24>>24)-c<<3|0)|0;l=1;return l|0}case 5:{k=a+24|0;i=b[k>>0]|0;if((i<<24>>24>e<<24>>24?e:i)<<24>>24>0){c=f[c>>2]|0;l=f[f[a>>2]>>2]|0;i=a+40|0;c=Qk(f[i>>2]|0,f[i+4>>2]|0,c|0,((c|0)<0)<<31>>31|0)|0;a=a+48|0;a=Hl(c|0,I|0,f[a>>2]|0,f[a+4>>2]|0)|0;c=0;a=l+a|0;while(1){l=f[a>>2]|0;i=g+(c<<3)|0;f[i>>2]=l;f[i+4>>2]=((l|0)<0)<<31>>31;c=c+1|0;i=b[k>>0]|0;if((c|0)>=((i<<24>>24>e<<24>>24?e:i)<<24>>24|0))break;else a=a+4|0}}c=i<<24>>24;if(i<<24>>24>=e<<24>>24){l=1;return l|0}kh(g+(c<<3)|0,0,(e<<24>>24)-c<<3|0)|0;l=1;return l|0}case 6:{k=a+24|0;i=b[k>>0]|0;if((i<<24>>24>e<<24>>24?e:i)<<24>>24>0){c=f[c>>2]|0;l=f[f[a>>2]>>2]|0;i=a+40|0;c=Qk(f[i>>2]|0,f[i+4>>2]|0,c|0,((c|0)<0)<<31>>31|0)|0;a=a+48|0;a=Hl(c|0,I|0,f[a>>2]|0,f[a+4>>2]|0)|0;c=0;a=l+a|0;while(1){i=g+(c<<3)|0;f[i>>2]=f[a>>2];f[i+4>>2]=0;c=c+1|0;i=b[k>>0]|0;if((c|0)>=((i<<24>>24>e<<24>>24?e:i)<<24>>24|0))break;else a=a+4|0}}c=i<<24>>24;if(i<<24>>24>=e<<24>>24){l=1;return l|0}kh(g+(c<<3)|0,0,(e<<24>>24)-c<<3|0)|0;l=1;return l|0}case 7:{k=a+24|0;i=b[k>>0]|0;if((i<<24>>24>e<<24>>24?e:i)<<24>>24>0){c=f[c>>2]|0;l=f[f[a>>2]>>2]|0;i=a+40|0;c=Qk(f[i>>2]|0,f[i+4>>2]|0,c|0,((c|0)<0)<<31>>31|0)|0;a=a+48|0;a=Hl(c|0,I|0,f[a>>2]|0,f[a+4>>2]|0)|0;c=0;a=l+a|0;while(1){m=a;l=f[m+4>>2]|0;i=g+(c<<3)|0;f[i>>2]=f[m>>2];f[i+4>>2]=l;c=c+1|0;i=b[k>>0]|0;if((c|0)>=((i<<24>>24>e<<24>>24?e:i)<<24>>24|0))break;else a=a+8|0}}c=i<<24>>24;if(i<<24>>24>=e<<24>>24){m=1;return m|0}kh(g+(c<<3)|0,0,(e<<24>>24)-c<<3|0)|0;m=1;return m|0}case 8:{k=a+24|0;i=b[k>>0]|0;if((i<<24>>24>e<<24>>24?e:i)<<24>>24>0){c=f[c>>2]|0;m=f[f[a>>2]>>2]|0;l=a+40|0;c=Qk(f[l>>2]|0,f[l+4>>2]|0,c|0,((c|0)<0)<<31>>31|0)|0;a=a+48|0;a=Hl(c|0,I|0,f[a>>2]|0,f[a+4>>2]|0)|0;c=0;a=m+a|0;while(1){l=a;m=f[l+4>>2]|0;i=g+(c<<3)|0;f[i>>2]=f[l>>2];f[i+4>>2]=m;c=c+1|0;i=b[k>>0]|0;if((c|0)>=((i<<24>>24>e<<24>>24?e:i)<<24>>24|0))break;else a=a+8|0}}c=i<<24>>24;if(i<<24>>24>=e<<24>>24){m=1;return m|0}kh(g+(c<<3)|0,0,(e<<24>>24)-c<<3|0)|0;m=1;return m|0}case 9:{k=a+24|0;i=b[k>>0]|0;if((i<<24>>24>e<<24>>24?e:i)<<24>>24>0){c=f[c>>2]|0;m=f[f[a>>2]>>2]|0;l=a+40|0;c=Qk(f[l>>2]|0,f[l+4>>2]|0,c|0,((c|0)<0)<<31>>31|0)|0;a=a+48|0;a=Hl(c|0,I|0,f[a>>2]|0,f[a+4>>2]|0)|0;c=0;a=m+a|0;while(1){o=$(n[a>>2]);m=+K(+o)>=1.0?(+o>0.0?~~+Y(+J(+o/4294967296.0),4294967295.0)>>>0:~~+W((+o-+(~~+o>>>0))/4294967296.0)>>>0):0;i=g+(c<<3)|0;f[i>>2]=~~+o>>>0;f[i+4>>2]=m;c=c+1|0;i=b[k>>0]|0;if((c|0)>=((i<<24>>24>e<<24>>24?e:i)<<24>>24|0))break;else a=a+4|0}}c=i<<24>>24;if(i<<24>>24>=e<<24>>24){m=1;return m|0}kh(g+(c<<3)|0,0,(e<<24>>24)-c<<3|0)|0;m=1;return m|0}case 10:{k=a+24|0;i=b[k>>0]|0;if((i<<24>>24>e<<24>>24?e:i)<<24>>24>0){c=f[c>>2]|0;m=f[f[a>>2]>>2]|0;l=a+40|0;c=Qk(f[l>>2]|0,f[l+4>>2]|0,c|0,((c|0)<0)<<31>>31|0)|0;a=a+48|0;a=Hl(c|0,I|0,f[a>>2]|0,f[a+4>>2]|0)|0;c=0;a=m+a|0;while(1){q=+p[a>>3];m=+K(q)>=1.0?(q>0.0?~~+Y(+J(q/4294967296.0),4294967295.0)>>>0:~~+W((q-+(~~q>>>0))/4294967296.0)>>>0):0;i=g+(c<<3)|0;f[i>>2]=~~q>>>0;f[i+4>>2]=m;c=c+1|0;i=b[k>>0]|0;if((c|0)>=((i<<24>>24>e<<24>>24?e:i)<<24>>24|0))break;else a=a+8|0}}c=i<<24>>24;if(i<<24>>24>=e<<24>>24){m=1;return m|0}kh(g+(c<<3)|0,0,(e<<24>>24)-c<<3|0)|0;m=1;return m|0}case 11:{k=a+24|0;i=b[k>>0]|0;if((i<<24>>24>e<<24>>24?e:i)<<24>>24>0){c=f[c>>2]|0;m=f[f[a>>2]>>2]|0;l=a+40|0;c=Qk(f[l>>2]|0,f[l+4>>2]|0,c|0,((c|0)<0)<<31>>31|0)|0;a=a+48|0;a=Hl(c|0,I|0,f[a>>2]|0,f[a+4>>2]|0)|0;c=0;a=m+a|0;while(1){i=g+(c<<3)|0;f[i>>2]=h[a>>0];f[i+4>>2]=0;c=c+1|0;i=b[k>>0]|0;if((c|0)>=((i<<24>>24>e<<24>>24?e:i)<<24>>24|0))break;else a=a+1|0}}c=i<<24>>24;if(i<<24>>24>=e<<24>>24){m=1;return m|0}kh(g+(c<<3)|0,0,(e<<24>>24)-c<<3|0)|0;m=1;return m|0}default:{m=0;return m|0}}while(0);return 0}function zb(a,c,d,e,g,i){a=a|0;c=+c;d=d|0;e=e|0;g=g|0;i=i|0;var j=0,k=0,l=0,m=0,n=0,o=0,p=0,q=0.0,r=0,s=0,t=0,v=0,w=0,x=0,y=0,z=0,A=0,B=0,C=0,D=0,E=0,F=0,G=0;G=u;u=u+560|0;l=G+8|0;t=G;F=G+524|0;E=F;m=G+512|0;f[t>>2]=0;D=m+12|0;hm(c)|0;if((I|0)<0){C=1;A=18508;c=-c}else{C=(g&2049|0)!=0&1;A=(g&2048|0)==0?((g&1|0)==0?18509:18514):18511}hm(c)|0;B=I&2146435072;do if(B>>>0<2146435072|(B|0)==2146435072&0<0){q=+so(c,t)*2.0;j=q!=0.0;if(j)f[t>>2]=(f[t>>2]|0)+-1;w=i|32;if((w|0)==97){r=i&32;p=(r|0)==0?A:A+9|0;o=C|2;j=12-e|0;do if(!(e>>>0>11|(j|0)==0)){c=8.0;do{j=j+-1|0;c=c*16.0}while((j|0)!=0);if((b[p>>0]|0)==45){c=-(c+(-q-c));break}else{c=q+c-c;break}}else c=q;while(0);k=f[t>>2]|0;j=(k|0)<0?0-k|0:k;j=ti(j,((j|0)<0)<<31>>31,D)|0;if((j|0)==(D|0)){j=m+11|0;b[j>>0]=48}b[j+-1>>0]=(k>>31&2)+43;n=j+-2|0;b[n>>0]=i+15;l=(e|0)<1;m=(g&8|0)==0;k=F;while(1){C=~~c;j=k+1|0;b[k>>0]=h[18543+C>>0]|r;c=(c-+(C|0))*16.0;if((j-E|0)==1?!(m&(l&c==0.0)):0){b[j>>0]=46;j=k+2|0}if(!(c!=0.0))break;else k=j}C=j-E|0;E=D-n|0;D=(e|0)!=0&(C+-2|0)<(e|0)?e+2|0:C;j=E+o+D|0;Wi(a,32,d,j,g);Vm(a,p,o);Wi(a,48,d,j,g^65536);Vm(a,F,C);Wi(a,48,D-C|0,0,0);Vm(a,n,E);Wi(a,32,d,j,g^8192);break}k=(e|0)<0?6:e;if(j){j=(f[t>>2]|0)+-28|0;f[t>>2]=j;c=q*268435456.0}else{j=f[t>>2]|0;c=q}B=(j|0)<0?l:l+288|0;l=B;do{y=~~c>>>0;f[l>>2]=y;l=l+4|0;c=(c-+(y>>>0))*1.0e9}while(c!=0.0);if((j|0)>0){m=B;n=l;while(1){o=(j|0)<29?j:29;j=n+-4|0;if(j>>>0>=m>>>0){l=0;do{x=sl(f[j>>2]|0,0,o|0)|0;x=Hl(x|0,I|0,l|0,0)|0;y=I;v=Gk(x|0,y|0,1e9,0)|0;f[j>>2]=v;l=qn(x|0,y|0,1e9,0)|0;j=j+-4|0}while(j>>>0>=m>>>0);if(l){m=m+-4|0;f[m>>2]=l}}l=n;while(1){if(l>>>0<=m>>>0)break;j=l+-4|0;if(!(f[j>>2]|0))l=j;else break}j=(f[t>>2]|0)-o|0;f[t>>2]=j;if((j|0)>0)n=l;else break}}else m=B;if((j|0)<0){e=((k+25|0)/9|0)+1|0;s=(w|0)==102;do{r=0-j|0;r=(r|0)<9?r:9;if(m>>>0>>0){o=(1<>>r;p=0;j=m;do{y=f[j>>2]|0;f[j>>2]=(y>>>r)+p;p=X(y&o,n)|0;j=j+4|0}while(j>>>0>>0);j=(f[m>>2]|0)==0?m+4|0:m;if(!p){m=j;j=l}else{f[l>>2]=p;m=j;j=l+4|0}}else{m=(f[m>>2]|0)==0?m+4|0:m;j=l}l=s?B:m;l=(j-l>>2|0)>(e|0)?l+(e<<2)|0:j;j=(f[t>>2]|0)+r|0;f[t>>2]=j}while((j|0)<0);j=m;e=l}else{j=m;e=l}y=B;if(j>>>0>>0){l=(y-j>>2)*9|0;n=f[j>>2]|0;if(n>>>0>=10){m=10;do{m=m*10|0;l=l+1|0}while(n>>>0>=m>>>0)}}else l=0;s=(w|0)==103;v=(k|0)!=0;m=k-((w|0)!=102?l:0)+((v&s)<<31>>31)|0;if((m|0)<(((e-y>>2)*9|0)+-9|0)){n=m+9216|0;m=B+4+(((n|0)/9|0)+-1024<<2)|0;n=((n|0)%9|0)+1|0;if((n|0)<9){o=10;do{o=o*10|0;n=n+1|0}while((n|0)!=9)}else o=10;p=f[m>>2]|0;r=(p>>>0)%(o>>>0)|0;n=(m+4|0)==(e|0);if(!(n&(r|0)==0)){q=(((p>>>0)/(o>>>0)|0)&1|0)==0?9007199254740992.0:9007199254740994.0;x=(o|0)/2|0;c=r>>>0>>0?.5:n&(r|0)==(x|0)?1.0:1.5;if(C){x=(b[A>>0]|0)==45;q=x?-q:q;c=x?-c:c}n=p-r|0;f[m>>2]=n;if(q+c!=q){x=n+o|0;f[m>>2]=x;if(x>>>0>999999999){l=m;while(1){m=l+-4|0;f[l>>2]=0;if(m>>>0>>0){j=j+-4|0;f[j>>2]=0}x=(f[m>>2]|0)+1|0;f[m>>2]=x;if(x>>>0>999999999)l=m;else break}}l=(y-j>>2)*9|0;o=f[j>>2]|0;if(o>>>0>=10){n=10;do{n=n*10|0;l=l+1|0}while(o>>>0>=n>>>0)}}}w=m+4|0;x=j;j=e>>>0>w>>>0?w:e}else{x=j;j=e}w=j;while(1){if(w>>>0<=x>>>0){t=0;break}j=w+-4|0;if(!(f[j>>2]|0))w=j;else{t=1;break}}e=0-l|0;do if(s){j=((v^1)&1)+k|0;if((j|0)>(l|0)&(l|0)>-5){k=j+-1-l|0;n=i+-1|0}else{k=j+-1|0;n=i+-2|0}j=g&8;if(!j){if(t?(z=f[w+-4>>2]|0,(z|0)!=0):0)if(!((z>>>0)%10|0)){j=10;m=0;do{j=j*10|0;m=m+1|0}while(!((z>>>0)%(j>>>0)|0|0))}else m=0;else m=9;j=((w-y>>2)*9|0)+-9|0;if((n|32|0)==102){i=j-m|0;i=(i|0)>0?i:0;r=0;k=(k|0)<(i|0)?k:i;break}else{i=j+l-m|0;i=(i|0)>0?i:0;r=0;k=(k|0)<(i|0)?k:i;break}}else r=j}else{r=g&8;n=i}while(0);s=k|r;o=(s|0)!=0&1;p=(n|32|0)==102;if(p){v=0;j=(l|0)>0?l:0}else{j=(l|0)<0?e:l;j=ti(j,((j|0)<0)<<31>>31,D)|0;m=D;if((m-j|0)<2)do{j=j+-1|0;b[j>>0]=48}while((m-j|0)<2);b[j+-1>>0]=(l>>31&2)+43;j=j+-2|0;b[j>>0]=n;v=j;j=m-j|0}j=C+1+k+o+j|0;Wi(a,32,d,j,g);Vm(a,A,C);Wi(a,48,d,j,g^65536);if(p){o=x>>>0>B>>>0?B:x;r=F+9|0;p=r;n=F+8|0;m=o;do{l=ti(f[m>>2]|0,0,r)|0;if((m|0)==(o|0)){if((l|0)==(r|0)){b[n>>0]=48;l=n}}else if(l>>>0>F>>>0){kh(F|0,48,l-E|0)|0;do l=l+-1|0;while(l>>>0>F>>>0)}Vm(a,l,p-l|0);m=m+4|0}while(m>>>0<=B>>>0);if(s|0)Vm(a,18559,1);if(m>>>0>>0&(k|0)>0)while(1){l=ti(f[m>>2]|0,0,r)|0;if(l>>>0>F>>>0){kh(F|0,48,l-E|0)|0;do l=l+-1|0;while(l>>>0>F>>>0)}Vm(a,l,(k|0)<9?k:9);m=m+4|0;l=k+-9|0;if(!(m>>>0>>0&(k|0)>9)){k=l;break}else k=l}Wi(a,48,k+9|0,9,0)}else{t=t?w:x+4|0;if((k|0)>-1){s=F+9|0;e=(r|0)==0;r=s;n=0-E|0;p=F+8|0;o=x;do{l=ti(f[o>>2]|0,0,s)|0;if((l|0)==(s|0)){b[p>>0]=48;l=p}do if((o|0)==(x|0)){m=l+1|0;Vm(a,l,1);if(e&(k|0)<1){l=m;break}Vm(a,18559,1);l=m}else{if(l>>>0<=F>>>0)break;kh(F|0,48,l+n|0)|0;do l=l+-1|0;while(l>>>0>F>>>0)}while(0);E=r-l|0;Vm(a,l,(k|0)>(E|0)?E:k);k=k-E|0;o=o+4|0}while(o>>>0>>0&(k|0)>-1)}Wi(a,48,k+18|0,18,0);Vm(a,v,D-v|0)}Wi(a,32,d,j,g^8192)}else{F=(i&32|0)!=0;j=C+3|0;Wi(a,32,d,j,g&-65537);Vm(a,A,C);Vm(a,c!=c|0.0!=0.0?(F?18535:18539):F?18527:18531,3);Wi(a,32,d,j,g^8192)}while(0);u=G;return ((j|0)<(d|0)?d:j)|0}function Ab(a,c,e,g,h){a=a|0;c=c|0;e=e|0;g=g|0;h=h|0;var i=0,j=0,k=0,l=0,m=0,n=0,o=0,q=0,r=0,s=0,t=0,v=0,w=0,x=0,y=0,z=0,A=0,B=0,C=0,D=0,E=0,F=0,G=0;G=u;u=u+64|0;C=G+16|0;z=G;y=G+24|0;F=G+8|0;B=G+20|0;f[C>>2]=c;E=(a|0)!=0;x=y+40|0;D=x;y=y+39|0;A=F+4|0;o=c;c=0;i=0;l=0;a:while(1){do if((c|0)>-1)if((i|0)>(2147483647-c|0)){c=Ao()|0;f[c>>2]=75;c=-1;break}else{c=i+c|0;break}while(0);i=b[o>>0]|0;if(!(i<<24>>24)){w=87;break}else j=o;b:while(1){switch(i<<24>>24){case 37:{i=j;w=9;break b}case 0:{i=j;break b}default:{}}v=j+1|0;f[C>>2]=v;i=b[v>>0]|0;j=v}c:do if((w|0)==9)while(1){w=0;if((b[i+1>>0]|0)!=37)break c;j=j+1|0;i=i+2|0;f[C>>2]=i;if((b[i>>0]|0)==37)w=9;else break}while(0);j=j-o|0;if(E)Vm(a,o,j);if(j|0){o=i;i=j;continue}k=i+1|0;j=(b[k>>0]|0)+-48|0;if(j>>>0<10){v=(b[i+2>>0]|0)==36;r=v?j:-1;n=v?1:l;k=v?i+3|0:k}else{r=-1;n=l}f[C>>2]=k;i=b[k>>0]|0;j=(i<<24>>24)+-32|0;d:do if(j>>>0<32){l=0;while(1){j=1<>2]=k;i=b[k>>0]|0;j=(i<<24>>24)+-32|0;if(j>>>0>=32){m=l;break}}}else m=0;while(0);if(i<<24>>24==42){j=k+1|0;i=(b[j>>0]|0)+-48|0;if(i>>>0<10?(b[k+2>>0]|0)==36:0){f[h+(i<<2)>>2]=10;l=1;i=k+3|0;j=f[g+((b[j>>0]|0)+-48<<3)>>2]|0}else{if(n|0){c=-1;break}if(E){l=(f[e>>2]|0)+(4-1)&~(4-1);v=f[l>>2]|0;f[e>>2]=l+4;l=0;i=j;j=v}else{l=0;i=j;j=0}}f[C>>2]=i;t=(j|0)<0;q=t?m|8192:m;v=l;t=t?0-j|0:j}else{j=$j(C)|0;if((j|0)<0){c=-1;break}i=f[C>>2]|0;q=m;v=n;t=j}do if((b[i>>0]|0)==46){if((b[i+1>>0]|0)!=42){f[C>>2]=i+1;m=$j(C)|0;i=f[C>>2]|0;break}k=i+2|0;j=(b[k>>0]|0)+-48|0;if(j>>>0<10?(b[i+3>>0]|0)==36:0){f[h+(j<<2)>>2]=10;m=f[g+((b[k>>0]|0)+-48<<3)>>2]|0;i=i+4|0;f[C>>2]=i;break}if(v|0){c=-1;break a}if(E){s=(f[e>>2]|0)+(4-1)&~(4-1);j=f[s>>2]|0;f[e>>2]=s+4}else j=0;f[C>>2]=k;i=k;m=j}else m=-1;while(0);n=0;while(1){if(((b[i>>0]|0)+-65|0)>>>0>57){c=-1;break a}s=i+1|0;f[C>>2]=s;j=b[(b[i>>0]|0)+-65+(18027+(n*58|0))>>0]|0;l=j&255;if((l+-1|0)>>>0<8){i=s;n=l}else break}if(!(j<<24>>24)){c=-1;break}k=(r|0)>-1;do if(j<<24>>24==19)if(k){c=-1;break a}else w=49;else{if(k){f[h+(r<<2)>>2]=l;l=g+(r<<3)|0;r=f[l+4>>2]|0;w=z;f[w>>2]=f[l>>2];f[w+4>>2]=r;w=49;break}if(!E){c=0;break a}Kd(z,l,e)}while(0);if((w|0)==49?(w=0,!E):0){o=s;i=0;l=v;continue}l=b[i>>0]|0;l=(n|0)!=0&(l&15|0)==3?l&-33:l;j=q&-65537;r=(q&8192|0)==0?q:j;e:do switch(l|0){case 110:switch((n&255)<<24>>24){case 0:{f[f[z>>2]>>2]=c;o=s;i=0;l=v;continue a}case 1:{f[f[z>>2]>>2]=c;o=s;i=0;l=v;continue a}case 2:{o=f[z>>2]|0;f[o>>2]=c;f[o+4>>2]=((c|0)<0)<<31>>31;o=s;i=0;l=v;continue a}case 3:{d[f[z>>2]>>1]=c;o=s;i=0;l=v;continue a}case 4:{b[f[z>>2]>>0]=c;o=s;i=0;l=v;continue a}case 6:{f[f[z>>2]>>2]=c;o=s;i=0;l=v;continue a}case 7:{o=f[z>>2]|0;f[o>>2]=c;f[o+4>>2]=((c|0)<0)<<31>>31;o=s;i=0;l=v;continue a}default:{o=s;i=0;l=v;continue a}}case 112:{i=r|8;j=m>>>0>8?m:8;l=120;w=61;break}case 88:case 120:{i=r;j=m;w=61;break}case 111:{q=z;o=f[q>>2]|0;q=f[q+4>>2]|0;n=uk(o,q,x)|0;j=D-n|0;i=r;j=(r&8|0)==0|(m|0)>(j|0)?m:j+1|0;k=0;m=18491;w=67;break}case 105:case 100:{j=z;i=f[j>>2]|0;j=f[j+4>>2]|0;if((j|0)<0){i=jm(0,0,i|0,j|0)|0;j=I;k=z;f[k>>2]=i;f[k+4>>2]=j;k=1;l=18491;w=66;break e}else{k=(r&2049|0)!=0&1;l=(r&2048|0)==0?((r&1|0)==0?18491:18493):18492;w=66;break e}}case 117:{j=z;i=f[j>>2]|0;j=f[j+4>>2]|0;k=0;l=18491;w=66;break}case 99:{b[y>>0]=f[z>>2];o=y;n=j;l=1;k=0;j=18491;i=x;break}case 109:{i=Ao()|0;i=an(f[i>>2]|0)|0;w=71;break}case 115:{i=f[z>>2]|0;i=i|0?i:18501;w=71;break}case 67:{f[F>>2]=f[z>>2];f[A>>2]=0;f[z>>2]=F;i=F;m=-1;w=75;break}case 83:{i=f[z>>2]|0;if(!m){Wi(a,32,t,0,r);i=0;w=84}else w=75;break}case 65:case 71:case 70:case 69:case 97:case 103:case 102:case 101:{o=s;i=zb(a,+p[z>>3],t,m,r,l)|0;l=v;continue a}default:{n=r;l=m;k=0;j=18491;i=x}}while(0);f:do if((w|0)==61){q=z;o=f[q>>2]|0;q=f[q+4>>2]|0;n=dk(o,q,x,l&32)|0;m=(i&8|0)==0|(o|0)==0&(q|0)==0;k=m?0:2;m=m?18491:18491+(l>>4)|0;w=67}else if((w|0)==66){o=i;q=j;n=ti(i,j,x)|0;i=r;j=m;m=l;w=67}else if((w|0)==71){w=0;r=ig(i,0,m)|0;q=(r|0)==0;o=i;n=j;l=q?m:r-i|0;k=0;j=18491;i=q?i+m|0:r}else if((w|0)==75){w=0;k=0;j=0;n=i;while(1){l=f[n>>2]|0;if(!l)break;j=$m(B,l)|0;if((j|0)<0|j>>>0>(m-k|0)>>>0)break;k=j+k|0;if(m>>>0>k>>>0)n=n+4|0;else break}if((j|0)<0){c=-1;break a}Wi(a,32,t,k,r);if(!k){i=0;w=84}else{l=0;while(1){j=f[i>>2]|0;if(!j){i=k;w=84;break f}j=$m(B,j)|0;l=j+l|0;if((l|0)>(k|0)){i=k;w=84;break f}Vm(a,B,j);if(l>>>0>=k>>>0){i=k;w=84;break}else i=i+4|0}}}while(0);if((w|0)==67){w=0;l=(o|0)!=0|(q|0)!=0;r=(j|0)!=0|l;l=((l^1)&1)+(D-n)|0;o=r?n:x;n=(j|0)>-1?i&-65537:i;l=r?((j|0)>(l|0)?j:l):j;j=m;i=x}else if((w|0)==84){w=0;Wi(a,32,t,i,r^8192);o=s;i=(t|0)>(i|0)?t:i;l=v;continue}r=i-o|0;q=(l|0)<(r|0)?r:l;l=q+k|0;i=(t|0)<(l|0)?l:t;Wi(a,32,i,l,n);Vm(a,j,k);Wi(a,48,i,l,n^65536);Wi(a,48,q,r,0);Vm(a,o,r);Wi(a,32,i,l,n^8192);o=s;l=v}g:do if((w|0)==87)if(!a)if(!l)c=0;else{c=1;while(1){i=f[h+(c<<2)>>2]|0;if(!i)break;Kd(g+(c<<3)|0,i,e);c=c+1|0;if((c|0)>=10){c=1;break g}}while(1){if(f[h+(c<<2)>>2]|0){c=-1;break g}c=c+1|0;if((c|0)>=10){c=1;break}}}while(0);u=G;return c|0}function Bb(a,c,e,g){a=a|0;c=c|0;e=e|0;g=g|0;var i=0,k=0,l=0;if(!g){g=0;return g|0}do switch(f[a+28>>2]|0){case 1:{k=a+24|0;i=b[k>>0]|0;if((i<<24>>24>e<<24>>24?e:i)<<24>>24>0){c=f[c>>2]|0;i=f[f[a>>2]>>2]|0;l=a+40|0;c=Qk(f[l>>2]|0,f[l+4>>2]|0,c|0,((c|0)<0)<<31>>31|0)|0;a=a+48|0;a=Hl(c|0,I|0,f[a>>2]|0,f[a+4>>2]|0)|0;c=0;a=i+a|0;while(1){f[g+(c<<2)>>2]=b[a>>0];c=c+1|0;i=b[k>>0]|0;if((c|0)>=((i<<24>>24>e<<24>>24?e:i)<<24>>24|0))break;else a=a+1|0}}c=i<<24>>24;if(i<<24>>24>=e<<24>>24){l=1;return l|0}kh(g+(c<<2)|0,0,(e<<24>>24)-c<<2|0)|0;l=1;return l|0}case 2:{k=a+24|0;i=b[k>>0]|0;if((i<<24>>24>e<<24>>24?e:i)<<24>>24>0){c=f[c>>2]|0;l=f[f[a>>2]>>2]|0;i=a+40|0;c=Qk(f[i>>2]|0,f[i+4>>2]|0,c|0,((c|0)<0)<<31>>31|0)|0;a=a+48|0;a=Hl(c|0,I|0,f[a>>2]|0,f[a+4>>2]|0)|0;c=0;a=l+a|0;while(1){f[g+(c<<2)>>2]=h[a>>0];c=c+1|0;i=b[k>>0]|0;if((c|0)>=((i<<24>>24>e<<24>>24?e:i)<<24>>24|0))break;else a=a+1|0}}c=i<<24>>24;if(i<<24>>24>=e<<24>>24){l=1;return l|0}kh(g+(c<<2)|0,0,(e<<24>>24)-c<<2|0)|0;l=1;return l|0}case 3:{k=a+24|0;i=b[k>>0]|0;if((i<<24>>24>e<<24>>24?e:i)<<24>>24>0){c=f[c>>2]|0;l=f[f[a>>2]>>2]|0;i=a+40|0;c=Qk(f[i>>2]|0,f[i+4>>2]|0,c|0,((c|0)<0)<<31>>31|0)|0;a=a+48|0;a=Hl(c|0,I|0,f[a>>2]|0,f[a+4>>2]|0)|0;c=0;a=l+a|0;while(1){f[g+(c<<2)>>2]=d[a>>1];c=c+1|0;i=b[k>>0]|0;if((c|0)>=((i<<24>>24>e<<24>>24?e:i)<<24>>24|0))break;else a=a+2|0}}c=i<<24>>24;if(i<<24>>24>=e<<24>>24){l=1;return l|0}kh(g+(c<<2)|0,0,(e<<24>>24)-c<<2|0)|0;l=1;return l|0}case 4:{k=a+24|0;i=b[k>>0]|0;if((i<<24>>24>e<<24>>24?e:i)<<24>>24>0){c=f[c>>2]|0;l=f[f[a>>2]>>2]|0;i=a+40|0;c=Qk(f[i>>2]|0,f[i+4>>2]|0,c|0,((c|0)<0)<<31>>31|0)|0;a=a+48|0;a=Hl(c|0,I|0,f[a>>2]|0,f[a+4>>2]|0)|0;c=0;a=l+a|0;while(1){f[g+(c<<2)>>2]=j[a>>1];c=c+1|0;i=b[k>>0]|0;if((c|0)>=((i<<24>>24>e<<24>>24?e:i)<<24>>24|0))break;else a=a+2|0}}c=i<<24>>24;if(i<<24>>24>=e<<24>>24){l=1;return l|0}kh(g+(c<<2)|0,0,(e<<24>>24)-c<<2|0)|0;l=1;return l|0}case 5:{k=a+24|0;i=b[k>>0]|0;if((i<<24>>24>e<<24>>24?e:i)<<24>>24>0){c=f[c>>2]|0;l=f[f[a>>2]>>2]|0;i=a+40|0;c=Qk(f[i>>2]|0,f[i+4>>2]|0,c|0,((c|0)<0)<<31>>31|0)|0;a=a+48|0;a=Hl(c|0,I|0,f[a>>2]|0,f[a+4>>2]|0)|0;c=0;a=l+a|0;while(1){f[g+(c<<2)>>2]=f[a>>2];c=c+1|0;i=b[k>>0]|0;if((c|0)>=((i<<24>>24>e<<24>>24?e:i)<<24>>24|0))break;else a=a+4|0}}c=i<<24>>24;if(i<<24>>24>=e<<24>>24){l=1;return l|0}kh(g+(c<<2)|0,0,(e<<24>>24)-c<<2|0)|0;l=1;return l|0}case 6:{k=a+24|0;i=b[k>>0]|0;if((i<<24>>24>e<<24>>24?e:i)<<24>>24>0){c=f[c>>2]|0;l=f[f[a>>2]>>2]|0;i=a+40|0;c=Qk(f[i>>2]|0,f[i+4>>2]|0,c|0,((c|0)<0)<<31>>31|0)|0;a=a+48|0;a=Hl(c|0,I|0,f[a>>2]|0,f[a+4>>2]|0)|0;c=0;a=l+a|0;while(1){f[g+(c<<2)>>2]=f[a>>2];c=c+1|0;i=b[k>>0]|0;if((c|0)>=((i<<24>>24>e<<24>>24?e:i)<<24>>24|0))break;else a=a+4|0}}c=i<<24>>24;if(i<<24>>24>=e<<24>>24){l=1;return l|0}kh(g+(c<<2)|0,0,(e<<24>>24)-c<<2|0)|0;l=1;return l|0}case 7:{k=a+24|0;i=b[k>>0]|0;if((i<<24>>24>e<<24>>24?e:i)<<24>>24>0){c=f[c>>2]|0;l=f[f[a>>2]>>2]|0;i=a+40|0;c=Qk(f[i>>2]|0,f[i+4>>2]|0,c|0,((c|0)<0)<<31>>31|0)|0;a=a+48|0;a=Hl(c|0,I|0,f[a>>2]|0,f[a+4>>2]|0)|0;c=0;a=l+a|0;while(1){f[g+(c<<2)>>2]=f[a>>2];c=c+1|0;i=b[k>>0]|0;if((c|0)>=((i<<24>>24>e<<24>>24?e:i)<<24>>24|0))break;else a=a+8|0}}c=i<<24>>24;if(i<<24>>24>=e<<24>>24){l=1;return l|0}kh(g+(c<<2)|0,0,(e<<24>>24)-c<<2|0)|0;l=1;return l|0}case 8:{k=a+24|0;i=b[k>>0]|0;if((i<<24>>24>e<<24>>24?e:i)<<24>>24>0){c=f[c>>2]|0;l=f[f[a>>2]>>2]|0;i=a+40|0;c=Qk(f[i>>2]|0,f[i+4>>2]|0,c|0,((c|0)<0)<<31>>31|0)|0;a=a+48|0;a=Hl(c|0,I|0,f[a>>2]|0,f[a+4>>2]|0)|0;c=0;a=l+a|0;while(1){f[g+(c<<2)>>2]=f[a>>2];c=c+1|0;i=b[k>>0]|0;if((c|0)>=((i<<24>>24>e<<24>>24?e:i)<<24>>24|0))break;else a=a+8|0}}c=i<<24>>24;if(i<<24>>24>=e<<24>>24){l=1;return l|0}kh(g+(c<<2)|0,0,(e<<24>>24)-c<<2|0)|0;l=1;return l|0}case 9:{k=a+24|0;i=b[k>>0]|0;if((i<<24>>24>e<<24>>24?e:i)<<24>>24>0){c=f[c>>2]|0;l=f[f[a>>2]>>2]|0;i=a+40|0;c=Qk(f[i>>2]|0,f[i+4>>2]|0,c|0,((c|0)<0)<<31>>31|0)|0;a=a+48|0;a=Hl(c|0,I|0,f[a>>2]|0,f[a+4>>2]|0)|0;c=0;a=l+a|0;while(1){i=~~$(n[a>>2]);f[g+(c<<2)>>2]=i;c=c+1|0;i=b[k>>0]|0;if((c|0)>=((i<<24>>24>e<<24>>24?e:i)<<24>>24|0))break;else a=a+4|0}}c=i<<24>>24;if(i<<24>>24>=e<<24>>24){l=1;return l|0}kh(g+(c<<2)|0,0,(e<<24>>24)-c<<2|0)|0;l=1;return l|0}case 10:{k=a+24|0;i=b[k>>0]|0;if((i<<24>>24>e<<24>>24?e:i)<<24>>24>0){c=f[c>>2]|0;l=f[f[a>>2]>>2]|0;i=a+40|0;c=Qk(f[i>>2]|0,f[i+4>>2]|0,c|0,((c|0)<0)<<31>>31|0)|0;a=a+48|0;a=Hl(c|0,I|0,f[a>>2]|0,f[a+4>>2]|0)|0;c=0;a=l+a|0;while(1){f[g+(c<<2)>>2]=~~+p[a>>3];c=c+1|0;i=b[k>>0]|0;if((c|0)>=((i<<24>>24>e<<24>>24?e:i)<<24>>24|0))break;else a=a+8|0}}c=i<<24>>24;if(i<<24>>24>=e<<24>>24){l=1;return l|0}kh(g+(c<<2)|0,0,(e<<24>>24)-c<<2|0)|0;l=1;return l|0}case 11:{k=a+24|0;i=b[k>>0]|0;if((i<<24>>24>e<<24>>24?e:i)<<24>>24>0){c=f[c>>2]|0;l=f[f[a>>2]>>2]|0;i=a+40|0;c=Qk(f[i>>2]|0,f[i+4>>2]|0,c|0,((c|0)<0)<<31>>31|0)|0;a=a+48|0;a=Hl(c|0,I|0,f[a>>2]|0,f[a+4>>2]|0)|0;c=0;a=l+a|0;while(1){f[g+(c<<2)>>2]=h[a>>0];c=c+1|0;i=b[k>>0]|0;if((c|0)>=((i<<24>>24>e<<24>>24?e:i)<<24>>24|0))break;else a=a+1|0}}c=i<<24>>24;if(i<<24>>24>=e<<24>>24){l=1;return l|0}kh(g+(c<<2)|0,0,(e<<24>>24)-c<<2|0)|0;l=1;return l|0}default:{l=0;return l|0}}while(0);return 0}function Cb(a,c,d,e){a=a|0;c=c|0;d=d|0;e=e|0;var g=0,h=0,i=0,j=0,k=0,l=0,m=0,n=0,o=0,p=0,q=0,r=0,s=0,t=0,v=0,w=0,x=0,y=0,z=0,A=0,B=0,C=0,D=0,E=0,F=0,G=0,H=0,J=0,K=0,L=0;G=u;u=u+80|0;m=G+76|0;q=G+72|0;E=G+48|0;x=G+24|0;C=G;g=f[c>>2]|0;c=g+1|0;do if((g|0)>=0){i=((c|0)%3|0|0)==0?g+-2|0:c;h=(((g>>>0)%3|0|0)==0?2:-1)+g|0;g=f[a+32>>2]|0;do if((i|0)>=0){c=f[g>>2]|0;if((i|0)<((f[g+4>>2]|0)-c>>2|0)){j=f[c+(i<<2)>>2]|0;break}else ra(16937,16972,98,17057)}else j=-1073741824;while(0);if((h|0)>=0){c=f[g>>2]|0;if((h|0)<((f[g+4>>2]|0)-c>>2|0)){k=j;l=f[c+(h<<2)>>2]|0;break}else ra(16937,16972,98,17057)}else{k=j;l=-1073741824}}else{k=-1073741824;l=-1073741824}while(0);g=f[a+36>>2]|0;c=f[g>>2]|0;h=(f[g+4>>2]|0)-c>>2;if(h>>>0<=k>>>0)co(g);w=f[c+(k<<2)>>2]|0;if(h>>>0<=l>>>0)co(g);h=f[c+(l<<2)>>2]|0;p=(w|0)<(e|0);do if(p&(h|0)<(e|0)){A=w<<1;y=f[d+(A<<2)>>2]|0;z=((y|0)<0)<<31>>31;A=f[d+((A|1)<<2)>>2]|0;B=((A|0)<0)<<31>>31;o=h<<1;n=f[d+(o<<2)>>2]|0;o=f[d+((o|1)<<2)>>2]|0;if(!((n|0)!=(y|0)|(o|0)!=(A|0))){f[a+8>>2]=y;f[a+12>>2]=A;u=G;return}i=a+4|0;c=f[(f[i>>2]|0)+(e<<2)>>2]|0;f[E>>2]=0;f[E+4>>2]=0;f[E+8>>2]=0;f[E+12>>2]=0;f[E+16>>2]=0;f[E+20>>2]=0;g=f[a>>2]|0;if(!(b[g+84>>0]|0))c=f[(f[g+68>>2]|0)+(c<<2)>>2]|0;f[q>>2]=c;c=b[g+24>>0]|0;f[m>>2]=f[q>>2];yb(g,m,c,E)|0;c=f[(f[i>>2]|0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|0;g=Hl(L|0,I|0,g|0,c|0)|0;g=yl(g|0,I|0,1)|0;c=I;L=Qk(g|0,c|0,g|0,c|0)|0;K=I;if(K>>>0>k>>>0|(K|0)==(k|0)&L>>>0>j>>>0)F=28;else break}F=Qk(g|0,c|0,w|0,x|0)|0;H=I;d=Qk(g|0,c|0,l|0,m|0)|0;J=I;K=a+20|0;E=(f[K>>2]|0)+-1|0;L=(1<<(E&31)&f[(f[a+16>>2]|0)+(E>>>5<<2)>>2]|0)!=0;f[K>>2]=E;K=jm(0,0,F|0,H|0)|0;H=Hl(n|0,o|0,(L?F:K)|0,(L?H:I)|0)|0;K=I;F=jm(0,0,d|0,J|0)|0;J=Hl(p|0,q|0,(L?d:F)|0,(L?J:I)|0)|0;L=I;K=qi(H|0,K|0,C|0,D|0)|0;L=qi(J|0,L|0,C|0,D|0)|0;f[a+8>>2]=K;f[a+12>>2]=L;u=G;return}while(0);do if(p)c=w<<1;else{if((e|0)>0){c=(e<<1)+-2|0;break}L=a+8|0;f[L>>2]=0;f[L+4>>2]=0;u=G;return}while(0);f[a+8>>2]=f[d+(c<<2)>>2];f[a+12>>2]=f[d+(c+1<<2)>>2];u=G;return}function Db(a,b){a=a|0;b=b|0;var c=0,d=0,e=0,g=0,h=0,i=0,j=0,k=0,l=0,m=0,n=0,o=0,p=0,q=0,r=0,s=0,t=0,v=0,w=0,x=0,y=0,z=0;z=u;u=u+48|0;y=z;w=z+36|0;i=z+32|0;j=z+28|0;l=z+24|0;m=z+20|0;n=z+16|0;o=z+12|0;v=z+8|0;x=z+4|0;if((f[a+96>>2]|0)==(f[a+92>>2]|0)){u=z;return}d=a+56|0;c=f[d>>2]|0;if((c|0)==(f[a+60>>2]|0)){Og(a+52|0,b);r=b}else{f[c>>2]=f[b>>2];f[d>>2]=c+4;r=b}s=a+88|0;f[s>>2]=0;e=f[a>>2]|0;b=f[r>>2]|0;c=b+1|0;do if((b|0)>=0){d=((c|0)%3|0|0)==0?b+-2|0:c;do if((d|0)>=0){c=f[e>>2]|0;if((d|0)<((f[e+4>>2]|0)-c>>2|0)){g=f[c+(d<<2)>>2]|0;break}else ra(16937,16972,98,17057)}else g=-1073741824;while(0);d=(((b>>>0)%3|0|0)==0?2:-1)+b|0;if((d|0)>=0){c=f[e>>2]|0;if((d|0)<((f[e+4>>2]|0)-c>>2|0)){h=g;k=f[c+(d<<2)>>2]|0;break}else ra(16937,16972,98,17057)}else{h=g;k=-1073741824}}else{h=-1073741824;k=-1073741824}while(0);q=a+24|0;c=f[q>>2]|0;b=c+(h>>>5<<2)|0;e=1<<(h&31);d=f[b>>2]|0;if(!(d&e)){f[b>>2]=d|e;f[i>>2]=h;c=f[r>>2]|0;d=c+1|0;if((c|0)>=0)c=((d|0)%3|0|0)==0?c+-2|0:d;f[j>>2]=c;f[w>>2]=f[i>>2];f[y>>2]=f[j>>2];Ve(a+36|0,w,y);c=f[q>>2]|0}d=c+(k>>>5<<2)|0;b=1<<(k&31);c=f[d>>2]|0;if(!(c&b)){f[d>>2]=c|b;d=a+36|0;f[l>>2]=k;c=f[r>>2]|0;do if((c|0)>=0)if(!((c>>>0)%3|0)){c=c+2|0;break}else{c=c+-1|0;break}while(0);f[m>>2]=c;f[w>>2]=f[l>>2];f[y>>2]=f[m>>2];Ve(d,w,y)}c=f[a>>2]|0;d=f[r>>2]|0;do if((d|0)>=0){b=f[c>>2]|0;if((d|0)<((f[c+4>>2]|0)-b>>2|0)){p=f[b+(d<<2)>>2]|0;break}else ra(16937,16972,98,17057)}else p=-1073741824;while(0);d=(f[q>>2]|0)+(p>>>5<<2)|0;b=1<<(p&31);c=f[d>>2]|0;if(!(b&c)){f[d>>2]=c|b;f[n>>2]=p;f[o>>2]=f[r>>2];f[w>>2]=f[n>>2];f[y>>2]=f[o>>2];Ve(a+36|0,w,y)}c=f[s>>2]|0;a:do if((c|0)<3){m=a+12|0;n=a+36|0;l=a+92|0;b:while(1){while(1){b=a+52+(c*12|0)+4|0;d=f[b>>2]|0;if((f[a+52+(c*12|0)>>2]|0)!=(d|0))break;c=c+1|0;if((c|0)>=3)break a}p=d+-4|0;e=f[p>>2]|0;f[b>>2]=p;f[s>>2]=c;f[r>>2]=e;if((e|0)<=-1){t=85;break}p=(e>>>0)/3|0;d=f[m>>2]|0;do if(!(f[d+(p>>>5<<2)>>2]&1<<(p&31))){i=f[a>>2]|0;c=e;b=i;c:while(1){p=(c|0)/3|0;d=d+(p>>>5<<2)|0;f[d>>2]=1<<(p&31)|f[d>>2];d=f[r>>2]|0;if((d|0)<0)g=-1073741824;else{c=f[i>>2]|0;if((d|0)>=((f[b+4>>2]|0)-c>>2|0)){t=42;break b}g=f[c+(d<<2)>>2]|0}e=(f[q>>2]|0)+(g>>>5<<2)|0;h=1<<(g&31);c=f[e>>2]|0;if(!(h&c)){f[e>>2]=c|h;f[v>>2]=g;f[x>>2]=f[r>>2];f[w>>2]=f[v>>2];f[y>>2]=f[x>>2];Ve(n,w,y);i=f[a>>2]|0;d=f[r>>2]|0;b=i}if((d|0)<0){t=83;break}c=d+1|0;c=((c|0)%3|0|0)==0?d+-2|0:c;if((c|0)<0)k=c;else k=f[(f[b+12>>2]|0)+(c<<2)>>2]|0;c=(((d>>>0)%3|0|0)==0?2:-1)+d|0;if((c|0)>=0)c=f[(f[b+12>>2]|0)+(c<<2)>>2]|0;j=(k|0)<0;d=j?-1:(k>>>0)/3|0;e=(c|0)<0;g=e?-1:(c>>>0)/3|0;if(j)h=1;else h=(f[(f[m>>2]|0)+(d>>>5<<2)>>2]&1<<(d&31)|0)!=0;do if(e)if(h){t=83;break c}else{d=i;t=70}else{if(f[(f[m>>2]|0)+(g>>>5<<2)>>2]&1<<(g&31)|0)if(h){t=83;break c}else{d=i;t=70;break}d=f[b>>2]|0;if((c|0)>=((f[b+4>>2]|0)-d>>2|0)){t=57;break b}d=f[d+(c<<2)>>2]|0;if(!(1<<(d&31)&f[(f[q>>2]|0)+(d>>>5<<2)>>2])){p=(f[l>>2]|0)+(d<<2)|0;e=f[p>>2]|0;f[p>>2]=e+1;e=(e|0)>0?1:2}else e=0;if(h?(e|0)<=(f[s>>2]|0):0){e=i;break}f[y>>2]=c;b=a+52+(e*12|0)+4|0;d=f[b>>2]|0;if((d|0)==(f[a+52+(e*12|0)+8>>2]|0))Og(a+52+(e*12|0)|0,y);else{f[d>>2]=c;f[b>>2]=d+4}if((f[s>>2]|0)>(e|0))f[s>>2]=e;if(h){t=83;break c}d=f[a>>2]|0;b=d;t=70}while(0);if((t|0)==70){t=0;if(j)c=-1073741824;else{c=f[b>>2]|0;if((k|0)>=((f[b+4>>2]|0)-c>>2|0)){t=72;break b}c=f[c+(k<<2)>>2]|0}if(!(1<<(c&31)&f[(f[q>>2]|0)+(c>>>5<<2)>>2])){p=(f[l>>2]|0)+(c<<2)|0;e=f[p>>2]|0;f[p>>2]=e+1;e=(e|0)>0?1:2}else e=0;if((e|0)>(f[s>>2]|0))break;else{e=d;c=k}}f[r>>2]=c;d=f[m>>2]|0;i=e}if((t|0)==83){t=0;c=f[s>>2]|0;break}f[y>>2]=k;d=a+52+(e*12|0)+4|0;c=f[d>>2]|0;if((c|0)==(f[a+52+(e*12|0)+8>>2]|0))Og(a+52+(e*12|0)|0,y);else{f[c>>2]=k;f[d>>2]=c+4}c=f[s>>2]|0;if((c|0)>(e|0)){f[s>>2]=e;c=e}}while(0);if((c|0)>=3)break a}if((t|0)==42)ra(16937,16972,98,17057);else if((t|0)==57)ra(16937,16972,98,17057);else if((t|0)==72)ra(16937,16972,98,17057);else if((t|0)==85){u=z;return}}while(0);f[r>>2]=-1073741824;u=z;return}function Eb(a,c,d,e){a=a|0;c=c|0;d=d|0;e=e|0;var g=0,h=0,i=0,j=0,k=0,l=0,m=0,n=0,o=0,p=0,q=0,r=0,s=0,t=0,v=0,w=0,x=0,y=0,z=0,A=0,B=0,C=0,D=0,E=0,F=0,G=0,H=0,J=0,K=0;F=u;u=u+80|0;k=F+76|0;l=F+72|0;D=F+48|0;m=F+24|0;x=F;h=a+32|0;g=f[c>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[m+24>>0]|0;f[F>>2]=f[G>>2];yb(m,F,i,M)|0;i=f[D>>2]|0;w=a+28|0;c=(f[w>>2]|0)==0;a:do if((i|0)>=0){A=N+8|0;x=M+8|0;C=N+16|0;y=M+16|0;z=O+8|0;B=O+16|0;k=(n|0)<0;t=n+1|0;v=n+(k?0:((n>>>0)%3|0|0)==0?2:-1)|0;t=k?n:((t|0)%3|0|0)==0?n+-2|0:t;k=0;r=0;l=0;s=0;m=0;o=0;while(1){do if(!c){c=i+1|0;c=((c|0)%3|0|0)==0?i+-2|0:c;if(!((i>>>0)%3|0)){q=i+2|0;break}else{q=i+-1|0;break}}else{c=t;q=v}while(0);p=f[L>>2]|0;if(!p){c=16;break}a=f[K>>2]|0;if(!a){c=16;break}i=f[(f[(f[J>>2]|0)+28>>2]|0)+(c<<2)>>2]|0;n=f[E>>2]|0;c=f[n>>2]|0;if((f[n+4>>2]|0)-c>>2>>>0<=i>>>0){c=18;break}c=f[a+(f[c+(i<<2)>>2]<<2)>>2]|0;if(!(b[p+84>>0]|0))c=f[(f[p+68>>2]|0)+(c<<2)>>2]|0;f[N>>2]=0;f[N+4>>2]=0;f[N+8>>2]=0;f[N+12>>2]=0;f[N+16>>2]=0;f[N+20>>2]=0;f[G>>2]=c;n=b[p+24>>0]|0;f[F>>2]=f[G>>2];yb(p,F,n,N)|0;p=f[L>>2]|0;if(!p){c=23;break}a=f[K>>2]|0;if(!a){c=23;break}i=f[(f[(f[J>>2]|0)+28>>2]|0)+(q<<2)>>2]|0;n=f[E>>2]|0;c=f[n>>2]|0;if((f[n+4>>2]|0)-c>>2>>>0<=i>>>0){c=25;break}c=f[a+(f[c+(i<<2)>>2]<<2)>>2]|0;if(!(b[p+84>>0]|0))c=f[(f[p+68>>2]|0)+(c<<2)>>2]|0;f[O>>2]=0;f[O+4>>2]=0;f[O+8>>2]=0;f[O+12>>2]=0;f[O+16>>2]=0;f[O+20>>2]=0;f[G>>2]=c;i=b[p+24>>0]|0;f[F>>2]=f[G>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>2]=e;i=a+32|0;h=a+36|0;g=f[h>>2]|0;d=f[i>>2]|0;j=g-d>>2;if(j>>>0>=e>>>0){if(j>>>0>e>>>0?(k=d+(e<<2)|0,(g|0)!=(k|0)):0)f[h>>2]=g+(~((g+-4-k|0)>>>2)<<2)}else vg(i,e-j|0);y=e>>>0>1073741823?-1:e<<2;z=Ko(y)|0;kh(z|0,0,y|0)|0;A=Ko(y)|0;kh(A|0,0,y|0)|0;if((f[D>>2]|0)>0){k=a+16|0;h=a+32|0;l=a+12|0;i=0;do{d=f[z+(i<<2)>>2]|0;g=f[k>>2]|0;if((d|0)>(g|0)){j=f[h>>2]|0;f[j+(i<<2)>>2]=g}else{y=f[l>>2]|0;j=f[h>>2]|0;f[j+(i<<2)>>2]=(d|0)<(y|0)?y:d}i=i+1|0;d=f[D>>2]|0}while((i|0)<(d|0));if((d|0)>0){i=a+20|0;h=0;do{d=(f[b+(h<<2)>>2]|0)+(f[j+(h<<2)>>2]|0)|0;g=c+(h<<2)|0;f[g>>2]=d;if((d|0)<=(f[k>>2]|0)){if((d|0)<(f[l>>2]|0)){d=(f[i>>2]|0)+d|0;N=18}}else{d=d-(f[i>>2]|0)|0;N=18}if((N|0)==18){N=0;f[g>>2]=d}h=h+1|0}while((h|0)<(f[D>>2]|0))}}p=f[a+48>>2]|0;q=f[a+52>>2]|0;v=a+56|0;d=f[v>>2]|0;g=f[d+4>>2]|0;h=f[d>>2]|0;x=g-h|0;y=x>>2;if((x|0)<=4){Lo(A);Lo(z);u=H;return 1}t=(e|0)>0;r=p+12|0;w=a+16|0;s=a+32|0;x=a+12|0;o=a+20|0;n=e<<2;if(g-h>>2>>>0>1){m=h;M=1}else{a=d;co(a)}while(1){a=f[m+(M<<2)>>2]|0;if(t)kh(z|0,0,n|0)|0;if((a|0)>-1){if(t){l=a;g=0;do{d=f[(f[r>>2]|0)+(l<<2)>>2]|0;do if((d|0)>=0){f[B>>2]=d;f[C>>2]=f[B>>2];rf(C,p,q,F,E,G);d=f[F>>2]|0;if((d|0)>=(M|0))break;h=f[E>>2]|0;if((h|0)>=(M|0))break;i=f[G>>2]|0;if((i|0)>=(M|0))break;k=X(d,e)|0;j=X(h,e)|0;h=X(i,e)|0;d=0;do{f[A+(d<<2)>>2]=(f[c+(d+h<<2)>>2]|0)+(f[c+(d+j<<2)>>2]|0)-(f[c+(d+k<<2)>>2]|0);d=d+1|0}while((d|0)!=(e|0));d=0;do{m=z+(d<<2)|0;f[m>>2]=(f[m>>2]|0)+(f[A+(d<<2)>>2]|0);d=d+1|0}while((d|0)!=(e|0));g=g+1|0}while(0);d=(((l>>>0)%3|0|0)==0?2:-1)+l|0;do if((d|0)>=0){d=f[(f[r>>2]|0)+(d<<2)>>2]|0;if((d|0)>=0)if(!((d>>>0)%3|0)){d=d+2|0;break}else{d=d+-1|0;break}}while(0);l=(d|0)==(a|0)?-1073741824:d}while((l|0)>-1)}else{h=a;g=0;do{d=f[(f[r>>2]|0)+(h<<2)>>2]|0;do if((d|0)>=0){f[B>>2]=d;f[C>>2]=f[B>>2];rf(C,p,q,F,E,G);if((f[F>>2]|0)>=(M|0))break;if((f[E>>2]|0)<(M|0)){g=g+((f[G>>2]|0)<(M|0)&1)|0;break}else break}while(0);d=(((h>>>0)%3|0|0)==0?2:-1)+h|0;do if((d|0)>=0){d=f[(f[r>>2]|0)+(d<<2)>>2]|0;if((d|0)>=0)if(!((d>>>0)%3|0)){d=d+2|0;break}else{d=d+-1|0;break}}while(0);h=(d|0)==(a|0)?-1073741824:d}while((h|0)>-1)}h=X(M,e)|0;if(g){if(t){d=0;do{m=z+(d<<2)|0;f[m>>2]=(f[m>>2]|0)/(g|0)|0;d=d+1|0}while((d|0)!=(e|0))}k=b+(h<<2)|0;j=c+(h<<2)|0;if((f[D>>2]|0)>0){h=0;do{d=f[z+(h<<2)>>2]|0;g=f[w>>2]|0;if((d|0)>(g|0)){i=f[s>>2]|0;f[i+(h<<2)>>2]=g}else{m=f[x>>2]|0;i=f[s>>2]|0;f[i+(h<<2)>>2]=(d|0)<(m|0)?m:d}h=h+1|0;d=f[D>>2]|0}while((h|0)<(d|0));if((d|0)>0){h=0;do{d=(f[k+(h<<2)>>2]|0)+(f[i+(h<<2)>>2]|0)|0;g=j+(h<<2)|0;f[g>>2]=d;if((d|0)<=(f[w>>2]|0)){if((d|0)<(f[x>>2]|0)){d=(f[o>>2]|0)+d|0;N=85}}else{d=d-(f[o>>2]|0)|0;N=85}if((N|0)==85){N=0;f[g>>2]=d}h=h+1|0}while((h|0)<(f[D>>2]|0))}}}else{L=h;N=63}}else{L=X(M,e)|0;N=63}if((N|0)==63?(N=0,I=c+((X(M+-1|0,e)|0)<<2)|0,J=b+(L<<2)|0,K=c+(L<<2)|0,(f[D>>2]|0)>0):0){h=0;do{d=f[I+(h<<2)>>2]|0;g=f[w>>2]|0;if((d|0)>(g|0)){i=f[s>>2]|0;f[i+(h<<2)>>2]=g}else{m=f[x>>2]|0;i=f[s>>2]|0;f[i+(h<<2)>>2]=(d|0)<(m|0)?m:d}h=h+1|0;d=f[D>>2]|0}while((h|0)<(d|0));if((d|0)>0){h=0;do{d=(f[J+(h<<2)>>2]|0)+(f[i+(h<<2)>>2]|0)|0;g=K+(h<<2)|0;f[g>>2]=d;if((d|0)<=(f[w>>2]|0)){if((d|0)<(f[x>>2]|0)){d=(f[o>>2]|0)+d|0;N=73}}else{d=d-(f[o>>2]|0)|0;N=73}if((N|0)==73){N=0;f[g>>2]=d}h=h+1|0}while((h|0)<(f[D>>2]|0))}}M=M+1|0;if((M|0)>=(y|0)){N=22;break}d=f[v>>2]|0;m=f[d>>2]|0;if((f[d+4>>2]|0)-m>>2>>>0<=M>>>0){N=23;break}}if((N|0)==22){Lo(A);Lo(z);u=H;return 1}else if((N|0)==23)co(d);return 0}function Hb(a,c){a=a|0;c=c|0;var d=0,e=0,g=0,i=0,j=0,k=0,l=0,m=0,n=0,o=0,p=0,q=0,r=0,s=0,t=0,v=0,w=0,x=0,y=0,z=0,A=0,B=0,C=0,D=0;C=u;u=u+32|0;w=C+20|0;B=C+8|0;A=C+4|0;y=C;x=a+4|0;do if((h[(f[x>>2]|0)+36>>0]<<8&65535)<512){t=c+8|0;v=f[t>>2]|0;t=f[t+4>>2]|0;i=c+16|0;e=i;d=f[e>>2]|0;e=Hl(d|0,f[e+4>>2]|0,4,0)|0;g=I;if((t|0)<(g|0)|(t|0)==(g|0)&v>>>0>>0){B=-1;u=C;return B|0}else{d=(f[c>>2]|0)+d|0;d=h[d>>0]|h[d+1>>0]<<8|h[d+2>>0]<<16|h[d+3>>0]<<24;f[w>>2]=d;v=i;f[v>>2]=e;f[v+4>>2]=g;break}}else if(Eh(w,c)|0){d=f[w>>2]|0;break}else{B=-1;u=C;return B|0}while(0);a:do if(d|0){v=f[a+8>>2]|0;if(d>>>0>(((f[v+4>>2]|0)-(f[v>>2]|0)>>2>>>0)/3|0)>>>0){B=-1;u=C;return B|0}v=f[x>>2]|0;if(((h[v+36>>0]<<8|h[v+37>>0])&65535)<258){q=c+8|0;r=c+16|0;t=B+4|0;s=B+8|0;o=a+40|0;p=a+44|0;v=a+36|0;n=0;while(1){j=q;i=f[j>>2]|0;j=f[j+4>>2]|0;l=r;k=f[l>>2]|0;l=f[l+4>>2]|0;e=Hl(k|0,l|0,4,0)|0;g=I;if((j|0)<(g|0)|(j|0)==(g|0)&i>>>0>>0)break;m=f[c>>2]|0;D=m+k|0;f[B>>2]=h[D>>0]|h[D+1>>0]<<8|h[D+2>>0]<<16|h[D+3>>0]<<24;D=r;f[D>>2]=e;f[D+4>>2]=g;g=Hl(k|0,l|0,8,0)|0;D=I;if((j|0)<(D|0)|(j|0)==(D|0)&i>>>0>>0)break;e=m+e|0;f[t>>2]=h[e>>0]|h[e+1>>0]<<8|h[e+2>>0]<<16|h[e+3>>0]<<24;e=Hl(k|0,l|0,8,0)|0;D=I;g=r;f[g>>2]=e;f[g+4>>2]=D;if(!((j|0)>(D|0)|(j|0)==(D|0)&i>>>0>e>>>0))break;e=b[m+e>>0]|0;m=Hl(k|0,l|0,9,0)|0;D=r;f[D>>2]=m;f[D+4>>2]=I;b[s>>0]=b[s>>0]&-2|e&1;e=f[o>>2]|0;if((e|0)==(f[p>>2]|0)){rg(v,B);d=f[w>>2]|0}else{f[e>>2]=f[B>>2];f[e+4>>2]=f[B+4>>2];f[e+8>>2]=f[B+8>>2];f[o>>2]=(f[o>>2]|0)+12}n=n+1|0;if(n>>>0>=d>>>0)break a}D=-1;u=C;return D|0}k=B+4|0;e=a+40|0;g=a+44|0;l=a+36|0;i=0;j=0;do{Eh(A,c)|0;f[k>>2]=(f[A>>2]|0)+j;Eh(A,c)|0;d=f[A>>2]|0;j=f[k>>2]|0;if(j>>>0>>0){z=36;break}f[B>>2]=j-d;d=f[e>>2]|0;if((d|0)==(f[g>>2]|0))rg(l,B);else{f[d>>2]=f[B>>2];f[d+4>>2]=f[B+4>>2];f[d+8>>2]=f[B+8>>2];f[e>>2]=(f[e>>2]|0)+12}i=i+1|0}while(i>>>0<(f[w>>2]|0)>>>0);if((z|0)==36){D=-1;u=C;return D|0}bf(c,0,0)|0;j=f[w>>2]|0;if(j|0){n=c+36|0;o=c+32|0;l=c+24|0;m=c+28|0;k=a+36|0;d=0;p=0;do{D=f[x>>2]|0;e=(b[n>>0]|0)==0;if(((h[D+36>>0]<<8|h[D+37>>0])&65535)<514){if(!e){d=f[o>>2]|0;g=f[l>>2]|0;i=f[m>>2]|0;e=g+(d>>>3)|0;if(e>>>0>>0){D=(h[e>>0]|0)>>>(d&7)&1;e=d+1|0;f[o>>2]=e;d=D}else{e=d;d=0}if((g+(e>>>3)|0)>>>0>>0)f[o>>2]=e+1}}else if(!e){d=f[o>>2]|0;e=(f[l>>2]|0)+(d>>>3)|0;if(e>>>0<(f[m>>2]|0)>>>0){D=(h[e>>0]|0)>>>(d&7)&1;f[o>>2]=d+1;d=D}else d=0}D=(f[k>>2]|0)+(p*12|0)+8|0;b[D>>0]=b[D>>0]&-2|d&1;p=p+1|0}while(p>>>0>>0)}Pj(c)}while(0);f[B>>2]=0;d=f[x>>2]|0;d=(h[d+36>>0]<<8|h[d+37>>0])&65535;if((d&65535)<512){w=c+8|0;D=f[w>>2]|0;w=f[w+4>>2]|0;i=c+16|0;e=i;d=f[e>>2]|0;e=Hl(d|0,f[e+4>>2]|0,4,0)|0;g=I;if((w|0)<(g|0)|(w|0)==(g|0)&D>>>0>>0)d=-1;else{d=(f[c>>2]|0)+d|0;d=h[d>>0]|h[d+1>>0]<<8|h[d+2>>0]<<16|h[d+3>>0]<<24;f[B>>2]=d;z=i;f[z>>2]=e;f[z+4>>2]=g;z=43}}else if(d<<16>>16==512)if(Eh(B,c)|0){d=f[B>>2]|0;z=43}else d=-1;else z=57;b:do if((z|0)==43)if(!d)z=57;else{D=f[x>>2]|0;if(((h[D+36>>0]<<8|h[D+37>>0])&65535)>=258){j=a+52|0;k=a+56|0;e=a+48|0;g=0;i=0;while(1){f[A>>2]=0;Eh(y,c)|0;i=(f[y>>2]|0)+i|0;f[A>>2]=i;d=f[j>>2]|0;if((d|0)==(f[k>>2]|0))Og(e,A);else{f[d>>2]=i;f[j>>2]=d+4}g=g+1|0;if(g>>>0>=(f[B>>2]|0)>>>0){z=57;break b}}}n=c+8|0;o=c+16|0;l=a+52|0;m=a+56|0;j=a+48|0;k=0;while(1){f[A>>2]=0;a=n;D=f[a>>2]|0;a=f[a+4>>2]|0;e=o;d=f[e>>2]|0;e=Hl(d|0,f[e+4>>2]|0,4,0)|0;g=I;if((a|0)<(g|0)|(a|0)==(g|0)&D>>>0>>0)break;i=(f[c>>2]|0)+d|0;i=h[i>>0]|h[i+1>>0]<<8|h[i+2>>0]<<16|h[i+3>>0]<<24;f[A>>2]=i;d=o;f[d>>2]=e;f[d+4>>2]=g;d=f[l>>2]|0;if((d|0)==(f[m>>2]|0))Og(j,A);else{f[d>>2]=i;f[l>>2]=d+4}k=k+1|0;if(k>>>0>=(f[B>>2]|0)>>>0){z=57;break b}}d=-1}while(0);if((z|0)==57)d=f[c+16>>2]|0;D=d;u=C;return D|0}function Ib(a,c,d){a=a|0;c=c|0;d=d|0;var e=0,g=0,i=0,j=0,k=La,l=La,m=0,o=0,p=0,q=0,r=0,s=0,t=0,v=0,w=0,x=0,y=0,z=0,A=0,B=0,C=0,D=La;C=u;u=u+64|0;e=C+40|0;A=C+16|0;B=C;g=nc(a,c)|0;if(g|0){f[A>>2]=g;f[e>>2]=f[A>>2];fe(a,e)|0}f[B>>2]=0;z=B+4|0;f[z>>2]=0;f[B+8>>2]=0;g=f[d>>2]|0;j=(f[d+4>>2]|0)-g|0;if(!j)i=0;else{Dg(B,j);i=f[B>>2]|0;g=f[d>>2]|0}ef(i|0,g|0,j|0)|0;lh(A,c);j=A+12|0;f[j>>2]=0;y=A+16|0;f[y>>2]=0;f[A+20>>2]=0;i=f[z>>2]|0;g=f[B>>2]|0;d=i-g|0;if(!d){d=i;i=0}else{Dg(j,d);d=f[z>>2]|0;i=f[j>>2]|0;g=f[B>>2]|0}ef(i|0,g|0,d-g|0)|0;x=A+11|0;s=b[x>>0]|0;v=s<<24>>24<0;t=v?f[A>>2]|0:A;s=v?f[A+4>>2]|0:s&255;if(s>>>0>3){i=t;g=s;d=s;while(1){v=X(h[i>>0]|h[i+1>>0]<<8|h[i+2>>0]<<16|h[i+3>>0]<<24,1540483477)|0;g=(X(v>>>24^v,1540483477)|0)^(X(g,1540483477)|0);d=d+-4|0;if(d>>>0<=3)break;else i=i+4|0}v=s+-4|0;i=v&-4;d=t+(i+4)|0;i=v-i|0}else{d=t;g=s;i=s}switch(i|0){case 3:{g=h[d+2>>0]<<16^g;w=12;break}case 2:{w=12;break}case 1:{w=13;break}default:{}}if((w|0)==12){g=h[d+1>>0]<<8^g;w=13}if((w|0)==13)g=X(h[d>>0]^g,1540483477)|0;v=X(g>>>13^g,1540483477)|0;v=v>>>15^v;q=a+4|0;j=f[q>>2]|0;r=(j|0)==0;a:do if(!r){p=j+-1|0;d=(p&j|0)==0;if(!d)if(v>>>0>>0)i=v;else i=(v>>>0)%(j>>>0)|0;else i=v&p;g=f[(f[a>>2]|0)+(i<<2)>>2]|0;if((g|0)!=0?(o=f[g>>2]|0,(o|0)!=0):0){g=(s|0)==0;if(d){if(g){g=o;while(1){t=f[g+4>>2]|0;if(!((t|0)==(v|0)|(t&p|0)==(i|0))){w=54;break a}t=b[g+8+11>>0]|0;if(!((t<<24>>24<0?f[g+12>>2]|0:t&255)|0))break a;g=f[g>>2]|0;if(!g){w=54;break a}}}while(1){m=f[o+4>>2]|0;if(!((m|0)==(v|0)|(m&p|0)==(i|0))){w=54;break a}g=o+8|0;c=b[g+11>>0]|0;m=c<<24>>24<0;c=c&255;do if(((m?f[o+12>>2]|0:c)|0)==(s|0)){d=f[g>>2]|0;if(m)if(!(ij(d,t,s)|0))break a;else break;if((d&255)<<24>>24==(b[t>>0]|0)){d=t;do{c=c+-1|0;g=g+1|0;if(!c)break a;d=d+1|0}while((b[g>>0]|0)==(b[d>>0]|0))}}while(0);o=f[o>>2]|0;if(!o){w=54;break a}}}if(g){d=o;while(1){g=f[d+4>>2]|0;if((g|0)!=(v|0)){if(g>>>0>=j>>>0)g=(g>>>0)%(j>>>0)|0;if((g|0)!=(i|0)){w=54;break a}}t=b[d+8+11>>0]|0;if(!((t<<24>>24<0?f[d+12>>2]|0:t&255)|0))break a;d=f[d>>2]|0;if(!d){w=54;break a}}}while(1){g=f[o+4>>2]|0;if((g|0)!=(v|0)){if(g>>>0>=j>>>0)g=(g>>>0)%(j>>>0)|0;if((g|0)!=(i|0)){w=54;break a}}g=o+8|0;c=b[g+11>>0]|0;m=c<<24>>24<0;c=c&255;do if(((m?f[o+12>>2]|0:c)|0)==(s|0)){d=f[g>>2]|0;if(m)if(!(ij(d,t,s)|0))break a;else break;if((d&255)<<24>>24==(b[t>>0]|0)){d=t;do{c=c+-1|0;g=g+1|0;if(!c)break a;d=d+1|0}while((b[g>>0]|0)==(b[d>>0]|0))}}while(0);o=f[o>>2]|0;if(!o){w=54;break}}}else w=54}else{i=0;w=54}while(0);if((w|0)==54){zf(e,a,v,A);c=a+12|0;l=$(((f[c>>2]|0)+1|0)>>>0);D=$(j>>>0);k=$(n[a+16>>2]);do if(r|l>$(D*k)){g=(j>>>0<3|(j+-1&j|0)!=0)&1|j<<1;i=~~$(W($(l/k)))>>>0;Zf(a,g>>>0>>0?i:g);g=f[q>>2]|0;i=g+-1|0;if(!(i&g)){j=g;i=i&v;break}if(v>>>0>>0){j=g;i=v}else{j=g;i=(v>>>0)%(g>>>0)|0}}while(0);g=f[(f[a>>2]|0)+(i<<2)>>2]|0;if(!g){d=a+8|0;f[f[e>>2]>>2]=f[d>>2];f[d>>2]=f[e>>2];f[(f[a>>2]|0)+(i<<2)>>2]=d;d=f[e>>2]|0;g=f[d>>2]|0;if(g){g=f[g+4>>2]|0;i=j+-1|0;if(i&j){if(g>>>0>=j>>>0)g=(g>>>0)%(j>>>0)|0}else g=g&i;f[(f[a>>2]|0)+(g<<2)>>2]=d}}else{f[f[e>>2]>>2]=f[g>>2];f[g>>2]=f[e>>2]}f[c>>2]=(f[c>>2]|0)+1;f[e>>2]=0}e=f[A+12>>2]|0;if(e|0){if((f[y>>2]|0)!=(e|0))f[y>>2]=e;No(e)}if((b[x>>0]|0)<0)No(f[A>>2]|0);e=f[B>>2]|0;if(!e){u=C;return}if((f[z>>2]|0)!=(e|0))f[z>>2]=e;No(e);u=C;return}function Jb(a,b){a=a|0;b=b|0;var c=0,d=0,e=0,g=0,h=0,i=0,j=0,k=0,l=0,m=0,n=0,o=0,p=0,q=0,r=0,s=0,t=0,v=0,w=0,x=0,y=0,z=0,A=0,B=0,C=0,D=0,E=0,F=0,G=0,H=0,I=0,J=0,K=0,L=0,M=0,N=0,O=0;O=u;u=u+48|0;N=O+24|0;L=O+12|0;m=O;if((f[a+64>>2]|0)!=(f[a+60>>2]|0))ra(16704,16748,72,16900);if((f[a+76>>2]|0)!=(f[a+72>>2]|0))ra(16855,16748,73,16900);if(!b){N=0;u=O;return N|0}K=a+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(0);if((c|0)!=(g|0)){c=0;g=0;do{f[H+(c<<2)>>2]=g;g=(f[C+(c<<2)>>2]|0)+g|0;c=c+1|0}while(c>>>0>>0)}g=f[a>>2]|0;c=(f[n>>2]|0)-g|0;a:do if((c|0)>0){y=a+40|0;z=c>>2;w=g;B=c>>2;A=c>>2;x=g;v=c>>2;t=g;l=H;r=0;j=e;p=e;q=e;o=e;s=e;while(1){i=(r|0)<0;c=r+1|0;if(!i){c=((c|0)%3|0|0)==0?r+-2|0:c;if((c|0)<0)h=-1073741824;else{if((c|0)>=(v|0)){M=52;break}h=f[t+(c<<2)>>2]|0}c=(r>>>0)%3|0;g=((c|0)==0?2:-1)+r|0;if((g|0)<0){a=-1073741824;n=h}else{if((g|0)>=(A|0)){M=56;break}a=f[x+(g<<2)>>2]|0;n=h}}else{c=(r>>>0)%3|0;a=-1073741824;n=-1073741824}if((r|0)==((i?-1073741824:r-c|0)|0)){if(i)c=-1073741824;else{if((r|0)>=(z|0)){M=61;break}c=f[w+(r<<2)>>2]|0}if((n|0)==(a|0)|((c|0)==(n|0)|(c|0)==(a|0))){f[y>>2]=(f[y>>2]|0)+1;i=r+2|0;h=p;k=q;c=o;g=s}else M=65}else M=65;b:do if((M|0)==65){M=0;m=f[C+(a<<2)>>2]|0;c:do if((m|0)>0){c=0;i=f[l+(a<<2)>>2]|0;while(1){g=f[o+(i<<3)>>2]|0;if((g|0)<0){g=j;h=p;c=o;break c}if((g|0)==(n|0))break;c=c+1|0;if((c|0)<(m|0))i=i+1|0;else{g=j;h=p;c=o;break c}}k=f[o+(i<<3)+4>>2]|0;h=p;while(1){c=c+1|0;if((c|0)>=(m|0))break;g=i+1|0;f[h+(i<<3)>>2]=f[h+(g<<3)>>2];f[h+(i<<3)+4>>2]=f[h+(g<<3)+4>>2];if((f[j+(i<<3)>>2]|0)<0)break;else{i=g;h=j}}f[q+(i<<3)>>2]=-1;if((k|0)<0){g=q;h=q;c=q}else{i=f[K>>2]|0;f[i+(r<<2)>>2]=k;f[i+(k<<2)>>2]=r;i=r;j=q;h=q;k=q;c=q;g=s;break b}}else{g=j;h=p;c=o}while(0);i=f[C+(n<<2)>>2]|0;if((i|0)>0){h=0;c=f[H+(n<<2)>>2]|0;while(1){g=s+(c<<3)|0;if((f[g>>2]|0)<0)break;h=h+1|0;if((h|0)>=(i|0)){l=H;i=r;j=s;h=s;k=s;c=s;g=s;break b}else c=c+1|0}f[g>>2]=a;f[e+(c<<3)+4>>2]=r;l=H;i=r;j=e;h=e;k=e;c=e;g=e}else{i=r;j=g;k=q;g=s}}while(0);r=i+1|0;if((r|0)>=(B|0))break a;else{p=h;q=k;o=c;s=g}}if((M|0)==52)ra(16937,16972,98,17057);else if((M|0)==56)ra(16937,16972,98,17057);else if((M|0)==61)ra(16937,16972,98,17057)}while(0);f[b>>2]=E;if(H){if((I|0)!=(H|0))f[D>>2]=I+(~((I+-4-H|0)>>>2)<<2);No(J);d=f[L>>2]|0;e=d}if(e|0){c=f[F>>2]|0;if((c|0)!=(e|0))f[F>>2]=c+(~((c+-8-e|0)>>>3)<<3);No(d)}c=f[N>>2]|0;if(c|0){d=f[G>>2]|0;if((d|0)!=(c|0))f[G>>2]=d+(~((d+-4-c|0)>>>2)<<2);No(c)}N=1;u=O;return N|0}function Kb(a,b){a=a|0;b=b|0;var c=0,d=0,e=0,g=0,h=0,i=0,j=0,k=0,l=0,m=0,n=0,o=0,p=0,q=0,r=0,s=0,t=0,v=0,w=0,x=0,y=0,z=0;z=u;u=u+32|0;w=z+28|0;t=z+24|0;j=z+20|0;k=z+16|0;l=z+12|0;m=z+8|0;s=z+4|0;v=z;e=f[b>>2]|0;if((e|0)<0){u=z;return}x=(e>>>0)/3|0;q=a+12|0;if(f[(f[q>>2]|0)+(x>>>5<<2)>>2]&1<<(x&31)|0){u=z;return}x=a+56|0;c=f[x>>2]|0;r=a+60|0;d=f[r>>2]|0;if((d|0)!=(c|0)){c=d+(~((d+-4-c|0)>>>2)<<2)|0;f[r>>2]=c}o=a+64|0;if((c|0)==(f[o>>2]|0))Og(x,b);else{f[c>>2]=e;f[r>>2]=c+4}c=f[a>>2]|0;g=f[b>>2]|0;d=g+1|0;do if((g|0)>=0){c=f[c+28>>2]|0;d=f[c+((((d|0)%3|0|0)==0?g+-2|0:d)<<2)>>2]|0;if(!((g>>>0)%3|0)){e=c;c=g+2|0;break}else{e=c;c=g+-1|0;break}}else{d=f[c+28>>2]|0;e=d;d=f[d+(g<<2)>>2]|0;c=g}while(0);i=f[e+(c<<2)>>2]|0;n=a+24|0;c=f[n>>2]|0;g=c+(d>>>5<<2)|0;h=1<<(d&31);e=f[g>>2]|0;if(!(e&h)){f[g>>2]=e|h;f[j>>2]=d;c=f[b>>2]|0;d=c+1|0;if((c|0)>=0)c=((d|0)%3|0|0)==0?c+-2|0:d;f[k>>2]=c;f[t>>2]=f[j>>2];f[w>>2]=f[k>>2];Ve(a+36|0,t,w);c=f[n>>2]|0}d=c+(i>>>5<<2)|0;e=1<<(i&31);c=f[d>>2]|0;if(!(c&e)){f[d>>2]=c|e;d=a+36|0;f[l>>2]=i;c=f[b>>2]|0;do if((c|0)>=0)if(!((c>>>0)%3|0)){c=c+2|0;break}else{c=c+-1|0;break}while(0);f[m>>2]=c;f[t>>2]=f[l>>2];f[w>>2]=f[m>>2];Ve(d,t,w)}d=f[x>>2]|0;c=f[r>>2]|0;if((d|0)==(c|0)){u=z;return}m=a+36|0;a:while(1){l=f[c+-4>>2]|0;f[b>>2]=l;g=(l|0)/3|0;if((l|0)>=0?(p=f[q>>2]|0,(f[p+(g>>>5<<2)>>2]&1<<(g&31)|0)==0):0){d=p;e=f[a>>2]|0;c=g;b:while(1){i=d+(c>>>5<<2)|0;f[i>>2]=f[i>>2]|1<<(c&31);i=f[(f[e+28>>2]|0)+(f[b>>2]<<2)>>2]|0;g=(f[n>>2]|0)+(i>>>5<<2)|0;j=1<<(i&31);c=f[g>>2]|0;do if(!(j&c)){h=f[(f[e+40>>2]|0)+(i<<2)>>2]|0;if((h|0)<0){f[g>>2]=c|j;f[s>>2]=i;f[v>>2]=f[b>>2];f[t>>2]=f[s>>2];f[w>>2]=f[v>>2];Ve(m,t,w);y=42;break}l=f[e+64>>2]|0;d=f[l>>2]|0;if((h|0)>=((f[l+4>>2]|0)-d>>2|0)){y=32;break a}l=f[d+(h<<2)>>2]|0;l=(1<<(l&31)&f[(f[e+12>>2]|0)+(l>>>5<<2)>>2]|0)==0;f[g>>2]=c|j;f[s>>2]=i;f[v>>2]=f[b>>2];f[t>>2]=f[s>>2];f[w>>2]=f[v>>2];Ve(m,t,w);if(l){e=f[a>>2]|0;c=f[b>>2]|0;d=c+1|0;if((c|0)>=0)c=((d|0)%3|0|0)==0?c+-2|0:d;do if(!(1<<(c&31)&f[(f[e>>2]|0)+(c>>>5<<2)>>2])){if((c|0)<0)break;c=f[(f[(f[e+64>>2]|0)+12>>2]|0)+(c<<2)>>2]|0}else c=-1073741824;while(0);f[b>>2]=c;c=(c|0)/3|0}else y=42}else y=42;while(0);if((y|0)==42){y=0;e=f[a>>2]|0;c=f[b>>2]|0;g=(c|0)<0;d=c+1|0;if(g)d=c;else d=((d|0)%3|0|0)==0?c+-2|0:d;if(!(1<<(d&31)&f[(f[e>>2]|0)+(d>>>5<<2)>>2])){if((d|0)>=0)d=f[(f[(f[e+64>>2]|0)+12>>2]|0)+(d<<2)>>2]|0}else d=-1073741824;f[w>>2]=d;do if(!g)if(!((c>>>0)%3|0)){c=c+2|0;break}else{c=c+-1|0;break}while(0);do if(!(1<<(c&31)&f[(f[e>>2]|0)+(c>>>5<<2)>>2])){if((c|0)<0){l=c;break}l=f[(f[(f[e+64>>2]|0)+12>>2]|0)+(c<<2)>>2]|0}else l=-1073741824;while(0);g=(d|0)<0;c=(d>>>0)/3|0;i=g?-1:c;h=(l|0)<0;k=(l>>>0)/3|0;j=h?-1:k;do if(!g){g=f[q>>2]|0;if(f[g+(i>>>5<<2)>>2]&1<<(i&31)|0){y=56;break}if(h)break;if(!(f[g+(j>>>5<<2)>>2]&1<<(j&31))){y=61;break b}}else y=56;while(0);if((y|0)==56){y=0;if(h){y=58;break}if(!(f[(f[q>>2]|0)+(j>>>5<<2)>>2]&1<<(j&31))){d=l;c=k}else{y=58;break}}f[b>>2]=d}d=f[q>>2]|0}do if((y|0)==58){y=0;c=(f[r>>2]|0)+-4|0;f[r>>2]=c}else if((y|0)==61){y=0;c=f[r>>2]|0;f[c+-4>>2]=l;if((c|0)==(f[o>>2]|0)){Og(x,w);c=f[r>>2]|0;break}else{f[c>>2]=f[w>>2];c=c+4|0;f[r>>2]=c;break}}while(0);d=f[x>>2]|0}else{c=c+-4|0;f[r>>2]=c}if((d|0)==(c|0)){y=67;break}}if((y|0)==32)ra(16937,16972,98,17057);else if((y|0)==67){u=z;return}}function Lb(a,c){a=a|0;c=c|0;var d=0,e=0,g=0,i=0,j=0,k=0,l=0,m=0,n=0,o=0,p=0,q=0,r=0,s=0,t=0,v=0,w=0,x=0,y=0,z=0,A=0;A=u;u=u+176|0;s=A+136|0;w=A+32|0;v=A;t=A+104|0;x=A+100|0;y=a+4|0;q=f[y>>2]|0;d=f[q+32>>2]|0;o=d+8|0;n=f[o>>2]|0;o=f[o+4>>2]|0;p=d+16|0;l=p;k=f[l>>2]|0;l=f[l+4>>2]|0;if(!((o|0)>(l|0)|(o|0)==(l|0)&n>>>0>k>>>0)){c=0;u=A;return c|0}j=f[d>>2]|0;r=b[j+k>>0]|0;d=Hl(k|0,l|0,1,0)|0;m=I;i=p;f[i>>2]=d;f[i+4>>2]=m;if(!((o|0)>(m|0)|(o|0)==(m|0)&n>>>0>d>>>0)){c=0;u=A;return c|0}m=b[j+d>>0]|0;d=Hl(k|0,l|0,2,0)|0;e=I;i=p;f[i>>2]=d;f[i+4>>2]=e;do if(r<<24>>24>-1){i=r<<24>>24;g=f[a+212>>2]|0;if(i>>>0<(((f[a+216>>2]|0)-g|0)/116|0)>>>0){f[g+(i*116|0)>>2]=c;break}else{c=0;u=A;return c|0}}while(0);do if((((h[q+36>>0]|0)<<8|(h[q+37>>0]|0))&65535)>257)if((o|0)>(e|0)|(o|0)==(e|0)&n>>>0>d>>>0){e=b[j+d>>0]|0;o=Hl(k|0,l|0,3,0)|0;f[p>>2]=o;f[p+4>>2]=I;e=e&255;break}else{c=0;u=A;return c|0}else e=0;while(0);n=f[q+44>>2]|0;if(!(m<<24>>24)){if(r<<24>>24<0)d=a+184|0;else{d=r<<24>>24;w=f[a+212>>2]|0;b[w+(d*116|0)+72>>0]=0;d=w+(d*116|0)+76|0}switch((e&255)<<24>>24){case 0:{xc(s,a,d);d=f[s>>2]|0;break}case 1:{Ed(s,a,d);d=f[s>>2]|0;break}default:{c=0;u=A;return c|0}}if(!d){c=0;u=A;return c|0}}else{if(e|0){c=0;u=A;return c|0}j=r<<24>>24;if(r<<24>>24<0){c=0;u=A;return c|0}d=Rk(88)|0;i=f[a+212>>2]|0;k=i+(j*116|0)+76|0;f[d+4>>2]=0;f[d>>2]=3124;l=d+12|0;f[l>>2]=3148;m=d+64|0;f[m>>2]=0;f[d+68>>2]=0;f[d+72>>2]=0;e=d+16|0;g=e+44|0;do{f[e>>2]=0;e=e+4|0}while((e|0)<(g|0));f[d+76>>2]=n;f[d+80>>2]=k;f[d+84>>2]=0;p=w+4|0;f[p>>2]=3148;o=w+56|0;f[o>>2]=0;q=w+60|0;f[q>>2]=0;f[w+64>>2]=0;e=w+8|0;g=e+44|0;do{f[e>>2]=0;e=e+4|0}while((e|0)<(g|0));g=i+(j*116|0)+4|0;f[v>>2]=3148;e=v+4|0;a=e+4|0;f[a>>2]=0;f[a+4>>2]=0;f[a+8>>2]=0;f[a+12>>2]=0;f[a+16>>2]=0;f[a+20>>2]=0;f[e>>2]=g;i=f[i+(j*116|0)+68>>2]|0;i=((f[i+4>>2]|0)-(f[i>>2]|0)>>2>>>0)/3|0;b[s>>0]=0;pf(v+8|0,i,s);Sa[f[(f[v>>2]|0)+8>>2]&127](v);ae(t,v);ae(s,t);f[w>>2]=f[s+4>>2];i=w+4|0;ye(i,s)|0;f[s>>2]=3148;e=f[s+20>>2]|0;if(e|0)No(e);e=f[s+8>>2]|0;if(e|0)No(e);f[w+36>>2]=g;f[w+40>>2]=k;f[w+44>>2]=n;f[w+48>>2]=d;f[t>>2]=3148;e=f[t+20>>2]|0;if(e|0)No(e);e=f[t+8>>2]|0;if(e|0)No(e);f[d+8>>2]=f[w>>2];ye(l,i)|0;e=d+44|0;t=w+36|0;f[e>>2]=f[t>>2];f[e+4>>2]=f[t+4>>2];f[e+8>>2]=f[t+8>>2];f[e+12>>2]=f[t+12>>2];b[e+16>>0]=b[t+16>>0]|0;Be(m,f[o>>2]|0,f[q>>2]|0);f[v>>2]=3148;e=f[v+20>>2]|0;if(e|0)No(e);e=f[v+8>>2]|0;if(e|0)No(e);e=f[o>>2]|0;if(e|0){g=f[q>>2]|0;if((g|0)!=(e|0))f[q>>2]=g+(~((g+-4-e|0)>>>2)<<2);No(e)}f[p>>2]=3148;e=f[w+24>>2]|0;if(e|0)No(e);e=f[w+12>>2]|0;if(e|0)No(e)}e=Rk(64)|0;f[x>>2]=d;hj(e,x);l=e;d=f[x>>2]|0;f[x>>2]=0;if(d|0)Sa[f[(f[d>>2]|0)+4>>2]&127](d);d=f[y>>2]|0;if((c|0)<0){Sa[f[(f[e>>2]|0)+4>>2]&127](e);c=0;u=A;return c|0}k=d+8|0;j=d+12|0;d=f[j>>2]|0;e=f[k>>2]|0;i=d-e>>2;do if((i|0)<=(c|0)){g=c+1|0;if(g>>>0>i>>>0){Te(k,g-i|0);break}if(g>>>0>>0?(z=e+(g<<2)|0,(d|0)!=(z|0)):0)do{y=d+-4|0;f[j>>2]=y;d=f[y>>2]|0;f[y>>2]=0;if(d|0)Sa[f[(f[d>>2]|0)+4>>2]&127](d);d=f[j>>2]|0}while((d|0)!=(z|0))}while(0);c=(f[k>>2]|0)+(c<<2)|0;d=f[c>>2]|0;f[c>>2]=l;if(!d){c=1;u=A;return c|0}Sa[f[(f[d>>2]|0)+4>>2]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;q=a+20|0;p=r+64|0;o=r+28|0;n=e<<2;if(g-h>>2>>>0>1){m=h;A=d;H=1}else co(s);while(1){a=f[m+(H<<2)>>2]|0;if(w)kh(B|0,0,n|0)|0;if((a|0)>-1){l=f[r>>2]|0;k=a;j=0;do{if(((f[l+(k>>>5<<2)>>2]&1<<(k&31)|0)==0?(I=f[(f[(f[p>>2]|0)+12>>2]|0)+(k<<2)>>2]|0,(I|0)>=0):0)?(G=f[o>>2]|0,m=f[t>>2]|0,E=f[m+(f[G+(I<<2)>>2]<<2)>>2]|0,F=I+1|0,F=f[m+(f[G+((((F|0)%3|0|0)==0?I+-2|0:F)<<2)>>2]<<2)>>2]|0,G=f[m+(f[G+((((I>>>0)%3|0|0)==0?2:-1)+I<<2)>>2]<<2)>>2]|0,(E|0)<(H|0)&(F|0)<(H|0)&(G|0)<(H|0)):0){g=X(E,e)|0;h=X(F,e)|0;i=X(G,e)|0;if(w){d=0;do{f[C+(d<<2)>>2]=(f[c+(d+i<<2)>>2]|0)+(f[c+(d+h<<2)>>2]|0)-(f[c+(d+g<<2)>>2]|0);d=d+1|0}while((d|0)!=(e|0));if(w){d=0;do{m=B+(d<<2)|0;f[m>>2]=(f[m>>2]|0)+(f[C+(d<<2)>>2]|0);d=d+1|0}while((d|0)!=(e|0))}}j=j+1|0}d=(((k>>>0)%3|0|0)==0?2:-1)+k|0;do if(!(f[l+(d>>>5<<2)>>2]&1<<(d&31))){if((d|0)>=0){d=f[(f[(f[p>>2]|0)+12>>2]|0)+(d<<2)>>2]|0;if((d|0)>=0)if(!((d>>>0)%3|0)){d=d+2|0;break}else{d=d+-1|0;break}}}else d=-1073741824;while(0);k=(d|0)==(a|0)?-1073741824:d}while((k|0)>-1);g=X(H,e)|0;if(j){if(w){d=0;do{m=B+(d<<2)|0;f[m>>2]=(f[m>>2]|0)/(j|0)|0;d=d+1|0}while((d|0)!=(e|0))}k=b+(g<<2)|0;j=c+(g<<2)|0;if((A|0)>0){h=0;do{d=f[B+(h<<2)>>2]|0;g=f[x>>2]|0;if((d|0)>(g|0)){i=f[u>>2]|0;f[i+(h<<2)>>2]=g}else{A=f[y>>2]|0;i=f[u>>2]|0;f[i+(h<<2)>>2]=(d|0)<(A|0)?A:d}h=h+1|0;d=f[D>>2]|0}while((h|0)<(d|0));if((d|0)>0){h=0;do{d=(f[k+(h<<2)>>2]|0)+(f[i+(h<<2)>>2]|0)|0;g=j+(h<<2)|0;f[g>>2]=d;if((d|0)<=(f[x>>2]|0)){if((d|0)<(f[y>>2]|0)){d=(f[q>>2]|0)+d|0;J=68}}else{d=d-(f[q>>2]|0)|0;J=68}if((J|0)==68){J=0;f[g>>2]=d}h=h+1|0;d=f[D>>2]|0}while((h|0)<(d|0))}}else d=A}else{d=g;J=46}}else{d=X(H,e)|0;J=46}if((J|0)==46){J=0;i=c+((X(H+-1|0,e)|0)<<2)|0;l=b+(d<<2)|0;k=c+(d<<2)|0;if((A|0)>0){h=0;do{d=f[i+(h<<2)>>2]|0;g=f[x>>2]|0;if((d|0)>(g|0)){j=f[u>>2]|0;f[j+(h<<2)>>2]=g}else{A=f[y>>2]|0;j=f[u>>2]|0;f[j+(h<<2)>>2]=(d|0)<(A|0)?A:d}h=h+1|0;d=f[D>>2]|0}while((h|0)<(d|0));if((d|0)>0){h=0;do{d=(f[l+(h<<2)>>2]|0)+(f[j+(h<<2)>>2]|0)|0;g=k+(h<<2)|0;f[g>>2]=d;if((d|0)<=(f[x>>2]|0)){if((d|0)<(f[y>>2]|0)){d=(f[q>>2]|0)+d|0;J=56}}else{d=d-(f[q>>2]|0)|0;J=56}if((J|0)==56){J=0;f[g>>2]=d}h=h+1|0;d=f[D>>2]|0}while((h|0)<(d|0))}}else d=A}H=H+1|0;if((H|0)>=(z|0)){J=22;break}m=f[s>>2]|0;if((f[v>>2]|0)-m>>2>>>0<=H>>>0){J=23;break}else A=d}if((J|0)==22){Lo(C);Lo(B);return 1}else if((J|0)==23)co(s);return 0}function Nb(a,c){a=a|0;c=c|0;var d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;u=D;return E|0}case 1:{a:do if((m|0)>(e|0)|(m|0)==(e|0)&l>>>0>d>>>0){i=b[n+d>>0]|0;g=Hl(j|0,k|0,2,0)|0;E=o;f[E>>2]=g;f[E+4>>2]=I;if((i&255)>6){f[s>>2]=i&255;nl(4934,s)|0;break}d=Hl(j|0,k|0,6,0)|0;e=I;if(!((m|0)<(e|0)|(m|0)==(e|0)&l>>>0>>0)){E=n+g|0;E=h[E>>0]|h[E+1>>0]<<8|h[E+2>>0]<<16|h[E+3>>0]<<24;s=o;f[s>>2]=d;f[s+4>>2]=e;wh(a,E)|0;switch(i<<24>>24){case 0:{de(B,3);f[v>>2]=a;f[v+4>>2]=0;f[C>>2]=f[v>>2];f[C+4>>2]=f[v+4>>2];E=yd(B,c,C)|0;te(B);if(E)a=1;else break a;u=D;return a|0}case 1:{de(B,3);f[w>>2]=a;f[w+4>>2]=0;f[C>>2]=f[w>>2];f[C+4>>2]=f[w+4>>2];E=xd(B,c,C)|0;te(B);if(E)a=1;else break a;u=D;return a|0}case 2:{ee(B,3);f[x>>2]=a;f[x+4>>2]=0;f[C>>2]=f[x>>2];f[C+4>>2]=f[x+4>>2];E=Bd(B,c,C)|0;we(B);if(E)a=1;else break a;u=D;return a|0}case 3:{ee(B,3);f[y>>2]=a;f[y+4>>2]=0;f[C>>2]=f[y>>2];f[C+4>>2]=f[y+4>>2];E=Ad(B,c,C)|0;we(B);if(E)a=1;else break a;u=D;return a|0}case 4:{Sd(B,3);f[z>>2]=a;f[z+4>>2]=0;f[C>>2]=f[z>>2];f[C+4>>2]=f[z+4>>2];E=hd(B,c,C)|0;le(B);if(E)a=1;else break a;u=D;return a|0}case 5:{Sd(B,3);f[A>>2]=a;f[A+4>>2]=0;f[C>>2]=f[A>>2];f[C+4>>2]=f[A+4>>2];E=gd(B,c,C)|0;le(B);if(E)a=1;else break a;u=D;return a|0}case 6:{Sd(B,3);f[t>>2]=a;f[t+4>>2]=0;f[C>>2]=f[t>>2];f[C+4>>2]=f[t+4>>2];E=fd(B,c,C)|0;le(B);if(E)a=1;else break a;u=D;return a|0}default:break a}}}while(0);E=0;u=D;return E|0}default:{E=0;u=D;return E|0}}return 0}function Ob(a,b){a=a|0;b=b|0;var c=0,d=0,e=0,g=0,h=0,i=0,j=0,k=0,l=0,m=0,n=0,o=0,p=0,q=0,r=0,s=0,t=0,v=0,w=0,x=0,y=0,z=0,A=0;A=u;u=u+32|0;x=A+28|0;v=A+24|0;j=A+20|0;k=A+16|0;m=A+12|0;n=A+8|0;t=A+4|0;w=A;e=f[b>>2]|0;if((e|0)<0){u=A;return}y=(e>>>0)/3|0;r=a+12|0;if(f[(f[r>>2]|0)+(y>>>5<<2)>>2]&1<<(y&31)|0){u=A;return}y=a+56|0;c=f[y>>2]|0;s=a+60|0;d=f[s>>2]|0;if((d|0)!=(c|0)){c=d+(~((d+-4-c|0)>>>2)<<2)|0;f[s>>2]=c}p=a+64|0;if((c|0)==(f[p>>2]|0))Og(y,b);else{f[c>>2]=e;f[s>>2]=c+4}g=f[a>>2]|0;e=f[b>>2]|0;c=e+1|0;do if((e|0)>=0){d=((c|0)%3|0|0)==0?e+-2|0:c;do if((d|0)>=0){c=f[g>>2]|0;if((d|0)<((f[g+4>>2]|0)-c>>2|0)){h=f[c+(d<<2)>>2]|0;break}else ra(16937,16972,98,17057)}else h=-1073741824;while(0);d=(((e>>>0)%3|0|0)==0?2:-1)+e|0;if((d|0)>=0){c=f[g>>2]|0;if((d|0)<((f[g+4>>2]|0)-c>>2|0)){i=h;l=f[c+(d<<2)>>2]|0;break}else ra(16937,16972,98,17057)}else{i=h;l=-1073741824}}else{i=-1073741824;l=-1073741824}while(0);o=a+24|0;c=f[o>>2]|0;e=c+(i>>>5<<2)|0;g=1<<(i&31);d=f[e>>2]|0;if(!(d&g)){f[e>>2]=d|g;f[j>>2]=i;c=f[b>>2]|0;d=c+1|0;if((c|0)>=0)c=((d|0)%3|0|0)==0?c+-2|0:d;f[k>>2]=c;f[v>>2]=f[j>>2];f[x>>2]=f[k>>2];Ve(a+36|0,v,x);c=f[o>>2]|0}d=c+(l>>>5<<2)|0;e=1<<(l&31);c=f[d>>2]|0;if(!(c&e)){f[d>>2]=c|e;d=a+36|0;f[m>>2]=l;c=f[b>>2]|0;do if((c|0)>=0)if(!((c>>>0)%3|0)){c=c+2|0;break}else{c=c+-1|0;break}while(0);f[n>>2]=c;f[v>>2]=f[m>>2];f[x>>2]=f[n>>2];Ve(d,v,x)}d=f[y>>2]|0;c=f[s>>2]|0;if((d|0)==(c|0)){u=A;return}m=a+36|0;a:while(1){n=f[c+-4>>2]|0;f[b>>2]=n;e=(n|0)/3|0;if((n|0)>=0?(q=f[r>>2]|0,(f[q+(e>>>5<<2)>>2]&1<<(e&31)|0)==0):0){g=q;l=f[a>>2]|0;c=e;b:while(1){n=g+(c>>>5<<2)|0;f[n>>2]=f[n>>2]|1<<(c&31);c=f[b>>2]|0;if((c|0)<0)i=-1073741824;else{d=f[l>>2]|0;if((c|0)>=((f[l+4>>2]|0)-d>>2|0)){z=35;break a}i=f[d+(c<<2)>>2]|0}h=(f[o>>2]|0)+(i>>>5<<2)|0;j=1<<(i&31);g=f[h>>2]|0;if(!(j&g)){e=f[(f[l+24>>2]|0)+(i<<2)>>2]|0;c=e+1|0;if((e|0)>=0){c=((c|0)%3|0|0)==0?e+-2|0:c;if((c|0)>=0){d=f[(f[l+12>>2]|0)+(c<<2)>>2]|0;c=d+1|0;if((d|0)<0)e=d;else e=((c|0)%3|0|0)==0?d+-2|0:c}else e=c}f[h>>2]=g|j;f[t>>2]=i;f[w>>2]=f[b>>2];f[v>>2]=f[t>>2];f[x>>2]=f[w>>2];Ve(m,v,x);d=f[a>>2]|0;c=f[b>>2]|0;if((e|0)<0){l=d;z=48}else{do if((c|0)<0)c=-1073741824;else{n=c+1|0;c=((n|0)%3|0|0)==0?c+-2|0:n;if((c|0)<0)break;c=f[(f[d+12>>2]|0)+(c<<2)>>2]|0}while(0);f[b>>2]=c;c=(c|0)/3|0}}else z=48;if((z|0)==48){z=0;if((c|0)<0){z=51;break}d=c+1|0;d=((d|0)%3|0|0)==0?c+-2|0:d;if((d|0)>=0)d=f[(f[l+12>>2]|0)+(d<<2)>>2]|0;f[x>>2]=d;c=(((c>>>0)%3|0|0)==0?2:-1)+c|0;if((c|0)<0)k=c;else k=f[(f[l+12>>2]|0)+(c<<2)>>2]|0;n=(d|0)<0;c=(d>>>0)/3|0;h=n?-1:c;g=(k|0)<0;j=(k>>>0)/3|0;i=g?-1:j;do if(!n){e=f[r>>2]|0;if(f[e+(h>>>5<<2)>>2]&1<<(h&31)|0){z=56;break}if(g)break;if(!(f[e+(i>>>5<<2)>>2]&1<<(i&31))){z=61;break b}}else z=56;while(0);if((z|0)==56){z=0;if(g){z=58;break}if(!(f[(f[r>>2]|0)+(i>>>5<<2)>>2]&1<<(i&31))){d=k;c=j}else{z=58;break}}f[b>>2]=d;d=l}g=f[r>>2]|0;l=d}do if((z|0)==51){f[x>>2]=-1073741824;z=58}else if((z|0)==61){z=0;c=f[s>>2]|0;f[c+-4>>2]=k;if((c|0)==(f[p>>2]|0)){Og(y,x);c=f[s>>2]|0;break}else{f[c>>2]=f[x>>2];c=c+4|0;f[s>>2]=c;break}}while(0);if((z|0)==58){z=0;c=(f[s>>2]|0)+-4|0;f[s>>2]=c}d=f[y>>2]|0}else{c=c+-4|0;f[s>>2]=c}if((d|0)==(c|0)){z=67;break}}if((z|0)==35)ra(16937,16972,98,17057);else if((z|0)==67){u=A;return}}function Pb(a,c){a=a|0;c=c|0;var d=0,e=0,g=0,i=0,k=0,l=0,m=0,n=0,o=0,p=0,q=0,r=0,s=0,t=0,v=0,w=0,x=0,y=0,z=0,A=0;y=u;u=u+16|0;x=y;m=a+144|0;l=f[m>>2]|0;l=Na[f[(f[l>>2]|0)+32>>2]&127](l)|0;do if((((h[l+36>>0]|0)<<8|(h[l+37>>0]|0))&65535)<514){e=a+40|0;g=e;i=a;k=g+40|0;do{f[g>>2]=f[i>>2];g=g+4|0;i=i+4|0}while((g|0)<(k|0));if(bf(e,1,x)|0){g=a;i=e;k=g+40|0;do{f[g>>2]=f[i>>2];g=g+4|0;i=i+4|0}while((g|0)<(k|0));e=x;l=f[e>>2]|0;e=f[e+4>>2]|0;z=a+8|0;g=a+16|0;k=g;i=f[k>>2]|0;k=f[k+4>>2]|0;z=jm(f[z>>2]|0,f[z+4>>2]|0,i|0,k|0)|0;A=I;if(!(e>>>0>A>>>0|(e|0)==(A|0)&l>>>0>z>>>0)){z=Hl(i|0,k|0,l|0,e|0)|0;A=g;f[A>>2]=z;f[A+4>>2]=I;break}}A=0;u=y;return A|0}while(0);do if((j[a+38>>1]|0)<514){e=a+96|0;g=e;i=a;k=g+40|0;do{f[g>>2]=f[i>>2];g=g+4|0;i=i+4|0}while((g|0)<(k|0));if(bf(e,1,x)|0){g=a;i=e;k=g+40|0;do{f[g>>2]=f[i>>2];g=g+4|0;i=i+4|0}while((g|0)<(k|0));g=x;e=f[g>>2]|0;g=f[g+4>>2]|0;A=a+8|0;i=a+16|0;l=i;k=f[l>>2]|0;l=f[l+4>>2]|0;A=jm(f[A>>2]|0,f[A+4>>2]|0,k|0,l|0)|0;z=I;if(!(g>>>0>z>>>0|(g|0)==(z|0)&e>>>0>A>>>0)){z=Hl(k|0,l|0,e|0,g|0)|0;A=i;f[A>>2]=z;f[A+4>>2]=I;break}}A=0;u=y;return A|0}else nd(a+80|0,a)|0;while(0);if(!(Eg(a)|0)){A=0;u=y;return A|0}g=c;i=a;k=g+40|0;do{f[g>>2]=f[i>>2];g=g+4|0;i=i+4|0}while((g|0)<(k|0));A=f[m>>2]|0;A=Na[f[(f[A>>2]|0)+32>>2]&127](A)|0;do if((((h[A+36>>0]|0)<<8|(h[A+37>>0]|0))&65535)<514){A=f[m>>2]|0;A=(Na[f[(f[A>>2]|0)+32>>2]&127](A)|0)+36|0;if(((h[A>>0]|0)<<8&65535)<512){z=c+8|0;A=f[z>>2]|0;z=f[z+4>>2]|0;k=c+16|0;g=k;e=f[g>>2]|0;g=Hl(e|0,f[g+4>>2]|0,4,0)|0;i=I;if(!((z|0)<(i|0)|(z|0)==(i|0)&A>>>0>>0)){n=(f[c>>2]|0)+e|0;n=h[n>>0]|h[n+1>>0]<<8|h[n+2>>0]<<16|h[n+3>>0]<<24;f[x>>2]=n;r=k;f[r>>2]=g;f[r+4>>2]=i;r=19}}else if(Eh(x,c)|0){n=f[x>>2]|0;r=19}if((((r|0)==19?(d=f[a+152>>2]|0,n>>>0>>0):0)?(A=c+8|0,z=f[A+4>>2]|0,q=c+16|0,p=q,o=f[p>>2]|0,p=f[p+4>>2]|0,(z|0)>(p|0)|((z|0)==(p|0)?(f[A>>2]|0)>>>0>o>>>0:0)):0)?(A=b[(f[c>>2]|0)+o>>0]|0,r=Hl(o|0,p|0,1,0)|0,z=q,f[z>>2]=r,f[z+4>>2]=I,A<<24>>24==0):0){f[a+176>>2]=2;f[a+180>>2]=7;break}A=0;u=y;return A|0}else{f[a+176>>2]=2;f[a+180>>2]=7;d=f[a+152>>2]|0}while(0);if((d|0)<0){A=0;u=y;return A|0}l=a+156|0;f[x>>2]=0;i=a+160|0;g=f[i>>2]|0;e=f[l>>2]|0;k=g-e>>2;if(d>>>0<=k>>>0)if(d>>>0>>0?(s=e+(d<<2)|0,(g|0)!=(s|0)):0){f[i>>2]=g+(~((g+-4-s|0)>>>2)<<2);d=2;e=7}else{d=2;e=7}else{Af(l,d-k|0,x);d=f[a+176>>2]|0;e=f[a+180>>2]|0}i=e-d+1|0;q=a+184|0;p=a+188|0;e=f[p>>2]|0;g=f[q>>2]|0;k=(e-g|0)/12|0;d=e;if(i>>>0<=k>>>0){if(i>>>0>>0?(t=g+(i*12|0)|0,(d|0)!=(t|0)):0){do{e=d+-12|0;f[p>>2]=e;g=f[e>>2]|0;if(!g)d=e;else{e=d+-8|0;d=f[e>>2]|0;if((d|0)!=(g|0))f[e>>2]=d+(~((d+-4-g|0)>>>2)<<2);No(g);d=f[p>>2]|0}}while((d|0)!=(t|0));e=d}}else{re(q,i-k|0);e=f[p>>2]|0}o=a+196|0;d=f[q>>2]|0;m=(e-d|0)/12|0;k=a+200|0;i=f[k>>2]|0;g=f[o>>2]|0;l=i-g>>2;if(m>>>0<=l>>>0){if(m>>>0>>0?(v=g+(m<<2)|0,(i|0)!=(v|0)):0)f[k>>2]=i+(~((i+-4-v|0)>>>2)<<2)}else{vg(o,m-l|0);e=f[p>>2]|0;d=f[q>>2]|0}if((e|0)==(d|0)){A=1;u=y;return A|0}n=0;do{Eh(x,c)|0;d=f[x>>2]|0;if(d|0){e=f[q>>2]|0;l=e+(n*12|0)|0;k=e+(n*12|0)+4|0;i=f[k>>2]|0;g=f[l>>2]|0;m=i-g>>2;if(d>>>0<=m>>>0){if(d>>>0>>0?(w=g+(d<<2)|0,(i|0)!=(w|0)):0)f[k>>2]=i+(~((i+-4-w|0)>>>2)<<2)}else{vg(l,d-m|0);e=f[q>>2]|0;d=f[x>>2]|0}mh(d,1,c,f[e+(n*12|0)>>2]|0)|0;f[(f[o>>2]|0)+(n<<2)>>2]=f[x>>2]}n=n+1|0}while(n>>>0<(((f[p>>2]|0)-(f[q>>2]|0)|0)/12|0)>>>0);d=1;u=y;return d|0}function Qb(a){a=a|0;var b=0,c=0,d=0,e=0,g=0,h=0,i=0,j=0,k=0;if(!a)return;c=a+-8|0;d=f[5262]|0;a=f[a+-4>>2]|0;b=a&-8;k=c+b|0;do if(!(a&1)){e=f[c>>2]|0;if(!(a&3))return;g=c+(0-e)|0;h=e+b|0;if(g>>>0>>0)return;if((g|0)==(f[5263]|0)){b=k+4|0;a=f[b>>2]|0;if((a&3|0)!=3){i=g;j=g;b=h;break}f[5260]=h;f[b>>2]=a&-2;f[g+4>>2]=h|1;f[g+h>>2]=h;return}c=e>>>3;if(e>>>0<256){a=f[g+8>>2]|0;b=f[g+12>>2]|0;if((b|0)==(a|0)){f[5258]=f[5258]&~(1<>2]=b;f[b+8>>2]=a;i=g;j=g;b=h;break}}e=f[g+24>>2]|0;a=f[g+12>>2]|0;do if((a|0)==(g|0)){c=g+16|0;b=c+4|0;a=f[b>>2]|0;if(!a){a=f[c>>2]|0;if(!a){c=0;break}else d=c}else d=b;while(1){c=a+20|0;b=f[c>>2]|0;if(b|0){a=b;d=c;continue}c=a+16|0;b=f[c>>2]|0;if(!b)break;else{a=b;d=c}}f[d>>2]=0;c=a}else{c=f[g+8>>2]|0;f[c+12>>2]=a;f[a+8>>2]=c;c=a}while(0);if(e){a=f[g+28>>2]|0;b=21336+(a<<2)|0;if((g|0)==(f[b>>2]|0)){f[b>>2]=c;if(!c){f[5259]=f[5259]&~(1<>2]|0)!=(g|0)&1)<<2)>>2]=c;if(!c){i=g;j=g;b=h;break}}f[c+24>>2]=e;b=g+16|0;a=f[b>>2]|0;if(a|0){f[c+16>>2]=a;f[a+24>>2]=c}a=f[b+4>>2]|0;if(a){f[c+20>>2]=a;f[a+24>>2]=c;i=g;j=g;b=h}else{i=g;j=g;b=h}}else{i=g;j=g;b=h}}else{i=c;j=c}while(0);if(i>>>0>=k>>>0)return;a=k+4|0;d=f[a>>2]|0;if(!(d&1))return;if(!(d&2)){a=f[5263]|0;if((k|0)==(f[5264]|0)){k=(f[5261]|0)+b|0;f[5261]=k;f[5264]=j;f[j+4>>2]=k|1;if((j|0)!=(a|0))return;f[5263]=0;f[5260]=0;return}if((k|0)==(a|0)){k=(f[5260]|0)+b|0;f[5260]=k;f[5263]=i;f[j+4>>2]=k|1;f[i+k>>2]=k;return}e=(d&-8)+b|0;c=d>>>3;do if(d>>>0<256){b=f[k+8>>2]|0;a=f[k+12>>2]|0;if((a|0)==(b|0)){f[5258]=f[5258]&~(1<>2]=a;f[a+8>>2]=b;break}}else{g=f[k+24>>2]|0;a=f[k+12>>2]|0;do if((a|0)==(k|0)){c=k+16|0;b=c+4|0;a=f[b>>2]|0;if(!a){a=f[c>>2]|0;if(!a){c=0;break}else d=c}else d=b;while(1){c=a+20|0;b=f[c>>2]|0;if(b|0){a=b;d=c;continue}c=a+16|0;b=f[c>>2]|0;if(!b)break;else{a=b;d=c}}f[d>>2]=0;c=a}else{c=f[k+8>>2]|0;f[c+12>>2]=a;f[a+8>>2]=c;c=a}while(0);if(g|0){a=f[k+28>>2]|0;b=21336+(a<<2)|0;if((k|0)==(f[b>>2]|0)){f[b>>2]=c;if(!c){f[5259]=f[5259]&~(1<>2]|0)!=(k|0)&1)<<2)>>2]=c;if(!c)break}f[c+24>>2]=g;b=k+16|0;a=f[b>>2]|0;if(a|0){f[c+16>>2]=a;f[a+24>>2]=c}a=f[b+4>>2]|0;if(a|0){f[c+20>>2]=a;f[a+24>>2]=c}}}while(0);f[j+4>>2]=e|1;f[i+e>>2]=e;if((j|0)==(f[5263]|0)){f[5260]=e;return}}else{f[a>>2]=d&-2;f[j+4>>2]=b|1;f[i+b>>2]=b;e=b}a=e>>>3;if(e>>>0<256){c=21072+(a<<1<<2)|0;b=f[5258]|0;a=1<>2]|0}f[a>>2]=j;f[b+12>>2]=j;f[j+8>>2]=b;f[j+12>>2]=c;return}a=e>>>8;if(a)if(e>>>0>16777215)b=31;else{i=(a+1048320|0)>>>16&8;k=a<>>16&4;k=k<>>16&2;b=14-(h|i|b)+(k<>>15)|0;b=e>>>(b+7|0)&1|b<<1}else b=0;d=21336+(b<<2)|0;f[j+28>>2]=b;f[j+20>>2]=0;f[j+16>>2]=0;a=f[5259]|0;c=1<>>1)|0);c=f[d>>2]|0;while(1){if((f[c+4>>2]&-8|0)==(e|0)){a=73;break}d=c+16+(b>>>31<<2)|0;a=f[d>>2]|0;if(!a){a=72;break}else{b=b<<1;c=a}}if((a|0)==72){f[d>>2]=j;f[j+24>>2]=c;f[j+12>>2]=j;f[j+8>>2]=j;break}else if((a|0)==73){i=c+8|0;k=f[i>>2]|0;f[k+12>>2]=j;f[i>>2]=j;f[j+8>>2]=k;f[j+12>>2]=c;f[j+24>>2]=0;break}}else{f[5259]=a|c;f[d>>2]=j;f[j+24>>2]=d;f[j+12>>2]=j;f[j+8>>2]=j}while(0);k=(f[5266]|0)+-1|0;f[5266]=k;if(!k)a=21488;else return;while(1){a=f[a>>2]|0;if(!a)break;else a=a+8|0}f[5266]=-1;return}function Rb(a,c){a=a|0;c=c|0;var d=0,e=0,g=La,i=La,j=0,k=0,l=0,m=0,o=0,p=0,q=0,r=0,s=0,t=0,u=0,v=0,w=0,x=0,y=0,z=0,A=La;v=b[c+11>>0]|0;x=v<<24>>24<0;w=x?f[c>>2]|0:c;v=x?f[c+4>>2]|0:v&255;if(v>>>0>3){j=w;m=v;k=v;while(1){x=X(h[j>>0]|h[j+1>>0]<<8|h[j+2>>0]<<16|h[j+3>>0]<<24,1540483477)|0;m=(X(x>>>24^x,1540483477)|0)^(X(m,1540483477)|0);k=k+-4|0;if(k>>>0<=3)break;else j=j+4|0}x=v+-4|0;k=x&-4;l=w+(k+4)|0;j=m;k=x-k|0}else{l=w;j=v;k=v}switch(k|0){case 3:{o=h[l+2>>0]<<16^j;z=6;break}case 2:{o=j;z=6;break}case 1:{p=j;z=7;break}default:q=j}if((z|0)==6){p=h[l+1>>0]<<8^o;z=7}if((z|0)==7)q=X(h[l>>0]^p,1540483477)|0;x=X(q>>>13^q,1540483477)|0;x=x>>>15^x;t=a+4|0;s=f[t>>2]|0;u=(s|0)==0;a:do if(!u){q=s+-1|0;k=(q&s|0)==0;if(!k)if(x>>>0>>0)r=x;else r=(x>>>0)%(s>>>0)|0;else r=x&q;j=f[(f[a>>2]|0)+(r<<2)>>2]|0;if((j|0)!=0?(e=f[j>>2]|0,(e|0)!=0):0){p=(v|0)==0;if(k){if(p){d=e;while(1){w=f[d+4>>2]|0;if(!((w|0)==(x|0)|(w&q|0)==(r|0))){d=r;break a}w=b[d+8+11>>0]|0;if(!((w<<24>>24<0?f[d+12>>2]|0:w&255)|0)){j=d;break}d=f[d>>2]|0;if(!d){d=r;break a}}a=j+20|0;return a|0}else j=e;b:while(1){o=f[j+4>>2]|0;if(!((o|0)==(x|0)|(o&q|0)==(r|0))){d=r;break a}k=j+8|0;m=b[k+11>>0]|0;o=m<<24>>24<0;m=m&255;do if(((o?f[j+12>>2]|0:m)|0)==(v|0)){l=f[k>>2]|0;if(o)if(!(ij(l,w,v)|0)){z=63;break b}else break;if((l&255)<<24>>24==(b[w>>0]|0)){l=w;do{m=m+-1|0;k=k+1|0;if(!m){z=63;break b}l=l+1|0}while((b[k>>0]|0)==(b[l>>0]|0))}}while(0);j=f[j>>2]|0;if(!j){d=r;break a}}if((z|0)==63){a=j+20|0;return a|0}}if(p){while(1){d=f[e+4>>2]|0;if((d|0)!=(x|0)){if(d>>>0>=s>>>0)d=(d>>>0)%(s>>>0)|0;if((d|0)!=(r|0)){d=r;break a}}w=b[e+8+11>>0]|0;if(!((w<<24>>24<0?f[e+12>>2]|0:w&255)|0)){j=e;break}e=f[e>>2]|0;if(!e){d=r;break a}}a=j+20|0;return a|0}c:while(1){j=f[e+4>>2]|0;if((j|0)!=(x|0)){if(j>>>0>=s>>>0)j=(j>>>0)%(s>>>0)|0;if((j|0)!=(r|0)){d=r;break a}}j=e+8|0;l=b[j+11>>0]|0;m=l<<24>>24<0;l=l&255;do if(((m?f[e+12>>2]|0:l)|0)==(v|0)){k=f[j>>2]|0;if(m)if(!(ij(k,w,v)|0)){j=e;z=63;break c}else break;if((k&255)<<24>>24==(b[w>>0]|0)){k=w;do{l=l+-1|0;j=j+1|0;if(!l){j=e;z=63;break c}k=k+1|0}while((b[j>>0]|0)==(b[k>>0]|0))}}while(0);e=f[e>>2]|0;if(!e){d=r;break a}}if((z|0)==63){a=j+20|0;return a|0}}else d=r}else d=0;while(0);l=Rk(24)|0;lh(l+8|0,c);f[l+20>>2]=0;f[l+4>>2]=x;f[l>>2]=0;k=a+12|0;i=$(((f[k>>2]|0)+1|0)>>>0);A=$(s>>>0);g=$(n[a+16>>2]);do if(u|i>$(A*g)){d=(s>>>0<3|(s+-1&s|0)!=0)&1|s<<1;e=~~$(W($(i/g)))>>>0;Zf(a,d>>>0>>0?e:d);d=f[t>>2]|0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>>2]=e;f[v>>2]=f[p>>2];vd(w,c,v)|0;we(w);break a}case 3:{ee(w,3);f[q>>2]=e;f[v>>2]=f[q>>2];ud(w,c,v)|0;we(w);break a}case 4:{Sd(w,3);f[r>>2]=e;f[v>>2]=f[r>>2];Wc(w,c,v)|0;le(w);break a}case 5:{Sd(w,3);f[s>>2]=e;f[v>>2]=f[s>>2];Vc(w,c,v)|0;le(w);break a}case 6:{Sd(w,3);f[t>>2]=e;f[v>>2]=f[t>>2];Uc(w,c,v)|0;le(w);break a}default:{A=0;u=x;return A|0}}}while(0);A=(((f[d+4>>2]|0)-(f[d>>2]|0)|0)/12|0|0)==(f[j>>2]|0);u=x;return A|0}function Tb(a,b,c,d,e,g){a=a|0;b=b|0;c=c|0;d=d|0;e=e|0;g=g|0;var h=0,i=0,j=0,k=0,l=0,m=0,n=0,o=0,p=0,q=0,r=0,s=0,t=0,v=0,w=0,x=0,y=0,z=0,A=0,B=0,C=0,D=0,E=0,F=0,G=0,H=0,I=0,J=0,K=0;E=u;u=u+32|0;z=E+16|0;C=E+12|0;B=E+8|0;D=E+4|0;y=E;A=a+8|0;f[A>>2]=e;i=a+32|0;h=a+36|0;g=f[h>>2]|0;d=f[i>>2]|0;j=g-d>>2;if(j>>>0>=e>>>0)if(j>>>0>e>>>0?(k=d+(e<<2)|0,(g|0)!=(k|0)):0){f[h>>2]=g+(~((g+-4-k|0)>>>2)<<2);d=e}else d=e;else{vg(i,e-j|0);d=f[A>>2]|0}v=f[a+48>>2]|0;w=f[a+52>>2]|0;t=e>>>0>1073741823?-1:e<<2;x=Ko(t)|0;kh(x|0,0,t|0)|0;if((d|0)>0){k=a+16|0;h=a+32|0;l=a+12|0;i=0;do{d=f[x+(i<<2)>>2]|0;g=f[k>>2]|0;if((d|0)>(g|0)){j=f[h>>2]|0;f[j+(i<<2)>>2]=g}else{t=f[l>>2]|0;j=f[h>>2]|0;f[j+(i<<2)>>2]=(d|0)<(t|0)?t:d}i=i+1|0;d=f[A>>2]|0}while((i|0)<(d|0));if((d|0)>0){i=a+20|0;h=0;do{d=(f[b+(h<<2)>>2]|0)+(f[j+(h<<2)>>2]|0)|0;g=c+(h<<2)|0;f[g>>2]=d;if((d|0)<=(f[k>>2]|0)){if((d|0)<(f[l>>2]|0)){d=(f[i>>2]|0)+d|0;K=18}}else{d=d-(f[i>>2]|0)|0;K=18}if((K|0)==18){K=0;f[g>>2]=d}h=h+1|0}while((h|0)<(f[A>>2]|0))}}q=a+56|0;d=f[q>>2]|0;g=f[d+4>>2]|0;h=f[d>>2]|0;s=g-h|0;t=s>>2;if((s|0)<=4){Lo(x);u=E;return 1}r=a+16|0;p=a+32|0;s=a+12|0;o=a+20|0;a=v+12|0;n=(e|0)>0;if(g-h>>2>>>0>1){m=h;I=1}else{l=d;co(l)}while(1){d=f[m+(I<<2)>>2]|0;l=X(I,e)|0;do if((d|0)>=0?(J=f[(f[a>>2]|0)+(d<<2)>>2]|0,(J|0)>=0):0){f[y>>2]=J;f[z>>2]=f[y>>2];rf(z,v,w,C,B,D);d=f[C>>2]|0;if((d|0)>=(I|0)){K=36;break}g=f[B>>2]|0;if((g|0)>=(I|0)){K=36;break}h=f[D>>2]|0;if((h|0)>=(I|0)){K=36;break}j=X(d,e)|0;i=X(g,e)|0;g=X(h,e)|0;if(n){d=0;do{f[x+(d<<2)>>2]=(f[c+(d+g<<2)>>2]|0)+(f[c+(d+i<<2)>>2]|0)-(f[c+(d+j<<2)>>2]|0);d=d+1|0}while((d|0)!=(e|0))}j=b+(l<<2)|0;k=c+(l<<2)|0;if((f[A>>2]|0)>0){h=0;do{d=f[x+(h<<2)>>2]|0;g=f[r>>2]|0;if((d|0)>(g|0)){i=f[p>>2]|0;f[i+(h<<2)>>2]=g}else{m=f[s>>2]|0;i=f[p>>2]|0;f[i+(h<<2)>>2]=(d|0)<(m|0)?m:d}h=h+1|0;d=f[A>>2]|0}while((h|0)<(d|0));if((d|0)>0){h=0;do{d=(f[j+(h<<2)>>2]|0)+(f[i+(h<<2)>>2]|0)|0;g=k+(h<<2)|0;f[g>>2]=d;if((d|0)<=(f[r>>2]|0)){if((d|0)<(f[s>>2]|0)){d=(f[o>>2]|0)+d|0;K=57}}else{d=d-(f[o>>2]|0)|0;K=57}if((K|0)==57){K=0;f[g>>2]=d}h=h+1|0}while((h|0)<(f[A>>2]|0))}}}else K=31;while(0);if((K|0)==31)K=36;if((K|0)==36?(K=0,F=c+((X(I+-1|0,e)|0)<<2)|0,G=b+(l<<2)|0,H=c+(l<<2)|0,(f[A>>2]|0)>0):0){h=0;do{d=f[F+(h<<2)>>2]|0;g=f[r>>2]|0;if((d|0)>(g|0)){i=f[p>>2]|0;f[i+(h<<2)>>2]=g}else{m=f[s>>2]|0;i=f[p>>2]|0;f[i+(h<<2)>>2]=(d|0)<(m|0)?m:d}h=h+1|0;d=f[A>>2]|0}while((h|0)<(d|0));if((d|0)>0){h=0;do{d=(f[G+(h<<2)>>2]|0)+(f[i+(h<<2)>>2]|0)|0;g=H+(h<<2)|0;f[g>>2]=d;if((d|0)<=(f[r>>2]|0)){if((d|0)<(f[s>>2]|0)){d=(f[o>>2]|0)+d|0;K=46}}else{d=d-(f[o>>2]|0)|0;K=46}if((K|0)==46){K=0;f[g>>2]=d}h=h+1|0}while((h|0)<(f[A>>2]|0))}}I=I+1|0;if((I|0)>=(t|0)){K=22;break}d=f[q>>2]|0;m=f[d>>2]|0;if((f[d+4>>2]|0)-m>>2>>>0<=I>>>0){K=23;break}}if((K|0)==22){Lo(x);u=E;return 1}else if((K|0)==23)co(d);return 0}function Ub(a,c,d){a=a|0;c=c|0;d=d|0;var e=0,g=0,h=0,i=0,j=0,k=0,l=0,m=0,n=0,o=0,p=0,q=0,r=0,s=0,t=0,v=0,w=0,x=0,y=0,z=0,A=0,B=0,C=0,D=0,E=0,F=0,G=0,H=0,J=0,K=0,L=0,M=0,N=0,O=0,P=0,Q=0,R=0,S=0,T=0;G=u;u=u+112|0;B=G+100|0;C=G+80|0;D=G+48|0;e=G+96|0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I)|0)|0;T=Hl(Q|0,I|0,(R?i:S)|0,T|0)|0;S=I;if((S|0)<0|(S|0)==0&T>>>0<536870913){f[d>>2]=i;f[d+4>>2]=g;f[d+8>>2]=c;u=G;return}else ra(10753,10567,95,10731)}function Vb(a,c,d,e){a=a|0;c=c|0;d=d|0;e=e|0;var g=La,h=0,i=0,j=La,k=0,l=La,m=La,o=La,p=La,q=La,r=0,t=0,v=0,w=La,x=La,y=La,z=La,A=0,B=0,C=0,D=0,E=0,F=0,G=La;F=u;u=u+48|0;A=F+40|0;B=F+36|0;E=F+24|0;C=F+12|0;D=F;h=f[c>>2]|0;c=h+1|0;do if((h|0)>=0){k=((c|0)%3|0|0)==0?h+-2|0:c;i=h+(((h>>>0)%3|0|0)==0?2:-1)|0;h=f[a+48>>2]|0;do if((k|0)>=0){c=f[h>>2]|0;if((k|0)<((f[h+4>>2]|0)-c>>2|0)){r=f[c+(k<<2)>>2]|0;break}else ra(16937,16972,98,17057)}else r=-1073741824;while(0);if((i|0)>=0){c=f[h>>2]|0;if((i|0)<((f[h+4>>2]|0)-c>>2|0)){v=f[c+(i<<2)>>2]|0;t=r;break}else ra(16937,16972,98,17057)}else{v=-1073741824;t=r}}else{v=-1073741824;t=-1073741824}while(0);i=f[a+52>>2]|0;c=f[i>>2]|0;k=(f[i+4>>2]|0)-c>>2;if(k>>>0<=t>>>0)co(i);h=c;c=f[h+(t<<2)>>2]|0;if(k>>>0<=v>>>0)co(i);t=f[h+(v<<2)>>2]|0;h=(c|0)<(e|0);if(!(h&(t|0)<(e|0))){do if(!h){if((e|0)>0){c=e+-1|0;break}i=a+72|0;if((f[i>>2]|0)<=0){u=F;return}c=f[a+68>>2]|0;h=0;do{f[c+(h<<2)>>2]=0;h=h+1|0}while((h|0)<(f[i>>2]|0));u=F;return}while(0);k=a+72|0;E=f[k>>2]|0;i=X(E,c)|0;if((E|0)<=0){u=F;return}c=f[a+68>>2]|0;h=0;do{f[c+(h<<2)>>2]=f[d+(h+i<<2)>>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$(j-$(p*G));g=$(g-$(m*G));j=G;g=$(L($($($(g*g)+$($(p*p)+$($(q*q)+$(0.0))))/l)))}else{j=$(0.0);g=$(0.0)}x=$(x-y);G=$(w-z);y=$(y+$(x*j));x=$(x*g);z=$(z+$(G*j));G=$(G*g);D=a+80|0;C=(f[D>>2]|0)+-1|0;E=(1<<(C&31)&f[(f[a+76>>2]|0)+(C>>>5<<2)>>2]|0)==0;f[D>>2]=C;j=$(-x);j=$(z+(E?j:x));g=$(-G);g=$(y+(E?G:g));if(((n[s>>2]=g,f[s>>2]|0)&2147483647)>>>0>2139095040)c=-2147483648;else c=~~+J(+(+g+.5));h=f[a+68>>2]|0;f[h>>2]=c;if(((n[s>>2]=j,f[s>>2]|0)&2147483647)>>>0>2139095040)c=-2147483648;else c=~~+J(+(+j+.5));f[h+4>>2]=c;u=F;return}function Wb(a,c){a=a|0;c=c|0;var d=0,e=0,g=0,i=0,j=0,k=0,l=0,m=0,n=0,o=0,p=0,q=0,r=0,s=0,t=0,v=0,w=0,x=0,y=0,z=0,A=0,B=0,C=0,D=0,E=0,F=0,G=0,H=0;F=u;u=u+80|0;B=F+76|0;A=F;E=F+72|0;z=F+64|0;D=F+68|0;C=a+28|0;do if(((h[(f[C>>2]|0)+36>>0]|0)<<8&65535)<512){w=c+8|0;x=f[w>>2]|0;w=f[w+4>>2]|0;i=c+16|0;e=i;d=f[e>>2]|0;e=Hl(d|0,f[e+4>>2]|0,4,0)|0;g=I;if((w|0)<(g|0)|(w|0)==(g|0)&x>>>0>>0){E=0;u=F;return E|0}else{d=(f[c>>2]|0)+d|0;d=h[d>>0]|h[d+1>>0]<<8|h[d+2>>0]<<16|h[d+3>>0]<<24;f[B>>2]=d;x=i;f[x>>2]=e;f[x+4>>2]=g;break}}else if(Eh(B,c)|0){d=f[B>>2]|0;break}else{E=0;u=F;return E|0}while(0);if(!d){E=0;u=F;return E|0}x=a+4|0;i=a+8|0;g=f[i>>2]|0;e=f[x>>2]|0;j=g-e>>2;if(d>>>0>j>>>0){vg(x,d-j|0);if(!(f[B>>2]|0)){E=1;u=F;return E|0}}else if(d>>>0>>0?(k=e+(d<<2)|0,(g|0)!=(k|0)):0)f[i>>2]=g+(~((g+-4-k|0)>>>2)<<2);p=f[a+32>>2]|0;s=c+8|0;v=c+16|0;w=A+60|0;r=p+8|0;q=p+12|0;t=a+16|0;n=a+20|0;o=0;while(1){g=s;e=f[g>>2]|0;g=f[g+4>>2]|0;a=v;k=f[a>>2]|0;a=f[a+4>>2]|0;if(!((g|0)>(a|0)|(g|0)==(a|0)&e>>>0>k>>>0)){d=0;e=53;break}i=f[c>>2]|0;m=b[i+k>>0]|0;d=Hl(k|0,a|0,1,0)|0;l=I;j=v;f[j>>2]=d;f[j+4>>2]=l;if(!((g|0)>(l|0)|(g|0)==(l|0)&e>>>0>d>>>0)){d=0;e=53;break}l=b[i+d>>0]|0;d=Hl(k|0,a|0,2,0)|0;j=I;G=v;f[G>>2]=d;f[G+4>>2]=j;if(!((g|0)>(j|0)|(g|0)==(j|0)&e>>>0>d>>>0)){d=0;e=53;break}j=b[i+d>>0]|0;d=Hl(k|0,a|0,3,0)|0;G=I;H=v;f[H>>2]=d;f[H+4>>2]=G;if(!((g|0)>(G|0)|(g|0)==(G|0)&e>>>0>d>>>0)){d=0;e=53;break}e=b[i+d>>0]|0;H=Hl(k|0,a|0,4,0)|0;d=v;f[d>>2]=H;f[d+4>>2]=I;d=l&255;if((l+-1&255)>10){d=0;e=53;break}wj(A);H=X(Lj(d)|0,j&255)|0;Dh(A,m&255,0,j,d,e<<24>>24!=0,H,((H|0)<0)<<31>>31,0,0);H=f[C>>2]|0;if((((h[H+36>>0]|0)<<8|(h[H+37>>0]|0))&65535)<259){G=s;H=f[G>>2]|0;G=f[G+4>>2]|0;e=v;d=f[e>>2]|0;e=Hl(d|0,f[e+4>>2]|0,2,0)|0;g=I;if((G|0)<(g|0)|(G|0)==(g|0)&H>>>0>>0){e=51;break}d=(f[c>>2]|0)+d|0;d=h[d>>0]|h[d+1>>0]<<8;H=v;f[H>>2]=e;f[H+4>>2]=g;d=d&65535;f[E>>2]=d}else{Eh(E,c)|0;d=f[E>>2]|0}f[w>>2]=d;j=Rk(96)|0;nj(j,A);f[z>>2]=j;j=vf(p,z)|0;i=f[z>>2]|0;f[z>>2]=0;if(i|0){H=i+88|0;d=f[H>>2]|0;f[H>>2]=0;if(d|0){e=f[d+8>>2]|0;if(e|0){g=d+12|0;if((f[g>>2]|0)!=(e|0))f[g>>2]=e;No(e)}No(d)}d=f[i+68>>2]|0;if(d|0){g=i+72|0;e=f[g>>2]|0;if((e|0)!=(d|0))f[g>>2]=e+(~((e+-4-d|0)>>>2)<<2);No(d)}H=i+64|0;d=f[H>>2]|0;f[H>>2]=0;if(d|0){e=f[d>>2]|0;if(e|0){g=d+4|0;if((f[g>>2]|0)!=(e|0))f[g>>2]=e;No(e)}No(d)}No(i)}if((j|0)<=-1){e=41;break}d=f[r>>2]|0;if(((f[q>>2]|0)-d>>2|0)<=(j|0)){e=43;break}f[(f[d+(j<<2)>>2]|0)+60>>2]=f[E>>2];f[(f[x>>2]|0)+(o<<2)>>2]=j;e=f[n>>2]|0;d=f[t>>2]|0;i=e-d>>2;if((j|0)>=(i|0)){g=j+1|0;f[D>>2]=-1;if(g>>>0<=i>>>0){if(g>>>0>>0?(y=d+(g<<2)|0,(e|0)!=(y|0)):0)f[n>>2]=e+(~((e+-4-y|0)>>>2)<<2)}else{Af(t,g-i|0,D);d=f[t>>2]|0}}f[d+(j<<2)>>2]=o;o=o+1|0;if(o>>>0>=(f[B>>2]|0)>>>0){d=1;e=53;break}}if((e|0)==41)ra(14612,17288,67,17379);else if((e|0)==43)ra(17234,17288,68,17379);else if((e|0)==51){H=0;u=F;return H|0}else if((e|0)==53){u=F;return d|0}return 0}function Xb(a,c,d){a=a|0;c=c|0;d=d|0;var e=0,g=0,h=0,i=0,j=0,k=0,l=0,m=0,n=0,o=0,p=0,q=0,r=0,s=0,t=0,v=0,w=0,x=0,y=0,z=0,A=0,B=0,C=0,D=0;D=u;u=u+16|0;A=D+8|0;x=D+4|0;B=D;y=a+64|0;e=f[y>>2]|0;if(((f[e+28>>2]|0)-(f[e+24>>2]|0)|0)<=0){u=D;return}z=c+96|0;t=c+100|0;w=a+52|0;v=d+84|0;m=d+68|0;o=a+56|0;q=a+60|0;l=a+12|0;n=a+28|0;s=a+40|0;p=a+44|0;r=a+48|0;j=0;k=0;a:while(1){h=f[(f[e+24>>2]|0)+(k<<2)>>2]|0;if((h|0)<0)c=j;else{i=j+1|0;d=(h>>>0)/3|0;c=f[z>>2]|0;if((d|0)>=(((f[t>>2]|0)-c|0)/12|0|0)){C=6;break}c=f[c+(d*12|0)+(((h>>>0)%3|0)<<2)>>2]|0;if(!(b[v>>0]|0))c=f[(f[m>>2]|0)+(c<<2)>>2]|0;f[A>>2]=c;d=f[o>>2]|0;if(d>>>0<(f[q>>2]|0)>>>0){f[d>>2]=c;f[o>>2]=d+4}else Og(w,A);f[A>>2]=h;f[x>>2]=0;b:do if(!(f[(f[l>>2]|0)+(k>>>5<<2)>>2]&1<<(k&31)))c=h;else{c=h+1|0;c=((c|0)%3|0|0)==0?h+-2|0:c;g=f[a>>2]|0;if(!(1<<(c&31)&f[g+(c>>>5<<2)>>2])){if((c|0)>=0){c=f[(f[(f[y>>2]|0)+12>>2]|0)+(c<<2)>>2]|0;d=c+1|0;if((c|0)>=0){c=((d|0)%3|0|0)==0?c+-2|0:d;f[x>>2]=c;if((c|0)<=-1){c=h;break}while(1){f[A>>2]=c;d=c+1|0;d=((d|0)%3|0|0)==0?c+-2|0:d;if(1<<(d&31)&f[g+(d>>>5<<2)>>2]|0){d=-1073741824;break}if((d|0)<0)break;d=f[(f[(f[y>>2]|0)+12>>2]|0)+(d<<2)>>2]|0;e=d+1|0;if((d|0)<0)break;d=((e|0)%3|0|0)==0?d+-2|0:e;f[x>>2]=d;if((d|0)>-1)c=d;else break b}f[x>>2]=d;break}}}else c=-1073741824;f[x>>2]=c;c=h}while(0);f[(f[n>>2]|0)+(c<<2)>>2]=j;c=f[p>>2]|0;if((c|0)==(f[r>>2]|0))Og(s,A);else{f[c>>2]=f[A>>2];f[p>>2]=c+4}e=f[y>>2]|0;c=f[A>>2]|0;c:do if((c|0)>=0){d=(((c>>>0)%3|0|0)==0?2:-1)+c|0;if((d|0)>=0){d=f[(f[e+12>>2]|0)+(d<<2)>>2]|0;if((d|0)>=0){d=d+(((d>>>0)%3|0|0)==0?2:-1)|0;f[x>>2]=d;if((d|0)>-1&(d|0)!=(c|0)){e=j;while(1){j=d+1|0;j=((j|0)%3|0|0)==0?d+-2|0:j;do if(f[(f[a>>2]|0)+(j>>>5<<2)>>2]&1<<(j&31)){h=i+1|0;e=(d>>>0)/3|0;c=f[z>>2]|0;if((e|0)>=(((f[t>>2]|0)-c|0)/12|0|0)){C=33;break a}c=f[c+(e*12|0)+(((d>>>0)%3|0)<<2)>>2]|0;if(!(b[v>>0]|0))c=f[(f[m>>2]|0)+(c<<2)>>2]|0;f[B>>2]=c;d=f[o>>2]|0;if(d>>>0<(f[q>>2]|0)>>>0){f[d>>2]=c;f[o>>2]=d+4}else Og(w,B);c=f[p>>2]|0;if((c|0)==(f[r>>2]|0)){Og(s,x);g=i;c=h;break}else{f[c>>2]=f[x>>2];f[p>>2]=c+4;g=i;c=h;break}}else{g=e;c=i}while(0);f[(f[n>>2]|0)+(f[x>>2]<<2)>>2]=g;e=f[y>>2]|0;d=f[x>>2]|0;if((d|0)<0)break;d=(((d>>>0)%3|0|0)==0?2:-1)+d|0;if((d|0)<0)break;d=f[(f[e+12>>2]|0)+(d<<2)>>2]|0;if((d|0)<0)break;d=d+(((d>>>0)%3|0|0)==0?2:-1)|0;f[x>>2]=d;if(!((d|0)>-1?(d|0)!=(f[A>>2]|0):0))break c;else{e=g;i=c}}f[x>>2]=d}else c=i}else{c=d;C=30}}else{c=d;C=30}}else C=30;while(0);if((C|0)==30){C=0;f[x>>2]=c;c=i}}k=k+1|0;if((k|0)>=((f[e+28>>2]|0)-(f[e+24>>2]|0)>>2|0)){C=3;break}else j=c}if((C|0)==3){u=D;return}else if((C|0)==6)ra(17180,17098,64,17175);else if((C|0)==33)ra(17180,17098,64,17175)}function Yb(a,c,d){a=a|0;c=c|0;d=d|0;var e=0,g=0,i=0,j=0,k=0,l=0,m=0,n=0,o=0;l=u;u=u+16|0;k=l;i=c+8|0;o=i;m=f[o>>2]|0;o=f[o+4>>2]|0;j=c+16|0;g=j;e=f[g>>2]|0;g=Hl(e|0,f[g+4>>2]|0,5,0)|0;n=I;if((o|0)<(n|0)|(o|0)==(n|0)&m>>>0>>0){e=Rk(32)|0;f[k>>2]=e;f[k+8>>2]=-2147483616;f[k+4>>2]=29;g=e;c=16126;i=g+29|0;do{b[g>>0]=b[c>>0]|0;g=g+1|0;c=c+1|0}while((g|0)<(i|0));b[e+29>>0]=0;f[a>>2]=-2;lh(a+4|0,k);if((b[k+11>>0]|0)<0)No(f[k>>2]|0);u=l;return}e=(f[c>>2]|0)+e|0;b[d>>0]=b[e>>0]|0;b[d+1>>0]=b[e+1>>0]|0;b[d+2>>0]=b[e+2>>0]|0;b[d+3>>0]=b[e+3>>0]|0;b[d+4>>0]=b[e+4>>0]|0;e=j;e=Hl(f[e>>2]|0,f[e+4>>2]|0,5,0)|0;g=I;o=j;f[o>>2]=e;f[o+4>>2]=g;if(ij(d,16156,5)|0){e=Rk(32)|0;f[k>>2]=e;f[k+8>>2]=-2147483616;f[k+4>>2]=17;g=e;c=16162;i=g+17|0;do{b[g>>0]=b[c>>0]|0;g=g+1|0;c=c+1|0}while((g|0)<(i|0));b[e+17>>0]=0;f[a>>2]=-1;lh(a+4|0,k);if((b[k+11>>0]|0)<0)No(f[k>>2]|0);u=l;return}o=i;n=f[o+4>>2]|0;if(!((n|0)>(g|0)|((n|0)==(g|0)?(f[o>>2]|0)>>>0>e>>>0:0))){e=Rk(32)|0;f[k>>2]=e;f[k+8>>2]=-2147483616;f[k+4>>2]=29;g=e;c=16126;i=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[k+8>>2]=-2147483616;f[k+4>>2]=29;g=e;c=16126;i=g+29|0;do{b[g>>0]=b[c>>0]|0;g=g+1|0;c=c+1|0}while((g|0)<(i|0));b[e+29>>0]=0;f[a>>2]=-2;lh(a+4|0,k);if((b[k+11>>0]|0)<0)No(f[k>>2]|0);u=l;return}b[d+8>>0]=b[(f[c>>2]|0)+e>>0]|0;o=j;m=f[o>>2]|0;o=f[o+4>>2]|0;e=Hl(m|0,o|0,1,0)|0;n=j;f[n>>2]=e;f[n+4>>2]=I;n=f[i>>2]|0;i=f[i+4>>2]|0;o=Hl(m|0,o|0,3,0)|0;m=I;if(!((i|0)<(m|0)|(i|0)==(m|0)&n>>>0>>0)){n=d+10|0;o=(f[c>>2]|0)+e|0;o=h[o>>0]|h[o+1>>0]<<8;b[n>>0]=o;b[n+1>>0]=o>>8;n=j;n=Hl(f[n>>2]|0,f[n+4>>2]|0,2,0)|0;o=j;f[o>>2]=n;f[o+4>>2]=I;f[a>>2]=0;f[a+4>>2]=0;f[a+8>>2]=0;f[a+12>>2]=0;u=l;return}e=Rk(32)|0;f[k>>2]=e;f[k+8>>2]=-2147483616;f[k+4>>2]=29;g=e;c=16126;i=g+29|0;do{b[g>>0]=b[c>>0]|0;g=g+1|0;c=c+1|0}while((g|0)<(i|0));b[e+29>>0]=0;f[a>>2]=-2;lh(a+4|0,k);if((b[k+11>>0]|0)<0)No(f[k>>2]|0);u=l;return}function Zb(a,c,d,e){a=a|0;c=c|0;d=d|0;e=e|0;var g=La,h=0,i=0,j=La,k=0,l=La,m=La,o=La,p=0,q=La,r=La,t=0,v=La,w=La,x=La,y=La,z=0,A=0,B=0,C=0,D=0,E=0,F=La;E=u;u=u+48|0;z=E+40|0;A=E+36|0;D=E+24|0;B=E+12|0;C=E;i=a+48|0;h=f[c>>2]|0;c=h+1|0;do if((h|0)>=0){c=((c|0)%3|0|0)==0?h+-2|0:c;if(!((h>>>0)%3|0)){h=h+2|0;break}else{h=h+-1|0;break}}else c=h;while(0);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,B)|0;c=f[(f[k>>2]|0)+(t<<2)>>2]|0;f[C>>2]=0;f[C+4>>2]=0;f[C+8>>2]=0;h=f[p>>2]|0;if(!(b[h+84>>0]|0))c=f[(f[h+68>>2]|0)+(c<<2)>>2]|0;f[A>>2]=c;d=b[h+24>>0]|0;f[z>>2]=f[A>>2];eb(h,z,d,C)|0;r=$(n[C>>2]);o=$(n[B>>2]);r=$(r-o);q=$(n[C+4>>2]);j=$(n[B+4>>2]);q=$(q-j);m=$(n[C+8>>2]);g=$(n[B+8>>2]);m=$(m-g);o=$($(n[D>>2])-o);j=$($(n[D+4>>2])-j);g=$($(n[D+8>>2])-g);l=$($($($(r*r)+$(0.0))+$(q*q))+$(m*m));if(l>$(0.0)?1:(f[a+88>>2]|0)<258){F=$($($($($(r*o)+$(0.0))+$(q*j))+$(m*g))/l);r=$(o-$(r*F));q=$(j-$(q*F));g=$(g-$(m*F));j=F;g=$(L($($($(g*g)+$($(q*q)+$($(r*r)+$(0.0))))/l)))}else{j=$(0.0);g=$(0.0)}w=$(w-x);F=$(v-y);x=$(x+$(w*j));w=$(w*g);y=$(y+$(F*j));F=$(F*g);C=a+80|0;B=(f[C>>2]|0)+-1|0;D=(1<<(B&31)&f[(f[a+76>>2]|0)+(B>>>5<<2)>>2]|0)==0;f[C>>2]=B;j=$(-w);j=$(y+(D?j:w));g=$(-F);g=$(x+(D?F:g));if(((n[s>>2]=g,f[s>>2]|0)&2147483647)>>>0>2139095040)c=-2147483648;else c=~~+J(+(+g+.5));h=f[a+68>>2]|0;f[h>>2]=c;if(((n[s>>2]=j,f[s>>2]|0)&2147483647)>>>0>2139095040)c=-2147483648;else c=~~+J(+(+j+.5));f[h+4>>2]=c;u=E;return}function _b(a,b,c,d,e,g){a=a|0;b=b|0;c=c|0;d=d|0;e=e|0;g=g|0;var h=0,i=0,j=0,k=0,l=0,m=0,n=0,o=0,p=0,q=0,r=0,s=0,t=0,u=0,v=0,w=0,x=0,y=0,z=0,A=0,B=0,C=0,D=0,E=0;z=a+8|0;f[z>>2]=e;i=a+32|0;h=a+36|0;g=f[h>>2]|0;d=f[i>>2]|0;j=g-d>>2;if(j>>>0>=e>>>0)if(j>>>0>e>>>0?(k=d+(e<<2)|0,(g|0)!=(k|0)):0){f[h>>2]=g+(~((g+-4-k|0)>>>2)<<2);d=e}else d=e;else{vg(i,e-j|0);d=f[z>>2]|0}w=f[a+48>>2]|0;x=f[a+52>>2]|0;v=e>>>0>1073741823?-1:e<<2;y=Ko(v)|0;kh(y|0,0,v|0)|0;if((d|0)>0){k=a+16|0;h=a+32|0;l=a+12|0;i=0;do{d=f[y+(i<<2)>>2]|0;g=f[k>>2]|0;if((d|0)>(g|0)){j=f[h>>2]|0;f[j+(i<<2)>>2]=g}else{v=f[l>>2]|0;j=f[h>>2]|0;f[j+(i<<2)>>2]=(d|0)<(v|0)?v:d}i=i+1|0;d=f[z>>2]|0}while((i|0)<(d|0));if((d|0)>0){i=a+20|0;h=0;do{d=(f[b+(h<<2)>>2]|0)+(f[j+(h<<2)>>2]|0)|0;g=c+(h<<2)|0;f[g>>2]=d;if((d|0)<=(f[k>>2]|0)){if((d|0)<(f[l>>2]|0)){d=(f[i>>2]|0)+d|0;E=18}}else{d=d-(f[i>>2]|0)|0;E=18}if((E|0)==18){E=0;f[g>>2]=d}h=h+1|0;d=f[z>>2]|0}while((h|0)<(d|0))}}r=f[a+56>>2]|0;g=f[r>>2]|0;u=(f[r+4>>2]|0)-g|0;v=u>>2;if((u|0)<=4){Lo(y);return 1}t=a+16|0;s=a+32|0;u=a+12|0;q=a+20|0;p=w+64|0;n=w+28|0;o=(e|0)>0;m=1;while(1){if(v>>>0<=m>>>0){E=24;break}h=f[g+(m<<2)>>2]|0;l=X(m,e)|0;if((!((h|0)<0?1:(1<<(h&31)&f[(f[w>>2]|0)+(h>>>5<<2)>>2]|0)!=0)?(D=f[(f[(f[p>>2]|0)+12>>2]|0)+(h<<2)>>2]|0,(D|0)>=0):0)?(C=f[n>>2]|0,a=f[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>>2]|0)+(f[k+(i<<2)>>2]|0)|0;h=l+(i<<2)|0;f[h>>2]=d;if((d|0)<=(f[t>>2]|0)){if((d|0)<(f[u>>2]|0)){d=(f[q>>2]|0)+d|0;E=40}}else{d=d-(f[q>>2]|0)|0;E=40}if((E|0)==40){E=0;f[h>>2]=d}i=i+1|0;d=f[z>>2]|0}while((i|0)<(d|0))}}}m=m+1|0;if((m|0)>=(v|0)){E=22;break}}if((E|0)==22){Lo(y);return 1}else if((E|0)==24)co(r);return 0}function $b(a,b){a=a|0;b=b|0;var c=0,d=0,e=0,g=0,h=0,i=0,j=0,k=0,l=0,m=0,n=0;if((b|0)<0)return;l=a+12|0;c=f[l>>2]|0;d=f[a+8>>2]|0;e=c-d>>2;if(e>>>0<=b>>>0)return;g=d+(b<<2)|0;n=f[(f[g>>2]|0)+56>>2]|0;if((e|0)<=(b|0))ra(17234,17288,68,17379);m=f[(f[d+(b<<2)>>2]|0)+60>>2]|0;d=g+4|0;if((d|0)!=(c|0)){j=g;do{h=f[d>>2]|0;f[d>>2]=0;i=f[j>>2]|0;f[j>>2]=h;if(i|0){h=i+88|0;e=f[h>>2]|0;f[h>>2]=0;if(e|0){g=f[e+8>>2]|0;if(g|0){h=e+12|0;if((f[h>>2]|0)!=(g|0))f[h>>2]=g;No(g)}No(e)}e=f[i+68>>2]|0;if(e|0){h=i+72|0;g=f[h>>2]|0;if((g|0)!=(e|0))f[h>>2]=g+(~((g+-4-e|0)>>>2)<<2);No(e)}h=i+64|0;e=f[h>>2]|0;f[h>>2]=0;if(e|0){g=f[e>>2]|0;if(g|0){h=e+4|0;if((f[h>>2]|0)!=(g|0))f[h>>2]=g;No(g)}No(e)}No(i)}d=d+4|0;j=j+4|0}while((d|0)!=(c|0));c=f[l>>2]|0;if((c|0)!=(j|0)){g=j;k=26}}else k=26;if((k|0)==26)do{k=c+-4|0;f[l>>2]=k;h=f[k>>2]|0;f[k>>2]=0;if(h|0){k=h+88|0;c=f[k>>2]|0;f[k>>2]=0;if(c|0){d=f[c+8>>2]|0;if(d|0){e=c+12|0;if((f[e>>2]|0)!=(d|0))f[e>>2]=d;No(d)}No(c)}c=f[h+68>>2]|0;if(c|0){e=h+72|0;d=f[e>>2]|0;if((d|0)!=(c|0))f[e>>2]=d+(~((d+-4-c|0)>>>2)<<2);No(c)}k=h+64|0;c=f[k>>2]|0;f[k>>2]=0;if(c|0){d=f[c>>2]|0;if(d|0){e=c+4|0;if((f[e>>2]|0)!=(d|0))f[e>>2]=d;No(d)}No(c)}No(h)}c=f[l>>2]|0}while((c|0)!=(g|0));d=f[a+4>>2]|0;a:do if(d|0){h=d+44|0;c=f[h>>2]|0;d=f[d+40>>2]|0;while(1){if((d|0)==(c|0))break a;e=d+4|0;if((f[(f[d>>2]|0)+40>>2]|0)==(m|0))break;else d=e}if((e|0)!=(c|0)){g=d;do{m=f[e>>2]|0;f[e>>2]=0;d=f[g>>2]|0;f[g>>2]=m;if(d|0){Rg(d);No(d)}e=e+4|0;g=g+4|0}while((e|0)!=(c|0));c=f[h>>2]|0;if((c|0)==(g|0))break;else d=g}do{m=c+-4|0;f[h>>2]=m;c=f[m>>2]|0;f[m>>2]=0;if(c|0){Rg(c);No(c)}c=f[h>>2]|0}while((c|0)!=(d|0))}while(0);b:do if((n|0)<5){c=f[a+20+(n*12|0)>>2]|0;i=a+20+(n*12|0)+4|0;d=f[i>>2]|0;e=d;c:do if((c|0)!=(d|0))while(1){if((f[c>>2]|0)==(b|0))break c;c=c+4|0;if((c|0)==(d|0))break b}while(0);if((c|0)!=(d|0)){g=c+4|0;e=e-g|0;h=e>>2;if(h){_j(c|0,g|0,e|0)|0;d=f[i>>2]|0}c=c+(h<<2)|0;if((d|0)!=(c|0))f[i>>2]=d+(~((d+-4-c|0)>>>2)<<2)}}while(0);c=f[a+24>>2]|0;d=f[a+20>>2]|0;h=d;if((c|0)!=(d|0)){g=c-d>>2;e=0;do{d=h+(e<<2)|0;c=f[d>>2]|0;if((c|0)>(b|0))f[d>>2]=c+-1;e=e+1|0}while(e>>>0>>0)}c=f[a+36>>2]|0;d=f[a+32>>2]|0;h=d;if((c|0)!=(d|0)){g=c-d>>2;e=0;do{d=h+(e<<2)|0;c=f[d>>2]|0;if((c|0)>(b|0))f[d>>2]=c+-1;e=e+1|0}while(e>>>0>>0)}c=f[a+48>>2]|0;d=f[a+44>>2]|0;h=d;if((c|0)!=(d|0)){g=c-d>>2;e=0;do{d=h+(e<<2)|0;c=f[d>>2]|0;if((c|0)>(b|0))f[d>>2]=c+-1;e=e+1|0}while(e>>>0>>0)}c=f[a+60>>2]|0;d=f[a+56>>2]|0;h=d;if((c|0)!=(d|0)){g=c-d>>2;e=0;do{d=h+(e<<2)|0;c=f[d>>2]|0;if((c|0)>(b|0))f[d>>2]=c+-1;e=e+1|0}while(e>>>0>>0)}d=f[a+72>>2]|0;c=f[a+68>>2]|0;h=c;if((d|0)==(c|0))return;g=d-c>>2;e=0;do{d=h+(e<<2)|0;c=f[d>>2]|0;if((c|0)>(b|0))f[d>>2]=c+-1;e=e+1|0}while(e>>>0>>0);return}function ac(a,b){a=a|0;b=b|0;var c=0,d=0,e=0,g=0,h=0,i=0,j=0,k=0,l=0,m=0,n=0,o=0,p=0,q=0,r=0,s=0;c=a+148|0;n=f[b>>2]|0;e=(n|0)<0;b=n+1|0;do if(!e){b=((b|0)%3|0|0)==0?n+-2|0:b;if(!((n>>>0)%3|0)){q=b;o=n+2|0;break}else{q=b;o=n+-1|0;break}}else{q=n;o=n}while(0);a:do switch(f[a+168>>2]|0){case 1:case 0:{d=f[c>>2]|0;do if((q|0)>=0){b=f[d>>2]|0;if((q|0)<((f[d+4>>2]|0)-b>>2|0)){j=f[b+(q<<2)>>2]|0;break}else ra(16937,16972,98,17057)}else j=-1073741824;while(0);b=f[a+156>>2]|0;n=b+(j<<2)|0;f[n>>2]=(f[n>>2]|0)+1;if((o|0)>=0){c=f[d>>2]|0;if((o|0)<((f[d+4>>2]|0)-c>>2|0)){g=1;e=b;b=f[c+(o<<2)>>2]|0;r=51;break a}else ra(16937,16972,98,17057)}else{g=1;e=b;b=-1073741824;r=51}break}case 5:{d=f[c>>2]|0;do if(!e){b=f[d>>2]|0;if((n|0)<((f[d+4>>2]|0)-b>>2|0)){h=f[b+(n<<2)>>2]|0;break}else ra(16937,16972,98,17057)}else h=-1073741824;while(0);c=f[a+156>>2]|0;n=c+(h<<2)|0;f[n>>2]=(f[n>>2]|0)+1;do if((q|0)>=0){b=f[d>>2]|0;if((q|0)<((f[d+4>>2]|0)-b>>2|0)){k=f[b+(q<<2)>>2]|0;break}else ra(16937,16972,98,17057)}else k=-1073741824;while(0);n=c+(k<<2)|0;f[n>>2]=(f[n>>2]|0)+1;if((o|0)>=0){b=f[d>>2]|0;if((o|0)<((f[d+4>>2]|0)-b>>2|0)){g=2;e=c;b=f[b+(o<<2)>>2]|0;r=51;break a}else ra(16937,16972,98,17057)}else{g=2;e=c;b=-1073741824;r=51}break}case 3:{d=f[c>>2]|0;do if(!e){b=f[d>>2]|0;if((n|0)<((f[d+4>>2]|0)-b>>2|0)){i=f[b+(n<<2)>>2]|0;break}else ra(16937,16972,98,17057)}else i=-1073741824;while(0);c=f[a+156>>2]|0;n=c+(i<<2)|0;f[n>>2]=(f[n>>2]|0)+1;do if((q|0)>=0){b=f[d>>2]|0;if((q|0)<((f[d+4>>2]|0)-b>>2|0)){l=f[b+(q<<2)>>2]|0;break}else ra(16937,16972,98,17057)}else l=-1073741824;while(0);n=c+(l<<2)|0;f[n>>2]=(f[n>>2]|0)+2;if((o|0)>=0){b=f[d>>2]|0;if((o|0)<((f[d+4>>2]|0)-b>>2|0)){g=1;e=c;b=f[b+(o<<2)>>2]|0;r=51;break a}else ra(16937,16972,98,17057)}else{g=1;e=c;b=-1073741824;r=51}break}case 7:{d=f[c>>2]|0;do if(!e){b=f[d>>2]|0;if((n|0)<((f[d+4>>2]|0)-b>>2|0)){g=f[b+(n<<2)>>2]|0;break}else ra(16937,16972,98,17057)}else g=-1073741824;while(0);c=f[a+156>>2]|0;n=c+(g<<2)|0;f[n>>2]=(f[n>>2]|0)+2;do if((q|0)>=0){b=f[d>>2]|0;if((q|0)<((f[d+4>>2]|0)-b>>2|0)){m=f[b+(q<<2)>>2]|0;break}else ra(16937,16972,98,17057)}else m=-1073741824;while(0);n=c+(m<<2)|0;f[n>>2]=(f[n>>2]|0)+2;if((o|0)>=0){b=f[d>>2]|0;if((o|0)<((f[d+4>>2]|0)-b>>2|0)){g=2;e=c;b=f[b+(o<<2)>>2]|0;r=51;break a}else ra(16937,16972,98,17057)}else{g=2;e=c;b=-1073741824;r=51}break}default:p=f[c>>2]|0}while(0);if((r|0)==51){p=e+(b<<2)|0;f[p>>2]=(f[p>>2]|0)+g;p=d}do if((q|0)>=0){b=f[p>>2]|0;if((q|0)<((f[p+4>>2]|0)-b>>2|0)){s=f[b+(q<<2)>>2]|0;break}else ra(16937,16972,98,17057)}else s=-1073741824;while(0);b=f[(f[a+156>>2]|0)+(s<<2)>>2]|0;c=f[a+176>>2]|0;if((b|0)<(c|0)){s=c;s=s-c|0;a=a+172|0;f[a>>2]=s;return}s=f[a+180>>2]|0;s=(b|0)>(s|0)?s:b;s=s-c|0;a=a+172|0;f[a>>2]=s;return}function bc(a,b){a=a|0;b=b|0;var c=0,d=0,e=0,g=0,h=0,i=0,j=0,k=0,l=0,m=0,n=0,o=0,p=0,q=0,r=0,s=0,t=0,u=0,v=0;r=a+148|0;p=f[b>>2]|0;q=(p|0)<0;s=p+1|0;do if(!q){b=((s|0)%3|0|0)==0?p+-2|0:s;if(!((p>>>0)%3|0)){l=b;n=p+2|0;break}else{l=b;n=p+-1|0;break}}else{l=p;n=p}while(0);o=a+184|0;b=f[o>>2]|0;a:do switch(b|0){case 1:case 0:{d=f[r>>2]|0;do if((l|0)>=0){b=f[d>>2]|0;if((l|0)<((f[d+4>>2]|0)-b>>2|0)){c=f[b+(l<<2)>>2]|0;break}else ra(16937,16972,98,17057)}else c=-1073741824;while(0);b=f[a+156>>2]|0;l=b+(c<<2)|0;f[l>>2]=(f[l>>2]|0)+1;if((n|0)>=0){c=f[d>>2]|0;if((n|0)<((f[d+4>>2]|0)-c>>2|0)){e=1;d=b;b=f[c+(n<<2)>>2]|0;t=50;break a}else ra(16937,16972,98,17057)}else{e=1;d=b;b=-1073741824;t=50}break}case 5:{c=f[r>>2]|0;do if(!q){b=f[c>>2]|0;if((p|0)<((f[c+4>>2]|0)-b>>2|0)){g=f[b+(p<<2)>>2]|0;break}else ra(16937,16972,98,17057)}else g=-1073741824;while(0);d=f[a+156>>2]|0;k=d+(g<<2)|0;f[k>>2]=(f[k>>2]|0)+1;do if((l|0)>=0){b=f[c>>2]|0;if((l|0)<((f[c+4>>2]|0)-b>>2|0)){j=f[b+(l<<2)>>2]|0;break}else ra(16937,16972,98,17057)}else j=-1073741824;while(0);l=d+(j<<2)|0;f[l>>2]=(f[l>>2]|0)+1;if((n|0)>=0){b=f[c>>2]|0;if((n|0)<((f[c+4>>2]|0)-b>>2|0)){e=2;b=f[b+(n<<2)>>2]|0;t=50;break a}else ra(16937,16972,98,17057)}else{e=2;b=-1073741824;t=50}break}case 3:{c=f[r>>2]|0;do if(!q){b=f[c>>2]|0;if((p|0)<((f[c+4>>2]|0)-b>>2|0)){h=f[b+(p<<2)>>2]|0;break}else ra(16937,16972,98,17057)}else h=-1073741824;while(0);d=f[a+156>>2]|0;k=d+(h<<2)|0;f[k>>2]=(f[k>>2]|0)+1;do if((l|0)>=0){b=f[c>>2]|0;if((l|0)<((f[c+4>>2]|0)-b>>2|0)){i=f[b+(l<<2)>>2]|0;break}else ra(16937,16972,98,17057)}else i=-1073741824;while(0);l=d+(i<<2)|0;f[l>>2]=(f[l>>2]|0)+2;if((n|0)>=0){b=f[c>>2]|0;if((n|0)<((f[c+4>>2]|0)-b>>2|0)){e=1;b=f[b+(n<<2)>>2]|0;t=50;break a}else ra(16937,16972,98,17057)}else{e=1;b=-1073741824;t=50}break}case 7:{c=f[r>>2]|0;do if(!q){b=f[c>>2]|0;if((p|0)<((f[c+4>>2]|0)-b>>2|0)){e=f[b+(p<<2)>>2]|0;break}else ra(16937,16972,98,17057)}else e=-1073741824;while(0);d=f[a+156>>2]|0;j=d+(e<<2)|0;f[j>>2]=(f[j>>2]|0)+2;do if((l|0)>=0){b=f[c>>2]|0;if((l|0)<((f[c+4>>2]|0)-b>>2|0)){k=f[b+(l<<2)>>2]|0;break}else ra(16937,16972,98,17057)}else k=-1073741824;while(0);l=d+(k<<2)|0;f[l>>2]=(f[l>>2]|0)+2;if((n|0)>=0){b=f[c>>2]|0;if((n|0)<((f[c+4>>2]|0)-b>>2|0)){e=2;b=f[b+(n<<2)>>2]|0;t=50;break a}else ra(16937,16972,98,17057)}else{e=2;b=-1073741824;t=50}break}default:m=b}while(0);if((t|0)==50){m=d+(b<<2)|0;f[m>>2]=(f[m>>2]|0)+e;m=f[o>>2]|0}switch(m|0){case 5:case 0:break;default:{f[a+188>>2]=-1;return}}c=f[r>>2]|0;do if(!q?(v=((s|0)%3|0|0)==0?p+-2|0:s,(v|0)>=0):0){b=f[c>>2]|0;if((v|0)<((f[c+4>>2]|0)-b>>2|0)){u=f[b+(v<<2)>>2]|0;break}else ra(16937,16972,98,17057)}else u=-1073741824;while(0);f[a+188>>2]=(f[(f[a+156>>2]|0)+(u<<2)>>2]|0)<6?5:0;return}function cc(a,b,c,d,e,g,h){a=a|0;b=b|0;c=c|0;d=d|0;e=e|0;g=g|0;h=h|0;switch(c|0){case 1:{b=Rk(60)|0;f[b>>2]=1536;f[b+4>>2]=d;d=b+8|0;f[d>>2]=f[e>>2];f[d+4>>2]=f[e+4>>2];f[d+8>>2]=f[e+8>>2];f[d+12>>2]=f[e+12>>2];f[d+16>>2]=f[e+16>>2];f[d+20>>2]=f[e+20>>2];Yh(b+32|0,e+24|0);e=b+44|0;f[e>>2]=f[g>>2];f[e+4>>2]=f[g+4>>2];f[e+8>>2]=f[g+8>>2];f[e+12>>2]=f[g+12>>2];f[b>>2]=2012;e=b;f[a>>2]=e;return}case 2:{b=Rk(60)|0;f[b>>2]=1536;f[b+4>>2]=d;d=b+8|0;f[d>>2]=f[e>>2];f[d+4>>2]=f[e+4>>2];f[d+8>>2]=f[e+8>>2];f[d+12>>2]=f[e+12>>2];f[d+16>>2]=f[e+16>>2];f[d+20>>2]=f[e+20>>2];Yh(b+32|0,e+24|0);e=b+44|0;f[e>>2]=f[g>>2];f[e+4>>2]=f[g+4>>2];f[e+8>>2]=f[g+8>>2];f[e+12>>2]=f[g+12>>2];f[b>>2]=2068;e=b;f[a>>2]=e;return}case 4:{b=Rk(112)|0;f[b>>2]=1536;f[b+4>>2]=d;h=b+8|0;f[h>>2]=f[e>>2];f[h+4>>2]=f[e+4>>2];f[h+8>>2]=f[e+8>>2];f[h+12>>2]=f[e+12>>2];f[h+16>>2]=f[e+16>>2];f[h+20>>2]=f[e+20>>2];Yh(b+32|0,e+24|0);h=b+44|0;f[h>>2]=f[g>>2];f[h+4>>2]=f[g+4>>2];f[h+8>>2]=f[g+8>>2];f[h+12>>2]=f[g+12>>2];f[b>>2]=2124;h=b+60|0;c=h+52|0;do{f[h>>2]=0;h=h+4|0}while((h|0)<(c|0));e=b;f[a>>2]=e;return}case 3:{b=Rk(92)|0;f[b>>2]=1536;f[b+4>>2]=d;d=b+8|0;f[d>>2]=f[e>>2];f[d+4>>2]=f[e+4>>2];f[d+8>>2]=f[e+8>>2];f[d+12>>2]=f[e+12>>2];f[d+16>>2]=f[e+16>>2];f[d+20>>2]=f[e+20>>2];Yh(b+32|0,e+24|0);e=b+44|0;f[e>>2]=f[g>>2];f[e+4>>2]=f[g+4>>2];f[e+8>>2]=f[g+8>>2];f[e+12>>2]=f[g+12>>2];f[b>>2]=2180;e=b+60|0;f[e>>2]=0;f[e+4>>2]=0;f[e+8>>2]=0;f[e+12>>2]=0;f[e+16>>2]=0;f[e+20>>2]=0;f[e+24>>2]=0;f[b+88>>2]=h&65535;e=b;f[a>>2]=e;return}case 5:{b=Rk(104)|0;f[b>>2]=1536;f[b+4>>2]=d;d=b+8|0;f[d>>2]=f[e>>2];f[d+4>>2]=f[e+4>>2];f[d+8>>2]=f[e+8>>2];f[d+12>>2]=f[e+12>>2];f[d+16>>2]=f[e+16>>2];f[d+20>>2]=f[e+20>>2];Yh(b+32|0,e+24|0);e=b+44|0;f[e>>2]=f[g>>2];f[e+4>>2]=f[g+4>>2];f[e+8>>2]=f[g+8>>2];f[e+12>>2]=f[g+12>>2];f[b>>2]=2236;f[b+60>>2]=0;f[b+64>>2]=0;f[b+76>>2]=0;f[b+80>>2]=0;f[b+84>>2]=0;e=b+88|0;f[e>>2]=f[g>>2];f[e+4>>2]=f[g+4>>2];f[e+8>>2]=f[g+8>>2];f[e+12>>2]=f[g+12>>2];e=b;f[a>>2]=e;return}case 6:{b=Rk(124)|0;f[b>>2]=1536;f[b+4>>2]=d;d=b+8|0;f[d>>2]=f[e>>2];f[d+4>>2]=f[e+4>>2];f[d+8>>2]=f[e+8>>2];f[d+12>>2]=f[e+12>>2];f[d+16>>2]=f[e+16>>2];f[d+20>>2]=f[e+20>>2];Yh(b+32|0,e+24|0);e=b+44|0;f[e>>2]=f[g>>2];f[e+4>>2]=f[g+4>>2];f[e+8>>2]=f[g+8>>2];f[e+12>>2]=f[g+12>>2];f[b>>2]=2292;f[b+64>>2]=0;f[b+68>>2]=0;e=b+72|0;f[e>>2]=f[g>>2];f[e+4>>2]=f[g+4>>2];f[e+8>>2]=f[g+8>>2];f[e+12>>2]=f[g+12>>2];f[b+60>>2]=2348;f[b+88>>2]=1;e=b+92|0;f[e>>2]=-1;f[e+4>>2]=-1;f[e+8>>2]=-1;f[e+12>>2]=-1;lo(b+108|0);e=b;f[a>>2]=e;return}default:{e=0;f[a>>2]=e;return}}}function dc(a,b,c,d,e,g,h){a=a|0;b=b|0;c=c|0;d=d|0;e=e|0;g=g|0;h=h|0;switch(c|0){case 1:{b=Rk(60)|0;f[b>>2]=1536;f[b+4>>2]=d;d=b+8|0;f[d>>2]=f[e>>2];f[d+4>>2]=f[e+4>>2];f[d+8>>2]=f[e+8>>2];f[d+12>>2]=f[e+12>>2];f[d+16>>2]=f[e+16>>2];f[d+20>>2]=f[e+20>>2];Yh(b+32|0,e+24|0);e=b+44|0;f[e>>2]=f[g>>2];f[e+4>>2]=f[g+4>>2];f[e+8>>2]=f[g+8>>2];f[e+12>>2]=f[g+12>>2];f[b>>2]=1648;e=b;f[a>>2]=e;return}case 2:{b=Rk(60)|0;f[b>>2]=1536;f[b+4>>2]=d;d=b+8|0;f[d>>2]=f[e>>2];f[d+4>>2]=f[e+4>>2];f[d+8>>2]=f[e+8>>2];f[d+12>>2]=f[e+12>>2];f[d+16>>2]=f[e+16>>2];f[d+20>>2]=f[e+20>>2];Yh(b+32|0,e+24|0);e=b+44|0;f[e>>2]=f[g>>2];f[e+4>>2]=f[g+4>>2];f[e+8>>2]=f[g+8>>2];f[e+12>>2]=f[g+12>>2];f[b>>2]=1704;e=b;f[a>>2]=e;return}case 4:{b=Rk(112)|0;f[b>>2]=1536;f[b+4>>2]=d;h=b+8|0;f[h>>2]=f[e>>2];f[h+4>>2]=f[e+4>>2];f[h+8>>2]=f[e+8>>2];f[h+12>>2]=f[e+12>>2];f[h+16>>2]=f[e+16>>2];f[h+20>>2]=f[e+20>>2];Yh(b+32|0,e+24|0);h=b+44|0;f[h>>2]=f[g>>2];f[h+4>>2]=f[g+4>>2];f[h+8>>2]=f[g+8>>2];f[h+12>>2]=f[g+12>>2];f[b>>2]=1760;h=b+60|0;c=h+52|0;do{f[h>>2]=0;h=h+4|0}while((h|0)<(c|0));e=b;f[a>>2]=e;return}case 3:{b=Rk(92)|0;f[b>>2]=1536;f[b+4>>2]=d;d=b+8|0;f[d>>2]=f[e>>2];f[d+4>>2]=f[e+4>>2];f[d+8>>2]=f[e+8>>2];f[d+12>>2]=f[e+12>>2];f[d+16>>2]=f[e+16>>2];f[d+20>>2]=f[e+20>>2];Yh(b+32|0,e+24|0);e=b+44|0;f[e>>2]=f[g>>2];f[e+4>>2]=f[g+4>>2];f[e+8>>2]=f[g+8>>2];f[e+12>>2]=f[g+12>>2];f[b>>2]=1816;e=b+60|0;f[e>>2]=0;f[e+4>>2]=0;f[e+8>>2]=0;f[e+12>>2]=0;f[e+16>>2]=0;f[e+20>>2]=0;f[e+24>>2]=0;f[b+88>>2]=h&65535;e=b;f[a>>2]=e;return}case 5:{b=Rk(104)|0;f[b>>2]=1536;f[b+4>>2]=d;d=b+8|0;f[d>>2]=f[e>>2];f[d+4>>2]=f[e+4>>2];f[d+8>>2]=f[e+8>>2];f[d+12>>2]=f[e+12>>2];f[d+16>>2]=f[e+16>>2];f[d+20>>2]=f[e+20>>2];Yh(b+32|0,e+24|0);e=b+44|0;f[e>>2]=f[g>>2];f[e+4>>2]=f[g+4>>2];f[e+8>>2]=f[g+8>>2];f[e+12>>2]=f[g+12>>2];f[b>>2]=1872;f[b+60>>2]=0;f[b+64>>2]=0;f[b+76>>2]=0;f[b+80>>2]=0;f[b+84>>2]=0;e=b+88|0;f[e>>2]=f[g>>2];f[e+4>>2]=f[g+4>>2];f[e+8>>2]=f[g+8>>2];f[e+12>>2]=f[g+12>>2];e=b;f[a>>2]=e;return}case 6:{b=Rk(124)|0;f[b>>2]=1536;f[b+4>>2]=d;d=b+8|0;f[d>>2]=f[e>>2];f[d+4>>2]=f[e+4>>2];f[d+8>>2]=f[e+8>>2];f[d+12>>2]=f[e+12>>2];f[d+16>>2]=f[e+16>>2];f[d+20>>2]=f[e+20>>2];Yh(b+32|0,e+24|0);e=b+44|0;f[e>>2]=f[g>>2];f[e+4>>2]=f[g+4>>2];f[e+8>>2]=f[g+8>>2];f[e+12>>2]=f[g+12>>2];f[b>>2]=1928;f[b+64>>2]=0;f[b+68>>2]=0;e=b+72|0;f[e>>2]=f[g>>2];f[e+4>>2]=f[g+4>>2];f[e+8>>2]=f[g+8>>2];f[e+12>>2]=f[g+12>>2];f[b+60>>2]=1984;f[b+88>>2]=1;e=b+92|0;f[e>>2]=-1;f[e+4>>2]=-1;f[e+8>>2]=-1;f[e+12>>2]=-1;lo(b+108|0);e=b;f[a>>2]=e;return}default:{e=0;f[a>>2]=e;return}}}function ec(a){a=a|0;var b=0,c=0,d=0,e=0,g=0,h=0,i=0,j=0,k=0,l=0,m=0,n=0,o=0;o=u;u=u+32|0;k=o+4|0;j=o;c=a+16|0;b=f[c>>2]|0;if(b>>>0>340){f[c>>2]=b+-341;l=a+4|0;k=f[l>>2]|0;m=f[k>>2]|0;k=k+4|0;f[l>>2]=k;n=a+8|0;b=f[n>>2]|0;j=a+12|0;i=f[j>>2]|0;d=i;g=b;do if((b|0)==(i|0)){c=f[a>>2]|0;e=c;if(k>>>0>c>>>0){b=k;e=((b-e>>2)+1|0)/-2|0;d=k+(e<<2)|0;b=g-b|0;c=b>>2;if(!c)b=k;else{_j(d|0,k|0,b|0)|0;b=f[l>>2]|0}a=d+(c<<2)|0;f[n>>2]=a;f[l>>2]=b+(e<<2);b=a;break}d=d-e>>1;d=(d|0)==0?1:d;if(d>>>0>1073741823){o=sa(8)|0;Km(o,17959);f[o>>2]=4748;wa(o|0,1128,100)}g=Rk(d<<2)|0;h=g;e=g+(d>>>2<<2)|0;i=e;g=g+(d<<2)|0;if((k|0)==(b|0))b=i;else{d=e;c=k;e=i;do{f[d>>2]=f[c>>2];d=e+4|0;e=d;c=c+4|0}while((c|0)!=(b|0));c=f[a>>2]|0;b=e}f[a>>2]=h;f[l>>2]=i;f[n>>2]=b;f[j>>2]=g;if(c){No(c);b=f[n>>2]|0}}while(0);f[b>>2]=m;f[n>>2]=(f[n>>2]|0)+4;u=o;return}n=a+8|0;b=f[n>>2]|0;m=a+4|0;e=b-(f[m>>2]|0)|0;l=a+12|0;c=f[l>>2]|0;d=c-(f[a>>2]|0)|0;if(e>>>0>=d>>>0){b=d>>1;b=(b|0)==0?1:b;f[k+12>>2]=0;f[k+16>>2]=a+12;if(b>>>0>1073741823){o=sa(8)|0;Km(o,17959);f[o>>2]=4748;wa(o|0,1128,100)}d=Rk(b<<2)|0;f[k>>2]=d;h=d+(e>>2<<2)|0;i=k+8|0;f[i>>2]=h;g=k+4|0;f[g>>2]=h;h=k+12|0;f[h>>2]=d+(b<<2);e=Rk(4092)|0;f[j>>2]=e;Ye(k,j);e=f[n>>2]|0;while(1){b=f[m>>2]|0;if((e|0)==(b|0))break;j=e+-4|0;Se(k,j);e=j}c=b;d=f[a>>2]|0;f[a>>2]=f[k>>2];f[k>>2]=d;f[m>>2]=f[g>>2];f[g>>2]=c;b=f[n>>2]|0;f[n>>2]=f[i>>2];f[i>>2]=b;a=f[l>>2]|0;f[l>>2]=f[h>>2];f[h>>2]=a;if((b|0)!=(e|0))f[i>>2]=b+(~((b+-4-c|0)>>>2)<<2);if(d|0)No(d);u=o;return}if((c|0)!=(b|0)){n=Rk(4092)|0;f[k>>2]=n;Ye(a,k);u=o;return}j=Rk(4092)|0;f[k>>2]=j;Se(a,k);j=f[m>>2]|0;k=f[j>>2]|0;j=j+4|0;f[m>>2]=j;b=f[n>>2]|0;i=f[l>>2]|0;c=i;g=b;do if((b|0)==(i|0)){e=f[a>>2]|0;d=e;if(j>>>0>e>>>0){b=j;e=((b-d>>2)+1|0)/-2|0;d=j+(e<<2)|0;b=g-b|0;c=b>>2;if(!c)b=j;else{_j(d|0,j|0,b|0)|0;b=f[m>>2]|0}a=d+(c<<2)|0;f[n>>2]=a;f[m>>2]=b+(e<<2);b=a;break}c=c-d>>1;c=(c|0)==0?1:c;if(c>>>0>1073741823){o=sa(8)|0;Km(o,17959);f[o>>2]=4748;wa(o|0,1128,100)}g=Rk(c<<2)|0;h=g;d=g+(c>>>2<<2)|0;i=d;g=g+(c<<2)|0;if((j|0)==(b|0)){c=e;b=i}else{c=j;e=i;do{f[d>>2]=f[c>>2];d=e+4|0;e=d;c=c+4|0}while((c|0)!=(b|0));c=f[a>>2]|0;b=e}f[a>>2]=h;f[m>>2]=i;f[n>>2]=b;f[l>>2]=g;if(c){No(c);b=f[n>>2]|0}}while(0);f[b>>2]=k;f[n>>2]=(f[n>>2]|0)+4;u=o;return}function fc(a,b,c){a=a|0;b=b|0;c=c|0;var d=0,e=0,g=0,h=0,i=0,j=0,k=0,l=0,m=0,n=0,o=0,p=0,q=0,r=0,s=0,t=0,v=0,w=0;v=u;u=u+16|0;r=v;t=a+68|0;f[t>>2]=(f[t>>2]|0)+1;t=(f[a+8+(b*12|0)+4>>2]|0)-(f[a+8+(b*12|0)>>2]|0)|0;s=t>>2;if((t|0)<=0){u=v;return}p=a+4|0;o=a+56|0;q=a+72|0;t=a+76|0;b=f[a+44+(b<<2)>>2]|0;n=0;a:while(1){l=(b|0)<0;j=l?-1073741824:(b>>>0)/3|0;k=(f[o>>2]|0)+(j>>>5<<2)|0;f[k>>2]=f[k>>2]|1<<(j&31);f[q>>2]=(f[q>>2]|0)+1;do if(n){d=f[a>>2]|0;if((b|0)==-1073741824)h=-1073741824;else{g=(b|0)/3|0;if((b|0)<=-3){m=39;break a}e=f[d+96>>2]|0;if((g|0)>=(((f[d+100>>2]|0)-e|0)/12|0|0)){m=41;break a}h=f[e+(g*12|0)+(((b|0)%3|0)<<2)>>2]|0}f[t>>2]=h;f[r>>2]=h;g=f[c>>2]|0;e=g+4|0;d=f[e>>2]|0;if(d>>>0<(f[g+8>>2]|0)>>>0){f[d>>2]=h;f[e>>2]=d+4}else Og(g,r);if(!(n&1)){d=b+1|0;if(l)break;b=((d|0)%3|0|0)==0?b+-2|0:d;m=53;break}if(!l)if(!((b>>>0)%3|0)){b=b+2|0;m=53;break}else{b=b+-1|0;m=53;break}}else{e=f[a>>2]|0;h=(b|0)==-1073741824;if(h)e=-1073741824;else{g=(b|0)/3|0;if((b|0)<=-3){m=7;break a}d=f[e+96>>2]|0;if((g|0)>=(((f[e+100>>2]|0)-d|0)/12|0|0)){m=9;break a}e=f[d+(g*12|0)+(((b|0)%3|0)<<2)>>2]|0}f[r>>2]=e;k=f[c>>2]|0;i=k+4|0;d=f[i>>2]|0;j=k+8|0;if(d>>>0<(f[j>>2]|0)>>>0){f[d>>2]=e;f[i>>2]=d+4}else Og(k,r);d=b+1|0;if(l)if((b|0)==-1073741824)e=-1073741824;else{d=b;m=17}else if(!((d|0)%3|0)){d=b+-2|0;m=19}else m=17;if((m|0)==17)if((d|0)>-3)m=19;else{m=18;break a}if((m|0)==19){m=0;w=f[a>>2]|0;g=(d|0)/3|0;e=f[w+96>>2]|0;if((g|0)>=(((f[w+100>>2]|0)-e|0)/12|0|0)){m=20;break a}e=f[e+(g*12|0)+(((d|0)%3|0)<<2)>>2]|0}f[r>>2]=e;d=f[i>>2]|0;if(d>>>0<(f[j>>2]|0)>>>0){f[d>>2]=e;f[i>>2]=d+4}else Og(k,r);if(l)if(h)e=-1073741824;else{h=b;m=28}else{h=(((b>>>0)%3|0|0)==0?2:-1)+b|0;m=28}if((m|0)==28){d=f[a>>2]|0;g=(h|0)/3|0;if((h|0)<=-3){m=29;break a}e=f[d+96>>2]|0;if((g|0)>=(((f[d+100>>2]|0)-e|0)/12|0|0)){m=31;break a}e=f[e+(g*12|0)+(((h|0)%3|0)<<2)>>2]|0}f[t>>2]=e;f[r>>2]=e;d=f[i>>2]|0;if(d>>>0<(f[j>>2]|0)>>>0){f[d>>2]=e;f[i>>2]=d+4}else Og(k,r);m=53}while(0);if((m|0)==53){m=0;if((b|0)>=0)b=f[(f[(f[p>>2]|0)+12>>2]|0)+(b<<2)>>2]|0}n=n+1|0;if((n|0)>=(s|0)){m=3;break}}if((m|0)==3){u=v;return}else if((m|0)==7)ra(17073,17098,63,17175);else if((m|0)==9)ra(17180,17098,64,17175);else if((m|0)==18)ra(17073,17098,63,17175);else if((m|0)==20)ra(17180,17098,64,17175);else if((m|0)==29)ra(17073,17098,63,17175);else if((m|0)==31)ra(17180,17098,64,17175);else if((m|0)==39)ra(17073,17098,63,17175);else if((m|0)==41)ra(17180,17098,64,17175)}function gc(a,b,c,d,e,g){a=a|0;b=b|0;c=c|0;d=d|0;e=e|0;g=g|0;var h=0,i=0,j=0,k=0,l=0,m=0,n=0,o=0,p=0,q=0,r=0,s=0,t=0,v=0,w=0,x=0,y=0,z=0,A=0,B=0,C=0,D=0;C=u;u=u+32|0;v=C+28|0;w=C+16|0;x=C+8|0;t=C;y=a+8|0;d=f[y>>2]|0;if((d|0)<=1)ra(9179,9190,60,9305);if((d|0)>=31)ra(9325,9190,61,9305);f[a+72>>2]=d;s=1<>2]=s+-1;s=s+-2|0;r=a+80|0;f[r>>2]=s;q=a+84|0;f[q>>2]=(s|0)/2|0;s=a+40|0;f[a+48>>2]=g;if(!(Na[f[(f[a>>2]|0)+16>>2]&127](a)|0))ra(10545,11337,99,11494);if((e|0)!=2)ra(11516,11337,102,11494);o=a+36|0;g=f[o>>2]|0;n=(f[g+4>>2]|0)-(f[g>>2]|0)|0;p=n>>2;f[w>>2]=0;f[w+4>>2]=0;f[w+8>>2]=0;if((n|0)<=0){u=C;return 1}m=w+4|0;n=w+8|0;l=a+88|0;k=x+4|0;d=f[g>>2]|0;if((f[g+4>>2]|0)==(d|0)){j=g;co(j)}else{h=d;B=0}while(1){f[t>>2]=f[h+(B<<2)>>2];f[v>>2]=f[t>>2];Fb(s,v,w);d=f[w>>2]|0;a=(d|0)>-1?d:0-d|0;g=f[m>>2]|0;e=(g|0)>-1?g:0-g|0;a=Hl(e|0,((e|0)<0)<<31>>31|0,a|0,((a|0)<0)<<31>>31|0)|0;e=f[n>>2]|0;h=(e|0)>-1;e=h?e:0-e|0;e=Hl(a|0,I|0,e|0,((e|0)<0)<<31>>31|0)|0;a=I;i=f[q>>2]|0;if((e|0)==0&(a|0)==0){g=w;d=i}else{D=((i|0)<0)<<31>>31;j=Qk(i|0,D|0,d|0,((d|0)<0)<<31>>31|0)|0;j=qi(j|0,I|0,e|0,a|0)|0;f[w>>2]=j;d=Qk(i|0,D|0,g|0,((g|0)<0)<<31>>31|0)|0;d=qi(d|0,I|0,e|0,a|0)|0;f[m>>2]=d;d=i-((j|0)>-1?j:0-j|0)-((d|0)>-1?d:0-d|0)|0;g=n;d=h?d:0-d|0}f[g>>2]=d;j=f[w>>2]|0;h=f[m>>2]|0;D=f[n>>2]|0;if((((h|0)>-1?h:0-h|0)+((j|0)>-1?j:0-j|0)+((D|0)>-1?D:0-D|0)|0)!=(i|0)){g=16;break}D=Hi(l)|0;d=f[w>>2]|0;if(D){d=0-d|0;g=0-(f[m>>2]|0)|0;i=0-(f[n>>2]|0)|0;f[w>>2]=d;f[m>>2]=g;f[n>>2]=i}else{g=f[m>>2]|0;i=f[n>>2]|0}a=(d|0)>-1;h=(g|0)>-1?g:0-g|0;e=(i|0)>-1?i:0-i|0;j=h+(a?d:0-d|0)+e|0;if((j|0)!=(f[q>>2]|0)){g=21;break}if(!a){if((g|0)<0)d=e;else d=(f[r>>2]|0)-e|0;if((i|0)<0){g=d;d=h}else{g=d;d=(f[r>>2]|0)-h|0}}else{g=j+g|0;d=j+i|0}e=(g|0)==0;a=(d|0)==0;h=f[r>>2]|0;do if((d|g|0)!=0?(z=(h|0)==(d|0),A=(h|0)==(g|0),!(e&z|a&A)):0){if(e&(j|0)<(d|0)){g=0;d=(j<<1)-d|0;break}if((j|0)>(d|0)&A){d=(j<<1)-d|0;break}if((j|0)>(g|0)&z){g=(j<<1)-g|0;break}else{g=(j|0)<(g|0)&a?(j<<1)-g|0:g;break}}else{g=h;d=h}while(0);f[x>>2]=g;f[k>>2]=d;D=B<<1;gg(y,x,b+(D<<2)|0,c+(D<<2)|0);B=B+1|0;if((B|0)>=(p|0)){g=11;break}d=f[o>>2]|0;h=f[d>>2]|0;if((f[d+4>>2]|0)-h>>2>>>0<=B>>>0){g=12;break}}if((g|0)==11){u=C;return 1}else if((g|0)==12)co(d);else if((g|0)==16)ra(11540,11337,116,11494);else if((g|0)==21)ra(11607,9190,99,11695);return 0}function hc(a,b,c,d,e,g){a=a|0;b=b|0;c=c|0;d=d|0;e=e|0;g=g|0;var h=0,i=0,j=0,k=0,l=0,m=0,n=0,o=0,p=0,q=0,r=0,s=0,t=0,v=0,w=0,x=0,y=0,z=0,A=0,B=0,C=0,D=0;C=u;u=u+32|0;v=C+28|0;w=C+16|0;x=C+8|0;t=C;y=a+8|0;d=f[y>>2]|0;if((d|0)<=1)ra(9179,9190,60,9305);if((d|0)>=31)ra(9325,9190,61,9305);f[a+72>>2]=d;s=1<>2]=s+-1;s=s+-2|0;r=a+80|0;f[r>>2]=s;q=a+84|0;f[q>>2]=(s|0)/2|0;s=a+40|0;f[a+48>>2]=g;if(!(Na[f[(f[a>>2]|0)+16>>2]&127](a)|0))ra(10545,11337,99,11494);if((e|0)!=2)ra(11516,11337,102,11494);o=a+36|0;g=f[o>>2]|0;n=(f[g+4>>2]|0)-(f[g>>2]|0)|0;p=n>>2;f[w>>2]=0;f[w+4>>2]=0;f[w+8>>2]=0;if((n|0)<=0){u=C;return 1}m=w+4|0;n=w+8|0;l=a+88|0;k=x+4|0;d=f[g>>2]|0;if((f[g+4>>2]|0)==(d|0)){j=g;co(j)}else{h=d;B=0}while(1){f[t>>2]=f[h+(B<<2)>>2];f[v>>2]=f[t>>2];Ub(s,v,w);d=f[w>>2]|0;a=(d|0)>-1?d:0-d|0;g=f[m>>2]|0;e=(g|0)>-1?g:0-g|0;a=Hl(e|0,((e|0)<0)<<31>>31|0,a|0,((a|0)<0)<<31>>31|0)|0;e=f[n>>2]|0;h=(e|0)>-1;e=h?e:0-e|0;e=Hl(a|0,I|0,e|0,((e|0)<0)<<31>>31|0)|0;a=I;i=f[q>>2]|0;if((e|0)==0&(a|0)==0){g=w;d=i}else{D=((i|0)<0)<<31>>31;j=Qk(i|0,D|0,d|0,((d|0)<0)<<31>>31|0)|0;j=qi(j|0,I|0,e|0,a|0)|0;f[w>>2]=j;d=Qk(i|0,D|0,g|0,((g|0)<0)<<31>>31|0)|0;d=qi(d|0,I|0,e|0,a|0)|0;f[m>>2]=d;d=i-((j|0)>-1?j:0-j|0)-((d|0)>-1?d:0-d|0)|0;g=n;d=h?d:0-d|0}f[g>>2]=d;j=f[w>>2]|0;h=f[m>>2]|0;D=f[n>>2]|0;if((((h|0)>-1?h:0-h|0)+((j|0)>-1?j:0-j|0)+((D|0)>-1?D:0-D|0)|0)!=(i|0)){g=16;break}D=Hi(l)|0;d=f[w>>2]|0;if(D){d=0-d|0;g=0-(f[m>>2]|0)|0;i=0-(f[n>>2]|0)|0;f[w>>2]=d;f[m>>2]=g;f[n>>2]=i}else{g=f[m>>2]|0;i=f[n>>2]|0}a=(d|0)>-1;h=(g|0)>-1?g:0-g|0;e=(i|0)>-1?i:0-i|0;j=h+(a?d:0-d|0)+e|0;if((j|0)!=(f[q>>2]|0)){g=21;break}if(!a){if((g|0)<0)d=e;else d=(f[r>>2]|0)-e|0;if((i|0)<0){g=d;d=h}else{g=d;d=(f[r>>2]|0)-h|0}}else{g=j+g|0;d=j+i|0}e=(g|0)==0;a=(d|0)==0;h=f[r>>2]|0;do if((d|g|0)!=0?(z=(h|0)==(d|0),A=(h|0)==(g|0),!(e&z|a&A)):0){if(e&(j|0)<(d|0)){g=0;d=(j<<1)-d|0;break}if((j|0)>(d|0)&A){d=(j<<1)-d|0;break}if((j|0)>(g|0)&z){g=(j<<1)-g|0;break}else{g=(j|0)<(g|0)&a?(j<<1)-g|0:g;break}}else{g=h;d=h}while(0);f[x>>2]=g;f[k>>2]=d;D=B<<1;gg(y,x,b+(D<<2)|0,c+(D<<2)|0);B=B+1|0;if((B|0)>=(p|0)){g=11;break}d=f[o>>2]|0;h=f[d>>2]|0;if((f[d+4>>2]|0)-h>>2>>>0<=B>>>0){g=12;break}}if((g|0)==11){u=C;return 1}else if((g|0)==12)co(d);else if((g|0)==16)ra(11540,11337,116,11494);else if((g|0)==21)ra(11607,9190,99,11695);return 0}function ic(a,b,c,d,e,g){a=a|0;b=b|0;c=c|0;d=d|0;e=e|0;g=g|0;var h=0,i=0,j=0,k=0,l=0,m=0,n=0,o=0,p=0,q=0,r=0,s=0,t=0,v=0,w=0,x=0,y=0,z=0,A=0,B=0,C=0,D=0;C=u;u=u+32|0;v=C+28|0;w=C+16|0;x=C+8|0;t=C;y=a+8|0;d=f[y>>2]|0;if((d|0)<=1)ra(9179,9190,60,9305);if((d|0)>=31)ra(9325,9190,61,9305);f[a+72>>2]=d;s=1<>2]=s+-1;s=s+-2|0;r=a+80|0;f[r>>2]=s;q=a+84|0;f[q>>2]=(s|0)/2|0;s=a+40|0;f[a+48>>2]=g;if(!(Na[f[(f[a>>2]|0)+16>>2]&127](a)|0))ra(10545,11337,99,11494);if((e|0)!=2)ra(11516,11337,102,11494);o=a+36|0;g=f[o>>2]|0;n=(f[g+4>>2]|0)-(f[g>>2]|0)|0;p=n>>2;f[w>>2]=0;f[w+4>>2]=0;f[w+8>>2]=0;if((n|0)<=0){u=C;return 1}m=w+4|0;n=w+8|0;l=a+88|0;k=x+4|0;d=f[g>>2]|0;if((f[g+4>>2]|0)==(d|0)){j=g;co(j)}else{h=d;B=0}while(1){f[t>>2]=f[h+(B<<2)>>2];f[v>>2]=f[t>>2];Fb(s,v,w);d=f[w>>2]|0;a=(d|0)>-1?d:0-d|0;g=f[m>>2]|0;e=(g|0)>-1?g:0-g|0;a=Hl(e|0,((e|0)<0)<<31>>31|0,a|0,((a|0)<0)<<31>>31|0)|0;e=f[n>>2]|0;h=(e|0)>-1;e=h?e:0-e|0;e=Hl(a|0,I|0,e|0,((e|0)<0)<<31>>31|0)|0;a=I;i=f[q>>2]|0;if((e|0)==0&(a|0)==0){g=w;d=i}else{D=((i|0)<0)<<31>>31;j=Qk(i|0,D|0,d|0,((d|0)<0)<<31>>31|0)|0;j=qi(j|0,I|0,e|0,a|0)|0;f[w>>2]=j;d=Qk(i|0,D|0,g|0,((g|0)<0)<<31>>31|0)|0;d=qi(d|0,I|0,e|0,a|0)|0;f[m>>2]=d;d=i-((j|0)>-1?j:0-j|0)-((d|0)>-1?d:0-d|0)|0;g=n;d=h?d:0-d|0}f[g>>2]=d;j=f[w>>2]|0;h=f[m>>2]|0;D=f[n>>2]|0;if((((h|0)>-1?h:0-h|0)+((j|0)>-1?j:0-j|0)+((D|0)>-1?D:0-D|0)|0)!=(i|0)){g=16;break}D=Hi(l)|0;d=f[w>>2]|0;if(D){d=0-d|0;g=0-(f[m>>2]|0)|0;i=0-(f[n>>2]|0)|0;f[w>>2]=d;f[m>>2]=g;f[n>>2]=i}else{g=f[m>>2]|0;i=f[n>>2]|0}a=(d|0)>-1;h=(g|0)>-1?g:0-g|0;e=(i|0)>-1?i:0-i|0;j=h+(a?d:0-d|0)+e|0;if((j|0)!=(f[q>>2]|0)){g=21;break}if(!a){if((g|0)<0)d=e;else d=(f[r>>2]|0)-e|0;if((i|0)<0){g=d;d=h}else{g=d;d=(f[r>>2]|0)-h|0}}else{g=j+g|0;d=j+i|0}e=(g|0)==0;a=(d|0)==0;h=f[r>>2]|0;do if((d|g|0)!=0?(z=(h|0)==(d|0),A=(h|0)==(g|0),!(e&z|a&A)):0){if(e&(j|0)<(d|0)){g=0;d=(j<<1)-d|0;break}if((j|0)>(d|0)&A){d=(j<<1)-d|0;break}if((j|0)>(g|0)&z){g=(j<<1)-g|0;break}else{g=(j|0)<(g|0)&a?(j<<1)-g|0:g;break}}else{g=h;d=h}while(0);f[x>>2]=g;f[k>>2]=d;D=B<<1;jg(y,x,b+(D<<2)|0,c+(D<<2)|0);B=B+1|0;if((B|0)>=(p|0)){g=11;break}d=f[o>>2]|0;h=f[d>>2]|0;if((f[d+4>>2]|0)-h>>2>>>0<=B>>>0){g=12;break}}if((g|0)==11){u=C;return 1}else if((g|0)==12)co(d);else if((g|0)==16)ra(11540,11337,116,11494);else if((g|0)==21)ra(11607,9190,99,11695);return 0}function jc(a,b,c,d,e,g){a=a|0;b=b|0;c=c|0;d=d|0;e=e|0;g=g|0;var h=0,i=0,j=0,k=0,l=0,m=0,n=0,o=0,p=0,q=0,r=0,s=0,t=0,v=0,w=0,x=0,y=0,z=0,A=0,B=0,C=0,D=0;C=u;u=u+32|0;v=C+28|0;w=C+16|0;x=C+8|0;t=C;y=a+8|0;d=f[y>>2]|0;if((d|0)<=1)ra(9179,9190,60,9305);if((d|0)>=31)ra(9325,9190,61,9305);f[a+72>>2]=d;s=1<>2]=s+-1;s=s+-2|0;r=a+80|0;f[r>>2]=s;q=a+84|0;f[q>>2]=(s|0)/2|0;s=a+40|0;f[a+48>>2]=g;if(!(Na[f[(f[a>>2]|0)+16>>2]&127](a)|0))ra(10545,11337,99,11494);if((e|0)!=2)ra(11516,11337,102,11494);o=a+36|0;g=f[o>>2]|0;n=(f[g+4>>2]|0)-(f[g>>2]|0)|0;p=n>>2;f[w>>2]=0;f[w+4>>2]=0;f[w+8>>2]=0;if((n|0)<=0){u=C;return 1}m=w+4|0;n=w+8|0;l=a+88|0;k=x+4|0;d=f[g>>2]|0;if((f[g+4>>2]|0)==(d|0)){j=g;co(j)}else{h=d;B=0}while(1){f[t>>2]=f[h+(B<<2)>>2];f[v>>2]=f[t>>2];Ub(s,v,w);d=f[w>>2]|0;a=(d|0)>-1?d:0-d|0;g=f[m>>2]|0;e=(g|0)>-1?g:0-g|0;a=Hl(e|0,((e|0)<0)<<31>>31|0,a|0,((a|0)<0)<<31>>31|0)|0;e=f[n>>2]|0;h=(e|0)>-1;e=h?e:0-e|0;e=Hl(a|0,I|0,e|0,((e|0)<0)<<31>>31|0)|0;a=I;i=f[q>>2]|0;if((e|0)==0&(a|0)==0){g=w;d=i}else{D=((i|0)<0)<<31>>31;j=Qk(i|0,D|0,d|0,((d|0)<0)<<31>>31|0)|0;j=qi(j|0,I|0,e|0,a|0)|0;f[w>>2]=j;d=Qk(i|0,D|0,g|0,((g|0)<0)<<31>>31|0)|0;d=qi(d|0,I|0,e|0,a|0)|0;f[m>>2]=d;d=i-((j|0)>-1?j:0-j|0)-((d|0)>-1?d:0-d|0)|0;g=n;d=h?d:0-d|0}f[g>>2]=d;j=f[w>>2]|0;h=f[m>>2]|0;D=f[n>>2]|0;if((((h|0)>-1?h:0-h|0)+((j|0)>-1?j:0-j|0)+((D|0)>-1?D:0-D|0)|0)!=(i|0)){g=16;break}D=Hi(l)|0;d=f[w>>2]|0;if(D){d=0-d|0;g=0-(f[m>>2]|0)|0;i=0-(f[n>>2]|0)|0;f[w>>2]=d;f[m>>2]=g;f[n>>2]=i}else{g=f[m>>2]|0;i=f[n>>2]|0}a=(d|0)>-1;h=(g|0)>-1?g:0-g|0;e=(i|0)>-1?i:0-i|0;j=h+(a?d:0-d|0)+e|0;if((j|0)!=(f[q>>2]|0)){g=21;break}if(!a){if((g|0)<0)d=e;else d=(f[r>>2]|0)-e|0;if((i|0)<0){g=d;d=h}else{g=d;d=(f[r>>2]|0)-h|0}}else{g=j+g|0;d=j+i|0}e=(g|0)==0;a=(d|0)==0;h=f[r>>2]|0;do if((d|g|0)!=0?(z=(h|0)==(d|0),A=(h|0)==(g|0),!(e&z|a&A)):0){if(e&(j|0)<(d|0)){g=0;d=(j<<1)-d|0;break}if((j|0)>(d|0)&A){d=(j<<1)-d|0;break}if((j|0)>(g|0)&z){g=(j<<1)-g|0;break}else{g=(j|0)<(g|0)&a?(j<<1)-g|0:g;break}}else{g=h;d=h}while(0);f[x>>2]=g;f[k>>2]=d;D=B<<1;jg(y,x,b+(D<<2)|0,c+(D<<2)|0);B=B+1|0;if((B|0)>=(p|0)){g=11;break}d=f[o>>2]|0;h=f[d>>2]|0;if((f[d+4>>2]|0)-h>>2>>>0<=B>>>0){g=12;break}}if((g|0)==11){u=C;return 1}else if((g|0)==12)co(d);else if((g|0)==16)ra(11540,11337,116,11494);else if((g|0)==21)ra(11607,9190,99,11695);return 0}function kc(a,b,c){a=a|0;b=b|0;c=c|0;var d=0,e=0,g=0,h=0,i=0,j=0,k=0,l=0,m=0,n=0,o=0,p=0,q=0,r=0,s=0,t=0,v=0,w=0;v=u;u=u+16|0;r=v+8|0;q=v+4|0;o=v;p=a+64|0;c=f[p>>2]|0;if(((f[c+28>>2]|0)-(f[c+24>>2]|0)|0)<=0){u=v;return}s=a+52|0;k=a+56|0;m=a+60|0;i=a+12|0;j=a+28|0;t=a+40|0;l=a+44|0;n=a+48|0;b=0;h=0;do{d=f[(f[c+24>>2]|0)+(h<<2)>>2]|0;if((d|0)>=0){e=b+1|0;f[r>>2]=b;c=f[k>>2]|0;if((c|0)==(f[m>>2]|0))Og(s,r);else{f[c>>2]=b;f[k>>2]=c+4}f[q>>2]=d;f[o>>2]=0;a:do if(!(f[(f[i>>2]|0)+(h>>>5<<2)>>2]&1<<(h&31)))c=d;else{c=d+1|0;c=((c|0)%3|0|0)==0?d+-2|0:c;g=f[a>>2]|0;if(!(1<<(c&31)&f[g+(c>>>5<<2)>>2])){if((c|0)>=0){c=f[(f[(f[p>>2]|0)+12>>2]|0)+(c<<2)>>2]|0;b=c+1|0;if((c|0)>=0){c=((b|0)%3|0|0)==0?c+-2|0:b;f[o>>2]=c;if((c|0)<=-1){c=d;break}while(1){f[q>>2]=c;b=c+1|0;b=((b|0)%3|0|0)==0?c+-2|0:b;if(1<<(b&31)&f[g+(b>>>5<<2)>>2]|0){b=-1073741824;break}if((b|0)<0)break;b=f[(f[(f[p>>2]|0)+12>>2]|0)+(b<<2)>>2]|0;d=b+1|0;if((b|0)<0)break;b=((d|0)%3|0|0)==0?b+-2|0:d;f[o>>2]=b;if((b|0)>-1)c=b;else break a}f[o>>2]=b;break}}}else c=-1073741824;f[o>>2]=c;c=d}while(0);f[(f[j>>2]|0)+(c<<2)>>2]=f[r>>2];c=f[l>>2]|0;if((c|0)==(f[n>>2]|0))Og(t,q);else{f[c>>2]=f[q>>2];f[l>>2]=c+4}c=f[p>>2]|0;b=f[q>>2]|0;b:do if((b|0)>=0){d=(((b>>>0)%3|0|0)==0?2:-1)+b|0;if((d|0)>=0){d=f[(f[c+12>>2]|0)+(d<<2)>>2]|0;if((d|0)>=0){d=d+(((d>>>0)%3|0|0)==0?2:-1)|0;f[o>>2]=d;if((d|0)>-1&(d|0)!=(b|0)){b=d;while(1){g=b+1|0;g=((g|0)%3|0|0)==0?b+-2|0:g;do if(f[(f[a>>2]|0)+(g>>>5<<2)>>2]&1<<(g&31)){b=e+1|0;f[r>>2]=e;c=f[k>>2]|0;if((c|0)==(f[m>>2]|0))Og(s,r);else{f[c>>2]=e;f[k>>2]=c+4}c=f[l>>2]|0;if((c|0)==(f[n>>2]|0)){Og(t,o);e=b;break}else{f[c>>2]=f[o>>2];f[l>>2]=c+4;e=b;break}}while(0);f[(f[j>>2]|0)+(f[o>>2]<<2)>>2]=f[r>>2];c=f[p>>2]|0;b=f[o>>2]|0;if((b|0)<0)break;b=(((b>>>0)%3|0|0)==0?2:-1)+b|0;if((b|0)<0)break;b=f[(f[c+12>>2]|0)+(b<<2)>>2]|0;if((b|0)<0)break;b=b+(((b>>>0)%3|0|0)==0?2:-1)|0;f[o>>2]=b;if(!((b|0)>-1?(b|0)!=(f[q>>2]|0):0)){b=e;break b}}f[o>>2]=b;b=e}else b=e}else{b=d;w=26}}else{b=d;w=26}}else w=26;while(0);if((w|0)==26){w=0;f[o>>2]=b;b=e}}h=h+1|0}while((h|0)<((f[c+28>>2]|0)-(f[c+24>>2]|0)>>2|0));u=v;return}function lc(a,c,e,g,i){a=a|0;c=c|0;e=e|0;g=g|0;i=i|0;var j=0,k=0,l=0,m=0,n=0;n=u;u=u+32|0;k=n+12|0;m=n;f[c+40>>2]=e;j=c+32|0;f[j>>2]=g;f[c+4>>2]=i;Yb(a,g,k);if(f[a>>2]|0){u=n;return}l=a+4|0;i=l+11|0;if((b[i>>0]|0)<0)No(f[l>>2]|0);g=h[k+7>>0]|0;if((g|0)!=(Na[f[(f[c>>2]|0)+8>>2]&127](c)|0)){e=Rk(64)|0;f[m>>2]=e;f[m+8>>2]=-2147483584;f[m+4>>2]=50;g=e;i=16207;j=g+50|0;do{b[g>>0]=b[i>>0]|0;g=g+1|0;i=i+1|0}while((g|0)<(j|0));b[e+50>>0]=0;f[a>>2]=-1;lh(l,m);if((b[m+11>>0]|0)<0)No(f[m>>2]|0);u=n;return}e=b[k+5>>0]|0;b[c+36>>0]=e;g=b[k+6>>0]|0;b[c+37>>0]=g;if((e+-1&255)>1){e=Rk(32)|0;f[m>>2]=e;f[m+8>>2]=-2147483616;f[m+4>>2]=22;g=e;i=16258;j=g+22|0;do{b[g>>0]=b[i>>0]|0;g=g+1|0;i=i+1|0}while((g|0)<(j|0));b[e+22>>0]=0;f[a>>2]=-5;lh(l,m);if((b[m+11>>0]|0)<0)No(f[m>>2]|0);u=n;return}if(e<<24>>24==2&(g&255)>2){e=Rk(32)|0;f[m>>2]=e;f[m+8>>2]=-2147483616;f[m+4>>2]=22;g=e;i=16281;j=g+22|0;do{b[g>>0]=b[i>>0]|0;g=g+1|0;i=i+1|0}while((g|0)<(j|0));b[e+22>>0]=0;f[a>>2]=-5;lh(l,m);if((b[m+11>>0]|0)<0)No(f[m>>2]|0);u=n;return}g=(g&255|(e&255)<<8)&65535;d[(f[j>>2]|0)+38>>1]=g;if((g&65535)>258?(d[k+10>>1]|0)<0:0){Hd(a,c);if(f[a>>2]|0){u=n;return}if((b[i>>0]|0)<0)No(f[l>>2]|0)}if(!(Na[f[(f[c>>2]|0)+12>>2]&127](c)|0)){e=Rk(48)|0;f[m>>2]=e;f[m+8>>2]=-2147483600;f[m+4>>2]=33;g=e;i=16304;j=g+33|0;do{b[g>>0]=b[i>>0]|0;g=g+1|0;i=i+1|0}while((g|0)<(j|0));b[e+33>>0]=0;f[a>>2]=-1;lh(l,m);if((b[m+11>>0]|0)<0)No(f[m>>2]|0);u=n;return}if(!(Na[f[(f[c>>2]|0)+20>>2]&127](c)|0)){e=Rk(32)|0;f[m>>2]=e;f[m+8>>2]=-2147483616;f[m+4>>2]=31;g=e;i=16338;j=g+31|0;do{b[g>>0]=b[i>>0]|0;g=g+1|0;i=i+1|0}while((g|0)<(j|0));b[e+31>>0]=0;f[a>>2]=-1;lh(l,m);if((b[m+11>>0]|0)<0)No(f[m>>2]|0);u=n;return}if(Na[f[(f[c>>2]|0)+24>>2]&127](c)|0){f[a>>2]=0;f[a+4>>2]=0;f[a+8>>2]=0;f[a+12>>2]=0;u=n;return}e=Rk(48)|0;f[m>>2]=e;f[m+8>>2]=-2147483600;f[m+4>>2]=34;g=e;i=16370;j=g+34|0;do{b[g>>0]=b[i>>0]|0;g=g+1|0;i=i+1|0}while((g|0)<(j|0));b[e+34>>0]=0;f[a>>2]=-1;lh(l,m);if((b[m+11>>0]|0)<0)No(f[m>>2]|0);u=n;return}function mc(a,c){a=a|0;c=c|0;var d=0,e=0,g=0,i=0,j=0,k=0,l=0,m=0,n=0,o=0,p=0,q=0,r=0,s=0,t=0,u=0,v=0,w=0;r=b[c+11>>0]|0;m=r<<24>>24<0;u=m?f[c>>2]|0:c;r=m?f[c+4>>2]|0:r&255;if(r>>>0>3){c=u;g=r;d=r;while(1){m=X(h[c>>0]|h[c+1>>0]<<8|h[c+2>>0]<<16|h[c+3>>0]<<24,1540483477)|0;g=(X(m>>>24^m,1540483477)|0)^(X(g,1540483477)|0);d=d+-4|0;if(d>>>0<=3)break;else c=c+4|0}m=r+-4|0;d=m&-4;e=u+(d+4)|0;c=g;d=m-d|0}else{e=u;c=r;d=r}switch(d|0){case 3:{i=h[e+2>>0]<<16^c;q=6;break}case 2:{i=c;q=6;break}case 1:{j=c;q=7;break}default:k=c}if((q|0)==6){j=h[e+1>>0]<<8^i;q=7}if((q|0)==7)k=X(h[e>>0]^j,1540483477)|0;m=X(k>>>13^k,1540483477)|0;m=m>>>15^m;k=f[a+4>>2]|0;if(!k){w=0;return w|0}i=k+-1|0;d=(i&k|0)==0;if(!d)if(m>>>0>>0)l=m;else l=(m>>>0)%(k>>>0)|0;else l=m&i;c=f[(f[a>>2]|0)+(l<<2)>>2]|0;if(!c){w=0;return w|0}c=f[c>>2]|0;if(!c){w=0;return w|0}j=(r|0)==0;if(d){a:while(1){q=f[c+4>>2]|0;d=(m|0)==(q|0);if(!(d|(q&i|0)==(l|0))){c=0;q=41;break}do if(d?(n=c+8|0,o=b[n+11>>0]|0,p=o<<24>>24<0,o=o&255,((p?f[c+12>>2]|0:o)|0)==(r|0)):0){d=f[n>>2]|0;e=p?d:n;if(p){if(j){q=41;break a}if(!(ij(e,u,r)|0)){q=41;break a}else break}if(j){q=41;break a}if((d&255)<<24>>24==(b[u>>0]|0)){d=o;e=n;g=u;do{d=d+-1|0;e=e+1|0;if(!d){q=41;break a}g=g+1|0}while((b[e>>0]|0)==(b[g>>0]|0))}}while(0);c=f[c>>2]|0;if(!c){c=0;q=41;break}}if((q|0)==41)return c|0}else s=c;b:while(1){c=f[s+4>>2]|0;d=(m|0)==(c|0);if(!d){if(c>>>0>=k>>>0)c=(c>>>0)%(k>>>0)|0;if((c|0)!=(l|0)){c=0;q=41;break}if(d)q=33}else q=33;do if((q|0)==33?(q=0,t=s+8|0,v=b[t+11>>0]|0,w=v<<24>>24<0,v=v&255,((w?f[s+12>>2]|0:v)|0)==(r|0)):0){c=f[t>>2]|0;d=w?c:t;if(w){if(j){c=s;q=41;break b}if(!(ij(d,u,r)|0)){c=s;q=41;break b}else break}if(j){c=s;q=41;break b}if((c&255)<<24>>24==(b[u>>0]|0)){c=v;d=t;e=u;do{c=c+-1|0;d=d+1|0;if(!c){c=s;q=41;break b}e=e+1|0}while((b[d>>0]|0)==(b[e>>0]|0))}}while(0);s=f[s>>2]|0;if(!s){c=0;q=41;break}}if((q|0)==41)return c|0;return 0}function nc(a,c){a=a|0;c=c|0;var d=0,e=0,g=0,i=0,j=0,k=0,l=0,m=0,n=0,o=0,p=0,q=0,r=0,s=0,t=0,u=0,v=0,w=0;r=b[c+11>>0]|0;m=r<<24>>24<0;u=m?f[c>>2]|0:c;r=m?f[c+4>>2]|0:r&255;if(r>>>0>3){c=u;g=r;d=r;while(1){m=X(h[c>>0]|h[c+1>>0]<<8|h[c+2>>0]<<16|h[c+3>>0]<<24,1540483477)|0;g=(X(m>>>24^m,1540483477)|0)^(X(g,1540483477)|0);d=d+-4|0;if(d>>>0<=3)break;else c=c+4|0}m=r+-4|0;d=m&-4;e=u+(d+4)|0;c=g;d=m-d|0}else{e=u;c=r;d=r}switch(d|0){case 3:{i=h[e+2>>0]<<16^c;q=6;break}case 2:{i=c;q=6;break}case 1:{j=c;q=7;break}default:k=c}if((q|0)==6){j=h[e+1>>0]<<8^i;q=7}if((q|0)==7)k=X(h[e>>0]^j,1540483477)|0;m=X(k>>>13^k,1540483477)|0;m=m>>>15^m;k=f[a+4>>2]|0;if(!k){w=0;return w|0}i=k+-1|0;d=(i&k|0)==0;if(!d)if(m>>>0>>0)l=m;else l=(m>>>0)%(k>>>0)|0;else l=m&i;c=f[(f[a>>2]|0)+(l<<2)>>2]|0;if(!c){w=0;return w|0}c=f[c>>2]|0;if(!c){w=0;return w|0}j=(r|0)==0;if(d){a:while(1){q=f[c+4>>2]|0;d=(q|0)==(m|0);if(!(d|(q&i|0)==(l|0))){c=0;q=41;break}do if(d?(n=c+8|0,o=b[n+11>>0]|0,p=o<<24>>24<0,o=o&255,((p?f[c+12>>2]|0:o)|0)==(r|0)):0){d=f[n>>2]|0;e=p?d:n;if(p){if(j){q=41;break a}if(!(ij(e,u,r)|0)){q=41;break a}else break}if(j){q=41;break a}if((d&255)<<24>>24==(b[u>>0]|0)){d=o;e=n;g=u;do{d=d+-1|0;e=e+1|0;if(!d){q=41;break a}g=g+1|0}while((b[e>>0]|0)==(b[g>>0]|0))}}while(0);c=f[c>>2]|0;if(!c){c=0;q=41;break}}if((q|0)==41)return c|0}else s=c;b:while(1){c=f[s+4>>2]|0;d=(c|0)==(m|0);if(!d){if(c>>>0>=k>>>0)c=(c>>>0)%(k>>>0)|0;if((c|0)!=(l|0)){c=0;q=41;break}if(d)q=33}else q=33;do if((q|0)==33?(q=0,t=s+8|0,v=b[t+11>>0]|0,w=v<<24>>24<0,v=v&255,((w?f[s+12>>2]|0:v)|0)==(r|0)):0){c=f[t>>2]|0;d=w?c:t;if(w){if(j){c=s;q=41;break b}if(!(ij(d,u,r)|0)){c=s;q=41;break b}else break}if(j){c=s;q=41;break b}if((c&255)<<24>>24==(b[u>>0]|0)){c=v;d=t;e=u;do{c=c+-1|0;d=d+1|0;if(!c){c=s;q=41;break b}e=e+1|0}while((b[d>>0]|0)==(b[e>>0]|0))}}while(0);s=f[s>>2]|0;if(!s){c=0;q=41;break}}if((q|0)==41)return c|0;return 0}function oc(a,c){a=a|0;c=c|0;var d=0,e=0,g=0,h=0,i=0,j=0,k=0,l=0,m=0,n=0,o=0,p=0,q=0,r=0,s=0;e=a+4|0;if(!c){d=f[a>>2]|0;f[a>>2]=0;if(d|0)No(d);f[e>>2]=0;return}if(c>>>0>1073741823){a=sa(8)|0;Km(a,17959);f[a>>2]=4748;wa(a|0,1128,100)}s=Rk(c<<2)|0;d=f[a>>2]|0;f[a>>2]=s;if(d|0)No(d);f[e>>2]=c;d=0;do{f[(f[a>>2]|0)+(d<<2)>>2]=0;d=d+1|0}while((d|0)!=(c|0));e=a+8|0;g=f[e>>2]|0;if(!g)return;d=f[g+4>>2]|0;r=c+-1|0;s=(r&c|0)==0;if(!s){if(d>>>0>=c>>>0)d=(d>>>0)%(c>>>0)|0}else d=d&r;f[(f[a>>2]|0)+(d<<2)>>2]=e;e=f[g>>2]|0;if(!e)return;else{h=g;i=e;e=g}a:while(1){q=h;g=i;p=e;b:while(1){e=g;while(1){g=f[e+4>>2]|0;if(!s){if(g>>>0>=c>>>0)g=(g>>>0)%(c>>>0)|0}else g=g&r;if((g|0)==(d|0))break;h=(f[a>>2]|0)+(g<<2)|0;if(!(f[h>>2]|0))break b;h=f[e>>2]|0;c:do if(!h)h=e;else{n=e+8|0;m=b[n+11>>0]|0;k=m<<24>>24<0;m=m&255;o=k?f[e+12>>2]|0:m;l=(o|0)==0;if(k){i=e;while(1){j=h+8|0;m=b[j+11>>0]|0;k=m<<24>>24<0;if((o|0)!=((k?f[h+12>>2]|0:m&255)|0)){h=i;break c}if(!l?ij(f[n>>2]|0,k?f[j>>2]|0:j,o)|0:0){h=i;break c}i=f[h>>2]|0;if(!i)break c;else{m=h;h=i;i=m}}}if(l){i=e;while(1){o=b[h+8+11>>0]|0;if((o<<24>>24<0?f[h+12>>2]|0:o&255)|0){h=i;break c}i=f[h>>2]|0;if(!i)break c;else{o=h;h=i;i=o}}}l=e;while(1){i=h+8|0;k=b[i+11>>0]|0;j=k<<24>>24<0;if((o|0)!=((j?f[h+12>>2]|0:k&255)|0)){h=l;break c}i=j?f[i>>2]|0:i;if((f[n>>2]&255)<<24>>24==(b[i>>0]|0)){j=m;k=n}else{h=l;break c}while(1){j=j+-1|0;k=k+1|0;if(!j)break;i=i+1|0;if((b[k>>0]|0)!=(b[i>>0]|0)){h=l;break c}}i=f[h>>2]|0;if(!i)break;else{l=h;h=i}}}while(0);f[p>>2]=f[h>>2];f[h>>2]=f[f[(f[a>>2]|0)+(g<<2)>>2]>>2];f[f[(f[a>>2]|0)+(g<<2)>>2]>>2]=e;e=f[q>>2]|0;if(!e){d=43;break a}}g=f[e>>2]|0;if(!g){d=43;break a}else{q=e;p=e}}f[h>>2]=p;i=f[e>>2]|0;if(!i){d=43;break}else{h=e;d=g}}if((d|0)==43)return}function pc(a,c,d,e,g){a=a|0;c=c|0;d=d|0;e=e|0;g=g|0;var h=0,i=0,j=0,k=0,l=0,m=0,n=0,o=0,p=0,q=0,r=0,s=0,t=0,u=0;o=a+4|0;t=f[c>>2]|0;c=t;do if((t|0)!=(o|0)){j=t+16|0;i=b[j+11>>0]|0;m=i<<24>>24<0;i=m?f[t+20>>2]|0:i&255;q=b[g+11>>0]|0;r=q<<24>>24<0;q=r?f[g+4>>2]|0:q&255;l=i>>>0>>0;h=l?i:q;if((h|0)!=0?(k=ij(r?f[g>>2]|0:g,m?f[j>>2]|0:j,h)|0,(k|0)!=0):0){if((k|0)<0)break}else u=4;if((u|0)==4?q>>>0>>0:0)break;h=q>>>0>>0?q:i;if((h|0)!=0?(n=ij(m?f[j>>2]|0:j,r?f[g>>2]|0:g,h)|0,(n|0)!=0):0){if((n|0)>=0)u=36}else u=20;if((u|0)==20?!l:0)u=36;if((u|0)==36){f[d>>2]=c;f[e>>2]=c;d=e;return d|0}m=t+4|0;h=f[m>>2]|0;if(!h){i=t+8|0;h=f[i>>2]|0;if((f[h>>2]|0)!=(t|0))do{p=f[i>>2]|0;i=p+8|0;h=f[i>>2]|0}while((f[h>>2]|0)!=(p|0))}else while(1){i=f[h>>2]|0;if(!i)break;else h=i}do if((h|0)!=(o|0)){j=h+16|0;k=b[j+11>>0]|0;l=k<<24>>24<0;k=l?f[h+20>>2]|0:k&255;i=k>>>0>>0?k:q;if((i|0)!=0?(s=ij(r?f[g>>2]|0:g,l?f[j>>2]|0:j,i)|0,(s|0)!=0):0){if((s|0)<0)break}else u=30;if((u|0)==30?q>>>0>>0:0)break;d=Ie(a,d,g)|0;return d|0}while(0);if(!(f[t+4>>2]|0)){f[d>>2]=c;d=m;return d|0}else{f[d>>2]=h;d=h;return d|0}}while(0);e=f[t>>2]|0;do if((t|0)!=(f[a>>2]|0)){if(!e){h=t;while(1){c=f[h+8>>2]|0;if((f[c>>2]|0)==(h|0))h=c;else{h=c;break}}}else{h=e;while(1){c=f[h+4>>2]|0;if(!c)break;else h=c}}c=h;j=h+16|0;k=b[g+11>>0]|0;l=k<<24>>24<0;k=l?f[g+4>>2]|0:k&255;i=b[j+11>>0]|0;m=i<<24>>24<0;i=m?f[h+20>>2]|0:i&255;h=k>>>0>>0?k:i;if((h|0)!=0?(p=ij(m?f[j>>2]|0:j,l?f[g>>2]|0:g,h)|0,(p|0)!=0):0){if((p|0)<0)break}else u=12;if((u|0)==12?i>>>0>>0:0)break;d=Ie(a,d,g)|0;return d|0}while(0);if(!e){f[d>>2]=t;d=t;return d|0}else{u=c;f[d>>2]=u;d=u+4|0;return d|0}return 0}function qc(a,c,d){a=a|0;c=c|0;d=d|0;var e=0,g=0,h=0,i=0,j=0,k=0,l=0,m=0,n=0,o=0,p=0,q=0,r=0,s=0,t=0;r=Na[f[(f[a>>2]|0)+44>>2]&127](a)|0;if((r|0)<1){c=0;return c|0}m=(f[c+4>>2]|0)-(f[c>>2]|0)>>2;s=X(m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p;e=Hl(f[e>>2]|0,f[e+4>>2]|0,k|0,0)|0;g=I;t=p;f[t>>2]=e;f[t+4>>2]=g}j=j+1|0;if((j|0)==(s|0)){i=18;break a}h=o;i=f[h+4>>2]|0;h=f[h>>2]|0}}}else if(mh(s,r,d,q)|0)i=18;else{t=0;return t|0}while(0);do if((i|0)==18)if(!s)i=19;else{g=a+20|0;e=f[g>>2]|0;if(e|0?Na[f[(f[e>>2]|0)+32>>2]&127](e)|0:0){h=1;break}ck(q,s,q);h=1}while(0);if((i|0)==19){g=a+20|0;h=0}e=f[g>>2]|0;if(e|0){if(!(Oa[f[(f[e>>2]|0)+40>>2]&127](e,d)|0)){t=0;return t|0}if(h?(t=f[g>>2]|0,!(Qa[f[(f[t>>2]|0)+44>>2]&31](t,q,q,s,r,f[c>>2]|0)|0)):0){t=0;return t|0}}t=1;return t|0}function rc(a,c,d,e){a=a|0;c=c|0;d=d|0;e=e|0;var g=0,i=0,j=0,k=0,l=0,m=0,n=0,o=0,p=0,q=0,r=0,s=0,t=0,v=0,w=0,x=0,y=0,z=0,A=0,B=0,C=0,D=0,E=0,F=0;F=u;u=u+64|0;E=F;g=E;i=g+40|0;do{f[g>>2]=0;g=g+4|0}while((g|0)<(i|0));a:do if(Gc(E,d)|0?dd(E,d)|0:0){g=(a|0)==0;b:do if(!g){if(!(f[E+12>>2]|0)){k=0;break a}bf(d,0,0)|0;if(!g){z=E+44|0;C=E+48|0;y=E+40|0;s=E+16|0;t=E+28|0;A=(c|0)>0;D=d+36|0;x=d+32|0;v=d+24|0;w=d+28|0;i=f[C>>2]|0;B=0;g=0;while(1){c:do if(i>>>0<16384){j=f[z>>2]|0;do{if((j|0)<=0)break c;r=f[y>>2]|0;j=j+-1|0;f[z>>2]=j;i=h[r+j>>0]|i<<8;f[C>>2]=i}while(i>>>0<16384)}while(0);p=i&4095;r=f[(f[s>>2]|0)+(p<<2)>>2]|0;q=f[t>>2]|0;i=(X(f[q+(r<<3)>>2]|0,i>>>12)|0)+p-(f[q+(r<<3)+4>>2]|0)|0;f[C>>2]=i;if(A){p=(r|0)>0;if((r|0)<=-1){g=22;break}if((r|0)<33){q=0;o=g}else{g=21;break}while(1){if(!(b[D>>0]|0)){k=0;break a}if(p){l=f[v>>2]|0;m=f[w>>2]|0;k=f[x>>2]|0;n=0;j=0;do{g=l+(k>>>3)|0;if(g>>>0>>0){g=(h[g>>0]|0)>>>(k&7)&1;k=k+1|0;f[x>>2]=k}else g=0;j=g<>2]=j;q=q+1|0;if((q|0)>=(c|0))break;else o=g}}B=B+c|0;if(B>>>0>=a>>>0)break b}if((g|0)==21){if(!(b[D>>0]|0)){k=0;break a}ra(16587,16492,156,16579)}else if((g|0)==22){if(!(b[D>>0]|0)){k=0;break a}ra(16477,16492,155,16579)}}}else bf(d,0,0)|0;while(0);Pj(d);k=1}else k=0;while(0);g=f[E+28>>2]|0;if(g|0){j=E+32|0;i=f[j>>2]|0;if((i|0)!=(g|0))f[j>>2]=i+(~((i+-8-g|0)>>>3)<<3);No(g)}g=f[E+16>>2]|0;if(g|0){j=E+20|0;i=f[j>>2]|0;if((i|0)!=(g|0))f[j>>2]=i+(~((i+-4-g|0)>>>2)<<2);No(g)}j=f[E>>2]|0;if(!j){u=F;return k|0}i=E+4|0;g=f[i>>2]|0;if((g|0)!=(j|0))f[i>>2]=g+(~((g+-4-j|0)>>>2)<<2);No(j);u=F;return k|0}function sc(a,c){a=a|0;c=c|0;var d=0,e=0,g=0,h=0,i=0,j=0,k=0,l=0,m=0;e=f[a>>2]|0;i=a+4|0;d=f[i>>2]|0;h=c+4|0;if((d|0)==(e|0)){g=h;d=a;j=f[h>>2]|0;h=e;f[d>>2]=j;f[g>>2]=h;h=c+8|0;e=f[i>>2]|0;d=f[h>>2]|0;f[i>>2]=d;f[h>>2]=e;h=a+8|0;a=c+12|0;i=f[h>>2]|0;e=f[a>>2]|0;f[h>>2]=e;f[a>>2]=i;a=f[g>>2]|0;f[c>>2]=a;return}g=f[h>>2]|0;do{l=d;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0;f[m>>2]=f[j>>2];m=l+-20|0;f[g+-20>>2]=f[m>>2];f[m>>2]=0;f[j>>2]=0;f[k>>2]=0;f[g+-16>>2]=f[l+-16>>2];k=g+-12|0;j=l+-12|0;f[k>>2]=0;m=g+-8|0;f[m>>2]=0;f[g+-4>>2]=0;f[k>>2]=f[j>>2];k=l+-8|0;f[m>>2]=f[k>>2];l=l+-4|0;f[g+-4>>2]=f[l>>2];f[l>>2]=0;f[k>>2]=0;f[j>>2]=0;g=(f[h>>2]|0)+-116|0;f[h>>2]=g}while((d|0)!=(e|0));m=h;l=a;k=g;j=f[a>>2]|0;f[l>>2]=k;f[m>>2]=j;j=c+8|0;l=f[i>>2]|0;k=f[j>>2]|0;f[i>>2]=k;f[j>>2]=l;j=a+8|0;l=c+12|0;k=f[j>>2]|0;a=f[l>>2]|0;f[j>>2]=a;f[l>>2]=k;m=f[m>>2]|0;f[c>>2]=m;return}function tc(a,b){a=a|0;b=b|0;var c=0,d=0,e=0,g=0,h=0,i=0,j=0,k=0,l=0,m=0,n=0,o=0,p=0,q=0;q=u;u=u+48|0;i=q+32|0;h=q+28|0;o=q+16|0;p=q;j=a+16|0;d=f[j>>2]|0;if(d|0){g=f[b>>2]|0;c=j;a:while(1){e=d;while(1){if((f[e+16>>2]|0)>=(g|0))break;d=f[e+4>>2]|0;if(!d)break a;else e=d}d=f[e>>2]|0;if(!d){c=e;break}else c=e}if((c|0)!=(j|0)?(g|0)>=(f[c+16>>2]|0):0){p=c;p=p+20|0;u=q;return p|0}}rn(o);f[p>>2]=f[b>>2];l=p+4|0;f[p+8>>2]=0;k=p+12|0;f[k>>2]=0;m=p+8|0;f[l>>2]=m;c=f[o>>2]|0;n=o+4|0;if((c|0)!=(n|0)){g=m;do{d=c+16|0;f[h>>2]=g;f[i>>2]=f[h>>2];of(l,i,d,d)|0;d=f[c+4>>2]|0;if(!d){d=c+8|0;e=f[d>>2]|0;if((f[e>>2]|0)==(c|0))c=e;else do{b=f[d>>2]|0;d=b+8|0;c=f[d>>2]|0}while((f[c>>2]|0)!=(b|0))}else{c=d;while(1){d=f[c>>2]|0;if(!d)break;else c=d}}}while((c|0)!=(n|0))}i=a+12|0;c=f[j>>2]|0;do if(c){g=f[p>>2]|0;e=a+16|0;while(1){d=f[c+16>>2]|0;if((g|0)<(d|0)){d=f[c>>2]|0;if(!d){d=23;break}else e=c}else{if((d|0)>=(g|0)){d=27;break}e=c+4|0;d=f[e>>2]|0;if(!d){d=26;break}}c=d}if((d|0)==23){h=c;e=c;break}else if((d|0)==26){h=c;break}else if((d|0)==27){h=c;break}}else{h=j;e=j}while(0);c=f[e>>2]|0;if(!c){c=Rk(32)|0;f[c+16>>2]=f[p>>2];b=c+20|0;f[b>>2]=f[l>>2];g=c+24|0;d=f[p+8>>2]|0;f[g>>2]=d;j=f[k>>2]|0;f[c+28>>2]=j;if(!j)f[b>>2]=g;else{f[d+8>>2]=g;f[l>>2]=m;f[m>>2]=0;f[k>>2]=0}f[c>>2]=0;f[c+4>>2]=0;f[c+8>>2]=h;f[e>>2]=c;d=f[f[i>>2]>>2]|0;if(!d)d=c;else{f[i>>2]=d;d=f[e>>2]|0}qd(f[a+16>>2]|0,d);a=a+20|0;f[a>>2]=(f[a>>2]|0)+1}zh(p+4|0,f[m>>2]|0);zh(o,f[n>>2]|0);p=c;p=p+20|0;u=q;return p|0}function uc(a,b,c){a=a|0;b=b|0;c=c|0;var d=0,e=0,g=0,h=0,i=0,j=0,k=0,l=0,m=0,n=0,o=0,p=0,q=0,r=0,s=0,t=0,v=0,w=0,x=0,y=0;y=u;u=u+16|0;r=y+12|0;s=y+4|0;p=y+8|0;q=y;x=a+8+(b*12|0)|0;d=f[x>>2]|0;t=a+8+(b*12|0)+4|0;e=f[t>>2]|0;if((e|0)!=(d|0))f[t>>2]=e+(~((e+-4-d|0)>>>2)<<2);d=f[c>>2]|0;m=a+4|0;f[s>>2]=(d|0)<0?-1073741824:(d>>>0)/3|0;w=a+56|0;l=a+8+(b*12|0)+8|0;e=d;o=0;do{n=(o|0)==1;if(n){g=(d|0)<0;do if(!g)if(!((d>>>0)%3|0)){e=d+2|0;break}else{e=d+-1|0;break}else e=d;while(0);f[p>>2]=e;f[r>>2]=f[p>>2];if((Ud(a,r)|0)<0)break;e=d+1|0;if(g){v=12;break}e=((e|0)%3|0|0)==0?d+-2|0:e;f[c>>2]=e;g=e+1|0;if((e|0)<0){v=16;break}e=((g|0)%3|0|0)==0?e+-2|0:g;if((e|0)<0){v=16;break}e=f[(f[(f[m>>2]|0)+12>>2]|0)+(e<<2)>>2]|0;g=e+1|0;if((e|0)<0){v=16;break}e=((g|0)%3|0|0)==0?e+-2|0:g;f[c>>2]=e;if((e|0)<0)break;else{g=0;v=18}}else{i=f[s>>2]|0;k=e;j=0}while(1){if((v|0)==18){v=0;i=(e>>>0)/3|0;f[s>>2]=i;k=e;j=g}h=(f[w>>2]|0)+(i>>>5<<2)|0;g=1<<(i&31);e=f[h>>2]|0;if(g&e|0){e=k;g=j;break}f[h>>2]=e|g;e=f[t>>2]|0;if((e|0)==(f[l>>2]|0))Og(x,s);else{f[e>>2]=f[s>>2];f[t>>2]=e+4}g=j+1|0;if((j|0)>0){do if(!(g&1)){d=n?k:d;if((k|0)>=0)if(!((k>>>0)%3|0)){e=k+2|0;break}else{e=k+-1|0;break}else e=k}else{e=k+1|0;if((k|0)<0)e=k;else e=((e|0)%3|0|0)==0?k+-2|0:e}while(0);f[c>>2]=e}else e=k;f[q>>2]=e;f[r>>2]=f[q>>2];e=Ud(a,r)|0;f[c>>2]=e;if((e|0)<0)break;else v=18}if(!((g&1|0)==0|n^1)){n=f[t>>2]|0;j=f[n+-4>>2]|0;k=(f[w>>2]|0)+(j>>>5<<2)|0;f[k>>2]=f[k>>2]&~(1<<(j&31));f[t>>2]=n+-4}o=o+1|0}while((o|0)<2);if((v|0)==12){f[c>>2]=d;e=d;v=16}if((v|0)==16)f[c>>2]=e;f[a+44+(b<<2)>>2]=d;e=f[t>>2]|0;d=f[x>>2]|0;h=d;if((e|0)==(d|0)){u=y;return}g=f[w>>2]|0;e=e-d>>2;d=0;do{w=f[h+(d<<2)>>2]|0;x=g+(w>>>5<<2)|0;f[x>>2]=f[x>>2]&~(1<<(w&31));d=d+1|0}while(d>>>0>>0);u=y;return}function vc(a,b,c,d,e){a=a|0;b=b|0;c=c|0;d=d|0;e=e|0;var g=0,h=0,i=0,j=0,k=0,l=0,m=0,n=0,o=0,p=0;l=a;j=b;k=j;h=c;n=d;i=n;if(!k){g=(e|0)!=0;if(!i){if(g){f[e>>2]=(l>>>0)%(h>>>0);f[e+4>>2]=0}n=0;e=(l>>>0)/(h>>>0)>>>0;return (I=n,e)|0}else{if(!g){n=0;e=0;return (I=n,e)|0}f[e>>2]=a|0;f[e+4>>2]=b&0;n=0;e=0;return (I=n,e)|0}}g=(i|0)==0;do if(h){if(!g){g=(_(i|0)|0)-(_(k|0)|0)|0;if(g>>>0<=31){m=g+1|0;i=31-g|0;b=g-31>>31;h=m;a=l>>>(m>>>0)&b|k<>>(m>>>0)&b;g=0;i=l<>2]=a|0;f[e+4>>2]=j|b&0;n=0;e=0;return (I=n,e)|0}g=h-1|0;if(g&h|0){i=(_(h|0)|0)+33-(_(k|0)|0)|0;p=64-i|0;m=32-i|0;j=m>>31;o=i-32|0;b=o>>31;h=i;a=m-1>>31&k>>>(o>>>0)|(k<>>(i>>>0))&b;b=b&k>>>(i>>>0);g=l<>>(o>>>0))&j|l<>31;break}if(e|0){f[e>>2]=g&l;f[e+4>>2]=0}if((h|0)==1){o=j|b&0;p=a|0|0;return (I=o,p)|0}else{p=gk(h|0)|0;o=k>>>(p>>>0)|0;p=k<<32-p|l>>>(p>>>0)|0;return (I=o,p)|0}}else{if(g){if(e|0){f[e>>2]=(k>>>0)%(h>>>0);f[e+4>>2]=0}o=0;p=(k>>>0)/(h>>>0)>>>0;return (I=o,p)|0}if(!l){if(e|0){f[e>>2]=0;f[e+4>>2]=(k>>>0)%(i>>>0)}o=0;p=(k>>>0)/(i>>>0)>>>0;return (I=o,p)|0}g=i-1|0;if(!(g&i)){if(e|0){f[e>>2]=a|0;f[e+4>>2]=g&k|b&0}o=0;p=k>>>((gk(i|0)|0)>>>0);return (I=o,p)|0}g=(_(i|0)|0)-(_(k|0)|0)|0;if(g>>>0<=30){b=g+1|0;i=31-g|0;h=b;a=k<>>(b>>>0);b=k>>>(b>>>0);g=0;i=l<>2]=a|0;f[e+4>>2]=j|b&0;o=0;p=0;return (I=o,p)|0}while(0);if(!h){k=i;j=0;i=0}else{m=c|0|0;l=n|d&0;k=Hl(m|0,l|0,-1,-1)|0;c=I;j=i;i=0;do{d=j;j=g>>>31|j<<1;g=i|g<<1;d=a<<1|d>>>31|0;n=a>>>31|b<<1|0;jm(k|0,c|0,d|0,n|0)|0;p=I;o=p>>31|((p|0)<0?-1:0)<<1;i=o&1;a=jm(d|0,n|0,o&m|0,(((p|0)<0?-1:0)>>31|((p|0)<0?-1:0)<<1)&l|0)|0;b=I;h=h-1|0}while((h|0)!=0);k=j;j=0}h=0;if(e|0){f[e>>2]=a;f[e+4>>2]=b}o=(g|0)>>>31|(k|h)<<1|(h<<1|g>>>31)&0|j;p=(g<<1|0>>>31)&-2|i;return (I=o,p)|0}function wc(a,b,c){a=a|0;b=b|0;c=c|0;var d=0,e=0,g=0,h=0,i=0,j=0,k=0,l=0,m=0,n=0,o=0,p=0,q=0,r=0,s=0,t=0,v=0,w=0,x=0,y=0,z=0,A=0,B=0,C=0,D=0;D=u;u=u+16|0;B=D+8|0;z=D;A=D+4|0;if(!(qh(a,b)|0)){a=0;u=D;return a|0}C=b+96|0;o=b+100|0;d=f[o>>2]|0;b=f[C>>2]|0;if((d-b|0)<=0){a=1;u=D;return a|0}n=a+56|0;v=a+8|0;r=a+12|0;s=a+20|0;p=a+24|0;t=a+32|0;q=a+36|0;x=a+68|0;y=a+76|0;w=a+72|0;m=0;while(1){if(!(f[(f[n>>2]|0)+(m>>>5<<2)>>2]&1<<(m&31))){i=m*3|0;f[z>>2]=i;f[B>>2]=f[z>>2];uc(a,0,B);l=(f[r>>2]|0)-(f[v>>2]|0)>>2;f[z>>2]=i+1;f[B>>2]=f[z>>2];uc(a,1,B);j=(f[p>>2]|0)-(f[s>>2]|0)>>2;k=j>>>0>l>>>0;f[z>>2]=i+2;f[B>>2]=f[z>>2];uc(a,2,B);l=(f[q>>2]|0)-(f[t>>2]|0)>>2>>>0>(k?j:l)>>>0?2:k?1:((l|0)==0)<<31>>31;if((f[x>>2]|0)>0){d=f[y>>2]|0;f[B>>2]=d;k=f[c>>2]|0;i=k+4|0;e=f[i>>2]|0;j=k+8|0;b=k;if(e>>>0<(f[j>>2]|0)>>>0){f[e>>2]=d;f[i>>2]=e+4}else Og(k,B);h=f[a+44+(l<<2)>>2]|0;d=f[a>>2]|0;if((h|0)==-1073741824)e=-1073741824;else{g=(h|0)/3|0;if((h|0)<=-3){d=12;break}e=f[d+96>>2]|0;if((g|0)>=(((f[d+100>>2]|0)-e|0)/12|0|0)){d=14;break}e=f[e+(g*12|0)+(((h|0)%3|0)<<2)>>2]|0}f[B>>2]=e;d=f[i>>2]|0;if(d>>>0<(f[j>>2]|0)>>>0){f[d>>2]=e;f[i>>2]=d+4}else Og(k,B);h=(f[w>>2]|0)+2|0;f[w>>2]=h;if(h&1){f[B>>2]=e;d=f[i>>2]|0;if(d>>>0<(f[j>>2]|0)>>>0){f[d>>2]=e;f[i>>2]=d+4}else Og(k,B);f[w>>2]=(f[w>>2]|0)+1}}else b=f[c>>2]|0;f[A>>2]=b;f[B>>2]=f[A>>2];fc(a,l,B);b=f[C>>2]|0;d=f[o>>2]|0}m=m+1|0;if((m|0)>=((d-b|0)/12|0|0)){b=1;d=26;break}}if((d|0)==12)ra(17073,17098,63,17175);else if((d|0)==14)ra(17180,17098,64,17175);else if((d|0)==26){u=D;return b|0}return 0}function xc(a,c,d){a=a|0;c=c|0;d=d|0;var e=0,g=0,h=0,i=0,j=0,k=0,l=0,m=0,n=0,o=0,p=0,q=0,r=0,s=0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)No(c);c=f[p>>2]|0;if(c|0){e=f[r>>2]|0;if((e|0)!=(c|0))f[r>>2]=e+(~((e+-4-c|0)>>>2)<<2);No(c)}f[q>>2]=3196;c=f[s+24>>2]|0;if(c|0)No(c);c=f[s+12>>2]|0;if(!c){u=t;return}No(c);u=t;return}function yc(a,b){a=a|0;b=b|0;var c=0,d=0,e=0,g=0,h=0,i=0,j=0,k=0,l=0,m=0;d=a+4|0;if(!b){c=f[a>>2]|0;f[a>>2]=0;if(c|0)No(c);f[d>>2]=0;return}if(b>>>0>1073741823){a=sa(8)|0;Km(a,17959);f[a>>2]=4748;wa(a|0,1128,100)}m=Rk(b<<2)|0;c=f[a>>2]|0;f[a>>2]=m;if(c|0)No(c);f[d>>2]=b;c=0;do{f[(f[a>>2]|0)+(c<<2)>>2]=0;c=c+1|0}while((c|0)!=(b|0));d=a+8|0;g=f[d>>2]|0;if(!g)return;c=f[g+4>>2]|0;l=b+-1|0;m=(l&b|0)==0;if(!m){if(c>>>0>=b>>>0)c=(c>>>0)%(b>>>0)|0}else c=c&l;f[(f[a>>2]|0)+(c<<2)>>2]=d;d=f[g>>2]|0;if(!d)return;else{i=g;e=d;h=g}a:while(1){b:do if(m){k=i;while(1){d=e;while(1){j=f[d+4>>2]&l;if((j|0)==(c|0))break;g=(f[a>>2]|0)+(j<<2)|0;if(!(f[g>>2]|0)){c=j;break b}i=d+8|0;g=d;while(1){e=f[g>>2]|0;if(!e)break;if((f[i>>2]|0)==(f[e+8>>2]|0))g=e;else break}f[h>>2]=e;f[g>>2]=f[f[(f[a>>2]|0)+(j<<2)>>2]>>2];f[f[(f[a>>2]|0)+(j<<2)>>2]>>2]=d;d=f[k>>2]|0;if(!d){c=37;break a}}e=f[d>>2]|0;if(!e){c=37;break a}else{k=d;h=d}}}else{k=i;j=h;while(1){d=e;while(1){e=f[d+4>>2]|0;if(e>>>0>=b>>>0)e=(e>>>0)%(b>>>0)|0;if((e|0)==(c|0))break;g=(f[a>>2]|0)+(e<<2)|0;if(!(f[g>>2]|0)){h=j;c=e;break b}i=d+8|0;h=d;while(1){g=f[h>>2]|0;if(!g)break;if((f[i>>2]|0)==(f[g+8>>2]|0))h=g;else break}f[j>>2]=g;f[h>>2]=f[f[(f[a>>2]|0)+(e<<2)>>2]>>2];f[f[(f[a>>2]|0)+(e<<2)>>2]>>2]=d;d=f[k>>2]|0;if(!d){c=37;break a}}e=f[d>>2]|0;if(!e){c=37;break a}else{k=d;j=d}}}while(0);f[g>>2]=h;e=f[d>>2]|0;if(!e){c=37;break}else{i=d;h=d}}if((c|0)==37)return}function zc(a,c){a=a|0;c=c|0;var d=0,e=0,g=0,h=0,i=0,j=0,k=0,l=0,m=0,o=0,p=0,q=0,r=0,s=0,t=0,v=0,w=0,x=0,y=0;w=u;u=u+32|0;e=w+24|0;r=w+20|0;v=w+8|0;t=w+4|0;o=w;f[e>>2]=0;Eh(e,f[a>>2]|0)|0;a:do if(f[e>>2]|0){d=0;while(1){d=d+1|0;if(!(Oc(a,c)|0)){d=0;break}if(d>>>0>=(f[e>>2]|0)>>>0)break a}u=w;return d|0}while(0);f[r>>2]=0;Eh(r,f[a>>2]|0)|0;b:do if(!(f[r>>2]|0))d=1;else{i=v+11|0;j=0;while(1){f[v>>2]=0;f[v+4>>2]=0;f[v+8>>2]=0;g=f[a>>2]|0;x=g+8|0;y=f[x+4>>2]|0;h=g+16|0;e=h;d=f[e>>2]|0;e=f[e+4>>2]|0;if((y|0)>(e|0)|((y|0)==(e|0)?(f[x>>2]|0)>>>0>d>>>0:0)?(m=b[(f[g>>2]|0)+d>>0]|0,k=Hl(d|0,e|0,1,0)|0,q=h,f[q>>2]=k,f[q+4>>2]=I,q=m&255,Hh(v,q,0),k=f[a>>2]|0,p=Dj(v,0)|0,g=k+8|0,x=f[g>>2]|0,g=f[g+4>>2]|0,s=k+16|0,y=s,l=f[y>>2]|0,m=m&255,y=Hl(l|0,f[y+4>>2]|0,m|0,0)|0,h=I,!((g|0)<(h|0)|(g|0)==(h|0)&x>>>0>>0)):0){ef(p|0,(f[k>>2]|0)+l|0,q|0)|0;x=s;x=Hl(f[x>>2]|0,f[x+4>>2]|0,m|0,0)|0;y=s;f[y>>2]=x;f[y+4>>2]=I;y=Rk(40)|0;f[y>>2]=0;f[y+4>>2]=0;f[y+8>>2]=0;f[y+12>>2]=0;n[y+16>>2]=$(1.0);x=y+20|0;f[x>>2]=0;f[x+4>>2]=0;f[x+8>>2]=0;f[x+12>>2]=0;n[y+36>>2]=$(1.0);f[t>>2]=y;if(zc(a,y)|0){d=f[t>>2]|0;f[t>>2]=0;f[o>>2]=d;Je(c,v,o)|0;Ig(o);d=0}else d=1;Ig(t)}else d=1;if((b[i>>0]|0)<0)No(f[v>>2]|0);j=j+1|0;if(d|0){d=0;break b}if(j>>>0>=(f[r>>2]|0)>>>0){d=1;break}}}while(0);y=d;u=w;return y|0}function Ac(a,c){a=a|0;c=c|0;var e=0,g=0,i=0,j=0,k=0,l=0,m=0,n=0,o=0,p=0,q=0,r=0,s=0,t=0;e=d[c+38>>1]|0;if(!(e<<16>>16)){a=0;return a|0}t=a+12|0;do if((e&65535)<512){o=c+8|0;q=f[o>>2]|0;o=f[o+4>>2]|0;g=c+16|0;r=g;e=f[r>>2]|0;r=Hl(e|0,f[r+4>>2]|0,4,0)|0;p=I;if((o|0)<(p|0)|(o|0)==(p|0)&q>>>0>>0){a=0;return a|0}else{e=(f[c>>2]|0)+e|0;e=h[e>>0]|h[e+1>>0]<<8|h[e+2>>0]<<16|h[e+3>>0]<<24;b[t>>0]=e;b[t+1>>0]=e>>8;b[t+2>>0]=e>>16;b[t+3>>0]=e>>24;q=g;q=Hl(f[q>>2]|0,f[q+4>>2]|0,4,0)|0;r=g;f[r>>2]=q;f[r+4>>2]=I;break}}else if(Eh(t,c)|0){e=f[t>>2]|0;break}else{a=0;return a|0}while(0);j=a+4|0;i=f[j>>2]|0;g=f[a>>2]|0;k=i-g>>2;if(e>>>0<=k>>>0){if(e>>>0>>0?(l=g+(e<<2)|0,(i|0)!=(l|0)):0)f[j>>2]=i+(~((i+-4-l|0)>>>2)<<2)}else{vg(a,e-k|0);e=f[t>>2]|0}if(!e){a=1;return a|0}q=c+8|0;r=c+16|0;p=0;a:while(1){n=q;m=f[n>>2]|0;n=f[n+4>>2]|0;i=r;g=f[i>>2]|0;i=f[i+4>>2]|0;if(!((n|0)>(i|0)|(n|0)==(i|0)&m>>>0>g>>>0)){e=0;s=23;break}o=f[c>>2]|0;j=b[o+g>>0]|0;i=Hl(g|0,i|0,1,0)|0;g=I;k=r;f[k>>2]=i;f[k+4>>2]=g;k=j&255;l=k&3;k=k>>>2;switch(j&3){case 3:{g=k+p|0;if(g>>>0>=e>>>0){e=0;s=23;break a}kh((f[a>>2]|0)+(p<<2)|0,0,(k<<2)+4|0)|0;e=g;break}case 0:{e=k;s=20;break}default:{j=0;e=k;while(1){if(!((n|0)>(g|0)|(n|0)==(g|0)&m>>>0>i>>>0)){e=0;s=23;break a}s=b[o+i>>0]|0;i=Hl(i|0,g|0,1,0)|0;g=I;k=r;f[k>>2]=i;f[k+4>>2]=g;e=(s&255)<<(j<<3|6)|e;j=j+1|0;if((j|0)>=(l|0)){s=20;break}}}}if((s|0)==20){s=0;f[(f[a>>2]|0)+(p<<2)>>2]=e;e=p}p=e+1|0;e=f[t>>2]|0;if(p>>>0>=e>>>0){s=22;break}}if((s|0)==22){a=Bf(a+16|0,f[a>>2]|0,e)|0;return a|0}else if((s|0)==23)return e|0;return 0}function Bc(a,c){a=a|0;c=c|0;var e=0,g=0,i=0,j=0,k=0,l=0,m=0,n=0,o=0,p=0,q=0,r=0,s=0,t=0;e=d[c+38>>1]|0;if(!(e<<16>>16)){a=0;return a|0}t=a+12|0;do if((e&65535)<512){o=c+8|0;q=f[o>>2]|0;o=f[o+4>>2]|0;g=c+16|0;r=g;e=f[r>>2]|0;r=Hl(e|0,f[r+4>>2]|0,4,0)|0;p=I;if((o|0)<(p|0)|(o|0)==(p|0)&q>>>0>>0){a=0;return a|0}else{e=(f[c>>2]|0)+e|0;e=h[e>>0]|h[e+1>>0]<<8|h[e+2>>0]<<16|h[e+3>>0]<<24;b[t>>0]=e;b[t+1>>0]=e>>8;b[t+2>>0]=e>>16;b[t+3>>0]=e>>24;q=g;q=Hl(f[q>>2]|0,f[q+4>>2]|0,4,0)|0;r=g;f[r>>2]=q;f[r+4>>2]=I;break}}else if(Eh(t,c)|0){e=f[t>>2]|0;break}else{a=0;return a|0}while(0);j=a+4|0;i=f[j>>2]|0;g=f[a>>2]|0;k=i-g>>2;if(e>>>0<=k>>>0){if(e>>>0>>0?(l=g+(e<<2)|0,(i|0)!=(l|0)):0)f[j>>2]=i+(~((i+-4-l|0)>>>2)<<2)}else{vg(a,e-k|0);e=f[t>>2]|0}if(!e){a=1;return a|0}q=c+8|0;r=c+16|0;p=0;a:while(1){n=q;m=f[n>>2]|0;n=f[n+4>>2]|0;i=r;g=f[i>>2]|0;i=f[i+4>>2]|0;if(!((n|0)>(i|0)|(n|0)==(i|0)&m>>>0>g>>>0)){e=0;s=23;break}o=f[c>>2]|0;j=b[o+g>>0]|0;i=Hl(g|0,i|0,1,0)|0;g=I;k=r;f[k>>2]=i;f[k+4>>2]=g;k=j&255;l=k&3;k=k>>>2;switch(j&3){case 3:{g=k+p|0;if(g>>>0>=e>>>0){e=0;s=23;break a}kh((f[a>>2]|0)+(p<<2)|0,0,(k<<2)+4|0)|0;e=g;break}case 0:{e=k;s=20;break}default:{j=0;e=k;while(1){if(!((n|0)>(g|0)|(n|0)==(g|0)&m>>>0>i>>>0)){e=0;s=23;break a}s=b[o+i>>0]|0;i=Hl(i|0,g|0,1,0)|0;g=I;k=r;f[k>>2]=i;f[k+4>>2]=g;e=(s&255)<<(j<<3|6)|e;j=j+1|0;if((j|0)>=(l|0)){s=20;break}}}}if((s|0)==20){s=0;f[(f[a>>2]|0)+(p<<2)>>2]=e;e=p}p=e+1|0;e=f[t>>2]|0;if(p>>>0>=e>>>0){s=22;break}}if((s|0)==22){a=Df(a+16|0,f[a>>2]|0,e)|0;return a|0}else if((s|0)==23)return e|0;return 0}function Cc(a,c){a=a|0;c=c|0;var e=0,g=0,i=0,j=0,k=0,l=0,m=0,n=0,o=0,p=0,q=0,r=0,s=0,t=0;e=d[c+38>>1]|0;if(!(e<<16>>16)){a=0;return a|0}t=a+12|0;do if((e&65535)<512){o=c+8|0;q=f[o>>2]|0;o=f[o+4>>2]|0;g=c+16|0;r=g;e=f[r>>2]|0;r=Hl(e|0,f[r+4>>2]|0,4,0)|0;p=I;if((o|0)<(p|0)|(o|0)==(p|0)&q>>>0>>0){a=0;return a|0}else{e=(f[c>>2]|0)+e|0;e=h[e>>0]|h[e+1>>0]<<8|h[e+2>>0]<<16|h[e+3>>0]<<24;b[t>>0]=e;b[t+1>>0]=e>>8;b[t+2>>0]=e>>16;b[t+3>>0]=e>>24;q=g;q=Hl(f[q>>2]|0,f[q+4>>2]|0,4,0)|0;r=g;f[r>>2]=q;f[r+4>>2]=I;break}}else if(Eh(t,c)|0){e=f[t>>2]|0;break}else{a=0;return a|0}while(0);j=a+4|0;i=f[j>>2]|0;g=f[a>>2]|0;k=i-g>>2;if(e>>>0<=k>>>0){if(e>>>0>>0?(l=g+(e<<2)|0,(i|0)!=(l|0)):0)f[j>>2]=i+(~((i+-4-l|0)>>>2)<<2)}else{vg(a,e-k|0);e=f[t>>2]|0}if(!e){a=1;return a|0}q=c+8|0;r=c+16|0;p=0;a:while(1){n=q;m=f[n>>2]|0;n=f[n+4>>2]|0;i=r;g=f[i>>2]|0;i=f[i+4>>2]|0;if(!((n|0)>(i|0)|(n|0)==(i|0)&m>>>0>g>>>0)){e=0;s=23;break}o=f[c>>2]|0;j=b[o+g>>0]|0;i=Hl(g|0,i|0,1,0)|0;g=I;k=r;f[k>>2]=i;f[k+4>>2]=g;k=j&255;l=k&3;k=k>>>2;switch(j&3){case 3:{g=k+p|0;if(g>>>0>=e>>>0){e=0;s=23;break a}kh((f[a>>2]|0)+(p<<2)|0,0,(k<<2)+4|0)|0;e=g;break}case 0:{e=k;s=20;break}default:{j=0;e=k;while(1){if(!((n|0)>(g|0)|(n|0)==(g|0)&m>>>0>i>>>0)){e=0;s=23;break a}s=b[o+i>>0]|0;i=Hl(i|0,g|0,1,0)|0;g=I;k=r;f[k>>2]=i;f[k+4>>2]=g;e=(s&255)<<(j<<3|6)|e;j=j+1|0;if((j|0)>=(l|0)){s=20;break}}}}if((s|0)==20){s=0;f[(f[a>>2]|0)+(p<<2)>>2]=e;e=p}p=e+1|0;e=f[t>>2]|0;if(p>>>0>=e>>>0){s=22;break}}if((s|0)==22){a=Ef(a+16|0,f[a>>2]|0,e)|0;return a|0}else if((s|0)==23)return e|0;return 0}function Dc(a,c){a=a|0;c=c|0;var e=0,g=0,i=0,j=0,k=0,l=0,m=0,n=0,o=0,p=0,q=0,r=0,s=0,t=0;e=d[c+38>>1]|0;if(!(e<<16>>16)){a=0;return a|0}t=a+12|0;do if((e&65535)<512){o=c+8|0;q=f[o>>2]|0;o=f[o+4>>2]|0;g=c+16|0;r=g;e=f[r>>2]|0;r=Hl(e|0,f[r+4>>2]|0,4,0)|0;p=I;if((o|0)<(p|0)|(o|0)==(p|0)&q>>>0>>0){a=0;return a|0}else{e=(f[c>>2]|0)+e|0;e=h[e>>0]|h[e+1>>0]<<8|h[e+2>>0]<<16|h[e+3>>0]<<24;b[t>>0]=e;b[t+1>>0]=e>>8;b[t+2>>0]=e>>16;b[t+3>>0]=e>>24;q=g;q=Hl(f[q>>2]|0,f[q+4>>2]|0,4,0)|0;r=g;f[r>>2]=q;f[r+4>>2]=I;break}}else if(Eh(t,c)|0){e=f[t>>2]|0;break}else{a=0;return a|0}while(0);j=a+4|0;i=f[j>>2]|0;g=f[a>>2]|0;k=i-g>>2;if(e>>>0<=k>>>0){if(e>>>0>>0?(l=g+(e<<2)|0,(i|0)!=(l|0)):0)f[j>>2]=i+(~((i+-4-l|0)>>>2)<<2)}else{vg(a,e-k|0);e=f[t>>2]|0}if(!e){a=1;return a|0}q=c+8|0;r=c+16|0;p=0;a:while(1){n=q;m=f[n>>2]|0;n=f[n+4>>2]|0;i=r;g=f[i>>2]|0;i=f[i+4>>2]|0;if(!((n|0)>(i|0)|(n|0)==(i|0)&m>>>0>g>>>0)){e=0;s=23;break}o=f[c>>2]|0;j=b[o+g>>0]|0;i=Hl(g|0,i|0,1,0)|0;g=I;k=r;f[k>>2]=i;f[k+4>>2]=g;k=j&255;l=k&3;k=k>>>2;switch(j&3){case 3:{g=k+p|0;if(g>>>0>=e>>>0){e=0;s=23;break a}kh((f[a>>2]|0)+(p<<2)|0,0,(k<<2)+4|0)|0;e=g;break}case 0:{e=k;s=20;break}default:{j=0;e=k;while(1){if(!((n|0)>(g|0)|(n|0)==(g|0)&m>>>0>i>>>0)){e=0;s=23;break a}s=b[o+i>>0]|0;i=Hl(i|0,g|0,1,0)|0;g=I;k=r;f[k>>2]=i;f[k+4>>2]=g;e=(s&255)<<(j<<3|6)|e;j=j+1|0;if((j|0)>=(l|0)){s=20;break}}}}if((s|0)==20){s=0;f[(f[a>>2]|0)+(p<<2)>>2]=e;e=p}p=e+1|0;e=f[t>>2]|0;if(p>>>0>=e>>>0){s=22;break}}if((s|0)==22){a=Ff(a+16|0,f[a>>2]|0,e)|0;return a|0}else if((s|0)==23)return e|0;return 0}function Ec(a,c){a=a|0;c=c|0;var e=0,g=0,i=0,j=0,k=0,l=0,m=0,n=0,o=0,p=0,q=0,r=0,s=0,t=0;e=d[c+38>>1]|0;if(!(e<<16>>16)){a=0;return a|0}t=a+12|0;do if((e&65535)<512){o=c+8|0;q=f[o>>2]|0;o=f[o+4>>2]|0;g=c+16|0;r=g;e=f[r>>2]|0;r=Hl(e|0,f[r+4>>2]|0,4,0)|0;p=I;if((o|0)<(p|0)|(o|0)==(p|0)&q>>>0>>0){a=0;return a|0}else{e=(f[c>>2]|0)+e|0;e=h[e>>0]|h[e+1>>0]<<8|h[e+2>>0]<<16|h[e+3>>0]<<24;b[t>>0]=e;b[t+1>>0]=e>>8;b[t+2>>0]=e>>16;b[t+3>>0]=e>>24;q=g;q=Hl(f[q>>2]|0,f[q+4>>2]|0,4,0)|0;r=g;f[r>>2]=q;f[r+4>>2]=I;break}}else if(Eh(t,c)|0){e=f[t>>2]|0;break}else{a=0;return a|0}while(0);j=a+4|0;i=f[j>>2]|0;g=f[a>>2]|0;k=i-g>>2;if(e>>>0<=k>>>0){if(e>>>0>>0?(l=g+(e<<2)|0,(i|0)!=(l|0)):0)f[j>>2]=i+(~((i+-4-l|0)>>>2)<<2)}else{vg(a,e-k|0);e=f[t>>2]|0}if(!e){a=1;return a|0}q=c+8|0;r=c+16|0;p=0;a:while(1){n=q;m=f[n>>2]|0;n=f[n+4>>2]|0;i=r;g=f[i>>2]|0;i=f[i+4>>2]|0;if(!((n|0)>(i|0)|(n|0)==(i|0)&m>>>0>g>>>0)){e=0;s=23;break}o=f[c>>2]|0;j=b[o+g>>0]|0;i=Hl(g|0,i|0,1,0)|0;g=I;k=r;f[k>>2]=i;f[k+4>>2]=g;k=j&255;l=k&3;k=k>>>2;switch(j&3){case 3:{g=k+p|0;if(g>>>0>=e>>>0){e=0;s=23;break a}kh((f[a>>2]|0)+(p<<2)|0,0,(k<<2)+4|0)|0;e=g;break}case 0:{e=k;s=20;break}default:{j=0;e=k;while(1){if(!((n|0)>(g|0)|(n|0)==(g|0)&m>>>0>i>>>0)){e=0;s=23;break a}s=b[o+i>>0]|0;i=Hl(i|0,g|0,1,0)|0;g=I;k=r;f[k>>2]=i;f[k+4>>2]=g;e=(s&255)<<(j<<3|6)|e;j=j+1|0;if((j|0)>=(l|0)){s=20;break}}}}if((s|0)==20){s=0;f[(f[a>>2]|0)+(p<<2)>>2]=e;e=p}p=e+1|0;e=f[t>>2]|0;if(p>>>0>=e>>>0){s=22;break}}if((s|0)==22){a=Gf(a+16|0,f[a>>2]|0,e)|0;return a|0}else if((s|0)==23)return e|0;return 0}function Fc(a,c){a=a|0;c=c|0;var e=0,g=0,i=0,j=0,k=0,l=0,m=0,n=0,o=0,p=0,q=0,r=0,s=0,t=0;e=d[c+38>>1]|0;if(!(e<<16>>16)){a=0;return a|0}t=a+12|0;do if((e&65535)<512){o=c+8|0;q=f[o>>2]|0;o=f[o+4>>2]|0;g=c+16|0;r=g;e=f[r>>2]|0;r=Hl(e|0,f[r+4>>2]|0,4,0)|0;p=I;if((o|0)<(p|0)|(o|0)==(p|0)&q>>>0>>0){a=0;return a|0}else{e=(f[c>>2]|0)+e|0;e=h[e>>0]|h[e+1>>0]<<8|h[e+2>>0]<<16|h[e+3>>0]<<24;b[t>>0]=e;b[t+1>>0]=e>>8;b[t+2>>0]=e>>16;b[t+3>>0]=e>>24;q=g;q=Hl(f[q>>2]|0,f[q+4>>2]|0,4,0)|0;r=g;f[r>>2]=q;f[r+4>>2]=I;break}}else if(Eh(t,c)|0){e=f[t>>2]|0;break}else{a=0;return a|0}while(0);j=a+4|0;i=f[j>>2]|0;g=f[a>>2]|0;k=i-g>>2;if(e>>>0<=k>>>0){if(e>>>0>>0?(l=g+(e<<2)|0,(i|0)!=(l|0)):0)f[j>>2]=i+(~((i+-4-l|0)>>>2)<<2)}else{vg(a,e-k|0);e=f[t>>2]|0}if(!e){a=1;return a|0}q=c+8|0;r=c+16|0;p=0;a:while(1){n=q;m=f[n>>2]|0;n=f[n+4>>2]|0;i=r;g=f[i>>2]|0;i=f[i+4>>2]|0;if(!((n|0)>(i|0)|(n|0)==(i|0)&m>>>0>g>>>0)){e=0;s=23;break}o=f[c>>2]|0;j=b[o+g>>0]|0;i=Hl(g|0,i|0,1,0)|0;g=I;k=r;f[k>>2]=i;f[k+4>>2]=g;k=j&255;l=k&3;k=k>>>2;switch(j&3){case 3:{g=k+p|0;if(g>>>0>=e>>>0){e=0;s=23;break a}kh((f[a>>2]|0)+(p<<2)|0,0,(k<<2)+4|0)|0;e=g;break}case 0:{e=k;s=20;break}default:{j=0;e=k;while(1){if(!((n|0)>(g|0)|(n|0)==(g|0)&m>>>0>i>>>0)){e=0;s=23;break a}s=b[o+i>>0]|0;i=Hl(i|0,g|0,1,0)|0;g=I;k=r;f[k>>2]=i;f[k+4>>2]=g;e=(s&255)<<(j<<3|6)|e;j=j+1|0;if((j|0)>=(l|0)){s=20;break}}}}if((s|0)==20){s=0;f[(f[a>>2]|0)+(p<<2)>>2]=e;e=p}p=e+1|0;e=f[t>>2]|0;if(p>>>0>=e>>>0){s=22;break}}if((s|0)==22){a=If(a+16|0,f[a>>2]|0,e)|0;return a|0}else if((s|0)==23)return e|0;return 0}function Gc(a,c){a=a|0;c=c|0;var e=0,g=0,i=0,j=0,k=0,l=0,m=0,n=0,o=0,p=0,q=0,r=0,s=0,t=0;e=d[c+38>>1]|0;if(!(e<<16>>16)){a=0;return a|0}t=a+12|0;do if((e&65535)<512){o=c+8|0;q=f[o>>2]|0;o=f[o+4>>2]|0;g=c+16|0;r=g;e=f[r>>2]|0;r=Hl(e|0,f[r+4>>2]|0,4,0)|0;p=I;if((o|0)<(p|0)|(o|0)==(p|0)&q>>>0>>0){a=0;return a|0}else{e=(f[c>>2]|0)+e|0;e=h[e>>0]|h[e+1>>0]<<8|h[e+2>>0]<<16|h[e+3>>0]<<24;b[t>>0]=e;b[t+1>>0]=e>>8;b[t+2>>0]=e>>16;b[t+3>>0]=e>>24;q=g;q=Hl(f[q>>2]|0,f[q+4>>2]|0,4,0)|0;r=g;f[r>>2]=q;f[r+4>>2]=I;break}}else if(Eh(t,c)|0){e=f[t>>2]|0;break}else{a=0;return a|0}while(0);j=a+4|0;i=f[j>>2]|0;g=f[a>>2]|0;k=i-g>>2;if(e>>>0<=k>>>0){if(e>>>0>>0?(l=g+(e<<2)|0,(i|0)!=(l|0)):0)f[j>>2]=i+(~((i+-4-l|0)>>>2)<<2)}else{vg(a,e-k|0);e=f[t>>2]|0}if(!e){a=1;return a|0}q=c+8|0;r=c+16|0;p=0;a:while(1){n=q;m=f[n>>2]|0;n=f[n+4>>2]|0;i=r;g=f[i>>2]|0;i=f[i+4>>2]|0;if(!((n|0)>(i|0)|(n|0)==(i|0)&m>>>0>g>>>0)){e=0;s=23;break}o=f[c>>2]|0;j=b[o+g>>0]|0;i=Hl(g|0,i|0,1,0)|0;g=I;k=r;f[k>>2]=i;f[k+4>>2]=g;k=j&255;l=k&3;k=k>>>2;switch(j&3){case 3:{g=k+p|0;if(g>>>0>=e>>>0){e=0;s=23;break a}kh((f[a>>2]|0)+(p<<2)|0,0,(k<<2)+4|0)|0;e=g;break}case 0:{e=k;s=20;break}default:{j=0;e=k;while(1){if(!((n|0)>(g|0)|(n|0)==(g|0)&m>>>0>i>>>0)){e=0;s=23;break a}s=b[o+i>>0]|0;i=Hl(i|0,g|0,1,0)|0;g=I;k=r;f[k>>2]=i;f[k+4>>2]=g;e=(s&255)<<(j<<3|6)|e;j=j+1|0;if((j|0)>=(l|0)){s=20;break}}}}if((s|0)==20){s=0;f[(f[a>>2]|0)+(p<<2)>>2]=e;e=p}p=e+1|0;e=f[t>>2]|0;if(p>>>0>=e>>>0){s=22;break}}if((s|0)==22){a=Jf(a+16|0,f[a>>2]|0,e)|0;return a|0}else if((s|0)==23)return e|0;return 0}function Hc(a,b,c,d,e,g){a=a|0;b=b|0;c=c|0;d=d|0;e=e|0;g=g|0;var h=0,i=0,j=0,k=0,l=0,m=0,n=0,o=0,p=0,q=0,r=0,s=0,t=0,v=0,w=0,x=0,y=0,z=0;x=u;u=u+16|0;w=x+4|0;v=x;f[a+72>>2]=e;f[a+64>>2]=g;s=Ko(e>>>0>1073741823?-1:e<<2)|0;t=a+68|0;d=f[t>>2]|0;f[t>>2]=s;if(d|0)Lo(d);s=a+8|0;f[s>>2]=e;i=a+32|0;h=a+36|0;g=f[h>>2]|0;d=f[i>>2]|0;j=g-d>>2;if(j>>>0>=e>>>0){if(j>>>0>e>>>0?(k=d+(e<<2)|0,(g|0)!=(k|0)):0)f[h>>2]=g+(~((g+-4-k|0)>>>2)<<2)}else vg(i,e-j|0);n=a+56|0;d=f[n>>2]|0;g=f[d+4>>2]|0;h=f[d>>2]|0;q=g-h|0;r=q>>2;if((q|0)<=0){u=x;return 1}p=a+16|0;m=a+32|0;q=a+12|0;o=a+20|0;if((g|0)==(h|0)){k=d;co(k)}else{l=h;y=0}while(1){f[v>>2]=f[l+(y<<2)>>2];f[w>>2]=f[v>>2];Zb(a,w,c,y);l=X(y,e)|0;h=f[t>>2]|0;k=b+(l<<2)|0;l=c+(l<<2)|0;if((f[s>>2]|0)>0){i=0;do{d=f[h+(i<<2)>>2]|0;g=f[p>>2]|0;if((d|0)>(g|0)){j=f[m>>2]|0;f[j+(i<<2)>>2]=g}else{g=f[q>>2]|0;j=f[m>>2]|0;f[j+(i<<2)>>2]=(d|0)<(g|0)?g:d}i=i+1|0;d=f[s>>2]|0}while((i|0)<(d|0));if((d|0)>0){h=0;do{d=(f[k+(h<<2)>>2]|0)+(f[j+(h<<2)>>2]|0)|0;g=l+(h<<2)|0;f[g>>2]=d;if((d|0)<=(f[p>>2]|0)){if((d|0)<(f[q>>2]|0)){d=(f[o>>2]|0)+d|0;z=22}}else{d=d-(f[o>>2]|0)|0;z=22}if((z|0)==22){z=0;f[g>>2]=d}h=h+1|0}while((h|0)<(f[s>>2]|0))}}y=y+1|0;if((y|0)>=(r|0)){z=10;break}d=f[n>>2]|0;l=f[d>>2]|0;if((f[d+4>>2]|0)-l>>2>>>0<=y>>>0){z=11;break}}if((z|0)==10){u=x;return 1}else if((z|0)==11)co(d);return 0}function Ic(a,b,c,d,e,g){a=a|0;b=b|0;c=c|0;d=d|0;e=e|0;g=g|0;var h=0,i=0,j=0,k=0,l=0,m=0,n=0,o=0,p=0,q=0,r=0,s=0,t=0,v=0,w=0,x=0,y=0,z=0;x=u;u=u+16|0;w=x+4|0;v=x;f[a+72>>2]=e;f[a+64>>2]=g;s=Ko(e>>>0>1073741823?-1:e<<2)|0;t=a+68|0;d=f[t>>2]|0;f[t>>2]=s;if(d|0)Lo(d);s=a+8|0;f[s>>2]=e;i=a+32|0;h=a+36|0;g=f[h>>2]|0;d=f[i>>2]|0;j=g-d>>2;if(j>>>0>=e>>>0){if(j>>>0>e>>>0?(k=d+(e<<2)|0,(g|0)!=(k|0)):0)f[h>>2]=g+(~((g+-4-k|0)>>>2)<<2)}else vg(i,e-j|0);n=a+56|0;d=f[n>>2]|0;g=f[d+4>>2]|0;h=f[d>>2]|0;q=g-h|0;r=q>>2;if((q|0)<=0){u=x;return 1}p=a+16|0;m=a+32|0;q=a+12|0;o=a+20|0;if((g|0)==(h|0)){k=d;co(k)}else{l=h;y=0}while(1){f[v>>2]=f[l+(y<<2)>>2];f[w>>2]=f[v>>2];Vb(a,w,c,y);l=X(y,e)|0;h=f[t>>2]|0;k=b+(l<<2)|0;l=c+(l<<2)|0;if((f[s>>2]|0)>0){i=0;do{d=f[h+(i<<2)>>2]|0;g=f[p>>2]|0;if((d|0)>(g|0)){j=f[m>>2]|0;f[j+(i<<2)>>2]=g}else{g=f[q>>2]|0;j=f[m>>2]|0;f[j+(i<<2)>>2]=(d|0)<(g|0)?g:d}i=i+1|0;d=f[s>>2]|0}while((i|0)<(d|0));if((d|0)>0){h=0;do{d=(f[k+(h<<2)>>2]|0)+(f[j+(h<<2)>>2]|0)|0;g=l+(h<<2)|0;f[g>>2]=d;if((d|0)<=(f[p>>2]|0)){if((d|0)<(f[q>>2]|0)){d=(f[o>>2]|0)+d|0;z=22}}else{d=d-(f[o>>2]|0)|0;z=22}if((z|0)==22){z=0;f[g>>2]=d}h=h+1|0}while((h|0)<(f[s>>2]|0))}}y=y+1|0;if((y|0)>=(r|0)){z=10;break}d=f[n>>2]|0;l=f[d>>2]|0;if((f[d+4>>2]|0)-l>>2>>>0<=y>>>0){z=11;break}}if((z|0)==10){u=x;return 1}else if((z|0)==11)co(d);return 0}function Jc(a,b,c,d,e,g){a=a|0;b=b|0;c=c|0;d=d|0;e=e|0;g=g|0;var h=0,i=0,j=0,k=0,l=0,m=0,n=0,o=0,p=0,q=0,r=0,s=0,t=0,u=0;t=a+8|0;f[t>>2]=e;j=a+32|0;i=a+36|0;h=f[i>>2]|0;g=f[j>>2]|0;k=h-g>>2;if(k>>>0>=e>>>0)if(k>>>0>e>>>0?(l=g+(e<<2)|0,(h|0)!=(l|0)):0){f[i>>2]=h+(~((h+-4-l|0)>>>2)<<2);g=e}else g=e;else{vg(j,e-k|0);g=f[t>>2]|0}r=e>>>0>1073741823?-1:e<<2;s=Ko(r)|0;kh(s|0,0,r|0)|0;if((g|0)>0){l=a+16|0;i=a+32|0;m=a+12|0;j=0;do{g=f[s+(j<<2)>>2]|0;h=f[l>>2]|0;if((g|0)>(h|0)){k=f[i>>2]|0;f[k+(j<<2)>>2]=h}else{r=f[m>>2]|0;k=f[i>>2]|0;f[k+(j<<2)>>2]=(g|0)<(r|0)?r:g}j=j+1|0;g=f[t>>2]|0}while((j|0)<(g|0));if((g|0)>0){j=a+20|0;i=0;do{g=(f[b+(i<<2)>>2]|0)+(f[k+(i<<2)>>2]|0)|0;h=c+(i<<2)|0;f[h>>2]=g;if((g|0)<=(f[l>>2]|0)){if((g|0)<(f[m>>2]|0)){g=(f[j>>2]|0)+g|0;u=18}}else{g=g-(f[j>>2]|0)|0;u=18}if((u|0)==18){u=0;f[h>>2]=g}i=i+1|0;g=f[t>>2]|0}while((i|0)<(g|0))}}if((e|0)>=(d|0)){Lo(s);return 1}p=0-e|0;q=a+16|0;o=a+32|0;r=a+12|0;n=a+20|0;a=e;do{l=c+(a<<2)|0;j=l+(p<<2)|0;m=b+(a<<2)|0;if((g|0)>0){i=0;do{g=f[j+(i<<2)>>2]|0;h=f[q>>2]|0;if((g|0)>(h|0)){k=f[o>>2]|0;f[k+(i<<2)>>2]=h}else{h=f[r>>2]|0;k=f[o>>2]|0;f[k+(i<<2)>>2]=(g|0)<(h|0)?h:g}i=i+1|0;g=f[t>>2]|0}while((i|0)<(g|0));if((g|0)>0){i=0;do{g=(f[m+(i<<2)>>2]|0)+(f[k+(i<<2)>>2]|0)|0;h=l+(i<<2)|0;f[h>>2]=g;if((g|0)<=(f[q>>2]|0)){if((g|0)<(f[r>>2]|0)){g=(f[n>>2]|0)+g|0;u=33}}else{g=g-(f[n>>2]|0)|0;u=33}if((u|0)==33){u=0;f[h>>2]=g}i=i+1|0;g=f[t>>2]|0}while((i|0)<(g|0))}}a=a+e|0}while((a|0)<(d|0));Lo(s);return 1}function Kc(a,c,d){a=a|0;c=c|0;d=d|0;var e=0,g=0,h=0,i=0,j=0;i=c+8|0;j=f[i+4>>2]|0;h=c+16|0;e=h;g=f[e>>2]|0;e=f[e+4>>2]|0;if(!((j|0)>(e|0)|((j|0)==(e|0)?(f[i>>2]|0)>>>0>g>>>0:0))){j=0;return j|0}j=b[(f[c>>2]|0)+g>>0]|0;g=Hl(g|0,e|0,1,0)|0;i=h;f[i>>2]=g;f[i+4>>2]=I;do switch(j<<24>>24){case 1:{j=$d(a,c,d)|0;return j|0}case 2:{j=$d(a,c,d)|0;return j|0}case 3:{j=$d(a,c,d)|0;return j|0}case 4:{j=$d(a,c,d)|0;return j|0}case 5:{j=$d(a,c,d)|0;return j|0}case 6:{j=$d(a,c,d)|0;return j|0}case 7:{j=$d(a,c,d)|0;return j|0}case 8:{j=$d(a,c,d)|0;return j|0}case 9:{j=_d(a,c,d)|0;return j|0}case 10:{j=Zd(a,c,d)|0;return j|0}case 11:{j=Yd(a,c,d)|0;return j|0}case 12:{j=Xd(a,c,d)|0;return j|0}case 13:{j=Wd(a,c,d)|0;return j|0}case 14:{j=Vd(a,c,d)|0;return j|0}case 15:{j=Vd(a,c,d)|0;return j|0}case 16:{j=Vd(a,c,d)|0;return j|0}case 17:{j=Vd(a,c,d)|0;return j|0}case 18:{j=Vd(a,c,d)|0;return j|0}default:{j=0;return j|0}}while(0);return 0}function Lc(a,b,c,d,e,g){a=a|0;b=b|0;c=c|0;d=d|0;e=e|0;g=g|0;var h=0,i=0,j=0,k=0,l=0,m=0,n=0,o=0,p=0,q=0,r=0,s=0,t=0,v=0,w=0,x=0,y=0,z=0;x=u;u=u+16|0;v=x+4|0;t=x;w=a+60|0;f[a+64>>2]=g;s=a+8|0;f[s>>2]=e;i=a+32|0;h=a+36|0;g=f[h>>2]|0;d=f[i>>2]|0;j=g-d>>2;if(j>>>0>=e>>>0){if(j>>>0>e>>>0?(k=d+(e<<2)|0,(g|0)!=(k|0)):0)f[h>>2]=g+(~((g+-4-k|0)>>>2)<<2)}else vg(i,e-j|0);n=a+56|0;h=f[n>>2]|0;d=f[h+4>>2]|0;g=f[h>>2]|0;q=d-g|0;r=q>>2;if((q|0)<=0){u=x;return 1}p=a+16|0;m=a+32|0;q=a+12|0;o=a+20|0;if((d|0)==(g|0)){k=h;co(k)}else{l=g;y=0}while(1){f[t>>2]=f[l+(y<<2)>>2];f[v>>2]=f[t>>2];Eb(w,v,c,y);k=X(y,e)|0;j=b+(k<<2)|0;k=c+(k<<2)|0;if((f[s>>2]|0)>0){h=0;do{d=f[a+68+(h<<2)>>2]|0;g=f[p>>2]|0;if((d|0)>(g|0)){i=f[m>>2]|0;f[i+(h<<2)>>2]=g}else{l=f[q>>2]|0;i=f[m>>2]|0;f[i+(h<<2)>>2]=(d|0)<(l|0)?l:d}h=h+1|0;d=f[s>>2]|0}while((h|0)<(d|0));if((d|0)>0){h=0;do{d=(f[j+(h<<2)>>2]|0)+(f[i+(h<<2)>>2]|0)|0;g=k+(h<<2)|0;f[g>>2]=d;if((d|0)<=(f[p>>2]|0)){if((d|0)<(f[q>>2]|0)){d=(f[o>>2]|0)+d|0;z=20}}else{d=d-(f[o>>2]|0)|0;z=20}if((z|0)==20){z=0;f[g>>2]=d}h=h+1|0}while((h|0)<(f[s>>2]|0))}}y=y+1|0;if((y|0)>=(r|0)){z=8;break}d=f[n>>2]|0;l=f[d>>2]|0;if((f[d+4>>2]|0)-l>>2>>>0<=y>>>0){z=9;break}}if((z|0)==8){u=x;return 1}else if((z|0)==9)co(d);return 0}function Mc(a,c){a=a|0;c=c|0;var d=0,e=0,g=0,h=0,i=0,j=0,k=0;k=a+8|0;e=f[k>>2]|0;switch(f[e+28>>2]|0){case 2:{d=b[e+24>>0]|0;j=d<<24>>24;i=Ko((j|0)>-1?j:-1)|0;h=f[a+16>>2]|0;h=(f[f[h>>2]>>2]|0)+(f[h+48>>2]|0)|0;a:do if(c|0){if(d<<24>>24>0){a=0;e=0}else{ef(f[f[e+64>>2]>>2]|0,i|0,j|0)|0;if((c|0)==1)break;else{d=1;a=0}while(1){a=a+j|0;ef((f[f[(f[k>>2]|0)+64>>2]>>2]|0)+a|0,i|0,j|0)|0;d=d+1|0;if((d|0)==(c|0))break a}}while(1){d=0;g=e;while(1){b[i+d>>0]=f[h+(g<<2)>>2];d=d+1|0;if((d|0)==(j|0))break;else g=g+1|0}ef((f[f[(f[k>>2]|0)+64>>2]>>2]|0)+e|0,i|0,j|0)|0;a=a+1|0;if((a|0)==(c|0))break;else e=e+j|0}}while(0);Lo(i);c=1;return c|0}case 1:{d=b[e+24>>0]|0;j=d<<24>>24;i=Ko((j|0)>-1?j:-1)|0;h=f[a+16>>2]|0;h=(f[f[h>>2]>>2]|0)+(f[h+48>>2]|0)|0;b:do if(c|0){if(d<<24>>24>0){a=0;e=0}else{ef(f[f[e+64>>2]>>2]|0,i|0,j|0)|0;if((c|0)==1)break;else{d=1;a=0}while(1){a=a+j|0;ef((f[f[(f[k>>2]|0)+64>>2]>>2]|0)+a|0,i|0,j|0)|0;d=d+1|0;if((d|0)==(c|0))break b}}while(1){d=0;g=e;while(1){b[i+d>>0]=f[h+(g<<2)>>2];d=d+1|0;if((d|0)==(j|0))break;else g=g+1|0}ef((f[f[(f[k>>2]|0)+64>>2]>>2]|0)+e|0,i|0,j|0)|0;a=a+1|0;if((a|0)==(c|0))break;else e=e+j|0}}while(0);Lo(i);c=1;return c|0}case 4:{bg(a,c);c=1;return c|0}case 3:{bg(a,c);c=1;return c|0}case 6:{cg(a,c);c=1;return c|0}case 5:{cg(a,c);c=1;return c|0}default:{c=0;return c|0}}return 0}function Nc(a,b,c,d,e,g){a=a|0;b=b|0;c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|0)&s>>>0>>0)d=0;else{ef(f[p>>2]|0,(f[d>>2]|0)+e|0,h|0)|0;t=g;t=Hl(f[t>>2]|0,f[t+4>>2]|0,h|0,0)|0;d=g;f[d>>2]=t;f[d+4>>2]=I;ok(c,q,p);d=1}e=f[p>>2]|0;if(e|0){if((f[i>>2]|0)!=(e|0))f[i>>2]=e;No(e)}}}else d=0;if((b[q+11>>0]|0)>=0){u=r;return d|0}No(f[q>>2]|0);u=r;return d|0}function Pc(a,b){a=a|0;b=b|0;var c=0,d=La,e=La,g=0,h=0,i=0,j=0,k=0,l=0,m=0,o=0,p=La;m=f[b>>2]|0;j=a+4|0;i=f[j>>2]|0;k=(i|0)==0;a:do if(!k){g=i+-1|0;c=(g&i|0)==0;if(!c)if(m>>>0>>0)h=m;else h=(m>>>0)%(i>>>0)|0;else h=g&m;b=f[(f[a>>2]|0)+(h<<2)>>2]|0;if(!b)b=h;else{if(c){do{b=f[b>>2]|0;if(!b){b=h;break a}l=f[b+4>>2]|0;if(!((l|0)==(m|0)|(l&g|0)==(h|0))){b=h;break a}}while((f[b+8>>2]|0)!=(m|0));a=b+12|0;return a|0}do{b=f[b>>2]|0;if(!b){b=h;break a}c=f[b+4>>2]|0;if((c|0)!=(m|0)){if(c>>>0>=i>>>0)c=(c>>>0)%(i>>>0)|0;if((c|0)!=(h|0)){b=h;break a}}}while((f[b+8>>2]|0)!=(m|0));a=b+12|0;return a|0}}else b=0;while(0);l=Rk(16)|0;f[l+8>>2]=m;f[l+12>>2]=0;f[l+4>>2]=m;f[l>>2]=0;h=a+12|0;e=$(((f[h>>2]|0)+1|0)>>>0);p=$(i>>>0);d=$(n[a+16>>2]);do if(k|e>$(p*d)){b=(i>>>0<3|(i+-1&i|0)!=0)&1|i<<1;c=~~$(W($(e/d)))>>>0;hg(a,b>>>0>>0?c:b);b=f[j>>2]|0;c=b+-1|0;if(!(c&b)){g=b;b=c&m;break}if(m>>>0>>0){g=b;b=m}else{g=b;b=(m>>>0)%(b>>>0)|0}}else g=i;while(0);c=(f[a>>2]|0)+(b<<2)|0;b=f[c>>2]|0;if(!b){b=a+8|0;f[l>>2]=f[b>>2];f[b>>2]=l;f[c>>2]=b;b=f[l>>2]|0;if(b|0){b=f[b+4>>2]|0;c=g+-1|0;if(c&g){if(b>>>0>=g>>>0)b=(b>>>0)%(g>>>0)|0}else b=b&c;b=(f[a>>2]|0)+(b<<2)|0;o=30}}else{f[l>>2]=f[b>>2];o=30}if((o|0)==30)f[b>>2]=l;f[h>>2]=(f[h>>2]|0)+1;a=l;a=a+12|0;return a|0}function Qc(a){a=a|0;var b=0,c=0,d=0;f[a>>2]=3072;d=a+360|0;c=f[d>>2]|0;f[d>>2]=0;if(c|0){d=c+-4|0;b=f[d>>2]|0;if(b|0){b=c+(b<<4)|0;do{b=b+-16|0;So(b)}while((b|0)!=(c|0))}Lo(d)}So(a+344|0);So(a+304|0);So(a+288|0);So(a+248|0);Bg(a+212|0);b=f[a+196>>2]|0;if(b|0){d=a+200|0;c=f[d>>2]|0;if((c|0)!=(b|0))f[d>>2]=c+(~((c+-4-b|0)>>>2)<<2);No(b)}b=f[a+184>>2]|0;if(b|0){d=a+188|0;c=f[d>>2]|0;if((c|0)!=(b|0))f[d>>2]=c+(~((c+-4-b|0)>>>2)<<2);No(b)}b=f[a+172>>2]|0;if(b|0){d=a+176|0;c=f[d>>2]|0;if((c|0)!=(b|0))f[d>>2]=c+(~((c+-4-b|0)>>>2)<<2);No(b)}b=f[a+160>>2]|0;if(b|0){d=a+164|0;c=f[d>>2]|0;if((c|0)!=(b|0))f[d>>2]=c+(~((c+-4-b|0)>>>2)<<2);No(b)}b=f[a+144>>2]|0;if(b|0)do{d=b;b=f[b>>2]|0;No(d)}while((b|0)!=0);d=a+136|0;b=f[d>>2]|0;f[d>>2]=0;if(b|0)No(b);b=f[a+120>>2]|0;if(b|0)No(b);b=f[a+108>>2]|0;if(b|0)No(b);b=f[a+96>>2]|0;if(b|0)No(b);b=f[a+72>>2]|0;if(b|0){d=a+76|0;c=f[d>>2]|0;if((c|0)!=(b|0))f[d>>2]=c+(~((c+-4-b|0)>>>2)<<2);No(b)}b=f[a+60>>2]|0;if(b|0)No(b);b=f[a+48>>2]|0;if(b|0){d=a+52|0;c=f[d>>2]|0;if((c|0)!=(b|0))f[d>>2]=c+(~((c+-4-b|0)>>>2)<<2);No(b)}b=f[a+36>>2]|0;if(b|0){d=a+40|0;c=f[d>>2]|0;if((c|0)!=(b|0))f[d>>2]=c+(~(((c+-12-b|0)>>>0)/12|0)*12|0);No(b)}b=f[a+24>>2]|0;if(b|0){d=a+28|0;c=f[d>>2]|0;if((c|0)!=(b|0))f[d>>2]=c+(~((c+-4-b|0)>>>2)<<2);No(b)}b=f[a+12>>2]|0;if(b|0){d=a+16|0;c=f[d>>2]|0;if((c|0)!=(b|0))f[d>>2]=c+(~((c+-4-b|0)>>>2)<<2);No(b)}a=a+8|0;b=f[a>>2]|0;f[a>>2]=0;if(!b)return;xg(b);No(b);return}function Rc(a,b){a=a|0;b=b|0;var c=0,d=0,e=0,g=0,i=0,k=0,l=0,m=0,n=0,o=0,p=0,q=0,r=0,s=0;s=u;u=u+32|0;i=s+16|0;r=s;f[i>>2]=0;do if((j[b+38>>1]|0)<514){k=b+8|0;l=f[k>>2]|0;k=f[k+4>>2]|0;g=b+16|0;c=g;e=f[c>>2]|0;c=Hl(e|0,f[c+4>>2]|0,4,0)|0;d=I;if((k|0)<(d|0)|(k|0)==(d|0)&l>>>0>>0){r=0;u=s;return r|0}else{l=(f[b>>2]|0)+e|0;l=h[l>>0]|h[l+1>>0]<<8|h[l+2>>0]<<16|h[l+3>>0]<<24;f[i>>2]=l;k=g;f[k>>2]=c;f[k+4>>2]=d;c=l;break}}else if(Eh(i,b)|0){c=f[i>>2]|0;break}else{r=0;u=s;return r|0}while(0);e=a+76|0;md(e,c,0);lo(r);if(nd(r,b)|0){if(f[i>>2]|0){c=0;d=1;do{d=d^((Hi(r)|0)^1);l=(f[e>>2]|0)+(c>>>5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u=t;return s|0}k=a+36|0;p=a+48|0;l=q+8|0;m=q+4|0;n=q+11|0;c=0;while(1){j=(Na[f[(f[a>>2]|0)+28>>2]&127](a)|0)+40|0;if(f[j>>2]|0){j=f[(f[(f[k>>2]|0)+(c<<2)>>2]|0)+8>>2]|0;i=(Na[f[(f[a>>2]|0)+28>>2]&127](a)|0)+40|0;i=f[i>>2]|0;j=f[j+56>>2]|0;d=Rk(32)|0;f[q>>2]=d;f[l>>2]=-2147483616;f[m>>2]=24;e=d;g=14755;h=e+24|0;do{b[e>>0]=b[g>>0]|0;e=e+1|0;g=g+1|0}while((e|0)<(h|0));b[d+24>>0]=0;h=i+16|0;e=f[h>>2]|0;if(e){d=h;g=e;a:while(1){e=g;while(1){if((f[e+16>>2]|0)>=(j|0))break;e=f[e+4>>2]|0;if(!e)break a}g=f[e>>2]|0;if(!g){d=e;break}else d=e}if(((d|0)!=(h|0)?(j|0)>=(f[d+16>>2]|0):0)?(r=d+20|0,(Vf(r,q)|0)!=0):0)d=Zh(r,q,0)|0;else s=13}else s=13;if((s|0)==13){s=0;d=Zh(i,q,0)|0}if((b[n>>0]|0)<0)No(f[q>>2]|0);if(d){s=17;break}}j=f[(f[k>>2]|0)+(c<<2)>>2]|0;if(!(Oa[f[(f[j>>2]|0)+24>>2]&127](j,p)|0)){c=0;d=0;s=20;break}c=c+1|0;if((c|0)>=(o|0)){c=1;d=1;s=20;break}}if((s|0)==17){a=f[(f[k>>2]|0)+(c<<2)>>2]|0;s=f[a+8>>2]|0;Jd(s,nf(a)|0);a=0;s=1;s=a|s;u=t;return s|0}else if((s|0)==20){s=c|d;u=t;return s|0}return 0}function Uc(a,c,d){a=a|0;c=c|0;d=d|0;var e=0,g=0,i=0,j=0,k=0,l=0,m=0,n=0,o=0,p=0,q=0,r=0;p=u;u=u+16|0;n=p+4|0;m=p;i=c+8|0;k=i;e=f[k>>2]|0;k=f[k+4>>2]|0;l=c+16|0;j=l;g=f[j>>2]|0;j=f[j+4>>2]|0;q=Hl(g|0,j|0,4,0)|0;r=I;if((k|0)<(r|0)|(k|0)==(r|0)&e>>>0>>0)i=k;else{g=(f[c>>2]|0)+g|0;g=h[g>>0]|h[g+1>>0]<<8|h[g+2>>0]<<16|h[g+3>>0]<<24;b[a>>0]=g;b[a+1>>0]=g>>8;b[a+2>>0]=g>>16;b[a+3>>0]=g>>24;g=l;g=Hl(f[g>>2]|0,f[g+4>>2]|0,4,0)|0;j=I;e=l;f[e>>2]=g;f[e+4>>2]=j;e=i;i=f[e+4>>2]|0;e=f[e>>2]|0}k=a+4|0;r=Hl(g|0,j|0,4,0)|0;q=I;if((i|0)<(q|0)|(i|0)==(q|0)&e>>>0>>0)e=f[k>>2]|0;else{e=(f[c>>2]|0)+g|0;e=h[e>>0]|h[e+1>>0]<<8|h[e+2>>0]<<16|h[e+3>>0]<<24;b[k>>0]=e;b[k+1>>0]=e>>8;b[k+2>>0]=e>>16;b[k+3>>0]=e>>24;q=l;q=Hl(f[q>>2]|0,f[q+4>>2]|0,4,0)|0;r=l;f[r>>2]=q;f[r+4>>2]=I}if(!e){r=1;u=p;return r|0}else e=0;do{if(!(nd(a+12+(e<<4)|0,c)|0)){e=0;o=14;break}e=e+1|0}while((e|0)<32);if((o|0)==14){u=p;return e|0}if(!(nd(a+524|0,c)|0)){r=0;u=p;return r|0}if(!(oe(a+540|0,c)|0)){r=0;u=p;return r|0}if(!(oe(a+560|0,c)|0)){r=0;u=p;return r|0}if(!(oe(a+580|0,c)|0)){r=0;u=p;return r|0}r=f[k>>2]|0;f[m>>2]=f[d>>2];f[n>>2]=f[m>>2];mb(a,r,n);r=1;u=p;return r|0}function Vc(a,c,d){a=a|0;c=c|0;d=d|0;var e=0,g=0,i=0,j=0,k=0,l=0,m=0,n=0,o=0,p=0,q=0,r=0;p=u;u=u+16|0;n=p+4|0;m=p;i=c+8|0;k=i;e=f[k>>2]|0;k=f[k+4>>2]|0;l=c+16|0;j=l;g=f[j>>2]|0;j=f[j+4>>2]|0;q=Hl(g|0,j|0,4,0)|0;r=I;if((k|0)<(r|0)|(k|0)==(r|0)&e>>>0>>0)i=k;else{g=(f[c>>2]|0)+g|0;g=h[g>>0]|h[g+1>>0]<<8|h[g+2>>0]<<16|h[g+3>>0]<<24;b[a>>0]=g;b[a+1>>0]=g>>8;b[a+2>>0]=g>>16;b[a+3>>0]=g>>24;g=l;g=Hl(f[g>>2]|0,f[g+4>>2]|0,4,0)|0;j=I;e=l;f[e>>2]=g;f[e+4>>2]=j;e=i;i=f[e+4>>2]|0;e=f[e>>2]|0}k=a+4|0;r=Hl(g|0,j|0,4,0)|0;q=I;if((i|0)<(q|0)|(i|0)==(q|0)&e>>>0>>0)e=f[k>>2]|0;else{e=(f[c>>2]|0)+g|0;e=h[e>>0]|h[e+1>>0]<<8|h[e+2>>0]<<16|h[e+3>>0]<<24;b[k>>0]=e;b[k+1>>0]=e>>8;b[k+2>>0]=e>>16;b[k+3>>0]=e>>24;q=l;q=Hl(f[q>>2]|0,f[q+4>>2]|0,4,0)|0;r=l;f[r>>2]=q;f[r+4>>2]=I}if(!e){r=1;u=p;return r|0}else e=0;do{if(!(nd(a+12+(e<<4)|0,c)|0)){e=0;o=14;break}e=e+1|0}while((e|0)<32);if((o|0)==14){u=p;return e|0}if(!(nd(a+524|0,c)|0)){r=0;u=p;return r|0}if(!(oe(a+540|0,c)|0)){r=0;u=p;return r|0}if(!(oe(a+560|0,c)|0)){r=0;u=p;return r|0}if(!(oe(a+580|0,c)|0)){r=0;u=p;return r|0}r=f[k>>2]|0;f[m>>2]=f[d>>2];f[n>>2]=f[m>>2];pb(a,r,n);r=1;u=p;return r|0}function Wc(a,c,d){a=a|0;c=c|0;d=d|0;var e=0,g=0,i=0,j=0,k=0,l=0,m=0,n=0,o=0,p=0,q=0,r=0;p=u;u=u+16|0;n=p+4|0;m=p;i=c+8|0;k=i;e=f[k>>2]|0;k=f[k+4>>2]|0;l=c+16|0;j=l;g=f[j>>2]|0;j=f[j+4>>2]|0;q=Hl(g|0,j|0,4,0)|0;r=I;if((k|0)<(r|0)|(k|0)==(r|0)&e>>>0>>0)i=k;else{g=(f[c>>2]|0)+g|0;g=h[g>>0]|h[g+1>>0]<<8|h[g+2>>0]<<16|h[g+3>>0]<<24;b[a>>0]=g;b[a+1>>0]=g>>8;b[a+2>>0]=g>>16;b[a+3>>0]=g>>24;g=l;g=Hl(f[g>>2]|0,f[g+4>>2]|0,4,0)|0;j=I;e=l;f[e>>2]=g;f[e+4>>2]=j;e=i;i=f[e+4>>2]|0;e=f[e>>2]|0}k=a+4|0;r=Hl(g|0,j|0,4,0)|0;q=I;if((i|0)<(q|0)|(i|0)==(q|0)&e>>>0>>0)e=f[k>>2]|0;else{e=(f[c>>2]|0)+g|0;e=h[e>>0]|h[e+1>>0]<<8|h[e+2>>0]<<16|h[e+3>>0]<<24;b[k>>0]=e;b[k+1>>0]=e>>8;b[k+2>>0]=e>>16;b[k+3>>0]=e>>24;q=l;q=Hl(f[q>>2]|0,f[q+4>>2]|0,4,0)|0;r=l;f[r>>2]=q;f[r+4>>2]=I}if(!e){r=1;u=p;return r|0}else e=0;do{if(!(nd(a+12+(e<<4)|0,c)|0)){e=0;o=14;break}e=e+1|0}while((e|0)<32);if((o|0)==14){u=p;return e|0}if(!(nd(a+524|0,c)|0)){r=0;u=p;return r|0}if(!(oe(a+540|0,c)|0)){r=0;u=p;return r|0}if(!(oe(a+560|0,c)|0)){r=0;u=p;return r|0}if(!(oe(a+580|0,c)|0)){r=0;u=p;return r|0}r=f[k>>2]|0;f[m>>2]=f[d>>2];f[n>>2]=f[m>>2];nb(a,r,n);r=1;u=p;return r|0}function Xc(a,b,c,d,e,g){a=a|0;b=b|0;c=c|0;d=d|0;e=e|0;g=g|0;var h=0,i=0,j=0,k=0,l=0;g=f[b+4>>2]|0;if((d|0)<=-1)ra(14612,17288,59,17379);h=f[g+8>>2]|0;if(((f[g+12>>2]|0)-h>>2|0)<=(d|0))ra(17234,17288,60,17379);j=f[h+(d<<2)>>2]|0;if(!((c+-1|0)>>>0<6&(Na[f[(f[b>>2]|0)+8>>2]&127](b)|0)==1)){e=0;f[a>>2]=e;return}k=Na[f[(f[b>>2]|0)+36>>2]&127](b)|0;l=Oa[f[(f[b>>2]|0)+44>>2]&127](b,d)|0;if((k|0)==0|(l|0)==0){e=0;f[a>>2]=e;return}i=Oa[f[(f[b>>2]|0)+40>>2]&127](b,d)|0;h=f[b+44>>2]|0;d=l+12|0;g=(c|0)==6;if(!i){if(g){c=Rk(104)|0;f[c+4>>2]=j;b=c+8|0;f[b>>2]=f[e>>2];f[b+4>>2]=f[e+4>>2];f[b+8>>2]=f[e+8>>2];f[b+12>>2]=f[e+12>>2];f[c+24>>2]=h;f[c+28>>2]=k;f[c+32>>2]=d;f[c+36>>2]=l;f[c>>2]=2576;f[c+44>>2]=0;f[c+48>>2]=0;f[c+52>>2]=h;f[c+56>>2]=k;f[c+60>>2]=d;f[c+64>>2]=l;f[c+40>>2]=2632;f[c+68>>2]=1;e=c+72|0;f[e>>2]=-1;f[e+4>>2]=-1;f[e+8>>2]=-1;f[e+12>>2]=-1;lo(c+88|0);e=c;f[a>>2]=e;return}}else if(g){c=Rk(104)|0;f[c+4>>2]=j;b=c+8|0;f[b>>2]=f[e>>2];f[b+4>>2]=f[e+4>>2];f[b+8>>2]=f[e+8>>2];f[b+12>>2]=f[e+12>>2];f[c+24>>2]=h;f[c+28>>2]=i;f[c+32>>2]=d;f[c+36>>2]=l;f[c>>2]=2492;f[c+44>>2]=0;f[c+48>>2]=0;f[c+52>>2]=h;f[c+56>>2]=i;f[c+60>>2]=d;f[c+64>>2]=l;f[c+40>>2]=2548;f[c+68>>2]=1;e=c+72|0;f[e>>2]=-1;f[e+4>>2]=-1;f[e+8>>2]=-1;f[e+12>>2]=-1;lo(c+88|0);e=c;f[a>>2]=e;return}f[a>>2]=0;f[a>>2]=0;e=0;f[a>>2]=e;return}function Yc(a){a=a|0;var c=0,d=0,e=0,g=0,h=0,i=0,j=0,k=0,l=0,m=0,n=0,o=0,p=0;h=a+32|0;c=f[h>>2]|0;o=c+8|0;n=f[o+4>>2]|0;g=c+16|0;d=g;e=f[d>>2]|0;d=f[d+4>>2]|0;if(!((n|0)>(d|0)|((n|0)==(d|0)?(f[o>>2]|0)>>>0>e>>>0:0))){a=0;return a|0}n=b[(f[c>>2]|0)+e>>0]|0;m=Hl(e|0,d|0,1,0)|0;o=g;f[o>>2]=m;f[o+4>>2]=I;o=n&255;g=n<<24>>24==0;a:do if(!g){c=0;while(1){if(!(Oa[f[(f[a>>2]|0)+16>>2]&127](a,c)|0)){c=0;break}c=c+1|0;if((c|0)>=(o|0))break a}return c|0}while(0);n=a+8|0;c=f[n>>2]|0;d=f[a+12>>2]|0;b:do if((c|0)!=(d|0)){e=a+4|0;while(1){m=f[c>>2]|0;c=c+4|0;if(!(Pa[f[(f[m>>2]|0)+8>>2]&31](m,a,f[e>>2]|0)|0)){c=0;break}if((c|0)==(d|0))break b}return c|0}while(0);if(!g){c=0;do{m=f[(f[n>>2]|0)+(c<<2)>>2]|0;c=c+1|0;if(!(Oa[f[(f[m>>2]|0)+12>>2]&127](m,f[h>>2]|0)|0)){c=0;i=26;break}}while((c|0)<(o|0));if((i|0)==26)return c|0;if(!g){i=a+20|0;h=a+24|0;l=0;do{j=f[(f[n>>2]|0)+(l<<2)>>2]|0;j=Na[f[(f[j>>2]|0)+24>>2]&127](j)|0;if((j|0)>0){m=0;do{k=f[(f[n>>2]|0)+(l<<2)>>2]|0;k=Oa[f[(f[k>>2]|0)+20>>2]&127](k,m)|0;d=f[h>>2]|0;c=f[i>>2]|0;g=d-c>>2;do if(k>>>0>=g>>>0){e=k+1|0;if(e>>>0>g>>>0){vg(i,e-g|0);c=f[i>>2]|0;break}if(e>>>0>>0?(p=c+(e<<2)|0,(d|0)!=(p|0)):0)f[h>>2]=d+(~((d+-4-p|0)>>>2)<<2)}while(0);f[c+(k<<2)>>2]=l;m=m+1|0}while((m|0)!=(j|0))}l=l+1|0}while((l|0)!=(o|0))}}if(!(Na[f[(f[a>>2]|0)+28>>2]&127](a)|0)){a=0;return a|0}a=Na[f[(f[a>>2]|0)+32>>2]&127](a)|0;return a|0}function Zc(a,c){a=a|0;c=c|0;var d=0,e=0,g=0,i=0,k=0,l=0,m=0,n=0,o=0,p=0,q=0;q=u;u=u+16|0;g=q;do if((j[c+38>>1]|0)<512){i=c+8|0;d=f[i>>2]|0;i=f[i+4>>2]|0;o=c+16|0;k=o;e=f[k>>2]|0;k=Hl(e|0,f[k+4>>2]|0,8,0)|0;l=I;if((i|0)<(l|0)|(i|0)==(l|0)&d>>>0>>0){a=0;u=q;return a|0}else{m=(f[c>>2]|0)+e|0;n=m;n=h[n>>0]|h[n+1>>0]<<8|h[n+2>>0]<<16|h[n+3>>0]<<24;m=m+4|0;m=h[m>>0]|h[m+1>>0]<<8|h[m+2>>0]<<16|h[m+3>>0]<<24;e=g;f[e>>2]=n;f[e+4>>2]=m;e=o;f[e>>2]=k;f[e+4>>2]=l;e=o;break}}else if(bh(g,c)|0){n=g;i=c+8|0;e=c+16|0;l=e;d=f[i>>2]|0;i=f[i+4>>2]|0;k=f[l>>2]|0;l=f[l+4>>2]|0;m=f[n+4>>2]|0;n=f[n>>2]|0;break}else{a=0;u=q;return a|0}while(0);o=jm(d|0,i|0,k|0,l|0)|0;i=I;if(m>>>0>i>>>0|(m|0)==(i|0)&n>>>0>o>>>0){a=0;u=q;return a|0}g=(f[c>>2]|0)+k|0;o=Hl(k|0,l|0,n|0,m|0)|0;c=e;f[c>>2]=o;f[c+4>>2]=I;if((n|0)<1){a=0;u=q;return a|0}f[a+40>>2]=g;e=n+-1|0;d=g+e|0;a:do switch((h[d>>0]|0)>>>6&3){case 0:{f[a+44>>2]=e;p=b[d>>0]&63;break}case 1:if((n|0)<2){a=0;u=q;return a|0}else{f[a+44>>2]=n+-2;p=g+n+-2|0;p=(h[p+1>>0]|0)<<8&16128|(h[p>>0]|0);break a}case 2:if((n|0)<3){a=0;u=q;return a|0}else{f[a+44>>2]=n+-3;p=g+n+-3|0;p=(h[p+1>>0]|0)<<8|(h[p>>0]|0)|(h[p+2>>0]|0)<<16&4128768;break a}case 3:{f[a+44>>2]=n+-4;p=g+n+-4|0;p=(h[p+2>>0]|0)<<16|(h[p+3>>0]|0)<<24&1056964608|(h[p+1>>0]|0)<<8|(h[p>>0]|0);break}default:{}}while(0);p=p+4194304|0;f[a+48>>2]=p;a=p>>>0<1073741824;u=q;return a|0}function _c(a,c){a=a|0;c=c|0;var d=0,e=0,g=0,i=0,k=0,l=0,m=0,n=0,o=0,p=0,q=0;q=u;u=u+16|0;g=q;do if((j[c+38>>1]|0)<512){i=c+8|0;d=f[i>>2]|0;i=f[i+4>>2]|0;o=c+16|0;k=o;e=f[k>>2]|0;k=Hl(e|0,f[k+4>>2]|0,8,0)|0;l=I;if((i|0)<(l|0)|(i|0)==(l|0)&d>>>0>>0){a=0;u=q;return a|0}else{m=(f[c>>2]|0)+e|0;n=m;n=h[n>>0]|h[n+1>>0]<<8|h[n+2>>0]<<16|h[n+3>>0]<<24;m=m+4|0;m=h[m>>0]|h[m+1>>0]<<8|h[m+2>>0]<<16|h[m+3>>0]<<24;e=g;f[e>>2]=n;f[e+4>>2]=m;e=o;f[e>>2]=k;f[e+4>>2]=l;e=o;break}}else if(bh(g,c)|0){n=g;i=c+8|0;e=c+16|0;l=e;d=f[i>>2]|0;i=f[i+4>>2]|0;k=f[l>>2]|0;l=f[l+4>>2]|0;m=f[n+4>>2]|0;n=f[n>>2]|0;break}else{a=0;u=q;return a|0}while(0);o=jm(d|0,i|0,k|0,l|0)|0;i=I;if(m>>>0>i>>>0|(m|0)==(i|0)&n>>>0>o>>>0){a=0;u=q;return a|0}g=(f[c>>2]|0)+k|0;o=Hl(k|0,l|0,n|0,m|0)|0;c=e;f[c>>2]=o;f[c+4>>2]=I;if((n|0)<1){a=0;u=q;return a|0}f[a+40>>2]=g;e=n+-1|0;d=g+e|0;a:do switch((h[d>>0]|0)>>>6&3){case 0:{f[a+44>>2]=e;p=b[d>>0]&63;break}case 1:if((n|0)<2){a=0;u=q;return a|0}else{f[a+44>>2]=n+-2;p=g+n+-2|0;p=(h[p+1>>0]|0)<<8&16128|(h[p>>0]|0);break a}case 2:if((n|0)<3){a=0;u=q;return a|0}else{f[a+44>>2]=n+-3;p=g+n+-3|0;p=(h[p+1>>0]|0)<<8|(h[p>>0]|0)|(h[p+2>>0]|0)<<16&4128768;break a}case 3:{f[a+44>>2]=n+-4;p=g+n+-4|0;p=(h[p+2>>0]|0)<<16|(h[p+3>>0]|0)<<24&1056964608|(h[p+1>>0]|0)<<8|(h[p>>0]|0);break}default:{}}while(0);p=p+2097152|0;f[a+48>>2]=p;a=p>>>0<536870912;u=q;return a|0}function $c(a,c){a=a|0;c=c|0;var d=0,e=0,g=0,i=0,k=0,l=0,m=0,n=0,o=0,p=0,q=0;q=u;u=u+16|0;g=q;do if((j[c+38>>1]|0)<512){i=c+8|0;d=f[i>>2]|0;i=f[i+4>>2]|0;o=c+16|0;k=o;e=f[k>>2]|0;k=Hl(e|0,f[k+4>>2]|0,8,0)|0;l=I;if((i|0)<(l|0)|(i|0)==(l|0)&d>>>0>>0){a=0;u=q;return a|0}else{m=(f[c>>2]|0)+e|0;n=m;n=h[n>>0]|h[n+1>>0]<<8|h[n+2>>0]<<16|h[n+3>>0]<<24;m=m+4|0;m=h[m>>0]|h[m+1>>0]<<8|h[m+2>>0]<<16|h[m+3>>0]<<24;e=g;f[e>>2]=n;f[e+4>>2]=m;e=o;f[e>>2]=k;f[e+4>>2]=l;e=o;break}}else if(bh(g,c)|0){n=g;i=c+8|0;e=c+16|0;l=e;d=f[i>>2]|0;i=f[i+4>>2]|0;k=f[l>>2]|0;l=f[l+4>>2]|0;m=f[n+4>>2]|0;n=f[n>>2]|0;break}else{a=0;u=q;return a|0}while(0);o=jm(d|0,i|0,k|0,l|0)|0;i=I;if(m>>>0>i>>>0|(m|0)==(i|0)&n>>>0>o>>>0){a=0;u=q;return a|0}g=(f[c>>2]|0)+k|0;o=Hl(k|0,l|0,n|0,m|0)|0;c=e;f[c>>2]=o;f[c+4>>2]=I;if((n|0)<1){a=0;u=q;return a|0}f[a+40>>2]=g;e=n+-1|0;d=g+e|0;a:do switch((h[d>>0]|0)>>>6&3){case 0:{f[a+44>>2]=e;p=b[d>>0]&63;break}case 1:if((n|0)<2){a=0;u=q;return a|0}else{f[a+44>>2]=n+-2;p=g+n+-2|0;p=(h[p+1>>0]|0)<<8&16128|(h[p>>0]|0);break a}case 2:if((n|0)<3){a=0;u=q;return a|0}else{f[a+44>>2]=n+-3;p=g+n+-3|0;p=(h[p+1>>0]|0)<<8|(h[p>>0]|0)|(h[p+2>>0]|0)<<16&4128768;break a}case 3:{f[a+44>>2]=n+-4;p=g+n+-4|0;p=(h[p+2>>0]|0)<<16|(h[p+3>>0]|0)<<24&1056964608|(h[p+1>>0]|0)<<8|(h[p>>0]|0);break}default:{}}while(0);p=p+1048576|0;f[a+48>>2]=p;a=p>>>0<268435456;u=q;return a|0}function ad(a,c){a=a|0;c=c|0;var d=0,e=0,g=0,i=0,k=0,l=0,m=0,n=0,o=0,p=0,q=0;q=u;u=u+16|0;g=q;do if((j[c+38>>1]|0)<512){i=c+8|0;d=f[i>>2]|0;i=f[i+4>>2]|0;o=c+16|0;k=o;e=f[k>>2]|0;k=Hl(e|0,f[k+4>>2]|0,8,0)|0;l=I;if((i|0)<(l|0)|(i|0)==(l|0)&d>>>0>>0){a=0;u=q;return a|0}else{m=(f[c>>2]|0)+e|0;n=m;n=h[n>>0]|h[n+1>>0]<<8|h[n+2>>0]<<16|h[n+3>>0]<<24;m=m+4|0;m=h[m>>0]|h[m+1>>0]<<8|h[m+2>>0]<<16|h[m+3>>0]<<24;e=g;f[e>>2]=n;f[e+4>>2]=m;e=o;f[e>>2]=k;f[e+4>>2]=l;e=o;break}}else if(bh(g,c)|0){n=g;i=c+8|0;e=c+16|0;l=e;d=f[i>>2]|0;i=f[i+4>>2]|0;k=f[l>>2]|0;l=f[l+4>>2]|0;m=f[n+4>>2]|0;n=f[n>>2]|0;break}else{a=0;u=q;return a|0}while(0);o=jm(d|0,i|0,k|0,l|0)|0;i=I;if(m>>>0>i>>>0|(m|0)==(i|0)&n>>>0>o>>>0){a=0;u=q;return a|0}g=(f[c>>2]|0)+k|0;o=Hl(k|0,l|0,n|0,m|0)|0;c=e;f[c>>2]=o;f[c+4>>2]=I;if((n|0)<1){a=0;u=q;return a|0}f[a+40>>2]=g;e=n+-1|0;d=g+e|0;a:do switch((h[d>>0]|0)>>>6&3){case 0:{f[a+44>>2]=e;p=b[d>>0]&63;break}case 1:if((n|0)<2){a=0;u=q;return a|0}else{f[a+44>>2]=n+-2;p=g+n+-2|0;p=(h[p+1>>0]|0)<<8&16128|(h[p>>0]|0);break a}case 2:if((n|0)<3){a=0;u=q;return a|0}else{f[a+44>>2]=n+-3;p=g+n+-3|0;p=(h[p+1>>0]|0)<<8|(h[p>>0]|0)|(h[p+2>>0]|0)<<16&4128768;break a}case 3:{f[a+44>>2]=n+-4;p=g+n+-4|0;p=(h[p+2>>0]|0)<<16|(h[p+3>>0]|0)<<24&1056964608|(h[p+1>>0]|0)<<8|(h[p>>0]|0);break}default:{}}while(0);p=p+262144|0;f[a+48>>2]=p;a=p>>>0<67108864;u=q;return a|0}function bd(a,c){a=a|0;c=c|0;var d=0,e=0,g=0,i=0,k=0,l=0,m=0,n=0,o=0,p=0,q=0;q=u;u=u+16|0;g=q;do if((j[c+38>>1]|0)<512){i=c+8|0;d=f[i>>2]|0;i=f[i+4>>2]|0;o=c+16|0;k=o;e=f[k>>2]|0;k=Hl(e|0,f[k+4>>2]|0,8,0)|0;l=I;if((i|0)<(l|0)|(i|0)==(l|0)&d>>>0>>0){a=0;u=q;return a|0}else{m=(f[c>>2]|0)+e|0;n=m;n=h[n>>0]|h[n+1>>0]<<8|h[n+2>>0]<<16|h[n+3>>0]<<24;m=m+4|0;m=h[m>>0]|h[m+1>>0]<<8|h[m+2>>0]<<16|h[m+3>>0]<<24;e=g;f[e>>2]=n;f[e+4>>2]=m;e=o;f[e>>2]=k;f[e+4>>2]=l;e=o;break}}else if(bh(g,c)|0){n=g;i=c+8|0;e=c+16|0;l=e;d=f[i>>2]|0;i=f[i+4>>2]|0;k=f[l>>2]|0;l=f[l+4>>2]|0;m=f[n+4>>2]|0;n=f[n>>2]|0;break}else{a=0;u=q;return a|0}while(0);o=jm(d|0,i|0,k|0,l|0)|0;i=I;if(m>>>0>i>>>0|(m|0)==(i|0)&n>>>0>o>>>0){a=0;u=q;return a|0}g=(f[c>>2]|0)+k|0;o=Hl(k|0,l|0,n|0,m|0)|0;c=e;f[c>>2]=o;f[c+4>>2]=I;if((n|0)<1){a=0;u=q;return a|0}f[a+40>>2]=g;e=n+-1|0;d=g+e|0;a:do switch((h[d>>0]|0)>>>6&3){case 0:{f[a+44>>2]=e;p=b[d>>0]&63;break}case 1:if((n|0)<2){a=0;u=q;return a|0}else{f[a+44>>2]=n+-2;p=g+n+-2|0;p=(h[p+1>>0]|0)<<8&16128|(h[p>>0]|0);break a}case 2:if((n|0)<3){a=0;u=q;return a|0}else{f[a+44>>2]=n+-3;p=g+n+-3|0;p=(h[p+1>>0]|0)<<8|(h[p>>0]|0)|(h[p+2>>0]|0)<<16&4128768;break a}case 3:{f[a+44>>2]=n+-4;p=g+n+-4|0;p=(h[p+2>>0]|0)<<16|(h[p+3>>0]|0)<<24&1056964608|(h[p+1>>0]|0)<<8|(h[p>>0]|0);break}default:{}}while(0);p=p+131072|0;f[a+48>>2]=p;a=p>>>0<33554432;u=q;return a|0}function cd(a,c){a=a|0;c=c|0;var d=0,e=0,g=0,i=0,k=0,l=0,m=0,n=0,o=0,p=0,q=0;q=u;u=u+16|0;g=q;do if((j[c+38>>1]|0)<512){i=c+8|0;d=f[i>>2]|0;i=f[i+4>>2]|0;o=c+16|0;k=o;e=f[k>>2]|0;k=Hl(e|0,f[k+4>>2]|0,8,0)|0;l=I;if((i|0)<(l|0)|(i|0)==(l|0)&d>>>0>>0){a=0;u=q;return a|0}else{m=(f[c>>2]|0)+e|0;n=m;n=h[n>>0]|h[n+1>>0]<<8|h[n+2>>0]<<16|h[n+3>>0]<<24;m=m+4|0;m=h[m>>0]|h[m+1>>0]<<8|h[m+2>>0]<<16|h[m+3>>0]<<24;e=g;f[e>>2]=n;f[e+4>>2]=m;e=o;f[e>>2]=k;f[e+4>>2]=l;e=o;break}}else if(bh(g,c)|0){n=g;i=c+8|0;e=c+16|0;l=e;d=f[i>>2]|0;i=f[i+4>>2]|0;k=f[l>>2]|0;l=f[l+4>>2]|0;m=f[n+4>>2]|0;n=f[n>>2]|0;break}else{a=0;u=q;return a|0}while(0);o=jm(d|0,i|0,k|0,l|0)|0;i=I;if(m>>>0>i>>>0|(m|0)==(i|0)&n>>>0>o>>>0){a=0;u=q;return a|0}g=(f[c>>2]|0)+k|0;o=Hl(k|0,l|0,n|0,m|0)|0;c=e;f[c>>2]=o;f[c+4>>2]=I;if((n|0)<1){a=0;u=q;return a|0}f[a+40>>2]=g;e=n+-1|0;d=g+e|0;a:do switch((h[d>>0]|0)>>>6&3){case 0:{f[a+44>>2]=e;p=b[d>>0]&63;break}case 1:if((n|0)<2){a=0;u=q;return a|0}else{f[a+44>>2]=n+-2;p=g+n+-2|0;p=(h[p+1>>0]|0)<<8&16128|(h[p>>0]|0);break a}case 2:if((n|0)<3){a=0;u=q;return a|0}else{f[a+44>>2]=n+-3;p=g+n+-3|0;p=(h[p+1>>0]|0)<<8|(h[p>>0]|0)|(h[p+2>>0]|0)<<16&4128768;break a}case 3:{f[a+44>>2]=n+-4;p=g+n+-4|0;p=(h[p+2>>0]|0)<<16|(h[p+3>>0]|0)<<24&1056964608|(h[p+1>>0]|0)<<8|(h[p>>0]|0);break}default:{}}while(0);p=p+32768|0;f[a+48>>2]=p;a=p>>>0<8388608;u=q;return a|0}function dd(a,c){a=a|0;c=c|0;var d=0,e=0,g=0,i=0,k=0,l=0,m=0,n=0,o=0,p=0,q=0;q=u;u=u+16|0;g=q;do if((j[c+38>>1]|0)<512){i=c+8|0;d=f[i>>2]|0;i=f[i+4>>2]|0;o=c+16|0;k=o;e=f[k>>2]|0;k=Hl(e|0,f[k+4>>2]|0,8,0)|0;l=I;if((i|0)<(l|0)|(i|0)==(l|0)&d>>>0>>0){a=0;u=q;return a|0}else{m=(f[c>>2]|0)+e|0;n=m;n=h[n>>0]|h[n+1>>0]<<8|h[n+2>>0]<<16|h[n+3>>0]<<24;m=m+4|0;m=h[m>>0]|h[m+1>>0]<<8|h[m+2>>0]<<16|h[m+3>>0]<<24;e=g;f[e>>2]=n;f[e+4>>2]=m;e=o;f[e>>2]=k;f[e+4>>2]=l;e=o;break}}else if(bh(g,c)|0){n=g;i=c+8|0;e=c+16|0;l=e;d=f[i>>2]|0;i=f[i+4>>2]|0;k=f[l>>2]|0;l=f[l+4>>2]|0;m=f[n+4>>2]|0;n=f[n>>2]|0;break}else{a=0;u=q;return a|0}while(0);o=jm(d|0,i|0,k|0,l|0)|0;i=I;if(m>>>0>i>>>0|(m|0)==(i|0)&n>>>0>o>>>0){a=0;u=q;return a|0}g=(f[c>>2]|0)+k|0;o=Hl(k|0,l|0,n|0,m|0)|0;c=e;f[c>>2]=o;f[c+4>>2]=I;if((n|0)<1){a=0;u=q;return a|0}f[a+40>>2]=g;e=n+-1|0;d=g+e|0;a:do switch((h[d>>0]|0)>>>6&3){case 0:{f[a+44>>2]=e;p=b[d>>0]&63;break}case 1:if((n|0)<2){a=0;u=q;return a|0}else{f[a+44>>2]=n+-2;p=g+n+-2|0;p=(h[p+1>>0]|0)<<8&16128|(h[p>>0]|0);break a}case 2:if((n|0)<3){a=0;u=q;return a|0}else{f[a+44>>2]=n+-3;p=g+n+-3|0;p=(h[p+1>>0]|0)<<8|(h[p>>0]|0)|(h[p+2>>0]|0)<<16&4128768;break a}case 3:{f[a+44>>2]=n+-4;p=g+n+-4|0;p=(h[p+2>>0]|0)<<16|(h[p+3>>0]|0)<<24&1056964608|(h[p+1>>0]|0)<<8|(h[p>>0]|0);break}default:{}}while(0);p=p+16384|0;f[a+48>>2]=p;a=p>>>0<4194304;u=q;return a|0}function ed(a,b,c,d,e,g){a=a|0;b=b|0;c=c|0;d=d|0;e=e|0;g=g|0;var h=0,i=0,j=0,k=0,l=0;g=f[b+4>>2]|0;if((d|0)<=-1)ra(14612,17288,59,17379);h=f[g+8>>2]|0;if(((f[g+12>>2]|0)-h>>2|0)<=(d|0))ra(17234,17288,60,17379);j=f[h+(d<<2)>>2]|0;if(!((c+-1|0)>>>0<6&(Na[f[(f[b>>2]|0)+8>>2]&127](b)|0)==1)){e=0;f[a>>2]=e;return}k=Na[f[(f[b>>2]|0)+36>>2]&127](b)|0;l=Oa[f[(f[b>>2]|0)+44>>2]&127](b,d)|0;if((k|0)==0|(l|0)==0){e=0;f[a>>2]=e;return}i=Oa[f[(f[b>>2]|0)+40>>2]&127](b,d)|0;h=f[b+44>>2]|0;d=l+12|0;g=(c|0)==6;if(!i){if(g){c=Rk(104)|0;f[c+4>>2]=j;b=c+8|0;f[b>>2]=f[e>>2];f[b+4>>2]=f[e+4>>2];f[b+8>>2]=f[e+8>>2];f[b+12>>2]=f[e+12>>2];f[c+24>>2]=h;f[c+28>>2]=k;f[c+32>>2]=d;f[c+36>>2]=l;f[c>>2]=2800;f[c+44>>2]=0;f[c+48>>2]=0;f[c+52>>2]=h;f[c+56>>2]=k;f[c+60>>2]=d;f[c+64>>2]=l;f[c+40>>2]=2856;f[c+68>>2]=1;e=c+72|0;f[e>>2]=-1;f[e+4>>2]=-1;f[e+8>>2]=-1;f[e+12>>2]=-1;lo(c+88|0);e=c;f[a>>2]=e;return}}else if(g){c=Rk(104)|0;f[c+4>>2]=j;b=c+8|0;f[b>>2]=f[e>>2];f[b+4>>2]=f[e+4>>2];f[b+8>>2]=f[e+8>>2];f[b+12>>2]=f[e+12>>2];f[c+24>>2]=h;f[c+28>>2]=i;f[c+32>>2]=d;f[c+36>>2]=l;f[c>>2]=2716;f[c+44>>2]=0;f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)|0)){e=0;o=14;break}e=e+1|0}while((e|0)<32);if((o|0)==14){u=p;return e|0}if(!(nd(a+524|0,c)|0)){r=0;u=p;return r|0}if(!(oe(a+540|0,c)|0)){r=0;u=p;return r|0}if(!(oe(a+560|0,c)|0)){r=0;u=p;return r|0}if(!(oe(a+580|0,c)|0)){r=0;u=p;return r|0}r=f[k>>2]|0;o=f[d+4>>2]|0;q=m;f[q>>2]=f[d>>2];f[q+4>>2]=o;f[n>>2]=f[m>>2];f[n+4>>2]=f[m+4>>2];ob(a,r,n);r=1;u=p;return r|0}function hd(a,c,d){a=a|0;c=c|0;d=d|0;var e=0,g=0,i=0,j=0,k=0,l=0,m=0,n=0,o=0,p=0,q=0,r=0;p=u;u=u+16|0;n=p+8|0;m=p;i=c+8|0;k=i;e=f[k>>2]|0;k=f[k+4>>2]|0;l=c+16|0;j=l;g=f[j>>2]|0;j=f[j+4>>2]|0;q=Hl(g|0,j|0,4,0)|0;r=I;if((k|0)<(r|0)|(k|0)==(r|0)&e>>>0>>0)i=k;else{g=(f[c>>2]|0)+g|0;g=h[g>>0]|h[g+1>>0]<<8|h[g+2>>0]<<16|h[g+3>>0]<<24;b[a>>0]=g;b[a+1>>0]=g>>8;b[a+2>>0]=g>>16;b[a+3>>0]=g>>24;g=l;g=Hl(f[g>>2]|0,f[g+4>>2]|0,4,0)|0;j=I;e=l;f[e>>2]=g;f[e+4>>2]=j;e=i;i=f[e+4>>2]|0;e=f[e>>2]|0}k=a+4|0;r=Hl(g|0,j|0,4,0)|0;q=I;if((i|0)<(q|0)|(i|0)==(q|0)&e>>>0>>0)e=f[k>>2]|0;else{e=(f[c>>2]|0)+g|0;e=h[e>>0]|h[e+1>>0]<<8|h[e+2>>0]<<16|h[e+3>>0]<<24;b[k>>0]=e;b[k+1>>0]=e>>8;b[k+2>>0]=e>>16;b[k+3>>0]=e>>24;q=l;q=Hl(f[q>>2]|0,f[q+4>>2]|0,4,0)|0;r=l;f[r>>2]=q;f[r+4>>2]=I}if(!e){r=1;u=p;return r|0}else e=0;do{if(!(nd(a+12+(e<<4)|0,c)|0)){e=0;o=14;break}e=e+1|0}while((e|0)<32);if((o|0)==14){u=p;return e|0}if(!(nd(a+524|0,c)|0)){r=0;u=p;return r|0}if(!(oe(a+540|0,c)|0)){r=0;u=p;return r|0}if(!(oe(a+560|0,c)|0)){r=0;u=p;return r|0}if(!(oe(a+580|0,c)|0)){r=0;u=p;return r|0}r=f[k>>2]|0;o=f[d+4>>2]|0;q=m;f[q>>2]=f[d>>2];f[q+4>>2]=o;f[n>>2]=f[m>>2];f[n+4>>2]=f[m+4>>2];lb(a,r,n);r=1;u=p;return r|0}function id(a,b,c,d){a=a|0;b=b|0;c=c|0;d=d|0;var e=0,g=0,h=0,i=0,j=0,k=0,l=0,m=0,n=0;m=f[b>>2]|0;k=b+4|0;e=f[k>>2]|0;h=((f[c>>2]|0)-m<<3)+(f[c+4>>2]|0)-e|0;c=m;if((h|0)<=0){b=d+4|0;d=f[d>>2]|0;f[a>>2]=d;a=a+4|0;d=f[b>>2]|0;f[a>>2]=d;return}if(!e){l=d+4|0;e=f[l>>2]|0}else{i=32-e|0;m=(h|0)<(i|0)?h:i;i=-1>>>(i-m|0)&-1<>2];l=d+4|0;c=f[l>>2]|0;j=32-c|0;e=j>>>0>>0?j:m;g=f[d>>2]|0;c=f[g>>2]&~(-1>>>(j-e|0)&-1<>2]=c;j=f[l>>2]|0;n=f[k>>2]|0;f[g>>2]=(j>>>0>n>>>0?i<>>(n-j|0))|c;c=(f[l>>2]|0)+e|0;g=g+(c>>>5<<2)|0;f[d>>2]=g;c=c&31;f[l>>2]=c;j=m-e|0;if((j|0)>0){c=f[g>>2]&~(-1>>>(32-j|0));f[g>>2]=c;f[g>>2]=i>>>((f[k>>2]|0)+e|0)|c;f[l>>2]=j;c=j}n=(f[b>>2]|0)+4|0;f[b>>2]=n;e=c;c=n;h=h-m|0}j=32-e|0;i=-1<31){g=~i;e=h;do{m=f[c>>2]|0;n=f[d>>2]|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[n>>2]=p?l|m:l&~m;d=d+1|0}while(d>>>0<(f[k>>2]|0)>>>0)}So(i)}g=g+1|0}while((g|0)<4);l=c+8|0;k=f[l>>2]|0;l=f[l+4>>2]|0;n=c+16|0;e=n;d=f[e>>2]|0;e=f[e+4>>2]|0;m=Hl(d|0,e|0,4,0)|0;g=I;if((l|0)<(g|0)|(l|0)==(g|0)&k>>>0>>0){p=0;u=o;return p|0}i=f[c>>2]|0;c=i+d|0;c=h[c>>0]|h[c+1>>0]<<8|h[c+2>>0]<<16|h[c+3>>0]<<24;p=n;f[p>>2]=m;f[p+4>>2]=g;e=Hl(d|0,e|0,8,0)|0;g=I;if((l|0)<(g|0)|(l|0)==(g|0)&k>>>0>>0){p=0;u=o;return p|0}d=i+m|0;d=h[d>>0]|h[d+1>>0]<<8|h[d+2>>0]<<16|h[d+3>>0]<<24;p=n;f[p>>2]=e;f[p+4>>2]=g;if((c|0)>(d|0)){p=0;u=o;return p|0}f[a+12>>2]=c;f[a+16>>2]=d;p=d+(1-c)|0;f[a+20>>2]=p;d=(p|0)/2|0;e=a+24|0;f[e>>2]=d;f[a+28>>2]=0-d;if(p&1|0){p=1;u=o;return p|0}f[e>>2]=d+-1;p=1;u=o;return p|0}function kd(a,b,c,d){a=a|0;b=b|0;c=c|0;d=d|0;var e=0,g=0,h=0,i=0,j=0,k=0,l=0,m=0,n=0;l=b+12|0;n=f[l>>2]|0;i=(f[c>>2]|0)-n|0;j=c+4|0;g=(f[j>>2]|0)-n|0;e=c;f[e>>2]=i;f[e+4>>2]=g;e=f[l>>2]|0;if((e|0)<(i|0))ra(9889,9190,250,9912);if((e|0)<(g|0))ra(9924,9190,251,9912);h=0-e|0;if((i|0)<(h|0))ra(9947,9190,252,9912);if((g|0)<(h|0))ra(9971,9190,253,9912);m=(((g|0)>-1?g:0-g|0)+((i|0)>-1?i:0-i|0)|0)<=(e|0);if(!m){Xf(b,c,j);i=f[c>>2]|0}if(!i){e=f[j>>2]|0;g=e;e=(e|0)==0}else{e=f[j>>2]|0;g=e;e=(i|0)<0&(e|0)<1}if(!i)k=(g|0)==0?0:(g|0)>0?3:1;else k=(i|0)>0?(g>>31)+2|0:(g|0)<1?0:3;if(e){e=i;i=1}else{switch(k|0){case 1:{e=g;g=0-i|0;break}case 2:{e=0-i|0;g=0-g|0;break}case 3:{e=0-g|0;g=i;break}default:e=i}i=c;f[i>>2]=e;f[i+4>>2]=g;i=0}e=(f[d>>2]|0)+e|0;f[a>>2]=e;g=(f[d+4>>2]|0)+g|0;j=a+4|0;f[j>>2]=g;h=f[l>>2]|0;if((h|0)>=(e|0)){if((e|0)<(0-h|0))e=(f[b+4>>2]|0)+e|0}else e=e-(f[b+4>>2]|0)|0;f[a>>2]=e;if((h|0)>=(g|0)){if((g|0)<(0-h|0))g=(f[b+4>>2]|0)+g|0}else g=g-(f[b+4>>2]|0)|0;f[j>>2]=g;if(!i){switch((4-k|0)%4|0|0){case 1:{h=g;e=0-e|0;break}case 2:{h=0-e|0;e=0-g|0;break}case 3:{h=0-g|0;break}default:{h=e;e=g}}g=a;f[g>>2]=h;f[g+4>>2]=e;g=e;e=h}if(m){m=e;b=g;m=m+n|0;n=b+n|0;b=a;a=b;f[a>>2]=m;b=b+4|0;f[b>>2]=n;return}Xf(b,a,j);m=f[a>>2]|0;b=f[j>>2]|0;m=m+n|0;n=b+n|0;b=a;a=b;f[a>>2]=m;b=b+4|0;f[b>>2]=n;return}function ld(a,c,d){a=a|0;c=c|0;d=d|0;var e=0,g=0,i=0,j=0,k=0,l=0,m=0,n=0,o=0,p=0,q=0,r=0,s=0,t=0,v=0,w=0,x=0,y=0;w=u;u=u+48|0;s=w+40|0;t=w+24|0;p=w+20|0;q=w+16|0;n=w;r=w+8|0;f[t>>2]=0;v=t+4|0;f[v>>2]=0;f[t+8>>2]=0;l=c+8|0;k=f[l>>2]|0;l=f[l+4>>2]|0;o=c+16|0;e=o;m=f[e>>2]|0;e=f[e+4>>2]|0;g=Hl(m|0,e|0,4,0)|0;i=I;a:do if((l|0)<(i|0)|(l|0)==(i|0)&k>>>0>>0)i=0;else{j=f[c>>2]|0;x=j+m|0;x=h[x>>0]|h[x+1>>0]<<8|h[x+2>>0]<<16|h[x+3>>0]<<24;y=o;f[y>>2]=g;f[y+4>>2]=i;b:do switch(x|0){case 3:{if(!((l|0)>(i|0)|(l|0)==(i|0)&k>>>0>g>>>0)){i=0;break a}y=b[j+g>>0]|0;m=Hl(m|0,e|0,5,0)|0;x=o;f[x>>2]=m;f[x+4>>2]=I;f[a+8>>2]=y<<24>>24;if(y<<24>>24==1)if(Sb(a,c,t)|0)break b;else{i=0;break a}else{vj(5154,23,1,f[906]|0)|0;i=0;break a}}case 2:{if(!(Sb(a,c,t)|0)){i=0;break a}break}default:{vj(5178,24,1,f[906]|0)|0;i=0;break a}}while(0);f[p>>2]=f[t>>2];f[q>>2]=f[v>>2];x=d;y=f[x+4>>2]|0;i=n;f[i>>2]=f[x>>2];f[i+4>>2]=y;f[s>>2]=f[n>>2];f[s+4>>2]=f[n+4>>2];Id(r,p,q,a,s);i=1}while(0);e=f[t>>2]|0;if(!e){u=w;return i|0}g=f[v>>2]|0;if((g|0)!=(e|0))f[v>>2]=g+(~(((g+-12-e|0)>>>0)/12|0)*12|0);No(e);u=w;return i|0}function md(a,b,c){a=a|0;b=b|0;c=c|0;var d=0,e=0,g=0,h=0,i=0,j=0,k=0,l=0,m=0,n=0,o=0,p=0,q=0;p=u;u=u+32|0;o=p+8|0;j=p;n=a+4|0;g=f[n>>2]|0;if(g>>>0>=b>>>0){f[n>>2]=b;u=p;return}m=a+8|0;e=f[m>>2]|0;h=e<<5;d=b-g|0;if(h>>>0>>0|g>>>0>(h-d|0)>>>0){f[o>>2]=0;l=o+4|0;f[l>>2]=0;k=o+8|0;f[k>>2]=0;if((b|0)<0)co(a);e=e<<6;b=b+31&-32;mg(o,h>>>0<1073741823?(e>>>0>>0?b:e):2147483647);b=f[n>>2]|0;f[l>>2]=b+d;e=f[a>>2]|0;h=e;g=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(d|0,g|0,1,0)|0;l=p;f[l>>2]=i;f[l+4>>2]=I;if((j[c+38>>1]|0)<514){k=e;e=f[k>>2]|0;k=f[k+4>>2]|0;d=Hl(d|0,g|0,5,0)|0;l=I;if((k|0)<(l|0)|(k|0)==(l|0)&e>>>0>>0)d=0;else{i=(f[c>>2]|0)+i|0;i=h[i>>0]|h[i+1>>0]<<8|h[i+2>>0]<<16|h[i+3>>0]<<24;f[m>>2]=i;g=p;f[g>>2]=d;f[g+4>>2]=l;g=k;k=d;n=7}}else if(Eh(m,c)|0){g=e;l=p;e=f[g>>2]|0;g=f[g+4>>2]|0;k=f[l>>2]|0;l=f[l+4>>2]|0;i=f[m>>2]|0;n=7}else d=0;a:do if((n|0)==7){n=jm(e|0,g|0,k|0,l|0)|0;m=I;if(!(0>(m|0)|0==(m|0)&i>>>0>n>>>0)?(o=(f[c>>2]|0)+k|0,(i|0)>=1):0){f[a>>2]=o;e=i+-1|0;d=o+e|0;switch((h[d>>0]|0)>>>6&3){case 0:{f[a+4>>2]=e;d=b[d>>0]&63;break}case 1:{if((i|0)<2){d=0;break a}f[a+4>>2]=i+-2;d=o+i+-2|0;d=(h[d+1>>0]|0)<<8&16128|(h[d>>0]|0);break}case 2:{if((i|0)<3){d=0;break a}f[a+4>>2]=i+-3;d=o+i+-3|0;d=(h[d+1>>0]|0)<<8|(h[d>>0]|0)|(h[d+2>>0]|0)<<16&4128768;break}default:{d=0;break a}}o=d+4096|0;f[a+8>>2]=o;if(o>>>0<=1048575){a=Hl(k|0,l|0,i|0,0)|0;d=p;f[d>>2]=a;f[d+4>>2]=I;d=1}else d=0}else d=0}while(0);a=d;u=q;return a|0}function od(a){a=a|0;var b=0,c=0,d=0;f[a>>2]=3240;Sh(a+224|0);Bg(a+212|0);b=f[a+196>>2]|0;if(b|0){d=a+200|0;c=f[d>>2]|0;if((c|0)!=(b|0))f[d>>2]=c+(~((c+-4-b|0)>>>2)<<2);No(b)}b=f[a+184>>2]|0;if(b|0){d=a+188|0;c=f[d>>2]|0;if((c|0)!=(b|0))f[d>>2]=c+(~((c+-4-b|0)>>>2)<<2);No(b)}b=f[a+172>>2]|0;if(b|0){d=a+176|0;c=f[d>>2]|0;if((c|0)!=(b|0))f[d>>2]=c+(~((c+-4-b|0)>>>2)<<2);No(b)}b=f[a+160>>2]|0;if(b|0){d=a+164|0;c=f[d>>2]|0;if((c|0)!=(b|0))f[d>>2]=c+(~((c+-4-b|0)>>>2)<<2);No(b)}b=f[a+144>>2]|0;if(b|0)do{d=b;b=f[b>>2]|0;No(d)}while((b|0)!=0);d=a+136|0;b=f[d>>2]|0;f[d>>2]=0;if(b|0)No(b);b=f[a+120>>2]|0;if(b|0)No(b);b=f[a+108>>2]|0;if(b|0)No(b);b=f[a+96>>2]|0;if(b|0)No(b);b=f[a+72>>2]|0;if(b|0){d=a+76|0;c=f[d>>2]|0;if((c|0)!=(b|0))f[d>>2]=c+(~((c+-4-b|0)>>>2)<<2);No(b)}b=f[a+60>>2]|0;if(b|0)No(b);b=f[a+48>>2]|0;if(b|0){d=a+52|0;c=f[d>>2]|0;if((c|0)!=(b|0))f[d>>2]=c+(~((c+-4-b|0)>>>2)<<2);No(b)}b=f[a+36>>2]|0;if(b|0){d=a+40|0;c=f[d>>2]|0;if((c|0)!=(b|0))f[d>>2]=c+(~(((c+-12-b|0)>>>0)/12|0)*12|0);No(b)}b=f[a+24>>2]|0;if(b|0){d=a+28|0;c=f[d>>2]|0;if((c|0)!=(b|0))f[d>>2]=c+(~((c+-4-b|0)>>>2)<<2);No(b)}b=f[a+12>>2]|0;if(b|0){d=a+16|0;c=f[d>>2]|0;if((c|0)!=(b|0))f[d>>2]=c+(~((c+-4-b|0)>>>2)<<2);No(b)}a=a+8|0;b=f[a>>2]|0;f[a>>2]=0;if(!b)return;xg(b);No(b);return}function pd(a){a=a|0;var b=0,c=0,d=0;f[a>>2]=3288;ff(a+224|0);Bg(a+212|0);b=f[a+196>>2]|0;if(b|0){d=a+200|0;c=f[d>>2]|0;if((c|0)!=(b|0))f[d>>2]=c+(~((c+-4-b|0)>>>2)<<2);No(b)}b=f[a+184>>2]|0;if(b|0){d=a+188|0;c=f[d>>2]|0;if((c|0)!=(b|0))f[d>>2]=c+(~((c+-4-b|0)>>>2)<<2);No(b)}b=f[a+172>>2]|0;if(b|0){d=a+176|0;c=f[d>>2]|0;if((c|0)!=(b|0))f[d>>2]=c+(~((c+-4-b|0)>>>2)<<2);No(b)}b=f[a+160>>2]|0;if(b|0){d=a+164|0;c=f[d>>2]|0;if((c|0)!=(b|0))f[d>>2]=c+(~((c+-4-b|0)>>>2)<<2);No(b)}b=f[a+144>>2]|0;if(b|0)do{d=b;b=f[b>>2]|0;No(d)}while((b|0)!=0);d=a+136|0;b=f[d>>2]|0;f[d>>2]=0;if(b|0)No(b);b=f[a+120>>2]|0;if(b|0)No(b);b=f[a+108>>2]|0;if(b|0)No(b);b=f[a+96>>2]|0;if(b|0)No(b);b=f[a+72>>2]|0;if(b|0){d=a+76|0;c=f[d>>2]|0;if((c|0)!=(b|0))f[d>>2]=c+(~((c+-4-b|0)>>>2)<<2);No(b)}b=f[a+60>>2]|0;if(b|0)No(b);b=f[a+48>>2]|0;if(b|0){d=a+52|0;c=f[d>>2]|0;if((c|0)!=(b|0))f[d>>2]=c+(~((c+-4-b|0)>>>2)<<2);No(b)}b=f[a+36>>2]|0;if(b|0){d=a+40|0;c=f[d>>2]|0;if((c|0)!=(b|0))f[d>>2]=c+(~(((c+-12-b|0)>>>0)/12|0)*12|0);No(b)}b=f[a+24>>2]|0;if(b|0){d=a+28|0;c=f[d>>2]|0;if((c|0)!=(b|0))f[d>>2]=c+(~((c+-4-b|0)>>>2)<<2);No(b)}b=f[a+12>>2]|0;if(b|0){d=a+16|0;c=f[d>>2]|0;if((c|0)!=(b|0))f[d>>2]=c+(~((c+-4-b|0)>>>2)<<2);No(b)}a=a+8|0;b=f[a>>2]|0;f[a>>2]=0;if(!b)return;xg(b);No(b);return}function qd(a,c){a=a|0;c=c|0;var d=0,e=0,g=0,h=0,i=0;i=(c|0)==(a|0);b[c+12>>0]=i&1;if(i)return;while(1){h=f[c+8>>2]|0;g=h+12|0;if(b[g>>0]|0){d=23;break}i=h+8|0;e=f[i>>2]|0;d=f[e>>2]|0;if((d|0)==(h|0)){d=f[e+4>>2]|0;if(!d){d=7;break}d=d+12|0;if(!(b[d>>0]|0))c=d;else{d=7;break}}else{if(!d){d=16;break}d=d+12|0;if(!(b[d>>0]|0))c=d;else{d=16;break}}b[g>>0]=1;i=(e|0)==(a|0);b[e+12>>0]=i&1;b[c>>0]=1;if(i){d=23;break}else c=e}if((d|0)==7){if((f[h>>2]|0)==(c|0))c=h;else{a=h+4|0;d=f[a>>2]|0;c=f[d>>2]|0;f[a>>2]=c;if(!c)c=e;else{f[c+8>>2]=h;c=f[i>>2]|0}f[d+8>>2]=c;c=f[i>>2]|0;f[((f[c>>2]|0)==(h|0)?c:c+4|0)>>2]=d;f[d>>2]=h;f[i>>2]=d;c=d;e=f[d+8>>2]|0}b[c+12>>0]=1;b[e+12>>0]=0;c=f[e>>2]|0;g=c+4|0;d=f[g>>2]|0;f[e>>2]=d;if(d|0)f[d+8>>2]=e;i=e+8|0;f[c+8>>2]=f[i>>2];h=f[i>>2]|0;f[((f[h>>2]|0)==(e|0)?h:h+4|0)>>2]=c;f[g>>2]=e;f[i>>2]=c;return}else if((d|0)==16){if((f[h>>2]|0)==(c|0)){g=f[h>>2]|0;d=g+4|0;c=f[d>>2]|0;f[h>>2]=c;if(c){f[c+8>>2]=h;e=f[i>>2]|0}f[g+8>>2]=e;c=f[i>>2]|0;f[((f[c>>2]|0)==(h|0)?c:c+4|0)>>2]=g;f[d>>2]=h;f[i>>2]=g;c=g;e=f[g+8>>2]|0}else c=h;b[c+12>>0]=1;b[e+12>>0]=0;i=e+4|0;c=f[i>>2]|0;d=f[c>>2]|0;f[i>>2]=d;if(d|0)f[d+8>>2]=e;i=e+8|0;f[c+8>>2]=f[i>>2];h=f[i>>2]|0;f[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o;return q|0}function td(a,c,d){a=a|0;c=c|0;d=d|0;var e=0,g=0,i=0,j=0,k=0,l=0,m=0,n=0,o=0,p=0,q=0;o=u;u=u+16|0;n=o+4|0;m=o;i=c+8|0;k=i;e=f[k>>2]|0;k=f[k+4>>2]|0;l=c+16|0;j=l;g=f[j>>2]|0;j=f[j+4>>2]|0;p=Hl(g|0,j|0,4,0)|0;q=I;if((k|0)<(q|0)|(k|0)==(q|0)&e>>>0

>>0)i=k;else{g=(f[c>>2]|0)+g|0;g=h[g>>0]|h[g+1>>0]<<8|h[g+2>>0]<<16|h[g+3>>0]<<24;b[a>>0]=g;b[a+1>>0]=g>>8;b[a+2>>0]=g>>16;b[a+3>>0]=g>>24;g=l;g=Hl(f[g>>2]|0,f[g+4>>2]|0,4,0)|0;j=I;e=l;f[e>>2]=g;f[e+4>>2]=j;e=i;i=f[e+4>>2]|0;e=f[e>>2]|0}k=a+4|0;q=Hl(g|0,j|0,4,0)|0;p=I;if((i|0)<(p|0)|(i|0)==(p|0)&e>>>0>>0)e=f[k>>2]|0;else{e=(f[c>>2]|0)+g|0;e=h[e>>0]|h[e+1>>0]<<8|h[e+2>>0]<<16|h[e+3>>0]<<24;b[k>>0]=e;b[k+1>>0]=e>>8;b[k+2>>0]=e>>16;b[k+3>>0]=e>>24;p=l;p=Hl(f[p>>2]|0,f[p+4>>2]|0,4,0)|0;q=l;f[q>>2]=p;f[q+4>>2]=I}if(!e){q=1;u=o;return q|0}if(!(oe(a+12|0,c)|0)){q=0;u=o;return q|0}if(!(oe(a+32|0,c)|0)){q=0;u=o;return q|0}if(!(oe(a+52|0,c)|0)){q=0;u=o;return q|0}if(!(oe(a+72|0,c)|0)){q=0;u=o;return q|0}q=f[k>>2]|0;f[m>>2]=f[d>>2];f[n>>2]=f[m>>2];gb(a,q,n);q=1;u=o;return q|0}function ud(a,c,d){a=a|0;c=c|0;d=d|0;var e=0,g=0,i=0,j=0,k=0,l=0,m=0,n=0,o=0,p=0,q=0;o=u;u=u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2]=g+(~((g+-4-i|0)>>>2)<<2)}else{Af(j,m-l|0,3160);m=f[k>>2]|0;d=m;m=f[m+80>>2]|0}o=(f[d+100>>2]|0)-(f[d+96>>2]|0)|0;p=(o|0)/12|0;if((o|0)<=0){r=1;return r|0}o=a+80|0;a=c+68|0;c=q+4|0;n=d+96|0;k=d+100|0;l=0;while(1){d=f[n>>2]|0;if((l|0)>=(((f[k>>2]|0)-d|0)/12|0|0)){e=9;break}h=l*3|0;e=f[q>>2]|0;if((h|0)>=((f[c>>2]|0)-e>>2|0)){e=11;break}i=f[(f[o>>2]|0)+12>>2]|0;e=f[i+(f[e+(h<<2)>>2]<<2)>>2]|0;if(e>>>0>=m>>>0){d=0;e=15;break}if(b[r>>0]|0){e=14;break}j=f[a>>2]|0;f[j+(f[d+(l*12|0)>>2]<<2)>>2]=e;g=h+1|0;e=f[q>>2]|0;if((g|0)>=((f[c>>2]|0)-e>>2|0)){e=11;break}e=f[i+(f[e+(g<<2)>>2]<<2)>>2]|0;if(e>>>0>=m>>>0){d=0;e=15;break}f[j+(f[d+(l*12|0)+4>>2]<<2)>>2]=e;g=h+2|0;e=f[q>>2]|0;if((g|0)>=((f[c>>2]|0)-e>>2|0)){e=11;break}e=f[i+(f[e+(g<<2)>>2]<<2)>>2]|0;if(e>>>0>=m>>>0){d=0;e=15;break}f[j+(f[d+(l*12|0)+8>>2]<<2)>>2]=e;l=l+1|0;if((l|0)>=(p|0)){d=1;e=15;break}}if((e|0)==9)ra(17180,17098,64,17175);else if((e|0)==11)ra(16937,16972,98,17057);else if((e|0)==14)ra(14974,14993,89,15087);else if((e|0)==15)return d|0;return 0}function xd(a,c,d){a=a|0;c=c|0;d=d|0;var e=0,g=0,i=0,j=0,k=0,l=0,m=0,n=0,o=0,p=0,q=0;o=u;u=u+16|0;n=o+8|0;m=o;i=c+8|0;k=i;e=f[k>>2]|0;k=f[k+4>>2]|0;l=c+16|0;j=l;g=f[j>>2]|0;j=f[j+4>>2]|0;p=Hl(g|0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[h>>2]=g+(~((g+-4-i|0)>>>2)<<2)}else{Af(j,m-l|0,3160);m=f[k>>2]|0;d=m;m=f[m+80>>2]|0}o=(f[d+100>>2]|0)-(f[d+96>>2]|0)|0;p=(o|0)/12|0;if((o|0)<=0){r=1;return r|0}o=a+116|0;a=c+68|0;c=q+4|0;n=d+96|0;k=d+100|0;l=0;while(1){d=f[n>>2]|0;if((l|0)>=(((f[k>>2]|0)-d|0)/12|0|0)){e=9;break}h=l*3|0;e=f[q>>2]|0;if((h|0)>=((f[c>>2]|0)-e>>2|0)){e=11;break}i=f[(f[o>>2]|0)+12>>2]|0;e=f[i+(f[e+(h<<2)>>2]<<2)>>2]|0;if(e>>>0>=m>>>0){d=0;e=15;break}if(b[r>>0]|0){e=14;break}j=f[a>>2]|0;f[j+(f[d+(l*12|0)>>2]<<2)>>2]=e;g=h+1|0;e=f[q>>2]|0;if((g|0)>=((f[c>>2]|0)-e>>2|0)){e=11;break}e=f[i+(f[e+(g<<2)>>2]<<2)>>2]|0;if(e>>>0>=m>>>0){d=0;e=15;break}f[j+(f[d+(l*12|0)+4>>2]<<2)>>2]=e;g=h+2|0;e=f[q>>2]|0;if((g|0)>=((f[c>>2]|0)-e>>2|0)){e=11;break}e=f[i+(f[e+(g<<2)>>2]<<2)>>2]|0;if(e>>>0>=m>>>0){d=0;e=15;break}f[j+(f[d+(l*12|0)+8>>2]<<2)>>2]=e;l=l+1|0;if((l|0)>=(p|0)){d=1;e=15;break}}if((e|0)==9)ra(17180,17098,64,17175);else if((e|0)==11)ra(16937,16972,98,17057);else if((e|0)==14)ra(14974,14993,89,15087);else if((e|0)==15)return d|0;return 0}function Ad(a,c,d){a=a|0;c=c|0;d=d|0;var e=0,g=0,i=0,j=0,k=0,l=0,m=0,n=0,o=0,p=0,q=0;o=u;u=u+16|0;n=o+8|0;m=o;i=c+8|0;k=i;e=f[k>>2]|0;k=f[k+4>>2]|0;l=c+16|0;j=l;g=f[j>>2]|0;j=f[j+4>>2]|0;p=H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0)):0)do{g=d+-4|0;f[h>>2]=g;d=f[g>>2]|0;f[g>>2]=0;if(d|0)Sa[f[(f[d>>2]|0)+4>>2]&127](d);d=f[h>>2]|0}while((d|0)!=(i|0))}else Te(l,j-g|0);g=c+8|0;if((j|0)<=0){a=1;u=m;return a|0}i=c+16|0;h=0;while(1){n=g;o=f[n+4>>2]|0;e=i;d=f[e>>2]|0;e=f[e+4>>2]|0;if(!((o|0)>(e|0)|((o|0)==(e|0)?(f[n>>2]|0)>>>0>d>>>0:0))){d=0;e=19;break}o=b[(f[c>>2]|0)+d>>0]|0;d=Hl(d|0,e|0,1,0)|0;n=i;f[n>>2]=d;f[n+4>>2]=I;Ua[f[(f[a>>2]|0)+48>>2]&15](k,a,o);o=(f[l>>2]|0)+(h<<2)|0;n=f[k>>2]|0;f[k>>2]=0;d=f[o>>2]|0;f[o>>2]=n;if(d|0)Sa[f[(f[d>>2]|0)+4>>2]&127](d);d=f[k>>2]|0;f[k>>2]=0;if(d|0)Sa[f[(f[d>>2]|0)+4>>2]&127](d);d=f[(f[l>>2]|0)+(h<<2)>>2]|0;if(!d){d=0;e=19;break}e=f[(f[d>>2]|0)+8>>2]|0;n=Na[f[(f[a>>2]|0)+28>>2]&127](a)|0;o=Oa[f[(f[a>>2]|0)+20>>2]&127](a,h)|0;h=h+1|0;if(!(Pa[e&31](d,n,o)|0)){d=0;e=19;break}if((h|0)>=(j|0)){d=1;e=19;break}}if((e|0)==19){u=m;return d|0}return 0}function Dd(a,b){a=a|0;b=b|0;var c=0,d=0,e=0,g=0,h=0,i=0,k=0,l=0,m=0,n=0;l=u;u=u+16|0;h=l;c=a+40|0;d=c;e=a;g=d+40|0;do{f[d>>2]=f[e>>2];d=d+4|0;e=e+4|0}while((d|0)<(g|0));if(bf(c,1,h)|0){d=a;e=c;g=d+40|0;do{f[d>>2]=f[e>>2];d=d+4|0;e=e+4|0}while((d|0)<(g|0));g=h;e=f[g>>2]|0;g=f[g+4>>2]|0;i=a+8|0;m=i;k=a+16|0;d=k;c=f[d>>2]|0;d=f[d+4>>2]|0;m=jm(f[m>>2]|0,f[m+4>>2]|0,c|0,d|0)|0;n=I;if(!(g>>>0>n>>>0|(g|0)==(n|0)&e>>>0>m>>>0)){m=Hl(c|0,d|0,e|0,g|0)|0;n=k;f[n>>2]=m;f[n+4>>2]=I;do if((j[a+38>>1]|0)<514){c=a+96|0;d=c;e=a;g=d+40|0;do{f[d>>2]=f[e>>2];d=d+4|0;e=e+4|0}while((d|0)<(g|0));if(bf(c,1,h)|0){d=a;e=c;g=d+40|0;do{f[d>>2]=f[e>>2];d=d+4|0;e=e+4|0}while((d|0)<(g|0));g=h;e=f[g>>2]|0;g=f[g+4>>2]|0;n=i;d=k;c=f[d>>2]|0;d=f[d+4>>2]|0;n=jm(f[n>>2]|0,f[n+4>>2]|0,c|0,d|0)|0;m=I;if(!(g>>>0>m>>>0|(g|0)==(m|0)&e>>>0>n>>>0)){m=Hl(c|0,d|0,e|0,g|0)|0;n=k;f[n>>2]=m;f[n+4>>2]=I;break}}n=0;u=l;return n|0}else nd(a+80|0,a)|0;while(0);if(!(Eg(a)|0)){n=0;u=l;return n|0}d=b;e=a;g=d+40|0;do{f[d>>2]=f[e>>2];d=d+4|0;e=e+4|0}while((d|0)<(g|0));n=1;u=l;return n|0}}n=0;u=l;return n|0}function Ed(a,c,d){a=a|0;c=c|0;d=d|0;var e=0,g=0,h=0,i=0,j=0,k=0,l=0,m=0,n=0;n=u;u=u+144|0;i=n+136|0;m=n+32|0;l=n;e=f[(f[c+4>>2]|0)+44>>2]|0;h=Rk(124)|0;f[h+4>>2]=0;f[h>>2]=3172;f[h+12>>2]=3196;f[h+100>>2]=0;f[h+104>>2]=0;f[h+108>>2]=0;j=h+16|0;k=j+80|0;do{f[j>>2]=0;j=j+4|0}while((j|0)<(k|0));f[h+112>>2]=e;f[h+116>>2]=d;f[h+120>>2]=0;g=h;f[m+4>>2]=3196;f[m+92>>2]=0;f[m+96>>2]=0;f[m+100>>2]=0;j=m+8|0;k=j+80|0;do{f[j>>2]=0;j=j+4|0}while((j|0)<(k|0));k=f[c+8>>2]|0;f[l>>2]=3196;j=l+4|0;c=j+4|0;f[c>>2]=0;f[c+4>>2]=0;f[c+8>>2]=0;f[c+12>>2]=0;f[c+16>>2]=0;f[c+20>>2]=0;c=k;f[j>>2]=c;c=((f[c+4>>2]|0)-(f[k>>2]|0)>>2>>>0)/3|0;b[i>>0]=0;pf(l+8|0,c,i);Sa[f[(f[l>>2]|0)+8>>2]&127](l);f[m>>2]=f[j>>2];ye(m+4|0,l)|0;f[m+36>>2]=k;f[m+40>>2]=d;f[m+44>>2]=e;f[m+48>>2]=h;Qe(h,m);f[a>>2]=g;f[l>>2]=3196;e=f[l+20>>2]|0;if(e|0)No(e);e=f[l+8>>2]|0;if(!e){Jg(m);u=n;return}No(e);Jg(m);u=n;return}function Fd(a,b){a=a|0;b=b|0;var c=0,d=0,e=0,g=0,h=0,i=0,j=0,k=0,l=0,m=0,n=0,o=0,p=0,q=0,r=0,s=0,t=0,v=0;v=u;u=u+16|0;q=v+4|0;r=v;d=f[b>>2]|0;f[q>>2]=d;n=a+8|0;c=(d|0)<0;b=d+1|0;do if(!c){f[q+4>>2]=((b|0)%3|0|0)==0?d+-2|0:b;if(!((d>>>0)%3|0)){b=d+2|0;break}else{b=d+-1|0;break}}else{f[q+4>>2]=d;b=d}while(0);f[q+8>>2]=b;m=c?-1073741824:(d>>>0)/3|0;l=a+212|0;k=a+216|0;j=a+360|0;b=0;while(1){if((d|0)>=0?(s=f[(f[(f[n>>2]|0)+12>>2]|0)+(d<<2)>>2]|0,(s|0)>=0):0){if(((s>>>0)/3|0|0)>=(m|0)?(f[k>>2]|0)!=(f[l>>2]|0):0){g=0;do{if(Hi((f[j>>2]|0)+(g<<4)|0)|0){c=f[l>>2]|0;f[r>>2]=d;e=c+(g*116|0)+108|0;a=f[e>>2]|0;if(a>>>0<(f[c+(g*116|0)+112>>2]|0)>>>0){f[a>>2]=d;f[e>>2]=a+4}else Og(c+(g*116|0)+104|0,r)}g=g+1|0}while(g>>>0<(((f[k>>2]|0)-(f[l>>2]|0)|0)/116|0)>>>0)}}else t=10;if((t|0)==10?(t=0,o=f[k>>2]|0,p=f[l>>2]|0,(o|0)!=(p|0)):0){c=o;a=p;i=0;do{g=a;f[r>>2]=d;h=g+(i*116|0)+108|0;e=f[h>>2]|0;if(e>>>0<(f[g+(i*116|0)+112>>2]|0)>>>0){f[e>>2]=d;f[h>>2]=e+4}else{Og(g+(i*116|0)+104|0,r);a=f[l>>2]|0;c=f[k>>2]|0}i=i+1|0}while(i>>>0<((c-a|0)/116|0)>>>0)}b=b+1|0;if((b|0)==3)break;d=f[q+(b<<2)>>2]|0}u=v;return 1}function Gd(a,b){a=a|0;b=b|0;var c=0,d=0,e=0,g=0,h=0,i=0,j=0,k=0,l=0,m=0,n=0,o=0,p=0,q=0,r=0,s=0,t=0,v=0;v=u;u=u+16|0;q=v+4|0;r=v;d=f[b>>2]|0;f[q>>2]=d;n=a+8|0;c=(d|0)<0;b=d+1|0;do if(!c){f[q+4>>2]=((b|0)%3|0|0)==0?d+-2|0:b;if(!((d>>>0)%3|0)){b=d+2|0;break}else{b=d+-1|0;break}}else{f[q+4>>2]=d;b=d}while(0);f[q+8>>2]=b;m=c?-1073741824:(d>>>0)/3|0;l=a+212|0;k=a+216|0;j=a+360|0;b=0;while(1){if((d|0)>=0?(s=f[(f[(f[n>>2]|0)+12>>2]|0)+(d<<2)>>2]|0,(s|0)>=0):0){if(((s>>>0)/3|0|0)>=(m|0)?(f[k>>2]|0)!=(f[l>>2]|0):0){g=0;do{if(Hi((f[j>>2]|0)+(g<<4)|0)|0){c=f[l>>2]|0;f[r>>2]=d;e=c+(g*116|0)+108|0;a=f[e>>2]|0;if(a>>>0<(f[c+(g*116|0)+112>>2]|0)>>>0){f[a>>2]=d;f[e>>2]=a+4}else Og(c+(g*116|0)+104|0,r)}g=g+1|0}while(g>>>0<(((f[k>>2]|0)-(f[l>>2]|0)|0)/116|0)>>>0)}}else t=10;if((t|0)==10?(t=0,o=f[k>>2]|0,p=f[l>>2]|0,(o|0)!=(p|0)):0){c=o;a=p;i=0;do{e=a;f[r>>2]=d;h=e+(i*116|0)+108|0;g=f[h>>2]|0;if(g>>>0<(f[e+(i*116|0)+112>>2]|0)>>>0){f[g>>2]=d;f[h>>2]=g+4}else{Og(e+(i*116|0)+104|0,r);a=f[l>>2]|0;c=f[k>>2]|0}i=i+1|0}while(i>>>0<((c-a|0)/116|0)>>>0)}b=b+1|0;if((b|0)==3)break;d=f[q+(b<<2)>>2]|0}u=v;return 1}function Hd(a,c){a=a|0;c=c|0;var d=0,e=0,g=0,h=0,i=0,j=0;j=u;u=u+16|0;g=j+12|0;h=j;i=Rk(52)|0;f[i>>2]=0;f[i+4>>2]=0;f[i+8>>2]=0;f[i+12>>2]=0;n[i+16>>2]=$(1.0);e=i+20|0;f[e>>2]=0;f[e+4>>2]=0;f[e+8>>2]=0;f[e+12>>2]=0;n[i+36>>2]=$(1.0);f[i+40>>2]=0;f[i+44>>2]=0;f[i+48>>2]=0;no(g);if(cf(g,f[c+32>>2]|0,i)|0){g=(f[c+4>>2]|0)+4|0;h=f[g>>2]|0;f[g>>2]=i;if(h|0){e=h+40|0;c=f[e>>2]|0;if(c|0){g=h+44|0;d=f[g>>2]|0;if((d|0)!=(c|0)){do{i=d+-4|0;f[g>>2]=i;d=f[i>>2]|0;f[i>>2]=0;if(d|0){Rg(d);No(d)}d=f[g>>2]|0}while((d|0)!=(c|0));c=f[e>>2]|0}No(c)}Rg(h);No(h)}f[a>>2]=0;f[a+4>>2]=0;f[a+8>>2]=0;f[a+12>>2]=0;u=j;return}else{f[h>>2]=0;f[h+4>>2]=0;f[h+8>>2]=0;c=Rk(32)|0;f[h>>2]=c;f[h+8>>2]=-2147483616;f[h+4>>2]=26;d=c;e=16180;g=d+26|0;do{b[d>>0]=b[e>>0]|0;d=d+1|0;e=e+1|0}while((d|0)<(g|0));b[c+26>>0]=0;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>31|0,B|0,f[C+4>>2]|0)|0;ef((f[f[l>>2]>>2]|0)+c|0,v|0,B|0)|0;e=e+12|0}while((e|0)!=(f[d>>2]|0));B=g;g=B;g=f[g>>2]|0;B=B+4|0;B=f[B>>2]|0;C=a;v=C;f[v>>2]=g;C=C+4|0;f[C>>2]=B;u=w;return}function Jd(a,c){a=a|0;c=c|0;var d=0,e=0,g=0,h=0,i=0,j=0,k=0,l=0;if(!(f[a+64>>2]|0)){d=Rk(32)|0;dl(d);h=a+64|0;g=f[h>>2]|0;f[h>>2]=d;if(g){d=f[g>>2]|0;if(d|0){e=g+4|0;if((f[e>>2]|0)!=(d|0))f[e>>2]=d;No(d)}No(g);d=f[h>>2]|0}yi(a,d,0,0,0,0);d=a}else d=a;if(!(eh(d,c)|0))return;b[a+84>>0]=b[c+84>>0]|0;f[a+80>>2]=f[c+80>>2];if((a|0)!=(c|0))Be(a+68|0,f[c+68>>2]|0,f[c+72>>2]|0);i=f[c+88>>2]|0;if(!i){a=a+88|0;d=f[a>>2]|0;f[a>>2]=0;if(!d)return;e=f[d+8>>2]|0;if(e|0){g=d+12|0;if((f[g>>2]|0)!=(e|0))f[g>>2]=e;No(e)}No(d);return}l=Rk(40)|0;f[l>>2]=f[i>>2];e=l+8|0;g=i+8|0;f[e>>2]=0;j=l+12|0;f[j>>2]=0;d=l+16|0;f[d>>2]=0;c=i+12|0;h=(f[c>>2]|0)-(f[g>>2]|0)|0;if(h|0){if((h|0)<0)co(e);k=Rk(h)|0;f[j>>2]=k;f[e>>2]=k;f[d>>2]=k+h;e=f[g>>2]|0;d=(f[c>>2]|0)-e|0;if((d|0)>0){ef(k|0,e|0,d|0)|0;f[j>>2]=k+d}}g=l+24|0;k=i+24|0;f[g>>2]=f[k>>2];f[g+4>>2]=f[k+4>>2];f[g+8>>2]=f[k+8>>2];f[g+12>>2]=f[k+12>>2];a=a+88|0;g=f[a>>2]|0;f[a>>2]=l;if(!g)return;d=f[g+8>>2]|0;if(d|0){e=g+12|0;if((f[e>>2]|0)!=(d|0))f[e>>2]=d;No(d)}No(g);return}function Kd(a,b,c){a=a|0;b=b|0;c=c|0;var d=0,e=0,g=0.0;a:do if(b>>>0<=20)do switch(b|0){case 9:{d=(f[c>>2]|0)+(4-1)&~(4-1);b=f[d>>2]|0;f[c>>2]=d+4;f[a>>2]=b;break a}case 10:{d=(f[c>>2]|0)+(4-1)&~(4-1);b=f[d>>2]|0;f[c>>2]=d+4;d=a;f[d>>2]=b;f[d+4>>2]=((b|0)<0)<<31>>31;break a}case 11:{d=(f[c>>2]|0)+(4-1)&~(4-1);b=f[d>>2]|0;f[c>>2]=d+4;d=a;f[d>>2]=b;f[d+4>>2]=0;break a}case 12:{d=(f[c>>2]|0)+(8-1)&~(8-1);b=d;e=f[b>>2]|0;b=f[b+4>>2]|0;f[c>>2]=d+8;d=a;f[d>>2]=e;f[d+4>>2]=b;break a}case 13:{e=(f[c>>2]|0)+(4-1)&~(4-1);d=f[e>>2]|0;f[c>>2]=e+4;d=(d&65535)<<16>>16;e=a;f[e>>2]=d;f[e+4>>2]=((d|0)<0)<<31>>31;break a}case 14:{e=(f[c>>2]|0)+(4-1)&~(4-1);d=f[e>>2]|0;f[c>>2]=e+4;e=a;f[e>>2]=d&65535;f[e+4>>2]=0;break a}case 15:{e=(f[c>>2]|0)+(4-1)&~(4-1);d=f[e>>2]|0;f[c>>2]=e+4;d=(d&255)<<24>>24;e=a;f[e>>2]=d;f[e+4>>2]=((d|0)<0)<<31>>31;break a}case 16:{e=(f[c>>2]|0)+(4-1)&~(4-1);d=f[e>>2]|0;f[c>>2]=e+4;e=a;f[e>>2]=d&255;f[e+4>>2]=0;break a}case 17:{e=(f[c>>2]|0)+(8-1)&~(8-1);g=+p[e>>3];f[c>>2]=e+8;p[a>>3]=g;break a}case 18:{e=(f[c>>2]|0)+(8-1)&~(8-1);g=+p[e>>3];f[c>>2]=e+8;p[a>>3]=g;break a}default:break a}while(0);while(0);return}function Ld(a,b){a=a|0;b=b|0;var c=0,d=0,e=0,g=0,h=0,i=0,j=0,k=0,l=0,m=0,n=0,o=0,p=0,q=0,r=0,s=0;s=u;u=u+16|0;p=s+4|0;q=s;c=f[b>>2]|0;f[p>>2]=c;m=a+8|0;b=c+1|0;do if((c|0)>=0){f[p+4>>2]=((b|0)%3|0|0)==0?c+-2|0:b;if(!((c>>>0)%3|0)){b=c+2|0;break}else{b=c+-1|0;break}}else{f[p+4>>2]=c;b=c}while(0);f[p+8>>2]=b;l=a+212|0;k=a+216|0;j=a+360|0;b=0;while(1){if((c|0)>=0?(f[(f[(f[m>>2]|0)+12>>2]|0)+(c<<2)>>2]|0)>=0:0){if((f[k>>2]|0)!=(f[l>>2]|0)){g=0;do{if(Hi((f[j>>2]|0)+(g<<4)|0)|0){a=f[l>>2]|0;f[q>>2]=c;e=a+(g*116|0)+108|0;d=f[e>>2]|0;if(d>>>0<(f[a+(g*116|0)+112>>2]|0)>>>0){f[d>>2]=c;f[e>>2]=d+4}else Og(a+(g*116|0)+104|0,q)}g=g+1|0}while(g>>>0<(((f[k>>2]|0)-(f[l>>2]|0)|0)/116|0)>>>0)}}else r=11;if((r|0)==11?(r=0,n=f[k>>2]|0,o=f[l>>2]|0,(n|0)!=(o|0)):0){a=o;d=n;i=0;do{e=a;f[q>>2]=c;h=e+(i*116|0)+108|0;g=f[h>>2]|0;if(g>>>0<(f[e+(i*116|0)+112>>2]|0)>>>0){f[g>>2]=c;f[h>>2]=g+4}else{Og(e+(i*116|0)+104|0,q);a=f[l>>2]|0;d=f[k>>2]|0}i=i+1|0}while(i>>>0<((d-a|0)/116|0)>>>0)}b=b+1|0;if((b|0)==3)break;c=f[p+(b<<2)>>2]|0}u=s;return 1}function Md(a,c){a=a|0;c=c|0;var d=0,e=0,g=0,h=0,i=0,j=0,k=0,l=0,m=0,n=0;g=f[c>>2]|0;i=f[a>>2]|0;m=i+(g>>>5<<2)|0;f[m>>2]=f[m>>2]|1<<(g&31);m=f[a+64>>2]|0;h=(g|0)<0;c=g+1|0;do if(!h?(d=((c|0)%3|0|0)==0?g+-2|0:c,(d|0)>=0):0){c=f[m>>2]|0;if((d|0)<((f[m+4>>2]|0)-c>>2|0)){e=f[c+(d<<2)>>2]|0;break}else ra(16937,16972,98,17057)}else e=-1073741824;while(0);k=a+12|0;d=(f[k>>2]|0)+(e>>>5<<2)|0;f[d>>2]=f[d>>2]|1<<(e&31);if(h){n=(f[k>>2]|0)+402653184|0;f[n>>2]=f[n>>2]|1;return}d=(((g>>>0)%3|0|0)==0?2:-1)+g|0;do if((d|0)>=0){c=f[m>>2]|0;if((d|0)<((f[m+4>>2]|0)-c>>2|0)){j=f[c+(d<<2)>>2]|0;break}else ra(16937,16972,98,17057)}else j=-1073741824;while(0);e=(f[k>>2]|0)+(j>>>5<<2)|0;f[e>>2]=f[e>>2]|1<<(j&31);if(h)return;e=f[(f[m+12>>2]|0)+(g<<2)>>2]|0;if((e|0)<=-1)return;b[a+24>>0]=0;d=i+(e>>>5<<2)|0;f[d>>2]=f[d>>2]|1<<(e&31);d=e+1|0;d=((d|0)%3|0|0)==0?e+-2|0:d;do if((d|0)>=0){c=f[m>>2]|0;if((d|0)<((f[m+4>>2]|0)-c>>2|0)){l=f[c+(d<<2)>>2]|0;break}else ra(16937,16972,98,17057)}else l=-1073741824;while(0);d=(f[k>>2]|0)+(l>>>5<<2)|0;f[d>>2]=f[d>>2]|1<<(l&31);d=(((e>>>0)%3|0|0)==0?2:-1)+e|0;do if((d|0)>=0){c=f[m>>2]|0;if((d|0)<((f[m+4>>2]|0)-c>>2|0)){n=f[c+(d<<2)>>2]|0;break}else ra(16937,16972,98,17057)}else n=-1073741824;while(0);m=(f[k>>2]|0)+(n>>>5<<2)|0;f[m>>2]=f[m>>2]|1<<(n&31);return}function Nd(a,c,d){a=a|0;c=c|0;d=d|0;var e=0,g=0,h=0,i=0,j=0,k=0,l=0,m=0,n=0,o=0,p=0,q=0,r=0,s=0,t=0;t=u;u=u+32|0;n=t+20|0;m=t+16|0;s=t;r=c+24|0;k=b[r>>0]|0;o=k<<24>>24;l=f[a+80>>2]|0;h=X(l,o)|0;f[s>>2]=f[294];f[s+4>>2]=f[295];f[s+8>>2]=f[296];f[s+12>>2]=f[297];g=d+4|0;e=f[g>>2]|0;a=f[d>>2]|0;i=e-a>>2;if(h>>>0<=i>>>0){if(h>>>0>>0?(j=a+(h<<2)|0,(e|0)!=(j|0)):0)f[g>>2]=e+(~((e+-4-j|0)>>>2)<<2)}else vg(d,h-i|0);if((l|0)<=0){s=1;u=t;return s|0}i=c+84|0;h=c+68|0;if(k<<24>>24<=0){e=0;while(1){if(!(b[i>>0]|0))a=f[(f[h>>2]|0)+(e<<2)>>2]|0;else a=e;f[m>>2]=a;k=b[r>>0]|0;f[n>>2]=f[m>>2];if(!(eb(c,n,k,s)|0)){a=0;e=18;break}e=e+1|0;if((e|0)>=(l|0)){a=1;e=18;break}}if((e|0)==18){u=t;return a|0}}else{p=0;q=0}while(1){if(!(b[i>>0]|0))a=f[(f[h>>2]|0)+(q<<2)>>2]|0;else a=q;f[m>>2]=a;k=b[r>>0]|0;f[n>>2]=f[m>>2];if(!(eb(c,n,k,s)|0)){a=0;e=18;break}a=f[d>>2]|0;e=p;g=0;while(1){f[a+(e<<2)>>2]=f[s+(g<<2)>>2];g=g+1|0;if((g|0)==(o|0))break;else e=e+1|0}q=q+1|0;if((q|0)>=(l|0)){a=1;e=18;break}else p=o+p|0}if((e|0)==18){u=t;return a|0}return 0}function Od(a,c,d,e){a=a|0;c=c|0;d=d|0;e=e|0;var g=0,h=0,i=0,j=0,k=0,l=0,m=0,n=0;n=u;u=u+80|0;m=n;g=n+60|0;l=n+40|0;h=m;i=d;j=h+40|0;do{f[h>>2]=f[i>>2];h=h+4|0;i=i+4|0}while((h|0)<(j|0));Yb(a,m,g);if(f[a>>2]|0){m=m+24|0;So(m);u=n;return}k=a+4|0;h=k+11|0;if((b[h>>0]|0)<0)No(f[k>>2]|0);if(b[g+7>>0]|0){f[l>>2]=0;f[l+4>>2]=0;f[l+8>>2]=0;g=Rk(32)|0;f[l>>2]=g;f[l+8>>2]=-2147483616;f[l+4>>2]=27;h=g;i=14727;j=h+27|0;do{b[h>>0]=b[i>>0]|0;h=h+1|0;i=i+1|0}while((h|0)<(j|0));b[g+27>>0]=0;f[a>>2]=-1;lh(k,l);if((b[l+11>>0]|0)<0)No(f[l>>2]|0);m=m+24|0;So(m);u=n;return}af(l,b[g+8>>0]|0);g=f[l>>2]|0;if(!g){j=l+16|0;g=f[j>>2]|0;f[j>>2]=0;lc(a,g,c,d,e);if(!(f[a>>2]|0)){if((b[h>>0]|0)<0)No(f[k>>2]|0);f[a>>2]=0;f[a+4>>2]=0;f[a+8>>2]=0;f[a+12>>2]=0}if(g|0)Sa[f[(f[g>>2]|0)+4>>2]&127](g)}else{f[a>>2]=g;lh(k,l+4|0)}k=l+16|0;g=f[k>>2]|0;f[k>>2]=0;if(g|0)Sa[f[(f[g>>2]|0)+4>>2]&127](g);g=l+4|0;if((b[g+11>>0]|0)<0)No(f[g>>2]|0);m=m+24|0;So(m);u=n;return}function Pd(a,c,d,e){a=a|0;c=c|0;d=d|0;e=e|0;var g=0,h=0,i=0,j=0,k=0,l=0,m=0,n=0;n=u;u=u+80|0;m=n;g=n+60|0;l=n+40|0;h=m;i=d;j=h+40|0;do{f[h>>2]=f[i>>2];h=h+4|0;i=i+4|0}while((h|0)<(j|0));Yb(a,m,g);if(f[a>>2]|0){m=m+24|0;So(m);u=n;return}k=a+4|0;h=k+11|0;if((b[h>>0]|0)<0)No(f[k>>2]|0);if((b[g+7>>0]|0)!=1){f[l>>2]=0;f[l+4>>2]=0;f[l+8>>2]=0;g=Rk(32)|0;f[l>>2]=g;f[l+8>>2]=-2147483616;f[l+4>>2]=20;h=g;i=14706;j=h+20|0;do{b[h>>0]=b[i>>0]|0;h=h+1|0;i=i+1|0}while((h|0)<(j|0));b[g+20>>0]=0;f[a>>2]=-1;lh(k,l);if((b[l+11>>0]|0)<0)No(f[l>>2]|0);m=m+24|0;So(m);u=n;return}Sf(l,b[g+8>>0]|0);g=f[l>>2]|0;if(!g){j=l+16|0;g=f[j>>2]|0;f[j>>2]=0;Uj(a,g,c,d,e);if(!(f[a>>2]|0)){if((b[h>>0]|0)<0)No(f[k>>2]|0);f[a>>2]=0;f[a+4>>2]=0;f[a+8>>2]=0;f[a+12>>2]=0}if(g|0)Sa[f[(f[g>>2]|0)+4>>2]&127](g)}else{f[a>>2]=g;lh(k,l+4|0)}k=l+16|0;g=f[k>>2]|0;f[k>>2]=0;if(g|0)Sa[f[(f[g>>2]|0)+4>>2]&127](g);g=l+4|0;if((b[g+11>>0]|0)<0)No(f[g>>2]|0);m=m+24|0;So(m);u=n;return}function Qd(a,b,c,d,e,g){a=a|0;b=b|0;c=c|0;d=d|0;e=e|0;g=g|0;var h=0,i=0,j=0,k=0,l=0,m=0,n=0;n=u;u=u+32|0;m=n+16|0;l=n;h=f[b+4>>2]|0;if((d|0)<=-1)ra(14612,17288,59,17379);i=f[h+8>>2]|0;if(((f[h+12>>2]|0)-i>>2|0)<=(d|0))ra(17234,17288,60,17379);i=f[i+(d<<2)>>2]|0;do if((c+-1|0)>>>0<6&(Na[f[(f[b>>2]|0)+8>>2]&127](b)|0)==1){j=Na[f[(f[b>>2]|0)+36>>2]&127](b)|0;k=Oa[f[(f[b>>2]|0)+44>>2]&127](b,d)|0;if((j|0)==0|(k|0)==0){f[a>>2]=0;u=n;return}h=Oa[f[(f[b>>2]|0)+40>>2]&127](b,d)|0;if(!h){f[l>>2]=f[b+44>>2];f[l+4>>2]=j;f[l+12>>2]=k;f[l+8>>2]=k+12;dc(a,m,c,i,e,l,g);if(!(f[a>>2]|0)){f[a>>2]=0;break}u=n;return}else{f[l>>2]=f[b+44>>2];f[l+4>>2]=h;f[l+12>>2]=k;f[l+8>>2]=k+12;cc(a,m,c,i,e,l,g);if(!(f[a>>2]|0)){f[a>>2]=0;break}u=n;return}}while(0);f[a>>2]=0;u=n;return}function Rd(a,c){a=a|0;c=c|0;var d=0,e=0,g=0,h=0,i=0,j=0,k=0,l=0,m=0,n=0,o=0,p=0,q=0,r=0;n=f[a+8>>2]|0;k=a+76|0;d=f[k>>2]|0;m=f[d+80>>2]|0;r=c+84|0;b[r>>0]=0;j=c+68|0;h=c+72|0;g=f[h>>2]|0;e=f[j>>2]|0;l=g-e>>2;if(m>>>0<=l>>>0){if(m>>>0>>0?(i=e+(m<<2)|0,(g|0)!=(i|0)):0)f[h>>2]=g+(~((g+-4-i|0)>>>2)<<2)}else{Af(j,m-l|0,3160);m=f[k>>2]|0;d=m;m=f[m+80>>2]|0}p=(f[d+100>>2]|0)-(f[d+96>>2]|0)|0;q=(p|0)/12|0;if((p|0)<=0){r=1;return r|0}p=n+28|0;o=a+80|0;n=c+68|0;a=d+96|0;k=d+100|0;l=0;while(1){d=f[a>>2]|0;if((l|0)>=(((f[k>>2]|0)-d|0)/12|0|0)){e=9;break}i=l*3|0;g=f[p>>2]|0;h=f[(f[o>>2]|0)+12>>2]|0;e=f[h+(f[g+(i<<2)>>2]<<2)>>2]|0;if(e>>>0>=m>>>0){d=0;e=14;break}if(b[r>>0]|0){e=12;break}j=f[n>>2]|0;f[j+(f[d+(l*12|0)>>2]<<2)>>2]=e;e=f[h+(f[g+(i+1<<2)>>2]<<2)>>2]|0;if(e>>>0>=m>>>0){d=0;e=14;break}f[j+(f[d+(l*12|0)+4>>2]<<2)>>2]=e;e=f[h+(f[g+(i+2<<2)>>2]<<2)>>2]|0;if(e>>>0>=m>>>0){d=0;e=14;break}f[j+(f[d+(l*12|0)+8>>2]<<2)>>2]=e;l=l+1|0;if((l|0)>=(q|0)){d=1;e=14;break}}if((e|0)==9)ra(17180,17098,64,17175);else if((e|0)==12)ra(14974,14993,89,15087);else if((e|0)==14)return d|0;return 0}function Sd(a,b){a=a|0;b=b|0;var c=0,d=0,e=0,g=0,h=0,i=0,j=0,k=0;j=u;u=u+16|0;i=j;f[a>>2]=0;f[a+8>>2]=b;Pf(a+12|0);lo(a+524|0);Yl(a+540|0);Yl(a+560|0);Yl(a+580|0);d=a+600|0;f[d>>2]=0;c=a+604|0;f[c>>2]=0;f[a+608>>2]=0;h=(b|0)==0;do if(!h)if(b>>>0>1073741823)co(d);else{e=b<<2;k=Rk(e)|0;f[d>>2]=k;g=k+(b<<2)|0;f[a+608>>2]=g;kh(k|0,0,e|0)|0;f[c>>2]=g;break}while(0);d=a+612|0;f[d>>2]=0;c=a+616|0;f[c>>2]=0;f[a+620>>2]=0;if(!h){g=b<<2;e=Rk(g)|0;f[d>>2]=e;k=e+(b<<2)|0;f[a+620>>2]=k;kh(e|0,0,g|0)|0;f[c>>2]=k}g=b<<5|1;f[i>>2]=0;e=i+4|0;f[e>>2]=0;f[i+8>>2]=0;if(!h){d=b<<2;c=Rk(d)|0;f[i>>2]=c;k=c+(b<<2)|0;f[i+8>>2]=k;kh(c|0,0,d|0)|0;f[e>>2]=k}ci(a+624|0,g,i);c=f[i>>2]|0;if(c|0){d=f[e>>2]|0;if((d|0)!=(c|0))f[e>>2]=d+(~((d+-4-c|0)>>>2)<<2);No(c)}f[i>>2]=0;e=i+4|0;f[e>>2]=0;f[i+8>>2]=0;if(!h){h=b<<2;d=Rk(h)|0;f[i>>2]=d;k=d+(b<<2)|0;f[i+8>>2]=k;kh(d|0,0,h|0)|0;f[e>>2]=k}ci(a+636|0,g,i);c=f[i>>2]|0;if(!c){u=j;return}d=f[e>>2]|0;if((d|0)!=(c|0))f[e>>2]=d+(~((d+-4-c|0)>>>2)<<2);No(c);u=j;return}function Td(a,b){a=a|0;b=b|0;var c=0,d=0,e=0,g=0,h=0,i=0,j=0,k=0,l=0,m=0,n=0,o=0,p=0;o=u;u=u+32|0;m=o+12|0;l=o;d=b*3|0;f[m>>2]=0;n=m+4|0;f[n>>2]=0;f[m+8>>2]=0;do if(d)if(d>>>0>1073741823)co(m);else{j=b*12|0;c=Rk(j)|0;f[m>>2]=c;k=c+(d<<2)|0;f[m+8>>2]=k;kh(c|0,0,j|0)|0;f[n>>2]=k;break}else c=0;while(0);if(mh(d,1,f[a+32>>2]|0,c)|0)if(!b)a=1;else{h=a+44|0;i=l+4|0;j=l+8|0;e=0;g=0;k=0;while(1){f[l>>2]=0;f[l+4>>2]=0;f[l+8>>2]=0;d=f[m>>2]|0;p=f[d+(k<<2)>>2]|0;c=p>>>1;c=((p&1|0)==0?c:0-c|0)+g|0;f[l>>2]=c;p=f[d+(k+1<<2)>>2]|0;a=p>>>1;c=((p&1|0)==0?a:0-a|0)+c|0;f[i>>2]=c;d=f[d+(k+2<<2)>>2]|0;a=d>>>1;g=((d&1|0)==0?a:0-a|0)+c|0;f[j>>2]=g;c=f[h>>2]|0;a=c+100|0;d=f[a>>2]|0;if((d|0)==(f[c+104>>2]|0))rg(c+96|0,l);else{f[d>>2]=f[l>>2];f[d+4>>2]=f[l+4>>2];f[d+8>>2]=f[l+8>>2];f[a>>2]=(f[a>>2]|0)+12}e=e+1|0;if(e>>>0>=b>>>0){a=1;break}else k=k+3|0}}else a=0;c=f[m>>2]|0;if(!c){u=o;return a|0}d=f[n>>2]|0;if((d|0)!=(c|0))f[n>>2]=d+(~((d+-4-c|0)>>>2)<<2);No(c);u=o;return a|0}function Ud(a,b){a=a|0;b=b|0;var c=0,d=0,e=0,g=0,h=0,i=0,j=0;d=f[b>>2]|0;if((d|0)<0){j=-1073741824;return j|0}i=f[(f[(f[a+4>>2]|0)+12>>2]|0)+(d<<2)>>2]|0;if((i|0)<0){j=-1073741824;return j|0}c=d+1|0;c=((c|0)%3|0|0)==0?d+-2|0:c;h=f[a>>2]|0;do if((c|0)!=-1073741824){a=(c|0)/3|0;if((c|0)<=-3)ra(17073,17098,63,17175);b=f[h+96>>2]|0;if((a|0)<(((f[h+100>>2]|0)-b|0)/12|0|0)){g=f[b+(a*12|0)+(((c|0)%3|0)<<2)>>2]|0;break}else ra(17180,17098,64,17175)}else g=-1073741824;while(0);a=(((i>>>0)%3|0|0)==0?2:-1)+i|0;do if((a|0)!=-1073741824){c=(a|0)/3|0;if((a|0)<=-3)ra(17073,17098,63,17175);b=f[h+96>>2]|0;if((c|0)<(((f[h+100>>2]|0)-b|0)/12|0|0)){e=f[b+(c*12|0)+(((a|0)%3|0)<<2)>>2]|0;break}else ra(17180,17098,64,17175)}else e=-1073741824;while(0);if((g|0)!=(e|0)){j=-1073741824;return j|0}c=(((d>>>0)%3|0|0)==0?2:-1)+d|0;a=(c|0)/3|0;if((c|0)<=-3)ra(17073,17098,63,17175);b=f[h+96>>2]|0;if((a|0)>=(((f[h+100>>2]|0)-b|0)/12|0|0))ra(17180,17098,64,17175);c=f[b+(a*12|0)+(((c|0)%3|0)<<2)>>2]|0;d=i+1|0;d=((d|0)%3|0|0)==0?i+-2|0:d;do if((d|0)!=-1073741824){a=(d|0)/3|0;if((d|0)<=-3)ra(17073,17098,63,17175);b=f[h+96>>2]|0;if((a|0)<(((f[h+100>>2]|0)-b|0)/12|0|0)){j=f[b+(a*12|0)+(((d|0)%3|0)<<2)>>2]|0;break}else ra(17180,17098,64,17175)}else j=-1073741824;while(0);j=(c|0)!=(j|0)?-1073741824:i;return j|0}function Vd(a,b,c){a=a|0;b=b|0;c=c|0;var d=0,e=0,g=0,i=0,j=0,k=0,l=0,m=0,n=0,o=0,p=0;n=u;u=u+64|0;m=n;d=m;e=d+40|0;do{f[d>>2]=0;d=d+4|0}while((d|0)<(e|0));do if(Ac(m,b)|0){e=(a|0)==0;if(!e?(f[m+12>>2]|0)==0:0){g=0;break}d=Zc(m,b)|0;if(e|d^1)g=d;else{j=m+44|0;l=m+48|0;i=m+40|0;b=m+16|0;g=m+28|0;d=f[l>>2]|0;k=0;while(1){a:do if(d>>>0<4194304){e=f[j>>2]|0;do{if((e|0)<=0)break a;o=f[i>>2]|0;e=e+-1|0;f[j>>2]=e;d=h[o+e>>0]|0|d<<8;f[l>>2]=d}while(d>>>0<4194304)}while(0);p=d&1048575;o=f[(f[b>>2]|0)+(p<<2)>>2]|0;e=f[g>>2]|0;d=(X(f[e+(o<<3)>>2]|0,d>>>20)|0)+p-(f[e+(o<<3)+4>>2]|0)|0;f[l>>2]=d;f[c+(k<<2)>>2]=o;k=k+1|0;if((k|0)==(a|0)){g=1;break}}}}else g=0;while(0);d=f[m+28>>2]|0;if(d|0){b=m+32|0;e=f[b>>2]|0;if((e|0)!=(d|0))f[b>>2]=e+(~((e+-8-d|0)>>>3)<<3);No(d)}d=f[m+16>>2]|0;if(d|0){b=m+20|0;e=f[b>>2]|0;if((e|0)!=(d|0))f[b>>2]=e+(~((e+-4-d|0)>>>2)<<2);No(d)}b=f[m>>2]|0;if(!b){u=n;return g|0}e=m+4|0;d=f[e>>2]|0;if((d|0)!=(b|0))f[e>>2]=d+(~((d+-4-b|0)>>>2)<<2);No(b);u=n;return g|0}function Wd(a,b,c){a=a|0;b=b|0;c=c|0;var d=0,e=0,g=0,i=0,j=0,k=0,l=0,m=0,n=0,o=0,p=0;n=u;u=u+64|0;m=n;d=m;e=d+40|0;do{f[d>>2]=0;d=d+4|0}while((d|0)<(e|0));do if(Bc(m,b)|0){e=(a|0)==0;if(!e?(f[m+12>>2]|0)==0:0){g=0;break}d=_c(m,b)|0;if(e|d^1)g=d;else{j=m+44|0;l=m+48|0;i=m+40|0;b=m+16|0;g=m+28|0;d=f[l>>2]|0;k=0;while(1){a:do if(d>>>0<2097152){e=f[j>>2]|0;do{if((e|0)<=0)break a;o=f[i>>2]|0;e=e+-1|0;f[j>>2]=e;d=h[o+e>>0]|0|d<<8;f[l>>2]=d}while(d>>>0<2097152)}while(0);p=d&524287;o=f[(f[b>>2]|0)+(p<<2)>>2]|0;e=f[g>>2]|0;d=(X(f[e+(o<<3)>>2]|0,d>>>19)|0)+p-(f[e+(o<<3)+4>>2]|0)|0;f[l>>2]=d;f[c+(k<<2)>>2]=o;k=k+1|0;if((k|0)==(a|0)){g=1;break}}}}else g=0;while(0);d=f[m+28>>2]|0;if(d|0){b=m+32|0;e=f[b>>2]|0;if((e|0)!=(d|0))f[b>>2]=e+(~((e+-8-d|0)>>>3)<<3);No(d)}d=f[m+16>>2]|0;if(d|0){b=m+20|0;e=f[b>>2]|0;if((e|0)!=(d|0))f[b>>2]=e+(~((e+-4-d|0)>>>2)<<2);No(d)}b=f[m>>2]|0;if(!b){u=n;return g|0}e=m+4|0;d=f[e>>2]|0;if((d|0)!=(b|0))f[e>>2]=d+(~((d+-4-b|0)>>>2)<<2);No(b);u=n;return g|0}function Xd(a,b,c){a=a|0;b=b|0;c=c|0;var d=0,e=0,g=0,i=0,j=0,k=0,l=0,m=0,n=0,o=0,p=0;n=u;u=u+64|0;m=n;d=m;e=d+40|0;do{f[d>>2]=0;d=d+4|0}while((d|0)<(e|0));do if(Cc(m,b)|0){e=(a|0)==0;if(!e?(f[m+12>>2]|0)==0:0){g=0;break}d=$c(m,b)|0;if(e|d^1)g=d;else{j=m+44|0;l=m+48|0;i=m+40|0;b=m+16|0;g=m+28|0;d=f[l>>2]|0;k=0;while(1){a:do if(d>>>0<1048576){e=f[j>>2]|0;do{if((e|0)<=0)break a;o=f[i>>2]|0;e=e+-1|0;f[j>>2]=e;d=h[o+e>>0]|0|d<<8;f[l>>2]=d}while(d>>>0<1048576)}while(0);p=d&262143;o=f[(f[b>>2]|0)+(p<<2)>>2]|0;e=f[g>>2]|0;d=(X(f[e+(o<<3)>>2]|0,d>>>18)|0)+p-(f[e+(o<<3)+4>>2]|0)|0;f[l>>2]=d;f[c+(k<<2)>>2]=o;k=k+1|0;if((k|0)==(a|0)){g=1;break}}}}else g=0;while(0);d=f[m+28>>2]|0;if(d|0){b=m+32|0;e=f[b>>2]|0;if((e|0)!=(d|0))f[b>>2]=e+(~((e+-8-d|0)>>>3)<<3);No(d)}d=f[m+16>>2]|0;if(d|0){b=m+20|0;e=f[b>>2]|0;if((e|0)!=(d|0))f[b>>2]=e+(~((e+-4-d|0)>>>2)<<2);No(d)}b=f[m>>2]|0;if(!b){u=n;return g|0}e=m+4|0;d=f[e>>2]|0;if((d|0)!=(b|0))f[e>>2]=d+(~((d+-4-b|0)>>>2)<<2);No(b);u=n;return g|0}function Yd(a,b,c){a=a|0;b=b|0;c=c|0;var d=0,e=0,g=0,i=0,j=0,k=0,l=0,m=0,n=0,o=0,p=0;n=u;u=u+64|0;m=n;d=m;e=d+40|0;do{f[d>>2]=0;d=d+4|0}while((d|0)<(e|0));do if(Dc(m,b)|0){e=(a|0)==0;if(!e?(f[m+12>>2]|0)==0:0){g=0;break}d=ad(m,b)|0;if(e|d^1)g=d;else{j=m+44|0;l=m+48|0;i=m+40|0;b=m+16|0;g=m+28|0;d=f[l>>2]|0;k=0;while(1){a:do if(d>>>0<262144){e=f[j>>2]|0;do{if((e|0)<=0)break a;o=f[i>>2]|0;e=e+-1|0;f[j>>2]=e;d=h[o+e>>0]|0|d<<8;f[l>>2]=d}while(d>>>0<262144)}while(0);p=d&65535;o=f[(f[b>>2]|0)+(p<<2)>>2]|0;e=f[g>>2]|0;d=(X(f[e+(o<<3)>>2]|0,d>>>16)|0)+p-(f[e+(o<<3)+4>>2]|0)|0;f[l>>2]=d;f[c+(k<<2)>>2]=o;k=k+1|0;if((k|0)==(a|0)){g=1;break}}}}else g=0;while(0);d=f[m+28>>2]|0;if(d|0){b=m+32|0;e=f[b>>2]|0;if((e|0)!=(d|0))f[b>>2]=e+(~((e+-8-d|0)>>>3)<<3);No(d)}d=f[m+16>>2]|0;if(d|0){b=m+20|0;e=f[b>>2]|0;if((e|0)!=(d|0))f[b>>2]=e+(~((e+-4-d|0)>>>2)<<2);No(d)}b=f[m>>2]|0;if(!b){u=n;return g|0}e=m+4|0;d=f[e>>2]|0;if((d|0)!=(b|0))f[e>>2]=d+(~((d+-4-b|0)>>>2)<<2);No(b);u=n;return g|0}function Zd(a,b,c){a=a|0;b=b|0;c=c|0;var d=0,e=0,g=0,i=0,j=0,k=0,l=0,m=0,n=0,o=0,p=0;n=u;u=u+64|0;m=n;d=m;e=d+40|0;do{f[d>>2]=0;d=d+4|0}while((d|0)<(e|0));do if(Ec(m,b)|0){e=(a|0)==0;if(!e?(f[m+12>>2]|0)==0:0){g=0;break}d=bd(m,b)|0;if(e|d^1)g=d;else{j=m+44|0;l=m+48|0;i=m+40|0;b=m+16|0;g=m+28|0;d=f[l>>2]|0;k=0;while(1){a:do if(d>>>0<131072){e=f[j>>2]|0;do{if((e|0)<=0)break a;o=f[i>>2]|0;e=e+-1|0;f[j>>2]=e;d=h[o+e>>0]|0|d<<8;f[l>>2]=d}while(d>>>0<131072)}while(0);p=d&32767;o=f[(f[b>>2]|0)+(p<<2)>>2]|0;e=f[g>>2]|0;d=(X(f[e+(o<<3)>>2]|0,d>>>15)|0)+p-(f[e+(o<<3)+4>>2]|0)|0;f[l>>2]=d;f[c+(k<<2)>>2]=o;k=k+1|0;if((k|0)==(a|0)){g=1;break}}}}else g=0;while(0);d=f[m+28>>2]|0;if(d|0){b=m+32|0;e=f[b>>2]|0;if((e|0)!=(d|0))f[b>>2]=e+(~((e+-8-d|0)>>>3)<<3);No(d)}d=f[m+16>>2]|0;if(d|0){b=m+20|0;e=f[b>>2]|0;if((e|0)!=(d|0))f[b>>2]=e+(~((e+-4-d|0)>>>2)<<2);No(d)}b=f[m>>2]|0;if(!b){u=n;return g|0}e=m+4|0;d=f[e>>2]|0;if((d|0)!=(b|0))f[e>>2]=d+(~((d+-4-b|0)>>>2)<<2);No(b);u=n;return g|0}function _d(a,b,c){a=a|0;b=b|0;c=c|0;var d=0,e=0,g=0,i=0,j=0,k=0,l=0,m=0,n=0,o=0,p=0;n=u;u=u+64|0;m=n;d=m;e=d+40|0;do{f[d>>2]=0;d=d+4|0}while((d|0)<(e|0));do if(Fc(m,b)|0){e=(a|0)==0;if(!e?(f[m+12>>2]|0)==0:0){g=0;break}d=cd(m,b)|0;if(e|d^1)g=d;else{j=m+44|0;l=m+48|0;i=m+40|0;b=m+16|0;g=m+28|0;d=f[l>>2]|0;k=0;while(1){a:do if(d>>>0<32768){e=f[j>>2]|0;do{if((e|0)<=0)break a;o=f[i>>2]|0;e=e+-1|0;f[j>>2]=e;d=h[o+e>>0]|0|d<<8;f[l>>2]=d}while(d>>>0<32768)}while(0);p=d&8191;o=f[(f[b>>2]|0)+(p<<2)>>2]|0;e=f[g>>2]|0;d=(X(f[e+(o<<3)>>2]|0,d>>>13)|0)+p-(f[e+(o<<3)+4>>2]|0)|0;f[l>>2]=d;f[c+(k<<2)>>2]=o;k=k+1|0;if((k|0)==(a|0)){g=1;break}}}}else g=0;while(0);d=f[m+28>>2]|0;if(d|0){b=m+32|0;e=f[b>>2]|0;if((e|0)!=(d|0))f[b>>2]=e+(~((e+-8-d|0)>>>3)<<3);No(d)}d=f[m+16>>2]|0;if(d|0){b=m+20|0;e=f[b>>2]|0;if((e|0)!=(d|0))f[b>>2]=e+(~((e+-4-d|0)>>>2)<<2);No(d)}b=f[m>>2]|0;if(!b){u=n;return g|0}e=m+4|0;d=f[e>>2]|0;if((d|0)!=(b|0))f[e>>2]=d+(~((d+-4-b|0)>>>2)<<2);No(b);u=n;return g|0}function $d(a,b,c){a=a|0;b=b|0;c=c|0;var d=0,e=0,g=0,i=0,j=0,k=0,l=0,m=0,n=0,o=0,p=0;n=u;u=u+64|0;m=n;d=m;e=d+40|0;do{f[d>>2]=0;d=d+4|0}while((d|0)<(e|0));do if(Gc(m,b)|0){e=(a|0)==0;if(!e?(f[m+12>>2]|0)==0:0){g=0;break}d=dd(m,b)|0;if(e|d^1)g=d;else{j=m+44|0;l=m+48|0;i=m+40|0;b=m+16|0;g=m+28|0;d=f[l>>2]|0;k=0;while(1){a:do if(d>>>0<16384){e=f[j>>2]|0;do{if((e|0)<=0)break a;o=f[i>>2]|0;e=e+-1|0;f[j>>2]=e;d=h[o+e>>0]|0|d<<8;f[l>>2]=d}while(d>>>0<16384)}while(0);p=d&4095;o=f[(f[b>>2]|0)+(p<<2)>>2]|0;e=f[g>>2]|0;d=(X(f[e+(o<<3)>>2]|0,d>>>12)|0)+p-(f[e+(o<<3)+4>>2]|0)|0;f[l>>2]=d;f[c+(k<<2)>>2]=o;k=k+1|0;if((k|0)==(a|0)){g=1;break}}}}else g=0;while(0);d=f[m+28>>2]|0;if(d|0){b=m+32|0;e=f[b>>2]|0;if((e|0)!=(d|0))f[b>>2]=e+(~((e+-8-d|0)>>>3)<<3);No(d)}d=f[m+16>>2]|0;if(d|0){b=m+20|0;e=f[b>>2]|0;if((e|0)!=(d|0))f[b>>2]=e+(~((e+-4-d|0)>>>2)<<2);No(d)}b=f[m>>2]|0;if(!b){u=n;return g|0}e=m+4|0;d=f[e>>2]|0;if((d|0)!=(b|0))f[e>>2]=d+(~((d+-4-b|0)>>>2)<<2);No(b);u=n;return g|0}function ae(a,b){a=a|0;b=b|0;var c=0,d=0,e=0,g=0,h=0,i=0,j=0,k=0,l=0,m=0,n=0,o=0;n=u;u=u+32|0;m=n+24|0;k=n+16|0;j=n+8|0;l=n;f[a>>2]=3148;f[a+4>>2]=f[b+4>>2];h=a+8|0;i=b+8|0;f[h>>2]=0;e=a+12|0;f[e>>2]=0;d=a+16|0;f[d>>2]=0;g=b+12|0;c=f[g>>2]|0;do if(c|0)if((c|0)<0)co(h);else{c=((c+-1|0)>>>5)+1|0;o=Rk(c<<2)|0;f[h>>2]=o;f[e>>2]=0;f[d>>2]=c;e=f[i>>2]|0;f[j>>2]=e;f[j+4>>2]=0;i=f[g>>2]|0;f[l>>2]=e+(i>>>5<<2);f[l+4>>2]=i&31;f[k>>2]=f[j>>2];f[k+4>>2]=f[j+4>>2];f[m>>2]=f[l>>2];f[m+4>>2]=f[l+4>>2];Ce(h,k,m);break}while(0);h=a+20|0;f[h>>2]=0;g=a+24|0;f[g>>2]=0;d=a+28|0;f[d>>2]=0;e=b+24|0;c=f[e>>2]|0;if(!c){u=n;return}if((c|0)<0)co(h);o=((c+-1|0)>>>5)+1|0;a=Rk(o<<2)|0;f[h>>2]=a;f[g>>2]=0;f[d>>2]=o;b=f[b+20>>2]|0;f[j>>2]=b;f[j+4>>2]=0;o=f[e>>2]|0;f[l>>2]=b+(o>>>5<<2);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+44>>2]|0;if((e|0)==(o|0)){d=2;t=0;d=(d|0)==2;t=d?0:t;u=v;return t|0}p=t+11|0;r=t+4|0;q=d+11|0;s=d+4|0;a=0;a:while(1){f[t>>2]=0;f[t+4>>2]=0;f[t+8>>2]=0;m=hh(f[e>>2]|0,c,t)|0;n=b[p>>0]|0;b:do if(m){m=n<<24>>24<0;h=n&255;k=m?f[r>>2]|0:h;l=b[q>>0]|0;g=l<<24>>24<0;if((k|0)==((g?f[s>>2]|0:l&255)|0)){j=f[t>>2]|0;l=m?j:t;g=g?f[d>>2]|0:d;i=(k|0)==0;c:do if(m){if(!i?ij(l,g,k)|0:0){g=0;break b}}else if(!i){if((j&255)<<24>>24==(b[g>>0]|0))i=t;else{g=0;break b}while(1){h=h+-1|0;i=i+1|0;if(!h)break c;g=g+1|0;if((b[i>>0]|0)!=(b[g>>0]|0)){g=0;break b}}}while(0);g=1;a=f[e>>2]|0}else g=0}else g=3;while(0);if(n<<24>>24<0)No(f[t>>2]|0);switch(g&3){case 3:case 0:break;default:{e=17;break a}}e=e+4|0;if((e|0)==(o|0)){g=2;e=17;break}}if((e|0)==17){t=(g|0)==2;t=t?0:a;u=v;return t|0}return 0}function de(a,b){a=a|0;b=b|0;var c=0,d=0,e=0,g=0,h=0,i=0,j=0,k=0;j=u;u=u+16|0;i=j;f[a>>2]=0;f[a+8>>2]=b;Yl(a+12|0);Yl(a+32|0);Yl(a+52|0);Yl(a+72|0);d=a+92|0;f[d>>2]=0;c=a+96|0;f[c>>2]=0;f[a+100>>2]=0;h=(b|0)==0;do if(!h)if(b>>>0>1073741823)co(d);else{e=b<<2;k=Rk(e)|0;f[d>>2]=k;g=k+(b<<2)|0;f[a+100>>2]=g;kh(k|0,0,e|0)|0;f[c>>2]=g;break}while(0);d=a+104|0;f[d>>2]=0;c=a+108|0;f[c>>2]=0;f[a+112>>2]=0;if(!h){g=b<<2;e=Rk(g)|0;f[d>>2]=e;k=e+(b<<2)|0;f[a+112>>2]=k;kh(e|0,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[e>>2]=k}ci(a+112|0,g,i);c=f[i>>2]|0;if(c|0){d=f[e>>2]|0;if((d|0)!=(c|0))f[e>>2]=d+(~((d+-4-c|0)>>>2)<<2);No(c)}f[i>>2]=0;e=i+4|0;f[e>>2]=0;f[i+8>>2]=0;if(!h){h=b<<2;d=Rk(h)|0;f[i>>2]=d;k=d+(b<<2)|0;f[i+8>>2]=k;kh(d|0,0,h|0)|0;f[e>>2]=k}ci(a+124|0,g,i);c=f[i>>2]|0;if(!c){u=j;return}d=f[e>>2]|0;if((d|0)!=(c|0))f[e>>2]=d+(~((d+-4-c|0)>>>2)<<2);No(c);u=j;return}function fe(a,c){a=a|0;c=c|0;var d=0,e=0,g=0,h=0,i=0,j=0,k=0,l=0,m=0;l=f[c>>2]|0;m=f[l>>2]|0;g=f[a+4>>2]|0;c=f[l+4>>2]|0;i=g+-1|0;j=(i&g|0)==0;if(!j)if(c>>>0>>0)h=c;else h=(c>>>0)%(g>>>0)|0;else h=i&c;d=(f[a>>2]|0)+(h<<2)|0;k=f[d>>2]|0;while(1){c=f[k>>2]|0;if((c|0)==(l|0))break;else k=c}if((k|0)!=(a+8|0)){c=f[k+4>>2]|0;if(!j){if(c>>>0>=g>>>0)c=(c>>>0)%(g>>>0)|0}else c=c&i;if((c|0)==(h|0)){d=m;e=21}else e=13}else e=13;do if((e|0)==13){if(m|0){c=f[m+4>>2]|0;if(!j){if(c>>>0>=g>>>0)c=(c>>>0)%(g>>>0)|0}else c=c&i;if((c|0)==(h|0)){d=m;c=m;e=22;break}}f[d>>2]=0;d=f[l>>2]|0;e=21}while(0);if((e|0)==21){c=d;if(d)e=22}if((e|0)==22){d=f[d+4>>2]|0;if(!j){if(d>>>0>=g>>>0)d=(d>>>0)%(g>>>0)|0}else d=d&i;if((d|0)!=(h|0)){f[(f[a>>2]|0)+(d<<2)>>2]=k;c=f[l>>2]|0}}f[k>>2]=c;f[l>>2]=0;a=a+12|0;f[a>>2]=(f[a>>2]|0)+-1;if(!l)return m|0;d=l+8|0;c=f[l+20>>2]|0;if(c|0){e=l+24|0;if((f[e>>2]|0)!=(c|0))f[e>>2]=c;No(c)}if((b[d+11>>0]|0)<0)No(f[d>>2]|0);No(l);return m|0}function ge(a,c,d){a=a|0;c=c|0;d=d|0;var e=0,g=0,h=0,i=0,j=0,k=0,l=0,m=0,n=0,o=0,p=0,q=0,r=0;r=u;u=u+32|0;l=r+20|0;k=r+16|0;q=r;p=c+24|0;e=b[p>>0]|0;m=e<<24>>24;h=f[a+80>>2]|0;j=X(h,m)|0;f[q>>2]=0;f[q+4>>2]=0;f[q+8>>2]=0;f[q+12>>2]=0;ue(d,0,0+(j<<2)|0);if((h|0)<=0){q=1;u=r;return q|0}j=c+84|0;i=c+68|0;if(e<<24>>24<=0){e=0;while(1){if(!(b[j>>0]|0))a=f[(f[i>>2]|0)+(e<<2)>>2]|0;else a=e;f[k>>2]=a;g=b[p>>0]|0;f[l>>2]=f[k>>2];if(!(Bb(c,l,g,q)|0)){a=0;e=13;break}e=e+1|0;if((e|0)>=(h|0)){a=1;e=13;break}}if((e|0)==13){u=r;return a|0}}else{n=0;o=0}while(1){if(!(b[j>>0]|0))a=f[(f[i>>2]|0)+(o<<2)>>2]|0;else a=o;f[k>>2]=a;g=b[p>>0]|0;f[l>>2]=f[k>>2];if(!(Bb(c,l,g,q)|0)){a=0;e=13;break}a=f[d>>2]|0;e=n;g=0;while(1){f[a+(e<<2)>>2]=f[q+(g<<2)>>2];g=g+1|0;if((g|0)==(m|0))break;else e=e+1|0}o=o+1|0;if((o|0)>=(h|0)){a=1;e=13;break}else n=m+n|0}if((e|0)==13){u=r;return a|0}return 0}function he(a){a=a|0;var c=0,d=0,e=0,g=0,i=0,j=0,k=0,l=0,m=0,n=0;d=b[(f[a+8>>2]|0)+24>>0]|0;i=Ko(d>>>0>1073741823?-1:d<<2)|0;j=a+28|0;c=f[j>>2]|0;f[j>>2]=i;if(c|0)Lo(c);i=a+4|0;g=f[(f[i>>2]|0)+32>>2]|0;d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2]=0;d=d+4|0}while((d|0)<(e|0));d=(f[h>>2]|0)+116|0;f[h>>2]=d;c=c+-1|0}while((c|0)!=0);u=j;return}e=f[a>>2]|0;h=(d-e|0)/116|0;d=h+c|0;if(d>>>0>37025580)co(a);e=(g-e|0)/116|0;g=e<<1;d=e>>>0<18512790?(g>>>0>>0?d:g):37025580;f[i+12>>2]=0;f[i+16>>2]=a+8;do if(d)if(d>>>0>37025580){j=sa(8)|0;Km(j,17959);f[j>>2]=4748;wa(j|0,1128,100)}else{e=Rk(d*116|0)|0;break}else e=0;while(0);f[i>>2]=e;h=e+(h*116|0)|0;g=i+8|0;f[g>>2]=h;f[i+4>>2]=h;f[i+12>>2]=e+(d*116|0);d=h;do{f[d>>2]=-1;Yj(d+4|0);b[d+72>>0]=1;d=d+76|0;e=d+40|0;do{f[d>>2]=0;d=d+4|0}while((d|0)<(e|0));d=(f[g>>2]|0)+116|0;f[g>>2]=d;c=c+-1|0}while((c|0)!=0);sc(a,i);zg(i);u=j;return}function je(a,c){a=a|0;c=c|0;var d=0,e=0,g=0,h=0,i=0,j=0,k=0,l=0,m=0,n=0,o=0,p=0,q=0;q=u;u=u+32|0;n=q+12|0;o=q;e=gj(c,0)|0;if(!e){f[a>>2]=0;u=q;return}d=f[c+96>>2]|0;c=(f[c+100>>2]|0)-d|0;m=(c|0)/12|0;f[n>>2]=0;p=n+4|0;f[p>>2]=0;f[n+8>>2]=0;if(c){if(m>>>0>357913941)co(n);l=Rk(c)|0;f[n>>2]=l;f[n+8>>2]=l+(m*12|0);kh(l|0,0,c|0)|0;f[p>>2]=l+c;f[o>>2]=0;f[o+4>>2]=0;f[o+8>>2]=0;if((c|0)>0){i=e+68|0;j=o+4|0;k=o+8|0;h=(b[e+84>>0]|0)==0;g=0;do{c=f[d+(g*12|0)>>2]|0;if(h){e=f[i>>2]|0;c=f[e+(c<<2)>>2]|0;f[o>>2]=c;f[j>>2]=f[e+(f[d+(g*12|0)+4>>2]<<2)>>2];e=e+(f[d+(g*12|0)+8>>2]<<2)|0}else{f[o>>2]=c;f[j>>2]=f[d+(g*12|0)+4>>2];e=d+(g*12|0)+8|0}e=f[e>>2]|0;f[k>>2]=e;f[l+(g*12|0)>>2]=c;f[l+(g*12|0)+4>>2]=f[j>>2];f[l+(g*12|0)+8>>2]=e;g=g+1|0}while((g|0)<(m|0))}}else{f[o>>2]=0;f[o+4>>2]=0;f[o+8>>2]=0}oi(a,n);d=f[n>>2]|0;if(d|0){c=f[p>>2]|0;if((c|0)!=(d|0))f[p>>2]=c+(~(((c+-12-d|0)>>>0)/12|0)*12|0);No(d)}u=q;return}function ke(a){a=a|0;var b=0,c=0,d=0,e=0,g=0,h=0,i=0,j=0,k=0,l=0,m=0;m=u;u=u+16|0;j=m+4|0;k=m;l=a+8|0;g=f[l>>2]|0;Qh(f[a+4>>2]|0,(f[g+28>>2]|0)-(f[g+24>>2]|0)>>2);g=a+100|0;h=f[l>>2]|0;h=(f[h+28>>2]|0)-(f[h+24>>2]|0)>>2;f[j>>2]=0;d=a+104|0;b=f[d>>2]|0;c=f[g>>2]|0;i=b-c>>2;if(h>>>0<=i>>>0){if(h>>>0>>0?(e=c+(h<<2)|0,(b|0)!=(e|0)):0)f[d>>2]=b+(~((b+-4-e|0)>>>2)<<2)}else Af(g,h-i|0,j);d=a+120|0;b=f[d>>2]|0;if(!b){a=f[l>>2]|0;a=(f[a+4>>2]|0)-(f[a>>2]|0)>>2;b=(a>>>0)/3|0;if(a>>>0<=2){u=m;return 1}c=0;do{f[k>>2]=c*3;f[j>>2]=f[k>>2];Db(l,j);c=c+1|0}while((c|0)<(b|0));u=m;return 1}else{c=f[b>>2]|0;if((f[b+4>>2]|0)==(c|0)){u=m;return 1}b=0;do{f[k>>2]=f[c+(b<<2)>>2];f[j>>2]=f[k>>2];Db(l,j);b=b+1|0;a=f[d>>2]|0;c=f[a>>2]|0}while(b>>>0<(f[a+4>>2]|0)-c>>2>>>0);u=m;return 1}return 0}function le(a){a=a|0;var b=0,c=0,d=0,e=0,g=0,h=0;g=a+636|0;b=f[g>>2]|0;if(b|0){h=a+640|0;c=f[h>>2]|0;if((c|0)!=(b|0)){do{d=c+-12|0;f[h>>2]=d;e=f[d>>2]|0;if(!e)c=d;else{d=c+-8|0;c=f[d>>2]|0;if((c|0)!=(e|0))f[d>>2]=c+(~((c+-4-e|0)>>>2)<<2);No(e);c=f[h>>2]|0}}while((c|0)!=(b|0));b=f[g>>2]|0}No(b)}g=a+624|0;b=f[g>>2]|0;if(b|0){h=a+628|0;c=f[h>>2]|0;if((c|0)!=(b|0)){do{d=c+-12|0;f[h>>2]=d;e=f[d>>2]|0;if(!e)c=d;else{d=c+-8|0;c=f[d>>2]|0;if((c|0)!=(e|0))f[d>>2]=c+(~((c+-4-e|0)>>>2)<<2);No(e);c=f[h>>2]|0}}while((c|0)!=(b|0));b=f[g>>2]|0}No(b)}b=f[a+612>>2]|0;if(b|0){d=a+616|0;c=f[d>>2]|0;if((c|0)!=(b|0))f[d>>2]=c+(~((c+-4-b|0)>>>2)<<2);No(b)}b=f[a+600>>2]|0;if(!b){h=a+580|0;aj(h);h=a+560|0;aj(h);h=a+540|0;aj(h);h=a+524|0;So(h);a=a+12|0;jh(a);return}d=a+604|0;c=f[d>>2]|0;if((c|0)!=(b|0))f[d>>2]=c+(~((c+-4-b|0)>>>2)<<2);No(b);h=a+580|0;aj(h);h=a+560|0;aj(h);h=a+540|0;aj(h);h=a+524|0;So(h);a=a+12|0;jh(a);return}function me(a,c,d){a=a|0;c=c|0;d=d|0;var e=0,g=0,i=0,j=0,k=0,l=0,m=0,n=0,o=0,p=0;o=u;u=u+16|0;n=o;k=d+8|0;j=f[k>>2]|0;k=f[k+4>>2]|0;l=d+16|0;e=l;g=f[e>>2]|0;e=f[e+4>>2]|0;if((k|0)>(e|0)|(k|0)==(e|0)&j>>>0>g>>>0){i=b[(f[d>>2]|0)+g>>0]|0;g=Hl(g|0,e|0,1,0)|0;e=I;p=l;f[p>>2]=g;f[p+4>>2]=e;if(i<<24>>24!=-2)m=3}else{i=0;m=3}if((m|0)==3){if((k|0)>(e|0)|(k|0)==(e|0)&j>>>0>g>>>0){p=b[(f[d>>2]|0)+g>>0]|0;m=Hl(g|0,e|0,1,0)|0;e=l;f[e>>2]=m;f[e+4>>2]=I;e=p}else e=0;Va[f[(f[a>>2]|0)+40>>2]&7](n,a,i<<24>>24,e<<24>>24);p=a+20|0;m=f[n>>2]|0;f[n>>2]=0;e=f[p>>2]|0;f[p>>2]=m;if(e){Sa[f[(f[e>>2]|0)+4>>2]&127](e);e=f[n>>2]|0;f[n>>2]=0;if(e|0)Sa[f[(f[e>>2]|0)+4>>2]&127](e)}else f[n>>2]=0}e=f[a+20>>2]|0;if(e|0?!(Oa[f[(f[a>>2]|0)+28>>2]&127](a,e)|0):0){p=0;u=o;return p|0}if(!(Pa[f[(f[a>>2]|0)+36>>2]&31](a,c,d)|0)){p=0;u=o;return p|0}e=(f[c+4>>2]|0)-(f[c>>2]|0)>>2;p=f[a+4>>2]|0;if((p|0?((h[p+36>>0]|0)<<8&65535)<512:0)?!(Oa[f[(f[a>>2]|0)+48>>2]&127](a,e)|0):0){p=0;u=o;return p|0}p=1;u=o;return p|0}function ne(a){a=a|0;var c=0,d=0,e=0,g=0,h=0,i=0,j=0;i=a+12|0;h=f[a>>2]|0;j=a+8|0;c=f[j>>2]|0;d=(c|0)<0;if(!(b[i>>0]|0)){do if(!d)if(!((c>>>0)%3|0)){c=c+2|0;break}else{c=c+-1|0;break}while(0);do if(!(1<<(c&31)&f[(f[h>>2]|0)+(c>>>5<<2)>>2])){if((c|0)>=0){c=f[(f[(f[h+64>>2]|0)+12>>2]|0)+(c<<2)>>2]|0;if((c|0)>=0)if(!((c>>>0)%3|0)){c=c+2|0;break}else{c=c+-1|0;break}}}else c=-1073741824;while(0);f[j>>2]=c;return}e=c+1|0;if(!d)c=((e|0)%3|0|0)==0?c+-2|0:e;e=f[h>>2]|0;if(!(1<<(c&31)&f[e+(c>>>5<<2)>>2]))if((c|0)>=0){c=f[(f[(f[h+64>>2]|0)+12>>2]|0)+(c<<2)>>2]|0;d=c+1|0;if((c|0)>=0){c=((d|0)%3|0|0)==0?c+-2|0:d;f[j>>2]=c;if((c|0)>=0){if((c|0)!=(f[a+4>>2]|0))return;f[j>>2]=-1073741824;return}}else g=7}else g=7;else{c=-1073741824;g=7}if((g|0)==7)f[j>>2]=c;c=f[a+4>>2]|0;do if((c|0)>=0)if(!((c>>>0)%3|0)){c=c+2|0;break}else{c=c+-1|0;break}while(0);do if(!(1<<(c&31)&f[e+(c>>>5<<2)>>2])){if((c|0)>=0){c=f[(f[(f[h+64>>2]|0)+12>>2]|0)+(c<<2)>>2]|0;if((c|0)>=0)if(!((c>>>0)%3|0)){c=c+2|0;break}else{c=c+-1|0;break}}}else c=-1073741824;while(0);f[j>>2]=c;b[i>>0]=0;return}function oe(a,b){a=a|0;b=b|0;var c=0,d=0,e=0,g=0,i=0,j=0,k=0,l=0,m=0,n=0,o=0,p=0,q=0,r=0,s=0,t=0;m=f[a>>2]|0;p=a+4|0;c=f[p>>2]|0;l=m;d=c+(~((c+-4-l|0)>>>2)<<2)|0;if((c|0)==(m|0))d=m;else{f[p>>2]=d;c=d}s=a+16|0;f[s>>2]=0;t=a+12|0;f[t>>2]=d;k=b+8|0;d=k;n=f[d>>2]|0;d=f[d+4>>2]|0;r=b+16|0;g=r;i=f[g>>2]|0;g=Hl(i|0,f[g+4>>2]|0,4,0)|0;e=I;if((d|0)<(e|0)|(d|0)==(e|0)&n>>>0>>0){a=0;return a|0}o=(f[b>>2]|0)+i|0;o=h[o>>0]|h[o+1>>0]<<8|h[o+2>>0]<<16|h[o+3>>0]<<24;j=r;f[j>>2]=g;f[j+4>>2]=e;if(!((o|0)!=0&(o&3|0)==0)){a=0;return a|0}j=jm(n|0,d|0,g|0,e|0)|0;i=I;if(0>(i|0)|0==(i|0)&o>>>0>j>>>0){a=0;return a|0}j=o>>>2;i=c-l>>2;if(j>>>0<=i>>>0)if(j>>>0>>0?(q=m+(j<<2)|0,(c|0)!=(q|0)):0){f[p>>2]=c+(~((c+-4-q|0)>>>2)<<2);c=n}else c=n;else{vg(a,j-i|0);c=k;e=r;g=f[e>>2]|0;e=f[e+4>>2]|0;d=f[c+4>>2]|0;c=f[c>>2]|0}q=Hl(g|0,e|0,o|0,0)|0;p=I;if((d|0)<(p|0)|(d|0)==(p|0)&c>>>0>>0){a=0;return a|0}ef(f[a>>2]|0,(f[b>>2]|0)+g|0,o|0)|0;q=r;q=Hl(f[q>>2]|0,f[q+4>>2]|0,o|0,0)|0;b=r;f[b>>2]=q;f[b+4>>2]=I;f[t>>2]=f[a>>2];f[s>>2]=0;a=1;return a|0}function pe(a,b,c,d){a=a|0;b=$(b);c=$(c);d=d|0;var e=La,f=La,g=0.0,h=La,i=La,j=0.0,k=0.0,l=0.0,m=0.0;if(!(b>=$(0.0)))ra(9337,9190,191,9351);if(!(c>=$(0.0)))ra(9380,9190,192,9351);if(!(b<=$(1.0)))ra(9394,9190,193,9351);if(!(c<=$(1.0)))ra(9408,9190,194,9351);f=$(b+c);e=$(b-c);if(!(e<=$(.5))|(!(e>=$(-.5))|(!(f>=$(.5))|!(f<=$(1.5))))){do if(!(f<=$(.5))){if(f>=$(1.5)){e=$($(1.5)-c);c=$($(1.5)-b);break}if(!(e<=$(-.5))){e=$(c+$(.5));c=$(b+$(-.5));break}else{e=$(c+$(-.5));c=$(b+$(.5));break}}else{e=$($(.5)-c);c=$($(.5)-b)}while(0);b=e;i=$(e-c);f=$(c+e);g=-1.0}else{i=e;g=1.0}h=$(+b*2.0+-1.0);b=$(+c*2.0+-1.0);l=+f*2.0;j=l+-1.0;l=3.0-l;m=+i*2.0;k=m+1.0;m=1.0-m;k=m>2]=$(0.0);h=$(0.0);i=$(0.0);a=d+4|0;n[a>>2]=h;d=d+8|0;n[d>>2]=i;return}else{i=$($(1.0)/$(L($(e))));f=$(c*i);n[d>>2]=f;h=$(h*i);i=$(b*i);a=d+4|0;n[a>>2]=h;d=d+8|0;n[d>>2]=i;return}}function qe(a,b){a=a|0;b=b|0;var c=0,d=0,e=0,g=0,h=0,i=0,j=0,k=0,l=0,m=0,n=0;n=u;u=u+32|0;m=n;l=a+8|0;d=f[l>>2]|0;k=a+4|0;c=f[k>>2]|0;if(d-c>>2>>>0>=b>>>0){kh(c|0,0,b<<2|0)|0;f[k>>2]=c+(b<<2);u=n;return}e=f[a>>2]|0;g=c-e>>2;c=g+b|0;if(c>>>0>1073741823)co(a);i=d-e|0;j=i>>1;c=i>>2>>>0<536870911?(j>>>0>>0?c:j):1073741823;f[m+12>>2]=0;f[m+16>>2]=a+8;do if(c)if(c>>>0>1073741823){n=sa(8)|0;Km(n,17959);f[n>>2]=4748;wa(n|0,1128,100)}else{d=Rk(c<<2)|0;break}else d=0;while(0);f[m>>2]=d;g=d+(g<<2)|0;i=m+8|0;h=m+4|0;f[h>>2]=g;j=m+12|0;f[j>>2]=d+(c<<2);kh(g|0,0,b<<2|0)|0;f[i>>2]=g+(b<<2);d=f[a>>2]|0;c=f[k>>2]|0;if((c|0)==(d|0)){g=h;e=f[h>>2]|0}else{e=f[h>>2]|0;do{c=c+-4|0;b=f[c>>2]|0;f[c>>2]=0;f[e+-4>>2]=b;e=(f[h>>2]|0)+-4|0;f[h>>2]=e}while((c|0)!=(d|0));g=h;d=f[a>>2]|0;c=f[k>>2]|0}f[a>>2]=e;f[g>>2]=d;f[k>>2]=f[i>>2];f[i>>2]=c;a=f[l>>2]|0;f[l>>2]=f[j>>2];f[j>>2]=a;f[m>>2]=f[g>>2];ag(m);u=n;return}function re(a,b){a=a|0;b=b|0;var c=0,d=0,e=0,g=0,h=0,i=0,j=0,k=0,l=0,m=0;m=a+8|0;d=f[m>>2]|0;l=a+4|0;c=f[l>>2]|0;e=c;if(((d-c|0)/12|0)>>>0>=b>>>0){kh(c|0,0,b*12|0)|0;f[l>>2]=e+(b*12|0);return}j=f[a>>2]|0;i=(c-j|0)/12|0;c=i+b|0;k=j;if(c>>>0>357913941)co(a);h=(d-j|0)/12|0;g=h<<1;g=h>>>0<178956970?(g>>>0>>0?c:g):357913941;do if(g)if(g>>>0>357913941){a=sa(8)|0;Km(a,17959);f[a>>2]=4748;wa(a|0,1128,100)}else{h=Rk(g*12|0)|0;break}else h=0;while(0);d=h+(i*12|0)|0;c=d;h=h+(g*12|0)|0;kh(d|0,0,b*12|0)|0;g=d+(b*12|0)|0;if((e|0)==(k|0))i=j;else{do{j=d+-12|0;b=e;e=e+-12|0;f[j>>2]=0;i=d+-8|0;f[i>>2]=0;f[d+-4>>2]=0;f[j>>2]=f[e>>2];j=b+-8|0;f[i>>2]=f[j>>2];b=b+-4|0;f[d+-4>>2]=f[b>>2];f[b>>2]=0;f[j>>2]=0;f[e>>2]=0;d=c+-12|0;c=d}while((e|0)!=(k|0));i=f[a>>2]|0;e=f[l>>2]|0}f[a>>2]=c;f[l>>2]=g;f[m>>2]=h;h=i;if((e|0)!=(h|0))do{c=e;e=e+-12|0;g=f[e>>2]|0;if(g|0){d=c+-8|0;c=f[d>>2]|0;if((c|0)!=(g|0))f[d>>2]=c+(~((c+-4-g|0)>>>2)<<2);No(g)}}while((e|0)!=(h|0));if(!i)return;No(i);return}function se(a,b,c){a=a|0;b=b|0;c=c|0;var d=0,e=0,g=0,h=0,i=0,j=0,k=0,l=0,m=0;m=b;h=c-m>>2;i=a+8|0;d=f[i>>2]|0;j=f[a>>2]|0;k=j;if(h>>>0<=d-j>>2>>>0){l=a+4|0;a=(f[l>>2]|0)-j>>2;h=h>>>0>a>>>0;a=b+(a<<2)|0;g=h?a:c;i=g;e=i-m|0;d=e>>2;if(d|0)_j(j|0,b|0,e|0)|0;d=k+(d<<2)|0;if(!h){b=f[l>>2]|0;if((b|0)==(d|0))return;f[l>>2]=b+(~((b+-4-d|0)>>>2)<<2);return}if((g|0)==(c|0))return;g=f[l>>2]|0;e=((c+-4-i|0)>>>2)+1|0;d=g;b=a;while(1){f[d>>2]=f[b>>2];b=b+4|0;if((b|0)==(c|0))break;else d=d+4|0}f[l>>2]=g+(e<<2);return}g=j;if(j){e=a+4|0;d=f[e>>2]|0;if((d|0)!=(k|0))f[e>>2]=d+(~((d+-4-j|0)>>>2)<<2);No(g);f[i>>2]=0;f[e>>2]=0;f[a>>2]=0;d=0}if(h>>>0>1073741823)co(a);l=d>>1;d=d>>2>>>0<536870911?(l>>>0>>0?h:l):1073741823;if(d>>>0>1073741823)co(a);h=Rk(d<<2)|0;g=a+4|0;f[g>>2]=h;f[a>>2]=h;f[i>>2]=h+(d<<2);if((b|0)==(c|0))return;d=((c+-4-m|0)>>>2)+1|0;e=h;while(1){f[e>>2]=f[b>>2];b=b+4|0;if((b|0)==(c|0))break;else e=e+4|0}f[g>>2]=h+(d<<2);return}function te(a){a=a|0;var b=0,c=0,d=0,e=0,g=0,h=0;g=a+128|0;b=f[g>>2]|0;if(b|0){h=a+132|0;c=f[h>>2]|0;if((c|0)!=(b|0)){do{d=c+-12|0;f[h>>2]=d;e=f[d>>2]|0;if(!e)c=d;else{d=c+-8|0;c=f[d>>2]|0;if((c|0)!=(e|0))f[d>>2]=c+(~((c+-4-e|0)>>>2)<<2);No(e);c=f[h>>2]|0}}while((c|0)!=(b|0));b=f[g>>2]|0}No(b)}g=a+116|0;b=f[g>>2]|0;if(b|0){h=a+120|0;c=f[h>>2]|0;if((c|0)!=(b|0)){do{d=c+-12|0;f[h>>2]=d;e=f[d>>2]|0;if(!e)c=d;else{d=c+-8|0;c=f[d>>2]|0;if((c|0)!=(e|0))f[d>>2]=c+(~((c+-4-e|0)>>>2)<<2);No(e);c=f[h>>2]|0}}while((c|0)!=(b|0));b=f[g>>2]|0}No(b)}b=f[a+104>>2]|0;if(b|0){d=a+108|0;c=f[d>>2]|0;if((c|0)!=(b|0))f[d>>2]=c+(~((c+-4-b|0)>>>2)<<2);No(b)}b=f[a+92>>2]|0;if(!b){h=a+72|0;aj(h);h=a+52|0;aj(h);h=a+32|0;aj(h);a=a+12|0;aj(a);return}d=a+96|0;c=f[d>>2]|0;if((c|0)!=(b|0))f[d>>2]=c+(~((c+-4-b|0)>>>2)<<2);No(b);h=a+72|0;aj(h);h=a+52|0;aj(h);h=a+32|0;aj(h);a=a+12|0;aj(a);return}function ue(a,b,c){a=a|0;b=b|0;c=c|0;var d=0,e=0,g=0,h=0,i=0,j=0,k=0,l=0,m=0;m=b;h=c-m>>2;i=a+8|0;d=f[i>>2]|0;j=f[a>>2]|0;k=j;if(h>>>0<=d-j>>2>>>0){l=a+4|0;a=(f[l>>2]|0)-j>>2;h=h>>>0>a>>>0;a=b+(a<<2)|0;g=h?a:c;i=g;e=i-m|0;d=e>>2;if(d|0)_j(j|0,b|0,e|0)|0;d=k+(d<<2)|0;if(!h){b=f[l>>2]|0;if((b|0)==(d|0))return;f[l>>2]=b+(~((b+-4-d|0)>>>2)<<2);return}if((g|0)==(c|0))return;g=f[l>>2]|0;d=c+-4-i|0;e=g;b=a;while(1){f[e>>2]=f[b>>2];b=b+4|0;if((b|0)==(c|0))break;else e=e+4|0}f[l>>2]=g+((d>>>2)+1<<2);return}g=j;if(j){e=a+4|0;d=f[e>>2]|0;if((d|0)!=(k|0))f[e>>2]=d+(~((d+-4-j|0)>>>2)<<2);No(g);f[i>>2]=0;f[e>>2]=0;f[a>>2]=0;d=0}if(h>>>0>1073741823)co(a);l=d>>1;d=d>>2>>>0<536870911?(l>>>0>>0?h:l):1073741823;if(d>>>0>1073741823)co(a);h=Rk(d<<2)|0;g=a+4|0;f[g>>2]=h;f[a>>2]=h;f[i>>2]=h+(d<<2);if((b|0)==(c|0))return;d=c+-4-m|0;e=h;while(1){f[e>>2]=f[b>>2];b=b+4|0;if((b|0)==(c|0))break;else e=e+4|0}f[g>>2]=h+((d>>>2)+1<<2);return}function ve(a,c){a=a|0;c=c|0;var d=0,e=La,g=La,h=0,i=0,j=0,k=0,l=0,m=0,o=0,p=0,q=0,r=0,s=0,t=0,v=0,w=La,x=La,y=0,z=0;v=u;u=u+16|0;p=v;q=f[a+24>>2]|0;r=a+8|0;d=b[(f[r>>2]|0)+24>>0]|0;o=d<<24>>24;s=o<<2;t=Ko(o>>>0>1073741823?-1:o<<2)|0;hn(p);if(!(Ek(p,$(n[a+32>>2]),(1<>2]|0;m=(f[f[m>>2]>>2]|0)+(f[m+48>>2]|0)|0;if(!c){c=1;Lo(t);u=v;return c|0}q=p+4|0;l=a+28|0;if(d<<24>>24>0){h=0;i=0;j=0}else{a=0;d=0;while(1){ef((f[f[(f[r>>2]|0)+64>>2]>>2]|0)+d|0,t|0,s|0)|0;a=a+1|0;if((a|0)==(c|0)){a=1;break}else d=d+s|0}Lo(t);u=v;return a|0}while(1){a=f[l>>2]|0;e=$(n[q>>2]);g=$(n[p>>2]);d=0;k=j;while(1){z=f[m+(k<<2)>>2]|0;y=(z|0)<0;w=$(e*$((y?0-z|0:z)|0));x=$(-w);w=$(g*(y?x:w));w=$($(n[a+(d<<2)>>2])+w);n[t+(d<<2)>>2]=w;d=d+1|0;if((d|0)==(o|0))break;else k=k+1|0}ef((f[f[(f[r>>2]|0)+64>>2]>>2]|0)+i|0,t|0,s|0)|0;h=h+1|0;if((h|0)==(c|0)){a=1;break}else{i=i+s|0;j=o+j|0}}Lo(t);u=v;return a|0}function we(a){a=a|0;var b=0,c=0,d=0,e=0,g=0,h=0;g=a+124|0;b=f[g>>2]|0;if(b|0){h=a+128|0;c=f[h>>2]|0;if((c|0)!=(b|0)){do{d=c+-12|0;f[h>>2]=d;e=f[d>>2]|0;if(!e)c=d;else{d=c+-8|0;c=f[d>>2]|0;if((c|0)!=(e|0))f[d>>2]=c+(~((c+-4-e|0)>>>2)<<2);No(e);c=f[h>>2]|0}}while((c|0)!=(b|0));b=f[g>>2]|0}No(b)}g=a+112|0;b=f[g>>2]|0;if(b|0){h=a+116|0;c=f[h>>2]|0;if((c|0)!=(b|0)){do{d=c+-12|0;f[h>>2]=d;e=f[d>>2]|0;if(!e)c=d;else{d=c+-8|0;c=f[d>>2]|0;if((c|0)!=(e|0))f[d>>2]=c+(~((c+-4-e|0)>>>2)<<2);No(e);c=f[h>>2]|0}}while((c|0)!=(b|0));b=f[g>>2]|0}No(b)}b=f[a+100>>2]|0;if(b|0){d=a+104|0;c=f[d>>2]|0;if((c|0)!=(b|0))f[d>>2]=c+(~((c+-4-b|0)>>>2)<<2);No(b)}b=f[a+88>>2]|0;if(!b){h=a+68|0;aj(h);h=a+48|0;aj(h);h=a+28|0;aj(h);a=a+12|0;So(a);return}d=a+92|0;c=f[d>>2]|0;if((c|0)!=(b|0))f[d>>2]=c+(~((c+-4-b|0)>>>2)<<2);No(b);h=a+68|0;aj(h);h=a+48|0;aj(h);h=a+28|0;aj(h);a=a+12|0;So(a);return}function xe(a,b){a=a|0;b=b|0;var c=0,d=0,e=0,g=0,h=0,i=0,j=0,k=0;k=u;u=u+112|0;h=k+96|0;j=k+16|0;i=k+4|0;g=k;c=j+76|0;d=j;e=d+76|0;do{f[d>>2]=0;d=d+4|0}while((d|0)<(e|0));f[c>>2]=-1073741824;f[i>>2]=0;e=i+4|0;f[e>>2]=0;f[i+8>>2]=0;f[g>>2]=i;f[h>>2]=f[g>>2];if(wc(j,a,h)|0){g=f[i>>2]|0;ue(b,g,g+((f[e>>2]|0)-g>>2<<2)|0);g=f[j+68>>2]|0}else g=0;c=f[i>>2]|0;if(c|0){d=f[e>>2]|0;if((d|0)!=(c|0))f[e>>2]=d+(~((d+-4-c|0)>>>2)<<2);No(c)}c=f[j+56>>2]|0;if(c|0)No(c);c=f[j+32>>2]|0;if(c|0){e=j+36|0;d=f[e>>2]|0;if((d|0)!=(c|0))f[e>>2]=d+(~((d+-4-c|0)>>>2)<<2);No(c)}c=f[j+20>>2]|0;if(c|0){e=j+24|0;d=f[e>>2]|0;if((d|0)!=(c|0))f[e>>2]=d+(~((d+-4-c|0)>>>2)<<2);No(c)}c=f[j+8>>2]|0;if(c|0){e=j+12|0;d=f[e>>2]|0;if((d|0)!=(c|0))f[e>>2]=d+(~((d+-4-c|0)>>>2)<<2);No(c)}j=j+4|0;c=f[j>>2]|0;f[j>>2]=0;if(!c){u=k;return g|0}xg(c);No(c);u=k;return g|0}function ye(a,b){a=a|0;b=b|0;var c=0,d=0,e=0,g=0,h=0,i=0,j=0,k=0,l=0,m=0;f[a+4>>2]=f[b+4>>2];j=a+8|0;k=b+8|0;if((a|0)==(b|0))return a|0;i=b+12|0;c=f[i>>2]|0;if(!c)c=0;else{h=a+16|0;do if(c>>>0>f[h>>2]<<5>>>0){d=f[j>>2]|0;if(d){No(d);f[j>>2]=0;f[h>>2]=0;f[a+12>>2]=0;c=f[i>>2]|0}if((c|0)<0)co(j);else{e=((c+-1|0)>>>5)+1|0;g=Rk(e<<2)|0;f[j>>2]=g;f[a+12>>2]=0;f[h>>2]=e;e=f[i>>2]|0;break}}else{e=c;g=f[j>>2]|0}while(0);_j(g|0,f[k>>2]|0,((e+-1|0)>>>5<<2)+4|0)|0;c=f[i>>2]|0}f[a+12>>2]=c;h=a+20|0;i=b+20|0;g=b+24|0;c=f[g>>2]|0;if(!c)c=0;else{e=a+28|0;do if(c>>>0>f[e>>2]<<5>>>0){d=f[h>>2]|0;if(d){No(d);f[h>>2]=0;f[e>>2]=0;f[a+24>>2]=0;c=f[g>>2]|0}if((c|0)<0)co(h);else{l=((c+-1|0)>>>5)+1|0;m=Rk(l<<2)|0;f[h>>2]=m;f[a+24>>2]=0;f[e>>2]=l;l=f[g>>2]|0;break}}else{l=c;m=f[h>>2]|0}while(0);_j(m|0,f[i>>2]|0,((l+-1|0)>>>5<<2)+4|0)|0;c=f[g>>2]|0}f[a+24>>2]=c;return a|0}function ze(a,b,c){a=a|0;b=b|0;c=c|0;var d=0,e=0,g=0,h=0,i=0,j=0;i=a+8|0;d=f[i>>2]|0;h=f[a>>2]|0;j=h;do if(d-h>>2>>>0>=b>>>0){a=a+4|0;i=f[a>>2]|0;h=i-h>>2;g=h>>>0>>0;d=g?h:b;if(d|0){e=j;while(1){f[e>>2]=f[c>>2];d=d+-1|0;if(!d)break;else e=e+4|0}}if(!g){d=j+(b<<2)|0;if((i|0)==(d|0))return;else{e=a;d=i+(~((i+-4-d|0)>>>2)<<2)|0;break}}else{g=b-h|0;d=i;e=g;while(1){f[d>>2]=f[c>>2];e=e+-1|0;if(!e)break;else d=d+4|0}e=a;d=i+(g<<2)|0;break}}else{g=h;if(h){e=a+4|0;d=f[e>>2]|0;if((d|0)!=(j|0))f[e>>2]=d+(~((d+-4-h|0)>>>2)<<2);No(g);f[i>>2]=0;f[e>>2]=0;f[a>>2]=0;d=0}if(b>>>0>1073741823)co(a);j=d>>1;d=d>>2>>>0<536870911?(j>>>0>>0?b:j):1073741823;if(d>>>0>1073741823)co(a);h=Rk(d<<2)|0;g=a+4|0;f[g>>2]=h;f[a>>2]=h;f[i>>2]=h+(d<<2);d=h;e=b;while(1){f[d>>2]=f[c>>2];e=e+-1|0;if(!e)break;else d=d+4|0}e=g;d=h+(b<<2)|0}while(0);f[e>>2]=d;return}function Ae(a,c){a=a|0;c=c|0;var d=0,e=0,g=0,i=0,j=0,k=0,l=0;f[c>>2]=1;e=a+4|0;l=c+8|0;k=c+12|0;c=f[l>>2]|0;d=(f[k>>2]|0)-c|0;if(d>>>0<4294967292){Fi(l,d+4|0,0);c=f[l>>2]|0}j=c+d|0;i=h[e>>0]|h[e+1>>0]<<8|h[e+2>>0]<<16|h[e+3>>0]<<24;b[j>>0]=i;b[j+1>>0]=i>>8;b[j+2>>0]=i>>16;b[j+3>>0]=i>>24;j=a+8|0;i=a+12|0;c=f[j>>2]|0;if((f[i>>2]|0)!=(c|0)){g=0;do{d=c+(g<<2)|0;c=f[l>>2]|0;e=(f[k>>2]|0)-c|0;if(e>>>0<4294967292){Fi(l,e+4|0,0);c=f[l>>2]|0}c=c+e|0;e=h[d>>0]|h[d+1>>0]<<8|h[d+2>>0]<<16|h[d+3>>0]<<24;b[c>>0]=e;b[c+1>>0]=e>>8;b[c+2>>0]=e>>16;b[c+3>>0]=e>>24;g=g+1|0;c=f[j>>2]|0}while(g>>>0<(f[i>>2]|0)-c>>2>>>0)}e=a+20|0;d=f[l>>2]|0;c=(f[k>>2]|0)-d|0;if(c>>>0<4294967292){Fi(l,c+4|0,0);l=f[l>>2]|0;l=l+c|0;k=h[e>>0]|h[e+1>>0]<<8|h[e+2>>0]<<16|h[e+3>>0]<<24;b[l>>0]=k;b[l+1>>0]=k>>8;b[l+2>>0]=k>>16;b[l+3>>0]=k>>24;return}else{l=d;l=l+c|0;k=h[e>>0]|h[e+1>>0]<<8|h[e+2>>0]<<16|h[e+3>>0]<<24;b[l>>0]=k;b[l+1>>0]=k>>8;b[l+2>>0]=k>>16;b[l+3>>0]=k>>24;return}}function Be(a,b,c){a=a|0;b=b|0;c=c|0;var d=0,e=0,g=0,h=0,i=0,j=0,k=0,l=0;k=c;e=b;j=k-e|0;h=j>>2;i=a+8|0;d=f[i>>2]|0;g=f[a>>2]|0;l=g;if(h>>>0>d-g>>2>>>0){e=g;if(g){c=a+4|0;d=f[c>>2]|0;if((d|0)!=(l|0))f[c>>2]=d+(~((d+-4-g|0)>>>2)<<2);No(e);f[i>>2]=0;f[c>>2]=0;f[a>>2]=0;d=0}if(h>>>0>1073741823)co(a);l=d>>1;d=d>>2>>>0<536870911?(l>>>0>>0?h:l):1073741823;if(d>>>0>1073741823)co(a);e=Rk(d<<2)|0;c=a+4|0;f[c>>2]=e;f[a>>2]=e;f[i>>2]=e+(d<<2);if((j|0)<=0)return;ef(e|0,b|0,j|0)|0;f[c>>2]=e+(j>>>2<<2);return}a=a+4|0;d=f[a>>2]|0;i=d-g>>2;j=h>>>0>i>>>0;i=j?b+(i<<2)|0:c;g=d;h=d;if((i|0)==(b|0))d=l;else{e=i+-4-e|0;d=b;c=l;while(1){f[c>>2]=f[d>>2];d=d+4|0;if((d|0)==(i|0))break;else c=c+4|0}d=l+((e>>>2)+1<<2)|0}if(j){d=k-i|0;if((d|0)<=0)return;ef(h|0,i|0,d|0)|0;f[a>>2]=(f[a>>2]|0)+(d>>>2<<2);return}else{if((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|0)){a=0;return a|0}f[a+12>>2]=g;f[a+16>>2]=d;g=d+(1-g)|0;f[a+20>>2]=g;d=(g|0)/2|0;e=a+24|0;f[e>>2]=d;f[a+28>>2]=0-d;if(!(g&1))f[e>>2]=d+-1;do if((j[c+38>>1]|0)<514){if(!((n|0)>(k|0)|(n|0)==(k|0)&m>>>0>i>>>0)){a=0;return a|0}d=b[l+i>>0]|0;p=Hl(p|0,o|0,9,0)|0;f[q>>2]=p;f[q+4>>2]=I;if((d&255)<2){f[a+88>>2]=d&255;break}else{a=0;return a|0}}while(0);a=nd(a+108|0,c)|0;return a|0}function Fe(a,b,c){a=a|0;b=b|0;c=c|0;var d=0,e=0,g=0,h=0,i=0,j=0;j=u;u=u+16|0;h=j;f[h>>2]=b;if((b|0)<=-1)ra(17389,17401,110,17493);i=a+8|0;if(((f[a+12>>2]|0)-(f[i>>2]|0)>>2|0)<=(b|0))Hf(i,b+1|0);d=f[(f[c>>2]|0)+56>>2]|0;do if((d|0)<5){g=a+20+(d*12|0)+4|0;e=f[g>>2]|0;if((e|0)==(f[a+20+(d*12|0)+8>>2]|0)){Og(a+20+(d*12|0)|0,h);break}else{f[e>>2]=b;f[g>>2]=e+4;break}}while(0);g=f[c>>2]|0;a=f[h>>2]|0;f[g+60>>2]=a;a=(f[i>>2]|0)+(a<<2)|0;f[c>>2]=0;b=f[a>>2]|0;f[a>>2]=g;if(!b){u=j;return}a=b+88|0;d=f[a>>2]|0;f[a>>2]=0;if(d|0){e=f[d+8>>2]|0;if(e|0){g=d+12|0;if((f[g>>2]|0)!=(e|0))f[g>>2]=e;No(e)}No(d)}d=f[b+68>>2]|0;if(d|0){g=b+72|0;e=f[g>>2]|0;if((e|0)!=(d|0))f[g>>2]=e+(~((e+-4-d|0)>>>2)<<2);No(d)}a=b+64|0;d=f[a>>2]|0;f[a>>2]=0;if(d|0){e=f[d>>2]|0;if(e|0){g=d+4|0;if((f[g>>2]|0)!=(e|0))f[g>>2]=e;No(e)}No(d)}No(b);u=j;return}function Ge(a,b,c,d){a=a|0;b=b|0;c=c|0;d=d|0;var e=0,g=0,h=0,i=0,j=0,k=0,l=0;k=b+12|0;l=f[k>>2]|0;g=(f[c>>2]|0)-l|0;i=c+4|0;e=(f[i>>2]|0)-l|0;j=c;f[j>>2]=g;f[j+4>>2]=e;j=f[k>>2]|0;if((j|0)<(g|0))ra(9889,9190,250,9912);if((j|0)<(e|0))ra(9924,9190,251,9912);h=0-j|0;if((g|0)<(h|0))ra(9947,9190,252,9912);if((e|0)<(h|0))ra(9971,9190,253,9912);if((((e|0)>-1?e:0-e|0)+((g|0)>-1?g:0-g|0)|0)>(j|0)){Xf(b,c,i);g=f[c>>2]|0;e=f[i>>2]|0;h=f[k>>2]|0;i=0}else{h=j;i=1}c=(f[d>>2]|0)+g|0;f[a>>2]=c;e=(f[d+4>>2]|0)+e|0;g=a+4|0;f[g>>2]=e;if((h|0)>=(c|0)){if((c|0)<(0-h|0))c=(f[b+4>>2]|0)+c|0}else c=c-(f[b+4>>2]|0)|0;f[a>>2]=c;if((h|0)>=(e|0)){if((e|0)<(0-h|0))e=(f[b+4>>2]|0)+e|0}else e=e-(f[b+4>>2]|0)|0;f[g>>2]=e;if(i){d=c;b=e;d=d+l|0;l=b+l|0;b=a;a=b;f[a>>2]=d;b=b+4|0;f[b>>2]=l;return}Xf(b,a,g);d=f[a>>2]|0;b=f[g>>2]|0;d=d+l|0;l=b+l|0;b=a;a=b;f[a>>2]=d;b=b+4|0;f[b>>2]=l;return}function He(a,c,d){a=a|0;c=c|0;d=d|0;var e=0,g=0,h=0,i=0,j=0,k=0,l=0;l=u;u=u+32|0;j=l+12|0;k=l;f[j>>2]=0;f[j+4>>2]=0;f[j+8>>2]=0;g=_h(c)|0;if(g>>>0>4294967279)co(j);if(g>>>0<11){b[j+11>>0]=g;if(!g)e=j;else{e=j;h=6}}else{h=g+16&-16;e=Rk(h)|0;f[j>>2]=e;f[j+8>>2]=h|-2147483648;f[j+4>>2]=g;h=6}if((h|0)==6)ef(e|0,c|0,g|0)|0;b[e+g>>0]=0;f[k>>2]=0;f[k+4>>2]=0;f[k+8>>2]=0;c=_h(d)|0;if(c>>>0>4294967279)co(k);if(c>>>0<11){b[k+11>>0]=c;if(!c)e=k;else{e=k;h=12}}else{h=c+16&-16;e=Rk(h)|0;f[k>>2]=e;f[k+8>>2]=h|-2147483648;f[k+4>>2]=c;h=12}if((h|0)==12)ef(e|0,d|0,c|0)|0;b[e+c>>0]=0;e=f[a+4>>2]|0;if((e|0)!=0?(i=ce(e,j,k)|0,(i|0)!=0):0)e=Xi(a,f[i+40>>2]|0)|0;else e=-1;if((b[k+11>>0]|0)<0)No(f[k>>2]|0);if((b[j+11>>0]|0)>=0){u=l;return e|0}No(f[j>>2]|0);u=l;return e|0}function Ie(a,c,d){a=a|0;c=c|0;d=d|0;var e=0,g=0,h=0,i=0,j=0,k=0,l=0,m=0,n=0,o=0;e=a+4|0;g=f[e>>2]|0;if(!g){f[c>>2]=e;o=e;return o|0}m=b[d+11>>0]|0;l=m<<24>>24<0;m=l?f[d+4>>2]|0:m&255;l=l?f[d>>2]|0:d;d=a+4|0;while(1){h=g+16|0;a=b[h+11>>0]|0;j=a<<24>>24<0;a=j?f[g+20>>2]|0:a&255;i=a>>>0>>0;e=i?a:m;if((e|0)!=0?(o=ij(l,j?f[h>>2]|0:h,e)|0,(o|0)!=0):0)if((o|0)<0)k=8;else k=10;else if(m>>>0>>0)k=8;else k=10;if((k|0)==8){e=f[g>>2]|0;if(!e){k=9;break}else d=g}else if((k|0)==10){k=0;e=m>>>0>>0?m:a;if((e|0)!=0?(n=ij(j?f[h>>2]|0:h,l,e)|0,(n|0)!=0):0){if((n|0)>=0){k=16;break}}else k=12;if((k|0)==12?(0,!i):0){k=16;break}d=g+4|0;e=f[d>>2]|0;if(!e){k=15;break}}g=e}if((k|0)==9){f[c>>2]=g;o=g;return o|0}else if((k|0)==15){f[c>>2]=g;o=d;return o|0}else if((k|0)==16){f[c>>2]=g;o=d;return o|0}return 0}function Je(a,c,d){a=a|0;c=c|0;d=d|0;var e=0,g=0,h=0;a=a+20|0;if(nc(a,c)|0){h=0;return h|0}g=Rb(a,c)|0;e=f[d>>2]|0;f[d>>2]=0;h=f[g>>2]|0;f[g>>2]=e;if(!h){h=1;return h|0}a=f[h+28>>2]|0;if(a|0)do{g=a;a=f[a>>2]|0;kg(g+8|0);No(g)}while((a|0)!=0);g=h+20|0;a=f[g>>2]|0;f[g>>2]=0;if(a|0)No(a);a=f[h+8>>2]|0;if(a|0)do{e=a;a=f[a>>2]|0;g=e+8|0;c=f[e+20>>2]|0;if(c|0){d=e+24|0;if((f[d>>2]|0)!=(c|0))f[d>>2]=c;No(c)}if((b[g+11>>0]|0)<0)No(f[g>>2]|0);No(e)}while((a|0)!=0);a=f[h>>2]|0;f[h>>2]=0;if(a|0)No(a);No(h);h=1;return h|0}function Ke(a){a=a|0;var c=0,d=0,e=0,g=0,h=0,i=0,j=0;c=f[a+32>>2]|0;h=c+8|0;j=f[h+4>>2]|0;g=c+16|0;d=g;e=f[d>>2]|0;d=f[d+4>>2]|0;if(!((j|0)>(d|0)|((j|0)==(d|0)?(f[h>>2]|0)>>>0>e>>>0:0))){j=0;return j|0}h=b[(f[c>>2]|0)+e>>0]|0;c=Hl(e|0,d|0,1,0)|0;e=g;f[e>>2]=c;f[e+4>>2]=I;e=a+48|0;c=f[e>>2]|0;f[e>>2]=0;if(c|0)Sa[f[(f[c>>2]|0)+4>>2]&127](c);switch(h<<24>>24){case 0:{c=Rk(376)|0;Xh(c);d=f[e>>2]|0;f[e>>2]=c;if(d){Sa[f[(f[d>>2]|0)+4>>2]&127](d);i=11}break}case 1:{c=Rk(416)|0;ph(c);d=f[e>>2]|0;f[e>>2]=c;if(d){Sa[f[(f[d>>2]|0)+4>>2]&127](d);i=11}break}case 2:{c=Rk(432)|0;Ng(c);d=f[e>>2]|0;f[e>>2]=c;if(d){Sa[f[(f[d>>2]|0)+4>>2]&127](d);i=11}break}default:i=11}if((i|0)==11){c=f[e>>2]|0;if(!c){j=0;return j|0}}j=Oa[f[(f[c>>2]|0)+8>>2]&127](c,a)|0;return j|0}function Le(a,c){a=a|0;c=c|0;var d=0,e=0,g=0,h=0,i=0,j=0,k=0,l=0;k=a+4|0;d=f[a>>2]|0;h=((f[k>>2]|0)-d|0)/12|0;e=h+1|0;if(e>>>0>357913941)co(a);l=a+8|0;j=((f[l>>2]|0)-d|0)/12|0;d=j<<1;d=j>>>0<178956970?(d>>>0>>0?e:d):357913941;do if(d)if(d>>>0>357913941){a=sa(8)|0;Km(a,17959);f[a>>2]=4748;wa(a|0,1128,100)}else{g=Rk(d*12|0)|0;break}else g=0;while(0);h=g+(h*12|0)|0;e=h;j=g+(d*12|0)|0;lh(h,c);i=h+12|0;c=f[a>>2]|0;d=f[k>>2]|0;if((d|0)==(c|0)){g=c;d=c}else{g=h;do{h=g+-12|0;d=d+-12|0;f[h>>2]=f[d>>2];f[h+4>>2]=f[d+4>>2];f[h+8>>2]=f[d+8>>2];f[d>>2]=0;f[d+4>>2]=0;f[d+8>>2]=0;g=e+-12|0;e=g}while((d|0)!=(c|0));g=f[a>>2]|0;d=f[k>>2]|0}f[a>>2]=e;f[k>>2]=i;f[l>>2]=j;e=g;if((d|0)!=(e|0))do{d=d+-12|0;if((b[d+11>>0]|0)<0)No(f[d>>2]|0)}while((d|0)!=(e|0));if(!g)return;No(g);return}function Me(a){a=a|0;var b=0,c=0,d=0,e=0,g=0,h=0,i=0;h=u;u=u+16|0;d=h+4|0;e=h;g=a+8|0;c=f[g>>2]|0;Qh(f[a+4>>2]|0,(f[c+56>>2]|0)-(f[c+52>>2]|0)>>2);c=a+84|0;a=f[c>>2]|0;if(!a){c=f[(f[g>>2]|0)+64>>2]|0;c=(f[c+4>>2]|0)-(f[c>>2]|0)>>2;a=(c>>>0)/3|0;if(c>>>0<=2){u=h;return 1}b=0;do{f[e>>2]=b*3;f[d>>2]=f[e>>2];Kb(g,d);b=b+1|0}while((b|0)<(a|0));u=h;return 1}else{b=f[a>>2]|0;if((f[a+4>>2]|0)==(b|0)){u=h;return 1}a=0;do{f[e>>2]=f[b+(a<<2)>>2];f[d>>2]=f[e>>2];Kb(g,d);a=a+1|0;i=f[c>>2]|0;b=f[i>>2]|0}while(a>>>0<(f[i+4>>2]|0)-b>>2>>>0);u=h;return 1}return 0}function Ne(a,b,c){a=a|0;b=b|0;c=c|0;var d=0,e=0,g=0,h=0,i=0,j=0,k=0,l=0,m=0;k=c;i=b;j=k-i|0;g=j>>2;h=a+8|0;d=f[h>>2]|0;l=f[a>>2]|0;m=l;if(g>>>0<=d-l>>2>>>0){j=a+4|0;e=(f[j>>2]|0)-l>>2;h=g>>>0>e>>>0;g=h?b+(e<<2)|0:c;e=g;c=e-i|0;d=c>>2;if(d|0)_j(l|0,b|0,c|0)|0;c=m+(d<<2)|0;if(h){d=k-e|0;if((d|0)<=0)return;ef(f[j>>2]|0,g|0,d|0)|0;f[j>>2]=(f[j>>2]|0)+(d>>>2<<2);return}else{d=f[j>>2]|0;if((d|0)==(c|0))return;f[j>>2]=d+(~((d+-4-c|0)>>>2)<<2);return}}e=l;if(l){c=a+4|0;d=f[c>>2]|0;if((d|0)!=(m|0))f[c>>2]=d+(~((d+-4-l|0)>>>2)<<2);No(e);f[h>>2]=0;f[c>>2]=0;f[a>>2]=0;d=0}if(g>>>0>1073741823)co(a);m=d>>1;d=d>>2>>>0<536870911?(m>>>0>>0?g:m):1073741823;if(d>>>0>1073741823)co(a);e=Rk(d<<2)|0;c=a+4|0;f[c>>2]=e;f[a>>2]=e;f[h>>2]=e+(d<<2);if((j|0)<=0)return;ef(e|0,b|0,j|0)|0;f[c>>2]=e+(j>>>2<<2);return}function Oe(a,c,d){a=a|0;c=c|0;d=d|0;var e=0,g=0,h=0,i=0,j=0,k=0;j=c;h=d-j|0;i=a+8|0;e=f[i>>2]|0;g=f[a>>2]|0;k=g;if(h>>>0>(e-g|0)>>>0){if(g){e=a+4|0;if((f[e>>2]|0)!=(k|0))f[e>>2]=k;No(k);f[i>>2]=0;f[e>>2]=0;f[a>>2]=0;e=0}if((h|0)<0)co(a);g=e<<1;g=e>>>0<1073741823?(g>>>0>>0?h:g):2147483647;if((g|0)<0)co(a);e=Rk(g)|0;h=a+4|0;f[h>>2]=e;f[a>>2]=e;f[i>>2]=e+g;if((c|0)==(d|0))return;do{b[e>>0]=b[c>>0]|0;c=c+1|0;e=(f[h>>2]|0)+1|0;f[h>>2]=e}while((c|0)!=(d|0));return}else{a=a+4|0;i=(f[a>>2]|0)-g|0;h=h>>>0>i>>>0;i=c+i|0;g=h?i:d;e=g-j|0;if(e|0)_j(k|0,c|0,e|0)|0;c=k+e|0;if(!h){if((f[a>>2]|0)==(c|0))return;f[a>>2]=c;return}if((g|0)==(d|0))return;e=f[a>>2]|0;c=i;do{b[e>>0]=b[c>>0]|0;c=c+1|0;e=(f[a>>2]|0)+1|0;f[a>>2]=e}while((c|0)!=(d|0));return}}function Pe(a,b){a=a|0;b=b|0;var c=0,d=0,e=0,g=0,h=0,i=0,j=0,k=0,l=0;l=u;u=u+16|0;k=l;c=Rk(64)|0;j=Rk(12)|0;h=f[(f[a+4>>2]|0)+80>>2]|0;f[j+4>>2]=0;f[j>>2]=3416;f[j+8>>2]=h;f[k>>2]=j;hj(c,k);j=c;if((b|0)>=0){h=a+8|0;g=a+12|0;c=f[g>>2]|0;a=f[h>>2]|0;e=c-a>>2;do if((e|0)<=(b|0)){d=b+1|0;if(d>>>0>e>>>0){Te(h,d-e|0);break}if(d>>>0>>0?(i=a+(d<<2)|0,(c|0)!=(i|0)):0)do{e=c+-4|0;f[g>>2]=e;c=f[e>>2]|0;f[e>>2]=0;if(c|0)Sa[f[(f[c>>2]|0)+4>>2]&127](c);c=f[g>>2]|0}while((c|0)!=(i|0))}while(0);b=(f[h>>2]|0)+(b<<2)|0;c=f[b>>2]|0;f[b>>2]=j;if(!c)a=1;else{Sa[f[(f[c>>2]|0)+4>>2]&127](c);a=1}}else{Sa[f[(f[c>>2]|0)+4>>2]&127](c);a=0}c=f[k>>2]|0;f[k>>2]=0;if(!c){u=l;return a|0}Sa[f[(f[c>>2]|0)+4>>2]&127](c);u=l;return a|0}function Qe(a,b){a=a|0;b=b|0;var c=0,d=0,e=0;c=a+8|0;f[c>>2]=f[b>>2];ye(a+12|0,b+4|0)|0;d=a+44|0;e=b+36|0;f[d>>2]=f[e>>2];f[d+4>>2]=f[e+4>>2];f[d+8>>2]=f[e+8>>2];f[d+12>>2]=f[e+12>>2];if((c|0)==(b|0)){f[a+96>>2]=f[b+88>>2];return}else{Be(a+60|0,f[b+52>>2]|0,f[b+56>>2]|0);Be(a+72|0,f[b+64>>2]|0,f[b+68>>2]|0);Be(a+84|0,f[b+76>>2]|0,f[b+80>>2]|0);f[a+96>>2]=f[b+88>>2];Ne(a+100|0,f[b+92>>2]|0,f[b+96>>2]|0);return}}function Re(a,c,d){a=a|0;c=c|0;d=d|0;var e=0,g=0,h=0,i=0,j=0;j=u;u=u+80|0;g=j;i=j+64|0;wj(g);e=f[(f[a+8>>2]|0)+56>>2]|0;h=X(Lj(5)|0,d)|0;Dh(g,e,0,d&255,5,0,h,((h|0)<0)<<31>>31,0,0);h=Rk(96)|0;nj(h,g);b[h+84>>0]=1;d=f[h+68>>2]|0;g=h+72|0;e=f[g>>2]|0;if((e|0)!=(d|0))f[g>>2]=e+(~((e+-4-d|0)>>>2)<<2);wh(h,c)|0;f[i>>2]=h;ah(a,i);h=f[i>>2]|0;f[i>>2]=0;if(!h){u=j;return}i=h+88|0;d=f[i>>2]|0;f[i>>2]=0;if(d|0){e=f[d+8>>2]|0;if(e|0){g=d+12|0;if((f[g>>2]|0)!=(e|0))f[g>>2]=e;No(e)}No(d)}d=f[h+68>>2]|0;if(d|0){g=h+72|0;e=f[g>>2]|0;if((e|0)!=(d|0))f[g>>2]=e+(~((e+-4-d|0)>>>2)<<2);No(d)}i=h+64|0;d=f[i>>2]|0;f[i>>2]=0;if(d|0){e=f[d>>2]|0;if(e|0){g=d+4|0;if((f[g>>2]|0)!=(e|0))f[g>>2]=e;No(e)}No(d)}No(h);u=j;return}function Se(a,b){a=a|0;b=b|0;var c=0,d=0,e=0,g=0,h=0,i=0,j=0,k=0,l=0,m=0,n=0;n=a+4|0;c=f[n>>2]|0;m=f[a>>2]|0;g=m;do if((c|0)==(m|0)){m=a+8|0;d=f[m>>2]|0;l=a+12|0;k=f[l>>2]|0;e=k;if(d>>>0>>0){a=d;i=((e-a>>2)+1|0)/2|0;g=d+(i<<2)|0;e=a-c|0;a=e>>2;h=g+(0-a<<2)|0;if(!a)c=g;else{_j(h|0,c|0,e|0)|0;d=f[m>>2]|0;c=h}f[n>>2]=c;f[m>>2]=d+(i<<2);break}e=e-g>>1;e=(e|0)==0?1:e;if(e>>>0>1073741823){b=sa(8)|0;Km(b,17959);f[b>>2]=4748;wa(b|0,1128,100)}h=Rk(e<<2)|0;i=h;k=h+((e+3|0)>>>2<<2)|0;j=k;h=h+(e<<2)|0;if((c|0)==(d|0))d=j;else{e=k;g=j;do{f[e>>2]=f[c>>2];e=g+4|0;g=e;c=c+4|0}while((c|0)!=(d|0));c=f[a>>2]|0;d=g}f[a>>2]=i;f[n>>2]=j;f[m>>2]=d;f[l>>2]=h;if(!c)c=k;else{No(c);c=f[n>>2]|0}}while(0);f[c+-4>>2]=f[b>>2];f[n>>2]=(f[n>>2]|0)+-4;return}function Te(a,b){a=a|0;b=b|0;var c=0,d=0,e=0,g=0,h=0,i=0,j=0,k=0,l=0,m=0;m=a+8|0;e=f[m>>2]|0;l=a+4|0;d=f[l>>2]|0;c=d;if(e-d>>2>>>0>=b>>>0){kh(d|0,0,b<<2|0)|0;f[l>>2]=d+(b<<2);return}g=f[a>>2]|0;d=d-g>>2;j=d+b|0;k=g;if(j>>>0>1073741823)co(a);i=e-g|0;h=i>>1;h=i>>2>>>0<536870911?(h>>>0>>0?j:h):1073741823;do if(h)if(h>>>0>1073741823){a=sa(8)|0;Km(a,17959);f[a>>2]=4748;wa(a|0,1128,100)}else{i=Rk(h<<2)|0;break}else i=0;while(0);e=i+(d<<2)|0;kh(e|0,0,b<<2|0)|0;d=e;b=i+(h<<2)|0;h=i+(j<<2)|0;if((c|0)!=(k|0)){do{c=c+-4|0;j=f[c>>2]|0;f[c>>2]=0;f[e+-4>>2]=j;e=d+-4|0;d=e}while((c|0)!=(k|0));g=f[a>>2]|0;c=f[l>>2]|0}f[a>>2]=d;f[l>>2]=h;f[m>>2]=b;e=g;if((c|0)!=(e|0))do{c=c+-4|0;d=f[c>>2]|0;f[c>>2]=0;if(d|0)Sa[f[(f[d>>2]|0)+4>>2]&127](d)}while((c|0)!=(e|0));if(!g)return;No(g);return}function Ue(a){a=a|0;var b=0,c=0,d=0,e=0,g=0;f[a>>2]=3608;b=f[a+68>>2]|0;if(b|0){d=a+72|0;c=f[d>>2]|0;if((c|0)!=(b|0))f[d>>2]=c+(~((c+-4-b|0)>>>2)<<2);No(b)}c=f[a+56>>2]|0;if(c|0){d=a+60|0;b=f[d>>2]|0;if((b|0)!=(c|0))f[d>>2]=b+(~((b+-4-c|0)>>>2)<<2);No(c)}b=f[a+44>>2]|0;if(b|0){d=a+48|0;c=f[d>>2]|0;if((c|0)!=(b|0))f[d>>2]=c+(~((c+-4-b|0)>>>2)<<2);No(b)}b=f[a+32>>2]|0;if(b|0){d=a+36|0;c=f[d>>2]|0;if((c|0)!=(b|0))f[d>>2]=c+(~((c+-4-b|0)>>>2)<<2);No(b)}b=f[a+20>>2]|0;if(b|0){d=a+24|0;c=f[d>>2]|0;if((c|0)!=(b|0))f[d>>2]=c+(~((c+-4-b|0)>>>2)<<2);No(b)}dg(a+8|0);a=a+4|0;e=f[a>>2]|0;f[a>>2]=0;if(!e)return;d=e+40|0;b=f[d>>2]|0;if(b|0){a=e+44|0;c=f[a>>2]|0;if((c|0)!=(b|0)){do{g=c+-4|0;f[a>>2]=g;c=f[g>>2]|0;f[g>>2]=0;if(c|0){Rg(c);No(c)}c=f[a>>2]|0}while((c|0)!=(b|0));b=f[d>>2]|0}No(b)}Rg(e);No(e);return}function Ve(a,b,c){a=a|0;b=b|0;c=c|0;var d=0,e=0,g=0,h=0,i=0,j=0;j=u;u=u+16|0;i=j;d=f[a+8>>2]|0;e=f[c>>2]|0;h=(e|0)/3|0;if((e|0)<=-3)ra(17073,17098,63,17175);g=f[d+96>>2]|0;if((h|0)>=(((f[d+100>>2]|0)-g|0)/12|0|0))ra(17180,17098,64,17175);h=f[g+(h*12|0)+(((e|0)%3|0)<<2)>>2]|0;d=f[a+12>>2]|0;f[i>>2]=h;d=f[d+4>>2]|0;g=d+4|0;e=f[g>>2]|0;if((e|0)==(f[d+8>>2]|0))Og(d,i);else{f[e>>2]=h;f[g>>2]=e+4}h=a+4|0;e=f[h>>2]|0;g=e+4|0;d=f[g>>2]|0;if((d|0)==(f[e+8>>2]|0)){Og(e,c);i=f[h>>2]|0;c=i+24|0;a=f[c>>2]|0;b=f[b>>2]|0;i=i+12|0;i=f[i>>2]|0;b=i+(b<<2)|0;f[b>>2]=a;b=f[c>>2]|0;b=b+1|0;f[c>>2]=b;u=j;return}else{f[d>>2]=f[c>>2];f[g>>2]=d+4;i=e;c=i+24|0;a=f[c>>2]|0;b=f[b>>2]|0;i=i+12|0;i=f[i>>2]|0;b=i+(b<<2)|0;f[b>>2]=a;b=f[c>>2]|0;b=b+1|0;f[c>>2]=b;u=j;return}}function We(a,b,c){a=a|0;b=b|0;c=c|0;var d=0,e=0,g=0,h=0,i=0,j=0,k=0,l=0,m=0,n=0,o=0;n=u;u=u+32|0;i=n+24|0;j=n+16|0;k=n+8|0;m=n;l=a+4|0;o=f[l>>2]|0;e=f[b>>2]|0;b=f[b+4>>2]|0;h=f[c>>2]|0;d=f[c+4>>2]|0;g=h-e<<3;f[l>>2]=o-b+d+g;l=(f[a>>2]|0)+(o>>>5<<2)|0;a=o&31;c=l;if((b|0)!=(a|0)){f[i>>2]=e;f[i+4>>2]=b;f[j>>2]=h;f[j+4>>2]=d;f[k>>2]=c;f[k+4>>2]=a;id(m,i,j,k);u=n;return}d=d-b+g|0;a=e;if((d|0)>0){if(!b){h=a;c=d;a=l;b=0}else{h=32-b|0;c=(d|0)<(h|0)?d:h;h=-1>>>(h-c|0)&-1<>2]=f[l>>2]&~h|f[a>>2]&h;b=c+b|0;h=a+4|0;e=h;c=d-c|0;a=l+(b>>>5<<2)|0;b=b&31}g=(c|0)/32|0;_j(a|0,e|0,g<<2|0)|0;d=c-(g<<5)|0;a=a+(g<<2)|0;c=a;if((d|0)>0){b=-1>>>(32-d|0);f[a>>2]=f[a>>2]&~b|f[h+(g<<2)>>2]&b;b=d}}f[m>>2]=c;f[m+4>>2]=b;u=n;return}function Xe(a){a=a|0;var b=0,c=0,d=0,e=0,g=0,h=0,i=0;h=u;u=u+16|0;d=h+4|0;e=h;g=a+8|0;c=f[g>>2]|0;Qh(f[a+4>>2]|0,(f[c+28>>2]|0)-(f[c+24>>2]|0)>>2);c=a+84|0;a=f[c>>2]|0;if(!a){c=f[g>>2]|0;c=(f[c+4>>2]|0)-(f[c>>2]|0)>>2;a=(c>>>0)/3|0;if(c>>>0<=2){u=h;return 1}b=0;do{f[e>>2]=b*3;f[d>>2]=f[e>>2];Ob(g,d);b=b+1|0}while((b|0)<(a|0));u=h;return 1}else{b=f[a>>2]|0;if((f[a+4>>2]|0)==(b|0)){u=h;return 1}a=0;do{f[e>>2]=f[b+(a<<2)>>2];f[d>>2]=f[e>>2];Ob(g,d);a=a+1|0;i=f[c>>2]|0;b=f[i>>2]|0}while(a>>>0<(f[i+4>>2]|0)-b>>2>>>0);u=h;return 1}return 0}function Ye(a,b){a=a|0;b=b|0;var c=0,d=0,e=0,g=0,h=0,i=0,j=0,k=0,l=0,m=0,n=0;n=a+8|0;c=f[n>>2]|0;l=a+12|0;m=f[l>>2]|0;e=m;h=c;do if((c|0)==(m|0)){m=a+4|0;k=f[m>>2]|0;d=f[a>>2]|0;g=d;if(k>>>0>d>>>0){c=k;g=((c-g>>2)+1|0)/-2|0;e=k+(g<<2)|0;c=h-c|0;d=c>>2;if(!d)c=k;else{_j(e|0,k|0,c|0)|0;c=f[m>>2]|0}a=e+(d<<2)|0;f[n>>2]=a;f[m>>2]=c+(g<<2);c=a;break}e=e-g>>1;e=(e|0)==0?1:e;if(e>>>0>1073741823){b=sa(8)|0;Km(b,17959);f[b>>2]=4748;wa(b|0,1128,100)}h=Rk(e<<2)|0;i=h;g=h+(e>>>2<<2)|0;j=g;h=h+(e<<2)|0;if((k|0)==(c|0))c=j;else{e=g;d=k;g=j;do{f[e>>2]=f[d>>2];e=g+4|0;g=e;d=d+4|0}while((d|0)!=(c|0));d=f[a>>2]|0;c=g}f[a>>2]=i;f[m>>2]=j;f[n>>2]=c;f[l>>2]=h;if(d){No(d);c=f[n>>2]|0}}while(0);f[c>>2]=f[b>>2];f[n>>2]=(f[n>>2]|0)+4;return}function Ze(a,b,c){a=a|0;b=b|0;c=c|0;var d=0,e=0,g=0,h=0,i=0,j=0,k=0;j=a+8|0;e=f[j>>2]|0;k=a+4|0;d=f[k>>2]|0;if(((e-d|0)/12|0)>>>0>=b>>>0){do{f[d>>2]=f[c>>2];f[d+4>>2]=f[c+4>>2];f[d+8>>2]=f[c+8>>2];d=(f[k>>2]|0)+12|0;f[k>>2]=d;b=b+-1|0}while((b|0)!=0);return}g=f[a>>2]|0;h=(d-g|0)/12|0;d=h+b|0;if(d>>>0>357913941)co(a);g=(e-g|0)/12|0;i=g<<1;d=g>>>0<178956970?(i>>>0>>0?d:i):357913941;do if(d)if(d>>>0>357913941){k=sa(8)|0;Km(k,17959);f[k>>2]=4748;wa(k|0,1128,100)}else{e=Rk(d*12|0)|0;break}else e=0;while(0);i=e+(h*12|0)|0;h=e+(d*12|0)|0;d=i;g=i;do{f[d>>2]=f[c>>2];f[d+4>>2]=f[c+4>>2];f[d+8>>2]=f[c+8>>2];d=g+12|0;g=d;b=b+-1|0}while((b|0)!=0);d=f[a>>2]|0;e=(f[k>>2]|0)-d|0;b=i+(((e|0)/-12|0)*12|0)|0;if((e|0)>0)ef(b|0,d|0,e|0)|0;f[a>>2]=b;f[k>>2]=g;f[j>>2]=h;if(!d)return;No(d);return}function _e(a,b,c){a=a|0;b=b|0;c=c|0;var d=0,e=0,g=0,h=0,i=0,j=0;j=u;u=u+16|0;i=j;g=f[c>>2]|0;f[c>>2]=0;f[i>>2]=g;Fe(a,b,i);g=f[i>>2]|0;f[i>>2]=0;if(g|0){i=g+88|0;c=f[i>>2]|0;f[i>>2]=0;if(c|0){d=f[c+8>>2]|0;if(d|0){e=c+12|0;if((f[e>>2]|0)!=(d|0))f[e>>2]=d;No(d)}No(c)}c=f[g+68>>2]|0;if(c|0){e=g+72|0;d=f[e>>2]|0;if((d|0)!=(c|0))f[e>>2]=d+(~((d+-4-c|0)>>>2)<<2);No(c)}i=g+64|0;c=f[i>>2]|0;f[i>>2]=0;if(c|0){d=f[c>>2]|0;if(d|0){e=c+4|0;if((f[e>>2]|0)!=(d|0))f[e>>2]=d;No(d)}No(c)}No(g)}i=a+84|0;h=a+88|0;c=f[h>>2]|0;g=f[i>>2]|0;a=c-g>>2;if((a|0)>(b|0)){u=j;return}e=b+1|0;d=c;if(e>>>0>a>>>0){Mf(i,e-a|0);u=j;return}if(e>>>0>=a>>>0){u=j;return}c=g+(e<<2)|0;if((d|0)==(c|0)){u=j;return}f[h>>2]=d+(~((d+-4-c|0)>>>2)<<2);u=j;return}function $e(a,b){a=a|0;b=b|0;var c=0,d=0,e=0,g=0,h=0,i=0,j=0,k=0;j=a+4|0;c=f[a>>2]|0;g=(f[j>>2]|0)-c>>2;d=g+1|0;if(d>>>0>1073741823)co(a);k=a+8|0;i=(f[k>>2]|0)-c|0;c=i>>1;c=i>>2>>>0<536870911?(c>>>0>>0?d:c):1073741823;do if(c)if(c>>>0>1073741823){a=sa(8)|0;Km(a,17959);f[a>>2]=4748;wa(a|0,1128,100)}else{e=Rk(c<<2)|0;break}else e=0;while(0);g=e+(g<<2)|0;d=g;i=e+(c<<2)|0;h=f[b>>2]|0;f[b>>2]=0;f[g>>2]=h;h=g+4|0;b=f[a>>2]|0;c=f[j>>2]|0;if((c|0)==(b|0)){g=b;c=b}else{e=g;do{c=c+-4|0;g=f[c>>2]|0;f[c>>2]=0;f[e+-4>>2]=g;e=d+-4|0;d=e}while((c|0)!=(b|0));g=f[a>>2]|0;c=f[j>>2]|0}f[a>>2]=d;f[j>>2]=h;f[k>>2]=i;e=g;if((c|0)!=(e|0))do{c=c+-4|0;d=f[c>>2]|0;f[c>>2]=0;if(d|0){Rg(d);No(d)}}while((c|0)!=(e|0));if(!g)return;No(g);return}function af(a,c){a=a|0;c=c|0;var d=0,e=0,g=0,h=0,i=0,j=0;j=u;u=u+32|0;e=j+16|0;g=j;switch(c<<24>>24){case 0:{c=Rk(44)|0;h=c;i=h+44|0;do{f[h>>2]=0;h=h+4|0}while((h|0)<(i|0));Zj(c);f[c>>2]=3528;f[a>>2]=0;f[a+4>>2]=0;f[a+8>>2]=0;f[a+12>>2]=0;f[a+16>>2]=c;u=j;return}case 1:{c=Rk(44)|0;h=c;i=h+44|0;do{f[h>>2]=0;h=h+4|0}while((h|0)<(i|0));Zj(c);f[c>>2]=3484;f[a>>2]=0;f[a+4>>2]=0;f[a+8>>2]=0;f[a+12>>2]=0;f[a+16>>2]=c;u=j;return}default:{c=Rk(32)|0;f[g>>2]=c;f[g+8>>2]=-2147483616;f[g+4>>2]=28;h=c;d=14677;i=h+28|0;do{b[h>>0]=b[d>>0]|0;h=h+1|0;d=d+1|0}while((h|0)<(i|0));b[c+28>>0]=0;f[e>>2]=-1;c=e+4|0;lh(c,g);f[a>>2]=f[e>>2];lh(a+4|0,c);f[a+16>>2]=0;if((b[c+11>>0]|0)<0)No(f[c>>2]|0);if((b[g+11>>0]|0)<0)No(f[g>>2]|0);u=j;return}}}function bf(a,c,d){a=a|0;c=c|0;d=d|0;var e=0,g=0,i=0,k=0,l=0;do if(c){if((j[a+38>>1]|0)>=514){if(bh(d,a)|0)break;else c=0;return c|0}l=a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g(b);No(b)}d=d+1|0;if(d>>>0>=(f[h>>2]|0)>>>0){i=8;break a}}Rg(b);No(b);b=0}while(0);if((i|0)==8)b=zc(a,c)|0;k=b;u=j;return k|0}function df(a,c){a=a|0;c=c|0;var d=0,e=0,g=0,h=0,i=0,j=0,k=0,l=0,m=0,n=0;l=a+4|0;d=f[l>>2]|0;do if(d|0){m=b[c+11>>0]|0;k=m<<24>>24<0;m=k?f[c+4>>2]|0:m&255;k=k?f[c>>2]|0:c;a=l;a:while(1){c=d;while(1){e=c+16|0;g=b[e+11>>0]|0;h=g<<24>>24<0;g=h?f[c+20>>2]|0:g&255;d=m>>>0>>0?m:g;if((d|0)!=0?(i=ij(h?f[e>>2]|0:e,k,d)|0,(i|0)!=0):0){if((i|0)>=0)break}else j=6;if((j|0)==6?(j=0,g>>>0>=m>>>0):0)break;c=f[c+4>>2]|0;if(!c)break a}d=f[c>>2]|0;if(!d){a=c;break}else a=c}if((a|0)!=(l|0)){d=a+16|0;e=b[d+11>>0]|0;g=e<<24>>24<0;e=g?f[a+20>>2]|0:e&255;c=e>>>0>>0?e:m;if(c|0?(n=ij(k,g?f[d>>2]|0:d,c)|0,n|0):0){if((n|0)<0)break;return a|0}if(m>>>0>=e>>>0){n=a;return n|0}}}while(0);n=l;return n|0}function ef(a,c,d){a=a|0;c=c|0;d=d|0;var e=0,g=0,h=0;if((d|0)>=8192)return Fa(a|0,c|0,d|0)|0;h=a|0;g=a+d|0;if((a&3)==(c&3)){while(a&3){if(!d)return h|0;b[a>>0]=b[c>>0]|0;a=a+1|0;c=c+1|0;d=d-1|0}d=g&-4|0;e=d-64|0;while((a|0)<=(e|0)){f[a>>2]=f[c>>2];f[a+4>>2]=f[c+4>>2];f[a+8>>2]=f[c+8>>2];f[a+12>>2]=f[c+12>>2];f[a+16>>2]=f[c+16>>2];f[a+20>>2]=f[c+20>>2];f[a+24>>2]=f[c+24>>2];f[a+28>>2]=f[c+28>>2];f[a+32>>2]=f[c+32>>2];f[a+36>>2]=f[c+36>>2];f[a+40>>2]=f[c+40>>2];f[a+44>>2]=f[c+44>>2];f[a+48>>2]=f[c+48>>2];f[a+52>>2]=f[c+52>>2];f[a+56>>2]=f[c+56>>2];f[a+60>>2]=f[c+60>>2];a=a+64|0;c=c+64|0}while((a|0)<(d|0)){f[a>>2]=f[c>>2];a=a+4|0;c=c+4|0}}else{d=g-4|0;while((a|0)<(d|0)){b[a>>0]=b[c>>0]|0;b[a+1>>0]=b[c+1>>0]|0;b[a+2>>0]=b[c+2>>0]|0;b[a+3>>0]=b[c+3>>0]|0;a=a+4|0;c=c+4|0}}while((a|0)<(g|0)){b[a>>0]=b[c>>0]|0;a=a+1|0;c=c+1|0}return h|0}function ff(a){a=a|0;var b=0,c=0,d=0,e=0,g=0,h=0;b=f[a+196>>2]|0;if(b|0){d=a+200|0;c=f[d>>2]|0;if((c|0)!=(b|0))f[d>>2]=c+(~((c+-4-b|0)>>>2)<<2);No(b)}g=a+184|0;b=f[g>>2]|0;if(b|0){h=a+188|0;c=f[h>>2]|0;if((c|0)!=(b|0)){do{d=c+-12|0;f[h>>2]=d;e=f[d>>2]|0;if(!e)c=d;else{d=c+-8|0;c=f[d>>2]|0;if((c|0)!=(e|0))f[d>>2]=c+(~((c+-4-e|0)>>>2)<<2);No(e);c=f[h>>2]|0}}while((c|0)!=(b|0));b=f[g>>2]|0}No(b)}b=f[a+156>>2]|0;if(b|0){d=a+160|0;c=f[d>>2]|0;if((c|0)!=(b|0))f[d>>2]=c+(~((c+-4-b|0)>>>2)<<2);No(b)}h=a+136|0;c=f[h>>2]|0;f[h>>2]=0;if(!c){h=a+120|0;So(h);h=a+80|0;So(h);h=a+64|0;So(h);a=a+24|0;So(a);return}d=c+-4|0;b=f[d>>2]|0;if(b|0){b=c+(b<<4)|0;do{b=b+-16|0;So(b)}while((b|0)!=(c|0))}Lo(d);h=a+120|0;So(h);h=a+80|0;So(h);h=a+64|0;So(h);a=a+24|0;So(a);return}function gf(a,b,c,d,e){a=a|0;b=b|0;c=c|0;d=d|0;e=e|0;var g=0,i=0;if((b|0)==-2)g=0;else{g=f[d+4>>2]|0;if((c|0)<=-1)ra(14612,17288,59,17379);i=f[g+8>>2]|0;if(((f[g+12>>2]|0)-i>>2|0)<=(c|0))ra(17234,17288,60,17379);g=f[i+(c<<2)>>2]|0;do if((Na[f[(f[d>>2]|0)+8>>2]&127](d)|0)==1){Qd(a,d,b,c,e,((h[d+36>>0]|0)<<8|(h[d+37>>0]|0))&65535);if(!(f[a>>2]|0)){f[a>>2]=0;break}else return}while(0);b=Rk(44)|0;f[b>>2]=1536;f[b+4>>2]=g;g=b+8|0;f[g>>2]=f[e>>2];f[g+4>>2]=f[e+4>>2];f[g+8>>2]=f[e+8>>2];f[g+12>>2]=f[e+12>>2];f[g+16>>2]=f[e+16>>2];f[g+20>>2]=f[e+20>>2];Yh(b+32|0,e+24|0);f[b>>2]=1592;g=b}f[a>>2]=g;return}function hf(a,b){a=a|0;b=b|0;var c=0,d=0,e=0,g=0,h=0,i=0;i=a+60|0;c=f[i>>2]|0;if(!c){a=0;return a|0}f[c+4>>2]=a+48;if(!(Na[f[(f[c>>2]|0)+12>>2]&127](c)|0)){a=0;return a|0}g=Na[f[(f[a>>2]|0)+24>>2]&127](a)|0;a:do if((g|0)>0){h=0;while(1){c=(Na[f[(f[a>>2]|0)+28>>2]&127](a)|0)+4|0;c=f[c>>2]|0;e=Oa[f[(f[a>>2]|0)+20>>2]&127](a,h)|0;if((e|0)<=-1){d=7;break}d=f[c+8>>2]|0;if(((f[c+12>>2]|0)-d>>2|0)<=(e|0)){d=9;break}c=f[i>>2]|0;h=h+1|0;if(!(Oa[f[(f[c>>2]|0)+8>>2]&127](c,f[d+(e<<2)>>2]|0)|0)){c=0;d=14;break}if((h|0)>=(g|0))break a}if((d|0)==7)ra(14612,17288,67,17379);else if((d|0)==9)ra(17234,17288,68,17379);else if((d|0)==14)return c|0}while(0);if(!(Oa[f[(f[a>>2]|0)+36>>2]&127](a,b)|0)){a=0;return a|0}if(!(Oa[f[(f[a>>2]|0)+40>>2]&127](a,b)|0)){a=0;return a|0}a=Na[f[(f[a>>2]|0)+44>>2]&127](a)|0;return a|0}function jf(a,b,c){a=a|0;b=b|0;c=c|0;var d=0,e=0,g=0,h=0,i=0,j=0,k=0,l=0,m=0,n=0,o=0;m=u;u=u+48|0;i=m+16|0;e=m;d=m+32|0;j=a+28|0;g=f[j>>2]|0;f[d>>2]=g;k=a+20|0;g=(f[k>>2]|0)-g|0;f[d+4>>2]=g;f[d+8>>2]=b;f[d+12>>2]=c;g=g+c|0;h=a+60|0;f[e>>2]=f[h>>2];f[e+4>>2]=d;f[e+8>>2]=2;b=ym(Ba(146,e|0)|0)|0;a:do if((g|0)!=(b|0)){e=2;while(1){if((b|0)<0)break;g=g-b|0;o=f[d+4>>2]|0;n=b>>>0>o>>>0;d=n?d+8|0:d;e=(n<<31>>31)+e|0;o=b-(n?o:0)|0;f[d>>2]=(f[d>>2]|0)+o;n=d+4|0;f[n>>2]=(f[n>>2]|0)-o;f[i>>2]=f[h>>2];f[i+4>>2]=d;f[i+8>>2]=e;b=ym(Ba(146,i|0)|0)|0;if((g|0)==(b|0)){l=3;break a}}f[a+16>>2]=0;f[j>>2]=0;f[k>>2]=0;f[a>>2]=f[a>>2]|32;if((e|0)==2)c=0;else c=c-(f[d+4>>2]|0)|0}else l=3;while(0);if((l|0)==3){o=f[a+44>>2]|0;f[a+16>>2]=o+(f[a+48>>2]|0);f[j>>2]=o;f[k>>2]=o}u=m;return c|0}function kf(a){a=a|0;var c=0,d=0,e=0,g=0,i=0,j=0;d=a+172|0;c=f[d>>2]|0;do if((c|0)==-1){j=f[a+144>>2]|0;j=Na[f[(f[j>>2]|0)+32>>2]&127](j)|0;if(((h[j+36>>0]<<8|h[j+37>>0])&65535)<514)if(b[a+76>>0]|0){j=a+72|0;d=f[j>>2]|0;g=f[a+64>>2]|0;i=f[a+68>>2]|0;c=g+(d>>>3)|0;if(c>>>0>>0?(c=h[c>>0]|0,e=d+1|0,f[j>>2]=e,(c&1<<(d&7)|0)!=0):0){c=g+(e>>>3)|0;if(c>>>0>>0){e=(h[c>>0]|0)>>>(e&7)&1;d=d+2|0;f[j>>2]=d}else{d=e;e=0}c=g+(d>>>3)|0;if(c>>>0>>0){c=(h[c>>0]|0)>>>(d&7);f[j>>2]=d+1;c=c<<1&2}else c=0;c=(c|e)<<1|1}else c=0}else c=1;else c=7}else{i=(f[a+196>>2]|0)+(c<<2)|0;j=f[i>>2]|0;c=j+-1|0;f[i>>2]=c;if((j|0)<1){a=9;return a|0}else{c=f[3328+(f[(f[(f[a+184>>2]|0)+((f[d>>2]|0)*12|0)>>2]|0)+(c<<2)>>2]<<2)>>2]|0;break}}while(0);f[a+168>>2]=c;a=c;return a|0}function lf(a,c,d){a=a|0;c=c|0;d=d|0;var e=0,g=0,h=0,i=0,j=0,k=0,l=0,m=0;m=u;u=u+16|0;l=m+4|0;k=m;j=f[c+4>>2]|0;if(!j)ra(10545,10788,70,10952);h=f[c+8>>2]|0;if(!h)ra(10545,10788,70,10952);g=f[c+16>>2]|0;d=f[d>>2]|0;do if((d|0)>=0){e=f[g>>2]|0;if((d|0)<((f[g+4>>2]|0)-e>>2|0)){i=f[e+(d<<2)>>2]|0;break}else ra(16937,16972,98,17057)}else i=-1073741824;while(0);d=f[c+20>>2]|0;e=f[d>>2]|0;if((f[d+4>>2]|0)-e>>2>>>0<=i>>>0)co(d);d=f[h+(f[e+(i<<2)>>2]<<2)>>2]|0;if(!(b[j+84>>0]|0))d=f[(f[j+68>>2]|0)+(d<<2)>>2]|0;f[a>>2]=0;f[a+4>>2]=0;f[a+8>>2]=0;f[a+12>>2]=0;f[a+16>>2]=0;f[a+20>>2]=0;f[k>>2]=d;i=b[j+24>>0]|0;f[l>>2]=f[k>>2];yb(j,l,i,a)|0;u=m;return}function mf(a){a=a|0;var c=0,d=0,e=0,g=0,h=0,i=0,j=0;i=a+12|0;h=f[a>>2]|0;j=a+8|0;c=f[j>>2]|0;d=(c|0)<0;if(!(b[i>>0]|0)){do if(!d){c=(((c>>>0)%3|0|0)==0?2:-1)+c|0;if((c|0)>=0){c=f[(f[h+12>>2]|0)+(c<<2)>>2]|0;if((c|0)>=0)if(!((c>>>0)%3|0)){c=c+2|0;break}else{c=c+-1|0;break}}}while(0);f[j>>2]=c;return}e=c+1|0;if(!d){c=((e|0)%3|0|0)==0?c+-2|0:e;if((c|0)>=0){c=f[(f[h+12>>2]|0)+(c<<2)>>2]|0;d=c+1|0;if((c|0)>=0){c=((d|0)%3|0|0)==0?c+-2|0:d;f[j>>2]=c;if((c|0)>=0){if((c|0)!=(f[a+4>>2]|0))return;f[j>>2]=-1073741824;return}}else g=5}else g=5}else g=5;if((g|0)==5)f[j>>2]=c;c=f[a+4>>2]|0;do if((c|0)>=0){c=(((c>>>0)%3|0|0)==0?2:-1)+c|0;if((c|0)>=0){c=f[(f[h+12>>2]|0)+(c<<2)>>2]|0;if((c|0)>=0)if(!((c>>>0)%3|0)){c=c+2|0;break}else{c=c+-1|0;break}}}while(0);f[j>>2]=c;b[i>>0]=0;return}function nf(a){a=a|0;var c=0,d=0,e=0,g=0,h=0,i=0,j=0,k=0,l=0;k=a+8|0;c=f[k>>2]|0;l=a+16|0;if(b[c+84>>0]|0){l=f[l>>2]|0;return l|0}d=f[l>>2]|0;if(!d){l=f[l>>2]|0;return l|0}a=d+84|0;if(!(b[a>>0]|0)){l=f[l>>2]|0;return l|0}i=(f[c+72>>2]|0)-(f[c+68>>2]|0)>>2;b[a>>0]=0;h=d+68|0;e=d+72|0;d=f[e>>2]|0;a=f[h>>2]|0;g=d-a>>2;if(i>>>0<=g>>>0){if(i>>>0>>0?(j=a+(i<<2)|0,(d|0)!=(j|0)):0)f[e>>2]=d+(~((d+-4-j|0)>>>2)<<2)}else{Af(h,i-g|0,1404);c=f[k>>2]|0}if(b[c+84>>0]|0){l=f[l>>2]|0;return l|0}k=f[c+68>>2]|0;g=k;k=(f[c+72>>2]|0)-k|0;d=k>>2;if((k|0)<=0){l=f[l>>2]|0;return l|0}c=f[l>>2]|0;e=(b[c+84>>0]|0)==0;c=c+68|0;a=0;while(1){if(!e){c=14;break}f[(f[c>>2]|0)+(a<<2)>>2]=f[g+(a<<2)>>2];a=a+1|0;if((a|0)>=(d|0)){c=15;break}}if((c|0)==14)ra(14974,14993,89,15087);else if((c|0)==15){l=f[l>>2]|0;return l|0}return 0}function of(a,b,c,d){a=a|0;b=b|0;c=c|0;d=d|0;var e=0,g=0,h=0,i=0;h=u;u=u+16|0;e=h+12|0;g=h+8|0;i=h;f[i>>2]=f[b>>2];f[e>>2]=f[i>>2];b=pc(a,e,g,h+4|0,c)|0;c=f[b>>2]|0;if(c|0){i=c;u=h;return i|0}e=Rk(40)|0;lh(e+16|0,d);lh(e+28|0,d+12|0);c=f[g>>2]|0;f[e>>2]=0;f[e+4>>2]=0;f[e+8>>2]=c;f[b>>2]=e;c=f[f[a>>2]>>2]|0;if(!c)c=e;else{f[a>>2]=c;c=f[b>>2]|0}qd(f[a+4>>2]|0,c);i=a+8|0;f[i>>2]=(f[i>>2]|0)+1;i=e;u=h;return i|0}function pf(a,c,d){a=a|0;c=c|0;d=d|0;var e=0,g=0,h=0,i=0,j=0,k=0,l=0,m=0,n=0;m=u;u=u+16|0;l=m;j=a+4|0;f[j>>2]=0;if(!c){u=m;return}i=a+8|0;e=f[i>>2]|0;g=e<<5;if(g>>>0>>0){f[l>>2]=0;k=l+4|0;f[k>>2]=0;h=l+8|0;f[h>>2]=0;if((c|0)<0)co(a);e=e<<6;n=c+31&-32;mg(l,g>>>0<1073741823?(e>>>0>>0?n:e):2147483647);e=f[a>>2]|0;f[a>>2]=f[l>>2];f[l>>2]=e;l=f[j>>2]|0;f[j>>2]=c;f[k>>2]=l;l=f[i>>2]|0;f[i>>2]=f[h>>2];f[h>>2]=l;if(e|0)No(e)}else f[j>>2]=c;a=f[a>>2]|0;g=a;h=c>>>5;e=h<<2;if(!(b[d>>0]|0)){kh(a|0,0,e|0)|0;e=c-(h<<5)|0;a=g+(h<<2)|0;if(!e){u=m;return}f[a>>2]=f[a>>2]&~(-1>>>(32-e|0));u=m;return}else{kh(a|0,-1,e|0)|0;e=c-(h<<5)|0;a=g+(h<<2)|0;if(!e){u=m;return}f[a>>2]=f[a>>2]|-1>>>(32-e|0);u=m;return}}function qf(a,c,d,e,g){a=a|0;c=c|0;d=d|0;e=e|0;g=g|0;var h=0,i=0,j=0,k=0;do if(!(jn(a,f[c+8>>2]|0,g)|0)){h=a+8|0;if(!(jn(a,f[c>>2]|0,g)|0)){j=f[h>>2]|0;Wa[f[(f[j>>2]|0)+24>>2]&3](j,c,d,e,g);break}a=c+32|0;if((f[c+16>>2]|0)!=(d|0)?(i=c+20|0,(f[i>>2]|0)!=(d|0)):0){f[a>>2]=e;e=c+44|0;if((f[e>>2]|0)==4)break;a=c+52|0;b[a>>0]=0;k=c+53|0;b[k>>0]=0;h=f[h>>2]|0;Xa[f[(f[h>>2]|0)+20>>2]&3](h,c,d,d,1,g);if(b[k>>0]|0)if(!(b[a>>0]|0)){a=3;j=11}else a=3;else{a=4;j=11}if((j|0)==11){f[i>>2]=d;k=c+40|0;f[k>>2]=(f[k>>2]|0)+1;if((f[c+36>>2]|0)==1?(f[c+24>>2]|0)==2:0)b[c+54>>0]=1}f[e>>2]=a;break}if((e|0)==1)f[a>>2]=1}else rk(0,c,d,e);while(0);return}function rf(a,b,c,d,e,g){a=a|0;b=b|0;c=c|0;d=d|0;e=e|0;g=g|0;var h=0,i=0,j=0;h=f[a>>2]|0;if((h|0)<0){j=f[c>>2]|0;f[d>>2]=f[j>>2];f[e>>2]=f[j>>2];b=-1073741824;b=j+(b<<2)|0;b=f[b>>2]|0;f[g>>2]=b;return}a=f[b>>2]|0;if((h|0)>=((f[b+4>>2]|0)-a>>2|0))ra(16937,16972,98,17057);i=f[c>>2]|0;f[d>>2]=f[i+(f[a+(h<<2)>>2]<<2)>>2];c=h+1|0;c=((c|0)%3|0|0)==0?h+-2|0:c;do if((c|0)>=0){a=f[b>>2]|0;if((c|0)<((f[b+4>>2]|0)-a>>2|0)){j=f[a+(c<<2)>>2]|0;break}else ra(16937,16972,98,17057)}else j=-1073741824;while(0);f[e>>2]=f[i+(j<<2)>>2];c=(((h>>>0)%3|0|0)==0?2:-1)+h|0;if((c|0)<0){j=i;b=-1073741824;b=j+(b<<2)|0;b=f[b>>2]|0;f[g>>2]=b;return}a=f[b>>2]|0;if((c|0)>=((f[b+4>>2]|0)-a>>2|0))ra(16937,16972,98,17057);j=i;b=f[a+(c<<2)>>2]|0;b=j+(b<<2)|0;b=f[b>>2]|0;f[g>>2]=b;return}function sf(a,b){a=a|0;b=b|0;var c=0,d=0,e=0,g=0,i=0,j=0,k=0,l=0,m=0;m=u;u=u+16|0;l=m;if(!(Dd(a,b)|0)){a=0;u=m;return a|0}i=b+8|0;j=f[i>>2]|0;i=f[i+4>>2]|0;g=b+16|0;d=g;c=f[d>>2]|0;d=Hl(c|0,f[d+4>>2]|0,4,0)|0;e=I;if((i|0)<(e|0)|(i|0)==(e|0)&j>>>0>>0){a=0;u=m;return a|0}c=(f[b>>2]|0)+c|0;c=h[c>>0]|h[c+1>>0]<<8|h[c+2>>0]<<16|h[c+3>>0]<<24;j=g;f[j>>2]=d;f[j+4>>2]=e;if((c|0)<0){a=0;u=m;return a|0}j=f[a+152>>2]|0;if((c|0)>=(j|0)){a=0;u=m;return a|0}i=a+156|0;f[l>>2]=0;e=a+160|0;d=f[e>>2]|0;c=f[i>>2]|0;g=d-c>>2;if(j>>>0<=g>>>0){if(j>>>0>>0?(k=c+(j<<2)|0,(d|0)!=(k|0)):0)f[e>>2]=d+(~((d+-4-k|0)>>>2)<<2)}else Af(i,j-g|0,l);a=nd(a+168|0,b)|0;u=m;return a|0}function tf(a,b,c,d,e){a=a|0;b=b|0;c=c|0;d=d|0;e=e|0;var g=0,i=0;if((b|0)==-2)g=0;else{g=f[d+4>>2]|0;if((c|0)<=-1)ra(14612,17288,59,17379);i=f[g+8>>2]|0;if(((f[g+12>>2]|0)-i>>2|0)<=(c|0))ra(17234,17288,60,17379);g=f[i+(c<<2)>>2]|0;do if((Na[f[(f[d>>2]|0)+8>>2]&127](d)|0)==1){Xc(a,d,b,c,e,((h[d+36>>0]|0)<<8|(h[d+37>>0]|0))&65535);if(!(f[a>>2]|0)){f[a>>2]=0;break}else return}while(0);b=Rk(24)|0;f[b+4>>2]=g;g=b+8|0;f[g>>2]=f[e>>2];f[g+4>>2]=f[e+4>>2];f[g+8>>2]=f[e+8>>2];f[g+12>>2]=f[e+12>>2];f[b>>2]=2436;g=b}f[a>>2]=g;return}function uf(a,b){a=a|0;b=b|0;var c=0,d=0,e=0,g=0,h=0,i=0,j=0;i=a+8|0;d=f[i>>2]|0;j=a+4|0;c=f[j>>2]|0;if(d-c>>3>>>0>=b>>>0){do{a=c;f[a>>2]=0;f[a+4>>2]=0;c=(f[j>>2]|0)+8|0;f[j>>2]=c;b=b+-1|0}while((b|0)!=0);return}e=f[a>>2]|0;g=c-e>>3;c=g+b|0;if(c>>>0>536870911)co(a);e=d-e|0;h=e>>2;c=e>>3>>>0<268435455?(h>>>0>>0?c:h):536870911;do if(c)if(c>>>0>536870911){j=sa(8)|0;Km(j,17959);f[j>>2]=4748;wa(j|0,1128,100)}else{d=Rk(c<<3)|0;break}else d=0;while(0);h=d+(g<<3)|0;g=d+(c<<3)|0;c=h;e=h;do{d=c;f[d>>2]=0;f[d+4>>2]=0;c=e+8|0;e=c;b=b+-1|0}while((b|0)!=0);c=f[a>>2]|0;d=(f[j>>2]|0)-c|0;b=h+(0-(d>>3)<<3)|0;if((d|0)>0)ef(b|0,c|0,d|0)|0;f[a>>2]=b;f[j>>2]=e;f[i>>2]=g;if(!c)return;No(c);return}function vf(a,b){a=a|0;b=b|0;var c=0,d=0,e=0,g=0,h=0,i=0,j=0;h=u;u=u+16|0;c=h;i=f[(f[a>>2]|0)+8>>2]|0;g=a+8|0;e=a+12|0;d=(f[e>>2]|0)-(f[g>>2]|0)>>2;j=f[b>>2]|0;f[b>>2]=0;f[c>>2]=j;Ua[i&15](a,d,c);d=f[c>>2]|0;f[c>>2]=0;if(!d){i=f[e>>2]|0;j=f[g>>2]|0;j=i-j|0;j=j>>2;j=j+-1|0;u=h;return j|0}j=d+88|0;b=f[j>>2]|0;f[j>>2]=0;if(b|0){a=f[b+8>>2]|0;if(a|0){c=b+12|0;if((f[c>>2]|0)!=(a|0))f[c>>2]=a;No(a)}No(b)}b=f[d+68>>2]|0;if(b|0){c=d+72|0;a=f[c>>2]|0;if((a|0)!=(b|0))f[c>>2]=a+(~((a+-4-b|0)>>>2)<<2);No(b)}j=d+64|0;b=f[j>>2]|0;f[j>>2]=0;if(b|0){a=f[b>>2]|0;if(a|0){c=b+4|0;if((f[c>>2]|0)!=(a|0))f[c>>2]=a;No(a)}No(b)}No(d);i=f[e>>2]|0;j=f[g>>2]|0;j=i-j|0;j=j>>2;j=j+-1|0;u=h;return j|0}function wf(a,b){a=a|0;b=b|0;var c=0,d=0,e=0,g=0,i=0;if((Na[f[(f[b>>2]|0)+20>>2]&127](b)|0)<=0){b=1;return b|0}g=a+4|0;i=0;while(1){e=f[(f[g>>2]|0)+4>>2]|0;e=Vj(e,Oa[f[(f[b>>2]|0)+24>>2]&127](b,i)|0)|0;if((e|0)==-1){a=0;c=12;break}a=f[g>>2]|0;d=f[(f[b>>2]|0)+28>>2]|0;if(((h[a+36>>0]|0)<<8&65535)<512){a=f[a+4>>2]|0;if((e|0)<=-1){c=6;break}c=f[a+8>>2]|0;if(((f[a+12>>2]|0)-c>>2|0)<=(e|0)){c=8;break}if(!(Oa[d&127](b,f[c+(e<<2)>>2]|0)|0)){a=0;c=12;break}}else{e=$i(a,e)|0;if(!(Oa[d&127](b,e)|0)){a=0;c=12;break}}i=i+1|0;if((i|0)>=(Na[f[(f[b>>2]|0)+20>>2]&127](b)|0)){a=1;c=12;break}}if((c|0)==6)ra(14612,17288,67,17379);else if((c|0)==8)ra(17234,17288,68,17379);else if((c|0)==12)return a|0;return 0}function xf(a,b,c,d,e){a=a|0;b=b|0;c=c|0;d=d|0;e=e|0;var g=0,i=0;if((b|0)==-2)g=0;else{g=f[d+4>>2]|0;if((c|0)<=-1)ra(14612,17288,59,17379);i=f[g+8>>2]|0;if(((f[g+12>>2]|0)-i>>2|0)<=(c|0))ra(17234,17288,60,17379);g=f[i+(c<<2)>>2]|0;do if((Na[f[(f[d>>2]|0)+8>>2]&127](d)|0)==1){ed(a,d,b,c,e,((h[d+36>>0]|0)<<8|(h[d+37>>0]|0))&65535);if(!(f[a>>2]|0)){f[a>>2]=0;break}else return}while(0);b=Rk(24)|0;f[b+4>>2]=g;g=b+8|0;f[g>>2]=f[e>>2];f[g+4>>2]=f[e+4>>2];f[g+8>>2]=f[e+8>>2];f[g+12>>2]=f[e+12>>2];f[b>>2]=2660;g=b}f[a>>2]=g;return}function yf(a,c,d){a=a|0;c=c|0;d=d|0;var e=0,g=0,h=0,i=0,j=0,k=0,l=0,m=0,n=0,o=0,p=0,q=0,r=0;r=u;u=u+224|0;m=r+120|0;q=r+80|0;p=r;o=r+136|0;e=q;g=e+40|0;do{f[e>>2]=0;e=e+4|0}while((e|0)<(g|0));f[m>>2]=f[d>>2];if((Ab(0,c,m,p,q)|0)<0)d=-1;else{if((f[a+76>>2]|0)>-1)n=To(a)|0;else n=0;d=f[a>>2]|0;l=d&32;if((b[a+74>>0]|0)<1)f[a>>2]=d&-33;h=a+48|0;if(!(f[h>>2]|0)){g=a+44|0;d=f[g>>2]|0;f[g>>2]=o;i=a+28|0;f[i>>2]=o;k=a+20|0;f[k>>2]=o;f[h>>2]=80;j=a+16|0;f[j>>2]=o+80;e=Ab(a,c,m,p,q)|0;if(d){Pa[f[a+36>>2]&31](a,0,0)|0;e=(f[k>>2]|0)==0?-1:e;f[g>>2]=d;f[h>>2]=0;f[j>>2]=0;f[i>>2]=0;f[k>>2]=0}}else e=Ab(a,c,m,p,q)|0;d=f[a>>2]|0;f[a>>2]=d|l;if(n|0)So(a);d=(d&32|0)==0?e:-1}u=r;return d|0}function zf(a,c,d,e){a=a|0;c=c|0;d=d|0;e=e|0;var g=0,h=0,i=0,j=0,k=0;g=Rk(32)|0;f[a>>2]=g;f[a+4>>2]=c+8;i=a+8|0;b[i>>0]=0;j=g+8|0;f[j>>2]=f[e>>2];f[j+4>>2]=f[e+4>>2];f[j+8>>2]=f[e+8>>2];f[e>>2]=0;f[e+4>>2]=0;f[e+8>>2]=0;j=g+20|0;k=e+12|0;f[j>>2]=0;f[g+24>>2]=0;f[g+28>>2]=0;g=e+16|0;c=f[g>>2]|0;e=f[k>>2]|0;h=c-e|0;if(!h){j=e;g=c;h=0;k=j;k=g-k|0;ef(h|0,j|0,k|0)|0;b[i>>0]=1;a=f[a>>2]|0;k=a+4|0;f[k>>2]=d;f[a>>2]=0;return}Dg(j,h);h=f[k>>2]|0;g=f[g>>2]|0;j=f[j>>2]|0;k=h;k=g-k|0;ef(j|0,h|0,k|0)|0;b[i>>0]=1;a=f[a>>2]|0;k=a+4|0;f[k>>2]=d;f[a>>2]=0;return}function Af(a,b,c){a=a|0;b=b|0;c=c|0;var d=0,e=0,g=0,h=0,i=0,j=0,k=0,l=0,m=0;l=a+8|0;e=f[l>>2]|0;m=a+4|0;d=f[m>>2]|0;g=d;if(e-d>>2>>>0>=b>>>0){d=g;e=b;while(1){f[d>>2]=f[c>>2];e=e+-1|0;if(!e)break;else d=d+4|0}f[m>>2]=g+(b<<2);return}k=f[a>>2]|0;j=d-k|0;i=j>>2;d=i+b|0;if(d>>>0>1073741823)co(a);g=e-k|0;h=g>>1;d=g>>2>>>0<536870911?(h>>>0>>0?d:h):1073741823;do if(d)if(d>>>0>1073741823){b=sa(8)|0;Km(b,17959);f[b>>2]=4748;wa(b|0,1128,100)}else{e=Rk(d<<2)|0;break}else e=0;while(0);h=e+(i<<2)|0;g=e+(d<<2)|0;d=h;e=b;while(1){f[d>>2]=f[c>>2];e=e+-1|0;if(!e)break;else d=d+4|0}d=h+(0-i<<2)|0;if((j|0)>0)ef(d|0,k|0,j|0)|0;f[a>>2]=d;f[m>>2]=h+(b<<2);f[l>>2]=g;if(!k)return;No(k);return}function Bf(a,b,c){a=a|0;b=b|0;c=c|0;var d=0,e=0,g=0,h=0,i=0,j=0,k=0;g=a+4|0;e=f[g>>2]|0;d=f[a>>2]|0;i=e-d>>2;if(i>>>0>=1048576){if((i|0)!=1048576?(h=d+4194304|0,(e|0)!=(h|0)):0)f[g>>2]=e+(~((e+-4-h|0)>>>2)<<2)}else vg(a,1048576-i|0);h=a+12|0;g=a+16|0;e=f[g>>2]|0;d=f[h>>2]|0;i=e-d>>3;if(i>>>0>=c>>>0){if(i>>>0>c>>>0?(j=d+(c<<3)|0,(e|0)!=(j|0)):0)f[g>>2]=e+(~((e+-8-j|0)>>>3)<<3);if(!c){k=0;return k|0}}else uf(h,c-i|0);e=f[h>>2]|0;h=0;i=0;do{j=b+(i<<2)|0;f[e+(i<<3)>>2]=f[j>>2];f[e+(i<<3)+4>>2]=h;d=h;h=(f[j>>2]|0)+h|0;if(h>>>0>1048576){d=0;k=19;break}if(d>>>0>>0){g=f[a>>2]|0;do{f[g+(d<<2)>>2]=i;d=d+1|0}while((d|0)!=(h|0))}i=i+1|0}while(i>>>0>>0);if((k|0)==19)return d|0;k=(h|0)==1048576;return k|0}function Cf(a,c,e,g){a=a|0;c=c|0;e=e|0;g=g|0;var h=0,i=0,j=0,k=0,l=0,m=0,n=0,o=0,p=0;p=u;u=u+64|0;o=p;m=f[a>>2]|0;n=a+(f[m+-8>>2]|0)|0;m=f[m+-4>>2]|0;f[o>>2]=e;f[o+4>>2]=a;f[o+8>>2]=c;f[o+12>>2]=g;g=o+16|0;a=o+20|0;h=o+24|0;j=o+28|0;i=o+32|0;c=o+40|0;k=g;l=k+36|0;do{f[k>>2]=0;k=k+4|0}while((k|0)<(l|0));d[g+36>>1]=0;b[g+38>>0]=0;a:do if(jn(m,e,0)|0){f[o+48>>2]=1;Xa[f[(f[m>>2]|0)+20>>2]&3](m,o,n,n,1,0);g=(f[h>>2]|0)==1?n:0}else{Wa[f[(f[m>>2]|0)+24>>2]&3](m,o,n,1,0);switch(f[o+36>>2]|0){case 0:{g=(f[c>>2]|0)==1&(f[j>>2]|0)==1&(f[i>>2]|0)==1?f[a>>2]|0:0;break a}case 1:break;default:{g=0;break a}}if((f[h>>2]|0)!=1?!((f[c>>2]|0)==0&(f[j>>2]|0)==1&(f[i>>2]|0)==1):0){g=0;break}g=f[g>>2]|0}while(0);u=p;return g|0}function Df(a,b,c){a=a|0;b=b|0;c=c|0;var d=0,e=0,g=0,h=0,i=0,j=0,k=0;g=a+4|0;e=f[g>>2]|0;d=f[a>>2]|0;i=e-d>>2;if(i>>>0>=524288){if((i|0)!=524288?(h=d+2097152|0,(e|0)!=(h|0)):0)f[g>>2]=e+(~((e+-4-h|0)>>>2)<<2)}else vg(a,524288-i|0);h=a+12|0;g=a+16|0;e=f[g>>2]|0;d=f[h>>2]|0;i=e-d>>3;if(i>>>0>=c>>>0){if(i>>>0>c>>>0?(j=d+(c<<3)|0,(e|0)!=(j|0)):0)f[g>>2]=e+(~((e+-8-j|0)>>>3)<<3);if(!c){k=0;return k|0}}else uf(h,c-i|0);e=f[h>>2]|0;h=0;i=0;do{j=b+(i<<2)|0;f[e+(i<<3)>>2]=f[j>>2];f[e+(i<<3)+4>>2]=h;d=h;h=(f[j>>2]|0)+h|0;if(h>>>0>524288){d=0;k=19;break}if(d>>>0>>0){g=f[a>>2]|0;do{f[g+(d<<2)>>2]=i;d=d+1|0}while((d|0)!=(h|0))}i=i+1|0}while(i>>>0>>0);if((k|0)==19)return d|0;k=(h|0)==524288;return k|0}function Ef(a,b,c){a=a|0;b=b|0;c=c|0;var d=0,e=0,g=0,h=0,i=0,j=0,k=0;g=a+4|0;e=f[g>>2]|0;d=f[a>>2]|0;i=e-d>>2;if(i>>>0>=262144){if((i|0)!=262144?(h=d+1048576|0,(e|0)!=(h|0)):0)f[g>>2]=e+(~((e+-4-h|0)>>>2)<<2)}else vg(a,262144-i|0);h=a+12|0;g=a+16|0;e=f[g>>2]|0;d=f[h>>2]|0;i=e-d>>3;if(i>>>0>=c>>>0){if(i>>>0>c>>>0?(j=d+(c<<3)|0,(e|0)!=(j|0)):0)f[g>>2]=e+(~((e+-8-j|0)>>>3)<<3);if(!c){k=0;return k|0}}else uf(h,c-i|0);e=f[h>>2]|0;h=0;i=0;do{j=b+(i<<2)|0;f[e+(i<<3)>>2]=f[j>>2];f[e+(i<<3)+4>>2]=h;d=h;h=(f[j>>2]|0)+h|0;if(h>>>0>262144){d=0;k=19;break}if(d>>>0>>0){g=f[a>>2]|0;do{f[g+(d<<2)>>2]=i;d=d+1|0}while((d|0)!=(h|0))}i=i+1|0}while(i>>>0>>0);if((k|0)==19)return d|0;k=(h|0)==262144;return k|0}function Ff(a,b,c){a=a|0;b=b|0;c=c|0;var d=0,e=0,g=0,h=0,i=0,j=0,k=0;g=a+4|0;e=f[g>>2]|0;d=f[a>>2]|0;i=e-d>>2;if(i>>>0>=65536){if((i|0)!=65536?(h=d+262144|0,(e|0)!=(h|0)):0)f[g>>2]=e+(~((e+-4-h|0)>>>2)<<2)}else vg(a,65536-i|0);h=a+12|0;g=a+16|0;e=f[g>>2]|0;d=f[h>>2]|0;i=e-d>>3;if(i>>>0>=c>>>0){if(i>>>0>c>>>0?(j=d+(c<<3)|0,(e|0)!=(j|0)):0)f[g>>2]=e+(~((e+-8-j|0)>>>3)<<3);if(!c){k=0;return k|0}}else uf(h,c-i|0);e=f[h>>2]|0;h=0;i=0;do{j=b+(i<<2)|0;f[e+(i<<3)>>2]=f[j>>2];f[e+(i<<3)+4>>2]=h;d=h;h=(f[j>>2]|0)+h|0;if(h>>>0>65536){d=0;k=19;break}if(d>>>0>>0){g=f[a>>2]|0;do{f[g+(d<<2)>>2]=i;d=d+1|0}while((d|0)!=(h|0))}i=i+1|0}while(i>>>0>>0);if((k|0)==19)return d|0;k=(h|0)==65536;return k|0}function Gf(a,b,c){a=a|0;b=b|0;c=c|0;var d=0,e=0,g=0,h=0,i=0,j=0,k=0;g=a+4|0;e=f[g>>2]|0;d=f[a>>2]|0;i=e-d>>2;if(i>>>0>=32768){if((i|0)!=32768?(h=d+131072|0,(e|0)!=(h|0)):0)f[g>>2]=e+(~((e+-4-h|0)>>>2)<<2)}else vg(a,32768-i|0);h=a+12|0;g=a+16|0;e=f[g>>2]|0;d=f[h>>2]|0;i=e-d>>3;if(i>>>0>=c>>>0){if(i>>>0>c>>>0?(j=d+(c<<3)|0,(e|0)!=(j|0)):0)f[g>>2]=e+(~((e+-8-j|0)>>>3)<<3);if(!c){k=0;return k|0}}else uf(h,c-i|0);e=f[h>>2]|0;h=0;i=0;do{j=b+(i<<2)|0;f[e+(i<<3)>>2]=f[j>>2];f[e+(i<<3)+4>>2]=h;d=h;h=(f[j>>2]|0)+h|0;if(h>>>0>32768){d=0;k=19;break}if(d>>>0>>0){g=f[a>>2]|0;do{f[g+(d<<2)>>2]=i;d=d+1|0}while((d|0)!=(h|0))}i=i+1|0}while(i>>>0>>0);if((k|0)==19)return d|0;k=(h|0)==32768;return k|0}function Hf(a,b){a=a|0;b=b|0;var c=0,d=0,e=0,g=0;g=a+4|0;c=f[g>>2]|0;d=f[a>>2]|0;e=c-d>>2;if(e>>>0>>0){qe(a,b-e|0);return}if(e>>>0<=b>>>0)return;a=d+(b<<2)|0;if((c|0)==(a|0))return;do{b=c+-4|0;f[g>>2]=b;e=f[b>>2]|0;f[b>>2]=0;if(e|0){b=e+88|0;c=f[b>>2]|0;f[b>>2]=0;if(c|0){d=f[c+8>>2]|0;if(d|0){b=c+12|0;if((f[b>>2]|0)!=(d|0))f[b>>2]=d;No(d)}No(c)}c=f[e+68>>2]|0;if(c|0){b=e+72|0;d=f[b>>2]|0;if((d|0)!=(c|0))f[b>>2]=d+(~((d+-4-c|0)>>>2)<<2);No(c)}b=e+64|0;c=f[b>>2]|0;f[b>>2]=0;if(c|0){d=f[c>>2]|0;if(d|0){b=c+4|0;if((f[b>>2]|0)!=(d|0))f[b>>2]=d;No(d)}No(c)}No(e)}c=f[g>>2]|0}while((c|0)!=(a|0));return}function If(a,b,c){a=a|0;b=b|0;c=c|0;var d=0,e=0,g=0,h=0,i=0,j=0,k=0;g=a+4|0;e=f[g>>2]|0;d=f[a>>2]|0;i=e-d>>2;if(i>>>0>=8192){if((i|0)!=8192?(h=d+32768|0,(e|0)!=(h|0)):0)f[g>>2]=e+(~((e+-4-h|0)>>>2)<<2)}else vg(a,8192-i|0);h=a+12|0;g=a+16|0;e=f[g>>2]|0;d=f[h>>2]|0;i=e-d>>3;if(i>>>0>=c>>>0){if(i>>>0>c>>>0?(j=d+(c<<3)|0,(e|0)!=(j|0)):0)f[g>>2]=e+(~((e+-8-j|0)>>>3)<<3);if(!c){k=0;return k|0}}else uf(h,c-i|0);e=f[h>>2]|0;h=0;i=0;do{j=b+(i<<2)|0;f[e+(i<<3)>>2]=f[j>>2];f[e+(i<<3)+4>>2]=h;d=h;h=(f[j>>2]|0)+h|0;if(h>>>0>8192){d=0;k=19;break}if(d>>>0>>0){g=f[a>>2]|0;do{f[g+(d<<2)>>2]=i;d=d+1|0}while((d|0)!=(h|0))}i=i+1|0}while(i>>>0>>0);if((k|0)==19)return d|0;k=(h|0)==8192;return k|0}function Jf(a,b,c){a=a|0;b=b|0;c=c|0;var d=0,e=0,g=0,h=0,i=0,j=0,k=0;g=a+4|0;e=f[g>>2]|0;d=f[a>>2]|0;i=e-d>>2;if(i>>>0>=4096){if((i|0)!=4096?(h=d+16384|0,(e|0)!=(h|0)):0)f[g>>2]=e+(~((e+-4-h|0)>>>2)<<2)}else vg(a,4096-i|0);h=a+12|0;g=a+16|0;e=f[g>>2]|0;d=f[h>>2]|0;i=e-d>>3;if(i>>>0>=c>>>0){if(i>>>0>c>>>0?(j=d+(c<<3)|0,(e|0)!=(j|0)):0)f[g>>2]=e+(~((e+-8-j|0)>>>3)<<3);if(!c){k=0;return k|0}}else uf(h,c-i|0);e=f[h>>2]|0;h=0;i=0;do{j=b+(i<<2)|0;f[e+(i<<3)>>2]=f[j>>2];f[e+(i<<3)+4>>2]=h;d=h;h=(f[j>>2]|0)+h|0;if(h>>>0>4096){d=0;k=19;break}if(d>>>0>>0){g=f[a>>2]|0;do{f[g+(d<<2)>>2]=i;d=d+1|0}while((d|0)!=(h|0))}i=i+1|0}while(i>>>0>>0);if((k|0)==19)return d|0;k=(h|0)==4096;return k|0}function Kf(a,b){a=a|0;b=b|0;var c=0,d=0,e=0,g=0,h=0,i=0,j=0,k=0,l=0,m=0;l=a+4|0;d=f[l>>2]|0;k=f[a>>2]|0;h=(d-k|0)/12|0;c=h+1|0;j=k;if(c>>>0>357913941)co(a);m=a+8|0;i=((f[m>>2]|0)-k|0)/12|0;e=i<<1;e=i>>>0<178956970?(e>>>0>>0?c:e):357913941;do if(e)if(e>>>0>357913941){a=sa(8)|0;Km(a,17959);f[a>>2]=4748;wa(a|0,1128,100)}else{g=Rk(e*12|0)|0;break}else g=0;while(0);c=g+(h*12|0)|0;i=g+(e*12|0)|0;f[c>>2]=f[b>>2];f[g+(h*12|0)+4>>2]=f[b+4>>2];f[g+(h*12|0)+8>>2]=f[b+8>>2];e=c+12|0;if((d|0)!=(j|0))do{h=d;d=d+-12|0;f[c+-12>>2]=f[d>>2];f[c+-8>>2]=f[h+-8>>2];f[c+-4>>2]=f[h+-4>>2];c=c+-12|0}while((d|0)!=(j|0));f[a>>2]=c;f[l>>2]=e;f[m>>2]=i;if(!k)return;No(k);return}function Lf(a,c,d){a=a|0;c=c|0;d=d|0;a=mc(a,c)|0;if(!a){d=0;return d|0}c=f[a+20>>2]|0;if(((f[a+24>>2]|0)-c|0)!=8){d=0;return d|0}a=c;b[s>>0]=b[a>>0];b[s+1>>0]=b[a+1>>0];b[s+2>>0]=b[a+2>>0];b[s+3>>0]=b[a+3>>0];b[s+4>>0]=b[a+4>>0];b[s+5>>0]=b[a+5>>0];b[s+6>>0]=b[a+6>>0];b[s+7>>0]=b[a+7>>0];p[s>>3]=+p[s>>3];b[d>>0]=b[s>>0];b[d+1>>0]=b[s+1>>0];b[d+2>>0]=b[s+2>>0];b[d+3>>0]=b[s+3>>0];b[d+4>>0]=b[s+4>>0];b[d+5>>0]=b[s+5>>0];b[d+6>>0]=b[s+6>>0];b[d+7>>0]=b[s+7>>0];d=1;return d|0}function Mf(a,b){a=a|0;b=b|0;var c=0,d=0,e=0,g=0,h=0,i=0,j=0,k=0,l=0;k=a+8|0;d=f[k>>2]|0;l=a+4|0;c=f[l>>2]|0;e=c;if(d-c>>2>>>0>=b>>>0){c=e;d=b;while(1){f[c>>2]=1;d=d+-1|0;if(!d)break;else c=c+4|0}f[l>>2]=e+(b<<2);return}j=f[a>>2]|0;i=c-j|0;h=i>>2;c=h+b|0;if(c>>>0>1073741823)co(a);e=d-j|0;g=e>>1;c=e>>2>>>0<536870911?(g>>>0>>0?c:g):1073741823;do if(c)if(c>>>0>1073741823){b=sa(8)|0;Km(b,17959);f[b>>2]=4748;wa(b|0,1128,100)}else{d=Rk(c<<2)|0;break}else d=0;while(0);g=d+(h<<2)|0;e=d+(c<<2)|0;c=g;d=b;while(1){f[c>>2]=1;d=d+-1|0;if(!d)break;else c=c+4|0}c=g+(0-h<<2)|0;if((i|0)>0)ef(c|0,j|0,i|0)|0;f[a>>2]=c;f[l>>2]=g+(b<<2);f[k>>2]=e;if(!j)return;No(j);return}function Nf(a,c){a=a|0;c=c|0;var d=0,e=0,g=0,i=0,j=0,k=0,l=0,m=0,n=0,o=0;d=f[c+88>>2]|0;if(!d){a=0;return a|0}if((f[d>>2]|0)!=1){a=0;return a|0}m=d+8|0;j=f[m>>2]|0;f[a+4>>2]=h[j>>0]|h[j+1>>0]<<8|h[j+2>>0]<<16|h[j+3>>0]<<24;o=a+8|0;k=c+24|0;c=b[k>>0]|0;i=c<<24>>24;g=a+12|0;e=f[g>>2]|0;d=f[o>>2]|0;l=e-d>>2;if(i>>>0<=l>>>0){if(i>>>0>>0?(n=d+(i<<2)|0,(e|0)!=(n|0)):0)f[g>>2]=e+(~((e+-4-n|0)>>>2)<<2)}else{vg(o,i-l|0);c=b[k>>0]|0;j=f[m>>2]|0}d=j+4|0;d=h[d>>0]|h[d+1>>0]<<8|h[d+2>>0]<<16|h[d+3>>0]<<24;if(c<<24>>24>0){i=f[o>>2]|0;e=c<<24>>24;c=4;g=0;do{f[i+(g<<2)>>2]=d;c=c+4|0;g=g+1|0;d=j+c|0;d=h[d>>0]|h[d+1>>0]<<8|h[d+2>>0]<<16|h[d+3>>0]<<24}while((g|0)<(e|0))}f[a+20>>2]=d;a=1;return a|0}function Of(a,c){a=a|0;c=c|0;var d=0,e=0,g=0,h=0,i=0,j=0;if(c>>>0>4294967279)co(a);i=a+11|0;e=b[i>>0]|0;g=e<<24>>24<0;if(g){j=f[a+4>>2]|0;d=(f[a+8>>2]&2147483647)+-1|0}else{j=e&255;d=10}h=j>>>0>c>>>0?j:c;c=h>>>0<11;h=c?10:(h+16&-16)+-1|0;do if((h|0)!=(d|0)){do if(c){d=f[a>>2]|0;if(g){c=a;e=0;g=13}else{zm(a,d,(e&255)+1|0)|0;No(d);g=15}}else{c=Rk(h+1|0)|0;if(g){e=1;d=f[a>>2]|0;g=13;break}else{zm(c,a,(e&255)+1|0)|0;g=14;break}}while(0);if((g|0)==13){zm(c,d,(f[a+4>>2]|0)+1|0)|0;No(d);if(e)g=14;else g=15}if((g|0)==14){f[a+8>>2]=h+1|-2147483648;f[a+4>>2]=j;f[a>>2]=c;break}else if((g|0)==15){b[i>>0]=j;break}}while(0);return}function Pf(a){a=a|0;lo(a);lo(a+16|0);lo(a+32|0);lo(a+48|0);lo(a+64|0);lo(a+80|0);lo(a+96|0);lo(a+112|0);lo(a+128|0);lo(a+144|0);lo(a+160|0);lo(a+176|0);lo(a+192|0);lo(a+208|0);lo(a+224|0);lo(a+240|0);lo(a+256|0);lo(a+272|0);lo(a+288|0);lo(a+304|0);lo(a+320|0);lo(a+336|0);lo(a+352|0);lo(a+368|0);lo(a+384|0);lo(a+400|0);lo(a+416|0);lo(a+432|0);lo(a+448|0);lo(a+464|0);lo(a+480|0);lo(a+496|0);return}function Qf(a,c,d){a=a|0;c=c|0;d=d|0;var e=0,g=0,h=0,i=0,j=0,k=0,l=0,m=0,n=0,o=0;o=(f[a>>2]|0)+1794895138|0;h=ln(f[a+8>>2]|0,o)|0;e=ln(f[a+12>>2]|0,o)|0;g=ln(f[a+16>>2]|0,o)|0;a:do if((h>>>0>>2>>>0?(n=c-(h<<2)|0,e>>>0>>0&g>>>0>>0):0)?((g|e)&3|0)==0:0){n=e>>>2;m=g>>>2;l=0;while(1){k=h>>>1;j=l+k|0;i=j<<1;g=i+n|0;e=ln(f[a+(g<<2)>>2]|0,o)|0;g=ln(f[a+(g+1<<2)>>2]|0,o)|0;if(!(g>>>0>>0&e>>>0<(c-g|0)>>>0)){e=0;break a}if(b[a+(g+e)>>0]|0){e=0;break a}e=Bj(d,a+g|0)|0;if(!e)break;e=(e|0)<0;if((h|0)==1){e=0;break a}else{l=e?l:j;h=e?k:h-k|0}}e=i+m|0;g=ln(f[a+(e<<2)>>2]|0,o)|0;e=ln(f[a+(e+1<<2)>>2]|0,o)|0;if(e>>>0>>0&g>>>0<(c-e|0)>>>0)e=(b[a+(e+g)>>0]|0)==0?a+e|0:0;else e=0}else e=0;while(0);return e|0}function Rf(a,b){a=a|0;b=b|0;var c=0,d=0,e=0,g=0,i=0,k=0,l=0,m=0,n=0;l=b+8|0;i=f[l>>2]|0;l=f[l+4>>2]|0;m=b+16|0;c=m;g=f[c>>2]|0;c=f[c+4>>2]|0;d=Hl(g|0,c|0,4,0)|0;e=I;if((l|0)<(e|0)|(l|0)==(e|0)&i>>>0>>0){a=0;return a|0}k=(f[b>>2]|0)+g|0;k=h[k>>0]|h[k+1>>0]<<8|h[k+2>>0]<<16|h[k+3>>0]<<24;n=m;f[n>>2]=d;f[n+4>>2]=e;do if((j[b+38>>1]|0)<514){c=Hl(g|0,c|0,8,0)|0;d=I;if((l|0)<(d|0)|(l|0)==(d|0)&i>>>0>>0){n=0;return n|0}else{n=m;f[n>>2]=c;f[n+4>>2]=d;break}}while(0);if(((k|0)%2|0|0)!=1)ra(10107,10140,68,10300);d=(_(k|0)|0)^31;c=d+1|0;if(!d)ra(9179,9190,60,9305);if(c>>>0>=31)ra(9325,9190,61,9305);f[a>>2]=c;n=2<>2]=n+-1;n=n+-2|0;f[a+8>>2]=n;f[a+12>>2]=(n|0)/2|0;n=1;return n|0}function Sf(a,c){a=a|0;c=c|0;var d=0,e=0,g=0,h=0,i=0,j=0;j=u;u=u+32|0;h=j+16|0;i=j;switch(c<<24>>24){case 0:{i=Rk(48)|0;An(i);f[a>>2]=0;f[a+4>>2]=0;f[a+8>>2]=0;f[a+12>>2]=0;f[a+16>>2]=i;u=j;return}case 1:{i=Rk(52)|0;Hm(i);f[a>>2]=0;f[a+4>>2]=0;f[a+8>>2]=0;f[a+12>>2]=0;f[a+16>>2]=i;u=j;return}default:{c=Rk(32)|0;f[i>>2]=c;f[i+8>>2]=-2147483616;f[i+4>>2]=28;d=c;e=14677;g=d+28|0;do{b[d>>0]=b[e>>0]|0;d=d+1|0;e=e+1|0}while((d|0)<(g|0));b[c+28>>0]=0;f[h>>2]=-1;c=h+4|0;lh(c,i);f[a>>2]=f[h>>2];lh(a+4|0,c);f[a+16>>2]=0;if((b[c+11>>0]|0)<0)No(f[c>>2]|0);if((b[i+11>>0]|0)<0)No(f[i>>2]|0);u=j;return}}}function Tf(a,c,d){a=a|0;c=c|0;d=d|0;var e=0,g=0,h=0,i=0;g=a+12|0;a:do if((f[g>>2]|0)!=(c|0)){h=f[a>>2]|0;i=a+4|0;e=f[i>>2]|0;if((e|0)!=(h|0))do{e=e+-12|0;f[i>>2]=e;if((b[e+11>>0]|0)<0){No(f[e>>2]|0);e=f[i>>2]|0}}while((e|0)!=(h|0));f[g>>2]=c;e=f[c+8>>2]|0;if(e|0){c=a+8|0;while(1){g=e+8|0;if((h|0)==(f[c>>2]|0))Le(a,g);else{lh(h,g);f[i>>2]=(f[i>>2]|0)+12}e=f[e>>2]|0;if(!e)break a;h=f[i>>2]|0}}}while(0);if((d|0)<0){a=0;return a|0}e=f[a>>2]|0;if((((f[a+4>>2]|0)-e|0)/12|0)>>>0<=d>>>0){a=0;return a|0}e=e+(d*12|0)|0;if((b[e+11>>0]|0)<0){a=f[e>>2]|0;return a|0}else{a=e;return a|0}return 0}function Uf(a,c){a=a|0;c=c|0;var d=0,e=0,g=0,h=0,i=0,j=0,k=0;k=u;u=u+32|0;i=k+12|0;j=k;f[i>>2]=0;f[i+4>>2]=0;f[i+8>>2]=0;e=_h(c)|0;if(e>>>0>4294967279)co(i);if(e>>>0<11){b[i+11>>0]=e;if(!e)d=i;else{d=i;g=6}}else{g=e+16&-16;d=Rk(g)|0;f[i>>2]=d;f[i+8>>2]=g|-2147483648;f[i+4>>2]=e;g=6}if((g|0)==6)ef(d|0,c|0,e|0)|0;b[d+e>>0]=0;f[j>>2]=0;f[j+4>>2]=0;f[j+8>>2]=0;c=j+11|0;b[c>>0]=4;f[j>>2]=1701667182;b[j+4>>0]=0;d=f[a+4>>2]|0;if((d|0)!=0?(h=ce(d,j,i)|0,(h|0)!=0):0)d=Xi(a,f[h+40>>2]|0)|0;else d=-1;if((b[c>>0]|0)<0)No(f[j>>2]|0);if((b[i+11>>0]|0)>=0){u=k;return d|0}No(f[i>>2]|0);u=k;return d|0}function Vf(a,c){a=a|0;c=c|0;var d=0,e=0,g=0,h=0,i=0,j=0,k=0,l=0,m=0;a=f[a+4>>2]|0;if(!a){m=0;return m|0}k=b[c+11>>0]|0;j=k<<24>>24<0;k=j?f[c+4>>2]|0:k&255;j=j?f[c>>2]|0:c;while(1){e=a+16|0;d=b[e+11>>0]|0;h=d<<24>>24<0;d=h?f[a+20>>2]|0:d&255;g=d>>>0>>0;c=g?d:k;if((c|0)!=0?(m=ij(j,h?f[e>>2]|0:e,c)|0,(m|0)!=0):0)if((m|0)<0)i=7;else i=8;else if(k>>>0>>0)i=7;else i=8;if((i|0)!=7)if((i|0)==8){i=0;c=k>>>0>>0?k:d;if((c|0)!=0?(l=ij(h?f[e>>2]|0:e,j,c)|0,(l|0)!=0):0){if((l|0)>=0){a=1;i=14;break}}else i=10;if((i|0)==10?(0,!g):0){a=1;i=14;break}a=a+4|0}a=f[a>>2]|0;if(!a){a=0;i=14;break}}if((i|0)==14)return a|0;return 0}function Wf(a,b){a=a|0;b=b|0;var c=0,d=0,e=0,g=0,i=0,j=0,k=0,l=0,m=0;k=b+8|0;i=f[k>>2]|0;k=f[k+4>>2]|0;l=b+16|0;c=l;e=f[c>>2]|0;c=f[c+4>>2]|0;g=Hl(e|0,c|0,4,0)|0;d=I;if((k|0)<(d|0)|(k|0)==(d|0)&i>>>0>>0){a=0;return a|0}b=f[b>>2]|0;j=b+e|0;j=h[j>>0]|h[j+1>>0]<<8|h[j+2>>0]<<16|h[j+3>>0]<<24;m=l;f[m>>2]=g;f[m+4>>2]=d;c=Hl(e|0,c|0,8,0)|0;d=I;if((k|0)<(d|0)|(k|0)==(d|0)&i>>>0>>0){m=0;return m|0}b=b+g|0;b=h[b>>0]|h[b+1>>0]<<8|h[b+2>>0]<<16|h[b+3>>0]<<24;m=l;f[m>>2]=c;f[m+4>>2]=d;if((j|0)>(b|0)){m=0;return m|0}f[a+12>>2]=j;f[a+16>>2]=b;m=b+(1-j)|0;f[a+20>>2]=m;b=(m|0)/2|0;c=a+24|0;f[c>>2]=b;f[a+28>>2]=0-b;if(m&1|0){m=1;return m|0}f[c>>2]=b+-1;m=1;return m|0}function Xf(a,b,c){a=a|0;b=b|0;c=c|0;var d=0,e=0,g=0,h=0,i=0;i=f[b>>2]|0;e=f[a+12>>2]|0;if((i|0)>(e|0))ra(9995,9190,259,10019);d=f[c>>2]|0;if((d|0)>(e|0))ra(10033,9190,260,10019);a=0-e|0;if((i|0)<(a|0))ra(10057,9190,261,10019);if((d|0)<(a|0))ra(10082,9190,262,10019);if((d|i|0)>-1){h=1;a=1}else{a=(i|0)<1&(d|0)<1;h=a?-1:(i|0)>0?1:-1;a=a?-1:(d|0)>0?1:-1}g=X(e,h)|0;e=X(e,a)|0;f[b>>2]=(i<<1)-g;d=(f[c>>2]<<1)-e|0;f[c>>2]=d;i=(X(h,a)|0)>-1;a=f[b>>2]|0;if(i){f[b>>2]=0-d;i=0-a|0;f[c>>2]=i;i=f[b>>2]|0;i=i+g|0;i=(i|0)/2|0;f[b>>2]=i;b=f[c>>2]|0;b=b+e|0;b=(b|0)/2|0;f[c>>2]=b;return}else{f[b>>2]=d;i=a;f[c>>2]=i;i=f[b>>2]|0;i=i+g|0;i=(i|0)/2|0;f[b>>2]=i;b=f[c>>2]|0;b=b+e|0;b=(b|0)/2|0;f[c>>2]=b;return}}function Yf(a,b,c,d){a=a|0;b=b|0;c=c|0;d=d|0;var e=0,g=0,h=0,i=0;h=u;u=u+32|0;g=h+8|0;e=h;switch(d|0){case 2:{i=f[b+12>>2]|0;d=f[b+4>>2]|0;f[g>>2]=-1;f[g+4>>2]=-1;f[g+8>>2]=-1;f[g+12>>2]=-1;xf(e,c,i,d,g);f[a>>2]=f[e>>2];u=h;return}case 3:{d=f[b+12>>2]|0;i=f[b+4>>2]|0;f[g>>2]=-1;f[g+4>>2]=-1;f[g+8>>2]=-1;f[g+12>>2]=-1;tf(e,c,d,i,g);f[a>>2]=f[e>>2];u=h;return}default:{f[a>>2]=0;u=h;return}}}function Zf(a,b){a=a|0;b=b|0;var c=0,d=0,e=La;if((b|0)!=1){if(b+-1&b)b=ab(b)|0}else b=2;d=f[a+4>>2]|0;if(b>>>0>d>>>0){oc(a,b);return}if(b>>>0>=d>>>0)return;e=$((f[a+12>>2]|0)>>>0);c=~~$(W($(e/$(n[a+16>>2]))))>>>0;if(d>>>0>2&(d+-1&d|0)==0)c=1<<32-(_(c+-1|0)|0);else c=ab(c)|0;b=b>>>0>>0?c:b;if(b>>>0>=d>>>0)return;oc(a,b);return}function _f(a,b){a=a|0;b=b|0;var c=0,d=0,e=0,g=0;g=a+4|0;e=f[g>>2]|0;c=f[a>>2]|0;d=(e-c|0)/116|0;if(d>>>0>>0){ie(a,b-d|0);return}if(d>>>0<=b>>>0)return;a=c+(b*116|0)|0;if((e|0)==(a|0))return;do{f[g>>2]=e+-116;c=f[e+-12>>2]|0;if(c|0){d=e+-8|0;b=f[d>>2]|0;if((b|0)!=(c|0))f[d>>2]=b+(~((b+-4-c|0)>>>2)<<2);No(c)}c=f[e+-28>>2]|0;if(c|0){d=e+-24|0;b=f[d>>2]|0;if((b|0)!=(c|0))f[d>>2]=b+(~((b+-4-c|0)>>>2)<<2);No(c)}c=f[e+-40>>2]|0;if(c|0){d=e+-36|0;b=f[d>>2]|0;if((b|0)!=(c|0))f[d>>2]=b+(~((b+-4-c|0)>>>2)<<2);No(c)}Jh(e+-112|0);e=f[g>>2]|0}while((e|0)!=(a|0));return}function $f(a){a=a|0;var b=0,c=0,d=0,e=0,g=0;f[a>>2]=1416;e=a+60|0;b=f[e>>2]|0;f[e>>2]=0;if(b|0)Sa[f[(f[b>>2]|0)+4>>2]&127](b);b=f[a+48>>2]|0;if(b|0){d=a+52|0;c=f[d>>2]|0;if((c|0)!=(b|0))f[d>>2]=c+(~((c+-4-b|0)>>>2)<<2);No(b)}d=a+36|0;b=f[d>>2]|0;if(b|0){e=a+40|0;c=f[e>>2]|0;if((c|0)!=(b|0)){do{g=c+-4|0;f[e>>2]=g;c=f[g>>2]|0;f[g>>2]=0;if(c|0)Sa[f[(f[c>>2]|0)+4>>2]&127](c);c=f[e>>2]|0}while((c|0)!=(b|0));b=f[d>>2]|0}No(b)}f[a>>2]=1256;b=f[a+16>>2]|0;if(b|0){d=a+20|0;c=f[d>>2]|0;if((c|0)!=(b|0))f[d>>2]=c+(~((c+-4-b|0)>>>2)<<2);No(b)}d=f[a+4>>2]|0;if(!d)return;c=a+8|0;b=f[c>>2]|0;if((b|0)!=(d|0))f[c>>2]=b+(~((b+-4-d|0)>>>2)<<2);No(d);return}function ag(a){a=a|0;var b=0,c=0,d=0,e=0,g=0,h=0;g=f[a+4>>2]|0;h=a+8|0;b=f[h>>2]|0;if((b|0)!=(g|0))do{d=b+-4|0;f[h>>2]=d;e=f[d>>2]|0;f[d>>2]=0;if(e|0){d=e+88|0;b=f[d>>2]|0;f[d>>2]=0;if(b|0){c=f[b+8>>2]|0;if(c|0){d=b+12|0;if((f[d>>2]|0)!=(c|0))f[d>>2]=c;No(c)}No(b)}b=f[e+68>>2]|0;if(b|0){d=e+72|0;c=f[d>>2]|0;if((c|0)!=(b|0))f[d>>2]=c+(~((c+-4-b|0)>>>2)<<2);No(b)}d=e+64|0;b=f[d>>2]|0;f[d>>2]=0;if(b|0){c=f[b>>2]|0;if(c|0){d=b+4|0;if((f[d>>2]|0)!=(c|0))f[d>>2]=c;No(c)}No(b)}No(e)}b=f[h>>2]|0}while((b|0)!=(g|0));b=f[a>>2]|0;if(!b)return;No(b);return}function bg(a,c){a=a|0;c=c|0;var e=0,g=0,h=0,i=0,j=0,k=0,l=0,m=0,n=0;l=a+8|0;e=f[l>>2]|0;g=b[e+24>>0]|0;k=g<<24>>24;n=k<<1;m=Ko(k>>>0>2147483647?-1:k<<1)|0;j=f[a+16>>2]|0;j=(f[f[j>>2]>>2]|0)+(f[j+48>>2]|0)|0;if(!c){Lo(m);return}if(g<<24>>24>0){e=0;g=0;h=0;while(1){a=0;i=h;while(1){d[m+(a<<1)>>1]=f[j+(i<<2)>>2];a=a+1|0;if((a|0)==(k|0))break;else i=i+1|0}ef((f[f[(f[l>>2]|0)+64>>2]>>2]|0)+g|0,m|0,n|0)|0;e=e+1|0;if((e|0)==(c|0))break;else{g=g+n|0;h=k+h|0}}Lo(m);return}else{ef(f[f[e+64>>2]>>2]|0,m|0,n|0)|0;if((c|0)==1){Lo(m);return}else{a=1;e=0}do{e=e+n|0;ef((f[f[(f[l>>2]|0)+64>>2]>>2]|0)+e|0,m|0,n|0)|0;a=a+1|0}while((a|0)!=(c|0));Lo(m);return}}function cg(a,c){a=a|0;c=c|0;var d=0,e=0,g=0,h=0,i=0,j=0,k=0,l=0,m=0;k=a+8|0;d=f[k>>2]|0;e=b[d+24>>0]|0;j=e<<24>>24;m=j<<2;l=Ko(j>>>0>1073741823?-1:j<<2)|0;i=f[a+16>>2]|0;i=(f[f[i>>2]>>2]|0)+(f[i+48>>2]|0)|0;if(!c){Lo(l);return}if(e<<24>>24>0){d=0;e=0;g=0;while(1){a=0;h=g;while(1){f[l+(a<<2)>>2]=f[i+(h<<2)>>2];a=a+1|0;if((a|0)==(j|0))break;else h=h+1|0}ef((f[f[(f[k>>2]|0)+64>>2]>>2]|0)+e|0,l|0,m|0)|0;d=d+1|0;if((d|0)==(c|0))break;else{e=e+m|0;g=j+g|0}}Lo(l);return}else{ef(f[f[d+64>>2]>>2]|0,l|0,m|0)|0;if((c|0)==1){Lo(l);return}else{a=1;d=0}do{d=d+m|0;ef((f[f[(f[k>>2]|0)+64>>2]>>2]|0)+d|0,l|0,m|0)|0;a=a+1|0}while((a|0)!=(c|0));Lo(l);return}}function dg(a){a=a|0;var b=0,c=0,d=0,e=0,g=0,h=0;b=f[a>>2]|0;if(!b)return;h=a+4|0;c=f[h>>2]|0;if((c|0)!=(b|0)){do{e=c+-4|0;f[h>>2]=e;g=f[e>>2]|0;f[e>>2]=0;if(g|0){e=g+88|0;c=f[e>>2]|0;f[e>>2]=0;if(c|0){d=f[c+8>>2]|0;if(d|0){e=c+12|0;if((f[e>>2]|0)!=(d|0))f[e>>2]=d;No(d)}No(c)}c=f[g+68>>2]|0;if(c|0){e=g+72|0;d=f[e>>2]|0;if((d|0)!=(c|0))f[e>>2]=d+(~((d+-4-c|0)>>>2)<<2);No(c)}e=g+64|0;c=f[e>>2]|0;f[e>>2]=0;if(c|0){d=f[c>>2]|0;if(d|0){e=c+4|0;if((f[e>>2]|0)!=(d|0))f[e>>2]=d;No(d)}No(c)}No(g)}c=f[h>>2]|0}while((c|0)!=(b|0));b=f[a>>2]|0}No(b);return}function eg(a,c){a=a|0;c=c|0;var d=0,e=0,g=0,h=0,i=0,j=0,k=0,l=0,m=0,n=0,o=La;n=u;u=u+32|0;j=n+16|0;m=n;k=a+8|0;l=b[(f[k>>2]|0)+24>>0]<<2;i=f[a+16>>2]|0;i=(f[f[i>>2]>>2]|0)+(f[i+48>>2]|0)|0;a=f[a+24>>2]|0;if((a|0)<=1)ra(9179,9190,60,9305);if((a|0)>=31)ra(9325,9190,61,9305);f[m>>2]=a;a=1<>2]=a+-1;a=a+-2|0;h=m+8|0;f[h>>2]=a;f[m+12>>2]=(a|0)/2|0;if(!c){u=n;return 1}d=0;e=0;g=0;while(1){o=$($(1.0)/$(a|0));pe(m,$($(f[i+(g<<2)>>2]|0)*o),$($(f[i+((g|1)<<2)>>2]|0)*o),j);ef((f[f[(f[k>>2]|0)+64>>2]>>2]|0)+e|0,j|0,l|0)|0;d=d+1|0;if((d|0)==(c|0))break;a=f[h>>2]|0;e=e+l|0;g=g+2|0}u=n;return 1}function fg(a,b){a=a|0;b=b|0;var c=0,d=0,e=0,g=0,i=0,j=0,k=0,l=0;k=b+8|0;j=f[k>>2]|0;k=f[k+4>>2]|0;l=b+16|0;c=l;g=f[c>>2]|0;c=f[c+4>>2]|0;d=Hl(g|0,c|0,4,0)|0;e=I;if((k|0)<(e|0)|(k|0)==(e|0)&j>>>0>>0)return 0;i=(f[b>>2]|0)+g|0;i=h[i>>0]|h[i+1>>0]<<8|h[i+2>>0]<<16|h[i+3>>0]<<24;b=l;f[b>>2]=d;f[b+4>>2]=e;b=Hl(g|0,c|0,8,0)|0;c=I;if((k|0)<(c|0)|(k|0)==(c|0)&j>>>0>>0)return 0;f[l>>2]=b;f[l+4>>2]=c;if(((i|0)%2|0|0)!=1)ra(10107,10140,68,10300);c=(_(i|0)|0)^31;b=c+1|0;if(!c)ra(9179,9190,60,9305);if(b>>>0<31){f[a>>2]=b;l=2<>2]=l+-1;l=l+-2|0;f[a+8>>2]=l;f[a+12>>2]=(l|0)/2|0;return (c+-1|0)>>>0<29|0}else ra(9325,9190,61,9305);return 0}function gg(a,b,c,d){a=a|0;b=b|0;c=c|0;d=d|0;var e=0,g=0,h=0,i=0,j=0,k=0,l=0,m=0;m=u;u=u+32|0;l=m+16|0;i=m+8|0;j=m;h=f[b>>2]|0;k=f[a+12>>2]<<1;if((h|0)>(k|0))ra(9422,9467,69,9645);e=f[b+4>>2]|0;if((e|0)>(k|0))ra(9666,9467,70,9645);g=f[c>>2]|0;if((g|0)>(k|0))ra(9711,9467,71,9645);b=f[c+4>>2]|0;if((b|0)>(k|0))ra(9756,9467,72,9645);if((h|0)<=-1)ra(9801,9467,74,9645);if((e|0)<=-1)ra(9823,9467,75,9645);if((g|0)<=-1)ra(9845,9467,76,9645);if((b|0)>-1){f[i>>2]=h;f[i+4>>2]=e;f[j>>2]=g;f[j+4>>2]=b;kd(l,a,i,j);f[d>>2]=f[l>>2];f[d+4>>2]=f[l+4>>2];u=m;return}else ra(9867,9467,77,9645)}function hg(a,b){a=a|0;b=b|0;var c=0,d=0,e=La;if((b|0)!=1){if(b+-1&b)b=ab(b)|0}else b=2;d=f[a+4>>2]|0;if(b>>>0>d>>>0){yc(a,b);return}if(b>>>0>=d>>>0)return;e=$((f[a+12>>2]|0)>>>0);c=~~$(W($(e/$(n[a+16>>2]))))>>>0;if(d>>>0>2&(d+-1&d|0)==0)c=1<<32-(_(c+-1|0)|0);else c=ab(c)|0;b=b>>>0>>0?c:b;if(b>>>0>=d>>>0)return;yc(a,b);return}function ig(a,c,d){a=a|0;c=c|0;d=d|0;var e=0,g=0,h=0,i=0;h=c&255;e=(d|0)!=0;a:do if(e&(a&3|0)!=0){g=c&255;while(1){if((b[a>>0]|0)==g<<24>>24){i=6;break a}a=a+1|0;d=d+-1|0;e=(d|0)!=0;if(!(e&(a&3|0)!=0)){i=5;break}}}else i=5;while(0);if((i|0)==5)if(e)i=6;else d=0;b:do if((i|0)==6){g=c&255;if((b[a>>0]|0)!=g<<24>>24){e=X(h,16843009)|0;c:do if(d>>>0>3)while(1){h=f[a>>2]^e;if((h&-2139062144^-2139062144)&h+-16843009|0)break;a=a+4|0;d=d+-4|0;if(d>>>0<=3){i=11;break c}}else i=11;while(0);if((i|0)==11)if(!d){d=0;break}while(1){if((b[a>>0]|0)==g<<24>>24)break b;a=a+1|0;d=d+-1|0;if(!d){d=0;break}}}}while(0);return (d|0?a:0)|0}function jg(a,b,c,d){a=a|0;b=b|0;c=c|0;d=d|0;var e=0,g=0,h=0,i=0,j=0,k=0,l=0,m=0;m=u;u=u+32|0;j=m+16|0;l=m+8|0;i=m;h=f[b>>2]|0;k=f[a+12>>2]<<1;if((h|0)>(k|0))ra(9422,12860,65,9645);e=f[b+4>>2]|0;if((e|0)>(k|0))ra(9666,12860,66,9645);g=f[c>>2]|0;if((g|0)>(k|0))ra(9711,12860,67,9645);b=f[c+4>>2]|0;if((b|0)>(k|0))ra(9756,12860,68,9645);if((h|0)<=-1)ra(9801,12860,70,9645);if((e|0)<=-1)ra(9823,12860,71,9645);if((g|0)<=-1)ra(9845,12860,72,9645);if((b|0)>-1){f[j>>2]=g;f[j+4>>2]=b;f[i>>2]=h;f[i+4>>2]=e;Ge(l,a,i,j);f[d>>2]=f[l>>2];f[d+4>>2]=f[l+4>>2];u=m;return}else ra(9867,12860,73,9645)}function kg(a){a=a|0;var c=0,d=0,e=0,g=0,h=0,i=0;h=a+12|0;i=f[h>>2]|0;f[h>>2]=0;if(i|0){c=f[i+28>>2]|0;if(c|0)do{h=c;c=f[c>>2]|0;kg(h+8|0);No(h)}while((c|0)!=0);h=i+20|0;c=f[h>>2]|0;f[h>>2]=0;if(c|0)No(c);c=f[i+8>>2]|0;if(c|0)do{g=c;c=f[c>>2]|0;h=g+8|0;d=f[g+20>>2]|0;if(d|0){e=g+24|0;if((f[e>>2]|0)!=(d|0))f[e>>2]=d;No(d)}if((b[h+11>>0]|0)<0)No(f[h>>2]|0);No(g)}while((c|0)!=0);c=f[i>>2]|0;f[i>>2]=0;if(c|0)No(c);No(i)}if((b[a+11>>0]|0)>=0)return;No(f[a>>2]|0);return}function lg(a,b){a=a|0;b=b|0;var c=0,d=0,e=0,g=0,h=0,i=0,j=0;c=Rk(36)|0;kn(c);j=c;if((b|0)<0){Sa[f[(f[c>>2]|0)+4>>2]&127](c);j=0;return j|0}h=a+8|0;g=a+12|0;c=f[g>>2]|0;a=f[h>>2]|0;e=c-a>>2;do if((e|0)<=(b|0)){d=b+1|0;if(d>>>0>e>>>0){Te(h,d-e|0);break}if(d>>>0>>0?(i=a+(d<<2)|0,(c|0)!=(i|0)):0)do{e=c+-4|0;f[g>>2]=e;c=f[e>>2]|0;f[e>>2]=0;if(c|0)Sa[f[(f[c>>2]|0)+4>>2]&127](c);c=f[g>>2]|0}while((c|0)!=(i|0))}while(0);b=(f[h>>2]|0)+(b<<2)|0;c=f[b>>2]|0;f[b>>2]=j;if(!c){j=1;return j|0}Sa[f[(f[c>>2]|0)+4>>2]&127](c);j=1;return j|0}function mg(a,b){a=a|0;b=b|0;var c=0,d=0,e=0,g=0,h=0,i=0,j=0,k=0,l=0;j=u;u=u+32|0;i=j+16|0;c=j+8|0;d=j;g=a+8|0;if(f[g>>2]<<5>>>0>=b>>>0){u=j;return}f[i>>2]=0;h=i+4|0;f[h>>2]=0;e=i+8|0;f[e>>2]=0;if((b|0)<0)co(i);l=((b+-1|0)>>>5)+1|0;k=Rk(l<<2)|0;f[i>>2]=k;f[h>>2]=0;f[e>>2]=l;l=f[a>>2]|0;f[c>>2]=l;f[c+4>>2]=0;k=a+4|0;b=f[k>>2]|0;f[d>>2]=l+(b>>>5<<2);f[d+4>>2]=b&31;We(i,c,d);b=f[a>>2]|0;f[a>>2]=f[i>>2];f[i>>2]=b;a=f[k>>2]|0;f[k>>2]=f[h>>2];f[h>>2]=a;a=f[g>>2]|0;f[g>>2]=f[e>>2];f[e>>2]=a;if(b|0)No(b);u=j;return}function ng(a,c){a=a|0;c=c|0;var d=0,e=0,g=0,h=0,i=0,j=0,k=0,l=0;k=a+212|0;j=a+216|0;d=f[k>>2]|0;if((f[j>>2]|0)==(d|0)){l=0;return l|0}g=a+4|0;e=0;a:while(1){a=f[d+(e*116|0)>>2]|0;if(((a|0)>=0?(d=f[g>>2]|0,h=f[d+8>>2]|0,(a|0)<((f[d+12>>2]|0)-h>>2|0)):0)?(i=f[h+(a<<2)>>2]|0,(Na[f[(f[i>>2]|0)+24>>2]&127](i)|0)>0):0){a=0;do{if((Oa[f[(f[i>>2]|0)+20>>2]&127](i,a)|0)==(c|0))break a;a=a+1|0}while((a|0)<(Na[f[(f[i>>2]|0)+24>>2]&127](i)|0))}a=e+1|0;d=f[k>>2]|0;if(a>>>0>=(((f[j>>2]|0)-d|0)/116|0)>>>0){a=0;l=11;break}else e=a}if((l|0)==11)return a|0;l=f[k>>2]|0;l=(b[l+(e*116|0)+72>>0]|0)==0?0:l+(e*116|0)+4|0;return l|0}function og(a,b,c){a=a|0;b=b|0;c=c|0;var d=0,e=0,g=0,h=0,i=0,j=0,k=0,l=0,m=0,n=0,o=0;k=(f[b+4>>2]|0)-(f[b>>2]|0)|0;l=k>>2;g=a+8|0;e=f[(f[g>>2]|0)+40>>2]|0;m=Ko((e|0)>-1?e:-1)|0;h=c+8|0;if((k|0)<=0){c=1;Lo(m);return c|0}k=c+16|0;i=0;j=0;while(1){o=h;n=f[o>>2]|0;o=f[o+4>>2]|0;a=k;b=f[a>>2]|0;a=Hl(b|0,f[a+4>>2]|0,e|0,0)|0;d=I;if((o|0)<(d|0)|(o|0)==(d|0)&n>>>0>>0){b=0;a=5;break}ef(m|0,(f[c>>2]|0)+b|0,e|0)|0;o=k;f[o>>2]=a;f[o+4>>2]=d;ef((f[f[(f[g>>2]|0)+64>>2]>>2]|0)+j|0,m|0,e|0)|0;i=i+1|0;if((i|0)>=(l|0)){b=1;a=5;break}else j=j+e|0}if((a|0)==5){Lo(m);return b|0}return 0}function pg(a,b){a=a|0;b=b|0;var c=0,d=0,e=0,g=0,h=0;h=u;u=u+16|0;d=h;e=Ie(a,d,b)|0;c=f[e>>2]|0;if(c|0){a=c;a=a+28|0;u=h;return a|0}g=Rk(40)|0;lh(g+16|0,b);c=g+28|0;f[c>>2]=0;f[c+4>>2]=0;f[c+8>>2]=0;c=f[d>>2]|0;f[g>>2]=0;f[g+4>>2]=0;f[g+8>>2]=c;f[e>>2]=g;c=f[f[a>>2]>>2]|0;if(!c)c=g;else{f[a>>2]=c;c=f[e>>2]|0}qd(f[a+4>>2]|0,c);a=a+8|0;f[a>>2]=(f[a>>2]|0)+1;a=g;a=a+28|0;u=h;return a|0}function qg(a,c,d){a=a|0;c=c|0;d=d|0;var e=0,g=0,h=0,i=0,j=0;j=u;u=u+32|0;i=j+12|0;h=j;f[i>>2]=0;f[i+4>>2]=0;f[i+8>>2]=0;f[h>>2]=0;f[h+4>>2]=0;f[h+8>>2]=0;e=_h(d)|0;if(e>>>0>4294967279)co(h);if(e>>>0<11){b[h+11>>0]=e;if(!e)a=h;else{a=h;g=6}}else{g=e+16&-16;a=Rk(g)|0;f[h>>2]=a;f[h+8>>2]=g|-2147483648;f[h+4>>2]=e;g=6}if((g|0)==6)ef(a|0,d|0,e|0)|0;b[a+e>>0]=0;hh(c,h,i)|0;e=i+11|0;a=b[e>>0]|0;d=a<<24>>24<0?f[i>>2]|0:i;if((b[h+11>>0]|0)<0){No(f[h>>2]|0);a=b[e>>0]|0}if(a<<24>>24>=0){u=j;return d|0}No(f[i>>2]|0);u=j;return d|0}function rg(a,b){a=a|0;b=b|0;var c=0,d=0,e=0,g=0,h=0,i=0,j=0,k=0;i=a+4|0;h=f[a>>2]|0;k=(f[i>>2]|0)-h|0;d=(k|0)/12|0;c=d+1|0;if(c>>>0>357913941)co(a);j=a+8|0;g=((f[j>>2]|0)-h|0)/12|0;e=g<<1;e=g>>>0<178956970?(e>>>0>>0?c:e):357913941;do if(e)if(e>>>0>357913941){a=sa(8)|0;Km(a,17959);f[a>>2]=4748;wa(a|0,1128,100)}else{g=Rk(e*12|0)|0;break}else g=0;while(0);d=g+(d*12|0)|0;f[d>>2]=f[b>>2];f[d+4>>2]=f[b+4>>2];f[d+8>>2]=f[b+8>>2];c=d+(((k|0)/-12|0)*12|0)|0;if((k|0)>0)ef(c|0,h|0,k|0)|0;f[a>>2]=c;f[i>>2]=d+12;f[j>>2]=g+(e*12|0);if(!h)return;No(h);return}function sg(a,c,d,e,g,h,i,j){a=a|0;c=c|0;d=d|0;e=e|0;g=g|0;h=h|0;i=i|0;j=j|0;var k=0,l=0,m=0,n=0,o=0;o=u;u=u+16|0;n=o;if((-18-c|0)>>>0>>0)co(a);if((b[a+11>>0]|0)<0)m=f[a>>2]|0;else m=a;if(c>>>0<2147483623){l=d+c|0;k=c<<1;l=l>>>0>>0?k:l;l=l>>>0<11?11:l+16&-16}else l=-17;k=Rk(l)|0;if(g|0)zm(k,m,g)|0;if(i|0)zm(k+g|0,j,i)|0;d=e-h|0;e=d-g|0;if(e|0)zm(k+g+i|0,m+g+h|0,e)|0;if((c|0)!=10)No(m);f[a>>2]=k;f[a+8>>2]=l|-2147483648;m=d+i|0;f[a+4>>2]=m;b[n>>0]=0;Bn(k+m|0,n);u=o;return}function tg(a,c,d){a=a|0;c=c|0;d=d|0;var e=0,g=0,h=0,i=0,j=0;g=d+16|0;e=f[g>>2]|0;if(!e)if(!(mj(d)|0)){e=f[g>>2]|0;h=5}else e=0;else h=5;a:do if((h|0)==5){j=d+20|0;i=f[j>>2]|0;g=i;if((e-i|0)>>>0>>0){e=Pa[f[d+36>>2]&31](d,a,c)|0;break}b:do if((b[d+75>>0]|0)>-1){i=c;while(1){if(!i){h=g;d=0;g=c;e=a;break b}e=i+-1|0;if((b[a+e>>0]|0)==10)break;else i=e}e=Pa[f[d+36>>2]&31](d,a,i)|0;if(e>>>0>>0)break a;h=f[j>>2]|0;d=i;g=c-i|0;e=a+i|0}else{h=g;d=0;g=c;e=a}while(0);ef(h|0,e|0,g|0)|0;f[j>>2]=(f[j>>2]|0)+g;e=d+g|0}while(0);return e|0}function ug(a,c,d){a=a|0;c=c|0;d=d|0;var e=0,g=0,i=0,j=0,k=0,l=0;j=u;u=u+16|0;i=j;do if(((h[(f[a+4>>2]|0)+36>>0]|0)<<8&65535)>511){k=d+8|0;l=f[k+4>>2]|0;g=d+16|0;e=g;c=f[e>>2]|0;e=f[e+4>>2]|0;if((l|0)>(e|0)|((l|0)==(e|0)?(f[k>>2]|0)>>>0>c>>>0:0)){l=b[(f[d>>2]|0)+c>>0]|0;k=Hl(c|0,e|0,1,0)|0;c=g;f[c>>2]=k;f[c+4>>2]=I;c=l&255;f[a+24>>2]=c;break}else{l=0;u=j;return l|0}}else c=f[a+24>>2]|0;while(0);f[i>>2]=1200;f[i+4>>2]=-1;on(i,c);l=Ji(i,f[a+16>>2]|0)|0;u=j;return l|0}function vg(a,b){a=a|0;b=b|0;var c=0,d=0,e=0,g=0,h=0,i=0,j=0,k=0,l=0;l=a+8|0;d=f[l>>2]|0;k=a+4|0;c=f[k>>2]|0;if(d-c>>2>>>0>=b>>>0){kh(c|0,0,b<<2|0)|0;f[k>>2]=c+(b<<2);return}j=f[a>>2]|0;i=c-j|0;h=i>>2;c=h+b|0;if(c>>>0>1073741823)co(a);g=d-j|0;d=g>>1;d=g>>2>>>0<536870911?(d>>>0>>0?c:d):1073741823;do if(d)if(d>>>0>1073741823){a=sa(8)|0;Km(a,17959);f[a>>2]=4748;wa(a|0,1128,100)}else{g=Rk(d<<2)|0;break}else g=0;while(0);e=g+(h<<2)|0;kh(e|0,0,b<<2|0)|0;c=e+(0-h<<2)|0;if((i|0)>0)ef(c|0,j|0,i|0)|0;f[a>>2]=c;f[k>>2]=e+(b<<2);f[l>>2]=g+(d<<2);if(!j)return;No(j);return}function wg(a,b){a=a|0;b=b|0;var c=0,d=0,e=0,g=0,h=0,i=0,j=0,k=0;i=a+212|0;h=a+216|0;c=f[i>>2]|0;a:do if((f[h>>2]|0)!=(c|0)){j=a+4|0;d=0;b:while(1){c=f[c+(d*116|0)>>2]|0;if(((c|0)>=0?(k=f[j>>2]|0,e=f[k+8>>2]|0,(c|0)<((f[k+12>>2]|0)-e>>2|0)):0)?(g=f[e+(c<<2)>>2]|0,(Na[f[(f[g>>2]|0)+24>>2]&127](g)|0)>0):0){c=0;do{if((Oa[f[(f[g>>2]|0)+20>>2]&127](g,c)|0)==(b|0))break b;c=c+1|0}while((c|0)<(Na[f[(f[g>>2]|0)+24>>2]&127](g)|0))}d=d+1|0;c=f[i>>2]|0;if(d>>>0>=(((f[h>>2]|0)-c|0)/116|0)>>>0)break a}k=(f[i>>2]|0)+(d*116|0)+76|0;return k|0}while(0);k=a+184|0;return k|0}function xg(a){a=a|0;var b=0,c=0,d=0;b=f[a+72>>2]|0;if(b|0){d=a+76|0;c=f[d>>2]|0;if((c|0)!=(b|0))f[d>>2]=c+(~((c+-4-b|0)>>>2)<<2);No(b)}b=f[a+60>>2]|0;if(b|0){c=a+64|0;if((f[c>>2]|0)!=(b|0))f[c>>2]=b;No(b)}c=f[a+48>>2]|0;if(c|0){d=a+52|0;b=f[d>>2]|0;if((b|0)!=(c|0))f[d>>2]=b+(~((b+-4-c|0)>>>2)<<2);No(c)}b=f[a+24>>2]|0;if(b|0){d=a+28|0;c=f[d>>2]|0;if((c|0)!=(b|0))f[d>>2]=c+(~((c+-4-b|0)>>>2)<<2);No(b)}b=f[a+12>>2]|0;if(b|0){d=a+16|0;c=f[d>>2]|0;if((c|0)!=(b|0))f[d>>2]=c+(~((c+-4-b|0)>>>2)<<2);No(b)}d=f[a>>2]|0;if(!d)return;c=a+4|0;b=f[c>>2]|0;if((b|0)!=(d|0))f[c>>2]=b+(~((b+-4-d|0)>>>2)<<2);No(d);return}function yg(a,b){a=a|0;b=b|0;var c=0,d=0,e=0,g=0,h=0,i=0;b=f[b>>2]|0;if((b|0)==-1073741824)return 1;d=(b|0)<0?-1073741824:b*3|0;if((d|0)<0)return 1;b=f[a>>2]|0;e=(f[a+4>>2]|0)-b>>2;if((d|0)>=(e|0))ra(16937,16972,98,17057);a=b;c=f[a+(d<<2)>>2]|0;b=d+1|0;if(!((b|0)%3|0))if((d|0)<2)i=-1073741824;else{b=d+-2|0;g=7}else g=7;do if((g|0)==7)if((b|0)<(e|0)){i=f[a+(b<<2)>>2]|0;break}else ra(16937,16972,98,17057);while(0);b=(((d>>>0)%3|0|0)==0?2:-1)+d|0;do if((b|0)>=0)if((b|0)<(e|0)){h=f[a+(b<<2)>>2]|0;break}else ra(16937,16972,98,17057);else h=-1073741824;while(0);if((c|0)==(i|0))return 1;else return (c|0)==(h|0)|(i|0)==(h|0)|0;return 0}function zg(a){a=a|0;var b=0,c=0,d=0,e=0,g=0,h=0;g=f[a+4>>2]|0;h=a+8|0;b=f[h>>2]|0;if((b|0)!=(g|0))do{f[h>>2]=b+-116;c=f[b+-12>>2]|0;if(c|0){e=b+-8|0;d=f[e>>2]|0;if((d|0)!=(c|0))f[e>>2]=d+(~((d+-4-c|0)>>>2)<<2);No(c)}c=f[b+-28>>2]|0;if(c|0){e=b+-24|0;d=f[e>>2]|0;if((d|0)!=(c|0))f[e>>2]=d+(~((d+-4-c|0)>>>2)<<2);No(c)}c=f[b+-40>>2]|0;if(c|0){e=b+-36|0;d=f[e>>2]|0;if((d|0)!=(c|0))f[e>>2]=d+(~((d+-4-c|0)>>>2)<<2);No(c)}Jh(b+-112|0);b=f[h>>2]|0}while((b|0)!=(g|0));b=f[a>>2]|0;if(!b)return;No(b);return}function Ag(a,c,d){a=a|0;c=c|0;d=d|0;var e=0,g=0;g=u;u=u+32|0;d=g;if((h[(f[a+4>>2]|0)+36>>0]<<8&65535)>511?!(Na[f[(f[a>>2]|0)+52>>2]&127](a)|0):0){e=0;u=g;return e|0}f[d>>2]=1228;f[d+4>>2]=-1;c=d+8|0;f[c>>2]=0;f[c+4>>2]=0;f[c+8>>2]=0;f[c+12>>2]=0;rj(d,f[a+24>>2]|0,f[a+28>>2]|0,b[(f[a+8>>2]|0)+24>>0]|0,$(n[a+32>>2]));e=Ji(d,f[a+16>>2]|0)|0;f[d>>2]=1228;a=f[c>>2]|0;if(a|0){c=d+12|0;d=f[c>>2]|0;if((d|0)!=(a|0))f[c>>2]=d+(~((d+-4-a|0)>>>2)<<2);No(a)}u=g;return e|0}function Bg(a){a=a|0;var b=0,c=0,d=0,e=0,g=0,h=0;b=f[a>>2]|0;if(!b)return;h=a+4|0;c=f[h>>2]|0;if((c|0)!=(b|0)){do{f[h>>2]=c+-116;d=f[c+-12>>2]|0;if(d|0){g=c+-8|0;e=f[g>>2]|0;if((e|0)!=(d|0))f[g>>2]=e+(~((e+-4-d|0)>>>2)<<2);No(d)}d=f[c+-28>>2]|0;if(d|0){g=c+-24|0;e=f[g>>2]|0;if((e|0)!=(d|0))f[g>>2]=e+(~((e+-4-d|0)>>>2)<<2);No(d)}d=f[c+-40>>2]|0;if(d|0){g=c+-36|0;e=f[g>>2]|0;if((e|0)!=(d|0))f[g>>2]=e+(~((e+-4-d|0)>>>2)<<2);No(d)}Jh(c+-112|0);c=f[h>>2]|0}while((c|0)!=(b|0));b=f[a>>2]|0}No(b);return}function Cg(a,c,d){a=a|0;c=c|0;d=d|0;var e=0,g=0,h=0,i=0;i=u;u=u+16|0;g=i;f[g>>2]=0;f[g+4>>2]=0;f[g+8>>2]=0;e=_h(d)|0;if(e>>>0>4294967279)co(g);if(e>>>0<11){b[g+11>>0]=e;if(!e)a=g;else{a=g;h=6}}else{h=e+16&-16;a=Rk(h)|0;f[g>>2]=a;f[g+8>>2]=h|-2147483648;f[g+4>>2]=e;h=6}if((h|0)==6)ef(a|0,d|0,e|0)|0;b[a+e>>0]=0;a=(mc(c,g)|0)!=0;if((b[g+11>>0]|0)>=0){u=i;return a|0}No(f[g>>2]|0);u=i;return a|0}function Dg(a,c){a=a|0;c=c|0;var d=0,e=0,g=0,h=0,i=0,j=0,k=0;j=a+8|0;e=f[j>>2]|0;k=a+4|0;d=f[k>>2]|0;if((e-d|0)>>>0>=c>>>0){do{b[d>>0]=0;d=(f[k>>2]|0)+1|0;f[k>>2]=d;c=c+-1|0}while((c|0)!=0);return}g=f[a>>2]|0;h=d-g|0;d=h+c|0;if((d|0)<0)co(a);g=e-g|0;i=g<<1;d=g>>>0<1073741823?(i>>>0>>0?d:i):2147483647;if(!d)e=0;else e=Rk(d)|0;i=e+h|0;h=e+d|0;d=i;g=i;do{b[d>>0]=0;d=g+1|0;g=d;c=c+-1|0}while((c|0)!=0);d=f[a>>2]|0;e=(f[k>>2]|0)-d|0;c=i+(0-e)|0;if((e|0)>0)ef(c|0,d|0,e|0)|0;f[a>>2]=c;f[k>>2]=g;f[j>>2]=h;if(!d)return;No(d);return}function Eg(a){a=a|0;var b=0,c=0,d=0,e=0,g=0,h=0;h=a+140|0;b=f[h>>2]|0;if((b|0)<=0){a=1;return a|0}d=b<<4;d=Ko(b>>>0>268435455|d>>>0>4294967291?-1:d+4|0)|0;f[d>>2]=b;d=d+4|0;c=d+(b<<4)|0;b=d;do{lo(b);b=b+16|0}while((b|0)!=(c|0));g=a+136|0;e=f[g>>2]|0;f[g>>2]=d;if(e|0){c=e+-4|0;b=f[c>>2]|0;if(b|0){b=e+(b<<4)|0;do{b=b+-16|0;So(b)}while((b|0)!=(e|0))}Lo(c)}if((f[h>>2]|0)<=0){a=1;return a|0}b=0;while(1){if(!(nd((f[g>>2]|0)+(b<<4)|0,a)|0)){b=0;c=13;break}b=b+1|0;if((b|0)>=(f[h>>2]|0)){b=1;c=13;break}}if((c|0)==13)return b|0;return 0}function Fg(){var a=0,b=0,c=0,d=0,e=0,g=0,h=0,i=0;e=u;u=u+48|0;h=e+32|0;c=e+24|0;i=e+16|0;g=e;e=e+36|0;a=Ok()|0;if(a|0?(d=f[a>>2]|0,d|0):0){b=d+48|0;a=f[b>>2]|0;b=f[b+4>>2]|0;if(!((a&-256|0)==1126902528&(b|0)==1129074247)){f[c>>2]=f[1159];wl(20542,c)}if((a|0)==1126902529&(b|0)==1129074247)a=f[d+44>>2]|0;else a=d+80|0;f[e>>2]=a;d=f[d>>2]|0;a=f[d+4>>2]|0;d=Pa[f[(f[262]|0)+16>>2]&31](1048,d,e)|0;b=f[1159]|0;if(d){i=f[e>>2]|0;i=Na[f[(f[i>>2]|0)+8>>2]&127](i)|0;f[g>>2]=b;f[g+4>>2]=a;f[g+8>>2]=i;wl(20456,g)}else{f[i>>2]=b;f[i+4>>2]=a;wl(20501,i)}}wl(20580,h)}function Gg(a,c){a=a|0;c=c|0;var d=0,e=0,g=0,h=0,i=0;if(!(fg(a+8|0,c)|0)){a=0;return a|0}do if((j[c+38>>1]|0)<514){e=c+8|0;i=f[e+4>>2]|0;h=c+16|0;d=h;g=f[d>>2]|0;d=f[d+4>>2]|0;if(!((i|0)>(d|0)|((i|0)==(d|0)?(f[e>>2]|0)>>>0>g>>>0:0))){i=0;return i|0}e=b[(f[c>>2]|0)+g>>0]|0;g=Hl(g|0,d|0,1,0)|0;i=h;f[i>>2]=g;f[i+4>>2]=I;if((e&255)<2){f[a+68>>2]=e&255;break}else{i=0;return i|0}}while(0);i=nd(a+88|0,c)|0;return i|0}function Hg(a,c,d){a=a|0;c=c|0;d=d|0;var e=0,g=0,h=0,i=0,j=0;j=u;u=u+32|0;h=j+12|0;g=j;f[h>>2]=0;f[h+4>>2]=0;f[h+8>>2]=0;f[g>>2]=0;f[g+4>>2]=0;f[g+8>>2]=0;e=_h(d)|0;if(e>>>0>4294967279)co(g);if(e>>>0<11){b[g+11>>0]=e;if(!e)a=g;else{a=g;i=6}}else{i=e+16&-16;a=Rk(i)|0;f[g>>2]=a;f[g+8>>2]=i|-2147483648;f[g+4>>2]=e;i=6}if((i|0)==6)ef(a|0,d|0,e|0)|0;b[a+e>>0]=0;a=hh(c,g,h)|0;if((b[g+11>>0]|0)<0)No(f[g>>2]|0);if((b[h+11>>0]|0)>=0){u=j;return a|0}No(f[h>>2]|0);u=j;return a|0}function Ig(a){a=a|0;var c=0,d=0,e=0,g=0,h=0;h=f[a>>2]|0;f[a>>2]=0;if(!h)return;a=f[h+28>>2]|0;if(a|0)do{c=a;a=f[a>>2]|0;d=c+8|0;Ig(c+20|0);if((b[d+11>>0]|0)<0)No(f[d>>2]|0);No(c)}while((a|0)!=0);g=h+20|0;a=f[g>>2]|0;f[g>>2]=0;if(a|0)No(a);a=f[h+8>>2]|0;if(a|0)do{e=a;a=f[a>>2]|0;g=e+8|0;c=f[e+20>>2]|0;if(c|0){d=e+24|0;if((f[d>>2]|0)!=(c|0))f[d>>2]=c;No(c)}if((b[g+11>>0]|0)<0)No(f[g>>2]|0);No(e)}while((a|0)!=0);a=f[h>>2]|0;f[h>>2]=0;if(a|0)No(a);No(h);return}function Jg(a){a=a|0;var b=0,c=0,d=0;b=f[a+92>>2]|0;if(b|0){d=a+96|0;c=f[d>>2]|0;if((c|0)!=(b|0))f[d>>2]=c+(~((c+-4-b|0)>>>2)<<2);No(b)}b=f[a+76>>2]|0;if(b|0){d=a+80|0;c=f[d>>2]|0;if((c|0)!=(b|0))f[d>>2]=c+(~((c+-4-b|0)>>>2)<<2);No(b)}b=f[a+64>>2]|0;if(b|0){d=a+68|0;c=f[d>>2]|0;if((c|0)!=(b|0))f[d>>2]=c+(~((c+-4-b|0)>>>2)<<2);No(b)}b=f[a+52>>2]|0;if(b|0){d=a+56|0;c=f[d>>2]|0;if((c|0)!=(b|0))f[d>>2]=c+(~((c+-4-b|0)>>>2)<<2);No(b)}f[a+4>>2]=3196;b=f[a+24>>2]|0;if(b|0)No(b);b=f[a+12>>2]|0;if(!b)return;No(b);return}function Kg(a,c){a=a|0;c=c|0;var d=0,e=0,g=0,h=0,i=0;if(!(Rf(a+8|0,c)|0)){a=0;return a|0}do if((j[c+38>>1]|0)<514){e=c+8|0;i=f[e+4>>2]|0;h=c+16|0;d=h;g=f[d>>2]|0;d=f[d+4>>2]|0;if(!((i|0)>(d|0)|((i|0)==(d|0)?(f[e>>2]|0)>>>0>g>>>0:0))){i=0;return i|0}e=b[(f[c>>2]|0)+g>>0]|0;g=Hl(g|0,d|0,1,0)|0;i=h;f[i>>2]=g;f[i+4>>2]=I;if((e&255)<2){f[a+68>>2]=e&255;break}else{i=0;return i|0}}while(0);i=nd(a+88|0,c)|0;return i|0}function Lg(a,c,d){a=a|0;c=c|0;d=d|0;var e=0,g=0,h=0,i=0,j=0;j=u;u=u+16|0;i=j;h=c+11|0;e=b[h>>0]|0;if(e<<24>>24<0)g=f[c+4>>2]|0;else g=e&255;while(1){if(e<<24>>24<0)e=f[c>>2]|0;else e=c;f[i>>2]=d;e=bl(e,g+1|0,20453,i)|0;if((e|0)>-1)if(e>>>0>g>>>0)g=e;else break;else g=g<<1|1;Hh(c,g,0);e=b[h>>0]|0}Hh(c,e,0);f[a>>2]=f[c>>2];f[a+4>>2]=f[c+4>>2];f[a+8>>2]=f[c+8>>2];e=0;while(1){if((e|0)==3)break;f[c+(e<<2)>>2]=0;e=e+1|0}u=j;return}function Mg(a,c,d){a=a|0;c=c|0;d=d|0;do if(a){if(c>>>0<128){b[a>>0]=c;a=1;break}d=(Jo()|0)+188|0;if(!(f[f[d>>2]>>2]|0))if((c&-128|0)==57216){b[a>>0]=c;a=1;break}else{a=Ao()|0;f[a>>2]=84;a=-1;break}if(c>>>0<2048){b[a>>0]=c>>>6|192;b[a+1>>0]=c&63|128;a=2;break}if(c>>>0<55296|(c&-8192|0)==57344){b[a>>0]=c>>>12|224;b[a+1>>0]=c>>>6&63|128;b[a+2>>0]=c&63|128;a=3;break}if((c+-65536|0)>>>0<1048576){b[a>>0]=c>>>18|240;b[a+1>>0]=c>>>12&63|128;b[a+2>>0]=c>>>6&63|128;b[a+3>>0]=c&63|128;a=4;break}else{a=Ao()|0;f[a>>2]=84;a=-1;break}}else a=1;while(0);return a|0}function Ng(a){a=a|0;var b=0,c=0,d=0;f[a>>2]=3288;b=a+84|0;c=a+4|0;d=c+80|0;do{f[c>>2]=0;c=c+4|0}while((c|0)<(d|0));f[b>>2]=-1;f[a+88>>2]=-1;f[a+92>>2]=-1;b=a+152|0;c=a+96|0;d=c+56|0;do{f[c>>2]=0;c=c+4|0}while((c|0)<(d|0));n[b>>2]=$(1.0);b=a+224|0;c=a+156|0;d=c+68|0;do{f[c>>2]=0;c=c+4|0}while((c|0)<(d|0));pk(b);d=a+372|0;f[d>>2]=0;f[d+4>>2]=0;f[d+8>>2]=0;f[d+12>>2]=0;f[d+16>>2]=0;f[a+392>>2]=-1;f[a+396>>2]=-1;f[a+400>>2]=2;f[a+404>>2]=7;d=a+408|0;f[d>>2]=0;f[d+4>>2]=0;f[d+8>>2]=0;f[d+12>>2]=0;f[d+16>>2]=0;f[d+20>>2]=0;return}function Og(a,b){a=a|0;b=b|0;var c=0,d=0,e=0,g=0,h=0,i=0,j=0,k=0,l=0;j=a+4|0;i=f[a>>2]|0;l=(f[j>>2]|0)-i|0;h=l>>2;c=h+1|0;if(c>>>0>1073741823)co(a);k=a+8|0;g=(f[k>>2]|0)-i|0;d=g>>1;d=g>>2>>>0<536870911?(d>>>0>>0?c:d):1073741823;do if(d)if(d>>>0>1073741823){a=sa(8)|0;Km(a,17959);f[a>>2]=4748;wa(a|0,1128,100)}else{g=Rk(d<<2)|0;break}else g=0;while(0);e=g+(h<<2)|0;f[e>>2]=f[b>>2];c=e+(0-h<<2)|0;if((l|0)>0)ef(c|0,i|0,l|0)|0;f[a>>2]=c;f[j>>2]=e+4;f[k>>2]=g+(d<<2);if(!i)return;No(i);return}function Pg(a){a=a|0;var b=0,c=0,d=0,e=0,g=0,h=0,i=0,j=0;i=a+8|0;d=f[i>>2]|0;if((d|0)<0){j=0;return j|0}j=a+4|0;a=f[j>>2]|0;e=a+4|0;c=f[e>>2]|0;b=f[a>>2]|0;g=c-b>>2;if(d>>>0<=g>>>0){if(d>>>0>>0?(h=b+(d<<2)|0,(c|0)!=(h|0)):0)f[e>>2]=c+(~((c+-4-h|0)>>>2)<<2)}else{vg(a,d-g|0);d=f[i>>2]|0}if((d|0)<=0){j=1;return j|0}e=f[j>>2]|0;a=f[e>>2]|0;c=(f[e+4>>2]|0)-a>>2;b=0;while(1){if(c>>>0<=b>>>0){b=10;break}f[a+(b<<2)>>2]=b;b=b+1|0;if((b|0)>=(d|0)){a=1;b=12;break}}if((b|0)==10)co(e);else if((b|0)==12)return a|0;return 0}function Qg(a,c){a=a|0;c=c|0;var d=0,e=0,g=0,i=0,j=0,k=0;k=u;u=u+80|0;j=k;i=k+56|0;g=k+40|0;e=j;d=e+40|0;do{f[e>>2]=f[c>>2];e=e+4|0;c=c+4|0}while((e|0)<(d|0));Yb(g,j,i);c=f[g>>2]|0;if(!c){c=g+4|0;if((b[c+11>>0]|0)<0)No(f[c>>2]|0);i=h[i+7>>0]|0;f[a>>2]=0;f[a+4>>2]=0;f[a+8>>2]=0;f[a+12>>2]=0;f[a+16>>2]=i;j=j+24|0;So(j);u=k;return}else{f[a>>2]=c;c=g+4|0;lh(a+4|0,c);if((b[c+11>>0]|0)<0)No(f[c>>2]|0);j=j+24|0;So(j);u=k;return}}function Rg(a){a=a|0;var c=0,d=0,e=0,g=0,h=0;c=f[a+28>>2]|0;if(c|0)do{d=c;c=f[c>>2]|0;g=d+8|0;h=d+20|0;e=f[h>>2]|0;f[h>>2]=0;if(e|0){Rg(e);No(e)}if((b[g+11>>0]|0)<0)No(f[g>>2]|0);No(d)}while((c|0)!=0);h=a+20|0;c=f[h>>2]|0;f[h>>2]=0;if(c|0)No(c);c=f[a+8>>2]|0;if(c|0)do{g=c;c=f[c>>2]|0;h=g+8|0;d=f[g+20>>2]|0;if(d|0){e=g+24|0;if((f[e>>2]|0)!=(d|0))f[e>>2]=d;No(d)}if((b[h+11>>0]|0)<0)No(f[h>>2]|0);No(g)}while((c|0)!=0);c=f[a>>2]|0;f[a>>2]=0;if(!c)return;No(c);return}function Sg(a,c){a=a|0;c=c|0;var d=0,e=0,g=0,h=0,i=0,j=0;e=u;u=u+16|0;d=e;if(!c){a=0;u=e;return a|0}i=c+4|0;g=(f[i>>2]|0)-(f[c>>2]|0)>>2;b[d>>0]=0;pf(a,g,d);g=c+24|0;h=c+28|0;j=(f[h>>2]|0)-(f[g>>2]|0)>>2;b[d>>0]=0;pf(a+12|0,j,d);ze(a+28|0,(f[i>>2]|0)-(f[c>>2]|0)>>2,3596);Qh(a+52|0,(f[h>>2]|0)-(f[g>>2]|0)>>2);Qh(a+40|0,(f[h>>2]|0)-(f[g>>2]|0)>>2);f[a+64>>2]=c;b[a+24>>0]=1;a=1;u=e;return a|0}function Tg(a,c,d){a=a|0;c=c|0;d=d|0;var e=0.0,g=0,h=0,i=0,j=0,k=0;k=u;u=u+32|0;h=k;i=k+8|0;p[h>>3]=0.0;f[i>>2]=0;f[i+4>>2]=0;f[i+8>>2]=0;g=_h(d)|0;if(g>>>0>4294967279)co(i);if(g>>>0<11){b[i+11>>0]=g;if(!g)a=i;else{a=i;j=6}}else{j=g+16&-16;a=Rk(j)|0;f[i>>2]=a;f[i+8>>2]=j|-2147483648;f[i+4>>2]=g;j=6}if((j|0)==6)ef(a|0,d|0,g|0)|0;b[a+g>>0]=0;Lf(c,i,h)|0;e=+p[h>>3];if((b[i+11>>0]|0)>=0){u=k;return +e}No(f[i>>2]|0);u=k;return +e}function Ug(a,c,d){a=a|0;c=c|0;d=d|0;var e=0,g=0,h=0,i=0,j=0;j=u;u=u+16|0;g=j+12|0;h=j;f[g>>2]=0;f[h>>2]=0;f[h+4>>2]=0;f[h+8>>2]=0;e=_h(d)|0;if(e>>>0>4294967279)co(h);if(e>>>0<11){b[h+11>>0]=e;if(!e)a=h;else{a=h;i=6}}else{i=e+16&-16;a=Rk(i)|0;f[h>>2]=a;f[h+8>>2]=i|-2147483648;f[h+4>>2]=e;i=6}if((i|0)==6)ef(a|0,d|0,e|0)|0;b[a+e>>0]=0;Bh(c,h,g)|0;a=f[g>>2]|0;if((b[h+11>>0]|0)>=0){u=j;return a|0}No(f[h>>2]|0);u=j;return a|0}function Vg(a,b){a=a|0;b=b|0;var c=0,d=0,e=0,g=0,h=0,i=0,j=0,k=0;j=a+8|0;g=f[a>>2]|0;d=g;if((((f[j>>2]|0)-g|0)/12|0)>>>0>=b>>>0)return;i=a+4|0;if(b>>>0>357913941){a=sa(8)|0;Km(a,17959);f[a>>2]=4748;wa(a|0,1128,100)}k=f[i>>2]|0;e=Rk(b*12|0)|0;c=e+(((k-g|0)/12|0)*12|0)|0;h=c;e=e+(b*12|0)|0;b=k;if((b|0)==(d|0))c=h;else do{k=b;b=b+-12|0;f[c+-12>>2]=f[b>>2];f[c+-8>>2]=f[k+-8>>2];f[c+-4>>2]=f[k+-4>>2];c=c+-12|0}while((b|0)!=(d|0));f[a>>2]=c;f[i>>2]=h;f[j>>2]=e;if(!g)return;No(g);return}function Wg(a,b,c,d){a=a|0;b=b|0;c=c|0;d=d|0;var e=0,g=0,h=0,i=0,j=0;j=u;u=u+48|0;h=j+4|0;i=j;if((d|0)!=1){f[a>>2]=0;u=j;return}g=f[b+12>>2]|0;d=f[b+4>>2]|0;b=h;e=b+36|0;do{f[b>>2]=0;b=b+4|0}while((b|0)<(e|0));gf(i,c,g,d,h);e=f[h+24>>2]|0;if(e|0){b=h+28|0;d=f[b>>2]|0;if((d|0)!=(e|0))f[b>>2]=d+(~((d+-4-e|0)>>>2)<<2);No(e)}f[a>>2]=f[i>>2];u=j;return}function Xg(a,c,d){a=a|0;c=c|0;d=d|0;var e=0,g=0,h=0,i=0,j=0;j=u;u=u+32|0;g=j;h=j+8|0;p[g>>3]=0.0;f[h>>2]=0;f[h+4>>2]=0;f[h+8>>2]=0;e=_h(d)|0;if(e>>>0>4294967279)co(h);if(e>>>0<11){b[h+11>>0]=e;if(!e)a=h;else{a=h;i=6}}else{i=e+16&-16;a=Rk(i)|0;f[h>>2]=a;f[h+8>>2]=i|-2147483648;f[h+4>>2]=e;i=6}if((i|0)==6)ef(a|0,d|0,e|0)|0;b[a+e>>0]=0;a=Lf(c,h,g)|0;if((b[h+11>>0]|0)>=0){u=j;return a|0}No(f[h>>2]|0);u=j;return a|0}function Yg(a,b,c,d){a=a|0;b=b|0;c=c|0;d=d|0;var e=0,g=0,h=0;if(b>>>0<64){e=f[a+8>>2]|0;if(e>>>0<=1){h=0;return h|0}b=f[c>>2]|0;c=1;d=0;do{d=(f[b+(d<<2)>>2]|0)>>>0>(f[b+(c<<2)>>2]|0)>>>0?c:d;c=c+1|0}while(c>>>0>>0);return d|0}h=a+576|0;g=f[h>>2]|0;e=32-g|0;c=a+572|0;b=f[c>>2]|0;d=f[b>>2]<>2]=a;g=b+4|0;f[c>>2]=g;h=32-a|0;h=(f[g>>2]|0)>>>h|d>>>(h-e|0);return h|0}d=d>>>28;g=g+4|0;f[h>>2]=g;if((g|0)!=32){h=d;return h|0}f[c>>2]=b+4;f[h>>2]=0;h=d;return h|0}function Zg(a,b,c){a=a|0;b=b|0;c=c|0;var d=0,e=0;if((b|0)>715827882|(c|b|0)<0){a=0;return a|0}e=b*3|0;ze(a,e,3568);ze(a+12|0,e,3564);Qh(a+24|0,c);e=a+72|0;b=f[e>>2]|0;d=a+76|0;c=f[d>>2]|0;if((c|0)!=(b|0))f[d>>2]=c+(~((c+-4-b|0)>>>2)<<2);f[e>>2]=0;f[d>>2]=0;f[a+80>>2]=0;if(b|0)No(b);d=a+60|0;b=f[d>>2]|0;c=a+64|0;if((f[c>>2]|0)!=(b|0))f[c>>2]=b;f[d>>2]=0;f[c>>2]=0;f[a+68>>2]=0;if(!b){a=1;return a|0}No(b);a=1;return a|0}function _g(a,c,d){a=a|0;c=c|0;d=d|0;var e=0,g=0,h=0,i=0,j=0;j=u;u=u+16|0;g=j+12|0;h=j;f[g>>2]=0;f[h>>2]=0;f[h+4>>2]=0;f[h+8>>2]=0;e=_h(d)|0;if(e>>>0>4294967279)co(h);if(e>>>0<11){b[h+11>>0]=e;if(!e)a=h;else{a=h;i=6}}else{i=e+16&-16;a=Rk(i)|0;f[h>>2]=a;f[h+8>>2]=i|-2147483648;f[h+4>>2]=e;i=6}if((i|0)==6)ef(a|0,d|0,e|0)|0;b[a+e>>0]=0;a=Bh(c,h,g)|0;if((b[h+11>>0]|0)>=0){u=j;return a|0}No(f[h>>2]|0);u=j;return a|0}function $g(a,c,d){a=a|0;c=c|0;d=d|0;var e=0,g=0,i=0,j=0,k=0;do if(((h[(f[a+4>>2]|0)+36>>0]|0)<<8&65535)<512){j=d+8|0;k=f[j+4>>2]|0;i=d+16|0;g=i;e=f[g>>2]|0;g=f[g+4>>2]|0;if((k|0)>(g|0)|((k|0)==(g|0)?(f[j>>2]|0)>>>0>e>>>0:0)){k=b[(f[d>>2]|0)+e>>0]|0;g=Hl(e|0,g|0,1,0)|0;j=i;f[j>>2]=g;f[j+4>>2]=I;f[a+24>>2]=k&255;break}else{k=0;return k|0}}while(0);k=qc(a,c,d)|0;return k|0}function ah(a,b){a=a|0;b=b|0;var c=0,d=0;c=a+16|0;a=f[b>>2]|0;f[b>>2]=0;d=f[c>>2]|0;f[c>>2]=a;if(!d)return;c=d+88|0;b=f[c>>2]|0;f[c>>2]=0;if(b|0){a=f[b+8>>2]|0;if(a|0){c=b+12|0;if((f[c>>2]|0)!=(a|0))f[c>>2]=a;No(a)}No(b)}b=f[d+68>>2]|0;if(b|0){c=d+72|0;a=f[c>>2]|0;if((a|0)!=(b|0))f[c>>2]=a+(~((a+-4-b|0)>>>2)<<2);No(b)}c=d+64|0;b=f[c>>2]|0;f[c>>2]=0;if(b|0){a=f[b>>2]|0;if(a|0){c=b+4|0;if((f[c>>2]|0)!=(a|0))f[c>>2]=a;No(a)}No(b)}No(d);return}function bh(a,c){a=a|0;c=c|0;var d=0,e=0,g=0,h=0,i=0;e=c+8|0;i=f[e+4>>2]|0;h=c+16|0;d=h;g=f[d>>2]|0;d=f[d+4>>2]|0;if(!((i|0)>(d|0)|((i|0)==(d|0)?(f[e>>2]|0)>>>0>g>>>0:0))){i=0;return i|0}e=b[(f[c>>2]|0)+g>>0]|0;g=Hl(g|0,d|0,1,0)|0;i=h;f[i>>2]=g;f[i+4>>2]=I;do if(e<<24>>24<0)if(bh(a,c)|0){d=a;d=sl(f[d>>2]|0,f[d+4>>2]|0,7)|0;i=I;h=a;f[h>>2]=d;f[h+4>>2]=i;d=d|e&127;e=i;break}else{i=0;return i|0}else{d=e&255;e=0}while(0);i=a;f[i>>2]=d;f[i+4>>2]=e;i=1;return i|0}function ch(a,c,d,e){a=a|0;c=c|0;d=d|0;e=e|0;var g=0,h=0,i=0,j=0,k=0,l=0,m=0;m=u;u=u+128|0;g=m+124|0;l=m;h=l;i=4124;j=h+124|0;do{f[h>>2]=f[i>>2];h=h+4|0;i=i+4|0}while((h|0)<(j|0));if((c+-1|0)>>>0>2147483646)if(!c){c=1;k=4}else{g=Ao()|0;f[g>>2]=75;g=-1}else{g=a;k=4}if((k|0)==4){k=-2-g|0;k=c>>>0>k>>>0?k:c;f[l+48>>2]=k;h=l+20|0;f[h>>2]=g;f[l+44>>2]=g;g=g+k|0;c=l+16|0;f[c>>2]=g;f[l+28>>2]=g;g=yf(l,d,e)|0;if(k){d=f[h>>2]|0;b[d+(((d|0)==(f[c>>2]|0))<<31>>31)>>0]=0}}u=m;return g|0}function dh(a,c,d){a=a|0;c=c|0;d=d|0;var e=0,g=0,h=0,i=0,j=0,k=0;k=u;u=u+16|0;j=k;h=a+11|0;e=b[h>>0]|0;g=e<<24>>24<0;if(g)i=(f[a+8>>2]&2147483647)+-1|0;else i=10;do if(i>>>0>=d>>>0){if(g)e=f[a>>2]|0;else e=a;vm(e,c,d)|0;b[j>>0]=0;Bn(e+d|0,j);if((b[h>>0]|0)<0){f[a+4>>2]=d;break}else{b[h>>0]=d;break}}else{if(g)e=f[a+4>>2]|0;else e=e&255;sg(a,i,d-i|0,e,0,e,d,c)}while(0);u=k;return a|0}function eh(a,c){a=a|0;c=c|0;var d=0,e=0,g=0;d=f[a>>2]|0;if(!d){a=0;return a|0}e=f[c>>2]|0;if(!e){a=0;return a|0}g=f[e>>2]|0;vh(d,g,(f[e+4>>2]|0)-g|0,0)|0;b[a+24>>0]=b[c+24>>0]|0;f[a+28>>2]=f[c+28>>2];b[a+32>>0]=b[c+32>>0]|0;e=c+40|0;d=f[e+4>>2]|0;g=a+40|0;f[g>>2]=f[e>>2];f[g+4>>2]=d;g=c+48|0;d=f[g+4>>2]|0;e=a+48|0;f[e>>2]=f[g>>2];f[e+4>>2]=d;f[a+56>>2]=f[c+56>>2];c=c+8|0;a=a+8|0;f[a>>2]=f[c>>2];f[a+4>>2]=f[c+4>>2];f[a+8>>2]=f[c+8>>2];f[a+12>>2]=f[c+12>>2];a=1;return a|0}function fh(a,c,d){a=a|0;c=c|0;d=d|0;var e=0,g=0,h=0,i=0,j=0,k=0,l=0;l=u;u=u+16|0;k=l;if(c|0){h=a+11|0;e=b[h>>0]|0;if(e<<24>>24<0){j=f[a+4>>2]|0;g=(f[a+8>>2]&2147483647)+-1|0}else{j=e&255;g=10}i=j+c|0;if((g-j|0)>>>0>>0){uh(a,g,i-g|0,j,j,0,0);e=b[h>>0]|0}if(e<<24>>24<0)e=f[a>>2]|0;else e=a;ql(e+j|0,c,d)|0;if((b[h>>0]|0)<0)f[a+4>>2]=i;else b[h>>0]=i;b[k>>0]=0;Bn(e+i|0,k)}u=l;return a|0}function gh(a){a=a|0;var b=0,c=0,d=0,e=0,g=0;f[a>>2]=3012;e=a+48|0;b=f[e>>2]|0;f[e>>2]=0;if(b|0)Sa[f[(f[b>>2]|0)+4>>2]&127](b);f[a>>2]=3440;b=f[a+20>>2]|0;if(b|0){d=a+24|0;c=f[d>>2]|0;if((c|0)!=(b|0))f[d>>2]=c+(~((c+-4-b|0)>>>2)<<2);No(b)}d=a+8|0;b=f[d>>2]|0;if(!b){No(a);return}e=a+12|0;c=f[e>>2]|0;if((c|0)!=(b|0)){do{g=c+-4|0;f[e>>2]=g;c=f[g>>2]|0;f[g>>2]=0;if(c|0)Sa[f[(f[c>>2]|0)+4>>2]&127](c);c=f[e>>2]|0}while((c|0)!=(b|0));b=f[d>>2]|0}No(b);No(a);return}function hh(a,b,c){a=a|0;b=b|0;c=c|0;var d=0,e=0;b=mc(a,b)|0;if(!b){c=0;return c|0}e=b+20|0;d=f[e>>2]|0;a=b+24|0;b=f[a>>2]|0;if((d|0)==(b|0)){c=0;return c|0}Hh(c,b-d|0,0);d=Dj(c,0)|0;c=f[e>>2]|0;ef(d|0,c|0,(f[a>>2]|0)-c|0)|0;c=1;return c|0}function ih(a,c,d,e,g){a=a|0;c=c|0;d=d|0;e=e|0;g=g|0;var h=0;do if(!(jn(a,f[c+8>>2]|0,g)|0)){if(jn(a,f[c>>2]|0,g)|0){a=c+32|0;if((f[c+16>>2]|0)!=(d|0)?(h=c+20|0,(f[h>>2]|0)!=(d|0)):0){f[a>>2]=e;f[h>>2]=d;e=c+40|0;f[e>>2]=(f[e>>2]|0)+1;if((f[c+36>>2]|0)==1?(f[c+24>>2]|0)==2:0)b[c+54>>0]=1;f[c+44>>2]=4;break}if((e|0)==1)f[a>>2]=1}}else rk(0,c,d,e);while(0);return}function jh(a){a=a|0;So(a+496|0);So(a+480|0);So(a+464|0);So(a+448|0);So(a+432|0);So(a+416|0);So(a+400|0);So(a+384|0);So(a+368|0);So(a+352|0);So(a+336|0);So(a+320|0);So(a+304|0);So(a+288|0);So(a+272|0);So(a+256|0);So(a+240|0);So(a+224|0);So(a+208|0);So(a+192|0);So(a+176|0);So(a+160|0);So(a+144|0);So(a+128|0);So(a+112|0);So(a+96|0);So(a+80|0);So(a+64|0);So(a+48|0);So(a+32|0);So(a+16|0);So(a);return}function kh(a,c,d){a=a|0;c=c|0;d=d|0;var e=0,g=0,h=0,i=0;h=a+d|0;c=c&255;if((d|0)>=67){while(a&3){b[a>>0]=c;a=a+1|0}e=h&-4|0;g=e-64|0;i=c|c<<8|c<<16|c<<24;while((a|0)<=(g|0)){f[a>>2]=i;f[a+4>>2]=i;f[a+8>>2]=i;f[a+12>>2]=i;f[a+16>>2]=i;f[a+20>>2]=i;f[a+24>>2]=i;f[a+28>>2]=i;f[a+32>>2]=i;f[a+36>>2]=i;f[a+40>>2]=i;f[a+44>>2]=i;f[a+48>>2]=i;f[a+52>>2]=i;f[a+56>>2]=i;f[a+60>>2]=i;a=a+64|0}while((a|0)<(e|0)){f[a>>2]=i;a=a+4|0}}while((a|0)<(h|0)){b[a>>0]=c;a=a+1|0}return h-d|0}function lh(a,c){a=a|0;c=c|0;var d=0,e=0,g=0,h=0,i=0;g=u;u=u+16|0;e=g;f[a>>2]=0;f[a+4>>2]=0;f[a+8>>2]=0;if((b[c+11>>0]|0)<0){d=f[c>>2]|0;c=f[c+4>>2]|0;if(c>>>0>4294967279)co(a);if(c>>>0<11)b[a+11>>0]=c;else{i=c+16&-16;h=Rk(i)|0;f[a>>2]=h;f[a+8>>2]=i|-2147483648;f[a+4>>2]=c;a=h}zm(a,d,c)|0;b[e>>0]=0;Bn(a+c|0,e)}else{f[a>>2]=f[c>>2];f[a+4>>2]=f[c+4>>2];f[a+8>>2]=f[c+8>>2]}u=g;return}function mh(a,c,d,e){a=a|0;c=c|0;d=d|0;e=e|0;var g=0,h=0,i=0,j=0,k=0;if(!a){d=1;return d|0}j=d+8|0;k=f[j+4>>2]|0;i=d+16|0;g=i;h=f[g>>2]|0;g=f[g+4>>2]|0;if(!((k|0)>(g|0)|((k|0)==(g|0)?(f[j>>2]|0)>>>0>h>>>0:0))){k=0;return k|0}k=b[(f[d>>2]|0)+h>>0]|0;h=Hl(h|0,g|0,1,0)|0;j=i;f[j>>2]=h;f[j+4>>2]=I;switch(k<<24>>24){case 0:{k=rc(a,c,d,e)|0;return k|0}case 1:{k=Kc(a,d,e)|0;return k|0}default:{k=0;return k|0}}return 0}function nh(a,c,d,e,g){a=a|0;c=c|0;d=d|0;e=e|0;g=g|0;var h=0,i=0,j=0,k=0;b[c+53>>0]=1;do if((f[c+4>>2]|0)==(e|0)){b[c+52>>0]=1;h=c+16|0;a=f[h>>2]|0;k=c+54|0;j=c+48|0;i=c+24|0;e=c+36|0;if(!a){f[h>>2]=d;f[i>>2]=g;f[e>>2]=1;if(!((f[j>>2]|0)==1&(g|0)==1))break;b[k>>0]=1;break}if((a|0)!=(d|0)){f[e>>2]=(f[e>>2]|0)+1;b[k>>0]=1;break}e=f[i>>2]|0;if((e|0)==2){f[i>>2]=g;e=g}if((f[j>>2]|0)==1&(e|0)==1)b[k>>0]=1}while(0);return}function oh(a){a=a|0;var b=0,c=0,d=0,e=0;f[a>>2]=3012;e=a+48|0;b=f[e>>2]|0;f[e>>2]=0;if(b|0)Sa[f[(f[b>>2]|0)+4>>2]&127](b);f[a>>2]=3440;b=f[a+20>>2]|0;if(b|0){d=a+24|0;c=f[d>>2]|0;if((c|0)!=(b|0))f[d>>2]=c+(~((c+-4-b|0)>>>2)<<2);No(b)}e=a+8|0;b=f[e>>2]|0;if(!b)return;d=a+12|0;c=f[d>>2]|0;if((c|0)!=(b|0)){do{a=c+-4|0;f[d>>2]=a;c=f[a>>2]|0;f[a>>2]=0;if(c|0)Sa[f[(f[c>>2]|0)+4>>2]&127](c);c=f[d>>2]|0}while((c|0)!=(b|0));b=f[e>>2]|0}No(b);return}function ph(a){a=a|0;var b=0,c=0,d=0;f[a>>2]=3240;b=a+84|0;c=a+4|0;d=c+80|0;do{f[c>>2]=0;c=c+4|0}while((c|0)<(d|0));f[b>>2]=-1;f[a+88>>2]=-1;f[a+92>>2]=-1;b=a+152|0;c=a+96|0;d=c+56|0;do{f[c>>2]=0;c=c+4|0}while((c|0)<(d|0));n[b>>2]=$(1.0);b=a+224|0;c=a+156|0;d=c+68|0;do{f[c>>2]=0;c=c+4|0}while((c|0)<(d|0));pk(b);d=a+372|0;f[d>>2]=0;f[d+4>>2]=0;f[d+8>>2]=0;f[d+12>>2]=0;f[d+16>>2]=0;lo(a+392|0);f[a+408>>2]=-1;f[a+412>>2]=-1;return}function qh(a,c){a=a|0;c=c|0;var d=0,e=0,g=0,h=0,i=0;h=u;u=u+16|0;g=h;f[a>>2]=c;f[a+68>>2]=0;f[a+72>>2]=0;je(g,c);e=a+4|0;i=f[g>>2]|0;f[g>>2]=0;d=f[e>>2]|0;f[e>>2]=i;if(d){xg(d);No(d);d=f[g>>2]|0;f[g>>2]=0;if(d|0){xg(d);No(d)}}else f[g>>2]=0;if(!(f[e>>2]|0)){i=0;u=h;return i|0}i=((f[c+100>>2]|0)-(f[c+96>>2]|0)|0)/12|0;b[g>>0]=0;pf(a+56|0,i,g);i=1;u=h;return i|0}function rh(a){a=a|0;var b=0,c=0,d=0;f[a>>2]=1368;c=a+16|0;d=f[c>>2]|0;f[c>>2]=0;if(!d)return;c=d+88|0;a=f[c>>2]|0;f[c>>2]=0;if(a|0){b=f[a+8>>2]|0;if(b|0){c=a+12|0;if((f[c>>2]|0)!=(b|0))f[c>>2]=b;No(b)}No(a)}a=f[d+68>>2]|0;if(a|0){c=d+72|0;b=f[c>>2]|0;if((b|0)!=(a|0))f[c>>2]=b+(~((b+-4-a|0)>>>2)<<2);No(a)}c=d+64|0;a=f[c>>2]|0;f[c>>2]=0;if(a|0){b=f[a>>2]|0;if(b|0){c=a+4|0;if((f[c>>2]|0)!=(b|0))f[c>>2]=b;No(b)}No(a)}No(d);return}function sh(a,b,c){a=a|0;b=b|0;c=c|0;var d=0,e=0,g=0,i=0,j=0,k=0,l=0,m=0,n=0;if((b|0)>=33)ra(17782,16603,63,17908);if((b|0)<=0)ra(17937,16603,64,17908);k=a+8|0;i=a+4|0;j=0-(h[a+12>>0]|0)&255;d=f[k>>2]|0;e=0;do{e=e<<1;if(d>>>0<4096?(g=f[i>>2]|0,(g|0)>0):0){m=f[a>>2]|0;l=g+-1|0;f[i>>2]=l;d=h[m+l>>0]|0|d<<8;f[k>>2]=d}n=d&255;l=X(d>>>8,j)|0;m=n>>>0>>0;d=m?l+n|0:d-j-l|0;f[k>>2]=d;e=m&1|e;b=b+-1|0}while((b|0)!=0);f[c>>2]=e;return}function th(a,b){a=a|0;b=b|0;if(!b)return;else{th(a,f[b>>2]|0);th(a,f[b+4>>2]|0);zh(b+20|0,f[b+24>>2]|0);No(b);return}}function uh(a,c,d,e,g,h,i){a=a|0;c=c|0;d=d|0;e=e|0;g=g|0;h=h|0;i=i|0;var j=0,k=0,l=0;if((-17-c|0)>>>0>>0)co(a);if((b[a+11>>0]|0)<0)l=f[a>>2]|0;else l=a;if(c>>>0<2147483623){k=d+c|0;j=c<<1;k=k>>>0>>0?j:k;k=k>>>0<11?11:k+16&-16}else k=-17;j=Rk(k)|0;if(g|0)zm(j,l,g)|0;d=e-h-g|0;if(d|0)zm(j+g+i|0,l+g+h|0,d)|0;if((c|0)!=10)No(l);f[a>>2]=j;f[a+8>>2]=k|-2147483648;return}function vh(a,b,c,d){a=a|0;b=b|0;c=c|0;d=d|0;var e=0,g=0,h=0;if((d|0)<0){a=0;return a|0}do if(!b){e=a+4|0;d=f[e>>2]|0;b=f[a>>2]|0;g=d-b|0;if(c>>>0>g>>>0){Dg(a,c-g|0);break}if(c>>>0>>0?(h=b+c|0,(d|0)!=(h|0)):0)f[e>>2]=h}else Oe(a,b,b+c|0);while(0);a=a+24|0;h=a;h=Hl(f[h>>2]|0,f[h+4>>2]|0,1,0)|0;f[a>>2]=h;f[a+4>>2]=I;a=1;return a|0}function wh(a,c){a=a|0;c=c|0;var d=0,e=0,g=0,h=0,i=0;h=a+64|0;if((f[h>>2]|0)==0?(g=Rk(32)|0,dl(g),d=f[h>>2]|0,f[h>>2]=g,d|0):0){e=f[d>>2]|0;if(e|0){g=d+4|0;if((f[g>>2]|0)!=(e|0))f[g>>2]=e;No(e)}No(d)}e=Lj(f[a+28>>2]|0)|0;e=X(b[a+24>>0]|0,e)|0;d=((e|0)<0)<<31>>31;i=f[h>>2]|0;g=Qk(e|0,d|0,c|0,0)|0;if(!(vh(i,0,g,I)|0)){i=0;return i|0}yi(a,f[h>>2]|0,e,d,0,0);f[a+80>>2]=c;i=1;return i|0}function xh(a,c,d){a=a|0;c=c|0;d=d|0;var e=0,g=0,h=0,i=0,j=0;h=u;u=u+32|0;i=h+20|0;j=h+16|0;g=h;e=b[a+24>>0]|0;f[g>>2]=f[294];f[g+4>>2]=f[295];f[g+8>>2]=f[296];f[g+12>>2]=f[297];f[j>>2]=c;f[i>>2]=f[j>>2];if(!(eb(a,i,e,g)|0)){j=0;u=h;return j|0}se(d,g,g+(e<<24>>24<<2)|0);j=1;u=h;return j|0}function yh(a,b,c,d,e,f){a=a|0;b=b|0;c=c|0;d=d|0;e=e|0;f=f|0;var g=0,h=0,i=0;g=e>>>0>1073741823?-1:e<<2;h=Ko(g)|0;kh(h|0,0,g|0)|0;g=a+8|0;gg(g,h,b,c);if((e|0)>=(d|0)){Lo(h);return 1}a=0-e|0;f=e;do{i=c+(f<<2)|0;gg(g,i+(a<<2)|0,b+(f<<2)|0,i);f=f+e|0}while((f|0)<(d|0));Lo(h);return 1}function zh(a,c){a=a|0;c=c|0;var d=0;if(!c)return;zh(a,f[c>>2]|0);zh(a,f[c+4>>2]|0);a=c+16|0;d=c+28|0;if((b[d+11>>0]|0)<0)No(f[d>>2]|0);if((b[a+11>>0]|0)<0)No(f[a>>2]|0);No(c);return}function Ah(a,b,c){a=a|0;b=b|0;c=c|0;var d=0,e=0,g=0,h=0;h=u;u=u+64|0;g=h;if(!(jn(a,b,0)|0))if((b|0)!=0?(e=Cf(b,1072,1056,0)|0,(e|0)!=0):0){b=g+4|0;d=b+52|0;do{f[b>>2]=0;b=b+4|0}while((b|0)<(d|0));f[g>>2]=e;f[g+8>>2]=a;f[g+12>>2]=-1;f[g+48>>2]=1;Va[f[(f[e>>2]|0)+28>>2]&7](e,g,f[c>>2]|0,1);if((f[g+24>>2]|0)==1){f[c>>2]=f[g+16>>2];b=1}else b=0}else b=0;else b=1;u=h;return b|0}function Bh(a,c,d){a=a|0;c=c|0;d=d|0;a=mc(a,c)|0;if(!a){d=0;return d|0}c=f[a+20>>2]|0;if(((f[a+24>>2]|0)-c|0)!=4){d=0;return d|0}a=c;a=h[a>>0]|h[a+1>>0]<<8|h[a+2>>0]<<16|h[a+3>>0]<<24;b[d>>0]=a;b[d+1>>0]=a>>8;b[d+2>>0]=a>>16;b[d+3>>0]=a>>24;d=1;return d|0}function Ch(a,b,c,d,e,f){a=a|0;b=b|0;c=c|0;d=d|0;e=e|0;f=f|0;var g=0,h=0,i=0;g=e>>>0>1073741823?-1:e<<2;h=Ko(g)|0;kh(h|0,0,g|0)|0;g=a+8|0;jg(g,h,b,c);if((e|0)>=(d|0)){Lo(h);return 1}a=0-e|0;f=e;do{i=c+(f<<2)|0;jg(g,i+(a<<2)|0,b+(f<<2)|0,i);f=f+e|0}while((f|0)<(d|0));Lo(h);return 1}function Dh(a,c,d,e,g,h,i,j,k,l){a=a|0;c=c|0;d=d|0;e=e|0;g=g|0;h=h|0;i=i|0;j=j|0;k=k|0;l=l|0;var m=0,n=0,o=0;f[a>>2]=d;if(d|0){o=d+16|0;m=f[o+4>>2]|0;n=a+8|0;f[n>>2]=f[o>>2];f[n+4>>2]=m;n=d+24|0;m=f[n+4>>2]|0;d=a+16|0;f[d>>2]=f[n>>2];f[d+4>>2]=m}b[a+24>>0]=e;f[a+28>>2]=g;b[a+32>>0]=h&1;o=a+40|0;f[o>>2]=i;f[o+4>>2]=j;o=a+48|0;f[o>>2]=k;f[o+4>>2]=l;f[a+56>>2]=c;return}function Eh(a,c){a=a|0;c=c|0;var d=0,e=0,g=0,h=0,i=0;h=c+8|0;i=f[h+4>>2]|0;g=c+16|0;d=g;e=f[d>>2]|0;d=f[d+4>>2]|0;if(!((i|0)>(d|0)|((i|0)==(d|0)?(f[h>>2]|0)>>>0>e>>>0:0))){i=0;return i|0}h=b[(f[c>>2]|0)+e>>0]|0;i=Hl(e|0,d|0,1,0)|0;d=g;f[d>>2]=i;f[d+4>>2]=I;d=h&255;do if(d&128)if(Eh(a,c)|0){d=f[a>>2]<<7;f[a>>2]=d;d=d|h&127;break}else{i=0;return i|0}while(0);f[a>>2]=d;i=1;return i|0}function Fh(a,b,c){a=a|0;b=b|0;c=c|0;var d=0,e=0;d=f[b+4>>2]|0;if(!d){e=0;return e|0}if((c|0)<=-1)ra(14612,17288,59,17379);a=f[b+8>>2]|0;if(((f[b+12>>2]|0)-a>>2|0)<=(c|0))ra(17234,17288,60,17379);e=f[(f[a+(c<<2)>>2]|0)+60>>2]|0;a=f[d+40>>2]|0;b=f[d+44>>2]|0;if((a|0)==(b|0)){e=0;return e|0}else c=a;while(1){a=f[c>>2]|0;c=c+4|0;if((f[a+40>>2]|0)==(e|0)){c=9;break}if((c|0)==(b|0)){a=0;c=9;break}}if((c|0)==9)return a|0;return 0}function Gh(a){a=a|0;var b=0,c=0,d=0;if(!a)return;d=a+88|0;b=f[d>>2]|0;f[d>>2]=0;if(b|0){c=f[b+8>>2]|0;if(c|0){d=b+12|0;if((f[d>>2]|0)!=(c|0))f[d>>2]=c;No(c)}No(b)}b=f[a+68>>2]|0;if(b|0){d=a+72|0;c=f[d>>2]|0;if((c|0)!=(b|0))f[d>>2]=c+(~((c+-4-b|0)>>>2)<<2);No(b)}d=a+64|0;b=f[d>>2]|0;f[d>>2]=0;if(b|0){c=f[b>>2]|0;if(c|0){d=b+4|0;if((f[d>>2]|0)!=(c|0))f[d>>2]=c;No(c)}No(b)}No(a);return}function Hh(a,c,d){a=a|0;c=c|0;d=d|0;var e=0,g=0,h=0,i=0,j=0;j=u;u=u+16|0;h=j;g=a+11|0;e=b[g>>0]|0;i=e<<24>>24<0;if(i)e=f[a+4>>2]|0;else e=e&255;do if(e>>>0>=c>>>0)if(i){i=(f[a>>2]|0)+c|0;b[h>>0]=0;Bn(i,h);f[a+4>>2]=c;break}else{b[h>>0]=0;Bn(a+c|0,h);b[g>>0]=c;break}else fh(a,c-e|0,d)|0;while(0);u=j;return}function Ih(a,c){a=a|0;c=c|0;var d=0,e=0,g=0,h=0,i=0,j=0;j=u;u=u+16|0;h=j;i=j+4|0;f[h>>2]=c;c=Rk(32)|0;f[i>>2]=c;f[i+8>>2]=-2147483616;f[i+4>>2]=24;d=c;e=14755;g=d+24|0;do{b[d>>0]=b[e>>0]|0;d=d+1|0;e=e+1|0}while((d|0)<(g|0));b[c+24>>0]=0;Nh(tc(a,h)|0,i,1);if((b[i+11>>0]|0)>=0){u=j;return}No(f[i>>2]|0);u=j;return}function Jh(a){a=a|0;var b=0,c=0,d=0;b=f[a+52>>2]|0;if(b|0){d=a+56|0;c=f[d>>2]|0;if((c|0)!=(b|0))f[d>>2]=c+(~((c+-4-b|0)>>>2)<<2);No(b)}b=f[a+40>>2]|0;if(b|0){d=a+44|0;c=f[d>>2]|0;if((c|0)!=(b|0))f[d>>2]=c+(~((c+-4-b|0)>>>2)<<2);No(b)}b=f[a+28>>2]|0;if(b|0){d=a+32|0;c=f[d>>2]|0;if((c|0)!=(b|0))f[d>>2]=c+(~((c+-4-b|0)>>>2)<<2);No(b)}b=f[a+12>>2]|0;if(b|0)No(b);b=f[a>>2]|0;if(!b)return;No(b);return}function Kh(a){a=a|0;var b=0,c=0,d=0,e=0,g=0;f[a>>2]=3440;b=f[a+20>>2]|0;if(b|0){d=a+24|0;c=f[d>>2]|0;if((c|0)!=(b|0))f[d>>2]=c+(~((c+-4-b|0)>>>2)<<2);No(b)}d=a+8|0;b=f[d>>2]|0;if(!b){No(a);return}e=a+12|0;c=f[e>>2]|0;if((c|0)!=(b|0)){do{g=c+-4|0;f[e>>2]=g;c=f[g>>2]|0;f[g>>2]=0;if(c|0)Sa[f[(f[c>>2]|0)+4>>2]&127](c);c=f[e>>2]|0}while((c|0)!=(b|0));b=f[d>>2]|0}No(b);No(a);return}function Lh(a,c){a=a|0;c=c|0;var d=0,e=0,g=0,i=0,j=0,k=0,l=0;l=u;u=u+16|0;j=l;k=c&255;b[j>>0]=k;g=a+16|0;e=f[g>>2]|0;if(!e)if(!(mj(a)|0)){e=f[g>>2]|0;i=4}else d=-1;else i=4;do if((i|0)==4){i=a+20|0;g=f[i>>2]|0;if(g>>>0>>0?(d=c&255,(d|0)!=(b[a+75>>0]|0)):0){f[i>>2]=g+1;b[g>>0]=k;break}if((Pa[f[a+36>>2]&31](a,j,1)|0)==1)d=h[j>>0]|0;else d=-1}while(0);u=l;return d|0}function Mh(a){a=a|0;var b=0,c=0,d=0,e=0;f[a>>2]=3440;b=f[a+20>>2]|0;if(b|0){d=a+24|0;c=f[d>>2]|0;if((c|0)!=(b|0))f[d>>2]=c+(~((c+-4-b|0)>>>2)<<2);No(b)}e=a+8|0;b=f[e>>2]|0;if(!b)return;d=a+12|0;c=f[d>>2]|0;if((c|0)!=(b|0)){do{a=c+-4|0;f[d>>2]=a;c=f[a>>2]|0;f[a>>2]=0;if(c|0)Sa[f[(f[c>>2]|0)+4>>2]&127](c);c=f[d>>2]|0}while((c|0)!=(b|0));b=f[e>>2]|0}No(b);return}function Nh(a,c,d){a=a|0;c=c|0;d=d|0;var e=0,g=0;g=u;u=u+16|0;e=g;cj(e,d&1);a=pg(a,c)|0;c=a+11|0;if((b[c>>0]|0)<0){b[f[a>>2]>>0]=0;f[a+4>>2]=0}else{b[a>>0]=0;b[c>>0]=0}Of(a,0);f[a>>2]=f[e>>2];f[a+4>>2]=f[e+4>>2];f[a+8>>2]=f[e+8>>2];u=g;return}function Oh(a,c){a=a|0;c=c|0;var d=0,e=0,g=0,h=0,i=0,j=0,k=0;h=a&255;d=a&255;if((f[c+76>>2]|0)>=0?(To(c)|0)!=0:0){if((d|0)!=(b[c+75>>0]|0)?(j=c+20|0,g=f[j>>2]|0,g>>>0<(f[c+16>>2]|0)>>>0):0){f[j>>2]=g+1;b[g>>0]=h}else d=Lh(c,a)|0;So(c)}else k=3;do if((k|0)==3){if((d|0)!=(b[c+75>>0]|0)?(i=c+20|0,e=f[i>>2]|0,e>>>0<(f[c+16>>2]|0)>>>0):0){f[i>>2]=e+1;b[e>>0]=h;break}d=Lh(c,a)|0}while(0);return d|0}function Ph(a){a=a|0;var b=0,c=0,d=0;f[a>>2]=2124;b=f[a+96>>2]|0;if(b|0)No(b);b=f[a+84>>2]|0;if(b|0)No(b);b=f[a+72>>2]|0;if(b|0)No(b);b=f[a+60>>2]|0;if(b|0)No(b);f[a>>2]=1536;c=f[a+32>>2]|0;if(!c){No(a);return}d=a+36|0;b=f[d>>2]|0;if((b|0)!=(c|0))f[d>>2]=b+(~((b+-4-c|0)>>>2)<<2);No(c);No(a);return}function Qh(a,b){a=a|0;b=b|0;var c=0,d=0,e=0,g=0,h=0,i=0,j=0;e=a+8|0;c=f[a>>2]|0;if((f[e>>2]|0)-c>>2>>>0>=b>>>0)return;d=a+4|0;if(b>>>0>1073741823){a=sa(8)|0;Km(a,17959);f[a>>2]=4748;wa(a|0,1128,100)}j=(f[d>>2]|0)-c|0;h=j>>2;i=Rk(b<<2)|0;g=i+(h<<2)|0;h=g+(0-h<<2)|0;if((j|0)>0)ef(h|0,c|0,j|0)|0;f[a>>2]=h;f[d>>2]=g;f[e>>2]=i+(b<<2);if(!c)return;No(c);return}function Rh(a){a=a|0;var b=0,c=0,d=0;f[a>>2]=1760;b=f[a+96>>2]|0;if(b|0)No(b);b=f[a+84>>2]|0;if(b|0)No(b);b=f[a+72>>2]|0;if(b|0)No(b);b=f[a+60>>2]|0;if(b|0)No(b);f[a>>2]=1536;c=f[a+32>>2]|0;if(!c){No(a);return}d=a+36|0;b=f[d>>2]|0;if((b|0)!=(c|0))f[d>>2]=b+(~((b+-4-c|0)>>>2)<<2);No(c);No(a);return}function Sh(a){a=a|0;var b=0,c=0,d=0;So(a+168|0);b=f[a+156>>2]|0;if(b|0){d=a+160|0;c=f[d>>2]|0;if((c|0)!=(b|0))f[d>>2]=c+(~((c+-4-b|0)>>>2)<<2);No(b)}d=a+136|0;c=f[d>>2]|0;f[d>>2]=0;if(c|0){d=c+-4|0;b=f[d>>2]|0;if(b|0){b=c+(b<<4)|0;do{b=b+-16|0;So(b)}while((b|0)!=(c|0))}Lo(d)}So(a+120|0);So(a+80|0);So(a+64|0);So(a+24|0);return}function Th(a){a=a|0;var b=0,c=0;f[a>>2]=2124;b=f[a+96>>2]|0;if(b|0)No(b);b=f[a+84>>2]|0;if(b|0)No(b);b=f[a+72>>2]|0;if(b|0)No(b);b=f[a+60>>2]|0;if(b|0)No(b);f[a>>2]=1536;c=f[a+32>>2]|0;if(!c)return;a=a+36|0;b=f[a>>2]|0;if((b|0)!=(c|0))f[a>>2]=b+(~((b+-4-c|0)>>>2)<<2);No(c);return}function Uh(a){a=a|0;var b=0,c=0,d=0,e=0,g=0,i=0,j=0;b=f[a+32>>2]|0;j=b+8|0;i=f[j>>2]|0;j=f[j+4>>2]|0;g=b+16|0;c=g;e=f[c>>2]|0;c=Hl(e|0,f[c+4>>2]|0,4,0)|0;d=I;if((j|0)<(d|0)|(j|0)==(d|0)&i>>>0>>0){j=0;return j|0}j=(f[b>>2]|0)+e|0;j=h[j>>0]|h[j+1>>0]<<8|h[j+2>>0]<<16|h[j+3>>0]<<24;i=g;f[i>>2]=c;f[i+4>>2]=d;f[(f[a+4>>2]|0)+80>>2]=j;j=1;return j|0}function Vh(a){a=a|0;var c=0,d=0,e=0,f=0,g=0;while(1){c=b[a>>0]|0;d=c<<24>>24;e=a+1|0;if(!(fo(d)|0))break;else a=e}switch(d|0){case 45:{a=1;f=5;break}case 43:{a=0;f=5;break}default:{g=0;e=a}}if((f|0)==5){c=b[e>>0]|0;g=a}a=(c<<24>>24)+-48|0;if(a>>>0<10){d=a;a=0;c=e;do{c=c+1|0;a=(a*10|0)-d|0;d=(b[c>>0]|0)+-48|0}while(d>>>0<10)}else a=0;return (g|0?a:0-a|0)|0}function Wh(a){a=a|0;var b=0,c=0;f[a>>2]=1760;b=f[a+96>>2]|0;if(b|0)No(b);b=f[a+84>>2]|0;if(b|0)No(b);b=f[a+72>>2]|0;if(b|0)No(b);b=f[a+60>>2]|0;if(b|0)No(b);f[a>>2]=1536;c=f[a+32>>2]|0;if(!c)return;a=a+36|0;b=f[a>>2]|0;if((b|0)!=(c|0))f[a>>2]=b+(~((b+-4-c|0)>>>2)<<2);No(c);return}function Xh(a){a=a|0;var b=0,c=0,d=0;f[a>>2]=3072;b=a+84|0;c=a+4|0;d=c+80|0;do{f[c>>2]=0;c=c+4|0}while((c|0)<(d|0));f[b>>2]=-1;f[a+88>>2]=-1;f[a+92>>2]=-1;b=a+152|0;c=a+96|0;d=c+56|0;do{f[c>>2]=0;c=c+4|0}while((c|0)<(d|0));n[b>>2]=$(1.0);b=a+224|0;c=a+156|0;d=c+68|0;do{f[c>>2]=0;c=c+4|0}while((c|0)<(d|0));pk(b);return}function Yh(a,b){a=a|0;b=b|0;var c=0,d=0,e=0,g=0,h=0;f[a>>2]=0;h=a+4|0;f[h>>2]=0;f[a+8>>2]=0;e=b+4|0;c=(f[e>>2]|0)-(f[b>>2]|0)|0;d=c>>2;if(!d)return;if(d>>>0>1073741823)co(a);g=Rk(c)|0;f[h>>2]=g;f[a>>2]=g;f[a+8>>2]=g+(d<<2);b=f[b>>2]|0;c=(f[e>>2]|0)-b|0;if((c|0)<=0)return;ef(g|0,b|0,c|0)|0;f[h>>2]=g+(c>>>2<<2);return}function Zh(a,c,d){a=a|0;c=c|0;d=d|0;c=df(a,c)|0;if((c|0)==(a+4|0)){a=-1;c=(a|0)==-1;a=(a|0)!=0;d=c?d:a;return d|0}c=c+28|0;if((b[c+11>>0]|0)<0)c=f[c>>2]|0;a=Vh(c)|0;c=(a|0)==-1;a=(a|0)!=0;d=c?d:a;return d|0}function _h(a){a=a|0;var c=0,d=0,e=0;e=a;a:do if(!(e&3)){c=a;d=4}else{c=e;while(1){if(!(b[a>>0]|0))break a;a=a+1|0;c=a;if(!(c&3)){c=a;d=4;break}}}while(0);if((d|0)==4){while(1){a=f[c>>2]|0;if(!((a&-2139062144^-2139062144)&a+-16843009))c=c+4|0;else break}if((a&255)<<24>>24)do c=c+1|0;while((b[c>>0]|0)!=0)}return c-e|0}function $h(a,b){a=a|0;b=b|0;var c=0,d=0,e=0,g=0;e=Na[f[(f[a>>2]|0)+24>>2]&127](a)|0;if((e|0)<=0){b=1;return b|0}d=a+36|0;c=a+48|0;a=0;while(1){g=f[(f[d>>2]|0)+(a<<2)>>2]|0;a=a+1|0;if(!(Pa[f[(f[g>>2]|0)+20>>2]&31](g,c,b)|0)){a=0;c=5;break}if((a|0)>=(e|0)){a=1;c=5;break}}if((c|0)==5)return a|0;return 0}function ai(a){a=a|0;var b=0,c=0,d=0;f[a>>2]=3124;b=f[a+64>>2]|0;if(b|0){d=a+68|0;c=f[d>>2]|0;if((c|0)!=(b|0))f[d>>2]=c+(~((c+-4-b|0)>>>2)<<2);No(b)}f[a+12>>2]=3148;b=f[a+32>>2]|0;if(b|0)No(b);b=f[a+20>>2]|0;if(!b){No(a);return}No(b);No(a);return}function bi(a,b){a=a|0;b=b|0;var c=0,d=0,e=0;c=f[b>>2]|0;if(!c){a=0;return a|0}e=a+44|0;d=f[e>>2]|0;if(d>>>0<(f[a+48>>2]|0)>>>0){f[b>>2]=0;f[d>>2]=c;f[e>>2]=(f[e>>2]|0)+4;a=1;return a|0}else{$e(a+40|0,b);a=1;return a|0}return 0}function ci(a,b,c){a=a|0;b=b|0;c=c|0;var d=0,e=0;f[a>>2]=0;d=a+4|0;f[d>>2]=0;f[a+8>>2]=0;if(!b)return;if(b>>>0>357913941)co(a);e=Rk(b*12|0)|0;f[d>>2]=e;f[a>>2]=e;f[a+8>>2]=e+(b*12|0);a=e;do{Yh(a,c);a=(f[d>>2]|0)+12|0;f[d>>2]=a;b=b+-1|0}while((b|0)!=0);return}function di(a,b){a=a|0;b=b|0;var c=0,d=0,e=0,g=0;e=Na[f[(f[a>>2]|0)+24>>2]&127](a)|0;if((e|0)<=0){b=1;return b|0}d=a+36|0;c=a+48|0;a=0;while(1){g=f[(f[d>>2]|0)+(a<<2)>>2]|0;a=a+1|0;if(!(Pa[f[(f[g>>2]|0)+16>>2]&31](g,c,b)|0)){a=0;c=5;break}if((a|0)>=(e|0)){a=1;c=5;break}}if((c|0)==5)return a|0;return 0}function ei(a,b){a=+a;b=b|0;var c=0,d=0,e=0;p[s>>3]=a;c=f[s>>2]|0;d=f[s+4>>2]|0;e=yl(c|0,d|0,52)|0;switch(e&2047){case 0:{if(a!=0.0){a=+ei(a*18446744073709551616.0,b);c=(f[b>>2]|0)+-64|0}else c=0;f[b>>2]=c;break}case 2047:break;default:{f[b>>2]=(e&2047)+-1022;f[s>>2]=c;f[s+4>>2]=d&-2146435073|1071644672;a=+p[s>>3]}}return +a}function fi(a){a=a|0;var b=0,c=0,d=0;f[a>>2]=3216;b=f[a+64>>2]|0;if(b|0){d=a+68|0;c=f[d>>2]|0;if((c|0)!=(b|0))f[d>>2]=c+(~((c+-4-b|0)>>>2)<<2);No(b)}f[a+12>>2]=3196;b=f[a+32>>2]|0;if(b|0)No(b);b=f[a+20>>2]|0;if(!b){No(a);return}No(b);No(a);return}function gi(a){a=a|0;var b=0,c=0,d=0;f[a>>2]=2180;b=f[a+76>>2]|0;if(b|0)No(b);d=a+68|0;b=f[d>>2]|0;f[d>>2]=0;if(b|0)Lo(b);f[a>>2]=1536;b=f[a+32>>2]|0;if(!b){No(a);return}d=a+36|0;c=f[d>>2]|0;if((c|0)!=(b|0))f[d>>2]=c+(~((c+-4-b|0)>>>2)<<2);No(b);No(a);return}function hi(a){a=a|0;var c=0;if(!a)return;c=a+28|0;if((b[c+11>>0]|0)<0)No(f[c>>2]|0);th(a+12|0,f[a+16>>2]|0);zh(a,f[a+4>>2]|0);No(a);return}function ii(a){a=a|0;if(!(f[a+44>>2]|0)){a=0;return a|0}if(!(f[a+48>>2]|0)){a=0;return a|0}if(!(f[a+24>>2]|0)){a=0;return a|0}if(!(f[a+28>>2]|0)){a=0;return a|0}if(!(f[a+32>>2]|0)){a=0;return a|0}if(!(f[a+36>>2]|0)){a=0;return a|0}a=(f[a+72>>2]|0)!=-1;return a|0}function ji(a,c){a=a|0;c=c|0;var d=0,e=0;d=0;while(1){if((h[18561+d>>0]|0)==(a|0)){e=2;break}d=d+1|0;if((d|0)==87){d=87;a=18649;e=5;break}}if((e|0)==2)if(!d)d=18649;else{a=18649;e=5}if((e|0)==5)while(1){do{e=a;a=a+1|0}while((b[e>>0]|0)!=0);d=d+-1|0;if(!d){d=a;break}else e=5}return ko(d,f[c+20>>2]|0)|0}function ki(a){a=a|0;var b=0,c=0,d=0;f[a>>2]=3124;b=f[a+64>>2]|0;if(b|0){d=a+68|0;c=f[d>>2]|0;if((c|0)!=(b|0))f[d>>2]=c+(~((c+-4-b|0)>>>2)<<2);No(b)}f[a+12>>2]=3148;b=f[a+32>>2]|0;if(b|0)No(b);b=f[a+20>>2]|0;if(!b)return;No(b);return}function li(a){a=a|0;var b=0,c=0,d=0;f[a>>2]=1816;b=f[a+76>>2]|0;if(b|0)No(b);d=a+68|0;b=f[d>>2]|0;f[d>>2]=0;if(b|0)Lo(b);f[a>>2]=1536;b=f[a+32>>2]|0;if(!b){No(a);return}d=a+36|0;c=f[d>>2]|0;if((c|0)!=(b|0))f[d>>2]=c+(~((c+-4-b|0)>>>2)<<2);No(b);No(a);return}function mi(a){a=a|0;if(!(f[a+64>>2]|0)){a=0;return a|0}if(!(f[a+68>>2]|0)){a=0;return a|0}if(!(f[a+44>>2]|0)){a=0;return a|0}if(!(f[a+48>>2]|0)){a=0;return a|0}if(!(f[a+52>>2]|0)){a=0;return a|0}if(!(f[a+56>>2]|0)){a=0;return a|0}a=(f[a+92>>2]|0)!=-1;return a|0}function ni(a){a=a|0;var b=0,c=0,d=0;f[a>>2]=3216;b=f[a+64>>2]|0;if(b|0){d=a+68|0;c=f[d>>2]|0;if((c|0)!=(b|0))f[d>>2]=c+(~((c+-4-b|0)>>>2)<<2);No(b)}f[a+12>>2]=3196;b=f[a+32>>2]|0;if(b|0)No(b);b=f[a+20>>2]|0;if(!b)return;No(b);return}function oi(a,b){a=a|0;b=b|0;var c=0,d=0,e=0;c=Rk(84)|0;d=c;e=d+84|0;do{f[d>>2]=0;d=d+4|0}while((d|0)<(e|0));e=De(c,b)|0;f[a>>2]=e?c:0;a=e?0:c;if(e)return;xg(a);No(a);return}function pi(a,b,c){a=a|0;b=b|0;c=c|0;switch(c<<24>>24){case 0:{c=Rk(20)|0;Ll(c);break}case 1:{c=Rk(24)|0;nm(c);break}case 2:{c=Rk(36)|0;Zk(c);break}case 3:{c=Rk(28)|0;dm(c);break}default:c=0}f[a>>2]=c;return}function qi(a,b,c,d){a=a|0;b=b|0;c=c|0;d=d|0;var e=0,f=0,g=0,h=0,i=0,j=0;j=b>>31|((b|0)<0?-1:0)<<1;i=((b|0)<0?-1:0)>>31|((b|0)<0?-1:0)<<1;f=d>>31|((d|0)<0?-1:0)<<1;e=((d|0)<0?-1:0)>>31|((d|0)<0?-1:0)<<1;h=jm(j^a|0,i^b|0,j|0,i|0)|0;g=I;a=f^j;b=e^i;return jm((vc(h,g,jm(f^c|0,e^d|0,f|0,e|0)|0,I,0)|0)^a|0,I^b|0,a|0,b|0)|0}function ri(a,c){a=a|0;c=c|0;var d=0,e=0;f[c>>2]=2;e=a+4|0;d=c+8|0;a=f[d>>2]|0;c=(f[c+12>>2]|0)-a|0;if(c>>>0<4294967292){Fi(d,c+4|0,0);a=f[d>>2]|0}c=a+c|0;e=h[e>>0]|h[e+1>>0]<<8|h[e+2>>0]<<16|h[e+3>>0]<<24;b[c>>0]=e;b[c+1>>0]=e>>8;b[c+2>>0]=e>>16;b[c+3>>0]=e>>24;return}function si(a){a=a|0;var b=0,c=0;f[a>>2]=2180;b=f[a+76>>2]|0;if(b|0)No(b);c=a+68|0;b=f[c>>2]|0;f[c>>2]=0;if(b|0)Lo(b);f[a>>2]=1536;c=f[a+32>>2]|0;if(!c)return;a=a+36|0;b=f[a>>2]|0;if((b|0)!=(c|0))f[a>>2]=b+(~((b+-4-c|0)>>>2)<<2);No(c);return}function ti(a,c,d){a=a|0;c=c|0;d=d|0;var e=0;if(c>>>0>0|(c|0)==0&a>>>0>4294967295)while(1){e=Gk(a|0,c|0,10,0)|0;d=d+-1|0;b[d>>0]=e&255|48;e=a;a=qn(a|0,c|0,10,0)|0;if(!(c>>>0>9|(c|0)==9&e>>>0>4294967295))break;else c=I}if(a)while(1){d=d+-1|0;b[d>>0]=(a>>>0)%10|0|48;if(a>>>0<10)break;else a=(a>>>0)/10|0}return d|0}function ui(a){a=a|0;var b=0,c=0,d=0;f[a>>2]=3580;b=f[a+96>>2]|0;if(b|0){d=a+100|0;c=f[d>>2]|0;if((c|0)!=(b|0))f[d>>2]=c+(~(((c+-12-b|0)>>>0)/12|0)*12|0);No(b)}b=f[a+84>>2]|0;if(!b){Ue(a);No(a);return}d=a+88|0;c=f[d>>2]|0;if((c|0)!=(b|0))f[d>>2]=c+(~((c+-4-b|0)>>>2)<<2);No(b);Ue(a);No(a);return}function vi(a,c,d,e){a=a|0;c=c|0;d=d|0;e=e|0;var g=0,h=0,i=0;g=c+16|0;a=f[g>>2]|0;h=c+36|0;i=c+24|0;do if(a){if((a|0)!=(d|0)){f[h>>2]=(f[h>>2]|0)+1;f[i>>2]=2;b[c+54>>0]=1;break}if((f[i>>2]|0)==2)f[i>>2]=e}else{f[g>>2]=d;f[i>>2]=e;f[h>>2]=1}while(0);return}function wi(a,b){a=a|0;b=b|0;var c=0,d=0,e=0,g=0;$b(a,b);if((b|0)<=-1)return;g=a+88|0;c=f[g>>2]|0;a=f[a+84>>2]|0;if((c-a>>2|0)<=(b|0))return;d=a+(b<<2)|0;a=d+4|0;b=c-a|0;e=b>>2;if(e){_j(d|0,a|0,b|0)|0;c=f[g>>2]|0}a=d+(e<<2)|0;if((c|0)==(a|0))return;f[g>>2]=c+(~((c+-4-a|0)>>>2)<<2);return}function xi(a){a=a|0;var b=0,c=0;f[a>>2]=1816;b=f[a+76>>2]|0;if(b|0)No(b);c=a+68|0;b=f[c>>2]|0;f[c>>2]=0;if(b|0)Lo(b);f[a>>2]=1536;c=f[a+32>>2]|0;if(!c)return;a=a+36|0;b=f[a>>2]|0;if((b|0)!=(c|0))f[a>>2]=b+(~((b+-4-c|0)>>>2)<<2);No(c);return}function yi(a,b,c,d,e,g){a=a|0;b=b|0;c=c|0;d=d|0;e=e|0;g=g|0;var h=0,i=0,j=0;f[a>>2]=b;j=b+16|0;h=f[j+4>>2]|0;i=a+8|0;f[i>>2]=f[j>>2];f[i+4>>2]=h;i=b+24|0;h=f[i+4>>2]|0;b=a+16|0;f[b>>2]=f[i>>2];f[b+4>>2]=h;b=a+40|0;f[b>>2]=c;f[b+4>>2]=d;a=a+48|0;f[a>>2]=e;f[a+4>>2]=g;return}function zi(a,b,c){a=a|0;b=b|0;c=c|0;if(((h[(f[a+4>>2]|0)+36>>0]|0)<<8&65535)<512?!(Na[f[(f[a>>2]|0)+52>>2]&127](a)|0):0){a=0;return a|0}a=qc(a,b,c)|0;return a|0}function Ai(a,b,c){a=a|0;b=b|0;c=c|0;var d=0;if((b|0)<=-1)ra(17073,17098,63,17175);d=f[a+96>>2]|0;if((((f[a+100>>2]|0)-d|0)/12|0|0)>(b|0)){a=d+(b*12|0)|0;ue(c,a,a+12|0);return 1}else ra(17180,17098,64,17175);return 0}function Bi(a,c,d){a=a|0;c=c|0;d=d|0;var e=0,g=0;e=u;u=u+16|0;g=e;Od(g,a,c,d);d=a+24|0;f[d>>2]=f[g>>2];c=g+4|0;Nj(a+28|0,c)|0;if((b[c+11>>0]|0)>=0){u=e;return d|0}No(f[c>>2]|0);u=e;return d|0}function Ci(a){a=a|0;var b=0,c=0,d=0;f[a>>2]=3580;b=f[a+96>>2]|0;if(b|0){d=a+100|0;c=f[d>>2]|0;if((c|0)!=(b|0))f[d>>2]=c+(~(((c+-12-b|0)>>>0)/12|0)*12|0);No(b)}b=f[a+84>>2]|0;if(!b){Ue(a);return}d=a+88|0;c=f[d>>2]|0;if((c|0)!=(b|0))f[d>>2]=c+(~((c+-4-b|0)>>>2)<<2);No(b);Ue(a);return}function Di(a,b,c){a=a|0;b=b|0;c=c|0;if(!(fl(a,b,c)|0)){c=0;return c|0}b=f[b+4>>2]|0;if((c|0)<=-1)ra(14612,17288,67,17379);a=f[b+8>>2]|0;if(((f[b+12>>2]|0)-a>>2|0)<=(c|0))ra(17234,17288,68,17379);c=(f[(f[a+(c<<2)>>2]|0)+28>>2]|0)==9;return c|0}function Ei(a,c,d){a=a|0;c=c|0;d=d|0;var e=0,g=0;e=u;u=u+16|0;g=e;Pd(g,a,c,d);d=a+24|0;f[d>>2]=f[g>>2];c=g+4|0;Nj(a+28|0,c)|0;if((b[c+11>>0]|0)>=0){u=e;return d|0}No(f[c>>2]|0);u=e;return d|0}function Fi(a,b,c){a=a|0;b=b|0;c=c|0;var d=0,e=0,g=0,h=0;e=a+4|0;d=f[e>>2]|0;c=f[a>>2]|0;g=d-c|0;if(b>>>0<=g>>>0){if(b>>>0>>0?(h=c+b|0,(d|0)!=(h|0)):0)f[e>>2]=h}else Dg(a,b-g|0);a=a+24|0;h=a;h=Hl(f[h>>2]|0,f[h+4>>2]|0,1,0)|0;f[a>>2]=h;f[a+4>>2]=I;return}function Gi(a){a=a|0;var b=0,c=0,d=0;f[a>>2]=2236;b=f[a+76>>2]|0;if(b|0)No(b);f[a>>2]=1536;b=f[a+32>>2]|0;if(!b){No(a);return}d=a+36|0;c=f[d>>2]|0;if((c|0)!=(b|0))f[d>>2]=c+(~((c+-4-b|0)>>>2)<<2);No(b);No(a);return}function Hi(a){a=a|0;var b=0,c=0,d=0,e=0,g=0,i=0;e=h[a+12>>0]|0;g=a+8|0;b=f[g>>2]|0;if(b>>>0<4096?(d=a+4|0,c=f[d>>2]|0,(c|0)>0):0){i=f[a>>2]|0;a=c+-1|0;f[d>>2]=a;b=h[i+a>>0]|0|b<<8;f[g>>2]=b}d=b&255;a=0-e&255;e=X(b>>>8,a)|0;i=d>>>0>>0;f[g>>2]=i?e+d|0:b-a-e|0;return i|0}function Ii(a){a=a|0;var b=0,c=0,d=0;f[a>>2]=1872;b=f[a+76>>2]|0;if(b|0)No(b);f[a>>2]=1536;b=f[a+32>>2]|0;if(!b){No(a);return}d=a+36|0;c=f[d>>2]|0;if((c|0)!=(b|0))f[d>>2]=c+(~((c+-4-b|0)>>>2)<<2);No(b);No(a);return}function Ji(a,b){a=a|0;b=b|0;var c=0,d=0;d=Rk(40)|0;f[d>>2]=-1;dl(d+8|0);Ta[f[(f[a>>2]|0)+16>>2]&7](a,d);c=b+88|0;b=f[c>>2]|0;f[c>>2]=d;if(!b)return 1;a=f[b+8>>2]|0;if(a|0){c=b+12|0;if((f[c>>2]|0)!=(a|0))f[c>>2]=a;No(a)}No(b);return 1}function Ki(a){a=a|0;var b=0,c=0,d=0;f[a>>2]=1256;b=f[a+16>>2]|0;if(b|0){d=a+20|0;c=f[d>>2]|0;if((c|0)!=(b|0))f[d>>2]=c+(~((c+-4-b|0)>>>2)<<2);No(b)}b=f[a+4>>2]|0;if(!b){No(a);return}d=a+8|0;c=f[d>>2]|0;if((c|0)!=(b|0))f[d>>2]=c+(~((c+-4-b|0)>>>2)<<2);No(b);No(a);return}function Li(a){a=a|0;var b=0,c=0,d=0;b=f[a+8>>2]|0;c=f[a+12>>2]|0;if((b|0)==(c|0)){c=1;return c|0}a=a+32|0;while(1){d=f[b>>2]|0;b=b+4|0;if(!(Oa[f[(f[d>>2]|0)+16>>2]&127](d,f[a>>2]|0)|0)){b=0;a=5;break}if((b|0)==(c|0)){b=1;a=5;break}}if((a|0)==5)return b|0;return 0}function Mi(a,b,c,d,e,g){a=a|0;b=b|0;c=c|0;d=d|0;e=e|0;g=g|0;if(jn(a,f[b+8>>2]|0,g)|0)nh(0,b,c,d,e);else{a=f[a+8>>2]|0;Xa[f[(f[a>>2]|0)+20>>2]&3](a,b,c,d,e,g)}return}function Ni(a){a=a|0;var c=0,d=0,e=0;if(!a)return;c=f[a>>2]|0;if(c|0){e=a+4|0;d=f[e>>2]|0;if((d|0)!=(c|0)){do{d=d+-12|0;f[e>>2]=d;if((b[d+11>>0]|0)<0){No(f[d>>2]|0);d=f[e>>2]|0}}while((d|0)!=(c|0));c=f[a>>2]|0}No(c)}No(a);return}function Oi(a){a=a|0;var b=0,c=0;f[a>>2]=2236;b=f[a+76>>2]|0;if(b|0)No(b);f[a>>2]=1536;c=f[a+32>>2]|0;if(!c)return;a=a+36|0;b=f[a>>2]|0;if((b|0)!=(c|0))f[a>>2]=b+(~((b+-4-c|0)>>>2)<<2);No(c);return}function Pi(a){a=a|0;var b=0,c=0,d=0;f[a>>2]=2292;So(a+108|0);f[a>>2]=1536;b=f[a+32>>2]|0;if(!b){No(a);return}d=a+36|0;c=f[d>>2]|0;if((c|0)!=(b|0))f[d>>2]=c+(~((c+-4-b|0)>>>2)<<2);No(b);No(a);return}function Qi(a){a=a|0;var b=0,c=0;f[a>>2]=2884;c=a+28|0;b=f[c>>2]|0;f[c>>2]=0;if(b|0)Lo(b);f[a>>2]=1476;c=a+20|0;b=f[c>>2]|0;f[c>>2]=0;if(!b){rh(a);No(a);return}Sa[f[(f[b>>2]|0)+4>>2]&127](b);rh(a);No(a);return}function Ri(a){a=a|0;var c=0;f[a>>2]=0;f[a+4>>2]=0;f[a+8>>2]=0;c=0;while(1){if((c|0)==3)break;f[a+(c<<2)>>2]=0;c=c+1|0}if((b[a+11>>0]|0)<0)c=(f[a+8>>2]&2147483647)+-1|0;else c=10;Hh(a,c,0);return}function Si(a,b){a=a|0;b=b|0;var c=0,d=0,e=0;c=f[a+12>>2]|0;a=f[a+8>>2]|0;e=a;if((c|0)==(a|0)){b=0;return b|0}d=c-a>>2;c=0;while(1){a=f[e+(c<<2)>>2]|0;if((f[a+60>>2]|0)==(b|0)){c=5;break}c=c+1|0;if(c>>>0>=d>>>0){a=0;c=5;break}}if((c|0)==5)return a|0;return 0}function Ti(a){a=a|0;var b=0,c=0;f[a>>2]=1872;b=f[a+76>>2]|0;if(b|0)No(b);f[a>>2]=1536;c=f[a+32>>2]|0;if(!c)return;a=a+36|0;b=f[a>>2]|0;if((b|0)!=(c|0))f[a>>2]=b+(~((b+-4-c|0)>>>2)<<2);No(c);return}function Ui(a){a=a|0;var b=0,c=0,d=0;f[a>>2]=1928;So(a+108|0);f[a>>2]=1536;b=f[a+32>>2]|0;if(!b){No(a);return}d=a+36|0;c=f[d>>2]|0;if((c|0)!=(b|0))f[d>>2]=c+(~((c+-4-b|0)>>>2)<<2);No(b);No(a);return}function Vi(a){a=a|0;var b=0,c=0,d=0;f[a>>2]=1256;b=f[a+16>>2]|0;if(b|0){d=a+20|0;c=f[d>>2]|0;if((c|0)!=(b|0))f[d>>2]=c+(~((c+-4-b|0)>>>2)<<2);No(b)}d=f[a+4>>2]|0;if(!d)return;c=a+8|0;b=f[c>>2]|0;if((b|0)!=(d|0))f[c>>2]=b+(~((b+-4-d|0)>>>2)<<2);No(d);return}function Wi(a,b,c,d,e){a=a|0;b=b|0;c=c|0;d=d|0;e=e|0;var f=0,g=0;g=u;u=u+256|0;f=g;if((c|0)>(d|0)&(e&73728|0)==0){e=c-d|0;kh(f|0,b|0,(e>>>0<256?e:256)|0)|0;if(e>>>0>255){b=c-d|0;do{Vm(a,f,256);e=e+-256|0}while(e>>>0>255);e=b&255}Vm(a,f,e)}u=g;return}function Xi(a,b){a=a|0;b=b|0;var c=0,d=0;c=f[a+12>>2]|0;a=f[a+8>>2]|0;d=a;if((c|0)==(a|0)){b=-1;return b|0}c=c-a>>2;a=0;while(1){if((f[(f[d+(a<<2)>>2]|0)+60>>2]|0)==(b|0)){c=5;break}a=a+1|0;if(a>>>0>=c>>>0){a=-1;c=5;break}}if((c|0)==5)return a|0;return 0}function Yi(a){a=a|0;var b=0,c=0;f[a>>2]=2884;c=a+28|0;b=f[c>>2]|0;f[c>>2]=0;if(b|0)Lo(b);f[a>>2]=1476;c=a+20|0;b=f[c>>2]|0;f[c>>2]=0;if(!b){rh(a);return}Sa[f[(f[b>>2]|0)+4>>2]&127](b);rh(a);return}function Zi(a,b,c){a=a|0;b=b|0;c=c|0;var d=0;f[a+4>>2]=b;b=f[b+4>>2]|0;if((c|0)<=-1)ra(14612,17288,67,17379);d=f[b+8>>2]|0;if(((f[b+12>>2]|0)-d>>2|0)>(c|0)){f[a+8>>2]=f[d+(c<<2)>>2];f[a+12>>2]=c;return 1}else ra(17234,17288,68,17379);return 0}function _i(a){a=a|0;var b=0,c=0;f[a>>2]=2292;So(a+108|0);f[a>>2]=1536;c=f[a+32>>2]|0;if(!c)return;b=a+36|0;a=f[b>>2]|0;if((a|0)!=(c|0))f[b>>2]=a+(~((a+-4-c|0)>>>2)<<2);No(c);return}function $i(a,b){a=a|0;b=b|0;var c=0;if((b|0)<0){a=0;return a|0}c=f[a+4>>2]|0;if(((f[c+12>>2]|0)-(f[c+8>>2]|0)>>2|0)<=(b|0)){c=0;return c|0}c=f[(f[a+8>>2]|0)+(f[(f[a+20>>2]|0)+(b<<2)>>2]<<2)>>2]|0;c=Oa[f[(f[c>>2]|0)+32>>2]&127](c,b)|0;return c|0}function aj(a){a=a|0;var b=0,c=0,d=0,e=0,g=0;c=f[a>>2]|0;d=a+4|0;g=f[d>>2]|0;e=c;b=g+(~((g+-4-e|0)>>>2)<<2)|0;if((g|0)==(c|0))b=c;else f[d>>2]=b;f[a+16>>2]=0;f[a+12>>2]=b;if(!c)return;if((b|0)!=(c|0))f[d>>2]=b+(~((b+-4-e|0)>>>2)<<2);No(c);return}function bj(a,b,c,d){a=a|0;b=b|0;c=c|0;d=d|0;if(jn(a,f[b+8>>2]|0,0)|0)vi(0,b,c,d);else{a=f[a+8>>2]|0;Va[f[(f[a>>2]|0)+28>>2]&7](a,b,c,d)}return}function cj(a,b){a=a|0;b=b|0;var c=0,d=0;c=u;u=u+16|0;d=c;Ri(d);Lg(a,d,b);rm(d);u=c;return}function dj(a){a=a|0;var b=0,c=0;f[a>>2]=1928;So(a+108|0);f[a>>2]=1536;c=f[a+32>>2]|0;if(!c)return;b=a+36|0;a=f[b>>2]|0;if((a|0)!=(c|0))f[b>>2]=a+(~((a+-4-c|0)>>>2)<<2);No(c);return}function ej(a,b){a=a|0;b=b|0;var c=0;c=f[a+4>>2]|0;if(c|0?((h[c+36>>0]|0)<<8&65535)<512:0){c=1;return c|0}c=Oa[f[(f[a>>2]|0)+48>>2]&127](a,(f[b+4>>2]|0)-(f[b>>2]|0)>>2)|0;return c|0}function fj(a,b,c){a=a|0;b=b|0;c=c|0;var d=0,e=0,g=0;e=u;u=u+32|0;g=e;d=e+20|0;f[g>>2]=f[a+60>>2];f[g+4>>2]=0;f[g+8>>2]=b;f[g+12>>2]=d;f[g+16>>2]=c;if((ym(Aa(140,g|0)|0)|0)<0){f[d>>2]=-1;a=-1}else a=f[d>>2]|0;u=e;return a|0}function gj(a,b){a=a|0;b=b|0;var c=0;if((b|0)==-1|(b|0)>4){a=0;return a|0}c=f[a+20+(b*12|0)>>2]|0;if(((f[a+20+(b*12|0)+4>>2]|0)-c|0)<=0){a=0;return a|0}c=f[c>>2]|0;if((c|0)==-1){a=0;return a|0}a=f[(f[a+8>>2]|0)+(c<<2)>>2]|0;return a|0}function hj(a,b){a=a|0;b=b|0;var c=0;wk(a);f[a>>2]=1416;c=a+36|0;f[c>>2]=0;f[c+4>>2]=0;f[c+8>>2]=0;f[c+12>>2]=0;f[c+16>>2]=0;f[c+20>>2]=0;c=f[b>>2]|0;f[b>>2]=0;f[a+60>>2]=c;return}function ij(a,c,d){a=a|0;c=c|0;d=d|0;var e=0,f=0;a:do if(!d)a=0;else{while(1){e=b[a>>0]|0;f=b[c>>0]|0;if(e<<24>>24!=f<<24>>24)break;d=d+-1|0;if(!d){a=0;break a}else{a=a+1|0;c=c+1|0}}a=(e&255)-(f&255)|0}while(0);return a|0}function jj(a,b,c){a=a|0;b=b|0;c=c|0;if(!(wh(f[a+8>>2]|0,(f[b+4>>2]|0)-(f[b>>2]|0)>>2)|0)){a=0;return a|0}a=Pa[f[(f[a>>2]|0)+32>>2]&31](a,b,c)|0;return a|0}function kj(a,b){a=a|0;b=b|0;var c=0;c=f[a+16>>2]|0;if(((f[a+20>>2]|0)-c>>2|0)<=(b|0)){a=0;return a|0}c=f[c+(b<<2)>>2]|0;if((c|0)<0){a=0;return a|0}a=nf(f[(f[a+36>>2]|0)+(c<<2)>>2]|0)|0;return a|0}function lj(a){a=a|0;if(!(f[a+60>>2]|0))return 0;if(!(f[a+44>>2]|0))return 0;if(!(f[a+48>>2]|0))return 0;if(!(f[a+52>>2]|0))return 0;else return (f[a+56>>2]|0)!=0|0;return 0}function mj(a){a=a|0;var c=0,d=0;c=a+74|0;d=b[c>>0]|0;b[c>>0]=d+255|d;c=f[a>>2]|0;if(!(c&8)){f[a+8>>2]=0;f[a+4>>2]=0;c=f[a+44>>2]|0;f[a+28>>2]=c;f[a+20>>2]=c;f[a+16>>2]=c+(f[a+48>>2]|0);c=0}else{f[a>>2]=c|32;c=-1}return c|0}function nj(a,c){a=a|0;c=c|0;var d=0,e=0;e=a;d=e+64|0;do{f[e>>2]=f[c>>2];e=e+4|0;c=c+4|0}while((e|0)<(d|0));e=a+64|0;f[a+88>>2]=0;f[e>>2]=0;f[e+4>>2]=0;f[e+8>>2]=0;f[e+12>>2]=0;f[e+16>>2]=0;b[e+20>>0]=0;return}function oj(a,c,d){a=a|0;c=c|0;d=d|0;var e=0,g=0;g=u;u=u+32|0;e=g;f[a+36>>2]=15;if((f[a>>2]&64|0)==0?(f[e>>2]=f[a+60>>2],f[e+4>>2]=21523,f[e+8>>2]=g+16,Ca(54,e|0)|0):0)b[a+75>>0]=-1;e=jf(a,c,d)|0;u=g;return e|0}function pj(a){a=a|0;if(!(f[a+44>>2]|0)){a=0;return a|0}if(!(f[a+48>>2]|0)){a=0;return a|0}if(!(f[a+52>>2]|0)){a=0;return a|0}a=(f[a+56>>2]|0)!=0;return a|0}function qj(a,b,c){a=a|0;b=b|0;c=c|0;if((b|0)!=0&(c|0)!=0){Xb(a,b,c);return}else{kc(a,0,0);return}}function rj(a,b,c,d,e){a=a|0;b=b|0;c=c|0;d=d|0;e=$(e);f[a+4>>2]=b;se(a+8|0,c,c+(d<<2)|0);n[a+20>>2]=e;return}function sj(a){a=a|0;var b=0,c=0;c=a+15&-16|0;b=f[r>>2]|0;a=b+c|0;if((c|0)>0&(a|0)<(b|0)|(a|0)<0){ea()|0;za(12);return -1}f[r>>2]=a;if((a|0)>(da()|0)?(ca()|0)==0:0){f[r>>2]=b;za(12);return -1}return b|0}function tj(a,b,c,d){a=a|0;b=b|0;c=c|0;d=d|0;var e=0,g=0;c=f[c>>2]|0;e=a;d=b-a>>2;while(1){if(!d)break;b=(d|0)/2|0;g=e+(b<<2)|0;a=(f[g>>2]|0)>>>0>>0;e=a?g+4|0:e;d=a?d+-1-b|0:b}return e|0}function uj(a,b){a=a|0;b=b|0;b=f[b+88>>2]|0;if(!b){a=0;return a|0}if((f[b>>2]|0)!=2){a=0;return a|0}b=f[b+8>>2]|0;f[a+4>>2]=h[b>>0]|h[b+1>>0]<<8|h[b+2>>0]<<16|h[b+3>>0]<<24;a=1;return a|0}function vj(a,b,c,d){a=a|0;b=b|0;c=c|0;d=d|0;var e=0,g=0;e=X(c,b)|0;c=(b|0)==0?0:c;if((f[d+76>>2]|0)>-1){g=(To(d)|0)==0;a=tg(a,e,d)|0;if(!g)So(d)}else a=tg(a,e,d)|0;if((a|0)!=(e|0))c=(a>>>0)/(b>>>0)|0;return c|0}function wj(a){a=a|0;var c=0;f[a>>2]=0;c=a+8|0;f[c>>2]=0;f[c+4>>2]=0;f[c+8>>2]=0;f[c+12>>2]=0;b[a+24>>0]=1;f[a+28>>2]=9;c=a+40|0;f[c>>2]=0;f[c+4>>2]=0;f[c+8>>2]=0;f[c+12>>2]=0;f[a+56>>2]=-1;f[a+60>>2]=0;return}function xj(a,c){a=a|0;c=c|0;var d=0,e=0;d=u;u=u+32|0;e=d;Qg(e,c);a=f[e+16>>2]|0;c=e+4|0;if((b[c+11>>0]|0)>=0){u=d;return a|0}No(f[c>>2]|0);u=d;return a|0}function yj(a,b){a=a|0;b=b|0;if(!(Oa[f[(f[a>>2]|0)+36>>2]&127](a,b)|0)){a=0;return a|0}if(!(Oa[f[(f[a>>2]|0)+40>>2]&127](a,b)|0)){a=0;return a|0}a=Na[f[(f[a>>2]|0)+44>>2]&127](a)|0;return a|0}function zj(a,c,d){a=a|0;c=c|0;d=d|0;if(!(fl(a,c,d)|0)){a=0;return a|0}d=f[a+8>>2]|0;if((b[d+24>>0]|0)!=3){a=0;return a|0}a=(f[d+28>>2]|0)==9;return a|0}function Aj(a,c){a=a|0;c=c|0;if(f[c+56>>2]|0){a=0;return a|0}if((b[c+24>>0]|0)!=3){a=0;return a|0}f[a+44>>2]=c;a=1;return a|0}function Bj(a,c){a=a|0;c=c|0;var d=0,e=0;d=b[a>>0]|0;e=b[c>>0]|0;if(!(d<<24>>24==0?1:d<<24>>24!=e<<24>>24))do{a=a+1|0;c=c+1|0;d=b[a>>0]|0;e=b[c>>0]|0}while(!(d<<24>>24==0?1:d<<24>>24!=e<<24>>24));return (d&255)-(e&255)|0}function Cj(a,b,c,d,e,g){a=a|0;b=b|0;c=c|0;d=d|0;e=e|0;g=g|0;if(jn(a,f[b+8>>2]|0,g)|0)nh(0,b,c,d,e);return}function Dj(a,c){a=a|0;c=c|0;var d=0,e=0;d=b[a+11>>0]|0;e=d<<24>>24<0;if(e)d=f[a+4>>2]|0;else d=d&255;if(d>>>0<=c>>>0)co(a);if(e)a=f[a>>2]|0;return a+c|0}function Ej(a){a=a|0;var b=0,c=0;f[a>>2]=1476;c=a+20|0;b=f[c>>2]|0;f[c>>2]=0;if(!b){rh(a);No(a);return}Sa[f[(f[b>>2]|0)+4>>2]&127](b);rh(a);No(a);return}function Fj(a){a=a|0;var b=0,c=0,d=0;f[a>>2]=1536;b=f[a+32>>2]|0;if(!b){No(a);return}d=a+36|0;c=f[d>>2]|0;if((c|0)!=(b|0))f[d>>2]=c+(~((c+-4-b|0)>>>2)<<2);No(b);No(a);return}function Gj(a,c){a=a|0;c=c|0;if(f[c+56>>2]|0){a=0;return a|0}if((b[c+24>>0]|0)!=3){a=0;return a|0}f[a+64>>2]=c;a=1;return a|0}function Hj(a){a=a|0;var c=0,d=0,e=0;c=u;u=u+16|0;d=c;e=f[a+4>>2]|0;e=(f[e+56>>2]|0)-(f[e+52>>2]|0)>>2;b[d>>0]=0;pf(a+20|0,e,d);u=c;return}function Ij(a,c){a=a|0;c=c|0;if(((c|0)!=0?(f[c+56>>2]|0)==0:0)?(b[c+24>>0]|0)==3:0){f[a+60>>2]=c;c=1}else c=0;return c|0}function Jj(){var a=0,b=0;a=Rk(40)|0;f[a>>2]=0;f[a+4>>2]=0;f[a+8>>2]=0;f[a+12>>2]=0;n[a+16>>2]=$(1.0);b=a+20|0;f[b>>2]=0;f[b+4>>2]=0;f[b+8>>2]=0;f[b+12>>2]=0;n[a+36>>2]=$(1.0);return a|0}function Kj(a){a=a|0;var c=0,d=0,e=0;c=u;u=u+16|0;d=c;e=f[a+4>>2]|0;e=(f[e+28>>2]|0)-(f[e+24>>2]|0)>>2;b[d>>0]=0;pf(a+20|0,e,d);u=c;return}function Lj(a){a=a|0;switch(a|0){case 11:case 2:case 1:{a=1;break}case 4:case 3:{a=2;break}case 6:case 5:{a=4;break}case 8:case 7:{a=8;break}case 9:{a=4;break}case 10:{a=8;break}default:a=-1}return a|0}function Mj(a){a=a|0;f[a>>2]=3172;Jg(a+8|0);No(a);return}function Nj(a,c){a=a|0;c=c|0;var d=0,e=0;if((a|0)!=(c|0)){d=b[c+11>>0]|0;e=d<<24>>24<0;dh(a,e?f[c>>2]|0:c,e?f[c+4>>2]|0:d&255)|0}return a|0}function Oj(a,b){a=a|0;b=b|0;var c=0,d=0,e=0,f=0;f=a&65535;e=b&65535;c=X(e,f)|0;d=a>>>16;a=(c>>>16)+(X(e,d)|0)|0;e=b>>>16;b=X(e,f)|0;return (I=(a>>>16)+(X(e,d)|0)+(((a&65535)+b|0)>>>16)|0,a+b<<16|c&65535|0)|0}function Pj(a){a=a|0;var c=0,d=0;b[a+36>>0]=0;d=Hl(f[a+32>>2]|0,0,7,0)|0;d=yl(d|0,I|0,3)|0;a=a+16|0;c=a;c=Hl(d|0,I|0,f[c>>2]|0,f[c+4>>2]|0)|0;f[a>>2]=c;f[a+4>>2]=I;return}function Qj(a){a=a|0;var b=0,c=0;f[a>>2]=1476;c=a+20|0;b=f[c>>2]|0;f[c>>2]=0;if(!b){rh(a);return}Sa[f[(f[b>>2]|0)+4>>2]&127](b);rh(a);return}function Rj(a,b,c,d,e,f){a=a|0;b=b|0;c=c|0;d=d|0;e=e|0;f=f|0;ra(6100,6106,76,6253);return 0}function Sj(a,b){a=a|0;b=b|0;var c=0,d=0;d=_h(b)|0;c=Rk(d+13|0)|0;f[c>>2]=d;f[c+4>>2]=d;f[c+8>>2]=0;c=Hn(c)|0;ef(c|0,b|0,d+1|0)|0;f[a>>2]=c;return}function Tj(a){a=a|0;f[a>>2]=3172;Jg(a+8|0);return}function Uj(a,b,c,d,e){a=a|0;b=b|0;c=c|0;d=d|0;e=e|0;f[b+44>>2]=e;lc(a,b,c,d,e);return}function Vj(a,b){a=a|0;b=b|0;var c=0;if((b|0)==-1|(b|0)>4){b=-1;return b|0}c=f[a+20+(b*12|0)>>2]|0;if(((f[a+20+(b*12|0)+4>>2]|0)-c|0)<=0){b=-1;return b|0}b=f[c>>2]|0;return b|0}function Wj(a){a=a|0;var b=0,c=0;f[a>>2]=1536;c=f[a+32>>2]|0;if(!c)return;b=a+36|0;a=f[b>>2]|0;if((a|0)!=(c|0))f[b>>2]=a+(~((a+-4-c|0)>>>2)<<2);No(c);return}function Xj(a,b,c,d){a=a|0;b=b|0;c=c|0;d=d|0;if(jn(a,f[b+8>>2]|0,0)|0)vi(0,b,c,d);return}function Yj(a){a=a|0;var c=0;f[a>>2]=0;f[a+4>>2]=0;f[a+8>>2]=0;f[a+12>>2]=0;f[a+16>>2]=0;f[a+20>>2]=0;b[a+24>>0]=1;a=a+28|0;c=a+40|0;do{f[a>>2]=0;a=a+4|0}while((a|0)<(c|0));return}function Zj(a){a=a|0;var b=0;f[a>>2]=3440;b=a+4|0;f[a+40>>2]=0;f[b>>2]=0;f[b+4>>2]=0;f[b+8>>2]=0;f[b+12>>2]=0;f[b+16>>2]=0;f[b+20>>2]=0;f[b+24>>2]=0;f[b+28>>2]=0;d[b+32>>1]=0;return}function _j(a,c,d){a=a|0;c=c|0;d=d|0;var e=0;if((c|0)<(a|0)&(a|0)<(c+d|0)){e=a;c=c+d|0;a=a+d|0;while((d|0)>0){a=a-1|0;c=c-1|0;d=d-1|0;b[a>>0]=b[c>>0]|0}a=e}else ef(a,c,d)|0;return a|0}function $j(a){a=a|0;var c=0,d=0,e=0;c=f[a>>2]|0;d=(b[c>>0]|0)+-48|0;if(d>>>0<10){e=c;c=0;do{c=d+(c*10|0)|0;e=e+1|0;f[a>>2]=e;d=(b[e>>0]|0)+-48|0}while(d>>>0<10)}else c=0;return c|0}function ak(a){a=a|0;var b=0,c=0,d=0;f[a>>2]=1228;b=f[a+8>>2]|0;if(!b){No(a);return}d=a+12|0;c=f[d>>2]|0;if((c|0)!=(b|0))f[d>>2]=c+(~((c+-4-b|0)>>>2)<<2);No(b);No(a);return}function bk(a,b){a=a|0;b=b|0;var c=0;if((b|0)<=-1)ra(14612,17288,59,17379);c=f[a+8>>2]|0;if(((f[a+12>>2]|0)-c>>2|0)>(b|0))return f[c+(b<<2)>>2]|0;else ra(17234,17288,60,17379);return 0}function ck(a,b,c){a=a|0;b=b|0;c=c|0;var d=0,e=0;if((b|0)>0)d=0;else return;do{e=f[a+(d<<2)>>2]|0;f[c+(d<<2)>>2]=e<<31>>31^e>>>1;d=d+1|0}while((d|0)!=(b|0));return}function dk(a,c,d,e){a=a|0;c=c|0;d=d|0;e=e|0;if(!((a|0)==0&(c|0)==0))do{d=d+-1|0;b[d>>0]=h[18543+(a&15)>>0]|0|e;a=yl(a|0,c|0,4)|0;c=I}while(!((a|0)==0&(c|0)==0));return d|0}function ek(a,b,c){a=a|0;b=b|0;c=c|0;var d=0,e=0;e=u;u=u+16|0;d=e;f[d>>2]=f[c>>2];a=Pa[f[(f[a>>2]|0)+16>>2]&31](a,b,d)|0;if(a)f[c>>2]=f[d>>2];u=e;return a&1|0}function fk(){var a=0,b=0;b=Ok()|0;if((b|0?(a=f[b>>2]|0,a|0):0)?(b=a+48|0,(f[b>>2]&-256|0)==1126902528?(f[b+4>>2]|0)==1129074247:0):0)Dm(f[a+12>>2]|0);Dm(Sn()|0)}function gk(a){a=a|0;var c=0;c=b[w+(a&255)>>0]|0;if((c|0)<8)return c|0;c=b[w+(a>>8&255)>>0]|0;if((c|0)<8)return c+8|0;c=b[w+(a>>16&255)>>0]|0;if((c|0)<8)return c+16|0;return (b[w+(a>>>24)>>0]|0)+24|0}function hk(a){a=a|0;var b=0,c=0,d=0;if(!a)return;b=f[a>>2]|0;if(b|0){d=a+4|0;c=f[d>>2]|0;if((c|0)!=(b|0))f[d>>2]=c+(~((c+-4-b|0)>>>2)<<2);No(b)}No(a);return}function ik(a){a=a|0;var b=0,c=0;if(ro(a)|0?(b=Nn(f[a>>2]|0)|0,c=b+8|0,a=f[c>>2]|0,f[c>>2]=a+-1,(a+-1|0)<0):0)No(b);return}function jk(a,c){a=a|0;c=c|0;var d=0;b[c+84>>0]=1;d=f[c+68>>2]|0;c=c+72|0;a=f[c>>2]|0;if((a|0)==(d|0))return 1;f[c>>2]=a+(~((a+-4-d|0)>>>2)<<2);return 1}function kk(a,b){a=a|0;b=b|0;if(b>>>0>=2){a=0;return a|0}f[a+28>>2]=b;a=1;return a|0}function lk(a){a=a|0;var c=0;f[a>>2]=0;c=a+8|0;d[a+38>>1]=0;f[c>>2]=0;f[c+4>>2]=0;f[c+8>>2]=0;f[c+12>>2]=0;f[c+16>>2]=0;f[c+20>>2]=0;f[c+24>>2]=0;b[c+28>>0]=0;return}function mk(a){a=a|0;var b=0,c=0;f[a>>2]=1228;c=f[a+8>>2]|0;if(!c)return;b=a+12|0;a=f[b>>2]|0;if((a|0)!=(c|0))f[b>>2]=a+(~((a+-4-c|0)>>>2)<<2);No(c);return}function nk(a,b){a=a|0;b=b|0;return fg(a+8|0,b)|0}function ok(a,b,c){a=a|0;b=b|0;c=c|0;Ib(a,b,c);return}function pk(a){a=a|0;lk(a);lk(a+40|0);lo(a+80|0);lk(a+96|0);f[a+136>>2]=0;f[a+140>>2]=0;f[a+144>>2]=0;return}function qk(a,b){a=a|0;b=b|0;if(!b)return 0;else ra(11736,6560,61,11747);return 0}function rk(a,b,c,d){a=a|0;b=b|0;c=c|0;d=d|0;var e=0;if((f[b+4>>2]|0)==(c|0)?(e=b+28|0,(f[e>>2]|0)!=1):0)f[e>>2]=d;return}function sk(a,b){a=a|0;b=b|0;if(!b)return 0;else ra(11736,11337,65,11747);return 0}function tk(a){a=a|0;var b=0;f[a>>2]=3148;b=f[a+20>>2]|0;if(b|0)No(b);b=f[a+8>>2]|0;if(!b){No(a);return}No(b);No(a);return}function uk(a,c,d){a=a|0;c=c|0;d=d|0;if(!((a|0)==0&(c|0)==0))do{d=d+-1|0;b[d>>0]=a&7|48;a=yl(a|0,c|0,3)|0;c=I}while(!((a|0)==0&(c|0)==0));return d|0}function vk(){var a=0,b=0;a=Rk(24)|0;f[a>>2]=1228;f[a+4>>2]=-1;b=a+8|0;f[b>>2]=0;f[b+4>>2]=0;f[b+8>>2]=0;f[b+12>>2]=0;return a|0}function wk(a){a=a|0;f[a>>2]=1256;a=a+4|0;f[a>>2]=0;f[a+4>>2]=0;f[a+8>>2]=0;f[a+12>>2]=0;f[a+16>>2]=0;f[a+20>>2]=0;f[a+24>>2]=0;f[a+28>>2]=0;return}function xk(a,b,c){a=a|0;b=b|0;c=c|0;var d=0,e=0;d=a+20|0;e=f[d>>2]|0;a=(f[a+16>>2]|0)-e|0;a=a>>>0>c>>>0?c:a;ef(e|0,b|0,a|0)|0;f[d>>2]=(f[d>>2]|0)+a;return c|0}function yk(a,b){a=a|0;b=b|0;return Rf(a+8|0,b)|0}function zk(a,b){a=a|0;b=b|0;if(!b)return 0;else ra(11736,6874,70,11747);return 0}function Ak(a){a=a|0;var c=0;wj(a);c=a+64|0;f[a+88>>2]=0;f[c>>2]=0;f[c+4>>2]=0;f[c+8>>2]=0;f[c+12>>2]=0;f[c+16>>2]=0;b[c+20>>0]=0;return}function Bk(a){a=a|0;var b=0,c=0;if(!a)return;b=f[a+8>>2]|0;if(b|0){c=a+12|0;if((f[c>>2]|0)!=(b|0))f[c>>2]=b;No(b)}No(a);return}function Ck(a){a=a|0;var b=0;f[a>>2]=3196;b=f[a+20>>2]|0;if(b|0)No(b);b=f[a+8>>2]|0;if(!b){No(a);return}No(b);No(a);return}function Dk(a,b,c,e){a=a|0;b=b|0;c=c|0;e=e|0;f[a>>2]=b;b=a+8|0;f[b>>2]=c;f[b+4>>2]=0;d[a+38>>1]=e;e=a+16|0;f[e>>2]=0;f[e+4>>2]=0;return}function Ek(a,b,c){a=a|0;b=$(b);c=c|0;var d=La;if((c|0)<1){a=0;return a|0}d=$($(1.0)/$(c|0));n[a+4>>2]=d;n[a>>2]=b;a=1;return a|0}function Fk(a,b,c){a=a|0;b=b|0;c=c|0;return ge(a,b,c)|0}function Gk(a,b,c,d){a=a|0;b=b|0;c=c|0;d=d|0;var e=0,g=0;g=u;u=u+16|0;e=g|0;vc(a,b,c,d,e)|0;u=g;return (I=f[e+4>>2]|0,f[e>>2]|0)|0}function Hk(a){a=a|0;f[a>>2]=2492;So(a+88|0);No(a);return}function Ik(a){a=a|0;var b=0;f[a>>2]=3148;b=f[a+20>>2]|0;if(b|0)No(b);b=f[a+8>>2]|0;if(!b)return;No(b);return}function Jk(a){a=a|0;rn(a);f[a+16>>2]=0;f[a+20>>2]=0;f[a+12>>2]=a+16;a=a+24|0;f[a>>2]=0;f[a+4>>2]=0;f[a+8>>2]=0;f[a+12>>2]=0;return}function Kk(a){a=a|0;Cl(a);f[a>>2]=3580;a=a+84|0;f[a>>2]=0;f[a+4>>2]=0;f[a+8>>2]=0;f[a+12>>2]=0;f[a+16>>2]=0;f[a+20>>2]=0;return}function Lk(a){a=a|0;f[a>>2]=2576;So(a+88|0);No(a);return}function Mk(a){a=a|0;f[a>>2]=2716;So(a+88|0);No(a);return}function Nk(a){a=a|0;f[a>>2]=2492;So(a+88|0);return}function Ok(){var a=0,b=0;a=u;u=u+16|0;if(!(Ia(21592,3)|0)){b=Ga(f[5399]|0)|0;u=a;return b|0}else wl(20731,a);return 0}function Pk(a){a=a|0;var b=0;f[a>>2]=3196;b=f[a+20>>2]|0;if(b|0)No(b);b=f[a+8>>2]|0;if(!b)return;No(b);return}function Qk(a,b,c,d){a=a|0;b=b|0;c=c|0;d=d|0;var e=0,f=0;e=a;f=c;c=Oj(e,f)|0;a=I;return (I=(X(b,f)|0)+(X(d,e)|0)+a|a&0,c|0|0)|0}function Rk(a){a=a|0;var b=0;b=(a|0)==0?1:a;while(1){a=$a(b)|0;if(a|0)break;a=Pn()|0;if(!a){a=0;break}Ra[a&3]()}return a|0}function Sk(a){a=a|0;var b=0,c=0;b=u;u=u+16|0;c=b;a=Qo(f[a+60>>2]|0)|0;f[c>>2]=a;a=ym(Da(6,c|0)|0)|0;u=b;return a|0}function Tk(a,b,c,d){a=a|0;b=b|0;c=c|0;d=d|0;return Nd(b,c,d)|0}function Uk(a){a=a|0;f[a>>2]=2800;So(a+88|0);No(a);return}function Vk(a){a=a|0;var b=0;b=u;u=u+16|0;Qb(a);if(!(Ja(f[5399]|0,0)|0)){u=b;return}else wl(20830,b)}function Wk(a){a=a|0;f[a>>2]=2576;So(a+88|0);return}function Xk(a){a=a|0;f[a>>2]=2716;So(a+88|0);return}function Yk(a,b,c,d){a=a|0;b=b|0;c=c|0;d=d|0;return ge(b,c,d)|0} +function Ya(a,c){a=a|0;c=c|0;var d=0,e=0,g=0,i=0,k=0,l=0,m=0,o=0,p=0,q=0,r=0,s=0,t=0,v=0,w=0,x=0,y=0,z=0,A=0,B=0,C=0,D=0,E=0,F=0,G=0,H=0,I=0,J=0,K=0,L=0,M=0,N=0,O=0,P=0,Q=0,R=0,S=0,T=0,U=0,V=0,W=0,X=0,Y=0,Z=0,_=0,aa=0,ba=0,ca=0,da=0,ea=0,fa=0,ga=0,ha=0,ia=0,ja=0,ka=0,la=0,ma=0;ma=u;u=u+80|0;da=ma+56|0;ia=ma+40|0;ja=ma+16|0;fa=ma+4|0;N=ma+36|0;Z=ma;f[ia>>2]=0;la=ia+4|0;f[la>>2]=0;f[ia+8>>2]=0;f[ja>>2]=0;f[ja+4>>2]=0;f[ja+8>>2]=0;f[ja+12>>2]=0;n[ja+16>>2]=$(1.0);f[fa>>2]=0;ha=fa+4|0;f[ha>>2]=0;f[fa+8>>2]=0;O=(f[a+212>>2]|0)==(f[a+216>>2]|0);ea=a+120|0;Y=f[a+124>>2]|0;a:do if((c|0)>0){X=a+224|0;Q=a+412|0;A=a+300|0;P=a+408|0;B=a+296|0;C=a+288|0;D=a+292|0;H=a+8|0;G=ja+4|0;E=a+380|0;J=fa+8|0;K=ia+8|0;W=a+36|0;F=a+40|0;V=c+-1|0;R=a+392|0;z=0;b:while(1){i=z+1|0;if((f[Q>>2]|0)!=-1?Hi(R)|0:0){d=f[Q>>2]|0;f[P>>2]=d;if(!d)I=17;else I=43}else I=6;c:do if((I|0)==6){do if(!(b[A>>0]|0))d=1;else{g=f[B>>2]|0;l=f[C>>2]|0;m=f[D>>2]|0;d=l+(g>>>3)|0;if(d>>>0>>0?(I=h[d>>0]|0,M=g+1|0,f[B>>2]=M,I&1<<(g&7)|0):0){d=l+(M>>>3)|0;if(d>>>0>>0){k=(h[d>>0]|0)>>>(M&7)&1;g=g+2|0;f[B>>2]=g}else{g=M;k=0}d=l+(g>>>3)|0;if(d>>>0>>0){d=(h[d>>0]|0)>>>(g&7);f[B>>2]=g+1;d=d<<1&2}else d=0;d=(d|k)<<1|1;break}f[P>>2]=0;I=17;break c}while(0);f[P>>2]=d;I=43}while(0);d:do if((I|0)==17){d=f[la>>2]|0;if((f[ia>>2]|0)==(d|0)){d=-1;I=257;break a}y=d+-4|0;w=f[y>>2]|0;x=f[H>>2]|0;v=(w|0)<0;g=w+1|0;if(!v?(T=((g|0)%3|0|0)==0?w+-2|0:g,(T|0)>=0):0){g=f[x>>2]|0;if((T|0)>=((f[x+4>>2]|0)-g>>2|0)){I=21;break b}t=f[g+(T<<2)>>2]|0}else t=-1073741824;r=f[x+24>>2]|0;k=f[r+(t<<2)>>2]|0;g=k+1|0;s=r;if((k|0)>=0)k=((g|0)%3|0|0)==0?k+-2|0:g;q=z*3|0;m=q+1|0;if((f[x+64>>2]|0)!=(f[x+60>>2]|0)){I=26;break b}if((f[x+76>>2]|0)!=(f[x+72>>2]|0)){I=28;break b}o=f[x+12>>2]|0;f[o+(w<<2)>>2]=m;f[o+(m<<2)>>2]=w;p=q+2|0;f[o+(k<<2)>>2]=p;f[o+(p<<2)>>2]=k;o=f[x>>2]|0;f[o+(q<<2)>>2]=t;g=k+1|0;l=o;if((k|0)>=0?(U=((g|0)%3|0|0)==0?k+-2|0:g,(U|0)>=0):0){if((U|0)>=((f[x+4>>2]|0)-l>>2|0)){I=32;break b}g=f[o+(U<<2)>>2]|0}else g=-1073741824;f[o+(m<<2)>>2]=g;if(!v?(S=(((w>>>0)%3|0|0)==0?2:-1)+w|0,(S|0)>=0):0){if((S|0)>=((f[x+4>>2]|0)-l>>2|0)){I=37;break b}g=f[o+(S<<2)>>2]|0;f[o+(p<<2)>>2]=g;if((g|0)!=-1073741824)f[r+(g<<2)>>2]=p}else f[o+(p<<2)>>2]=-1073741824;if(((f[x+28>>2]|0)-s>>2|0)>(Y|0)){d=-1;I=257;break a}I=(f[ea>>2]|0)+(t>>>5<<2)|0;f[I>>2]=f[I>>2]&~(1<<(t&31));f[y>>2]=q;I=170}else if((I|0)==43){I=0;g=(d|0)==5;switch(d|0){case 3:case 5:{d=f[la>>2]|0;if((f[ia>>2]|0)==(d|0)){d=-1;I=257;break a}o=f[d+-4>>2]|0;r=z*3|0;p=g?r:r+2|0;q=(g&1)+r|0;m=(g?2:1)+r|0;d=f[H>>2]|0;if((f[d+64>>2]|0)!=(f[d+60>>2]|0)){I=46;break b}if((f[d+76>>2]|0)!=(f[d+72>>2]|0)){I=48;break b}l=f[d+12>>2]|0;f[l+(m<<2)>>2]=o;f[l+(o<<2)>>2]=m;l=d+24|0;k=d+28|0;g=f[k>>2]|0;if((g|0)==(f[d+32>>2]|0)){Og(l,3112);d=f[k>>2]|0}else{f[g>>2]=-1073741824;d=g+4|0;f[k>>2]=d}d=(d-(f[l>>2]|0)>>2)+-1|0;g=f[H>>2]|0;if((f[g+64>>2]|0)!=(f[g+60>>2]|0)){I=53;break b}if((f[g+76>>2]|0)!=(f[g+72>>2]|0)){I=55;break b}l=f[g>>2]|0;f[l+(m<<2)>>2]=d;k=l;if((d|0)!=-1073741824)f[(f[g+24>>2]|0)+(d<<2)>>2]=m;if((o|0)>=0){d=(((o>>>0)%3|0|0)==0?2:-1)+o|0;if((d|0)>=0){if((d|0)>=((f[g+4>>2]|0)-k>>2|0)){I=62;break b}d=f[l+(d<<2)>>2]|0;f[l+(p<<2)>>2]=d;if((d|0)!=-1073741824)f[(f[g+24>>2]|0)+(d<<2)>>2]=p}else f[l+(p<<2)>>2]=-1073741824;d=o+1|0;d=((d|0)%3|0|0)==0?o+-2|0:d;if((d|0)<0)d=-1073741824;else{if((d|0)>=((f[g+4>>2]|0)-k>>2|0)){I=68;break b}d=f[l+(d<<2)>>2]|0}}else{f[l+(p<<2)>>2]=-1073741824;d=-1073741824}f[l+(q<<2)>>2]=d;y=f[la>>2]|0;f[y+-4>>2]=r;f[N>>2]=f[y+-4>>2];f[da>>2]=f[N>>2];bc(X,da);break}case 1:{g=f[ia>>2]|0;d=f[la>>2]|0;if((g|0)==(d|0)){d=-1;I=257;break a}q=d+-4|0;y=f[q>>2]|0;f[la>>2]=q;o=f[G>>2]|0;e:do if(o){m=o+-1|0;l=(m&o|0)==0;if(!l)if(z>>>0>>0)p=z;else p=(z>>>0)%(o>>>0)|0;else p=m&z;k=f[(f[ja>>2]|0)+(p<<2)>>2]|0;if((k|0)!=0?(L=f[k>>2]|0,(L|0)!=0):0){f:do if(l){k=L;while(1){I=f[k+4>>2]|0;l=(I|0)==(z|0);if(!(l|(I&m|0)==(p|0))){d=q;break e}if(l?(f[k+8>>2]|0)==(z|0):0)break f;k=f[k>>2]|0;if(!k){d=q;break e}}}else{k=L;while(1){l=f[k+4>>2]|0;if((l|0)==(z|0)){if((f[k+8>>2]|0)==(z|0))break f}else{if(l>>>0>=o>>>0)l=(l>>>0)%(o>>>0)|0;if((l|0)!=(p|0)){d=q;break e}}k=f[k>>2]|0;if(!k){d=q;break e}}}while(0);k=k+12|0;if((q|0)==(f[K>>2]|0)){Og(ia,k);g=f[ia>>2]|0;d=f[la>>2]|0;break}else{f[q>>2]=f[k>>2];f[la>>2]=d;break}}else d=q}else d=q;while(0);if((g|0)==(d|0)){d=-1;I=257;break a}l=f[d+-4>>2]|0;x=z*3|0;r=x+2|0;s=f[H>>2]|0;if((f[s+64>>2]|0)!=(f[s+60>>2]|0)){I=95;break b}if((f[s+76>>2]|0)!=(f[s+72>>2]|0)){I=97;break b}w=f[s+12>>2]|0;f[w+(l<<2)>>2]=r;f[w+(r<<2)>>2]=l;p=x+1|0;f[w+(y<<2)>>2]=p;f[w+(p<<2)>>2]=y;if((l|0)>=0){k=(((l>>>0)%3|0|0)==0?2:-1)+l|0;if((k|0)<0)k=-1073741824;else{g=f[s>>2]|0;if((k|0)>=((f[s+4>>2]|0)-g>>2|0)){I=101;break b}k=f[g+(k<<2)>>2]|0}m=f[s>>2]|0;f[m+(x<<2)>>2]=k;I=l+1|0;g=m;l=((I|0)%3|0|0)==0?l+-2|0:I;if((l|0)<0){q=m;o=g;v=s;t=k;g=-1073741824}else{if((l|0)>=((f[s+4>>2]|0)-g>>2|0)){I=106;break b}q=m;o=g;v=s;t=k;g=f[m+(l<<2)>>2]|0}}else{o=f[s>>2]|0;f[o+(x<<2)>>2]=-1073741824;q=o;v=s;t=-1073741824;g=-1073741824}f[q+(p<<2)>>2]=g;if((y|0)>=0){g=(((y>>>0)%3|0|0)==0?2:-1)+y|0;if((g|0)>=0){if((g|0)>=((f[s+4>>2]|0)-o>>2|0)){I=111;break b}g=f[q+(g<<2)>>2]|0;f[q+(r<<2)>>2]=g;if((g|0)!=-1073741824)f[(f[s+24>>2]|0)+(g<<2)>>2]=r}else f[q+(r<<2)>>2]=-1073741824;k=y+1|0;k=((k|0)%3|0|0)==0?y+-2|0:k;if((k|0)<0){g=k;k=-1073741824}else{if((k|0)>=((f[s+4>>2]|0)-o>>2|0)){I=118;break b}g=k;k=f[q+(k<<2)>>2]|0}}else{f[q+(r<<2)>>2]=-1073741824;g=y;k=-1073741824}f[da>>2]=k;I=f[E>>2]|0;l=I+(t<<2)|0;f[l>>2]=(f[l>>2]|0)+(f[I+(k<<2)>>2]|0);l=f[s+24>>2]|0;if((t|0)!=-1073741824)f[l+(t<<2)>>2]=f[l+(f[da>>2]<<2)>>2];g:do if((g|0)>-1)do{f[(f[v>>2]|0)+(g<<2)>>2]=t;I=g+1|0;g=((I|0)%3|0|0)==0?g+-2|0:I;if((g|0)<0)break g;k=f[w+(g<<2)>>2]|0;g=k+1|0;if((k|0)<0)break g;g=((g|0)%3|0|0)==0?k+-2|0:g}while((g|0)>-1);while(0);f[l+(f[da>>2]<<2)>>2]=-1073741824;do if(O){g=f[ha>>2]|0;if((g|0)==(f[J>>2]|0)){Og(fa,da);d=f[la>>2]|0;break}else{f[g>>2]=f[da>>2];f[ha>>2]=g+4;break}}while(0);f[d+-4>>2]=x;I=170;break d}case 7:{f[da>>2]=z*3;d=f[H>>2]|0;if((f[d+64>>2]|0)!=(f[d+60>>2]|0)){I=132;break b}if((f[d+76>>2]|0)!=(f[d+72>>2]|0)){I=134;break b}l=d+24|0;k=d+28|0;g=f[k>>2]|0;if((g|0)==(f[d+32>>2]|0)){Og(l,3112);d=f[k>>2]|0}else{f[g>>2]=-1073741824;d=g+4|0;f[k>>2]=d}t=d-(f[l>>2]|0)>>2;s=t+-1|0;p=f[H>>2]|0;d=f[da>>2]|0;o=p+60|0;l=p+64|0;if((f[l>>2]|0)!=(f[o>>2]|0)){I=139;break b}r=p+72|0;q=p+76|0;if((f[q>>2]|0)!=(f[r>>2]|0)){I=141;break b}f[(f[p>>2]|0)+(d<<2)>>2]=s;m=d+1|0;k=p+24|0;g=p+28|0;d=f[g>>2]|0;if((d|0)==(f[p+32>>2]|0)){Og(k,3112);if((f[l>>2]|0)==(f[o>>2]|0))d=(f[g>>2]|0)-(f[k>>2]|0)|0;else{I=145;break b}}else{f[d>>2]=-1073741824;d=d+4|0;f[g>>2]=d;d=d-(f[k>>2]|0)|0}if((f[q>>2]|0)!=(f[r>>2]|0)){I=147;break b}f[(f[p>>2]|0)+(m<<2)>>2]=(d>>2)+-1;o=f[H>>2]|0;q=(f[da>>2]|0)+2|0;m=o+60|0;g=o+64|0;if((f[g>>2]|0)!=(f[m>>2]|0)){I=149;break b}r=o+72|0;p=o+76|0;if((f[p>>2]|0)!=(f[r>>2]|0)){I=151;break b}l=o+24|0;k=o+28|0;d=f[k>>2]|0;if((d|0)==(f[o+32>>2]|0)){Og(l,3112);if((f[g>>2]|0)==(f[m>>2]|0))d=(f[k>>2]|0)-(f[l>>2]|0)|0;else{I=155;break b}}else{f[d>>2]=-1073741824;d=d+4|0;f[k>>2]=d;d=d-(f[l>>2]|0)|0}if((f[p>>2]|0)!=(f[r>>2]|0)){I=157;break b}f[(f[o>>2]|0)+(q<<2)>>2]=(d>>2)+-1;g=f[H>>2]|0;d=f[da>>2]|0;if((f[g+64>>2]|0)!=(f[g+60>>2]|0)){I=159;break b}if((f[g+76>>2]|0)!=(f[g+72>>2]|0)){I=161;break b}if((s|0)!=-1073741824){f[(f[g+24>>2]|0)+(s<<2)>>2]=d;d=f[da>>2]|0}g=f[g+24>>2]|0;f[g+(t<<2)>>2]=d+1;d=t+1|0;if((d|0)!=-1073741824)f[g+(d<<2)>>2]=(f[da>>2]|0)+2;d=f[la>>2]|0;if((d|0)==(f[K>>2]|0)){Og(ia,da);d=f[la>>2]|0}else{f[d>>2]=f[da>>2];d=d+4|0;f[la>>2]=d}f[N>>2]=f[d+-4>>2];f[da>>2]=f[N>>2];bc(X,da);break}default:{d=-1;I=257;break a}}m=c-z+-1|0;d=f[F>>2]|0;if((d|0)!=(f[W>>2]|0))do{g=f[d+-8>>2]|0;if(g>>>0>m>>>0){d=-1;I=257;break a}if((g|0)!=(m|0))break d;g=b[d+-4>>0]|0;l=f[d+-12>>2]|0;f[F>>2]=d+-12;if((l|0)<0){d=-1;I=257;break a}d=f[(f[la>>2]|0)+-4>>2]|0;k=(d|0)<0;do if(!(g&1)){if(!k)if(!((d>>>0)%3|0)){d=d+2|0;break}else{d=d+-1|0;break}}else{g=d+1|0;if(!k)d=((g|0)%3|0|0)==0?d+-2|0:g}while(0);f[da>>2]=V-l;z=Pc(ja,da)|0;f[z>>2]=d;d=f[F>>2]|0}while((d|0)!=(f[W>>2]|0))}while(0);if((I|0)==170){f[N>>2]=f[d+-4>>2];f[da>>2]=f[N>>2];bc(X,da)}if((i|0)<(c|0))z=i;else{I=184;break a}}switch(I|0){case 21:{ra(16937,16972,98,17057);break}case 26:{ra(16704,16972,282,14835);break}case 28:{ra(16855,16972,283,14835);break}case 32:{ra(16937,16972,98,17057);break}case 37:{ra(16937,16972,98,17057);break}case 46:{ra(16704,16972,282,14835);break}case 48:{ra(16855,16972,283,14835);break}case 53:{ra(16704,16972,299,14853);break}case 55:{ra(16855,16972,300,14853);break}case 62:{ra(16937,16972,98,17057);break}case 68:{ra(16937,16972,98,17057);break}case 95:{ra(16704,16972,282,14835);break}case 97:{ra(16855,16972,283,14835);break}case 101:{ra(16937,16972,98,17057);break}case 106:{ra(16937,16972,98,17057);break}case 111:{ra(16937,16972,98,17057);break}case 118:{ra(16937,16972,98,17057);break}case 132:{ra(16704,16972,305,14871);break}case 134:{ra(16855,16972,306,14871);break}case 139:{ra(16704,16972,299,14853);break}case 141:{ra(16855,16972,300,14853);break}case 145:{ra(16704,16972,299,14853);break}case 147:{ra(16855,16972,300,14853);break}case 149:{ra(16704,16972,305,14871);break}case 151:{ra(16855,16972,306,14871);break}case 155:{ra(16704,16972,299,14853);break}case 157:{ra(16855,16972,300,14853);break}case 159:{ra(16704,16972,314,14884);break}case 161:{ra(16855,16972,315,14884);break}}}else{H=a+8|0;i=0;I=184}while(0);h:do if((I|0)==184){d=f[H>>2]|0;if(((f[d+28>>2]|0)-(f[d+24>>2]|0)>>2|0)<=(Y|0)){g=f[la>>2]|0;i:do if((g|0)==(f[ia>>2]|0)){e=d;_=i}else{w=a+262|0;x=a+356|0;y=a+352|0;z=a+344|0;A=a+348|0;G=a+60|0;E=a+64|0;C=a+68|0;B=a+76|0;D=a+80|0;F=a+72|0;v=a+304|0;j:while(1){a=g;f[da>>2]=f[a+-4>>2];f[la>>2]=a+-4;if((j[w>>1]|0)<514)if(b[x>>0]|0){d=f[y>>2]|0;g=(f[z>>2]|0)+(d>>>3)|0;if(g>>>0<(f[A>>2]|0)>>>0){I=(h[g>>0]|0)>>>(d&7)&1;f[y>>2]=d+1;d=I;I=192}else I=227}else I=193;else{d=(Hi(v)|0)&1;I=192}if((I|0)==192)if(!d)I=227;else I=193;do if((I|0)==193){o=f[H>>2]|0;s=f[o>>2]|0;t=(f[o+4>>2]|0)-s>>2;if((i|0)>=((t>>>0)/3|0|0)){I=235;break j}p=f[da>>2]|0;d=p+1|0;if((p|0)>=0?(ca=((d|0)%3|0|0)==0?p+-2|0:d,(ca|0)>=0):0){if((ca|0)>=(t|0)){I=197;break j}q=f[s+(ca<<2)>>2]|0}else q=-1073741824;k=f[o+24>>2]|0;g=f[k+(q<<2)>>2]|0;d=g+1|0;if((g|0)>=0){g=((d|0)%3|0|0)==0?g+-2|0:d;d=g+1|0;if((g|0)>=0?(ba=((d|0)%3|0|0)==0?g+-2|0:d,(ba|0)>=0):0){if((ba|0)>=(t|0)){I=203;break j}m=f[s+(ba<<2)>>2]|0}else m=-1073741824}else m=-1073741824;k=f[k+(m<<2)>>2]|0;d=k+1|0;if((k|0)>=0){k=((d|0)%3|0|0)==0?k+-2|0:d;d=k+1|0;if((k|0)>=0?(aa=((d|0)%3|0|0)==0?k+-2|0:d,(aa|0)>=0):0){if((aa|0)>=(t|0)){I=209;break j}l=f[s+(aa<<2)>>2]|0}else l=-1073741824}else l=-1073741824;r=i+1|0;d=i*3|0;f[Z>>2]=d;if((f[o+64>>2]|0)!=(f[o+60>>2]|0)){I=212;break j}if((f[o+76>>2]|0)!=(f[o+72>>2]|0)){I=214;break j}a=f[o+12>>2]|0;f[a+(d<<2)>>2]=p;f[a+(p<<2)>>2]=d;d=(f[Z>>2]|0)+1|0;f[a+(d<<2)>>2]=g;f[a+(g<<2)>>2]=d;d=(f[Z>>2]|0)+2|0;f[a+(d<<2)>>2]=k;f[a+(k<<2)>>2]=d;d=f[Z>>2]|0;g=s+(d<<2)|0;f[g>>2]=m;f[s+(d+1<<2)>>2]=l;f[s+(d+2<<2)>>2]=q;if((d|0)<0)d=-1073741824;else{if((d|0)>=(t|0)){I=220;break j}d=f[g>>2]|0}g=f[ea>>2]|0;a=g+(d>>>5<<2)|0;f[a>>2]=f[a>>2]&~(1<<(d&31));a=f[Z>>2]|0;d=a+1|0;if((a|0)<-1)d=-1073741824;else{if((d|0)>=(t|0)){I=220;break j}d=f[s+(d<<2)>>2]|0}a=g+(d>>>5<<2)|0;f[a>>2]=f[a>>2]&~(1<<(d&31));a=f[Z>>2]|0;d=a+2|0;if((a|0)<-2)d=-1073741824;else{if((d|0)>=(t|0)){I=220;break j}d=f[s+(d<<2)>>2]|0}g=g+(d>>>5<<2)|0;f[g>>2]=f[g>>2]&~(1<<(d&31));d=f[E>>2]|0;g=f[C>>2]|0;if((d|0)==(g<<5|0)){if((d+1|0)<0){I=217;break j}a=g<<6;Y=d+32&-32;mg(G,d>>>0<1073741823?(a>>>0>>0?Y:a):2147483647);d=f[E>>2]|0}f[E>>2]=d+1;a=(f[G>>2]|0)+(d>>>5<<2)|0;f[a>>2]=f[a>>2]|1<<(d&31);d=f[B>>2]|0;if((d|0)==(f[D>>2]|0))Og(F,Z);else{f[d>>2]=f[Z>>2];f[B>>2]=d+4}d=r}else if((I|0)==227){d=f[E>>2]|0;g=f[C>>2]|0;if((d|0)==(g<<5|0)){if((d+1|0)<0){I=229;break j}a=g<<6;Y=d+32&-32;mg(G,d>>>0<1073741823?(a>>>0>>0?Y:a):2147483647);d=f[E>>2]|0}f[E>>2]=d+1;a=(f[G>>2]|0)+(d>>>5<<2)|0;f[a>>2]=f[a>>2]&~(1<<(d&31));d=f[B>>2]|0;if((d|0)==(f[D>>2]|0)){Og(F,da);d=i;break}else{f[d>>2]=f[da>>2];f[B>>2]=d+4;d=i;break}}while(0);g=f[la>>2]|0;if((g|0)==(f[ia>>2]|0)){I=236;break}else i=d}switch(I|0){case 197:{ra(16937,16972,98,17057);break}case 203:{ra(16937,16972,98,17057);break}case 209:{ra(16937,16972,98,17057);break}case 212:{ra(16704,16972,282,14835);break}case 214:{ra(16855,16972,283,14835);break}case 217:{co(G);break}case 220:{ra(16937,16972,98,17057);break}case 229:{co(G);break}case 235:{d=-1;I=257;break h}case 236:{e=f[H>>2]|0;_=d;break i}}}while(0);if((_|0)==(((f[e+4>>2]|0)-(f[e>>2]|0)>>2>>>0)/3|0|0)){d=(f[e+28>>2]|0)-(f[e+24>>2]|0)>>2;g=f[fa>>2]|0;r=f[ha>>2]|0;if((g|0)!=(r|0)){p=da+4|0;o=da+8|0;q=da+12|0;k:while(1){m=f[g>>2]|0;i=d+-1|0;k=f[e+24>>2]|0;if((f[k+(i<<2)>>2]|0)<0){i=d;while(1){d=i+-1|0;i=i+-2|0;if((f[k+(i<<2)>>2]|0)<0)i=d;else{l=i;break}}}else l=i;if((l|0)>=(m|0)){f[da>>2]=e;i=f[k+(l<<2)>>2]|0;f[p>>2]=i;f[o>>2]=i;b[q>>0]=1;if((i|0)>=0)do{if((f[e+64>>2]|0)!=(f[e+60>>2]|0)){I=245;break k}if((f[e+76>>2]|0)!=(f[e+72>>2]|0)){I=247;break k}f[(f[e>>2]|0)+(i<<2)>>2]=m;mf(da);i=f[o>>2]|0;e=f[H>>2]|0}while((i|0)>=0);i=f[e+24>>2]|0;k=i+(l<<2)|0;if((f[e+64>>2]|0)!=(f[e+60>>2]|0)){I=250;break}if((f[e+76>>2]|0)!=(f[e+72>>2]|0)){I=252;break}if((m|0)!=-1073741824)f[i+(m<<2)>>2]=f[k>>2];f[k>>2]=-1073741824;aa=f[ea>>2]|0;ca=aa+(l>>>5<<2)|0;ba=1<<(l&31);aa=aa+(m>>>5<<2)|0;_=1<<(m&31);Z=f[aa>>2]|0;f[aa>>2]=f[ca>>2]&ba|0?Z|_:Z&~_;f[ca>>2]=f[ca>>2]&~ba;d=d+-1|0}g=g+4|0;if((g|0)==(r|0)){I=257;break h}}if((I|0)==245)ra(16704,16972,299,14853);else if((I|0)==247)ra(16855,16972,300,14853);else if((I|0)==250)ra(16704,16972,314,14884);else if((I|0)==252)ra(16855,16972,315,14884)}else{ga=g;ka=d}}else{d=-1;I=257}}else{d=-1;I=257}}while(0);if((I|0)==257){ga=f[fa>>2]|0;ka=d}if(ga|0){d=f[ha>>2]|0;if((d|0)!=(ga|0))f[ha>>2]=d+(~((d+-4-ga|0)>>>2)<<2);No(ga)}d=f[ja+8>>2]|0;if(d|0)do{ha=d;d=f[d>>2]|0;No(ha)}while((d|0)!=0);d=f[ja>>2]|0;f[ja>>2]=0;if(d|0)No(d);d=f[ia>>2]|0;if(!d){u=ma;return ka|0}e=f[la>>2]|0;if((e|0)!=(d|0))f[la>>2]=e+(~((e+-4-d|0)>>>2)<<2);No(d);u=ma;return ka|0}function Za(a,c){a=a|0;c=c|0;var d=0,e=0,g=0,i=0,k=0,l=0,m=0,o=0,p=0,q=0,r=0,s=0,t=0,v=0,w=0,x=0,y=0,z=0,A=0,B=0,C=0,D=0,E=0,F=0,G=0,H=0,I=0,J=0,K=0,L=0,M=0,N=0,O=0,P=0,Q=0,R=0,S=0,T=0,U=0,V=0,W=0,X=0,Y=0,Z=0,_=0,aa=0,ba=0,ca=0,da=0,ea=0;ea=u;u=u+80|0;W=ea+56|0;aa=ea+40|0;ba=ea+16|0;Y=ea+4|0;G=ea+36|0;R=ea;f[aa>>2]=0;da=aa+4|0;f[da>>2]=0;f[aa+8>>2]=0;f[ba>>2]=0;f[ba+4>>2]=0;f[ba+8>>2]=0;f[ba+12>>2]=0;n[ba+16>>2]=$(1.0);f[Y>>2]=0;_=Y+4|0;f[_>>2]=0;f[Y+8>>2]=0;J=(f[a+212>>2]|0)==(f[a+216>>2]|0);X=a+120|0;Q=f[a+124>>2]|0;a:do if((c|0)>0){P=a+224|0;H=a+8|0;O=a+36|0;B=a+40|0;N=c+-1|0;C=ba+4|0;A=a+380|0;D=Y+8|0;E=aa+8|0;z=0;b:while(1){i=z+1|0;d=kf(P)|0;c:do if(d){g=(d|0)==5;switch(d|0){case 3:case 5:{d=f[da>>2]|0;if((f[aa>>2]|0)==(d|0)){d=-1;I=245;break a}o=f[d+-4>>2]|0;r=z*3|0;p=g?r:r+2|0;q=(g&1)+r|0;m=(g?2:1)+r|0;d=f[H>>2]|0;if((f[d+64>>2]|0)!=(f[d+60>>2]|0)){I=34;break b}if((f[d+76>>2]|0)!=(f[d+72>>2]|0)){I=36;break b}l=f[d+12>>2]|0;f[l+(m<<2)>>2]=o;f[l+(o<<2)>>2]=m;l=d+24|0;k=d+28|0;g=f[k>>2]|0;if((g|0)==(f[d+32>>2]|0)){Og(l,3112);d=f[k>>2]|0}else{f[g>>2]=-1073741824;d=g+4|0;f[k>>2]=d}d=(d-(f[l>>2]|0)>>2)+-1|0;g=f[H>>2]|0;if((f[g+64>>2]|0)!=(f[g+60>>2]|0)){I=41;break b}if((f[g+76>>2]|0)!=(f[g+72>>2]|0)){I=43;break b}l=f[g>>2]|0;f[l+(m<<2)>>2]=d;k=l;if((d|0)!=-1073741824)f[(f[g+24>>2]|0)+(d<<2)>>2]=m;if((o|0)>=0){d=(((o>>>0)%3|0|0)==0?2:-1)+o|0;if((d|0)>=0){if((d|0)>=((f[g+4>>2]|0)-k>>2|0)){I=50;break b}d=f[l+(d<<2)>>2]|0;f[l+(p<<2)>>2]=d;if((d|0)!=-1073741824)f[(f[g+24>>2]|0)+(d<<2)>>2]=p}else f[l+(p<<2)>>2]=-1073741824;d=o+1|0;d=((d|0)%3|0|0)==0?o+-2|0:d;if((d|0)<0)d=-1073741824;else{if((d|0)>=((f[g+4>>2]|0)-k>>2|0)){I=56;break b}d=f[l+(d<<2)>>2]|0}}else{f[l+(p<<2)>>2]=-1073741824;d=-1073741824}f[l+(q<<2)>>2]=d;y=f[da>>2]|0;f[y+-4>>2]=r;f[G>>2]=f[y+-4>>2];f[W>>2]=f[G>>2];ac(P,W);break}case 1:{g=f[aa>>2]|0;d=f[da>>2]|0;if((g|0)==(d|0)){d=-1;I=245;break a}q=d+-4|0;y=f[q>>2]|0;f[da>>2]=q;o=f[C>>2]|0;d:do if(o){m=o+-1|0;l=(m&o|0)==0;if(!l)if(z>>>0>>0)p=z;else p=(z>>>0)%(o>>>0)|0;else p=m&z;k=f[(f[ba>>2]|0)+(p<<2)>>2]|0;if((k|0)!=0?(F=f[k>>2]|0,(F|0)!=0):0){e:do if(l){k=F;while(1){I=f[k+4>>2]|0;l=(I|0)==(z|0);if(!(l|(I&m|0)==(p|0))){d=q;break d}if(l?(f[k+8>>2]|0)==(z|0):0)break e;k=f[k>>2]|0;if(!k){d=q;break d}}}else{k=F;while(1){l=f[k+4>>2]|0;if((l|0)==(z|0)){if((f[k+8>>2]|0)==(z|0))break e}else{if(l>>>0>=o>>>0)l=(l>>>0)%(o>>>0)|0;if((l|0)!=(p|0)){d=q;break d}}k=f[k>>2]|0;if(!k){d=q;break d}}}while(0);k=k+12|0;if((q|0)==(f[E>>2]|0)){Og(aa,k);g=f[aa>>2]|0;d=f[da>>2]|0;break}else{f[q>>2]=f[k>>2];f[da>>2]=d;break}}else d=q}else d=q;while(0);if((g|0)==(d|0)){d=-1;I=245;break a}l=f[d+-4>>2]|0;x=z*3|0;r=x+2|0;s=f[H>>2]|0;if((f[s+64>>2]|0)!=(f[s+60>>2]|0)){I=83;break b}if((f[s+76>>2]|0)!=(f[s+72>>2]|0)){I=85;break b}w=f[s+12>>2]|0;f[w+(l<<2)>>2]=r;f[w+(r<<2)>>2]=l;p=x+1|0;f[w+(y<<2)>>2]=p;f[w+(p<<2)>>2]=y;if((l|0)>=0){k=(((l>>>0)%3|0|0)==0?2:-1)+l|0;if((k|0)<0)k=-1073741824;else{g=f[s>>2]|0;if((k|0)>=((f[s+4>>2]|0)-g>>2|0)){I=89;break b}k=f[g+(k<<2)>>2]|0}m=f[s>>2]|0;f[m+(x<<2)>>2]=k;I=l+1|0;g=m;l=((I|0)%3|0|0)==0?l+-2|0:I;if((l|0)<0){q=m;o=g;v=s;t=k;g=-1073741824}else{if((l|0)>=((f[s+4>>2]|0)-g>>2|0)){I=94;break b}q=m;o=g;v=s;t=k;g=f[m+(l<<2)>>2]|0}}else{o=f[s>>2]|0;f[o+(x<<2)>>2]=-1073741824;q=o;v=s;t=-1073741824;g=-1073741824}f[q+(p<<2)>>2]=g;if((y|0)>=0){g=(((y>>>0)%3|0|0)==0?2:-1)+y|0;if((g|0)>=0){if((g|0)>=((f[s+4>>2]|0)-o>>2|0)){I=99;break b}g=f[q+(g<<2)>>2]|0;f[q+(r<<2)>>2]=g;if((g|0)!=-1073741824)f[(f[s+24>>2]|0)+(g<<2)>>2]=r}else f[q+(r<<2)>>2]=-1073741824;k=y+1|0;k=((k|0)%3|0|0)==0?y+-2|0:k;if((k|0)<0){g=k;k=-1073741824}else{if((k|0)>=((f[s+4>>2]|0)-o>>2|0)){I=106;break b}g=k;k=f[q+(k<<2)>>2]|0}}else{f[q+(r<<2)>>2]=-1073741824;g=y;k=-1073741824}f[W>>2]=k;I=f[A>>2]|0;l=I+(t<<2)|0;f[l>>2]=(f[l>>2]|0)+(f[I+(k<<2)>>2]|0);l=f[s+24>>2]|0;if((t|0)!=-1073741824)f[l+(t<<2)>>2]=f[l+(f[W>>2]<<2)>>2];f:do if((g|0)>-1)do{f[(f[v>>2]|0)+(g<<2)>>2]=t;I=g+1|0;g=((I|0)%3|0|0)==0?g+-2|0:I;if((g|0)<0)break f;k=f[w+(g<<2)>>2]|0;g=k+1|0;if((k|0)<0)break f;g=((g|0)%3|0|0)==0?k+-2|0:g}while((g|0)>-1);while(0);f[l+(f[W>>2]<<2)>>2]=-1073741824;do if(J){g=f[_>>2]|0;if((g|0)==(f[D>>2]|0)){Og(Y,W);d=f[da>>2]|0;break}else{f[g>>2]=f[W>>2];f[_>>2]=g+4;break}}while(0);f[d+-4>>2]=x;I=158;break c}case 7:{f[W>>2]=z*3;d=f[H>>2]|0;if((f[d+64>>2]|0)!=(f[d+60>>2]|0)){I=120;break b}if((f[d+76>>2]|0)!=(f[d+72>>2]|0)){I=122;break b}l=d+24|0;k=d+28|0;g=f[k>>2]|0;if((g|0)==(f[d+32>>2]|0)){Og(l,3112);d=f[k>>2]|0}else{f[g>>2]=-1073741824;d=g+4|0;f[k>>2]=d}t=d-(f[l>>2]|0)>>2;s=t+-1|0;p=f[H>>2]|0;d=f[W>>2]|0;o=p+60|0;l=p+64|0;if((f[l>>2]|0)!=(f[o>>2]|0)){I=127;break b}r=p+72|0;q=p+76|0;if((f[q>>2]|0)!=(f[r>>2]|0)){I=129;break b}f[(f[p>>2]|0)+(d<<2)>>2]=s;m=d+1|0;k=p+24|0;g=p+28|0;d=f[g>>2]|0;if((d|0)==(f[p+32>>2]|0)){Og(k,3112);if((f[l>>2]|0)==(f[o>>2]|0))d=(f[g>>2]|0)-(f[k>>2]|0)|0;else{I=133;break b}}else{f[d>>2]=-1073741824;d=d+4|0;f[g>>2]=d;d=d-(f[k>>2]|0)|0}if((f[q>>2]|0)!=(f[r>>2]|0)){I=135;break b}f[(f[p>>2]|0)+(m<<2)>>2]=(d>>2)+-1;o=f[H>>2]|0;q=(f[W>>2]|0)+2|0;m=o+60|0;g=o+64|0;if((f[g>>2]|0)!=(f[m>>2]|0)){I=137;break b}r=o+72|0;p=o+76|0;if((f[p>>2]|0)!=(f[r>>2]|0)){I=139;break b}l=o+24|0;k=o+28|0;d=f[k>>2]|0;if((d|0)==(f[o+32>>2]|0)){Og(l,3112);if((f[g>>2]|0)==(f[m>>2]|0))d=(f[k>>2]|0)-(f[l>>2]|0)|0;else{I=143;break b}}else{f[d>>2]=-1073741824;d=d+4|0;f[k>>2]=d;d=d-(f[l>>2]|0)|0}if((f[p>>2]|0)!=(f[r>>2]|0)){I=145;break b}f[(f[o>>2]|0)+(q<<2)>>2]=(d>>2)+-1;g=f[H>>2]|0;d=f[W>>2]|0;if((f[g+64>>2]|0)!=(f[g+60>>2]|0)){I=147;break b}if((f[g+76>>2]|0)!=(f[g+72>>2]|0)){I=149;break b}if((s|0)!=-1073741824){f[(f[g+24>>2]|0)+(s<<2)>>2]=d;d=f[W>>2]|0}g=f[g+24>>2]|0;f[g+(t<<2)>>2]=d+1;d=t+1|0;if((d|0)!=-1073741824)f[g+(d<<2)>>2]=(f[W>>2]|0)+2;d=f[da>>2]|0;if((d|0)==(f[E>>2]|0)){Og(aa,W);d=f[da>>2]|0}else{f[d>>2]=f[W>>2];d=d+4|0;f[da>>2]=d}f[G>>2]=f[d+-4>>2];f[W>>2]=f[G>>2];ac(P,W);break}default:{d=-1;I=245;break a}}m=c-z+-1|0;d=f[B>>2]|0;if((d|0)!=(f[O>>2]|0))do{g=f[d+-8>>2]|0;if(g>>>0>m>>>0){d=-1;I=245;break a}if((g|0)!=(m|0))break c;g=b[d+-4>>0]|0;l=f[d+-12>>2]|0;f[B>>2]=d+-12;if((l|0)<0){d=-1;I=245;break a}d=f[(f[da>>2]|0)+-4>>2]|0;k=(d|0)<0;do if(!(g&1)){if(!k)if(!((d>>>0)%3|0)){d=d+2|0;break}else{d=d+-1|0;break}}else{g=d+1|0;if(!k)d=((g|0)%3|0|0)==0?d+-2|0:g}while(0);f[W>>2]=N-l;z=Pc(ba,W)|0;f[z>>2]=d;d=f[B>>2]|0}while((d|0)!=(f[O>>2]|0))}else{d=f[da>>2]|0;if((f[aa>>2]|0)==(d|0)){d=-1;I=245;break a}y=d+-4|0;w=f[y>>2]|0;x=f[H>>2]|0;v=(w|0)<0;g=w+1|0;if(!v?(L=((g|0)%3|0|0)==0?w+-2|0:g,(L|0)>=0):0){g=f[x>>2]|0;if((L|0)>=((f[x+4>>2]|0)-g>>2|0)){I=9;break b}t=f[g+(L<<2)>>2]|0}else t=-1073741824;r=f[x+24>>2]|0;k=f[r+(t<<2)>>2]|0;g=k+1|0;s=r;if((k|0)>=0)k=((g|0)%3|0|0)==0?k+-2|0:g;q=z*3|0;m=q+1|0;if((f[x+64>>2]|0)!=(f[x+60>>2]|0)){I=14;break b}if((f[x+76>>2]|0)!=(f[x+72>>2]|0)){I=16;break b}o=f[x+12>>2]|0;f[o+(w<<2)>>2]=m;f[o+(m<<2)>>2]=w;p=q+2|0;f[o+(k<<2)>>2]=p;f[o+(p<<2)>>2]=k;o=f[x>>2]|0;f[o+(q<<2)>>2]=t;g=k+1|0;l=o;if((k|0)>=0?(M=((g|0)%3|0|0)==0?k+-2|0:g,(M|0)>=0):0){if((M|0)>=((f[x+4>>2]|0)-l>>2|0)){I=20;break b}g=f[o+(M<<2)>>2]|0}else g=-1073741824;f[o+(m<<2)>>2]=g;if(!v?(K=(((w>>>0)%3|0|0)==0?2:-1)+w|0,(K|0)>=0):0){if((K|0)>=((f[x+4>>2]|0)-l>>2|0)){I=25;break b}g=f[o+(K<<2)>>2]|0;f[o+(p<<2)>>2]=g;if((g|0)!=-1073741824)f[r+(g<<2)>>2]=p}else f[o+(p<<2)>>2]=-1073741824;if(((f[x+28>>2]|0)-s>>2|0)>(Q|0)){d=-1;I=245;break a}I=(f[X>>2]|0)+(t>>>5<<2)|0;f[I>>2]=f[I>>2]&~(1<<(t&31));f[y>>2]=q;I=158}while(0);if((I|0)==158){I=0;f[G>>2]=f[d+-4>>2];f[W>>2]=f[G>>2];ac(P,W)}if((i|0)<(c|0))z=i;else{I=172;break a}}switch(I|0){case 9:{ra(16937,16972,98,17057);break}case 14:{ra(16704,16972,282,14835);break}case 16:{ra(16855,16972,283,14835);break}case 20:{ra(16937,16972,98,17057);break}case 25:{ra(16937,16972,98,17057);break}case 34:{ra(16704,16972,282,14835);break}case 36:{ra(16855,16972,283,14835);break}case 41:{ra(16704,16972,299,14853);break}case 43:{ra(16855,16972,300,14853);break}case 50:{ra(16937,16972,98,17057);break}case 56:{ra(16937,16972,98,17057);break}case 83:{ra(16704,16972,282,14835);break}case 85:{ra(16855,16972,283,14835);break}case 89:{ra(16937,16972,98,17057);break}case 94:{ra(16937,16972,98,17057);break}case 99:{ra(16937,16972,98,17057);break}case 106:{ra(16937,16972,98,17057);break}case 120:{ra(16704,16972,305,14871);break}case 122:{ra(16855,16972,306,14871);break}case 127:{ra(16704,16972,299,14853);break}case 129:{ra(16855,16972,300,14853);break}case 133:{ra(16704,16972,299,14853);break}case 135:{ra(16855,16972,300,14853);break}case 137:{ra(16704,16972,305,14871);break}case 139:{ra(16855,16972,306,14871);break}case 143:{ra(16704,16972,299,14853);break}case 145:{ra(16855,16972,300,14853);break}case 147:{ra(16704,16972,314,14884);break}case 149:{ra(16855,16972,315,14884);break}}}else{H=a+8|0;i=0;I=172}while(0);g:do if((I|0)==172){d=f[H>>2]|0;if(((f[d+28>>2]|0)-(f[d+24>>2]|0)>>2|0)<=(Q|0)){g=f[da>>2]|0;h:do if((g|0)==(f[aa>>2]|0)){e=d;S=i}else{w=a+262|0;x=a+356|0;y=a+352|0;z=a+344|0;A=a+348|0;G=a+60|0;E=a+64|0;C=a+68|0;B=a+76|0;D=a+80|0;F=a+72|0;v=a+304|0;i:while(1){a=g;f[W>>2]=f[a+-4>>2];f[da>>2]=a+-4;if((j[w>>1]|0)<514)if(b[x>>0]|0){d=f[y>>2]|0;g=(f[z>>2]|0)+(d>>>3)|0;if(g>>>0<(f[A>>2]|0)>>>0){I=(h[g>>0]|0)>>>(d&7)&1;f[y>>2]=d+1;d=I;I=180}else I=215}else I=181;else{d=(Hi(v)|0)&1;I=180}if((I|0)==180)if(!d)I=215;else I=181;do if((I|0)==181){o=f[H>>2]|0;s=f[o>>2]|0;t=(f[o+4>>2]|0)-s>>2;if((i|0)>=((t>>>0)/3|0|0)){I=223;break i}p=f[W>>2]|0;d=p+1|0;if((p|0)>=0?(V=((d|0)%3|0|0)==0?p+-2|0:d,(V|0)>=0):0){if((V|0)>=(t|0)){I=185;break i}q=f[s+(V<<2)>>2]|0}else q=-1073741824;k=f[o+24>>2]|0;g=f[k+(q<<2)>>2]|0;d=g+1|0;if((g|0)>=0){g=((d|0)%3|0|0)==0?g+-2|0:d;d=g+1|0;if((g|0)>=0?(U=((d|0)%3|0|0)==0?g+-2|0:d,(U|0)>=0):0){if((U|0)>=(t|0)){I=191;break i}m=f[s+(U<<2)>>2]|0}else m=-1073741824}else m=-1073741824;k=f[k+(m<<2)>>2]|0;d=k+1|0;if((k|0)>=0){k=((d|0)%3|0|0)==0?k+-2|0:d;d=k+1|0;if((k|0)>=0?(T=((d|0)%3|0|0)==0?k+-2|0:d,(T|0)>=0):0){if((T|0)>=(t|0)){I=197;break i}l=f[s+(T<<2)>>2]|0}else l=-1073741824}else l=-1073741824;r=i+1|0;d=i*3|0;f[R>>2]=d;if((f[o+64>>2]|0)!=(f[o+60>>2]|0)){I=200;break i}if((f[o+76>>2]|0)!=(f[o+72>>2]|0)){I=202;break i}a=f[o+12>>2]|0;f[a+(d<<2)>>2]=p;f[a+(p<<2)>>2]=d;d=(f[R>>2]|0)+1|0;f[a+(d<<2)>>2]=g;f[a+(g<<2)>>2]=d;d=(f[R>>2]|0)+2|0;f[a+(d<<2)>>2]=k;f[a+(k<<2)>>2]=d;d=f[R>>2]|0;g=s+(d<<2)|0;f[g>>2]=m;f[s+(d+1<<2)>>2]=l;f[s+(d+2<<2)>>2]=q;if((d|0)<0)d=-1073741824;else{if((d|0)>=(t|0)){I=208;break i}d=f[g>>2]|0}g=f[X>>2]|0;a=g+(d>>>5<<2)|0;f[a>>2]=f[a>>2]&~(1<<(d&31));a=f[R>>2]|0;d=a+1|0;if((a|0)<-1)d=-1073741824;else{if((d|0)>=(t|0)){I=208;break i}d=f[s+(d<<2)>>2]|0}a=g+(d>>>5<<2)|0;f[a>>2]=f[a>>2]&~(1<<(d&31));a=f[R>>2]|0;d=a+2|0;if((a|0)<-2)d=-1073741824;else{if((d|0)>=(t|0)){I=208;break i}d=f[s+(d<<2)>>2]|0}g=g+(d>>>5<<2)|0;f[g>>2]=f[g>>2]&~(1<<(d&31));d=f[E>>2]|0;g=f[C>>2]|0;if((d|0)==(g<<5|0)){if((d+1|0)<0){I=205;break i}a=g<<6;Q=d+32&-32;mg(G,d>>>0<1073741823?(a>>>0>>0?Q:a):2147483647);d=f[E>>2]|0}f[E>>2]=d+1;a=(f[G>>2]|0)+(d>>>5<<2)|0;f[a>>2]=f[a>>2]|1<<(d&31);d=f[B>>2]|0;if((d|0)==(f[D>>2]|0))Og(F,R);else{f[d>>2]=f[R>>2];f[B>>2]=d+4}d=r}else if((I|0)==215){d=f[E>>2]|0;g=f[C>>2]|0;if((d|0)==(g<<5|0)){if((d+1|0)<0){I=217;break i}a=g<<6;Q=d+32&-32;mg(G,d>>>0<1073741823?(a>>>0>>0?Q:a):2147483647);d=f[E>>2]|0}f[E>>2]=d+1;a=(f[G>>2]|0)+(d>>>5<<2)|0;f[a>>2]=f[a>>2]&~(1<<(d&31));d=f[B>>2]|0;if((d|0)==(f[D>>2]|0)){Og(F,W);d=i;break}else{f[d>>2]=f[W>>2];f[B>>2]=d+4;d=i;break}}while(0);g=f[da>>2]|0;if((g|0)==(f[aa>>2]|0)){I=224;break}else i=d}switch(I|0){case 185:{ra(16937,16972,98,17057);break}case 191:{ra(16937,16972,98,17057);break}case 197:{ra(16937,16972,98,17057);break}case 200:{ra(16704,16972,282,14835);break}case 202:{ra(16855,16972,283,14835);break}case 205:{co(G);break}case 208:{ra(16937,16972,98,17057);break}case 217:{co(G);break}case 223:{d=-1;I=245;break g}case 224:{e=f[H>>2]|0;S=d;break h}}}while(0);if((S|0)==(((f[e+4>>2]|0)-(f[e>>2]|0)>>2>>>0)/3|0|0)){d=(f[e+28>>2]|0)-(f[e+24>>2]|0)>>2;g=f[Y>>2]|0;r=f[_>>2]|0;if((g|0)!=(r|0)){p=W+4|0;o=W+8|0;q=W+12|0;j:while(1){m=f[g>>2]|0;i=d+-1|0;k=f[e+24>>2]|0;if((f[k+(i<<2)>>2]|0)<0){i=d;while(1){d=i+-1|0;i=i+-2|0;if((f[k+(i<<2)>>2]|0)<0)i=d;else{l=i;break}}}else l=i;if((l|0)>=(m|0)){f[W>>2]=e;i=f[k+(l<<2)>>2]|0;f[p>>2]=i;f[o>>2]=i;b[q>>0]=1;if((i|0)>=0)do{if((f[e+64>>2]|0)!=(f[e+60>>2]|0)){I=233;break j}if((f[e+76>>2]|0)!=(f[e+72>>2]|0)){I=235;break j}f[(f[e>>2]|0)+(i<<2)>>2]=m;mf(W);i=f[o>>2]|0;e=f[H>>2]|0}while((i|0)>=0);i=f[e+24>>2]|0;k=i+(l<<2)|0;if((f[e+64>>2]|0)!=(f[e+60>>2]|0)){I=238;break}if((f[e+76>>2]|0)!=(f[e+72>>2]|0)){I=240;break}if((m|0)!=-1073741824)f[i+(m<<2)>>2]=f[k>>2];f[k>>2]=-1073741824;T=f[X>>2]|0;V=T+(l>>>5<<2)|0;U=1<<(l&31);T=T+(m>>>5<<2)|0;S=1<<(m&31);R=f[T>>2]|0;f[T>>2]=f[V>>2]&U|0?R|S:R&~S;f[V>>2]=f[V>>2]&~U;d=d+-1|0}g=g+4|0;if((g|0)==(r|0)){I=245;break g}}if((I|0)==233)ra(16704,16972,299,14853);else if((I|0)==235)ra(16855,16972,300,14853);else if((I|0)==238)ra(16704,16972,314,14884);else if((I|0)==240)ra(16855,16972,315,14884)}else{Z=g;ca=d}}else{d=-1;I=245}}else{d=-1;I=245}}while(0);if((I|0)==245){Z=f[Y>>2]|0;ca=d}if(Z|0){d=f[_>>2]|0;if((d|0)!=(Z|0))f[_>>2]=d+(~((d+-4-Z|0)>>>2)<<2);No(Z)}d=f[ba+8>>2]|0;if(d|0)do{_=d;d=f[d>>2]|0;No(_)}while((d|0)!=0);d=f[ba>>2]|0;f[ba>>2]=0;if(d|0)No(d);d=f[aa>>2]|0;if(!d){u=ea;return ca|0}e=f[da>>2]|0;if((e|0)!=(d|0))f[da>>2]=e+(~((e+-4-d|0)>>>2)<<2);No(d);u=ea;return ca|0}function _a(a,c){a=a|0;c=c|0;var d=0,e=0,g=0,i=0,k=0,l=0,m=0,o=0,p=0,q=0,r=0,s=0,t=0,v=0,w=0,x=0,y=0,z=0,A=0,B=0,C=0,D=0,E=0,F=0,G=0,H=0,I=0,J=0,K=0,L=0,M=0,N=0,O=0,P=0,Q=0,R=0,S=0,T=0,U=0,V=0,W=0,X=0,Y=0,Z=0,_=0,aa=0,ba=0,ca=0,da=0,ea=0,fa=0,ga=0;ga=u;u=u+80|0;ca=ga+56|0;da=ga+36|0;_=ga+24|0;Z=ga+8|0;T=ga;f[ca>>2]=0;fa=ca+4|0;f[fa>>2]=0;f[ca+8>>2]=0;f[da>>2]=0;f[da+4>>2]=0;f[da+8>>2]=0;f[da+12>>2]=0;n[da+16>>2]=$(1.0);f[_>>2]=0;ba=_+4|0;f[ba>>2]=0;f[_+8>>2]=0;L=(f[a+212>>2]|0)==(f[a+216>>2]|0);Y=a+120|0;R=f[a+124>>2]|0;a:do if((c|0)>0){J=a+300|0;B=da+4|0;H=a+8|0;C=_+8|0;D=ca+8|0;K=a+296|0;G=a+288|0;I=a+292|0;Q=a+36|0;A=a+40|0;P=c+-1|0;z=0;b:while(1){i=z+1|0;c:do if(!(b[J>>0]|0))S=64;else{g=f[K>>2]|0;l=f[G>>2]|0;m=f[I>>2]|0;d=l+(g>>>3)|0;if(d>>>0>>0?(y=h[d>>0]|0,F=g+1|0,f[K>>2]=F,y&1<<(g&7)|0):0){d=l+(F>>>3)|0;if(d>>>0>>0){k=(h[d>>0]|0)>>>(F&7)&1;g=g+2|0;f[K>>2]=g}else{g=F;k=0}d=l+(g>>>3)|0;if(d>>>0>>0){d=(h[d>>0]|0)>>>(g&7);f[K>>2]=g+1;d=d<<1&2}else d=0;y=(d|k)<<1|1;g=(y|0)==5;switch(y&7){case 1:{S=64;break c}case 3:case 5:{d=f[fa>>2]|0;if((f[ca>>2]|0)==(d|0)){d=-1;S=251;break a}o=f[d+-4>>2]|0;r=z*3|0;p=g?r:r+2|0;q=(g&1)+r|0;m=(g?2:1)+r|0;d=f[H>>2]|0;if((f[d+64>>2]|0)!=(f[d+60>>2]|0)){S=39;break b}if((f[d+76>>2]|0)!=(f[d+72>>2]|0)){S=41;break b}l=f[d+12>>2]|0;f[l+(m<<2)>>2]=o;f[l+(o<<2)>>2]=m;l=d+24|0;k=d+28|0;g=f[k>>2]|0;if((g|0)==(f[d+32>>2]|0)){Og(l,3112);d=f[k>>2]|0}else{f[g>>2]=-1073741824;d=g+4|0;f[k>>2]=d}d=(d-(f[l>>2]|0)>>2)+-1|0;g=f[H>>2]|0;if((f[g+64>>2]|0)!=(f[g+60>>2]|0)){S=46;break b}if((f[g+76>>2]|0)!=(f[g+72>>2]|0)){S=48;break b}l=f[g>>2]|0;f[l+(m<<2)>>2]=d;k=l;if((d|0)!=-1073741824)f[(f[g+24>>2]|0)+(d<<2)>>2]=m;do if((o|0)<0){f[l+(p<<2)>>2]=-1073741824;d=-1073741824}else{d=(((o>>>0)%3|0|0)==0?2:-1)+o|0;do if((d|0)<0)f[l+(p<<2)>>2]=-1073741824;else{if((d|0)>=((f[g+4>>2]|0)-k>>2|0)){S=55;break b}d=f[l+(d<<2)>>2]|0;f[l+(p<<2)>>2]=d;if((d|0)==-1073741824)break;f[(f[g+24>>2]|0)+(d<<2)>>2]=p}while(0);d=o+1|0;d=((d|0)%3|0|0)==0?o+-2|0:d;if((d|0)<0){d=-1073741824;break}if((d|0)>=((f[g+4>>2]|0)-k>>2|0)){S=61;break b}d=f[l+(d<<2)>>2]|0}while(0);f[l+(q<<2)>>2]=d;f[(f[fa>>2]|0)+-4>>2]=r;break}case 7:{f[Z>>2]=z*3;d=f[H>>2]|0;if((f[d+64>>2]|0)!=(f[d+60>>2]|0)){S=124;break b}if((f[d+76>>2]|0)!=(f[d+72>>2]|0)){S=126;break b}l=d+24|0;k=d+28|0;g=f[k>>2]|0;if((g|0)==(f[d+32>>2]|0)){Og(l,3112);d=f[k>>2]|0}else{f[g>>2]=-1073741824;d=g+4|0;f[k>>2]=d}t=d-(f[l>>2]|0)>>2;s=t+-1|0;p=f[H>>2]|0;d=f[Z>>2]|0;o=p+60|0;l=p+64|0;if((f[l>>2]|0)!=(f[o>>2]|0)){S=131;break b}r=p+72|0;q=p+76|0;if((f[q>>2]|0)!=(f[r>>2]|0)){S=133;break b}f[(f[p>>2]|0)+(d<<2)>>2]=s;m=d+1|0;k=p+24|0;g=p+28|0;d=f[g>>2]|0;if((d|0)==(f[p+32>>2]|0)){Og(k,3112);if((f[l>>2]|0)==(f[o>>2]|0))d=(f[g>>2]|0)-(f[k>>2]|0)|0;else{S=137;break b}}else{f[d>>2]=-1073741824;d=d+4|0;f[g>>2]=d;d=d-(f[k>>2]|0)|0}if((f[q>>2]|0)!=(f[r>>2]|0)){S=139;break b}f[(f[p>>2]|0)+(m<<2)>>2]=(d>>2)+-1;o=f[H>>2]|0;q=(f[Z>>2]|0)+2|0;m=o+60|0;g=o+64|0;if((f[g>>2]|0)!=(f[m>>2]|0)){S=141;break b}r=o+72|0;p=o+76|0;if((f[p>>2]|0)!=(f[r>>2]|0)){S=143;break b}l=o+24|0;k=o+28|0;d=f[k>>2]|0;if((d|0)==(f[o+32>>2]|0)){Og(l,3112);if((f[g>>2]|0)==(f[m>>2]|0))d=(f[k>>2]|0)-(f[l>>2]|0)|0;else{S=147;break b}}else{f[d>>2]=-1073741824;d=d+4|0;f[k>>2]=d;d=d-(f[l>>2]|0)|0}if((f[p>>2]|0)!=(f[r>>2]|0)){S=149;break b}f[(f[o>>2]|0)+(q<<2)>>2]=(d>>2)+-1;g=f[H>>2]|0;d=f[Z>>2]|0;if((f[g+64>>2]|0)!=(f[g+60>>2]|0)){S=151;break b}if((f[g+76>>2]|0)!=(f[g+72>>2]|0)){S=153;break b}if((s|0)!=-1073741824){f[(f[g+24>>2]|0)+(s<<2)>>2]=d;d=f[Z>>2]|0}g=f[g+24>>2]|0;f[g+(t<<2)>>2]=d+1;d=t+1|0;if((d|0)!=-1073741824)f[g+(d<<2)>>2]=(f[Z>>2]|0)+2;d=f[fa>>2]|0;if((d|0)==(f[D>>2]|0))Og(ca,Z);else{f[d>>2]=f[Z>>2];f[fa>>2]=d+4}break}default:{S=250;break b}}m=c-z+-1|0;d=f[A>>2]|0;if((d|0)==(f[Q>>2]|0))break;while(1){g=f[d+-8>>2]|0;if(g>>>0>m>>>0){d=-1;S=251;break a}if((g|0)!=(m|0))break c;g=b[d+-4>>0]|0;l=f[d+-12>>2]|0;f[A>>2]=d+-12;if((l|0)<0){d=-1;S=251;break a}d=f[(f[fa>>2]|0)+-4>>2]|0;k=(d|0)<0;do if(!(g&1)){if(!k)if(!((d>>>0)%3|0)){d=d+2|0;break}else{d=d+-1|0;break}}else{g=d+1|0;if(!k)d=((g|0)%3|0|0)==0?d+-2|0:g}while(0);f[Z>>2]=P-l;z=Pc(da,Z)|0;f[z>>2]=d;d=f[A>>2]|0;if((d|0)==(f[Q>>2]|0))break c}}d=f[fa>>2]|0;if((f[ca>>2]|0)==(d|0)){d=-1;S=251;break a}x=d+-4|0;v=f[x>>2]|0;w=f[H>>2]|0;t=(v|0)<0;d=v+1|0;if(!t?(N=((d|0)%3|0|0)==0?v+-2|0:d,(N|0)>=0):0){d=f[w>>2]|0;if((N|0)>=((f[w+4>>2]|0)-d>>2|0)){S=15;break b}s=f[d+(N<<2)>>2]|0}else s=-1073741824;q=f[w+24>>2]|0;g=f[q+(s<<2)>>2]|0;d=g+1|0;r=q;if((g|0)>=0)g=((d|0)%3|0|0)==0?g+-2|0:d;p=z*3|0;l=p+1|0;if((f[w+64>>2]|0)!=(f[w+60>>2]|0)){S=20;break b}if((f[w+76>>2]|0)!=(f[w+72>>2]|0)){S=22;break b}m=f[w+12>>2]|0;f[m+(v<<2)>>2]=l;f[m+(l<<2)>>2]=v;o=p+2|0;f[m+(g<<2)>>2]=o;f[m+(o<<2)>>2]=g;m=f[w>>2]|0;f[m+(p<<2)>>2]=s;d=g+1|0;k=m;if((g|0)>=0?(O=((d|0)%3|0|0)==0?g+-2|0:d,(O|0)>=0):0){if((O|0)>=((f[w+4>>2]|0)-k>>2|0)){S=26;break b}d=f[m+(O<<2)>>2]|0}else d=-1073741824;f[m+(l<<2)>>2]=d;if(!t?(M=(((v>>>0)%3|0|0)==0?2:-1)+v|0,(M|0)>=0):0){if((M|0)>=((f[w+4>>2]|0)-k>>2|0)){S=31;break b}d=f[m+(M<<2)>>2]|0;f[m+(o<<2)>>2]=d;if((d|0)!=-1073741824)f[q+(d<<2)>>2]=o}else f[m+(o<<2)>>2]=-1073741824;if(((f[w+28>>2]|0)-r>>2|0)>(R|0)){d=-1;S=251;break a}z=(f[Y>>2]|0)+(s>>>5<<2)|0;f[z>>2]=f[z>>2]&~(1<<(s&31));f[x>>2]=p}while(0);if((S|0)==64){S=0;g=f[ca>>2]|0;d=f[fa>>2]|0;if((g|0)==(d|0)){d=-1;S=251;break a}q=d+-4|0;y=f[q>>2]|0;f[fa>>2]=q;o=f[B>>2]|0;d:do if(o){m=o+-1|0;l=(m&o|0)==0;if(!l)if(z>>>0>>0)p=z;else p=(z>>>0)%(o>>>0)|0;else p=m&z;k=f[(f[da>>2]|0)+(p<<2)>>2]|0;if((k|0)!=0?(E=f[k>>2]|0,(E|0)!=0):0){e:do if(l){k=E;while(1){x=f[k+4>>2]|0;l=(x|0)==(z|0);if(!(l|(x&m|0)==(p|0))){d=q;break d}if(l?(f[k+8>>2]|0)==(z|0):0)break e;k=f[k>>2]|0;if(!k){d=q;break d}}}else{k=E;while(1){l=f[k+4>>2]|0;if((l|0)==(z|0)){if((f[k+8>>2]|0)==(z|0))break e}else{if(l>>>0>=o>>>0)l=(l>>>0)%(o>>>0)|0;if((l|0)!=(p|0)){d=q;break d}}k=f[k>>2]|0;if(!k){d=q;break d}}}while(0);k=k+12|0;if((q|0)==(f[D>>2]|0)){Og(ca,k);g=f[ca>>2]|0;d=f[fa>>2]|0;break}else{f[q>>2]=f[k>>2];f[fa>>2]=d;break}}else d=q}else d=q;while(0);if((g|0)==(d|0)){d=-1;S=251;break a}l=f[d+-4>>2]|0;x=z*3|0;r=x+2|0;s=f[H>>2]|0;if((f[s+64>>2]|0)!=(f[s+60>>2]|0)){S=88;break}if((f[s+76>>2]|0)!=(f[s+72>>2]|0)){S=90;break}w=f[s+12>>2]|0;f[w+(l<<2)>>2]=r;f[w+(r<<2)>>2]=l;p=x+1|0;f[w+(y<<2)>>2]=p;f[w+(p<<2)>>2]=y;if((l|0)>=0){k=(((l>>>0)%3|0|0)==0?2:-1)+l|0;if((k|0)<0)k=-1073741824;else{g=f[s>>2]|0;if((k|0)>=((f[s+4>>2]|0)-g>>2|0)){S=94;break}k=f[g+(k<<2)>>2]|0}m=f[s>>2]|0;f[m+(x<<2)>>2]=k;z=l+1|0;g=m;l=((z|0)%3|0|0)==0?l+-2|0:z;if((l|0)<0){q=m;o=g;v=s;t=k;g=-1073741824}else{if((l|0)>=((f[s+4>>2]|0)-g>>2|0)){S=99;break}q=m;o=g;v=s;t=k;g=f[m+(l<<2)>>2]|0}}else{o=f[s>>2]|0;f[o+(x<<2)>>2]=-1073741824;q=o;v=s;t=-1073741824;g=-1073741824}f[q+(p<<2)>>2]=g;if((y|0)>=0){g=(((y>>>0)%3|0|0)==0?2:-1)+y|0;if((g|0)>=0){if((g|0)>=((f[s+4>>2]|0)-o>>2|0)){S=104;break}g=f[q+(g<<2)>>2]|0;f[q+(r<<2)>>2]=g;if((g|0)!=-1073741824)f[(f[s+24>>2]|0)+(g<<2)>>2]=r}else f[q+(r<<2)>>2]=-1073741824;k=y+1|0;k=((k|0)%3|0|0)==0?y+-2|0:k;if((k|0)<0){g=k;k=-1073741824}else{if((k|0)>=((f[s+4>>2]|0)-o>>2|0)){S=111;break}g=k;k=f[q+(k<<2)>>2]|0}}else{f[q+(r<<2)>>2]=-1073741824;g=y;k=-1073741824}f[Z>>2]=k;l=f[s+24>>2]|0;if((t|0)!=-1073741824)f[l+(t<<2)>>2]=f[l+(k<<2)>>2];f:do if((g|0)>-1)do{f[(f[v>>2]|0)+(g<<2)>>2]=t;z=g+1|0;g=((z|0)%3|0|0)==0?g+-2|0:z;if((g|0)<0)break f;k=f[w+(g<<2)>>2]|0;g=k+1|0;if((k|0)<0)break f;g=((g|0)%3|0|0)==0?k+-2|0:g}while((g|0)>-1);while(0);f[l+(f[Z>>2]<<2)>>2]=-1073741824;do if(L){g=f[ba>>2]|0;if((g|0)==(f[C>>2]|0)){Og(_,Z);d=f[fa>>2]|0;break}else{f[g>>2]=f[Z>>2];f[ba>>2]=g+4;break}}while(0);f[d+-4>>2]=x}if((i|0)<(c|0))z=i;else{S=177;break a}}switch(S|0){case 15:{ra(16937,16972,98,17057);break}case 20:{ra(16704,16972,282,14835);break}case 22:{ra(16855,16972,283,14835);break}case 26:{ra(16937,16972,98,17057);break}case 31:{ra(16937,16972,98,17057);break}case 39:{ra(16704,16972,282,14835);break}case 41:{ra(16855,16972,283,14835);break}case 46:{ra(16704,16972,299,14853);break}case 48:{ra(16855,16972,300,14853);break}case 55:{ra(16937,16972,98,17057);break}case 61:{ra(16937,16972,98,17057);break}case 88:{ra(16704,16972,282,14835);break}case 90:{ra(16855,16972,283,14835);break}case 94:{ra(16937,16972,98,17057);break}case 99:{ra(16937,16972,98,17057);break}case 104:{ra(16937,16972,98,17057);break}case 111:{ra(16937,16972,98,17057);break}case 124:{ra(16704,16972,305,14871);break}case 126:{ra(16855,16972,306,14871);break}case 131:{ra(16704,16972,299,14853);break}case 133:{ra(16855,16972,300,14853);break}case 137:{ra(16704,16972,299,14853);break}case 139:{ra(16855,16972,300,14853);break}case 141:{ra(16704,16972,305,14871);break}case 143:{ra(16855,16972,306,14871);break}case 147:{ra(16704,16972,299,14853);break}case 149:{ra(16855,16972,300,14853);break}case 151:{ra(16704,16972,314,14884);break}case 153:{ra(16855,16972,315,14884);break}case 250:break}}else{H=a+8|0;i=0;S=177}while(0);g:do if((S|0)==177){d=f[H>>2]|0;if(((f[d+28>>2]|0)-(f[d+24>>2]|0)>>2|0)<=(R|0)){g=f[fa>>2]|0;h:do if((g|0)==(f[ca>>2]|0)){e=d;U=i}else{E=a+262|0;C=a+356|0;D=a+352|0;A=a+344|0;B=a+348|0;G=a+60|0;z=a+64|0;x=a+68|0;w=a+76|0;y=a+80|0;F=a+72|0;v=a+304|0;i:while(1){S=g;f[Z>>2]=f[S+-4>>2];f[fa>>2]=S+-4;if((j[E>>1]|0)<514)if(b[C>>0]|0){d=f[D>>2]|0;g=(f[A>>2]|0)+(d>>>3)|0;if(g>>>0<(f[B>>2]|0)>>>0){S=(h[g>>0]|0)>>>(d&7)&1;f[D>>2]=d+1;d=S;S=185}else S=220}else S=186;else{d=(Hi(v)|0)&1;S=185}if((S|0)==185)if(!d)S=220;else S=186;do if((S|0)==186){o=f[H>>2]|0;s=f[o>>2]|0;t=(f[o+4>>2]|0)-s>>2;if((i|0)>=((t>>>0)/3|0|0)){S=228;break i}p=f[Z>>2]|0;d=p+1|0;if((p|0)>=0?(X=((d|0)%3|0|0)==0?p+-2|0:d,(X|0)>=0):0){if((X|0)>=(t|0)){S=190;break i}q=f[s+(X<<2)>>2]|0}else q=-1073741824;k=f[o+24>>2]|0;g=f[k+(q<<2)>>2]|0;d=g+1|0;if((g|0)>=0){g=((d|0)%3|0|0)==0?g+-2|0:d;d=g+1|0;if((g|0)>=0?(W=((d|0)%3|0|0)==0?g+-2|0:d,(W|0)>=0):0){if((W|0)>=(t|0)){S=196;break i}m=f[s+(W<<2)>>2]|0}else m=-1073741824}else m=-1073741824;k=f[k+(m<<2)>>2]|0;d=k+1|0;if((k|0)>=0){k=((d|0)%3|0|0)==0?k+-2|0:d;d=k+1|0;if((k|0)>=0?(V=((d|0)%3|0|0)==0?k+-2|0:d,(V|0)>=0):0){if((V|0)>=(t|0)){S=202;break i}l=f[s+(V<<2)>>2]|0}else l=-1073741824}else l=-1073741824;r=i+1|0;d=i*3|0;f[T>>2]=d;if((f[o+64>>2]|0)!=(f[o+60>>2]|0)){S=205;break i}if((f[o+76>>2]|0)!=(f[o+72>>2]|0)){S=207;break i}S=f[o+12>>2]|0;f[S+(d<<2)>>2]=p;f[S+(p<<2)>>2]=d;d=(f[T>>2]|0)+1|0;f[S+(d<<2)>>2]=g;f[S+(g<<2)>>2]=d;d=(f[T>>2]|0)+2|0;f[S+(d<<2)>>2]=k;f[S+(k<<2)>>2]=d;d=f[T>>2]|0;g=s+(d<<2)|0;f[g>>2]=m;f[s+(d+1<<2)>>2]=l;f[s+(d+2<<2)>>2]=q;if((d|0)<0)d=-1073741824;else{if((d|0)>=(t|0)){S=213;break i}d=f[g>>2]|0}g=f[Y>>2]|0;S=g+(d>>>5<<2)|0;f[S>>2]=f[S>>2]&~(1<<(d&31));S=f[T>>2]|0;d=S+1|0;if((S|0)<-1)d=-1073741824;else{if((d|0)>=(t|0)){S=213;break i}d=f[s+(d<<2)>>2]|0}S=g+(d>>>5<<2)|0;f[S>>2]=f[S>>2]&~(1<<(d&31));S=f[T>>2]|0;d=S+2|0;if((S|0)<-2)d=-1073741824;else{if((d|0)>=(t|0)){S=213;break i}d=f[s+(d<<2)>>2]|0}g=g+(d>>>5<<2)|0;f[g>>2]=f[g>>2]&~(1<<(d&31));d=f[z>>2]|0;g=f[x>>2]|0;if((d|0)==(g<<5|0)){if((d+1|0)<0){S=210;break i}S=g<<6;a=d+32&-32;mg(G,d>>>0<1073741823?(S>>>0>>0?a:S):2147483647);d=f[z>>2]|0}f[z>>2]=d+1;S=(f[G>>2]|0)+(d>>>5<<2)|0;f[S>>2]=f[S>>2]|1<<(d&31);d=f[w>>2]|0;if((d|0)==(f[y>>2]|0))Og(F,T);else{f[d>>2]=f[T>>2];f[w>>2]=d+4}d=r}else if((S|0)==220){d=f[z>>2]|0;g=f[x>>2]|0;if((d|0)==(g<<5|0)){if((d+1|0)<0){S=222;break i}S=g<<6;a=d+32&-32;mg(G,d>>>0<1073741823?(S>>>0>>0?a:S):2147483647);d=f[z>>2]|0}f[z>>2]=d+1;S=(f[G>>2]|0)+(d>>>5<<2)|0;f[S>>2]=f[S>>2]&~(1<<(d&31));d=f[w>>2]|0;if((d|0)==(f[y>>2]|0)){Og(F,Z);d=i;break}else{f[d>>2]=f[Z>>2];f[w>>2]=d+4;d=i;break}}while(0);g=f[fa>>2]|0;if((g|0)==(f[ca>>2]|0)){S=229;break}else i=d}switch(S|0){case 190:{ra(16937,16972,98,17057);break}case 196:{ra(16937,16972,98,17057);break}case 202:{ra(16937,16972,98,17057);break}case 205:{ra(16704,16972,282,14835);break}case 207:{ra(16855,16972,283,14835);break}case 210:{co(G);break}case 213:{ra(16937,16972,98,17057);break}case 222:{co(G);break}case 228:{d=-1;S=251;break g}case 229:{e=f[H>>2]|0;U=d;break h}}}while(0);if((U|0)==(((f[e+4>>2]|0)-(f[e>>2]|0)>>2>>>0)/3|0|0)){d=(f[e+28>>2]|0)-(f[e+24>>2]|0)>>2;g=f[_>>2]|0;r=f[ba>>2]|0;if((g|0)!=(r|0)){p=Z+4|0;o=Z+8|0;q=Z+12|0;j:while(1){m=f[g>>2]|0;i=d+-1|0;k=f[e+24>>2]|0;if((f[k+(i<<2)>>2]|0)<0){i=d;while(1){d=i+-1|0;i=i+-2|0;if((f[k+(i<<2)>>2]|0)<0)i=d;else{l=i;break}}}else l=i;if((l|0)>=(m|0)){f[Z>>2]=e;i=f[k+(l<<2)>>2]|0;f[p>>2]=i;f[o>>2]=i;b[q>>0]=1;if((i|0)>=0)do{if((f[e+64>>2]|0)!=(f[e+60>>2]|0)){S=238;break j}if((f[e+76>>2]|0)!=(f[e+72>>2]|0)){S=240;break j}f[(f[e>>2]|0)+(i<<2)>>2]=m;mf(Z);i=f[o>>2]|0;e=f[H>>2]|0}while((i|0)>=0);i=f[e+24>>2]|0;k=i+(l<<2)|0;if((f[e+64>>2]|0)!=(f[e+60>>2]|0)){S=243;break}if((f[e+76>>2]|0)!=(f[e+72>>2]|0)){S=245;break}if((m|0)!=-1073741824)f[i+(m<<2)>>2]=f[k>>2];f[k>>2]=-1073741824;V=f[Y>>2]|0;X=V+(l>>>5<<2)|0;W=1<<(l&31);V=V+(m>>>5<<2)|0;U=1<<(m&31);T=f[V>>2]|0;f[V>>2]=f[X>>2]&W|0?T|U:T&~U;f[X>>2]=f[X>>2]&~W;d=d+-1|0}g=g+4|0;if((g|0)==(r|0)){S=251;break g}}if((S|0)==238)ra(16704,16972,299,14853);else if((S|0)==240)ra(16855,16972,300,14853);else if((S|0)==243)ra(16704,16972,314,14884);else if((S|0)==245)ra(16855,16972,315,14884)}else{aa=g;ea=d}}else{d=-1;S=251}}else{d=-1;S=251}}while(0);if((S|0)==251){aa=f[_>>2]|0;ea=d}if(aa|0){d=f[ba>>2]|0;if((d|0)!=(aa|0))f[ba>>2]=d+(~((d+-4-aa|0)>>>2)<<2);No(aa)}d=f[da+8>>2]|0;if(d|0)do{ba=d;d=f[d>>2]|0;No(ba)}while((d|0)!=0);d=f[da>>2]|0;f[da>>2]=0;if(d|0)No(d);d=f[ca>>2]|0;if(!d){u=ga;return ea|0}e=f[fa>>2]|0;if((e|0)!=(d|0))f[fa>>2]=e+(~((e+-4-d|0)>>>2)<<2);No(d);u=ga;return ea|0}function $a(a){a=a|0;var b=0,c=0,d=0,e=0,g=0,h=0,i=0,j=0,k=0,l=0,m=0,n=0,o=0,p=0,q=0,r=0,s=0,t=0,v=0,w=0,x=0;x=u;u=u+16|0;n=x;do if(a>>>0<245){k=a>>>0<11?16:a+11&-8;a=k>>>3;m=f[5258]|0;c=m>>>a;if(c&3|0){d=(c&1^1)+a|0;e=21072+(d<<1<<2)|0;b=e+8|0;a=f[b>>2]|0;g=a+8|0;c=f[g>>2]|0;if((e|0)==(c|0))f[5258]=m&~(1<>2]=e;f[b>>2]=c}w=d<<3;f[a+4>>2]=w|3;w=a+w+4|0;f[w>>2]=f[w>>2]|1;w=g;u=x;return w|0}l=f[5260]|0;if(k>>>0>l>>>0){if(c|0){h=2<>>12&16;c=c>>>h;a=c>>>5&8;c=c>>>a;e=c>>>2&4;c=c>>>e;b=c>>>1&2;c=c>>>b;d=c>>>1&1;d=(a|h|e|b|d)+(c>>>d)|0;c=21072+(d<<1<<2)|0;b=c+8|0;e=f[b>>2]|0;h=e+8|0;a=f[h>>2]|0;if((c|0)==(a|0)){a=m&~(1<>2]=c;f[b>>2]=a;a=m}g=(d<<3)-k|0;f[e+4>>2]=k|3;e=e+k|0;f[e+4>>2]=g|1;f[e+g>>2]=g;if(l|0){d=f[5263]|0;b=l>>>3;c=21072+(b<<1<<2)|0;b=1<>2]|0}f[b>>2]=d;f[a+12>>2]=d;f[d+8>>2]=a;f[d+12>>2]=c}f[5260]=g;f[5263]=e;w=h;u=x;return w|0}i=f[5259]|0;if(i){c=(i&0-i)+-1|0;h=c>>>12&16;c=c>>>h;g=c>>>5&8;c=c>>>g;j=c>>>2&4;c=c>>>j;a=c>>>1&2;c=c>>>a;d=c>>>1&1;d=f[21336+((g|h|j|a|d)+(c>>>d)<<2)>>2]|0;c=(f[d+4>>2]&-8)-k|0;a=f[d+16+(((f[d+16>>2]|0)==0&1)<<2)>>2]|0;if(!a){j=c;h=d}else{do{h=(f[a+4>>2]&-8)-k|0;j=h>>>0>>0;c=j?h:c;d=j?a:d;a=f[a+16+(((f[a+16>>2]|0)==0&1)<<2)>>2]|0}while((a|0)!=0);j=c;h=d}g=h+k|0;if(h>>>0>>0){e=f[h+24>>2]|0;b=f[h+12>>2]|0;do if((b|0)==(h|0)){a=h+20|0;b=f[a>>2]|0;if(!b){a=h+16|0;b=f[a>>2]|0;if(!b){c=0;break}}while(1){d=b+20|0;c=f[d>>2]|0;if(c|0){b=c;a=d;continue}d=b+16|0;c=f[d>>2]|0;if(!c)break;else{b=c;a=d}}f[a>>2]=0;c=b}else{c=f[h+8>>2]|0;f[c+12>>2]=b;f[b+8>>2]=c;c=b}while(0);do if(e|0){b=f[h+28>>2]|0;a=21336+(b<<2)|0;if((h|0)==(f[a>>2]|0)){f[a>>2]=c;if(!c){f[5259]=i&~(1<>2]|0)!=(h|0)&1)<<2)>>2]=c;if(!c)break}f[c+24>>2]=e;b=f[h+16>>2]|0;if(b|0){f[c+16>>2]=b;f[b+24>>2]=c}b=f[h+20>>2]|0;if(b|0){f[c+20>>2]=b;f[b+24>>2]=c}}while(0);if(j>>>0<16){w=j+k|0;f[h+4>>2]=w|3;w=h+w+4|0;f[w>>2]=f[w>>2]|1}else{f[h+4>>2]=k|3;f[g+4>>2]=j|1;f[g+j>>2]=j;if(l|0){d=f[5263]|0;b=l>>>3;c=21072+(b<<1<<2)|0;b=1<>2]|0}f[b>>2]=d;f[a+12>>2]=d;f[d+8>>2]=a;f[d+12>>2]=c}f[5260]=j;f[5263]=g}w=h+8|0;u=x;return w|0}else m=k}else m=k}else m=k}else if(a>>>0<=4294967231){a=a+11|0;k=a&-8;d=f[5259]|0;if(d){c=0-k|0;a=a>>>8;if(a)if(k>>>0>16777215)j=31;else{m=(a+1048320|0)>>>16&8;v=a<>>16&4;v=v<>>16&2;j=14-(l|m|j)+(v<>>15)|0;j=k>>>(j+7|0)&1|j<<1}else j=0;a=f[21336+(j<<2)>>2]|0;a:do if(!a){e=0;a=0;v=57}else{e=0;h=k<<((j|0)==31?0:25-(j>>>1)|0);i=a;a=0;while(1){g=(f[i+4>>2]&-8)-k|0;if(g>>>0>>0)if(!g){c=0;e=i;a=i;v=61;break a}else{c=g;a=i}g=f[i+20>>2]|0;i=f[i+16+(h>>>31<<2)>>2]|0;e=(g|0)==0|(g|0)==(i|0)?e:g;g=(i|0)==0;if(g){v=57;break}else h=h<<((g^1)&1)}}while(0);if((v|0)==57){if((e|0)==0&(a|0)==0){a=2<>>12&16;a=a>>>j;i=a>>>5&8;a=a>>>i;l=a>>>2&4;a=a>>>l;m=a>>>1&2;a=a>>>m;e=a>>>1&1;e=f[21336+((i|j|l|m|e)+(a>>>e)<<2)>>2]|0;a=0}if(!e){i=c;j=a}else v=61}if((v|0)==61)while(1){v=0;l=(f[e+4>>2]&-8)-k|0;m=l>>>0>>0;c=m?l:c;a=m?e:a;e=f[e+16+(((f[e+16>>2]|0)==0&1)<<2)>>2]|0;if(!e){i=c;j=a;break}else v=61}if((j|0)!=0?i>>>0<((f[5260]|0)-k|0)>>>0:0){h=j+k|0;if(j>>>0>=h>>>0){w=0;u=x;return w|0}g=f[j+24>>2]|0;b=f[j+12>>2]|0;do if((b|0)==(j|0)){a=j+20|0;b=f[a>>2]|0;if(!b){a=j+16|0;b=f[a>>2]|0;if(!b){b=0;break}}while(1){e=b+20|0;c=f[e>>2]|0;if(c|0){b=c;a=e;continue}e=b+16|0;c=f[e>>2]|0;if(!c)break;else{b=c;a=e}}f[a>>2]=0}else{w=f[j+8>>2]|0;f[w+12>>2]=b;f[b+8>>2]=w}while(0);do if(g){a=f[j+28>>2]|0;c=21336+(a<<2)|0;if((j|0)==(f[c>>2]|0)){f[c>>2]=b;if(!b){d=d&~(1<>2]|0)!=(j|0)&1)<<2)>>2]=b;if(!b)break}f[b+24>>2]=g;a=f[j+16>>2]|0;if(a|0){f[b+16>>2]=a;f[a+24>>2]=b}a=f[j+20>>2]|0;if(a){f[b+20>>2]=a;f[a+24>>2]=b}}while(0);do if(i>>>0>=16){f[j+4>>2]=k|3;f[h+4>>2]=i|1;f[h+i>>2]=i;b=i>>>3;if(i>>>0<256){c=21072+(b<<1<<2)|0;a=f[5258]|0;b=1<>2]|0}f[b>>2]=h;f[a+12>>2]=h;f[h+8>>2]=a;f[h+12>>2]=c;break}b=i>>>8;if(b)if(i>>>0>16777215)b=31;else{v=(b+1048320|0)>>>16&8;w=b<>>16&4;w=w<>>16&2;b=14-(t|v|b)+(w<>>15)|0;b=i>>>(b+7|0)&1|b<<1}else b=0;c=21336+(b<<2)|0;f[h+28>>2]=b;a=h+16|0;f[a+4>>2]=0;f[a>>2]=0;a=1<>2]=h;f[h+24>>2]=c;f[h+12>>2]=h;f[h+8>>2]=h;break}a=i<<((b|0)==31?0:25-(b>>>1)|0);c=f[c>>2]|0;while(1){if((f[c+4>>2]&-8|0)==(i|0)){v=97;break}d=c+16+(a>>>31<<2)|0;b=f[d>>2]|0;if(!b){v=96;break}else{a=a<<1;c=b}}if((v|0)==96){f[d>>2]=h;f[h+24>>2]=c;f[h+12>>2]=h;f[h+8>>2]=h;break}else if((v|0)==97){v=c+8|0;w=f[v>>2]|0;f[w+12>>2]=h;f[v>>2]=h;f[h+8>>2]=w;f[h+12>>2]=c;f[h+24>>2]=0;break}}else{w=i+k|0;f[j+4>>2]=w|3;w=j+w+4|0;f[w>>2]=f[w>>2]|1}while(0);w=j+8|0;u=x;return w|0}else m=k}else m=k}else m=-1;while(0);c=f[5260]|0;if(c>>>0>=m>>>0){a=c-m|0;b=f[5263]|0;if(a>>>0>15){w=b+m|0;f[5263]=w;f[5260]=a;f[w+4>>2]=a|1;f[w+a>>2]=a;f[b+4>>2]=m|3}else{f[5260]=0;f[5263]=0;f[b+4>>2]=c|3;w=b+c+4|0;f[w>>2]=f[w>>2]|1}w=b+8|0;u=x;return w|0}h=f[5261]|0;if(h>>>0>m>>>0){t=h-m|0;f[5261]=t;w=f[5264]|0;v=w+m|0;f[5264]=v;f[v+4>>2]=t|1;f[w+4>>2]=m|3;w=w+8|0;u=x;return w|0}if(!(f[5376]|0)){f[5378]=4096;f[5377]=4096;f[5379]=-1;f[5380]=-1;f[5381]=0;f[5369]=0;a=n&-16^1431655768;f[n>>2]=a;f[5376]=a;a=4096}else a=f[5378]|0;i=m+48|0;j=m+47|0;g=a+j|0;d=0-a|0;k=g&d;if(k>>>0<=m>>>0){w=0;u=x;return w|0}a=f[5368]|0;if(a|0?(l=f[5366]|0,n=l+k|0,n>>>0<=l>>>0|n>>>0>a>>>0):0){w=0;u=x;return w|0}b:do if(!(f[5369]&4)){c=f[5264]|0;c:do if(c){e=21480;while(1){a=f[e>>2]|0;if(a>>>0<=c>>>0?(q=e+4|0,(a+(f[q>>2]|0)|0)>>>0>c>>>0):0)break;a=f[e+8>>2]|0;if(!a){v=118;break c}else e=a}b=g-h&d;if(b>>>0<2147483647){a=sj(b|0)|0;if((a|0)==((f[e>>2]|0)+(f[q>>2]|0)|0)){if((a|0)!=(-1|0)){h=a;g=b;v=135;break b}}else{d=a;v=126}}else b=0}else v=118;while(0);do if((v|0)==118){c=sj(0)|0;if((c|0)!=(-1|0)?(b=c,o=f[5377]|0,p=o+-1|0,b=((p&b|0)==0?0:(p+b&0-o)-b|0)+k|0,o=f[5366]|0,p=b+o|0,b>>>0>m>>>0&b>>>0<2147483647):0){q=f[5368]|0;if(q|0?p>>>0<=o>>>0|p>>>0>q>>>0:0){b=0;break}a=sj(b|0)|0;if((a|0)==(c|0)){h=c;g=b;v=135;break b}else{d=a;v=126}}else b=0}while(0);do if((v|0)==126){c=0-b|0;if(!(i>>>0>b>>>0&(b>>>0<2147483647&(d|0)!=(-1|0))))if((d|0)==(-1|0)){b=0;break}else{h=d;g=b;v=135;break b}a=f[5378]|0;a=j-b+a&0-a;if(a>>>0>=2147483647){h=d;g=b;v=135;break b}if((sj(a|0)|0)==(-1|0)){sj(c|0)|0;b=0;break}else{h=d;g=a+b|0;v=135;break b}}while(0);f[5369]=f[5369]|4;v=133}else{b=0;v=133}while(0);if(((v|0)==133?k>>>0<2147483647:0)?(r=sj(k|0)|0,q=sj(0)|0,t=q-r|0,s=t>>>0>(m+40|0)>>>0,!((r|0)==(-1|0)|s^1|r>>>0>>0&((r|0)!=(-1|0)&(q|0)!=(-1|0))^1)):0){h=r;g=s?t:b;v=135}if((v|0)==135){b=(f[5366]|0)+g|0;f[5366]=b;if(b>>>0>(f[5367]|0)>>>0)f[5367]=b;j=f[5264]|0;do if(j){e=21480;while(1){b=f[e>>2]|0;d=e+4|0;a=f[d>>2]|0;if((h|0)==(b+a|0)){v=145;break}c=f[e+8>>2]|0;if(!c)break;else e=c}if(((v|0)==145?(f[e+12>>2]&8|0)==0:0)?j>>>0>>0&j>>>0>=b>>>0:0){f[d>>2]=a+g;w=j+8|0;w=(w&7|0)==0?0:0-w&7;v=j+w|0;w=(f[5261]|0)+(g-w)|0;f[5264]=v;f[5261]=w;f[v+4>>2]=w|1;f[v+w+4>>2]=40;f[5265]=f[5380];break}if(h>>>0<(f[5262]|0)>>>0)f[5262]=h;c=h+g|0;a=21480;while(1){if((f[a>>2]|0)==(c|0)){v=153;break}b=f[a+8>>2]|0;if(!b)break;else a=b}if((v|0)==153?(f[a+12>>2]&8|0)==0:0){f[a>>2]=h;l=a+4|0;f[l>>2]=(f[l>>2]|0)+g;l=h+8|0;l=h+((l&7|0)==0?0:0-l&7)|0;b=c+8|0;b=c+((b&7|0)==0?0:0-b&7)|0;k=l+m|0;i=b-l-m|0;f[l+4>>2]=m|3;do if((b|0)!=(j|0)){if((b|0)==(f[5263]|0)){w=(f[5260]|0)+i|0;f[5260]=w;f[5263]=k;f[k+4>>2]=w|1;f[k+w>>2]=w;break}a=f[b+4>>2]|0;if((a&3|0)==1){h=a&-8;d=a>>>3;d:do if(a>>>0<256){a=f[b+8>>2]|0;c=f[b+12>>2]|0;if((c|0)==(a|0)){f[5258]=f[5258]&~(1<>2]=c;f[c+8>>2]=a;break}}else{g=f[b+24>>2]|0;a=f[b+12>>2]|0;do if((a|0)==(b|0)){d=b+16|0;c=d+4|0;a=f[c>>2]|0;if(!a){a=f[d>>2]|0;if(!a){a=0;break}else e=d}else e=c;while(1){d=a+20|0;c=f[d>>2]|0;if(c|0){a=c;e=d;continue}d=a+16|0;c=f[d>>2]|0;if(!c)break;else{a=c;e=d}}f[e>>2]=0}else{w=f[b+8>>2]|0;f[w+12>>2]=a;f[a+8>>2]=w}while(0);if(!g)break;c=f[b+28>>2]|0;d=21336+(c<<2)|0;do if((b|0)!=(f[d>>2]|0)){f[g+16+(((f[g+16>>2]|0)!=(b|0)&1)<<2)>>2]=a;if(!a)break d}else{f[d>>2]=a;if(a|0)break;f[5259]=f[5259]&~(1<>2]=g;d=b+16|0;c=f[d>>2]|0;if(c|0){f[a+16>>2]=c;f[c+24>>2]=a}c=f[d+4>>2]|0;if(!c)break;f[a+20>>2]=c;f[c+24>>2]=a}while(0);b=b+h|0;e=h+i|0}else e=i;b=b+4|0;f[b>>2]=f[b>>2]&-2;f[k+4>>2]=e|1;f[k+e>>2]=e;b=e>>>3;if(e>>>0<256){c=21072+(b<<1<<2)|0;a=f[5258]|0;b=1<>2]|0}f[b>>2]=k;f[a+12>>2]=k;f[k+8>>2]=a;f[k+12>>2]=c;break}b=e>>>8;do if(!b)a=0;else{if(e>>>0>16777215){a=31;break}v=(b+1048320|0)>>>16&8;w=b<>>16&4;w=w<>>16&2;a=14-(t|v|a)+(w<>>15)|0;a=e>>>(a+7|0)&1|a<<1}while(0);d=21336+(a<<2)|0;f[k+28>>2]=a;b=k+16|0;f[b+4>>2]=0;f[b>>2]=0;b=f[5259]|0;c=1<>2]=k;f[k+24>>2]=d;f[k+12>>2]=k;f[k+8>>2]=k;break}a=e<<((a|0)==31?0:25-(a>>>1)|0);c=f[d>>2]|0;while(1){if((f[c+4>>2]&-8|0)==(e|0)){v=194;break}d=c+16+(a>>>31<<2)|0;b=f[d>>2]|0;if(!b){v=193;break}else{a=a<<1;c=b}}if((v|0)==193){f[d>>2]=k;f[k+24>>2]=c;f[k+12>>2]=k;f[k+8>>2]=k;break}else if((v|0)==194){v=c+8|0;w=f[v>>2]|0;f[w+12>>2]=k;f[v>>2]=k;f[k+8>>2]=w;f[k+12>>2]=c;f[k+24>>2]=0;break}}else{w=(f[5261]|0)+i|0;f[5261]=w;f[5264]=k;f[k+4>>2]=w|1}while(0);w=l+8|0;u=x;return w|0}a=21480;while(1){b=f[a>>2]|0;if(b>>>0<=j>>>0?(w=b+(f[a+4>>2]|0)|0,w>>>0>j>>>0):0)break;a=f[a+8>>2]|0}e=w+-47|0;a=e+8|0;a=e+((a&7|0)==0?0:0-a&7)|0;e=j+16|0;a=a>>>0>>0?j:a;b=a+8|0;c=h+8|0;c=(c&7|0)==0?0:0-c&7;v=h+c|0;c=g+-40-c|0;f[5264]=v;f[5261]=c;f[v+4>>2]=c|1;f[v+c+4>>2]=40;f[5265]=f[5380];c=a+4|0;f[c>>2]=27;f[b>>2]=f[5370];f[b+4>>2]=f[5371];f[b+8>>2]=f[5372];f[b+12>>2]=f[5373];f[5370]=h;f[5371]=g;f[5373]=0;f[5372]=b;b=a+24|0;do{v=b;b=b+4|0;f[b>>2]=7}while((v+8|0)>>>0>>0);if((a|0)!=(j|0)){g=a-j|0;f[c>>2]=f[c>>2]&-2;f[j+4>>2]=g|1;f[a>>2]=g;b=g>>>3;if(g>>>0<256){c=21072+(b<<1<<2)|0;a=f[5258]|0;b=1<>2]|0}f[b>>2]=j;f[a+12>>2]=j;f[j+8>>2]=a;f[j+12>>2]=c;break}b=g>>>8;if(b)if(g>>>0>16777215)c=31;else{v=(b+1048320|0)>>>16&8;w=b<>>16&4;w=w<>>16&2;c=14-(t|v|c)+(w<>>15)|0;c=g>>>(c+7|0)&1|c<<1}else c=0;d=21336+(c<<2)|0;f[j+28>>2]=c;f[j+20>>2]=0;f[e>>2]=0;b=f[5259]|0;a=1<>2]=j;f[j+24>>2]=d;f[j+12>>2]=j;f[j+8>>2]=j;break}a=g<<((c|0)==31?0:25-(c>>>1)|0);c=f[d>>2]|0;while(1){if((f[c+4>>2]&-8|0)==(g|0)){v=216;break}d=c+16+(a>>>31<<2)|0;b=f[d>>2]|0;if(!b){v=215;break}else{a=a<<1;c=b}}if((v|0)==215){f[d>>2]=j;f[j+24>>2]=c;f[j+12>>2]=j;f[j+8>>2]=j;break}else if((v|0)==216){v=c+8|0;w=f[v>>2]|0;f[w+12>>2]=j;f[v>>2]=j;f[j+8>>2]=w;f[j+12>>2]=c;f[j+24>>2]=0;break}}}else{w=f[5262]|0;if((w|0)==0|h>>>0>>0)f[5262]=h;f[5370]=h;f[5371]=g;f[5373]=0;f[5267]=f[5376];f[5266]=-1;b=0;do{w=21072+(b<<1<<2)|0;f[w+12>>2]=w;f[w+8>>2]=w;b=b+1|0}while((b|0)!=32);w=h+8|0;w=(w&7|0)==0?0:0-w&7;v=h+w|0;w=g+-40-w|0;f[5264]=v;f[5261]=w;f[v+4>>2]=w|1;f[v+w+4>>2]=40;f[5265]=f[5380]}while(0);b=f[5261]|0;if(b>>>0>m>>>0){t=b-m|0;f[5261]=t;w=f[5264]|0;v=w+m|0;f[5264]=v;f[v+4>>2]=t|1;f[w+4>>2]=m|3;w=w+8|0;u=x;return w|0}}w=Ao()|0;f[w>>2]=12;w=0;u=x;return w|0}function ab(a){a=a|0;var b=0,c=0,d=0,e=0,g=0,h=0,i=0,j=0,k=0,l=0,m=0;l=u;u=u+16|0;b=l;j=l+8|0;c=l+4|0;f[j>>2]=a;do if(a>>>0>=212){i=(a>>>0)/210|0;e=i*210|0;f[c>>2]=a-e;h=(tj(4440,4632,c,b)|0)-4440>>2;a=e;e=0;a:while(1){b=(f[4440+(h<<2)>>2]|0)+a|0;d=5;while(1){if(d>>>0>=47){g=211;c=e;k=8;break}a=f[4248+(d<<2)>>2]|0;c=(b>>>0)/(a>>>0)|0;if(c>>>0>>0){k=106;break a}if((b|0)==(X(c,a)|0)){b=e;break}else d=d+1|0}b:do if((k|0)==8){c:while(1){k=0;a=(b>>>0)/(g>>>0)|0;do if(a>>>0>=g>>>0)if((b|0)!=(X(a,g)|0)){d=g+10|0;a=(b>>>0)/(d>>>0)|0;if(a>>>0>=d>>>0)if((b|0)!=(X(a,d)|0)){d=g+12|0;a=(b>>>0)/(d>>>0)|0;if(a>>>0>=d>>>0)if((b|0)!=(X(a,d)|0)){d=g+16|0;a=(b>>>0)/(d>>>0)|0;if(a>>>0>=d>>>0)if((b|0)!=(X(a,d)|0)){d=g+18|0;a=(b>>>0)/(d>>>0)|0;if(a>>>0>=d>>>0)if((b|0)!=(X(a,d)|0)){d=g+22|0;a=(b>>>0)/(d>>>0)|0;if(a>>>0>=d>>>0)if((b|0)!=(X(a,d)|0)){d=g+28|0;a=(b>>>0)/(d>>>0)|0;if(a>>>0>=d>>>0)if((b|0)==(X(a,d)|0)){e=9;a=d}else{d=g+30|0;a=(b>>>0)/(d>>>0)|0;if(a>>>0>>0){e=1;a=d;c=b;break}if((b|0)==(X(a,d)|0)){e=9;a=d;break}d=g+36|0;a=(b>>>0)/(d>>>0)|0;if(a>>>0>>0){e=1;a=d;c=b;break}if((b|0)==(X(a,d)|0)){e=9;a=d;break}d=g+40|0;a=(b>>>0)/(d>>>0)|0;if(a>>>0>>0){e=1;a=d;c=b;break}if((b|0)==(X(a,d)|0)){e=9;a=d;break}d=g+42|0;a=(b>>>0)/(d>>>0)|0;if(a>>>0>>0){e=1;a=d;c=b;break}if((b|0)==(X(a,d)|0)){e=9;a=d;break}d=g+46|0;a=(b>>>0)/(d>>>0)|0;if(a>>>0>>0){e=1;a=d;c=b;break}if((b|0)==(X(a,d)|0)){e=9;a=d;break}d=g+52|0;a=(b>>>0)/(d>>>0)|0;if(a>>>0>>0){e=1;a=d;c=b;break}if((b|0)==(X(a,d)|0)){e=9;a=d;break}d=g+58|0;a=(b>>>0)/(d>>>0)|0;if(a>>>0>>0){e=1;a=d;c=b;break}if((b|0)==(X(a,d)|0)){e=9;a=d;break}d=g+60|0;a=(b>>>0)/(d>>>0)|0;if(a>>>0>>0){e=1;a=d;c=b;break}if((b|0)==(X(a,d)|0)){e=9;a=d;break}d=g+66|0;a=(b>>>0)/(d>>>0)|0;if(a>>>0>>0){e=1;a=d;c=b;break}if((b|0)==(X(a,d)|0)){e=9;a=d;break}d=g+70|0;a=(b>>>0)/(d>>>0)|0;if(a>>>0>>0){e=1;a=d;c=b;break}if((b|0)==(X(a,d)|0)){e=9;a=d;break}d=g+72|0;a=(b>>>0)/(d>>>0)|0;if(a>>>0>>0){e=1;a=d;c=b;break}if((b|0)==(X(a,d)|0)){e=9;a=d;break}d=g+78|0;a=(b>>>0)/(d>>>0)|0;if(a>>>0>>0){e=1;a=d;c=b;break}if((b|0)==(X(a,d)|0)){e=9;a=d;break}d=g+82|0;a=(b>>>0)/(d>>>0)|0;if(a>>>0>>0){e=1;a=d;c=b;break}if((b|0)==(X(a,d)|0)){e=9;a=d;break}d=g+88|0;a=(b>>>0)/(d>>>0)|0;if(a>>>0>>0){e=1;a=d;c=b;break}if((b|0)==(X(a,d)|0)){e=9;a=d;break}d=g+96|0;a=(b>>>0)/(d>>>0)|0;if(a>>>0>>0){e=1;a=d;c=b;break}if((b|0)==(X(a,d)|0)){e=9;a=d;break}d=g+100|0;a=(b>>>0)/(d>>>0)|0;if(a>>>0>>0){e=1;a=d;c=b;break}if((b|0)==(X(a,d)|0)){e=9;a=d;break}d=g+102|0;a=(b>>>0)/(d>>>0)|0;if(a>>>0>>0){e=1;a=d;c=b;break}if((b|0)==(X(a,d)|0)){e=9;a=d;break}d=g+106|0;a=(b>>>0)/(d>>>0)|0;if(a>>>0>>0){e=1;a=d;c=b;break}if((b|0)==(X(a,d)|0)){e=9;a=d;break}d=g+108|0;a=(b>>>0)/(d>>>0)|0;if(a>>>0>>0){e=1;a=d;c=b;break}if((b|0)==(X(a,d)|0)){e=9;a=d;break}d=g+112|0;a=(b>>>0)/(d>>>0)|0;if(a>>>0>>0){e=1;a=d;c=b;break}if((b|0)==(X(a,d)|0)){e=9;a=d;break}d=g+120|0;a=(b>>>0)/(d>>>0)|0;if(a>>>0>>0){e=1;a=d;c=b;break}if((b|0)==(X(a,d)|0)){e=9;a=d;break}d=g+126|0;a=(b>>>0)/(d>>>0)|0;if(a>>>0>>0){e=1;a=d;c=b;break}if((b|0)==(X(a,d)|0)){e=9;a=d;break}d=g+130|0;a=(b>>>0)/(d>>>0)|0;if(a>>>0>>0){e=1;a=d;c=b;break}if((b|0)==(X(a,d)|0)){e=9;a=d;break}d=g+136|0;a=(b>>>0)/(d>>>0)|0;if(a>>>0>>0){e=1;a=d;c=b;break}if((b|0)==(X(a,d)|0)){e=9;a=d;break}d=g+138|0;a=(b>>>0)/(d>>>0)|0;if(a>>>0>>0){e=1;a=d;c=b;break}if((b|0)==(X(a,d)|0)){e=9;a=d;break}d=g+142|0;a=(b>>>0)/(d>>>0)|0;if(a>>>0>>0){e=1;a=d;c=b;break}if((b|0)==(X(a,d)|0)){e=9;a=d;break}d=g+148|0;a=(b>>>0)/(d>>>0)|0;if(a>>>0>>0){e=1;a=d;c=b;break}if((b|0)==(X(a,d)|0)){e=9;a=d;break}d=g+150|0;a=(b>>>0)/(d>>>0)|0;if(a>>>0>>0){e=1;a=d;c=b;break}if((b|0)==(X(a,d)|0)){e=9;a=d;break}d=g+156|0;a=(b>>>0)/(d>>>0)|0;if(a>>>0>>0){e=1;a=d;c=b;break}if((b|0)==(X(a,d)|0)){e=9;a=d;break}d=g+162|0;a=(b>>>0)/(d>>>0)|0;if(a>>>0>>0){e=1;a=d;c=b;break}if((b|0)==(X(a,d)|0)){e=9;a=d;break}d=g+166|0;a=(b>>>0)/(d>>>0)|0;if(a>>>0>>0){e=1;a=d;c=b;break}if((b|0)==(X(a,d)|0)){e=9;a=d;break}d=g+168|0;a=(b>>>0)/(d>>>0)|0;if(a>>>0>>0){e=1;a=d;c=b;break}if((b|0)==(X(a,d)|0)){e=9;a=d;break}d=g+172|0;a=(b>>>0)/(d>>>0)|0;if(a>>>0>>0){e=1;a=d;c=b;break}if((b|0)==(X(a,d)|0)){e=9;a=d;break}d=g+178|0;a=(b>>>0)/(d>>>0)|0;if(a>>>0>>0){e=1;a=d;c=b;break}if((b|0)==(X(a,d)|0)){e=9;a=d;break}d=g+180|0;a=(b>>>0)/(d>>>0)|0;if(a>>>0>>0){e=1;a=d;c=b;break}if((b|0)==(X(a,d)|0)){e=9;a=d;break}d=g+186|0;a=(b>>>0)/(d>>>0)|0;if(a>>>0>>0){e=1;a=d;c=b;break}if((b|0)==(X(a,d)|0)){e=9;a=d;break}d=g+190|0;a=(b>>>0)/(d>>>0)|0;if(a>>>0>>0){e=1;a=d;c=b;break}if((b|0)==(X(a,d)|0)){e=9;a=d;break}d=g+192|0;a=(b>>>0)/(d>>>0)|0;if(a>>>0>>0){e=1;a=d;c=b;break}if((b|0)==(X(a,d)|0)){e=9;a=d;break}d=g+196|0;a=(b>>>0)/(d>>>0)|0;if(a>>>0>>0){e=1;a=d;c=b;break}if((b|0)==(X(a,d)|0)){e=9;a=d;break}d=g+198|0;a=(b>>>0)/(d>>>0)|0;if(a>>>0>>0){e=1;a=d;c=b;break}if((b|0)==(X(a,d)|0)){e=9;a=d;break}a=g+208|0;m=(b>>>0)/(a>>>0)|0;d=m>>>0>>0;m=(b|0)==(X(m,a)|0);e=d?1:m?9:0;a=d|m?a:g+210|0;c=d?b:c}else{e=1;a=d;c=b}}else{e=9;a=d}else{e=1;a=d;c=b}}else{e=9;a=d}else{e=1;a=d;c=b}}else{e=9;a=d}else{e=1;a=d;c=b}}else{e=9;a=d}else{e=1;a=d;c=b}}else{e=9;a=d}else{e=1;a=d;c=b}}else{e=9;a=g}else{e=1;a=g;c=b}while(0);switch(e&15){case 9:{b=c;break b}case 0:{g=a;k=8;break}default:break c}}if(!e)b=c;else{k=107;break a}}while(0);e=h+1|0;m=(e|0)==48;a=(m&1)+i|0;h=m?0:e;i=a;a=a*210|0;e=b}if((k|0)==106){f[j>>2]=b;break}else if((k|0)==107){f[j>>2]=b;b=c;break}}else{b=tj(4248,4440,j,b)|0;b=f[b>>2]|0}while(0);u=l;return b|0}function bb(a){a=a|0;var c=0,e=0,g=0,i=0,k=0,l=0,m=0,n=0,o=0,p=0,q=0,r=0,s=0,t=0,v=0,w=0,x=0,y=0,z=0,A=0,B=0,C=0,D=0;D=u;u=u+80|0;B=D+68|0;o=D+64|0;r=D+60|0;w=D+52|0;v=D+44|0;C=D;y=D+56|0;z=D+48|0;A=D+40|0;n=a+132|0;f[n>>2]=0;i=a+148|0;if(f[i>>2]|0){e=a+144|0;c=f[e>>2]|0;if(c|0)do{t=c;c=f[c>>2]|0;No(t)}while((c|0)!=0);f[e>>2]=0;c=f[a+140>>2]|0;if(c|0){e=a+136|0;g=0;do{f[(f[e>>2]|0)+(g<<2)>>2]=0;g=g+1|0}while((g|0)!=(c|0))}f[i>>2]=0}s=a+4|0;c=f[s>>2]|0;e=b[c+36>>0]|0;g=(e&255)<<8;do if(((g|h[c+37>>0])&65535)<514){m=f[c+32>>2]|0;if((g&65535)<512){q=m+8|0;t=f[q>>2]|0;q=f[q+4>>2]|0;l=m+16|0;i=l;g=f[i>>2]|0;i=Hl(g|0,f[i+4>>2]|0,4,0)|0;k=I;if(!((q|0)<(k|0)|(q|0)==(k|0)&t>>>0>>0)){g=(f[m>>2]|0)+g|0;g=h[g>>0]|h[g+1>>0]<<8|h[g+2>>0]<<16|h[g+3>>0]<<24;f[B>>2]=g;x=l;f[x>>2]=i;f[x+4>>2]=k;x=14}}else if(Eh(B,m)|0){e=f[s>>2]|0;c=e;e=b[e+36>>0]|0;g=f[B>>2]|0;x=14}if((x|0)==14){f[n>>2]=g;break}C=0;u=D;return C|0}while(0);l=f[c+32>>2]|0;if(((e&255)<<8&65535)<512){q=l+8|0;t=f[q>>2]|0;q=f[q+4>>2]|0;k=l+16|0;g=k;c=f[g>>2]|0;g=Hl(c|0,f[g+4>>2]|0,4,0)|0;i=I;if((q|0)<(i|0)|(q|0)==(i|0)&t>>>0>>0)c=0;else{c=(f[l>>2]|0)+c|0;c=h[c>>0]|h[c+1>>0]<<8|h[c+2>>0]<<16|h[c+3>>0]<<24;f[o>>2]=c;f[k>>2]=g;f[k+4>>2]=i;k=l;x=21}}else if(Eh(o,l)|0){k=f[s>>2]|0;c=f[o>>2]|0;e=b[k+36>>0]|0;k=f[k+32>>2]|0;x=21}else c=0;if((x|0)==21){n=a+156|0;f[n>>2]=c;if(((e&255)<<8&65535)<512){q=k+8|0;t=f[q>>2]|0;q=f[q+4>>2]|0;i=k+16|0;e=i;c=f[e>>2]|0;e=Hl(c|0,f[e+4>>2]|0,4,0)|0;g=I;if(!((q|0)<(g|0)|(q|0)==(g|0)&t>>>0>>0)?(t=(f[k>>2]|0)+c|0,t=h[t>>0]|h[t+1>>0]<<8|h[t+2>>0]<<16|h[t+3>>0]<<24,f[r>>2]=t,q=i,f[q>>2]=e,f[q+4>>2]=g,t>>>0<=715827882):0)x=25;else c=0}else{t=(Eh(r,k)|0)^1;if((f[r>>2]|0)>>>0>715827882|t)c=0;else x=25}do if((x|0)==25){c=f[a+24>>2]|0;g=a+28|0;e=f[g>>2]|0;if((e|0)!=(c|0))f[g>>2]=e+(~((e+-4-c|0)>>>2)<<2);q=Rk(84)|0;wm(q);t=a+8|0;c=f[t>>2]|0;f[t>>2]=q;if(c|0?(xg(c),No(c),(f[t>>2]|0)==0):0){c=0;break}i=a+160|0;c=f[i>>2]|0;g=a+164|0;e=f[g>>2]|0;if((e|0)!=(c|0))f[g>>2]=e+(~((e+-4-c|0)>>>2)<<2);Qh(i,f[r>>2]|0);i=a+172|0;c=f[i>>2]|0;g=a+176|0;e=f[g>>2]|0;if((e|0)!=(c|0))f[g>>2]=e+(~((e+-4-c|0)>>>2)<<2);Qh(i,f[r>>2]|0);c=f[a+36>>2]|0;g=a+40|0;e=f[g>>2]|0;if((e|0)!=(c|0))f[g>>2]=e+(~(((e+-12-c|0)>>>0)/12|0)*12|0);c=f[a+48>>2]|0;g=a+52|0;e=f[g>>2]|0;if((e|0)!=(c|0))f[g>>2]=e+(~((e+-4-c|0)>>>2)<<2);f[a+64>>2]=0;c=f[a+72>>2]|0;g=a+76|0;e=f[g>>2]|0;if((e|0)!=(c|0))f[g>>2]=e+(~((e+-4-c|0)>>>2)<<2);f[a+84>>2]=-1;f[a+92>>2]=-1;f[a+88>>2]=-1;c=f[(f[s>>2]|0)+32>>2]|0;q=c+8|0;p=f[q+4>>2]|0;i=c+16|0;g=i;e=f[g>>2]|0;g=f[g+4>>2]|0;if((p|0)>(g|0)|((p|0)==(g|0)?(f[q>>2]|0)>>>0>e>>>0:0)){l=b[(f[c>>2]|0)+e>>0]|0;k=Hl(e|0,g|0,1,0)|0;q=i;f[q>>2]=k;f[q+4>>2]=I;q=a+212|0;k=f[q>>2]|0;p=a+216|0;c=f[p>>2]|0;if((c|0)!=(k|0))do{f[p>>2]=c+-116;e=f[c+-12>>2]|0;if(e|0){i=c+-8|0;g=f[i>>2]|0;if((g|0)!=(e|0))f[i>>2]=g+(~((g+-4-e|0)>>>2)<<2);No(e)}e=f[c+-28>>2]|0;if(e|0){i=c+-24|0;g=f[i>>2]|0;if((g|0)!=(e|0))f[i>>2]=g+(~((g+-4-e|0)>>>2)<<2);No(e)}e=f[c+-40>>2]|0;if(e|0){i=c+-36|0;g=f[i>>2]|0;if((g|0)!=(e|0))f[i>>2]=g+(~((g+-4-e|0)>>>2)<<2);No(e)}Jh(c+-112|0);c=f[p>>2]|0}while((c|0)!=(k|0));m=l&255;_f(q,m);o=f[s>>2]|0;c=f[o+32>>2]|0;if((h[o+36>>0]<<8&65535)<512){l=c+8|0;o=f[l>>2]|0;l=f[l+4>>2]|0;k=c+16|0;g=k;e=f[g>>2]|0;g=Hl(e|0,f[g+4>>2]|0,4,0)|0;i=I;if((l|0)<(i|0)|(l|0)==(i|0)&o>>>0>>0)c=0;else{e=(f[c>>2]|0)+e|0;e=h[e>>0]|h[e+1>>0]<<8|h[e+2>>0]<<16|h[e+3>>0]<<24;f[w>>2]=e;x=k;f[x>>2]=g;f[x+4>>2]=i;x=59}}else if(Eh(w,c)|0){e=f[w>>2]|0;x=59}else c=0;if((x|0)==59){c=f[r>>2]|0;if(c>>>0>>0)c=0;else{o=f[s>>2]|0;l=f[o+32>>2]|0;do if((h[o+36>>0]<<8&65535)<512){o=l+8|0;r=f[o>>2]|0;o=f[o+4>>2]|0;k=l+16|0;g=k;e=f[g>>2]|0;g=Hl(e|0,f[g+4>>2]|0,4,0)|0;i=I;if((o|0)<(i|0)|(o|0)==(i|0)&r>>>0>>0){c=0;break}e=(f[l>>2]|0)+e|0;e=h[e>>0]|h[e+1>>0]<<8|h[e+2>>0]<<16|h[e+3>>0]<<24;f[v>>2]=e;x=k;f[x>>2]=g;f[x+4>>2]=i;x=65}else{if(!(Eh(v,l)|0)){c=0;break}e=f[v>>2]|0;c=f[r>>2]|0;x=65}while(0);a:do if((x|0)==65){if(!(Zg(f[t>>2]|0,c,e+(f[n>>2]|0)|0)|0)){c=0;break}c=(f[v>>2]|0)+(f[n>>2]|0)|0;b[B>>0]=1;pf(a+120|0,c,B);c=f[s>>2]|0;e=h[c+36>>0]<<8;b:do if(((e|h[c+37>>0])&65535)>=514)if((Hb(a,f[c+32>>2]|0)|0)==-1){c=0;break a}else g=-1;else{k=f[c+32>>2]|0;do if((e&65535)<512){o=k+8|0;r=f[o>>2]|0;o=f[o+4>>2]|0;i=k+16|0;e=i;c=f[e>>2]|0;e=Hl(c|0,f[e+4>>2]|0,4,0)|0;g=I;if((o|0)<(g|0)|(o|0)==(g|0)&r>>>0>>0)break;c=(f[k>>2]|0)+c|0;c=h[c>>0]|h[c+1>>0]<<8|h[c+2>>0]<<16|h[c+3>>0]<<24;f[B>>2]=c;x=i;f[x>>2]=e;f[x+4>>2]=g;x=72}else{if(!(Eh(B,k)|0))break;c=f[B>>2]|0;x=72}while(0);do if((x|0)==72){if(!c)break;x=f[(f[s>>2]|0)+32>>2]|0;r=x+8|0;x=x+16|0;x=jm(f[r>>2]|0,f[r+4>>2]|0,f[x>>2]|0,f[x+4>>2]|0)|0;r=I;if(0>(r|0)|0==(r|0)&c>>>0>x>>>0)break;lk(C);c=f[(f[s>>2]|0)+32>>2]|0;o=c+16|0;l=f[o>>2]|0;x=f[B>>2]|0;r=(f[c>>2]|0)+l+x|0;k=c+8|0;o=jm(f[k>>2]|0,f[k+4>>2]|0,l|0,f[o+4>>2]|0)|0;x=jm(o|0,I|0,x|0,0)|0;Dk(C,r,x,d[c+38>>1]|0);c=Hb(a,C)|0;So(C+24|0);if((c|0)==-1)break;g=c;break b}while(0);c=0;break a}while(0);x=a+224|0;f[a+368>>2]=a;l=(Na[f[(f[a>>2]|0)+32>>2]&127](a)|0)+32|0;l=f[l>>2]|0;l=(f[l>>2]|0)+(f[l+16>>2]|0)|0;o=(Na[f[(f[a>>2]|0)+32>>2]&127](a)|0)+32|0;o=f[o>>2]|0;r=o+8|0;o=o+16|0;o=jm(f[r>>2]|0,f[r+4>>2]|0,f[o>>2]|0,f[o+4>>2]|0)|0;r=(Na[f[(f[a>>2]|0)+32>>2]&127](a)|0)+32|0;Dk(x,l,o,d[(f[r>>2]|0)+38>>1]|0);r=Na[f[(f[a>>2]|0)+36>>2]&127](a)|0;f[a+372>>2]=r;f[a+376>>2]=(f[v>>2]|0)+(f[n>>2]|0);f[a+364>>2]=m;lk(C);c:do if(sf(x,C)|0){o=Ya(a,f[w>>2]|0)|0;if((o|0)==-1){c=0;break}c=f[(f[s>>2]|0)+32>>2]|0;e=C+16|0;w=f[e>>2]|0;x=(f[C>>2]|0)+w|0;v=C+8|0;e=jm(f[v>>2]|0,f[v+4>>2]|0,w|0,f[e+4>>2]|0)|0;Dk(c,x,e,d[c+38>>1]|0);c=f[s>>2]|0;e=(h[c+36>>0]<<8|h[c+37>>0])&65535;if((e&65535)<514){x=(f[c+32>>2]|0)+16|0;w=x;w=Hl(f[w>>2]|0,f[w+4>>2]|0,g|0,((g|0)<0)<<31>>31|0)|0;f[x>>2]=w;f[x+4>>2]=I}do if((f[p>>2]|0)!=(f[q>>2]|0)){c=f[t>>2]|0;c=((f[c+4>>2]|0)-(f[c>>2]|0)|0)>0;if((e&65535)<513){if(!c)break;c=0;do{f[y>>2]=c;f[B>>2]=f[y>>2];c=c+3|0;if(!(Ld(a,B)|0)){c=0;break c}z=f[t>>2]|0}while((c|0)<((f[z+4>>2]|0)-(f[z>>2]|0)>>2|0))}else{if(!c)break;c=0;do{f[z>>2]=c;f[B>>2]=f[z>>2];c=c+3|0;if(!(Fd(a,B)|0)){c=0;break c}y=f[t>>2]|0}while((c|0)<((f[y+4>>2]|0)-(f[y>>2]|0)>>2|0))}}while(0);if(b[a+300>>0]|0)Pj(a+264|0);if((j[a+262>>1]|0)<514)Pj(a+320|0);c=f[q>>2]|0;if((f[p>>2]|0)!=(c|0)){i=0;do{Sg(c+(i*116|0)+4|0,f[t>>2]|0)|0;c=f[q>>2]|0;e=f[c+(i*116|0)+104>>2]|0;g=f[c+(i*116|0)+108>>2]|0;if((e|0)!=(g|0))do{f[A>>2]=f[e>>2];f[B>>2]=f[A>>2];Md(c+(i*116|0)+4|0,B);e=e+4|0;c=f[q>>2]|0}while((e|0)!=(g|0));qj(c+(i*116|0)+4|0,0,0);i=i+1|0;c=f[q>>2]|0}while(i>>>0<(((f[p>>2]|0)-c|0)/116|0)>>>0)}l=f[t>>2]|0;l=(f[l+28>>2]|0)-(f[l+24>>2]|0)>>2;g=a+196|0;k=a+200|0;i=f[k>>2]|0;c=f[g>>2]|0;e=i-c>>2;do if(l>>>0>e>>>0)vg(g,l-e|0);else{if(l>>>0>=e>>>0)break;c=c+(l<<2)|0;if((i|0)==(c|0))break;f[k>>2]=i+(~((i+-4-c|0)>>>2)<<2)}while(0);Qh(a+184|0,l);c=f[q>>2]|0;if((f[p>>2]|0)!=(c|0)){n=0;do{m=(f[c+(n*116|0)+60>>2]|0)-(f[c+(n*116|0)+56>>2]|0)>>2;i=f[t>>2]|0;i=(f[i+28>>2]|0)-(f[i+24>>2]|0)>>2;m=(m|0)<(i|0)?i:m;i=c+(n*116|0)+88|0;l=c+(n*116|0)+92|0;k=f[l>>2]|0;e=f[i>>2]|0;g=k-e>>2;do if(m>>>0>g>>>0)vg(i,m-g|0);else{if(m>>>0>=g>>>0)break;e=e+(m<<2)|0;if((k|0)==(e|0))break;f[l>>2]=k+(~((k+-4-e|0)>>>2)<<2)}while(0);Qh(c+(n*116|0)+76|0,m);n=n+1|0;c=f[q>>2]|0}while(n>>>0<(((f[p>>2]|0)-c|0)/116|0)>>>0)}c=wb(a,o)|0}else c=0;while(0);So(C+24|0)}while(0)}}}else c=0}while(0)}C=c;u=D;return C|0}function cb(a){a=a|0;var c=0,e=0,g=0,i=0,k=0,l=0,m=0,n=0,o=0,p=0,q=0,r=0,s=0,t=0,v=0,w=0,x=0,y=0,z=0,A=0,B=0,C=0,D=0;D=u;u=u+80|0;B=D+68|0;o=D+64|0;r=D+60|0;w=D+52|0;v=D+44|0;C=D;y=D+56|0;z=D+48|0;A=D+40|0;n=a+132|0;f[n>>2]=0;i=a+148|0;if(f[i>>2]|0){e=a+144|0;c=f[e>>2]|0;if(c|0)do{t=c;c=f[c>>2]|0;No(t)}while((c|0)!=0);f[e>>2]=0;c=f[a+140>>2]|0;if(c|0){e=a+136|0;g=0;do{f[(f[e>>2]|0)+(g<<2)>>2]=0;g=g+1|0}while((g|0)!=(c|0))}f[i>>2]=0}s=a+4|0;c=f[s>>2]|0;e=b[c+36>>0]|0;g=(e&255)<<8;do if(((g|h[c+37>>0])&65535)<514){m=f[c+32>>2]|0;if((g&65535)<512){q=m+8|0;t=f[q>>2]|0;q=f[q+4>>2]|0;l=m+16|0;i=l;g=f[i>>2]|0;i=Hl(g|0,f[i+4>>2]|0,4,0)|0;k=I;if(!((q|0)<(k|0)|(q|0)==(k|0)&t>>>0>>0)){g=(f[m>>2]|0)+g|0;g=h[g>>0]|h[g+1>>0]<<8|h[g+2>>0]<<16|h[g+3>>0]<<24;f[B>>2]=g;x=l;f[x>>2]=i;f[x+4>>2]=k;x=14}}else if(Eh(B,m)|0){e=f[s>>2]|0;c=e;e=b[e+36>>0]|0;g=f[B>>2]|0;x=14}if((x|0)==14){f[n>>2]=g;break}C=0;u=D;return C|0}while(0);l=f[c+32>>2]|0;if(((e&255)<<8&65535)<512){q=l+8|0;t=f[q>>2]|0;q=f[q+4>>2]|0;k=l+16|0;g=k;c=f[g>>2]|0;g=Hl(c|0,f[g+4>>2]|0,4,0)|0;i=I;if((q|0)<(i|0)|(q|0)==(i|0)&t>>>0>>0)c=0;else{c=(f[l>>2]|0)+c|0;c=h[c>>0]|h[c+1>>0]<<8|h[c+2>>0]<<16|h[c+3>>0]<<24;f[o>>2]=c;f[k>>2]=g;f[k+4>>2]=i;k=l;x=21}}else if(Eh(o,l)|0){k=f[s>>2]|0;c=f[o>>2]|0;e=b[k+36>>0]|0;k=f[k+32>>2]|0;x=21}else c=0;if((x|0)==21){n=a+156|0;f[n>>2]=c;if(((e&255)<<8&65535)<512){q=k+8|0;t=f[q>>2]|0;q=f[q+4>>2]|0;i=k+16|0;e=i;c=f[e>>2]|0;e=Hl(c|0,f[e+4>>2]|0,4,0)|0;g=I;if(!((q|0)<(g|0)|(q|0)==(g|0)&t>>>0>>0)?(t=(f[k>>2]|0)+c|0,t=h[t>>0]|h[t+1>>0]<<8|h[t+2>>0]<<16|h[t+3>>0]<<24,f[r>>2]=t,q=i,f[q>>2]=e,f[q+4>>2]=g,t>>>0<=715827882):0)x=25;else c=0}else{t=(Eh(r,k)|0)^1;if((f[r>>2]|0)>>>0>715827882|t)c=0;else x=25}do if((x|0)==25){c=f[a+24>>2]|0;g=a+28|0;e=f[g>>2]|0;if((e|0)!=(c|0))f[g>>2]=e+(~((e+-4-c|0)>>>2)<<2);q=Rk(84)|0;wm(q);t=a+8|0;c=f[t>>2]|0;f[t>>2]=q;if(c|0?(xg(c),No(c),(f[t>>2]|0)==0):0){c=0;break}i=a+160|0;c=f[i>>2]|0;g=a+164|0;e=f[g>>2]|0;if((e|0)!=(c|0))f[g>>2]=e+(~((e+-4-c|0)>>>2)<<2);Qh(i,f[r>>2]|0);i=a+172|0;c=f[i>>2]|0;g=a+176|0;e=f[g>>2]|0;if((e|0)!=(c|0))f[g>>2]=e+(~((e+-4-c|0)>>>2)<<2);Qh(i,f[r>>2]|0);c=f[a+36>>2]|0;g=a+40|0;e=f[g>>2]|0;if((e|0)!=(c|0))f[g>>2]=e+(~(((e+-12-c|0)>>>0)/12|0)*12|0);c=f[a+48>>2]|0;g=a+52|0;e=f[g>>2]|0;if((e|0)!=(c|0))f[g>>2]=e+(~((e+-4-c|0)>>>2)<<2);f[a+64>>2]=0;c=f[a+72>>2]|0;g=a+76|0;e=f[g>>2]|0;if((e|0)!=(c|0))f[g>>2]=e+(~((e+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[o+32>>2]|0;do if((h[o+36>>0]<<8&65535)<512){o=l+8|0;r=f[o>>2]|0;o=f[o+4>>2]|0;k=l+16|0;g=k;e=f[g>>2]|0;g=Hl(e|0,f[g+4>>2]|0,4,0)|0;i=I;if((o|0)<(i|0)|(o|0)==(i|0)&r>>>0>>0){c=0;break}e=(f[l>>2]|0)+e|0;e=h[e>>0]|h[e+1>>0]<<8|h[e+2>>0]<<16|h[e+3>>0]<<24;f[v>>2]=e;x=k;f[x>>2]=g;f[x+4>>2]=i;x=65}else{if(!(Eh(v,l)|0)){c=0;break}e=f[v>>2]|0;c=f[r>>2]|0;x=65}while(0);a:do if((x|0)==65){if(!(Zg(f[t>>2]|0,c,e+(f[n>>2]|0)|0)|0)){c=0;break}c=(f[v>>2]|0)+(f[n>>2]|0)|0;b[B>>0]=1;pf(a+120|0,c,B);c=f[s>>2]|0;e=h[c+36>>0]<<8;b:do if(((e|h[c+37>>0])&65535)>=514)if((Hb(a,f[c+32>>2]|0)|0)==-1){c=0;break a}else g=-1;else{k=f[c+32>>2]|0;do if((e&65535)<512){o=k+8|0;r=f[o>>2]|0;o=f[o+4>>2]|0;i=k+16|0;e=i;c=f[e>>2]|0;e=Hl(c|0,f[e+4>>2]|0,4,0)|0;g=I;if((o|0)<(g|0)|(o|0)==(g|0)&r>>>0>>0)break;c=(f[k>>2]|0)+c|0;c=h[c>>0]|h[c+1>>0]<<8|h[c+2>>0]<<16|h[c+3>>0]<<24;f[B>>2]=c;x=i;f[x>>2]=e;f[x+4>>2]=g;x=72}else{if(!(Eh(B,k)|0))break;c=f[B>>2]|0;x=72}while(0);do if((x|0)==72){if(!c)break;x=f[(f[s>>2]|0)+32>>2]|0;r=x+8|0;x=x+16|0;x=jm(f[r>>2]|0,f[r+4>>2]|0,f[x>>2]|0,f[x+4>>2]|0)|0;r=I;if(0>(r|0)|0==(r|0)&c>>>0>x>>>0)break;lk(C);c=f[(f[s>>2]|0)+32>>2]|0;o=c+16|0;l=f[o>>2]|0;x=f[B>>2]|0;r=(f[c>>2]|0)+l+x|0;k=c+8|0;o=jm(f[k>>2]|0,f[k+4>>2]|0,l|0,f[o+4>>2]|0)|0;x=jm(o|0,I|0,x|0,0)|0;Dk(C,r,x,d[c+38>>1]|0);c=Hb(a,C)|0;So(C+24|0);if((c|0)==-1)break;g=c;break b}while(0);c=0;break a}while(0);x=a+224|0;f[a+368>>2]=a;l=(Na[f[(f[a>>2]|0)+32>>2]&127](a)|0)+32|0;l=f[l>>2]|0;l=(f[l>>2]|0)+(f[l+16>>2]|0)|0;o=(Na[f[(f[a>>2]|0)+32>>2]&127](a)|0)+32|0;o=f[o>>2]|0;r=o+8|0;o=o+16|0;o=jm(f[r>>2]|0,f[r+4>>2]|0,f[o>>2]|0,f[o+4>>2]|0)|0;r=(Na[f[(f[a>>2]|0)+32>>2]&127](a)|0)+32|0;Dk(x,l,o,d[(f[r>>2]|0)+38>>1]|0);r=Na[f[(f[a>>2]|0)+36>>2]&127](a)|0;f[a+372>>2]=r;f[a+376>>2]=(f[v>>2]|0)+(f[n>>2]|0);f[a+364>>2]=m;lk(C);c:do if(Pb(x,C)|0){o=Za(a,f[w>>2]|0)|0;if((o|0)==-1){c=0;break}c=f[(f[s>>2]|0)+32>>2]|0;e=C+16|0;w=f[e>>2]|0;x=(f[C>>2]|0)+w|0;v=C+8|0;e=jm(f[v>>2]|0,f[v+4>>2]|0,w|0,f[e+4>>2]|0)|0;Dk(c,x,e,d[c+38>>1]|0);c=f[s>>2]|0;e=(h[c+36>>0]<<8|h[c+37>>0])&65535;if((e&65535)<514){x=(f[c+32>>2]|0)+16|0;w=x;w=Hl(f[w>>2]|0,f[w+4>>2]|0,g|0,((g|0)<0)<<31>>31|0)|0;f[x>>2]=w;f[x+4>>2]=I}do if((f[p>>2]|0)!=(f[q>>2]|0)){c=f[t>>2]|0;c=((f[c+4>>2]|0)-(f[c>>2]|0)|0)>0;if((e&65535)<513){if(!c)break;c=0;do{f[y>>2]=c;f[B>>2]=f[y>>2];c=c+3|0;if(!(Ld(a,B)|0)){c=0;break c}z=f[t>>2]|0}while((c|0)<((f[z+4>>2]|0)-(f[z>>2]|0)>>2|0))}else{if(!c)break;c=0;do{f[z>>2]=c;f[B>>2]=f[z>>2];c=c+3|0;if(!(Fd(a,B)|0)){c=0;break c}y=f[t>>2]|0}while((c|0)<((f[y+4>>2]|0)-(f[y>>2]|0)>>2|0))}}while(0);if(b[a+300>>0]|0)Pj(a+264|0);if((j[a+262>>1]|0)<514)Pj(a+320|0);c=f[q>>2]|0;if((f[p>>2]|0)!=(c|0)){i=0;do{Sg(c+(i*116|0)+4|0,f[t>>2]|0)|0;c=f[q>>2]|0;e=f[c+(i*116|0)+104>>2]|0;g=f[c+(i*116|0)+108>>2]|0;if((e|0)!=(g|0))do{f[A>>2]=f[e>>2];f[B>>2]=f[A>>2];Md(c+(i*116|0)+4|0,B);e=e+4|0;c=f[q>>2]|0}while((e|0)!=(g|0));qj(c+(i*116|0)+4|0,0,0);i=i+1|0;c=f[q>>2]|0}while(i>>>0<(((f[p>>2]|0)-c|0)/116|0)>>>0)}l=f[t>>2]|0;l=(f[l+28>>2]|0)-(f[l+24>>2]|0)>>2;g=a+196|0;k=a+200|0;i=f[k>>2]|0;c=f[g>>2]|0;e=i-c>>2;do if(l>>>0>e>>>0)vg(g,l-e|0);else{if(l>>>0>=e>>>0)break;c=c+(l<<2)|0;if((i|0)==(c|0))break;f[k>>2]=i+(~((i+-4-c|0)>>>2)<<2)}while(0);Qh(a+184|0,l);c=f[q>>2]|0;if((f[p>>2]|0)!=(c|0)){n=0;do{m=(f[c+(n*116|0)+60>>2]|0)-(f[c+(n*116|0)+56>>2]|0)>>2;i=f[t>>2]|0;i=(f[i+28>>2]|0)-(f[i+24>>2]|0)>>2;m=(m|0)<(i|0)?i:m;i=c+(n*116|0)+88|0;l=c+(n*116|0)+92|0;k=f[l>>2]|0;e=f[i>>2]|0;g=k-e>>2;do if(m>>>0>g>>>0)vg(i,m-g|0);else{if(m>>>0>=g>>>0)break;e=e+(m<<2)|0;if((k|0)==(e|0))break;f[l>>2]=k+(~((k+-4-e|0)>>>2)<<2)}while(0);Qh(c+(n*116|0)+76|0,m);n=n+1|0;c=f[q>>2]|0}while(n>>>0<(((f[p>>2]|0)-c|0)/116|0)>>>0)}c=wb(a,o)|0}else c=0;while(0);So(C+24|0)}while(0)}}}else c=0}while(0)}C=c;u=D;return C|0}function db(a){a=a|0;var c=0,e=0,g=0,i=0,k=0,l=0,m=0,n=0,o=0,p=0,q=0,r=0,s=0,t=0,v=0,w=0,x=0,y=0,z=0,A=0,B=0,C=0,D=0;D=u;u=u+80|0;B=D+68|0;o=D+64|0;r=D+60|0;w=D+52|0;s=D+44|0;C=D;y=D+56|0;z=D+48|0;A=D+40|0;n=a+132|0;f[n>>2]=0;i=a+148|0;if(f[i>>2]|0){e=a+144|0;c=f[e>>2]|0;if(c|0)do{v=c;c=f[c>>2]|0;No(v)}while((c|0)!=0);f[e>>2]=0;c=f[a+140>>2]|0;if(c|0){e=a+136|0;g=0;do{f[(f[e>>2]|0)+(g<<2)>>2]=0;g=g+1|0}while((g|0)!=(c|0))}f[i>>2]=0}t=a+4|0;c=f[t>>2]|0;e=b[c+36>>0]|0;g=(e&255)<<8;do if(((g|h[c+37>>0])&65535)<514){m=f[c+32>>2]|0;if((g&65535)<512){q=m+8|0;v=f[q>>2]|0;q=f[q+4>>2]|0;l=m+16|0;i=l;g=f[i>>2]|0;i=Hl(g|0,f[i+4>>2]|0,4,0)|0;k=I;if(!((q|0)<(k|0)|(q|0)==(k|0)&v>>>0>>0)){g=(f[m>>2]|0)+g|0;g=h[g>>0]|h[g+1>>0]<<8|h[g+2>>0]<<16|h[g+3>>0]<<24;f[B>>2]=g;x=l;f[x>>2]=i;f[x+4>>2]=k;x=14}}else if(Eh(B,m)|0){e=f[t>>2]|0;c=e;e=b[e+36>>0]|0;g=f[B>>2]|0;x=14}if((x|0)==14){f[n>>2]=g;break}C=0;u=D;return C|0}while(0);l=f[c+32>>2]|0;if(((e&255)<<8&65535)<512){q=l+8|0;v=f[q>>2]|0;q=f[q+4>>2]|0;k=l+16|0;g=k;c=f[g>>2]|0;g=Hl(c|0,f[g+4>>2]|0,4,0)|0;i=I;if((q|0)<(i|0)|(q|0)==(i|0)&v>>>0>>0)c=0;else{c=(f[l>>2]|0)+c|0;c=h[c>>0]|h[c+1>>0]<<8|h[c+2>>0]<<16|h[c+3>>0]<<24;f[o>>2]=c;f[k>>2]=g;f[k+4>>2]=i;k=l;x=21}}else if(Eh(o,l)|0){k=f[t>>2]|0;c=f[o>>2]|0;e=b[k+36>>0]|0;k=f[k+32>>2]|0;x=21}else c=0;if((x|0)==21){n=a+156|0;f[n>>2]=c;if(((e&255)<<8&65535)<512){q=k+8|0;v=f[q>>2]|0;q=f[q+4>>2]|0;i=k+16|0;e=i;c=f[e>>2]|0;e=Hl(c|0,f[e+4>>2]|0,4,0)|0;g=I;if(!((q|0)<(g|0)|(q|0)==(g|0)&v>>>0>>0)?(v=(f[k>>2]|0)+c|0,v=h[v>>0]|h[v+1>>0]<<8|h[v+2>>0]<<16|h[v+3>>0]<<24,f[r>>2]=v,q=i,f[q>>2]=e,f[q+4>>2]=g,v>>>0<=715827882):0)x=25;else c=0}else{v=(Eh(r,k)|0)^1;if((f[r>>2]|0)>>>0>715827882|v)c=0;else x=25}do if((x|0)==25){c=f[a+24>>2]|0;g=a+28|0;e=f[g>>2]|0;if((e|0)!=(c|0))f[g>>2]=e+(~((e+-4-c|0)>>>2)<<2);q=Rk(84)|0;wm(q);v=a+8|0;c=f[v>>2]|0;f[v>>2]=q;if(c|0?(xg(c),No(c),(f[v>>2]|0)==0):0){c=0;break}i=a+160|0;c=f[i>>2]|0;g=a+164|0;e=f[g>>2]|0;if((e|0)!=(c|0))f[g>>2]=e+(~((e+-4-c|0)>>>2)<<2);Qh(i,f[r>>2]|0);i=a+172|0;c=f[i>>2]|0;g=a+176|0;e=f[g>>2]|0;if((e|0)!=(c|0))f[g>>2]=e+(~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|0;g=Hl(e|0,f[g+4>>2]|0,4,0)|0;i=I;if((l|0)<(i|0)|(l|0)==(i|0)&o>>>0>>0)c=0;else{e=(f[c>>2]|0)+e|0;e=h[e>>0]|h[e+1>>0]<<8|h[e+2>>0]<<16|h[e+3>>0]<<24;f[w>>2]=e;x=k;f[x>>2]=g;f[x+4>>2]=i;x=59}}else if(Eh(w,c)|0){e=f[w>>2]|0;x=59}else c=0;if((x|0)==59){c=f[r>>2]|0;if(c>>>0>>0)c=0;else{o=f[t>>2]|0;l=f[o+32>>2]|0;do if((h[o+36>>0]<<8&65535)<512){o=l+8|0;r=f[o>>2]|0;o=f[o+4>>2]|0;k=l+16|0;g=k;e=f[g>>2]|0;g=Hl(e|0,f[g+4>>2]|0,4,0)|0;i=I;if((o|0)<(i|0)|(o|0)==(i|0)&r>>>0>>0){c=0;break}e=(f[l>>2]|0)+e|0;e=h[e>>0]|h[e+1>>0]<<8|h[e+2>>0]<<16|h[e+3>>0]<<24;f[s>>2]=e;x=k;f[x>>2]=g;f[x+4>>2]=i;x=65}else{if(!(Eh(s,l)|0)){c=0;break}e=f[s>>2]|0;c=f[r>>2]|0;x=65}while(0);a:do if((x|0)==65){if(!(Zg(f[v>>2]|0,c,e+(f[n>>2]|0)|0)|0)){c=0;break}c=(f[s>>2]|0)+(f[n>>2]|0)|0;b[B>>0]=1;pf(a+120|0,c,B);c=f[t>>2]|0;e=h[c+36>>0]<<8;b:do if(((e|h[c+37>>0])&65535)>=514)if((Hb(a,f[c+32>>2]|0)|0)==-1){c=0;break a}else g=-1;else{k=f[c+32>>2]|0;do if((e&65535)<512){r=k+8|0;s=f[r>>2]|0;r=f[r+4>>2]|0;i=k+16|0;e=i;c=f[e>>2]|0;e=Hl(c|0,f[e+4>>2]|0,4,0)|0;g=I;if((r|0)<(g|0)|(r|0)==(g|0)&s>>>0>>0)break;c=(f[k>>2]|0)+c|0;c=h[c>>0]|h[c+1>>0]<<8|h[c+2>>0]<<16|h[c+3>>0]<<24;f[B>>2]=c;x=i;f[x>>2]=e;f[x+4>>2]=g;x=72}else{if(!(Eh(B,k)|0))break;c=f[B>>2]|0;x=72}while(0);do if((x|0)==72){if(!c)break;x=f[(f[t>>2]|0)+32>>2]|0;s=x+8|0;x=x+16|0;x=jm(f[s>>2]|0,f[s+4>>2]|0,f[x>>2]|0,f[x+4>>2]|0)|0;s=I;if(0>(s|0)|0==(s|0)&c>>>0>x>>>0)break;lk(C);c=f[(f[t>>2]|0)+32>>2]|0;r=c+16|0;o=f[r>>2]|0;x=f[B>>2]|0;s=(f[c>>2]|0)+o+x|0;n=c+8|0;r=jm(f[n>>2]|0,f[n+4>>2]|0,o|0,f[r+4>>2]|0)|0;x=jm(r|0,I|0,x|0,0)|0;Dk(C,s,x,d[c+38>>1]|0);c=Hb(a,C)|0;So(C+24|0);if((c|0)==-1)break;g=c;break b}while(0);c=0;break a}while(0);x=a+224|0;f[a+368>>2]=a;o=(Na[f[(f[a>>2]|0)+32>>2]&127](a)|0)+32|0;o=f[o>>2]|0;o=(f[o>>2]|0)+(f[o+16>>2]|0)|0;r=(Na[f[(f[a>>2]|0)+32>>2]&127](a)|0)+32|0;r=f[r>>2]|0;s=r+8|0;r=r+16|0;r=jm(f[s>>2]|0,f[s+4>>2]|0,f[r>>2]|0,f[r+4>>2]|0)|0;s=(Na[f[(f[a>>2]|0)+32>>2]&127](a)|0)+32|0;Dk(x,o,r,d[(f[s>>2]|0)+38>>1]|0);f[a+364>>2]=m;lk(C);c:do if(Dd(x,C)|0){o=_a(a,f[w>>2]|0)|0;if((o|0)==-1){c=0;break}c=f[(f[t>>2]|0)+32>>2]|0;e=C+16|0;w=f[e>>2]|0;x=(f[C>>2]|0)+w|0;s=C+8|0;e=jm(f[s>>2]|0,f[s+4>>2]|0,w|0,f[e+4>>2]|0)|0;Dk(c,x,e,d[c+38>>1]|0);c=f[t>>2]|0;e=(h[c+36>>0]<<8|h[c+37>>0])&65535;if((e&65535)<514){x=(f[c+32>>2]|0)+16|0;w=x;w=Hl(f[w>>2]|0,f[w+4>>2]|0,g|0,((g|0)<0)<<31>>31|0)|0;f[x>>2]=w;f[x+4>>2]=I}do if((f[p>>2]|0)!=(f[q>>2]|0)){c=f[v>>2]|0;c=((f[c+4>>2]|0)-(f[c>>2]|0)|0)>0;if((e&65535)<513){if(!c)break;c=0;do{f[y>>2]=c;f[B>>2]=f[y>>2];c=c+3|0;if(!(Ld(a,B)|0)){c=0;break c}z=f[v>>2]|0}while((c|0)<((f[z+4>>2]|0)-(f[z>>2]|0)>>2|0))}else{if(!c)break;c=0;do{f[z>>2]=c;f[B>>2]=f[z>>2];c=c+3|0;if(!(Gd(a,B)|0)){c=0;break c}y=f[v>>2]|0}while((c|0)<((f[y+4>>2]|0)-(f[y>>2]|0)>>2|0))}}while(0);if(b[a+300>>0]|0)Pj(a+264|0);if((j[a+262>>1]|0)<514)Pj(a+320|0);c=f[q>>2]|0;if((f[p>>2]|0)!=(c|0)){i=0;do{Sg(c+(i*116|0)+4|0,f[v>>2]|0)|0;c=f[q>>2]|0;e=f[c+(i*116|0)+104>>2]|0;g=f[c+(i*116|0)+108>>2]|0;if((e|0)!=(g|0))do{f[A>>2]=f[e>>2];f[B>>2]=f[A>>2];Md(c+(i*116|0)+4|0,B);e=e+4|0;c=f[q>>2]|0}while((e|0)!=(g|0));qj(c+(i*116|0)+4|0,0,0);i=i+1|0;c=f[q>>2]|0}while(i>>>0<(((f[p>>2]|0)-c|0)/116|0)>>>0)}l=f[v>>2]|0;l=(f[l+28>>2]|0)-(f[l+24>>2]|0)>>2;g=a+196|0;k=a+200|0;i=f[k>>2]|0;c=f[g>>2]|0;e=i-c>>2;do if(l>>>0>e>>>0)vg(g,l-e|0);else{if(l>>>0>=e>>>0)break;c=c+(l<<2)|0;if((i|0)==(c|0))break;f[k>>2]=i+(~((i+-4-c|0)>>>2)<<2)}while(0);Qh(a+184|0,l);c=f[q>>2]|0;if((f[p>>2]|0)!=(c|0)){n=0;do{m=(f[c+(n*116|0)+60>>2]|0)-(f[c+(n*116|0)+56>>2]|0)>>2;i=f[v>>2]|0;i=(f[i+28>>2]|0)-(f[i+24>>2]|0)>>2;m=(m|0)<(i|0)?i:m;i=c+(n*116|0)+88|0;l=c+(n*116|0)+92|0;k=f[l>>2]|0;e=f[i>>2]|0;g=k-e>>2;do if(m>>>0>g>>>0)vg(i,m-g|0);else{if(m>>>0>=g>>>0)break;e=e+(m<<2)|0;if((k|0)==(e|0))break;f[l>>2]=k+(~((k+-4-e|0)>>>2)<<2)}while(0);Qh(c+(n*116|0)+76|0,m);n=n+1|0;c=f[q>>2]|0}while(n>>>0<(((f[p>>2]|0)-c|0)/116|0)>>>0)}c=wb(a,o)|0}else c=0;while(0);So(C+24|0)}while(0)}}}else c=0}while(0)}C=c;u=D;return C|0}function eb(a,c,e,g){a=a|0;c=c|0;e=e|0;g=g|0;var i=0,k=0,l=0,m=La;if(!g){g=0;return g|0}do switch(f[a+28>>2]|0){case 1:{k=a+24|0;i=b[k>>0]|0;if((i<<24>>24>e<<24>>24?e:i)<<24>>24>0){l=f[c>>2]|0;i=f[f[a>>2]>>2]|0;c=a+40|0;l=Qk(f[c>>2]|0,f[c+4>>2]|0,l|0,((l|0)<0)<<31>>31|0)|0;c=a+48|0;c=Hl(l|0,I|0,f[c>>2]|0,f[c+4>>2]|0)|0;c=i+c|0;if(!(b[a+32>>0]|0)){a=0;while(1){m=$(b[c>>0]|0);n[g+(a<<2)>>2]=m;a=a+1|0;i=b[k>>0]|0;if((a|0)>=((i<<24>>24>e<<24>>24?e:i)<<24>>24|0))break;else c=c+1|0}}else{a=0;while(1){m=$($(b[c>>0]|0)/$(127.0));n[g+(a<<2)>>2]=m;a=a+1|0;i=b[k>>0]|0;if((a|0)>=((i<<24>>24>e<<24>>24?e:i)<<24>>24|0))break;else c=c+1|0}}}c=i<<24>>24;if(i<<24>>24>=e<<24>>24){l=1;return l|0}kh(g+(c<<2)|0,0,(e<<24>>24)-c<<2|0)|0;l=1;return l|0}case 2:{k=a+24|0;i=b[k>>0]|0;if((i<<24>>24>e<<24>>24?e:i)<<24>>24>0){i=f[c>>2]|0;l=f[f[a>>2]>>2]|0;c=a+40|0;i=Qk(f[c>>2]|0,f[c+4>>2]|0,i|0,((i|0)<0)<<31>>31|0)|0;c=a+48|0;c=Hl(i|0,I|0,f[c>>2]|0,f[c+4>>2]|0)|0;c=l+c|0;if(!(b[a+32>>0]|0)){a=0;while(1){m=$(h[c>>0]|0);n[g+(a<<2)>>2]=m;a=a+1|0;i=b[k>>0]|0;if((a|0)>=((i<<24>>24>e<<24>>24?e:i)<<24>>24|0))break;else c=c+1|0}}else{a=0;while(1){m=$($(h[c>>0]|0)/$(255.0));n[g+(a<<2)>>2]=m;a=a+1|0;i=b[k>>0]|0;if((a|0)>=((i<<24>>24>e<<24>>24?e:i)<<24>>24|0))break;else c=c+1|0}}}c=i<<24>>24;if(i<<24>>24>=e<<24>>24){l=1;return l|0}kh(g+(c<<2)|0,0,(e<<24>>24)-c<<2|0)|0;l=1;return l|0}case 3:{i=f[c>>2]|0;c=a+48|0;k=f[c>>2]|0;c=f[c+4>>2]|0;l=a+40|0;c=(Hl(Qk(f[l>>2]|0,f[l+4>>2]|0,i|0,((i|0)<0)<<31>>31|0)|0,I|0,k|0,c|0)|0)+(f[f[a>>2]>>2]|0)|0;k=a+24|0;i=b[k>>0]|0;if((i<<24>>24>e<<24>>24?e:i)<<24>>24>0)if(!(b[a+32>>0]|0)){a=0;while(1){m=$(d[c>>1]|0);n[g+(a<<2)>>2]=m;a=a+1|0;i=b[k>>0]|0;if((a|0)>=((i<<24>>24>e<<24>>24?e:i)<<24>>24|0))break;else c=c+2|0}}else{a=0;while(1){m=$($(d[c>>1]|0)/$(32767.0));n[g+(a<<2)>>2]=m;a=a+1|0;i=b[k>>0]|0;if((a|0)>=((i<<24>>24>e<<24>>24?e:i)<<24>>24|0))break;else c=c+2|0}}c=i<<24>>24;if(i<<24>>24>=e<<24>>24){l=1;return l|0}kh(g+(c<<2)|0,0,(e<<24>>24)-c<<2|0)|0;l=1;return l|0}case 4:{i=f[c>>2]|0;c=a+48|0;k=f[c>>2]|0;c=f[c+4>>2]|0;l=a+40|0;c=(Hl(Qk(f[l>>2]|0,f[l+4>>2]|0,i|0,((i|0)<0)<<31>>31|0)|0,I|0,k|0,c|0)|0)+(f[f[a>>2]>>2]|0)|0;k=a+24|0;i=b[k>>0]|0;if((i<<24>>24>e<<24>>24?e:i)<<24>>24>0)if(!(b[a+32>>0]|0)){a=0;while(1){m=$(j[c>>1]|0);n[g+(a<<2)>>2]=m;a=a+1|0;i=b[k>>0]|0;if((a|0)>=((i<<24>>24>e<<24>>24?e:i)<<24>>24|0))break;else c=c+2|0}}else{a=0;while(1){m=$($(j[c>>1]|0)/$(65535.0));n[g+(a<<2)>>2]=m;a=a+1|0;i=b[k>>0]|0;if((a|0)>=((i<<24>>24>e<<24>>24?e:i)<<24>>24|0))break;else c=c+2|0}}c=i<<24>>24;if(i<<24>>24>=e<<24>>24){l=1;return l|0}kh(g+(c<<2)|0,0,(e<<24>>24)-c<<2|0)|0;l=1;return l|0}case 5:{i=f[c>>2]|0;c=a+48|0;k=f[c>>2]|0;c=f[c+4>>2]|0;l=a+40|0;c=(Hl(Qk(f[l>>2]|0,f[l+4>>2]|0,i|0,((i|0)<0)<<31>>31|0)|0,I|0,k|0,c|0)|0)+(f[f[a>>2]>>2]|0)|0;k=a+24|0;i=b[k>>0]|0;if((i<<24>>24>e<<24>>24?e:i)<<24>>24>0)if(!(b[a+32>>0]|0)){a=0;while(1){m=$(f[c>>2]|0);n[g+(a<<2)>>2]=m;a=a+1|0;i=b[k>>0]|0;if((a|0)>=((i<<24>>24>e<<24>>24?e:i)<<24>>24|0))break;else c=c+4|0}}else{a=0;while(1){m=$($(f[c>>2]|0)*$(4.65661287e-10));n[g+(a<<2)>>2]=m;a=a+1|0;i=b[k>>0]|0;if((a|0)>=((i<<24>>24>e<<24>>24?e:i)<<24>>24|0))break;else c=c+4|0}}c=i<<24>>24;if(i<<24>>24>=e<<24>>24){l=1;return l|0}kh(g+(c<<2)|0,0,(e<<24>>24)-c<<2|0)|0;l=1;return l|0}case 6:{i=f[c>>2]|0;c=a+48|0;k=f[c>>2]|0;c=f[c+4>>2]|0;l=a+40|0;c=(Hl(Qk(f[l>>2]|0,f[l+4>>2]|0,i|0,((i|0)<0)<<31>>31|0)|0,I|0,k|0,c|0)|0)+(f[f[a>>2]>>2]|0)|0;k=a+24|0;i=b[k>>0]|0;if((i<<24>>24>e<<24>>24?e:i)<<24>>24>0)if(!(b[a+32>>0]|0)){a=0;while(1){m=$((f[c>>2]|0)>>>0);n[g+(a<<2)>>2]=m;a=a+1|0;i=b[k>>0]|0;if((a|0)>=((i<<24>>24>e<<24>>24?e:i)<<24>>24|0))break;else c=c+4|0}}else{a=0;while(1){m=$($((f[c>>2]|0)>>>0)*$(2.32830644e-10));n[g+(a<<2)>>2]=m;a=a+1|0;i=b[k>>0]|0;if((a|0)>=((i<<24>>24>e<<24>>24?e:i)<<24>>24|0))break;else c=c+4|0}}c=i<<24>>24;if(i<<24>>24>=e<<24>>24){l=1;return l|0}kh(g+(c<<2)|0,0,(e<<24>>24)-c<<2|0)|0;l=1;return l|0}case 7:{i=f[c>>2]|0;c=a+48|0;k=f[c>>2]|0;c=f[c+4>>2]|0;l=a+40|0;c=(Hl(Qk(f[l>>2]|0,f[l+4>>2]|0,i|0,((i|0)<0)<<31>>31|0)|0,I|0,k|0,c|0)|0)+(f[f[a>>2]>>2]|0)|0;k=a+24|0;i=b[k>>0]|0;if((i<<24>>24>e<<24>>24?e:i)<<24>>24>0)if(!(b[a+32>>0]|0)){a=0;while(1){i=c;m=$(+((f[i>>2]|0)>>>0)+4294967296.0*+(f[i+4>>2]|0));n[g+(a<<2)>>2]=m;a=a+1|0;i=b[k>>0]|0;if((a|0)>=((i<<24>>24>e<<24>>24?e:i)<<24>>24|0))break;else c=c+8|0}}else{a=0;while(1){i=c;m=$($(+((f[i>>2]|0)>>>0)+4294967296.0*+(f[i+4>>2]|0))*$(1.08420217e-19));n[g+(a<<2)>>2]=m;a=a+1|0;i=b[k>>0]|0;if((a|0)>=((i<<24>>24>e<<24>>24?e:i)<<24>>24|0))break;else c=c+8|0}}c=i<<24>>24;if(i<<24>>24>=e<<24>>24){l=1;return l|0}kh(g+(c<<2)|0,0,(e<<24>>24)-c<<2|0)|0;l=1;return l|0}case 8:{i=f[c>>2]|0;c=a+48|0;k=f[c>>2]|0;c=f[c+4>>2]|0;l=a+40|0;c=(Hl(Qk(f[l>>2]|0,f[l+4>>2]|0,i|0,((i|0)<0)<<31>>31|0)|0,I|0,k|0,c|0)|0)+(f[f[a>>2]>>2]|0)|0;k=a+24|0;i=b[k>>0]|0;if((i<<24>>24>e<<24>>24?e:i)<<24>>24>0)if(!(b[a+32>>0]|0)){a=0;while(1){i=c;m=$(+((f[i>>2]|0)>>>0)+4294967296.0*+((f[i+4>>2]|0)>>>0));n[g+(a<<2)>>2]=m;a=a+1|0;i=b[k>>0]|0;if((a|0)>=((i<<24>>24>e<<24>>24?e:i)<<24>>24|0))break;else c=c+8|0}}else{a=0;while(1){i=c;m=$($(+((f[i>>2]|0)>>>0)+4294967296.0*+((f[i+4>>2]|0)>>>0))*$(5.42101086e-20));n[g+(a<<2)>>2]=m;a=a+1|0;i=b[k>>0]|0;if((a|0)>=((i<<24>>24>e<<24>>24?e:i)<<24>>24|0))break;else c=c+8|0}}c=i<<24>>24;if(i<<24>>24>=e<<24>>24){l=1;return l|0}kh(g+(c<<2)|0,0,(e<<24>>24)-c<<2|0)|0;l=1;return l|0}case 9:{k=a+24|0;i=b[k>>0]|0;if((i<<24>>24>e<<24>>24?e:i)<<24>>24>0){c=f[c>>2]|0;l=f[f[a>>2]>>2]|0;i=a+40|0;c=Qk(f[i>>2]|0,f[i+4>>2]|0,c|0,((c|0)<0)<<31>>31|0)|0;a=a+48|0;a=Hl(c|0,I|0,f[a>>2]|0,f[a+4>>2]|0)|0;c=0;a=l+a|0;while(1){f[g+(c<<2)>>2]=f[a>>2];c=c+1|0;i=b[k>>0]|0;if((c|0)>=((i<<24>>24>e<<24>>24?e:i)<<24>>24|0))break;else a=a+4|0}}c=i<<24>>24;if(i<<24>>24>=e<<24>>24){l=1;return l|0}kh(g+(c<<2)|0,0,(e<<24>>24)-c<<2|0)|0;l=1;return l|0}case 10:{k=a+24|0;i=b[k>>0]|0;if((i<<24>>24>e<<24>>24?e:i)<<24>>24>0){c=f[c>>2]|0;l=f[f[a>>2]>>2]|0;i=a+40|0;c=Qk(f[i>>2]|0,f[i+4>>2]|0,c|0,((c|0)<0)<<31>>31|0)|0;a=a+48|0;a=Hl(c|0,I|0,f[a>>2]|0,f[a+4>>2]|0)|0;c=0;a=l+a|0;while(1){m=$(+p[a>>3]);n[g+(c<<2)>>2]=m;c=c+1|0;i=b[k>>0]|0;if((c|0)>=((i<<24>>24>e<<24>>24?e:i)<<24>>24|0))break;else a=a+8|0}}c=i<<24>>24;if(i<<24>>24>=e<<24>>24){l=1;return l|0}kh(g+(c<<2)|0,0,(e<<24>>24)-c<<2|0)|0;l=1;return l|0}case 11:{k=a+24|0;i=b[k>>0]|0;if((i<<24>>24>e<<24>>24?e:i)<<24>>24>0){c=f[c>>2]|0;l=f[f[a>>2]>>2]|0;i=a+40|0;c=Qk(f[i>>2]|0,f[i+4>>2]|0,c|0,((c|0)<0)<<31>>31|0)|0;a=a+48|0;a=Hl(c|0,I|0,f[a>>2]|0,f[a+4>>2]|0)|0;c=0;a=l+a|0;while(1){m=$((b[a>>0]|0)!=0&1);n[g+(c<<2)>>2]=m;c=c+1|0;i=b[k>>0]|0;if((c|0)>=((i<<24>>24>e<<24>>24?e:i)<<24>>24|0))break;else a=a+1|0}}c=i<<24>>24;if(i<<24>>24>=e<<24>>24){l=1;return l|0}kh(g+(c<<2)|0,0,(e<<24>>24)-c<<2|0)|0;l=1;return l|0}default:{l=0;return l|0}}while(0);return 0}function fb(a,c,d){a=a|0;c=c|0;d=d|0;var e=0,g=0,h=0,i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e=f[H>>2]|0;g=(f[F>>2]|0)+(f[G>>2]|0)|0;if((f[K>>2]|0)==(e|0))e=0;else e=(f[e+(((g>>>0)/341|0)<<2)>>2]|0)+(((g>>>0)%341|0)*12|0)|0;f[e>>2]=c;f[e+4>>2]=0;f[e+8>>2]=0;e=(f[F>>2]|0)+1|0;f[F>>2]=e;a:do if(e|0){v=a+104|0;D=a+92|0;t=d+4|0;w=a+96|0;C=a+48|0;z=a+44|0;B=a+28|0;y=a+24|0;A=a+88|0;x=a+84|0;b:while(1){q=f[G>>2]|0;g=e+-1|0;n=q+g|0;r=f[H>>2]|0;p=f[r+(((n>>>0)/341|0)<<2)>>2]|0;n=(n>>>0)%341|0;s=f[p+(n*12|0)>>2]|0;h=f[p+(n*12|0)+4>>2]|0;n=f[p+(n*12|0)+8>>2]|0;f[F>>2]=g;g=f[K>>2]|0;r=g-r>>2;if((1-e-q+((r|0)==0?0:(r*341|0)+-1|0)|0)>>>0>681){No(f[g+-4>>2]|0);f[K>>2]=(f[K>>2]|0)+-4}i=f[I>>2]|0;r=i+(n*12|0)|0;q=(f[E>>2]|0)+(n*12|0)|0;g=al(a,s,q,h)|0;e=(f[a>>2]|0)-(f[(f[q>>2]|0)+(g<<2)>>2]|0)|0;c:do if(!e)if((s|0)>0){j=i+(n*12|0)+4|0;k=f[d>>2]|0;n=k+84|0;i=k+68|0;l=k+40|0;k=k+64|0;g=f[t>>2]|0;m=0;while(1){e=g;g=g+1|0;f[t>>2]=g;h=f[r>>2]|0;if(((f[j>>2]|0)-h|0)!=12){o=31;break b}if(!(b[n>>0]|0))e=f[(f[i>>2]|0)+(e<<2)>>2]|0;p=l;q=f[p>>2]|0;p=Qk(q|0,f[p+4>>2]|0,e|0,((e|0)<0)<<31>>31|0)|0;ef((f[f[k>>2]>>2]|0)+p|0,h|0,q|0)|0;m=m+1|0;if((m|0)>=(s|0)){o=23;break}}}else o=23;else{if(!s){o=36;break b}if(s>>>0<3){i=f[v>>2]|0;f[i>>2]=g;e=f[J>>2]|0;if(e>>>0>1){h=1;do{g=(g|0)==(e+-1|0)?0:g+1|0;f[i+(h<<2)>>2]=g;h=h+1|0;e=f[J>>2]|0}while(h>>>0>>0)}g=0;while(1){if(!e)i=f[D>>2]|0;else{l=f[v>>2]|0;m=f[D>>2]|0;n=f[q>>2]|0;i=m;o=0;do{c=l+(o<<2)|0;f[m+(f[c>>2]<<2)>>2]=0;e=f[c>>2]|0;p=(f[a>>2]|0)-(f[n+(e<<2)>>2]|0)|0;do if(p|0){h=m+(e<<2)|0;if((p|0)>=33){o=50;break b}if((p|0)<=0){o=52;break b}j=f[C>>2]|0;k=32-j|0;e=f[z>>2]|0;j=f[e>>2]<(k|0)){p=p-k|0;f[C>>2]=p;e=e+4|0;f[z>>2]=e;p=32-p|0;f[h>>2]=(f[e>>2]|0)>>>p|j>>>(p-k|0);break}f[h>>2]=j>>>(32-p|0);p=(f[C>>2]|0)+p|0;f[C>>2]=p;if((p|0)!=32)break;f[z>>2]=e+4;f[C>>2]=0}while(0);c=f[c>>2]|0;p=m+(c<<2)|0;f[p>>2]=f[p>>2]|f[(f[r>>2]|0)+(c<<2)>>2];o=o+1|0}while(o>>>0<(f[J>>2]|0)>>>0)}h=f[d>>2]|0;e=f[t>>2]|0;f[t>>2]=e+1;if(((f[w>>2]|0)-i|0)!=12){o=45;break b}if(!(b[h+84>>0]|0))e=f[(f[h+68>>2]|0)+(e<<2)>>2]|0;o=h+40|0;p=f[o>>2]|0;o=Qk(p|0,f[o+4>>2]|0,e|0,((e|0)<0)<<31>>31|0)|0;ef((f[f[h+64>>2]>>2]|0)+o|0,i|0,p|0)|0;g=g+1|0;if(g>>>0>=s>>>0){o=23;break c}e=f[J>>2]|0}}k=1<>2]|0;e=f[r>>2]|0;j=e;i=f[(f[I>>2]|0)+(c*12|0)>>2]|0;if((h|0)!=(e|0)){h=h-e>>2;e=0;do{f[i+(e<<2)>>2]=f[j+(e<<2)>>2];e=e+1|0}while(e>>>0>>0)}r=i+(g<<2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>2]|0;i=f[H>>2]|0}e=h+e|0;if((j|0)==(i|0))e=0;else e=(f[i+(((e>>>0)/341|0)<<2)>>2]|0)+(((e>>>0)%341|0)*12|0)|0;f[e>>2]=m;f[e+4>>2]=g;f[e+8>>2]=c;e=(f[F>>2]|0)+1|0;f[F>>2]=e}while(0);if((o|0)==23){o=0;e=f[F>>2]|0}if(!e)break a}if((o|0)==31)ra(4996,5026,51,5144);else if((o|0)==36)ra(17588,17626,223,17767);else if((o|0)==45)ra(4996,5026,51,5144);else if((o|0)==50)ra(17782,17806,48,17908);else if((o|0)==52)ra(17937,17806,49,17908);else if((o|0)==64)ra(17782,17806,48,17908);else if((o|0)==66)ra(17937,17806,49,17908)}while(0);e=f[H>>2]|0;g=f[G>>2]|0;i=e+(((g>>>0)/341|0)<<2)|0;h=f[K>>2]|0;k=h;l=e;if((h|0)==(e|0)){j=0;g=0}else{g=(f[i>>2]|0)+(((g>>>0)%341|0)*12|0)|0;j=g}d:while(1){do{if((g|0)==(j|0))break d;g=g+12|0}while((g-(f[i>>2]|0)|0)!=4092);g=i+4|0;i=g;g=f[g>>2]|0}f[F>>2]=0;g=k-l>>2;if(g>>>0>2)do{No(f[e>>2]|0);e=(f[H>>2]|0)+4|0;f[H>>2]=e;h=f[K>>2]|0;g=h-e>>2}while(g>>>0>2);switch(g|0){case 1:{g=170;o=102;break}case 2:{g=341;o=102;break}default:{}}if((o|0)==102)f[G>>2]=g;if((e|0)!=(h|0)){do{No(f[e>>2]|0);e=e+4|0}while((e|0)!=(h|0));e=f[H>>2]|0;g=f[K>>2]|0;if((g|0)!=(e|0))f[K>>2]=g+(~((g+-4-e|0)>>>2)<<2)}e=f[L>>2]|0;if(!e){u=M;return}No(e);u=M;return}function gb(a,b,c){a=a|0;b=b|0;c=c|0;var d=0,e=0,g=0,h=0,i=0,j=0,k=0,l=0,m=0,n=0,o=0,p=0,q=0,r=0,s=0,t=0,v=0,w=0,x=0,y=0,z=0,A=0,B=0,C=0,D=0,E=0,F=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;else d=(f[d+(((e>>>0)/341|0)<<2)>>2]|0)+(((e>>>0)%341|0)*12|0)|0;f[d>>2]=b;f[d+4>>2]=0;f[d+8>>2]=0;d=(f[I>>2]|0)+1|0;f[I>>2]=d;a:do if(d|0){w=a+104|0;v=a+92|0;B=N+4|0;D=N+8|0;G=a+48|0;z=a+44|0;F=a+28|0;y=a+24|0;E=a+88|0;x=a+84|0;A=N+4|0;C=N+8|0;b:while(1){r=f[J>>2]|0;e=d+-1|0;m=r+e|0;s=f[K>>2]|0;q=f[s+(((m>>>0)/341|0)<<2)>>2]|0;m=(m>>>0)%341|0;t=f[q+(m*12|0)>>2]|0;g=f[q+(m*12|0)+4>>2]|0;m=f[q+(m*12|0)+8>>2]|0;f[I>>2]=e;e=f[O>>2]|0;s=e-s>>2;if((1-d-r+((s|0)==0?0:(s*341|0)+-1|0)|0)>>>0>681){No(f[e+-4>>2]|0);f[O>>2]=(f[O>>2]|0)+-4}h=f[L>>2]|0;s=h+(m*12|0)|0;r=(f[H>>2]|0)+(m*12|0)|0;e=al(a,t,r,g)|0;d=(f[a>>2]|0)-(f[(f[r>>2]|0)+(e<<2)>>2]|0)|0;c:do if(!d)if((t|0)>0){j=f[c>>2]|0;g=j+4|0;h=j+8|0;i=0;do{e=f[s>>2]|0;d=f[e>>2]|0;f[N>>2]=d;f[A>>2]=f[e+4>>2];f[C>>2]=f[e+8>>2];e=f[g>>2]|0;if(e>>>0<(f[h>>2]|0)>>>0){f[e>>2]=d;f[e+4>>2]=f[A>>2];f[e+8>>2]=f[C>>2];f[g>>2]=e+12}else Kf(j,N);i=i+1|0}while((i|0)<(t|0));n=23}else n=23;else{if(!t){n=35;break b}if(t>>>0<3){h=f[w>>2]|0;f[h>>2]=e;d=f[M>>2]|0;if(d>>>0>1){g=1;do{e=(e|0)==(d+-1|0)?0:e+1|0;f[h+(g<<2)>>2]=e;g=g+1|0;d=f[M>>2]|0}while(g>>>0>>0)}q=f[c>>2]|0;o=q+4|0;p=q+8|0;e=0;while(1){if(d|0){j=f[w>>2]|0;k=f[v>>2]|0;l=f[r>>2]|0;b=0;do{m=j+(b<<2)|0;f[k+(f[m>>2]<<2)>>2]=0;d=f[m>>2]|0;n=(f[a>>2]|0)-(f[l+(d<<2)>>2]|0)|0;do if(n|0){g=k+(d<<2)|0;if((n|0)>=33){n=44;break b}if((n|0)<=0){n=46;break b}h=f[G>>2]|0;i=32-h|0;d=f[z>>2]|0;h=f[d>>2]<(i|0)){n=n-i|0;f[G>>2]=n;d=d+4|0;f[z>>2]=d;n=32-n|0;f[g>>2]=(f[d>>2]|0)>>>n|h>>>(n-i|0);break}f[g>>2]=h>>>(32-n|0);n=(f[G>>2]|0)+n|0;f[G>>2]=n;if((n|0)!=32)break;f[z>>2]=d+4;f[G>>2]=0}while(0);m=f[m>>2]|0;n=k+(m<<2)|0;f[n>>2]=f[n>>2]|f[(f[s>>2]|0)+(m<<2)>>2];b=b+1|0}while(b>>>0<(f[M>>2]|0)>>>0)}g=f[v>>2]|0;d=f[g>>2]|0;f[N>>2]=d;f[B>>2]=f[g+4>>2];f[D>>2]=f[g+8>>2];g=f[o>>2]|0;if(g>>>0<(f[p>>2]|0)>>>0){f[g>>2]=d;f[g+4>>2]=f[B>>2];f[g+8>>2]=f[D>>2];f[o>>2]=g+12}else Kf(q,N);e=e+1|0;if(e>>>0>=t>>>0){n=23;break c}d=f[M>>2]|0}}j=1<>2]|0;d=f[s>>2]|0;i=d;h=f[(f[L>>2]|0)+(b*12|0)>>2]|0;if((g|0)!=(d|0)){g=g-d>>2;d=0;do{f[h+(d<<2)>>2]=f[i+(d<<2)>>2];d=d+1|0}while(d>>>0>>0)}s=h+(e<<2)|0;f[s>>2]=(f[s>>2]|0)+j;j=(_(t|0)|0)^31;if(j>>>0>=33){n=61;break b}if(!j){n=63;break b}h=f[F>>2]|0;g=32-h|0;i=f[y>>2]|0;d=f[i>>2]<>>(32-j|0);s=h+j|0;f[F>>2]=s;if((s|0)==32){f[y>>2]=i+4;f[F>>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0)==23){n=0;d=f[I>>2]|0}if(!d)break a}if((n|0)==35)ra(17588,17626,223,17767);else if((n|0)==44)ra(17782,17806,48,17908);else if((n|0)==46)ra(17937,17806,49,17908);else if((n|0)==61)ra(17782,17806,48,17908);else if((n|0)==63)ra(17937,17806,49,17908)}while(0);d=f[K>>2]|0;e=f[J>>2]|0;h=d+(((e>>>0)/341|0)<<2)|0;g=f[O>>2]|0;j=g;k=d;if((g|0)==(d|0)){i=0;e=0}else{e=(f[h>>2]|0)+(((e>>>0)%341|0)*12|0)|0;i=e}d:while(1){do{if((e|0)==(i|0))break d;e=e+12|0}while((e-(f[h>>2]|0)|0)!=4092);e=h+4|0;h=e;e=f[e>>2]|0}f[I>>2]=0;e=j-k>>2;if(e>>>0>2)do{No(f[d>>2]|0);d=(f[K>>2]|0)+4|0;f[K>>2]=d;g=f[O>>2]|0;e=g-d>>2}while(e>>>0>2);switch(e|0){case 1:{e=170;n=99;break}case 2:{e=341;n=99;break}default:{}}if((n|0)==99)f[J>>2]=e;if((d|0)!=(g|0)){do{No(f[d>>2]|0);d=d+4|0}while((d|0)!=(g|0));d=f[K>>2]|0;e=f[O>>2]|0;if((e|0)!=(d|0))f[O>>2]=e+(~((e+-4-d|0)>>>2)<<2)}d=f[P>>2]|0;if(!d){u=Q;return}No(d);u=Q;return}function hb(a,c,d){a=a|0;c=c|0;d=d|0;var e=0,g=0,h=0,i=0,j=0,k=0,l=0,m=0,n=0,o=0,p=0,q=0,r=0,s=0,t=0,v=0,w=0,x=0,y=0,z=0,A=0,B=0,C=0,D=0,E=0,F=0,G=0,H=0,I=0,J=0,K=0,L=0,M=0,N=0,O=0;O=u;u=u+32|0;N=O;L=a+8|0;j=f[L>>2]|0;f[N>>2]=0;l=N+4|0;f[l>>2]=0;f[N+8>>2]=0;do if(j)if(j>>>0>1073741823)co(N);else{M=j<<2;g=Rk(M)|0;f[N>>2]=g;i=g+(j<<2)|0;f[N+8>>2]=i;kh(g|0,0,M|0)|0;f[l>>2]=i;break}else{i=0;g=0}while(0);K=a+116|0;n=f[K>>2]|0;k=f[n>>2]|0;m=n+4|0;if(!k){k=g;g=n+8|0}else{g=f[m>>2]|0;if((g|0)!=(k|0))f[m>>2]=g+(~((g+-4-k|0)>>>2)<<2);No(k);g=n+8|0;f[g>>2]=0;f[m>>2]=0;f[n>>2]=0;k=f[N>>2]|0;i=f[l>>2]|0;j=f[L>>2]|0}f[n>>2]=k;f[m>>2]=i;f[g>>2]=f[N+8>>2];f[N>>2]=0;i=N+4|0;f[i>>2]=0;f[N+8>>2]=0;do if(j)if(j>>>0>1073741823)co(N);else{M=j<<2;h=Rk(M)|0;f[N>>2]=h;e=h+(j<<2)|0;f[N+8>>2]=e;kh(h|0,0,M|0)|0;f[i>>2]=e;break}else{e=0;h=0}while(0);G=a+128|0;k=f[G>>2]|0;g=f[k>>2]|0;j=k+4|0;if(!g)g=k+8|0;else{e=f[j>>2]|0;if((e|0)!=(g|0))f[j>>2]=e+(~((e+-4-g|0)>>>2)<<2);No(g);g=k+8|0;f[g>>2]=0;f[j>>2]=0;f[k>>2]=0;h=f[N>>2]|0;e=f[i>>2]|0}f[k>>2]=h;f[j>>2]=e;f[g>>2]=f[N+8>>2];f[N>>2]=0;f[N+4>>2]=0;f[N+8>>2]=0;f[N+12>>2]=0;f[N+16>>2]=0;f[N+20>>2]=0;M=N+8|0;J=N+4|0;I=N+16|0;H=N+20|0;ec(N);e=f[J>>2]|0;g=(f[H>>2]|0)+(f[I>>2]|0)|0;if((f[M>>2]|0)==(e|0))e=0;else e=(f[e+(((g>>>0)/341|0)<<2)>>2]|0)+(((g>>>0)%341|0)*12|0)|0;f[e>>2]=c;f[e+4>>2]=0;f[e+8>>2]=0;e=(f[H>>2]|0)+1|0;f[H>>2]=e;a:do if(e|0){w=a+104|0;E=a+92|0;v=d+4|0;x=a+96|0;D=a+48|0;A=a+44|0;C=a+28|0;z=a+24|0;B=a+88|0;y=a+84|0;b:while(1){r=f[I>>2]|0;g=e+-1|0;o=r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|0;do if(p|0){h=m+(e<<2)|0;if((p|0)>=33){F=50;break b}if((p|0)<=0){F=52;break b}j=f[D>>2]|0;k=32-j|0;e=f[A>>2]|0;j=f[e>>2]<(k|0)){F=p-k|0;f[D>>2]=F;s=e+4|0;f[A>>2]=s;F=32-F|0;f[h>>2]=(f[s>>2]|0)>>>F|j>>>(F-k|0);break}f[h>>2]=j>>>(32-p|0);F=(f[D>>2]|0)+p|0;f[D>>2]=F;if((F|0)!=32)break;f[A>>2]=e+4;f[D>>2]=0}while(0);s=f[c>>2]|0;F=m+(s<<2)|0;f[F>>2]=f[F>>2]|f[(f[r>>2]|0)+(s<<2)>>2];o=o+1|0}while(o>>>0<(f[L>>2]|0)>>>0)}h=f[d>>2]|0;e=f[v>>2]|0;f[v>>2]=e+1;if(((f[x>>2]|0)-i|0)!=12){F=45;break b}if(!(b[h+84>>0]|0))e=f[(f[h+68>>2]|0)+(e<<2)>>2]|0;s=h+40|0;F=f[s>>2]|0;s=Qk(F|0,f[s+4>>2]|0,e|0,((e|0)<0)<<31>>31|0)|0;ef((f[f[h+64>>2]>>2]|0)+s|0,i|0,F|0)|0;g=g+1|0;if(g>>>0>=t>>>0){F=23;break c}e=f[L>>2]|0}}k=1<>2]|0;e=f[r>>2]|0;j=e;i=f[i+(p*12|0)>>2]|0;if((h|0)!=(e|0)){h=h-e>>2;e=0;do{f[i+(e<<2)>>2]=f[j+(e<<2)>>2];e=e+1|0}while(e>>>0>>0)}r=i+(s<<2)|0;f[r>>2]=(f[r>>2]|0)+k;k=(_(t|0)|0)^31;if(k>>>0>=33){F=64;break b}if(!k){F=66;break b}i=f[C>>2]|0;h=32-i|0;j=f[z>>2]|0;e=f[j>>2]<>>(32-k|0);r=i+k|0;f[C>>2]=r;if((r|0)==32){f[z>>2]=j+4;f[C>>2]=0}}else{r=k-h|0;f[C>>2]=r;q=j+4|0;f[z>>2]=q;r=32-r|0;e=(f[q>>2]|0)>>>r|e>>>(r-h|0)}j=(t>>>1)-e|0;h=t-j|0;if((j|0)==(h|0))k=j;else{t=f[B>>2]|0;e=f[y>>2]|0;i=(f[e>>2]&1<<31-t|0)!=0;t=t+1|0;f[B>>2]=t;if((t|0)==32){f[y>>2]=e+4;f[B>>2]=0}k=i?j:h;j=i?h:j}f[l>>2]=(f[l>>2]|0)+1;e=f[m+(o*12|0)+4>>2]|0;if((e|0)!=(n|0)){i=f[m+(p*12|0)>>2]|0;h=e-n>>2;e=0;do{f[i+(e<<2)>>2]=f[c+(e<<2)>>2];e=e+1|0}while(e>>>0>>0)}if(k|0){i=f[J>>2]|0;t=g-i>>2;e=f[I>>2]|0;h=f[H>>2]|0;if((((t|0)==0?0:(t*341|0)+-1|0)|0)==(h+e|0)){ec(N);e=f[I>>2]|0;h=f[H>>2]|0;g=f[M>>2]|0;i=f[J>>2]|0}e=h+e|0;if((g|0)==(i|0))e=0;else e=(f[i+(((e>>>0)/341|0)<<2)>>2]|0)+(((e>>>0)%341|0)*12|0)|0;f[e>>2]=k;f[e+4>>2]=s;f[e+8>>2]=o;f[H>>2]=(f[H>>2]|0)+1}if(!j){F=23;break}i=f[M>>2]|0;h=f[J>>2]|0;t=i-h>>2;e=f[I>>2]|0;g=f[H>>2]|0;if((((t|0)==0?0:(t*341|0)+-1|0)|0)==(g+e|0)){ec(N);e=f[I>>2]|0;g=f[H>>2]|0;i=f[M>>2]|0;h=f[J>>2]|0}e=g+e|0;if((i|0)==(h|0))e=0;else e=(f[h+(((e>>>0)/341|0)<<2)>>2]|0)+(((e>>>0)%341|0)*12|0)|0;f[e>>2]=j;f[e+4>>2]=s;f[e+8>>2]=p;e=(f[H>>2]|0)+1|0;f[H>>2]=e}while(0);if((F|0)==23){F=0;e=f[H>>2]|0}if(!e)break a}if((F|0)==31)ra(4996,5026,51,5144);else if((F|0)==36)ra(17588,17626,223,17767);else if((F|0)==45)ra(4996,5026,51,5144);else if((F|0)==50)ra(17782,17806,48,17908);else if((F|0)==52)ra(17937,17806,49,17908);else if((F|0)==64)ra(17782,17806,48,17908);else if((F|0)==66)ra(17937,17806,49,17908)}while(0);e=f[J>>2]|0;g=f[I>>2]|0;i=e+(((g>>>0)/341|0)<<2)|0;h=f[M>>2]|0;k=h;l=e;if((h|0)==(e|0)){j=0;g=0}else{g=(f[i>>2]|0)+(((g>>>0)%341|0)*12|0)|0;j=g}d:while(1){do{if((g|0)==(j|0))break d;g=g+12|0}while((g-(f[i>>2]|0)|0)!=4092);g=i+4|0;i=g;g=f[g>>2]|0}f[H>>2]=0;g=k-l>>2;if(g>>>0>2)do{No(f[e>>2]|0);e=(f[J>>2]|0)+4|0;f[J>>2]=e;h=f[M>>2]|0;g=h-e>>2}while(g>>>0>2);switch(g|0){case 1:{g=170;F=102;break}case 2:{g=341;F=102;break}default:{}}if((F|0)==102)f[I>>2]=g;if((e|0)!=(h|0)){do{No(f[e>>2]|0);e=e+4|0}while((e|0)!=(h|0));e=f[J>>2]|0;g=f[M>>2]|0;if((g|0)!=(e|0))f[M>>2]=g+(~((g+-4-e|0)>>>2)<<2)}e=f[N>>2]|0;if(!e){u=O;return}No(e);u=O;return}function ib(a,b,c){a=a|0;b=b|0;c=c|0;var d=0,e=0,g=0,h=0,i=0,j=0,k=0,l=0,m=0,n=0,o=0,p=0,q=0,r=0,s=0,t=0,v=0,w=0,x=0,y=0,z=0,A=0,B=0,C=0,D=0,E=0,F=0,G=0,H=0,I=0,J=0,K=0,L=0,M=0,N=0,O=0,P=0,Q=0;Q=u;u=u+48|0;N=Q+24|0;P=Q;M=a+8|0;i=f[M>>2]|0;f[N>>2]=0;k=N+4|0;f[k>>2]=0;f[N+8>>2]=0;do if(i)if(i>>>0>1073741823)co(N);else{O=i<<2;e=Rk(O)|0;f[N>>2]=e;h=e+(i<<2)|0;f[N+8>>2]=h;kh(e|0,0,O|0)|0;f[k>>2]=h;break}else{h=0;e=0}while(0);L=a+116|0;m=f[L>>2]|0;j=f[m>>2]|0;l=m+4|0;if(!j){j=e;e=m+8|0}else{e=f[l>>2]|0;if((e|0)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|0;g=f[p+(n*12|0)+4>>2]|0;n=f[p+(n*12|0)+8>>2]|0;f[I>>2]=e;e=f[O>>2]|0;s=e-s>>2;if((1-d-r+((s|0)==0?0:(s*341|0)+-1|0)|0)>>>0>681){No(f[e+-4>>2]|0);e=(f[O>>2]|0)+-4|0;f[O>>2]=e}h=f[L>>2]|0;s=h+(n*12|0)|0;l=f[H>>2]|0;p=((f[M>>2]|0)+-1|0)==(g|0)?0:g+1|0;r=l+(n*12|0)|0;b=f[r>>2]|0;k=b+(p<<2)|0;d=(f[a>>2]|0)-(f[k>>2]|0)|0;m=b;c:do if(!d)if((t|0)>0){j=f[c>>2]|0;g=j+4|0;h=j+8|0;i=0;do{e=f[s>>2]|0;d=f[e>>2]|0;f[N>>2]=d;f[A>>2]=f[e+4>>2];f[C>>2]=f[e+8>>2];e=f[g>>2]|0;if(e>>>0<(f[h>>2]|0)>>>0){f[e>>2]=d;f[e+4>>2]=f[A>>2];f[e+8>>2]=f[C>>2];f[g>>2]=e+12}else Kf(j,N);i=i+1|0}while((i|0)<(t|0));q=23}else q=23;else{if(!t){q=35;break b}if(t>>>0<3){h=f[w>>2]|0;f[h>>2]=p;d=f[M>>2]|0;if(d>>>0>1){e=p;g=1;do{e=(e|0)==(d+-1|0)?0:e+1|0;f[h+(g<<2)>>2]=e;g=g+1|0;d=f[M>>2]|0}while(g>>>0>>0)}q=f[c>>2]|0;o=q+4|0;p=q+8|0;e=0;while(1){if(d|0){j=f[w>>2]|0;k=f[v>>2]|0;l=f[r>>2]|0;b=0;do{m=j+(b<<2)|0;f[k+(f[m>>2]<<2)>>2]=0;d=f[m>>2]|0;n=(f[a>>2]|0)-(f[l+(d<<2)>>2]|0)|0;do if(n|0){g=k+(d<<2)|0;if((n|0)>=33){q=44;break b}if((n|0)<=0){q=46;break b}h=f[G>>2]|0;i=32-h|0;d=f[z>>2]|0;h=f[d>>2]<(i|0)){n=n-i|0;f[G>>2]=n;d=d+4|0;f[z>>2]=d;n=32-n|0;f[g>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l+(o*12|0)>>2]|0;g=d-m>>2;d=0;do{f[h+(d<<2)>>2]=f[b+(d<<2)>>2];d=d+1|0}while(d>>>0>>0)}if(j|0){h=f[K>>2]|0;t=e-h>>2;d=f[J>>2]|0;g=f[I>>2]|0;if((((t|0)==0?0:(t*341|0)+-1|0)|0)==(g+d|0)){ec(P);d=f[J>>2]|0;g=f[I>>2]|0;e=f[O>>2]|0;h=f[K>>2]|0}d=g+d|0;if((e|0)==(h|0))d=0;else d=(f[h+(((d>>>0)/341|0)<<2)>>2]|0)+(((d>>>0)%341|0)*12|0)|0;f[d>>2]=j;f[d+4>>2]=p;f[d+8>>2]=n;f[I>>2]=(f[I>>2]|0)+1}if(!i){q=23;break}h=f[O>>2]|0;g=f[K>>2]|0;t=h-g>>2;d=f[J>>2]|0;e=f[I>>2]|0;if((((t|0)==0?0:(t*341|0)+-1|0)|0)==(e+d|0)){ec(P);d=f[J>>2]|0;e=f[I>>2]|0;h=f[O>>2]|0;g=f[K>>2]|0}d=e+d|0;if((h|0)==(g|0))d=0;else d=(f[g+(((d>>>0)/341|0)<<2)>>2]|0)+(((d>>>0)%341|0)*12|0)|0;f[d>>2]=i;f[d+4>>2]=p;f[d+8>>2]=o;d=(f[I>>2]|0)+1|0;f[I>>2]=d}while(0);if((q|0)==23){q=0;d=f[I>>2]|0}if(!d)break a}if((q|0)==35)ra(17588,17626,223,17767);else if((q|0)==44)ra(17782,17806,48,17908);else if((q|0)==46)ra(17937,17806,49,17908);else if((q|0)==61)ra(17782,17806,48,17908);else if((q|0)==63)ra(17937,17806,49,17908)}while(0);d=f[K>>2]|0;e=f[J>>2]|0;h=d+(((e>>>0)/341|0)<<2)|0;g=f[O>>2]|0;j=g;k=d;if((g|0)==(d|0)){i=0;e=0}else{e=(f[h>>2]|0)+(((e>>>0)%341|0)*12|0)|0;i=e}d:while(1){do{if((e|0)==(i|0))break d;e=e+12|0}while((e-(f[h>>2]|0)|0)!=4092);e=h+4|0;h=e;e=f[e>>2]|0}f[I>>2]=0;e=j-k>>2;if(e>>>0>2)do{No(f[d>>2]|0);d=(f[K>>2]|0)+4|0;f[K>>2]=d;g=f[O>>2]|0;e=g-d>>2}while(e>>>0>2);switch(e|0){case 1:{e=170;q=99;break}case 2:{e=341;q=99;break}default:{}}if((q|0)==99)f[J>>2]=e;if((d|0)!=(g|0)){do{No(f[d>>2]|0);d=d+4|0}while((d|0)!=(g|0));d=f[K>>2]|0;e=f[O>>2]|0;if((e|0)!=(d|0))f[O>>2]=e+(~((e+-4-d|0)>>>2)<<2)}d=f[P>>2]|0;if(!d){u=Q;return}No(d);u=Q;return}function jb(a,b,c,d,e,g){a=a|0;b=b|0;c=c|0;d=d|0;e=e|0;g=g|0;var h=0,i=0,j=0,k=0,l=0,m=0,n=0,o=0,p=0,q=0,r=0,s=0,t=0,v=0,w=0,x=0,y=0,z=0,A=0,B=0,C=0,D=0,E=0,F=0,G=0,H=0,I=0,J=0,K=0,L=0,M=0,N=0,O=0,P=0,Q=0,R=0,S=0,T=0,U=0,V=0;V=u;u=u+64|0;U=V+16|0;I=V;H=a+8|0;f[H>>2]=e;i=a+32|0;h=a+36|0;g=f[h>>2]|0;d=f[i>>2]|0;j=g-d>>2;if(j>>>0>=e>>>0){if(j>>>0>e>>>0?(k=d+(e<<2)|0,(g|0)!=(k|0)):0)f[h>>2]=g+(~((g+-4-k|0)>>>2)<<2)}else vg(i,e-j|0);d=U;g=d+48|0;do{f[d>>2]=0;d=d+4|0}while((d|0)<(g|0));f[I>>2]=0;if(!e){d=0;g=0}else{Af(U,e,I);d=f[U+12>>2]|0;g=f[U+16>>2]|0}f[I>>2]=0;h=U+16|0;i=g-d>>2;if(i>>>0>=e>>>0){if(i>>>0>e>>>0?(l=d+(e<<2)|0,(g|0)!=(l|0)):0)f[h>>2]=g+(~((g+-4-l|0)>>>2)<<2)}else Af(U+12|0,e-i|0,I);i=U+24|0;f[I>>2]=0;h=U+28|0;g=f[h>>2]|0;d=f[i>>2]|0;j=g-d>>2;if(j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>4){x=B+64|0;t=B+28|0;w=(e|0)>0;z=a+16|0;v=a+32|0;A=a+12|0;y=a+20|0;s=e<<2;if(g-h>>2>>>0>1){q=h;Q=1}else{r=d;co(r)}while(1){n=f[q+(Q<<2)>>2]|0;q=n+((n|0)<0?0:((n>>>0)%3|0|0)==0?2:-1)|0;p=q>>>5;r=1<<(q&31);o=(q|0)<0;g=n;m=1;d=0;a:while(1){do{if((g|0)<=-1){r=63;break a}h=f[U+(d*12|0)>>2]|0;if(((f[(f[B>>2]|0)+(g>>>5<<2)>>2]&1<<(g&31)|0)==0?(R=f[(f[(f[x>>2]|0)+12>>2]|0)+(g<<2)>>2]|0,(R|0)>=0):0)?(L=f[t>>2]|0,l=f[C>>2]|0,J=f[l+(f[L+(R<<2)>>2]<<2)>>2]|0,K=R+1|0,K=f[l+(f[L+((((K|0)%3|0|0)==0?R+-2|0:K)<<2)>>2]<<2)>>2]|0,L=f[l+(f[L+((((R>>>0)%3|0|0)==0?2:-1)+R<<2)>>2]<<2)>>2]|0,(J|0)<(Q|0)&(K|0)<(Q|0)&(L|0)<(Q|0)):0){j=X(J,e)|0;k=X(K,e)|0;l=X(L,e)|0;if(w){i=0;do{f[h+(i<<2)>>2]=(f[c+(i+l<<2)>>2]|0)+(f[c+(i+k<<2)>>2]|0)-(f[c+(i+j<<2)>>2]|0);i=i+1|0}while((i|0)!=(e|0))}d=d+1|0;if((d|0)==4){d=4;r=44;break a}}do if(m){h=g+1|0;g=((h|0)%3|0|0)==0?g+-2|0:h;h=f[B>>2]|0;if(!(f[h+(g>>>5<<2)>>2]&1<<(g&31))){if((g|0)>=0){g=f[(f[(f[x>>2]|0)+12>>2]|0)+(g<<2)>>2]|0;i=g+1|0;if((g|0)>=0)g=((i|0)%3|0|0)==0?g+-2|0:i}}else g=-1073741824}else{g=(((g>>>0)%3|0|0)==0?2:-1)+g|0;h=f[B>>2]|0;if(!(f[h+(g>>>5<<2)>>2]&1<<(g&31))){if((g|0)>=0){g=f[(f[(f[x>>2]|0)+12>>2]|0)+(g<<2)>>2]|0;if((g|0)>=0)if(!((g>>>0)%3|0)){g=g+2|0;break}else{g=g+-1|0;break}}}else g=-1073741824}while(0);if((g|0)==(n|0)){r=63;break a}}while(!(m&(g|0)<0));g=(r&f[h+(p<<2)>>2]|0)!=0;if(g|o){g=g?-1073741824:q;m=0;continue}g=f[(f[(f[x>>2]|0)+12>>2]|0)+(q<<2)>>2]|0;if((g|0)<0){m=0;continue}if(!((g>>>0)%3|0)){g=g+2|0;m=0;continue}else{g=g+-1|0;m=0;continue}}if((r|0)==63)if((d|0)>0)r=44;else{P=X(Q,e)|0;r=75}if((r|0)==44){r=0;if(w){kh(f[I>>2]|0,0,s|0)|0;j=d+-1|0;l=G+(j<<2)|0;j=f[a+60+(j*12|0)>>2]|0;k=f[I>>2]|0;m=0;g=0;do{q=f[l>>2]|0;f[l>>2]=q+1;if(!(f[j+(q>>>5<<2)>>2]&1<<(q&31))){h=f[U+(m*12|0)>>2]|0;i=0;do{q=k+(i<<2)|0;f[q>>2]=(f[q>>2]|0)+(f[h+(i<<2)>>2]|0);i=i+1|0}while((i|0)!=(e|0));g=g+1|0}m=m+1|0}while((m|0)!=(d|0))}else{h=d+-1|0;j=G+(h<<2)|0;h=f[a+60+(h*12|0)>>2]|0;i=f[j>>2]|0;k=0;g=0;do{q=i;i=i+1|0;f[j>>2]=i;g=g+((f[h+(q>>>5<<2)>>2]&1<<(q&31)|0)==0&1)|0;k=k+1|0}while((k|0)!=(d|0))}h=X(Q,e)|0;if(g){j=f[I>>2]|0;if(w){d=0;do{q=j+(d<<2)|0;f[q>>2]=(f[q>>2]|0)/(g|0)|0;d=d+1|0}while((d|0)!=(e|0))}l=b+(h<<2)|0;k=c+(h<<2)|0;if((f[H>>2]|0)>0){h=0;do{d=f[j+(h<<2)>>2]|0;g=f[z>>2]|0;if((d|0)>(g|0)){i=f[v>>2]|0;f[i+(h<<2)>>2]=g}else{q=f[A>>2]|0;i=f[v>>2]|0;f[i+(h<<2)>>2]=(d|0)<(q|0)?q:d}h=h+1|0;d=f[H>>2]|0}while((h|0)<(d|0));if((d|0)>0){h=0;do{d=(f[l+(h<<2)>>2]|0)+(f[i+(h<<2)>>2]|0)|0;g=k+(h<<2)|0;f[g>>2]=d;do if((d|0)>(f[z>>2]|0)){d=d-(f[y>>2]|0)|0;r=97}else{if((d|0)>=(f[A>>2]|0))break;d=(f[y>>2]|0)+d|0;r=97}while(0);if((r|0)==97){r=0;f[g>>2]=d}h=h+1|0}while((h|0)<(f[H>>2]|0))}}}else{P=h;r=75}}if((r|0)==75?(r=0,M=c+((X(Q+-1|0,e)|0)<<2)|0,N=b+(P<<2)|0,O=c+(P<<2)|0,(f[H>>2]|0)>0):0){h=0;do{d=f[M+(h<<2)>>2]|0;g=f[z>>2]|0;if((d|0)>(g|0)){i=f[v>>2]|0;f[i+(h<<2)>>2]=g}else{q=f[A>>2]|0;i=f[v>>2]|0;f[i+(h<<2)>>2]=(d|0)<(q|0)?q:d}h=h+1|0;d=f[H>>2]|0}while((h|0)<(d|0));if((d|0)>0){h=0;do{d=(f[N+(h<<2)>>2]|0)+(f[i+(h<<2)>>2]|0)|0;g=O+(h<<2)|0;f[g>>2]=d;if((d|0)<=(f[z>>2]|0)){if((d|0)<(f[A>>2]|0)){d=(f[y>>2]|0)+d|0;r=85}}else{d=d-(f[y>>2]|0)|0;r=85}if((r|0)==85){r=0;f[g>>2]=d}h=h+1|0}while((h|0)<(f[H>>2]|0))}}Q=Q+1|0;if((Q|0)>=(E|0)){r=28;break}d=f[D>>2]|0;q=f[d>>2]|0;if((f[d+4>>2]|0)-q>>2>>>0<=Q>>>0){r=34;break}}if((r|0)==28){T=f[I>>2]|0;S=T;break}else if((r|0)==34)co(d)}else{S=p;T=o}while(0);if(S|0){d=f[F>>2]|0;if((d|0)!=(S|0))f[F>>2]=d+(~((d+-4-S|0)>>>2)<<2);No(T)}No(G);g=f[U+36>>2]|0;if(g|0){h=U+40|0;d=f[h>>2]|0;if((d|0)!=(g|0))f[h>>2]=d+(~((d+-4-g|0)>>>2)<<2);No(g)}d=f[U+24>>2]|0;if(d|0){h=U+28|0;g=f[h>>2]|0;if((g|0)!=(d|0))f[h>>2]=g+(~((g+-4-d|0)>>>2)<<2);No(d)}d=f[U+12>>2]|0;if(d|0){h=U+16|0;g=f[h>>2]|0;if((g|0)!=(d|0))f[h>>2]=g+(~((g+-4-d|0)>>>2)<<2);No(d)}h=f[U>>2]|0;if(!h){u=V;return 1}g=U+4|0;d=f[g>>2]|0;if((d|0)!=(h|0))f[g>>2]=d+(~((d+-4-h|0)>>>2)<<2);No(h);u=V;return 1}function kb(a,c,d){a=a|0;c=c|0;d=d|0;var e=0,g=0,h=0,i=0,j=0,k=0,l=0,m=0,n=0,o=0,p=0,q=0,r=0,s=0,t=0,v=0,w=0,x=0,y=0,z=0,A=0,B=0,C=0,D=0,E=0,F=0,G=0,H=0,I=0,J=0,K=0;K=u;u=u+32|0;J=K;H=a+8|0;j=f[H>>2]|0;f[J>>2]=0;l=J+4|0;f[l>>2]=0;f[J+8>>2]=0;do if(j)if(j>>>0>1073741823)co(J);else{I=j<<2;g=Rk(I)|0;f[J>>2]=g;i=g+(j<<2)|0;f[J+8>>2]=i;kh(g|0,0,I|0)|0;f[l>>2]=i;break}else{i=0;g=0}while(0);G=a+624|0;n=f[G>>2]|0;k=f[n>>2]|0;m=n+4|0;if(!k){k=g;g=n+8|0}else{g=f[m>>2]|0;if((g|0)!=(k|0))f[m>>2]=g+(~((g+-4-k|0)>>>2)<<2);No(k);g=n+8|0;f[g>>2]=0;f[m>>2]=0;f[n>>2]=0;k=f[J>>2]|0;i=f[l>>2]|0;j=f[H>>2]|0}f[n>>2]=k;f[m>>2]=i;f[g>>2]=f[J+8>>2];f[J>>2]=0;i=J+4|0;f[i>>2]=0;f[J+8>>2]=0;do if(j)if(j>>>0>1073741823)co(J);else{I=j<<2;h=Rk(I)|0;f[J>>2]=h;e=h+(j<<2)|0;f[J+8>>2]=e;kh(h|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>>2]|0;n=k+84|0;i=k+68|0;l=k+40|0;k=k+64|0;g=f[t>>2]|0;m=0;while(1){e=g;g=g+1|0;f[t>>2]=g;h=f[r>>2]|0;if(((f[j>>2]|0)-h|0)!=12){o=31;break b}if(!(b[n>>0]|0))e=f[(f[i>>2]|0)+(e<<2)>>2]|0;p=l;q=f[p>>2]|0;p=Qk(q|0,f[p+4>>2]|0,e|0,((e|0)<0)<<31>>31|0)|0;ef((f[f[k>>2]>>2]|0)+p|0,h|0,q|0)|0;m=m+1|0;if((m|0)>=(s|0)){o=23;break}}}else o=23;else{if(!s){o=36;break b}if(s>>>0<3){i=f[v>>2]|0;f[i>>2]=g;e=f[H>>2]|0;if(e>>>0>1){h=1;do{g=(g|0)==(e+-1|0)?0:g+1|0;f[i+(h<<2)>>2]=g;h=h+1|0;e=f[H>>2]|0}while(h>>>0>>0)}g=0;while(1){if(!e)i=f[B>>2]|0;else{l=f[v>>2]|0;m=f[B>>2]|0;n=f[q>>2]|0;i=m;o=0;do{c=l+(o<<2)|0;f[m+(f[c>>2]<<2)>>2]=0;e=f[c>>2]|0;p=(f[a>>2]|0)-(f[n+(e<<2)>>2]|0)|0;do if(p|0){h=m+(e<<2)|0;if((p|0)>=33){o=50;break b}if((p|0)<=0){o=52;break b}j=f[A>>2]|0;k=32-j|0;e=f[y>>2]|0;j=f[e>>2]<(k|0)){p=p-k|0;f[A>>2]=p;e=e+4|0;f[y>>2]=e;p=32-p|0;f[h>>2]=(f[e>>2]|0)>>>p|j>>>(p-k|0);break}f[h>>2]=j>>>(32-p|0);p=(f[A>>2]|0)+p|0;f[A>>2]=p;if((p|0)!=32)break;f[y>>2]=e+4;f[A>>2]=0}while(0);c=f[c>>2]|0;p=m+(c<<2)|0;f[p>>2]=f[p>>2]|f[(f[r>>2]|0)+(c<<2)>>2];o=o+1|0}while(o>>>0<(f[H>>2]|0)>>>0)}h=f[d>>2]|0;e=f[t>>2]|0;f[t>>2]=e+1;if(((f[w>>2]|0)-i|0)!=12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0)%341|0)*12|0)|0;f[e>>2]=l;f[e+4>>2]=g;f[e+8>>2]=n;f[D>>2]=(f[D>>2]|0)+1}if(!m)o=23;else{j=f[I>>2]|0;i=f[F>>2]|0;s=j-i>>2;e=f[E>>2]|0;h=f[D>>2]|0;if((((s|0)==0?0:(s*341|0)+-1|0)|0)==(h+e|0)){ec(J);e=f[E>>2]|0;h=f[D>>2]|0;j=f[I>>2]|0;i=f[F>>2]|0}e=h+e|0;if((j|0)==(i|0))e=0;else e=(f[i+(((e>>>0)/341|0)<<2)>>2]|0)+(((e>>>0)%341|0)*12|0)|0;f[e>>2]=m;f[e+4>>2]=g;f[e+8>>2]=c;e=(f[D>>2]|0)+1|0;f[D>>2]=e}}while(0);if((o|0)==23){o=0;e=f[D>>2]|0}if(!e)break a}if((o|0)==31)ra(4996,5026,51,5144);else if((o|0)==36)ra(17588,17626,223,17767);else if((o|0)==45)ra(4996,5026,51,5144);else if((o|0)==50)ra(17782,17806,48,17908);else if((o|0)==52)ra(17937,17806,49,17908)}while(0);e=f[F>>2]|0;g=f[E>>2]|0;i=e+(((g>>>0)/341|0)<<2)|0;h=f[I>>2]|0;k=h;l=e;if((h|0)==(e|0)){j=0;g=0}else{g=(f[i>>2]|0)+(((g>>>0)%341|0)*12|0)|0;j=g}d:while(1){do{if((g|0)==(j|0))break d;g=g+12|0}while((g-(f[i>>2]|0)|0)!=4092);g=i+4|0;i=g;g=f[g>>2]|0}f[D>>2]=0;g=k-l>>2;if(g>>>0>2)do{No(f[e>>2]|0);e=(f[F>>2]|0)+4|0;f[F>>2]=e;h=f[I>>2]|0;g=h-e>>2}while(g>>>0>2);switch(g|0){case 1:{g=170;o=96;break}case 2:{g=341;o=96;break}default:{}}if((o|0)==96)f[E>>2]=g;if((e|0)!=(h|0)){do{No(f[e>>2]|0);e=e+4|0}while((e|0)!=(h|0));e=f[F>>2]|0;g=f[I>>2]|0;if((g|0)!=(e|0))f[I>>2]=g+(~((g+-4-e|0)>>>2)<<2)}e=f[J>>2]|0;if(!e){u=K;return}No(e);u=K;return}function lb(a,c,d){a=a|0;c=c|0;d=d|0;var e=0,g=0,h=0,i=0,j=0,k=0,l=0,m=0,n=0,o=0,p=0,q=0,r=0,s=0,t=0,v=0,w=0,x=0,y=0,z=0,A=0,B=0,C=0,D=0,E=0,F=0,G=0,H=0,I=0,J=0,K=0;K=u;u=u+32|0;J=K;H=a+8|0;j=f[H>>2]|0;f[J>>2]=0;l=J+4|0;f[l>>2]=0;f[J+8>>2]=0;do if(j)if(j>>>0>1073741823)co(J);else{I=j<<2;g=Rk(I)|0;f[J>>2]=g;i=g+(j<<2)|0;f[J+8>>2]=i;kh(g|0,0,I|0)|0;f[l>>2]=i;break}else{i=0;g=0}while(0);G=a+624|0;n=f[G>>2]|0;k=f[n>>2]|0;m=n+4|0;if(!k){k=g;g=n+8|0}else{g=f[m>>2]|0;if((g|0)!=(k|0))f[m>>2]=g+(~((g+-4-k|0)>>>2)<<2);No(k);g=n+8|0;f[g>>2]=0;f[m>>2]=0;f[n>>2]=0;k=f[J>>2]|0;i=f[l>>2]|0;j=f[H>>2]|0}f[n>>2]=k;f[m>>2]=i;f[g>>2]=f[J+8>>2];f[J>>2]=0;i=J+4|0;f[i>>2]=0;f[J+8>>2]=0;do if(j)if(j>>>0>1073741823)co(J);else{I=j<<2;h=Rk(I)|0;f[J>>2]=h;e=h+(j<<2)|0;f[J+8>>2]=e;kh(h|0,0,I|0)|0;f[i>>2]=e;break}else{e=0;h=0}while(0);C=a+636|0;k=f[C>>2]|0;g=f[k>>2]|0;j=k+4|0;if(!g)g=k+8|0;else{e=f[j>>2]|0;if((e|0)!=(g|0))f[j>>2]=e+(~((e+-4-g|0)>>>2)<<2);No(g);g=k+8|0;f[g>>2]=0;f[j>>2]=0;f[k>>2]=0;h=f[J>>2]|0;e=f[i>>2]|0}f[k>>2]=h;f[j>>2]=e;f[g>>2]=f[J+8>>2];f[J>>2]=0;f[J+4>>2]=0;f[J+8>>2]=0;f[J+12>>2]=0;f[J+16>>2]=0;f[J+20>>2]=0;I=J+8|0;F=J+4|0;E=J+16|0;D=J+20|0;ec(J);e=f[F>>2]|0;g=(f[D>>2]|0)+(f[E>>2]|0)|0;if((f[I>>2]|0)==(e|0))e=0;else e=(f[e+(((g>>>0)/341|0)<<2)>>2]|0)+(((g>>>0)%341|0)*12|0)|0;f[e>>2]=c;f[e+4>>2]=0;f[e+8>>2]=0;e=(f[D>>2]|0)+1|0;f[D>>2]=e;a:do if(e|0){v=a+612|0;B=a+600|0;t=d+4|0;w=a+604|0;A=a+556|0;y=a+552|0;z=a+596|0;x=a+592|0;b:while(1){q=f[E>>2]|0;g=e+-1|0;n=q+g|0;r=f[F>>2]|0;p=f[r+(((n>>>0)/341|0)<<2)>>2]|0;n=(n>>>0)%341|0;s=f[p+(n*12|0)>>2]|0;h=f[p+(n*12|0)+4>>2]|0;n=f[p+(n*12|0)+8>>2]|0;f[D>>2]=g;g=f[I>>2]|0;r=g-r>>2;if((1-e-q+((r|0)==0?0:(r*341|0)+-1|0)|0)>>>0>681){No(f[g+-4>>2]|0);f[I>>2]=(f[I>>2]|0)+-4}i=f[G>>2]|0;r=i+(n*12|0)|0;q=(f[C>>2]|0)+(n*12|0)|0;g=al(a,s,q,h)|0;e=(f[a>>2]|0)-(f[(f[q>>2]|0)+(g<<2)>>2]|0)|0;c:do if(!e)if((s|0)>0){j=i+(n*12|0)+4|0;k=f[d>>2]|0;n=k+84|0;i=k+68|0;l=k+40|0;k=k+64|0;g=f[t>>2]|0;m=0;while(1){e=g;g=g+1|0;f[t>>2]=g;h=f[r>>2]|0;if(((f[j>>2]|0)-h|0)!=12){o=31;break b}if(!(b[n>>0]|0))e=f[(f[i>>2]|0)+(e<<2)>>2]|0;p=l;q=f[p>>2]|0;p=Qk(q|0,f[p+4>>2]|0,e|0,((e|0)<0)<<31>>31|0)|0;ef((f[f[k>>2]>>2]|0)+p|0,h|0,q|0)|0;m=m+1|0;if((m|0)>=(s|0)){o=23;break}}}else o=23;else{if(!s){o=36;break b}if(s>>>0<3){i=f[v>>2]|0;f[i>>2]=g;e=f[H>>2]|0;if(e>>>0>1){h=1;do{g=(g|0)==(e+-1|0)?0:g+1|0;f[i+(h<<2)>>2]=g;h=h+1|0;e=f[H>>2]|0}while(h>>>0>>0)}g=0;while(1){if(!e)i=f[B>>2]|0;else{l=f[v>>2]|0;m=f[B>>2]|0;n=f[q>>2]|0;i=m;o=0;do{c=l+(o<<2)|0;f[m+(f[c>>2]<<2)>>2]=0;e=f[c>>2]|0;p=(f[a>>2]|0)-(f[n+(e<<2)>>2]|0)|0;do if(p|0){h=m+(e<<2)|0;if((p|0)>=33){o=50;break b}if((p|0)<=0){o=52;break b}j=f[A>>2]|0;k=32-j|0;e=f[y>>2]|0;j=f[e>>2]<(k|0)){p=p-k|0;f[A>>2]=p;e=e+4|0;f[y>>2]=e;p=32-p|0;f[h>>2]=(f[e>>2]|0)>>>p|j>>>(p-k|0);break}f[h>>2]=j>>>(32-p|0);p=(f[A>>2]|0)+p|0;f[A>>2]=p;if((p|0)!=32)break;f[y>>2]=e+4;f[A>>2]=0}while(0);c=f[c>>2]|0;p=m+(c<<2)|0;f[p>>2]=f[p>>2]|f[(f[r>>2]|0)+(c<<2)>>2];o=o+1|0}while(o>>>0<(f[H>>2]|0)>>>0)}h=f[d>>2]|0;e=f[t>>2]|0;f[t>>2]=e+1;if(((f[w>>2]|0)-i|0)!=12){o=45;break b}if(!(b[h+84>>0]|0))e=f[(f[h+68>>2]|0)+(e<<2)>>2]|0;o=h+40|0;p=f[o>>2]|0;o=Qk(p|0,f[o+4>>2]|0,e|0,((e|0)<0)<<31>>31|0)|0;ef((f[f[h+64>>2]>>2]|0)+o|0,i|0,p|0)|0;g=g+1|0;if(g>>>0>=s>>>0){o=23;break c}e=f[H>>2]|0}}k=1<>2]|0;e=f[r>>2]|0;j=e;i=f[(f[G>>2]|0)+(c*12|0)>>2]|0;if((h|0)!=(e|0)){h=h-e>>2;e=0;do{f[i+(e<<2)>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0)*12|0)|0;f[e>>2]=m;f[e+4>>2]=g;f[e+8>>2]=c;e=(f[D>>2]|0)+1|0;f[D>>2]=e}}while(0);if((o|0)==23){o=0;e=f[D>>2]|0}if(!e)break a}if((o|0)==31)ra(4996,5026,51,5144);else if((o|0)==36)ra(17588,17626,223,17767);else if((o|0)==45)ra(4996,5026,51,5144);else if((o|0)==50)ra(17782,17806,48,17908);else if((o|0)==52)ra(17937,17806,49,17908)}while(0);e=f[F>>2]|0;g=f[E>>2]|0;i=e+(((g>>>0)/341|0)<<2)|0;h=f[I>>2]|0;k=h;l=e;if((h|0)==(e|0)){j=0;g=0}else{g=(f[i>>2]|0)+(((g>>>0)%341|0)*12|0)|0;j=g}d:while(1){do{if((g|0)==(j|0))break d;g=g+12|0}while((g-(f[i>>2]|0)|0)!=4092);g=i+4|0;i=g;g=f[g>>2]|0}f[D>>2]=0;g=k-l>>2;if(g>>>0>2)do{No(f[e>>2]|0);e=(f[F>>2]|0)+4|0;f[F>>2]=e;h=f[I>>2]|0;g=h-e>>2}while(g>>>0>2);switch(g|0){case 1:{g=170;o=96;break}case 2:{g=341;o=96;break}default:{}}if((o|0)==96)f[E>>2]=g;if((e|0)!=(h|0)){do{No(f[e>>2]|0);e=e+4|0}while((e|0)!=(h|0));e=f[F>>2]|0;g=f[I>>2]|0;if((g|0)!=(e|0))f[I>>2]=g+(~((g+-4-e|0)>>>2)<<2)}e=f[J>>2]|0;if(!e){u=K;return}No(e);u=K;return}function mb(a,b,c){a=a|0;b=b|0;c=c|0;var d=0,e=0,g=0,h=0,i=0,j=0,k=0,l=0,m=0,n=0,o=0,p=0,q=0,r=0,s=0,t=0,v=0,w=0,x=0,y=0,z=0,A=0,B=0,C=0,D=0,E=0,F=0,G=0,H=0,I=0,J=0,K=0,L=0,M=0,N=0,O=0;O=u;u=u+48|0;L=O+24|0;N=O;K=a+8|0;i=f[K>>2]|0;f[L>>2]=0;k=L+4|0;f[k>>2]=0;f[L+8>>2]=0;do if(i)if(i>>>0>1073741823)co(L);else{M=i<<2;e=Rk(M)|0;f[L>>2]=e;h=e+(i<<2)|0;f[L+8>>2]=h;kh(e|0,0,M|0)|0;f[k>>2]=h;break}else{h=0;e=0}while(0);J=a+624|0;m=f[J>>2]|0;j=f[m>>2]|0;l=m+4|0;if(!j){j=e;e=m+8|0}else{e=f[l>>2]|0;if((e|0)!=(j|0))f[l>>2]=e+(~((e+-4-j|0)>>>2)<<2);No(j);e=m+8|0;f[e>>2]=0;f[l>>2]=0;f[m>>2]=0;j=f[L>>2]|0;h=f[k>>2]|0;i=f[K>>2]|0}f[m>>2]=j;f[l>>2]=h;f[e>>2]=f[L+8>>2];f[L>>2]=0;h=L+4|0;f[h>>2]=0;f[L+8>>2]=0;do if(i)if(i>>>0>1073741823)co(L);else{M=i<<2;g=Rk(M)|0;f[L>>2]=g;d=g+(i<<2)|0;f[L+8>>2]=d;kh(g|0,0,M|0)|0;f[h>>2]=d;break}else{d=0;g=0}while(0);F=a+636|0;j=f[F>>2]|0;e=f[j>>2]|0;i=j+4|0;if(!e)e=j+8|0;else{d=f[i>>2]|0;if((d|0)!=(e|0))f[i>>2]=d+(~((d+-4-e|0)>>>2)<<2);No(e);e=j+8|0;f[e>>2]=0;f[i>>2]=0;f[j>>2]=0;g=f[L>>2]|0;d=f[h>>2]|0}f[j>>2]=g;f[i>>2]=d;f[e>>2]=f[L+8>>2];f[N>>2]=0;f[N+4>>2]=0;f[N+8>>2]=0;f[N+12>>2]=0;f[N+16>>2]=0;f[N+20>>2]=0;M=N+8|0;I=N+4|0;H=N+16|0;G=N+20|0;ec(N);d=f[I>>2]|0;e=(f[G>>2]|0)+(f[H>>2]|0)|0;if((f[M>>2]|0)==(d|0))d=0;else d=(f[d+(((e>>>0)/341|0)<<2)>>2]|0)+(((e>>>0)%341|0)*12|0)|0;f[d>>2]=b;f[d+4>>2]=0;f[d+8>>2]=0;d=(f[G>>2]|0)+1|0;f[G>>2]=d;a:do if(d|0){w=a+612|0;v=a+600|0;A=L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=(f[g>>2]|0)+1;g=f[d+(m*12|0)+4>>2]|0;h=j;if((g|0)!=(h|0)){i=f[d+(b*12|0)>>2]|0;g=g-h>>2;d=0;do{f[i+(d<<2)>>2]=f[j+(d<<2)>>2];d=d+1|0}while(d>>>0>>0)}if(k|0){i=f[M>>2]|0;h=f[I>>2]|0;t=i-h>>2;d=f[H>>2]|0;g=f[G>>2]|0;if((((t|0)==0?0:(t*341|0)+-1|0)|0)==(g+d|0)){ec(N);d=f[H>>2]|0;g=f[G>>2]|0;i=f[M>>2]|0;h=f[I>>2]|0}d=g+d|0;if((i|0)==(h|0))d=0;else d=(f[h+(((d>>>0)/341|0)<<2)>>2]|0)+(((d>>>0)%341|0)*12|0)|0;f[d>>2]=k;f[d+4>>2]=e;f[d+8>>2]=m;f[G>>2]=(f[G>>2]|0)+1}if(!l)n=23;else{i=f[M>>2]|0;h=f[I>>2]|0;t=i-h>>2;d=f[H>>2]|0;g=f[G>>2]|0;if((((t|0)==0?0:(t*341|0)+-1|0)|0)==(g+d|0)){ec(N);d=f[H>>2]|0;g=f[G>>2]|0;i=f[M>>2]|0;h=f[I>>2]|0}d=g+d|0;if((i|0)==(h|0))d=0;else d=(f[h+(((d>>>0)/341|0)<<2)>>2]|0)+(((d>>>0)%341|0)*12|0)|0;f[d>>2]=l;f[d+4>>2]=e;f[d+8>>2]=b;d=(f[G>>2]|0)+1|0;f[G>>2]=d}}while(0);if((n|0)==23){n=0;d=f[G>>2]|0}if(!d)break a}if((n|0)==35)ra(17588,17626,223,17767);else if((n|0)==44)ra(17782,17806,48,17908);else if((n|0)==46)ra(17937,17806,49,17908)}while(0);d=f[I>>2]|0;e=f[H>>2]|0;h=d+(((e>>>0)/341|0)<<2)|0;g=f[M>>2]|0;j=g;k=d;if((g|0)==(d|0)){i=0;e=0}else{e=(f[h>>2]|0)+(((e>>>0)%341|0)*12|0)|0;i=e}d:while(1){do{if((e|0)==(i|0))break d;e=e+12|0}while((e-(f[h>>2]|0)|0)!=4092);e=h+4|0;h=e;e=f[e>>2]|0}f[G>>2]=0;e=j-k>>2;if(e>>>0>2)do{No(f[d>>2]|0);d=(f[I>>2]|0)+4|0;f[I>>2]=d;g=f[M>>2]|0;e=g-d>>2}while(e>>>0>2);switch(e|0){case 1:{e=170;n=93;break}case 2:{e=341;n=93;break}default:{}}if((n|0)==93)f[H>>2]=e;if((d|0)!=(g|0)){do{No(f[d>>2]|0);d=d+4|0}while((d|0)!=(g|0));d=f[I>>2]|0;e=f[M>>2]|0;if((e|0)!=(d|0))f[M>>2]=e+(~((e+-4-d|0)>>>2)<<2)}d=f[N>>2]|0;if(!d){u=O;return}No(d);u=O;return}function nb(a,b,c){a=a|0;b=b|0;c=c|0;var d=0,e=0,g=0,h=0,i=0,j=0,k=0,l=0,m=0,n=0,o=0,p=0,q=0,r=0,s=0,t=0,v=0,w=0,x=0,y=0,z=0,A=0,B=0,C=0,D=0,E=0,F=0,G=0,H=0,I=0,J=0,K=0,L=0,M=0,N=0,O=0;O=u;u=u+48|0;L=O+24|0;N=O;K=a+8|0;i=f[K>>2]|0;f[L>>2]=0;k=L+4|0;f[k>>2]=0;f[L+8>>2]=0;do if(i)if(i>>>0>1073741823)co(L);else{M=i<<2;e=Rk(M)|0;f[L>>2]=e;h=e+(i<<2)|0;f[L+8>>2]=h;kh(e|0,0,M|0)|0;f[k>>2]=h;break}else{h=0;e=0}while(0);J=a+624|0;m=f[J>>2]|0;j=f[m>>2]|0;l=m+4|0;if(!j){j=e;e=m+8|0}else{e=f[l>>2]|0;if((e|0)!=(j|0))f[l>>2]=e+(~((e+-4-j|0)>>>2)<<2);No(j);e=m+8|0;f[e>>2]=0;f[l>>2]=0;f[m>>2]=0;j=f[L>>2]|0;h=f[k>>2]|0;i=f[K>>2]|0}f[m>>2]=j;f[l>>2]=h;f[e>>2]=f[L+8>>2];f[L>>2]=0;h=L+4|0;f[h>>2]=0;f[L+8>>2]=0;do if(i)if(i>>>0>1073741823)co(L);else{M=i<<2;g=Rk(M)|0;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(e<<2)>>2]|0)|0;c:do if(!d)if((t|0)>0){j=f[c>>2]|0;g=j+4|0;h=j+8|0;i=0;do{e=f[s>>2]|0;d=f[e>>2]|0;f[L>>2]=d;f[z>>2]=f[e+4>>2];f[B>>2]=f[e+8>>2];e=f[g>>2]|0;if(e>>>0<(f[h>>2]|0)>>>0){f[e>>2]=d;f[e+4>>2]=f[z>>2];f[e+8>>2]=f[B>>2];f[g>>2]=e+12}else Kf(j,L);i=i+1|0}while((i|0)<(t|0));n=23}else n=23;else{if(!t){n=35;break b}if(t>>>0<3){h=f[w>>2]|0;f[h>>2]=e;d=f[K>>2]|0;if(d>>>0>1){g=1;do{e=(e|0)==(d+-1|0)?0:e+1|0;f[h+(g<<2)>>2]=e;g=g+1|0;d=f[K>>2]|0}while(g>>>0>>0)}q=f[c>>2]|0;o=q+4|0;p=q+8|0;e=0;while(1){if(d|0){j=f[w>>2]|0;k=f[v>>2]|0;l=f[r>>2]|0;b=0;do{m=j+(b<<2)|0;f[k+(f[m>>2]<<2)>>2]=0;d=f[m>>2]|0;n=(f[a>>2]|0)-(f[l+(d<<2)>>2]|0)|0;do if(n|0){g=k+(d<<2)|0;if((n|0)>=33){n=44;break b}if((n|0)<=0){n=46;break b}h=f[E>>2]|0;i=32-h|0;d=f[y>>2]|0;h=f[d>>2]<(i|0)){n=n-i|0;f[E>>2]=n;d=d+4|0;f[y>>2]=d;n=32-n|0;f[g>>2]=(f[d>>2]|0)>>>n|h>>>(n-i|0);break}f[g>>2]=h>>>(32-n|0);n=(f[E>>2]|0)+n|0;f[E>>2]=n;if((n|0)!=32)break;f[y>>2]=d+4;f[E>>2]=0}while(0);m=f[m>>2]|0;n=k+(m<<2)|0;f[n>>2]=f[n>>2]|f[(f[s>>2]|0)+(m<<2)>>2];b=b+1|0}while(b>>>0<(f[K>>2]|0)>>>0)}g=f[v>>2]|0;d=f[g>>2]|0;f[L>>2]=d;f[A>>2]=f[g+4>>2];f[C>>2]=f[g+8>>2];g=f[o>>2]|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)+1}if(!l)n=23;else{i=f[M>>2]|0;h=f[I>>2]|0;t=i-h>>2;d=f[H>>2]|0;g=f[G>>2]|0;if((((t|0)==0?0:(t*341|0)+-1|0)|0)==(g+d|0)){ec(N);d=f[H>>2]|0;g=f[G>>2]|0;i=f[M>>2]|0;h=f[I>>2]|0}d=g+d|0;if((i|0)==(h|0))d=0;else d=(f[h+(((d>>>0)/341|0)<<2)>>2]|0)+(((d>>>0)%341|0)*12|0)|0;f[d>>2]=l;f[d+4>>2]=e;f[d+8>>2]=b;d=(f[G>>2]|0)+1|0;f[G>>2]=d}}while(0);if((n|0)==23){n=0;d=f[G>>2]|0}if(!d)break a}if((n|0)==35)ra(17588,17626,223,17767);else if((n|0)==44)ra(17782,17806,48,17908);else if((n|0)==46)ra(17937,17806,49,17908)}while(0);d=f[I>>2]|0;e=f[H>>2]|0;h=d+(((e>>>0)/341|0)<<2)|0;g=f[M>>2]|0;j=g;k=d;if((g|0)==(d|0)){i=0;e=0}else{e=(f[h>>2]|0)+(((e>>>0)%341|0)*12|0)|0;i=e}d:while(1){do{if((e|0)==(i|0))break d;e=e+12|0}while((e-(f[h>>2]|0)|0)!=4092);e=h+4|0;h=e;e=f[e>>2]|0}f[G>>2]=0;e=j-k>>2;if(e>>>0>2)do{No(f[d>>2]|0);d=(f[I>>2]|0)+4|0;f[I>>2]=d;g=f[M>>2]|0;e=g-d>>2}while(e>>>0>2);switch(e|0){case 1:{e=170;n=93;break}case 2:{e=341;n=93;break}default:{}}if((n|0)==93)f[H>>2]=e;if((d|0)!=(g|0)){do{No(f[d>>2]|0);d=d+4|0}while((d|0)!=(g|0));d=f[I>>2]|0;e=f[M>>2]|0;if((e|0)!=(d|0))f[M>>2]=e+(~((e+-4-d|0)>>>2)<<2)}d=f[N>>2]|0;if(!d){u=O;return}No(d);u=O;return}function ob(a,c,d){a=a|0;c=c|0;d=d|0;var e=0,g=0,h=0,i=0,j=0,k=0,l=0,m=0,n=0,o=0,p=0,q=0,r=0,s=0,t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==(e|0))e=0;else e=(f[e+(((g>>>0)/341|0)<<2)>>2]|0)+(((g>>>0)%341|0)*12|0)|0;f[e>>2]=c;f[e+4>>2]=0;f[e+8>>2]=0;e=(f[D>>2]|0)+1|0;f[D>>2]=e;a:do if(e|0){v=a+612|0;B=a+600|0;t=d+4|0;w=a+604|0;A=a+556|0;y=a+552|0;z=a+596|0;x=a+592|0;b:while(1){q=f[E>>2]|0;g=e+-1|0;n=q+g|0;r=f[F>>2]|0;p=f[r+(((n>>>0)/341|0)<<2)>>2]|0;n=(n>>>0)%341|0;s=f[p+(n*12|0)>>2]|0;h=f[p+(n*12|0)+4>>2]|0;n=f[p+(n*12|0)+8>>2]|0;f[D>>2]=g;g=f[I>>2]|0;r=g-r>>2;if((1-e-q+((r|0)==0?0:(r*341|0)+-1|0)|0)>>>0>681){No(f[g+-4>>2]|0);f[I>>2]=(f[I>>2]|0)+-4}i=f[G>>2]|0;r=i+(n*12|0)|0;g=((f[H>>2]|0)+-1|0)==(h|0)?0:h+1|0;q=(f[C>>2]|0)+(n*12|0)|0;e=(f[a>>2]|0)-(f[(f[q>>2]|0)+(g<<2)>>2]|0)|0;c:do if(!e)if((s|0)>0){j=i+(n*12|0)+4|0;k=f[d>>2]|0;n=k+84|0;i=k+68|0;l=k+40|0;k=k+64|0;g=f[t>>2]|0;m=0;while(1){e=g;g=g+1|0;f[t>>2]=g;h=f[r>>2]|0;if(((f[j>>2]|0)-h|0)!=12){o=31;break b}if(!(b[n>>0]|0))e=f[(f[i>>2]|0)+(e<<2)>>2]|0;p=l;q=f[p>>2]|0;p=Qk(q|0,f[p+4>>2]|0,e|0,((e|0)<0)<<31>>31|0)|0;ef((f[f[k>>2]>>2]|0)+p|0,h|0,q|0)|0;m=m+1|0;if((m|0)>=(s|0)){o=23;break}}}else o=23;else{if(!s){o=36;break b}if(s>>>0<3){i=f[v>>2]|0;f[i>>2]=g;e=f[H>>2]|0;if(e>>>0>1){h=1;do{g=(g|0)==(e+-1|0)?0:g+1|0;f[i+(h<<2)>>2]=g;h=h+1|0;e=f[H>>2]|0}while(h>>>0>>0)}g=0;while(1){if(!e)i=f[B>>2]|0;else{l=f[v>>2]|0;m=f[B>>2]|0;n=f[q>>2]|0;i=m;o=0;do{c=l+(o<<2)|0;f[m+(f[c>>2]<<2)>>2]=0;e=f[c>>2]|0;p=(f[a>>2]|0)-(f[n+(e<<2)>>2]|0)|0;do if(p|0){h=m+(e<<2)|0;if((p|0)>=33){o=50;break b}if((p|0)<=0){o=52;break b}j=f[A>>2]|0;k=32-j|0;e=f[y>>2]|0;j=f[e>>2]<(k|0)){p=p-k|0;f[A>>2]=p;e=e+4|0;f[y>>2]=e;p=32-p|0;f[h>>2]=(f[e>>2]|0)>>>p|j>>>(p-k|0);break}f[h>>2]=j>>>(32-p|0);p=(f[A>>2]|0)+p|0;f[A>>2]=p;if((p|0)!=32)break;f[y>>2]=e+4;f[A>>2]=0}while(0);c=f[c>>2]|0;p=m+(c<<2)|0;f[p>>2]=f[p>>2]|f[(f[r>>2]|0)+(c<<2)>>2];o=o+1|0}while(o>>>0<(f[H>>2]|0)>>>0)}h=f[d>>2]|0;e=f[t>>2]|0;f[t>>2]=e+1;if(((f[w>>2]|0)-i|0)!=12){o=45;break b}if(!(b[h+84>>0]|0))e=f[(f[h+68>>2]|0)+(e<<2)>>2]|0;o=h+40|0;p=f[o>>2]|0;o=Qk(p|0,f[o+4>>2]|0,e|0,((e|0)<0)<<31>>31|0)|0;ef((f[f[h+64>>2]>>2]|0)+o|0,i|0,p|0)|0;g=g+1|0;if(g>>>0>=s>>>0){o=23;break c}e=f[H>>2]|0}}k=1<>2]|0;e=f[r>>2]|0;j=e;i=f[i+(c*12|0)>>2]|0;if((h|0)!=(e|0)){h=h-e>>2;e=0;do{f[i+(e<<2)>>2]=f[j+(e<<2)>>2];e=e+1|0}while(e>>>0>>0)}i=i+(g<<2)|0;f[i>>2]=(f[i>>2]|0)+k;i=(_(s|0)|0)^31;if(!i)e=0;else{h=0;e=0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)break a}if((o|0)==31)ra(4996,5026,51,5144);else if((o|0)==36)ra(17588,17626,223,17767);else if((o|0)==45)ra(4996,5026,51,5144);else if((o|0)==50)ra(17782,17806,48,17908);else if((o|0)==52)ra(17937,17806,49,17908)}while(0);e=f[F>>2]|0;g=f[E>>2]|0;i=e+(((g>>>0)/341|0)<<2)|0;h=f[I>>2]|0;k=h;l=e;if((h|0)==(e|0)){j=0;g=0}else{g=(f[i>>2]|0)+(((g>>>0)%341|0)*12|0)|0;j=g}d:while(1){do{if((g|0)==(j|0))break d;g=g+12|0}while((g-(f[i>>2]|0)|0)!=4092);g=i+4|0;i=g;g=f[g>>2]|0}f[D>>2]=0;g=k-l>>2;if(g>>>0>2)do{No(f[e>>2]|0);e=(f[F>>2]|0)+4|0;f[F>>2]=e;h=f[I>>2]|0;g=h-e>>2}while(g>>>0>2);switch(g|0){case 1:{g=170;o=96;break}case 2:{g=341;o=96;break}default:{}}if((o|0)==96)f[E>>2]=g;if((e|0)!=(h|0)){do{No(f[e>>2]|0);e=e+4|0}while((e|0)!=(h|0));e=f[F>>2]|0;g=f[I>>2]|0;if((g|0)!=(e|0))f[I>>2]=g+(~((g+-4-e|0)>>>2)<<2)}e=f[J>>2]|0;if(!e){u=K;return}No(e);u=K;return}function pb(a,b,c){a=a|0;b=b|0;c=c|0;var d=0,e=0,g=0,h=0,i=0,j=0,k=0,l=0,m=0,n=0,o=0,p=0,q=0,r=0,s=0,t=0,v=0,w=0,x=0,y=0,z=0,A=0,B=0,C=0,D=0,E=0,F=0,G=0,H=0,I=0,J=0,K=0,L=0,M=0,N=0,O=0;O=u;u=u+48|0;L=O+24|0;N=O;K=a+8|0;i=f[K>>2]|0;f[L>>2]=0;k=L+4|0;f[k>>2]=0;f[L+8>>2]=0;do if(i)if(i>>>0>1073741823)co(L);else{M=i<<2;e=Rk(M)|0;f[L>>2]=e;h=e+(i<<2)|0;f[L+8>>2]=h;kh(e|0,0,M|0)|0;f[k>>2]=h;break}else{h=0;e=0}while(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0;q=f[s+(((m>>>0)/341|0)<<2)>>2]|0;m=(m>>>0)%341|0;t=f[q+(m*12|0)>>2]|0;g=f[q+(m*12|0)+4>>2]|0;m=f[q+(m*12|0)+8>>2]|0;f[G>>2]=e;e=f[M>>2]|0;s=e-s>>2;if((1-d-r+((s|0)==0?0:(s*341|0)+-1|0)|0)>>>0>681){No(f[e+-4>>2]|0);f[M>>2]=(f[M>>2]|0)+-4}h=f[J>>2]|0;s=h+(m*12|0)|0;e=((f[K>>2]|0)+-1|0)==(g|0)?0:g+1|0;r=(f[F>>2]|0)+(m*12|0)|0;d=(f[a>>2]|0)-(f[(f[r>>2]|0)+(e<<2)>>2]|0)|0;c:do if(!d)if((t|0)>0){j=f[c>>2]|0;g=j+4|0;h=j+8|0;i=0;do{e=f[s>>2]|0;d=f[e>>2]|0;f[L>>2]=d;f[z>>2]=f[e+4>>2];f[B>>2]=f[e+8>>2];e=f[g>>2]|0;if(e>>>0<(f[h>>2]|0)>>>0){f[e>>2]=d;f[e+4>>2]=f[z>>2];f[e+8>>2]=f[B>>2];f[g>>2]=e+12}else Kf(j,L);i=i+1|0}while((i|0)<(t|0));n=23}else n=23;else{if(!t){n=35;break b}if(t>>>0<3){h=f[w>>2]|0;f[h>>2]=e;d=f[K>>2]|0;if(d>>>0>1){g=1;do{e=(e|0)==(d+-1|0)?0:e+1|0;f[h+(g<<2)>>2]=e;g=g+1|0;d=f[K>>2]|0}while(g>>>0>>0)}q=f[c>>2]|0;o=q+4|0;p=q+8|0;e=0;while(1){if(d|0){j=f[w>>2]|0;k=f[v>>2]|0;l=f[r>>2]|0;b=0;do{m=j+(b<<2)|0;f[k+(f[m>>2]<<2)>>2]=0;d=f[m>>2]|0;n=(f[a>>2]|0)-(f[l+(d<<2)>>2]|0)|0;do if(n|0){g=k+(d<<2)|0;if((n|0)>=33){n=44;break b}if((n|0)<=0){n=46;break b}h=f[E>>2]|0;i=32-h|0;d=f[y>>2]|0;h=f[d>>2]<(i|0)){n=n-i|0;f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)>>2]=f[j+(d<<2)>>2];d=d+1|0}while(d>>>0>>0)}if(k|0){i=f[M>>2]|0;h=f[I>>2]|0;t=i-h>>2;d=f[H>>2]|0;g=f[G>>2]|0;if((((t|0)==0?0:(t*341|0)+-1|0)|0)==(g+d|0)){ec(N);d=f[H>>2]|0;g=f[G>>2]|0;i=f[M>>2]|0;h=f[I>>2]|0}d=g+d|0;if((i|0)==(h|0))d=0;else d=(f[h+(((d>>>0)/341|0)<<2)>>2]|0)+(((d>>>0)%341|0)*12|0)|0;f[d>>2]=k;f[d+4>>2]=e;f[d+8>>2]=m;f[G>>2]=(f[G>>2]|0)+1}if(!l)n=23;else{i=f[M>>2]|0;h=f[I>>2]|0;t=i-h>>2;d=f[H>>2]|0;g=f[G>>2]|0;if((((t|0)==0?0:(t*341|0)+-1|0)|0)==(g+d|0)){ec(N);d=f[H>>2]|0;g=f[G>>2]|0;i=f[M>>2]|0;h=f[I>>2]|0}d=g+d|0;if((i|0)==(h|0))d=0;else d=(f[h+(((d>>>0)/341|0)<<2)>>2]|0)+(((d>>>0)%341|0)*12|0)|0;f[d>>2]=l;f[d+4>>2]=e;f[d+8>>2]=b;d=(f[G>>2]|0)+1|0;f[G>>2]=d}}while(0);if((n|0)==23){n=0;d=f[G>>2]|0}if(!d)break a}if((n|0)==35)ra(17588,17626,223,17767);else if((n|0)==44)ra(17782,17806,48,17908);else if((n|0)==46)ra(17937,17806,49,17908)}while(0);d=f[I>>2]|0;e=f[H>>2]|0;h=d+(((e>>>0)/341|0)<<2)|0;g=f[M>>2]|0;j=g;k=d;if((g|0)==(d|0)){i=0;e=0}else{e=(f[h>>2]|0)+(((e>>>0)%341|0)*12|0)|0;i=e}d:while(1){do{if((e|0)==(i|0))break d;e=e+12|0}while((e-(f[h>>2]|0)|0)!=4092);e=h+4|0;h=e;e=f[e>>2]|0}f[G>>2]=0;e=j-k>>2;if(e>>>0>2)do{No(f[d>>2]|0);d=(f[I>>2]|0)+4|0;f[I>>2]=d;g=f[M>>2]|0;e=g-d>>2}while(e>>>0>2);switch(e|0){case 1:{e=170;n=93;break}case 2:{e=341;n=93;break}default:{}}if((n|0)==93)f[H>>2]=e;if((d|0)!=(g|0)){do{No(f[d>>2]|0);d=d+4|0}while((d|0)!=(g|0));d=f[I>>2]|0;e=f[M>>2]|0;if((e|0)!=(d|0))f[M>>2]=e+(~((e+-4-d|0)>>>2)<<2)}d=f[N>>2]|0;if(!d){u=O;return}No(d);u=O;return}function qb(a,b,c,d,e,g){a=a|0;b=b|0;c=c|0;d=d|0;e=e|0;g=g|0;var h=0,i=0,j=0,k=0,l=0,m=0,n=0,o=0,p=0,q=0,r=0,s=0,t=0,v=0,w=0,x=0,y=0,z=0,A=0,B=0,C=0,D=0,E=0,F=0,G=0,H=0,I=0,J=0,K=0,L=0,M=0,N=0,O=0,P=0,Q=0,R=0,S=0,T=0,U=0,V=0;V=u;u=u+96|0;H=V+80|0;L=V+76|0;K=V+72|0;M=V+68|0;G=V+64|0;U=V+16|0;I=V;J=a+8|0;f[J>>2]=e;i=a+32|0;h=a+36|0;g=f[h>>2]|0;d=f[i>>2]|0;j=g-d>>2;if(j>>>0>=e>>>0){if(j>>>0>e>>>0?(k=d+(e<<2)|0,(g|0)!=(k|0)):0)f[h>>2]=g+(~((g+-4-k|0)>>>2)<<2)}else vg(i,e-j|0);d=U;g=d+48|0;do{f[d>>2]=0;d=d+4|0}while((d|0)<(g|0));f[H>>2]=0;if(!e){d=0;g=0}else{Af(U,e,H);d=f[U+12>>2]|0;g=f[U+16>>2]|0}f[H>>2]=0;h=U+16|0;i=g-d>>2;if(i>>>0>=e>>>0){if(i>>>0>e>>>0?(l=d+(e<<2)|0,(g|0)!=(l|0)):0)f[h>>2]=g+(~((g+-4-l|0)>>>2)<<2)}else Af(U+12|0,e-i|0,H);i=U+24|0;f[H>>2]=0;h=U+28|0;g=f[h>>2]|0;d=f[i>>2]|0;j=g-d>>2;if(j>>>0>=e>>>0){if(j>>>0>e>>>0?(m=d+(e<<2)|0,(g|0)!=(m|0)):0)f[h>>2]=g+(~((g+-4-m|0)>>>2)<<2)}else Af(i,e-j|0,H);i=U+36|0;f[H>>2]=0;h=U+40|0;g=f[h>>2]|0;d=f[i>>2]|0;j=g-d>>2;if(j>>>0>=e>>>0){if(j>>>0>e>>>0?(n=d+(e<<2)|0,(g|0)!=(n|0)):0)f[h>>2]=g+(~((g+-4-n|0)>>>2)<<2)}else Af(i,e-j|0,H);h=f[U>>2]|0;if((f[J>>2]|0)>0){l=a+16|0;i=a+32|0;m=a+12|0;j=0;do{d=f[h+(j<<2)>>2]|0;g=f[l>>2]|0;if((d|0)>(g|0)){k=f[i>>2]|0;f[k+(j<<2)>>2]=g}else{F=f[m>>2]|0;k=f[i>>2]|0;f[k+(j<<2)>>2]=(d|0)<(F|0)?F:d}j=j+1|0;d=f[J>>2]|0}while((j|0)<(d|0));if((d|0)>0){i=a+20|0;h=0;do{d=(f[b+(h<<2)>>2]|0)+(f[k+(h<<2)>>2]|0)|0;g=c+(h<<2)|0;f[g>>2]=d;if((d|0)<=(f[l>>2]|0)){if((d|0)<(f[m>>2]|0)){d=(f[i>>2]|0)+d|0;r=18}}else{d=d-(f[i>>2]|0)|0;r=18}if((r|0)==18){r=0;f[g>>2]=d}h=h+1|0}while((h|0)<(f[J>>2]|0))}}A=f[a+48>>2]|0;B=f[a+52>>2]|0;F=Rk(16)|0;f[F>>2]=0;f[F+4>>2]=0;f[F+8>>2]=0;f[F+12>>2]=0;f[I>>2]=0;E=I+4|0;f[E>>2]=0;f[I+8>>2]=0;do if(e)if(e>>>0>1073741823)co(I);else{D=e<<2;p=Rk(D)|0;f[I>>2]=p;o=p+(e<<2)|0;f[I+8>>2]=o;kh(p|0,0,D|0)|0;f[E>>2]=o;o=p;break}else{o=0;p=0}while(0);C=a+56|0;d=f[C>>2]|0;g=f[d+4>>2]|0;h=f[d>>2]|0;z=g-h|0;D=z>>2;do if((z|0)>4){t=A+12|0;w=(e|0)>0;y=a+16|0;v=a+32|0;z=a+12|0;x=a+20|0;s=e<<2;if(g-h>>2>>>0>1){q=h;R=1}else{r=d;co(r)}while(1){p=f[q+(R<<2)>>2]|0;r=(((p>>>0)%3|0|0)==0?2:-1)+p|0;q=(p|r|0)<0;o=(p|0)<0?p:r;g=p;n=1;d=0;a:while(1){do{if((g|0)<=-1){r=66;break a}m=f[U+(d*12|0)>>2]|0;h=f[(f[t>>2]|0)+(g<<2)>>2]|0;do if((h|0)>=0){f[G>>2]=h;f[H>>2]=f[G>>2];rf(H,A,B,L,K,M);h=f[L>>2]|0;if((h|0)>=(R|0))break;i=f[K>>2]|0;if((i|0)>=(R|0))break;j=f[M>>2]|0;if((j|0)>=(R|0))break;l=X(h,e)|0;k=X(i,e)|0;i=X(j,e)|0;if(w){h=0;do{f[m+(h<<2)>>2]=(f[c+(h+i<<2)>>2]|0)+(f[c+(h+k<<2)>>2]|0)-(f[c+(h+l<<2)>>2]|0);h=h+1|0}while((h|0)!=(e|0))}d=d+1|0;if((d|0)==4){d=4;r=46;break a}}while(0);do if(n){m=g+1|0;g=((m|0)%3|0|0)==0?g+-2|0:m;if((g|0)>=0){g=f[(f[t>>2]|0)+(g<<2)>>2]|0;h=g+1|0;if((g|0)>=0)g=((h|0)%3|0|0)==0?g+-2|0:h}}else{g=(((g>>>0)%3|0|0)==0?2:-1)+g|0;if((g|0)>=0){g=f[(f[t>>2]|0)+(g<<2)>>2]|0;if((g|0)>=0)if(!((g>>>0)%3|0)){g=g+2|0;break}else{g=g+-1|0;break}}}while(0);if((g|0)==(p|0)){r=66;break a}}while(!(n&(g|0)<0));if(q){g=o;n=0;continue}g=f[(f[t>>2]|0)+(r<<2)>>2]|0;if((g|0)<0){n=0;continue}if(!((g>>>0)%3|0)){g=g+2|0;n=0;continue}else{g=g+-1|0;n=0;continue}}if((r|0)==66)if((d|0)>0)r=46;else{Q=X(R,e)|0;r=78}if((r|0)==46){r=0;if(w){kh(f[I>>2]|0,0,s|0)|0;j=d+-1|0;l=F+(j<<2)|0;j=f[a+60+(j*12|0)>>2]|0;k=f[I>>2]|0;m=0;g=0;do{q=f[l>>2]|0;f[l>>2]=q+1;if(!(f[j+(q>>>5<<2)>>2]&1<<(q&31))){h=f[U+(m*12|0)>>2]|0;i=0;do{q=k+(i<<2)|0;f[q>>2]=(f[q>>2]|0)+(f[h+(i<<2)>>2]|0);i=i+1|0}while((i|0)!=(e|0));g=g+1|0}m=m+1|0}while((m|0)!=(d|0))}else{h=d+-1|0;j=F+(h<<2)|0;h=f[a+60+(h*12|0)>>2]|0;i=f[j>>2]|0;k=0;g=0;do{q=i;i=i+1|0;f[j>>2]=i;g=g+((f[h+(q>>>5<<2)>>2]&1<<(q&31)|0)==0&1)|0;k=k+1|0}while((k|0)!=(d|0))}h=X(R,e)|0;if(g){j=f[I>>2]|0;if(w){d=0;do{q=j+(d<<2)|0;f[q>>2]=(f[q>>2]|0)/(g|0)|0;d=d+1|0}while((d|0)!=(e|0))}l=b+(h<<2)|0;k=c+(h<<2)|0;if((f[J>>2]|0)>0){h=0;do{d=f[j+(h<<2)>>2]|0;g=f[y>>2]|0;if((d|0)>(g|0)){i=f[v>>2]|0;f[i+(h<<2)>>2]=g}else{q=f[z>>2]|0;i=f[v>>2]|0;f[i+(h<<2)>>2]=(d|0)<(q|0)?q:d}h=h+1|0;d=f[J>>2]|0}while((h|0)<(d|0));if((d|0)>0){h=0;do{d=(f[l+(h<<2)>>2]|0)+(f[i+(h<<2)>>2]|0)|0;g=k+(h<<2)|0;f[g>>2]=d;do if((d|0)>(f[y>>2]|0)){d=d-(f[x>>2]|0)|0;r=100}else{if((d|0)>=(f[z>>2]|0))break;d=(f[x>>2]|0)+d|0;r=100}while(0);if((r|0)==100){r=0;f[g>>2]=d}h=h+1|0}while((h|0)<(f[J>>2]|0))}}}else{Q=h;r=78}}if((r|0)==78?(r=0,N=c+((X(R+-1|0,e)|0)<<2)|0,O=b+(Q<<2)|0,P=c+(Q<<2)|0,(f[J>>2]|0)>0):0){h=0;do{d=f[N+(h<<2)>>2]|0;g=f[y>>2]|0;if((d|0)>(g|0)){i=f[v>>2]|0;f[i+(h<<2)>>2]=g}else{q=f[z>>2]|0;i=f[v>>2]|0;f[i+(h<<2)>>2]=(d|0)<(q|0)?q:d}h=h+1|0;d=f[J>>2]|0}while((h|0)<(d|0));if((d|0)>0){h=0;do{d=(f[O+(h<<2)>>2]|0)+(f[i+(h<<2)>>2]|0)|0;g=P+(h<<2)|0;f[g>>2]=d;if((d|0)<=(f[y>>2]|0)){if((d|0)<(f[z>>2]|0)){d=(f[x>>2]|0)+d|0;r=88}}else{d=d-(f[x>>2]|0)|0;r=88}if((r|0)==88){r=0;f[g>>2]=d}h=h+1|0}while((h|0)<(f[J>>2]|0))}}R=R+1|0;if((R|0)>=(D|0)){r=28;break}d=f[C>>2]|0;q=f[d>>2]|0;if((f[d+4>>2]|0)-q>>2>>>0<=R>>>0){r=34;break}}if((r|0)==28){T=f[I>>2]|0;S=T;break}else if((r|0)==34)co(d)}else{S=p;T=o}while(0);if(S|0){d=f[E>>2]|0;if((d|0)!=(S|0))f[E>>2]=d+(~((d+-4-S|0)>>>2)<<2);No(T)}No(F);g=f[U+36>>2]|0;if(g|0){h=U+40|0;d=f[h>>2]|0;if((d|0)!=(g|0))f[h>>2]=d+(~((d+-4-g|0)>>>2)<<2);No(g)}d=f[U+24>>2]|0;if(d|0){h=U+28|0;g=f[h>>2]|0;if((g|0)!=(d|0))f[h>>2]=g+(~((g+-4-d|0)>>>2)<<2);No(d)}d=f[U+12>>2]|0;if(d|0){h=U+16|0;g=f[h>>2]|0;if((g|0)!=(d|0))f[h>>2]=g+(~((g+-4-d|0)>>>2)<<2);No(d)}h=f[U>>2]|0;if(!h){u=V;return 1}g=U+4|0;d=f[g>>2]|0;if((d|0)!=(h|0))f[g>>2]=d+(~((d+-4-h|0)>>>2)<<2);No(h);u=V;return 1}function rb(a,c,d){a=a|0;c=c|0;d=d|0;var e=0,g=0,h=0,i=0,j=0,k=0,l=0,m=0,n=0,o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g=(f[E>>2]|0)+(f[F>>2]|0)|0;if((f[K>>2]|0)==(e|0))e=0;else e=(f[e+(((g>>>0)/341|0)<<2)>>2]|0)+(((g>>>0)%341|0)*12|0)|0;f[e>>2]=c;f[e+4>>2]=0;f[e+8>>2]=0;e=(f[E>>2]|0)+1|0;f[E>>2]=e;a:do if(e|0){v=a+100|0;C=a+88|0;t=d+4|0;w=a+92|0;A=a+44|0;y=a+40|0;B=a+12|0;z=a+84|0;x=a+80|0;b:while(1){q=f[F>>2]|0;g=e+-1|0;m=q+g|0;r=f[G>>2]|0;p=f[r+(((m>>>0)/341|0)<<2)>>2]|0;m=(m>>>0)%341|0;s=f[p+(m*12|0)>>2]|0;h=f[p+(m*12|0)+4>>2]|0;m=f[p+(m*12|0)+8>>2]|0;f[E>>2]=g;g=f[K>>2]|0;r=g-r>>2;if((1-e-q+((r|0)==0?0:(r*341|0)+-1|0)|0)>>>0>681){No(f[g+-4>>2]|0);f[K>>2]=(f[K>>2]|0)+-4}g=f[H>>2]|0;r=g+(m*12|0)|0;q=(f[D>>2]|0)+(m*12|0)|0;c=al(a,s,q,h)|0;e=(f[a>>2]|0)-(f[(f[q>>2]|0)+(c<<2)>>2]|0)|0;c:do if(!e){if((s|0)>0){j=g+(m*12|0)+4|0;k=f[d>>2]|0;n=k+84|0;i=k+68|0;l=k+40|0;k=k+64|0;g=f[t>>2]|0;m=0;do{e=g;g=g+1|0;f[t>>2]=g;h=f[r>>2]|0;if(((f[j>>2]|0)-h|0)!=12){L=30;break b}if(!(b[n>>0]|0))e=f[(f[i>>2]|0)+(e<<2)>>2]|0;p=l;q=f[p>>2]|0;p=Qk(q|0,f[p+4>>2]|0,e|0,((e|0)<0)<<31>>31|0)|0;ef((f[f[k>>2]>>2]|0)+p|0,h|0,q|0)|0;m=m+1|0}while((m|0)<(s|0))}}else{if(!s){L=35;break b}if(s>>>0<3){i=f[v>>2]|0;f[i>>2]=c;e=f[I>>2]|0;if(e>>>0>1){g=c;h=1;do{g=(g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|0)^31;f[J>>2]=0;sh(B,i,J);i=(s>>>1)-(f[J>>2]|0)|0;g=s-i|0;if((i|0)==(g|0)){k=i;l=i}else{s=f[z>>2]|0;e=f[x>>2]|0;h=(f[e>>2]&1<<31-s|0)!=0;s=s+1|0;f[z>>2]=s;if((s|0)==32){f[x>>2]=e+4;f[z>>2]=0}k=h?i:g;l=h?g:i}e=f[D>>2]|0;j=f[e+(m*12|0)>>2]|0;g=j+(c<<2)|0;f[g>>2]=(f[g>>2]|0)+1;g=f[e+(m*12|0)+4>>2]|0;h=j;if((g|0)!=(h|0)){i=f[e+(n*12|0)>>2]|0;g=g-h>>2;e=0;do{f[i+(e<<2)>>2]=f[j+(e<<2)>>2];e=e+1|0}while(e>>>0>>0)}if(k|0){i=f[K>>2]|0;h=f[G>>2]|0;s=i-h>>2;e=f[F>>2]|0;g=f[E>>2]|0;if((((s|0)==0?0:(s*341|0)+-1|0)|0)==(g+e|0)){ec(M);e=f[F>>2]|0;g=f[E>>2]|0;i=f[K>>2]|0;h=f[G>>2]|0}e=g+e|0;if((i|0)==(h|0))e=0;else e=(f[h+(((e>>>0)/341|0)<<2)>>2]|0)+(((e>>>0)%341|0)*12|0)|0;f[e>>2]=k;f[e+4>>2]=c;f[e+8>>2]=m;f[E>>2]=(f[E>>2]|0)+1}if(l|0){i=f[K>>2]|0;h=f[G>>2]|0;s=i-h>>2;e=f[F>>2]|0;g=f[E>>2]|0;if((((s|0)==0?0:(s*341|0)+-1|0)|0)==(g+e|0)){ec(M);e=f[F>>2]|0;g=f[E>>2]|0;i=f[K>>2]|0;h=f[G>>2]|0}e=g+e|0;if((i|0)==(h|0))e=0;else e=(f[h+(((e>>>0)/341|0)<<2)>>2]|0)+(((e>>>0)%341|0)*12|0)|0;f[e>>2]=l;f[e+4>>2]=c;f[e+8>>2]=n;f[E>>2]=(f[E>>2]|0)+1}}while(0);e=f[E>>2]|0;if(!e)break a}if((L|0)==30)ra(4996,5026,51,5144);else if((L|0)==35)ra(17588,17626,223,17767);else if((L|0)==44)ra(4996,5026,51,5144);else if((L|0)==49)ra(17782,17806,48,17908);else if((L|0)==51)ra(17937,17806,49,17908)}while(0);e=f[G>>2]|0;g=f[F>>2]|0;i=e+(((g>>>0)/341|0)<<2)|0;h=f[K>>2]|0;k=h;l=e;if((h|0)==(e|0)){j=0;g=0}else{g=(f[i>>2]|0)+(((g>>>0)%341|0)*12|0)|0;j=g}d:while(1){do{if((g|0)==(j|0))break d;g=g+12|0}while((g-(f[i>>2]|0)|0)!=4092);g=i+4|0;i=g;g=f[g>>2]|0}f[E>>2]=0;g=k-l>>2;if(g>>>0>2)do{No(f[e>>2]|0);e=(f[G>>2]|0)+4|0;f[G>>2]=e;h=f[K>>2]|0;g=h-e>>2}while(g>>>0>2);switch(g|0){case 1:{g=170;L=94;break}case 2:{g=341;L=94;break}default:{}}if((L|0)==94)f[F>>2]=g;if((e|0)!=(h|0)){do{No(f[e>>2]|0);e=e+4|0}while((e|0)!=(h|0));e=f[G>>2]|0;g=f[K>>2]|0;if((g|0)!=(e|0))f[K>>2]=g+(~((g+-4-e|0)>>>2)<<2)}e=f[M>>2]|0;if(!e){u=N;return}No(e);u=N;return}function sb(a,c,d){a=a|0;c=c|0;d=d|0;var e=0,g=0,h=0,i=0,j=0,k=0,l=0,m=0,n=0,o=0,p=0,q=0,r=0,s=0,t=0,v=0,w=0,x=0,y=0,z=0,A=0,B=0,C=0,D=0,E=0,F=0,G=0,H=0,I=0,J=0,K=0,L=0,M=0,N=0;N=u;u=u+32|0;M=N+8|0;J=N;I=a+8|0;j=f[I>>2]|0;f[M>>2]=0;l=M+4|0;f[l>>2]=0;f[M+8>>2]=0;do if(j)if(j>>>0>1073741823)co(M);else{K=j<<2;g=Rk(K)|0;f[M>>2]=g;i=g+(j<<2)|0;f[M+8>>2]=i;kh(g|0,0,K|0)|0;f[l>>2]=i;break}else{i=0;g=0}while(0);H=a+112|0;n=f[H>>2]|0;k=f[n>>2]|0;m=n+4|0;if(!k){k=g;g=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2]|0;h=f[p+(m*12|0)+4>>2]|0;m=f[p+(m*12|0)+8>>2]|0;f[E>>2]=g;g=f[K>>2]|0;r=g-r>>2;if((1-e-q+((r|0)==0?0:(r*341|0)+-1|0)|0)>>>0>681){No(f[g+-4>>2]|0);f[K>>2]=(f[K>>2]|0)+-4}j=f[H>>2]|0;r=j+(m*12|0)|0;c=((f[I>>2]|0)+-1|0)==(h|0)?0:h+1|0;q=(f[D>>2]|0)+(m*12|0)|0;e=(f[a>>2]|0)-(f[(f[q>>2]|0)+(c<<2)>>2]|0)|0;c:do if(!e){if((s|0)>0){j=j+(m*12|0)+4|0;k=f[d>>2]|0;n=k+84|0;i=k+68|0;l=k+40|0;k=k+64|0;g=f[t>>2]|0;m=0;do{e=g;g=g+1|0;f[t>>2]=g;h=f[r>>2]|0;if(((f[j>>2]|0)-h|0)!=12){L=30;break b}if(!(b[n>>0]|0))e=f[(f[i>>2]|0)+(e<<2)>>2]|0;p=l;q=f[p>>2]|0;p=Qk(q|0,f[p+4>>2]|0,e|0,((e|0)<0)<<31>>31|0)|0;ef((f[f[k>>2]>>2]|0)+p|0,h|0,q|0)|0;m=m+1|0}while((m|0)<(s|0))}}else{if(!s){L=35;break b}if(s>>>0<3){i=f[v>>2]|0;f[i>>2]=c;e=f[I>>2]|0;if(e>>>0>1){g=c;h=1;do{g=(g|0)==(e+-1|0)?0:g+1|0;f[i+(h<<2)>>2]=g;h=h+1|0;e=f[I>>2]|0}while(h>>>0>>0)}g=0;while(1){if(!e)i=f[C>>2]|0;else{l=f[v>>2]|0;m=f[C>>2]|0;n=f[q>>2]|0;i=m;o=0;do{c=l+(o<<2)|0;f[m+(f[c>>2]<<2)>>2]=0;e=f[c>>2]|0;p=(f[a>>2]|0)-(f[n+(e<<2)>>2]|0)|0;do if(p|0){h=m+(e<<2)|0;if((p|0)>=33){L=49;break b}if((p|0)<=0){L=51;break b}j=f[A>>2]|0;k=32-j|0;e=f[y>>2]|0;j=f[e>>2]<(k|0)){p=p-k|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)>>2]=f[j+(e<<2)>>2];e=e+1|0}while(e>>>0>>0)}if(k|0){i=f[K>>2]|0;h=f[G>>2]|0;s=i-h>>2;e=f[F>>2]|0;g=f[E>>2]|0;if((((s|0)==0?0:(s*341|0)+-1|0)|0)==(g+e|0)){ec(M);e=f[F>>2]|0;g=f[E>>2]|0;i=f[K>>2]|0;h=f[G>>2]|0}e=g+e|0;if((i|0)==(h|0))e=0;else e=(f[h+(((e>>>0)/341|0)<<2)>>2]|0)+(((e>>>0)%341|0)*12|0)|0;f[e>>2]=k;f[e+4>>2]=c;f[e+8>>2]=m;f[E>>2]=(f[E>>2]|0)+1}if(l|0){i=f[K>>2]|0;h=f[G>>2]|0;s=i-h>>2;e=f[F>>2]|0;g=f[E>>2]|0;if((((s|0)==0?0:(s*341|0)+-1|0)|0)==(g+e|0)){ec(M);e=f[F>>2]|0;g=f[E>>2]|0;i=f[K>>2]|0;h=f[G>>2]|0}e=g+e|0;if((i|0)==(h|0))e=0;else e=(f[h+(((e>>>0)/341|0)<<2)>>2]|0)+(((e>>>0)%341|0)*12|0)|0;f[e>>2]=l;f[e+4>>2]=c;f[e+8>>2]=n;f[E>>2]=(f[E>>2]|0)+1}}while(0);e=f[E>>2]|0;if(!e)break a}if((L|0)==30)ra(4996,5026,51,5144);else if((L|0)==35)ra(17588,17626,223,17767);else if((L|0)==44)ra(4996,5026,51,5144);else if((L|0)==49)ra(17782,17806,48,17908);else if((L|0)==51)ra(17937,17806,49,17908)}while(0);e=f[G>>2]|0;g=f[F>>2]|0;i=e+(((g>>>0)/341|0)<<2)|0;h=f[K>>2]|0;k=h;l=e;if((h|0)==(e|0)){j=0;g=0}else{g=(f[i>>2]|0)+(((g>>>0)%341|0)*12|0)|0;j=g}d:while(1){do{if((g|0)==(j|0))break d;g=g+12|0}while((g-(f[i>>2]|0)|0)!=4092);g=i+4|0;i=g;g=f[g>>2]|0}f[E>>2]=0;g=k-l>>2;if(g>>>0>2)do{No(f[e>>2]|0);e=(f[G>>2]|0)+4|0;f[G>>2]=e;h=f[K>>2]|0;g=h-e>>2}while(g>>>0>2);switch(g|0){case 1:{g=170;L=94;break}case 2:{g=341;L=94;break}default:{}}if((L|0)==94)f[F>>2]=g;if((e|0)!=(h|0)){do{No(f[e>>2]|0);e=e+4|0}while((e|0)!=(h|0));e=f[G>>2]|0;g=f[K>>2]|0;if((g|0)!=(e|0))f[K>>2]=g+(~((g+-4-e|0)>>>2)<<2)}e=f[M>>2]|0;if(!e){u=N;return}No(e);u=N;return}function tb(a,b,c){a=a|0;b=b|0;c=c|0;var d=0,e=0,g=0,h=0,i=0,j=0,k=0,l=0,m=0,n=0,o=0,p=0,q=0,r=0,s=0,t=0,v=0,w=0,x=0,y=0,z=0,A=0,B=0,C=0,D=0,E=0,F=0,G=0,H=0,I=0,J=0,K=0,L=0,M=0,N=0,O=0,P=0,Q=0;Q=u;u=u+48|0;M=Q+24|0;P=Q;L=a+8|0;i=f[L>>2]|0;f[M>>2]=0;k=M+4|0;f[k>>2]=0;f[M+8>>2]=0;do if(i)if(i>>>0>1073741823)co(M);else{N=i<<2;e=Rk(N)|0;f[M>>2]=e;h=e+(i<<2)|0;f[M+8>>2]=h;kh(e|0,0,N|0)|0;f[k>>2]=h;break}else{h=0;e=0}while(0);K=a+112|0;m=f[K>>2]|0;j=f[m>>2]|0;l=m+4|0;if(!j){j=e;e=m+8|0}else{e=f[l>>2]|0;if((e|0)!=(j|0))f[l>>2]=e+(~((e+-4-j|0)>>>2)<<2);No(j);e=m+8|0;f[e>>2]=0;f[l>>2]=0;f[m>>2]=0;j=f[M>>2]|0;h=f[k>>2]|0;i=f[L>>2]|0}f[m>>2]=j;f[l>>2]=h;f[e>>2]=f[M+8>>2];f[M>>2]=0;h=M+4|0;f[h>>2]=0;f[M+8>>2]=0;do if(i)if(i>>>0>1073741823)co(M);else{N=i<<2;g=Rk(N)|0;f[M>>2]=g;d=g+(i<<2)|0;f[M+8>>2]=d;kh(g|0,0,N|0)|0;f[h>>2]=d;break}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P);d=f[I>>2]|0;e=f[H>>2]|0;h=f[N>>2]|0;g=f[J>>2]|0}d=e+d|0;if((h|0)==(g|0))d=0;else d=(f[g+(((d>>>0)/341|0)<<2)>>2]|0)+(((d>>>0)%341|0)*12|0)|0;f[d>>2]=k;f[d+4>>2]=b;f[d+8>>2]=m;f[H>>2]=(f[H>>2]|0)+1}}while(0);d=f[H>>2]|0;if(!d)break a}if((O|0)==34)ra(17588,17626,223,17767);else if((O|0)==43)ra(17782,17806,48,17908);else if((O|0)==45)ra(17937,17806,49,17908)}while(0);d=f[J>>2]|0;e=f[I>>2]|0;h=d+(((e>>>0)/341|0)<<2)|0;g=f[N>>2]|0;j=g;k=d;if((g|0)==(d|0)){i=0;e=0}else{e=(f[h>>2]|0)+(((e>>>0)%341|0)*12|0)|0;i=e}d:while(1){do{if((e|0)==(i|0))break d;e=e+12|0}while((e-(f[h>>2]|0)|0)!=4092);e=h+4|0;h=e;e=f[e>>2]|0}f[H>>2]=0;e=j-k>>2;if(e>>>0>2)do{No(f[d>>2]|0);d=(f[J>>2]|0)+4|0;f[J>>2]=d;g=f[N>>2]|0;e=g-d>>2}while(e>>>0>2);switch(e|0){case 1:{e=170;O=91;break}case 2:{e=341;O=91;break}default:{}}if((O|0)==91)f[I>>2]=e;if((d|0)!=(g|0)){do{No(f[d>>2]|0);d=d+4|0}while((d|0)!=(g|0));d=f[J>>2]|0;e=f[N>>2]|0;if((e|0)!=(d|0))f[N>>2]=e+(~((e+-4-d|0)>>>2)<<2)}d=f[P>>2]|0;if(!d){u=Q;return}No(d);u=Q;return}function ub(a,b,c){a=a|0;b=b|0;c=c|0;var d=0,e=0,g=0,h=0,i=0,j=0,k=0,l=0,m=0,n=0,o=0,p=0,q=0,r=0,s=0,t=0,v=0,w=0,x=0,y=0,z=0,A=0,B=0,C=0,D=0,E=0,F=0,G=0,H=0,I=0,J=0,K=0,L=0,M=0,N=0,O=0,P=0,Q=0;Q=u;u=u+48|0;M=Q+24|0;P=Q;L=a+8|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)>>2]|0;e=i+(b<<2)|0;f[e>>2]=(f[e>>2]|0)+1;e=f[d+(l*12|0)+4>>2]|0;g=i;if((e|0)!=(g|0)){h=f[d+(m*12|0)>>2]|0;e=e-g>>2;d=0;do{f[h+(d<<2)>>2]=f[i+(d<<2)>>2];d=d+1|0}while(d>>>0>>0)}if(j|0){h=f[N>>2]|0;g=f[J>>2]|0;t=h-g>>2;d=f[I>>2]|0;e=f[H>>2]|0;if((((t|0)==0?0:(t*341|0)+-1|0)|0)==(e+d|0)){ec(P);d=f[I>>2]|0;e=f[H>>2]|0;h=f[N>>2]|0;g=f[J>>2]|0}d=e+d|0;if((h|0)==(g|0))d=0;else d=(f[g+(((d>>>0)/341|0)<<2)>>2]|0)+(((d>>>0)%341|0)*12|0)|0;f[d>>2]=j;f[d+4>>2]=b;f[d+8>>2]=l;f[H>>2]=(f[H>>2]|0)+1}if(k|0){h=f[N>>2]|0;g=f[J>>2]|0;t=h-g>>2;d=f[I>>2]|0;e=f[H>>2]|0;if((((t|0)==0?0:(t*341|0)+-1|0)|0)==(e+d|0)){ec(P);d=f[I>>2]|0;e=f[H>>2]|0;h=f[N>>2]|0;g=f[J>>2]|0}d=e+d|0;if((h|0)==(g|0))d=0;else d=(f[g+(((d>>>0)/341|0)<<2)>>2]|0)+(((d>>>0)%341|0)*12|0)|0;f[d>>2]=k;f[d+4>>2]=b;f[d+8>>2]=m;f[H>>2]=(f[H>>2]|0)+1}}while(0);d=f[H>>2]|0;if(!d)break a}if((O|0)==34)ra(17588,17626,223,17767);else if((O|0)==43)ra(17782,17806,48,17908);else if((O|0)==45)ra(17937,17806,49,17908)}while(0);d=f[J>>2]|0;e=f[I>>2]|0;h=d+(((e>>>0)/341|0)<<2)|0;g=f[N>>2]|0;j=g;k=d;if((g|0)==(d|0)){i=0;e=0}else{e=(f[h>>2]|0)+(((e>>>0)%341|0)*12|0)|0;i=e}d:while(1){do{if((e|0)==(i|0))break d;e=e+12|0}while((e-(f[h>>2]|0)|0)!=4092);e=h+4|0;h=e;e=f[e>>2]|0}f[H>>2]=0;e=j-k>>2;if(e>>>0>2)do{No(f[d>>2]|0);d=(f[J>>2]|0)+4|0;f[J>>2]=d;g=f[N>>2]|0;e=g-d>>2}while(e>>>0>2);switch(e|0){case 1:{e=170;O=91;break}case 2:{e=341;O=91;break}default:{}}if((O|0)==91)f[I>>2]=e;if((d|0)!=(g|0)){do{No(f[d>>2]|0);d=d+4|0}while((d|0)!=(g|0));d=f[J>>2]|0;e=f[N>>2]|0;if((e|0)!=(d|0))f[N>>2]=e+(~((e+-4-d|0)>>>2)<<2)}d=f[P>>2]|0;if(!d){u=Q;return}No(d);u=Q;return}function vb(a){a=a|0;var c=0,d=0,e=0,g=0,i=0,j=0,k=0,l=0,m=0,n=0,o=0,p=0,q=0,r=0,s=0,t=0,v=0,w=0,x=0,y=0,z=0;z=u;u=u+32|0;x=z+20|0;y=z+16|0;w=z+4|0;q=z;o=a+36|0;p=a+37|0;v=a+32|0;i=f[v>>2]|0;do if((((h[o>>0]|0)<<8|(h[p>>0]|0))&65535)<514){l=i+8|0;k=f[l>>2]|0;l=f[l+4>>2]|0;m=i+16|0;d=m;c=f[d>>2]|0;d=f[d+4>>2]|0;g=Hl(c|0,d|0,4,0)|0;e=I;if((l|0)<(e|0)|(l|0)==(e|0)&k>>>0>>0){a=0;u=z;return a|0}j=(f[i>>2]|0)+c|0;j=h[j>>0]|h[j+1>>0]<<8|h[j+2>>0]<<16|h[j+3>>0]<<24;f[x>>2]=j;t=m;f[t>>2]=g;f[t+4>>2]=e;c=Hl(c|0,d|0,8,0)|0;d=I;if((l|0)<(d|0)|(l|0)==(d|0)&k>>>0>>0){a=0;u=z;return a|0}else{t=(f[i>>2]|0)+g|0;f[y>>2]=h[t>>0]|h[t+1>>0]<<8|h[t+2>>0]<<16|h[t+3>>0]<<24;t=m;f[t>>2]=c;f[t+4>>2]=d;break}}else{if(!(Eh(x,i)|0)){a=0;u=z;return a|0}if(Eh(y,f[v>>2]|0)|0){j=f[x>>2]|0;break}else{a=0;u=z;return a|0}}while(0);if(j>>>0>1431655765){a=0;u=z;return a|0}c=f[y>>2]|0;t=Qk(j|0,0,3,0)|0;s=I;if(0>s>>>0|0==(s|0)&c>>>0>t>>>0){a=0;u=z;return a|0}k=f[v>>2]|0;t=k+8|0;s=f[t+4>>2]|0;d=k+16|0;n=d;m=f[n>>2]|0;n=f[n+4>>2]|0;if(!((s|0)>(n|0)|((s|0)==(n|0)?(f[t>>2]|0)>>>0>m>>>0:0))){a=0;u=z;return a|0}t=b[(f[k>>2]|0)+m>>0]|0;l=Hl(m|0,n|0,1,0)|0;i=I;s=d;f[s>>2]=l;f[s+4>>2]=i;a:do if(!(t<<24>>24)){if(!(Td(a,j)|0)){a=0;u=z;return a|0}}else{if(c>>>0<256){if(!j)break;o=a+44|0;p=w+4|0;q=w+8|0;f[w>>2]=0;f[w+4>>2]=0;f[w+8>>2]=0;d=k+8|0;c=f[d>>2]|0;d=f[d+4>>2]|0;b:do if((d|0)>(i|0)|(d|0)==(i|0)&c>>>0>l>>>0){n=c;g=d;m=0;while(1){e=k+16|0;d=f[k>>2]|0;s=b[d+l>>0]|0;c=Hl(l|0,i|0,1,0)|0;t=I;r=e;f[r>>2]=c;f[r+4>>2]=t;f[w>>2]=s&255;if(!((g|0)>(t|0)|(g|0)==(t|0)&n>>>0>c>>>0))break b;s=b[d+c>>0]|0;c=Hl(l|0,i|0,2,0)|0;t=I;r=e;f[r>>2]=c;f[r+4>>2]=t;f[p>>2]=s&255;if(!((g|0)>(t|0)|(g|0)==(t|0)&n>>>0>c>>>0))break b;d=b[d+c>>0]|0;c=Hl(l|0,i|0,3,0)|0;f[e>>2]=c;f[e+4>>2]=I;f[q>>2]=d&255;d=f[o>>2]|0;e=d+100|0;c=f[e>>2]|0;if((c|0)==(f[d+104>>2]|0)){rg(d+96|0,w);c=f[x>>2]|0}else{f[c>>2]=f[w>>2];f[c+4>>2]=f[w+4>>2];f[c+8>>2]=f[w+8>>2];f[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]=0;f[w+8>>2]=0;o=k+8|0;n=f[o>>2]|0;o=f[o+4>>2]|0;p=Hl(l|0,i|0,2,0)|0;d=I;if((o|0)<(d|0)|(o|0)==(d|0)&n>>>0

>>0)break;else j=c}}while(0);a=0;u=z;return a|0}t=a+44|0;if((f[(f[t>>2]|0)+80>>2]|0)<2097152?(((h[o>>0]|0)<<8|(h[p>>0]|0))&65535)>513:0){if(!j)break;i=w+4|0;j=w+8|0;f[w>>2]=0;f[w+4>>2]=0;f[w+8>>2]=0;d:do if(Eh(q,k)|0){g=0;do{f[w>>2]=f[q>>2];if(!(Eh(q,f[v>>2]|0)|0))break d;f[i>>2]=f[q>>2];if(!(Eh(q,f[v>>2]|0)|0))break d;f[j>>2]=f[q>>2];d=f[t>>2]|0;e=d+100|0;c=f[e>>2]|0;if((c|0)==(f[d+104>>2]|0))rg(d+96|0,w);else{f[c>>2]=f[w>>2];f[c+4>>2]=f[w+4>>2];f[c+8>>2]=f[w+8>>2];f[e>>2]=(f[e>>2]|0)+12}g=g+1|0;if(g>>>0>=(f[x>>2]|0)>>>0)break a;s=f[v>>2]|0;f[w>>2]=0;f[w+4>>2]=0;f[w+8>>2]=0}while(Eh(q,s)|0)}while(0);a=0;u=z;return a|0}if(j|0){r=w+4|0;s=w+8|0;f[w>>2]=0;f[w+4>>2]=0;f[w+8>>2]=0;e=k+8|0;g=f[e>>2]|0;e=f[e+4>>2]|0;c=Hl(m|0,n|0,5,0)|0;d=I;e:do if(!((e|0)<(d|0)|(e|0)==(d|0)&g>>>0>>0)){p=c;o=e;n=g;q=0;while(1){m=k+16|0;g=f[k>>2]|0;e=g+l|0;e=h[e>>0]|h[e+1>>0]<<8|h[e+2>>0]<<16|h[e+3>>0]<<24;c=m;f[c>>2]=p;f[c+4>>2]=d;f[w>>2]=e;e=Hl(l|0,i|0,8,0)|0;c=I;if((o|0)<(c|0)|(o|0)==(c|0)&n>>>0>>0)break e;d=g+p|0;d=h[d>>0]|h[d+1>>0]<<8|h[d+2>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>>0){if(h>>>0>>0?(g=c+(h*12|0)|0,(d|0)!=(g|0)):0)f[e>>2]=d+(~(((d+-12-g|0)>>>0)/12|0)*12|0)}else Ze(i,h-j|0,I);s=a+212|0;r=a+216|0;if((f[s>>2]|0)==(f[r>>2]|0)){e=f[H>>2]|0;c=f[e+44>>2]|0;g=f[c+100>>2]|0;d=f[c+96>>2]|0;a:do if((g-d|0)>0){p=J+4|0;q=J+8|0;k=e;m=e;o=0;while(1){f[J>>2]=0;f[J+4>>2]=0;f[J+8>>2]=0;i=o*3|0;j=f[G>>2]|0;if((o|0)<0)n=-1073741824;else{e=f[j>>2]|0;if((i|0)>=((f[j+4>>2]|0)-e>>2|0)){F=19;break}n=f[e+(i<<2)>>2]|0}f[J>>2]=n;h=i+1|0;if((i|0)<-1){f[p>>2]=-1073741824;if((i|0)==-2)F=94;else e=-1073741824}else{e=f[j>>2]|0;if((h|0)>=((f[j+4>>2]|0)-e>>2|0)){F=19;break}f[p>>2]=f[e+(h<<2)>>2];F=94}if((F|0)==94){F=0;h=i+2|0;e=f[j>>2]|0;if((h|0)>=((f[j+4>>2]|0)-e>>2|0)){F=19;break}e=f[e+(h<<2)>>2]|0}f[q>>2]=e;i=c+96|0;h=c+100|0;j=(g-d|0)/12|0;a=d;l=o;o=o+1|0;if((l|0)<(j|0)){j=k;i=m;e=a}else{e=g;f[I>>2]=0;f[I+4>>2]=0;f[I+8>>2]=0;if(o>>>0<=j>>>0)if(o>>>0>>0?(v=a+(o*12|0)|0,(e|0)!=(v|0)):0){g=e+(~(((e+-12-v|0)>>>0)/12|0)*12|0)|0;f[h>>2]=g;h=a;e=m}else{h=a;e=m}else{Ze(i,o-j|0,I);e=f[H>>2]|0;d=f[e+44>>2]|0;h=f[i>>2]|0;c=d;g=f[d+100>>2]|0;d=f[d+96>>2]|0}j=e;i=e;e=h}f[e+(l*12|0)>>2]=n;f[e+(l*12|0)+4>>2]=f[p>>2];f[e+(l*12|0)+8>>2]=f[q>>2];if((o|0)>=((g-d|0)/12|0|0)){t=j;break a}else{k=j;m=i}}if((F|0)==19)ra(16937,16972,98,17057)}else t=e;while(0);f[(f[t+4>>2]|0)+80>>2]=b;u=K;return 1}f[J>>2]=0;v=J+4|0;f[v>>2]=0;f[J+8>>2]=0;e=f[G>>2]|0;d=(f[e+4>>2]|0)-(f[e>>2]|0)|0;c=d>>2;f[E>>2]=0;t=E+4|0;f[t>>2]=0;f[E+8>>2]=0;do if(c|0)if(c>>>0>1073741823)co(E);else{q=Rk(d)|0;f[E>>2]=q;b=q+(c<<2)|0;f[E+8>>2]=b;kh(q|0,0,d|0)|0;f[t>>2]=b;break}while(0);b:do if(((f[e+28>>2]|0)-(f[e+24>>2]|0)|0)>0){p=a+120|0;q=J+8|0;c=e;o=0;c:while(1){i=f[(f[c+24>>2]|0)+(o<<2)>>2]|0;d:do if((i|0)>=0){e:do if((f[(f[p>>2]|0)+(o>>>5<<2)>>2]&1<<(o&31)|0)==0?(w=f[r>>2]|0,x=f[s>>2]|0,y=x,(w|0)!=(x|0)):0){a=(((i>>>0)%3|0|0)==0?2:-1)+i|0;k=(a|0)<0;n=(w-x|0)/116|0;j=c+12|0;h=c+12|0;l=0;f:while(1){b=f[y+(l*116|0)+68>>2]|0;d=f[b>>2]|0;if((i|0)>=((f[b+4>>2]|0)-d>>2|0))break c;b=f[d+(i<<2)>>2]|0;do if(1<<(b&31)&f[(f[y+(l*116|0)+16>>2]|0)+(b>>>5<<2)>>2]|0){g=f[y+(l*116|0)+32>>2]|0;m=f[g+(i<<2)>>2]|0;if(!k){d=f[(f[j>>2]|0)+(a<<2)>>2]|0;do if((d|0)>=0)if(!((d>>>0)%3|0)){d=d+2|0;break}else{d=d+-1|0;break}while(0);if((d|0)==(i|0))break;else e=d}else e=a;while(1){d=f[g+(e<<2)>>2]|0;if((e|0)<0)break f;if((d|0)!=(m|0)){i=e;break e}d=(((e>>>0)%3|0|0)==0?2:-1)+e|0;do if((d|0)>=0){d=f[(f[h>>2]|0)+(d<<2)>>2]|0;if((d|0)<0)break;if(!((d>>>0)%3|0)){d=d+2|0;break}else{d=d+-1|0;break}}while(0);if((d|0)==(i|0))break;else e=d}}while(0);l=l+1|0;if(l>>>0>=n>>>0)break e}while(1)if((d|0)==(m|0))d=m;else{i=e;break}}while(0);d=f[v>>2]|0;f[(f[E>>2]|0)+(i<<2)>>2]=d-(f[J>>2]|0)>>2;f[I>>2]=i;if(d>>>0<(f[q>>2]|0)>>>0){f[d>>2]=i;f[v>>2]=d+4}else{Og(J,I);c=f[G>>2]|0}if((((i|0)>=0?(z=(((i>>>0)%3|0|0)==0?2:-1)+i|0,(z|0)>=0):0)?(A=f[(f[c+12>>2]|0)+(z<<2)>>2]|0,(A|0)>=0):0)?(B=A+(((A>>>0)%3|0|0)==0?2:-1)|0,(B|0)>-1&(B|0)!=(i|0)):0){h=B;g=i;while(1){c=f[r>>2]|0;d=f[s>>2]|0;e=d;g:do if((c|0)!=(d|0)){d=(c-d|0)/116|0;c=0;while(1){b=f[e+(c*116|0)+32>>2]|0;c=c+1|0;if((f[b+(h<<2)>>2]|0)!=(f[b+(g<<2)>>2]|0))break;if(c>>>0>=d>>>0){F=68;break g}}c=f[v>>2]|0;f[(f[E>>2]|0)+(h<<2)>>2]=c-(f[J>>2]|0)>>2;f[I>>2]=h;if(c>>>0<(f[q>>2]|0)>>>0){f[c>>2]=h;f[v>>2]=c+4}else Og(J,I)}else F=68;while(0);if((F|0)==68){F=0;b=f[E>>2]|0;f[b+(h<<2)>>2]=f[b+(g<<2)>>2]}c=(((h>>>0)%3|0|0)==0?2:-1)+h|0;if((c|0)<0)break d;c=f[(f[(f[G>>2]|0)+12>>2]|0)+(c<<2)>>2]|0;if((c|0)<0)break d;c=c+(((c>>>0)%3|0|0)==0?2:-1)|0;if((c|0)>-1&(c|0)!=(i|0)){g=h;h=c}else break}}}while(0);o=o+1|0;c=f[G>>2]|0;if((o|0)>=((f[c+28>>2]|0)-(f[c+24>>2]|0)>>2|0))break b}ra(16937,16972,98,17057)}while(0);g=f[H>>2]|0;c=f[g+44>>2]|0;e=f[c+100>>2]|0;d=f[c+96>>2]|0;if((e-d|0)>0){n=D+4|0;o=D+8|0;k=d;d=g;h=g;l=0;while(1){f[D>>2]=0;f[D+4>>2]=0;f[D+8>>2]=0;j=(f[E>>2]|0)+(l*3<<2)|0;f[D>>2]=f[j>>2];f[D+4>>2]=f[j+4>>2];f[D+8>>2]=f[j+8>>2];j=c+96|0;i=c+100|0;a=(e-k|0)/12|0;g=k;m=l;l=l+1|0;if((m|0)<(a|0))i=k;else{d=e;f[I>>2]=0;f[I+4>>2]=0;f[I+8>>2]=0;if(l>>>0<=a>>>0)if(l>>>0>>0?(C=g+(l*12|0)|0,(d|0)!=(C|0)):0){e=d+(~(((d+-12-C|0)>>>0)/12|0)*12|0)|0;f[i>>2]=e;d=k}else d=k;else{Ze(j,l-a|0,I);h=f[H>>2]|0;d=f[h+44>>2]|0;g=f[j>>2]|0;c=d;e=f[d+100>>2]|0;d=f[d+96>>2]|0}i=d;d=h}f[g+(m*12|0)>>2]=f[D>>2];f[g+(m*12|0)+4>>2]=f[n>>2];f[g+(m*12|0)+8>>2]=f[o>>2];if((l|0)>=((e-i|0)/12|0|0))break;else k=i}}else d=g;c=f[J>>2]|0;f[(f[d+4>>2]|0)+80>>2]=(f[v>>2]|0)-c>>2;d=f[E>>2]|0;if(d){c=f[t>>2]|0;if((c|0)!=(d|0))f[t>>2]=c+(~((c+-4-d|0)>>>2)<<2);No(d);c=f[J>>2]|0}if(c|0){d=f[v>>2]|0;if((d|0)!=(c|0))f[v>>2]=d+(~((d+-4-c|0)>>>2)<<2);No(c)}u=K;return 1}function xb(a,b){a=a|0;b=b|0;var c=0,d=0,e=0,g=0,h=0,i=0,j=0,k=0,l=0,m=0,n=0,o=0,p=0,q=0,r=0,s=0,t=0,v=0,w=0,x=0,y=0,z=0,A=0,B=0,C=0,D=0,E=0,F=0;F=u;u=u+32|0;A=F+28|0;E=F+16|0;D=F+4|0;z=F;if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0;if((g|0)==(f[r>>2]|0))Og(B,3564);else{f[g>>2]=-1073741824;f[y>>2]=g+4}g=f[p>>2]|0;if((g|0)==(f[q>>2]|0))Og(t,A);else{f[g>>2]=f[A>>2];f[p>>2]=g+4}g=f[x>>2]|0;h=f[w>>2]|0;if((g|0)==(h<<5|0)){if((g+1|0)<0){h=51;break a}b=h<<6;l=g+32&-32;mg(E,g>>>0<1073741823?(b>>>0>>0?l:b):2147483647);g=f[x>>2]|0}f[x>>2]=g+1;h=f[E>>2]|0;k=h+(g>>>5<<2)|0;f[k>>2]=f[k>>2]&~(1<<(g&31));f[A>>2]=e;g=e;k=1;e=e+1|0}b=h+(g>>>5<<2)|0;f[b>>2]=f[b>>2]|1<<(g&31);b:do if(k){h=j;while(1){if((h|0)==-1073741824){h=68;break b}g=f[D>>2]|0;i=g+(h>>>5<<2)|0;f[i>>2]=f[i>>2]|1<<(h&31);i=f[A>>2]|0;f[(f[B>>2]|0)+(i<<2)>>2]=h;f[(f[a>>2]|0)+(h<<2)>>2]=i;i=h+1|0;do if((h|0)>=0){h=((i|0)%3|0|0)==0?h+-2|0:i;if((h|0)<0)break;h=f[(f[o>>2]|0)+(h<<2)>>2]|0;i=h+1|0;if((h|0)<0)break;h=((i|0)%3|0|0)==0?h+-2|0:i}while(0);if((h|0)==(j|0)){h=67;break}}}else{h=j;while(1){if((h|0)==-1073741824){h=68;break b}g=f[D>>2]|0;i=g+(h>>>5<<2)|0;f[i>>2]=f[i>>2]|1<<(h&31);f[(f[B>>2]|0)+(f[A>>2]<<2)>>2]=h;i=h+1|0;do if((h|0)>=0){h=((i|0)%3|0|0)==0?h+-2|0:i;if((h|0)<0)break;h=f[(f[o>>2]|0)+(h<<2)>>2]|0;i=h+1|0;if((h|0)<0)break;h=((i|0)%3|0|0)==0?h+-2|0:i}while(0);if((h|0)==(j|0)){h=67;break}}}while(0);do if((h|0)==67){h=0;if((j|0)==-1073741824){j=-1073741824;h=74}}else if((h|0)==68)if((j|0)>=0){g=(((j>>>0)%3|0|0)==0?2:-1)+j|0;if((g|0)>=0){g=f[(f[o>>2]|0)+(g<<2)>>2]|0;if((g|0)<0){j=g;h=74;break}if(!((g>>>0)%3|0)){j=g+2|0;h=74;break}else{j=g+-1|0;h=74;break}}else{j=g;h=74}}else h=74;while(0);c:do if((h|0)==74){g=f[D>>2]|0;i=g+(j>>>5<<2)|0;l=1<<(j&31);h=(j|0)<0;if((j|0)!=-1073741824){if(!k){g=l;while(1){if(h){h=86;break a}f[i>>2]=f[i>>2]|g;g=(((j>>>0)%3|0|0)==0?2:-1)+j|0;do if((g|0)>=0){g=f[(f[o>>2]|0)+(g<<2)>>2]|0;if((g|0)<0)break;if(!((g>>>0)%3|0)){g=g+2|0;break}else{g=g+-1|0;break}}while(0);h=f[D>>2]|0;if((g|0)==-1073741824){g=h;break c}else{j=g;i=h+(g>>>5<<2)|0;h=(g|0)<0;g=1<<(g&31)}}}b=f[a>>2]|0;k=h;g=l;while(1){h=b+(j<<2)|0;do{f[i>>2]=f[i>>2]|g;f[h>>2]=f[A>>2]}while(k);g=(((j>>>0)%3|0|0)==0?2:-1)+j|0;do if((g|0)>=0){g=f[(f[o>>2]|0)+(g<<2)>>2]|0;if((g|0)<0){h=g;break}if(!((g>>>0)%3|0)){h=g+2|0;break}else{h=g+-1|0;break}}else h=g;while(0);g=f[D>>2]|0;if((h|0)==-1073741824)break;else{j=h;i=g+(h>>>5<<2)|0;k=(h|0)<0;g=1<<(h&31)}}}}while(0)}m=m+1|0}while((m|0)<3)}s=s+1|0;if((s|0)>=(((f[v>>2]|0)-(f[a>>2]|0)>>2>>>0)/3|0|0)){h=22;break}}if((h|0)==22){c=f[E>>2]|0;d=c;C=f[x>>2]|0;break}else if((h|0)==51)co(E);else if((h|0)==86)while(1)h=86}else{d=i;C=l;c=g}}else{d=i;C=l;c=g}while(0);k=a+44|0;f[k>>2]=0;B=C>>>5;j=d+(B<<2)|0;i=C&31;e=(B|0)!=0;d:do if(B|i|0){if(!i){g=d;d=0;while(1){e:do if(e){e=0;while(1){if(!(f[g>>2]&1<>2]=d}if((e|0)==31)break;else e=e+1|0}}else{e=0;while(1){if(!(f[g>>2]&1<>2]=d}if((e|0)==31)break e;e=e+1|0;if(!e)break d}}while(0);g=g+4|0;if((g|0)==(j|0))break d;else e=1}}if(e){g=d;d=0;e=0;do{h=0;while(1){if(!(f[g>>2]&1<>2]=e;d=e}if((h|0)==31)break;else h=h+1|0}g=g+4|0}while((g|0)!=(j|0))}else{g=d;d=0}e=0;do{if(!(f[g>>2]&1<>2]=d}e=e+1|0}while((e|0)!=(i|0))}while(0);d=f[D>>2]|0;if(d){No(d);c=f[E>>2]|0}if(!c){u=F;return 1}No(c);u=F;return 1} +function Zk(a){a=a|0;nm(a);f[a>>2]=2884;f[a+24>>2]=-1;f[a+28>>2]=0;n[a+32>>2]=$(0.0);return}function _k(a,b,c,d){a=a|0;b=b|0;c=c|0;d=d|0;return Fk(b,c,d)|0}function $k(a,b,c){a=a|0;b=b|0;c=c|0;f[a>>2]=b;b=a+8|0;f[b>>2]=c;f[b+4>>2]=0;a=a+16|0;f[a>>2]=0;f[a+4>>2]=0;return}function al(a,b,c,d){a=a|0;b=b|0;c=c|0;d=d|0;return (((f[a+8>>2]|0)+-1|0)==(d|0)?0:d+1|0)|0}function bl(a,b,c,d){a=a|0;b=b|0;c=c|0;d=d|0;var e=0,g=0;e=u;u=u+16|0;g=e;f[g>>2]=d;d=ch(a,b,c,g)|0;u=e;return d|0}function cl(a){a=a|0;f[a>>2]=2800;So(a+88|0);return}function dl(a){a=a|0;f[a>>2]=0;f[a+4>>2]=0;f[a+8>>2]=0;a=a+16|0;f[a>>2]=0;f[a+4>>2]=0;f[a+8>>2]=0;f[a+12>>2]=0;return}function el(a,b,c){a=a|0;b=b|0;c=c|0;return 1}function fl(a,b,c){a=a|0;b=b|0;c=c|0;return Zi(a,b,c)|0}function gl(a,b,c,d,e,f,g){a=a|0;b=b|0;c=c|0;d=d|0;e=e|0;f=f|0;g=g|0;return Qa[a&31](b|0,c|0,d|0,e|0,f|0,g|0)|0}function hl(a,b,c){a=a|0;b=b|0;c=c|0;return Vj(b,c)|0}function il(a){a=a|0;od(a);No(a);return}function jl(a,b,c,d){a=a|0;b=b|0;c=c|0;d=d|0;return He(b,c,d)|0}function kl(){var a=0;a=u;u=u+16|0;if(!(Ha(21596,103)|0)){u=a;return}else wl(20780,a)}function ll(a){a=a|0;pd(a);No(a);return}function ml(a,b,c,d,e,f,g){a=a|0;b=b|0;c=c|0;d=d|0;e=e|0;f=f|0;g=g|0;Xa[a&3](b|0,c|0,d|0,e|0,f|0,g|0)}function nl(a,b){a=a|0;b=b|0;var c=0,d=0;c=u;u=u+16|0;d=c;f[d>>2]=b;b=yf(f[999]|0,a,d)|0;u=c;return b|0}function ol(a){a=a|0;if(!(f[a+44>>2]|0))return 0;else return Na[f[(f[a>>2]|0)+48>>2]&127](a)|0;return 0}function pl(a,b,c,d){a=a|0;b=b|0;c=c|0;d=d|0;return xh(b,c,d)|0}function ql(a,b,c){a=a|0;b=b|0;c=c|0;if(b|0)kh(a|0,(mo(c)|0)&255|0,b|0)|0;return a|0}function rl(a){a=a|0;return 4}function sl(a,b,c){a=a|0;b=b|0;c=c|0;if((c|0)<32){I=b<>>32-c;return a<>2]|0;return Oa[f[(f[a>>2]|0)+16>>2]&127](a,b)|0}function ul(a){a=a|0;var c=0;if(!a)return;c=a+4|0;if((b[c+11>>0]|0)<0)No(f[c>>2]|0);No(a);return}function vl(a,b){a=a|0;b=b|0;a=f[a+48>>2]|0;return Oa[f[(f[a>>2]|0)+12>>2]&127](a,b)|0}function wl(a,b){a=a|0;b=b|0;var c=0;c=u;u=u+16|0;f[c>>2]=b;b=f[906]|0;yf(b,a,c)|0;Oh(10,b)|0;Ea()}function xl(a,b){a=a|0;b=b|0;a=f[a+48>>2]|0;return Oa[f[(f[a>>2]|0)+20>>2]&127](a,b)|0}function yl(a,b,c){a=a|0;b=b|0;c=c|0;if((c|0)<32){I=b>>>c;return a>>>c|(b&(1<>>c-32|0}function zl(a,b,c){a=a|0;b=b|0;c=c|0;return Bi(a,b,c)|0}function Al(a){a=a|0;Qc(a);No(a);return}function Bl(a){a=a|0;return 5}function Cl(a){a=a|0;var b=0;f[a>>2]=3608;a=a+4|0;b=a+80|0;do{f[a>>2]=0;a=a+4|0}while((a|0)<(b|0));return}function Dl(a){a=a|0;return 6}function El(a,b,c,d){a=a|0;b=b|0;c=c|0;d=d|0;return Ai(b,c,d)|0}function Fl(a,b,c){a=a|0;b=b|0;c=c|0;f[a+28>>2]=b;f[a+32>>2]=c;return 1}function Gl(){}function Hl(a,b,c,d){a=a|0;b=b|0;c=c|0;d=d|0;c=a+c>>>0;return (I=b+d+(c>>>0>>0|0)>>>0,c|0)|0}function Il(a,b){a=a|0;b=b|0;if(!b)b=0;else b=Qf(f[b>>2]|0,f[b+4>>2]|0,a)|0;return (b|0?b:a)|0}function Jl(a,b,c){a=a|0;b=b|0;c=c|0;return hl(a,b,c)|0}function Kl(a,b,c){a=a|0;b=b|0;c=c|0;return xe(b,c)|0}function Ll(a){a=a|0;f[a>>2]=1368;f[a+4>>2]=0;f[a+8>>2]=0;f[a+12>>2]=-1;f[a+16>>2]=0;return}function Ml(a,b){a=a|0;b=b|0;Ih(a,b);return}function Nl(a){a=a|0;a=a+4|0;if((b[a+11>>0]|0)<0){a=f[a>>2]|0;return a|0}else return a|0;return 0}function Ol(a,b,c,d,e,f){a=a|0;b=b|0;c=c|0;d=d|0;e=e|0;f=f|0;Wa[a&3](b|0,c|0,d|0,e|0,f|0)}function Pl(a,b,c){a=a|0;b=b|0;c=c|0;return Ei(a,b,c)|0}function Ql(a,b,c){a=a|0;b=b|0;c=c|0;return Hg(a,b,c)|0}function Rl(a,b,c){a=a|0;b=b|0;c=c|0;return Xg(a,b,c)|0}function Sl(a,b,c){a=a|0;b=b|0;c=c|0;return qg(a,b,c)|0}function Tl(a,b,c){a=a|0;b=b|0;c=c|0;return +(+Tg(a,b,c))}function Ul(a){a=a|0;a=f[a+48>>2]|0;return Na[f[(f[a>>2]|0)+28>>2]&127](a)|0}function Vl(a,b){a=a|0;b=b|0;return Oa[f[(f[a>>2]|0)+12>>2]&127](a,b)|0}function Wl(a,b){a=a|0;b=b|0;return Oa[f[(f[a>>2]|0)+56>>2]&127](a,b)|0}function Xl(a){a=a|0;a=f[a+48>>2]|0;return Na[f[(f[a>>2]|0)+24>>2]&127](a)|0}function Yl(a){a=a|0;f[a>>2]=0;f[a+4>>2]=0;f[a+8>>2]=0;f[a+12>>2]=0;f[a+16>>2]=0;return}function Zl(a,b,c){a=a|0;b=b|0;c=c|0;return Fh(a,b,c)|0}function _l(a,b){a=a|0;b=b|0;f[a+4>>2]=b;return 1}function $l(a,b,c){a=a|0;b=b|0;c=c|0;return tm(b,c)|0}function am(a){a=a|0;a=f[a+48>>2]|0;return Na[f[(f[a>>2]|0)+36>>2]&127](a)|0}function bm(a,b,c){a=a|0;b=b|0;c=c|0;return _g(a,b,c)|0}function cm(a,b,c){a=a|0;b=b|0;c=c|0;return Ug(a,b,c)|0}function dm(a){a=a|0;nm(a);f[a>>2]=2376;f[a+24>>2]=-1;return}function em(a,b){a=a|0;b=b|0;f[a+8>>2]=b;f[a+12>>2]=-1;return 1}function fm(a,b,c){a=a|0;b=b|0;c=c|0;return Tf(a,b,c)|0}function gm(a,b,c){a=a|0;b=b|0;c=c|0;return Uf(b,c)|0}function hm(a){a=+a;var b=0;p[s>>3]=a;b=f[s>>2]|0;I=f[s+4>>2]|0;return b|0}function im(a){a=a|0;f[a+12>>2]=0;f[a+16>>2]=0;f[a>>2]=0;n[a+4>>2]=$(0.0);return}function jm(a,b,c,d){a=a|0;b=b|0;c=c|0;d=d|0;d=b-d-(c>>>0>a>>>0|0)>>>0;return (I=d,a-c>>>0|0)|0}function km(){var a=0;a=Rk(40)|0;f[a>>2]=-1;dl(a+8|0);return a|0}function lm(){var a=0;a=Rk(8)|0;f[a>>2]=1200;f[a+4>>2]=-1;return a|0}function mm(a,b,c){a=a|0;b=b|0;c=c|0;return Cg(a,b,c)|0}function nm(a){a=a|0;Ll(a);f[a>>2]=1476;f[a+20>>2]=0;return}function om(a,b){a=a|0;b=b|0;Ml(a,b);return}function pm(a,b){a=a|0;b=b|0;return $(n[(f[a+8>>2]|0)+(b<<2)>>2])}function qm(a,b){a=a|0;b=b|0;return xj(a,b)|0}function rm(a){a=a|0;if((b[a+11>>0]|0)<0)No(f[a>>2]|0);return}function sm(a){a=a|0;if(!a)return;Sa[f[(f[a>>2]|0)+4>>2]&127](a);return}function tm(a,b){a=a|0;b=b|0;return Si(a,b)|0}function um(a,b,c,d,e){a=a|0;b=b|0;c=c|0;d=d|0;e=e|0;Va[a&7](b|0,c|0,d|0,e|0)}function vm(a,b,c){a=a|0;b=b|0;c=c|0;if(c|0)_j(a|0,b|0,c|0)|0;return a|0}function wm(a){a=a|0;var b=0;b=a+84|0;do{f[a>>2]=0;a=a+4|0}while((a|0)<(b|0));return}function xm(a,b,c){a=a|0;b=b|0;c=c|0;return bk(b,c)|0}function ym(a){a=a|0;var b=0;if(a>>>0>4294963200){b=Ao()|0;f[b>>2]=0-a;a=-1}return a|0}function zm(a,b,c){a=a|0;b=b|0;c=c|0;if(c|0)ef(a|0,b|0,c|0)|0;return a|0}function Am(a,b){a=a|0;b=b|0;return -1}function Bm(a){a=a|0;if(!a)a=0;else a=(Cf(a,1072,1160,0)|0)!=0;return a&1|0}function Cm(a){a=a|0;return 3}function Dm(a){a=a|0;var b=0;b=u;u=u+16|0;Ra[a&3]();wl(20883,b)}function Em(a,b){a=a|0;b=b|0;return wn(a,b)|0}function Fm(a){a=a|0;$f(a);No(a);return}function Gm(a){a=a|0;f[a>>2]=0;f[a+4>>2]=0;f[a+8>>2]=0;f[a+12>>2]=0;return}function Hm(a){a=a|0;Qm(a);f[a>>2]=3012;f[a+48>>2]=0;return}function Im(a,b,c,d){a=a|0;b=b|0;c=c|0;d=d|0;return Pa[a&31](b|0,c|0,d|0)|0}function Jm(a,b,c){a=a|0;b=b|0;c=c|0;$k(a,b,c);return}function Km(a,b){a=a|0;b=b|0;f[a>>2]=4728;Sj(a+4|0,b);return}function Lm(a){a=a|0;if(!a)return;So(a+24|0);No(a);return}function Mm(a,b){a=a|0;b=b|0;return f[(f[a+4>>2]|0)+(b<<2)>>2]|0}function Nm(){var a=0;a=Rk(64)|0;wj(a);return a|0}function Om(a,b){a=a|0;b=b|0;return $(Um(a,b))}function Pm(a){a=a|0;return f[a+8>>2]|0}function Qm(a){a=a|0;Zj(a);f[a>>2]=2952;f[a+44>>2]=0;return}function Rm(a){a=a|0;if(!a)return;Rg(a);No(a);return}function Sm(a,b){a=a|0;b=b|0;return Cn(a,b)|0}function Tm(a){a=a|0;return b[(f[a+8>>2]|0)+24>>0]|0}function Um(a,b){a=a|0;b=b|0;return $(n[(f[a>>2]|0)+(b<<2)>>2])}function Vm(a,b,c){a=a|0;b=b|0;c=c|0;if(!(f[a>>2]&32))tg(b,c,a)|0;return}function Wm(a){a=a|0;return (f[a+8>>2]|0)-(f[a+4>>2]|0)>>2|0}function Xm(a,b,c,d){a=a|0;b=b|0;c=c|0;d=d|0;Ua[a&15](b|0,c|0,d|0)}function Ym(){var a=0;a=Rk(96)|0;Ak(a);return a|0}function Zm(a){a=a|0;var b=0;b=u;u=u+a|0;u=u+15&-16;return b|0}function _m(a){a=a|0;return ((f[a+100>>2]|0)-(f[a+96>>2]|0)|0)/12|0|0}function $m(a,b){a=a|0;b=b|0;if(!a)a=0;else a=Mg(a,b,0)|0;return a|0}function an(a){a=a|0;var b=0;b=(Jo()|0)+188|0;return ji(a,f[b>>2]|0)|0}function bn(){var a=0;a=Rk(16)|0;Gm(a);return a|0}function cn(){var a=0;a=Rk(12)|0;tn(a);return a|0}function dn(){var a=0;a=Rk(40)|0;lk(a);return a|0}function en(a,b){a=a|0;b=b|0;return nn(a,b)|0}function fn(a,b,c,d,e,f){a=a|0;b=b|0;c=c|0;d=d|0;e=e|0;f=f|0;aa(3);return 0}function gn(a){a=a|0;rh(a);No(a);return}function hn(a){a=a|0;n[a>>2]=$(1.0);n[a+4>>2]=$(1.0);return}function jn(a,b,c){a=a|0;b=b|0;c=c|0;return (a|0)==(b|0)|0}function kn(a){a=a|0;wk(a);f[a>>2]=1312;return}function ln(a,b){a=a|0;b=b|0;var c=0;c=zn(a|0)|0;return ((b|0)==0?a:c)|0}function mn(a){a=a|0;return (f[a+12>>2]|0)-(f[a+8>>2]|0)>>2|0}function nn(a,b){a=a|0;b=b|0;return f[(f[a>>2]|0)+(b<<2)>>2]|0}function on(a,b){a=a|0;b=b|0;f[a+4>>2]=b;return}function pn(a,b){a=a|0;b=b|0;return 1}function qn(a,b,c,d){a=a|0;b=b|0;c=c|0;d=d|0;return vc(a,b,c,d,0)|0}function rn(a){a=a|0;f[a+4>>2]=0;f[a+8>>2]=0;f[a>>2]=a+4;return}function sn(){var a=0;a=Rk(84)|0;Cl(a);return a|0}function tn(a){a=a|0;f[a>>2]=0;f[a+4>>2]=0;f[a+8>>2]=0;return}function un(a){a=a|0;return (f[a+4>>2]|0)-(f[a>>2]|0)>>2|0}function vn(a){a=a|0;f[a>>2]=4728;ik(a+4|0);return}function wn(a,b){a=a|0;b=b|0;return f[b+12>>2]|0}function xn(a,b,c){a=a|0;b=b|0;c=c|0;return Oa[a&127](b|0,c|0)|0}function yn(a,b,c,d,e,f){a=a|0;b=b|0;c=c|0;d=d|0;e=e|0;f=f|0;aa(10)}function zn(a){a=a|0;return (a&255)<<24|(a>>8&255)<<16|(a>>16&255)<<8|a>>>24|0}function An(a){a=a|0;Qm(a);f[a>>2]=3356;return}function Bn(a,c){a=a|0;c=c|0;b[a>>0]=b[c>>0]|0;return}function Cn(a,b){a=a|0;b=b|0;return f[b+4>>2]|0}function Dn(a){a=a|0;return $(n[a+20>>2])}function En(a){a=a|0;return f[a+4>>2]|0}function Fn(a){a=a|0;if(!a)return;No(a);return}function Gn(a,b){a=a|0;b=b|0;if(!x){x=a;y=b}}function Hn(a){a=a|0;return a+12|0}function In(a){a=a|0;return f[a+88>>2]|0}function Jn(a,b,c){a=a|0;b=b|0;c=c|0;Ta[a&7](b|0,c|0)}function Kn(){var a=0;a=Rk(40)|0;Jk(a);return a|0}function Ln(){var a=0;a=Rk(108)|0;Kk(a);return a|0}function Mn(a){a=a|0;return (b[a+32>>0]|0)!=0|0}function Nn(a){a=a|0;return a+-12|0}function On(a,b,c,d,e){a=a|0;b=b|0;c=c|0;d=d|0;e=e|0;aa(9)}function Pn(){var a=0;a=f[5400]|0;f[5400]=a+0;return a|0}function Qn(a){a=a|0;return po(a+4|0)|0}function Rn(a){a=a|0;return f[a+56>>2]|0}function Sn(){var a=0;a=f[1158]|0;f[1158]=a+0;return a|0}function Tn(a){a=a|0;Ue(a);No(a);return}function Un(a){a=a|0;So(a);No(a);return}function Vn(a){a=a|0;return b[a+24>>0]|0}function Wn(a,b){a=a|0;b=b|0;return 0}function Xn(a){a=a|0;return f[a+40>>2]|0}function Yn(a){a=a|0;return f[a+48>>2]|0}function Zn(a,b){a=a|0;b=b|0;return Na[a&127](b|0)|0}function _n(a){a=a|0;return f[a+60>>2]|0}function $n(a){a=a|0;return f[a+28>>2]|0}function ao(a){a=a|0;ta(a|0)|0;fk()}function bo(a){a=a|0;vn(a);No(a);return}function co(a){a=a|0;Ea()}function eo(a,b){a=a|0;b=b|0;u=a;v=b}function fo(a){a=a|0;return ((a|0)==32|(a+-9|0)>>>0<5)&1|0}function go(a){a=a|0;return (f[a>>2]|0)==0|0}function ho(a){a=a|0;return f[a+80>>2]|0}function io(a,b,c,d){a=a|0;b=b|0;c=c|0;d=d|0;aa(8)}function jo(a,b){a=a|0;b=b|0;Sa[a&127](b|0)}function ko(a,b){a=a|0;b=b|0;return Il(a,b)|0}function lo(a){a=a|0;b[a+12>>0]=0;return}function mo(a){a=a|0;return a&255|0}function no(a){a=a|0;f[a>>2]=0;return}function oo(a,b,c){a=a|0;b=b|0;c=c|0;aa(2);return 0}function po(a){a=a|0;return f[a>>2]|0}function qo(a){a=a|0;return 2}function ro(a){a=a|0;return 1}function so(a,b){a=+a;b=b|0;return +(+ei(a,b))}function to(){return 3}function uo(a,b,c){a=a|0;b=b|0;c=c|0;aa(7)}function vo(){return -4}function wo(){return 4}function xo(){return -3}function yo(){return 1}function zo(){return 2}function Ao(){return (Jo()|0)+64|0}function Bo(){return -5}function Co(a,b){a=a|0;b=b|0;aa(1);return 0}function Do(a){a=a|0;Ra[a&3]()}function Eo(){return -2}function Fo(){va()}function Go(){return -1}function Ho(a,b){a=a|0;b=b|0;aa(6)}function Io(){return 0}function Jo(){return Xo()|0}function Ko(a){a=a|0;return Rk(a)|0}function Lo(a){a=a|0;No(a);return}function Mo(a){a=a|0;u=a}function No(a){a=a|0;Qb(a);return}function Oo(a){a=a|0;I=a}function Po(){return 21528}function Qo(a){a=a|0;return a|0}function Ro(a){a=a|0;aa(0);return 0}function So(a){a=a|0;return}function To(a){a=a|0;return 0}function Uo(){return I|0}function Vo(){return u|0}function Wo(a){a=a|0;aa(5)}function Xo(){return 3752}function Yo(){aa(4)} + +// EMSCRIPTEN_END_FUNCS +var Na=[Ro,qo,ro,Wm,$n,ro,Tc,Tm,En,To,To,ro,To,ro,ro,pj,qo,pj,rl,pj,Cm,lj,ro,Bl,lj,ro,Dl,mi,ro,$n,ro,pj,qo,pj,rl,pj,Cm,lj,ro,Bl,lj,ro,Dl,mi,ro,$n,qo,To,En,ro,To,ro,Cm,Dl,ii,ro,$n,Dl,ii,ro,$n,To,En,ro,To,ro,qo,Dl,ii,ro,$n,Dl,ii,ro,$n,he,ro,ro,ol,Yc,Li,ro,To,Ke,Ul,am,Xl,db,ro,En,Pm,Me,ke,Xe,bb,ro,En,Pm,cb,ro,En,Pm,vb,Pg,To,ro,Uh,Uh,Sk,Qn,Ro,Ro,Ro,Ro,Ro,Ro,Ro,Ro,Ro,Ro,Ro,Ro,Ro,Ro,Ro,Ro,Ro,Ro];var Oa=[Co,uj,Nf,Wb,yj,Mm,Wn,pn,pn,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Wo,Wo,Wo,Wo,Wo,Wo,Wo,Wo,Wo,Wo,Wo,Wo,Wo,Wo,Wo];var Ta=[Ho,ri,Ae,wi,$b,Ho,Ho,Ho];var Ua=[uo,pi,Ub,Fb,Fb,Ub,Fb,Ub,_e,Fe,uo,uo,uo,uo,uo,uo];var Va=[io,Wg,Yf,Xj,bj,io,io,io];var Wa=[On,ih,qf,On];var Xa=[yn,Cj,Mi,yn];return{___cxa_can_catch:ek,___cxa_is_pointer_type:Bm,___divdi3:qi,___muldi3:Qk,___udivdi3:qn,___uremdi3:Gk,_bitshift64Lshr:yl,_bitshift64Shl:sl,_emscripten_bind_AttributeOctahedronTransform_AttributeOctahedronTransform_0:lm,_emscripten_bind_AttributeOctahedronTransform_InitFromAttribute_1:Vl,_emscripten_bind_AttributeOctahedronTransform___destroy___0:sm,_emscripten_bind_AttributeOctahedronTransform_quantization_bits_0:En,_emscripten_bind_AttributeQuantizationTransform_AttributeQuantizationTransform_0:vk,_emscripten_bind_AttributeQuantizationTransform_InitFromAttribute_1:Vl,_emscripten_bind_AttributeQuantizationTransform___destroy___0:sm,_emscripten_bind_AttributeQuantizationTransform_min_value_1:pm,_emscripten_bind_AttributeQuantizationTransform_quantization_bits_0:En,_emscripten_bind_AttributeQuantizationTransform_range_0:Dn,_emscripten_bind_AttributeTransformData_AttributeTransformData_0:km,_emscripten_bind_AttributeTransformData___destroy___0:Bk,_emscripten_bind_AttributeTransformData_transform_type_0:po,_emscripten_bind_DecoderBuffer_DecoderBuffer_0:dn,_emscripten_bind_DecoderBuffer_Init_2:Jm,_emscripten_bind_DecoderBuffer___destroy___0:Lm,_emscripten_bind_Decoder_DecodeBufferToMesh_2:Pl,_emscripten_bind_Decoder_DecodeBufferToPointCloud_2:zl,_emscripten_bind_Decoder_Decoder_0:Kn,_emscripten_bind_Decoder_GetAttributeByUniqueId_2:$l,_emscripten_bind_Decoder_GetAttributeFloatForAllPoints_3:Tk,_emscripten_bind_Decoder_GetAttributeFloat_3:pl,_emscripten_bind_Decoder_GetAttributeIdByMetadataEntry_3:jl,_emscripten_bind_Decoder_GetAttributeIdByName_2:gm,_emscripten_bind_Decoder_GetAttributeId_2:Jl,_emscripten_bind_Decoder_GetAttributeInt32ForAllPoints_3:Yk,_emscripten_bind_Decoder_GetAttributeIntForAllPoints_3:_k,_emscripten_bind_Decoder_GetAttributeMetadata_2:Zl,_emscripten_bind_Decoder_GetAttribute_2:xm,_emscripten_bind_Decoder_GetEncodedGeometryType_1:qm,_emscripten_bind_Decoder_GetFaceFromMesh_3:El,_emscripten_bind_Decoder_GetMetadata_1:Sm,_emscripten_bind_Decoder_GetTriangleStripsFromMesh_2:Kl,_emscripten_bind_Decoder_SkipAttributeTransform_1:om,_emscripten_bind_Decoder___destroy___0:hi,_emscripten_bind_DracoFloat32Array_DracoFloat32Array_0:cn,_emscripten_bind_DracoFloat32Array_GetValue_1:Om,_emscripten_bind_DracoFloat32Array___destroy___0:hk,_emscripten_bind_DracoFloat32Array_size_0:un,_emscripten_bind_DracoInt32Array_DracoInt32Array_0:cn,_emscripten_bind_DracoInt32Array_GetValue_1:en,_emscripten_bind_DracoInt32Array___destroy___0:hk,_emscripten_bind_DracoInt32Array_size_0:un,_emscripten_bind_GeometryAttribute_GeometryAttribute_0:Nm,_emscripten_bind_GeometryAttribute___destroy___0:Fn,_emscripten_bind_Mesh_Mesh_0:Ln,_emscripten_bind_Mesh___destroy___0:sm,_emscripten_bind_Mesh_num_attributes_0:mn,_emscripten_bind_Mesh_num_faces_0:_m,_emscripten_bind_Mesh_num_points_0:ho,_emscripten_bind_MetadataQuerier_GetDoubleEntry_2:Tl,_emscripten_bind_MetadataQuerier_GetEntryName_2:fm,_emscripten_bind_MetadataQuerier_GetIntEntry_2:cm,_emscripten_bind_MetadataQuerier_GetStringEntry_2:Sl,_emscripten_bind_MetadataQuerier_HasDoubleEntry_2:Rl,_emscripten_bind_MetadataQuerier_HasEntry_2:mm,_emscripten_bind_MetadataQuerier_HasIntEntry_2:bm,_emscripten_bind_MetadataQuerier_HasStringEntry_2:Ql,_emscripten_bind_MetadataQuerier_MetadataQuerier_0:bn,_emscripten_bind_MetadataQuerier_NumEntries_1:Em,_emscripten_bind_MetadataQuerier___destroy___0:Ni,_emscripten_bind_Metadata_Metadata_0:Jj,_emscripten_bind_Metadata___destroy___0:Rm,_emscripten_bind_PointAttribute_GetAttributeTransformData_0:In,_emscripten_bind_PointAttribute_PointAttribute_0:Ym,_emscripten_bind_PointAttribute___destroy___0:Gh,_emscripten_bind_PointAttribute_attribute_type_0:Rn,_emscripten_bind_PointAttribute_byte_offset_0:Yn,_emscripten_bind_PointAttribute_byte_stride_0:Xn,_emscripten_bind_PointAttribute_data_type_0:$n,_emscripten_bind_PointAttribute_normalized_0:Mn,_emscripten_bind_PointAttribute_num_components_0:Vn,_emscripten_bind_PointAttribute_size_0:ho,_emscripten_bind_PointAttribute_unique_id_0:_n,_emscripten_bind_PointCloud_PointCloud_0:sn,_emscripten_bind_PointCloud___destroy___0:sm,_emscripten_bind_PointCloud_num_attributes_0:mn,_emscripten_bind_PointCloud_num_points_0:ho,_emscripten_bind_Status___destroy___0:ul,_emscripten_bind_Status_code_0:po,_emscripten_bind_Status_error_msg_0:Nl,_emscripten_bind_Status_ok_0:go,_emscripten_bind_VoidPtr___destroy___0:Fn,_emscripten_enum_draco_AttributeTransformType_ATTRIBUTE_INVALID_TRANSFORM:Go,_emscripten_enum_draco_AttributeTransformType_ATTRIBUTE_NO_TRANSFORM:Io,_emscripten_enum_draco_AttributeTransformType_ATTRIBUTE_OCTAHEDRON_TRANSFORM:zo,_emscripten_enum_draco_AttributeTransformType_ATTRIBUTE_QUANTIZATION_TRANSFORM:yo,_emscripten_enum_draco_EncodedGeometryType_INVALID_GEOMETRY_TYPE:Go,_emscripten_enum_draco_EncodedGeometryType_POINT_CLOUD:Io,_emscripten_enum_draco_EncodedGeometryType_TRIANGULAR_MESH:yo,_emscripten_enum_draco_GeometryAttribute_Type_COLOR:zo,_emscripten_enum_draco_GeometryAttribute_Type_GENERIC:wo,_emscripten_enum_draco_GeometryAttribute_Type_INVALID:Go,_emscripten_enum_draco_GeometryAttribute_Type_NORMAL:yo,_emscripten_enum_draco_GeometryAttribute_Type_POSITION:Io,_emscripten_enum_draco_GeometryAttribute_Type_TEX_COORD:to,_emscripten_enum_draco_StatusCode_ERROR:Go,_emscripten_enum_draco_StatusCode_INVALID_PARAMETER:xo,_emscripten_enum_draco_StatusCode_IO_ERROR:Eo,_emscripten_enum_draco_StatusCode_OK:Io,_emscripten_enum_draco_StatusCode_UNKNOWN_VERSION:Bo,_emscripten_enum_draco_StatusCode_UNSUPPORTED_VERSION:vo,_emscripten_get_global_libc:Po,_emscripten_replace_memory:Ma,_free:Qb,_i64Add:Hl,_i64Subtract:jm,_llvm_bswap_i32:zn,_malloc:$a,_memcpy:ef,_memmove:_j,_memset:kh,_sbrk:sj,dynCall_ii:Zn,dynCall_iii:xn,dynCall_iiii:Im,dynCall_iiiiiii:gl,dynCall_v:Do,dynCall_vi:jo,dynCall_vii:Jn,dynCall_viii:Xm,dynCall_viiii:um,dynCall_viiiii:Ol,dynCall_viiiiii:ml,establishStackSpace:eo,getTempRet0:Uo,runPostSets:Gl,setTempRet0:Oo,setThrew:Gn,stackAlloc:Zm,stackRestore:Mo,stackSave:Vo}}) + + +// EMSCRIPTEN_END_ASM +(Module.asmGlobalArg,Module.asmLibraryArg,buffer);var ___cxa_can_catch=Module["___cxa_can_catch"]=asm["___cxa_can_catch"];var ___cxa_is_pointer_type=Module["___cxa_is_pointer_type"]=asm["___cxa_is_pointer_type"];var ___divdi3=Module["___divdi3"]=asm["___divdi3"];var ___muldi3=Module["___muldi3"]=asm["___muldi3"];var ___udivdi3=Module["___udivdi3"]=asm["___udivdi3"];var ___uremdi3=Module["___uremdi3"]=asm["___uremdi3"];var _bitshift64Lshr=Module["_bitshift64Lshr"]=asm["_bitshift64Lshr"];var _bitshift64Shl=Module["_bitshift64Shl"]=asm["_bitshift64Shl"];var _emscripten_bind_AttributeOctahedronTransform_AttributeOctahedronTransform_0=Module["_emscripten_bind_AttributeOctahedronTransform_AttributeOctahedronTransform_0"]=asm["_emscripten_bind_AttributeOctahedronTransform_AttributeOctahedronTransform_0"];var _emscripten_bind_AttributeOctahedronTransform_InitFromAttribute_1=Module["_emscripten_bind_AttributeOctahedronTransform_InitFromAttribute_1"]=asm["_emscripten_bind_AttributeOctahedronTransform_InitFromAttribute_1"];var _emscripten_bind_AttributeOctahedronTransform___destroy___0=Module["_emscripten_bind_AttributeOctahedronTransform___destroy___0"]=asm["_emscripten_bind_AttributeOctahedronTransform___destroy___0"];var _emscripten_bind_AttributeOctahedronTransform_quantization_bits_0=Module["_emscripten_bind_AttributeOctahedronTransform_quantization_bits_0"]=asm["_emscripten_bind_AttributeOctahedronTransform_quantization_bits_0"];var _emscripten_bind_AttributeQuantizationTransform_AttributeQuantizationTransform_0=Module["_emscripten_bind_AttributeQuantizationTransform_AttributeQuantizationTransform_0"]=asm["_emscripten_bind_AttributeQuantizationTransform_AttributeQuantizationTransform_0"];var _emscripten_bind_AttributeQuantizationTransform_InitFromAttribute_1=Module["_emscripten_bind_AttributeQuantizationTransform_InitFromAttribute_1"]=asm["_emscripten_bind_AttributeQuantizationTransform_InitFromAttribute_1"];var _emscripten_bind_AttributeQuantizationTransform___destroy___0=Module["_emscripten_bind_AttributeQuantizationTransform___destroy___0"]=asm["_emscripten_bind_AttributeQuantizationTransform___destroy___0"];var _emscripten_bind_AttributeQuantizationTransform_min_value_1=Module["_emscripten_bind_AttributeQuantizationTransform_min_value_1"]=asm["_emscripten_bind_AttributeQuantizationTransform_min_value_1"];var _emscripten_bind_AttributeQuantizationTransform_quantization_bits_0=Module["_emscripten_bind_AttributeQuantizationTransform_quantization_bits_0"]=asm["_emscripten_bind_AttributeQuantizationTransform_quantization_bits_0"];var _emscripten_bind_AttributeQuantizationTransform_range_0=Module["_emscripten_bind_AttributeQuantizationTransform_range_0"]=asm["_emscripten_bind_AttributeQuantizationTransform_range_0"];var _emscripten_bind_AttributeTransformData_AttributeTransformData_0=Module["_emscripten_bind_AttributeTransformData_AttributeTransformData_0"]=asm["_emscripten_bind_AttributeTransformData_AttributeTransformData_0"];var _emscripten_bind_AttributeTransformData___destroy___0=Module["_emscripten_bind_AttributeTransformData___destroy___0"]=asm["_emscripten_bind_AttributeTransformData___destroy___0"];var _emscripten_bind_AttributeTransformData_transform_type_0=Module["_emscripten_bind_AttributeTransformData_transform_type_0"]=asm["_emscripten_bind_AttributeTransformData_transform_type_0"];var _emscripten_bind_DecoderBuffer_DecoderBuffer_0=Module["_emscripten_bind_DecoderBuffer_DecoderBuffer_0"]=asm["_emscripten_bind_DecoderBuffer_DecoderBuffer_0"];var _emscripten_bind_DecoderBuffer_Init_2=Module["_emscripten_bind_DecoderBuffer_Init_2"]=asm["_emscripten_bind_DecoderBuffer_Init_2"];var _emscripten_bind_DecoderBuffer___destroy___0=Module["_emscripten_bind_DecoderBuffer___destroy___0"]=asm["_emscripten_bind_DecoderBuffer___destroy___0"];var _emscripten_bind_Decoder_DecodeBufferToMesh_2=Module["_emscripten_bind_Decoder_DecodeBufferToMesh_2"]=asm["_emscripten_bind_Decoder_DecodeBufferToMesh_2"];var _emscripten_bind_Decoder_DecodeBufferToPointCloud_2=Module["_emscripten_bind_Decoder_DecodeBufferToPointCloud_2"]=asm["_emscripten_bind_Decoder_DecodeBufferToPointCloud_2"];var _emscripten_bind_Decoder_Decoder_0=Module["_emscripten_bind_Decoder_Decoder_0"]=asm["_emscripten_bind_Decoder_Decoder_0"];var _emscripten_bind_Decoder_GetAttributeByUniqueId_2=Module["_emscripten_bind_Decoder_GetAttributeByUniqueId_2"]=asm["_emscripten_bind_Decoder_GetAttributeByUniqueId_2"];var _emscripten_bind_Decoder_GetAttributeFloatForAllPoints_3=Module["_emscripten_bind_Decoder_GetAttributeFloatForAllPoints_3"]=asm["_emscripten_bind_Decoder_GetAttributeFloatForAllPoints_3"];var _emscripten_bind_Decoder_GetAttributeFloat_3=Module["_emscripten_bind_Decoder_GetAttributeFloat_3"]=asm["_emscripten_bind_Decoder_GetAttributeFloat_3"];var _emscripten_bind_Decoder_GetAttributeIdByMetadataEntry_3=Module["_emscripten_bind_Decoder_GetAttributeIdByMetadataEntry_3"]=asm["_emscripten_bind_Decoder_GetAttributeIdByMetadataEntry_3"];var _emscripten_bind_Decoder_GetAttributeIdByName_2=Module["_emscripten_bind_Decoder_GetAttributeIdByName_2"]=asm["_emscripten_bind_Decoder_GetAttributeIdByName_2"];var _emscripten_bind_Decoder_GetAttributeId_2=Module["_emscripten_bind_Decoder_GetAttributeId_2"]=asm["_emscripten_bind_Decoder_GetAttributeId_2"];var _emscripten_bind_Decoder_GetAttributeInt32ForAllPoints_3=Module["_emscripten_bind_Decoder_GetAttributeInt32ForAllPoints_3"]=asm["_emscripten_bind_Decoder_GetAttributeInt32ForAllPoints_3"];var _emscripten_bind_Decoder_GetAttributeIntForAllPoints_3=Module["_emscripten_bind_Decoder_GetAttributeIntForAllPoints_3"]=asm["_emscripten_bind_Decoder_GetAttributeIntForAllPoints_3"];var _emscripten_bind_Decoder_GetAttributeMetadata_2=Module["_emscripten_bind_Decoder_GetAttributeMetadata_2"]=asm["_emscripten_bind_Decoder_GetAttributeMetadata_2"];var _emscripten_bind_Decoder_GetAttribute_2=Module["_emscripten_bind_Decoder_GetAttribute_2"]=asm["_emscripten_bind_Decoder_GetAttribute_2"];var _emscripten_bind_Decoder_GetEncodedGeometryType_1=Module["_emscripten_bind_Decoder_GetEncodedGeometryType_1"]=asm["_emscripten_bind_Decoder_GetEncodedGeometryType_1"];var _emscripten_bind_Decoder_GetFaceFromMesh_3=Module["_emscripten_bind_Decoder_GetFaceFromMesh_3"]=asm["_emscripten_bind_Decoder_GetFaceFromMesh_3"];var _emscripten_bind_Decoder_GetMetadata_1=Module["_emscripten_bind_Decoder_GetMetadata_1"]=asm["_emscripten_bind_Decoder_GetMetadata_1"];var _emscripten_bind_Decoder_GetTriangleStripsFromMesh_2=Module["_emscripten_bind_Decoder_GetTriangleStripsFromMesh_2"]=asm["_emscripten_bind_Decoder_GetTriangleStripsFromMesh_2"];var _emscripten_bind_Decoder_SkipAttributeTransform_1=Module["_emscripten_bind_Decoder_SkipAttributeTransform_1"]=asm["_emscripten_bind_Decoder_SkipAttributeTransform_1"];var _emscripten_bind_Decoder___destroy___0=Module["_emscripten_bind_Decoder___destroy___0"]=asm["_emscripten_bind_Decoder___destroy___0"];var _emscripten_bind_DracoFloat32Array_DracoFloat32Array_0=Module["_emscripten_bind_DracoFloat32Array_DracoFloat32Array_0"]=asm["_emscripten_bind_DracoFloat32Array_DracoFloat32Array_0"];var _emscripten_bind_DracoFloat32Array_GetValue_1=Module["_emscripten_bind_DracoFloat32Array_GetValue_1"]=asm["_emscripten_bind_DracoFloat32Array_GetValue_1"];var _emscripten_bind_DracoFloat32Array___destroy___0=Module["_emscripten_bind_DracoFloat32Array___destroy___0"]=asm["_emscripten_bind_DracoFloat32Array___destroy___0"];var _emscripten_bind_DracoFloat32Array_size_0=Module["_emscripten_bind_DracoFloat32Array_size_0"]=asm["_emscripten_bind_DracoFloat32Array_size_0"];var _emscripten_bind_DracoInt32Array_DracoInt32Array_0=Module["_emscripten_bind_DracoInt32Array_DracoInt32Array_0"]=asm["_emscripten_bind_DracoInt32Array_DracoInt32Array_0"];var _emscripten_bind_DracoInt32Array_GetValue_1=Module["_emscripten_bind_DracoInt32Array_GetValue_1"]=asm["_emscripten_bind_DracoInt32Array_GetValue_1"];var _emscripten_bind_DracoInt32Array___destroy___0=Module["_emscripten_bind_DracoInt32Array___destroy___0"]=asm["_emscripten_bind_DracoInt32Array___destroy___0"];var _emscripten_bind_DracoInt32Array_size_0=Module["_emscripten_bind_DracoInt32Array_size_0"]=asm["_emscripten_bind_DracoInt32Array_size_0"];var _emscripten_bind_GeometryAttribute_GeometryAttribute_0=Module["_emscripten_bind_GeometryAttribute_GeometryAttribute_0"]=asm["_emscripten_bind_GeometryAttribute_GeometryAttribute_0"];var _emscripten_bind_GeometryAttribute___destroy___0=Module["_emscripten_bind_GeometryAttribute___destroy___0"]=asm["_emscripten_bind_GeometryAttribute___destroy___0"];var _emscripten_bind_Mesh_Mesh_0=Module["_emscripten_bind_Mesh_Mesh_0"]=asm["_emscripten_bind_Mesh_Mesh_0"];var _emscripten_bind_Mesh___destroy___0=Module["_emscripten_bind_Mesh___destroy___0"]=asm["_emscripten_bind_Mesh___destroy___0"];var _emscripten_bind_Mesh_num_attributes_0=Module["_emscripten_bind_Mesh_num_attributes_0"]=asm["_emscripten_bind_Mesh_num_attributes_0"];var _emscripten_bind_Mesh_num_faces_0=Module["_emscripten_bind_Mesh_num_faces_0"]=asm["_emscripten_bind_Mesh_num_faces_0"];var _emscripten_bind_Mesh_num_points_0=Module["_emscripten_bind_Mesh_num_points_0"]=asm["_emscripten_bind_Mesh_num_points_0"];var _emscripten_bind_MetadataQuerier_GetDoubleEntry_2=Module["_emscripten_bind_MetadataQuerier_GetDoubleEntry_2"]=asm["_emscripten_bind_MetadataQuerier_GetDoubleEntry_2"];var _emscripten_bind_MetadataQuerier_GetEntryName_2=Module["_emscripten_bind_MetadataQuerier_GetEntryName_2"]=asm["_emscripten_bind_MetadataQuerier_GetEntryName_2"];var _emscripten_bind_MetadataQuerier_GetIntEntry_2=Module["_emscripten_bind_MetadataQuerier_GetIntEntry_2"]=asm["_emscripten_bind_MetadataQuerier_GetIntEntry_2"];var _emscripten_bind_MetadataQuerier_GetStringEntry_2=Module["_emscripten_bind_MetadataQuerier_GetStringEntry_2"]=asm["_emscripten_bind_MetadataQuerier_GetStringEntry_2"];var _emscripten_bind_MetadataQuerier_HasDoubleEntry_2=Module["_emscripten_bind_MetadataQuerier_HasDoubleEntry_2"]=asm["_emscripten_bind_MetadataQuerier_HasDoubleEntry_2"];var _emscripten_bind_MetadataQuerier_HasEntry_2=Module["_emscripten_bind_MetadataQuerier_HasEntry_2"]=asm["_emscripten_bind_MetadataQuerier_HasEntry_2"];var _emscripten_bind_MetadataQuerier_HasIntEntry_2=Module["_emscripten_bind_MetadataQuerier_HasIntEntry_2"]=asm["_emscripten_bind_MetadataQuerier_HasIntEntry_2"];var _emscripten_bind_MetadataQuerier_HasStringEntry_2=Module["_emscripten_bind_MetadataQuerier_HasStringEntry_2"]=asm["_emscripten_bind_MetadataQuerier_HasStringEntry_2"];var _emscripten_bind_MetadataQuerier_MetadataQuerier_0=Module["_emscripten_bind_MetadataQuerier_MetadataQuerier_0"]=asm["_emscripten_bind_MetadataQuerier_MetadataQuerier_0"];var _emscripten_bind_MetadataQuerier_NumEntries_1=Module["_emscripten_bind_MetadataQuerier_NumEntries_1"]=asm["_emscripten_bind_MetadataQuerier_NumEntries_1"];var _emscripten_bind_MetadataQuerier___destroy___0=Module["_emscripten_bind_MetadataQuerier___destroy___0"]=asm["_emscripten_bind_MetadataQuerier___destroy___0"];var _emscripten_bind_Metadata_Metadata_0=Module["_emscripten_bind_Metadata_Metadata_0"]=asm["_emscripten_bind_Metadata_Metadata_0"];var _emscripten_bind_Metadata___destroy___0=Module["_emscripten_bind_Metadata___destroy___0"]=asm["_emscripten_bind_Metadata___destroy___0"];var _emscripten_bind_PointAttribute_GetAttributeTransformData_0=Module["_emscripten_bind_PointAttribute_GetAttributeTransformData_0"]=asm["_emscripten_bind_PointAttribute_GetAttributeTransformData_0"];var _emscripten_bind_PointAttribute_PointAttribute_0=Module["_emscripten_bind_PointAttribute_PointAttribute_0"]=asm["_emscripten_bind_PointAttribute_PointAttribute_0"];var _emscripten_bind_PointAttribute___destroy___0=Module["_emscripten_bind_PointAttribute___destroy___0"]=asm["_emscripten_bind_PointAttribute___destroy___0"];var _emscripten_bind_PointAttribute_attribute_type_0=Module["_emscripten_bind_PointAttribute_attribute_type_0"]=asm["_emscripten_bind_PointAttribute_attribute_type_0"];var _emscripten_bind_PointAttribute_byte_offset_0=Module["_emscripten_bind_PointAttribute_byte_offset_0"]=asm["_emscripten_bind_PointAttribute_byte_offset_0"];var _emscripten_bind_PointAttribute_byte_stride_0=Module["_emscripten_bind_PointAttribute_byte_stride_0"]=asm["_emscripten_bind_PointAttribute_byte_stride_0"];var _emscripten_bind_PointAttribute_data_type_0=Module["_emscripten_bind_PointAttribute_data_type_0"]=asm["_emscripten_bind_PointAttribute_data_type_0"];var _emscripten_bind_PointAttribute_normalized_0=Module["_emscripten_bind_PointAttribute_normalized_0"]=asm["_emscripten_bind_PointAttribute_normalized_0"];var _emscripten_bind_PointAttribute_num_components_0=Module["_emscripten_bind_PointAttribute_num_components_0"]=asm["_emscripten_bind_PointAttribute_num_components_0"];var _emscripten_bind_PointAttribute_size_0=Module["_emscripten_bind_PointAttribute_size_0"]=asm["_emscripten_bind_PointAttribute_size_0"];var _emscripten_bind_PointAttribute_unique_id_0=Module["_emscripten_bind_PointAttribute_unique_id_0"]=asm["_emscripten_bind_PointAttribute_unique_id_0"];var _emscripten_bind_PointCloud_PointCloud_0=Module["_emscripten_bind_PointCloud_PointCloud_0"]=asm["_emscripten_bind_PointCloud_PointCloud_0"];var _emscripten_bind_PointCloud___destroy___0=Module["_emscripten_bind_PointCloud___destroy___0"]=asm["_emscripten_bind_PointCloud___destroy___0"];var _emscripten_bind_PointCloud_num_attributes_0=Module["_emscripten_bind_PointCloud_num_attributes_0"]=asm["_emscripten_bind_PointCloud_num_attributes_0"];var _emscripten_bind_PointCloud_num_points_0=Module["_emscripten_bind_PointCloud_num_points_0"]=asm["_emscripten_bind_PointCloud_num_points_0"];var _emscripten_bind_Status___destroy___0=Module["_emscripten_bind_Status___destroy___0"]=asm["_emscripten_bind_Status___destroy___0"];var _emscripten_bind_Status_code_0=Module["_emscripten_bind_Status_code_0"]=asm["_emscripten_bind_Status_code_0"];var _emscripten_bind_Status_error_msg_0=Module["_emscripten_bind_Status_error_msg_0"]=asm["_emscripten_bind_Status_error_msg_0"];var _emscripten_bind_Status_ok_0=Module["_emscripten_bind_Status_ok_0"]=asm["_emscripten_bind_Status_ok_0"];var _emscripten_bind_VoidPtr___destroy___0=Module["_emscripten_bind_VoidPtr___destroy___0"]=asm["_emscripten_bind_VoidPtr___destroy___0"];var _emscripten_enum_draco_AttributeTransformType_ATTRIBUTE_INVALID_TRANSFORM=Module["_emscripten_enum_draco_AttributeTransformType_ATTRIBUTE_INVALID_TRANSFORM"]=asm["_emscripten_enum_draco_AttributeTransformType_ATTRIBUTE_INVALID_TRANSFORM"];var _emscripten_enum_draco_AttributeTransformType_ATTRIBUTE_NO_TRANSFORM=Module["_emscripten_enum_draco_AttributeTransformType_ATTRIBUTE_NO_TRANSFORM"]=asm["_emscripten_enum_draco_AttributeTransformType_ATTRIBUTE_NO_TRANSFORM"];var _emscripten_enum_draco_AttributeTransformType_ATTRIBUTE_OCTAHEDRON_TRANSFORM=Module["_emscripten_enum_draco_AttributeTransformType_ATTRIBUTE_OCTAHEDRON_TRANSFORM"]=asm["_emscripten_enum_draco_AttributeTransformType_ATTRIBUTE_OCTAHEDRON_TRANSFORM"];var _emscripten_enum_draco_AttributeTransformType_ATTRIBUTE_QUANTIZATION_TRANSFORM=Module["_emscripten_enum_draco_AttributeTransformType_ATTRIBUTE_QUANTIZATION_TRANSFORM"]=asm["_emscripten_enum_draco_AttributeTransformType_ATTRIBUTE_QUANTIZATION_TRANSFORM"];var _emscripten_enum_draco_EncodedGeometryType_INVALID_GEOMETRY_TYPE=Module["_emscripten_enum_draco_EncodedGeometryType_INVALID_GEOMETRY_TYPE"]=asm["_emscripten_enum_draco_EncodedGeometryType_INVALID_GEOMETRY_TYPE"];var _emscripten_enum_draco_EncodedGeometryType_POINT_CLOUD=Module["_emscripten_enum_draco_EncodedGeometryType_POINT_CLOUD"]=asm["_emscripten_enum_draco_EncodedGeometryType_POINT_CLOUD"];var _emscripten_enum_draco_EncodedGeometryType_TRIANGULAR_MESH=Module["_emscripten_enum_draco_EncodedGeometryType_TRIANGULAR_MESH"]=asm["_emscripten_enum_draco_EncodedGeometryType_TRIANGULAR_MESH"];var _emscripten_enum_draco_GeometryAttribute_Type_COLOR=Module["_emscripten_enum_draco_GeometryAttribute_Type_COLOR"]=asm["_emscripten_enum_draco_GeometryAttribute_Type_COLOR"];var _emscripten_enum_draco_GeometryAttribute_Type_GENERIC=Module["_emscripten_enum_draco_GeometryAttribute_Type_GENERIC"]=asm["_emscripten_enum_draco_GeometryAttribute_Type_GENERIC"];var _emscripten_enum_draco_GeometryAttribute_Type_INVALID=Module["_emscripten_enum_draco_GeometryAttribute_Type_INVALID"]=asm["_emscripten_enum_draco_GeometryAttribute_Type_INVALID"];var _emscripten_enum_draco_GeometryAttribute_Type_NORMAL=Module["_emscripten_enum_draco_GeometryAttribute_Type_NORMAL"]=asm["_emscripten_enum_draco_GeometryAttribute_Type_NORMAL"];var _emscripten_enum_draco_GeometryAttribute_Type_POSITION=Module["_emscripten_enum_draco_GeometryAttribute_Type_POSITION"]=asm["_emscripten_enum_draco_GeometryAttribute_Type_POSITION"];var _emscripten_enum_draco_GeometryAttribute_Type_TEX_COORD=Module["_emscripten_enum_draco_GeometryAttribute_Type_TEX_COORD"]=asm["_emscripten_enum_draco_GeometryAttribute_Type_TEX_COORD"];var _emscripten_enum_draco_StatusCode_ERROR=Module["_emscripten_enum_draco_StatusCode_ERROR"]=asm["_emscripten_enum_draco_StatusCode_ERROR"];var _emscripten_enum_draco_StatusCode_INVALID_PARAMETER=Module["_emscripten_enum_draco_StatusCode_INVALID_PARAMETER"]=asm["_emscripten_enum_draco_StatusCode_INVALID_PARAMETER"];var _emscripten_enum_draco_StatusCode_IO_ERROR=Module["_emscripten_enum_draco_StatusCode_IO_ERROR"]=asm["_emscripten_enum_draco_StatusCode_IO_ERROR"];var _emscripten_enum_draco_StatusCode_OK=Module["_emscripten_enum_draco_StatusCode_OK"]=asm["_emscripten_enum_draco_StatusCode_OK"];var _emscripten_enum_draco_StatusCode_UNKNOWN_VERSION=Module["_emscripten_enum_draco_StatusCode_UNKNOWN_VERSION"]=asm["_emscripten_enum_draco_StatusCode_UNKNOWN_VERSION"];var _emscripten_enum_draco_StatusCode_UNSUPPORTED_VERSION=Module["_emscripten_enum_draco_StatusCode_UNSUPPORTED_VERSION"]=asm["_emscripten_enum_draco_StatusCode_UNSUPPORTED_VERSION"];var _emscripten_get_global_libc=Module["_emscripten_get_global_libc"]=asm["_emscripten_get_global_libc"];var _emscripten_replace_memory=Module["_emscripten_replace_memory"]=asm["_emscripten_replace_memory"];var _free=Module["_free"]=asm["_free"];var _i64Add=Module["_i64Add"]=asm["_i64Add"];var _i64Subtract=Module["_i64Subtract"]=asm["_i64Subtract"];var _llvm_bswap_i32=Module["_llvm_bswap_i32"]=asm["_llvm_bswap_i32"];var _malloc=Module["_malloc"]=asm["_malloc"];var _memcpy=Module["_memcpy"]=asm["_memcpy"];var _memmove=Module["_memmove"]=asm["_memmove"];var _memset=Module["_memset"]=asm["_memset"];var _sbrk=Module["_sbrk"]=asm["_sbrk"];var establishStackSpace=Module["establishStackSpace"]=asm["establishStackSpace"];var getTempRet0=Module["getTempRet0"]=asm["getTempRet0"];var runPostSets=Module["runPostSets"]=asm["runPostSets"];var setTempRet0=Module["setTempRet0"]=asm["setTempRet0"];var setThrew=Module["setThrew"]=asm["setThrew"];var stackAlloc=Module["stackAlloc"]=asm["stackAlloc"];var stackRestore=Module["stackRestore"]=asm["stackRestore"];var stackSave=Module["stackSave"]=asm["stackSave"];var dynCall_ii=Module["dynCall_ii"]=asm["dynCall_ii"];var dynCall_iii=Module["dynCall_iii"]=asm["dynCall_iii"];var dynCall_iiii=Module["dynCall_iiii"]=asm["dynCall_iiii"];var dynCall_iiiiiii=Module["dynCall_iiiiiii"]=asm["dynCall_iiiiiii"];var dynCall_v=Module["dynCall_v"]=asm["dynCall_v"];var dynCall_vi=Module["dynCall_vi"]=asm["dynCall_vi"];var dynCall_vii=Module["dynCall_vii"]=asm["dynCall_vii"];var dynCall_viii=Module["dynCall_viii"]=asm["dynCall_viii"];var dynCall_viiii=Module["dynCall_viiii"]=asm["dynCall_viiii"];var dynCall_viiiii=Module["dynCall_viiiii"]=asm["dynCall_viiiii"];var dynCall_viiiiii=Module["dynCall_viiiiii"]=asm["dynCall_viiiiii"];Runtime.stackAlloc=Module["stackAlloc"];Runtime.stackSave=Module["stackSave"];Runtime.stackRestore=Module["stackRestore"];Runtime.establishStackSpace=Module["establishStackSpace"];Runtime.setTempRet0=Module["setTempRet0"];Runtime.getTempRet0=Module["getTempRet0"];Module["asm"]=asm;if(memoryInitializer){if(typeof Module["locateFile"]==="function"){memoryInitializer=Module["locateFile"](memoryInitializer)}else if(Module["memoryInitializerPrefixURL"]){memoryInitializer=Module["memoryInitializerPrefixURL"]+memoryInitializer}if(ENVIRONMENT_IS_NODE||ENVIRONMENT_IS_SHELL){var data=Module["readBinary"](memoryInitializer);HEAPU8.set(data,Runtime.GLOBAL_BASE)}else{addRunDependency("memory initializer");var applyMemoryInitializer=(function(data){if(data.byteLength)data=new Uint8Array(data);HEAPU8.set(data,Runtime.GLOBAL_BASE);if(Module["memoryInitializerRequest"])delete Module["memoryInitializerRequest"].response;removeRunDependency("memory initializer")});function doBrowserLoad(){Module["readAsync"](memoryInitializer,applyMemoryInitializer,(function(){throw"could not load memory initializer "+memoryInitializer}))}var memoryInitializerBytes=tryParseAsDataURI(memoryInitializer);if(memoryInitializerBytes){applyMemoryInitializer(memoryInitializerBytes.buffer)}else if(Module["memoryInitializerRequest"]){function useRequest(){var request=Module["memoryInitializerRequest"];var response=request.response;if(request.status!==200&&request.status!==0){var data=tryParseAsDataURI(Module["memoryInitializerRequestURL"]);if(data){response=data.buffer}else{console.warn("a problem seems to have happened with Module.memoryInitializerRequest, status: "+request.status+", retrying "+memoryInitializer);doBrowserLoad();return}}applyMemoryInitializer(response)}if(Module["memoryInitializerRequest"].response){setTimeout(useRequest,0)}else{Module["memoryInitializerRequest"].addEventListener("load",useRequest)}}else{doBrowserLoad()}}}Module["then"]=(function(func){if(Module["calledRun"]){func(Module)}else{var old=Module["onRuntimeInitialized"];Module["onRuntimeInitialized"]=(function(){if(old)old();func(Module)})}return Module});function ExitStatus(status){this.name="ExitStatus";this.message="Program terminated with exit("+status+")";this.status=status}ExitStatus.prototype=new Error;ExitStatus.prototype.constructor=ExitStatus;var initialStackTop;var preloadStartTime=null;dependenciesFulfilled=function runCaller(){if(!Module["calledRun"])run();if(!Module["calledRun"])dependenciesFulfilled=runCaller};function run(args){args=args||Module["arguments"];if(preloadStartTime===null)preloadStartTime=Date.now();if(runDependencies>0){return}preRun();if(runDependencies>0)return;if(Module["calledRun"])return;function doRun(){if(Module["calledRun"])return;Module["calledRun"]=true;if(ABORT)return;ensureInitRuntime();preMain();if(Module["onRuntimeInitialized"])Module["onRuntimeInitialized"]();postRun()}if(Module["setStatus"]){Module["setStatus"]("Running...");setTimeout((function(){setTimeout((function(){Module["setStatus"]("")}),1);doRun()}),1)}else{doRun()}}Module["run"]=run;function exit(status,implicit){if(implicit&&Module["noExitRuntime"]){return}if(Module["noExitRuntime"]){}else{ABORT=true;EXITSTATUS=status;STACKTOP=initialStackTop;exitRuntime();if(Module["onExit"])Module["onExit"](status)}if(ENVIRONMENT_IS_NODE){process["exit"](status)}Module["quit"](status,new ExitStatus(status))}Module["exit"]=exit;var abortDecorators=[];function abort(what){if(Module["onAbort"]){Module["onAbort"](what)}if(what!==undefined){Module.print(what);Module.printErr(what);what=JSON.stringify(what)}else{what=""}ABORT=true;EXITSTATUS=1;var extra="\nIf this abort() is unexpected, build with -s ASSERTIONS=1 which can give more information.";var output="abort("+what+") at "+stackTrace()+extra;if(abortDecorators){abortDecorators.forEach((function(decorator){output=decorator(output,what)}))}throw output}Module["abort"]=abort;if(Module["preInit"]){if(typeof Module["preInit"]=="function")Module["preInit"]=[Module["preInit"]];while(Module["preInit"].length>0){Module["preInit"].pop()()}}run();function WrapperObject(){}WrapperObject.prototype=Object.create(WrapperObject.prototype);WrapperObject.prototype.constructor=WrapperObject;WrapperObject.prototype.__class__=WrapperObject;WrapperObject.__cache__={};Module["WrapperObject"]=WrapperObject;function getCache(__class__){return(__class__||WrapperObject).__cache__}Module["getCache"]=getCache;function wrapPointer(ptr,__class__){var cache=getCache(__class__);var ret=cache[ptr];if(ret)return ret;ret=Object.create((__class__||WrapperObject).prototype);ret.ptr=ptr;return cache[ptr]=ret}Module["wrapPointer"]=wrapPointer;function castObject(obj,__class__){return wrapPointer(obj.ptr,__class__)}Module["castObject"]=castObject;Module["NULL"]=wrapPointer(0);function destroy(obj){if(!obj["__destroy__"])throw"Error: Cannot destroy object. (Did you create it yourself?)";obj["__destroy__"]();delete getCache(obj.__class__)[obj.ptr]}Module["destroy"]=destroy;function compare(obj1,obj2){return obj1.ptr===obj2.ptr}Module["compare"]=compare;function getPointer(obj){return obj.ptr}Module["getPointer"]=getPointer;function getClass(obj){return obj.__class__}Module["getClass"]=getClass;var ensureCache={buffer:0,size:0,pos:0,temps:[],needed:0,prepare:(function(){if(ensureCache.needed){for(var i=0;i=ensureCache.size){assert(len>0);ensureCache.needed+=len;ret=Module["_malloc"](len);ensureCache.temps.push(ret)}else{ret=ensureCache.buffer+ensureCache.pos;ensureCache.pos+=len}return ret}),copy:(function(array,view,offset){var offsetShifted=offset;var bytes=view.BYTES_PER_ELEMENT;switch(bytes){case 2:offsetShifted>>=1;break;case 4:offsetShifted>>=2;break;case 8:offsetShifted>>=3;break}for(var i=0;i